clear;
clc;
I=imread('lena.bmp');
[line,col]=size(I);
figure;
frame=1;
J=255*ones(line,col);
K=J;
%for frame=1:8
for i=1:line
for j=1:col
J(i,j)=bitand(I(i,j),63);
K(i,j)=bitand(I(i,j),192);
end
end
% subplot(2,4,frame);
%J=mat2gray(J);
%K=mat2gray(K);
subplot(1,2,1);
imshow(J);
subplot(1,2,2);
imshow(K);
%end
评论0