Skip to main content
danielafort
Inspiring
November 24, 2016
Answered

Locate a matching lens profile automatically

  • November 24, 2016
  • 1 reply
  • 7617 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 9, 2016

I now understand that the lens profiles that come with ACR are in:

/Library/Application Support/Adobe/CameraRaw/LensProfiles/1.0/

While the "custom" LensProfiles, like the ones from Adobe Lens Profile Downloader, are placed in:

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

Comparing the Zeiss ZF.2 profiles that are working fine against the Samyang ones that are not being automatically detected I see lots of differences. It seems very strange to me that a chipped lens like the ZF.2 series that are made to be used on Nikon bodies work fine in this application with Canon bodies. Looks like I'm going to have to do some more research on how ACR works with metadata. Is there some documentation that you can recommend?

Of course in an ideal world all lenses should be automatically detected as long as there is enough information in the EXIF metadata no matter if they are manual or auto or if a lens from one manufacturer is mounted on another manufacturer's body.

The Magic Lantern feature to add lens metadata is working quite nicely with the Zeiss ZF.2 manual lenses. Note that it is a common practice among professional cinematographers and stop motion animation to use manual lenses on DSLR cameras. In fact on the link I just pointed to it says:

Using a Manual Aperture Lens to Avoid Flicker

Note that we strongly recommend using a manual aperture lens (such as a Nikon lens) with a Canon body. With a digital lens, the aperture will close down to slightly different positions for each shot. This is not a problem for still photography, but for stop motion or time-lapse it creates "flicker".

In fact time-lapse photographers often untwist their automatic lenses breaking the lens/body communication to prevent flicker. Of course this also prevents the lens metadata from being recorded so our Magic Lantern application would come in handy in those situations as well.

I have more questions like is it even going to work applying a lens profile to a raw video frame that is a different size from the camera's native raw still image resolution? And if you need separate profiles for full frame and crop sensor (APS-C) bodies? In any case, it seems to me that the key to getting ACR to locate a matching lens profile automatically is not possible in all cases without modifying the lens profiles that shipped with ACR.


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.