MATLAB: 8-bit plane slicing for an image

image processingMATLAB

convert an image into 8 bit plane images by taking corresponding bit values at each pixel....of the image..
i tried but i dint get the correct program
convert each value exp- 64...the bcd value 0110 0100..like this for every pixel has 8 bit bcd value..and we need to group each level bits as one new image for example all msbs or all lsb bits..

Best Answer

You should be able to simply use bitget, as in
im = imread('pout.tif');
bit1 = bitget(im, 1); % lsb for example
imshow(bit1, [])
Related Question