cv::fisheye::projectPoints no results

asked 2020-03-10 11:12:56 -0600

KirbX gravatar image

updated 2020-03-11 02:27:52 -0600

Hi all!

I'm actually trying to use cv::fisheye::Projectpoints to create a photo fisheye from a pointcloud.

I'm using it like this :

cv::fisheye::projectPoints(pts, ret, aff, MC.getCameraMatrix(), dist);

with

pts: std::vector<cv::Point3f> (non null)
ret: std::vector<cv::Point2f> (empty)
aff: cv::Affine3d(r,t) with r: cv::Vec3f(0,0,0), and t: cv::Vec3f(0,0,0) (I think I didn't understand what are the goal of rvec and tvec inside projectPoints functions in general)
MC.getCameraMatrix() is a matrix 33 created using focal_x = 8 (8mm), focal_y = 8 (8mm), and principalePoint_x = 0 (?) and principalePoint_y = 0 (?) (I think I don't understand this neither. It should be at the center of the image, but which?)
dist: std::vector<float> {0,0,0,0}

At the end of the function, ret is still empty. Does someone can explain to me what's happening? (I'm not really familiar with the calibration 3D in general, and there is things I must have not understand yet...

Sorry to bother you, Have a nice evening!

Best regards, R.S

EDIT : I got it. I just had to resize my ret vector to the size of pts

edit retag flag offensive close merge delete