Simd Library Documentation.

Home | Release Notes | Download | Documentation | Forum | SourceForge | GitHub

Functions for Bayer image conversions. More...

Functions

SIMD_API void SimdBayerToBgr (const uint8_t *bayer, size_t width, size_t height, size_t bayerStride, SimdPixelFormatType bayerFormat, uint8_t *bgr, size_t bgrStride)
 Converts 8-bit Bayer image to 24-bit BGR. More...
 
SIMD_API void SimdBayerToBgra (const uint8_t *bayer, size_t width, size_t height, size_t bayerStride, SimdPixelFormatType bayerFormat, uint8_t *bgra, size_t bgraStride, uint8_t alpha)
 Converts 8-bit Bayer image to 32-bit BGRA. More...
 
template<template< class > class A>
SIMD_INLINE void BayerToBgr (const View< A > &bayer, View< A > &bgr)
 Converts 8-bit Bayer image to 24-bit BGR. More...
 
template<template< class > class A>
SIMD_INLINE void BayerToBgra (const View< A > &bayer, View< A > &bgra, uint8_t alpha=0xFF)
 Converts 8-bit Bayer image to 32-bit BGRA. More...
 

Detailed Description

Functions for Bayer image conversions.

Function Documentation

void SimdBayerToBgr ( const uint8_t *  bayer,
size_t  width,
size_t  height,
size_t  bayerStride,
SimdPixelFormatType  bayerFormat,
uint8_t *  bgr,
size_t  bgrStride 
)

Converts 8-bit Bayer image to 24-bit BGR.

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::BayerToBgr(const View<A>& bayer, View<A>& bgr).
Parameters
[in]bayer- a pointer to pixels data of input 8-bit Bayer image.
[in]width- an image width.
[in]height- an image height.
[in]bayerStride- a row size of the bayer image.
[in]bayerFormat- a format of the input bayer image. It can be SimdPixelFormatBayerGrbg, SimdPixelFormatBayerGbrg, SimdPixelFormatBayerRggb or SimdPixelFormatBayerBggr.
[out]bgr- a pointer to pixels data of output 24-bit BGR image.
[in]bgrStride- a row size of the bgr image.
void SimdBayerToBgra ( const uint8_t *  bayer,
size_t  width,
size_t  height,
size_t  bayerStride,
SimdPixelFormatType  bayerFormat,
uint8_t *  bgra,
size_t  bgraStride,
uint8_t  alpha 
)

Converts 8-bit Bayer image to 32-bit BGRA.

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::BayerToBgra(const View<A>& bayer, View<A>& bgra, uint8_t alpha).
Parameters
[in]bayer- a pointer to pixels data of input 8-bit Bayer image.
[in]width- an image width.
[in]height- an image height.
[in]bayerStride- a row size of the bayer image.
[in]bayerFormat- a format of the input bayer image. It can be SimdPixelFormatBayerGrbg, SimdPixelFormatBayerGbrg, SimdPixelFormatBayerRggb or SimdPixelFormatBayerBggr.
[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.
void BayerToBgr ( const View< A > &  bayer,
View< A > &  bgr 
)

Converts 8-bit Bayer image to 24-bit BGR.

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 SimdBayerToBgr.
Parameters
[in]bayer- an input 8-bit Bayer image.
[out]bgr- an output 24-bit BGR image.
void BayerToBgra ( const View< A > &  bayer,
View< A > &  bgra,
uint8_t  alpha = 0xFF 
)

Converts 8-bit Bayer image to 32-bit BGRA.

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 SimdBayerToBgra.
Parameters
[in]bayer- an input 8-bit Bayer image.
[out]bgra- an output 32-bit BGRA image.
[in]alpha- a value of alpha channel. It is equal to 256 by default.