ColorToGray

Convert a three-channel color image to gray scale using custom coefficients

Supported Technologies

SSE2

Synopsis

FwStatus   fwiColorToGray_8u_C3C1R ( const Fw8u* pSrcint srcStepFw8u* pDstint dstStepFwiSize roiSizeconst Fw32f coeffs[3] );
FwStatus   fwiColorToGray_16u_C3C1R ( const Fw16u* pSrcint srcStepFw16u* pDstint dstStepFwiSize roiSizeconst Fw32f coeffs[3] );
FwStatus   fwiColorToGray_16s_C3C1R ( const Fw16s* pSrcint srcStepFw16s* pDstint dstStepFwiSize roiSizeconst Fw32f coeffs[3] );
FwStatus   fwiColorToGray_32f_C3C1R ( const Fw32f* pSrcint srcStepFw32f* pDstint dstStepFwiSize roiSizeconst Fw32f coeffs[3] );
FwStatus   fwiColorToGray_8u_AC4C1R ( const Fw8u* pSrcint srcStepFw8u* pDstint dstStepFwiSize roiSizeconst Fw32f coeffs[3] );
FwStatus   fwiColorToGray_16u_AC4C1R ( const Fw16u* pSrcint srcStepFw16u* pDstint dstStepFwiSize roiSizeconst Fw32f coeffs[3] );
FwStatus   fwiColorToGray_16s_AC4C1R ( const Fw16s* pSrcint srcStepFw16s* pDstint dstStepFwiSize roiSizeconst Fw32f coeffs[3] );
FwStatus   fwiColorToGray_32f_AC4C1R ( const Fw32f* pSrcint srcStepFw32f* pDstint dstStepFwiSize roiSizeconst Fw32f coeffs[3] );

Parameters

coeffs[3]   Transformation coefficient values.
dstStep   Destination buffer step size (width of the buffer in bytes).
pDst   Pointer to a location in a destination buffer.
pSrc   Pointer to a location in a source buffer.
roiSize   Specifies the height and width of an ROI.
srcStep   Source buffer step size (width of the buffer in bytes).

Description

The C3C1 version of the function steps through an ROI in a source buffer, converts a three-channel color image to a gray scale image and writes the converted data to a destination buffer.

The AC4C1 version of the function steps through an ROI in a source buffer, converts a four-channel color image to a gray scale image and writes the converted data to a destination buffer.