Failed to create Lensfun profile for OnePlus 6

I followed this tutorial and I have succeeded before with my Canon raw files. With OnePlus 6 I just get

I suppose this has to do with the integrated lens and that’s why I can’t grab any LensModel. So,
what should be my next move? I know the lens is f/1.7 and has a focal length of 4.2 mm. Should I just add the tags with Exiv2?

CC0 for the raw file
OnePlus-6.dng (31.1 MB)

DNGs by design (based on TIFF/EP) don’t contain a separate Exif IFD (Exif.Photo in exiv2 parlance) like most DSLR raw formats but keep everything in the main IFD of the image itself (Exif.Image) [1]. You can check those are indeed present in Exif.Image, and then try to recreate Exif.Photo tags?

Ideally lensfun should fall back to Exif.Image if Exif.Photo is not found…

[1] TIFF/EP - Wikipedia


For fixed lens cameras you don’t need lens information from EXIF, see here for examples of how unique mount names are used to map a camera profile to a lens profile. Of course, things can get more complicated for devices with more than one fixed lens, but that’s another story


Solved. darktable doesn’t find the lens by default. Don’t know where I went wrong but at least I now is able to correct it manually.

misc (OnePlus 6).zip (537 Bytes)

I found for the Google Pixel which has heavy vignetting that the best option was ART…using the flat field correction and setting to use embedded it reads the gain maps in the DNG and relights the image nicely. ART will also use embedded info for the lens…Likely will work with your file too I will try when I get time…

EDIT just checked …looks like gain maps are not used with this phone’s dng…

1 Like