|
last update 20 Sep 2009 |
|
#include <cvrMergeYUVToImage.h>


Public Member Functions | |
| mergeYUVToImage (void) | |
| ~mergeYUVToImage () | |
| const std::string & | name () const |
| mergeYUVToImage & | copy (const mergeYUVToImage &other) |
| mergeYUVToImage & | operator= (const mergeYUVToImage &other) |
| virtual mergeYUVToImage * | clone () const |
| virtual mergeYUVToImage * | newInstance () const |
| virtual bool | apply (const matrix< float > &Y, const matrix< float > &U, const matrix< float > &V, image &img) const |
| virtual bool | apply (const matrix< ubyte > &Y, const matrix< ubyte > &U, const matrix< ubyte > &V, image &img) const |
| virtual bool | apply (const float &Y, const float &U, const float &V, rgbaPixel &pixel) const |
| virtual bool | apply (const ubyte &Y, const ubyte &U, const ubyte &V, rgbaPixel &pixel) const |
Protected Member Functions | |
| ubyte | clip (const int val) const |
In the literature, technical and scientific, there is often confusion among the color spaces YUV, YPbPr and YPbPr. Poynton in http://www.poynton.com/notes/colour_and_gamma/ColorFAQ.html explains that YUV is usually never correctly meant, because the color space normally used for component digital video is the YCbCr (ITU-RS601 or CCIR-601). Other devices use the YPbPr, but the "real" YUV is rarely employed.
The CVR-Lib provides all three spaces:
Here, the inverse transformation of cvr::splitImageToYUV is followed
where M is the matrix given in cvr::splitImageToYUV.
If you use ubyte values, then this functor is equivalent to cvr::mergeYPbPrToImage, as the U and V values have to be linearly mapped to make use of the limited range from 0 to 255.
| cvr::mergeYUVToImage::mergeYUVToImage | ( | void | ) |
constructor
| cvr::mergeYUVToImage::~mergeYUVToImage | ( | ) |
destructor
| virtual bool cvr::mergeYUVToImage::apply | ( | const ubyte & | Y, | |
| const ubyte & | U, | |||
| const ubyte & | V, | |||
| rgbaPixel & | pixel | |||
| ) | const [inline, virtual] |
merge the 8-bit-values Y, U and V to a pixel
| Y | the Y value, i.e. black&white | |
| U | the U value, chromatic | |
| V | the V value, chromatic | |
| pixel | the merged pixel |
Implements cvr::mergeImage.
| virtual bool cvr::mergeYUVToImage::apply | ( | const float & | Y, | |
| const float & | U, | |||
| const float & | V, | |||
| rgbaPixel & | pixel | |||
| ) | const [inline, virtual] |
merge the values Y, U and V to a pixel
| Y | the Y value, i.e. black&white | |
| U | the U value, chromatic | |
| V | the V value, chromatic | |
| pixel | the merged pixel |
Implements cvr::mergeImage.
| ubyte cvr::mergeYUVToImage::clip | ( | const int | val | ) | const [inline, protected] |
Clip function.
Equivalent to min(255,max(0,val)) but maybe faster
| virtual mergeYUVToImage* cvr::mergeYUVToImage::clone | ( | ) | const [virtual] |
| mergeYUVToImage& cvr::mergeYUVToImage::copy | ( | const mergeYUVToImage & | other | ) |
| const std::string& cvr::mergeYUVToImage::name | ( | ) | const [virtual] |
| virtual mergeYUVToImage* cvr::mergeYUVToImage::newInstance | ( | ) | const [virtual] |
| mergeYUVToImage& cvr::mergeYUVToImage::operator= | ( | const mergeYUVToImage & | other | ) |