Classification of a 3D Film Pattern Image Using the Optimal Height of the Histogram for Quality Inspection

A 3D film pattern image was recently developed for marketing purposes, and an inspection method is needed to evaluate the quality of the pattern for mass production. However, due to its recent development, there are limited methods to inspect the 3D film pattern. The good pattern in the 3D film has a clear outline and high contrast, while the bad pattern has a blurry outline and low contrast. Due to these characteristics, it is challenging to examine the quality of the 3D film pattern. In this paper, we propose a simple algorithm that classifies the 3D film pattern as either good or bad by using the height of the histograms. Despite its simplicity, the proposed method can accurately and quickly inspect the 3D film pattern. In the experimental results, the proposed method achieved 99.09% classification accuracy with a computation time of 6.64 s, demonstrating better performance than existing algorithms.


Introduction
A 3D film pattern image is a product designed to create a three-dimensional effect on printed patterns based on the amount and angle of light, as shown in Figure 1.Thus, although this film is 2D, it is a type of film where a 3D pattern image can be seen depending on factors such as the amount or angle of light.This product was recently developed for marketing purposes to attract consumer attention and favor.As shown in the product on the right side of Figure 2, the 3D film is applied to the surfaces of products such as cosmetics, liquor, and clothing.The 3D film is created by controlling the concentration of a 2D film, as shown in Figure 3a.After production, the 3D film is transferred to an inspection machine, as shown in Figure 3b, and then photographed using cameras.To capture the entire area, which is approximately 60 cm × 60 cm in size, four cameras are installed, and each camera captures a section divided into four regions.The films captured by the inspection device are then classified into either Figure 1a's Good quality pattern images or Figure 1b's Bad quality pattern images using the inspection algorithms.As mentioned above, the 3D film pattern image should exhibit a three-dimensional appearance.However, if a pattern image is of bad quality, as shown in Figure 1b, it does not create a 3D effect and cannot be sold.Therefore, pattern quality inspection is important.Furthermore, as the 3D film is a recently developed product, plans are underway to establish a mass production system, making it necessary to develop an algorithm to inspect the quality of the 3D film.The good pattern of a 3D film is characterized by a clear pattern contour and high contrast, as shown in Figure 1a.On the other hand, a bad pattern has a vague pattern contour and low contrast, as shown in Figure 1b.These characteristics make it difficult to detect a defective 3D film during inspection as the bad pattern becomes invisible in three dimensions.Additionally, the size and texture of the 3D film pattern image are not uniform, posing challenges in the pattern examination.Furthermore, since it is a recently developed product, there are limited studies on the inspection techniques for it.Thus, there  The good pattern of a 3D film is characterized by a clear pattern contour and high contrast, as shown in Figure 1a.On the other hand, a bad pattern has a vague pattern contour and low contrast, as shown in Figure 1b.These characteristics make it difficult to detect a defective 3D film during inspection as the bad pattern becomes invisible in three dimensions.Additionally, the size and texture of the 3D film pattern image are not uniform, posing challenges in the pattern examination.Furthermore, since it is a recently developed product, there are limited studies on the inspection techniques for it.Thus, there  The good pattern of a 3D film is characterized by a clear pattern contour and high contrast, as shown in Figure 1a.On the other hand, a bad pattern has a vague pattern contour and low contrast, as shown in Figure 1b.These characteristics make it difficult to detect a defective 3D film during inspection as the bad pattern becomes invisible in three dimensions.Additionally, the size and texture of the 3D film pattern image are not uniform, posing challenges in the pattern examination.Furthermore, since it is a recently developed product, there are limited studies on the inspection techniques for it.Thus, there The good pattern of a 3D film is characterized by a clear pattern contour and high contrast, as shown in Figure 1a.On the other hand, a bad pattern has a vague pattern contour and low contrast, as shown in Figure 1b.These characteristics make it difficult to detect a defective 3D film during inspection as the bad pattern becomes invisible in three dimensions.Additionally, the size and texture of the 3D film pattern image are not uniform, posing challenges in the pattern examination.Furthermore, since it is a recently developed product, there are limited studies on the inspection techniques for it.Thus, there is a need to develop an inspection algorithm to identify defective 3D film products.Quality inspection for 3D films can be performed using existing research methods .
Since the 3D film pattern image was recently developed, there are few inspection methods to determine whether there is a defect.However, it is possible to consider a method of testing using existing methods.Among the existing methods, segmentation can be used as an inspection method based on the shape and texture of the 3D film.There are many techniques for segmentation, and binarization and segmentation are the most basic and used in many studies.Binarization changes pixels with high or low value to a black or white value based on a specific value.Binarization has several functions, and one of the representative methods is Otsu thresholding.Otsu thresholding is an algorithm that applies binarization by finding the optimal thresholding value via the brightness histogram of an input image.Although Otsu thresholding is stable, the computation is slow.As a result, the division accuracy can be low when strip detection is used as preprocessing.To compensate for this, Sa et al. proposed improved Otsu segmentation [1].This method extracts grayscale information from the edge using the Sobel operator and then applies Otsu thresholding to extract grayscale information.This method showed better performance than classic Otsu thresholding by selecting appropriate thresholding.However, the paper presented a performance evaluation for the images with clear boundaries, such as scratch images.Therefore, it is considered challenging to extract objects from the background of the 3D film with bad patterns due to the vague contour.
Among the segmentation methods, the edge detection algorithm is an algorithm for edge detection in an image.In an image, the edge is the boundary between the foreground and background, and it is determined by the significant change in brightness or color intensity between the two regions.Therefore, the edge can be regarded as the part where the pixel intensity changes rapidly.Edge detection also has several techniques.Among them, Canny edge detection calculates the first-order differentiation for x and y and then differentiates it in four directions [2].From the result of differentiation in four directions, the points with the maximum values become edges.The purpose of Canny edge detection is to identify strong edges, and it is less sensitive to noise than other edge detection algorithms.Recently, there were studies that combine Canny with other methods to improve edge detection accuracy.Pablo et al. proposed a method that obtains image information using Canny edge detection on images applied with HSV to increase edge detection accuracy in input images [3].Mlyahilu et al. proposed a method for classifying 3D pattern images using a Convolutional Neural Network (CNN) [4].In this method, the edges were first detected using preprocessing algorithms such as Canny, Sobel, and Laplacian, and then the images are classified as either good or defective based on the detected edges.
Recently, segmentation methods, such as morphological geodesic active contour methods, have been published [5][6][7].Morphological geodesic active contour gradually develops segmentation areas and then morphologically segments the objects.This method combines the morphology snake algorithm and the geodesic active contour algorithm, which performs object detection using morphology operators [8][9][10][11][12][13].Morphological geodesic active content has the advantage of being able to morphologically segment objects that are not in clear forms, such as squares and triangles.Recent medical studies have used these features to detect objects such as the lungs and cancer in CT images [5,6].In addition, a welding bead inspection study using morphological geodesic active with preprocessing has been published to segment the uneven form of the welding bead [7].However, it is cumbersome to set the location of the object to be partitioned and to find the optimal parameters value to obtain accurate results when using morphological geodesic active content.Therefore, it is not easy to get good results using this method in a factory where the experimental environment changes.
In addition, support vector machines (SVM) can be utilized as a method for classifying the presence or absence of defects in the 3D film [14][15][16][17][18]. Salman et al. published a study in which SVM was performed after applying Canny edge detection to identify and classify leaves [14].Hsu and Chen proposed a study that detects blurry images and classifies them into categories [15].However, finding the boundaries and optimal hyper-parameters for data classification in SVM still presents a challenge.
The Absolute difference and template matching can be used as methods to assess the similarity between 3D film patterns.Among them, the Absolute difference means the absolute value of image subtraction between two images [19].If the two images are different, the ratio of the black area is high in the result of the Absolute difference.Among the methods using similarity, the template matching method is used to find a part in the image that matches the template image [20,21].However, the patterns of 3D films analyzed in this paper vary in size and texture, and the shapes of good and bad patterns are similar to each other.Therefore, it is difficult to expect high accuracy when using template matching because of these features.In addition, a study using luminosity contrast methods was published to distinguish patterns in the image.Among these methods, the Michelson contrast is a technique that compares images using the maximum and minimum luminance values of the image [22].The equation is as follows: where M n represent the Michelson contrast value of the n-th input image, and L min and L max are the minimum and maximum luminance values in the input image.However, the Michelson contrast cannot guarantee high classification accuracy for 3D film pattern images.This is because Equation ( 1) only considers the minimum and maximum luminance values.
In other words, even if the contrast is low, the bad pattern has several luminosity values at a certain level, as shown in Figure 1.Therefore, relying solely on the classification based on L min and L max may lead to a high probability of misclassification.
In this paper, we present an algorithm that can identify defective patterns in 3D film patterns by analyzing their image histogram from a statistical perspective.Our proposed algorithm utilizes the contrast features of 3D film pattern images to classify defects based on a specific height for the image histogram.The calculation process of the proposed algorithm is simple, but it achieves high accuracy in quality inspection and has low computational complexity.The remaining sections of this paper are organized as follows: Section 2 details our proposed algorithm, while Section 3 presents the experimental results obtained using this algorithm.Finally, in Section 4, we present the interpretation of the research findings, discuss the implications of the results, and draw conclusions from this study.

Materials and Methods
As described above, we can consider various methods for testing a 3D film pattern image using an existing algorithm.Among these methods, the segmentation method should be analyzed after detecting the pattern in the 3D film.However, it is challenging because the contour of the defective pattern is unclear, and the contrast is low.In addition, ensuring high accuracy in analysis using similarity methods such as SAD and template matching is not easy since all 3D film patterns do not have the same size and texture.Thus, the classification of 3D film pattern images is challenging.To solve these problems, we propose an inspection method to classify 3D film pattern images from a statistical perspective.The proposed algorithm utilizes a specific quantile in the image histogram to perform a quality inspection, and this method leverages the characteristics of the 3D film's good and bad patterns.Despite its simplicity, the proposed method has the advantage of high accuracy with low computational complexity.In this section, we first explain how to cut each pattern in the 3D film in Figure 1 and then present how to classify using image histograms.

Fast Fourier Transform Algorithm for Cutting 3D Film Pattern Images
To inspect the pattern images in the 3D film of Figure 1, each image must be properly cropped according to the corresponding pattern.To accomplish this, we utilize the Fast Fourier transform algorithm proposed by Mlyahilu and Kim [23] to extract images by pattern in the 3D film.Let I(i, j) be the N × N image in a spatial domain which is sampled from the Discrete Fourier Transform and is defined as F(k, l), as shown in Equation (2).
For a color image F(k, l), we convert to a gray image I(n, m), as shown in Equation (3).
To obtain the horizontal I a (a, b) and vertical I b (a, b) indicated in Equations ( 4) and ( 5), respectively, we use the binaries I(n, m) to determine the indices of white pixel values.
By taking the intersection of the results from Equations ( 4) and ( 5), we obtain the pixel coordinates.Using this intersection information, we can then crop the pattern images from the 3D film.

Inspection Algorithm based on a Specific Height of Histogram
We classify the quality of the 3D film by following the procedure illustrated in Figure 4. Firstly, we input the 3D film as shown in Figure 1.The 3D film pattern image is cut using the Fast Fourier transform algorithm.At this point, the cut 3D film pattern images are inspected one by one.The image histogram is computed for the brightness values of the 3D film pattern image.A histogram is a method mainly used to deal with statistical data and is represented in the shape of a bar graph to understand the distribution of the data.In image processing, it is used to understand the pixel distribution of digital images.The image histograms provide information on the brightness and contrast of images, and various image processing techniques, such as histogram stretching, are applied to the analysis results of the histogram.Figure 5 shows the image histogram for each pattern of the 3D film: Figure 5a represents the good pattern image, and Figure 5b represents the bad pattern image.In addition, the image histogram expresses the x-axis as the pixel value and the y-axis as the frequency of the pixel.As shown in Figure 5a, the pixel value of the image histogram is distributed over a wide area since the pattern image has a clear outline and a high contrast.In contrast, the pixel values of the image histogram for the bad pattern image are concentrated in a specific range due to the blurred outline and low contrast of the image, as depicted in Figure 5b.Due to these characteristics, the image histogram height of the good pattern image is relatively lower than the image histogram height of the bad pattern image, as shown in Figure 5.The inspection algorithm proposed in this paper uses these characteristics to determine whether the 3D film pattern image is defective.Next, we find the pixel value that is the x-axis at the point intersecting the specific height α value of the tenth quartile in the histogram, as shown in Figure 6.After that, we find the height of the y-axis that matches the minimum value of the pixel value.This process aims to find the height (Y α ).The reason why the minimum value is used is that the larger the pixel value in the image histogram of the 3D film pattern image, the more complicated the frequency value is, as shown in Figure 5. Therefore, the minimum value is used to accurately find the height of the point coinciding with the specific height α.The equation for calculating the height of the y-axis is as follows: where P α (x) represents the pixel values x at the height α value of the image histogram in the gray image I(n, m).In addition, f (x) represents the height at the pixel value x of the image histogram.The decision can be defined as follows: where D is the class label of the image, and when Y α > β, it is a good image (D = 1), and when Y α ≤ β, it is a bad image (D = 0).
J. Imaging 2023, 9, x 6 of 14 where   () represents the pixel values  at the height  value of the image histogram in the gray image (, ).In addition, () represents the height at the pixel value  of the image histogram.The decision can be defined as follows: where  is the class label of the image, and when   > , it is a good image ( = 1), and when   ≤ , it is a bad image ( = 0).
where   () represents the pixel values  at the height  value of the image histogram in the gray image (, ).In addition, () represents the height at the pixel value  of the image histogram.The decision can be defined as follows: where  is the class label of the image, and when   > , it is a good image ( = 1), and when   ≤ , it is a bad image ( = 0).

Data and Experimental Environment
An experiment was performed to evaluate the proposed algorithm using a total of 2850 3D film pattern images.Out of these 3D film pattern images, 2136 were classified as good pattern images, while 714 were classified as bad pattern images.Figure 7 shows some examples of the 3D film pattern images used in the experiment: Figure 7a shows the good pattern images, while Figure 7b shows the bad pattern images.The images in Figure 7 were obtained by applying the Fast Fourier transform algorithm to the 3D film in Figure 1

Evaluation Metrics
Accuracy is an indicator of the accurately classified ratio among the images, and sensitivity measures the ability of a test or model to correctly identify the positive cases.It is calculated as the ratio of the true positive results to the sum of the true positive and false negative results.On the other hand, specificity measures the ability of a test or model to

Data and Experimental Environment
An experiment was performed to evaluate the proposed algorithm using a total of 2850 3D film pattern images.Out of these 3D film pattern images, 2136 were classified as good pattern images, while 714 were classified as bad pattern images.Figure 7 shows some examples of the 3D film pattern images used in the experiment: Figure 7a shows the good pattern images, while Figure 7b shows the bad pattern images.The images in Figure 7 were obtained by applying the Fast Fourier transform algorithm to the 3D film in Figure 1

Data and Experimental Environment
An experiment was performed to evaluate the proposed algorithm using a tota 2850 3D film pattern images.Out of these 3D film pattern images, 2136 were classified good pattern images, while 714 were classified as bad pattern images.Figure 7 sho some examples of the 3D film pattern images used in the experiment: Figure 7a shows good pattern images, while Figure 7b shows the bad pattern images.The images in

Evaluation Metrics
Accuracy is an indicator of the accurately classified ratio among the images, and s sitivity measures the ability of a test or model to correctly identify the positive cases.I calculated as the ratio of the true positive results to the sum of the true positive and fa negative results.On the other hand, specificity measures the ability of a test or mode

Evaluation Metrics
Accuracy is an indicator of the accurately classified ratio among the images, and sensitivity measures the ability of a test or model to correctly identify the positive cases.It is calculated as the ratio of the true positive results to the sum of the true positive and false negative results.On the other hand, specificity measures the ability of a test or model to correctly identify negative cases.It is calculated as the ratio of the true negative results to the sum of the true negative and false positive results.The calculation equations are as follows: Accuracy = (TP + TN)/(TP + FP + FN + TN), Speci f icity = TN/(TN + FP), where the TP (True Positive) means the model was correctly classified in the positive class; FP (False Positive) means the model classified an observation to be positive when in reality it was actually negative; TN (True Negative) means the model correctly classified an observation in the negative class; and FN (False Negative) means the model incorrectly classified an observation as negative when it should have been classified as positive.

Performance of the Proposed Algorithm and Comparative Algorithms
A histogram was obtained for each cut image, as shown in Figure 5.In addition, the classification accuracy of each image histogram was calculated for different height intervals, ranging from 1/10 to 9/10, as shown in Table 1.The classification of the pattern images was obtained using Equation (7), with β set to 600.Table 1 shows the number of overlapping good and bad pattern images, enabling us to determine the number of incorrectly classified images.The accuracy, sensitivity, and specificity were all higher than 90% at all heights, as shown in Table 1.In addition, the highest results were obtained at 5/10, with an accuracy of 99.09% and a sensitivity of 99.91%.On the other hand, the lowest accuracy and specificity were shown at 1/10, and the bad pattern images were especially more misclassified than the good pattern images.As shown in Figure 5, this result was obtained because the width of the histogram was wide when both the good pattern and bad pattern images had a low height.In other words, the bad pattern has a characteristic where the frequency is high at a specific pixel value due to its low contrast.However, there may be other pixel values that occur less frequently in areas other than the specific pixel values.For this reason, the width at the low height of the image histogram has a relatively wide width compared to other heights.
Table 1.Analysis of misclassification images and number of overlapping good pattern and bad pattern images, along with classification accuracy, sensitivity, and specificity of 3D film images.To evaluate the performance of the proposed algorithm, we analyzed the results of the existing algorithms using the Abs-based difference method, Otsu thresholding, Canny edge detection, the CNN with Canny [4], morphological geodesic active contour [7], the Michelson contrast [22], the Canny with HSV [3], and the SVM with Canny [14].For the CNN with Canny method proposed by Mlyahilu et al. [4], we used 32 and 64 nodes in the convolution layer, 10 epochs, the ReLu activation function, and Adam for the optimization function, as in the paper.In addition, the training set and test set were divided into 7:3, respectively.In addition, the SSIM was used to evaluate the similarity between the two images for the Absolute difference, Otsu thresholding, Canny edge detection, and morphological geodesic active control methods [24].The SSIM evaluates the similarity using the structural information of the two images and compares the structure of the pixels constituting the image as shown in Equation (11).

Height of
where b(x, y), c(x, y), and r(x, y) represent the average brightness, contrast, and correlation of the two images, respectively.µ x , µ y , σ 2 x , σ 2 y and σ xy are the mean brightness of the original image, mean brightness of the image-processed image, the global variance of the original image, the global variance of the image-processed image, and the covariance between the original and image-processed images, respectively.Based on the results of the SSIM analysis, we concluded that the two images were considered similar if the resulting value was equal to or greater than the threshold value of 0.5.Conversely, if the resulting value was less than 0.5, we concluded that the two images were not similar.In the SSIM analysis, we utilized the first image of the good pattern in Figure 5a as the reference image.Based on the results of the SSIM analysis, we employed accuracy as the metric to evaluate the experimental results of the algorithms.Figure 8a displays the 3D film good pattern images, while Figure 8b to Figure 8f presents the results obtained from the Absolute difference, Otsu thresholding, Canny edge detection, Canny edge detection with HSV, and morphological geodesic active control algorithms for the 3D film good pattern images, respectively.In addition, Figure 9a displays the 3D film bad pattern images, while (Figure 9b) to Figure 9f displays the images obtained using the aforementioned comparative algorithms for the 3D film bad pattern images.The Absolute difference method represents the absolute value of the pixel difference between the good pattern image and other images, and the black area indicates a large difference.In all Canny Edge detections, the minimum threshold value and the maximum threshold value were set to 50 and 10, respectively.In addition, we marked a red line as a segmentation area for the morphological geodesic active content.Figure 8b is the result of obtaining the Absolute difference between the right pattern images, and the values of the two images are similar, so most of the white areas appear, but the black areas are distributed in the outline.Furthermore, in Figure 8a,c,f, a wider area than the actual pattern image was segmented, and in Figures 8d and 8e, too many edges were detected, making it difficult to identify the pattern shape.In Figure 9a, it can be confirmed that the method cannot show a clear difference between the good and bad pattern images because the white and black areas are mixed in the outline of the pattern.In Figure 9c,f, fewer or more areas than the bad pattern images were detected, and the patterns were hardly detected in (Figure 9d) and (Figure 9e). Figure 10 and Table 2 present the confusion matrices and classification results for the good and bad 3D film images obtained using each respective existing algorithm and the proposed algorithm.As displayed in Table 2, the proposed algorithm had the highest performance with an accuracy of 99.09% when α = 5/10 and the computational time is 6.64 s.The Canny with the SVM method had an accuracy of 99.01%, but the calculation time was 5237.96s, which took a very long time.In addition, both the Canny with HSV and morphological geodesic active content showed 74.5% accuracy.In addition, the sensitivity value is 0, indicating that they failed to classify any good patterns, as shown in Figure 10.Furthermore, CNN's Canny algorithm exhibited very fast computation time, but showed lower accuracy, sensitivity, and specificity in the range of around 70%.All other methods had less than 50% accuracy.In particular, Canny with HSV and morphological geodesic active contour had a specificity value of 0, indicating that those algorithms failed to classify any bad pattern images, as shown in Figure 10.Thus, as observed in Figures 8 and 9, the comparative algorithms failed to accurately detect the patterns, resulting in the inability to accurately classify the patterns, as shown in Table 2. Therefore, through the experimental results, we can confirm that the proposed method exhibits a superior performance compared to the comparative algorithms within a shorter period of time.
contour had a specificity value of 0, indicating that those algorithms failed to classify any bad pattern images, as shown in Figure 10.Thus, as observed in Figures 8 and 9, the comparative algorithms failed to accurately detect the patterns, resulting in the inability to accurately classify the patterns, as shown in Table 2. Therefore, through the experimental results, we can confirm that the proposed method exhibits a superior performance compared to the comparative algorithms within a shorter period of time.contour had a specificity value of 0, indicating that those algorithms failed to classify any bad pattern images, as shown in Figure 10.Thus, as observed in Figures 8 and 9, the comparative algorithms failed to accurately detect the patterns, resulting in the inability to accurately classify the patterns, as shown in Table 2. Therefore, through the experimental results, we can confirm that the proposed method exhibits a superior performance compared to the comparative algorithms within a shorter period of time.

Discussion and Conclusions
The 3D film is a recently developed product, and there is a need for an inspection method to evaluate the quality of the 3D film pattern for mass production.However, there are few inspection methods since 3D films have only been recently developed.In addition, the good pattern of the 3D film has high contrast and a clear contour, while the bad pattern has low contrast and a cloudy contour, making it challenging to inspect 3D film images using conventional research.As a study for classifying the quality of 3D film, Mlyahilu et al. proposed a method for classifying 3D pattern images using the Convolutional Neural Network (CNN) [4].In this method, the edges were first detected using preprocessing

Discussion and Conclusions
The 3D film is a recently developed product, and there is a need for an inspection method to evaluate the quality of the 3D film pattern for mass production.However, there are few inspection methods since 3D films have only been recently developed.In addition, the good pattern of the 3D film has high contrast and a clear contour, while the bad pattern has low contrast and a cloudy contour, making it challenging to inspect 3D film images using conventional research.As a study for classifying the quality of 3D film, Mlyahilu et al. proposed a method for classifying 3D pattern images using the Convolutional Neural Network (CNN) [4].In this method, the edges were first detected using preprocessing algorithms such as Canny, Sobel, and Laplacian, and then the images are classified as either good or defective based on the detected edges.In Figure 11a shows the 3D film bad pattern image used in the experiment and is classified as a bad pattern due to the white scratch on the image surface; Figure 11b shows the edge detection result for Canny; Figure 11c shows the edge detection result for Sobel; and Figure 11d shows the edge detection result for Laplacian.In order to classify a defect in the bad image, a scratch should be detected after performing edge detection.However, in all the results shown in Figure 11b-d, the pattern and scratch of the 3D film were not distinguished.Therefore, it can be confirmed that it is not easy to detect the pattern using edge detection methods in a pattern image.
algorithms such as Canny, Sobel, and Laplacian, and then the images are classified as either good or defective based on the detected edges.In Figure 11a shows the 3D film bad pattern image used in the experiment and is classified as a bad pattern due to the white scratch on the image surface; Figure 11b shows the edge detection result for Canny; Figure 11c shows the edge detection result for Sobel; and Figure 11d shows the edge detection result for Laplacian.In order to classify a defect in the bad image, a scratch should be detected after performing edge detection.However, in all the results shown in Figure 11bd, the pattern and scratch of the 3D film were not distinguished.Therefore, it can be confirmed that it is not easy to detect the pattern using edge detection methods in a pattern image.In this paper, we propose a quality inspection algorithm for the 3D film pattern images.The proposed method is to compare and classify certain heights in histograms of 3D film pattern images.In addition, this method is simple, but it has the advantage of high accuracy and fast inspection time.In the experiment, we applied various methods for comparison purposes, including a segmentation method that can inspect the shape and texture of the 3D film, methods using pattern images, a method using luminance, and methods using machine learning.We then compared their performance with the proposed algorithm based on the results.In the experimental results, the proposed method shows an accuracy of 99.09% and the calculation time of 6.64 s.In contrast, all other comparison methods were less accurate than the proposed algorithm.Among the comparison methods, Canny with SVM showed the highest accuracy of 99.01%, but it took about 5237 s to calculate.Thus, it was judged to be impractical for use in real-time inspection due to the long processing time.However, our algorithm enables the company, which produces 3D film, to inspect the quality of the products within the required timeframe, ensuring both production speed and product quality, as shown in Tables 1 and 2.
The idea proposed in this paper, which involves using the histogram of the image for inspection, may not be considered particularly groundbreaking.However, in conjunction with the aforementioned points, we have demonstrated in Table 2 that our method surpasses other approaches in terms of accuracy and processing time when inspecting images.Hence, the method proposed in this paper can be seen as a practical inspection approach that is conceptually straightforward, while still providing high accuracy and efficient processing time.Nevertheless, the proposed method has a limitation in that it cannot detect scratches or other defects present in the pattern image.To address this, future research plans include conducting a study to classify the defects mentioned above.Subsequently, the aim is to propose a system capable of performing real-time inspections immediately after the product is manufactured in the field.In this paper, we propose a quality inspection algorithm for the 3D film pattern images.The proposed method is to compare and classify certain heights in histograms of 3D film pattern images.In addition, this method is simple, but it has the advantage of high accuracy and fast inspection time.In the experiment, we applied various methods for comparison purposes, including a segmentation method that can inspect the shape and texture of the 3D film, methods using pattern images, a method using luminance, and methods using machine learning.We then compared their performance with the proposed algorithm based on the results.In the experimental results, the proposed method shows an accuracy of 99.09% and the calculation time of 6.64 s.In contrast, all other comparison methods were less accurate than the proposed algorithm.Among the comparison methods, Canny with SVM showed the highest accuracy of 99.01%, but it took about 5237 s to calculate.Thus, it was judged to be impractical for use in real-time inspection due to the long processing time.However, our algorithm enables the company, which produces 3D film, to inspect the quality of the products within the required timeframe, ensuring both production speed and product quality, as shown in Tables 1 and 2.
The idea proposed in this paper, which involves using the histogram of the image for inspection, may not be considered particularly groundbreaking.However, in conjunction with the aforementioned points, we have demonstrated in Table 2 that our method surpasses other approaches in terms of accuracy and processing time when inspecting images.Hence, the method proposed in this paper can be seen as a practical inspection approach that is conceptually straightforward, while still providing high accuracy and efficient processing time.Nevertheless, the proposed method has a limitation in that it cannot detect scratches or other defects present in the pattern image.To address this, future research plans include conducting a study to classify the defects mentioned above.Subsequently, the aim is to propose a system capable of performing real-time inspections immediately after the product is manufactured in the field.

Figure 2 .Figure 3 .
Figure 2. Production goods without and with 3D film good pattern images.(Left) Product without attached pattern image; (Right) product with attached pattern image.

Figure 2 .Figure 3 .
Figure 2. Production goods without and with 3D film good pattern images.(Left) Product without attached pattern image; (Right) product with attached pattern image.

Figure 2 .Figure 1 .
Figure 2. Production goods without and with 3D film good pattern images.(Left) Product without attached pattern image; (Right) product with attached pattern image.

Figure 2 .Figure 3 .
Figure 2. Production goods without and with 3D film good pattern images.(Left) Product without attached pattern image; (Right) product with attached pattern image.

Figure 3 .
Figure 3.A 3D film pattern image manufacturing and inspection.(a) The 3D film manufacturing process; (b) inspection machine.

Figure 4 .
Figure 4. Procedures of the proposed algorithm.

Figure 6 .
Figure 6.The height   of the specific height  in the histogram.

Figure 6 .
Figure 6.The height Y α of the specific height α in the histogram.

Figure 6 .
Figure 6.The height   of the specific height  in the histogram.
Fig 7 were obtained by applying the Fast Fourier transform algorithm to the 3D film in Fig 1, and each image had a size of 169 × 169.PC specifications were as follows: Window Pro, Intel ® Core™ i7010700k CPU@3.80GHz,16GB, NVIDIA GeForce RTX 2080 SUP and Python 3.11.

Table 2 .
Classification results for algorithms with 3D film images.

Table 2 .
Classification results for algorithms with 3D film images.