Convert BGR to grayscale (JPEG)


FwStatus   fwiBGRToY_JPEG_8u_C3C1R ( const Fw8u * pSrcBGRint srcStepFw8u * pDstYint dstStepFwiSize roiSize );


dstStep   Destination buffer step size (width of the buffer in bytes).
pDstY   Pointer to destination image ROI for grayscale image format.
pSrcBGR   Pointer to source image ROI for BGR image format.
roiSize   Specifies the height and width of an ROI.
srcStep   Source buffer step size (width of the buffer in bytes).


This function steps through an ROI in a source buffer, converts the source data from BGR to grayscale luminance values, and writes the converted data to a destination buffer.

The following formula is used to convert blue, green, and red values to luminance values.

 Y = 0.114*B + 0.587*G + 0.299*R