i have written a code to find the 8 bit planes of the gray image. i saved those images which should be in binary now. but when i am reading those images it is showing its pixel values few 0 and most 255 in binary only 0's and 1's should be there and when i did this size(d) it displayed 598 931 3.
i want it to be a in a form of 2-d array matrix with only 0's and 1's
can any one tell me what is the problem occurring?
A=imread('boy.tif');B=bitget(A,1); figure, imshow(logical(B));title('Bit plane 1');B=bitget(A,2); figure, imshow(logical(B));title('Bit plane 2');B=bitget(A,3); figure, imshow(logical(B));title('Bit plane 3');B=bitget(A,4); figure, imshow(logical(B));title('Bit plane 4');B=bitget(A,5); figure, imshow(logical(B));title('Bit plane 5');B=bitget(A,6); figure, imshow(logical(B));title('Bit plane 6');B=bitget(A,7); figure, imshow(logical(B));title('Bit plane 7');B=bitget(A,8); figure, imshow(logical(B));title('Bit plane 8');
this what i used then gave names to each of them
and when i read d=imread('bp0.tif') its giving 0 and 255 (only 0 and 255) i want ones and zeros and size should be a 2-d array why does it show 598 931 3
Best Answer