-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Automatic rotation or perspective correction using camera metadata #17384
Comments
Unfortunately those exiv tags are not documented for "how to apply" so no chance without Leica help. |
I can't find anything online either, just some basic value type information. What docs or specification do we need from Leica to be able to use these values? |
The maths. :-) |
All the nice numbers that are stored in the Xmp.xmpDSA tags are parameters that are used in a proprietary algorithm from Leica to correct the image data. I don't know of any manufacturer that has ever made its algorithms public. The only way would be backwards engineering, involving a lot of work and time. |
The numbers seem fairly "sensible". Enough so that I suspect it shouldn't be too hard. Mostly a question of figuring out the coordinate system. Try to create a thread over on discuss.pixls.us with several samples (raw + corrected jpeg + exif). Many of the regulars there are good with math. |
I guess that if the camera is perfectly level, then both pitch and roll would 1.
Can you set the camera to record in different aspect ratios? And does this change accordingly?
Don't actually know anything about keystone correction algorithms, but presumably this is to correct for distortion caused by straightening the trapezoid or to fit the aspect ratio.
Is it possible to get
This appears to be the corners of the trapezoid, with the coordinates going from 0 to 1. Wouldn't be surprised if each number is just a multiplication factor applied to the pixel dimensions. At a minimum, the following sample shots are needed:
All shots should be done in both horizontal and vertical orientation, so ten total. Raw + camera JPEG. |
Some Leica cameras have a feature called "Perspective control", which automatically corrects the perspective or keystone distortion. Article with pictures here. This is directly applied to in-camera jpg files, and for raw files the data is stored in the camera metadata. Which looks like:
I could not find any documentation or information if this data is used by darktable, but it would be nice to be able to. It could even just be used for rotation.
Let me know if I can provide any other information or image samples.
The text was updated successfully, but these errors were encountered: