フィルターのクリア

how to do binary conversion of an image?

1 回表示 (過去 30 日間)
sana saleeme
sana saleeme 2016 年 1 月 7 日
コメント済み: Walter Roberson 2016 年 1 月 8 日
how to do binary conversion of an image?
  4 件のコメント
hemalatha
hemalatha 2016 年 1 月 8 日
編集済み: hemalatha 2016 年 1 月 8 日
read the image into an array,that array consists of pixels a=imread("give your imagepath"); now convert the array of pixels into binary by using the inbuilt function dec2bin, binaryvalues=dec2bin(a); now you get the binary values in single column
Walter Roberson
Walter Roberson 2016 年 1 月 8 日
hemalatha, that is not quite correct. You need
binaryvalues = reshape( (dec2bin(a, 8)-'0').', [], 1);
to get the binary values in a single column (presuming that the image was uint8 data type.)

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeData Type Conversion についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by