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?
Thanks!
I encountered the same problem. What's worse is I have 3d points both in the front and the back of the camera.... Is there anyway I can solve this?