RGBToGray

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

Supported Technologies

SSE2

Synopsis

FwStatus   fwiRGBToGray_8u_C3C1R ( const Fw8u* pSrcint srcStepFw8u* pDstint dstStepFwiSize roiSize );
FwStatus   fwiRGBToGray_16u_C3C1R ( const Fw16u* pSrcint srcStepFw16u* pDstint dstStepFwiSize roiSize );
FwStatus   fwiRGBToGray_16s_C3C1R ( const Fw16s* pSrcint srcStepFw16s* pDstint dstStepFwiSize roiSize );
FwStatus   fwiRGBToGray_32f_C3C1R ( const Fw32f* pSrcint srcStepFw32f* pDstint dstStepFwiSize roiSize );
FwStatus   fwiRGBToGray_8u_AC4C1R ( const Fw8u* pSrcint srcStepFw8u* pDstint dstStepFwiSize roiSize );
FwStatus   fwiRGBToGray_16u_AC4C1R ( const Fw16u* pSrcint srcStepFw16u* pDstint dstStepFwiSize roiSize );
FwStatus   fwiRGBToGray_16s_AC4C1R ( const Fw16s* pSrcint srcStepFw16s* pDstint dstStepFwiSize roiSize );
FwStatus   fwiRGBToGray_32f_AC4C1R ( const Fw32f* pSrcint srcStepFw32f* pDstint dstStepFwiSize roiSize );

Parameters

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 RGB 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.