identify, count items [closed]

asked 2015-03-19 10:54:52 -0500

Barry gravatar image

Hello, I've been exercising the tutorials and examples, mainly for feature detection and extraction.

I'm using C++, Visual Studio 2012, and open CV 2.4.11.

I've gotten to the point where I can train on a template, a box of cereal for instance, then hold that item in front of a WebCam and have a cluster of feature lines drawn between the video image and trained image – you've seen the tutorial and example.

But, what I haven't seen, so far, is the next step. How do you use this cluster of feature detections between the test and train images to determine that " Oh yeah, it's a box of corn flakes" (or maybe I have two or three boxes).

I have feeling it might involve in inliers and outliers, but I haven't found the right stuff yet.

My ultimate problem will be to detect, identify, and count boxes of cereal on a shelf. Imagine there are two boxes of Cheerios, one box cornflakes, and three boxes of Froot Loops. I want to identify and count the items.

Can someone point me in the right direction – maybe to an example or the OpenCV functions I should be looking at?

Thanks, Barry.

edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by sturkmen
close date 2020-10-01 04:10:50.680605


If it is multiple object instances that you want to detect, then your approach wont work, since features of multiple objects will get matched to your reference object. I would start by creating a cerial box detector using cascade classifiers, combining all possible boxes, once the box is found you can apply your technique to the discovered region to identify which box you are dealing with.

StevenPuttemans gravatar imageStevenPuttemans ( 2015-03-20 05:12:56 -0500 )edit

Thanks. By chance, in my searching, I found cascade classifiers late last night. I was going to try to train for each individual box and have the classifier identify box. I like your method of training for all boxes and then use the feature detection on the region to identify box. I am very new to this, so I don't have the experience to know which method will work better. I did not think of your approach.

Barry gravatar imageBarry ( 2015-03-20 11:31:26 -0500 )edit