VisionWorks Toolkit Reference

December 18, 2015 | 1.2 Release

 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Stereo Block Matching

Detailed Description

The Stereo Block Matching Primitive.

This primitive computes a dense disparity map for given stereo pair. The rectified input is expected.

The primitive uses the following identifiers:

Method

The Block Matching algorithm finds optimal disparity in 0..maxDisparity range. It is defined as argminimum (argument of the minimum) of sum of absolute differences over winSize X winSize block.

\begin{eqnarray} D(y, x) &=& {argmin}_d {SAD (L(y, x), R(y, x - d))} \\ SAD(y, x) &=& \sum_{k={-r}}^r {abs(L(y, x) - R(y, x))} \end{eqnarray}

where

\[ r = \frac{winSize - 1}{2} \]

See also
[4]

Functions

vx_node nvxStereoBlockMatchingNode (vx_graph graph, vx_image left, vx_image right, vx_image disp, vx_uint32 winSize, vx_uint32 maxDisparity)
 [Graph] This primitive computes a dense disparity map for a given stereo pair. More...
 
vx_status nvxuStereoBlockMatching (vx_context context, vx_image left, vx_image right, vx_image disp, vx_uint32 winSize, vx_uint32 maxDisparity)
 [Immediate] This primitive computes a dense disparity map for a given stereo pair. More...
 

Function Documentation

vx_node nvxStereoBlockMatchingNode ( vx_graph  graph,
vx_image  left,
vx_image  right,
vx_image  disp,
vx_uint32  winSize,
vx_uint32  maxDisparity 
)

[Graph] This primitive computes a dense disparity map for a given stereo pair.

Parameters
[in]graphSpecifies the graph.
[in]leftSpecifies the left image. Only VX_DF_IMAGE_U8 format is supported.
[in]rightSpecifies the right image. It must have the same size and format as left.
[out]dispSpecifies the output disparity. Only VX_DF_IMAGE_U8 format is supported. It must have the same size as left.
[in]winSizeSpecifies the average window size for sum of absolute differences (SAD). It must be an odd integer in range \( [3, 31] \).
[in]maxDisparitySpecifies the maximum possible disparity that is considered. It must be a positive integer not greater than 256 and divisible by 8.
Returns
A valid node reference or an error object (use vxGetStatus).
See also
Stereo Block Matching
vx_status nvxuStereoBlockMatching ( vx_context  context,
vx_image  left,
vx_image  right,
vx_image  disp,
vx_uint32  winSize,
vx_uint32  maxDisparity 
)

[Immediate] This primitive computes a dense disparity map for a given stereo pair.

Parameters
[in]contextSpecifies the context.
[in]leftSpecifies the left image. Only VX_DF_IMAGE_U8 format is supported.
[in]rightSpecifies the right image. It must have the same size and format as left.
[out]dispSpecifies the output disparity. Only VX_DF_IMAGE_U8 format is supported. It must have the same size as left.
[in]winSizeSpecifies the average window size for sum of absolute differences (SAD). It must be an odd integer in range \( [3, 31] \).
[in]maxDisparitySpecifies the maximum possible disparity that is considered. It must be a positive integer not greater than 256 and divisible by 8.
Returns
A vx_status enumerator.
Return values
VX_SUCCESSNo errors.
VX_ERROR_INVALID_REFERENCESupplied parameters are not a valid references.
VX_ERROR_INVALID_PARAMETERSSupplied parameters are not valid.
VX_ERROR_INVALID_SCOPESupplied parameters are virtual objects that cannot be used in immediate mode.
VX_FAILUREInternal error in primitive implementation; check the log for detailed information. (Framework: Log).
See also
Stereo Block Matching