How to find maximum pixel intensity of the two regions obtained after finding the threshold of the image
6 views (last 30 days)
Show older comments
SHRISHTI DEEP
on 22 Feb 2015
Commented: SHRISHTI DEEP
on 23 Feb 2015
We are working on DIP project where we found out the threshold of the gray scale image. Now we have to * find the maximum intensity of the two regions that we got, one region whose pixels are less than the threshold and the other whose pixels are greater than it. * PS. We are not converting the image into binary image after finding the threshold. We just have to separate pixels in two regions and find the maximum intensity in each region bold
0 Comments
Accepted Answer
Image Analyst
on 22 Feb 2015
Edited: Image Analyst
on 22 Feb 2015
Try something like this
% grayImage = imread('cameraman.tif');
someThreshold = 190;
binaryImage = grayImage < someThreshold;
labeledImage = bwlabel(binaryImage);
measurements = regionprops(labeledImage, grayImage, 'MaxIntensity');
maxIntensities = [measurements.MaxIntensity]
That gives a blob-by-blob accounting of the max. If you just want the max of the image above and below the threshold, you can simply do this
mask = grayImage < someThreshold;
maxAbove = max(grayImage(mask))
maxBelow = max(grayImage(~mask))
More Answers (0)
See Also
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!