Use OpenCV C++ API in checkerboard_detector