3.7. Colorfulness

The colorfulness of a photo is in proportion to the number of nongrayscale pixels in the photo. An achromatic photo, on the other hand, is a grayscale photo. It is not necessary that less

Figure 11. Two photos with different degrees of balance: (a) more balanced; (b) less balanced.

Figure 12. Two photos with different degrees of colorfulness: (a) more colorful; (b) more achromatic.

Figure 13. Two photos with different degrees of simplicity: (a) simpler; (b) more complex.

colorful photos are low quality because professional photographers sometimes choose eliminating colors to express some feelings. As shown in Figure 12(a), the photo is colorful, while the photo in Figure 12(b) is achromatic, and they give different feelings. The degree of colorfulness of a photo is defined as the reciprocal of the achromatic feature that is a special color component feature because it comprises rare hue components and it is perceived as a grayscale photo. The achromatic feature can be obtained from

$$f\_{\text{achomatic}} = \sum\_{\mathbf{x}=1}^{\text{width}} \sum\_{y=1}^{\text{height}} \frac{|\{(\mathbf{x}, \mathbf{y}) | \mathbf{Ch}\_{\text{R}}(\mathbf{x}, \mathbf{y}) = \mathbf{Ch}\_{\text{G}}(\mathbf{x}, \mathbf{y}) = \mathbf{Ch}\_{\text{B}}(\mathbf{x}, \mathbf{y})\rangle|}{\text{width} \times \text{height}} \tag{10}$$

Then the degree of colorfulness yields

$$f\_{\text{colorfulness}} = 1/f\_{\text{achromatic}} \tag{11}$$

#### 3.8. Simplicity

Professional photos are usually possessed of greater simplicity to make the subject appear more attractive. Figure 13(a) is simpler in terms of its color distribution whereas the color distribution of Figure 13(b) is rather complex.

The simplicity feature is computed from the color distribution of a photo. The formula for the simplicity feature [6] is expressed as

On the Design of a Photo Beauty Measurement Mechanism Based on Image Composition and Machine Learning http://dx.doi.org/10.5772/intechopen.69502 107

$$f\_{\text{simplify}} = \left(\frac{|\langle l|k(\boldsymbol{\alpha}) \ni \gamma k\_{\text{max}}\rangle|}{4,096}\right) \times 100\% \tag{12}$$

where k(cl) is the color count for color cl, kmax is the maximum color count, and γ is set to 0.001. In this formula, the number of colors in the photo is reduced to 4,096; that is, the numbers of colors for R, G, and B are all reduced to 16, each of which is represented by 4 bits individually.
