Converts a color gradient image to grayscale.
IppStatus ippiGradientColorToGray_<mod>(const Ipp<datatype>* pSrc, int srcStep, Ipp<datatype>* pDst, int dstStep, IppiSize roiSize, IppiNorm norm);
Supported values for mod:
8u_C3C1R |
16u_C3C1R |
32f_C1R |
pSrc |
Pointer to the source image ROI. | ||||||
srcStep |
Distance in bytes between starts of consecutive lines in the source image. | ||||||
pDst |
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 image ROI. | ||||||
norm |
Type
of norm to form the mask for dilation; following values are possible:
|
The function ippiGradientColorToGray is declared in the ippcv.h It operates with ROI (see Regions of Interest in Intel IPP).
This function creates the grayscale gradient image
pDst from the source three-channel gradient
image pSrc. The type of norm
is specified by the parameter. Pixel values for destination image
are computed for different type of norm in accordance with the following formula:
For integer flavors the result is scaled to the full range of the destination data type.
ippStsNoErr |
Indicates no error. Any other value indicates an error or a warning. |
ippStsNullPtrErr |
Indicates an error condition if one 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 is less than roiSize.width * < pixelSize>. |
ippStsNotEvenStepErr |
Indicates an error condition if one of the step values is not divisible by 2 for integer images, or by 4 for floating-point images. |
ippStsBadArgErr |
Indicates an error condition if norm has an illegal value. |
Copyright © 2000 - 2011, Intel Corporation. All rights reserved.