BGRToY_JPEG

Converts a BGR image to gray scale.

Syntax

IppStatus ippiBGRToY_JPEG_8u_C3C1R(const Ipp8u* pSrcBGR, int srcStep, Ipp8u* pDstY, int dstStep, IppiSize roiSize);

Parameters

pSrcBGR

Pointer to the source image ROI.

srcStep

Distance in bytes between starts of consecutive lines in the source image.

pDstY

Pointer to the destination image ROI.

dstStep

Distance in bytes between starts of consecutive lines in the destination image.

roiSize

Size of the source and destination ROI in pixels.

Description

The function ippiBGRToY_JPEG is declared in the ippj.h file. It operates with ROI (see Regions of Interest in Intel IPP).

This function converts a BGR image to gray scale using the following formula:

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

Return Values

ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error condition if any of the specified pointers is NULL.

ippStsSizeErr

Indicates an error condition if roiSize has a field with zero or negative value.

ippStsStepErr

Indicates an error condition if srcStep or dstStep has a zero or negative value.

Submit feedback on this help topic

Copyright © 2000 - 2011, Intel Corporation. All rights reserved.