# A Multi-Feature Automatic Evaluation of the Aesthetics of 3D Printed Surfaces
## 2 Materials and Methods
### Mutual Image Similarity Based on Full-Reference IQA Metrics  
The most promising results of the quality evaluation of the 3D printed surfaces may be achieved using the modified approach based on the use of the full-reference general-purpose image quality-assessment metrics. Since their direct application would require knowledge of the reference image, which is usually unavailable, the proposed solution is the calculation of mutual similarities. In this case, the image may be divided into 4, 9, or 16 fragments using the 2 \(\times\) 2, 3 \(\times\) 3, or 4 \(\times\) 4 blocks grid, respectively. Then, mutual similarities may be calculated between each of the blocks using the same methods as for the comparison of two images using full-reference (FR) IQA metrics, typically using the popular Structural Similarity (SSIM) metric or one of its several modifications and extensions, considered in the paper. The number of mutual similarities, further averaged, for \(N\times N\) blocks may be expressed as \(M=0.5\times N\times(N-1)\); hence, for 16 blocks, 120 values are obtained. Therefore, the use of a higher number of blocks would cause much longer computation time with a similar classification accuracy or a similar correlation with subjective quality scores. In further experiments, several elementary metrics were calculated for 4, 9, and 16 blocks, considered--together with some other features discussed above--as the inputs for the optimization of the combined (hybrid) metrics proposed in the paper. The most widely known metric which is the base for many other IQA methods, namely Structural Similarity (SSIM), was proposed by [PERSON] and [PERSON] [34] as the product of three components reflecting the most typical distortions, namely loss of contrast, luminance distortions, and the structural distortions. This metric is calculated locally using the sliding window approach, applying the 11 \(\times\) 11 pixels Gaussian window. These values, being the quality map of the image, are further averaged, and the final SSIM value is obtained. In the case considered in the paper, these SSIM values are calculated mutually between the image fragments and then averaged again. The same approach is applied for the other IQA-based methods used in our experiments. One of the earliest metrics based on the idea of the SSIM utilizes the observation that heavily blurred images are not always properly measured using this metric. Therefore, Edge-Based Structural Similarity (ESSIM) metric was proposed in 2006 by [PERSON] et al. [35], which is based on the Sobel edge filtering and further calculation of edge direction vectors and their histograms for 16 \(\times\) 16 pixels image blocks. Then, the comparison of edge histograms is used in the original SSIM formula instead of the structural part together with luminance and contrast comparisons. The application of the local variance calculation in the preprocessing step was proposed in the paper [36], leading to the Quality Index based on Local Variance (QILV). Another modification of the SSIM metric, proposed in 2009 by [PERSON] et al. [37], is known as Complex Wavelet SSIM (CW-SSIM). This metric is based on the assumption that some distortions cause phase changes reflected in the local wavelet coefficients. Additionally, it is insensitive to small rotations and shifts between the compared images. On the other hand, one of the most widely known modifications of the SSIM was proposed by [PERSON] et al. in 2011. This metric, referred to as Feature Similarity (FSIM) [38], is based on comparison of phase congruency and gradient magnitude using a similar formula to the original SSIM implementation. Both these low-level features are complementary as phase congruency reflects the importance of a local structure, whereas gradient magnitude is sensitive to contrast information. Another idea, proposed by [PERSON] and [PERSON] [39] was based on the use of spectral residual similarity.