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.
C_GlobalWarp can also track constraints over time, for a faster workflow when correcting moving camera rigs. A simplified tracking interface tracks points directly from the node, while an export workflow allows you to use the full power of the C_Tracker node for more complex tasks.
See C_Tracker for more information.
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. The output between the GPU and CPU is identical on NVIDIA GPUs, but using the GPU can significantly improve processing performance. CaraVR supports AMD GPUs on late 2013 Mac Pro 6,1, mid 2015 Mac Pro 11,5, and and late 2016 MacBook Pro 13,3, running OS X 10.9.3 'Mavericks', or later. While, in some cases the bit-wise equality between GPU and CPU holds, for some operations there are limitations to the accuracy possible with this configuration. 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. GPU processing also requires certain NVIDIA and AMD drivers. For more information on the minimum requirements, please refer to the Nuke Release Notes available in Help > Release Notes. |
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 existing 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. |
Match Error |
matchError |
0 |
Displays the root mean square (RMS) reprojection error for the triangulated matches. This is a good indicator of match quality. |
Warp Threshold |
warpThreshold |
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: • Unwarped - only the metadata stream is warped, the camera views remain unchanged. • Warped - 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. |
Line Constraints Tab |
|||
Show guide lines |
showLines |
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. |
Frame Range |
constraintStartFrame |
1 |
Sets the start frame for the duration of the selected constraint(s). |
constraintEndFrame |
1 |
Sets the end frame for the duration of the selected constraint(s). |
|
|
constraintFrameRangeToCurrent |
N/A |
Click to set the selected constraint's frame range from the beginning of the input range to the current frame. |
|
constraintFrameRangeCurrent |
N/A |
Click to set the selected constraint's frame range to the current frame only. |
|
constraintFrameRangeFromCurrent |
N/A |
Click to set the selected constraint's frame range from the current from to the end of the input range. |
|
constraintFrameRangeInput |
N/A |
Click to set the selected constraint's frame range to the input frame range. |
Keys |
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 |
deleteConstraints |
N/A |
Click to delete the selected constraint(s) in the Lines table. |
Select All |
selectAllConstraints |
N/A |
Click to select all constraints in the Lines table. |
Tracking |
|||
Track |
trackConstraints |
N/A |
Click to track the selected constraints for the frame range specified in the Start and End field in the Lines table. You can change the keyframe Step, Patch Size, and track Error Threshold controls on the Settings tab. |
Export |
exportConstraints |
N/A |
Click to export the tracking information from the selected constraints to separate OneView and C_Tracker nodes for fine-tuning. |
Import |
importConstraints |
N/A |
Click to import the tracking information for the selected constraints from previously exported tracking data. |
Analysis |
|||
Add Key |
addConstraintKey |
N/A |
Click to add the current frame as a new analysis keyframe. You can then click Match New to calculate the new keyframe. |
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 |
N/A |
Click to reset current warp. Camera matches are not deleted. |
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. |
|
Warping |
|||
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. |
Tracking |
|||
Step |
trackingStep |
5 |
Sets the number of frames between tracking analysis keys. Increasing the Step value reduces the tracking time, but the track may not be as accurate. |
Patch Size |
trackingPatchSize |
14 |
Sets the size of the image patch around feature points. Increasing the patch size can improve track quality, but larger patches increase processing time. |
Error Threshold |
trackingThreshold |
0.25 |
Sets the image change threshold a constraint track can tolerate before terminating. Reducing the Error Threshold makes tracking more tolerant to image changes, producing longer tracks. |
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. |
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. |