How to use openCV cameraCalibrate without imagesize

I am using cameraCalibrate function on openCV(C++), and I know imagePoints(2D) and objectPoints(3D). I have obtained ImagePoints and ObjectPoints 300 points each. So I don’t need image and I don’t have image size. but I have to put image size to use the function. How can I subtitute OR use the function without image size. at first I wrote ‘None’, but it did’t work. I am very new to Camera calibration code and I would really appreciate any advice I could get. Thank you.

**C++ cv::calibrateCamera(objpoints, imgpoints, cv::Size(gray.rows,gray.cols), cameraMatrix, distCoeffs, R, T);

**PYTHON ret, mtx, dist, rvecs, tvecs = cv2.calibrateCamera(objpoints, imgpoints, gray.shape[::-1], None, None)

just curious, how did you do that without images ?

lidar, going by the tags on SO.


I’m currently calibrating between the lidar and the projector. By calibrating between the 3D coordinates of the lidar and the 2D coordinates of the projector, I want to get the internal parameters and external parameters of the projector. So for the imagepoints, I projected a certain pattern with the projector and put its pixel coordinates. For the objectpoints, the three-dimensional coordinates of the pattern extracted from the lidar were put.

This is correct. I got the points by using Lidar scan.