ColourMatrix Class Reference

#include <colourmat.h>

Inheritance diagram for ColourMatrix:

SimpleCCObject List of all members.

Public Member Functions

 ColourMatrix ()

Static Public Member Functions

static ColourMatrix Boost (double d=1.2)
 

static ColourMatrix Whiten ()
 

static ColourMatrix Grey ()
 


Public Attributes

elements_t elements

Classes

struct  elements_t

Detailed Description

Definition at line 178 of file colourmat.h.


Constructor & Destructor Documentation

ColourMatrix::ColourMatrix  )  [inline]
 

Definition at line 185 of file colourmat.h.

00186     {
00187         INT32 i,j;
00188         for (i = 0; i<5; i++) for (j=0 ; j<5; j++) elements.el[i+j*5]=(i==j)?1.0:0.0;
00189     }


Member Function Documentation

ColourMatrix ColourMatrix::Boost double  d = 1.2  )  [static]
 

Author:
Alex_Bligh <alex@alex.org.uk>
Date:
24/01/2005
Parameters:
d - boost quantity [INPUTS]
[OUTPUTS] 
Returns:
A matrix which boosts colour

Errors: -

See also:
-

Definition at line 159 of file colourmat.cpp.

00160 {
00161     ColourMatrix r;
00162     if (d != 1.0)
00163     {
00164         double cc = (1.0-d)/2.0; // Add constant boost to centre colour change
00165         elements_t e = {
00166             { d,   0.0, 0.0, 0.0, 0.0,
00167             0.0, d,   0.0, 0.0, 0.0,
00168             0.0, 0.0, d,   0.0, 0.0,
00169             0.0, 0.0, 0.0, 1.0, 0.0,
00170             cc,  cc,  cc,  0.0, 1.0 }
00171             };
00172         r.elements = e;
00173     }
00174     return r;
00175 }

ColourMatrix ColourMatrix::Grey  )  [static]
 

Author:
Alex_Bligh <alex@alex.org.uk>
Date:
24/01/2005
Parameters:
d - boost quantity [INPUTS]
[OUTPUTS] 
Returns:
A matrix which greys the image

Errors: -

See also:
-

Definition at line 223 of file colourmat.cpp.

00224 {
00225     ColourMatrix r;
00226     elements_t e = {
00227         { 0.1, 0.1, 0.1, 0.0, 0.0,
00228         0.1, 0.1, 0.1, 0.0, 0.0,
00229         0.1, 0.1, 0.1, 0.0, 0.0,
00230         0.0, 0.0, 0.0, 1.0, 0.0,
00231         0.6, 0.6, 0.6, 0.0, 1.0 }
00232         };
00233     r.elements=e;
00234     return r;
00235 }

ColourMatrix ColourMatrix::Whiten  )  [static]
 

Author:
Alex_Bligh <alex@alex.org.uk>
Date:
24/01/2005
Parameters:
None [INPUTS]
[OUTPUTS] 
Returns:
A matrix which makes the entire image white

Errors: -

See also:
-

Definition at line 193 of file colourmat.cpp.

00194 {
00195     ColourMatrix r;
00196     elements_t e = {
00197         { 0.0, 0.0, 0.0, 0.0, 0.0,
00198         0.0, 0.0, 0.0, 0.0, 0.0,
00199         0.0, 0.0, 0.0, 0.0, 0.0,
00200         0.0, 0.0, 0.0, 1.0, 0.0,
00201         1.0, 1.0, 1.0, 0.0, 1.0 }
00202         };
00203     r.elements=e;
00204     return r;
00205 }


Member Data Documentation

elements_t ColourMatrix::elements
 

Definition at line 183 of file colourmat.h.


The documentation for this class was generated from the following files:
Generated on Sat Nov 10 03:52:57 2007 for Camelot by  doxygen 1.4.4