Inflection points on grayscale image histogram
1 view (last 30 days)
Show older comments
Veronica Morales
on 24 Jan 2019
Commented: Star Strider
on 31 Jan 2019
I have a grayscale image, then plotted the histogram using imhist. Now, I need to find the first inflection point of the histogram. That point halfway up, when the bell-shape curve starts to change (see red line in attached jpg). I calculated first and second derivative of the histogram, but I'm stuck on how to get that point. My code looks something like this:
I = imread('dog3.jpg');
%figure; imshow(I)
%Calculating and plotting histogram of image
y = imhist(I);
f1 = diff(y);
f2 = diff(f1);
figure; imhist(I)
figure; plot(y)
figure; plot(f2)

0 Comments
Accepted Answer
Star Strider
on 24 Jan 2019
See if the approach in my Answer to How to draw tangent line at infleciton point? (link) will work for you.
12 Comments
Star Strider
on 31 Jan 2019
I am still doing my best to figure out what you are doing in your code with respect to the inflection points.
Meanwhile, one way to find FWHM is to use the midcross (link) function. (It was introduced in R2012a.)
specifically:
mcy = midcross(y);
produces:
mcy =
23.4983
38.7014
So:
FWHM = diff(mcy)
FWHM =
15.2031
Those values are in terms of the ‘x’ variable being defined as:
x = 1:numel(y);
so essentially the indices of ‘y’.
More Answers (1)
See Also
Categories
Find more on Histograms in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
