Skip to main content
danielafort
Inspiring
November 24, 2016
Answered

Locate a matching lens profile automatically

  • November 24, 2016
  • 1 reply
  • 7610 views

I'm working on a project where we are using Nikon lenses on Canon (5D mark III) bodies. We managed to come up with a way to put the Lens Model in the EXIF metadata of our DNG files and it works great with Zeiss ZF.2 and other manual lenses but have come up with a problem trying to get Adobe Camera Raw to locate a matching lens profile automatically for a Nikon AF NIKKOR 35mm f/2D. We noticed that Nikon cameras use a Lens ID code number but the code for this lens (66) doesn't work when the shot originated on a Canon body.

Is there a way to get ACR to recognize Nikon AF lenses automatically when attached to Canon bodies? Obviously we aren't using the autofocus features or any communications between lens and body. The lens information is being saved via Magic Lantern to an MLV file (Magic Lantern Raw Video) which is then converted into DNG frames that contains the EXIF tags for the lens information.

Any hints, tips, or even known bugs to pass along?

BTW -- we discovered that the list of supported lenses shows the "Zeiss Planar T* 1,4/85 ZF.2" which isn't recognized automatically by ACR. However, it works fine when the comma is replaced by a period "Zeiss Planar T* 1.4/85 ZF.2" in the Lens Model EXIF tag.

This topic has been closed for replies.
Correct answer ccastleb

The user profile area is in the following location.

/Users/<you> /Library/Application Support/Adobe/CameraRaw/LensProfiles/1.0/

The manual/non-chipped Samyang/Rokinon/Bower lenses are not going to auto match since there is generally no metadata written at capture time to key off. You should be able to work around this by modifying/duplicating the profiles in the user area, add some key properties like stCamera:Lens, stCamera:LensID, stCamera:LensInfo that map to metadata you are writing in post production. Just be careful if choosing a LensID that has the potential to conflict with another profile with similar properties.

As for the chipped versions, we don't have all of them covered just yet, but again, you can modify the non-chipped profiles to work around this.

Regards,

- Chris

1 reply

ccastleb
Adobe Employee
Adobe Employee
November 28, 2016

Hi Daniel,

The list of supported lenses generally matches the lens display names and not the specific EXIF value for Lens. Also, for many Zeiss SLR lenses, a generic EXIF name may be substituted inline with a specific product name. The code that handles this doesn't take into account mounting lenses meant for one camera system to another.

As far as getting the auto match to work, there are a couple of options.

1. Set a new Lens Profile Default in the Lens Corrections panel after manually locating the correct lens profile.

OR

2. Add a copy of the lens profile(s) to the user profile area and add an alternate lens ID (see below or example) for each applicable section that contains a LensID element.

.....

<rdf:Description

       stCamera:Author="Adobe (www.adobe.com)"

       stCamera:Make="Canon"

       stCamera:CameraRawProfile="True"

       stCamera:LensID="137"

       stCamera:Lens="17.0-50.0 mm"

       stCamera:LensInfo="17/1 50/1 0/0 0/0"

       stCamera:CameraPrettyName="Canon"

       stCamera:LensPrettyName="SIGMA 17-50mm F2.8 EX DC OS HSM"

       stCamera:ProfileName="Adobe (SIGMA 17-50mm F2.8 EX DC OS HSM, Canon)"

       stCamera:SensorFormatFactor="1.5"

       stCamera:FocalLength="17"

       stCamera:FocusDistance="999999995904"

       stCamera:ApertureValue="2.970854">

      <stCamera:AlternateLensIDs>

       <rdf:Seq>

        <rdf:li>240</rdf:li>

       </rdf:Seq>

      </stCamera:AlternateLensIDs>

......

Regards,

- Chris

danielafort
Inspiring
December 7, 2016

Option 1 is a bit cumbersome and works with only one lens at a time. At least the way I'm doing it there is only one Default at a time.

Option 2 - "the user profile area" is where? I can go into /Library/Application Support/Adobe/CameraRaw/LensProfiles/1.0/Nikon/NIKON D3X (Nikon AF NIKKOR 35mm f2D) - RAW.lcp and look at a profile for the lens we are interested in. I'm not clear on the alternate LensID tag am I supposed to use. It seems that this profile is specific to the Nikon DX3 and we're using Canon 5D mark iii so maybe we need a whole new lens profile?

It took me a while to get back to this because we were working with the scripts that put the lens information into the files. Another issue came up that is closely related to this with the Samyang (a.k.a. Rokinon and Bower) manual lenses. The cine lenses are popular with our users and it looks like there are several profiles that are supported. In fact I'm using an EOS-M as a test camera and there are several Samyang profiles for the M. This seems like the ideal setup for what we are doing because the lenses are not chipped. The EXIF tags for the lens has to be done in post production, yet these profiles don't auto match in ACR either even though I'm using the "right" camera and the "right" lens name in the DNG files.

ccastleb
Adobe Employee
Adobe Employee
December 12, 2016

ccastleb wrote:

In theory the profile should work with the video frame as long as it isn't cropped, though I would have to see how it works in practice with a sample frame.

It seems to work though we haven't done extensive tests.

correction.gif

I was hoping that it was just a matter of finding the right information to put into the EXIF tags in order to locate a matching lens profile automatically but it looks like we’re going to have to hack the lens profiles that shipped with ACR.

Out of curiosity I copied one of the working Zeiss profiles, NIKON CORPORATION (Zeiss Planar T 1.4-85 ZF.2).lcp, into the user area in a test folder and started hacking it. First thing I tried was simply to change:

stCamera:Lens="Zeiss Planar T* 1.4/85 ZF.2"

to

stCamera:Lens="My Lens"

The reason I started there was because we had an issue with that lens. The lens profile that is listed in the Adobe website that lists the supported lenses is listed as Zeiss Planar T* 1,4/85 ZF.2 but that didn’t work when we put that into the EXIF metadata. It turned out that stCamera:Lens has the name with a “1.4” instead of “1,4” and was the trick to getting this lens to work.

Getting back to hacking the lens profile, doing a find and replace "Zeiss Planar T* 1.4/85 ZF.2" with "My Lens" got ACR to automatically recognize "My Lens" in the EXIF tag as a "Zeiss Planar T* 1.4/85 ZF.2”.

The Samyang profiles don’t have the stCamera:Lens tag but when I added stCamera:Lens="My Lens" to that profile it also automatically recognized it.

So it looks like the problem is that the Samyang (and Rokinon/Bower) lens profiles that ship with ACR that don’t have the stCamera:Lens tag and that’s why ACR doesn’t automatically recognizes these lenses.

Not quite sure how that tag is supposed to be used because I haven’t found documentation for these lens profiles but the Nikon AF NIKKOR 35mm f2D profile has this:

<stCamera:Lens>35.0 mm f/2.0</stCamera:Lens>

Changing it to this:

<stCamera:Lens>My Lens</stCamera:Lens>

Also works but changing it to:

<stCamera:Lens>Nikon AF NIKKOR 35mm f2D</stCamera:Lens>

in the “/Library/Application Support/Adobe/CameraRaw/LensProfiles/1.0/Nikon/NIKON D3X (Nikon AF NIKKOR 35mm f2D) - RAW.lcp” file breaks ACR’s ability to automatically recognize the lens on a raw file shot with that lens on a Nikon camera. It also doesn’t work with one of our DNG files that had the EXIF Lens Model tag set to Nikon AF NIKKOR 35mm f2D. So we’re still stuck on figuring out how to get lenses like this working.


"in the “/Library/Application Support/Adobe/CameraRaw/LensProfiles/1.0/Nikon/NIKON D3X (Nikon AF NIKKOR 35mm f2D) - RAW.lcp” file breaks ACR’s ability to automatically recognize the lens on a raw file shot with that lens on a Nikon camera. It also doesn’t work with one of our DNG files that had the EXIF Lens Model tag set to Nikon AF NIKKOR 35mm f2D. So we’re still stuck on figuring out how to get lenses like this working."

Keep in mind that modifying profiles is a non-standard behavior we don't claim will work 100% of the time. The 3 main pieces of metadata used to match are the LensID, Lens, and LensInfo tags. Also, I think the modified profiles in the user location will take precedence in a match conflict situation with the profiles in the installed location. To get around this, you should be able to include the alternate Lens and LensID tags as described earlier in the modified versions of the profiles.

If you encounter any profiles for a CPU-enabled lens that do not automatically match and have not been modified (i.e. no potential conflicts) then we want to know about those separately so we can investigate/resolve legitimate bugs.