Binary Operation Filter
Filter
RIF_IMAGE_FILTER_ADD
RIF_IMAGE_FILTER_MUL
RIF_IMAGE_FILTER_SUB
RIF_IMAGE_FILTER_DIV
RIF_IMAGE_FILTER_MAX
Description
A set of filters to apply an operation (+, -, *, /, max, min) over two operands.
Parameters
Parameter |
Type |
Input/Output |
Description |
---|---|---|---|
lhsVec |
float4 |
input |
Left hand side vector operand. |
lhsImg |
image |
input |
Left hand side image operand. |
rhsVec |
float4 |
input |
Right hand side vector operand. |
rhsImg |
image |
input |
Right hand side image operand. |
Usage Example
rif_image_filter filter = nullptr;
rifContextCreateImageFilter(context, RIF_IMAGE_FILTER_ADD, &filter);
rifImageFilterSetParameter4f(filter, "lhsVec", 0.0f, 1.0f, 2.0f, 3.0f);
rifImageFilterSetParameterImage(filter, "rhsImg", inputImage);
rifCommandQueueAttachImageFilter(queue, filter, inputImage, outputImage);
rifContextExecuteCommandQueue(context, queue, nullptr, nullptr, nullptr);