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

Uploaded CPython 3.13Windows x86-64

libcbdetect-1.0.4-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.4-cp313-cp313-macosx_14_0_arm64.whl (78.8 MB view details)

Uploaded CPython 3.13macOS 14.0+ ARM64

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

Uploaded CPython 3.12Windows x86-64

libcbdetect-1.0.4-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.4-cp312-cp312-macosx_14_0_arm64.whl (78.8 MB view details)

Uploaded CPython 3.12macOS 14.0+ ARM64

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

Uploaded CPython 3.11Windows x86-64

libcbdetect-1.0.4-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.4-cp311-cp311-macosx_14_0_arm64.whl (78.8 MB view details)

Uploaded CPython 3.11macOS 14.0+ ARM64

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

Uploaded CPython 3.10Windows x86-64

libcbdetect-1.0.4-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.4-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.4-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: libcbdetect-1.0.4-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.4-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 be792683177b7474486678ca9d7eabfc37fcee36639ac727027c7ac2bd8d1c7f
MD5 fac4c040a8f5afe5ca34c5ee3c95d39d
BLAKE2b-256 ab4175cb18b1d12156402c460d2616c58121147ae5c5898ef74acb1e6e85fa60

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for libcbdetect-1.0.4-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 0926b37e7e32c617adf8aba519a04fd0528980975c9cf9bc3b9511fabb2329a8
MD5 1883394dea3209a62ff58226aca7eb24
BLAKE2b-256 40ec0cc2cf54eb5e669d685ad387e891ec1e9a7340f826c17d6e125a5489d754

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for libcbdetect-1.0.4-cp313-cp313-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 3427f0d573d95b75ac0f05da4ac188b7f1ccc81f0b2cec37105a37e4d0912423
MD5 0fbcbba1e7d8c655aa1f8a486bd166fd
BLAKE2b-256 51fe276f40c9239c4d93b271462678c64757255da10f336642d855cf992594ac

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: libcbdetect-1.0.4-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.4-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 61a04e0bd73e18b1e96d5772cf048ef84916ad544fe7659cc2c532a2072f9a2f
MD5 c877b17afca3b22707d47c1cfdcdbe4d
BLAKE2b-256 b512aba35993e009d747653ed6c9e2526dbd4c6aa129f908fa204ed8a96163ad

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for libcbdetect-1.0.4-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 89a5d0ca7d5d7978003605e485c059596ea7c8778ab36f1f131c55e3e6bb1662
MD5 1f758c97af15045079b24a62ac3e39ef
BLAKE2b-256 7563157cc08e60ccce512913af92186c2a96d1c650bbe9181d2984b19d9a2480

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for libcbdetect-1.0.4-cp312-cp312-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 33f2da99eb45960dfd19e47e8896d0ededd50c336bfd49d75a061a1602666dec
MD5 cb7dd0ed73b3f84f5c320a75ae1a2781
BLAKE2b-256 67735d0432b35e502663f99d20232608e8a5495bdc3b13378b32d5643aa2bd2e

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: libcbdetect-1.0.4-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.4-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 6543b57092fb0393f6272a8cdaf95403878828a7bfae6eac7f0faddd57a6d228
MD5 d659af8b8ee5ec813919e1e16f4e9205
BLAKE2b-256 30ff69bf0b09f080f774e78bec861798484cbf4ed42b3c61f3a8fe9b132572c7

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for libcbdetect-1.0.4-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 a108dfdaf81be00034140f5c38fe2930be6bc84b75b17f20b4c7c6e79bcc2265
MD5 238b39b62d93ad13bce39d1b800cbc2c
BLAKE2b-256 aad159a021e503cfd0f25cf261f6d185a55273042ad23f528a7160a5fbf1b0d4

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for libcbdetect-1.0.4-cp311-cp311-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 f4be935b499bd29bd4f9ede8251b90023061b0244182dbf8a24b1821e088eaea
MD5 fd5dc1a0d2e55311ad1f3a390afe3e8d
BLAKE2b-256 48bc4960392ec4ae8d8cc98791ed9edd483946ddfcb8e40bea6af6e39c83fe4b

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: libcbdetect-1.0.4-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.4-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 57a796b88f2954338dd4b63cb6e7df01d47c91c4c89bb296180af8fff7ad1be3
MD5 f8dac1cc143c2cfcba0967fb73238449
BLAKE2b-256 e179edd78efc8352b6ea6d155d997d23fc6804cba3f454877228238f05ff5e8e

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for libcbdetect-1.0.4-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 07d3c15c9864e52c813ea5d7149e76028d2f0cf5f2c4221033ea3242bc8d764b
MD5 eadd181f79f486b07109e5cad7a52c82
BLAKE2b-256 0947af2f3ba67f6691f7a171644666b6e2a2653f107ebdb9ad009aaacc5351c1

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for libcbdetect-1.0.4-cp310-cp310-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 c429edb405c9fc48b252ac96d453411669f20f691ed6e3a21d685743e066b3cd
MD5 557744ad2a4d215ea8bceadfc41af9ec
BLAKE2b-256 bd1dfb26238dba014732cfc9b0dbc13b45eb6c5b738600a91fb32be578f36a0a

See more details on using hashes here.

Provenance

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