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

Uploaded CPython 3.13Windows x86-64

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

Uploaded CPython 3.13macOS 14.0+ ARM64

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

Uploaded CPython 3.12Windows x86-64

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

Uploaded CPython 3.12macOS 14.0+ ARM64

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

Uploaded CPython 3.11Windows x86-64

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

Uploaded CPython 3.11macOS 14.0+ ARM64

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

Uploaded CPython 3.10Windows x86-64

libcbdetect-1.0.2-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.2-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.2-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: libcbdetect-1.0.2-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.2-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 df338ae4df4d03de2000fea15cd83b6cc90d0ef04b14077ed23d2ccead65c34d
MD5 03ecf7646ac4259ad570fce4ed7a7b3a
BLAKE2b-256 bf981979643b9654b3ee6d4d2cdf196f8a7c5288e461c49c8ebc908963ff87ba

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for libcbdetect-1.0.2-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 6f9464ae18e2735880747bd2b0859e446d860eae1b08c5a8665c8af61d5492e1
MD5 a1bce4d368035a55fadd11f45a602af7
BLAKE2b-256 d94abc1cec642c365a9938cc61a21e6714ab64fc1d5fd9652a3ae5315f74f4c2

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for libcbdetect-1.0.2-cp313-cp313-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 65b101549681f72909f6cf3b2caf17e379287f1ea33c22d8d22d92a5f27b9f64
MD5 c0ff90868ce8858cfe1e95defa34b6fe
BLAKE2b-256 42c4decd17620153f7c7b37f2b7654bda70f1fb4e0dd57549f297f22828d9465

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: libcbdetect-1.0.2-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.2-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 72aa0b3afec84a405224aa01779ed67026d3dcaa1c95f18ade181cee4dc52221
MD5 78347d7dfc87f586f4bb0ac2b3b05fb4
BLAKE2b-256 eae1d080d1226e82b6ac51a7ad6589f1903f4e0327589a68d5ccf91582f62038

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for libcbdetect-1.0.2-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 ee33664c244ac6cb7a23b273b54d16329c5c1a81e8d42dec702366544d772e58
MD5 82893e8c498288d1b321dedec7e67bdc
BLAKE2b-256 e24d56687b0545777571ddfadca10ea4aadc7de94a709b9b8663274748397eee

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for libcbdetect-1.0.2-cp312-cp312-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 29a04e8c27d331615e6d39c216f59894f9e9811a0a6b87e8f4da84c99de0b05d
MD5 4062430773b6a02e698d49a3c77288a2
BLAKE2b-256 5e5083fd503226c64e760e1ba36fdbaa96c4978bd01883a4b9cc153f8fa44ede

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: libcbdetect-1.0.2-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.2-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 8b401965e308fe4fc3053a63151805d7114af08698cf08fc61c57bfb93f0dac5
MD5 1161cdce73f8b61f7c49b023a62f439b
BLAKE2b-256 44743ac3c3940779bf0272141d011b37df52b49d381a5881b17ee5e379a9e636

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for libcbdetect-1.0.2-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 ec90d639a05d17eafe0eef16ab4eb91aeb722efc69796bc4d2b655ad8b886239
MD5 f8141c192ac9b0b956d7d547960e1477
BLAKE2b-256 ffe9e2a77890c2f3e0823dc91bfd9c7c820827c8bb219810d4a5720ae1bc97da

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for libcbdetect-1.0.2-cp311-cp311-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 06774336777dd3acd6b92fed52173782560271bbdb86d0e9fd6462d604179908
MD5 6cada19cab5e1dca63305ba7fe5732df
BLAKE2b-256 335e1591589f751767e0850284aa98f6fd613d9bff65be87275140e46f1fbc07

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: libcbdetect-1.0.2-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.2-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 044e30c03d2c026a79dcf3c5182257759071363bf1ffdfcc94e6c47b5b31b37c
MD5 942da66cbafe2db2ae8dbcdcfee142cd
BLAKE2b-256 4ab16e92cbb581ac457b780400ceabbe29d614dcdffec4c31722c6516aebab68

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for libcbdetect-1.0.2-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 a44b31f6ddda05d2ab5959fd8e2b76b0cda1324852d5b9e7efe2218e4a00ef6e
MD5 703e4ff8bf77db41f4b361ad3243ef8e
BLAKE2b-256 17bbf6a093808264486dad97f1eb014843d2d5bb5e464282d1963d6aadeed790

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for libcbdetect-1.0.2-cp310-cp310-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 39b7a08cbbb2e447e686e5c70136902f3b040688bf8233d162de461199e4affa
MD5 cbde1dcf51bed891680a5c940051bb59
BLAKE2b-256 0d4a426c9e371e4125ede578b1d958674478285a0e6e17c3ebbbe886fc2b30c2

See more details on using hashes here.

Provenance

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