# A Multi-Feature Automatic Evaluation of the Aesthetics of 3D Printed Surfaces
## 2 Materials and Methods
### Feature-Based Approaches  
Another direction od research conducted towards a reliable quality assessment of 3D printed surfaces is the use of various image features that may be calculated using several detectors and feature extractors such as, e.g., Harris corner detector, Scale-Invariant Feature Transform (SIFT) [27], Speeded Up Robust Features (SURF) or Oriented FAST and Rotated BRIEF (ORB) based on the combination of the FAST keypoint detector and BRIEF feature descriptor [28]. Some other possibilities are the use of the Histogram of Oriented Gradients (HOG) [29] or Local Binary Patterns (LBP) [30], as well as the application of Hough transform together with the CLAHE algorithm proposed in the paper [31]. Analyzing the results obtained using the above feature detectors and descriptors, some statistical features such as median, average, standard deviation, kurtosis, or skewness may also be calculated for some of them.  
Since the best results have been obtained using the HOG descriptor [32] and Hough transform [31], these methods are considered representative for this group in further experiments. The idea of the application of the Hough transform is based on the assumption that for a high quality 3D printed surface, the number and the length of the detected straight lines should be noticeably higher than for the images representing the contaminated surfaces. To compensate for the influence of non-uniform illumination, the additional application of histogram equalization using the CLAHE algorithm has been proposed. Then, further binarization of the analyzed image may be conducted using the classical Otsu method [33], leading to the binary image, which is further subject to the Hough transform.  
To increase the independence of results on some geometrical image deformations, we have proposed using the Monte Carlo method for a random selection of image regions where the straight lines are detected on the obtained binary image [31]. Finally, the proposed metric is based on the average length of the detected lines for a specified number of randomly selected regions. For high quality 3D prints, these values should be close to the width of the analyzed regions, whereas in the presence of distortions, the lines detected using the Hough transform are noticeably shorter.  
Another idea is the application of Histogram of Oriented Gradients, where the domination of horizontal or vertical gradients should be observed for high quality surfaces, depending on the orientation of the sample. In the paper [32], the calculation of the local HOG features was proposed where the cell size was 32 \(\times\) 32 pixels with the block size 4 \(\times\) 4 pixels with the overlapping by half of the block size to ensure the high classification accuracy. The comparison of the local features for high quality 3D prints should demonstrate relatively high similarity among them; therefore, the values of the calculated standard deviation or variance should be low compared to poor quality samples. Nevertheless, additional statistical measures, such as average, median, skewness, and kurtosis, may also be calculated for HOG features. A similar approach was also considered for Local Binary Patterns, although the obtained results were significantly worse.