check pixel value

2 visualizaciones (últimos 30 días)
javeed miyandad
javeed miyandad el 29 de Mzo. de 2011
sir in a given binary image i need to check a given pixel whether it is black or white how to do plz help in coading
if i give (32X43)pixel i need to check whether that pixel is white or black

Respuesta aceptada

Walter Roberson
Walter Roberson el 29 de Mzo. de 2011
pixel_is_white = logical(Image(i,j));
or
pixel_is_white = Image(i,j) ~= 0;
pixel_is_black = ~Image(i,j);
or
pixel_is_black = Image(i,j) == 0;

Más respuestas (0)

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by