Borrar filtros
Borrar filtros

Find the rows and Columns for a non zero pixel in an image

3 visualizaciones (últimos 30 días)
Pankaja Tanjore
Pankaja Tanjore el 18 de Ag. de 2015
Respondida: Walter Roberson el 18 de Ag. de 2015
Hello,
I have an image.I need to find the row and col for a non zero pixels. I need to find the following pairs of rows and columns :
i) Minimum col and the corresponding row whose pixel values are non-zero.
ii)Minimum row and the corresponding col whose pixel values are non-zero.
iii)Maximum col and the corresponding row whose pixel values are non-zero.
iv) Maximum row and the corresponding col whose pixel values are non zeros.
I am attaching the image with the places marked with red line where i need find the rows and columns.
Please let me know how to find this using find() and any() functions in MATLAB
Looking forward to hear from you at the earliest.
Thanks
Pankaja

Respuestas (1)

Walter Roberson
Walter Roberson el 18 de Ag. de 2015
Look at the result of
find(any(YourImage))

Categorías

Más información sobre Images en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by