CameraTransform: A Python package for perspective corrections and image mapping
Camera images and video recordings are simple and non-invasive tools to investigate animals in their natural habitat. Quantitative evaluations, however, often require an exact reconstruction of object positions, sizes, and distances in the image. Here, we provide an open source software package to p...
Main Authors: | , , , , , , |
---|---|
Format: | Article |
Language: | English |
Published: |
Elsevier
2019-07-01
|
Series: | SoftwareX |
Online Access: | http://www.sciencedirect.com/science/article/pii/S2352711019302018 |
id |
doaj-f3e3404408554c8a932384de7af67ac9 |
---|---|
record_format |
Article |
spelling |
doaj-f3e3404408554c8a932384de7af67ac92020-11-25T01:51:07ZengElsevierSoftwareX2352-71102019-07-0110CameraTransform: A Python package for perspective corrections and image mappingRichard C. Gerum0Sebastian Richter1Alexander Winterl2Christoph Mark3Ben Fabry4Céline Le Bohec5Daniel P. Zitterbart6Biophysics Group, Department of Physics, University of Erlangen-Nürnberg, Germany; Corresponding author.Biophysics Group, Department of Physics, University of Erlangen-Nürnberg, Germany; Applied Ocean Physics and Engineering, Woods Hole Oceanographic Institution, Woods Hole, MA, USABiophysics Group, Department of Physics, University of Erlangen-Nürnberg, Germany; Applied Ocean Physics and Engineering, Woods Hole Oceanographic Institution, Woods Hole, MA, USABiophysics Group, Department of Physics, University of Erlangen-Nürnberg, GermanyBiophysics Group, Department of Physics, University of Erlangen-Nürnberg, GermanyCentre Scientifique de Monaco, Département de Biologie Polaire, Principality of Monaco, Monaco; Université de Strasbourg, CNRS, IPHC, UMR 7178, Strasbourg, FranceBiophysics Group, Department of Physics, University of Erlangen-Nürnberg, Germany; Applied Ocean Physics and Engineering, Woods Hole Oceanographic Institution, Woods Hole, MA, USACamera images and video recordings are simple and non-invasive tools to investigate animals in their natural habitat. Quantitative evaluations, however, often require an exact reconstruction of object positions, sizes, and distances in the image. Here, we provide an open source software package to perform such calculations. Our approach allows the user to correct for perspective distortion, transform images to “bird’s-eye” view projections, or transform image-coordinates to real-world coordinates and vice versa. The extrinsic camera parameters that are necessary to perform such image corrections and transformations (elevation, tilt/roll angle, and heading of the camera) are obtained from the image using contextual information such as a visible horizon, GPS coordinates of landmarks, known object sizes, or images of the same object obtained from different viewing angles. All mathematical operations are implemented in the Python package CameraTransform. The performance of the implementation is evaluated using computer-generated synthetic images with known camera parameters. Moreover, we test our algorithm on images of emperor penguin colonies, and demonstrate that the camera tilt and roll angles can be estimated with an error of less than one degree, and the camera elevation with an error of less than 5%. The CameraTransform software package simplifies camera matrix-based image transformations and the extraction of quantitative image information. An extensive documentation and usage examples in an ecological context are provided at http://cameratransform.readthedocs.io. Keywords: Perspective projection, Quantitative image analysis, Geo-referencing, Camera lens distortionshttp://www.sciencedirect.com/science/article/pii/S2352711019302018 |
collection |
DOAJ |
language |
English |
format |
Article |
sources |
DOAJ |
author |
Richard C. Gerum Sebastian Richter Alexander Winterl Christoph Mark Ben Fabry Céline Le Bohec Daniel P. Zitterbart |
spellingShingle |
Richard C. Gerum Sebastian Richter Alexander Winterl Christoph Mark Ben Fabry Céline Le Bohec Daniel P. Zitterbart CameraTransform: A Python package for perspective corrections and image mapping SoftwareX |
author_facet |
Richard C. Gerum Sebastian Richter Alexander Winterl Christoph Mark Ben Fabry Céline Le Bohec Daniel P. Zitterbart |
author_sort |
Richard C. Gerum |
title |
CameraTransform: A Python package for perspective corrections and image mapping |
title_short |
CameraTransform: A Python package for perspective corrections and image mapping |
title_full |
CameraTransform: A Python package for perspective corrections and image mapping |
title_fullStr |
CameraTransform: A Python package for perspective corrections and image mapping |
title_full_unstemmed |
CameraTransform: A Python package for perspective corrections and image mapping |
title_sort |
cameratransform: a python package for perspective corrections and image mapping |
publisher |
Elsevier |
series |
SoftwareX |
issn |
2352-7110 |
publishDate |
2019-07-01 |
description |
Camera images and video recordings are simple and non-invasive tools to investigate animals in their natural habitat. Quantitative evaluations, however, often require an exact reconstruction of object positions, sizes, and distances in the image. Here, we provide an open source software package to perform such calculations. Our approach allows the user to correct for perspective distortion, transform images to “bird’s-eye” view projections, or transform image-coordinates to real-world coordinates and vice versa. The extrinsic camera parameters that are necessary to perform such image corrections and transformations (elevation, tilt/roll angle, and heading of the camera) are obtained from the image using contextual information such as a visible horizon, GPS coordinates of landmarks, known object sizes, or images of the same object obtained from different viewing angles. All mathematical operations are implemented in the Python package CameraTransform. The performance of the implementation is evaluated using computer-generated synthetic images with known camera parameters. Moreover, we test our algorithm on images of emperor penguin colonies, and demonstrate that the camera tilt and roll angles can be estimated with an error of less than one degree, and the camera elevation with an error of less than 5%. The CameraTransform software package simplifies camera matrix-based image transformations and the extraction of quantitative image information. An extensive documentation and usage examples in an ecological context are provided at http://cameratransform.readthedocs.io. Keywords: Perspective projection, Quantitative image analysis, Geo-referencing, Camera lens distortions |
url |
http://www.sciencedirect.com/science/article/pii/S2352711019302018 |
work_keys_str_mv |
AT richardcgerum cameratransformapythonpackageforperspectivecorrectionsandimagemapping AT sebastianrichter cameratransformapythonpackageforperspectivecorrectionsandimagemapping AT alexanderwinterl cameratransformapythonpackageforperspectivecorrectionsandimagemapping AT christophmark cameratransformapythonpackageforperspectivecorrectionsandimagemapping AT benfabry cameratransformapythonpackageforperspectivecorrectionsandimagemapping AT celinelebohec cameratransformapythonpackageforperspectivecorrectionsandimagemapping AT danielpzitterbart cameratransformapythonpackageforperspectivecorrectionsandimagemapping |
_version_ |
1724998402341601280 |