I have noisy data set with three peaks in MATLAB and want to do some image processing on it. The peaks are about 5-9 pixels wide at the base, in a 50 x 50 array. How do I locate the peaks? MATLAB is very new to me. Here is what I have so far...
For my original image, let's call it array
, I tried
J = fspecial('gaussian',[5 5], 1.5);
C = imfilter(array, J)
peaks = imregionalmax(C);
but there is still some noise along the baseline between the peaks so I end up getting a ton of local maxima that are really just noise values. (I tried playing with the size of the filter, but that didn't help.) I also tried
peaks = imextendedmax(C,threshold);
where the threshold was determined visually... which works but is definitely not a good way to do it since it's not that robust obviously.
So, how do I locate these peaks in a robust way?