Borrar filtros
Borrar filtros

How to find local maximum values within a matrix while excluding outliers?

3 visualizaciones (últimos 30 días)
I have a matrix of data (nXm) that illustrates the gulf stream (see first image). I would like to chart the exact path of the gulf stream and have attempted to do so using several different methods.
The first attempt was iteratively evaluating the nearest neighbor, while filtering out zeroes and selecting the largest value. I also attempted to avoid extracting a previously evaluated data point, but was unsuccessful.
The second attempt was defining a current speed threshold so that most of the values along the Gulf Stream were selected. That result gave me this second image, but I still have outliers that need to be removed and have attempted looking at differences along path to find the largest differences between sequential data points.
The third method I tried was to view the standard deviation from the median to isolate outliers; however, the functional behavior of the Gulf Stream is complex and even a boxcar approach doesn't work.
The fourth method was performing a sum of sine fit of 8+ terms, but that wasn't good enough either.
In essence, I want to be able to extract the overall behavior from image two without the extra pockets of data outside the Gulf Stream path.
Is there simpler approach than ones that I attempted? Does anyone have any suggestions?

Respuestas (2)

Image Analyst
Image Analyst el 1 de Mayo de 2017
Just threshold and take the largest blob
highSpeedMask = speedImage > someValue; % Possibly might get lots of blobs.
jetStream = bwareafilt(highSpeedMask, 1); % Take only the largest blobs.

Edward Strobach
Edward Strobach el 1 de Mayo de 2017
@Image Analyst, I'll see if that can simplify my code while and reproduce what I am looking for. It turns out that a fifth method I employed was effective at solving this problem. I looked at the Gulf Stream piecewise by evaluating maximum values with longitude for a specifc latitude for the southern portion of the Gulf Stream near Florida where the orientation is predominately north-south, and conversely, evaluating maximum values with latitude for a specific longitude for the rest of the Gulf Stream where the orientation is more east-west. The image produced looks similar to the previous attached image except it excludes the outliers. I have tried it on an additional case and it works. The next step is to see if is generally applicable.
  1 comentario
Image Analyst
Image Analyst el 2 de Mayo de 2017
I'm not sure that will work in general - it sounds pretty specific to the location of this particular jet stream shape. Mine may not be either - what mine depends on is the jet stream being the largest blob in the image. But if the jet stream is broken up - like a dashed shape - and there is a hurricane in the scene then it may find the hurricane. But you could always look at the circularity (=perim^2/(4*pi*area)) which would be low for a hurricane but high for a snake-like shape, so you could first throw out roundish objects and then take the largest bolong/snake object.

Iniciar sesión para comentar.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by