Perspective correction and cropping, DT 2.4.4 windows


(Olaf Berthelsen) #1

I’m new to Darktable, and in the process of testing it out I have noticed the following problem:

When I use the excellent module “perspective correction” and choose “automatic fit , horizontal and vertical” with “automatic cropping off” the dimension of the viewing panel sometimes becomes the new “original image format” (if the image needs a lot of adjustment). In the “crop and rotate” module you are then not able to crop the image to the original aspect ratio unless you know what this is and the aspect ratio can be found in the drop down list.

In the “perspective correction” module you can choose to crop to “original format” and this works ok but the crop can’t be changed in any way (reduced in size and moved) and you are then stuck with a crop you don’t want.


(Pascal Obry) #2

Yes, that’s why I never crop with the perspective correction. I always crop on the “crop & rotate” module.


(Olaf Berthelsen) #3

But isn’t it a bug that the perspective correction module changes the aspect ratio of the image if it is not cropped?
In my view the output of the module should always be an image in the original aspect ratio. Part of the image would then be “black” that is without any information from the original image. This image can then easily be cropped in the crop and rotate module maintaining or changing the aspect ratio. This is how RawTherapee works.


(Pascal Obry) #4

That’s not a bug! I see no bug. You have three options:

  1. no crop - aspect ratio is kept but you have some black borders (unavoidable)
  2. crop with image aspect ration - obviously you get the image aspect ratio
  3. crop with larger border - obviously you don’t keep aspect ratio

So you want to always have the image aspect ratio, choose option 1 or 2.


(Olaf Berthelsen) #5

I observe the following:

Original jpg image: 3264x2448, aspect ratio: 1.33
Exported from DT without persp. correction: 3264x2448, aspect ratio: 1.33
Exported form DT after persp. correction, automatic cropping off: 3778x2620, aspect ratio: 1.44

What causes this change in aspect ratio?


(Pascal Obry) #6

Exported form DT after persp. correction, automatic cropping off: 3778x2620, aspect ratio: 1.44
What causes this change in aspect ratio?

Well perspective correction :slight_smile: ? I’m not sure what you expect. If you do perspective correction you are changing the aspect of the image! Take a picture, activate perspective correction, in the vertical correction force -1 for example. The image will look flat, almost 16:9. There is no way around that. And RawTherappee cannot do otherwise or some black area are added at the top of the picture.


(Olaf Berthelsen) #7

Thank you for a fast response, but I think there is a misunderstanding somewhere.

When automatic cropping is off I expected an output from the perspective module in the original aspect ratio of 1.33 but with some black areas added just like you described in your previous response option 1.

Put in other words how can I enable the first option you describe: “no crop - aspect ratio is kept but you have some black borders (unavoidable)”?


(Pascal Obry) #8

Oups! I didn’t meant that, wrote to quick. This is not possible. As said above, when perspective correction is done the aspect ratio cannot be kept. Sorry for the confusion.


(Olaf Berthelsen) #9

Oh I see, it works as intended. Actually the manual doesn’t say what happens when cropping is off.

RT and Photoshop Elements keeps the aspect ratio. So I was convinced without giving it much thought that this would the case in DT as well (it’s just a matter of adding black areas where needed).

Thank you very much for clarifying this question.


(Pascal Obry) #10

And I have just implemented a way to move the crop (when aspect ratio is constraint) to the desired location making recomposing easy and without requiring to use crop&rotate.


(Olaf Berthelsen) #11

Thank you very much. I’m impressed!

How can I download a windows version of this? (I also have to figure out how to keep my presets etc., but I suppose this is described in the manual).


(Pascal Obry) #12

You can’t download a version. You need to wait for the 2.6 release end of year or built it yourself from sources.


(Olaf Berthelsen) #13

Ok, thank you. I will wait for the 2.6 release………:o)!