Specifications
Color Space Conversion
9-19
9
CreateColorTwist
Creates a color-twist
matrix data structure.
IplColorTwist* iplCreateColorTwist(int
data
[16],
int
scalingValue
);
data
An array containing the sixteen values that
constitute the color-twist matrix. The values
are in row-wise order. Color-twist values
that are in the range -1 to 1 should be
scaled up to be in the range -2
31
to 2
31
-1.
(Simply multiply the floating point number
in the -1 to 1 range by 2
31
.)
scalingValue
The scaling value: an exponent of a power of 2
that was used to convert to integer values; for
example, if 2
31
was used to multiply the values,
the
scalingValue
is 31. This value is used for
normalization.
Discussion
The function iplCreateColorTwist() allocates memory for the data
structure
IplColorTwist and creates the color-twist matrix that can
subsequently be used by the function
iplApplyColorTwist().
Return Value
A pointer to the IplColorTwist data structure containing the color-twist
matrix in the form suitable for efficient computation by the function
iplApplyColorTwist().