cv2.findChessboardCorners() very slow

Please provide complete information as applicable to your setup.

• Hardware Platform (Jetson / GPU) AGX Xavier
• DeepStream Version 5.0
• JetPack Version (valid for Jetson only) 4.4/4.2

I am running camera calibration using python / opencv and found that cv2.findChessboardCorners() is extremely slow in AGX Xavier when the checkboard is outside camera FOV. When move the checkboard back in the FOV then the speed is tolerable.

Question: is there a way to run this function in cuda under python to speed it up? or you would recommend other camera calibration toolkit to run on AGX Xavier in realtime? Thanks a lot.

P.S. I already installed cuda-opencv4.3.0 using install_opencv4.3.0_Jetson.sh.

Hi,

The complexity of the function depends on the number of valid corners are detected.
Without the valid corners, the function will enter a loop and try hard to find possible points.
Maybe you can check if any early stop criteria that can meet your use case.

We don’t find a Chessboard version CUDA implementation in OpenCV.
But below is a standard corner detector with GPU for your reference:

Thanks.

This makes sense. Thank you for the insight.

I already change the code such that only when the chessboard presented in the FOV then run cv2.findChessboardCorners(), otherwise skip. And it performs reasonable well for my calibration purpose.

Thanks for the advise.