Project

General

Profile

CropAndRotatePlugIn

Introduction

The CropAndRotatePlugIn plug-in forms part of the "basic" plug-in group and is used to crop, rotate, flip and do keystone distortion. It can also display various kinds of guides while doing so. It is generally used as part of the Darkroom process of darktable's workflow.

This page is correct for the following stable versions of darktable

Reasons for use

The CropAndRotatePlugIn plug-in is used to manipulate the perspective and crop of your photos. The keystone distortion can correct images of tall buildings to make their edges appear parallel again, like a tilt-shift lens.

What this plug-in actually does

This plug-in affects the displayed pixels of a photograph and can cut away unneeded portions. Also it can distort the pixels, potentially losing some resolution. Keystone always distorts the whole image, regardless of crop.

Parameters that can be changed

The following parameters can be changed within this plug-in and can be found in the right-hand panel of the Darkroom view:

  • flip
  • angle
  • keystone h
  • keystone v
  • aspect
  • guides display

flip

Settings are 'horizontal' and 'vertical' flip to reverse the image along the selected axis.

angle

Settings range from -180 to 180 degrees where the negative range rotates the whole image clockwise. Also the image is automatically cropped, so no empty areas are part of the result.
There is a more easy way to align edges in the image to be either horizontal or vertical. Right-click in the image area, and drag a line along an edge to be aligned. Darktable will automatically set the needed angle to make that edge either horizontal or vertical, whichever is closer.

keystone h

Settings range from -1 to 1 where -1 shrinks the left half and where 1 shrinks the right part of the image, while expanding the other half.

keystone v

Settings range from -1 to 1 where -1 shrinks the lower half and where 1 shrinks the upper part of the image, while expanding the other half.

aspect

Choose frome various kinds of aspect ratios for your image.

guides display

Various kinds of grids can be displayed as guides to help alignment.

Example usage

Example 1

The CropAndRotatePlugIn plug-in allows you to reduce perspective distortion when shooting tall buildings for example.

You can see how the CropAndRotatePlugIn plug-in makes the walls of the building parallel again. The following photo was taken with a short telephoto 90mm equivalent lens from the ground. It shows a small amount of perspective distortion.

Only a small amount of keystone is needed. I found it easiest to first rotate some edge near the middle of the image, then apply keystone. Repeat again until it is OK.

Caveats

Some plugins like the graduated neutral density filter [http://darktable.org/redmine/projects/users/wiki/GNDPlugIn?parent=Plug-ins_Wiki_Pages] still use the whole image area regardless of crop.

See also

darktable's online manual http://www.darktable.org/usermanual/ch03s04s32.html.php

Source code

darktable:source:src/iop/clipping.c

croprotate.png (8.11 KB) Anonymous, 06/02/2012 03:37 PM

aspect.png (6.06 KB) Anonymous, 06/02/2012 10:17 PM

croprotate.png (8.11 KB) Anonymous, 06/02/2012 10:17 PM

guides.png (5.55 KB) Anonymous, 06/02/2012 10:17 PM

img_0001.jpg (103 KB) Anonymous, 06/02/2012 10:17 PM

img_0002.jpg (103 KB) Anonymous, 06/02/2012 10:17 PM

params.png (12.2 KB) Anonymous, 06/02/2012 10:32 PM

img_0001.jpg (81 KB) Anonymous, 06/05/2012 07:22 PM

img_0002.jpg (84.4 KB) Anonymous, 06/05/2012 07:22 PM

params.png (11.6 KB) Anonymous, 06/05/2012 07:25 PM

Also available in: PDF HTML TXT