Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

projectPoints fails with points behind the camera

I'm using the pojectPoints opencv function to get the projection of a 3d point in a camera image plane.

cv::projectPoints(inputPoint, rvec, tvec, fundamentalMatrix, distCoeffsMat, outputPoint);

The problem I'm facing is when Z (in camera local frame) is negative, instead of returning a point out of the image boundaries, it returns me the symmetric (Z positive) instead. I was expecting that function to check for positive Z values...

I can check this manually by myself, but is there a better way?