Skip to main content

Simple GUI-based correction of fisheye images. The correction parameters specified on the screen can be diverted to opencv's fisheye correction parameters.

Project description

simple_fisheye_calibrator

Simple GUI-based correction of fisheye images. The correction parameters specified on the screen can be diverted to opencv's fisheye correction parameters. Supports execution via Docker.

PyPI - Downloads GitHub PyPI

001

005

  • Fisheye image before calibration

002

003

  • (Sample) Fisheye image after calibration

004

1. Install

1-1. Launching with Docker (with USB Camera / HostPC GUI, Docker Image size: 1.4GB)

  • simple_capture
xhost +local: && \
docker run -it --rm \
-v `pwd`:/home/user/workdir \
-v /tmp/.X11-unix/:/tmp/.X11-unix:rw \
--device /dev/video0:/dev/video0:mwr \
--net=host \
-e XDG_RUNTIME_DIR=$XDG_RUNTIME_DIR \
-e DISPLAY=$DISPLAY \
--privileged \
pinto0309/simple_fisheye_calibrator:0.0.9 \
simple_capture

# 1. Capture one test image from the USB camera with "c" on the keyboard
# 2. Exit the capture application with "q" on the keyboard
  • simple_fisheye_calibrator
# Still image
xhost +local: && \
docker run -it --rm \
-v `pwd`:/home/user/workdir \
-v /tmp/.X11-unix/:/tmp/.X11-unix:rw \
--device /dev/video0:/dev/video0:mwr \
--net=host \
-e XDG_RUNTIME_DIR=$XDG_RUNTIME_DIR \
-e DISPLAY=$DISPLAY \
--privileged \
pinto0309/simple_fisheye_calibrator:0.0.9 \
simple_fisheye_calibrator --file_path fisheye_test.jpg

or

# USB Camera: video0
xhost +local: && \
docker run -it --rm \
-v `pwd`:/home/user/workdir \
-v /tmp/.X11-unix/:/tmp/.X11-unix:rw \
--device /dev/video0:/dev/video0:mwr \
--net=host \
-e XDG_RUNTIME_DIR=$XDG_RUNTIME_DIR \
-e DISPLAY=$DISPLAY \
--privileged \
pinto0309/simple_fisheye_calibrator:0.0.9 \
simple_fisheye_calibrator --file_path 0

1-2. Installation on the host PC

$ pip3 install -U simple_fisheye_calibrator

2. Usage

$ simple_capture
# 1. Capture one test image from the USB camera with "c" on the keyboard
# 2. Exit the capture application with "q" on the keyboard

# Still image
$ simple_fisheye_calibrator --file_path xxx.jpg
# USB Camera: video0
$ simple_fisheye_calibrator --file_path 0

or

$ sudo pip3 install cvui Pillow opencv_python numpy --upgrade
$ git clone https://github.com/PINTO0309/simple_fisheye_calibrator.git && \
cd simple_fisheye_calibrator

$ python3 simple_fisheye_calibrator/simple_capture.py

# 1. Capture one test image from the USB camera with "c" on the keyboard
# 2. Exit the capture application with "q" on the keyboard

# USB Camera: video0
$ python3 simple_fisheye_calibrator/simple_fisheye_calibrator.py --file_path 0

3. Parameter

usage:
simple_fisheye_calibrator.py \
  [-h] \
  [--file_path FILE_PATH] \
  [--window_size_width WINDOW_SIZE_WIDTH] \
  [--window_size_height WINDOW_SIZE_HEIGHT]

optional arguments:
  -h, --help
      show this help message and exit
  --file_path FILE_PATH
      File path of the still image (e.g. xxx.jpg) or device number of the camera (e.g. 0)
  --window_size_width WINDOW_SIZE_WIDTH
      Default window size width
  --window_size_height WINDOW_SIZE_HEIGHT
      Default window size height

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

simple_fisheye_calibrator-0.0.9.tar.gz (5.8 kB view details)

Uploaded Source

Built Distribution

File details

Details for the file simple_fisheye_calibrator-0.0.9.tar.gz.

File metadata

  • Download URL: simple_fisheye_calibrator-0.0.9.tar.gz
  • Upload date:
  • Size: 5.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.4.2 requests/2.22.0 setuptools/56.0.0 requests-toolbelt/0.8.0 tqdm/4.40.0 CPython/3.8.5

File hashes

Hashes for simple_fisheye_calibrator-0.0.9.tar.gz
Algorithm Hash digest
SHA256 c42d8d7a721dabc9488dc04744b6bf940ab456f659f935519e33b3bb483c7d51
MD5 f233506a79ba0d7f179b23104addc7fe
BLAKE2b-256 43b6c9d6c36e7e42ea3692ecfb2312be574f3e27045cf52bf0c94e99d35f227c

See more details on using hashes here.

File details

Details for the file simple_fisheye_calibrator-0.0.9-py3-none-any.whl.

File metadata

  • Download URL: simple_fisheye_calibrator-0.0.9-py3-none-any.whl
  • Upload date:
  • Size: 5.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.4.2 requests/2.22.0 setuptools/56.0.0 requests-toolbelt/0.8.0 tqdm/4.40.0 CPython/3.8.5

File hashes

Hashes for simple_fisheye_calibrator-0.0.9-py3-none-any.whl
Algorithm Hash digest
SHA256 4c92c018deeba1b6677a69da2f49e9ed30fe1838658c18c5c102d88c772e063f
MD5 a0bd0a4c5adb21ca9db1d6aa91e68b8b
BLAKE2b-256 c8f1b04a08dc1c7ab870f2731edfd65f5f18aadeeb8e2947d18616d0255c2411

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page