0

I have 250 images stored in in_dir = 'C:\Users\DJDJ\Desktop\pic';

These pictures are arranged as following and named : image1 , image2, image3, ..., image250.

I want to read all these images and process them starting by image1, after processing go to process image2, and after image3 to image250

then saved the resultant images after pre-processing in a specific file, for example at out_dir = 'C:\Users\DJDJ\Desktop\pic output';.

How can I do this in matlab?

A-Sharabiani
  • 17,750
  • 17
  • 113
  • 128
DJAMEL.
  • 11
  • 1
  • thank you for answering my question – DJAMEL. Jan 21 '17 at 14:08
  • the problem is reading the images as : image1 ,image2....image250 and i am trying to read them from in_dir = 'C:\Users\DJDJ\Desktop\pic' and after to save them in out_dir = 'C:\Users\DJDJ\Desktop\pic output'; – DJAMEL. Jan 21 '17 at 14:09
  • for px = 1 : 250 fname=(['image',num2str(px),'.jpg']); current_image = imread(fullfile(in_dir, fname,'jpg')); out_image = current_image ; imwrite(out_image, fullfile(out_dir, fname,'jpg')); end – DJAMEL. Jan 21 '17 at 14:19

0 Answers0