how can change pixcle value to binary in matlab and write its bit in what variable?
Info
This question is closed. Reopen it to edit or answer.
Show older comments
I want to change my pixel values to binary . and i want to keep its binary value in a variable how can change it to binary and how can put it in a variable can i put it in an array with 8 index
Answers (2)
Walter Roberson
on 29 Dec 2013
See dec2bin(), which converts to string. If you want numeric form,
dec2bin(Value,8) - '0'
1 Comment
sama h
on 29 Dec 2013
Image Analyst
on 29 Dec 2013
Perhaps you mean
thresholdValue = 128; % or whatever value you want/need.
binaryImage = grayScaleImage > thresholdValue;
Why don't you just attach your image and tell us what you want to measure or do to it?
This question is closed.
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!