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.3-cp313-cp313-win_amd64.whl (23.9 MB view details)

Uploaded CPython 3.13Windows x86-64

libcbdetect-1.0.3-cp313-cp313-manylinux_2_28_x86_64.whl (6.6 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.28+ x86-64

libcbdetect-1.0.3-cp313-cp313-macosx_14_0_arm64.whl (78.8 MB view details)

Uploaded CPython 3.13macOS 14.0+ ARM64

libcbdetect-1.0.3-cp312-cp312-win_amd64.whl (23.9 MB view details)

Uploaded CPython 3.12Windows x86-64

libcbdetect-1.0.3-cp312-cp312-manylinux_2_28_x86_64.whl (6.6 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ x86-64

libcbdetect-1.0.3-cp312-cp312-macosx_14_0_arm64.whl (78.8 MB view details)

Uploaded CPython 3.12macOS 14.0+ ARM64

libcbdetect-1.0.3-cp311-cp311-win_amd64.whl (23.9 MB view details)

Uploaded CPython 3.11Windows x86-64

libcbdetect-1.0.3-cp311-cp311-manylinux_2_28_x86_64.whl (6.6 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ x86-64

libcbdetect-1.0.3-cp311-cp311-macosx_14_0_arm64.whl (78.8 MB view details)

Uploaded CPython 3.11macOS 14.0+ ARM64

libcbdetect-1.0.3-cp310-cp310-win_amd64.whl (23.9 MB view details)

Uploaded CPython 3.10Windows x86-64

libcbdetect-1.0.3-cp310-cp310-manylinux_2_28_x86_64.whl (6.6 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.28+ x86-64

libcbdetect-1.0.3-cp310-cp310-macosx_14_0_arm64.whl (78.8 MB view details)

Uploaded CPython 3.10macOS 14.0+ ARM64

File details

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

File metadata

  • Download URL: libcbdetect-1.0.3-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 23.9 MB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for libcbdetect-1.0.3-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 5214b103515748567bc6a08e0e08ae97ed1f1edfcc61a6bb828417db62cb0285
MD5 847150ec35bd5c57d86bffb531338e67
BLAKE2b-256 cc4024ef3d1d6a1a45824c745fe59eb44183feb53b7b757ac051b44669089399

See more details on using hashes here.

Provenance

The following attestation bundles were made for libcbdetect-1.0.3-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.3-cp313-cp313-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for libcbdetect-1.0.3-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 f2cce7fa3fefad1ff03703fc7ec5df27f7f440cd75d9c2ecf35e7eaf7ad2614e
MD5 1b7b1bbe528ed2b5bc6051102a924f45
BLAKE2b-256 5495f51290d9212bf8c0062a49cbad8f0868095cdffa641ebe24e83a6c760a2b

See more details on using hashes here.

Provenance

The following attestation bundles were made for libcbdetect-1.0.3-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.3-cp313-cp313-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for libcbdetect-1.0.3-cp313-cp313-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 660b72b4a6c9b16a32256050a70686412fc627cdad9b92d21bb812de6282df80
MD5 5c7b19de5a259f5cd60d73c126d39827
BLAKE2b-256 b63dbb878565a45eaa3de11e440fa9777947cfe3e53d2f48d379d9944fcf2c41

See more details on using hashes here.

Provenance

The following attestation bundles were made for libcbdetect-1.0.3-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.3-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: libcbdetect-1.0.3-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 23.9 MB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for libcbdetect-1.0.3-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 30b07ec1552db119fa15bbb7a786c02b20d66028145114eb1a8bd041fa0344ca
MD5 84c1d3fd56f7ab12915af57842e6c97f
BLAKE2b-256 6285d8667c277d083dd4c82d1077390357e5496b2c91749bb9febd7317e2102a

See more details on using hashes here.

Provenance

The following attestation bundles were made for libcbdetect-1.0.3-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.3-cp312-cp312-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for libcbdetect-1.0.3-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 d991e9cf47d57e30e172ab956d4f47d68119939aae5a552c1f17f8d5c255cc5c
MD5 aed75141ae9f1b584cb3b7cbb477333e
BLAKE2b-256 56bbf5e4fcec3ce09ef8eafdd7518820a338f9e889da126a28d27b49dda48f29

See more details on using hashes here.

Provenance

The following attestation bundles were made for libcbdetect-1.0.3-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.3-cp312-cp312-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for libcbdetect-1.0.3-cp312-cp312-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 0c37562cddc7e2d7b13fa0b12fe297189f720556ab7b3055c53ead28eaaf5ab2
MD5 26497a7d7c68224e6dc3dc7e783dd25e
BLAKE2b-256 0a08059f3e5b089b9eb5de274a40ed47b57ea45f985516156ea5c55b4f7b477a

See more details on using hashes here.

Provenance

The following attestation bundles were made for libcbdetect-1.0.3-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.3-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: libcbdetect-1.0.3-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 23.9 MB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for libcbdetect-1.0.3-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 a64bd45b5416c0a793b20883aa0ea77fcd6e1b63b05edd976312cfd76cb90e07
MD5 21162e827683dd4a002627224a0ef721
BLAKE2b-256 567cefdf6c366aecb158562738875b8f424031b35098380387f5380ac9e3b027

See more details on using hashes here.

Provenance

The following attestation bundles were made for libcbdetect-1.0.3-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.3-cp311-cp311-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for libcbdetect-1.0.3-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 daea22ae2f9c6ae09c7893741ca5ca61e625417e2a82aad7326d65234a5c727e
MD5 49dd562fb59153bbfeeb4e811f563575
BLAKE2b-256 2a2a2ae23de6288dc0c36cdb19f831aef419cadba177e0f78944df36fb3399c1

See more details on using hashes here.

Provenance

The following attestation bundles were made for libcbdetect-1.0.3-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.3-cp311-cp311-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for libcbdetect-1.0.3-cp311-cp311-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 d86dad9060c136a8b54846e6b00ff309ba72634a71c4ae8a8b70a81303856ac0
MD5 645744181a347ecd25ca3c074873a254
BLAKE2b-256 12fdf25b74beb40dbb9affa730a658509c38467beea23f9fc440fc07d1067527

See more details on using hashes here.

Provenance

The following attestation bundles were made for libcbdetect-1.0.3-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.3-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: libcbdetect-1.0.3-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 23.9 MB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for libcbdetect-1.0.3-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 a374dec15c158233a25211622523434758e2a978bea06932182ef9f5c4704dad
MD5 6f7c78ed297f203811397b07278a77b5
BLAKE2b-256 3f280d3d8ffbe980c2912f55b33f72e32fe862cee29962611722e14ac10e6a8c

See more details on using hashes here.

Provenance

The following attestation bundles were made for libcbdetect-1.0.3-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.3-cp310-cp310-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for libcbdetect-1.0.3-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 385f1966ad12c3a5dab69c92da1fb403614c2432a5e47a706fd2f6b3f08fa5b7
MD5 19f83bf868c971032d5fdcddc2486112
BLAKE2b-256 a931b150e2e7f861cf74a46910e8e9bbdc4ed8b07bafeba95f6634361e9861d9

See more details on using hashes here.

Provenance

The following attestation bundles were made for libcbdetect-1.0.3-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.3-cp310-cp310-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for libcbdetect-1.0.3-cp310-cp310-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 f85f836e5fea5dcc0b80ef4b2ad58db5c2c3d39428e31fd7e77376235a14c00f
MD5 afd4c49954f0635445385a983f8db365
BLAKE2b-256 7c1f0925a3e3a84070573bd95a1102beb604bc3e9f733c6c51d1ae2b00268991

See more details on using hashes here.

Provenance

The following attestation bundles were made for libcbdetect-1.0.3-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