calibtools: a camera calibration toolbox¶
This package is a repository for some useful scripts for performing camera calibration in Python. It requires the following modules:
- OpenCV’s Python bindings
- moviepy
- numpy
The calibtools utlity¶
The calibtools package provides one command-line utility which is named, unimaginatively, calibtools. The command-line interface documentation is reproduced below:
Usage:
calibtools (-h | --help) | --version
calibtools calib [-v... | --verbose...] [--start=INDEX] [--duration=NUMBER]
[--skip=NUMBER] [-o FILE | --output=FILE] [--shape=WxH] <video>
calibtools undistort [-v... | --verbose...] [--start=INDEX]
[--duration=NUMBER] (-o FILE | --output=FILE) <calibration> <video>
Common options:
-h --help Show a command line usage summary.
-v --verbose Be verbose in logging progress. Repeat to increase
verbosity.
--version Output this tool's version number.
-o FILE --output=FILE Write output to FILENAME. The default behaviour is
to write to standard output unless noted otherwise
in an individual command's documentation.
--start=INDEX Start processing from frame INDEX (0-based).
--duration=NUMBER Read at most NUMBER frames from input.
<video> Read input frames from <video>. This must be in a
format which OpenCV can understand.
Calibration options:
--skip=NUMBER Only process every NUMBER-th frame. Note that this
does not affect the interpretation of --duration. A
skip of 10 frames with a duration of 20 will result
in 2 frames of output. [default: 10]
--shape=WxH Checkerboard has WxH internal corners.
[default: 8x6]
Undistort options:
<calibration> A file containing calibration information in JSON
format as output by calibtools calib.