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.

danielafort
Inspiring
December 10, 2016

Without getting into implementation details, the logic for matching lens profiles uses several pieces of image metadata and lens profile (.lcp) properties together. Usually it is the LensID, Lens, LensInfo, and sometimes camera Make. The property AlternateLensIDs (described above) and a similar AlternateLensNames property can be added when you have scenarios where metadata may be different due to lenses being used on different bodies or in cases where lens firmware has been changed by the manufacturer (e.g. exif lens name modification, different lens id). Hopefully that makes sense.

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.

When we generate profiles in house, we always do so using the maximum sensor size supported by a lens. For example, a full frame lens profile is always generated from images shot on a full frame body. There is no need to redo the profile when the same lens is used on an APS-C body.


Is it ok to modify a lens profile and share it? (It is easier to ask for forgiveness than permission.)

http://www.magiclantern.fm/forum/index.php?topic=18083.msg176261#msg176261