본문 펼치기
OPEN ACCESS
EDITED BY
Yandan Lin,
Fudan University,
China
REVIEWED BY
Suchitra Sueeprasan,
Chulalongkorn University,
Thailand
Mengchu Zhou,
New Jersey Institute of Technology,
United States
*CORRESPONDENCE
Yujian Jiang
[yjjiang@cuc.edu.cn](mailto:yjjiang@cuc.edu.cn)
SPECIALTY SECTION
This article was submitted to
Perception Science,
a section of the journal
Frontiers in Psychology
RECEIVED 20 May 2022
ACCEPTED 29 August 2022
PUBLISHED 14 September 2022
CITATION
Wang S, Liu J, Jiang J, Jiang Y and
Lan J (2022) Attribute analysis and
modeling of color harmony based on
multi-color feature extraction in real-life
scenes.
_Front. Psychol._ 13:945951.
[doi: 10.3389/fpsyg.2022.945951](https://doi.org/10.3389/fpsyg.2022.945951)
COPYRIGHT
© 2022 Wang, Liu, Jiang, Jiang and Lan.
This is an open-access article distributed
[under the terms of the Creative Commons](http://creativecommons.org/licenses/by/4.0/)
[Attribution License (CC BY). The use,](http://creativecommons.org/licenses/by/4.0/)
distribution or reproduction in other
forums is permitted, provided the original
author(s) and the copyright owner(s) are
credited and that the original publication in
this journal is cited, in accordance with
accepted academic practice. No use,
distribution or reproduction is permitted
which does not comply with these terms.
[TYPE Original Research](https://www.frontiersin.org/journals/psychology#editorial-board)
[PUBLISHED 14 September 2022](https://www.frontiersin.org/journals/psychology#editorial-board)
[DOI 10.3389/fpsyg.2022.945951](https://doi.org/10.3389/fpsyg.2022.945951)
# Attribute analysis and modeling of color harmony based on multi-color feature extraction in real-life scenes
Shuang Wang <sup>1,2,3</sup>, Jingyu Liu <sup>1,2,3</sup>, Jian Jiang <sup>4</sup>,
Yujian Jiang <sup>1,2,3</sup> - and Jing Lan <sup>5</sup>
1 State Key Laboratory of Media Convergence and Communication, Communication University of
China, Beijing, China, <sup>2</sup> Key Laboratory of Acoustic Visual Technology and Intelligent Control
System, Ministry of Culture and Tourism, Communication University of China, Beijing, China,
3 Beijing Key Laboratory of Modern Entertainment Technology, Communication University of China,
Beijing, China, <sup>4</sup> China Digital Culture Group Co., Ltd., Beijing, China, <sup>5</sup> Center for Ethnic and Folk
Literature and Art Development, Ministry of Culture and Tourism, Beijing, China
Color harmony is the focus of many researchers in the field of art and design,
and its research results have been widely used in artistic creation and design
activities. With the development of signal processing and artificial intelligence
technology, new ideas and methods are provided for color harmony theory
and color harmony calculation. In this article, psychological experimental
methods and information technology are combined to design and quantify
the 16-dimensional physical features of multiple colors, including multi-color
statistical features and multi-color contrast features. Eighty-four subjects are
invited to give a 5-level score on the degree of color harmony for 164 multicolor materials selected from the screenshots of film and television scenes.
Based on the multi-color physical features and the subjective evaluation
experiment, the correlation analysis is firstly carried out, which shows that
the overall lightness, difference of the color tones, number of multiple
colors, lightness contrast, color tone contrast, and cool/warm contrast are
significantly correlated with color harmony. On the other hand, the regression
prediction model and classification prediction model of color harmony are
constructed based on machine learning algorithms. In terms of regression
prediction model, the prediction accuracy of linear models is higher than that
of nonlinear models, with 63.9% as the highest, indicating that the multi-color
physical features can explain color harmony well. In terms of classification
prediction model, the Random Forest (RF) has the best prediction performance,
with an accuracy of 80.2%.
KEYWORDS
color harmony, aesthetic measure, multiple colors, feature extraction, machine
learning, real-life scene
[Frontiers in Psychology](https://www.frontiersin.org/journals/psychology) 01 [frontiersin.org](https://www.frontiersin.org)
Wang et al. [10.3389/fpsyg.2022.945951](https://doi.org/10.3389/fpsyg.2022.945951)
### Introduction
Color harmony refers to the color matching of two or more
colors, organized in an orderly and coordinated manner, which
can make people feel happy and satisfied (Zheng, 2013). Color
harmony is widely used in industrial design, graphic design,
interior design, and other color-matching scenes, and its strong
correlation with emotion is further applied in computer vision
fields such as affective computing and semantic analysis.
Color harmony theory is divided into classic color harmony
theory and modern color harmony theory according to different
analysis methods. In the 19th century, the study of classical color
harmony theory focused on the qualitative analysis that was, color
harmony theory was summed up in some descriptive color
harmony rules, which were represented by Zheng (2013). Goethe
believes that color can result in emotional fluctuations and
expound the effect of color from physiological and psychological
perspectives (Die Berlin-Brandenburgische Akademie der
Vissenschaften in Göttingen und die Heidelberger Akademie der
Wissenschaften (Hrsg.), 2004). Chevreul divides the color
harmony rules into two categories, namely similar harmony and
contrast harmony, which inspires the development of the color
system research (Zhang et al., 1996). On this basis, Itten theorizes
seven types of color contrast, including contrast by hue, contrast
by value, contrast by temperature, contrast by complements
(neutralization), simultaneous contrast (from Chevreuil), contrast
by saturation (mixtures with gray), and contrast by extension
(from Goethe) (Itten, 1999). However, these studies rely on
fragmentary understanding of subjective experience and lack of
data support, and most of them only stay on the properties of the
research objects.
At the beginning of the 20th century, with the construction of
the color system, the study of color harmony theory transformed
into the quantitative analysis. Researchers tried to investigate,
analyze, and explain color harmony, not only satisfied with the
general rules of color harmony, but also committed to use a more
precise way to elaborate the content of color harmony, which were
represented by Munsell, Ostwald, Moon, and Spencer. Munsell
develops the Munsell color system, which is the most famous color
system so far, and then he proposes seven rules about color
harmony, namely vertical harmony, radial harmony,
circumferential harmony, oblique interior harmony, oblique
transverse interior harmony, spiral harmony, and elliptical
harmony (Zhang and Zhang, 2003). The color harmony theory of
Ostwald is composed by the regular positions in his color system,
including two-color harmony, three-color harmony, and multicolor harmony (Sakahara, 2002). Based on the Munsell color
system, Moon and Spencer make a comprehensive qualitative
study on color harmony, including the geometric formulation of
classical color harmony theory, area of color harmony, and
evaluation on the degree of color harmony (Moon and
Spencer, 1944).
Nowadays, with the development of signal processing and
artificial intelligence, more and more researchers try to adopt
different perspectives and methods for color harmony study.
Lu et al. (2015) combine classical color harmony theory with
machine learning algorithms, and propose a Bayesian framework
for constructing color harmony model. In this framework,
Matsuda color harmony model and Moon-Spencer color harmony
model are integrated into the training process based on the Latent
Dirichlet Allocation (LDA) as the prior condition, which achieves
a good predicting performance on public data set. On this basis,
Lu et al. (2016) further considers the spatial position relationship
between each color and proposed a discriminant learning method
based on LDA. Zaeimi and Ghoddosian (2020) proposed an
art-inspired meta-heuristic algorithm to solve the global
optimization for color harmony modeling. According to the
relative position in the hue ring and the color harmony template
in Moon-Spencer color harmony theory, this algorithm searched
for and matched the best combination mode of multiple colors.
Wang et al. (2022) combined experimental psychology with
artificial intelligence technology together, divided the factors
affecting color harmony into objective factors and subjective
factors, studied the relationship among three of them, and
constructed the mathematical model to predict color harmony.
Her study firstly abstracted the generation process of color
harmony from objective factors to subjective factors, and tried to
construct a research paradigm of color harmony.
In general, the current research on color harmony modeling
involves key technologies, such as feature extraction and machine
learning. In terms of feature extraction Huang et al. (2022),
proposed a Feature Map Distillation (FMD) framework under
which the feature map size of teacher and student networks was
different. Zhang et al. (2021) integrated several well-proved
modules together to learn both short-term and long-term features
from video inputs and meanwhile avoid intensive computation. In
terms of machine learning, Ohata et al. (2021) propose an
automatic detection method for COVID-19 infection based on
chest X-ray images, which combines CNNs with consolidated
machine learning methods, such as k-Nearest Neighbor, Bayes,
Random Forest, multi-layer perceptron (MLP), and Support
Vector Machine (SVM). Lei et al. (2022) propose a novel Meta
Ordinal Regression Forest (MORF) method for medical image
classification with ordinal labels, which learns the ordinal
relationship through the combination of convolutional neural
network and differential forest in a meta-learning framework, in
order to improve model generalization with ordinal information.
All the methods mentioned above can provide technology support
for the current color harmony modeling research.
The existing research on color harmony theory mainly take
simple multi-color combination as the research object, such as
color pair and three-color combination, which cannot meet the
application requirements of real-life scenes. Therefore, this article
takes the multi-color materials in real-life scenes as the research
object, combines experimental psychology with information
technology together, and constructs a few-shot color harmony
modeling method which is suitable for real-life scenes. To sum up,
the chapter content arrangement is below. (1) Construct the
[Frontiers in Psychology](https://www.frontiersin.org/journals/psychology) 02 [frontiersin.org](https://www.frontiersin.org)
Wang et al. [10.3389/fpsyg.2022.945951](https://doi.org/10.3389/fpsyg.2022.945951)
_X_
_Y_
_Z_
0 412453. 0 357580. 0 180423.
0 212671. 0 715160. 0 07. 2 169
0 019334. 0 119193. 0 950227.
_R_
_G_
_B_
dataset of multi-color materials and smooth the materials to
eliminate the interference of the semantic information (see section
“Multi-color dataset construction”). (2) Design and quantify the
multi-color physical features (see section “Multi-color physical
features extraction”). (3) Carry out the subjective evaluation
experiment on color harmony based on the semantic difference
(SD) method (see section “The subjective evaluation experiment
on color harmony”). (4) Conduct data analysis based on the
experimental results, and construct the multi-color harmony
prediction model based on machine learning algorithms (see
section “Results and discussion”).
### Multi-color dataset construction
Multi-color materials acquisition
The multi-color materials should conform to the multi-color
relationships in real-life scenes as much as possible, and the colormatching mode is supposed to be as rich as possible. Therefore,
this article selects the screenshots of the film and television scenes
based on real life as the source of multi-color materials, which are
more practical than the synthetic ones (Jiang et al., 2019). The
selecting principles are as follows: (1) color pictures; (2) remove
the pictures containing virtual scenes in order to conform to the
multi-color relationships of real-life scenes as much as possible;
(3) remove the pictures containing obvious semantic information
to avoid the impact on the evaluation of the degree of color
harmony, such as expressions and words; and (4) select the
pictures containing rich color information as much as possible.
Therefore, we finally construct the multi-color dataset containing
a total of 164 materials captured from the film and television
scenes, which are taken from 18 classic film types with a resolution
of 1,280 dpi × 720 dpi.
According to CIE Publication No. 17.4, hue is an attribute of
a visual sensation according to which an area appears to be similar
to one, or to proportions of two, of the perceived colors. Chroma
is the colorfulness of an area judged in proportion to the
brightness of a reference white. Lightness is the brightness of an
area judged relative to the brightness of a reference white.
Therefore, CIELAB color space ( _L*_ represents lightness, _a*_
represents red/green, and _b*_ represents yellow/blue) proposed by
the International Commission on Illumination (CIE), which is
perceptual uniform and device independent, is adopted to extract
the basic color attributes (Connolly and Fleiss, 1997). Among
them, we select the _L*_ dimension to represent lightness, and the
_h_ / _C*_ dimension which calculated by the _a*_ dimension and _b*_
dimension to present hue angle/chroma.
It is noted that the _L*_, _a*_, and _b*_ values of CIELAB color space
are obtained from the digital files, which are converted from RGB
color space. The steps are as below based on ITU-R
Recommendation BT.709 using the D65 white point reference.
Step I: Convert RGB color space to XYZ color space with the
_R_, _G_, and _B_ values normalized to the interval [01,] .
=
(1)
(2)
(3)
(4)
Step II: Normalize for D65 white point.
_<u>X</u>_
_X_ = 0 950456.
_<u>Y</u>_
_Y_ = 1 0.
_<u>Z</u>_
_Z_ = 1 088754.
Step III: Calculate the value of _f_ ( _t_ ), where _t_ represents _X_,
_Y_, or _Z_ value of XYZ color space.
3
1 3 <u>6</u>
_t_ /, _if_ _t_ - <sup></sup>
(5)
/3,
_t_ 1/3, _if_ _t_
- <sup></sup>
<sup></sup>
<sup></sup>
<sup></sup>
<u>6</u>
29
<sup></sup>
29
( _t_ ) =
<u>1</u> <u>29</u> 2 <u>16</u>
<sup></sup> <sup></sup> <sup></sup> <sup></sup> _t_ +, _others_
_f_ ( _t_
<sup></sup>
,
2
<u>1</u> <u>29</u> <u>16</u>
_t_ +
3 <sup></sup> <sup></sup> 6 <sup></sup> 116
<sup></sup>
<sup></sup>
2
<sup></sup> _t_ +
2
Step IV: Convert XYZ color space to CIELAB color space.
_L_ ∗ = 116 _f_ ( _Y_ ) −16 (6)
_a_ ∗ = 500( _f_ ( _X_ ) − _f_ ( _Y_ )) (7)
_b_ ∗ = 200( _f_ ( _Y_ ) − _f_ ( _Z_ )) (8)
Finally, the spatial distribution of the color basic attributes
materials is shown in Figure 1.
Multi-color materials pre-processing
The materials are taken from the screenshots of film and
television scenes, which not only contain color information, but
also contain edge information. In general, people recognize
specific objects by edge information, which also contains a lot of
semantic information, and has an impact on the evaluation on the
degree of color harmony. Therefore, it is necessary to process the
edge information of multi-color materials.
[Frontiers in Psychology](https://www.frontiersin.org/journals/psychology) 03 [frontiersin.org](https://www.frontiersin.org)
Wang et al. [10.3389/fpsyg.2022.945951](https://doi.org/10.3389/fpsyg.2022.945951)
A B
FIGURE 1
The spatial distribution of the color basic attributes of materials. Among them, (A) shows the distribution of _L*_ value with _X_ -axis representing the
serial number of _L*_ value ranging from smallest to largest, and (B) shows the plane distribution of _a*_ and _b*_ value.
A circular average filter is adopted to smooth the edge
information of multi-color materials. The main idea of the
average filter is to replace the grayscale of a pixel with the
average grayscale of other pixels in the neighborhood. The steps
are below.
Step I: Set the grayscale of pixel ( _i j_, ) as _g_ ( _i j_, ) .
blurred, and you can never know whether the actor is the one
you like or not.
Color palette construction
In general, color palette refers to the board used to harmonize
the fresh pigment, which can be divided into circular palette,
elliptic palette, and rectangular palette according to the shape. In
color analysis of film and television scenes, the rectangular color
palette is often adopted to display the dominant colors and their
proportion information. Therefore, in order to enable the subjects
to master the multi-color information of the materials more
intuitively, we first construct the rectangular color palette of multicolor materials based on K-means clustering algorithm (Krishna
( 1 ) ( 2 ) ( _i_ ) ( _m_ )
and Murty, 1999). _x_, _x_, , _x_, , _x_ are the grayscale
### { }
of _m_ pixels in one picture which regarded as the input data.
Among them, _x_ <sup>(</sup> <sup>_i_</sup> <sup>)</sup> represents the grayscale of _L*_, _a*_ or _b*_
dimension of the _i_ th pixel based on CIELAB color space. The
specific steps to construct the color palette are as below.
Step I: Randomly select _j_ cluster centroids {µ1 <sup>,</sup> …,µ _j_ } .
Among them, _j_ represents the number of cluster centroids, ∝ _j_
represents the grayscale of _R_ channel, _G_ channel, or _B_ channel of
the _j_ th cluster centroids.
Step II: For each pixel _x_ <sup>(</sup> <sup>_i_</sup> <sup>)</sup>, calculate the category that _x_ <sup>(</sup> <sup>_i_</sup> <sup>)</sup>
should belong to:
Step II: Then, calculate the average value
### ∑ g ( x y, ) of all
( _x y_, )∈©
_<u>g</u>_ <u>(</u> _<u>x y</u>_,
_x y_, )
_x y_, )∈©
pixels in the circular template , with ( _i j_, ) as the center and _n_
as the radius.
Step III: Finally, replace the grayscale _g_ ( _i j_, ) of the original
_<u>g</u>_ <u>(</u> _<u>x y</u>_,
### ∑ g ( x y, )
( _x y_, )∈©
_x y_,
_x y_, )∈©
pixel
( _i j_, )
with the average value
.
This article set the smoothing degree _n_ as 50 pixels according
to the subjective evaluation experiment carried out by the previous
study (Wang et al., 2020). In this experiment, two multi-color
materials with rich edge information are selected from each color
tone category as evaluation materials, and, respectively, smoothed
by 10 circular mean filters, with the radius of each circular
template ranging from 10 pixels to 100 pixels (10 pixels apart). The
subjects are asked to evaluate the minimum smoothing radius in
which edge information could not be seen in each group
of materials.
Figure 2 shows the differences between the original material
and the smoothed material. As shown in Figures 2A,B, the scene
information in the original material (e.g., church) is blurred and
cannot be effectively recognized by human eye. Similarly, as
shown in Figures 2C,D, the facial information of the character is
Among them, where _c_ <sup>(</sup> <sup>_i_</sup> <sup>)</sup> is the target category with the
shortest Euclidean distance between _x_ <sup>(</sup> <sup>_i_</sup> <sup>)</sup> and all the _j_
clustering centroids.
2
( ) _i_ ( ) _i_
_c_ : = _arg_ min _j_ _x_ - µ _j_
(9)
[Frontiers in Psychology](https://www.frontiersin.org/journals/psychology) 04 [frontiersin.org](https://www.frontiersin.org)
Wang et al. [10.3389/fpsyg.2022.945951](https://doi.org/10.3389/fpsyg.2022.945951)
A B
C D
FIGURE 2
The differences between the original material and the smoothed material. Among them, (A) shows the original material, (B) shows the smoothed
one, (C) shows the original material, and (D) shows the smoothed one.
As shown in Figure 3, we generate a color palette to represent the
dominant colors. In addition, it is worth noting that, there are three
functions of the color palette. (1) Test whether the distribution of the
hue attribute of multi-color materials is uniform and complete. (2)
In the subjective evaluation of color harmony, the multi-color
materials and the corresponding color palette will be presented at the
same time, so as to make the experimental procedure more
comprehensive and accurate. (3) Some multi-color physical features
are extracted which taking the color palette as the input.
### Multi-color physical features extraction
FIGURE 3
Color palette of a multi-color material generated by K-means
clustering algorithm. Among them, µ _j_ represents each
dominant color, and <sup>_n_</sup> _j_ represents the length of each dominant
color in the color palette. _j_ is set to 8.
Step III: For each category _c_ <sup>(</sup> <sup>_i_</sup> <sup>)</sup>, calculate the average value of
_x_ <sup>(</sup> <sup>_i_</sup> <sup>)</sup> which belongs to _c_ <sup>(</sup> <sup>_i_</sup> <sup>)</sup> as the new cluster centroid ∝ _j_ .
Step IV: Repeat Step II and Step III until {µ1 <sup>,</sup> …,µ _j_ } remain
unchanged, and {µ1 <sup>,</sup> …,µ _j_ } are the dominant colors of the
multi-color material. _n j_ represents the number of _x_ <sup>(</sup> <sup>_i_</sup> <sup>)</sup> which
belong to _c_ <sup>(</sup> <sup>_i_</sup> <sup>)</sup> .
_Step V:_ Generate the dominant colors based on the cluster
centroids {µ1 <sup>,</sup> …,µ _j_ }, and calculate the length ratio of each
dominant color based on _n j_, so as to construct the color palette.
Multi-color physical features can be directly quantified based
on the existing color systems and the information technology
methods, which follow the objective physical laws and have
nothing to do with human’s cognition, also known as low-level
features or objective features (Huang and Shen, 2002). In order to
construct the multi-color harmony prediction model, this article
first designs and quantifies 16-dimensioanl physical features of
multiple colors, and then extracts features based on the smoothed
multi-color materials, as shown in Table 1. The calculation method
of each feature will be introduced in detail below.
Color moment
Color moment (Gonzalez and Woods, 2020) is a simple and
effective physical feature to represent color, which mainly includes
[Frontiers in Psychology](https://www.frontiersin.org/journals/psychology) 05 [frontiersin.org](https://www.frontiersin.org)
Wang et al. [10.3389/fpsyg.2022.945951](https://doi.org/10.3389/fpsyg.2022.945951)
(16)
(17)
(18)
first-order moment, second-order moment, and third-order
moment. Since the main information of color is distributed in the
low-order moments, the first-order moment, the second-order
moment, and the third-order moment are sufficient to express the
color distribution of one multi-color material.
Based on CIELAB color space, this article quantified the firstorder moment, the second-order moment, and the third-order
moment of _L*_, _a*_, and _b*_ dimensions to represent Color Moment
(CM) feature, so as to construct a nine-dimensional feature vector.
1/3
### f 7 = 1 ∑ N ( L ∗ i − f 1)3
_N_ _i_ =1
/
### f 7 = 1 ∑( L ∗ i − f
_N_ _i_ =1
### ∑( L ∗
_N_
### ∑( L ∗ i − f 1)
_i_ =1
_i_
1/3
### f 8 = 1 ∑ N ( a ∗ i − f 2 )3
_N_ _i_ =1
/
### f 8 = 1 ∑( a ∗ i − f
_N_ _i_ =1
### ∑( a ∗ i
_N_
### ∑( a ∗ i − f 2 )
_i_ =1
_i_
/
<u>1</u>
=
_N_
### ∑ L ∗ i
_i_
### f 1 = 1 ∑ L ∗
_N_ _i_ =1
Among them, _P_ ( _i_ ) represents the proportion of the pixels
whose grayscale is _i_ in one picture, when _i_ ∈[0,255] . That is, its
unit grayscale entropy.
Space density
The spatial density of multiple colors refers to how closely
various colors are arranged in a picture, which has an impact on
color harmony. In this article, the watershed segmentation
algorithm (Beucher and Meyer, 1993; Hu, 2010; Shen et al., 2015)
based on region segmentation is adopted to segment the color
regions in multi-color materials.
The watershed segmentation algorithm is a segmentation
method that draws on the morphological theory, which takes the
picture as a topographic map, where the grayscale _f_ ( _x y_, )
corresponds to the topographic height value. High grayscale
corresponds to peaks, and low grayscale corresponds to valleys.
The water always flows toward the low ground and stops until a
low-lying place, which is called a basin. Eventually, all the water
### f 9 = 1 ∑( b ∗ i − f
_N_ _i_ =1
1/3
### f 9 = 1 ∑ N ( b ∗ i − f 3)3
_N_ _i_ =1
### ∑( b ∗
_N_
### ∑( b ∗ i − f 3)
_i_ =1
### f 1 = ∑ L i
_N_ _i_ =1
_i_
_i_ =
<u>1</u>
=
_N_
### ∑ a ∗ i
<u>1</u>
### f 2 = ∑ a
_N_ _i_ =1
### f 2 = ∑ a i
_N_ _i_ =1
_i_
_i_ =
<u>1</u>
=
_N_
### ∑ b ∗ i
<u>1</u>
### f 3 = ∑ b
_N_ _i_ =1
### f 3 = ∑ b i
_N_ _i_ =1
_i_
_i_ =
1/2
### 4 = 1 ∑ N ( L ∗ i − f 1)2
_N_ _i_ =1
(10)
(11)
(12)
(13)
(14)
(15)
Among them, _L*_, _a*,_ and _b*_ represent the lightness value, red/
green value, and yellow/blue value in CIELAB color space,
respectively; _N_ represents the number of pixels in each multi-color
material; _i_ represents the _i_ th pixel.
Color richness
Information entropy can be used to describe the chaotic
degree of information, also called the degree of uncertainty, which
is quantified by the occurrence probability of discrete random
events (Li, 2008). The richer the color of a picture is, the greater
the information entropy is. Therefore, this article constructed a
one-dimensional feature vector by calculating the information
entropy of the grayscale of each multi-color material grayscale to
represent Color Richness (CR) feature.
/
### f 4 = 1 ∑( L ∗ i − f
_N_ _i_ =1
### ∑( L ∗
_N_
### ∑( L ∗ i − f 1)
_i_ =1
_i_
1/2
### f 5 = 1 ∑ N ( a ∗ i − f 2 )2
_N_ _i_ =1
_f_ 10 = − _P_ ( ) _i_ ⋅ log2 _P_ _i_
### ∑ =
10 = −
### i ∑ =0
= − _P_ ( ) _i_ ⋅ log2 _P_ ( ) _i_
### i ∑ =0
/
255
### f 5 = 1 ∑( a ∗ i − f
_N_ _i_ =1
_N_
### ∑( a ∗
### ∑( a ∗ i − f 2 )
_i_ =1
_i_
(19)
1/2
### f 6 = 1 ∑ N ( b ∗ i − f 3)2
_N_ _i_ =1
/
### f 6 = 1 ∑( b ∗ i − f
_N_ _i_ =1
### ∑( b ∗
_N_
### ∑( b ∗ i − f 3)
_i_ =1
_i_
TABLE 1 Sixteen-dimensional multi-color physical features.
No Multi-color
physical features
Abbreviation Dimension
1 Color moment CM 9
2 Color richness CR 1
3 Space density SD 2
4 Color tone contrast CTC 1
5 lightness contrast LC 1
6 Cool/warm contrast CWC 1
7 area difference AD 1
There are seven categories of multi-color physical features. From left to right, the
second column represents the description of each feature, the third column
represents the abbreviation composed of the capital letters from the corresponding
feature description, and the fourth column represents the dimensions of each
feature.
[Frontiers in Psychology](https://www.frontiersin.org/journals/psychology) 06 [frontiersin.org](https://www.frontiersin.org)
Wang et al. [10.3389/fpsyg.2022.945951](https://doi.org/10.3389/fpsyg.2022.945951)
will be concentrated in different basins, and the ridges between
the basins are called watersheds. As water flows down from the
watershed, it is equally likely to flow toward different basins.
Applying this idea to image segmentation is to find different
“water basins” and “watersheds” in grayscale images, and the
regions composed of these different “water basins” and
“watersheds” are the target to be segmented. The bottom-up
simulated flooding process is defined as follows.
_X_ _h_ min = _Th_ min ( _I_ ),∀∈ _h_ [ _h_ min, _h_ max - ] (20)
1
_X_ _h_ +1 = min _k_ +1∪ _CX_ _h_ ( _X_ _h_ ∩ _X_ _h_ +1) (21)
Among them, Equation (20) belongs to the initial condition
of the recursive process. Among them, _Th_ min ( _I_ ) <sup>is the pixel point</sup>
with the minimum grayscale in image I; _h_ represents the range of
grayscales; _h_ min represents the minimum value; and _h_ max
represents the maximum value. Equation (21) is the recursive
process. Among them, _X_ _h_ + 1 represents all the pixels which
grayscale is h + 1; min _k_ + 1 the pixel with the minimum gray scaled
which belongs to the newly generated basin, that is, a new basin is
generated at the altitude of _h + 1_ . _X_ _h_ ∩ _X_ _h_ +1 <sup>represents the</sup>
intersection point of _X_ _h_ and _X_ _h_ + 1 ; _CX h_ represents the basin
where _X_ _h_ is located. Therefore, _X_ _h_ ∩ _X_ _h_ +1 <sup>also represents the</sup>
point where _X_ _h_ and _X_ _h_ + 1 are in the same basin _CX h_ .
Based on the recursive process, all the pixels in the image I can
be divided into several basins. Finally, if a pixel belongs to more
than two basins at the same time, the pixel is a point on the
watershed. The segmentation line can be further determined by
the points on the watershed, thereby realizing image segmentation.
On the basis of regional segmentation of multi-color materials,
this article quantifies the number of regions segmented and the
standard deviation of the number of pixels contained in each
region in the same material as the Space Density (SD) feature to
construct a two-dimensional feature vector.
_f_ 11 <sup>=</sup> _N_ (22)
feature, which well separated the lightness property from the color
tone property. A one-dimensional feature vector was constructed
by calculating the standard deviation of _a*_ and _b*_ of each pixel in
one material to represent the Color Tone Contrast (CTC) feature.
1/2
## = N 1 ∑ N ( ai ∗ − a ∗)2 + ( bi ∗ − b ∗)2
## f 13 = N 1 ∑ N 1 ( ai ∗ − a ∗)2 + ( bi ∗ − b
## N 1 ∑ N 1 ( ai ∗ − a ∗)2 + ( bi ∗ − b ∗)2
/
(24)
## ∑( ai ∗ − a ∗) + ( bi ∗ − b ∗)
1
∗ - _a_ <u>∗</u> _b_ ∗ - _b_ <u>∗</u>
### f 13 = ∑ ai − a bi
_N_ 1
Among them, _ai_ ∗ and _bi_ ∗ represent _ai_ ∗ and _bi_ ∗ of the _i_ th
<u>pixel of one material in CIELAB color space respectively;</u> _a_ <sup><u>∗</u></sup> and
_b_ <sup><u>∗</u></sup> represent the average values of _a*_ and _b*_ ; and _N_ represents the
number of pixels in one material.
_ai_ ∗ and _bi_
_i_ ∗ and _bi_ ∗
Among them, _ai_
_i_ ∗ represent _ai_
Lightness contrast
Based on CIELAB color space, this article takes the lightness
value of _L*_ of the pixel ( _i j_, ) in each material as the input to
quantify the Lightness Contrast (LC) feature constructed by the
one-dimensional feature vector.
2
(25)
<u>(</u> _<u>i j</u>_ <u>,</u> <u>)</u> <u>(</u> _<u>x y</u>_ <u>,</u>
14 =
_L_ ∗ ( _i j_, ) − _L_ ∗ ( _x y_,
_N_
_f_
=
### ∑( i j, )∑( x y, )∈Ω L ∗ ( i j, ) − L ∗ ( x y,
<u>(</u> _<u>i j</u>_ <u>,</u> <u>)∑(</u> _<u>x y</u>_ <u>,</u> <u>)∈Ω</u> _L_ ∗ ( _i j_, ) − _L_ ∗ ( _x y_, )
_N_
= <u>1</u> _N_ ( _ni_ - _~~n~~_ )2
### N ∑ i =1
_hi_ = tan− <sup>1</sup> _<u>bi</u>_
tan− <sup>1</sup> _<u>bi</u>_ <u>∗</u>
_a_
<u>1</u>
_f_ 12 = ( _ni_ - _~~n~~_
### N ∑ i =1
Among them, the pixel ( _x y_, ) represents the pixel within the
block of eight neighborhoods that center on the pixel ( _i j_, ), as
shown in Figure 4. _N_ represents the number of pixels different
from pixel ( _i j_, ) .
Cool/warm contrast
Due to the strong correlation between the cool/warm and
multicolor perception, this article defined and quantified the
Cool/warm Contrast (CWC) feature based on the earlier research
of Ou et al. (2018). Based on CIELAB color space, the hue angle
and chroma values of the pixel ( _i j_, ) in one material is adopted as
the input, and the steps are below.
Step I: Calculate the hue angle _h_ and chroma _C*_ values based
on CIELAB color space.
_f_ 12 = ( _ni_
### N ∑ i =1
(23)
_i_
∗
_<u>i</u>_
Among them, _N_ represents the number of segmented regions
in one material; _ni_ represents the number of pixels included in
the _i_ th segmented region in one material.
Color tone contrast
Since color tones contain information both on the hue and
chroma, this article selects CIELAB color space to quantify this
Among them, _ai_ ∗ and _bi_ ∗ represent _ai_ ∗ and _bi_ ∗ of the _i_ th
pixel of one material in CIELAB color space, respectively.
_i_ = tan <sup>1</sup>
_ai_
= tan− <sup>1</sup> _<u>i</u>_ <u>∗</u>
_ai_
- <sup>1</sup> _<u>bi</u>_ <u>∗</u>
_ai_
#### Ci ∗ = ( ai ∗)2 + ( bi ∗)2
(26)
(27)
_ai_ ∗ and _bi_
_i_ ∗ and _bi_ ∗
Among them, _ai_
_i_ ∗ represent _ai_
[Frontiers in Psychology](https://www.frontiersin.org/journals/psychology) 07 [frontiersin.org](https://www.frontiersin.org)
Wang et al. [10.3389/fpsyg.2022.945951](https://doi.org/10.3389/fpsyg.2022.945951)
1/2
= <u>1</u> _j_ ( _ni_ - _~~n~~_ )2
### ∑ =
/
(30)
<u>1</u>
_f_ 16 = ( _ni_ - _~~n~~_
### j ∑ i =1
( _ni_ - _~~n~~_ )2
### ∑ i =1
_j_
_f_ 16 = ( _ni_
### j ∑ i =1
_i_
FIGURE 4
The image block <sup>Ω</sup> of eight neighborhoods that center on the
pixel ( ( _i j_, ) . ( _x y_, )∈Ω ).
Step II: Calculate the degree of “cool/warm” based on the
research result of Ou.
_WCi_ = −0 89. + 0 052. _Ci_ ∗[cos( _hi_ - 50°) + 0 16. cos
(2 _hi_ - 350°)]
<sup>(28)</sup>
_WCi_ = −0 89. + 0 052. _Ci_ ∗[cos( _hi_
(2 _hi_ - 350°)]
[
_i_ = −0 89. + 0 052. _Ci_ [cos( _hi_
_i_
= −0 89. + 0 052. _Ci_ ∗[cos( _hi_ - 50°) +
- 350°)]
Among them, _ai_ ∗ and _bi_ ∗ represent _ai_ ∗ and _bi_ ∗ of the _i_ th
pixel of one material in CIELAB color space, respectively.
_Step III:_ Calculate the Cool/warm Contrast (CWC) feature
based on _WCi_ .
_i_ ∗ and _bi_
_i_ ∗ and _bi_
Among them, _ai_
_i_ ∗ represent _ai_
2
(29)
<u>(</u> _<u>i j</u>_ <u>,</u> <u>)</u> <u>(</u> _<u>x y</u>_ <u>,</u>
_f_ 15 =
_WC_ ( _i j_, ) − _WC_ ( _x y_,
_N_
_f_
=
### ∑( i j, )∑( x y, )∈Ω WC ( i j, ) − WC ( x y, )
Among them, _j_ represents the number of cluster centroids; _ni_
represents the number of pixels belonging to the _i_ th
cluster centroid.
### The subjective evaluation experiment on color harmony
Subjects
A total of 84 subjects participated in this experiment. The
subjects are all college students, aged between 18 and 30 years
old, including 35 males and 49 females. All the subjects do not
major in color-related professional courses and have no colorrelated professional knowledge reserves. Before the formal start
of the experiment, the Ishihara Color Blindness Test (Marey
et al., 2015) is performed on each subject to test their
color perception.
Experiment condition
In order to avoid the interference of environmental noise on
the subjective evaluation of multi-color harmony, the experiment
is arranged in a standard listening room with an area of
5.37 m × 6 m to ensure that the background noise is not higher
than 30 dB(A). According to “Methodology for the Subjective
Assessment of the Quality of Television Pictures” (ITU-R
BT. 500–14), the ambient illumination of the monitor (i.e., the
incident light formed by the surrounding environment on the
monitor, measured in the vertical direction of the monitor) is set
to 200 lux (a unit of luminance, which represents the amount of
light received per unit area of the monitor).
An independent monitor is used to present multi-color
materials. The model of the monitor is BenQ XL2720-B color LCD
monitor, equipped with Windows operating system (7, Microsoft
Corporation, Redmond, United States). The aspect ratio of the
monitor is 16:9, with the resolution of 1920 dpi × 1,080 dpi. A
“slideshow” function in the ACD see software (official free version;
ACD Systems International Inc., Shanghai, China) is used to
randomly present the stimuli. Before the experiment, the monitor
is calibrated using the Display Color Calibration Function from
Windows Operating System before the experiment.
Experiment procedure
Only one subject performs the experiment at a time. After the
subject enters into the laboratory, a questionnaire is issued by the
experimental assistant. The subject is required to sign the
Among them, the pixel ( _x y_, ) represents the pixel within the
block of eight neighborhoods that center on the pixel ( _i j_, ) ; _N_
represents the number of pixels different from pixel ( _i j_, ) .
Area difference
The importance of area in color design has been proved in the
field of aesthetics and art practice, and researchers have also
conducted a series of studies on the mechanism of area on color
harmony and beauty (Granger, 1953; Odabaşıoğlu and Olguntürk,
2020). Therefore, the standard deviation of the number of pixels
_n j_ belonging to each cluster centroid ∝ _j_ in the color palette was
quantified to represent the Area Difference (AD) feature, thereby
constructing a one-dimensional feature vector.
[Frontiers in Psychology](https://www.frontiersin.org/journals/psychology) 08 [frontiersin.org](https://www.frontiersin.org)
Wang et al. [10.3389/fpsyg.2022.945951](https://doi.org/10.3389/fpsyg.2022.945951)
informed consent form and fill in the personal information
(including gender, age, and major) in the questionnaire.
Then, as shown in Figure 5, the subject is asked to sit in front
of the monitor with the eyes at the same height as the center of the
monitor, and the vertical distance between the eyes and the
monitor is 60 cm. The monitor randomly displays each material,
including the smoothed multi-color material and the
corresponding color palette, to be evaluated in full screen, and the
[color harmony scores are collected through the “wjx.com”](http://wjx.com)
application of the mobile phone.
The introduction of the experiment is below, “The aim of this
experiment is to study the quantifiable rules of color harmony.
You should score a total of 164 multi-color materials for the degree
of color harmony as a 5-level scale, which −2 means
“disharmonious,” −1 means “a little disharmonious,” 0 means “no
feeling,” 1 means “a little harmonious,” and 2 means “harmonious.”
The detailed experiment is below.
Step I: The subject is asked to be familiar with all multi-color
materials in advance, and constructs a psychological evaluation
scale on color.
Step II: Three materials randomly selected are displayed, and
the subject is asked to evaluate according to his subjective feelings,
so as to avoid the effect on the evaluation results because of the
unfamiliarity with the experimental process.
Step III: In total, 164 multi-color materials are equally divided
into two groups and present on the monitor in random order. The
subject is asked to score the degree of each multi-color material as
a 5-level scale.
It is noted that there is no time limit for the experiment,
and the subjects can play the next material by themselves. It
took 1 week to complete the experiments with all 84 subjects.
Among them, each participant spent an average of about
30 min in the experiment, including a 5-min break after
evaluating one group.
FIGURE 5
The experiment condition. On the left is the position diagram
between the subject and the monitor; on the right is the
operation interface for data collection by “wjx.cn” application on
the mobile phone.
### Results and discussion
First, in section “Reliability analysis,” this section analyzes the
reliability of the experimental data. Second, in section “Correlation
analysis,” the correlation between each multi-color physical feature
and color harmony is discussed in detail. Then, in section “Multicolor harmony model construction,” based on the results of feature
selection, linear and nonlinear learning algorithms are adopted to
construct the regression prediction model and classification
prediction model for color harmony, and a series of objective
evaluation methods are used to measure the accuracy of the
models. Finally, in section “Comparative research”, a comparative
experiment is carried out to discuss the applicability and
limitations of the proposed models.
Reliability analysis
In this article, Cronbach’s alpha is adopted to evaluate the
internal consistency of the experimental results of 84 subjects
(Bartko, 1966), as shown in Equation (31).
all the materials; σ _Y_ 2 _i_ represents the variance for the observation
scores of the material to be tested. It is generally believed that
when the Cronbach’s alpha is above 0.7, the experimental results
have good internal consistency.
The Cronbach’s alpha of the 84 subjects in this experiment is
0.908, which meets the requirement, indicating that the
experimental data are reliable and can support subsequent
research on correlation analysis and modeling.
Correlation analysis
After acquiring the data of multi-color physical features and
the subjective evaluation scores on color harmony of all multicolor materials, it is necessary to draw the scatter plots and fitting
curves to conduct a qualitative analysis of the relationship between
multi-color physical features and color harmony, and then make
a quantitative analysis through the correlation coefficient. Figure 6
shows the scatter plots between multi-color physical features and
color harmony.
It can be seen from Figure 6 that some multi-color physical
features have weak correlation with color harmony, namely _f_ 1
(The first-order moment of _L*_ ), _f_ 2 (The first-order moment of
_a*_ ), _f_ 5 (The second-order moment of _a*_ ), _f_ 8 (The third-order
moment of _a*_ ), _f_ 11 (Space Density), _f_ 13 (Color Tone Contrast),
_K_ 2
### α = K 1− ∑ i =1σ Yi
_K_ −1 σ2 _X_
(31)
_<u>K</u>_
_K_
_K_ 2
### 1− ∑ i =1σ Yi
−1 σ2 _X_
σ2 _X_
_<u>iK</u>_ <u>=1σ</u> _<u>Y</u>_ 2 _<u>i</u>_
<u>1σ</u> _<u>Y</u>_ 2
_X_
_<u>i</u>_ <u>=1σ</u> _<u>Yi</u>_
Among them, _K_ represents the number of subjects; σ _X_ 2
represents the population variance for the observation scores of
all the materials; σ _Y_ 2 _i_ represents the variance for the observation
Among them, _K_ represents the number of subjects; σ _X_ 2
[Frontiers in Psychology](https://www.frontiersin.org/journals/psychology) 09 [frontiersin.org](https://www.frontiersin.org)
Wang et al. [10.3389/fpsyg.2022.945951](https://doi.org/10.3389/fpsyg.2022.945951)
_f_ 14 (Lightness Contrast), and _f_ 15 (Cool/warm Contrast).
Among them, the multi-color physical feature _f_ 1 (The first-order
moment of _L*_ ) is positively correlated with color harmony; the
multi-color physical features _f_ 2 (The first-order moment of _a*_ ),
_f_ 5 (The second-order moment of _a*_ ), _f_ 8 (The third-order
moment of _a*_ ), _f_ 11 (Space Density), _f_ 13 (Color Tone Contrast),
_f_ 14 (Lightness Contrast), and _f_ 15 (Cool/warm Contrast) are
negatively correlated with color harmony. That is to say, the
brighter, cooler, simpler, and smaller the difference among
multiple colors is, the multi-color relationship is more likely to
make people feel harmonious.
Then, the Pearson’s correlation coefficients ( _r_ ) and fitting
curves are also presented in scatterplots. It is generally believed
that if 0 7. ″ _r_, it has a strong correlation; if 0 5. ≤ _r_ < 0 7., it
has a moderate correlation; if 0 2. ≤ _r_ < 0 5., it has a weak
correlation; and if _r_ < 0 2., there is no correlation. The Pearson’s
correlation coefficient of _f_ 14 (Lightness Contrast) is the highest,
which is: _r_ = −0 393., _p_ < 0 001. . In addition, the multi-color
physical features _f_ 1 (The first-order moment of _L*_ ), _f_ 5 (The
second-order moment of _a*_ ), and _f_ 8 (The third-order moment
of _a*_ ) are also correlated with color harmony, with the Pearson’s
correlation coefficients being _r_ = 0 308., _p_ < 0 001.,
_r_ = −0 38., _p_ < 0 001., and _r_ = −0 324., _p_ < 0 001. . Finally, the
multi-color physical features _f_ 2 (The first-order moment of _a*_ ),
_f_ 11 (Space Density), _f_ 13 (Color Tone Contrast), and _f_ 15
(Cool/warm Contrast) have weak correlation with color
harmony, with the Pearson’s correlation coefficients
being _r_ = −0 216., _p_ < 0 001., _r_ = −0 285., _p_ < 0 001.,
_r_ = −0 242., _p_ < 0 001., and _r_ = −0 253., _p_ < 0 001. .
To sum up, the lower the lightness contrast of the multi-color
combination, the easier it is to make people feel harmonious; the
higher the lightness of the multi-color combination, the easier it
is to make people feel harmonious; the cooler the multi-color
combination, the smaller the difference among multiple colors, the
lower the spatial density of the color blocks, the lower the color
tone contrast, the lower the cool/warm contrast, and the easier it
is to make people feel harmonious.
Multi-color harmony model construction
In order to further study the correlation between multi-color
physical features and color harmony, machine learning algorithms
are adopted to construct the multi-color harmony prediction
model on the basis of correlation analysis. In order to eliminate
the dimensional difference between different multi-color physical
features, so as to further improve the accuracy of the prediction
model. This article first normalizes the input multi-color physical
eigenvalue _xi_ .
Among them, _f_ ( _xi_ ) represents the prediction value; _yi_
represents the true value; _n_ represents the number of material in
testing set.
The weka software (3.8.3; The University of Waikato,
Hamilton, New Zealand) with functions of machine learning and
data mining was adopted to construct the MLR model. In
addition, we apply the M5 rules (Duggal and Singh, 2012) as the
Among them, min{ _x_ } represents the minimum of the
eigenvector _X_ ; max{ _x_ } represents the maximum of the
eigenvector _X_ .
Linear regression predication model
The Multivariable Linear Regression (MLR) (Hidalgo and
Goodman, 2013) has the characteristics of strong interpretability.
Therefore, MLR is adopted to construct the regression predication
model. Assume that there is a linear relationship between the
independent variables _X_ 1, _X_ 2, , ⊃ _X_ _p_ and the dependent
variable _y_, as shown in Equation (25).
_y_ = β0 + β1 _X_ 1 +…+ β _p_ _X_ _p_ + ε (33)
Among them, β0,β1, ,β _p_ represents the unknown
parameters, β 0 is the regression constant, and β1,β2, ,β _p_
represents the overall regression parameters; ε is a random error
#### which obeys the ε ~ N (0,σ2 ) distribution. When p = 1, the
equation is called the univariate linear regression model; when
_p_ ≥ 2, the equation is called the MLR model. The Ordinary Least
Square (OLS) method is adopted to estimate the overall regression
parameters β0,β1, ,β _p_, and calculate the value of β to
minimize the object function.
_n_
|| _yi_ - _xi_ β ||2
(β) = || _yi_ - _xi_ β
### ∑ =
### ∑ i =1
(34)
_Q_ (β) = || _yi_ - _x_
### ∑ =
_i_
1
In this article, the 10-fold Cross Validation is used to evaluate
the accuracy of the model, that is, the dataset is divided into 10
subsets, and nine of them are taken as training sets without
repetition, and the prediction errors of the remaining subsets are
evaluated. And the evaluation indexes are the Pearson’s correlation
coefficient ( _r_ ), Mean Absolute Error (MAE), and Root Mean
Squared Error (RMSE), respectively. The calculation methods of
MAE and RMSE are below.
_n_
<u>1</u> _n_
= _yi_ - _f_ ( _xi_ )
### n ∑ i =1
<u>1</u>
_MAE_ = _yi_ - _f_ ( _xi_
### n ∑ i =1
_i_
1
_n_
<u>1</u> _n_
= ( _yi_ - _f_ ( _xi_ ))
### n ∑ i =1
(35)
(36)
<u>1</u>
_RMSE_ = ( _yi_ - _f_ ( _x_
### n ∑ i =1
2
_i_
1
= _<u>xi</u>_ <u>−</u> <u>min{</u> _<u>x</u>_ <u>}</u>
max{ _x_ <u>} −</u> min{ _x_ <u>}</u>
_xi_ = _<u>xi</u>_ <u>−</u> <u>min{</u> _<u>x</u>_ <u>}</u>
max{ _x_ <u>} −</u> min{ _x_
_<u>xi</u>_ <u>−</u> <u>min{</u> _<u>x</u>_
max{ _x_ <u>} −</u> min
(32)
[Frontiers in Psychology](https://www.frontiersin.org/journals/psychology) 10 [frontiersin.org](https://www.frontiersin.org)
Wang et al. [10.3389/fpsyg.2022.945951](https://doi.org/10.3389/fpsyg.2022.945951)
FIGURE 6
The scatter plots between multi-color physical features and color harmony. Among them, _X_ -axis represents each multi-color physical feature, and
_Y_ -axis represents the corresponding value of the degree of color harmony.
[Frontiers in Psychology](https://www.frontiersin.org/journals/psychology) 11 [frontiersin.org](https://www.frontiersin.org)
Wang et al. [10.3389/fpsyg.2022.945951](https://doi.org/10.3389/fpsyg.2022.945951)
FIGURE 7
The comparison of the regression prediction results of the five
machine learning algorithms.
attribute selection method, that is, adding the classification
discriminators before the linear regression model, so as to
construct the piecewise linear regression model to improve the
accuracy. Finally, based on the M5 rules, the linear regression
prediction model is constructed as follows.
_color_ _harmony_ = 1 499. _f_ 1 + 0 408. _f_ 4 - 0 594. _f_ 5
−0 52. _f_ 11 - 0 47. _f_ 13 −1 38. 6 _f_ 14 + 0 862. _f_ 15 + 0 249.
<sup>(37)</sup>
Among them, _f_ 1 represents the first-order moment of _L*_ ; _f_ 4
represents the second-order moment of _L*_ ; _f_ 5 represents the
second-order moment of _a*_ ; _f_ 11 represents space density; _f_ 13
represents color tone contrast; _f_ 14 represents lightness contrast;
_and_ _f_ 15 represents cool/warm contrast.
Non-linear regression predication model
On the basis of constructing the linear regression models, this
article tries to apply nonlinear machine learning algorithms into
regression model construction, so as to further explore the
relationship between multi-color physical features and color
harmony. The three classic nonlinear machine learning algorithms
used in this article are the Support Vector Regression (SVR),
Random Forest (RF), and Multi-layer Perception (MLP). The
comparison of the prediction results of the four machine learning
algorithms is shown in Figure 7.
It can be seen that the accuracy of the linear regression
model is higher than those of the nonlinear regression models,
with the prediction accuracy of MLR being 63.9%. Therefore,
the relationship between the multi-color physical features and
color harmony designed and quantified in this article can
be constructed through the linear regression model, so as to
give a reasonable explanation for the influencing factors of color
harmony. On the other hand, among the nonlinear machine
learning algorithms, the prediction accuracy of SVR and RF are
close, which are 55.9% and 61.3%, respectively, and the
prediction performance of RF is slightly better than that of
SVR. In addition, the prediction accuracy of MLP is poor,
which is 36.9% only.
FIGURE 8
The comparison of the classification prediction results of the four
machine learning algorithms.
Classification predication model
Since the prediction accuracy of the regression model of color
harmony needs to be improved, this article attempts to transform
the problem into a binary classification problem, and machine
learning algorithms are also adopted to construct the classification
prediction model. Set the classification threshold _T_ = 0, that is,
the degree of color harmony greater than 0 belongs to the
“harmonious” category, and the degree of color harmony less than
0 belongs to the “disharmonious” category. The Logical
Classification (LC) (Povhan, 2020), Support Vector Machine
(SVM) (Ohata et al., 2021), RF (Lei et al., 2022), and MLP are,
respectively, adopted to construct the classification prediction
models (Gao et al., 2019). In the modeling process, 10-fold Cross
Validation is used to better optimize the model parameters during
the modeling process and reduce the evaluation errors. In terms
of evaluation methods, this article measures the prediction
accuracy of the classification model by the Correct Classification
Rate (CC), MAE, and RMSE. The CC rate calculation method is
as below.
Among them, _TP_ represents the number of the true samples
predicted as positive by the model; _TN_ represents the number of
the true samples predicted as negative by the model; _P_ represents
the number of the true samples; and _N_ represents the number of
the false samples. The comparison of the prediction results of the
four machine learning algorithms is shown in Figure 8.
It can be seen that the overall performance of the
classification prediction models constructed in this article plays
better than that of the regression models. Among them, RF has
the best classification prediction performance, with the
classification accuracy rate of 80.2%. In addition, LC and SVM
have similar classification accuracy rates, which are 78.4 and
79.6%, respectively. And MLP also has the poorest classification
prediction performance, with the classification accuracy
of 76.5%.
( _TP_ + _TN_ )
=
( _P_ + _N_
( _TP_ + _TN_
_CC_ =
( _P_ + _N_ )
(38)
[Frontiers in Psychology](https://www.frontiersin.org/journals/psychology) 12 [frontiersin.org](https://www.frontiersin.org)
Wang et al. [10.3389/fpsyg.2022.945951](https://doi.org/10.3389/fpsyg.2022.945951)
FIGURE 10
The comparison of the regression prediction results of the
different datasets.
FIGURE 9
The scatterplot between the truth value and the prediction value.
Among them, _X_ -axis represents the truth value of color harmony,
and _Y_ -axis represents the corresponding prediction value by the
proposed regression model.
Comparative research
Comparison with other datasets
In order to verify the applicability of the proposed regression
predication models of color harmony, we construct a dataset
containing 120 new screenshots of film and television with the
5-scale color harmony scoring. Then, after 16-dimensionl multicolor physical features extracted, the Equation (37) by MLR with
the M5 rules is adopted to predict color harmony of the new
dataset. And the prediction accuracy evaluated by the Pearson’s
correlation coefficients ( _r_ ) is up to 50.3%, indicating that the
proposed model has a good performance on the similar dataset.
The scatterplot and fitting curve between the truth value and the
prediction value is shown in Figure 9.
On this basis, in order to further test the prediction
performance of the proposed regression model on other
dissimilar datasets, we select one public dataset for comparative
research: the _International Affective Picture System (IAPS)_ (Lang
et al., 2008). IAPS is the most widely used dataset for experimental
investigations of emotion and attention. It consists of
documentary-style natural color photos depicting scenes labeled
by pleasure ( _P_ ), arousal ( _A_ ), and dominance ( _D_ ) based on PAD
emotion space (Mehrabian, 1980; Russel, 1980). Then, the
calculation method of color harmony is below based on the
research on the relationship between color harmony (CH) and
emotion from Wang et al. (2022). A total of 90 materials are
selected in our comparative experiment on the proposed
regression prediction model with the obvious semantic
information, e.g., people with clear expressions, excluded.
_CH_ = 0 813. _P_ - 0 616. _A_ + 0 374. (39)
We try to use Equation (37) by MLR with/without the M5
rules to predict color harmony. And the Pearson’s correlation
coefficients ( _r_ ) between the truth values and the prediction
values are _r_ = 0 388., _p_ < 0 001. and _r_ = 0 244., _p_ < 0 001.,
respectively. Figure 10 shows the comparison of the regression
prediction results of the different datasets.
It is noted that the accuracy of IAPS is lower than that of the
screenshots of film and television scenes constructed by ourselves,
the possible reasons are as follows. (1) The dataset in this article
consists of the screenshots of film and television with color design,
and the resolution of each material is high with the same format,
to avoid the effect on data labeling. (2) Compared with the subjects
in this article, the subjects for IAPS have a wider age range.
Previous studies (Zhang et al., 2019) have shown that people with
different ages have different color preferences, which may affect
the judgment for color harmony. Therefore, the prediction models
constructed in this article are more suitable for the field of art and
design, where the pictures to be analyzed are of high quality.
In addition, different from the prediction performance on our
dataset, the MLR model without the M5 rules is more accurate
than that with the M5 rules on IAPS, indicating the
overfitting problem.
Comparison with different sample sizes
Since the accuracy of the regression models is not very ideal
except for MLR, we try to use different sample sizes to train the
model, so as to analyze the influence of sample size on the
experimental results. Based on the dataset we constructed in the
article, we add 120 screenshots of film and television with the 5-scale
color harmony scoring (constructed in section “Comparison with
other datasets”). Then, we conduct the comparative experiment on
82, 164, and 284 sample sizes which were selected randomly,
respectively. The comparative result measured by the Pearson’s
correlation coefficient ( _r_ ) is shown in Figure 11.
It can be seen that the average _r_ values of the 82, 164, and 284
sample sizes are 49.4, 54.5, and 54.8%, respectively, which grows
with the sample size. In addition, the average _r_ values of MLR,
SVR, RF, and MLP are 56.8, 57.8, 55, and 42%, respectively. Then,
for the explainable MLR, the 164 sample size has the highest
prediction accuracy. To sum up, when the sample size is small, it
negatively affects the accuracy of the predictive model; when the
sample size reaches a certain size, it is beneficial to improve the
accuracy of the prediction model through strict subjective
[Frontiers in Psychology](https://www.frontiersin.org/journals/psychology) 13 [frontiersin.org](https://www.frontiersin.org)
Wang et al. [10.3389/fpsyg.2022.945951](https://doi.org/10.3389/fpsyg.2022.945951)
industry applications, develop color-matching software to increase
the practicability of research results.
### Data availability statement
The original contributions presented in the study are included
in the article/Supplementary material, further inquiries can be
directed to the corresponding author.
### Ethics statement
FIGURE 11
The comparison of the regression prediction results of the
different sample sizes.
experimental labeling, which provides the idea for few-shot
learning. In addition, if the extracted physical features have strong
correlation with the subjective ground truth, it is beneficial to
construct the explainable linear models.
### Conclusion
In this article, we combine experimental psychology and
information technology together to study the mechanism of color
harmony in real-life scenes. The main contribution is attributed
analysis and model construction of color harmony. Especially, (1)
Design and quantify seven categories, 16-dimensional, multi-color
physical features which are suitable for extracting in real-life
scenes, namely Color Moment, Color Richness, Space Density,
Lightness Contrast, Color Tone Contrast, Cool/Warm Contrast,
and Area Difference. The correlation analysis shows that the overall
lightness, difference of the color tones, number of multiple colors,
lightness contrast, color tone contrast, and cool/warm contrast are
significantly related to color harmony. (2) Based on the machine
learning algorithms, the color harmony regression prediction
model and the classification prediction model are, respectively,
constructed. Among them, the prediction accuracy of the linear
regression model is higher than that of the nonlinear regression
model, with a maximum of 63.9%, indicating that the multi-color
physical features designed and quantified in this article are effective
and color harmony can be correlated through the linear regression
model, so as to give reasonable explanations for the mechanism of
color harmony. For the classification models, RF has the best
prediction performance, with a prediction accuracy of 80.2%.
Future works are below. (1) Taking the classical color harmony
theories into consideration, design and quantify the physical
features of multiple colors that are consistent with the theoretical
description, so as to fully explore the influencing factors of color
harmony. (2) Previous studies have shown that (Jonauskaite et al.,
2020), color preference is easily affected by gender, age, and cultural
background. Therefore, we plan to introduce personalized factors
as constraints into the prediction model by supplementing the
dataset and increasing the number of differentiated subjects to
further improve the prediction accuracy of the model. (3) For
Ethical review and approval was not required for the study on
human participants in accordance with the local legislation and
institutional requirements. The patients/participants provided
their written informed consent to participate in this study.
### Author contributions
SW and YJ constructed the overall research framework. SW
designed and quantified multi-color physical features and revised the
manuscript. JLa and JJ constructed the material dataset. JLi carried
out the subjective evaluation experiment. SW and JLi completed the
correlation analysis and model construction and drafted the
manuscript. All authors contributed to the article and approved the
submitted version.
### Funding
Funding was provided by the National Key Research and
Development Program (Nos. 2021YFF0901705 and 2021YFF0901700)
and Open Project of Key Laboratory of Audio and Video Restoration
and Evaluation, Mini of Culture and Tourism (2021KFKT006).
### Conflict of interest
JJ is employed by China Digital Culture Group Co., Ltd.
The remaining authors declare that the research was conducted
in the absence of any commercial or financial relationships that
could be construed as a potential conflict of interest.
### Publisher’s note
All claims expressed in this article are solely those of the
authors and do not necessarily represent those of their affiliated
organizations, or those of the publisher, the editors and the
reviewers. Any product that may be evaluated in this article, or
claim that may be made by its manufacturer, is not guaranteed or
endorsed by the publisher.
### Supplementary material
The Supplementary material for this article can be found online
[at: https://www.frontiersin.org/articles/10.3389/fpsyg.2022.945951/](https://www.frontiersin.org/articles/10.3389/fpsyg.2022.945951/full#supplementary-material)
[full#supplementary-material](https://www.frontiersin.org/articles/10.3389/fpsyg.2022.945951/full#supplementary-material)
[Frontiers in Psychology](https://www.frontiersin.org/journals/psychology) 14 [frontiersin.org](https://www.frontiersin.org)
Wang et al. [10.3389/fpsyg.2022.945951](https://doi.org/10.3389/fpsyg.2022.945951)
### References
Bartko, J. J. (1966). The intraclass correlation coefficient as a measure of reliability.
_Psychol. Rep._ [19, 3–11. doi: 10.2466/pr0.1966.19.1.3](https://doi.org/10.2466/pr0.1966.19.1.3)
Beucher, S., and Meyer, F. (1993). The morphological approach to segmentation:
the watershed transformation. _Math. Morphol. Imag. Proc._ 34, 433–481.
Connolly, C., and Fleiss, T. (1997). A study of efficiency and accuracy in the
transformation from RGB to CIELAB color space. _IEEE Trans. Image Process._ 6,
[1046–1048. doi: 10.1109/83.597279](https://doi.org/10.1109/83.597279)
Die Berlin-Brandenburgische Akademie der Vissenschaften in Göttingen und die
Heidelberger Akademie der Wissenschaften (Hrsg.) (2004). _Goethe-Wörterbuch Bd_
_4_ :119. Stuttgart: Verlag W. Kohlhammer.
Duggal, H., and Singh, P. (2012). Comparative study of the performance of M5rules algorithm with different algorithms. _J. Softw. Eng. Appl._ 5, 270–276. doi:
[10.4236/jsea.2012.54032](https://doi.org/10.4236/jsea.2012.54032)
Gao, S., Zhou, M., Wang, Y., Cheng, J., Yachi, H., and Wang, J. (2019). Dendritic
neuron model with effective learning algorithms for classification, approximation,
and prediction. _IEEE Trans. Neural Netw. Learn. Syst._ [30, 601–614. doi: 10.1109/](https://doi.org/10.1109/TNNLS.2018.2846646)
[TNNLS.2018.2846646](https://doi.org/10.1109/TNNLS.2018.2846646)
Gonzalez, R. C., and Woods, R. E. (2020). “Digital image processing,” in _Ruan_
_Qiuqi, Ruan Yuzhi_ . _4th_ _Edn_ . ed. H. Tan, Beijing: Publishing House of Electronics
Industry, 279–282.
Granger, G. W. (1953). Area balance in color harmony: an experimental study.
_Science_ [117, 59–61. doi: 10.1126/science.117.3029.59](https://doi.org/10.1126/science.117.3029.59)
Hidalgo, B., and Goodman, M. (2013). Multivariate or multivariable regression?
_Am. J. Public Health_ [103, 39–40. doi: 10.2105/AJPH.2012.300897](https://doi.org/10.2105/AJPH.2012.300897)
Hu, J. (2010). _Research on interpolation of medical image and image segmentation_
_in 3D reconstruction system_ . Nanjing: Nanjing University of Aeronautics
and Astronautics.
Huang, X. L., and Shen, L. S. (2002). Research on content-based image retrieval
techniques. _Acta Electron. Sin._ [7, 1065–1071. doi: 10.2753/CSH0009-4633350347](https://doi.org/10.2753/CSH0009-4633350347)
Huang, Z., Yang, S., Zhou, M. C., Li, Z., Gong, Z., and Chen, Y. (2022). Feature
map distillation of thin nets for low-resolution object recognition. _IEEE Trans._
_Image Process._ [31, 1364–1379. doi: 10.1109/TIP.2022.3141255](https://doi.org/10.1109/TIP.2022.3141255)
Itten, J. (1999). _Color art_ . Beijing: World Publishing Corporation.
Jiang, W., Wang, S., Yanan, S., and Liu, J. (2019). “A study of color-emotion
image set construction and feature analysis.” in _2019 IEEE/ACIS 18th_
_International Conference on Computer and Information Science (ICIS)_, June 17,
2019. 99–104.
Jonauskaite, D., Abu-Akel, A., Dael, N., Oberfeld, D., Abdel-Khalek, A. M.,
al-Rasheed, A. S., et al. (2020). Universal patterns in color-emotion associations are
further shaped by linguistic and geographic proximity. _Psychol. Sci._ 31, 1245–1260.
[doi: 10.1177/0956797620948810](https://doi.org/10.1177/0956797620948810)
Krishna, K., and Murty, M. N. (1999). Genetic K-means algorithm. _IEEE Trans._
_Syst. Man. Cy. Part B._ [29, 433–439. doi: 10.1109/3477.764879](https://doi.org/10.1109/3477.764879)
Lang, P., Bradley, M., and Cuthbert, B. (2008). _International affective picture system_
_(IAPS): Affective ratings of pictures and instruction manual_ . Technical report, Univ.
Florida, Gainesville.
Lei, Y., Zhu, H., Zhang, J., and Shan, H. (2022). Meta ordinal regression Forest for
medical image classification with ordinal labels. _IEEE/CAA J. Autom. Sin._ 9,
[1233–1247. doi: 10.1109/JAS.2022.105668](https://doi.org/10.1109/JAS.2022.105668)
Li, X. (2008). “A New Measure of Image Scrambling Degree Based on Grey Level
Difference and Information Entropy.” in _2008 International Conference on_
_Computational Intelligence and Security_, December 13, 2008. 350–354.
Lu, P., Peng, X., Li, R., and Wang, X. (2015). Towards aesthetics of image: a
Bayesian framework for color harmony modeling. _Signal Process Image Commun._
[39, 487–498. doi: 10.1016/j.image.2015.04.003](https://doi.org/10.1016/j.image.2015.04.003)
Lu, P., Peng, X., Yuan, C., Li, R., and Wang, X. (2016). Image color harmony
modeling through neighbored co-occurrence colors. _Neurocomputing_ 201, 82–91.
[doi: 10.1016/j.neucom.2016.03.035](https://doi.org/10.1016/j.neucom.2016.03.035)
Marey, H. M., Semary, N. A., and Mandour, S. S. (2015). Ishihara electronic color
blindness test: an evaluation study. _Ophthalmol. Res. Int. J._ [3, 67–75. doi: 10.9734/](https://doi.org/10.9734/OR/2015/13618)
[OR/2015/13618](https://doi.org/10.9734/OR/2015/13618)
Mehrabian, A. (1980). _Basic dimensions for a general psychological theory_ .
Cambridge: Oelgeschlager, Gunn & Hain, 39–53.
Moon, P., and Spencer, D. E. (1944). Aesthetic measure applied to color harmony
[J]. _JOSA_ [34, 234–242. doi: 10.1364/JOSA.34.000234](https://doi.org/10.1364/JOSA.34.000234)
Odabaşıoğlu, S., and Olguntürk, N. (2020). Effect of area on color harmony in
simulated interiors. _Color. Res. Appl._ [45, 710–727. doi: 10.1002/col.22508](https://doi.org/10.1002/col.22508)
Ohata, E. F., Bezerra, G. M., Chagas, J. V. S., Lira Neto, A. V., Albuquerque, A. B.,
Albuquerque, V. H. C., et al. (2021). Automatic detection of COVID-19 infection
using chest X-ray images through transfer learning. _J. Aut. Sin._ 8, 239–248. doi:
[10.1109/JAS.2020.1003393](https://doi.org/10.1109/JAS.2020.1003393)
Ou, L.-C., Yuan, Y., Sato, T., Lee, W. Y., Szabó, F., Sueeprasan, S., et al. (2018).
Universal models of colour emotion and colour harmony. _Color Res App_ 43,
[736–748. doi: 10.1002/col.22243](https://doi.org/10.1002/col.22243)
Povhan, I. (2020). Logical classification trees in recognition problems. _IAPGOŚ_
[10, 12–15. doi: 10.35784/iapgos.927](https://doi.org/10.35784/iapgos.927)
Russel, J. A. (1980). A circumflex model of affect. _J. Pers. Soc. Psychol._ 39,
[1161–1178. doi: 10.1037/h0077714](https://doi.org/10.1037/h0077714)
Sakahara, K. (2002). “An exterior expression of the houses on the CG and a color
assessment on the method of pair comparison.” in _9th Congress of the International_
_Colour Association_ . June 6, 2002. _Vol. 4421_ . 170–173.
Shen, X., Xiaoyang, W. U., and Han, D. (2015). Survey of research on watershed
segmentation algorithms. _Comput. Eng._ [41, 26–30. doi: 10.3969/j.issn.1000-3428.](https://doi.org/10.3969/j.issn.1000-3428.2015.10.006)
[2015.10.006](https://doi.org/10.3969/j.issn.1000-3428.2015.10.006)
Wang, S., Jiang, W., Su, Y., and Liu, J. (2020). Human perceptual responses to
multiple colors: a study of multicolor perceptual features modeling. _Color Res. Appl._
[45, 728–742. doi: 10.1002/col.22512](https://doi.org/10.1002/col.22512)
Wang, S., Liu, J., Liu, S., Yin, B., Jiang, J., and Lan, J. (2022). Research on attribute
analysis and modeling of color harmony based on objective and subjective factors.
_IEEE Access_ [10, 75074–75096. doi: 10.1109/ACCESS.2022.3190386](https://doi.org/10.1109/ACCESS.2022.3190386)
Zaeimi, M., and Ghoddosian, A. (2020). Color harmony algorithm: an artinspired metaheuristic for mathematical function optimization. _Soft. Comput._ 24,
[12027–12066. doi: 10.1007/s00500-019-04646-4](https://doi.org/10.1007/s00500-019-04646-4)
Zhang, X., Chen, M., and Ji, H. (1996). _Industrial design concept and method_ .
Beijing: Beijing Institute of Technology Press.
Zhang, Y., Liu, P., Han, B., Xiang, Y., and Li, L. (2019). Hue, chroma, and lightness
preference in Chinese adults: age and gender differences. _Color. Res. Appl._ 44,
[967–980. doi: 10.1002/col.22426](https://doi.org/10.1002/col.22426)
Zhang, W., Wang, J., and Lan, F. (2021). Dynamic hand gesture recognition based
on short-term sampling neural networks. _IEEE/CAA J. Autom. Sin._ 8, 110–120. doi:
[10.1109/JAS.2020.1003465](https://doi.org/10.1109/JAS.2020.1003465)
Zhang, X. R., and Zhang, X. (2003). _Color design_ . Beijing: Chemical Industry Press
Co., Ltd.
Zheng, X. H. (2013). _Color harmony theory research_ . Suzhou: Soochow University.
[Frontiers in Psychology](https://www.frontiersin.org/journals/psychology) 15 [frontiersin.org](https://www.frontiersin.org)