LensFun Nikon AF-P Lens Profiles

I recently tried one of the newly submitted lens correction profiles for three of Nikon AF-P lenses, the AF-P 10-20mm wide lens, now found within lensfun-0.3.95 version.

I was saddened to see even with the lens correction profile applied to my photo taken with a Nikon AF-P 10-20mm lens within RawTherapee, there was still some remanent pin cushion lens distortion at the (1/16 or less) center of the image/photo.

I’m going to guess, this is likely due to the author only submitting the absolute minimal necessary lens test images. (I read into the process of creating a lens profile, and found it a very laborous process, unless one is already setup to profile lenses.)

Is this normal with other LensFun lens profiles as well?

Since correcting lens deformations is likely a redundant necessary task, what do most others do? Are they simply satisfied with the correction results of using a JPEG+RAW image comparison correction within RawTherapee? Or do dedicated users create their own lens profiles, time permitting I would assume.

The only other lens deformation I have noticed, is some barrel distortion when the Nikon AF-P 70-300mm lens is zoomed into 300m. Other than this, most other lens distortion seems not noticeable.

Shouldn’t you be happy that someone bothered to do it at all and then was kind enough to share their results?

If the results aren’t satisfactory, you should make you own. There isn’t any need to disparage someone else’s work.

I shoot mostly primes, so someone else has kindly provided good correction profiles to my lenses.

@asn has worked pretty hard to make this more approachable. Have you read his article on the blog? https://pixls.us/articles/create-lens-calibration-data-for-lensfun/

1 Like

Paperdigits, I think you’re being a little presumptuous.

If you take the time to read my entire post word for word, or more specifically focus upon paragraph three, you will then likely comprehend that I already understand and gave adequate credit/notice by mentioning the task of creating the lens profiles is a very “laborous” task. (The reason I know this, I researched creating a lens profile for raw images when using a custom firmware for a Canon small point and shoot camera, along with almost getting the profile submitted, but I thought the end result of my lens profile was not up to the standards of other completed lens profiles. Anyways, way off-topic here.)

Like I stated within the my initial above post, I am curious if I’m correctly discerning the performance of the submitted AF-P 10-20mm wide lens profile; and further curious as to the extent of other’s experience with lens deformation and what they do to workaround problems. I’m going to take a reasonable guess, most professionals whom rely upon Rawtherapee and Linux, take the time to create their own lens profiles unless they’re fortunate enough already to have a detailed and well tested lens profile. (I think you started to touch upon this yourself, stating you yourself use primes, for which lens profiles are likely much easier to create and maintain.)

Another workaround is likely to continue using the proprietary software already including completed/tested lens profiles, and then work on my own lens profiles during next Winter, time permitting. (I have to slave for somebody else during the Summer while being tortured, and Winters are not much better with the availability of free time. The world has really gotten crappy within the past 10 years.)

I did read your post word for word. I don’t find it fair to critisize the work of others who have put in the time and effort to make something and share it as “not good enough” for you. If that is the case, you should put in the work.

I have also found that as I’ve bought more expensive glass, the correction profiles are better. My Nikon 50 mm f1.4 and 24mm f1.8 both have good correction. My tamron 70-200 f2.8 also has good correction, but that lens doesn’t have a lot of distortion to my eye. This is probably because there are fewer lenses in the more expensive category, so there are more users per lens.

If you’re using RawTherapee, you should be able to extract an LCP provided by Adobe/your lens manufacturer.

1 Like

Here’s a good scenario, so I should just keep my mouth shut and not say anything about the apparent possible flaws, similar to the ground troops wanting to keep their mouths shut and circumvent the gun nest within the WW2 Movie “Saving Private Ryan”? I think you have your opinion and I have mine. Again, reread my post, nowhere did I insinuate anything derogatory concerning the submitted lens profile, if anything, completely the opposite taking time to note the extreme labor required for creating the profiles.

If I built a house and I possibly did something incorrectly, I would rather have the constructive criticism and/or feedback, rather than people simply keeping their mouths shut and fearing me because of the number of stripes on my sleeves or stars on my collar. This is separate of any derogatory comments of course.

I also tried the Adobe (lens) profiles, but cannot recall if the AF-P series were omitted or not provided as of yet. As I do the math, it is possible Adobe realized a mere series of three photo sessions were not good enough for the AF-P lenses as well. (eg. minimum, middle, maximum focal length.) As I recall, a lot of the Adobe lens profile names seemed incomplete, and I think I had to delve deeper into the profiles or something. And as I further recall, the Adobe lens profiles are a mix of end user and likely some manufacturer supplied profiles.

Like I said, I’ll put this on my Winter agenda, profiling the lenses using the Adobe lens profiler and Adobe provided charts.

I haven’t read the rest of the replies, but could you please post an example?

And if you are able to take a picture at 10mm like described in the article, we can take a look and maybe fix the problem?

I was just thinking of doing so, but running short on time for the past few years… regardless, figured instead of typing ~5 minutes my excuse, figured devote the ~5 minutes digging the files-up and posting. So here they are.

The JPEG is rasterized from the NEF raw file using Nikon’s Capture NX-D. Attached also is the PP3 file for RawTherapee. (Notice how closely I have most colors matching, except for a slight higher contrast, but I’m now almost always using Capture NX-D’s “+20 Shadow Protection” & “+10 D-Lighting HS” features to likely attain a very similar end result. See n56_1196_01.jpg for this effect, now very similar to the RawTherapee’s excellent results!)

You’ll notice a small dimple in the middle of the image and some warping along the perimeter of the image. The perimeter maybe more noticeable as I think there’s now cropping yet being performed on the raw image.

I’m working this new PP3 file configuration recently for inclusion into my online web page, “RawTherapee & Nikon DSLR Cameras”, instructions how to get similar results from Nikon Capture NX-D. Think the last thing remaining are documenting/resolving these minimal lens deformations

n56_1196.nef (30.1 MB) n56_1196.nef.pp3 (11.0 KB)

Here’s a snapshot of RawTherapee’s JPEG with the associated JPEG.PP3 file results. The above *.JPEG files without any -rt suffix are JPEG files created using Capture NX-D. The below suffixed with “-rt” and are created using RawTherapee, if one doesn’t have time to view the above attached NEF raw file.

n56_1196.nef.pp3 (11.0 KB)

In order to see the lens deformations between n56_1196.jpg/n56_1196_01.jpg and n56_1196_rt.jpg, you’ll likely need to open the images side by side tabs, and quickly tab between the images. (I know there’s a slight mess on the first couple of images uploaded, the NEF/PP3 files download links are in between the images, and I don’t want to muck around with the http/wiki code and screw-up the hefty upload links. Also, no titles and filenames on the images displayed, so readers will likely be confused up until they download the images.)

One thing to consider is that distortion often changes with focus distance, so perhaps the Lensfun profile was made on a test chart at a closer distance.

Nikon’s software would have a look-up table to handle the full range of focus distances.

1 Like

Could you please take a picute like the first one @ this page? https://pixls.us/articles/create-lens-calibration-data-for-lensfun/

With trees is really next to impossible to understand. Maybe the correction is even better with lensfun but of course different.

Woods and trees are difficult to capture without distortions but a quick look shows minimal distortions here :smiley:
As mentioned above, a building might be a better subject to test, should be plenty of candidates in Cleveland such as:

Try using filebin.net to share larger files.

I already realise the photos for buildings is preferable for immediately discerning lens deformations, however what time permits here, the above photos are what I could post on the spare of the moment, and toggling between the two n56_1196.jpg/n56_1196_01.jpg and n56_1196-rt.jpg photos vividly & clearly shows the likely lens deformation at the center, and likely the perimeter as well. (This just requires an extra step of downloading the images and using a tabbed/toggled image viewer.) However, I completely agree the deformations are not readily visible to the naked eye, unless photo of a building or grid is taken. (It would take me a one or two days to take photos of buildings in Cleveland, and in that time I could easily start setting-up the lens profiling studio possibly planned for a Winter/indoor task.)

After I slept on this, early this morning I realized what is likely happening with using the AF-P 10-22mm lens profile from LensFun. I have not read/researched how the RawTherapee lens profiles are created, but the Adobe method required at the very least, a series of three photo sessions, each session included ~9 photos of a lens profile target. It maybe this 10-20mm lens profile I’m still seeing lens deformations with only included three photos, omitting the center and perimeter correction photos, for which would be corrected if at least the ~27 images or three sessions were submitted. Probably quite common to misread or misconstrue the instructions, thinking only three photos are needed for a lens profile… I almost did too initially. Regardless, I’ll toss it on my Winter agenda. I probably should file a bug report for LensFun regarding this.