Differentiating laser pointers once detected

asked 2015-03-03 05:44:14 -0600

acron0 gravatar image

updated 2015-03-03 08:58:46 -0600

It is my intention to implement a laser pointer detection system, similar to the one described here: http://answers.opencv.org/question/52...

However, in my project (a game) I would like multiple (2-10) players to have their pointers on the screen at any given time. What techniques could I use to discern which pointer belongs to which player? I would like to just use one camera for n pointers, rather than a camera per pointer.

EDIT: There are currently no constraints on types of camera, types of laser or colour of laser.

edit retag flag offensive close merge delete

Comments

Well why not let players move their pointer to a location on the screen for starters, so that each player can link itself to a pointer. This will allow you to add a tracker to each laser dot and so differentiate between both players.

StevenPuttemans gravatar imageStevenPuttemans ( 2015-03-03 05:59:30 -0600 )edit

This would only work if none of the pointers ever left the camera's view or lost detection and I can't guarantee that.

acron0 gravatar imageacron0 ( 2015-03-03 06:18:54 -0600 )edit

Hmm that doesnt have to be the case. You will have to build some knowledge around it, but imagine that initially all pointers are on the screen, than you can assign trackers. If one gets lost than the first newly initialized tracker is the one you lost. Or you could store the last locations and compare new initializations to that list in order to maintain the ID for a dot!

StevenPuttemans gravatar imageStevenPuttemans ( 2015-03-03 07:34:50 -0600 )edit

It's still not robust enough. What if several people's pointers leave the screen? They could return in any order. It's heuristics. I'm looking for a stable, repeatable solution such as modulation or wavelength or something...

acron0 gravatar imageacron0 ( 2015-03-03 08:03:19 -0600 )edit

Hmm not sure if you can solve it then with 2D vision ...

StevenPuttemans gravatar imageStevenPuttemans ( 2015-03-03 08:12:26 -0600 )edit
1

are the pointers gonna have different color for each player? If yes then you could go with a meanshift or camshift tracker. Kalman and particle filters in addition with a data association algorithm (e.g. hungarian algorithm) are also some approaches that you should have a look. Check this example here (I think code is offered as well). Imagine that each pointer in your case is gonna correspond to one of the circles in the video. However, it is not as simple as it seems, plus that we do not know the requirements of your project, for example what is the camera setup, as I asked in the beginning are you gonna have different colour for each pointer/player, etc.

theodore gravatar imagetheodore ( 2015-03-03 08:28:23 -0600 )edit

@theodore There are currently no constraints on types of camera, types of laser or colour of laser, although my assumption was that to effectively do pointer detection I'm going to lose any detail in the visible light range.

acron0 gravatar imageacron0 ( 2015-03-03 09:12:23 -0600 )edit
1

Hmm probably using eye safe lasers is a constraint on the type of laser? :D

StevenPuttemans gravatar imageStevenPuttemans ( 2015-03-03 09:14:16 -0600 )edit
2

It will be hard to find 10 different colored lasers. Another source of information could be a timed pattern in the lasers. You could attach some Arduinos to the lasers and give each a different PWM-pattern. BonusPoints for time synchronized patterns. With this, each laser could use some kind of morse code to identify itself. So you need a tracking (Kalman with hungarian method as theodore proposed sounds perfect) and a good camera. A good camera in this case has fixed exposure and a hardware trigger (e.g. Playstation Eye in the consumer market). I guess you could also go without these requirements and use arbitrary frame durations but then the math will get rather fancy. So as first start use a single arduino (or raspberry pi) and let some lasers blink.

FooBar gravatar imageFooBar ( 2015-03-03 09:14:32 -0600 )edit

light illumination/shadows/whatever could be an issue but could also be not, for example you could say that I have everything running in a "dark room". Changing wavelength could also be another approach but all these issues are mainly related to the designing part. For the hardcore image processing algorithms running in the background what I suggested you earlier is the mainstream in this area and I think the way that you should go ;-)

theodore gravatar imagetheodore ( 2015-03-03 09:26:36 -0600 )edit