WebbotLib AVR library
WebbotLib It just does it
  C++ documentation  C documentation

makeYUV

Copy the colour and convert it, if necessary, to the YUV color module.
Syntax
Color. makeYUV()
Color. makeYUV(dest)
 
Parameters
TypeNameDescription
'dest'
Where to store the resultant colour.
Returns
COLOR_YUV*
Note
If the color is already YUV then no conversion will take place.
The return value allows you to access the y, u and v components of the colour.
Repeatedly converting from one colour space to another and back again will cause a loss of detail.
Example
// Create an RGB color
Color color1;
color1.setRGB(10,23,45);
  
// Copy it to color2 and
// convert color2 to YUV
Color color2;
COLOR_YUV* yuv = color1.makeYUV(color2);
 
// Print the yuv components
cout << "y=" << yuv->y << " u=" << yuv->u << " v=" << yuv->v;

 

 

Valid XHTML 1.0 Transitional