Author Topic: Assign lens focal length and name for non cpu lenses  (Read 62985 times)

Ant123

  • Contributor
  • Member
  • *****
  • Posts: 117
Re: Assign lens focal length and name for non cpu lenses
« Reply #75 on: November 27, 2016, 08:24:11 PM »
You don't need to attach text files
I can't attach any file. There is no "attach" button.

Quote
it has anything to do with this topic for non cpu lenses
maybe it could be helpfull for EF lens exploring...

dfort

  • Developer
  • Hero Member
  • *****
  • Posts: 3677
Re: Assign lens focal length and name for non cpu lenses
« Reply #76 on: November 27, 2016, 08:35:15 PM »
I can't attach any file. There is no "attach" button.

You have to link to a download URL on this forum, like with videos and photos.
5D3.* 7D.206 700D.115 EOSM.203 EOSM2.103 M50.102

Ant123

  • Contributor
  • Member
  • *****
  • Posts: 117
Re: Assign lens focal length and name for non cpu lenses
« Reply #77 on: November 27, 2016, 08:43:35 PM »
You have to link to a download URL on this forum, like with videos and photos.
It's not an attachment. Why this feature is not enabled on ML forum?

dfort

  • Developer
  • Hero Member
  • *****
  • Posts: 3677
Re: Assign lens focal length and name for non cpu lenses
« Reply #78 on: November 27, 2016, 09:29:51 PM »
Probably because it would quickly fill up the server with some large files. You can ask g3gg0.

In any case, let's get back on topic. We might want to use the Lens ID code instead of the name. According to your file:

Code: [Select]
LensID           = 0x1031
LENS NAME: EF-M22mm f/2 STM (Size: 17 Byte)

exiftool -- lib/Image/ExifTool/Canon.pm
Code: [Select]
    4145 => 'Canon EF-M 22mm f/2 STM', #34

mlv_dump -v
Code: [Select]
     Name:        'EF-M22mm f/2 STM'
     Serial:      ''
     Focal Len:   22 mm
     Focus Dist:  43 mm
     Aperture:    f/12.80
     IS Mode:     0
     AF Mode:     0
     Lens ID:     0x00000031

@g3gg0
Looks like there might be a problem with the MLV Lens ID. Shouldn't it be 0x00001031 (decimal 4145)?
5D3.* 7D.206 700D.115 EOSM.203 EOSM2.103 M50.102

g3gg0

  • Developer
  • Hero Member
  • *****
  • Posts: 3143
Re: Assign lens focal length and name for non cpu lenses
« Reply #79 on: November 28, 2016, 12:00:00 AM »
Code: [Select]
a) print_msg(MSG_INFO, "     Lens ID:     0x%08X\n", lens_info.lensID);
b) hdr->lensID = lens_info.lens_id;
c) uint32_t    lensID;    /* hexadecimal lens ID (delivered by properties?) */
d) uint16_t                lens_id;
e) lens_info.lens_id = info[4] | (info[5] << 8);

hmm so then it must be the property being interpreted wrong or it doesnt have that id?
Help us with datasheets - Help us with register dumps
magic lantern: 1Magic9991E1eWbGvrsx186GovYCXFbppY, server expenses: paypal@g3gg0.de
ONLY donate for things we have done, not for things you expect!

g3gg0

  • Developer
  • Hero Member
  • *****
  • Posts: 3143
Re: Assign lens focal length and name for non cpu lenses
« Reply #80 on: November 28, 2016, 01:16:55 AM »
right, at e) seems to be the bug. trying to fix it...
Help us with datasheets - Help us with register dumps
magic lantern: 1Magic9991E1eWbGvrsx186GovYCXFbppY, server expenses: paypal@g3gg0.de
ONLY donate for things we have done, not for things you expect!

g3gg0

  • Developer
  • Hero Member
  • *****
  • Posts: 3143
Help us with datasheets - Help us with register dumps
magic lantern: 1Magic9991E1eWbGvrsx186GovYCXFbppY, server expenses: paypal@g3gg0.de
ONLY donate for things we have done, not for things you expect!

dfort

  • Developer
  • Hero Member
  • *****
  • Posts: 3677
Re: Assign lens focal length and name for non cpu lenses
« Reply #82 on: November 28, 2016, 06:54:12 PM »
Lens ID works on EOSM and 700D with that PR. Still no Serial number though.

Code: [Select]
     Name:        'EF-M22mm f/2 STM'
     Serial:      ''
     Lens ID:     0x00001031

Nice additions to the Lens Info/Prefs menu.



Thanks!
5D3.* 7D.206 700D.115 EOSM.203 EOSM2.103 M50.102

g3gg0

  • Developer
  • Hero Member
  • *****
  • Posts: 3143
Re: Assign lens focal length and name for non cpu lenses
« Reply #83 on: November 28, 2016, 07:51:26 PM »
guess that S/N thingy i found on 600D was some false alarm.

do you know the S/N of your lens? maybe you could dump the PROP_LENS content to check if the S/N is in there.
maybe at offset 0x16/17/18 is some information?
Help us with datasheets - Help us with register dumps
magic lantern: 1Magic9991E1eWbGvrsx186GovYCXFbppY, server expenses: paypal@g3gg0.de
ONLY donate for things we have done, not for things you expect!

dfort

  • Developer
  • Hero Member
  • *****
  • Posts: 3677
Re: Assign lens focal length and name for non cpu lenses
« Reply #84 on: November 28, 2016, 08:17:49 PM »
I know the serial number of my lens but not sure how to dump the PROP_LENS content.
5D3.* 7D.206 700D.115 EOSM.203 EOSM2.103 M50.102

g3gg0

  • Developer
  • Hero Member
  • *****
  • Posts: 3143
Re: Assign lens focal length and name for non cpu lenses
« Reply #85 on: November 28, 2016, 09:32:29 PM »
Code: [Select]
@@ -1104,5 +1114,15 @@
     #endif
     
+    FILE * f = NULL;
+
+    f = FIO_CreateFile("LENS.BIN");
+    if (f)
+    {
+        bmp_printf(FONT_LARGE, 0, 60, "Writing LENS");
+        FIO_WriteFile(f, (void*) info, 0x1E);
+        FIO_CloseFile(f);
+    }
+   
     if (lens_info.raw_aperture < lens_info.raw_aperture_min || lens_info.raw_aperture > lens_info.raw_aperture_max)
     {
         int raw = COERCE(lens_info.raw_aperture, lens_info.raw_aperture_min, lens_info.raw_aperture_max);
Help us with datasheets - Help us with register dumps
magic lantern: 1Magic9991E1eWbGvrsx186GovYCXFbppY, server expenses: paypal@g3gg0.de
ONLY donate for things we have done, not for things you expect!

g3gg0

  • Developer
  • Hero Member
  • *****
  • Posts: 3143
Re: Assign lens focal length and name for non cpu lenses
« Reply #86 on: November 28, 2016, 09:44:58 PM »
oh eh, add this to lens.c in function

PROP_HANDLER(PROP_LENS)
Help us with datasheets - Help us with register dumps
magic lantern: 1Magic9991E1eWbGvrsx186GovYCXFbppY, server expenses: paypal@g3gg0.de
ONLY donate for things we have done, not for things you expect!

dfort

  • Developer
  • Hero Member
  • *****
  • Posts: 3677
Re: Assign lens focal length and name for non cpu lenses
« Reply #87 on: November 28, 2016, 10:51:23 PM »
Ok--this is the entire contents of LENS.BIN viewed through a hex editor it looks like this:

Code: [Select]
01185010 31001600 1680439A 7C00FF00 00000000 00004118 33010800 3D19
The serial number of the lens is:

Code: [Select]
950202019971
In hex that would be:

Code: [Select]
DD3C743083

If that the serial number is saved as ASCII it should look like this:

Code: [Select]
39 35 30 32 30 32 30 31 39 39 37 31 0a
5D3.* 7D.206 700D.115 EOSM.203 EOSM2.103 M50.102

g3gg0

  • Developer
  • Hero Member
  • *****
  • Posts: 3143
Re: Assign lens focal length and name for non cpu lenses
« Reply #88 on: November 28, 2016, 11:20:38 PM »
thanks, so no serial in the property. makes sense as it would be really long
Help us with datasheets - Help us with register dumps
magic lantern: 1Magic9991E1eWbGvrsx186GovYCXFbppY, server expenses: paypal@g3gg0.de
ONLY donate for things we have done, not for things you expect!

dfort

  • Developer
  • Hero Member
  • *****
  • Posts: 3677
Re: Assign lens focal length and name for non cpu lenses
« Reply #89 on: December 05, 2016, 06:40:43 AM »
@dmilligan

Is your manual_lens_info branch at a point where we can start trying out some scripts? Seems like lens.name is working which is the one that is needed for the ACR automatic lens distortion correction to work. Are you planning on adding lens.focal_length and have you decided what to do with lens.aperture or camera.aperture? It would be great to have these available to lua along with the Lens ID and serial number but we should be able to get something functional with just lens.name.


5D3.* 7D.206 700D.115 EOSM.203 EOSM2.103 M50.102

dmilligan

  • Developer
  • Hero Member
  • *****
  • Posts: 3217
  • 60Da / 1100D / EOSM
Re: Assign lens focal length and name for non cpu lenses
« Reply #90 on: December 05, 2016, 07:55:15 PM »
Yes, you can try it. All three properties should be working. I implemented aperture override as lens.manual_aperture. In lens.lua, simply add your lens definitions like the ones already there, and you can add a "manual_aperture" field to the lens definition (the existing examples just have name and focal_length).

dfort

  • Developer
  • Hero Member
  • *****
  • Posts: 3677
Re: Assign lens focal length and name for non cpu lenses
« Reply #91 on: December 06, 2016, 05:42:58 AM »
@Lars_Steenhoff -- here's something for you to test:

https://bitbucket.org/daniel_fort/magic-lantern/downloads/magiclantern-manual_lens_info.2016Dec05.5D3113.zip

This part should be familiar to you by now.


When you start up with a non-chipped lens attached or if you remove a chipped lens while the camera is on you'll get this lens selector:


These are your Zeiss ZF.2 manual lenses. Pick the one you have mounted and the metadata will be embedded in your MLV files.

Code: [Select]
Block: LENS
  Offset: 0x0000014c
    Size: 96
    Time: 0.003000 ms
     Name:        'Zeiss Planar T* 1.4/85 ZF.2'
     Serial:      ''
     Focal Len:   85 mm
     Focus Dist:  0 mm
     Aperture:    f/2.00
     IS Mode:     0
     AF Mode:     3
     Lens ID:     0x00000000
     Flags:       0x00000000

@dmilligan -- note that the Aperture isn't showing up. This is what I did in your lua script:
[EDIT] My bad, seems like I was looking at a file before adding the manual_exposure field.

Code: [Select]
lenses =
{
--  Zeiss ZF.2 manual lenses
--    { name = "Zeiss Distagon T* 2.8/15 ZF.2", focal_length = 15, manual_aperture = 2.8 },
--    { name = "Zeiss Distagon T* 3.5/18 ZF.2", focal_length = 18, manual_aperture = 3.5 },
--    { name = "Zeiss Distagon T* 2.8/21 ZF.2", focal_length = 21, manual_aperture = 2.8 },
--    { name = "Zeiss Distagon T* 2.8/25 ZF.2", focal_length = 25, manual_aperture = 2.8 },
    { name = "Zeiss Distagon T* 2/25 ZF.2", focal_length = 25, manual_aperture = 2 },
--    { name = "Zeiss Distagon T* 2/28 ZF.2", focal_length = 28, manual_aperture = 2 },
    { name = "Zeiss Distagon T* 2/35 ZF.2", focal_length = 35, manual_aperture = 2 },
--    { name = "Zeiss Distagon T* 1.4/35 ZF.2", focal_length = 35, manual_aperture = 1.4 },
    { name = "Zeiss Makro-Planar T* 2/50 ZF.2", focal_length = 50, manual_aperture = 2 },
--    { name = "Zeiss Planar T* 1.4/50 ZF.2", focal_length = 50, manual_aperture = 1.4 },
    { name = "Zeiss Planar T* 1.4/85 ZF.2", focal_length = 85, manual_aperture = 1.4 },
--    { name = "Zeiss Makro-Planar T* 2/100 ZF.2", focal_length = 100, manual_aperture = 2 },
--    { name = "Zeiss Apo Sonnar T* 2/135 ZF.2", focal_length = 135, manual_aperture = 2 },
}

These are all the Zeiss ZF.2 lenses. The ones that aren't in Lars Steenhoff's arsenal are commented out to reduce clutter. I'm planning on adding the Samyang (Rokinon, Bower) Cine lenses to the list because they are also popular manual lenses. Other lenses can be added by the user but as we learned, not all lenses are automatically recognized by Adobe Camera Raw. Fortunately the Zeiss ZF.2 lenses are:



When you switch manual lenses or if you want to check and see which lens is currently selected in the camera go to the wrench icon and pick Lens Info Prefs. You can bring up the lens selector by selecting the lens name.



Some things on my wish list are:
  • Have the manual_aperture show up in the MLV file. Already done
  • Give more room to the lens name field in Lens Info Prefs because many of the lens names overlap the "Manual Lens" field.
  • Save the last lens used in a configuration file and make that the default the next time the camera is started or lens changed. It looks like that is already in the works.
  • Make the lens selector a scrolling display. Maybe that is already done and I just haven't added enough lenses to the list? That was done too.
  • Add the lens ID and serial number to the fields available to lua. (May need g3gg0's help with the lens serial number.)
5D3.* 7D.206 700D.115 EOSM.203 EOSM2.103 M50.102

Lars Steenhoff

  • Senior
  • ****
  • Posts: 451
Re: Assign lens focal length and name for non cpu lenses
« Reply #92 on: December 06, 2016, 10:36:27 PM »
Cool stuff @dfort!

Im preparing for a trip, this will come in handy.

And when we get lens ID working i have some hope that nikon lenses will be reconised by id.

Danne

  • Contributor
  • Hero Member
  • *****
  • Posts: 5332
Re: Assign lens focal length and name for non cpu lenses
« Reply #93 on: December 06, 2016, 11:19:07 PM »
So cool!

dfort

  • Developer
  • Hero Member
  • *****
  • Posts: 3677
Re: Assign lens focal length and name for non cpu lenses
« Reply #94 on: December 07, 2016, 02:21:01 AM »
Yeah, cool if you are using Zeiss ZF.2 lenses.

It is looking pretty solid. I had to go back and edit some of those issues I pointed out earlier because manual aperture and the scrolling display are working.

I just tried it with some Samyang lens profiles and it isn't working in Adobe Camera Raw. I also went back to that Nikon AF NIKKOR 35mm f/2D lens to see if I could get that working but it still doesn't work with ACR, at least not automatically like it should.

Code: [Select]
Block: LENS
  Offset: 0x0000014c
    Size: 96
    Time: 0.003000 ms
     Name:        'Nikon AF NIKKOR 35mm f/2D'
     Serial:      ''
     Focal Len:   35 mm
     Focus Dist:  0 mm
     Aperture:    f/2.00
     IS Mode:     0
     AF Mode:     3
     Lens ID:     0x00000000
     Flags:       0x00000000

I got an answer from the Adobe forum but the answer came back with an example for a completely different lens and I don't have a deep enough understanding of ACR to decipher what it means.

https://forums.adobe.com/message/9158301
Quote
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
5D3.* 7D.206 700D.115 EOSM.203 EOSM2.103 M50.102

dfort

  • Developer
  • Hero Member
  • *****
  • Posts: 3677
Re: Assign lens focal length and name for non cpu lenses
« Reply #95 on: December 07, 2016, 04:47:53 AM »
Here's an idea for the lua script. Added some of the more popular manual lenses. Only problem right now is that the Zeiss lenses are being automatically detected in Adobe Camera Raw but the Samyang lenses and most other lenses I tried, are not. Let's see if someone at the Adobe forum comes up with a solution for this.

Code: [Select]
lenses =
{
--  The following is for testing purposes. Comment out the following lines then either uncomment the lenses
--  from the list or add your own lenses.

    { name = "My Lens", focal_length = 50 },
    { name = "My Other Lens", focal_length = 25 },

--  Zeiss ZF.2 manual lenses Nikon mount
--  { name = "Zeiss Distagon T* 2.8/15 ZF.2",        focal_length =  15, manual_aperture = 2.8 },
--  { name = "Zeiss Distagon T* 3.5/18 ZF.2",        focal_length =  18, manual_aperture = 3.5 },
--  { name = "Zeiss Distagon T* 2.8/21 ZF.2",        focal_length =  21, manual_aperture = 2.8 },
--  { name = "Zeiss Distagon T* 2.8/25 ZF.2",        focal_length =  25, manual_aperture = 2.8 },
--  { name = "Zeiss Distagon T* 2/25 ZF.2",          focal_length =  25, manual_aperture = 2   },
--  { name = "Zeiss Distagon T* 2/28 ZF.2",          focal_length =  28, manual_aperture = 2   },
--  { name = "Zeiss Distagon T* 2/35 ZF.2",          focal_length =  35, manual_aperture = 2   },
--  { name = "Zeiss Distagon T* 1.4/35 ZF.2",        focal_length =  35, manual_aperture = 1.4 },
--  { name = "Zeiss Makro-Planar T* 2/50 ZF.2",      focal_length =  50, manual_aperture = 2   },
--  { name = "Zeiss Planar T* 1.4/50 ZF.2",          focal_length =  50, manual_aperture = 1.4 },
--  { name = "Zeiss Planar T* 1.4/85 ZF.2",          focal_length =  85, manual_aperture = 1.4 },
--  { name = "Zeiss Makro-Planar T* 2/100 ZF.2",     focal_length = 100, manual_aperture = 2   },
--  { name = "Zeiss Apo Sonnar T* 2/135 ZF.2",       focal_length = 135, manual_aperture = 2   },

--  Samyang manual lenses - also branded as Rokinon and Bower. Cine versions use the same lens profile.
--  { name = "Samyang 8mm f/2.8 UMC Fisheye",        focal_length =   8, manual_aperture = 2.8 },
--  { name = "Samyang 8mm f/2.8 UMC Fisheye II",     focal_length =   8, manual_aperture = 2.8 }, --   8mm T3.1 Cine
--  { name = "Samyang 8mm f/3.5 UMC Fish-Eye CS",    focal_length =   8, manual_aperture = 3.5 },
--  { name = "Samyang 8mm f/3.5 UMC Fish-Eye CS II", focal_length =   8, manual_aperture = 3.5 }, --   8mm T3.8 Cine
--  { name = "Samyang 10mm f/2.8 ED AS NCS CS",      focal_length =  10, manual_aperture = 2.8 }, --  10mm T3.1 Cine
--  { name = "Samyang 12mm f/2 NCS CS",              focal_length =  12, manual_aperture = 2   }, --  12mm T2.2 Cine
--  { name = "Samyang 12mm f/2.8 ED AS NCS Fisheye", focal_length =  12, manual_aperture = 2.8 }, --  12mm T3.1 Cine
--  { name = "Samyang 14mm f/2.8 ED AS IF UMC",      focal_length =  14, manual_aperture = 2.8 }, --  14mm T3.1 Cine
--  { name = "Samyang 16mm f/2 ED AS UMC CS",        focal_length =  16, manual_aperture = 2   }, --  16mm T2.2 Cine
--  { name = "Samyang 21mm f/1.4 ED AS UMC CS",      focal_length =  21, manual_aperture = 1.4 }, --  21mm T1.5 Cine
--  { name = "Samyang 24mm f/1.4 ED AS IF UMC",      focal_length =  24, manual_aperture = 1.4 }, --  24mm T1.5 Cine
--  { name = "Samyang 35mm f/1.4 AS IF UMC",         focal_length =  35, manual_aperture = 1.4 }, --  35mm T1.5 Cine
--  { name = "Samyang 50mm f/1.2 AS UMC CS",         focal_length =  50, manual_aperture = 1.2 },
--  { name = "Samyang 50mm f/1.4 AS UMC",            focal_length =  50, manual_aperture = 1.4 }, --  50mm T1.5 Cine
--  { name = "Samyang 85mm f/1.4 AS IF UMC",         focal_length =  85, manual_aperture = 1.4 }, --  85mm T1.5 Cine
--  { name = "Samyang 100mm f/2.8 ED UMC MACRO",     focal_length = 100, manual_aperture = 2.8 }, -- 100mm T3.1 Cine
--  { name = "Samyang 135mm f/2 ED UMC",             focal_length = 135, manual_aperture = 2   }, -- 135mm T2.2 Cine
--  { name = "Samyang 300mm f/6.3 ED UMC CS",        focal_length = 300, manual_aperture = 6.3 },
}
5D3.* 7D.206 700D.115 EOSM.203 EOSM2.103 M50.102

dfort

  • Developer
  • Hero Member
  • *****
  • Posts: 3677
Re: Assign lens focal length and name for non cpu lenses
« Reply #96 on: December 10, 2016, 04:37:24 AM »
Been having quite a conversation on the Adobe Camera Raw forum with an Adobe staff member. I did some hacking on a profile for a lens that I own and came up with something that works. Basically, the stCamera:Lens tag in the lens profile seems to be the key.

Here's the line to add to our lua script:

Code: [Select]
{ name = "Bower 16mm T2.2 Cine", focal_length = 16, manual_aperture = 2.2 },
This lens has the same formula for a lens that has a profile in ACR, the Canon M (Bower 16mm f2 ED AS UMC CS) - RAW.lcp. Changed it to this:

Canon(Bower 16mm T2.2 Cine) - RAW.lcp
Code: [Select]
<x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="Adobe XMP Core 5.6-c011 79.156380, 2014/05/21-23:38:37        ">
 <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
  <rdf:Description rdf:about=""
    xmlns:photoshop="http://ns.adobe.com/photoshop/1.0/"
    xmlns:stCamera="http://ns.adobe.com/photoshop/1.0/camera-profile">
   <photoshop:CameraProfiles>
    <rdf:Seq>
     <rdf:li>
      <rdf:Description
       stCamera:Author="Adobe (www.adobe.com)"
       stCamera:Make="Canon"
       stCamera:CameraRawProfile="True"
       stCamera:CameraPrettyName="Canon"
       stCamera:Lens="Bower 16mm T2.2 Cine"
       stCamera:LensPrettyName="Bower 16mm T2.2 Cine"
       stCamera:ProfileName="Adobe (Bower 16mm f/2 ED AS UMC CS, Canon)"
       stCamera:SensorFormatFactor="1.6"
       stCamera:ImageWidth="4770"
       stCamera:ImageLength="3177"
       stCamera:FocusDistance="1.200143">
      <stCamera:PerspectiveModel
       stCamera:Version="2"
       stCamera:FocalLengthX="0.69907"
       stCamera:FocalLengthY="0.69907"
       stCamera:ImageXCenter="0.508043"
       stCamera:ImageYCenter="0.513054"
       stCamera:ResidualMeanError="0.00024"
       stCamera:ResidualStandardDeviation="0.000368"
       stCamera:RadialDistortParam1="-0.088214"
       stCamera:RadialDistortParam2="0.073774"
       stCamera:RadialDistortParam3="-0.030652"/>
      </rdf:Description>
     </rdf:li>
     <rdf:li>
      <rdf:Description
       stCamera:Author="Adobe (www.adobe.com)"
       stCamera:Make="Canon"
       stCamera:CameraRawProfile="True"
       stCamera:CameraPrettyName="Canon"
       stCamera:Lens="Bower 16mm T2.2 Cine"
       stCamera:LensPrettyName="Bower 16mm T2.2 Cine"
       stCamera:ProfileName="Adobe (Bower 16mm f/2 ED AS UMC CS, Canon)"
       stCamera:SensorFormatFactor="1.6"
       stCamera:ImageWidth="4770"
       stCamera:ImageLength="3177"
       stCamera:FocusDistance="3"
       stCamera:ApertureValue="6">
      <stCamera:PerspectiveModel>
       <rdf:Description
        stCamera:Version="2"
        stCamera:FocalLengthX="0.69907"
        stCamera:FocalLengthY="0.69907"
        stCamera:ImageXCenter="0.508043"
        stCamera:ImageYCenter="0.513054"
        stCamera:RadialDistortParam1="-0.088214"
        stCamera:RadialDistortParam2="0.073774"
        stCamera:RadialDistortParam3="-0.030652">
       <stCamera:VignetteModel
        stCamera:FocalLengthX="0.69907"
        stCamera:FocalLengthY="0.69907"
        stCamera:VignetteModelParam1="-0.302536"
        stCamera:VignetteModelParam2="0.05392"
        stCamera:VignetteModelParam3="-0.051277"/>
       </rdf:Description>
      </stCamera:PerspectiveModel>
      </rdf:Description>
     </rdf:li>
    </rdf:Seq>
   </photoshop:CameraProfiles>
  </rdf:Description>
 </rdf:RDF>
</x:xmpmeta>

It works!



I kept the same profile name so I know where it came from.

Ok, so I believe that there's a problem at Adobe's end because these lenses should be automatically recognized but the good news is that it is rather simple to modify an existing lens profile to work.
5D3.* 7D.206 700D.115 EOSM.203 EOSM2.103 M50.102

DeafEyeJedi

  • Hero Member
  • *****
  • Posts: 3171
  • 5D3 / M1 / 7D / 70D / SL1 / M2
Re: Assign lens focal length and name for non cpu lenses
« Reply #97 on: December 10, 2016, 05:14:46 AM »
That's one great hack @dfort!
5D3.113 • 5D3.123 • EOSM.203 • 7D.203 • 70D.112 • 100D.101 • EOSM2.*

dfort

  • Developer
  • Hero Member
  • *****
  • Posts: 3677
Re: Assign lens focal length and name for non cpu lenses
« Reply #98 on: December 14, 2016, 03:50:52 AM »
@Lars_Steenhoff

Had a breakthrough today. To get your Nikon AF NIKKOR 35mm f2D lens working with the lua script simply copy the profile from the ACR installation. I'm not sure what the Windows location is but on the Mac it is in:

Code: [Select]
/Library/Application Support/Adobe/CameraRaw/LensProfiles/1.0/Nikon/NIKON D3X (Nikon AF NIKKOR 35mm f2D) - RAW.lcp
and put the copy in your user area, again on the Mac it is in:

Code: [Select]
/Users/<you>/Library/Application Support/Adobe/CameraRaw/LensProfiles/1.0/
Then edit the stCamera:Lens from this:

Code: [Select]
<stCamera:Lens>35.0 mm f/2.0</stCamera:Lens>
To this:

Code: [Select]
<stCamera:Lens>Nikon AF NIKKOR 35mm f2D</stCamera:Lens>
Do a copy/replace because there are multiple instances of that tag.

Finally put that lens name in your lua script and that's it.

For more details, here's my latest post on the Adobe Camera Raw forum:

https://forums.adobe.com/message/9200782#9200782
5D3.* 7D.206 700D.115 EOSM.203 EOSM2.103 M50.102

Lars Steenhoff

  • Senior
  • ****
  • Posts: 451
Re: Assign lens focal length and name for non cpu lenses
« Reply #99 on: December 14, 2016, 08:36:34 AM »
thats very nice to see @dfort  :)

so a few extra steps but once its setup it all automatic.
I read about your idea of submitting custom profiles to the adobe database, is this still something worth doing ?