|
Developer Documentation |
|
Centre for Vision, Speech & Signal Processing |
Comments:
The class ByteRGBValueC represents colour by a triple of integer
numbers inside of the range 0-255. The triple is related to
the general RGB representation of colour.
Derived Classes:
Variables:
- ByteGreyValueT red;
-
The red component of the colour.
- ByteGreyValueT green;
-
The green component of the colour.
- ByteGreyValueT blue;
-
The blue component of the colour.
Methods:
- ByteRGBValueC(GreyValueT r = BLACK,GreyValueT g = BLACK,GreyValueT b = BLACK)
-
Constructs a colour from three colour components. This constructor
serves also as the default constructor.
- ByteRGBValueC(const ByteRGBValueC & rgb)
-
The copy constructor.
- ByteRGBValueC(const RGBValueC & rgb)
-
Creates the colour from the RGB colour of the different
arithmetic range.
- ByteRGBValueC(const Point3dC & p)
-
Creates the colour from three coordinates of the point 'p'.
- const ByteRGBValueC & Set(GreyValueT r,GreyValueT g,GreyValueT b)
-
Sets the red, green, and blue colour compoments according
to the values 'r', 'g', and 'b', respectively.
Logical operators
-----------------
- BooleanT operator==(const ByteRGBValueC & rgb) const
-
Returns TRUE if this colour is equal to the colour 'rgb'.
- BooleanT IsSaturated() const
-
Returns TRUE if any colour component is equal to the level 255.
Access to the colour components
-------------------------------
- const ByteGreyValueT & Red() const
-
Returns the level of the red component.
- const ByteGreyValueT & Green() const
-
Returns the level of the green component.
- const ByteGreyValueT & Blue() const
-
Returns the level of the blue component.
- RealGreyValueT Y() const
-
Returns the intensity.
- ByteGreyValueT & Red()
-
Access to the red component.
- ByteGreyValueT & Green()
-
Access to the green component.
- ByteGreyValueT & Blue()
-
Access to the blue component.
- Point3dC Point() const
-
Returns RGB components represented as 3D point.
Colour mixing
-------------
- const ByteRGBValueC & operator+=(const ByteRGBValueC & rgb)
-
Adds 'rgb' color to this color and truncates this color.
- const ByteRGBValueC & operator-=(const ByteRGBValueC & rgb)
-
Subtracts 'rgb' color from this color and truncates this color.
- IntT AbsDistance(const ByteRGBValueC & rgb) const
-
Returns colour distance.
- UIntT Hash(void) const
-
Generate a hash value for this index.
|
Programmer:Radek Marik, Documentation by CxxDoc: Tue Mar 20 10:49:27 2001
|