Performs gamma-correction of the source image with RGB data.
Case 1: Not-in-place operation on integer pixel-order data
IppStatus ippiGammaFwd_<mod>(const Ipp<datatype>* pSrc, int srcStep, Ipp<datatype>* pDst, int dstStep, IppiSize roiSize);
Supported values for mod:
8u_C3R | 16u_C3R |
8u_AC4R | 16u_AC4R |
Case 2: Not-in-place operation on integer planar data
IppStatus ippiGammaFwd_<mod>(const Ipp<datatype>* const pSrc[3], int srcStep, Ipp<datatype>* const pDst[3], int dstStep, IppiSize roiSize);
Supported values for mod:
8u_P3R | 16u_P3R |
Case 3: Not-in-place operation on floating-point pixel-order data
IppStatus ippiGammaFwd_<mod>(const Ipp32f* pSrc, int srcStep, Ipp32f* pDst, int dstStep, IppiSize roiSize, Ipp32f vMin, Ipp32f vMax);
Supported values for mod:
32f_C3R |
32f_AC4R |
Case 4: Not-in-place operation on floating-point planar data
IppStatus ippiGammaFwd_32f_P3R (const Ipp32f* const pSrc[3], int srcStep, Ipp32f* const pDst[3], int dstStep, IppiSize roiSize, Ipp32f vMin, Ipp32f vMax);
Case 5: In-place operation on integer pixel-order data
IppStatus ippiGammaFwd_<mod>(Ipp<datatype>* pSrcDst, int srcDstStep, IppiSize roiSize);
Supported values for mod:
8u_C3IR | 16u_C3IR |
8u_AC4IR | 16u_AC4IR |
Case 6: In-place operation on integer planar data
IppStatus ippiGammaFwd_<mod>(Ipp<datatype>* const pSrcDst[3], int srcDstStep, IppiSize roiSize);
Supported values for mod:
8u_IP3R | 16u_IP3R |
Case 7: In-place operation on floating-point pixel-order data
IppStatus ippiGammaFwd_<mod>(Ipp32f* pSrcDst, int srcDstStep, IppiSize roiSize, Ipp32f vMin, Ipp32f vMax);
Supported values for mod:
32f_C3IR |
32f_AC4IR |
Case 8: In-place operation on floating-point planar data
IppStatus ippiGammaFwd_32f_IP3R (Ipp32f* const pSrcDst[3], int srcDstStep, IppiSize roiSize, Ipp32f vMin, Ipp32f vMax);
pSrc |
Pointer to the ROI in the pixel-order source image. Array of pointers to the ROI in each plane of the planar source image. |
srcStep |
Distance in bytes between starts of consecutive lines in the source image. |
pDst |
Pointer to the ROI in the pixel-order destination image. Array of pointers to the ROI in each plane of the planar destination image. |
dstStep |
Distance in bytes between starts of consecutive lines in the destination image. |
pSrcDst |
Pointer to the source and destination image ROI for the in-place operation. |
srcDstStep |
Distance in bytes between starts of consecutive lines in the source and destination image for the in-place operation. |
roiSize |
Size of the source and destination ROI in pixels. |
vMin, vMax |
Minimum and maximum values of the input floating-point data. |
The function ippiGammaFwd is declared in the ippcc.h file. It operates with ROI (see Regions of Interest in Intel IPP).
This function performs gamma-correction of the source image with RGB data. It uses the following basic equations to convert an RGB image to the gamma-corrected R'G'B' image:
for R,G,B < 0.018
R' = 4.5 * R
G' = 4.5 * G
B' = 4.5 * B
for R,G,B ≥ 0.018
R' = 1.099 * R0.45 - 0.099
G' = 1.099 * G0.45 - 0.099
B' = 1.099 * B0.45 - 0.099
Note that the channel intensity values are normalized to fit in the range of [0..1]. The gamma value is equal to 1/0.45 = 2.22 in conformity with [ITU709] specification.
ippStsNoErr |
Indicates no error. Any other value indicates an error. |
ippStsNullPtrErr |
Indicates an error condition if pSrc, pDst, or pSrcDst is NULL. |
ippStsSizeErr |
Indicates an error condition if roiSize has a field with a zero or negative value. |
ippStsGammaRangeErr |
Indicates an error condition if the input data bounds are incorrect, that is vMax is less than or equal to vMin. |
Copyright © 2000 - 2011, Intel Corporation. All rights reserved.