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!