Code:
A=imread('currency.tif');
%need currency note image(‘currency.tif’)
B1=bitget(A,1);
B2=bitget(A,2);
B3=bitget(A,3);
B4=bitget(A,4);
B5=bitget(A,5);
B6=bitget(A,6);
B7=bitget(A,7);
B8=bitget(A,8);
subplot(4,4,[1 8]);
imshow(A);
title('Original 8 bit image');
%subplot original Image
subplot(4,4,9);
imshow(logical(B1));
title('Bit plane 1');
subplot(4,4,10);
imshow(logical(B2));
title('Bit plane 2');
subplot(4,4,11);
imshow(logical(B3));
title('Bit plane 3');
subplot(4,4,12);
imshow(logical(B4));
title('Bit plane 4');
subplot(4,4,13);
imshow(logical(B5));
title('Bit plane 5');
subplot(4,4,14);
imshow(logical(B6));
title('Bit plane 6');
subplot(4,4,15);
imshow(logical(B7));
title('Bit plane 7');
subplot(4,4,16);
imshow(logical(B8));
title('Bit plane 8');
Original Image:
Outputs:
Bit plane 1 Bit plane 2
Bit plane 3 Bit plane 4
Bit plane 5 Bit pane 6
Bit plane 7 Bit plane 8
No comments:
Post a Comment