How to retrieve multiple images from a database?
4 views (last 30 days)
Show older comments
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??
0 Comments
Accepted Answer
Xylo
on 6 Mar 2014
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
More Answers (0)
See Also
Categories
Find more on Database Toolbox in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!