letmaik / lensfunpy

📷 Lens distortion correction for Python, a wrapper for lensfun
https://pypi.python.org/pypi/lensfunpy
MIT License
145 stars 18 forks source link

Install Develop Database #26

Closed fraukaiser closed 4 years ago

fraukaiser commented 4 years ago

Dear all,

Thanks for the great tool and the clear documentation. I installed lensfunpy on my 64-bit machine (Linux Mint 19.3 - Ubuntu Tricia) using pip install and everything is working fine. I cloned the database from the lensfun GitHub repository as suggested. However, apparently, it is loading the latest stable version 0.3.2., but I need the develop version (since it already has the lens information of the Mavic Pro from DJI). The lensfun Github repository is not very helpful regarding that matter. Do you know a way how I can install the develop version? Any help is highly appreciated.

Best, Soraya

letmaik commented 4 years ago

See https://letmaik.github.io/lensfunpy/api/lensfunpy.Database.html for how to specify specific xml files to load.

fraukaiser commented 4 years ago

Thanks for the quick reply!

I found the actioncams.xml that contains the info on the Mavic Pro and managed to load it following your reference. I also followed your documentation for correcting the lense distortion. Everything seems to work fine. However, when I try to read the EXIF tag from the corrected image it returns "Corrupt data" and when I process the images in the photogrammetry software WebODM it outputs a sparse point cloud with wrong elevation and orientation values.

What am I missing here? In case no one has advice on this issue: has anyone used lensfunpy with their own calibration data (e.g. camera with a chessboard)?

dschneiderch commented 4 years ago

@fraukaiser not sure about your exif data but the exif commandline tool claims corrupt data on my images. exiftool and exiv2 both work find though.

this tutorial worked for me to generate my own lensfun.xml from which I could perform a distortion correction using lensfunpy

letmaik commented 4 years ago

EXIF data will not survive automatically on the corrected image. You can use exiftool to copy the original metadata to the correct image.