Skip to main content

Python bindings for a C++ Checkerboard detector

Project description

Libcbdetect

Libdetect is fully automatic sub-pixel checkerboard / chessboard / deltille pattern detection. The algorithm autmatically extracts corners to sub-pixel accuracy and combines them to (rectangular) checkerboards / chessboard-like.


Development

0. Setting up Windows environment

  • Install Visual Studio Build Tools:

    1. Download the "Visual Studio Build Tools" installer from Microsoft (link)
    2. During installation, select "Desktop development with C++"

1. Installing local dependencies

1. OpenCV

  1. Windows (prebuilt binaries)

    1. Download the latest Windows release ZIP from the OpenCV GitHub releases page.
    2. Extract it (e.g., to C:\).
    3. Set OPENCV_DIR in System > Environment Variables to the C:\opencv\build folder. (Integrating OpenCV with Visual Studio C++ Projects on Windows)

    [!TIP] Or use the following command in a PowerShell with administrator privileges to do everything at once

    $ver='4.11.0';$exe="$env:TEMP\opencv.exe";Invoke-WebRequest -Uri "https://github.com/opencv/opencv/releases/download/$ver/opencv-$ver-windows.exe" -OutFile $exe; Start-Process -FilePath $exe -ArgumentList "-y","-oC:\" -NoNewWindow -Wait; Remove-Item $exe; $base='C:\opencv'; $bin="$base\build\x64\vc16\bin"; $cfg="$base\build\x64\vc16\lib"; [Environment]::SetEnvironmentVariable('Path',[Environment]::GetEnvironmentVariable('Path','Machine')+';'+$bin,'Machine'); [Environment]::SetEnvironmentVariable('OpenCV_DIR',$cfg,'Machine'); $env:Path+=';'+$bin
    
  2. Linux (Ubuntu/Debian)

    sudo apt update
    sudo apt install libopencv-dev -y
    

    This installs both runtime and development headers/libraries for OpenCV 4.x. (How to Install opencv in C++ on Linux?—GeeksforGeeks)

  3. macOS (Homebrew)

    brew update
    brew install opencv
    

    After installation, headers are in /usr/local/include/opencv4, libs in /usr/local/lib. (Getting started with Opencv with C++ - Nikhil Ramesh)

2. pybind11

  1. Windows

    pip install "pybind11[global]"
    
  2. Linux (Ubuntu/Debian)

    sudo apt update
    sudo apt install -y python3-pybind11
    
  3. macOS (Homebrew)

    brew install pybind11
    

2. Creating a Python virtual environment

[!NOTE] This environment will be used for building the project.

Linux & macOS (bash/zsh)

python3 -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade pip wheel build pybind11 cibuildwheel

Windows (PowerShell)

py -3.10 -m venv .venv
.venv\Scripts\Activate.ps1
python -m pip install --upgrade pip wheel build pybind11 cibuildwheel

3. Building the package

3-a Local build

python -m build

scikit-build-core invokes CMake + pybind11 to compile the C++ extension for your Python, then packages:

dist/
  ├─ libCBDetect-0.1.0-cp313-cp313-macosx_15_0_arm64.whl
  └─ libCBDetect-0.1.0.tar.gz

Windows only: Repair the wheel with delvewheel to include all required DLLs:

pip install delvewheel
$wheel = Get-ChildItem -Path .\dist\*.whl | Sort-Object LastWriteTime -Descending | Select-Object -First 1
delvewheel repair $wheel.FullName -w .\dist\repaired\

Install:

pip install dist/checkerboard-*.whl --force-reinstall

Windows: Use the repaired wheel:

pip install dist\repaired\*.whl --force-reinstall

3-b Editable installation for rapid iteration

pip install -e .[dev]

Builds the extension once and leaves the Python files linked to your working copy, so every code change is picked up immediately.


Tips

If using CLion (on Windows), change the default toolchain in the CMake Profiles to Visual Studio.


Original CPP code:

https://github.com/ftdlyc/libcbdetect

Reference Papers

[1] Geiger, A., Moosmann, F., Car, Ö., & Schuster, B. (2012, May). Automatic camera and range sensor calibration using a single shot. In Robotics and Automation (ICRA), 2012 IEEE International Conference on (pp. 3936-3943). IEEE.
[2] Schönbein, M., Strauß, T., & Geiger, A. (2014, May). Calibrating and centering quasi-central catadioptric cameras. In Robotics and Automation (ICRA), 2014 IEEE International Conference on (pp. 4443-4450). IEEE.
[3] Placht, S., Fürsattel, P., Mengue, E. A., Hofmann, H., Schaller, C., Balda, M., & Angelopoulou, E. (2014, September). Rochade: Robust checkerboard advanced detection for camera calibration. In European Conference on Computer Vision (pp. 766-779). Springer, Cham.
[4] Ha, H., Perdoch, M., Alismail, H., Kweon, I. S., & Sheikh, Y. (2017, October). Deltille Grids for Geometric Camera Calibration. In 2017 IEEE International Conference on Computer Vision (ICCV) (pp. 5354-5362). IEEE.
[5] Duda, A., & Frese, U. (2018, September). Accurate Detection and Localization of Checkerboard Corners for Calibration. In British Machine Vision Conference (BMCV), 2018.
[6] Sels, S., Ribbens, B., Vanlanduit, S., & Penne, R. (2019). Camera Calibration Using Gray Code. In Sensors (Vol. 19, Issue 2, p. 246). MDPI AG. https://doi.org/10.3390/s19020246 [7] Hillen, M., De Boi, I., De Kerf, T., Sels, S., Cardenas De La Hoz, E., Gladines, J., Steenackers, G., Penne, R., & Vanlanduit, S. (2023). Enhanced Checkerboard Detection Using Gaussian Processes. Mathematics, 11(22), 4568. https://doi.org/10.3390/math11224568

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 Distributions

If you're not sure about the file name format, learn more about wheel file names.

libcbdetect-1.0.0-cp313-cp313-win_amd64.whl (23.8 MB view details)

Uploaded CPython 3.13Windows x86-64

libcbdetect-1.0.0-cp313-cp313-manylinux_2_28_x86_64.whl (6.5 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.28+ x86-64

libcbdetect-1.0.0-cp313-cp313-macosx_14_0_arm64.whl (80.5 MB view details)

Uploaded CPython 3.13macOS 14.0+ ARM64

libcbdetect-1.0.0-cp312-cp312-win_amd64.whl (23.8 MB view details)

Uploaded CPython 3.12Windows x86-64

libcbdetect-1.0.0-cp312-cp312-manylinux_2_28_x86_64.whl (6.5 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ x86-64

libcbdetect-1.0.0-cp312-cp312-macosx_14_0_arm64.whl (80.5 MB view details)

Uploaded CPython 3.12macOS 14.0+ ARM64

libcbdetect-1.0.0-cp311-cp311-win_amd64.whl (23.8 MB view details)

Uploaded CPython 3.11Windows x86-64

libcbdetect-1.0.0-cp311-cp311-manylinux_2_28_x86_64.whl (6.5 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ x86-64

libcbdetect-1.0.0-cp311-cp311-macosx_14_0_arm64.whl (80.5 MB view details)

Uploaded CPython 3.11macOS 14.0+ ARM64

libcbdetect-1.0.0-cp310-cp310-win_amd64.whl (23.8 MB view details)

Uploaded CPython 3.10Windows x86-64

libcbdetect-1.0.0-cp310-cp310-manylinux_2_28_x86_64.whl (6.5 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.28+ x86-64

libcbdetect-1.0.0-cp310-cp310-macosx_14_0_arm64.whl (80.5 MB view details)

Uploaded CPython 3.10macOS 14.0+ ARM64

File details

Details for the file libcbdetect-1.0.0-cp313-cp313-win_amd64.whl.

File metadata

File hashes

Hashes for libcbdetect-1.0.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 2b0b3f159a9dee48c8570b6977de64fc4091244caf84ebfddd33129df4449ea5
MD5 8e22bd89a485d17c2f87c254f59fa9da
BLAKE2b-256 e61e518c3c3b87833fb8abd6b4d262a8069973f9c69aba34424c4ff7d2fb96f7

See more details on using hashes here.

Provenance

The following attestation bundles were made for libcbdetect-1.0.0-cp313-cp313-win_amd64.whl:

Publisher: ci.yml on InViLabUAntwerp/libCBDetect

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file libcbdetect-1.0.0-cp313-cp313-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for libcbdetect-1.0.0-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 4bbe1d6870daaeeca8fcb4cd48f7ef59fd623d5122bba1b8ca7c71be41bcc1c0
MD5 d8ab8e0272e04e0715b0754bbbaea1c6
BLAKE2b-256 77128a2dcbe9c4fa998c2919c89b8e08eed56a9eda20088c71476a9da9411548

See more details on using hashes here.

Provenance

The following attestation bundles were made for libcbdetect-1.0.0-cp313-cp313-manylinux_2_28_x86_64.whl:

Publisher: ci.yml on InViLabUAntwerp/libCBDetect

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file libcbdetect-1.0.0-cp313-cp313-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for libcbdetect-1.0.0-cp313-cp313-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 c088196123fe4a9e7cec2f4c800be20063086e6801e9c1944c77623faa8dd643
MD5 5caea2a894291c9c115b83558757ec62
BLAKE2b-256 a3eb7b8d3ad4fcb1022edc5bdc7c675b870bf5764e7b4d50ae2583446c27a52a

See more details on using hashes here.

Provenance

The following attestation bundles were made for libcbdetect-1.0.0-cp313-cp313-macosx_14_0_arm64.whl:

Publisher: ci.yml on InViLabUAntwerp/libCBDetect

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file libcbdetect-1.0.0-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for libcbdetect-1.0.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 ab92541a3bf58b7a04813d89c9ec2b4620f7fafabaa76024fcb61067a451d9e8
MD5 13f2ed0531f46252eea8221fa17d9721
BLAKE2b-256 c3590e916b5974513841f4350fbba5ee728341425adcd77f0c6033e88e1ded4b

See more details on using hashes here.

Provenance

The following attestation bundles were made for libcbdetect-1.0.0-cp312-cp312-win_amd64.whl:

Publisher: ci.yml on InViLabUAntwerp/libCBDetect

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file libcbdetect-1.0.0-cp312-cp312-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for libcbdetect-1.0.0-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 5f77b60aae9947ebabfff7542919c437adc8efe42feac7da4f646cda588744fa
MD5 b00e0cdaf2aff5a15be8a3fbfa6211f2
BLAKE2b-256 c51da70c586be54288abfc0d49282e0eceef8ca8d28163801130fd09a5b96d90

See more details on using hashes here.

Provenance

The following attestation bundles were made for libcbdetect-1.0.0-cp312-cp312-manylinux_2_28_x86_64.whl:

Publisher: ci.yml on InViLabUAntwerp/libCBDetect

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file libcbdetect-1.0.0-cp312-cp312-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for libcbdetect-1.0.0-cp312-cp312-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 b291c8c5443d16c8f08525dc596bfce9d7d76e0f0ce1253037d375e46467482d
MD5 8b518cf29baa97b37592f93637128eb8
BLAKE2b-256 3179e3f59b83d4d0d8743154eb7818f53e33d352862a114267b49543a3cbcd02

See more details on using hashes here.

Provenance

The following attestation bundles were made for libcbdetect-1.0.0-cp312-cp312-macosx_14_0_arm64.whl:

Publisher: ci.yml on InViLabUAntwerp/libCBDetect

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file libcbdetect-1.0.0-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for libcbdetect-1.0.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 1310359ebc92075969d6faa115288bc9f1855efa6b95e7eef0fa953f8751b4e6
MD5 7ff178459a7cca2d412ca8e4fe0792de
BLAKE2b-256 027d1f5e27e5c80f69c06bb5a43556cda2691c379b10badd90dc887a3a94601a

See more details on using hashes here.

Provenance

The following attestation bundles were made for libcbdetect-1.0.0-cp311-cp311-win_amd64.whl:

Publisher: ci.yml on InViLabUAntwerp/libCBDetect

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file libcbdetect-1.0.0-cp311-cp311-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for libcbdetect-1.0.0-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 7178e78722f730daef726bb383b1aa25d3179a310ee266cd5fca18dced36b62a
MD5 1e7cd48b7c6c92134d4def14d565b255
BLAKE2b-256 9f9fd3bf7ff08f86e942ad3b714da6cd52f2e09324713996f5cb13752586a69d

See more details on using hashes here.

Provenance

The following attestation bundles were made for libcbdetect-1.0.0-cp311-cp311-manylinux_2_28_x86_64.whl:

Publisher: ci.yml on InViLabUAntwerp/libCBDetect

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file libcbdetect-1.0.0-cp311-cp311-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for libcbdetect-1.0.0-cp311-cp311-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 2b6c1bb41a2f2116b493e5957d5c6167e43a7bd23a42a6d3cb15c2c47b26ca75
MD5 a256439d061fcbc25041d1fc9b1aae49
BLAKE2b-256 72e02d20462565d1e029f156f86404bff74340463509a86f3d4437135388d9b2

See more details on using hashes here.

Provenance

The following attestation bundles were made for libcbdetect-1.0.0-cp311-cp311-macosx_14_0_arm64.whl:

Publisher: ci.yml on InViLabUAntwerp/libCBDetect

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file libcbdetect-1.0.0-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for libcbdetect-1.0.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 157bb472f1492f37f54bcb22c98ba18d2ca05c464cb750bc07ed0109112eef4f
MD5 06913a91927580054a119534809303ec
BLAKE2b-256 6dff0104fd2bc7b02156c195a8db99e323cee21f179d98356b2bd9500d6f581b

See more details on using hashes here.

Provenance

The following attestation bundles were made for libcbdetect-1.0.0-cp310-cp310-win_amd64.whl:

Publisher: ci.yml on InViLabUAntwerp/libCBDetect

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file libcbdetect-1.0.0-cp310-cp310-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for libcbdetect-1.0.0-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 a6918e23cdc48bd2655f1076a8d5989c602d8d0634c8cf9a0e851f20865aec80
MD5 8c2093dd366e59e29e15a5f9b8288638
BLAKE2b-256 0f9de12a0e2502197a58bf4c9ce11309f249006add142d9151d372f0323aac07

See more details on using hashes here.

Provenance

The following attestation bundles were made for libcbdetect-1.0.0-cp310-cp310-manylinux_2_28_x86_64.whl:

Publisher: ci.yml on InViLabUAntwerp/libCBDetect

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file libcbdetect-1.0.0-cp310-cp310-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for libcbdetect-1.0.0-cp310-cp310-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 4d7fb6d5f84a3d470e5b3cde4a307e01bc99deba416e74e3265da9d514ecc847
MD5 7e4fa0c0590983144d578a0c420e2c84
BLAKE2b-256 1ad0ec70ec303eec224ed898260f9ff6f8c13f10dc29fc7f45d9719cf01373aa

See more details on using hashes here.

Provenance

The following attestation bundles were made for libcbdetect-1.0.0-cp310-cp310-macosx_14_0_arm64.whl:

Publisher: ci.yml on InViLabUAntwerp/libCBDetect

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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