Main Menu

XMP-xmpDSA

Started by herb, November 29, 2023, 07:20:10 AM

Previous topic - Next topic

herb

Hello,

Accidentally I found an image that contains xmpDSA tags.
For me this is a very new xmp-subgroup.

In the internet I found that this is written by some Leica cameras as digital-shift-assistant.

Some more information was found in a Leica forum and in an Adobe forum:
https://www.l-camera-forum.com/topic/317425-m10-new-firmware-finally/page/5/#comments and
https://community.adobe.com/t5/lightroom-classic-ideas/p-perspective-correction-from-camera-metadata-not-supported-for-leica-q3/idc-p/14207456?profile.language=de

In one of the forums I also found some links to download sample files.

Please take this only as an information.

Best regards
herb


StarGeek

It's pretty easy to add XMP tags via config file so if someone does request the ability to write these tags, then it can be added that way.
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).

Phil Harvey

Interesting, thanks.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

blue-j


Phil Harvey

The URI is "http://leica-camera.com/digital-shift-assistant/1.0/"

So I think DSA = Digital Shift Assistant

(whatever that is)

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

StarGeek

Quote from: Phil Harvey on January 07, 2024, 07:48:57 AMSo I think DSA = Digital Shift Assistant

(whatever that is)

It looks like it's the Leica's perspective control feature.

I found some sample DNGs here

I only checked one image but in the raw xmp, I saw this
   xmpDSA:Version="1.0.0"
   xmpDSA:CorrectionAlreadyApplied="False"
   xmpDSA:PitchAngle="-17.8999996185"
   xmpDSA:RollAngle="2.5000000000"
   xmpDSA:FocalLength35mm="29.0000000000"
   xmpDSA:TargetAspectRatio="1.5025252104"
   xmpDSA:ScalingFactorHeight="0.8967812061"
   xmpDSA:ValidCropCorners="True"
   xmpDSA:ApplyAutomatically="False"
<... further down in the XMP>
   <xmpDSA:NormalizedCropCorners>
    <rdf:Seq>
     <rdf:li>0.0000000000</rdf:li>
     <rdf:li>0.1823699325</rdf:li>
     <rdf:li>0.9796728492</rdf:li>
     <rdf:li>0.1181017533</rdf:li>
     <rdf:li>0.9056890011</rdf:li>
     <rdf:li>0.9405853152</rdf:li>
     <rdf:li>0.1214114651</rdf:li>
     <rdf:li>0.9920352101</rdf:li>
    </rdf:Seq>
   </xmpDSA:NormalizedCropCorners>

It looks like
XMP-xmpDSA:Versionstring
XMP-xmpDSA:CorrectionAlreadyAppliedboolean
XMP-xmpDSA:PitchAnglereal
XMP-xmpDSA:RollAnglereal
XMP-xmpDSA:FocalLength35mmreal
XMP-xmpDSA:TargetAspectRatioreal
XMP-xmpDSA:ScalingFactorHeightreal
XMP-xmpDSA:ValidCropCornersboolean
XMP-xmpDSA:ApplyAutomaticallyboolean
XMP-xmpDSA:NormalizedCropCornerslist of 8(?) real

It would be easy enough to create a config if there is need for it.  As I said, I only checked one file, so there might be more tags.
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).

Phil Harvey

I have a bunch of samples, and I think that is a complete set.

I'll add write support for these in ExifTool 12.73

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

blue-j

Wonderful!  Great sleuthing!  FWIW...

panasonic_leica9_0x0370  appears to be "LCC Profile Name"?

makernotes   leica   panasonic_leica9_0x0370   LCC PROFILE NAME

blue-j

XMP-xmpDSA:NormalizedCropCorners    list of 8(?) real

i suspect pairs of x, y Cartesian coordinates, normalized to 0-1.  Looks like bottom left, upper right at first glance, but would need to confirm to feel confident.  - J

Phil Harvey

Quote from: blue-j on January 08, 2024, 01:19:13 PMpanasonic_leica9_0x0370  appears to be "LCC Profile Name"?

Any idea what that is referring to?  It has this value for the Leica M11, but the string is empty for the M10, and this tag doesn't appear for other models.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

StarGeek

Quote from: blue-j on January 08, 2024, 01:26:10 PMXMP-xmpDSA:NormalizedCropCorners    list of 8(?) real

i suspect pairs of x, y Cartesian coordinates, normalized to 0-1.  Looks like bottom left, upper right at first glance, but would need to confirm to feel confident.

Yes, that is what I think it is as well.  I just put the question mark in as I only looked at one file and didn't have any further confirmation.
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).

blue-j

In Capture One, an "LCC" is a Lens Cast Calibration (screenshot attached):
https://support.captureone.com/hc/en-us/articles/360002583678-The-LCC-tool

Such things are called "Lens profiles" in the "Lens Corrections" panel in Adobe Lightroom (attached). They are sometimes called "Lens correction profiles" in Adobe documents, too.

They are remarkably similar.  But when I search for "LCC profile" on Leica.com, "Lens profile" is what comes up - and note that the documents that are in the found set do NOT contain the term "LCC profile" at all! (See attached)

So....  I would call it "Lens Profile Name" personally.  In reading some of the fora convos, people fling that term around a lot to indicate both the LR and C1 species.  I would advise the smoking gun of C1's use, but we are trying to match the Leica nomenclature, and they only use "Lens Profile."

- J

blue-j

Addendum - I suspect the field will only be populated if you use a lens profile in developing the image; otherwise blank or - as it was in my case - the internal field title itself.  - J

Phil Harvey

OK, great!  Thanks.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

blue-j

Belay the crop corners slam dunk.  I'll tell you what I did - perhaps I made an error...

For the sample L1000026.JPG provided by Carl in his OneDrive link in his post on C2PA (sorry too big to attach and I don't want to edit it and spoil the sample):

xmp   xmp-xmpdsa   normalizedcropcorners   [0,0.313807547,0.9784078001,0.2132926136,0.883537352,0.9092313647,0.1572398394,0.9838462471]

It is 9504 x 6320.

I denormalize by multiplying the values by the width for x, and by the height for y.

First sign of danger - they are all floats - I expected a perfect round trip.  So I round to the nearest integer:
x   y
0   1983
9298   1348
8397   5746
1494   6218

These are no bueno when it comes to crop coordinates.  Untenable as far as I can tell  I see this field as well:

xmp   xmp-xmpdsa   scalingfactorheight   0.8932150602

But i do not think it brings redemption to these values.

Did I mess up?  I'm very curious about this now.

- J