Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

calibrateCamera cameraMatrix and distCoeff inputs

I'm trying to get started with OpenCV on my Node.js & Express backend using opencv4nodejs. It works, but I ran into issues with calibrateCamera. In the tutorial done in python, calibrateCamera is used by giving the inputs:

cv2.calibrateCamera(objpoints, imgpoints, gray.shape[::-1],None,None)

I've followed the tutorial and have my objpoints Point3 array, and imgpoints Point2 array, both of the same size as they should, as the third paramter I'm giving Size(756,1008) as per my image sizes. The problem comes in figuring out what to put in as calibrateMatrix and distCoeff, as they're required parameters and trying to put in null on them doesn't work.

Does anyone have experience with opencv4nodejs? Another related issue is that I'm not getting any error messages if I have faulty inputs, code execution just stops. Solving that would probably help a lot in figuring out what's going wrong with my efforts here.

Thanks for any help!