필터 지우기
필터 지우기

Re-formulate the image into a vector of zeros and ones.

조회 수: 7 (최근 30일)
kush
kush 2012년 3월 23일
i am working on a project of image processing & i need to convert an image into vector of 0 & 1.in this each pixel needs to be replaced by its binary equivalent
if anyone knows plz help

답변 (2개)

faraz.a
faraz.a 2013년 5월 25일
can you please tell me how to convert binary image in to 0's and 1's matrix were 0 is white pixel and 1 is a black pixel. i need the code for that

Matt Kindig
Matt Kindig 2012년 3월 23일
If your image is an indexed or grayscale image, it is just a matter of comparing the image to a pre-defined threshold. You will need to adjust this threshold based on which features of the image you want to be a 1.
threshold = 0.5; %or some other threshold
BW = (myImage >= threshold); %this will be a matrix of ones and zeros.

카테고리

Help CenterFile Exchange에서 Image Processing Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by