ExifTool Forum

ExifTool => The "exiftool" Application => Topic started by: hk1020 on October 02, 2016, 06:20:03 PM

Title: Copying makernotes in Sony ARW files
Post by: hk1020 on October 02, 2016, 06:20:03 PM
I've noticed that in Sony ARW files the makernotes are repeated in the exif tags.  That is particularly important for lens correction parameters which Sony puts there.  I've got some apparently corrupted ARW which only have the maker notes in the makernote section but not in the exif section.  This causes CaptureOne to not apply lens correction.

I tried to copy the makernotes into the exif section but failed. First in a straight forward way like so:
exiftool -Exif:ChromaticAberrationCorrParams\<MakerNotes:ChromaticAberrationCorrParams DSC06530.ARW
Warning: Sorry, exif:chromaticaberrationcorrparams doesn't exist or isn't writable - DSC06530.ARW
Warning: No writable tags set from DSC06530.ARW
    0 image files updated
    1 image files unchanged


Variations on
exiftool -tagsfromfile DSC06531.ARW -makernotes DSC06530.ARW
also failed as well as experiments with the corresponding jpg as source, which also has the makernotes.

Is this supposed to work or are my ARW files borked somehow?
Title: Re: Copying makernotes in Sony ARW files
Post by: Phil Harvey on October 02, 2016, 07:32:34 PM
I don't know exactly what you mean about the makernotes duplicated in the EXIF section.  Can you show me the exiftool -v output from one of the files containing the duplicate information? (do "exiftool -v FILE.arw > out.txt", then attach "out.txt" to your post)

The reason I ask is because there is no EXIF tag for ChromaticAberrationCorrParams, and I want to see where the duplicates are.

- Phil
Title: Re: Copying makernotes in Sony ARW files
Post by: hk1020 on October 03, 2016, 03:48:05 AM
Thanks for your reply.  Attached is the requested output of an ARW directly from the camera.  I noticed the camera firmware of the raw in question was different.   Maybe Sony didn't put the lens correction data in the exif section at that point.
Title: Re: Copying makernotes in Sony ARW files
Post by: Phil Harvey on October 03, 2016, 08:16:06 AM
Ah, I see now.  This is a proprietary Sony tag written in the EXIF SubIFD.

Yes.  ExifTool can't currently write this tag.

The attached config file will allow you to do this (assuming that the image has a SubIFD):

exiftool -config write_ca.config "-exif:ChromaticAberrationCorrParams<makernotes:ChromaticAberrationCorrParams" FILE.arw

- Phil
Title: Re: Copying makernotes in Sony ARW files
Post by: hk1020 on October 03, 2016, 09:19:50 AM
Thanks a lot, highly appreciated.  I added the DistortionsCorrParams in the same way and now CaptureOne can correct my images.

But one parameter is still left, presumably for light falloff.  I find it in the dump I sent but it doesn't have a name neither in makernotes nor in exif.  How can I refer to the tag on the command line for copying it?  It has only got a number 0x7032 in exif:

   22) Exif_0x7032 = 11 0 0 192 768 1536 2432 3520 4992 6720 8768 11072 0 0 0 0 0
204) Sony_SR2SubIFD_0x797d = 11 0 0 192 768 1536 2432 3520 4992 6720 8768 11072[snip]
Title: Re: Copying makernotes in Sony ARW files
Post by: Phil Harvey on October 03, 2016, 09:43:30 AM
OK, here's a new config file that should give you everything you need.  I've also set the Count to the correct number (instead of -1 which would allow any number of values).

If you have a better name for LightFalloffParams, let me know.  VignettingParams maybe?

- Phil
Title: Re: Copying makernotes in Sony ARW files
Post by: hk1020 on October 03, 2016, 10:07:00 AM
Excellent.  You just beat me by ten minutes, I just had it figured out.  But your solution is much nicer, I was messing around with the hex numbers.

LightFalloffParams, why not.  CaptureOne calls it Light Falloff.

I am not sure on the count.  Wouldn't it be possible that different lenses have a different number of parameters?  I could test it, actually, I just did but the -v output always ends in [snip].
Title: Re: Copying makernotes in Sony ARW files
Post by: Phil Harvey on October 03, 2016, 10:51:46 AM
OK, great.

I have ARW samples from all Sony models, and the count is always the same, so I think it is safe to assume it is a constant. You can see the count with the -v2 output.

I'll add these to the next ExifTool release so you won't need the config file for new versions (ExifTool 10.29 and later).

- Phil
Title: Re: Copying makernotes in Sony ARW files
Post by: hk1020 on October 03, 2016, 11:05:55 AM
Ok.  And I think I figured out why the information is missing in some of my pictures.  They were all taken with an older camera firmware (v1.01) which didn't fully support the lens yet.  Seems like Sony added support in v1.02 but there are only summary release notes for v1.03 available on their website.  I have pictures taken with v1.02 and they do have the lens information in the exif data.  Interesting that CaptureOne (for Sony) doesn't read the makernotes directly but relies on the exif section.  Thanks again for your excellent support.
Title: Re: Copying makernotes in Sony ARW files
Post by: Phil Harvey on October 03, 2016, 11:09:14 AM
Interesting.  And odd that CaptureOne doesn't support older firmware.

- Phil