# one to many images matching in matlab?

i have database for 50 person ,it is 250 images (5 images/person) , i need to perform one to many matching between images for recognition persons.

so , i divided the image as 2 parts (one for training and one for testing)

for example if we say that the first folder contains 100 images(2 images /person),and the second contains 150 images (3 images /person)

is this division correct? if it is correct , how can i matching each image in folder1 with all image in folder 2(which will contain 3 similar image) and obtain the better result after (that give max matching percentage)from folder 2 and finally returning the name of this image ?

i need to perform this in matlab

please , i need many advices and consultations with any one has good knowledge in this field.

this is an example of my images:

regards

• i don't know how can i start , i tried to perform 'rigid registration algoritm' , but i am not sure if it is possible to use it for recognition purposes or it is restricted to the verification purposes only.do you have any advices? – ruaa Feb 14 '12 at 20:00

5 images per person is really very few. In this situation it makes sense to use as much data for the training set as you possibly can. This means for each person randomly select 4 images for training, and one for testing. You should use this procedure several times so that you have a number of training set/test set combinations.

If you have access to the Statistics Toolbox for Matlab, check out cvpartition function.

If not, then you should have a loop over all persons, and for each person use the randperm function to generate a randomly shuffled list of indices of the images. Then you can take the image corresponding to the first index and add it to your test set, and put the rest into your training set. Or you can put 2 images into the test set, or however many you like. Generally, the training set should be larger than the test set.

You should generate the training and the test set several times, each time calling rng with a different value, to reset the seed of the random number generator. If you generate 10 training/test set pairs, then you evaluate your algorithm 10 times and get 10 accuracy values. From them you can compute error bars, or you can compare to other algorithms using hypothesis testing.

As to how you actually classify the images, that is very much a separate question, and the answer depends on what's in the images. What exactly is on that image you've posted?

• @Dima.i dont have access to the Statistics Toolbox for Matlab.are there another way that can i follow it? – ruaa Feb 17 '12 at 20:58
• @ruaa, I have edited the answer. By the way, the image you posted, does not look like a person at all. :) – Dima Feb 17 '12 at 22:49
• because of my simple knowledge in this work , i will write your comment in my notebook for the next works, but about my image that i posted it represent the veins in a personal hand.Also , i think yhat it still need modification to enhance it. – ruaa Feb 17 '12 at 22:59