Mirrors an image about a horizontal or vertical axis, or both.
Case 1: Not-in-place operation
IppStatus ippiMirror_<mod>(const Ipp<datatype>* pSrc, int srcStep, Ipp<datatype>* pDst, int dstStep, IppiSize roiSize, IppiAxis flip);
Supported values for mod:
8u_C1R |
16u_C1R |
16s_C1R |
32s_C1R |
32f_C1R |
8u_C3R |
16u_C3R |
16s_C3R |
32s_C3R |
32f_C3R |
8u_C4R |
16u_C4R |
16s_C4R |
32s_C4R |
32f_C4R |
8u_AC4R |
16u_AC4R |
16s_AC4R |
32s_AC4R |
32f_AC4R |
Case 2: In-place operation
IppStatus ippiMirror_<mod>(const Ipp<datatype>* pSrcDst, int srcDstStep, IppiSize roiSize, IppiAxis flip);
Supported values for mod:
8u_C1IR |
16u_C1IR |
16s_C1IR |
32s_C1IR |
32f_C1IR |
8u_C3IR |
16u_C3IR |
16s_C3IR |
32s_C3IR |
32f_C3IR |
8u_C4IR |
16u_C4IR |
16s_C4IR |
32s_C4IR |
32f_C4IR |
8u_AC4IR |
16u_AC4IR |
16s_AC4IR |
32s_AC4IR |
32f_AC4IR |
pSrc |
Pointer to the source buffer. | ||||||
srcStep |
Distance in bytes between starts of consecutive lines in the source image buffer. | ||||||
pDst |
Pointer to the destination buffer. | ||||||
dstStep |
Distance in bytes between starts of consecutive lines in the destination image buffer. | ||||||
pSrcDst |
Pointer to the source and destination buffer for the in-place operation. | ||||||
srcDstStep |
Distance in bytes between starts of consecutive lines in the source and destination image buffer for the in-place operation. | ||||||
roiSize |
Size of the source and destination ROI in pixels. | ||||||
flip |
Specifies the axis to mirror the image
about. Use the following values to specify the axes:
|
The function ippiMirror is declared in the ippi.h file. It operates with ROI (see Regions of Interest in Intel IPP). This function mirrors the source image pSrc about a horizontal or vertical axis or both, depending on the flip value, and writes it to the destination image pDst.
Example “Using the function ippiMirror” shows how to use the function ippiMirror_8u_C1R.
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, or when one of the dimensions is equal to 1. |
ippStsMirrorFlipErr |
Indicates an error condition if flip has an illegal value. |
Ipp8u src[8*4] = {1, 2, 3, 4, 8, 8, 8, 8,
1, 2, 3, 4, 8, 8, 8, 8,
1, 2, 3, 4, 8, 8, 8, 8,
1, 2, 3, 4, 8, 8, 8, 8};
Ipp8u dst[4*4];
IppiSize srcRoi = { 4, 4 };
ippiMirror_8u_C1R(src, 8, dst, 4, srcRoi, ippAxsBoth);
Result:
1 2 3 4 8 8 8 8
1 2 3 4 8 8 8 8 src
1 2 3 4 8 8 8 8
1 2 3 4 8 8 8 8
4 3 2 1
4 3 2 1
4 3 2 1 dst
4 3 2 1
Copyright © 2000 - 2011, Intel Corporation. All rights reserved.