Info
This question is closed. Reopen it to edit or answer.
how can change pixcle value to binary in matlab and write its bit in what variable?
1 view (last 30 days)
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
0 Comments
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
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?
0 Comments
See Also
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!