C_GlobalWarp

C_GlobalWarp rapidly produces a preview stitch using metadata, passed downstream from a C_CameraSolver, to help minimize ghosting in overlap regions. It includes controls to adjust a stitch to line up key features and allows you to add constraints to reduce warping on known straight lines in the rectilinear input images. The correction is based on camera tracks, which in turn drive a grid warp operation applied to each input image.

Inputs and Controls

Connection Type

Connection Name

Function

Input

source

The image sequence to which global warp is applied.

Note:  C_GlobalWarp requires metadata from a C_CameraSolver node upstream.

Control (UI)

Knob (Scripting)

Default Value

Function

C_GlobalWarp Tab

Local GPU

gpuName

N/A

Displays the GPU used for rendering when Use GPU if available is enabled. Local GPU displays Not available when:

Use CPU is selected as the GPU device in the Preferences.

no suitable GPU was found on your system.

it was not possible to create a context for processing on the selected GPU, such as when there is not enough free memory available on the GPU.

You can select a different GPU device, if available, by navigating to the Preferences and selecting an alternative from the GPU Device dropdown.

Note:  Selecting a different GPU requires you to restart Nuke before the change takes effect.

Use GPU if available

useGPUIfAvailable

enabled

When enabled, rendering occurs on the Local GPU specified, if available, rather than the CPU.

Note:  Enabling this option with no local GPU allows the script to run on the GPU whenever the script is opened on a machine that does have a GPU available.
You should also select this if you wish to render from the command line with the --gpu option.

See Nuke 15 Release Notes for more information on the GPUs Nuke supports.

Keying

Analysis Keys

Key number

0

Displays the total number of analysis keyframes added to the sequence.

Key count

0

Displays the current analysis keyframe.

N/A

N/A

Click to jump to the previous keyframe.

N/A

N/A

Click to jump to the next keyframe.

N/A

N/A

Click to add a keyframe at the current frame in the sequence.

N/A

N/A

Click to delete the keyframe at the current frame in the sequence.

Step

keyStep

500

Sets the interval between keyframes for the Key All button.

Key All

addAllAnalysisKeys

N/A

Click to add keyframes to the sequence at intervals set by the Step control.

Delete All

deleteAllAnalysisKeys

N/A

Click to delete all keyframes from the sequence.

Import

importAllKeys

N/A

Click to import existing keyframes automatically from C_CameraSolver, C_ColourMatcher, or C_Stitcher nodes in the current script.

Note:  Importing keyframes deletes any existing keyframes.

Analysis

Match

match

N/A

Click to calculate matches between input images at the keyframes specified in the Analysis Keys controls.

Match New

match

N/A

Click to update matches on keyframes that don't currently have any camera matches, such as when you add more keyframes after matching.

Match New does not recalculate existing matches.

Warp

warp

N/A

Click to use the camera matches and any user constraints you have added manually to find the optimal global warp for all cameras at the analysis keys.

Reset

reset

N/A

Click to reset all matches.

Error

error

0

Displays the root mean square (RMS) reprojection error for the triangulated matches. This is a good indicator of match quality.

Error Threshold

rmseThreshold

20

Matches with a reprojection error greater than this threshold are discarded. If you set the Error Threshold to 0, all matches are used regardless of quality.

Output

Format

outputFormat

dependent on Compositing environment Project Settings

Sets the output resolution passed down the node tree.

Typically, you would set the format globally in the Project Settings, but this control overrides the global setting.

Blend

blendType

Alpha

Switches between the default Alpha mode and the Multi-Band modes:

Multi-Band - can improve stitch results by matching low frequency color changes over the course of the blend region.

Spherical Multi-Band - can improve stitch results at the poles, looking up or down.

Note:  Multi-Band blending can be slower to process than the default Alpha mode.

Suppression

blendLevel

0.125

Controls the size of the smallest level of blending applied to views.

Lower values can help balance color and exposure between blended images, higher values are closer to the result from the default Alpha blending mode.

Note:  Size is only active when Blend is set to Multi-Band or Spherical Multi-Band.

Expand

fullBlend

enabled

When enabled, blending is expanded outside the alpha mask used to blend images together, which can help to fill in missing areas in views.

Note:  Expand is only active when Blend is set to Multi-Band or Spherical Multi-Band.

Filter

resampleTypeLink

Cubic

Sets the filtering algorithm used during warping. As a general guide line, the filters increase in quality at the cost of processing time as you move down the list. Bilinear filtering is the fastest and Lanczos the sharpest.

Cam Warp

cameraOutputMode

Default (pass through)

Sets the output mode for the individual cameras:

Default (pass through) - only the metadata stream is warped, the camera views remain unchanged.

Warp - each individual camera view, as well as the metadata, is warped in accordance with the calculated global warp.

Cam Projection

cameraViewsProjectionType

Default (pass-through)

Sets the projection mode for the cameras output by C_GlobalWarp:

Default (pass-through) - individual camera views are passed through in their native format.

Latlong - individual camera views are projected into latlong space, allowing you to make manual corrections before stitching.

Converge

convergence

10

Sets the depth at which the cameras overlap, allowing you to bring particular areas in the scene into focus.

Auto

autoConvergenceDepth

enabled

When enabled, the Converge control is set automatically by upstream metadata.

When disabled, you can use the Converge control to manually adjust what convergence depth is in focus.

Settings Tab

Display

Zoom Size/Mag.

zoomWindowSize_1

200px

Sets the size of the zoom window.

zoomMagnificationSize_1

x1

Sets the magnification in the zoom window.

Warp Parameters

Grid Size

gridSize

10,10

Sets the size of the grid used by C_GlobalWarp to apply the warp operation in each camera view.

Using larger grids can produce better warping results, but at the expense of longer computation time. Very small grids should only be used when a large number of camera matches are available.

Match Strength

trackStrength

2

Sets the strength bias for the camera matches. Increasing the strength of a match forces the warped output to converge at the camera matches.

User Match Strength

userTrackStrength

4

Sets the strength bias for manually added user matches. Increasing the strength of a match forces the warped output to converge at the camera matches.

Smoothness

spatialSmoothness

0.5

Controls how image edges are used as clues for sharp transitions in the scene. The higher the value, the smoother the warped edges.

Consistency

temporalConsistency

2

Sets how accurately keyframes map to each other over time. Increasing the value forces the warp to match between views.

Temporal Window

temporalWindow

0

Sets the number of frames either side of the keyframes used by the Consistency control match warp between view over time.

Weight Kernel

kernelType

Linear

Allows you to give different weights to each camera match during warping. The weights are a function of the camera RMS error.

None - all matches have the same influence on the image.

Linear - matches have diminishing influence as the RMS error increases.

Gaussian - similar to Linear weighting, but more forgiving with low RMS error values.

Note:  If the Error Threshold is set to zero, this control has no effect.

Vector Detail

vectorDetail

0.4

Controls the density of the calculated vectors. Higher values pick up finer disparity changes, but take longer to calculate.

Analysis

Warp

Warp

N/A

Click to apply any changes you have made in the Settings tab.

Reset

Reset

N/A

Click to reset any changes that the Warp button applied.

Line Constraints Tab

Show guide lines

 

enabled

When enabled, the guide lines for all constraints are displayed in the Viewer, spanning the full output format.

When disabled, only the constraint lines themselves are displayed.

Strength

constraintStrength

2

Sets the strength bias for the selected constraint(s). Decreasing the strength of a constraint reduces its influence on the warp.

Start

constraintStartFrame

1

Sets the start frame for the duration of the selected constraint(s).

End

constraintEndFrame

1

Sets the end frame for the duration of the selected constraint(s).

Key

Key number

0

Displays the total number of analysis keyframes added to the current constraint(s).

Key count

0

Displays the current analysis keyframe.

N/A

N/A

Click to jump to the previous keyframe.

N/A

N/A

Click to jump to the next keyframe.

N/A

N/A

Click to add a keyframe at the current frame in the sequence.

N/A

N/A

Click to delete the keyframe at the current frame in the sequence.

Lines

N/A

N/A

Constraints added to features in the Viewer are listed in the Lines table.

Selecting constraints in the table displays them in the Viewer. You can toggle the visibility of constraints using the button.

Add

addConstraint

N/A

Click to add a constraint to the Lines table. You can then select a view above the Viewer and draw the constraint.

Clicking the button above the Viewer also creates a constraint in the Lines table.

Merge

mergeConstraints

N/A

Click to merge the selected constraints into a single constraint.

Delete

deleteConstraint

N/A

Click to delete the selected constraint(s) in the Lines table.

Delete All

deleteAllConstraints

N/A

Click to delete all constraints in the Lines table.

Analysis

Add Keys

addConstraintKeys

N/A

Click to add keys for all visible constraint keyframes as analysis keys.

Match New

Match New

N/A

Click to update matches on new analysis keys, such as when you add more constraint keyframes after warping.

Match New does not recalculate existing analysis keys.

Warp

Warp

N/A

Click to use the constraints and analysis keyframes you have added manually to find the optimal global warp for all cameras at the analysis keys.

Reset

Reset

 

Click to reset current warp. Camera matches are not deleted.

Python Tab (These controls are for Python callbacks and can be used to have Python functions automatically called when various events happen in Nuke.)

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.