check pixel value

조회 수: 2 (최근 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에서 Motor Drives에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by