Intel® Integrated Performance Primitives (Intel® IPP) Developer Guide and Reference
A newer version of this document is available. Customers should click here to go to the newest version.
CFAToBGRA
Restores the RGB image from the gray-scale CFA image using the VNG algorithm.
Syntax
IppStatus ippiCFAToBGRA_VNG_8u_C1C4R(const Ipp8u* pSrc, IppiRect srcRoi, IppiSize srcSize, int srcStep, Ipp32f scale[4], Ipp8u* pDst, int dstStep, IppiBayerGrid grid);
IppStatus ippiCFAToBGRA_VNG_16u_C1C4R(const Ipp16u* pSrc, IppiRect srcRoi, IppiSize srcSize, int srcStep, Ipp32f scale[4], Ipp16u* pDst, int dstStep, IppiBayerGrid grid);
Platform-aware functions
IppStatus ippiCFAToBGRA_VNG_8u_C1C4R_L(const Ipp8u* pSrc, IppiRectL srcRoiL, IppiSizeL srcSizeL, IppSizeL srcStepL, Ipp32f scale[4], Ipp8u* pDst, IppSizeL dstStepL, IppiBayerGrid grid);
IppStatus ippiCFAToBGRA_VNG_16u_C1C4R_L(const Ipp16u* pSrc, IppiRectL srcRoiL, IppiSizeL srcSizeL, IppSizeL srcStepL, Ipp32f scale[4], Ipp16u* pDst, IppSizeL dstStepL, IppiBayerGrid grid);
Include Files
ippcc.h
ippcc_l.h
Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib
Parameters
| pSrc | Pointer to the source image. | 
| srcRoi, srcRoiL | Region of interest in the source image (of the IppiRect or IppiRectL type). | 
| srcSize, srcSizeL | Size of the source image. | 
| srcStep, srcStepL | Distance, in bytes, between the starting points of consecutive lines in the source image. | 
| scale[4] | Coefficients by which the resulting RGB channels are multiplied after interpolation. By default, equal to 1.0. | 
| pDst | Pointer to the destination image. | 
| dstStep, dstStepL | Distance, in bytes, between the starting points of consecutive lines in the destination image. | 
| grid | Specifies the configuration of the Bayer grid in the source image. The function copies 2-pixel width border pixels from the internal neighborhood pixels. The following values are possible: ippiBayerBGGR ippiBayerRGGB ippiBayerGBRG ippiBayerGRBG | 
Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function transforms the one-channel gray-scale image pSrc that is produced by applying the color filter array (CFA) to 24-bit three-channel RGB image using the Variable Number of Gradients (VNG) demosaicing algorithm.
Return Values
| ippStsNoErr | Indicates no error. Any other value indicates an error. | 
| ippStsNullPtrErr | Indicates an error condition if one of the specified pointers is NULL. | 
| ippStsSizeErr | Indicates an error condition if the srcSize or srcSizeL has a field that is less than 2, or if the srcRoi or srcRoiL has a field with a negative or zero value. | 
| ippStsBadArgErr | Indicates an error condition if grid has an illegal value. |