Page 1 of 1

RAW EXIF and distortion parameters

PostPosted: Sun Jan 24, 2016 7:47 pm
by bifer
When searching for the EXIFtool and what it shows in RAW files of the RW2 format, I found the following parameters stored in EXIF:

[PanasonicRaw, PanasonicRaw, Image] 2 - Distortion Param 02: 0.010772705078125
[PanasonicRaw, PanasonicRaw, Image] 4 - Distortion Param 04: 0.02056884765625
[PanasonicRaw, PanasonicRaw, Image] 5 - Distortion Scale: 1
[PanasonicRaw, PanasonicRaw, Image] 7.1 - Distortion Correction: On
[PanasonicRaw, PanasonicRaw, Image] 8 - Distortion Param 08: 0.12359619140625
[PanasonicRaw, PanasonicRaw, Image] 9 - Distortion Param 09: 0.00579833984375
[PanasonicRaw, PanasonicRaw, Image] 11 - Distortion Param 11: -0.02374267578125

it originates from this URL: https://github.com/alchemy-fr/exiftool/ ... onic_4.out

Does someone know how this parameters apply to the lens correction parameters of ASP2. Namely the a,b,c values for the lens correction and "maybe" also for vignetting?
Obviously these informations are stored in the RAW based on this file that contains the equitation with a,b,c values http://www.homestyler.com/resource/exif ... onicRaw.pm:

# lens distortion information (ref 3)
# (distortion correction equation: Ru = scale*(Rd + a*Rd^3 + b*Rd^5 + c*Rd^7), ref 3)
%Image::ExifTool::PanasonicRaw::DistortionInfo = (
PROCESS_PROC => \&ProcessDistortionInfo,
WRITE_PROC => \&WriteDistortionInfo,
CHECK_PROC => \&Image::ExifTool::CheckBinaryData,
# (don't make this family 0 MakerNotes because we don't want it to be a deletable group)
GROUPS => { 0 => 'PanasonicRaw', 1 => 'PanasonicRaw', 2 => 'Image'},
WRITABLE => 1,
FORMAT => 'int16s',
FIRST_ENTRY => 0,
NOTES => 'Lens distortion correction information.',
# 0,1 - checksums
2 => {
Name => 'DistortionParam02',
ValueConv => '$val / 32768',
ValueConvInv => '$val * 32768',
},
# 3 - usually 0, but seen 0x026b when value 5 is non-zero
4 => {
Name => 'DistortionParam04',
ValueConv => '$val / 32768',
ValueConvInv => '$val * 32768',
},
5 => {
Name => 'DistortionScale',
ValueConv => '1 / (1 + $val/32768)',
ValueConvInv => '(1/$val - 1) * 32768',
},
# 6 - seen 0x0000-0x027f
7.1 => {
Name => 'DistortionCorrection',
Mask => 0x0f,
# (have seen the upper 4 bits set for GF5 and GX1, giving a value of -4095 - PH)
PrintConv => { 0 => 'Off', 1 => 'On' },
},
8 => {
Name => 'DistortionParam08',
ValueConv => '$val / 32768',
ValueConvInv => '$val * 32768',
},
9 => {
Name => 'DistortionParam09',
ValueConv => '$val / 32768',
ValueConvInv => '$val * 32768',
},
# 10 - seen 0xfc,0x0101,0x01f4,0x021d,0x0256
11 => {
Name => 'DistortionParam11',
ValueConv => '$val / 32768',
ValueConvInv => '$val * 32768',
},
12 => {
Name => 'DistortionN',
Unknown => 1,
},
# 13 - seen 0x0000,0x01f9-0x02b2
# 14,15 - checksums
);


Does someone know how to convert the values from RW2 EXIF into ASP2?

Re: RAW EXIF and distortion parameters

PostPosted: Sun Jan 24, 2016 9:31 pm
by bifer
Just learned that maybe the formulas and coordination systems are different between different models. Adobe Camera Model vs. the hugin one of lensfun or maybe even a 3rd one used in the EXIF RAW's. Don't know. Still learning.

Re: RAW EXIF and distortion parameters

PostPosted: Mon Jan 07, 2019 1:34 pm
by bifer
So my issue is solved: viewtopic.php?f=94&t=62061#p364563