First time here? Check out the FAQ!
Hi there! Please sign in
help
faq
tags
users
badges
This forum is disabled, please visit
https://forum.opencv.org
ALL
UNANSWERED
Ask Your Question
Revision history [
back
]
1
initial version
answered
2015-06-11 08:26:58 -0600
StevenPuttemans
20029
●
16
●
82
●
207
http://stevenputtemans...
Some steps to follow
Start by converting your image to a color space that can be better segmented for visible colors, like HSV color space.
Then define threshold values for your specific colors on the H S and V color channels seperately.
For each color create a binary thresholded mask based on the threshold values previously defined.
On each mask you can apply findContours (even remove some noise with a gaussian blur if you need that) and detect all the available blobs/objects.
Now count the number of objects and assign an index to each blob.
In order to be sure that an index sticks to blob, apply a Kalman filter tracking and use a distance measure to connect blobs between frames.
Copyright
OpenCV foundation
, 2012-2018. Content on this site is licensed under a
Creative Commons Attribution Share Alike 3.0
license.
Powered by Askbot version 0.10.2
Please note: OpenCV answers requires javascript to work properly, please enable javascript in your browser,
here is how