Threshold

Compare to a threshold, replace with threshold value (General)

Supported Technologies

MT, SSE2, Family10h

Synopsis

FwStatus   fwiThreshold_8u_C1IR ( Fw8u * pSrcDst, int srcDstStep, FwiSize roiSize, Fw8u threshold, FwCmpOp fwCmpOp );
FwStatus   fwiThreshold_8u_C3IR ( Fw8u * pSrcDst, int srcDstStep, FwiSize roiSize, const Fw8u threshold[3], FwCmpOp fwCmpOp );
FwStatus   fwiThreshold_8u_AC4IR ( Fw8u * pSrcDst, int srcDstStep, FwiSize roiSize, const Fw8u threshold[3], FwCmpOp fwCmpOp );
FwStatus   fwiThreshold_16s_C1IR ( Fw16s * pSrcDst, int srcDstStep, FwiSize roiSize, Fw16s threshold, FwCmpOp fwCmpOp );
FwStatus   fwiThreshold_16s_C3IR ( Fw16s * pSrcDst, int srcDstStep, FwiSize roiSize, const Fw16s threshold[3], FwCmpOp fwCmpOp );
FwStatus   fwiThreshold_16s_AC4IR ( Fw16s * pSrcDst, int srcDstStep, FwiSize roiSize, const Fw16s threshold[3], FwCmpOp fwCmpOp );
FwStatus   fwiThreshold_32f_C1IR ( Fw32f * pSrcDst, int srcDstStep, FwiSize roiSize, Fw32f threshold, FwCmpOp fwCmpOp );
FwStatus   fwiThreshold_32f_C3IR ( Fw32f * pSrcDst, int srcDstStep, FwiSize roiSize, const Fw32f threshold[3], FwCmpOp fwCmpOp );
FwStatus   fwiThreshold_32f_AC4IR ( Fw32f * pSrcDst, int srcDstStep, FwiSize roiSize, const Fw32f threshold[3], FwCmpOp fwCmpOp );
FwStatus   fwiThreshold_8u_C1R ( const Fw8u * pSrc, int srcStep, Fw8u * pDst, int dstStep, FwiSize roiSize, Fw8u threshold, FwCmpOp fwCmpOp );
FwStatus   fwiThreshold_8u_C3R ( const Fw8u * pSrc, int srcStep, Fw8u * pDst, int dstStep, FwiSize roiSize, const Fw8u threshold[3], FwCmpOp fwCmpOp );
FwStatus   fwiThreshold_8u_AC4R ( const Fw8u * pSrc, int srcStep, Fw8u * pDst, int dstStep, FwiSize roiSize, const Fw8u threshold[3], FwCmpOp fwCmpOp );
FwStatus   fwiThreshold_16s_C1R ( const Fw16s * pSrc, int srcStep, Fw16s * pDst, int dstStep, FwiSize roiSize, Fw16s threshold, FwCmpOp fwCmpOp );
FwStatus   fwiThreshold_16s_C3R ( const Fw16s * pSrc, int srcStep, Fw16s * pDst, int dstStep, FwiSize roiSize, const Fw16s threshold[3], FwCmpOp fwCmpOp );
FwStatus   fwiThreshold_16s_AC4R ( const Fw16s * pSrc, int srcStep, Fw16s * pDst, int dstStep, FwiSize roiSize, const Fw16s threshold[3], FwCmpOp fwCmpOp );
FwStatus   fwiThreshold_32f_C1R ( const Fw32f * pSrc, int srcStep, Fw32f * pDst, int dstStep, FwiSize roiSize, Fw32f threshold, FwCmpOp fwCmpOp );
FwStatus   fwiThreshold_32f_C3R ( const Fw32f * pSrc, int srcStep, Fw32f * pDst, int dstStep, FwiSize roiSize, const Fw32f threshold[3], FwCmpOp fwCmpOp );
FwStatus   fwiThreshold_32f_AC4R ( const Fw32f * pSrc, int srcStep, Fw32f * pDst, int dstStep, FwiSize roiSize, const Fw32f threshold[3], FwCmpOp fwCmpOp );

Parameters

dstStep   Destination buffer step size (width of the buffer in bytes).
fwCmpOp   Specifies a comparison operation to be performed (fwCmpLess, fwCmpGreater, fwCmpLessEq, fwCmpEq, or fwCmpGreaterEq).
pDst   Pointer to a location in a destination buffer.
pSrc   Pointer to a location in a source buffer.
pSrcDst   Pointer to a location in a buffer that contains both the source and destination.
roiSize   Specifies the height and width of an ROI.
srcDstStep   Source and destination buffer step size in bytes (width of both buffers in bytes).
srcStep   Source buffer step size (width of the buffer in bytes).
threshold   Threshold for each pixel.
threshold[3]   Three-channel threshold for each pixel.

Description

These functions step through an ROI in a source buffer and compare the source data to a specified threshold value using a specified compare operation.

The compare operation can be "less than", "less than or equal", "equal", "greater than or equal" or "greater than".

When the comparison evaluates as true, the output data is set to the threshold value.

When the comparison evaluates as false, the output data is set to the same value as the source data.

Output data is written back to the same buffer for in-place operation or to a destination buffer.