There are basically two methods: one is to unify your image once to rename such as: 1.jpg,2.jpg and so on, and then use the For loop in order to process it, such as the following statement: Imagine your image has 20 pairs:
Str= ' d:\ do bad \ good image \ '; % of my images placed in D disk, do the poor folder under the Good image folder under
For i=1:20
I=imread ([Str,num2str (i), '. bmp ']); % read each image sequentially
% to do your image processing in this place
End
Method Two:
The image unified method under a folder, do not need to be unified to rename, using the Uigetdir function to get the path of the image you are working on, and then the path of all the image processing, for example: I only work with BMP files
Srcdir=uigetdir (' Choose source directory. '); % Get the selected folder
CD (SRCDIR);
Allnames=struct2cell (dir (' *.bmp ')); % only 8-bit BMP files processed
[K,len]=size (Allnames); % Get BMP file Number
For Ii=1:len
% Take out files successively
NAME=ALLNAMES{1,II};
I=imread (name); % Read files
% then add your image handler here
End
MATLAB and C/A + + programming of the call from Matlab to C + + code http://www.linuxidc.com/Linux/2012-08/68148.htm
Realization of http://www.linuxidc.com/Linux/2013-05/84050.htm by two classification svm method in MATLAB
Take the whole function in MATLAB fix, floor, ceil and round http://www.linuxidc.com/Linux/2013-10/91161.htm
Matlab compiles cuda. cu file http://www.linuxidc.com/Linux/2014-04/100675.htm
This article permanently updates the link address : http://www.linuxidc.com/Linux/2014-06/103666.htm