for n=0:1673
str1='G:\obj\';str2=num2str(n);str3='.jpg';
SC=[str1,str2,str3];
i=imread(SC);
j=rgb2gray(i);
%imshow(i),title('Original');
figure(2),imshow(j,'border','tight','InitialMagnification','fit'),title('Translated') ;
set (gcf,'Position',[0,0,500,500]);
axis normal;
saveas(figure(2),['G:\obj\',num2str(n),'.jpg']);
str1='G:\obj\';str2=num2str(n);str3='.jpg';
SC=[str1,str2,str3];
i=imread(SC);
j=rgb2gray(i);
%imshow(i),title('Original');
figure(2),imshow(j,'border','tight','InitialMagnification','fit'),title('Translated') ;
set (gcf,'Position',[0,0,500,500]);
axis normal;
saveas(figure(2),['G:\obj\',num2str(n),'.jpg']);
end