Question

I'm coding a program in OpenCV, which is supposed to detect objects in a scene,namely products in a supermarket.

I plan to use SURF descriptors for this purpose, however everything I've found so far is related to finding 1 occurrence of an object in a scene (generally with nearest neighbor matching) and I've found absolutely nothing about detecting objects in a scene with multiple instances of the same object (NN obviously doesn't work, since the best match for each point may be in different instances).

I also need to use a classifier, like Artificial Neural Networks, which could be more helpful in finding multiple instances of the object, however I don't understand how to use an ANN (or any other classifier) with keypoints.

Should I use the ¿64? values of each SURF point as the input of the ANN, and each of, say 5 products, as the output? Meaning that all the points (which are not similar) within one object would produce the same output.

I've read that that's the way to go, but I don't see how it could work since all the keypoints in one object may (and should) have different characteristics. But I can't think of any other way to do it.

Sorry if I haven't explained it very well, I'll try to clarify if something's not clear enough.

Was it helpful?

Solution

I had a similar problem. What I have done is the following:

  • Use sliding window. Sweeps with ROI of various size in the whole image. The size of the ROI should be more or less of the size of the expected object.
  • For each patch, detect the features and does the matching. If a object is detected, set the region to zero in the main image.
  • Go to next patch and repeat.

But it can be a bit slow with SURF (if you have a lot of ROIs to sweep), so I used FAST feature detector and BRISK descriptor to speed up the process. It worked well.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top