https://github.com/mint-lab/zero-shot-calibration
Zero-shot Camera Calibration [Lee, arXiv 2020]
https://github.com/mint-lab/zero-shot-calibration
camera-calibration
Last synced: 2 months ago
JSON representation
Zero-shot Camera Calibration [Lee, arXiv 2020]
- Host: GitHub
- URL: https://github.com/mint-lab/zero-shot-calibration
- Owner: mint-lab
- Created: 2023-01-26T06:32:08.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-02-07T00:25:09.000Z (over 3 years ago)
- Last Synced: 2025-03-06T08:18:11.256Z (over 1 year ago)
- Topics: camera-calibration
- Language: Python
- Homepage:
- Size: 54.4 MB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# zero-shot-calibration
The origin paper is from Jae-Yeong Lee, “Zero-Shot Calibration of Fisheye Cameras,”
arXiv, 2020, https://arxiv.org/abs/2011.14607
How to use this code is described below:
```shell
usage: zero_shot_calib.py [-h] [-W WIDTH] [-H HEIGHT] [-hf HFOV] [-vf VFOV] [-d DRAW]
find proper fisheye camera focal length with spec
options:
-h, --help show this help message and exit
-W WIDTH, --Width WIDTH
Width information of image frame
-H HEIGHT, --Height HEIGHT
Height information of image frame
-hf HFOV, --Hfov HFOV
Horizontal field of view angle. It should be float
-vf VFOV, --Vfov VFOV
Vertical field of view angle. It should be float
-d DRAW, --draw DRAW draw plot or not
```
example usage:
```shell
python3 zero_shot_calib.py -W 1920 -H 1440 -hf 122.0 -vf 94.0
```
Then it will show you the focal length in the terminal.
After that, if you want to undistort the image, you can use undistort.py
```shell
usage: undistort.py [-h] [--input_image INPUT_IMAGE] [--focal FOCAL] [--output_image OUTPUT_IMAGE]
options:
-h, --help show this help message and exit
--input_image INPUT_IMAGE
--focal FOCAL
--output_image OUTPUT_IMAGE
```
example usage:
```shell
python3 undistort.py --input_image 20210812_084000_000_0400.png --output_image undistort.png --focal 1021.92
```
then it will save the undistorted image.
Example result: