How to find local maximum values within a matrix while excluding outliers?
4 次查看(过去 30 天)
显示 更早的评论
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 个评论
回答(2 个)
Image Analyst
2017-5-1
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 个评论
Edward Strobach
2017-5-1
1 个评论
Image Analyst
2017-5-2
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.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Subspace Methods 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!