Monday, June 3, 2013

image tilting

original image


for i=1:2:1000;img(i,:,:)=img(i+1,:,:);endfor
imshow(img)

for i=1:2:500;img(i,:,:)=0;endfor
imshow(img)
for i=1:2:1000;img(i,:,:)=img(i+1,:,:);endfor
imshow(img)

upper 50 rows are tilted
for i=1:1:50;img(i,:,:)=img(i*8,:,:);endfor
imshow(img)
now tilting other 200
for i=50:1:200;img(i,:,:)=img(i*6,:,:);endfor
imshow(img)

for i=200:1:250;img(i,:,:)=img(i*4,:,:);endfor
imshow(img)


oops thats a mistake


===>>>>now doing it again
for i=1:1:50;img(i,:,:)=img(i*8,:,:);endfor

for i=50:1:200;img(i,:,:)=img(i*6+100,:,:);endfor
for i=50:1:200;img(i,:,:)=img(i*6+100,:,:);endfor
imshow(img)


expansion of the above 250 rows of above image as full image
for i=250:-1:1;img(i*6,:,:)=img(i,:,:);img(i*6-1,:,:)=img(i,:,:);img(i*6-2,:,:)=img(i,:,:);;img(i*6-3,:,:)=img(i,:,:);img(i*6-4,:,:);img(i*6-5,:,:);endfor
imshow(img)




No comments:

Post a Comment