the template sector, and
G
is the normalized
Gaussian function with standard deviation σ.
According to the σ, the concentration of hues is
determined. In our implementation, we use
2w
for the best color balance.
To transform the saturation value in the image,
we shift the whole saturation histogram of the
image instead of shifting each pixel to generate
smoothed transformed image. From the saturation
histogram, we select the pixel value which has the
highest count as the representative saturation value.
The transform saturation value S’ is as follows.
1'0
)(*
max
and
SSwSS
tarcur
(2)
where
max
S
is the representative value,
tar
S
denotes
center value of the sector,
cur
S
is the current
saturation value and
w
is the weight ranging from 0
to 1.
To transform the brightness value, we implement
a non-linear characteristic function like Weber’s law.
The brightness value at pixel p is transformed by
255)
255
()(
1
p
pTp (3)
where in our implementation
is 2.0 for happiness,
0.4 for sadness, 0.5 for anger, and 0.3 for fear,
respectively.
4 PERSONALIZED COLOR
TEMPLATE USING
INTERACTIVE GENETIC
ALGORITHM
Usually, every person has different color preferences
for each emotion. So, it is desirable to modify the
color templates according to the user’s preference.
In this Section, we will discuss the personalized
color template using interactive genetic algorithm.
The interactive genetic algorithm is a Genetic
Algorithm where the evaluation part of it is
subjectively handled by a user (Sugahara et al.,
1998). Actually, the user’s preference cannot be
numerically quantified because it depends on the
perception of the user. So, optimization is performed
by human evaluation.
The chromosome representation of the color
image can be done by histograms of color space. For
example, each color image consists of three
chromosomes such as H, S and V which are shown
in Figure 4. For example, the chromosome of H
consists of 12 genes. Each gene carries numeral
information concerning the Hues at every 30 degrees
because Hue is represented by hue circle. The value
of each gene is computed from normalized
histograms. Saturation and Value chromosomes
consist of 10 genes whose values are computed from
histograms similarly to Hue.
The procedure of the constructing personalized
color templates with interactive genetic algorithm is
shown in Figure 5. The process of each stage is as
follows.
Generation of the first individual: From the
original image, we generate 7 individuals (or
color transformed images) from H, S and V
templates by using H, S, V, HS, HV, SV and
HSV transforms.
Evaluation: In response to each presented
individual, the user is asked to use buttons to
give evaluation based on his own subjective view.
The evaluation scores are used as fitness values
within the interactive genetic algorithm. In
addition, if the user select keep button, the
selected individual is transferred to the next
generation.
Termination: The procedure is terminated by the
user’s decision when the user finds a desirable
individual.
Selection: The tournament selection is used
where 2 individuals from the population are
randomly selected, leaving only those with the
highest fitness level.
Crossover: The crossover operation is executed
from mother and father and the crossover point is
determined by the mother and father’s fitness
value. For example, in Figure 6, the crossover
point is 8 because mother’s fitness value is two
times larger than father’s fitness value. From the
generated individuals, we construct Hue,
Saturation and Value templates like Figure 6 by
choosing large genes and converting them to the
H, S and V values.
Mutation: The gene values in H, S and V are
altered with 1 % rate. The altered values are
randomly decided by the system.
With the termination of the interactive genetic
algorithm, we obtain the desirable image. From this
image, we can extract chromosome information for
H, S and V. Finally, we can construct color
templates which reflected the user’s color preference
for each emotion. Using these templates, we can
generate personalized affection-based color
transformed images.
A NEW IMAGE RE-COLORING METHOD
37