Decoding Sony's ARW (2.3.1) embedded CA lens corrections - help needed

Started by Gerein, May 14, 2015, 06:43:20 AM

Previous topic - Next topic

Gerein

Hi,

I've been working on a customised DNG-converter and in the process am trying to decode the lens-correction data that Sony embeds in their ARWs (v2.3.1 from an A7/ILCE-7 in this case) - specifically CA correction in this case.

I've identified the right tags in Sony's RAW file and what Adobe's DNG converter makes of it but I'm struggling to identify the transfer function, i.e., decode the meaning of each byte. Looking for help in figuring this out - have documented all my findings at https://variousphotography.wordpress.com/2015/05/13/crowd-sourcing-sonys-arw-2-3-1-embedded-lens-ca-corrections/. If anybody has some time and interest to look into this, I would highly appreciate any help.

I don't think this is trivial and probably needs some advanced math skills. Or maybe it is trivial and I'm just missing the obvious, also very possible. :-)

Thanks!

Gerein

Follow-up: I have investigated this as far as I needed for my purpose. For those interested, I have summarised my findings on https://variousphotography.wordpress.com/2015/05/17/summary-sonys-arw-v2-3-1-embedded-lens-correction-data/ (and previous post).

More importantly for this forum, I have identified the 4 tags (currently tagged 'unknown') storing the embedded distortion and chromatic aberration correction information in Sony's ARW (v2.3.1). This is tested with a Sony A7 (ILCE-7).

  • Distortion correction: SR2SubIFD tag 0x7982 and mirrored in Exif SubIFD tag 0x7037. 17 signed integers (16 bit), first one is always 16 (denoting the number of numbers to follow), the remaining ones describe one radial transformation function.
  • CA correction: SR2SubIFD tag 0x7980 and mirrored in Exif SubIFD tag 0x7035. 33 signed integers (16 bit), first one is always 32, followed by 2 times 16 numbers (always multiples of 128), describing 2 radial transformation functions (for colour planes red and blue, denoting their shift vs green).
Would be great if this information could make its way into Exiftool in some way. Happy to help if I can (however, I don't speak Perl...).

Phil Harvey

Excellent!  Thanks!!  I'll take a look at your write-up as soon as I get a chance, and post back if I have any questions.

- 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 ($).