이미지 파일 비트 읽기

이미지파일을 비트단위로 읽고싶습니다. 예를들어 0011010010101...

回答 (1 件)

Angelo Yeo
Angelo Yeo 2023 年 7 月 26 日
編集済み: Angelo Yeo 2023 年 7 月 26 日

0 投票

이미지를 uint8로 읽어들인 다음 이진수로 변경할 수 있습니다.
I = imread('bag.png');
% Let's take only a part of the image
I = I(1:3, 1:3)
I = 3×3
23 30 42 22 29 35 21 22 22
bitImage = reshape(string(dec2bin(I)), size(I))
bitImage = 3×3 string array
"010111" "011110" "101010" "010110" "011101" "100011" "010101" "010110" "010110"

カテゴリ

ヘルプ センター および File ExchangeRead, Write, and Modify Image についてさらに検索

製品

タグ

質問済み:

2021 年 5 月 1 日

編集済み:

2023 年 7 月 26 日

Community Treasure Hunt

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

Start Hunting!