You are on page 1of 1

a=imread('C:\Users\SAL\Desktop\vision\WIN_20150624_193704.

jpg');
[m,n,l]=size(a);
c=zeros(m,n,l);
d=zeros(m,n,l);
for i=1:m
for j=1:n

c(i,j,1)=a(m-(i-1),j,1);
c(i,j,2)=a(m-(i-1),j,2);
c(i,j,3)=a(m-(i-1),j,3);
end
end
for i=1:m
for j=1:n
d(i,j,1)=a(i,n-(j-1),1);
d(i,j,2)=a(i,n-(j-1),2);
d(i,j,3)=a(i,n-(j-1),3);
end
end
c=uint8(c);
d=uint8(d);
figure
subplot(2,1,1);
image(d);
subplot(2,1,2);
image(c);

You might also like