Ask Your Question
1

Right method for color object tracking

asked 2015-09-16 11:13:56 -0600

Eisen gravatar image

updated 2015-09-16 11:15:17 -0600

Hi, I am trying to detect colored balls like ps3 move controller balls from 2 mt distance.I have 10 camera in same room hanging from the ceiling.Room is dark and balls have led inside.I have 4-5 balls.(red,blue,green,yellow,pink). I want track their position with opencv.Whats the right mehtod for doing this in opencv ? Can u give link , example for this ?

Why am i doing this ? I attach this balls to humans head and track their position.After that transfer their position to my program.For example i will see red person in x:39 y:69 blue person x:49 y:59 ....

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
3

answered 2015-09-16 11:30:21 -0600

updated 2015-09-17 07:01:55 -0600

edit flag offensive delete link more

Comments

1

Meanshift / Camshift algorithms could also be a part of the solution in my opinion.

Eduardo gravatar imageEduardo ( 2015-09-18 03:59:04 -0600 )edit
1
2

answered 2015-09-18 15:16:45 -0600

vahidbas gravatar image

you can use color detection + Kalman filter

  • transform the video frames into HSV color space using cvtColor
  • find a lower and upper bound of HSV values of the color of your balls
  • use inRange to detect the ball, this gives you a binary image where the ones are the pixels of the ball
  • then you may calculate the average of positions of ball pixels to find the center position of ball

you can then feed the position of ball into Kalman filter tracker.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2015-09-16 11:13:56 -0600

Seen: 692 times

Last updated: Sep 17 '15