MATLAB: Provide the code in which given image find in 600 images in matlab

find image

..

Best Answer

% Save all 600 images name in a sequence manner before doing the operation
% names for example im1,im2,im3..or 1,2,3...so on
%Save the folder of images in the current directory
%read the given image-assume given image from 600 image folders, say image1.jpg
image=imread('image1.jpg'); % do this operation
gray_image=rgb2gray(image);
path_directory='folder_name'; % 'Folder name' having 600 images
original_files=dir([path_directory '/*.jpg']);
for k=1:length(original_files)
filename=[path_directory '/' original_files(k).name];
image_call=imread(filename);
image_search=rgb2gray(image_call);
sub=imsubtract(image_gray,image_search);
if sub==0
disp('Given Image found');
imshow(image_call);
break;
end
end