IPSDK 4.1.0.2
IPSDK : Image Processing Software Development Kit
Image x-flip algorithm
imageflipXImg (inImg)

Detailed Description

Flips input image along x-axis.

This algorithm flips the input image along its x-axis.

On output image values are given by:

\[ OutImg(x, y, ...) = InImg(InImgSizeX-1-x, y, ...) \]

An example of x-flipping is shown below:

flipXImg.png

Example of Python code :

Example imports

import PyIPSDK
import PyIPSDK.IPSDKIPLGeometricTransform as gtrans

Code Example

# retrieve path of unit test common images directory
utImagesCommonPath = unitTestMonitor.getUTImagesCommonPath()
# load input image from file
inImg = PyIPSDK.loadTiffImageFile(os.path.join(utImagesCommonPath, "Lena_510x509_UInt8.tif"))
# apply image flipping along x-axis
outImg = gtrans.flipXImg(inImg)

Example of C++ code :

Example informations

Header file

#include <IPSDKIPL/IPSDKIPLGeometricTransform/Processor/FlipXImg/FlipXImg.h>

Code Example

ImagePtr pInImg = loadTiffImageFile(inputImgFilePath);
ImagePtr pOutImg = gtrans::flipXImg(pInImg);