Procedural Compositing with Batch > Batch: Node Reference > Lens Distort Node >
Performing a Perspective Rectification

You can rectify an image based on its perspective. You set four-corner source anchor points to features in the image that are distorted by the lens perspective, and map these points to a rectangle or a free-form four-corner destination shape. For example, you can correct a distorted wall by anchoring the points to the wall corners and automatically rectify it to be a rectangle.

NoteAlthough you can also perform a perspective distortion, best results usually occur when performing a perspective rectification.

To perform a perspective rectification:

1. Select Rectification from the Distortion box.
2. Enable Perspective.
3. Select a Perspective type.

   Select: | To rectify (or distort) by:
   --- | ---
   To Rectangle | Mapping the four-corner source anchor points to a rectangle (you do not have control of the destination rectangle).
   Horizontal | Preserving the horizontal edges of the original image and rectifying the vertical lines of the four-corner source shape to be vertical.
   Vertical | Preserving the vertical edges of the original image and rectifying the horizontal lines of the four-corner source shape to be horizontal.
   Free Form | Mapping the four-corner source anchor points to a free-form four-corner destination shape.

4. Set the Range type.

   Select: | To set the X and Y range to:
   --- | ---
   Relative XY | -0.5 to 0.5.
   Absolute XY | Half of the image size.

5. Set the X and Y values for your perspective type. You can also drag the anchor points directly in the image to set the various X and Y values.

   Use the To and From colour pots to change the colours of the anchor points and guide lines, if needed.

   TipYou may find it easier to use two viewports in the image window for this procedure (press Alt+2). Use Front view (F1) while working with any source shape (yellow anchor points and guidelines), and use Result view (F4) while working with a Free Form destination shape (pink anchor points and guidelines).