Ask Your Question
0

Detect multiple color markers

asked 2017-03-17 01:20:58 -0600

Javier gravatar image

I am doing a game, where several players will have an fluorescent marker (and of course UV lamps), while the room will be almost dark. This way I will have bright colored spots moving in the dark. In a way is similar on how IR markers ares used in motion capture, with IR cameras.

I want to follow the markers and detect it´s position in camera, I only need it´s movement in 2d, and the gamers will be sitting, just moving their marker right and left. Now, some will be near, and other far, so some markers will like like balls and other like small points.

I am new to OpenCV, not sure if start using the corner detection algorithms or try to detect them like ball or blob. I think there must be son algorithm already used for capturing IR markers, but I am still exploring OpenCV, so I am not sure where to start.

Any suggestion or commentary will be welcome.

edit retag flag offensive close merge delete

1 answer

Sort by » oldest newest most voted
0

answered 2017-03-20 14:02:30 -0600

everphilski gravatar image

The way I would do it is 1) Build a database of HSV color ranges for each of the fluorescent markers 2) Loop over the video, convert each frame to HSV, then loop over each fluorescent color using cv2.inRange 3) The output of cv2.inRange is a binary image where white is a match and black is not - you can now use each of these images to find the center of the match. If there is noise, You may also need to dilate and erode to remove noise - look at cv2.dilate and cv2.erode. 4) repeat 2-3 until video is complete. Track centers of each color from frame to frame.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2017-03-17 01:20:58 -0600

Seen: 766 times

Last updated: Mar 20 '17