Functions for image transformation (transposition, rotation). More...
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) |
| Copies, rotates, mirrors or transposes an image according to SimdTransformType. 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
| enum SimdTransformType |
Describes image transform type used by SimdTransformImage.
The transform maps an input image to an output image with the same pixel size. SimdTransformRotate90, SimdTransformRotate270, SimdTransformTransposeRotate0 and SimdTransformTransposeRotate180 swap output width and height. The other transform types keep the original size.
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 | ||
| ) |
Copies, rotates, mirrors or transposes an image according to SimdTransformType.
The function supports pixels with size 1, 2, 3 or 4 bytes. For SimdTransformRotate0, SimdTransformRotate180, SimdTransformTransposeRotate90 and SimdTransformTransposeRotate270 the output image has the same width and height as the input image. For SimdTransformRotate90, SimdTransformRotate270, SimdTransformTransposeRotate0 and SimdTransformTransposeRotate180 the output image width and height are equal to input height and width.
- 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.