Image Component Library (ICL)
|
Utiltity class for bayer pattern conversion. More...
#include <BayerConverter.h>
Public Types | |
enum | bayerConverterMethod { nearestNeighbor = 0, simple, bilinear, hqLinear, edgeSense, vng } |
enum | bayerPattern { bayerPattern_RGGB = 512, bayerPattern_GBRG, bayerPattern_GRBG, bayerPattern_BGGR } |
Public Member Functions | |
BayerConverter (const std::string &pattern="RGGB", const std::string &method="bilinear") | |
creates a bayer converter with given string-based parameters More... | |
BayerConverter (bayerPattern eBayerPattern, bayerConverterMethod eConvMethod=bilinear, const utils::Size &sizeHint=utils::Size::null) | |
creates a new BayerConverter instances More... | |
~BayerConverter () | |
void | apply (const Img8u *src, ImgBase **dst) |
converts the source image with bayer pattern into the More... | |
void | setBayerPattern (bayerPattern eBayerPattern) |
void | setConverterMethod (bayerConverterMethod eConvMethod) |
void | setBayerPattern (const std::string &pattern) |
void | setMethod (const std::string &method) |
Static Public Member Functions | |
static std::string | translateBayerConverterMethod (bayerConverterMethod ebcm) |
static bayerConverterMethod | translateBayerConverterMethod (std::string sbcm) |
static std::string | translateBayerPattern (bayerPattern ebp) |
static bayerPattern | translateBayerPattern (std::string sbp) |
static void | convert_bayer_to_gray (const Img8u &src, Img8u &dst, const std::string &pattern) |
static utility method to convert a given bayer image to grayscale More... | |
Private Member Functions | |
void | nnInterpolation (const Img8u *poBayerImg) |
void | bilinearInterpolation (const Img8u *poBayerImg) |
void | hqLinearInterpolation (const Img8u *poBayerImg) |
void | edgeSenseInterpolation (const Img8u *poBayerImg) |
void | simpleInterpolation (const Img8u *poBayerImg) |
void | nnInterpolationIpp (const Img8u *poBayerImg) |
void | clearBorders (icl8u *rgb, int sx, int sy, int w) |
void | clip (int *iIn, icl8u *iOut) |
Private Attributes | |
std::vector< icl8u > | m_buffer |
internal buffer; More... | |
bayerConverterMethod | m_eConvMethod |
bayerPattern | m_eBayerPattern |
IppiBayerGrid | m_IppBayerPattern |
Additional Inherited Members | |
Protected Member Functions inherited from icl::utils::Uncopyable | |
Uncopyable () | |
Empty base constructor. More... | |
Utiltity class for bayer pattern conversion.
The internal implementation was basically taken from the libdc files
icl::core::BayerConverter::BayerConverter | ( | const std::string & | pattern = "RGGB" , |
const std::string & | method = "bilinear" |
||
) |
creates a bayer converter with given string-based parameters
icl::core::BayerConverter::BayerConverter | ( | bayerPattern | eBayerPattern, |
bayerConverterMethod | eConvMethod = bilinear , |
||
const utils::Size & | sizeHint = utils::Size::null |
||
) |
creates a new BayerConverter instances
The given size hint can be used to accellerate the first apply call, where the internal working buffer's size is adapted on demand
icl::core::BayerConverter::~BayerConverter | ( | ) |
converts the source image with bayer pattern into the
given destination image. Dst will become an Img8u
|
private |
|
private |
|
inlineprivate |
|
static |
static utility method to convert a given bayer image to grayscale
This is much faster than applying the standard bayer method, which will run though the image several times:
The destination image is adapted in size and format
|
private |
|
private |
|
private |
|
private |
|
inline |
|
inline |
|
inline |
|
inline |
|
private |
|
static |
|
static |
|
static |
|
static |
|
private |
internal buffer;
|
private |
|
private |
|
private |