Many thanks for your feedback!

I was hoping for a straight forward implementation in lensfun using the
distortion model "acm".
However, the compiled lensfun version 0.3.95 (from git) doesn't seem to be
working with darktable ("Bad attribute value `model=acm' for element
<distortion>!").

Unfortunatelly I'm a noob when it come to tranformation calculation (to
distortion models which are supported in lensfun 0.3.2).
I've the feeling to be at a dead end for now...

Gunar


Am So., 21. Nov. 2021 um 23:46 Uhr schrieb Graeme Leese <[email protected]>:

> Not sure if it helps, but the parameters for the 3 planes are so similar
>> so that I simply would take the mean values of each parameter and go with
>> it.
>>
>
> I agree that this is definitely the place to start.
>
> The vendor of the lens also had to fit the model to the lens - the
>> deviations in each of the 3 planes are compatible with typical small
>> fitting errors. Parameters are equal to the 3rd or 4th significant digit
>> which is very precise.
>>
>
> You may well be right, but remember that the full width of the image is
> 1.0, while a chromatic aberration is typically on the order of 1-2px, so I
> would expect to find very similar values here. For example, the first
> random lens that I've looked up in the lensfun db has tca parameters around
> 10^-4.
>
> Thanks,
> Graeme
>
>
>
>> On 21 Nov 2021, at 19:18, Graeme Leese <[email protected]> wrote:
>>
>> 
>> Hi,
>>
>> I know basically nothing about DNG, but Googling suggests that yes, the
>> planes are probably referring the different color channels. There's a tag
>> CFAPlaneColor that sets which order the colors map to the planes or else
>> they're RGB.
>>
>> Chromatic aberration is essentially when the different colours are
>> distorted differently, so my first guess is that you should calculate the
>> distortion from the average of the planes. Then the difference between the
>> planes should be encoded in the TCA parameters. Alternatively, since the
>> TCA parameters are given for R and B, perhaps it would work better to take
>> the distortion only from the G plane, I'm not sure.
>>
>> I haven't tried to work out how the TCA parameters would be derived. If
>> the method looks like it's working then I can probably have a look and see
>> if the calculation is simple enough, or else it should be simple enough to
>> write a script to find the values that match the warp from the dng file.
>>
>> I don't think lensfun encodes the optical centre from the warp (so it
>> would have to be set to 0.5, 0.5). I'm not sure how much that would affect
>> the accuracy of the data. It's also worth noting that the DNG file uses
>> different coordinates for pixels (0,0 in the corner) than lensfun (0,0 in
>> the centre).
>>
>> Hope that helps. I'm interested to know how you get on with converting
>> the information.
>>
>> Thanks,
>> Graeme
>>
>>
>>
>> On Wed, 17 Nov 2021, 13:05 Gunar Kachel, <[email protected]> wrote:
>>
>>> Hi, my lens is not yet supported by lensfun. I therefore searched for a
>>> method to to get the right distortion and chromatic aberration profile to
>>> be used in daktable. (And I was not very successful applying the "manual"
>>> method using Hugin.)
>>>
>>> However, as this is a modern lens the profiles are already integrated in
>>> the RAW file and I therefore followed this procedure:
>>>
>>>    1. convert the RAW file (NEF) to DNG using Adobe DNG Converter
>>>    2. extract OpCoodeList3 parameters from DNG file using
>>>    dng-validate.exe (at the bottom)
>>>
>>>
>>> I assume I can implement these values using the lensfun distortion
>>> profile model "acm".
>>> However I'm puzzled that values are provided in several "planes".
>>> Are the planes referring to different color channels?
>>> How to implement the planes in lensfun?
>>> How can I cover chromatic aberration using these information?
>>>
>>> Thanks in advance for the insight!
>>>
>>> Sample output from dng-validate.exe -v:
>>> >>>>>>>>>>>>>>>>
>>> Opcode: WarpRectilinear, minVersion = 1.3.0.0, flags = 0
>>> Planes: 3
>>> Optical center:
>>> h = 0.501405
>>> v = 0.504913
>>> Plane 0:
>>> Radial params: 1.025498, -0.124349, 0.058447, -0.003755
>>> Tangential params: 0.000000, 0.000000
>>> Plane 1:
>>> Radial params: 1.025181, -0.124368, 0.058438, -0.003759
>>> Tangential params: 0.000000, 0.000000
>>> Plane 2:
>>> Radial params: 1.025277, -0.124355, 0.058413, -0.003751
>>> Tangential params: 0.000000, 0.000000
>>> <<<<<<<<<<<<<<<<<
>>> _______________________________________________
>>> Lensfun-users mailing list
>>> [email protected]
>>> https://lists.sourceforge.net/lists/listinfo/lensfun-users
>>>
>> _______________________________________________
>> Lensfun-users mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/lensfun-users
>>
>>
_______________________________________________
Lensfun-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/lensfun-users

Reply via email to