How to retrieve multiple images from a database?

4 次查看(过去 30 天)
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??

采纳的回答

Xylo
Xylo 2014-3-6
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
  1 个评论
kiran paul
kiran paul 2014-5-12
Reading is fine but the retrieved images are not similar as if i am retrieving for an image with flower. retrieved images are not of flowers but of something else.

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Database Toolbox 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by