Skip to main content

More robust checkerboard detection, similar algorithm to libcbdetect

Project description

Checkerboard

PyPI version GitHub license

I could not find any libraries to find checkerboards robustly in Python, except for OpenCV. However, OpenCV's checkerboard tends to fail when the checkerboard is somewhat blurred or rotated.

Hence, this library was born. It may be slightly slower than OpenCV, but it will find that checkerboard.

Comparison of OpenCV vs this library (OpenCV on the left, checkerboard on the right): comparison

Quickstart

You can install checkerboard easily through pip:

pip install checkerboard

Then you can go ahead and detect checkerboards like so:

from checkerboard import detect_checkerboard

size = (9, 6) # size of checkerboard
image = ... # obtain checkerboard
corners, score = detect_checkerboard(image, size)

The corners returned are in the same format as the findChessboardCorners function from OpenCV, and are already computed to subpixel precision.

The score returned is a metric of the quality of the checkerboard detection. A perfectly detected checkerboard would have a score of 0, whereas a bad detection would have a score of 1.

References

The implementation of checkerboard detection is mainly based on libcbdetect and accompanying paper:

@INPROCEEDINGS{Geiger2012ICRA,
  author = {Andreas Geiger and Frank Moosmann and Oemer Car and Bernhard Schuster},
  title = {Automatic Calibration of Range and Camera Sensors using a single Shot},
  booktitle = {International Conference on Robotics and Automation (ICRA)},
  year = {2012}
} 

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

checkerboard-0.2.4-py3-none-any.whl (7.5 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page