O_VerticalAligner

The O_VerticalAligner node lets you warp views vertically so that their corresponding features align horizontally. The Vertical Skew and Local Alignment options allow you to warp the views while keeping the horizontal position of each pixel the same so that there is no change in convergence.

Inputs and Controls

Connection Type

Connection Name

Function

Input

Source

A stereo pair of images. Global Alignment mode is on by default.

In all modes the images should be followed by an O_Solver node. If you are using the Local Alignment,or Fix Offset mode, you also need an O_DisparityGenerator node (if disparity vectors do not already exist) upstream of O_VerticalAligner.

Control (UI)

Knob (Scripting)

Default Value

Function

O_VerticalAligner Tab

Views to Use

viewPair

Dependent on Source

Sets the two views you want to align. These views will be mapped for the left and right eye.

Align

alignWhat

Both Views

Sets how to move the views to align the images:

Both Views - move both the left and right views so that they are aligned.

Left to Right - move the left view to line up with the right.

Right to Left - move the right view to line up with the left.

filter

filter

Lanczos6

Sets the filtering algorithm you want to use when remapping pixels from their original positions to new positions. This helps avoid problems with image quality, particularly in high contrast areas of the frame (where highly aliased, or jaggy, edges may appear if pixels are not filtered and retain their original values).

Impulse - remapped pixels carry their original values.

Cubic - remapped pixels receive some smoothing.

Keys - remapped pixels receive some smoothing, plus minor sharpening.

Simon - remapped pixels receive some smoothing, plus medium sharpening.

Rifman - remapped pixels receive some smoothing, plus significant sharpening.

Mitchell - remapped pixels receive some smoothing, plus blurring to hide pixelation.

Parzen - remapped pixels receive the greatest smoothing of all filters.

Notch - remapped pixels receive flat smoothing (which tends to hide Moiré patterns).

Lanczos4 - remapped pixels receive some sharpening which can be useful for scaling down.

Lanczos6 - remapped pixels receive moderate sharpening which can be useful for scaling down.

Sinc4 - remapped pixels receive sharpening which can be useful for scaling down.

Output STMap

outputSTMap

disabled

When enabled, this allows you to output an STMap along with an aligned image and disparity vectors.

Global

Preset

alignmentType

Full

Sets the type of global alignment correction to apply:

Custom - manually define the types of alignment you want to include using the checkboxes.

Transform - perform a 2D correction without any change in pixel aspect or skew.

Match Camera - perform a correction using a match move camera connected to the upstream O_Solver.

Keystone Only - correct vertical alignment without changing the parallax.

Full - applies all alignment options except Vertical skew. Each option is applied in order from top to bottom.

Camera correction

alignCamera

enabled

When enabled, correct the vertical alignment for a match-move camera connected to an upstream O_Solver. If there is no camera connected, this uses the internal camera calculated by O_Solver. The correction is refined by other the alignment options that are selected.

Focal Length

alignScale

enabled

When enabled, align feature matches by calculating a 2D scale to correct focal length differences.

Vertical shift

alignShift

enabled

When enabled, align the feature matches vertically by moving the entire image up or down. Calculate a 2D vertical shift to correct a global offset.

2D rotation

alignRotate

enabled

When enabled, align the feature matches vertically by rotating the entire image around a point. The centre of the rotation is determined by the algorithm.This helps correct in-plane camera roll.

Perspective warp

alignPerspective

enabled

When enabled, perform a four-corner warp on the images to align them on the y axis. This may move the features slightly along the x axis. Perspective warp can help correct camera tilt as well as roll.

Note:  A perspective change can alter pixel aspect ratio and introduce pixel skew.

Vertical skew

alignVerticalSkew

disabled

When enabled, align the features along the y axis using a skew. This does not move the features along the x axis. Vertical skew allows you to correct keystoning without changing horizontal disparity. This varies the vertical shift across the image without changing the horizontal position of pixels. However, this may also introduce pixel skew.

Local

Local alignment

localAlignment

disabled

When enabled, rebuild the view(s) to remove vertical disparity calculated by an upstream O_DisparityGenerator. Use this mode to create a per-pixel correction if there are any local distortions in the mirror or lens and changes in alignment with depth.

Pre-blur

disparityBlurSize

16

Sets the size of the blur applied to the disparity before performing a local alignment. To smooth out the correction across depth boundaries, increase the blur size.

Correction

localCorrection

1

Sets the amount of local correction to apply between the global transform at 0 and the full correction at 1. This would be useful, for example, if you want to tone down the local distortion that is applied.

Fix Scale

Zoom to prevent black in frame

scaleToFit

disabled

When enabled, scale the image in order to prevent pulling pixels from outside the input image. To minimise the scale, change the Align dropdown to Both Views.

Warning:  The scale has to be applied to both images, even when aligning Left to Right or Right to Left.

Calculate scale

calculateScale

N/A

Click to calculate the scale at the current frame. If the alignment options change, the scale needs to be recalculated. You can lock the scale correction to prevent any changes by selecting the Lock scale checkbox.

Lock scale

lockScale

disabled

When enabled, the Calculate scale and Scale controls are disabled to prevent unwanted changes.

Scale

scale

1

Sets the global scale that is applied to prevent black in the frame. You can set a key to interpolate the scale calculated at different frames.

Warning:  Animating the Scale control creates a dynamic zoom on the shot, which may not be the stereographer's original intent. In this case, it is recommended to use a static zoom from a single frame, to preserve the original intent of the shot.

Fix Offset

Preserve subject parallax

fixParallax

disabled

When enabled, shift the image in a way that preserves the parallax at the specified Fix Point. This requires the input to have disparity vectors. If disparity vectors do not already exists, you need to add an O_DisparityGenerator node upstream of O_VerticalAligner.

Fix Point xy

fixPoint

0,0

Sets the position of the Fix Point widget to sample the input disparity and update the applied offset to preserve parallax.

Lock offset

lockOffset

disabled

When enabled, the Fix Point and Offset controls are disabled to prevent unwanted changes.

Offset

offset

0

Sets the correction in pixels, that is applied to prevent parallax changes at the Fix Point. To interpolate the offset calculated at different frames, set a key.

Note:  Note that you can re-converge the views after you have aligned the plates to preserve depth.

Analysis

Analyse Sequence

analyse

N/A

Click to analyse the sequence to create a corner pin or an aligned camera output. Use Analyse Sequence to create the output data in all global methods except Vertical Skew (the default). Then, you can apply the data to the Create Corner Pin, Create Camera, or Create Rig controls.

Note:  You cannot use Analyse Sequence with the Local alignment checkbox selected.

Create Corner Pin

createPin

N/A

Click to create a corner pin representing the result of O_VerticalAligner after you have clicked Analyse Sequence. This works in all global methods except Vertical Skew.

Create Camera

createCamera

N/A

If you have a pre-tracked Nuke stereo camera connected to the Camera input of the O_Solver up the tree and you click Analyse Sequence, you can then click Create Camera to create a vertically aligned camera from the analysis.

This gives you a single Camera node with split controls to hold the left and right view parameters. This works in all global methods except Vertical Skew.

Create Rig

createRig

N/A

If you have a pre-tracked Nuke stereo camera connected to the Camera input of the O_Solver up the tree and you click Analyse Sequence, you can then click Create Rig to create a vertically aligned camera rig from the analysis.

This gives you two Camera nodes and a JoinViews node that combines them. This works in all global methods except Vertical Skew.

Output Tab

Four Corner Pin

Bottom Left xy

pinBL

0,0

These controls represent the 2D corner pin that can be applied to the input image to create the same result as O_VerticalAligner (in all global methods except Vertical Skew).

This allows you to do the analysis in Nuke, but take the matrix to a third-party application, such as Baselight, and align the image or camera there.

Bottom Left - the coordinates of the bottom left corner pin calculated during the analysis pass.

Bottom Right - the coordinates of the bottom right corner pin calculated during the analysis pass.

Top Right - the coordinates of the top right corner pin calculated during the analysis pass.

Top Left - the coordinates of the top left corner pin calculated during the analysis pass.

Bottom Right xy

pinBR

0,0

Top Right xy

pinTR

0,0

Top left xy

pinTL

0,0

Transform Matrix

transformMatrix

N/A

Provides the concatenated 2D transform for the vertical alignment. The matrix is filled when you click Analyse Sequence on the O_VerticalAligner tab. There is one matrix for each view in the source.

Python Tab

before render

beforeRender

none

These functions run prior to starting rendering in execute(). If they throw an exception, the render aborts.

before each frame

beforeFrameRender

none

These functions run prior to starting rendering of each individual frame. If they throw an exception, the render aborts.

after each frame

afterFrameRender

none

These functions run after each frame is finished rendering. They are not called if the render aborts. If they throw an exception, the render aborts.

after render

afterRender

none

These functions run after rendering of all frames is finished. If they throw an error, the render aborts.

render progress

renderProgress

none

These functions run during rendering to determine progress or failure.