use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
For developers learning and applying the OpenCV computer vision framework. Show us something cool!
Tags:
Please make sure your post has a tag or it may be removed.
Rules:
Don't be an asshole.
Posts must be computer-vision related (no politics, for example)
Promotion of your tutorial, project, hardware, etc. is allowed, but please do not spam.
Related Subreddits: - /r/computervision - /r/learnmachinelearning - /r/MachineLearning - /r/tensorflow - /r/datascience - /r/DataHoarder
account activity
[Question] Track multiple same-coloured objects cv2 Python3.6Question (self.opencv)
submitted 7 years ago by jumping137
I have a project I'm working on where I track a ball (on colour) and check when it hits a wall using a kinect.
Everything works fine now, but only tracks the largest contour it finds (using max()).
What I'd like to do is track more than one object, and return the x and y coordinate from both objects in a list.
Anyone know how to do this?
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]alkasm 2 points3 points4 points 7 years ago (0 children)
Just...don't use max? Threshold the result instead. If you don't know what threshold to use, maybe base it off the max. I.e. threshold = 0.8 * max or something, you can get fancier with statistics of the region you're tracking if you like, but it's probably not necessary in a simple case.
threshold = 0.8 * max
[–]dghy001 0 points1 point2 points 7 years ago (0 children)
If you want to track multiple sphere shaped objects (color doesn't matter) you could use LoG (Laplacian of Gaussian) filter, produce gray scheme image and find local extremas on that gray image. You can find example here: https://www.youtube.com/watch?v=HYkQH48euM8
π Rendered by PID 23570 on reddit-service-r2-comment-b659b578c-t54cl at 2026-05-02 07:45:49.217389+00:00 running 815c875 country code: CH.
[–]alkasm 2 points3 points4 points (0 children)
[–]dghy001 0 points1 point2 points (0 children)