4.2 | 5 ratings Rate this file 28 Downloads (last 30 days) File Size: 2.54 KB File ID: #31570 Version: 1.0
image thumbnail

Finding Dominant Peaks and Valleys of an Image Histogram



This function finds dominant peaks and local valleys of an image histogram

| Watch this File

File Information

This function finds dominant peaks and valleys of an image histogram. Minimum peak distance and averaging filter size can be changed to suit your need.
Although, the function is originally written for mages, there is no reason why this can't be used on one dimensional data.

[peaks minima_low minima_high] = findlocalminima(I,10,5,0);
[peaks minima_low minima_high] = findlocalminima(I);

I = imread('cameraman.tif');
[peaks minima_low minima_high] = findlocalminima(I);

'minima_low' and 'minima_high' correspond to the local minimums beside each of the peak identified in 'peaks'

This is the function that is used for peak detection in my paper,
 "De Silva, D.V.S.; Fernando, W.A.C.; Kodikaraarachchi, H.; Worrall, S.T.; Kondoz, A.M.; ,"Adaptive sharpening of depth maps for 3D-TV," Electronics Letters , vol.46, no.23, pp.1546 -1548, November 11 2010. Kindly consider to cite this paper if you use this in your work.

Required Products Image Processing Toolbox
MATLAB release MATLAB 7.5 (R2007b)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (5)
16 Feb 2015 Sr VK

Sr VK (view profile)

Hi Varuna De Silva, Thanks very much for the wonderful function.


23 Nov 2014 avi

avi (view profile)

thanks a lot!!!

03 Jul 2013 Wajahat

Great. After a little tuning, (using smooth(hist)), produces superb results and nicely finds peaks in the histogram.

19 Oct 2011 Qiao Liyong  
24 Aug 2011 John William  

Contact us