How to find local maximum values within a matrix while excluding outliers?
4 views (last 30 days)
Show older comments
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?
0 Comments
Answers (2)
Image Analyst
on 1 May 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.
0 Comments
Edward Strobach
on 1 May 2017
1 Comment
Image Analyst
on 2 May 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.
See Also
Categories
Find more on Subspace Methods in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!