How to get pixel information which lies on boundary?

6 visualizaciones (últimos 30 días)
Ekta Sharma
Ekta Sharma el 22 de En. de 2016
Respondida: Walter Roberson el 22 de En. de 2016
I have detected boundary of an object in image but now i want to get the pixel information of a pixel which lies on that boundary in the very first row as from that point i want to apply chain code for the object.Can anyone provide me help on this?

Respuestas (1)

Walter Roberson
Walter Roberson el 22 de En. de 2016
[r, c] = find(BoundaryMask);
[first_row, row_idx] = min(r);
mask_cols_in_first_row = c(row_idx);
now first_row will be a scalar that is the index of "very first row" . mask_cols_in_first_row will be a vector of column indices of the pixels in the mask in that very first row.

Categorías

Más información sobre Image Segmentation and Analysis 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