Using MATLAB to find highs for high noise data

I have a noisy dataset with three peaks in MATLAB and want to do some image processing on it. Peaks with a width of about 5-9 pixels at the base, in an array of 50 x 50. How to find peaks? MATLAB is very new to me. Here is what I still have ...

For my original image, call it array , I tried

 J = fspecial('gaussian',[5 5], 1.5); C = imfilter(array, J) peaks = imregionalmax(C); 

but compared to the peaks, there is still some noise, so I get a ton of local maxima, which are really just noise values. (I tried to play with the filter size, but that didn't help.) I also tried

 peaks = imextendedmax(C,threshold); 

where the threshold was determined visually ... which works, but certainly not a good way to do this, since it is not so stable.

So how can I find these peaks in a reliable way?

+4
source share
1 answer

Quick suggestions:

Try working with the middle filter in matlab medfilt2 , it removes noise more efficiently than the gauss filter. The Gauss alignment filter works better with subtle noise and saves the image more.

Then, after you extract the peaks, they are still not classified, you must classify each peak and decide whether it is noise or the expected peak. I suggest you study the binary image function class. Especially look at bwconncomp .

+2
source

Source: https://habr.com/ru/post/1308976/


All Articles