Perspective tool changes aspect ratio in darktable

A few weeks ago, I opened a request at the redmine site about some stretching problems that occut when we use the perspective tool of darktable. However, it seems this request didn’t draw much attention.

Briefly, if I shoot a square object from a point that is higher than the normal from the plane, then after perspective correction the object in question appears flattened.
See this page for the shots I took, before and after perspective correction
https://redmine.darktable.org/issues/12694

Comments welcome!

This has come up before, there is a discussion here:

The answer appears to be to select Lens Model = Specific in the perspective module:

1 Like

To Paulmiller, thanks for pointing the possibility of changing the aspect ratio when selecting the specific lens model. I hadn’t seen this. However, for my part I prefer to use the manual perspective correction from the ‘Crop and rotate’ module - and in that module, the aspect ratio correction slider is not available.

Another thing, this aspect ratio correction is fully manual. It is relatively easy to do it if the original object is square, then one can slide the cursor until the result apprears square. But if the original is a rectangle, then it becomes very difficult to properly adjust the aspect ratio (unless one knows the exact dimensions of the original object).

I would think the correct aspect ratio correction could be fairly easily computed. From what I can see it would be a formula of the type:
(aspect ratio correction) = cos (vertical angle shift) / cos (horizontal angle shift)
These 2 angles are not necessarily known by the photographer, but they surely are computed within the perspective correction algorith.
For example, if shoot a view with a 20 degrees vertical shift and a 5 degrees horizontal shift, then adjusting the slider to 0.94 would give the appropriate correction in aspect ratio.
It would be nice if this value was given by default - the user would then still have the opportunity to make a fine adjustment.

And finally, I think it would make sense that the 2 ways of making the perspective correction would be combined in the same module, where the user would have the option of manual (with 4 handles that are dragged to 4 corners of a rectangular object) or automatic (where line segments are automatically generated) procedure. In my view, it would also make sense that these are combined in the ‘crop and rotate’ module, as most of the time, perspective correction is done simultaneously with cropping of the image.

Best way to get this is filing an issue (feature request) at https://github.com/darktable-org/darktable/issues/new/choose

1 Like

May I ask: is there a difference between this github site and the redmine site?
I already filed a request on the redmine site: https://redmine.darktable.org/issues/12694
Isn’t this sufficient?