PFTrack Documentation Node Reference  

Keystone Fix

Usage  |  Controls


The Keystone Fix node can be used to reduce the amount of vertical disparity present in a stereo image pair.

Vertical disparity occurs when a scene is shot using converging stereo cameras and can cause visual discomfort when the stereo pair is viewed.

The image below shows a red/blue anaglyph stereo pair before and after correction. Vertical disparities can be clearly seen in the left-hand image, especially around the black door hinges and distant trees. The image on the right shows the stereo pair after these disparities have been removed from both the left and right-eyes.

Stereo images before and after keystone fix


The Keystone Fix node uses disparity vectors generated by the Disparity Solver node to correct each frame, and therefore must be placed down-stream from a Disparity Solver node as shown in the following image.

A tracking tree with Disparity Solver and Keystone Fix nodes

One or more keyframes must be created before vertical disparity can be removed.

At each keyframe, a disparity field is read from the upstream Disparity Solver node and used to build a warping grid to remove the vertical disparity component.

When multiple keyframes are set, the warping transformation used to correct the current frame will be interpolated from nearby keyframes. This can be used to remove vertical disparities from a clip where the stereo rig is not in a fixed configuration for the entire clip.

As well as correcting the original image data to remove vertical disparity, the disparity field itself (and also the depth map for the current frame, if available) will be corrected.



Warp mode: Specifies the type of transformation that will be used to remove vertical disparity offsets from the image. The default value is Perspective will is generally sufficient for most situations. Affine may produce better results if the disparity field contains many errors, and Free may be used when the disparity field does not contain enough information to reliably estimate either the perspective or affine warp.

Grid spacing: The distance (measured in pixels) between each vertex in the warping grid. The default value is 32 pixels. Increasing this value may produce better results if there
are large regions of the image where disparity has not been estimated accurately.

Smoothing %: The amount of smoothing that is applied to the disparity field at each grid vertex when estimating the amount of vertical disparity to remove. The default value is 50%.

Set: Set a keyframe at the current frame. If a keyframe exists at the current frame, the button changes to Unset Keyframe to remove that keyframe.

Clear Keyframes: Remove all keyframes from the clip.

Edit ROI: Allow the region of interest to be adjusted for each clip. Note that this should be done before applying the keystone correction. This is useful if only part of the image region contains useful disparity vectors and will restrict the area in which disparity vectors are used to estimate the warp.

Apply correction: When this option is enabled, vertical disparities will be corrected for each frame. This option can be toggled on/off to quickly assess the effectiveness of the keystone correction, or to help set the ROI for each clip.


Current Clip: Which of the left or right-eye of the stereo pair is displayed in the Cinema.

Render Mode: The type of image that is generated when rendering into the Cinema window. The default option Output will produce a warped version of either the left or right-eye image. Grey Anaglyph and Colour Anaglyph will produce either a grey-scale or colour red/blue anaglyph which can be useful to easily see alignment (or mis-alignment) issues that must be corrected.

Disparity mode: Type of overlay that is used to display the disparity map for the current frame. Options are None, Vectors, Colours and Grey-scale.

Vector density: This edit box controls the density of arrows that are displayed when the disparity mode is set to Vectors.

Disparity scale: The scale of disparity values for display in the Cinema window. Note that this does not affect the actual disparity map, only how it is displayed.

Transparency: The amount of transparency used to overlay the disparity map for display.

Show occlusions: When this option is enabled, occluded pixels will be specially marked when displaying the disparity map. Pixels can be occluded if the corresponding point in the other eye is hidden from view because it is covered by a closer object in the scene or is outside the camera frustum and therefore not visible.

Show grid overlay: When this option is enabled, the warping grid used to remove vertical disparity will be displayed in the Cinema window.

Show ROI: When this option is enabled, the region of interest used to estimate the warping grid will be displayed in the Cinema window. This region can be adjusted by clicking and dragging with the left mouse button after clicking the Edit ROI button.

Default Keyboard Shortcuts

Keyboard shortcuts can be customised in the Preferences.

Set/Unset Keyframe


Show Occlusions


Show Grid


Show ROI


Apply Correction


Next Clip