PFTrack Documentation Node Reference  

Z-Depth Merge

Usage  |  Controls

UI

The Z-Depth Merge node can be used to merge together depth maps from up-stream in order to improve temporal consistency between frames.

As z-depth is merged, it is written to disk in a floating-point file format. Typically, for a 2048x1556 image, these files occupy about 13Mb of disk space for each frame.

Usage

When calculating z-depth values independently for each frame, it is sometimes the case that the resulting depth maps are not entirely consistent with each other. This can happen when there are many possible depth values that will satisfy the constraints that are used by the solver to estimate depth at each pixel. In situations such as these, the Merge tool can be used to combine several independent depth maps together to generate a result that is more consistent from frame-to-frame.

Using Masks

Masks can be used to exclude areas of the image from depth map merging, or to indicate boundaries between independent objects. Each mask that is connected to the node will appear in the Masks list, where its behaviour can be controlled. The ordering of individual masks is important, because it specifies the relative depth ordering of the objects defined by each mask. Masks at the top of the mask list define objects that are farther away from the camera than masks at the bottom of the list.

When a mask is set to Exclude, pixels covered by the mask will be excluded from depth map merging. When a mask is set to Boundary, pixels covered by the mask are assumed to belong to an object which will only be merged with pixels from the same object in other frames.

Controls

Camera

Near plane: The distance of the near plane from the camera. Depth estimates will be generated between the near and far planes, so this value should be set appropriately before solving for any depth maps.

Far plane: The distance of the far plane from the camera. Depth estimates will be generated between the near and far planes, so this value should be set appropriately before solving for any depth maps.

Masks

Name: The name of each active mask.

Colour: The mask overlay colour for each active mask. Double click in this column of the selected mask to change its overlay colour.

State: The behaviour of the mask. When set to Exclude, no depth estimate will be produced for pixels covered by the mask. When set to Boundary, no merging will be performed between different masks. Right-click in this column to change the behaviour of each mask to either Exclude or Boundary.

Move Closer: Move the selected mask closer towards the camera. Note that the ordering of masks is important only if they overlap.

Move Away: Move the selected mask away from the camera. Note that the ordering of masks is important only if they overlap.

Merge

Channels: The image channels to use when merging depth values.

Frame range: The processing range for z-depth merging. Options are Clip, to merge depth map for all frame in the clip; From/To to merge depth maps for a specific range of frames; and Current to merge depth maps for the current frame only.

From: Set the From frame to the current frame when the Frame range is set to From/To. The frame number can also be adjusted in the edit box.

To: Set the To frame to the current frame when the Frame range is set to From/To. The frame number can also be adjusted in the edit box.

Image Consistency %: The consideration is given to the similarity of image pixel colours in adjacent frames when merging depth maps. A large value means pixels colours must be very similar before depth values can be merged.

Depth Outlier %: The difference in depth values from other frames must be before they are considered as outliers and not included when merging into the current frame.

Frame Window: The number of depth maps on either side of each frame that will be merged when generating a new depth map. The default value is 5, meaning 5 previous frames and 5 later frames will be merged together.

Clear: Clear the depth map from the current frame and delete the data file from disk.

Clear All: Clear depth maps from all frames and delete the data files from disk.

Merge: Merge depth maps together using the parameters described above. This operation can be run in the background by holding the Shift key when clicking on the button.

Display

Display mode: The method to display depth maps in Viewer windows. The options are Triangle mesh, which will render a triangular mesh containing every pixel in the image, and Point Cloud which will render a point for every pixel in the image.

Viewer proxy: The resolution used to display triangular meshes and point clouds in Viewer windows. For high resolution images, selecting Half, Third or Quarter will increase rendering performance.

Grey-scale gamma: he amount of gamma correction that is used to display a grey-scale depth map in the Cinema window.

Depth cut %: The difference in depth values (as a percentage of the distance between the near and far camera planes) at which triangular mesh edges will be cut when displaying the depth map in Viewer windows. Note that this option is for display purposes only and does not affect the depth map being passed down-stream from the node.

Transparency: The amount of transparency that is used to display a grey-scale depth map in the Cinema window.

Show ground: When enabled, the ground-plane will be displayed.

Show horizon: When enabled, the horizon line will be displayed.

Show depth map: When enabled, a grey-scale depth map will be displayed in the Cinema window if one is available for the current frame.

Show depth mesh: When enabled, a triangular mesh or point cloud will be displayed in both the Cinema and Viewer windows. If no depth map is available for the current frame, the depth map for the nearest available frame will be displayed.

Default Keyboard Shortcuts

Keyboard shortcuts can be customised in the Preferences.

Clear

Ctrl+L

Clear All

Shift+L

Merge

Shift+G

Show Ground

Ctrl+G

Show Horizon

Ctrl+H

Show Depth Map

Ctrl+D

Show Depth Mesh

Ctrl+P