SqrIntegral
Transforms an image to integral and integral of pixel squares representations.
Syntax
IppStatus ippiSqrIntegral_8u32s64f_C1R(const Ipp8u*
pSrc
, int
srcStep
, Ipp32s*
pDst
, int
dstStep
, Ipp64f*
pSqr
, int
sqrStep
, IppiSize
roiSize
, Ipp32s
val
, Ipp64f valSqr
);
IppStatus ippiSqrIntegral_8u32f64f_C1R(const Ipp8u*
pSrc
, int
srcStep
, Ipp32f*
pDst
, int
dstStep
, Ipp64f*
pSqr
, int
sqrStep
, IppiSize
roiSize
, Ipp32f
val
, Ipp64f
valSqr
);
IppStatus ippiSqrIntegral_8u32s_C1R(const Ipp8u*
pSrc
, int
srcStep
, Ipp32s*
pDst
, int
dstStep
, Ipp32s*
pSqr
, int
sqrStep
, IppiSize
roiSize
, Ipp32s
val
, Ipp32s
valSqr
);
Include Files
ippcv.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 ROI.
- srcStep
- Distance in bytes between starts of consecutive lines in the source image.
- pDst
- Pointer to the ROI in the destination integral image.
- dstStep
- Distance in bytes between starts of consecutive lines in the destination image.
- pSqr
- Pointer to the ROI of the destination integral image of pixel squares.
- sqrStep
- Distance in bytes between starts of consecutive lines in the destination integral image of pixel squares.
- roiSize
- Size of source image ROI in pixels.
- val
- The value to add topDstimage pixels.
- valSqr
- The value to add topSqrimage pixels
Description
This function operates with ROI (see Regions of Interest in Intel IPP). This function builds two destination images: integral image
pDst
and integral image of pixel squares pSqr
. Pixel values of pDst
are computed using pixel values of the source image pSrc
and the specified value val
in accordance with the following formula:

Pixel values of
pSqr
are computed using pixel values of the source image pSrc
and the specified value valSqr
in accordance with the following formula:

where
i
,j
are coordinates of the destination image pixels (see Figure “Operation of the Integral and TiltedIntegral functions”
) varying in the range i
= 1, ..., roiSize.height
, j
= 0,..., roiSize.width
. Pixel values of zero row and column are set to val
for pDst
, and to valSqr
for pSqr
. The size of both destination images is (roiSize.width
+ 1) x (roiSize.height
+ 1).Figure
“Operation of the Integral and TiltedIntegral functions”
shows what pixels (red circles) of the source image are used in computation new pixel values in the i
,j
coordinates.Return Values
- ippStsNoEr
- Indicates no error.
- ippStsNullPtrErr
- Indicates an error if one of the specified pointers isNULL.
- ippStsSizeErr
- Indicates an error condition ifroiSizehas a field with zero or negative value.
- ippStsStepErr
- Indicates an error condition ifsrcStepis less thanroiSize.width*<pixelSize>, ordstSteporsqrStepis less than(roiSize.width+1)*<pixelSize>.
- ippStsNotEvenStepErr
- Indicates an error condition ifdstStepis not divisible by 4, orsqrStepis not divisible by 8.