Author Topic: Roll-your-own lens profiles  (Read 1554 times)

Rex Block

  • Jr. Member
  • **
  • Posts: 40
Roll-your-own lens profiles
« on: February 24, 2018, 04:40:41 am »
Is it possible to create a roll-your-own lens profile?

I am using some non-CPU lenses that do not transmit any LensID EXIF information to the raw images. I know what the lenses are, and I could correct the raw images in post-processing by applying a lens ID, which would then reference an entry in the DxO CAFlist DB.

The lenses in question are older AI-S Nikkor 50mm and 180mm, and a 28mm Nikkor Series E. At the most basic level, I would try to optimise contrast, vignetting, and distortion control.

kdochert

  • Jr. Member
  • **
  • Posts: 7
Re: Roll-your-own lens profiles
« Reply #1 on: March 13, 2018, 07:28:41 pm »
You could do that by saving the modifications as a custom preset?

MikeFromMesa

  • Sr. Member
  • ****
  • Posts: 372
Re: Roll-your-own lens profiles
« Reply #2 on: March 14, 2018, 12:08:28 pm »
You could do that by saving the modifications as a custom preset?
Well, yes and no.

That would work to set the adjustments for images from those lenses, but you would then have an issue as to whether or not to make it an import prefix. If you did that it would adjust all of the images that were imported, which is probably not what the OP wants, or you would have to manually set the prefix for only selected images.

An alternative would be to use exiftool to set the image tags that the OP wants the images to show up as, and then PL would treat the images as those specified by the exif data. That of course, would require getting exiftool and using it. The tool is free, but there is a bit of a learning curve.

I have a similar problem with an off-brand 7.5mm fisheye lens that I want to use for panoramas and I addressed it by using exiftool and making the lens look like a supported lens of about the same focal length. That effectively de-fished the images and they now show up as "more or less" rectilinear images, but with a very wide FOV.

For what it is worth, I would also like to find out if it is possible to add your own lens profiles.

Rex Block

  • Jr. Member
  • **
  • Posts: 40
Re: Roll-your-own lens profiles
« Reply #3 on: March 18, 2018, 09:36:01 pm »
This is exactly what I want to do. Exactly, as in right on the nose.

I have learned exiftool forwards and backwards, and have done some research in which tags (might) need to be set to make this happen.

The workflow would then be to set the lens ID in exiftool, open the raw image, and have DxO correct the image based on the mocked-up lens profile. This would avoid having a preset that has other adjustments in it. I could then apply other presets (B&W, Polarised Postcard, etc) as needed.

I have been attempting to reverse engineer the lens correction process, but with no success so far.

MikeFromMesa

  • Sr. Member
  • ****
  • Posts: 372
Re: Roll-your-own lens profiles
« Reply #4 on: March 19, 2018, 03:53:31 pm »
This is exactly what I want to do. Exactly, as in right on the nose.
I do not know if you are referring to my post or that of @kdochert when you say that the solution is exactly what you want. Perhaps you can clarify?

I have learned exiftool forwards and backwards, and have done some research in which tags (might) need to be set to make this happen.

The workflow would then be to set the lens ID in exiftool, open the raw image, and have DxO correct the image based on the mocked-up lens profile. This would avoid having a preset that has other adjustments in it. I could then apply other presets (B&W, Polarised Postcard, etc) as needed.

I bought a new 3rd party fisheye lens that does not communicate with the camera, so all of the relevant exif information is missing. I did some manual corrections (using Lightroom) and found that there is little difference between the auto corrections for one of the supported 8mm fisheye and the one for the lens I bought, so I used exiftool to add the proper lens information to the images for the 3rd party lens. I can now load those images into PhotoLab and it automatically corrects them, based on the supported lens correction profiles. It has saved me a lot of trouble.

I have been attempting to reverse engineer the lens correction process, but with no success so far.

I do not know any way to do that and, if the exiftool solution works for you, it seems like a good solution.

Rex Block

  • Jr. Member
  • **
  • Posts: 40
Re: Roll-your-own lens profiles
« Reply #5 on: March 21, 2018, 02:54:27 am »
This is exactly what I want to do. Exactly, as in right on the nose.
I do not know if you are referring to my post or that of @kdochert when you say that the solution is exactly what you want. Perhaps you can clarify?

Hi Mike, sorry, yes, rather ambiguous there ... I meant in connection with your post, that is exactly what I am working to do -- mock up a lens profile and have DxO select it based it on the EXIF.

I think maybe your approach of finding *another* lens, having your work appear as if the images were taken with that lens, and then letting DxO handle the rest, might be the way to go. I just have to remember that when I add the images to my foto DB.

Thanks for the reply.

MikeFromMesa

  • Sr. Member
  • ****
  • Posts: 372
Re: Roll-your-own lens profiles
« Reply #6 on: March 21, 2018, 01:51:32 pm »
I think maybe your approach of finding *another* lens, having your work appear as if the images were taken with that lens, and then letting DxO handle the rest, might be the way to go. I just have to remember that when I add the images to my foto DB.
This business of replacing the exif information works perfectly, and PhotoLab now automatically treats my Samyang 7.5mm fisheye lens images as an Olympus 8mm fisheye lens, but there is one thing to be careful about.

The LensID value, which I believe is perhaps the main value that most photo editors key on to determine what lens is in use, is not a "free form" string that you can just make up. That is, the text that exifTool prints out for that exif value is a translated value. ExifTool picks up a coded value from the exif data, finds the correct translation for that from its translation table, and then prints that translation out as the value. When updating that value it does the reverse - that is, it picks up the text value you use in the exifTool command and translates it back to the actual coded value. If the text you are using does not match an existing value exactly the update command for LensID will fail.

What I had to do to get this to work was get an actual Olympus 8mm fisheye image, run exifTool on it to get the correct text for that value and then use it in the exif command. That worked, but all of my guessing did not. And, in fact, I do not know if there is an existing entry for the Samyang 7.5mm lens (or for the same lens sold under the Rokinon and 7Artisans labels), so to do this you will probably have to find a lens close enough to what you want, find the LensID text and use it. The "up" side of all of this is that, once this is done, it all works perfectly.

Hope this is of some help.

Pieloe

  • Sr. Member
  • ****
  • Posts: 395
Re: Roll-your-own lens profiles
« Reply #7 on: March 22, 2018, 09:22:29 am »
at MikeFromMesa

Could you give us  the exact text from this  fisheye Samyang 7.5mm for Olympus ?
Thanks a lot

MikeFromMesa

  • Sr. Member
  • ****
  • Posts: 372
Re: Roll-your-own lens profiles
« Reply #8 on: March 22, 2018, 07:39:30 pm »
There are no supported Samyang or Rokinon (or 7Artists) lenses for the Olympus cameras in the list of Dxo's supported lenses and so you would have to use an existing lens profile. The closest one I know is that for the Olympus 8mm fisheye and you can get the information for that from any existing Olympus 8mm image, which is how I got them. You can find images to download here and the exif information is inside them:

https://www.focus-numerique.com/focale-fixe/tests/olympus-m-zuiko-digital-ed-8-mm-f-1-8-pro-1480.html#p05

One other thing you might want to keep in mind is that you might also want to update other tags in the image file. I update all of the following tags when I use exiftool:

LensInfo
LensModel
FocalLength
MaxAperture
MaxApertureAtMinFocal
MaxApertureAtMaxFocal
MaxApertureValue
LensType
MinFocalLength
MaxFocalLength
FNumber
LensProperties

Hope this helps.
« Last Edit: March 23, 2018, 12:57:48 pm by MikeFromMesa »

 

photography
photography