Functions for BGR-24 image conversions. More...
Functions | |
SIMD_API void | SimdBgrToBayer (const uint8_t *bgr, size_t width, size_t height, size_t bgrStride, uint8_t *bayer, size_t bayerStride, SimdPixelFormatType bayerFormat) |
Converts 24-bit BGR image to 8-bit Bayer image. More... | |
SIMD_API void | SimdBgrToBgra (const uint8_t *bgr, size_t width, size_t height, size_t bgrStride, uint8_t *bgra, size_t bgraStride, uint8_t alpha) |
Converts 24-bit BGR image to 32-bit BGRA image. More... | |
SIMD_API void | SimdBgrToGray (const uint8_t *bgr, size_t width, size_t height, size_t bgrStride, uint8_t *gray, size_t grayStride) |
Converts 24-bit BGR image to 8-bit gray image. More... | |
SIMD_API void | SimdBgrToHsl (const uint8_t *bgr, size_t width, size_t height, size_t bgrStride, uint8_t *hsl, size_t hslStride) |
Converts 24-bit BGR image to 24-bit HSL(Hue, Saturation, Lightness) image. More... | |
SIMD_API void | SimdBgrToHsv (const uint8_t *bgr, size_t width, size_t height, size_t bgrStride, uint8_t *hsv, size_t hsvStride) |
Converts 24-bit BGR image to 24-bit HSV(Hue, Saturation, Value) image. More... | |
SIMD_API void | SimdBgrToRgb (const uint8_t *bgr, size_t width, size_t height, size_t bgrStride, uint8_t *rgb, size_t rgbStride) |
Converts 24-bit BGR image to 24-bit RGB image. Also it can be used for 24-bit RGB to 24-bit BGR conversion. More... | |
SIMD_API void | SimdBgrToYuv420pV2 (const uint8_t *bgr, size_t bgrStride, size_t width, size_t height, uint8_t *y, size_t yStride, uint8_t *u, size_t uStride, uint8_t *v, size_t vStride, SimdYuvType yuvType) |
Converts 24-bit BGR image to YUV420P. More... | |
SIMD_API void | SimdBgrToYuv422pV2 (const uint8_t *bgr, size_t bgrStride, size_t width, size_t height, uint8_t *y, size_t yStride, uint8_t *u, size_t uStride, uint8_t *v, size_t vStride, SimdYuvType yuvType) |
Converts 24-bit BGR image to YUV422P. More... | |
SIMD_API void | SimdBgrToYuv444pV2 (const uint8_t *bgr, size_t bgrStride, size_t width, size_t height, uint8_t *y, size_t yStride, uint8_t *u, size_t uStride, uint8_t *v, size_t vStride, SimdYuvType yuvType) |
Converts 24-bit BGR image to YUV444P. More... | |
template<template< class > class A> | |
SIMD_INLINE void | BgrToBayer (const View< A > &bgr, View< A > &bayer) |
Converts 24-bit BGR image to 8-bit Bayer image. More... | |
template<template< class > class A> | |
SIMD_INLINE void | BgrToBgra (const View< A > &bgr, View< A > &bgra, uint8_t alpha=0xFF) |
Converts 24-bit BGR image to 32-bit BGRA image. More... | |
template<template< class > class A> | |
SIMD_INLINE void | BgrToGray (const View< A > &bgr, View< A > &gray) |
Converts 24-bit BGR image to 8-bit gray image. More... | |
template<template< class > class A> | |
SIMD_INLINE void | BgrToHsl (const View< A > &bgr, View< A > &hsl) |
Converts 24-bit BGR image to 24-bit HSL(Hue, Saturation, Lightness) image. More... | |
template<template< class > class A> | |
SIMD_INLINE void | BgrToHsv (const View< A > &bgr, View< A > &hsv) |
Converts 24-bit BGR image to 24-bit HSV(Hue, Saturation, Value) image. More... | |
template<template< class > class A> | |
SIMD_INLINE void | BgrToRgb (const View< A > &bgr, View< A > &rgb) |
Converts 24-bit BGR image to 24-bit RGB image. More... | |
template<template< class > class A> | |
SIMD_INLINE void | BgrToRgba (const View< A > &bgr, View< A > &rgba, uint8_t alpha=0xFF) |
Converts 24-bit BGR image to 32-bit RGBA image. More... | |
template<template< class > class A> | |
SIMD_INLINE void | BgrToYuv420p (const View< A > &bgr, View< A > &y, View< A > &u, View< A > &v, SimdYuvType yuvType=SimdYuvBt601) |
Converts 24-bit BGR image to YUV420P. More... | |
template<template< class > class A> | |
SIMD_INLINE void | BgrToYuv422p (const View< A > &bgr, View< A > &y, View< A > &u, View< A > &v, SimdYuvType yuvType=SimdYuvBt601) |
Converts 24-bit BGR image to YUV422P. More... | |
template<template< class > class A> | |
SIMD_INLINE void | BgrToYuv444p (const View< A > &bgr, View< A > &y, View< A > &u, View< A > &v, SimdYuvType yuvType=SimdYuvBt601) |
Converts 24-bit BGR image to YUV444P. More... | |
Detailed Description
Functions for BGR-24 image conversions.
Function Documentation
◆ SimdBgrToBayer()
void SimdBgrToBayer | ( | const uint8_t * | bgr, |
size_t | width, | ||
size_t | height, | ||
size_t | bgrStride, | ||
uint8_t * | bayer, | ||
size_t | bayerStride, | ||
SimdPixelFormatType | bayerFormat | ||
) |
Converts 24-bit BGR image to 8-bit Bayer image.
All images must have the same width and height. The width and the height must be even.
- Note
- This function has a C++ wrapper Simd::BgrToBayer(const View<A>& bgr, View<A>& bayer).
- Parameters
-
[in] bgr - a pointer to pixels data of input 24-bit BGR image. [in] width - an image width. [in] height - an image height. [in] bgrStride - a row size of the bgr image. [out] bayer - a pointer to pixels data of output 8-bit Bayer image. [in] bayerStride - a row size of the bayer image. [in] bayerFormat - a format of the output bayer image. It can be SimdPixelFormatBayerGrbg, SimdPixelFormatBayerGbrg, SimdPixelFormatBayerRggb or SimdPixelFormatBayerBggr.
◆ SimdBgrToBgra()
void SimdBgrToBgra | ( | const uint8_t * | bgr, |
size_t | width, | ||
size_t | height, | ||
size_t | bgrStride, | ||
uint8_t * | bgra, | ||
size_t | bgraStride, | ||
uint8_t | alpha | ||
) |
Converts 24-bit BGR image to 32-bit BGRA image.
All images must have the same width and height.
- Note
- This function has a C++ wrapper Simd::BgrToBgra(const View<A>& bgr, View<A>& bgra, uint8_t alpha).
- Parameters
-
[in] bgr - a pointer to pixels data of input 24-bit BGR image. [in] width - an image width. [in] height - an image height. [in] bgrStride - a row size of the bgr image. [out] bgra - a pointer to pixels data of output 32-bit BGRA image. [in] bgraStride - a row size of the bgra image. [in] alpha - a value of alpha channel.
◆ SimdBgrToGray()
void SimdBgrToGray | ( | const uint8_t * | bgr, |
size_t | width, | ||
size_t | height, | ||
size_t | bgrStride, | ||
uint8_t * | gray, | ||
size_t | grayStride | ||
) |
Converts 24-bit BGR image to 8-bit gray image.
All images must have the same width and height.
- Note
- This function has a C++ wrapper Simd::BgrToGray(const View<A>& bgr, View<A>& gray).
- Parameters
-
[in] bgr - a pointer to pixels data of input 24-bit BGR image. [in] width - an image width. [in] height - an image height. [in] bgrStride - a row size of the bgr image. [out] gray - a pointer to pixels data of output 8-bit gray image. [in] grayStride - a row size of the gray image.
◆ SimdBgrToHsl()
void SimdBgrToHsl | ( | const uint8_t * | bgr, |
size_t | width, | ||
size_t | height, | ||
size_t | bgrStride, | ||
uint8_t * | hsl, | ||
size_t | hslStride | ||
) |
Converts 24-bit BGR image to 24-bit HSL(Hue, Saturation, Lightness) image.
All images must have the same width and height.
- Note
- This function has a C++ wrapper Simd::BgrToHsl(const View<A>& bgr, View<A>& hsl).
- Parameters
-
[in] bgr - a pointer to pixels data of input 24-bit BGR image. [in] width - an image width. [in] height - an image height. [in] bgrStride - a row size of the bgr image. [out] hsl - a pointer to pixels data of output 24-bit HSL image. [in] hslStride - a row size of the hsl image.
◆ SimdBgrToHsv()
void SimdBgrToHsv | ( | const uint8_t * | bgr, |
size_t | width, | ||
size_t | height, | ||
size_t | bgrStride, | ||
uint8_t * | hsv, | ||
size_t | hsvStride | ||
) |
Converts 24-bit BGR image to 24-bit HSV(Hue, Saturation, Value) image.
All images must have the same width and height.
- Note
- This function has a C++ wrapper Simd::BgrToHsv(const View<A>& bgr, View<A>& hsv).
- Parameters
-
[in] bgr - a pointer to pixels data of input 24-bit BGR image. [in] width - an image width. [in] height - an image height. [in] bgrStride - a row size of the bgr image. [out] hsv - a pointer to pixels data of output 24-bit HSV image. [in] hsvStride - a row size of the hsv image.
◆ SimdBgrToRgb()
void SimdBgrToRgb | ( | const uint8_t * | bgr, |
size_t | width, | ||
size_t | height, | ||
size_t | bgrStride, | ||
uint8_t * | rgb, | ||
size_t | rgbStride | ||
) |
Converts 24-bit BGR image to 24-bit RGB image. Also it can be used for 24-bit RGB to 24-bit BGR conversion.
All images must have the same width and height.
- Note
- This function has C++ wrappers: Simd::BgrToRgb(const View<A> & bgr, View<A> & rgb) and Simd::RgbToBgr(const View<A>& rgb, View<A>& bgr).
- Parameters
-
[in] bgr - a pointer to pixels data of input 24-bit BGR image (or 24-bit RGB image). [in] width - an image width. [in] height - an image height. [in] bgrStride - a row size of the bgr image. [out] rgb - a pointer to pixels data of output 24-bit RGB image (or 24-bit BGR image). [in] rgbStride - a row size of the rgb image.
◆ SimdBgrToYuv420pV2()
void SimdBgrToYuv420pV2 | ( | const uint8_t * | bgr, |
size_t | bgrStride, | ||
size_t | width, | ||
size_t | height, | ||
uint8_t * | y, | ||
size_t | yStride, | ||
uint8_t * | u, | ||
size_t | uStride, | ||
uint8_t * | v, | ||
size_t | vStride, | ||
SimdYuvType | yuvType | ||
) |
Converts 24-bit BGR image to YUV420P.
The input BGR and output Y images must have the same width and height. The input U and V images must have the same width and height (half size relative to Y component).
- Note
- This function has a C++ wrapper Simd::BgrToYuv420p(const View& bgr, View& y, View& u, View& v, SimdYuvType yuvType = SimdYuvBt601).
- Parameters
-
[in] bgr - a pointer to pixels data of input 24-bit BGR image. [in] bgrStride - a row size of the BGR image. [in] width - an image width. [in] height - an image height. [out] y - a pointer to pixels data of output 8-bit image with Y color plane. [in] yStride - a row size of the y image. [out] u - a pointer to pixels data of output 8-bit image with U color plane. [in] uStride - a row size of the u image. [out] v - a pointer to pixels data of output 8-bit image with V color plane. [in] vStride - a row size of the v image. [in] yuvType - a type of output YUV image (see descriprion of SimdYuvType).
◆ SimdBgrToYuv422pV2()
void SimdBgrToYuv422pV2 | ( | const uint8_t * | bgr, |
size_t | bgrStride, | ||
size_t | width, | ||
size_t | height, | ||
uint8_t * | y, | ||
size_t | yStride, | ||
uint8_t * | u, | ||
size_t | uStride, | ||
uint8_t * | v, | ||
size_t | vStride, | ||
SimdYuvType | yuvType | ||
) |
Converts 24-bit BGR image to YUV422P.
The input BGR and output Y images must have the same width and height. The input U and V images must have the same width and height (their width is equal to half width of Y component).
- Note
- This function has a C++ wrapper Simd::BgrToYuv422p(const View& bgr, View& y, View& u, View& v, SimdYuvType yuvType = SimdYuvBt601).
- Parameters
-
[in] bgr - a pointer to pixels data of input 24-bit BGR image. [in] bgrStride - a row size of the BGR image. [in] width - an image width. [in] height - an image height. [out] y - a pointer to pixels data of output 8-bit image with Y color plane. [in] yStride - a row size of the y image. [out] u - a pointer to pixels data of output 8-bit image with U color plane. [in] uStride - a row size of the u image. [out] v - a pointer to pixels data of output 8-bit image with V color plane. [in] vStride - a row size of the v image. [in] yuvType - a type of output YUV image (see descriprion of SimdYuvType).
◆ SimdBgrToYuv444pV2()
void SimdBgrToYuv444pV2 | ( | const uint8_t * | bgr, |
size_t | bgrStride, | ||
size_t | width, | ||
size_t | height, | ||
uint8_t * | y, | ||
size_t | yStride, | ||
uint8_t * | u, | ||
size_t | uStride, | ||
uint8_t * | v, | ||
size_t | vStride, | ||
SimdYuvType | yuvType | ||
) |
Converts 24-bit BGR image to YUV444P.
The input BGR and output Y, U and V images must have the same width and height.
- Note
- This function has a C++ wrapper Simd::BgrToYuv444p(const View& bgr, View& y, View& u, View& v, SimdYuvType yuvType = SimdYuvBt601).
- Parameters
-
[in] bgr - a pointer to pixels data of input 24-bit BGR image. [in] bgrStride - a row size of the BGR image. [in] width - an image width. [in] height - an image height. [out] y - a pointer to pixels data of output 8-bit image with Y color plane. [in] yStride - a row size of the y image. [out] u - a pointer to pixels data of output 8-bit image with U color plane. [in] uStride - a row size of the u image. [out] v - a pointer to pixels data of output 8-bit image with V color plane. [in] vStride - a row size of the v image. [in] yuvType - a type of output YUV image (see descriprion of SimdYuvType).
◆ BgrToBayer()
Converts 24-bit BGR image to 8-bit Bayer image.
All images must have the same width and height. The width and the height must be even.
- Note
- This function is a C++ wrapper for function SimdBgrToBayer.
- Parameters
-
[in] bgr - an input 24-bit BGR image. [out] bayer - an output 8-bit Bayer image.
◆ BgrToBgra()
Converts 24-bit BGR image to 32-bit BGRA image.
All images must have the same width and height.
- Note
- This function is a C++ wrapper for function SimdBgrToBgra.
- Parameters
-
[in] bgr - an input 24-bit BGR image. [out] bgra - an output 32-bit BGRA image. [in] alpha - a value of alpha channel. It is equal to 256 by default.
◆ BgrToGray()
Converts 24-bit BGR image to 8-bit gray image.
All images must have the same width and height.
- Note
- This function is a C++ wrapper for function SimdBgrToGray.
- Parameters
-
[in] bgr - an input 24-bit BGR image. [out] gray - an output 8-bit gray image.
◆ BgrToHsl()
Converts 24-bit BGR image to 24-bit HSL(Hue, Saturation, Lightness) image.
All images must have the same width and height.
- Note
- This function is a C++ wrapper for function SimdBgrToHsl.
- Parameters
-
[in] bgr - an input 24-bit BGR image. [out] hsl - an output 24-bit HSL image.
◆ BgrToHsv()
Converts 24-bit BGR image to 24-bit HSV(Hue, Saturation, Value) image.
All images must have the same width and height.
- Note
- This function is a C++ wrapper for function SimdBgrToHsv.
- Parameters
-
[in] bgr - an input 24-bit BGR image. [out] hsv - an output 24-bit HSV image.
◆ BgrToRgb()
Converts 24-bit BGR image to 24-bit RGB image.
All images must have the same width and height.
- Note
- This function is a C++ wrapper for function SimdBgrToRgb.
- Parameters
-
[in] bgr - an input 24-bit BGR image. [out] rgb - an output 24-bit RGB image.
◆ BgrToRgba()
Converts 24-bit BGR image to 32-bit RGBA image.
All images must have the same width and height.
- Note
- This function is a C++ wrapper for function SimdRgbToBgra.
- Parameters
-
[in] bgr - an input 24-bit BGR image. [out] rgba - an output 32-bit RGBA image. [in] alpha - a value of alpha channel. It is equal to 256 by default.
◆ BgrToYuv420p()
void BgrToYuv420p | ( | const View< A > & | bgr, |
View< A > & | y, | ||
View< A > & | u, | ||
View< A > & | v, | ||
SimdYuvType | yuvType = SimdYuvBt601 |
||
) |
Converts 24-bit BGR image to YUV420P.
The input BGR and output Y images must have the same width and height. The input U and V images must have the same width and height (half size relative to Y component).
- Note
- This function is a C++ wrapper for function SimdBgrToYuv420pV2.
- Parameters
-
[in] bgr - an input 24-bit BGR image. [out] y - an output 8-bit image with Y color plane. [out] u - an output 8-bit image with U color plane. [out] v - an output 8-bit image with V color plane. [in] yuvType - a type of input YUV image (see descriprion of SimdYuvType).By default it is equal to SimdYuvBt601.
◆ BgrToYuv422p()
void BgrToYuv422p | ( | const View< A > & | bgr, |
View< A > & | y, | ||
View< A > & | u, | ||
View< A > & | v, | ||
SimdYuvType | yuvType = SimdYuvBt601 |
||
) |
Converts 24-bit BGR image to YUV422P.
The input BGR and output Y images must have the same width and height. The input U and V images must have the same width and height (their width is equal to half width of Y component).
- Note
- This function is a C++ wrapper for function SimdBgrToYuv422pV2.
- Parameters
-
[in] bgr - an input 24-bit BGR image. [out] y - an output 8-bit image with Y color plane. [out] u - an output 8-bit image with U color plane. [out] v - an output 8-bit image with V color plane. [in] yuvType - a type of input YUV image (see descriprion of SimdYuvType).By default it is equal to SimdYuvBt601.
◆ BgrToYuv444p()
void BgrToYuv444p | ( | const View< A > & | bgr, |
View< A > & | y, | ||
View< A > & | u, | ||
View< A > & | v, | ||
SimdYuvType | yuvType = SimdYuvBt601 |
||
) |
Converts 24-bit BGR image to YUV444P.
The input BGR and output Y, U and V images must have the same width and height.
- Note
- This function is a C++ wrapper for function SimdBgrToYuv444pV2.
- Parameters
-
[in] bgr - an input 24-bit BGR image. [out] y - an output 8-bit image with Y color plane. [out] u - an output 8-bit image with U color plane. [out] v - an output 8-bit image with V color plane. [in] yuvType - a type of input YUV image (see descriprion of SimdYuvType).By default it is equal to SimdYuvBt601.