Convince lens manufacturers to provide calibration data

When you archive, could you just add some of your own compression? lz4 or zstd or even just zip each file? like .arw.zstd ? A bit of a PITA indeed, but as someone who also has 100 MB plus file sizes now, it does eat up the storage way more quickly :rofl:

1 Like

I’ve not tried that yet, and so far I haven’t archived a single photo. I just keep filling up my storage and doing occasional culls to keep total storage manageable (currently about 1TB). Conceptually, I don’t really want to archive anything because I like all my photos available to view and edit at any moment. I tend not to ever ā€œfinalizeā€ any photo, although it is something I want to start doing as I’m considering printing and displaying certain photos.

But I’m certainly open to new approaches if someone can convince me it’s a better way. I was close to getting an a7R V just for the lossless compressed RAWs, but I couldn’t quite justify an extra $1000 for a different file format!

1 Like

But that’s like two not very large hard drives with prices how they are right now :cry:

There are some file systems that you can setup to compress and deduplicate, like btrfs or zfs.

1 Like

Oof, I know. Maybe it would have made more sense to just get the newer camera. But I didn’t know the DNG issues until I tried it. I had thought it was a really good solution, and it’s almost great. The files are essentially the same while being half the size. And if my lenses are in Lensfun, I can use that correction. It’s just the Tamron 50-300 that isn’t.

I’ll look into those file systems. Thanks for the tips.
And hopefully storage prices come down again in a year or two. Although that might be wishful thinking.

1 Like

Are you sure dng creator isn’t doing lens correction?

Also there is the FOSS dnglab, not sure if you’ve tried that.

Pretty sure because I did some tests in the early days, although now you’ve got me wondering again. I’ll have another check.

No I haven’t tried dnglab, but I’ll give it a go.

1 Like

Just looked again at some old test shots I did, and I can confirm that the Adobe DNG Converter does NOT apply distortion lens correction. It applies a very slight crop but no distortion is corrected.

After using the Lens Correction module in ā€œmetadataā€ mode on the DNG file, TCA is applied but not distortion; whereas on the ARW file, both TCA and distortion are applied. So it seems the distortion metadata is contained in a Sony format that DNG strips away, or it converts it into a format that Darktable can’t decode.

If anyone wants to have a play:

DSC00385.ARW (117.7 MB)
DSC00385.dng (55.3 MB)

These files are licensed Creative Commons, By-Attribution, Share-Alike.

1 Like

I’m useless when it comes to image-processing algorithms, so I don’t think I can do much with the code. But good to see at least some minor progress.

I have some updated values for the 24-70 f/4 S, but sending them to lensfun (Github issue) was apparently declined? Idk. I was asked to provide photos with requirements that suit the calculation itself… but I already had the new values calculated. The issue was closed shortly after (I was planning to supply photos later on) so idk, how does contributing to lensfun actually work? :sweat_smile:

Downloaded the Windows exe but can’t seem to get it to run, even in Administrator mode…

Where did you get the values from though?

Lensfun implements a few different lens correction algorithms, but none of them are the same as what Nikon uses for their lens correction, so if you just grabbed values from your raw file, that isn’t going to work, that’s why they asked you for the raw files themselves, they’ll run and validate the calculations for you. They did that pretty fast for the GR IV shots I submitted recently.

Erm, my method was a bit strange. I’ve followed a tutorial using Hugin Panorama stitcher to get some a, b, c values by marking straight lines

(I have the video of the tutorial downloaded, but idk if I have the link the original, I think it was on Vimeo). The video is 32 megabytes so I could share it here if it’s okay.
EDIT: bingo

After that I manually fine-tuned them so that they matched SOOC JPEGs as closely as possible. The result is noticeably better than the existing lensfun coefficients – especially 35mm that bulged out in the center – that’s I how I found the values are not right.

So yeah, I wanted to submit these values to lensfun so that I don’t have to manually rewrite local lensfun XMLs every Darktable update.

ah I see. Usually when you use the scripts, they make a PDF or some images with some graphs they can use to help verify them. I am not super surpised that they didn’t take just some numbers.

If you have the files, you should submit them :smiley:

1 Like

I would submit the RAWs if they didn’t have the reflection of my face in a window :sweat_smile: Are uncorrected JPEGs enough? I could censor my face like that.
I was planning to retake them later on, but the thread has been closed quite fast, so yeah…

I was planning to, but I couldn’t make it work on my system I think. There’s still a tab with lens_calibrate.py in my browser for like half a year, but I can’t use it.

Pretty sure they want raw files.

Welp, new photos it is then. Gonna take a while before I get to (and feel like it) photographing a suitable building nearby…

1 Like

I have a copy board with lots of straight lines on it. If I can get close enough to fill the frame, could I use that for taking my own lens readings for Lensfun?

I heard that’s not recommended unless you plan to use the lens primarily for close-ups, because distortion differs by focus distance. You need to shoot something at a distance of several meters – I guess that depends on the focal length. That makes buildings with straight lines just about the only viable choice for good profile creation.

2 Likes

Yeah, I had a feeling that was the case. It means a trip downtown for me, which is something I only do a few times a year!

Yep, gotta do the same once I get the chance :sweat_smile:
I’ve got a few buildings that may serve me well (no reflections of me in the windows)

In the past, I’ve found by the time I get around to this kind of thing, someone somewhere has already submitted the lens data so I don’t need to bother. I’m kind of hoping that happens with the Tamron 50-300, which I would have thought is a fairly popular lens.

My other hope is that a darktable dev manages to decode the DNG metadata for lens distortion because I’m fairly sure it’s in there somewhere.