VisionWorks Toolkit Reference

December 18, 2015 | 1.2 Release

 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Multiply by Scalar

Detailed Description

Multiplies an input image by scalar and optionally converts it to another data type.

Saturate conversion policy is applied to avoid possible overflows.

\[ dst(x,y) = saturate<dstType>(\alpha \cdot src(x,y)) \]

Supported combinations of input/output types:

I/O 2S16
2S16 X
2F32 X

Functions

vx_node nvxMultiplyByScalarNode (vx_graph graph, vx_image src, vx_image dst, vx_float32 alpha)
 [Graph] Multiplies an input image by scalar and optionally converts it to another data type. More...
 
vx_status nvxuMultiplyByScalar (vx_context context, vx_image src, vx_image dst, vx_float32 alpha)
 [Immediate] Multiplies an input image by scalar and optionally converts it to another data type. More...
 

Function Documentation

vx_node nvxMultiplyByScalarNode ( vx_graph  graph,
vx_image  src,
vx_image  dst,
vx_float32  alpha 
)

[Graph] Multiplies an input image by scalar and optionally converts it to another data type.

Parameters
[in]graphSpecifies the graph.
[in]srcSpecifies the input image. It must have NVX_DF_IMAGE_2S16 format.
[out]dstSpecifies the output image. It must have the same size as input image and NVX_DF_IMAGE_2S16 or NVX_DF_IMAGE_2F32 format. If the output format is not specified for virtual image, it will be set to the same format as input image.
[in]alphaSpecifies the \( \alpha \) coefficient.
Returns
A valid node reference or an error object (use vxGetStatus).
vx_status nvxuMultiplyByScalar ( vx_context  context,
vx_image  src,
vx_image  dst,
vx_float32  alpha 
)

[Immediate] Multiplies an input image by scalar and optionally converts it to another data type.

Parameters
[in]contextSpecifies the context.
[in]srcSpecifies the input image. It must have NVX_DF_IMAGE_2S16 format.
[out]dstSpecifies the output image. It must have the same size as input image and NVX_DF_IMAGE_2S16 or NVX_DF_IMAGE_2F32 format.
[in]alphaSpecifies the \( \alpha \) coefficient.
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 log for detailed information (Framework: Log).