From: Joseph M. <mu...@le...> - 2012-04-09 21:58:25
|
Sounds good to me. -----Original Message----- From: Matt Leotta [mailto:mat...@ki...] Sent: Monday, April 09, 2012 4:01 PM To: Vxl-maintainers Cc: Eric Smith Subject: [Vxl-maintainers] vpgl_calibration_matrix over parameterization All, I seem to keep running into issues related to the fact that vpgl_calibration_matrix is over parameterized. The problem is that vpgl_calibration_matrix is internally represented by 6 parameters but only has 5 DOF. The redundant ones are focal_length, x_scale, and y_scale, which I feel should really be focal_length, and pixel_aspect_ratio. A common problem that arises because one constructor is vpgl_calibration_matrix(focal_length, principle_point, x_scale=1, y_scale=1, skew=0); and the other is vpgl_calibration_matrix(vnl_double_3x3 K); In the constructor from a matrix, the focal_length is set to 1 and x_scale=K(0,0) and y_scale=K(1,1). So consider the following: double focal_length = 1000.0 vgl_point_2d<double> pp(640,480); vpgl_calibration_matrix<double> K(focal_length, pp); vpgl_calibration_matrix<double> K2(K.get_matrix()); vcl_cout << "focal length = " << K2.focal_length(); The above prints "focal length = 1", but I would expect 1000. In practice this happens because we often write the camera to a file as a matrix and then read it back in. Does anyone have a good reason to keep the x_scale and y_scale? Can I replace this with pixel_aspect_ratio? Thanks, Matt ---------------------------------------------------------------------------- -- For Developers, A Lot Can Happen In A Second. Boundary is the first to Know...and Tell You. Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! http://p.sf.net/sfu/Boundary-d2dvs2 _______________________________________________ Vxl-maintainers mailing list Vxl...@li... https://lists.sourceforge.net/lists/listinfo/vxl-maintainers |