Search code examples
opencvcomputer-visionsurf

object recognition performance not good


I am trying to do object recognition using algorithms such as SURF, FERN, FREAK in opencv 2.4.2.

I am using the programs from opencv samples without modifications - find_obj.cpp, find_obj_ferns.cpp, freak_demo.cpp

I tried changing the parameters for the algorithms which didn't help.

I have my training images, test images and the result of FREAK recognition here

As you can see the result is pretty bad.

  • No feature descriptors is detected for one of the training image - image here
  • Feature descriptors are detected outside the object boundary for the other - image here

I have a few questions:

  1. Why does these algorithms work with grayscale images ? It is apparent that for my above training images, the object can be detected easily if RGB is included. Is there any technique that takes this into account.

  2. Is there any other way to improve performance. I tried fiddling with feature parameters which didn't work well.


Solution

  • First thing i observed in your image is, object is plane and no texture differences are there...I mean all the feature detectors you used are for finding corners which are view invariant, it means those are the keypoints in an image which are having unique neighborhood and good magnitude of x and y derivatives. I have uploaded my analysis...see the figures enter image description here

    How to know what I am saying is correct?

    Just go to the descriptor values of a keypoint you find over your object and see the values, you will see most of them are zeros...Because a descriptor is the description of variation of the edges around a corner point in a specific direction (see surf documentation for more details).

    The object you are trying to detect is looking like a mobile phone, so you just reverse the object or mobile and repeat the experiment and you will surely get good results...Because on front side generally objects have more texture like switches, logos etc..

    Here is a result I uploaded, enter image description here