Determining Minima of improfile
1 view (last 30 days)
Show older comments
Hello All, I am trying to find the locations of minimum intensity values (the minimum values of the local peaks) and their pixel locations. I would like to find the pixel location of the minimum values between pixels 100 and 200 (x-axis) and the distance between these two points in terms of pixels. I have included the code that is just the profile across the red line.
clc clear all
GrayImage = rgb2gray(imread('index.png'));
x1 = [0 225]; y1 = [110 110];
subplot(2,2,1); imshow(GrayImage); title('Original Image'); hold on line(x1,y1,'color', 'r'); hold off
subplot(2,2,2); improfile(GrayImage,x1,y1,225);
0 Comments
Accepted Answer
Image Analyst
on 2 Feb 2015
You can use a function called imregionalmin().
2 Comments
Image Analyst
on 3 Feb 2015
You can use find on the array:
localMins = imregionalmin(array);
[rows, columns] = find(localMins);
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!