how to scan the image and convert it from binary to decimal using matlab

2 ビュー (過去 30 日間)
sonam s
sonam s 2013 年 12 月 24 日
編集済み: Walter Roberson 2013 年 12 月 24 日
for(i=1:length(pv))
a=pv(i);
a=find(chars==a);
a=pattern(0,1);
num(8)=bin2dec(a);
end

回答 (1 件)

Image Analyst
Image Analyst 2013 年 12 月 24 日
I have no idea what you're doing. It looks like just a bunch of random lines of code - total nonsense. Explain what you want to do better. Do you have a gray scale image (uint8 or uint16) or a binary image (logical, true or false)? A gray scale image is already in decimal - that's that the gray levels are. And of course gray scale numbers. even though they are in the range 0-255 decimal, can be considered as binary just like any number can be considered as binary - not as true/false but as if you wrote the number out in 0s and 1 like you get by calling dec2bin(). A binary (true/false) image could be converted to a decimal image of values 0 and 1 if you want. I'm not sure what else to say until you explain better.

カテゴリ

Help Center および File ExchangeEncryption / Cryptography についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by