I am trying to use the solvePnP
in the OpenCV calibration functionality to calibrate my camera.
So, the object in my case is a car and the origin is at the ground under the left tail light. The x-axes
runs along from left to right and the y-axes
is along the length of the car and the z-axes
is along the height of the car. Now, the image coordinate system in OpenCV is at the upper left corner of the image and the pixel location is reported as (y, x)
where y
is along the rows and x
is along the column. This is traditionally flipped from most image processing tools, I think.
My question is for the solvePnP
function to work correctly, do I need to do something to image coordinates in terms of changing its origin or flipping the (row, cols) indexing or will this be somehow taken into account when estimating the calibration matrix. For me, it seems to be the latter but I could not convince myself that it is indeed the case.