Forum

Equalize the contortion of a lens?

Hello,

i´m having an ImagingSource Camera on the bottom inside of our table. It looks right up to surface with it´s wide-angle lens… just look at the attached image.

The problem is, that image is too distorted to map the values. These values are not linear. When you move something more to the outside the cursor moves more and more afterwards…

Is very any way to deal with that in vvvv?

Kamerverzerrung.png (447.6 kB)

i am certain there was some sort of vvvvay to do that, but i can’t find it …

anyway, google throws some interesting stuff, and sourceforge turns up a tool that can apparently calculate a homography matrix … maybe the corresponding node can help, then?

i also didn’t find any more dokumentation on the calibration process and found it really hard to get it working. thats why i am hoping that JCamCalib can help in the process…please anybody who tries it report back here.

never managed that undistort collects all the points on the checkerboard.

anyone got tips how to calibate successfully?
maybe a short tutorial?

now i remember: the OpenCV Library features some functions related to calibration which are also mentioned in their Reference Manual. i’ve got no idea about existing implementations, though.

an easier, yet undoubtly less accurate way of correcting for this kind of distortion would be: projecting (see /girlpower/slide projector) the original image onto the inside of a sphere with variable XY to Z scaling ratio, then putting a virtual camera inside the sphere to render a ‘corrected’ image.

Hmmm… The idea with the projection inside the sphere sounds good, but we have a flash attached to vvvv that will be controlled by data out of the contour tracker. So i think our computer will be have a lot of fun. We have to check it…

huh, seems my first posting is gone. i was mentioning Uundistort (DShow9 OpenCV) that is doing exactly that. check its helpfile for instructions on how to use it.

I think Undistort is THE solution for my problem. I attach a chess grid as .jpg for everyone who will need it in future. I´m working on this calibration wright now… He doesn´t recognizes all the spots for calibration. What can i do?

CameraCalibrationChessGrid_9x7.jpg (752.3 kB)
CalibrationCheck.png (266.0 kB)

our computer will be have a lot of fun

with the sphere method the graphic card will have the fun; while in the openCV way of doing things its the cpu. so i bet the sphere technique would be faster.

as undistorts helppatch demonstrates you can either go the cpu-way or the gpu-way by using the effect that does the same undistortion given the same parameters, as the node would do cpu-wise.

Finally i get it working. But it took me a while to check that i have to mount the camera so that it is locked and can´t move. Then i realised to put the paper really near to the camera so that the grid is screenwide… When you know that it´s no problem ;)

CalibrationProcess_new.png (339.1 kB)
CalibrationProcessFinal_new.png (334.0 kB)