detecting a laser pointer on a projection...

bignateyk

Lifer
Apr 22, 2002
11,288
7
0
Ok, so I have a projector that would be projecting a powerpoint presentation or something similar onto a wall. Above the projector, there is a digital camcorder recording the projection (and the presenters laser pointer). The presenter would be using a laser pointer to point things out on the projector. I want to be able to determine the coordinates of the laser pointer in relation to the original image.

I would have two images to compare (The image being projected vs. the image being recorded. The image being recorded, however, is likely to be blurrier or slightly off center from the actual image)

So far, here is what I have:

I took a screenshot from a powerpoint presentation, then saved it as a 500x375 gif. I took this file and blurred it, then brightened or darkened or chagned the contrast in it. From here I have two images that simulate what it could really be (except for the allignment issues). My program will find the drawn in laser pointer... but it takes a few second per frame which isnt ideal...

I first have it comparing a pixel on each of the pictures to determine how much brighter or darker the other image is. I then correct for that. Next, I pixelate both images. Then subtract them from each other, and end up with a purple dot on a white page where the laser pointer is.


It is the pixelating that takes the longest, and it does not work without doing it...

Also, can anyone think of a way to tell if one of the images is more blurred then the other? If that were possible, then I could just find a degree that it was blurred by, and correct on the other one, which would be faster than pixelating...

Thanks,

-Nate
 

EagleKeeper

Discussion Club Moderator<br>Elite Member
Staff member
Oct 30, 2000
42,589
5
0
If your presentation procedure allows a known initial condition (no laser pointer and known image), capture the image and run a blurriy test comparison against it. For each pixel, you then can have a reference object blurr value(depending on how you define/determine your blurred conditions). This takes into account the wall texture and light absorbsion.

Then during the presentation, you can compare the known blurr value against the captured images. The laser location should generate an anomality that can not be adjusted by the blurr value.

Once you have located the laser pointer, you can then also cut down the area to check next time, start with the existing area and spiral outward to locate the laser movement. You may also be able to predict the area to next search based on movement. When the the laser is turned off or moved off the picture, all predictions have to be reset.

Depending on your algorithms, quality and time required for response, this would make a great use for multi-thread/multi-process application.
Cut the screen area into sections and tackle each section with it's own thread.