Unable to find the location of the pixel with the minimum gray level
1 次查看(过去 30 天)
显示 更早的评论
I want to find the location of the pixel in the image which has the minimum gray level. I tried the code below. But it gives me the coordinates of more than one pixel. What I need is to find the location of one pixel that has the minimum gray level. Any suggestion would be appreciated.
I=imread('FP00000f002b04u_01.png')
minValue = min(I(:))
[row, column] = find(I == minValue);
0 个评论
采纳的回答
Yongjian Feng
2021-7-28
A quick guess. Maybe there are more than one minimum? Then you need to decide. Maybe anyone is good enough?
3 个评论
DGM
2021-7-29
If any one minimal point is sufficient, then how about the first?
[row, column] = find(I == minValue,1,'first');
I'm not really sure how you intend to use it, but that's one way.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Image Processing Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!