There is current darktable work on adding lens correction based on embedded metadata in DNG files supporting the WarpRectilinear and FixVignetteRadial opcodes.
I already tested a great lot of available files and so far all seems very good.
To proceed and make sure the code is good we would like to field-test many more images.
Testing for correctness means: distortion and image size&crop should be the same for
out of camera darktable developed DNG images using the “embedded metadata” mode compared with
out-of-camera jpegs (preferred) or
adobe converted above raw (1) to tiff or jpeg.
Testing any adobe converted raws to dng (instead of the out-of-camera-dngs) from other cameras might be interesting for the individual but not relevant for evaluations as there are so many ways to “spoil the party here”.
What can you do here?
Either
provide pairs of out-of-camera DNG plus jpeg so i or others can test either here in the forum or by mail
Do you mean the “Perspective Control” introduced by Leica? I think this was only introduced after the rangefinder model M10 was launched and therefore only the models that came onto the market after have the perspective control, e.g. M10-M, M10-P and M11.
I tried your sample (only scene-referred default, but legacy white balance ”as shot”, plus lens correction, and the DJI Mavic Pro seems to be supported in general:
The result size is slightly different: 4000x3000 (original) vs/ 3992x2992 (darktable).
The white balance seems much more uniform in the original jpg, while in the darktable version the center seems slightly purple-tinted while the surrounding seems green-shifted.
Unfortunately, the DJI mini 3 pro is not yet supported as this would require opcode 9 (GainMap) in opcode list 3. @hannoschwalm, do you see a chance to support opcode 9 in opcode list 3 as well, as it is already supported in opcode list 2? I understand that this is not a simple copy&paste, as it is before/after demosaic, but hopefully it becomes at least a little bit easier …
The drone image is a first example why discussing the lens correction is so difficult. The dng file just has no information about lens warping so no point in analysing.
Sure, the fitting raw+jpeg pair is two posts above. I maybe misunderstood your 2nd option
as a call for testing, which I did with @Peter’s raw+jpeg pair and my own (which do not work as explained). If this was not meant, then sorry for the noise.
I compiled dt with your PR, and tested it with images from my OnePlus 10 mobile phone. I have self added the corrections in lensfun for geometry. When I open an image from the phone, the drop down is grayed out, and only lensfun correction is available.
Is there an issue with the DNG file, or I failed in building the version?
Here is a pair of DNG and JPG from the wide angel lens, where the distortion is the largest. IMG20221022161314.dng (24.3 MB)
Right. That’s due to the default crop exif data found in the raw so i think the dt values are correct. Also - there is no warp correction included in the dng