How can I select more than 2 images automatically?

Hi,
I have to select more than 2 or more than 10 images automatically to run the harris algorithm on them. Below program is the image selecting program in Harris algorithm.
frame = imread('Finalfigure.jpg','jpg');
But I have to make like I can select not only 'Finalfigure.jpg'; but also like from'finalfigure1.jpg' to 'finalfigure10.jpg'. That means imread can read more than 2 images at a time.
Also, is there any possibility that the Harris algorithm can select the whole part of the images automatically?
imshow(frame);
k = waitforbuttonpress;
point1 = get(gca,'CurrentPoint'); %button down detected
rectregion = rbbox; %%%return figure units
point2 = get(gca,'CurrentPoint');%%%%button up detected
point1 = point1(1,1:2); %%%extract col/row min and maxs
point2 = point2(1,1:2);
lowerleft = min(point1, point2);
upperright = max(point1, point2);
ymin = round(lowerleft(1)); %%%arrondissement aux nombrs les plus proches
ymax = round(upperright(1));
xmin = round(lowerleft(2));
xmax = round(upperright(2));
By the above program I can select the part of the images where it will select the corners. Here 'k = waitforbuttonpress;' direct that I have to do this by using mouse. Can I make it like that 'k = automatic;' I mean that the selection part can be run automatically?
I really need your advice.
Thank you

 Respuesta aceptada

Shamim Rahman
Shamim Rahman el 13 de Nov. de 2011
The below codes work very fine for me. I have taken 15 images for this.
N = 15;
IMAGES = cell(1,N);
FNAMEFMT = 'image_%d.jpg';
%IMAGES=zeros(N+1,N);
for i=1:N;
IMAGES{i} = imread(sprintf(FNAMEFMT, i));
figure,imshow(IMAGES{i})
end
By using this, anyone can load and show several images.

Más respuestas (1)

Walter Roberson
Walter Roberson el 7 de Nov. de 2011

0 votos

imread() can only read multiple images at one time if the file is in CUR or GIF format.
JPEG files cannot store multiple files in one image. TIFF files can, but imread() and Tiff.read() can only read one image from the TIFF file at a time.

Categorías

Más información sobre Convert Image Type en Centro de ayuda y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by