The OpenVX Specification
dba1aa3
|
Compares an image template against overlapped image regions.
The detailed equation to the matching can be found in vx_comp_metric_e
. The output of the template matching node is a comparison map. The output comparison map should be the same size as the input image. The template image size (width*height) shall not be larger than 65535. If the valid region of the template image is smaller than the entire template image, the result in the destination image is implementation-dependent.
Enumerations | |
enum | vx_comp_metric_e { VX_COMPARE_HAMMING = ((( VX_ID_KHRONOS ) << 20) | ( VX_ENUM_COMP_METRIC << 12)) + 0x0, VX_COMPARE_L1 = ((( VX_ID_KHRONOS ) << 20) | ( VX_ENUM_COMP_METRIC << 12)) + 0x1, VX_COMPARE_L2 = ((( VX_ID_KHRONOS ) << 20) | ( VX_ENUM_COMP_METRIC << 12)) + 0x2, VX_COMPARE_CCORR = ((( VX_ID_KHRONOS ) << 20) | ( VX_ENUM_COMP_METRIC << 12)) + 0x3, VX_COMPARE_L2_NORM = ((( VX_ID_KHRONOS ) << 20) | ( VX_ENUM_COMP_METRIC << 12)) + 0x4, VX_COMPARE_CCORR_NORM = ((( VX_ID_KHRONOS ) << 20) | ( VX_ENUM_COMP_METRIC << 12)) + 0x5 } |
comparing metrics. More... | |
Functions | |
vx_node VX_API_CALL | vxMatchTemplateNode (vx_graph graph, vx_image src, vx_image templateImage, vx_enum matchingMethod, vx_image output) |
[Graph] The Node Compares an image template against overlapped image regions. More... | |
vx_status VX_API_CALL | vxuMatchTemplate (vx_context context, vx_image src, vx_image templateImage, vx_enum matchingMethod, vx_image output) |
[Immediate] The function compares an image template against overlapped image regions. More... | |
enum vx_comp_metric_e |
comparing metrics.
In all the equations below w and h are width and height of the template image respectively. \( R \) is the compare map. \( T \) is the template image. \( I \) is the image on which the template is searched.
Definition at line 1447 of file vx_types.h.
vx_node VX_API_CALL vxMatchTemplateNode | ( | vx_graph | graph, |
vx_image | src, | ||
vx_image | templateImage, | ||
vx_enum | matchingMethod, | ||
vx_image | output | ||
) |
[Graph] The Node Compares an image template against overlapped image regions.
The detailed equation to the matching can be found in vx_comp_metric_e
. The output of the template matching node is a comparison map as described in vx_comp_metric_e
. The Node have a limitation on the template image size (width*height). It should not be larger then 65535. If the valid region of the template image is smaller than the entire template image, the result in the destination image is implementation-dependent.
[in] | graph | The reference to the graph. |
[in] | src | The input image of type VX_DF_IMAGE_U8 . |
[in] | templateImage | Searched template of type VX_DF_IMAGE_U8 . |
[in] | matchingMethod | attribute specifying the comparison method vx_comp_metric_e . This function support only VX_COMPARE_CCORR_NORM and VX_COMPARE_L2 . |
[out] | output | Map of comparison results. The output is an image of type VX_DF_IMAGE_S16 |
vx_node
. vx_node | A node reference. Any possible errors preventing a successful creation should be checked using vxGetStatus |
vx_status VX_API_CALL vxuMatchTemplate | ( | vx_context | context, |
vx_image | src, | ||
vx_image | templateImage, | ||
vx_enum | matchingMethod, | ||
vx_image | output | ||
) |
[Immediate] The function compares an image template against overlapped image regions.
The detailed equation to the matching can be found in vx_comp_metric_e
. The output of the template matching node is a comparison map as described in vx_comp_metric_e
. The Node have a limitation on the template image size (width*height). It should not be larger then 65535. If the valid region of the template image is smaller than the entire template image, the result in the destination image is implementation-dependent.
[in] | context | The reference to the overall context. |
[in] | src | The input image of type VX_DF_IMAGE_U8 . |
[in] | templateImage | Searched template of type VX_DF_IMAGE_U8 . |
[in] | matchingMethod | attribute specifying the comparison method vx_comp_metric_e . This function support only VX_COMPARE_CCORR_NORM and VX_COMPARE_L2 . |
[out] | output | Map of comparison results. The output is an image of type VX_DF_IMAGE_S16 |
vx_status_e
enumeration. VX_SUCCESS | Success |
* | An error occurred. See vx_status_e . |