Main Page Class Hierarchy Compound List File List Compound Members File Members
Colour.h File Reference
#include "gcl/GCLConfig.h"
#include "vl/VLf.h"
#include "cl/Array.h"
#include "cl/NArray.h"
Include dependency graph for Colour.h:
Go to the source code of this file.
Typedefs |
| | typedef Vec3f | Colour |
| | | A standard tri-stimulus colour. More...
|
| | typedef Vec4f | Colour4 |
| | | A Colour with a transparency channel.
|
| | typedef Mat3f | ClrMat |
| | | A colour basis transformation matrix. More...
|
| | typedef Mat4f | ClrTrans |
| | | A colour transformation. More...
|
| | typedef Float | ClrReal |
| | | The type used for colour components.
|
| | typedef Colour | Reflectance |
| | typedef NArray<Colour> | ColourList |
| | typedef NArray<Colour4> | Colour4List |
| | typedef ColourList | ReflList |
Functions |
| | Colour | RGBCol (ClrReal r, ClrReal g, ClrReal b) |
| | Colour | HSVCol (ClrReal hue, ClrReal saturation, ClrReal value) |
| | Colour& | ClipColour (Colour &c) |
| | | Clips colour to [0, 1] for display.
|
| | Colour& | ClipColourZero (Colour &c) |
| | | Clips colour to zero only.
|
| | Colour | ClrMix (const Colour &c1, const Colour &c2, ClrReal mix) |
| | | Mixes two colours.
|
| | const Reflectance | cRGBToNTSCLum (0.299, 0.587, 0.114) |
| | | Converts RGB to greyscale, assuming we're in an NTSC colourspace with
gamma = 2.2.
|
| | const Reflectance | cRGBToLum (0.3086, 0.6094, 0.0820) |
| | | Convert RGB to greyscale, assuming a linear colour space.
|
| | const ClrMat | cNTSCToCIE ( 0.67, 0.21, 0.14, 0.33, 0.71, 0.08, 0.00, 0.08, 0.78) |
| | const ClrMat | cCIEToNTSC ( 1.730, -0.482, -0.261, -0.814, 1.652, -0.023, 0.083, -0.169, 1.284) |
| | const ClrMat | cRGBToYIQ ( 0.299, 0.587, 0.114, 0.596, -0.275, -0.321, 0.212, -0.523, 0.311) |
| | const ClrMat | cYIQToRGB ( 1.0, 0.956, 0.621, 1.0, -0.272, -0.647, 1.0, -1.105, 1.702) |
| | Colour | YUVToRGB (const Colour &yuv) |
| | Colour | RGBToYUV (const Colour &rgb) |
| | | YUV == YCbCr.
|
| | const Colour | cBlack (0, 0, 0) |
| | const Colour | cWhite (1, 1, 1) |
| | const Colour | cGrey (cWhite * 0.5) |
| | const Colour | cGrey05 (cWhite * 0.05) |
| | const Colour | cGrey10 (cWhite * 0.1) |
| | const Colour | cGrey25 (cWhite * 0.25) |
| | const Colour | cGrey50 (cWhite * 0.5) |
| | const Colour | cGrey75 (cWhite * 0.75) |
| | const Colour | cGrey90 (cWhite * 0.90) |
| | const Colour | cGrey95 (cWhite * 0.95) |
| | const Colour | cRed (1, 0, 0) |
| | const Colour | cOrange (1, 0.5, 0) |
| | const Colour | cYellow (1, 1, 0) |
| | const Colour | cGreen (0, 1, 0) |
| | const Colour | cCyan (0, 1, 1) |
| | const Colour | cBlue (0, 0, 1) |
| | const Colour | cPurple (1, 0, 1) |
| | ClrTrans | RGBScale (ClrReal rscale, ClrReal gscale, ClrReal bscale) |
| | | use Image::Transform() to apply these to an image.
|
| | ClrTrans | RGBOffset (const Colour &c) |
| | ClrTrans | RGBReplace (const Colour &c) |
| | ClrTrans | RGBToLum () |
| | ClrTrans | RGBSaturate (ClrReal sat) |
| | | Saturate image
sat < 1.0 decreases saturation towards 0.0 (greyscale),
sat > 1.0 increases it.
|
| | ClrTrans | RGBPixelMix (ClrReal mix, const Colour &c) |
| | | Mix with colour
If you use c = cBlack, mix < 1.0 will darken the image,
and mix > 1.0 will lighten it. More...
|
| | ClrTrans | RGBHueRotate (ClrReal degrees) |
| | | Rotate hue of image in HSV space.
|
Variables |
| | const Int | hsvRed = 0 |
| | const Int | hsvOrange = 30 |
| | const Int | hsvYellow = 60 |
| | const Int | hsvGreen = 120 |
| | const Int | hsvCyan = 180 |
| | const Int | hsvBlue = 240 |
| | const Int | hsvPurple = 300 |
Typedef Documentation
A colour basis transformation matrix.
Used for converting between tri-stimulus colour spaces.
Definition at line 20 of file Colour.h.
The type used for colour components.
Definition at line 22 of file Colour.h.
A standard tri-stimulus colour.
We don't store a tag saying what basis functions the colour
depends on for efficiency reasons.
Definition at line 18 of file Colour.h.
typedef NArray<Colour4> Colour4List
|
typedef NArray<Colour> ColourList
|
Function Documentation
Clips colour to [0, 1] for display.
Definition at line 32 of file Colour.cc.
Clips colour to zero only.
Definition at line 44 of file Colour.cc.
Mixes two colours.
Definition at line 57 of file Colour.h.
Rotate hue of image in HSV space.
Definition at line 132 of file Colour.cc.
Mix with colour
If you use c = cBlack, mix < 1.0 will darken the image,
and mix > 1.0 will lighten it.
If you use the average colour of an image, c = img.AverageColour(),
mix < 1.0 will lower contrast, mix > 1.0 raise it.
Definition at line 118 of file Colour.cc.
Saturate image
sat < 1.0 decreases saturation towards 0.0 (greyscale),
sat > 1.0 increases it.
Definition at line 99 of file Colour.cc.
const ClrMat cCIEToNTSC (1. 730, -0. 482, -0. 261, -0. 814, 1. 652, -0. 023, 0. 083, -0. 169, 1. 284)
|
const Colour cGrey (cWhite *0. 5)
|
const Colour cGrey05 (cWhite *0. 05)
|
const Colour cGrey10 (cWhite *0. 1)
|
const Colour cGrey25 (cWhite *0. 25)
|
const Colour cGrey50 (cWhite *0. 5)
|
const Colour cGrey75 (cWhite *0. 75)
|
const Colour cGrey90 (cWhite *0. 90)
|
const Colour cGrey95 (cWhite *0. 95)
|
const ClrMat cNTSCToCIE (0. 67, 0. 21, 0. 14, 0. 33, 0. 71, 0. 08, 0. 00, 0. 08, 0. 78)
|
const Colour cOrange (1, 0. 5, 0)
|
const Colour cPurple (1, 0, 1)
|
const Reflectance cRGBToLum (0. 3086, 0. 6094, 0. 0820)
|
Convert RGB to greyscale, assuming a linear colour space.
const Reflectance cRGBToNTSCLum (0. 299, 0. 587, 0. 114)
|
Converts RGB to greyscale, assuming we're in an NTSC colourspace with
gamma = 2.2.
const ClrMat cRGBToYIQ (0. 299, 0. 587, 0. 114, 0. 596, -0. 275, -0. 321, 0. 212, -0. 523, 0. 311)
|
const ClrMat cYIQToRGB (1. 0, 0. 956, 0. 621, 1. 0, -0. 272, -0. 647, 1. 0, -1. 105, 1. 702)
|
const Colour cYellow (1, 1, 0)
|
Variable Documentation
const Int hsvPurple = 300
|
Generated at Sat Aug 5 00:16:58 2000 for Graphics Class Library by
1.1.0 written by Dimitri van Heesch,
© 1997-2000