IDS peak IPL  v1.7.0
peak::ipl::ImageTransformer Class Referencefinal

Performs transformations like mirror and rotate on images. More...

#include <peak_ipl/algorithm/peak_ipl_image_transformer.hpp>

Public Types

enum  RotationAngle : uint16_t {
  RotationAngle::Degree90Counterclockwise = 90,
  RotationAngle::Degree90Clockwise = 270,
  RotationAngle::Degree180 = 180
}
 Angle parameter for the Rotation algorithm. More...
 

Public Member Functions

 ImageTransformer ()
 
 ~ImageTransformer ()
 
 ImageTransformer (const ImageTransformer &other)=delete
 
ImageTransformer & operator= (const ImageTransformer &other)=delete
 
 ImageTransformer (ImageTransformer &&other) noexcept
 
ImageTransformer & operator= (ImageTransformer &&other) noexcept
 
Image MirrorUpDown (const Image &inputImage) const
 Mirrors the input image in up-down direction. More...
 
Image MirrorLeftRight (const Image &inputImage) const
 Mirrors the input image in left-right direction. More...
 
Image MirrorUpDownLeftRight (const Image &inputImage) const
 Mirrors the input image in up-down and left-right direction. More...
 
void MirrorUpDownInPlace (Image &image) const
 Mirrors the given image in up-down direction in place i.e. it will change the input image itself. More...
 
void MirrorLeftRightInPlace (Image &image) const
 Mirrors the given image in left-right direction in place i.e. it will change the input image itself. More...
 
void MirrorUpDownLeftRightInPlace (Image &image) const
 Mirrors the given image in up-down and left-right direction in place i.e. it will change the input image itself. More...
 
Image Rotate (const Image &inputImage, RotationAngle rotationAngle) const
 Rotate the input image with the given rotationAngle. More...
 
void RotateInPlace (Image &image, RotationAngle rotationAngle) const
 Rotate the input image with the given rotationAngle. More...
 

Detailed Description

Performs transformations like mirror and rotate on images.

Note
To speed up processing instances of this class maintain internal memory pools to reuse memory instead of allocating new memory for each transformation. The memory is freed when the instance is destroyed.

Member Enumeration Documentation

◆ RotationAngle

Angle parameter for the Rotation algorithm.

The enum holding the possible rotation angles and the rotation direction.

Enumerator
Degree90Counterclockwise 
Degree90Clockwise 
Degree180 

Constructor & Destructor Documentation

◆ ImageTransformer() [1/3]

peak::ipl::ImageTransformer::ImageTransformer ( )
inline

◆ ~ImageTransformer()

peak::ipl::ImageTransformer::~ImageTransformer ( )
inline

◆ ImageTransformer() [2/3]

peak::ipl::ImageTransformer::ImageTransformer ( const ImageTransformer &  other)
delete

◆ ImageTransformer() [3/3]

peak::ipl::ImageTransformer::ImageTransformer ( ImageTransformer &&  other)
inlinenoexcept

Member Function Documentation

◆ MirrorLeftRight()

Image peak::ipl::ImageTransformer::MirrorLeftRight ( const Image &  inputImage) const
inline

Mirrors the input image in left-right direction.

If the transformed image is a bayer-format image and the number of columns is even, the format will change. (e.g. BayerBG8 -> BayerGB8)

Parameters
[in]inputImageThe handle to the created image.
Returns
A new created image containing the data of the input image mirrored in left-right direction
Exceptions
ImageFormatNotSupportedExceptioninputImage has packed pixel format
ExceptionAn internal error has occurred.
Since
1.0
1.2 Will throw ImageFormatNotSupportedException if inputImage has packed pixel format

◆ MirrorLeftRightInPlace()

void peak::ipl::ImageTransformer::MirrorLeftRightInPlace ( Image &  image) const
inline

Mirrors the given image in left-right direction in place i.e. it will change the input image itself.

If the transformed image is a bayer-format image and the number of columns is even, the format will change. (e.g. BayerBG8 -> BayerGB8)

Parameters
[in,out]imageThe handle to the image to mirror
Exceptions
ImageFormatNotSupportedExceptionimage has packed pixel format
ExceptionAn internal error has occurred.
Since
1.0
1.2 Will throw ImageFormatNotSupportedException if image has packed pixel format

◆ MirrorUpDown()

Image peak::ipl::ImageTransformer::MirrorUpDown ( const Image &  inputImage) const
inline

Mirrors the input image in up-down direction.

If the transformed image is a bayer-format image and the number of rows is even, the format will change. (e.g. BayerBG8 -> BayerGR8)

Parameters
[in]inputImageThe handle to the created image.
Returns
A new created image containing the data of the input image mirrored in up-down direction
Exceptions
ImageFormatNotSupportedExceptioninputImage has packed pixel format
ExceptionAn internal error has occurred.
Since
1.0
1.2 Will throw ImageFormatNotSupportedException if inputImage has packed pixel format

◆ MirrorUpDownInPlace()

void peak::ipl::ImageTransformer::MirrorUpDownInPlace ( Image &  image) const
inline

Mirrors the given image in up-down direction in place i.e. it will change the input image itself.

If the transformed image is a bayer-format image and the number of rows is even, the format will change. (e.g. BayerBG8 -> BayerGR8)

Parameters
[in,out]imageThe handle to the image to mirror
Exceptions
ImageFormatNotSupportedExceptionimage has packed pixel format
ExceptionAn internal error has occurred.
Since
1.0
1.2 Will throw ImageFormatNotSupportedException if image has packed pixel format

◆ MirrorUpDownLeftRight()

Image peak::ipl::ImageTransformer::MirrorUpDownLeftRight ( const Image &  inputImage) const
inline

Mirrors the input image in up-down and left-right direction.

If the transformed image is a bayer-format image and the number of rows or columns are even, the format will change. (e.g. BayerBG8 -> BayerRG8)

Parameters
[in]inputImageThe handle to the created image.
Returns
A new created image containing the data of the input image mirrored in up-down and left-right direction
Exceptions
ImageFormatNotSupportedExceptioninputImage has packed pixel format
ExceptionAn internal error has occurred.
Since
1.0
1.2 Will throw ImageFormatNotSupportedException if inputImage has packed pixel format

◆ MirrorUpDownLeftRightInPlace()

void peak::ipl::ImageTransformer::MirrorUpDownLeftRightInPlace ( Image &  image) const
inline

Mirrors the given image in up-down and left-right direction in place i.e. it will change the input image itself.

If the transformed image is a bayer-format image and the number of rows or columns are even, the format will change. (e.g. BayerBG8 -> BayerRG8)

Parameters
[in,out]imageThe handle to the image to mirror
Exceptions
ImageFormatNotSupportedExceptionimage has packed pixel format
ExceptionAn internal error has occurred.
Since
1.0
1.2 Will throw ImageFormatNotSupportedException if image has packed pixel format

◆ operator=() [1/2]

ImageTransformer& peak::ipl::ImageTransformer::operator= ( const ImageTransformer &  other)
delete

◆ operator=() [2/2]

ImageTransformer & peak::ipl::ImageTransformer::operator= ( ImageTransformer &&  other)
inlinenoexcept

◆ Rotate()

Image peak::ipl::ImageTransformer::Rotate ( const Image &  inputImage,
RotationAngle  rotationAngle 
) const
inline

Rotate the input image with the given rotationAngle.

If the transformed image is a bayer-format image and the number of rows or columns are even, the format will change. (e.g. BayerBG8 -> BayerRG8)

Parameters
[in]inputImageThe handle to the created image.
[in]rotationAngleThe rotation angle.
Returns
A new created image containing the data of the input image rotated with the given rotationAngle
Exceptions
ImageFormatNotSupportedExceptioninputImage has packed pixel format
ExceptionAn internal error has occurred.
Since
1.2

◆ RotateInPlace()

void peak::ipl::ImageTransformer::RotateInPlace ( Image &  image,
RotationAngle  rotationAngle 
) const
inline

Rotate the input image with the given rotationAngle.

If the transformed image is a bayer-format image and the number of rows or columns are even, the format will change. (e.g. BayerBG8 -> BayerRG8)

Parameters
[in,out]imageThe handle to the created image.
[in]rotationAngleThe rotation angle.
Exceptions
ImageFormatNotSupportedExceptionimage has packed pixel format
ExceptionAn internal error has occurred.
Since
1.2

The documentation for this class was generated from the following file: