how to view the bit planes of an image?

7 views (last 30 days)
matlab9000
matlab9000 on 4 Apr 2018
Answered: Image Analyst on 4 Apr 2018
I have separated the eight bit planes of the image like this:
img= imread('cameraman.tif');
primo = bitget(img, 1);
secondo = bitget(img, 2);
terzo = bitget(img, 3);
quarto = bitget(img, 4);
quinto = bitget(img, 5);
sesto = bitget(img, 6);
settimo = bitget(img, 7);
ottavo = bitget(img, 8);
subplot(4,2,1), imshow(primo, []), title('Primo piano di bit');
subplot(4,2,2), imshow(secondo, []), title('Secondo piano di bit');
subplot(4,2,3), imshow(terzo, []), title('Terzo piano di bit');
subplot(4,2,4), imshow(quarto, []), title('Quarto piano di bit');
subplot(4,2,5), imshow(quinto, []), title('Quinto piano di bit');
subplot(4,2,6), imshow(sesto, []), title('Sesto piano di bit');
subplot(4,2,7), imshow(settimo, []), title('Settimo piano di bit');
subplot(4,2,8), imshow(ottavo, []), title('Ottavo piano di bit');
How do I view the bit planes generated by the multiplication of the current plan number by the factor of 2 raised to (n-1), since the plans are only 8?

Answers (1)

Image Analyst
Image Analyst on 4 Apr 2018
See attached demo.

Community Treasure Hunt

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

Start Hunting!