VisionWorks Toolkit Reference

December 18, 2015 | 1.2 Release

 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Semi-Global Matching

Detailed Description

The Semi-Global Matching Primitive is used for disparity map reconstruction.

The primitive uses the following identifiers:

See also
[3]

Enumerations

enum  nvx_scanline_e {
  NVX_SCANLINE_LEFT_RIGHT = 1 << 0,
  NVX_SCANLINE_TOP_LEFT_BOTTOM_RIGHT = 1 << 1,
  NVX_SCANLINE_TOP_BOTTOM = 1 << 2,
  NVX_SCANLINE_TOP_RIGHT_BOTTOM_LEFT = 1 << 3,
  NVX_SCANLINE_RIGHT_LEFT = 1 << 4,
  NVX_SCANLINE_BOTTOM_RIGHT_TOP_LEFT = 1 << 5,
  NVX_SCANLINE_BOTTOM_TOP = 1 << 6,
  NVX_SCANLINE_BOTTOM_LEFT_TOP_RIGHT = 1 << 7,
  NVX_SCANLINE_CROSS,
  NVX_SCANLINE_ALL = 0xFF
}
 Defines scan line's directions used during cost aggregation step. More...
 

Functions

vx_node nvxSemiGlobalMatchingNode (vx_graph graph, vx_image left, vx_image right, vx_image disparity, vx_int32 minD, vx_int32 maxD, vx_int32 P1, vx_int32 P2, vx_int32 sad, vx_int32 clip, vx_int32 max_diff, vx_int32 uniqueness, vx_enum scanlines_mask)
 [Graph] evaluate disparity given 2 stereo images using the SGM algorithm. More...
 
vx_status nvxuSemiGlobalMatching (vx_context context, vx_image left, vx_image right, vx_image disparity, vx_int32 minD, vx_int32 maxD, vx_int32 P1, vx_int32 P2, vx_int32 sad, vx_int32 clip, vx_int32 max_diff, vx_int32 uniqueness, vx_enum scanlines_mask)
 [Immediate] evaluate disparity given 2 stereo images using the SGM algorithm. More...
 

Enumeration Type Documentation

Defines scan line's directions used during cost aggregation step.

Enumerator
NVX_SCANLINE_LEFT_RIGHT 

aggregate cost from left to right horizontally.

NVX_SCANLINE_TOP_LEFT_BOTTOM_RIGHT 

aggregate cost from left to right diagonally starting from the top.

NVX_SCANLINE_TOP_BOTTOM 

aggregate cost from top to bottom vertically.

NVX_SCANLINE_TOP_RIGHT_BOTTOM_LEFT 

aggregate cost from right to left diagonally starting from the top.

NVX_SCANLINE_RIGHT_LEFT 

aggregate cost from right to left horizontally.

NVX_SCANLINE_BOTTOM_RIGHT_TOP_LEFT 

aggregate cost from right to left diagonally starting from the bottom.

NVX_SCANLINE_BOTTOM_TOP 

aggregate cost from bottom to top vertically.

NVX_SCANLINE_BOTTOM_LEFT_TOP_RIGHT 

aggregate cost from left to right diagonally starting from the bottom.

NVX_SCANLINE_CROSS 

Aggregate cost from four directions forming a cross.

Recommended option for automotive use cases.

NVX_SCANLINE_ALL 

aggregate cost over all scan lines.

Definition at line 897 of file nvx.h.

Function Documentation

vx_node nvxSemiGlobalMatchingNode ( vx_graph  graph,
vx_image  left,
vx_image  right,
vx_image  disparity,
vx_int32  minD,
vx_int32  maxD,
vx_int32  P1,
vx_int32  P2,
vx_int32  sad,
vx_int32  clip,
vx_int32  max_diff,
vx_int32  uniqueness,
vx_enum  scanlines_mask 
)

[Graph] evaluate disparity given 2 stereo images using the SGM algorithm.

Parameters
[in]graphSpecifies the graph.
[in]leftLeft stereo image
[in]rightRight stereo image
[out]disparityResulting "disparity" map. It contains values from minD-1 to maxD (exclusive) represented in Q11.4 fixed point format.
[in]minDThe minimum disparity value.
[in]maxDThe maximum disparity value.
[in]P1Smoothness penalty.
[in]P2Discontiguous penalty.
[in]sadSpecifies the average window size for sum of absolute differences (set to 1 for original SGM).
[in]clipClip value for cost (used to preserve overflow in cost function)
[in]max_diffMaximum allowed difference (in integer pixel units) in the left-right disparity check.
[in]uniquenessMargin in percentage by which the best (minimum) computed cost function value should “win” the second best value to consider the found match correct.
[in]scanlines_maskScan line directions. Any bit-OR of nvx_scanline_e values is suitable.
vx_status nvxuSemiGlobalMatching ( vx_context  context,
vx_image  left,
vx_image  right,
vx_image  disparity,
vx_int32  minD,
vx_int32  maxD,
vx_int32  P1,
vx_int32  P2,
vx_int32  sad,
vx_int32  clip,
vx_int32  max_diff,
vx_int32  uniqueness,
vx_enum  scanlines_mask 
)

[Immediate] evaluate disparity given 2 stereo images using the SGM algorithm.

Parameters
[in]contextSpecifies the context.
[in]leftLeft stereo image
[in]rightRight stereo image
[out]disparityResulting "disparity" map. It contains values from minD-1 to maxD (exclusive) represented in Q11.4 fixed point format.
[in]minDThe minimum disparity value.
[in]maxDThe maximum disparity value.
[in]P1Smoothness penalty.
[in]P2Discontiguous penalty.
[in]sadSpecifies the average window size for sum of absolute differences (set to 1 for original SGM).
[in]clipClip value for cost (used to preserve overflow in cost function)
[in]max_diffMaximum allowed difference (in integer pixel units) in the left-right disparity check.
[in]uniquenessMargin in percentage by which the best (minimum) computed cost function value should “win” the second best value to consider the found match correct.
[in]scanlines_maskScan line directions. Any bit-OR of nvx_scanline_e values is suitable.