rgb = imread('canberra.jpg');
gray = rgb2gray(RGB);
for i = 1 : 8
plane = bitget(gray, i) * 128;
subplot(2, 4, i);
imshow(plane);
end