warpPerspective With two cams

asked 2017-06-23 05:17:48 -0600

GiGa.91 gravatar image

Hello to all, I'm here to ask for advice. I have two cams that resume the same thing. A cam has a filter that only passes light ir. The other cam is a normal cam that does not pass the light ir. I use this last cam (normal cam) to detect four balls (The four balls are projected onto a wall). These four balls are the vertices of a rectangle. When I find these four points I calculate the matrix H and apply findHomography() to fix the perspective. I would like to calculate this matrix H also for the IR cam but it cant see these 4 balls. How can I calculate matrix H for this new cam? I know the distance to which the two cams are placed Can anybody give me some advice?

edit retag flag offensive close merge delete

Comments

You will need to estimate first the geometric transformation between the IR and normal cameras. Then, you should be able to use the estimated transformation matrix (rotation + translation) to compute the homography matrix for the other camera. See here or here for some experimentations.

Eduardo gravatar imageEduardo ( 2017-06-23 11:11:09 -0600 )edit

My problem is just one step ""estimate first the geometric transformation between the IR and normal cameras" The two cams see the screen of a video projector. A cam see what is projected on the screen from the video projector. The second cam ( that works with ir) not see the projected image. They look the same way but they do not see the same thing. I could use the video projector as a reference but I do not get the accuracy

GiGa.91 gravatar imageGiGa.91 ( 2017-06-23 12:47:35 -0600 )edit

What I would do:

  • calibrate the IR and normal cameras using a chessboard pattern, maybe using an infrared light to be able to see the pattern for the IR cam
  • after this, the intrinsic parameters for both cameras should be known as well as the extrinsic parameters
Eduardo gravatar imageEduardo ( 2017-06-23 16:20:48 -0600 )edit