Ask Your Question

OpenCV + Python | Multiple object tracking

asked 2015-10-27 08:00:30 -0500

plagron gravatar image

I'm working on a project and I really can't reach a solution. My goal is to track some circular objects of the same color (red) in a video. My current pipeline is:

  1. Convert each frame from BGR to HSV
  2. Threshold the image using inRange() function
  3. Some morph operations like erode(), dilate(), blur()
  4. Find contours and then some infos like area, centroid etc...
  5. Draw contours on the original frame
  6. Save the new centroid position in every frame (in a python dictionary)

The problems are:

  1. The result is a little noisy
  2. I can't give an identity to each object (there are problems when two object come in contact, or when an object disappears and then reappears etc...)

I would be grateful if someone has some suggestions on what's the best way to procees and how can I change pipeline (e.g. using Kalman Filter, Camshift or other algorithms). I'm not a CV expert, so please be patient. Thanks a lot

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2015-10-28 01:26:32 -0500

arjo129 gravatar image

I'd use FAST/FREAK for extracting key points with descriptors (if realtime isn't required one could use SIFT/SURF) on the original image. This way one can label objects. Theres a video over here about it.

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2015-10-27 08:00:30 -0500

Seen: 9,022 times

Last updated: Oct 28 '15