I am trying to calibrate the jevois camera with a 120 degree fisheye lens using this guide: http://jevois.org/tutorials/UserArUcoCalib.html
I have printed out the charuco board on a piece of A4 paper, measuring the ml=17mm, sl=30mm, and running the command:
./calibrate_camera_charuco -d=0 -h=5 -w=8 --ml=17 --sl=30 --rs --sc calibration.yaml
The problem is that after hitting esc to to do the calibration on the pictures I've taken, I usually get this error message:
OpenCV Error: Assertion failed (nCorners > 0 && nCorners == _charucoCorners.getMat(i).total()) in calibrateCameraCharuco, file /build/opencv-L2vuMj/opencv-3.2.0+dfsg/contrib/modules/aruco/src/charuco.cpp, line 703
terminate called after throwing an instance of 'cv::Exception'
what(): /build/opencv-L2vuMj/opencv-3.2.0+dfsg/contrib/modules/aruco/src/charuco.cpp:703: error: (-215) nCorners > 0 && nCorners == _charucoCorners.getMat(i).total() in function calibrateCameraCharuco
and sometimes this error:
OpenCV Error: One of arguments' values is out of range (The number of points in the view #2 is < 4) in cvCalibrateCamera2Internal, file /build/opencv-L2vuMj/opencv-3.2.0+dfsg/modules/calib3d/src/calibration.cpp, line 1396
terminate called after throwing an instance of 'cv::Exception'
what(): /build/opencv-L2vuMj/opencv-3.2.0+dfsg/modules/calib3d/src/calibration.cpp:1396: error: (-211) The number of points in the view #2 is < 4 in function cvCalibrateCamera2Internal
But if I take several pictures of the board mostly flat in front of the lens it completes the calibration without error.
I am running it on Ubuntu 18.04 virtualbox from a Windows 10 host. Using the video mapping YUYV 640 500 20.0 YUYV 640 480 20.0 JeVois DemoArUco
Does anyone have any idea why this happens? I'm grateful for any tips.