Various mathematical operations with images. More...
Functions | |
SIMD_API void | SimdOperationBinary8u (const uint8_t *a, size_t aStride, const uint8_t *b, size_t bStride, size_t width, size_t height, size_t channelCount, uint8_t *dst, size_t dstStride, SimdOperationBinary8uType type) |
Performs given operation between two images. More... | |
SIMD_API void | SimdOperationBinary16i (const uint8_t *a, size_t aStride, const uint8_t *b, size_t bStride, size_t width, size_t height, uint8_t *dst, size_t dstStride, SimdOperationBinary16iType type) |
Performs given operation between two images. More... | |
SIMD_API void | SimdVectorProduct (const uint8_t *vertical, const uint8_t *horizontal, uint8_t *dst, size_t stride, size_t width, size_t height) |
Calculates result 8-bit gray image as product of two vectors. More... | |
template<template< class > class A> | |
SIMD_INLINE void | OperationBinary8u (const View< A > &a, const View< A > &b, View< A > &dst, SimdOperationBinary8uType type) |
Performs given operation between two images. More... | |
template<template< class > class A> | |
SIMD_INLINE void | OperationBinary16i (const View< A > &a, const View< A > &b, View< A > &dst, SimdOperationBinary16iType type) |
Performs given operation between two images. More... | |
template<template< class > class A> | |
SIMD_INLINE void | VectorProduct (const uint8_t *vertical, const uint8_t *horizontal, View< A > &dst) |
Calculates result 8-bit gray image as product of two vectors. More... | |
Detailed Description
Various mathematical operations with images.
Function Documentation
◆ SimdOperationBinary8u()
void SimdOperationBinary8u | ( | const uint8_t * | a, |
size_t | aStride, | ||
const uint8_t * | b, | ||
size_t | bStride, | ||
size_t | width, | ||
size_t | height, | ||
size_t | channelCount, | ||
uint8_t * | dst, | ||
size_t | dstStride, | ||
SimdOperationBinary8uType | type | ||
) |
Performs given operation between two images.
All images must have the same width, height and format (8-bit gray, 16-bit UV (UV plane of NV12 pixel format), 24-bit BGR or 32-bit BGRA).
- Note
- This function has a C++ wrappers: Simd::OperationBinary8u(const View<A>& a, const View<A>& b, View<A>& dst, SimdOperationBinary8uType type).
- Parameters
-
[in] a - a pointer to pixels data of the first input image. [in] aStride - a row size of the first image. [in] b - a pointer to pixels data of the second input image. [in] bStride - a row size of the second image. [in] width - an image width. [in] height - an image height. [in] channelCount - a channel count. [out] dst - a pointer to pixels data of output image. [in] dstStride - a row size of dst image. [in] type - a type of operation (see SimdOperationBinary8uType).
◆ SimdOperationBinary16i()
void SimdOperationBinary16i | ( | const uint8_t * | a, |
size_t | aStride, | ||
const uint8_t * | b, | ||
size_t | bStride, | ||
size_t | width, | ||
size_t | height, | ||
uint8_t * | dst, | ||
size_t | dstStride, | ||
SimdOperationBinary16iType | type | ||
) |
Performs given operation between two images.
All images must have the same width, height and SimdPixelFormatInt16 pixel format.
- Note
- This function has a C++ wrappers: Simd::OperationBinary16i(const View<A>& a, const View<A>& b, View<A>& dst, SimdOperationBinary16iType type).
- Parameters
-
[in] a - a pointer to pixels data of the first input image. [in] aStride - a row size of the first image. [in] b - a pointer to pixels data of the second input image. [in] bStride - a row size of the second image. [in] width - an image width. [in] height - an image height. [out] dst - a pointer to pixels data of output image. [in] dstStride - a row size of dst image. [in] type - a type of operation (see SimdOperationBinary16iType).
◆ SimdVectorProduct()
void SimdVectorProduct | ( | const uint8_t * | vertical, |
const uint8_t * | horizontal, | ||
uint8_t * | dst, | ||
size_t | stride, | ||
size_t | width, | ||
size_t | height | ||
) |
Calculates result 8-bit gray image as product of two vectors.
For all points:
dst[x, y] = horizontal[x]*vertical[y]/255;
- Note
- This function has a C++ wrappers: Simd::VectorProduct(const uint8_t * vertical, const uint8_t * horizontal, View<A>& dst).
- Parameters
-
[in] vertical - a pointer to pixels data of vertical vector. It length is equal to result image height. [in] horizontal - a pointer to pixels data of horizontal vector. It length is equal to result image width. [out] dst - a pointer to pixels data of result image. [in] stride - a row size of dst image. [in] width - an image width. [in] height - an image height.
◆ OperationBinary8u()
void OperationBinary8u | ( | const View< A > & | a, |
const View< A > & | b, | ||
View< A > & | dst, | ||
SimdOperationBinary8uType | type | ||
) |
Performs given operation between two images.
All images must have the same width, height and format (8-bit gray, 16-bit UV (UV plane of NV12 pixel format), 24-bit BGR or 32-bit BGRA).
- Note
- This function is a C++ wrapper for function SimdOperationBinary8u.
- Parameters
-
[in] a - a first input image. [in] b - a second input image. [out] dst - an output image. [in] type - a type of operation (see SimdOperationBinary8uType).
◆ OperationBinary16i()
void OperationBinary16i | ( | const View< A > & | a, |
const View< A > & | b, | ||
View< A > & | dst, | ||
SimdOperationBinary16iType | type | ||
) |
Performs given operation between two images.
All images must have the same width, height and Simd::View::Int16 pixel format.
- Note
- This function is a C++ wrapper for function SimdOperationBinary16i.
- Parameters
-
[in] a - a first input image. [in] b - a second input image. [out] dst - an output image. [in] type - a type of operation (see SimdOperationBinary16iType).
◆ VectorProduct()
void VectorProduct | ( | const uint8_t * | vertical, |
const uint8_t * | horizontal, | ||
View< A > & | dst | ||
) |
Calculates result 8-bit gray image as product of two vectors.
For all points:
dst[x, y] = horizontal[x]*vertical[y]/255;
- Note
- This function is a C++ wrapper for function SimdVectorProduct.
- Parameters
-
[in] vertical - a pointer to pixels data of vertical vector. It length is equal to result image height. [in] horizontal - a pointer to pixels data of horizontal vector. It length is equal to result image width. [out] dst - a result image.