This may be a little off topic but comes up in the world of computer vision. Does anyone have a good solution for the alignment of camera to projection?
You can use the openCV addon which has a quad warping feature.
Basically you set the four points within the camera image to the four corners of the projection and it then warps this quad within the camera image to full 320 240 basically aligning the two systems.
You can see how this works in the Laser Tag 2.0 app - we use it for aligning the camera to the projected image.
it depends on how wide angle the camera is, (ie, how curved straight lines in the camera image are) but for not-so-wide angles we’ve been ok with just using quad warping and picking the four corners of the projection in the camera image.
for wide angles, you might try (a) correcting for camera distortion and (b) using some opencv functionality (using a checkerboard pattern) that can calculate the intrinsic parameters and unwarp the iamge really precisely. having seen (b) in action recently I can say that it works extremely well, but take a lot of energy to do - I much prefer the quad warping since it’s pretty simple to pull off.
to see quad warping in action, you can download the v.2 of the laser tag app
(do’h, we must have posted simultaneously )
you can see how the app allows you to choose the boundaries of the projection.
Nice thanks guys. I have a warping thing I wrote for p5, but will try it for OF. I would like to tackle as much in hardware before code. Any recommendations for lens ie: 50mm i think. Also what is the best for camera alignment to projection. ie: under/over projector lens.