Some lens profile methods provides a way to correct distortion and CA in
a single step.
When available, applying distortion and CA correction when both enabled
in a single pass is more precise (see lensfun
ApplySubpixelGeometryDistortion doc) since it's usually how the profile
is done. Instead applying the CA correction in a step after distortion
correction could lead to a bit different (also if not always visible)
correction.
This is also required for future lens correction methods (like DNG
WarpRectilinear or corrections based on vendor metadata) that provides
only merged distortion and CA correction in a single pass.
Doing profile based CA as the really first correction in a separate steps is
probably not useful.
Additionally many lens profile (lensfun) and future one provide
functions to do them in a single step with better precision while other
just provide a single step that does both (i.e. DNG WarpRectilinear).
For the above reasons this patch removes the additional pass for CA correction.
This will also improve the perfomance due to less work.
Don't update the camera-based perspective focal length and crop factor
parameters when making other adjustments using the file browser or batch
editor.
Closes#6402
Scaling is applied at the end of all geometric transformations, so it
would be more appropriate outside of the perspective correction tool.
Such an implementation would also work better with the auto-fit feature.
If the focal length and/or crop factor for the camera-based perspective
correction tool are not edited, they will be set using the focal length
information found in the image metadata. This only applies to the editor
(batch editor and CLI still default to 24 for the focal length and 1 for
the crop factor).
Resolve minor conflict in ImProcFunctions::transformGeneral and add new
arguments for use of ImProcFunctions::needsTransform in
PerspectiveCorrection::autocompute.
This rotation is different from the Rotate tool and the post-correction
adjustment rotation because it is applied between camera shift and
camera angle. It is equivalent to correcting the camera's roll and is
the same as the rotation calculated by automatic perspective correction.
Lensfun/LCP distortion correction was applied before automatic scaling
and perspective correction in the inverse transformation. This means it
was applied after scaling and perspective in the pipeline. It should
actually come first.