Request for a minor (but useful) improvement

Would it be possible to make RT extract the focal length of the lens and the camera’s crop factor - automatically - when opening an image file, and insert it into the appropriate field in the Perspective module? As things stand, the focal length is imported as whatever value was set when the processing profile was saved… and that might have been with a different lens, or a different camera.

I found that it affects the result - sometimes considerably - when any of the Automatic buttons on the Perspective module are used.

TIA.

Your processing profile has the focal length and crop factor in it. To let RawTherapee set them automatically, remove those two values from the file. You can do this in RawTherapee or by directly editing the file.

For the RawTherapee way:
Open a random image and apply the processing profile. Hit the reset buttons on the focal length and crop factor. They should reset to 24 and 1 respectively. Save the edit as a processing profile. I would save a new profile and verify it before deleting the old profile.

To directly edit the file:
Open the processing profile in a text editor and you will see a perspective section that looks like this:

[Perspective]
Method=camera_based
Horizontal=0
Vertical=0
CameraCropFactor=24
CameraFocalLength=1
CameraPitch=0
CameraRoll=0
CameraShiftHorizontal=0
CameraShiftVertical=0
CameraYaw=0
ProjectionShiftHorizontal=0
ProjectionPitch=0
ProjectionRotate=0
ProjectionShiftVertical=0
ProjectionYaw=0
ControlLineValues=
ControlLineTypes=

Delete the lines with CameraCropFactor and CameraFocalLength then save the file.


Beware that this won’t work if any of the pitches or yaws under the correction or recovery section are not zero. It is by design to avoid unexpected differences in the result because the crop factor and focal length affect those four parameters.

1 Like

@Lawrence37 Many thanks for your reply.

I tried re-setting the values in RT, but that didn’t work. However, when I edited the .pp3 file, as per your suggestion, in a text editor… it did work! :+1:

That’s great - thanks again for your help.