LiveMode

This flag controls whether PatchMatch stereo matching operates in a stateless, frame-independent mode or in a stateful, temporally coherent mode suitable for live stereo streams.

When LiveMode is enabled, PatchMatch maintains internal state between successive invocations of the ComputeDisparityMap command and may reuse information from a previously computed disparity map to initialize the next computation.

Behavior

LiveMode = false

PatchMatch operates in a stateless mode. Each call to ComputeDisparityMap is independent:

  • Initial disparities are fully randomized.

  • PatchMatch performs the configured number of Iterations.

  • No information is preserved between calls.

LiveMode = true

PatchMatch operates in a stateful mode intended for temporally coherent image sequences (e.g., video or live stereo streams).

  • The first call to ComputeDisparityMap, or any call following a parameter change, performs full randomization and executes the configured number of iterations.

  • Subsequent calls with identical parameters:

    • Reuse a portion of the previously computed disparity map as initialization.

    • Perform one fewer PatchMatch iteration than configured, but at least one.

This mode reduces per-frame computation by exploiting temporal coherence between consecutive frames.

State Invalidation

Any change in the parameters of the PatchMatch2 tree node invalidates the internal PatchMatch state. In this case, the next call falls back to full randomization and the configured number of iterations, even if LiveMode remains enabled.

Format

Boolean

Enables stateful, temporally coherent PatchMatch operation.

Default

true