How to compare more SUFR descriptors

asked 2016-12-17 04:24:41 -0600

Fačko gravatar image

I am working on ear Recognition project. I have database of ears, 60 person - each 4 ears. What I have already done, is that I detectAndCompute from each image Descriptors and Keypoints. Now I need to compare each image with each and find the best result.

What I did is that, I used BFMacther which returns matches link text . The larger the vector is, the difference between the images is smaller and are more similar right? So I saved the largest vector in comparison in one image with every other image and that is the result as the largest vector?

I am thinking now about second maybe better options?

I also found out, that is BFMatcher has method to train. So I can add every train Descriptors to BFMatcher and then call train. But now when I have trained BFMatcher how can I compare and get the result of my test vector?

edit retag flag offensive close merge delete

Comments

feature matching is meant to find matching keypoints in 2 imagesof the same scene, you're trying to abuse that for classification, and it won't work.

also, please clarify, what you're trying to achieve here. are you trying to predict, which person it is ?

berak gravatar imageberak ( 2016-12-17 04:27:24 -0600 )edit

ok my fault. So Is there any possibility to use these descriptors for classification?

Fačko gravatar imageFačko ( 2016-12-17 04:31:42 -0600 )edit
1

Yes that is right ,I am trying to predict which person it is.

Fačko gravatar imageFačko ( 2016-12-17 04:32:10 -0600 )edit
1

imho, youre entirely on the wrong path here. it will fiind keypoints/descriptors anywhere in the image, not restricted to the ear region, and even if you take say, the mean of the best 100 match-distances, you end up with a single threshold number only. instead:

  • try to seperate the ear detection from the classification. (maybe you need to train a cascade to find the ear, ofc., if your images are already cropped, you can skip that)

  • crop ear region, resize to something fixed, then get some "features" from that, pixels, HOG, dense SIFT/SURF, BIF, there's a lot of choices

  • train some machinelearning on that, SVM,ANN,KNN, whatever.

again, much similar processing like in face-recognition..

oh, and an example image (or link to db) would be nice !

berak gravatar imageberak ( 2016-12-17 04:43:02 -0600 )edit
1

OK for better understanding. I did not skipped any detection. I have already trained cascade to detect ears and then I can easily crop the image. SO basically I am working now with image, which contains only ear. My point was, that if are there any possibility to compare Descriptors and get some vectors, which tell me how similar are picture. If I understood you correctly, there is no other options for classification only using machinelearning (SVM,KNN) right?

Fačko gravatar imageFačko ( 2016-12-17 07:19:38 -0600 )edit

Here is example of my cropped image: link text

Fačko gravatar imageFačko ( 2016-12-17 07:20:58 -0600 )edit
1

^^ ok, that already simplifies it a lot !

have you tried your images with opencv's builtin face recognition ?

berak gravatar imageberak ( 2016-12-17 07:40:56 -0600 )edit

Yeah thanks, I tried FaceRecognizer. EigenFaces works fine, but from Fisher and LBPH I get error as you can see : here

Fačko gravatar imageFačko ( 2016-12-20 10:17:42 -0600 )edit