|
|
VisionWorks Toolkit ReferenceApril 8, 2016 | 1.4 Release |
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:
vxGetKernelByEnum function;"com.nvidia.nvx.stereo_block_matching" for vxGetKernelByName function.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} \]
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... | |
| 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.
| [in] | graph | Specifies the graph. |
| [in] | left | Specifies the left image. Only VX_DF_IMAGE_U8 format is supported. |
| [in] | right | Specifies the right image. It must have the same size and format as left. |
| [out] | disp | Specifies the output disparity. Only VX_DF_IMAGE_U8 format is supported. It must have the same size as left. |
| [in] | winSize | Specifies the average window size for sum of absolute differences (SAD). It must be an odd integer in range \( [3, 31] \). |
| [in] | maxDisparity | Specifies the maximum possible disparity that is considered. It must be a positive integer not greater than 256 and divisible by 8. |
vxGetStatus).| 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.
| [in] | context | Specifies the context. |
| [in] | left | Specifies the left image. Only VX_DF_IMAGE_U8 format is supported. |
| [in] | right | Specifies the right image. It must have the same size and format as left. |
| [out] | disp | Specifies the output disparity. Only VX_DF_IMAGE_U8 format is supported. It must have the same size as left. |
| [in] | winSize | Specifies the average window size for sum of absolute differences (SAD). It must be an odd integer in range \( [3, 31] \). |
| [in] | maxDisparity | Specifies the maximum possible disparity that is considered. It must be a positive integer not greater than 256 and divisible by 8. |
vx_status enumerator. | VX_SUCCESS | No errors. |
| VX_ERROR_INVALID_REFERENCE | Supplied parameters are not a valid references. |
| VX_ERROR_INVALID_PARAMETERS | Supplied parameters are not valid. |
| VX_ERROR_INVALID_SCOPE | Supplied parameters are virtual objects that cannot be used in immediate mode. |
| VX_FAILURE | Internal error in primitive implementation; check the log for detailed information. (Framework: Log). |