Simd Library Documentation.

Home | Release Notes | Download | Documentation | Issues | GitHub
Image Transformation

Functions for image transformation (transposition, rotation). More...

Enumerations

enum  SimdTransformType {
  SimdTransformRotate0 = 0 ,
  SimdTransformRotate90 ,
  SimdTransformRotate180 ,
  SimdTransformRotate270 ,
  SimdTransformTransposeRotate0 ,
  SimdTransformTransposeRotate90 ,
  SimdTransformTransposeRotate180 ,
  SimdTransformTransposeRotate270
}
 

Functions

SIMD_API void SimdTransformImage (const uint8_t *src, size_t srcStride, size_t width, size_t height, size_t pixelSize, SimdTransformType transform, uint8_t *dst, size_t dstStride)
 Performs transformation of input image. The type of transformation is defined by SimdTransformType enumeration. More...
 
SIMD_INLINE Point< ptrdiff_t > TransformSize (const Point< ptrdiff_t > &size, ::SimdTransformType transform)
 Gets size of transformed image. More...
 
template<template< class > class A>
SIMD_INLINE void TransformImage (const View< A > &src, ::SimdTransformType transform, View< A > &dst)
 Performs transformation of input image. The type of transformation is defined by SimdTransformType enumeration. More...
 

Detailed Description

Functions for image transformation (transposition, rotation).

Enumeration Type Documentation

◆ SimdTransformType

Describes transform type used in function SimdTransformImage in order to describe result of transformation.

Enumerator
SimdTransformRotate0 

An original image. The output image has the same size as input image.

SimdTransformRotate90 

Image rotated 90 degrees counterclockwise. The output width and height are equal to the input height and widht.

SimdTransformRotate180 

Image rotated 180 degrees counterclockwise. The output image has the same size as input image.

SimdTransformRotate270 

Image rotated 270 degrees counterclockwise. The output width and height are equal to the input height and widht.

SimdTransformTransposeRotate0 

Transposed image. The output width and height are equal to the input height and widht.

SimdTransformTransposeRotate90 

Image transposed and rotated 90 degrees counterclockwise. It is equal to horizontal mirroring of image. The output image has the same size as input image.

SimdTransformTransposeRotate180 

Image transposed and rotated 180 degrees counterclockwise. The output width and height are equal to the input height and widht.

SimdTransformTransposeRotate270 

Image transposed and rotated 270 degrees counterclockwise. It is equal to vertical mirroring of image. The output image has the same size as input image.

Function Documentation

◆ SimdTransformImage()

void SimdTransformImage ( const uint8_t *  src,
size_t  srcStride,
size_t  width,
size_t  height,
size_t  pixelSize,
SimdTransformType  transform,
uint8_t *  dst,
size_t  dstStride 
)

Performs transformation of input image. The type of transformation is defined by SimdTransformType enumeration.

Note
This function has a C++ wrappers: Simd::TransformImage(const View<A> & src, ::SimdTransformType transform, View<A> & dst).
Parameters
[in]src- a pointer to pixels data of input image.
[in]srcStride- a row size of input image.
[in]width- an input image width.
[in]height- an input image height.
[in]pixelSize- a pixel size in input and output images. It can be 1, 2, 3, 4.
[in]transform- a type of image transformation.
[out]dst- a pointer to pixels data of output image.
[in]dstStride- a row size of output image.

◆ TransformSize()

Point< ptrdiff_t > TransformSize ( const Point< ptrdiff_t > &  size,
::SimdTransformType  transform 
)

Gets size of transformed image.

Parameters
[in]size- a size of input image.
[in]transform- a type of image transformation.
Returns
- the size of transformed image.

◆ TransformImage()

void TransformImage ( const View< A > &  src,
::SimdTransformType  transform,
View< A > &  dst 
)

Performs transformation of input image. The type of transformation is defined by SimdTransformType enumeration.

Note
This function is a C++ wrapper for function SimdTransformImage.
Parameters
[in]src- an input image.
[in]transform- a type of image transformation.
[out]dst- an output image.