First time here? Check out the FAQ!

Ask Your Question
1

How to identify an image once in a video sequence?

asked Apr 18 '13

Costantino gravatar image

Hi all.
In my application (iOS) I search circular and triangular red objects. To do this I do an analysis of the colors converting RGB space to HSV and search shapes using findContour(). If I find a red object (circular or triangular) cut the portion of the image that contains it using its contour to define the ROI. This happens for each frame, and the problem is that the same “object” is grabbed many times because its contour is found in multiple frames. So, If I take a red circle for 1 second by moving the iPad around this image and the acquisition takes place at 30 frames per second, at the end I will have 30 images of the same object, while I only want one. In the image below, in the upper left the captured video from the camera, at the top right the last image captured and in the lower the sequence of images captured. As you can see, the red circle is captured many times, but always refers to the same object, and this happens because the image I cut it based on the boundary identified. I think I have to use a tracking system, is that correct?

Any suggestions to solve this problem?

image description Best regards
Costantino

Preview: (hide)

Comments

1

Like what you say, maybe you could use tracking algorithm. But if you want to filter it so that you don't have duplicates, maybe try to match it with your already detected objects ? Maybe some template matching, or some other algorithm (i.e. normalize image, convert to grayscale, compare with detected ones) ?

sub_o gravatar imagesub_o (Apr 18 '13)edit

2 answers

Sort by » oldest newest most voted
2

answered Apr 22 '13

For this you can use the features2D part of openCV. Take a look at this tutorials, which apply a feature detector, descriptor and a matcher:

http://docs.opencv.org/doc/tutorials/features2d/table_of_content_features2d/table_of_content_features2d.html#table-of-content-feature2d

Preview: (hide)
2

answered Apr 22 '13

NightLife gravatar image

My suggestion is template matching. You can use this simple Example and use the current frame instead of Input Image.

Preview: (hide)

Question Tools

Stats

Asked: Apr 18 '13

Seen: 789 times

Last updated: Apr 22 '13