PyCalib: Simple Camera Calibration in Python for Beginners
Project description
Simple Camera Calibration in Python for Beginners
This is a collection of algorithms related to multiple-view camera calibration in computer vision. Please note that the goal of this package is to provide minimal examples to demostrate the concept for beginners (i.e., students). For large-scale, realtime, accurate, robust, production-quality implementations, or for implementations for your specific situation, please consult your advisor.
Disclaimer
This is research software and may contain bugs or other issues -- please use it at your own risk. If you experience major problems with it, you may contact us, but please note that we do not have the resources to deal with all issues.
How to use
You can simply install the package by pip
.
$ python3 -m pip install -U pycalib
The pip installation, however, does not include examples in ./ipynb
. To run examples, download the repository explicitly. For example,
- Local: You can clone/download this repository to your local PC, and open
./ipynb/*.ipynb
files by your local Jupyter. - Colaboratory: You can open each Jupyter notebook directly in Google Colaboratory by clicking the buttons below.
- Warning: Most of them do not run properly as-is, since colab does not clone images used in the Jupyter notebooks. Please upload required files manually. (or run
!pip install
and!git clone
at the beginning of each notebook.)
- Warning: Most of them do not run properly as-is, since colab does not clone images used in the Jupyter notebooks. Please upload required files manually. (or run
Single camera
- Intrinsic parameters from chessboard images
- Extrinsic parameters w.r.t. a chassboard
- Intrinsic / Extrinsic parameters from 2D-3D correspondences
- Distortion
Multiple cameras
- Sphere center detection for 2D-2D correspondences
- 2-view extrinsic calibration from 2D-2D correspondences
- N-view registration
- N-view bundle adjustment
3D-3D
If you need to write your own calibration ...
- For linear case:
- Use
numpy
.
- Use
- For non-linear (including bundule adjustment) case
- Try
scipy.optimize.least_squares
first.- If the system is sparse, use
jac_sparsity
option. It makes the optimization much faster even without analitical Jacobian. - If it is slow, use
numba
.
- If the system is sparse, use
- Use ceres-solver if the computation speed is really important.
- Make sure the optimization is doable with
scipy
first.
- Make sure the optimization is doable with
- Try
Contact
Please note that this is research software and may contain bugs or other issues -- please use it at your own risk. If you experience major problems with it, you may contact us, but please note that we do not have the resources to deal with all issues.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for pycalib-simple-2022.1.8.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | f6e7f5efba154bbdb676af8716559d6697c035e52125dda10d29c070b82f70e3 |
|
MD5 | f5e609b8c5e7cbc0a19405960f836450 |
|
BLAKE2b-256 | e0a22c94b735f7d0d58454c32f01bd9f232bae739a2757f8bbe33916392bbb0e |
Hashes for pycalib_simple-2022.1.8.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a775186b1cccefd3ccc7c4d6d7e920d121116c61ad27b1f16657eb59c7dba029 |
|
MD5 | b754d2282734abd787b8c85b1646951b |
|
BLAKE2b-256 | 4f786bc5116380940b280eebe1e0df39a9245be4c7da5c702b24b7b8e8da6806 |