Borrar filtros
Borrar filtros

Unable to find the location of the pixel with the minimum gray level

1 visualización (últimos 30 días)
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.
minValue = min(I(:))
[row, column] = find(I == minValue);

Respuesta aceptada

Yongjian Feng
Yongjian Feng el 28 de Jul. de 2021
A quick guess. Maybe there are more than one minimum? Then you need to decide. Maybe anyone is good enough?
  3 comentarios
DGM el 29 de Jul. de 2021
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.

Iniciar sesión para comentar.

Más respuestas (0)


Más información sobre Image Processing Toolbox en Help Center y File Exchange.





Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by