check pixel value

1 次查看(过去 30 天)
javeed miyandad
javeed miyandad 2011-3-29
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

采纳的回答

Walter Roberson
Walter Roberson 2011-3-29
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;

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Import, Export, and Conversion 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by