Menu

#78 Handle two vignetting sets per lens.

wont-fix
None
2019-04-20
2017-04-08
No

There are several articles on the web describing how some cameras, for instance, the Sony E and FE mount models (Alpha 7 series, Alpha 5000/6000 series)
do bake vignetting ("shading") compensation into the ARW when enabled on the camera,
they always bake TCA (lateral chromatic aberration) correction into the ARW (but not the JPG),
* they never bake distortion correction into the ARW.

I have not yet obtained reasonable test shots for the TCA assessments, but I can confirm the assessment of vignetting and distortion correction.

All features are exposed through Sony-specific maker notes in the EXIF though, through these tags (taken from a filtered dump of exiftool -s -VignettingCorrection -x -LateralChromaticAberration -DistortionCorrectionSetting:

0x2011 VignettingCorrection            : Off
0x2012 LateralChromaticAberration      : Auto
0x2013 DistortionCorrectionSetting     : Auto

This means:
Vignetting compensation (shading compensation in Sony's terms) needs to be revisited in (a) the database, (b) the code.

Regarding (a) the database, I will need to recalculate and resubmit data for four Sony lenses that I have submitted and that currently only compensate for the difference between the camera's limited pre-compensation and full compensation (meaning they are undercorrecting in practice) because the test shots were made with compensation enabled, which runs counter to the instructions.

For two more lenses I will also need to obtain data for the limited delta compensation between the in-camera pre-corrected data and the full correction because I will otherwise see over-compensation when applying camera + lensfun, and under-correction when only applying camera compensation.

Regarding (b) the code, we will need to provide two data sets,
1. one that we have, to be applied when the 0x2011 VignettingCorrection is "off";
2. one that we need to build up (I have data for four lenses) to be applied when the 0x2011 EXIF tag VignettingCorrection is "on" (2 numerically).

How can we extend the database and API so that this alternative set gets accessible to applications such as darktable?

Discussion

  • Kelvie

    Kelvie - 2017-04-08

    The value of "2" is not "on", but rather "Auto", and doesn't necessarily mean that the correction is applied, I believe. We have to look at other tags to determine this; for example, with adapted lenses (no electronics), it will just report the camera's setting, even though no corrections are applied.

     
  • Kelvie

    Kelvie - 2017-04-08

    And perhaps a more general approach of adding other conditions (other than aperture / FD / FL) to all corrections in general might be a good idea, rather than just doing it for vignetting and this EXIF tag, e.g. different bodies might do compensation differently, and perhaps even different camera/lens firmwares!

    It will grow the database a lot, though...

     
  • Torsten Bronger

    Torsten Bronger - 2017-04-13

    Assuring that all vignetting data in the DB bases on images with vignetting correction off is certainly difficult. But there are many things people can do wrong when calibrating, so this is only one thing more.

    I am open to a discussion about this issue, but currently I'd like to have only real RAW data in the database, and leave gaps where we cannot get it. The Lensfun DB makes one exception already: For compact cameras that can only produce JPEG (at least, with original firmware), we calibrate that.

    As for part (b), I consider this being in the responsibility of the caller but not in Lensfun's.

     

    Last edit: Torsten Bronger 2017-04-13
  • Torsten Bronger

    Torsten Bronger - 2017-04-13
    • assigned_to: Torsten Bronger
     
  • Torsten Bronger

    Torsten Bronger - 2019-04-20

    I leave it as it is: Lensfun’s corrections always apply to the rawest possible image data to get from a certain camera.

     
  • Torsten Bronger

    Torsten Bronger - 2019-04-20
    • status: open --> wont-fix