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

Uploaded CPython 3.13Windows x86-64

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

Uploaded CPython 3.13macOS 14.0+ ARM64

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

Uploaded CPython 3.12Windows x86-64

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

Uploaded CPython 3.12macOS 14.0+ ARM64

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

Uploaded CPython 3.11Windows x86-64

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

Uploaded CPython 3.11macOS 14.0+ ARM64

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

Uploaded CPython 3.10Windows x86-64

libcbdetect-1.0.5-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.5-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.5-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: libcbdetect-1.0.5-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.5-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 3321f275fe8c95e4d2e6ece86d9bb84046c68180243818433872ab18a65b1a06
MD5 c08cf2110632dd3559abd826026e69bb
BLAKE2b-256 8d4753a1299e92af13db701be765bdf0b9699ed3998412b5171ca2324f3cb226

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for libcbdetect-1.0.5-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 66a876f510a2b982a6de903a15abc37072c008721e884a444c3e21a7fac01649
MD5 d4df494176683112b8a8b8260172c72c
BLAKE2b-256 c2b20a122b001076e2405f780266b1ab61b9769e4557cc662ceef54e3443af7b

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for libcbdetect-1.0.5-cp313-cp313-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 a264294d32fe82318a9ad70a581133bd0d70c33c69d039da9c5064b008b7140f
MD5 ab7c0481c34a530bb7cc141ccd5ce6e5
BLAKE2b-256 d97962eed1dd0d5aac2402f14f8efaba4c989281d51ed39f1543061ef5c37cdc

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: libcbdetect-1.0.5-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.5-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 9dbcf227044bc7e35d4091f5c4fddae86596682e2f109a2a1349c99f33585b72
MD5 d547486f849228ef21e4dbbaa2746484
BLAKE2b-256 d73a92e3377472d1c79023d50c18ed20a169b5521dbb32b4dc612054b1ee1a46

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for libcbdetect-1.0.5-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 81bc33daece849c4c377873e0249421cbb30ef660416fbf27dd89d26d821bd18
MD5 617dac94d9110a136482c29114275bbf
BLAKE2b-256 5366c0d19a3886975a41f8bcc53dfe5568169bcc209a4b7a45a12c7a3a9d80cb

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for libcbdetect-1.0.5-cp312-cp312-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 36b62900281fceb07d60b50c11898ee2c6ea2a50d1931856892fd6070fae6939
MD5 fdaef9e8dbd5c260e3d8ea7fd6c8b781
BLAKE2b-256 4e517cf40f8029f5c9872e4ca8ea580054de11224416f2faa73eb2e845a03bef

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: libcbdetect-1.0.5-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.5-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 7c65af22303b4650f9cd62b66004f9cafe93211d6d400dde73efab8f2eac22e8
MD5 2c8df2da753ea05548437f0c06bc3823
BLAKE2b-256 b501d0e9cfc2c05441e4a82ff765c75497ce1191ed23987aea2c1638a4bee7ee

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for libcbdetect-1.0.5-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 fbbdcb337dd8ad419283a2e5f6cf64979ffccbfaa2e256ca5bc7f14d8279fdae
MD5 e8a91088e188c548d8f78f80b2a74bfe
BLAKE2b-256 f120d73aefb9494c6e2a5439978d5ba3c54b177eeab261d5cb37307f46fba9fc

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for libcbdetect-1.0.5-cp311-cp311-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 278a3b2bf5f10f7af413f127a55845efa8483067346d15bfd33b4cd1f55328be
MD5 8daa4f64f48bf2f30fb82d1b1ad0c57c
BLAKE2b-256 432c36edc1c5744b3da9724d0ca98a5b5afc71b8f7d49fcc7b8c8ae96ef11889

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: libcbdetect-1.0.5-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.5-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 019b399cffe5bf85788475a85052892158d3a40706a4ae2b9a3bd5dbbcc40fd9
MD5 1489d2627a75548f3e8c4bc9619ee155
BLAKE2b-256 66e96c7ddc29c282801aa9561cb6b44c425092b0907caa5fabf6f6586d1ce447

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for libcbdetect-1.0.5-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 dc28dc6ad511c2dce12cdaa2004226e30f0dbed34dc51dab57486506ababdf8e
MD5 761247faaa7f09d5f932a33a769b7df0
BLAKE2b-256 d5243670e5d20ebc10e13ac2b6280834b6b872fad9dc0e9d4c71d514aa02e56d

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for libcbdetect-1.0.5-cp310-cp310-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 ea69f5ec625c52ec5f48d5314ce3198ce107cc85cc6664552f5590d031221512
MD5 275e18f3639394baac502bf5a6508357
BLAKE2b-256 64768e45792d139d37ee39ff5b74e4c0259c3c37f4b5cbe94b992fa6d60bc5c1

See more details on using hashes here.

Provenance

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