Mirror

Mirrors an image about a horizontal or vertical axis, or both.

Syntax

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

Parameters

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:

ippAxsHorizontal

for the horizontal axis

ippAxsVertical

for the vertical axis

ippAxsBoth

for both horizontal and vertical axes.

Description

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.

Return Values

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.

Using the function ippiMirror

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
 

Submit feedback on this help topic

Copyright © 2000 - 2011, Intel Corporation. All rights reserved.