MATLAB: How to retrieve multiple images from a database

digital image processingimage processing

I am working on CBIR and m able to retrieve the output of one image now i want it to retrieve multiple images. Here, in this m comparing the features color and texture of query and database image to retrieve one image output using euclidean distance. When using this for multiple the same image is retrieved. Can anyone help me on this??

Best Answer

You can do this easily..... before doing this program, you have to keep all of your image in a folder and rename them by any common char+number concatenation form (like a1.jpg, a2.jpg,a3.jpg....). after that you just use strcat() function for reading the path name, and then read the images.
%%%%%%%%%%%%%%%%%%%%%
for i=1:10 %suppose there are 10 image
im=imread(strcat('J:\multimedia\photo\a',strcat(i),'.jpg'));
imtool(im);
end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %the below code is for different image name
folder_name=dir(strcat('J:\multimedia\photo\')); % the path tht u hv imges
no_of_content=size(folder_name);
no_of_images=no_of_content(1,1)-3;
for i=1:no_of_images
im=imread(strcat('J:\multimedia\photo\',folder_name(i+3).name));
imtool(im);
end