Ask Your Question
0

Multiple (same) object recognition with OpenCv

asked 2013-07-06 13:22:43 -0600

Skaks gravatar image

i'm trying to find and count multiple instances of the same object into an image, with OpenCV (c++).

For example, i'm trying to count how many times a bottle of shampoo is placed into a market's shelf.

  • Firstly i tried to use SURF algorithm to solve this problem, but it finds only the image that i took from it (for querying).

    This is an example:

    http://s11.postimg.org/tr96s823n/surf.jpg

    Now, this work well, but if i delete it from the shelf and repeat the match it gives me false positive or nothing(depending by the shelf image).

    I think that it doesn't work because of the noise that the light, the position of the product, etc.. (--> maybe can a neural network or a SVN machine resolve the problem of the noise? If yes, i need to train them for each object that i should find on the shelf? )

    -->Are not SURF and SIFT rotation, scale and light invariant?

  • So, to overcome the problem i tried to use the Template Match algorithm to find a iteratively "square" that contains a product and, on that square, use SURF algorithm to determine if the square really contains the object i'm searching for, or not.

    This method seems to work until the products on the shelf are very similar to the query image (the one that i took from the shelf image).

    This is an example:

    http://s17.postimg.org/812f9mk67/template.jpg

    So i lose the rotation and scale invariance. :(

  • I thought that another way to reach the goal (more or less) is using the Graph Theory without using a matcher (like K-NN): if i connect with edges the keypoints of the shelf image (used like vertex) and the find a method tho cut the edges between keypoints the are not correlated(i need a measure of correlation! ) i could find the areas of the product. Then counting the areas i could find the number of the same product into the shelf.

I know that i do a lot of questions, but i'm stuck on that without any ideas. If somebody has any idea or advice it whould be really appreciated. Thanks to all who reads this!

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2014-11-14 13:24:17 -0600

Doombot gravatar image

By themselves, SIFT and other keypoint-descriptors matching methods do not cope well with multiple instances of the same object on an image. Some authors tackled the problem : http://www.cmu.edu/qolt/Research/publications/2009Pubs/collet_icra09_final.pdf

But I have no code implementation of their method.

Oh, there are some quick explanation in section IV-C of the paper on why it doesn't normally work without a special way to address it.

edit flag offensive delete link more

Question Tools

Stats

Asked: 2013-07-06 13:22:43 -0600

Seen: 4,761 times

Last updated: Nov 14 '14