Could you please tell me how to extract the particular bits from each bit map images. and a way to store all these constructed files, The matlab program of getting 8 bits map images is as follows

3 ビュー (過去 30 日間)
IndianNigger
IndianNigger 2016 年 12 月 10 日
回答済み: DGM 2024 年 10 月 12 日
C = imread('cameraman.tif');
[Row Col] = size(C);
Cbit = cell(1, 8);
for bit = 1:8
Cbit{bit} = bitget(C, bit);
figure(bit)
imshow(logical(Cbit{bit}))
title(sprintf('Bit plane %d', bit));
end

回答 (1 件)

DGM
DGM 2024 年 10 月 12 日
imwrite() exists. For logical images, use PNG.
That said, I don't know why you'd be saving the bitplanes as individual images. This all seems like a way to make a task unnecessarily complicated.

カテゴリ

Help Center および File ExchangeImport, Export, and Conversion についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by