Skip to main content

Correction for radial distortion and perspective distortion in Python

Project description

Discorpy

(Dis)tortion (Cor)rection (Py)thon-package

Camera calibration and distortion correction software for lens-based detector systems

GitHub Workflow Status Downloads former_vounwarp_downloads Anaconda-Server Badge Documentation Status Anaconda-Server Badge GitHub code size in bytes Anaconda-Server Badge Coverage

Discorpy is an open-source Python package for camera calibration and distortion correction with sub-pixel accuracy. It calculates parameters of correction models using a grid pattern image. The package mainly implements methods published in Optics Express. It provides methods in a full pipeline of data processing. From version 1.4, perspective distortion correction was added to the package.

Author and maintainer: Nghia Vo, NSLS-II, Brookhaven National Laboratory, US; Diamond Light Source, UK

Major updates

  • 25/02/2021: the package name was changed from Vounwarp to Discorpy. The old-name package is still available at https://github.com/nghia-vo/vounwarp and installable using conda-forge channel: https://anaconda.org/conda-forge/vounwarp
  • 21/11/2021: Version 1.4 was released with new features: perspective distortion correction, pre-processing methods for line-pattern images and chessboard images.

Features

  • Pre-processing methods for: extracting reference-points from a dot-pattern image, line-pattern image, and chessboard (checkerboard) image; grouping these points line-by-line.
  • Processing methods for calculating the optical center, coefficients of polynomial models for correcting radial distortion, and parameters of a model for correcting perspective distortion.
  • Post-processing methods for: unwarping lines of points, images, or slices of a 3D dataset; and evaluating the accuracy of the correction results.
  • Some methods may be useful for other applications:
    • Correct non-uniform background of an image.
    • Select binary objects in a certain range of values.
    • Unwarp slices of a 3D dataset.
  • Summarized by an AI chatbot: "It is a Python library for camera distortion correction that is designed to be easy to use and accessible to both computer vision experts and novice users. The library provides a simple API for correcting lens distortion in images, and it is based on the popular NumPy library for numerical computing. Discorpy also has good documentation and examples to help users get started with the library".

Documentation

Installation

How to use

Demonstrations

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

discorpy-1.5.tar.gz (40.3 kB view hashes)

Uploaded Source

Built Distribution

discorpy-1.5-py3-none-any.whl (34.9 kB view hashes)

Uploaded Python 3

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