Next Article in Journal
Investigation on Decorative Materials for Wardrobe Surfaces with Visual and Tactile Emotional Experience
Previous Article in Journal
Investigation of Asphalt Mixture Balanced Design Method Based on Intermediate Layer Properties
Previous Article in Special Issue
Laser Cladding of a Ti–Zr–Mo–Ta–Nb–B Composite Coating on Ti60 Alloy to Improve Wear Resistance
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Microsurface Defect Recognition via Microlaser Line Projection and Affine Moment Invariants

by
J. Apolinar Muñoz Rodríguez
Centro de Investigaciones en Óptica, A. C., Lomas del Bosque 115, Col. Comas del Campestre, León 37000, GTO, Mexico
Coatings 2025, 15(4), 385; https://doi.org/10.3390/coatings15040385
Submission received: 29 November 2024 / Revised: 1 March 2025 / Accepted: 6 March 2025 / Published: 25 March 2025
(This article belongs to the Special Issue Laser-Assisted Coating Techniques and Surface Modifications)

Abstract

:
Advanced non-destructive techniques play an important role in detecting surface defects in the context of additive manufacturing, with non-destructive technologies providing surface data for the recognition of surface defects. In this line, it is necessary to implement microscope vision technology for the inspection of surface defects. This study proposes an approach for microsurface defect recognition using affine moment invariants based on microlaser line contouring, allowing for the detection of microscopic holes and scratches. For this purpose, the surface is represented by a Bezier surface to characterize microsurface defects through patterns of affine moment invariants after the surface is contoured via microlaser line projection. In this way, microholes and scratches can be recognized by computing a pattern of affine moment invariants for each region of the target surface. This technique is performed using a microscope vision system, which retrieves the surface topography via microlaser line scanning. The proposed technique allows for the recognition of holes and scratches with a surface depth greater than 20 microns, with a minor relative error of less than 2%. The proposed surface defect recognition approach enhances the literature on recognition techniques performed using visual technologies based on optical microscope systems. This contribution is corroborated through a discussion focused on the recognition of holes and scratches by means of various optical-microscope-based systems.

1. Introduction

At present, non-destructive testing methods allow for the utilization of technologies to inspect surface defects in the context of additive manufacturing [1], where surface pattern recognition serves as a powerful tool to detect surface defects [2]. In this way, non-destructive testing methods have been implemented for the monitoring of microsurface holes and scratches [3]. Non-destructive testing methods include techniques such as visual testing, ultrasonic testing, acoustic emission, radiographic testing, magnetic particle inspection, and penetration testing [4]. Ultrasonic testing is performed based on the behavior of sound waves, where a pulse travels through uniform regions but changes in the presence of a discontinuity [5]. Similarly, acoustic emission testing is carried out by assessing wave disturbances generated by discontinuities on a surface [6]. Radiographic testing is based on the variation in radiation associated with the thickness of the material [7]. Magnetic particle testing is performed based on the continuous lines of force, which are distorted by discontinuities in ferromagnetic materials [8]. Penetration testing is carried out by applying a penetrant liquid to the surface in order to fill any discontinuity, which is then observed by means of fluorescent dyes [9]. Of the non-destructive testing methods, the simplest and cheapest method is non-destructive visual testing, where surface defect inspection is typically performed in the range between 30 microns and 400 microns [10]. Therefore, non-destructive visual testing is the most useful method for the inspection of holes and scratches in additively manufactured materials [11]. The hardware used for visual testing typically includes only a camera and computational algorithms for the inspection of holes and scratches. Thus, non-destructive visual testing has been employed as the standard method to detect surface defects with a minimum depth of 30 microns [12]. In this way, the present study on surface defect detection was carried out based on visual testing methods. Surface defect recognition is generally applied to inspect surface holes and scratches with a minimum depth of 20 microns, and microsurface defect detection is typically carried out via visual testing by means of computer vision systems based on image processing [13], where surface defect detection is performed by means of methods such as statistics-, frequency-, and model-based approaches, including machine learning and deep learning models. Statistical methods allow for the detection of surface defects according to the pixel intensity distribution; for instance, a surface defect detection approach has been implemented using statistics [14], where the surface features are determined via a local binary pattern. Furthermore, surface defect recognition has been performed using a Gauss function modulated in the spatial domain [15], where the defect features are characterized using a core based on a complete dictionary. Additionally, surface defect detection has been carried out based on texture analysis [16], where the texture features were obtained by an iterative framework based on the absolute intensity deviation and local aggregation.
In a similar way, frequency-based methods are used to detect surface defects using pixel intensity distributions; for instance, surface defect detection has been performed using the Fourier transform [17], where the Fourier spectrum of the image under testing is compared with the spectrum of the real sample. Surface defect detection has also been carried out by means of the Fourier transform and the Hough transform [18], where the presence of surface defects is determined by comparing the difference between the tested image and the original sample. Additionally, surface defect defection has been implemented according to the Fourier transform amplitude [19], where the amplitude variation in the Fourier spectrum is used to determine surface defects based on a homogeneous image region.
Furthermore, model-based methods allow for surface defect inspection according to the image intensity distribution; for instance, surface defect detection has been performed by means of a hidden Markov model [20], where the recognition is computed through the hidden Markov model using a library of defects. Additionally, surface defect detection has been performed using a regularized robust principal component model [21], where a matrix separates the data into a low-rank component and a sparse component to characterize the surface pattern. Additionally, surface defect inspection has been carried out through a model-based approach using the intensity distribution [22], where a saliency map is determined by a continuous curve that represents the surface edge.
Moreover, machine learning methods can be used to detect surface defects using the pixel intensity distribution; for instance, surface defect detection has been performed via machine learning [23], where a gray-level image model was generated by training a neural network to determine surface defects. Additionally, surface defect inspection has been implemented via machine learning based on nearby points [24], where surface defect detection is carried out through a random forest method using a point cloud. Furthermore, surface defect detection has been carried out using neural networks [25], where potential defect images are compared with original images through the use of a database of defect images.
More recently, surface defect recognition has been implemented via deep learning [26]; for example, deep features can be determined using residual or convolutional neural networks. For instance, surface defect detection has been performed using a convolutional neural network [27], where a convolutional matrix was used to extract the features from an image without defects. In a similar way, surface defect detection has been carried out using convolutional neural networks [28], where a data set of defects was employed to determine surface features by means of a deep convolutional neural network.
The above computer vision techniques allow for the recognition of surface defects through computing the surface features from the pixel intensity distribution. However, the intensity distribution profile does not necessarily depict the topography accurately. This is because the intensity profile varies based on the surface reflectance, light source position, and viewer’s position. Therefore, it has been established that traditional computer vision techniques do not employ the three-dimensional coordinates to perform surface defect detection, leading to some inaccuracies in microsurface defect recognition. Moreover, deep learning approaches employ large models with a great quantity of parameters and thus potentially low accuracy and slow speed [29]. This is because several hundred images are generally necessary to train neural network models, which leads to the need to perform complex optimization processes to accurately determine the surface defect features. From these statements, it can be deduced that the microsurface recognition of holes and scratches still represents a complicated task. Therefore, it is necessary to implement defect recognition through the use of three-dimensional coordinates to enhance the recognition of microsurface defects.
The proposed microsurface defect recognition approach is performed using three-dimensional coordinates, which are retrieved via microlaser line projection. Furthermore, the microsurface defect recognition approach is implemented via affine moment invariants [30]. Thus, the affine moment invariants can characterize patterns of holes and scratches through the three-dimensional coordinates, which are contoured via microlaser line scanning. To accomplish this, the affine moment invariants are computed from the surface, which is represented as a Bezier surface. In this way, the Bezier surface is determined using surface coordinates by means of a genetic algorithm. Thus, a pattern of affine moment invariants is computed from the Bezier surface to obtain the pattern of holes and scratches. In this way, a surface defect can be recognized when the pattern of affine moment invariants corresponds to holes or scratches. This procedure is performed to recognize holes and scratches on flat, cylindrical, and free-form surfaces. The microsurface defect recognition approach is carried out using an optical microscope vision system, which includes a CCD camera and a 39 μm laser line. The microlaser line scans the surface and the camera captures the laser line images, thus providing the surface contour. The microsurface coordinates are then computed according to the laser line position and the microscope’s geometry. In this way, the surface defects can be computationally determined from the surface topography coordinates, which are not computed in traditional surface defect detection methods. The proposed surface defect recognition approach can recognize holes and scratches with a minimum depth surface of 30 microns, which is the most common surface defect depth inspected in the context of additive manufacturing. The microscope vision system can inspect a surface area of 3 × 60 cm in one scan as the slider can move the microscope vision system a distance of 60 cm in the x-axis, while the microscope observes a distance of 3 cm in the y-axis. The proposed defect recognition technique improves the accuracy of recognizing surface holes and scratches to the microscale. The proposed technique reduces the error of the optical microscope systems to a level smaller than 2%. This enhancement is achieved through the use of a surface contour recovered via the microlaser line projection. Furthermore, the surface defect characterization approach improves the recognition accuracy; this is because the affine moment invariants are computed based on the three-dimensional surface data. In particular, the accuracy is computed according to the relative error provided by the affine moment pattern. The contribution of the proposed microsurface defect recognition approach is established through a discussion based on the accuracy of the techniques performed using optical microscope systems. The remainder of this paper is organized as follows: the surface characterization via affine moment invariants is described in Section 2.1, the Bezier surface representation is described in Section 2.2, the contouring of the surface topography via microlaser line projection is described in Section 2.3, the microsurface defect recognition results are presented in Section 3, and the key contributions associated with the proposed microsurface defect recognition approach are discussed in Section 4.

2. Materials and Methods

2.1. Microsurface Defect Characterization via Affine Moment Invariants

Microsurface defect recognition is carried out by computing a pattern of affine moment invariants from the surface topography. In this way, the affine moment invariants are computed to characterize the determined surface features. Thus, the pattern of affine moment invariants is computed from the holes and scratches to recognize surface defects on a surface region. The affine moment invariants are described by means of the following expressions:
I 1 = ( μ 2 , 0 μ 0 , 2 μ 1 , 1 2 ) / μ 00 4 .
I 2 = ( μ 3 , 0 2 μ 0 , 3 2 + 6 μ 3 , 0 μ 2 , 1 μ 1 , 2 μ 0 , 3 4 μ 3 , 0 μ 1 , 2 3 4 μ 2 , 1 3 μ 0 , 3 + 3 μ 2 , 1 2 μ 1 , 2 2 ) / μ 00 10 .
I 3 = ( μ 2 , 0 μ 2 , 1 μ 0 , 3 μ 2 , 0 μ 1 , 2 2 μ 1 , 1 μ 3 , 0 μ 0 , 3 + μ 1 , 1 μ 2 , 1 μ 1 , 2 + μ 0 , 2 μ 3 , 0 μ 1 , 2 μ 0 , 2 μ 2 , 1 2 ) / μ 00 7 .
I 4 = ( μ 2 , 0 3 μ 0 , 3 2 + 6 μ 2 , 0 2 μ 1 , 1 μ 1 , 2 μ 0 , 3 3 μ 2 , 0 2 μ 0 , 2 μ 1 , 2 2 6 μ 2 , 0 μ 1 , 1 2 μ 2 , 1 μ 0 , 3 6 μ 2 , 0 μ 1 , 1 2 μ 1 , 2 2     + 12 μ 2 , 0 μ 1 , 1 μ 0 , 2 μ 2 , 1 μ 1 , 2 3 μ 2 , 0 μ 0 , 2 2 μ 2 , 1 2 + 2 μ 1 , 1 3 μ 3 , 0 μ 0 , 3 + 6 μ 1 , 1 3 μ 2 , 1 μ 1 , 2     6 μ 1 , 1 2 μ 0 , 2 μ 3 , 0 μ 1 , 2 6 μ 1 , 1 2 μ 0 , 2 μ 2 , 1 2 + 6 μ 1 , 1 μ 0 , 2 2 μ 3 , 0 μ 2 , 1 μ 0 , 2 3 μ 3 , 0 2 ) / μ 00 11 .
I 5 = ( μ 4 , 0 μ 0 , 4 4 μ 3 , 1 μ 1 , 3 + 3 μ 2 , 2 2 ) / μ 00 6 .
I 6 = ( μ 4 , 0 μ 2 , 2 μ 0 , 4 μ 4 , 0 μ 1 , 3 2 μ 3 , 1 2 μ 0 , 4 + 2 μ 3 , 1 μ 2 , 2 μ 1 , 3 μ 2 , 2 3 ) / μ 00 9 .
I 7 = ( μ 2 , 0 2 μ 2 , 4 4 μ 2 , 0 μ 1 , 1 μ 1 , 3 + 2 μ 2 , 0 μ 0 , 2 μ 2 , 2 + 4 μ 1 , 1 2 μ 2 , 2 4 μ 1 , 1 μ 0 , 2 μ 3 , 1 + μ 0 , 2 2 μ 4 , 0 ) / μ 00 7 .
I 8 = ( μ 2 , 0 2 μ 2 , 2 μ 0 , 4 μ 2 , 0 2 μ 1 , 3 2 2 μ 2 , 0 μ 1 , 1 μ 3 , 1 μ 0 , 4 + 2 μ 2 , 0 μ 1 , 1 μ 2 , 2 μ 1 , 3 + μ 2 , 0 μ 0 , 2 μ 4 , 0 μ 0 , 4     2 μ 2 , 0 μ 0 , 2 μ 3 , 1 μ 1 , 3 + μ 2 , 0 μ 0 , 2 μ 2 , 2 2 + 4 μ 1 , 1 2 μ 3 , 1 μ 1 , 3 4 μ 1 , 1 2 μ 2 , 2 2 2 μ 1 , 1 μ 0 , 2 μ 4 , 0 μ 1 , 3     + 2 μ 1 , 1 μ 0 , 2 μ 3 , 1 μ 2 , 2 + μ 0 , 2 2 μ 4 , 0 μ 2 , 2 μ 0 , 2 2 μ 3 , 1 2 ) / μ 00 10 .
I 9 = ( μ 3 , 0 2 μ 1 , 2 2 μ 0 , 4 2 μ 3 , 0 2 μ 1 , 2 μ 0 , 3 μ 1 , 3 + μ 3 , 0 2 μ 0 , 3 2 μ 2 , 2 2 μ 3 , 0 μ 2 , 1 2 μ 1 , 2 μ 0 , 4 + 2 μ 3 , 0 μ 2 , 1 2 μ 0 , 3 μ 1 , 3     + 2 μ 3 , 0 μ 2 , 1 μ 1 , 2 2 μ 1 , 3 2 μ 3 , 0 μ 2 , 1 μ 0 , 3 2 μ 3 , 1 2 μ 3 , 0 μ 1 , 2 3 μ 2 , 2 + 2 μ 3 , 0 μ 1 , 2 2 μ 0 , 3 μ 3 , 1 + μ 2 , 1 4 μ 0 , 4     2 μ 2 , 1 3 μ 1 , 2 μ 1 , 3 2 μ 2 , 1 3 μ 0 , 2 μ 2 , 2 + 3 μ 2 , 1 2 μ 1 , 2 2 μ 2 , 2 + 2 μ 2 , 1 2 μ 1 , 2 μ 0 , 3 μ 3 , 1 + μ 2 , 1 2 μ 0 , 3 μ 4 , 0     2 μ 2 , 1 μ 1 , 2 3 μ 3 , 1 2 μ 2 , 1 μ 1 , 2 2 μ 0 , 3 μ 4 , 0 μ 1 , 2 4 μ 4 , 0 ) / μ 00 13 .
I 10 = ( μ 5 , 0 2 μ 5 , 0 2 μ 0 , 4 + 10 μ 5 , 0 μ 4 , 1 μ 1 , 4 μ 0 , 5 4 μ 5 , 0 μ 3 , 2 μ 2 , 3 μ 0 , 5 16 μ 5 , 0 μ 3 , 2 μ 1 , 4 2     + 12 μ 5 , 0 μ 2 , 3 2 μ 1 , 4 16 μ 4 , 1 2 μ 2 , 3 μ 0 , 5 9 μ 4 , 1 2 μ 1 , 4 2 + 12 μ 4 , 1 μ 3 , 2 2 μ 0 , 5     + 76 μ 4 , 1 μ 3 , 2 μ 3 , 3 μ 1 , 4 48 μ 4 , 1 μ 2.3 3 48 μ 3 , 2 3 μ 1 , 4 + 32 μ 3 , 2 2 μ 2 , 3 2 ) / μ 00 14
where the central moments μp,q are computed using the coordinates (xc, yc) by means of the expression
μ p , q = i = 0 m 1 j = 0 n 1 ( x i , j x c ) p ( y i , j y c ) q f ( x i , j , y i , j ) ,   x c = M 10 M 00 ,   y c = M 01 M 00 .
In this equation, f(xi,j, yi,j) represents the surface depth in the position (xi,j, yi,j), and the statistical moments M p,q are determined according to the expression
M p , q = i = 0 M 1 j = 0 N 1 x i , j p y i , j q f ( x i , j , y i , j ) .
where the sub-indices (i, j) represent the numbers of surface points in the x- and y-directions, respectively. Thus, the affine moment invariants represented by Equations (1)–(10) are invariant to scale, translation, and orientation [31]. These affine moment invariants generate a pattern (I1, I2, I3, I4, I5, I6, I7, I8, I9, I10), which represents the surface features of a region. In this way, a microsurface defect is characterized through a pattern of affine moment invariants to perform surface defect recognition on a target surface. For this purpose, microsurface defect characterization is performed through the computation of a pattern of affine moment invariants from data provided by a sixth-order Bezier surface. Thus, the affine moment invariants in Equations (1)–(10) are computed by means of the microsurface zi,j, as shown in Figure 1. To compute the affine moment invariants, the surface depth f(xi,j, yi,j) = zi,j is replaced in Equations (11) and (12) to calculate μp,q and M p,q, respectively. Then, Equations (1)–(10) are computed to determine the pattern of affine moment invariants for a tested region. For instance, the affine moment invariant Equations (1)–(10) were computed to characterize the pattern of the surface hole shown in Figure 2a; in this case, the affine moment invariants are I1 = 1.2482 × 10−5, I2 = 0, I3 = 0, I4 = 0, I5 = 7.8118 × 10−10, I6 = 4.4077 × 10−15, I7 = 3.4851 × 10−9, I8 = 1.2060 × 10−14, I9 = 0, and I10 = 0. This pattern describes a decreasing function from I1 to I4, and then the function increases until I7 and decreases from I8 to I10. These affine moment invariants represent a surface hole, whose pattern is defined as a surface defect. Additionally, the holes provide a surface depth that is greater at the borders of x- and y-axes than in the center.
In the same way, the affine moment invariants were computed for the surface scratches shown in Figure 2b to establish the surface pattern. To accomplish this, Equations (1)–(10) are computed and the results are I1 = 1.4751 × 10−5, I2 = 0, I3 = 0, I4 = 0, I5 = 1.1972 × 10−9, I6 = 8.0305 × 10−15, I7 = 6.8277 × 10−9, I8 = 2.1468 × 10−14, I9 = 0, and I10 = 0. This pattern describes a decreasing function from I1 to I4, after which the function increases until I7 and then decreases from I8 to I10. Here, the peaks I1 and I7 are larger than I1 and I7 of the surface hole. Additionally, the scratches do not provide a surface depth that is greater at the borders of x-axis than in the center. Thus, the scratches are characterized to represent a surface defect.
Furthermore, the affine moment invariant patterns were computed for holes and scratches of minor surface depth in order to deduce the minimum criteria for holes and scratches. In this way, the pattern was computed from a hole with a surface depth of 10 microns, as shown in Figure 3a.
In this case, the results of the affine moment invariants are I1 = 5.8014 × 10−5, I2 = −3.0539 × 10−71, I3 = 2.9462 × 10−38, I4 = −5.4140 × 10−42, I5 = 3.0515 × 10−8, I6 = 7.0167 × 10−13, I7 = 1.4557 × 10−7, I8 = 2.9442 × 10−12, I9 = 7.4184 × 10−63, and I10 = −2.5673 × 10−77. This pattern is similar to that for the 30-micron hole shown in Figure 2a. Notably, both holes provide a surface depth that is greater at the borders of x- and y-axes than in the center. In the same way, the pattern of affine moment invariants was computed for an irregular hole with surface depth of 12 microns, as shown in Figure 3b. In this case, the result was I1 = 8.9835 × 10−6, I2 = −3.8241 × 10−28, I3 = 1.2369 × 10−15, I4 = −3.9449 × 10−20, I5 = 9.3422 × 10−11, I6 = 1.2848 × 10−16, I7 = 4.1607 × 10−9, I8 = 4.6672 × 10−16, I9 = 2.5581 × 10−29, and I10 = −6.4044 × 10−29. This pattern is similar to that for the 12-micron hole shown in Figure 3a. Notably, the holes provide a surface depth that is greater at the borders of x- and y-axes than in the center. Furthermore, the pattern of affine moment invariants was computed for an irregular scratch with surface depth of 10 microns, as shown in Figure 3c.
In this case, the result was I1 = 4.3172 × 10−5, I2 = −2.5260 × 10−24, I3 = −7.2989 × 10−15, I4 = −4.2398 × 10−18, I5 = 1.0328 × 10−8, I6 = 1.2525 × 10−13, I7 = 5.8863 × 10−8, I8 = 5.4378 × 10−13, I9 = 3.2650 × 10−26, and I10 = −1.2082 × 10−29. This pattern is similar to that for the 30-micron scratch shown in Figure 2b. Notably, the scratches do not provide a surface depth that is greater at the borders of the x-axis than in the center. Thus, the scratches are characterized as representing a surface defect. Based on these patterns, it is established that the pattern of affine moment invariants provides similarity for holes and scratches of surface depth over 10 microns. Furthermore, the irregularities of the holes and scratches reduce the peak I1 in the pattern of affine moment invariants. In this way, it is established that the holes and scratches can be defined for a peak I1 greater than 4.70 × 10−6. Additionally, a flat surface was characterized by computing the pattern of affine moment invariants to perform surface monitoring. In this case, the peak I1 of the flat surface was smaller than those for the holes and scratches but was larger than I1 for a cylindrical surface. Furthermore, the peak I7 was smaller than those for the holes and scratches but, again, was larger than I7 for the cylindrical surface. Thus, the pattern of affine moment invariants can determine whether the target surface presents holes or scratches. In the same way, the pattern of affine moment invariants can help to deduce whether the target surface corresponds to a flat or cylindrical surface. Notably, the peaks I1 and I7 for a cylindrical surface are smaller than those for a flat surface. Therefore, surface defect recognition is performed when a discontinuity appears in the surface profile provided by the microlaser line projection. This criterion is described based on surface profile discontinuity, as shown in Figure 3d. Here, the surface profile width is represented in the y-axis and the surface profile depth is indicated in the z-axis, and a surface defect can be detected when a surface discontinuity appears in the surface profile. In particular, the surface discontinuity is defined when the derivative ∂f(y,x)/∂y changes in the y-axis. This criterion can be observed with respect to points A, B, and C of the surface profile shown in Figure 3d. Furthermore, the presence of a hole is established when the surface discontinuity depth is greater at the borders than in the center in both the x- and y-axes. Meanwhile, scratches are determined when the surface discontinuity does not provide a greater surface at the borders than in the center with respect to the x-axis. Additionally, the surface defect depth is determined by computing the difference between the surface profile point (A), (B) and the minimum of the surface discontinuity point (B).

2.2. Surface Representation via Sixth-Order Bezier Surface

Microsurface defect recognition is carried out by computing the affine moment invariants from a surface region, which is represented as a Bezier surface. In particular, the Bezier surface is computed from the surface points zi,j, as depicted in Figure 1. Here, the coordinates (xi,j, yi,j) depict the surface position in the x- and y-axes, while the sub-indices (i,j) represent the number of surface points in the x- and y-directions, respectively. Thus, a sixth-order Bezier surface is built through the surface points (z0,0, z1,0, …, z5,0, …, z6,6). From these data, the Bezier surface is generated based on the control points Pi,j by means of the following expressions:
S R , T ( u , v ) = i = 0 i = 6 j = 0 j = 6 6 !   6 ! ( 6 i ) ! i ! ( 6 j ) ! j ! 1 u 6 i ( 1 v ) 6 j u i v j P 5 R + i , 5 T + j ,   u , v [ 0 , 1 ] ,
u i , j = ( x 6 R + i , j x 6 R , j ) ( x 6 ( R + 1 ) , j x 6 R , j ) ,   v i , j = ( y i , 6 T + j y i , 6 T ) ( y i , 6 ( T + 1 ) y i , 6 T ) .
In this equation, the sub-indices (R,T) represent the surface region under test, Pi,j denote control points that move the Bezier surface SR,T(u,v) toward the surface points zi,j, and the values (u, v) are defined in the x- and y-axes, respectively. Based on these statements, the target surface is represented by the Bezier surfaces S0,0(u,v), S1,0(u,v), S1,0(u,v), and S1,1(u,v), ……, SM,N(u,v). To determine each of the Bezier surfaces, the control points P6R+i,6T+j must be computed. In this way, the values (ui,j, vi,j) and the surface points zi are substituted into Equation (13) to obtain the following system of equations:
S R , T ( u 0 , 0 , v 0 , 0 ) S R , T ( u 0 , 0 , v 0 , 1 ) S R , T ( u 0 , 0 , v 0 , 2 )   S R , T ( u 5 , 5 , v 5 , 5 ) = B 0 , 0 ( u 0 , 0 , v 0 , 0 ) + B 0 , 1 ( u 0 , 0 , v 0 , 0 ) + B 0 , 2 ( u 0 , 0 , v 0 , 0 ) + + B 6 , 6 ( u 0 , 0 , v 0 , 0 ) B 0 , 0 ( u 0 , 0 , v 0 , 1 ) + B 0 , 1 ( u 0 , 0 , v 0 , 1 ) + B 0 , 2 ( u 0 , 0 , v 0 , 1 ) + + B 6 , 6 ( u 0 , 0 , v 0 , 1 ) B 0 , 0 ( u 0 , 0 , v 0 , 2 ) + B 0 , 1 ( u 0 , 2 , v 0 , 0 ) + B 0 , 2 ( u 0 , 2 , v 0 , 0 ) + + B 6 , 6 ( u 0 , 0 , v 0 , 2 ) w B 0 , 0 ( u 6 , 6 , v 6 , 6 ) + B 0 , 1 ( u 6 , 6 , v 6 , 6 ) + B 0 , 2 ( u 6 , 6 , v 6 , 6 ) + + B 5 , 5 ( u 6 , 6 , v 6 , 6 ) w 0 , 0 z 0 , 0 w 0 , 1 z 0 , 1 w 0 , 2 z 0 , 2 w 6 , 6 z 6 , 6 .
In this system, Bi,j(u,v) = 6!6!(1 − u)6−i(1 − v)6−juivj/(6 − i)!i!(6 − j)!j!, and the control points are defined based on the weights w6R+i,6T+j according to the expression P6R+i,6T+j = w6R+i,6T+j z6R+i,6T+j. To solve Equation (14), SR,T(ui,j,vi,j) are replaced by the surface data z6R+i,6T+j, and (ui,j, vi,j) are computed using the expressions given in Equation (13). Thus, the weights w6R+i,6T+j are calculated through a genetic algorithm by means of the following steps. The first step involves computing the initial population from the maximum and minimum of each weight. In this way, the maximum and minimum are determined by computing the initial Bezier surface SR,T(ui,j,vi,j). Then, w6R+i,6T+j = 1 and P6R+i,6T+j = (w6R+i,6T+j) (z6R+i,6T+j) are substituted into Equation (13). Thus, if the Bezier surface SR,T(ui,j, vi,j) is over the surface z6R+i,6T+j, the maximum is equal to 1, while the minimum is given by the expression (z6R+i,6T+j − 3[SR,T(ui,j, vi,j) − z6R+i,6Tm+j])/z6R+i,6T+j. However, if the Bezier surface SR,T(ui,j, vi,j) is under z6R+i,6T+j, the minimum is equal to 1 and the maximum is given by the expression (z6R+i,6T+j − 3[SR,T(ui,j, vi,j) − z6R+i,6T+j])/z6R+i,6T+j. Thus, the search space is obtained for each weight. From the search space, four values are randomly taken to determine the initial population for each weight. These values are defined as the parents (P1,k, P2,k, P3,k, P4,k), which represent the initial population. In this case, the sub-index k indicates the generation number. The second step computes the children in generation k via crossover based on exploration and exploitation [32]. This procedure computes two children inside parents and one child outside parents. In this way, the children (C1,k, C2,k) and (C4,k, C5,k) are calculated via exploration from the parents (P1,k, P2,k) and (P3,k, P4,k), respectively. Meanwhile, the children (C3,k, C6,k) are computed via exploitation. Thus, the current children are calculated using the following expressions:
C1,k = 0.5[(P1,k + P2,k) + β|P1,kP2,k|],
C2,k = 0.5[(P1,k + P2,k) − β|P1,kP2,k|],
C4,k = 0.5[(P4,k + P3,k) + β|P4,kP3,k|],
C5,k = 0.5[(P4,k + P3,k) − β|P4,kP3,k|],
C3,k = P0,k + β|Pmin,kP0,k|,
C6,k = Pmax,k + β|P5,kPmax,k|.
In these equations, P0,k and P5,k denote the minimum and maximum of each weight, and Pmin,k, and Pmax,k, are the maximum and minimum values of the parents (P1,k, P2,k, P3,k, P4,k). Additionally, the parameter β is calculated by means of the factor α, which is a random value in the interval between 0 and 1. In this way, β = (2α)1/2 if α > 0.5; otherwise, β = [2(1 − α)]1/2. Thus, Equations (15)–(18) produce children inside parents, while Equations (19) and (20) produce children outside parents. From this procedure, the generation k children are generated. Additionally, the boundary control points are determined by means of the expressions P6*R+6,j = (P6Rn+5,j + P6*R+7,j)/2 and Pi,6*T = (Pi,6*T+5 + Pi,6*T+7)/2 in order to preserve continuity G1. The third step involves calculating the population fitness throughout the Bezier surface SR,T (ui,j,v i,j) by means of an objective function, which is presented in the following expression
O R , T = min 1 49 i = 0 i = 6 j = 0 j = 6 S R , T ( u i , j , v i , j ) z i , j 2 .
This equation allows for computation of the fitness utilizing the surface points zi,j and the Bezier surface SR,T (ui,j,v i,j). In the fourth step, the best current parents and children are determined according to the fitness values to obtain the parents of the (k + 1)th generation. In this way, the parent P1,k+1 is taken from the parents (P1,k, P2,k), the parent P3,k+1 is collected from the parents (P3,k, P4,k), the parent P2,k+1 is taken from children (C1,k, C2,k, C3,k), and the parent P4,k+1 is chosen from the children (C4,k, C5,k, C6,k). The fifth step involves mutating one parent and one weight to avoid a local minimum. For this purpose, a new parent replaces the worst parent to calculate the fitness using Equation (21). If the new parent enhances the fitness, the worst parent is changed by the new parent. Otherwise, the mutation is not carried out. Additionally, a new weight is substituted for an existing weight of a parent, which is selected in random form, and the fitness is calculated via Equation (21). If the new weight enhances the fitness, the selected weight is replaced by the new weight; otherwise, the selected weight is not mutated. In this way, the parents in the (k + 1)th generation are obtained. Then, Equations (15)–(20) are computed to obtain the (k + 1)th generation children. Thus, the (k + 1)th generation population is generated. Then, steps 2–5 are iteratively computed until weights that minimize the objective function Equation (21) are obtained.
To describe the procedure to generate the Bezier surface, the surface S0,0(u, v) was obtained using the genetic algorithm from the surface points shown in Figure 4a. In this way, the weights (w0,0, w0,1, w0,2, …., w6,6) were computed through the genetic algorithm. In this case, the Bezier surface weights were established as w0,0 = 1, w6,0 = 1, w0,6 = 1, and w6,6 = 1. Meanwhile, the control points (P6,1, P6,2, P6,3, P6,4, P6,5) and (P1,6, P2,6, P3,6, P4,6, P5,6) were computed according to the expressions P6*R+6,j = (P6*R+5,j+P6*R+7,j)/2 and Pi,6*T = (Pi,6*T+5 +Pi,6*T+7)/2 in order to ensure continuity G1. Based on these statements, the first step determines the maximum and minimum for the initial Bezier surface through Equation (13). Thus, the search space for each weight was obtained. From this search space, four parents were randomly chosen to generate the initial population for each weight. These first parents are presented in Table 1, where the first column depicts the weights to be computed and the parents (P1,1, P2,1, P3,1, P4,1) are listed in the second to fifth column. Then, the second step involved computing the current children via crossover. Here, the children (C1,k, C2,k, C4,k, C5,k) were calculated via Equations (15)–(18), while the children (C3,k, C6,k) were calculated via Equations (20) and (21). These children are listed in columns 6–11 of Table 1. Then, the third step involved calculating the fitness by computing Equation (21), substituting SR,T(ui,j, vi,j) and z6R+i,6T+j. These fitness values are indicated in row 25. The fitness results indicate that the initial population produced a low error. Next, in the fourth step, the (k + 1)th generation’s parents were selected from the best parents and children in generated k. For this purpose, parent P1, k+1 was taken from (P1,k, P2,k), P3,k+1 was chosen from the parents (P3,k, P4,k), parent P2,k+1 was taken from the children (C1,k, C2,k, C3,k), and e parent P4,k+1 was chosen from the children (C4,k, C5,k, C6,k), where P1,2 = P2,1, P3,2 = P4,1, P2,2 = C1,1, and P4,2 = C5,1. Then, the fifth step involved taking the worst parent (P4,2) to perform a mutation. Thus, a new mutated parent replaced the parent P4,2 to compute the fitness using Equation (21). In this case, the new parent enhanced the fitness, so this new parent replaced P4,2. Then, parent P3,2 was randomly designated to mutate the weight w2,0. A new weight was generated to replace the weight w2,0, and the fitness was calculated by computing Equation (21). In this case, the new weight enhanced the fitness, and, therefore, the new weight was used to replace w2,0. Next, Equations (15)–(20) were computed to obtain the children in generation k+1, and their fitness was computed using Equation (21). The population of the (k + 1)th generation is provided in Table 2.
The procedure to compute the (k + 1)th generation population was repeated until the objective function (Equation (21)) was minimized. Through this procedure, the optimal weights were obtained, as shown in column 15 of Table 2. These weights were employed to compute the control points Pi,j = wi,jzi,j, which generate the Bezier surface S0,0(u, v). Meanwhile, the control points (P6,1, P6,2, P6,3, P6,4, P6,5) and (P1,6, P2,6, P3,6, P4,6, P5,6) were computed according to the expressions P6*R+6,j = (P5*R+5-1,j+ P6*R+7,j)/2 and Pi,6*T = (Pi,6*T+5 +Pi,6*T+7)/2 in order to ensure continuity G1. The Bezier surface S0,0(u, v) generated via the genetic algorithm is shown in Figure 4b. In the same way, the Bezier surfaces S0,1(u,v), S1,0(u,v), and S1,1(u,v) were computed to obtain the complete Bezier surface. Thus, the generation of the Bezier surface was accomplished through the use of the genetic algorithm.

2.3. Microsurface Contouring via Microlaser Line Scanning

In the proposed approach, microsurface contouring is performed via microlaser line projection using the microscope vision system shown in Figure 5a. This vision system consists of an optical microscope, on which a microlaser line and a CCD array are attached. The microscope system is mounted on a slider platform, which moves the setup using Matlab to perform microlaser line scanning. In this optical setup, the x-axis represents the horizontal axis, the y-axis depicts the depth, and the z-axis represents the vertical axis. In this way, the surface is generally located on the x-y plane, and the surface height is parallel to the z-axis. The optical geometry of the microscope system is outlined in Figure 5b. In particular, a 39 μm laser line is projected perpendicularly to the surface, and the microscope is aligned at an angle θ, which represents the angle generated between the optical axis and the microlaser line. The distance between the surface and the objective lens is represented by A0, the distance between the objective lens and the intermediate image plane is indicated by A1, and the distance between the intermediate image plane and the ocular lens is represented by A2. The objective lens focus is denoted by F1, while the ocular lens focus is given by F2. The laser’s position in the image plane is represented by the coordinates (xi,j, yi,j). The image center is given by the coordinates (xc, yc) and the pixel size is denoted by η. For the geometry shown in Figure 5b, the surface depth zi,j and surface width yi,j are defined according to the following equations:
z i , j = η ( x c x i , j ) F 1 F 2 ( A 1 A 2 A 1 F 2 A 2 F 1 + F 1 F 2 ) s i n θ + O ,
y i , j = η y c η ( y c y i , j ) F 1 F 2 ( A 1 A 2 A 1 F 2 A 2 F 1 + F 1 F 2 ) .
The surface length xi,j is acquired from the laser line position, which is provided by the slider platform. Meanwhile, the surface depth zi,j and the surface width yi,j are calculated by means of the parameters (xc, yc, η, θ, A1, A1, F1, F2), computed using a genetic algorithm that allows for computation of the objective function via Equations (22) and (23). The genetic algorithm is implemented through the following five steps. The first step involves collecting the initial population from the search space of each parameter. In this way, the maximum and minimum values of the parameters xc, yc, and η are obtained from the image size data. Meanwhile, the maximum and minimum values of the parameters A1, F1, A2, F2, and θ are deduced from the geometry of the optical microscope. In particular, the minimum F2 is established as the ocular lens ratio multiplied by 1.2 and the maximum F2 is defined as the ocular lens ratio multiplied by 2.4. Furthermore, the minimum A2 is defined as the ocular lens ratio multiplied by 1.4 and the maximum A2 is established as the ocular lens ratio multiplied by 2.8.
Additionally, the minimum and maximum F1 values are defined as the objective lens ratio multiplied by 1.2 and 2.4, respectively. Moreover, the minimum and maximum A1 values are defined as the objective lens ratio multiplied by 1.4 and 3.2, respectively. The minimum and maximum θ values are defined as 20° and 50°, respectively. Collectively, these ranges define the search space. Then, four parents (P1,k, P2,k, P3,k, P4,k) are chosen randomly from the intervals between the maximum and minimum values for each parameter. In this way, all the parameters (xc, yc, η, θ, A1, F1, A2, F2) are collected into four parents, which represent the initial population. The second step involves generating four children (C1,k, C2,k, C4,k, C5,k) by computing Equations (15)(18) and an additional two children (C3,k, C6,k) by computing Equations (20) and (21). Then, in the third step, the fitness is calculated via an objective function, represented as follows:
F O 1 = min 1 m x n i = n j = 0 m ( z i , j z i , m ) η ( x c x i , j ) F 1 F 2 ( A 1 A 2 A 1 F 2 A 2 F 1 + F 1 F 2 ) s i n θ + η ( x c x i , m ) F 1 F 2 ( A 1 A 2 A 1 F 2 A 2 F 1 + F 1 F 2 ) s i n θ 2 ,
F O 2 = min 1 m x n i = n j = 0 m ( y i , j y i , m ) + η ( y c y i , j ) F 1 F 2 ( A 1 A 2 A 1 F 2 A 2 F 1 + F 1 F 2 ) η ( y c y i , m ) F 1 F 2 ( A 1 A 2 A 1 F 2 A 2 F 1 + F 1 F 2 ) 2 .
From these equations, the fitness is calculated by computing the equation FO = (FO1 + FO2)/2, where (zi,jzi,m) and (yi,jyi,m) are known. In the fourth step, the parents of the (k + 1)th generation are obtained according to the fitness values. Here, the parents P1,k+1 and P3,k+1 are collected from the parents (P1,k, P2,k) and (P3,k, P4,k), respectively, while the parents P2,k+1 and P4,k+1 are collected from the children (C1,k, C2,k, C3,k) and (C4,k, C5,k, C6,k), respectively. Next, in the fifth step, the worst parent is replaced by a new parent from the search space and the fitness is calculated. If the new parent has improved the fitness, the new parent is substituted for the worst parent; otherwise, the worst parent is not mutated. Furthermore, a new parameter value replaces a randomly chosen parameter in the obtained parents. If the new parameter improves the fitness, this parameter is mutated; otherwise, it is not mutated. Thus, the parents in the (k + 1)th generation are determined. From these parents, the (k + 1)th generation children are computed using Equations (15)–(20), and their fitness is computed via Equations (24) and (25). In this way, the (k + 1)th generation population has been determined. The procedure to calculate the (k + 1) generation population is iteratively performed until a parameter combination (xc, yc, η, θ, A1, F1, A2, F2) that minimizes Equations (25) and (26) is obtained. Furthermore, the length between zero and O is obtained by computing the term z0,j = η(x0,jxc) F1F2/(A1F1) (A2F2)sinθ.
The laser line coordinates are determined by computing the maximum intensity in the x-axis of the microscopic image [33]. For this purpose, a Bezier curve is fitted from the laser line pixels in the x-axis by means of the following equations:
x ( u ) = i = 0 N C i ( 1 u ) N i u i x i , j ,   C i = C i 1 ( N + 1 i ) / i ,   C 0 = 1 , 0 u 1
I ( u ) = i = 0 N C i ( 1 u ) N i u i I i , j ,   C i = C i 1 ( N + 1 i ) / i ,   C 0 = 1 , 0 u 1
In Equation (26), xi,j indicates the laser line pixel position in the x-axis and N represents the laser line width (in pixels). Meanwhile, Ii,j depicts the pixel intensity in Equation (27). Here, the sub-indices (i, j) denote the number of laser line pixels in the x- and y-axes, respectively. To fit the Bezier curve, Ii,j is substituted in Equation (27) to obtain a concave curve I(u), whose second derivative I″(u) is positive in the interval 0 ≤ u ≤ 1. In this way, the maximum intensity is computed using the first derivative I′(u) = 0. Here, the bisection method is used to compute the value u satisfying this condition. Thus, u is replaced in Equation (26) to compute xi,j = x(u), which depicts the line position in the x-axis. The position yi,j is obtained from the row number of the laser line image. The laser line edges yi,0 and yi,m are then determined by computing the first derivative in the y-axis. To determine the laser line coordinates (xi,j, yi,j), the microscope vision system scans the surface. The CCD camera captures the microlaser line to compute the coordinates (xi,j, yi,j) by means of Equations (26) and (27), respectively. Then, the surface depth zi,j is computed by replacing xi,j in Equation (22) and the surface width yi,j is computed by substituting yi,j in Equation (24). The surface length coordinate in the x-axis is provided by the slider device. Thus, the three-dimensional microsurface topography is recovered.
For this microscope vision system, the laser line provides the reference position to determine the radial distortion. In this way, the laser line coordinates (xi,j, yi,j,) are computed via Equations (26) and (27). Based on the distorted coordinates (xi,j, yi,j), the undistorted coordinates are defined xi,j = xi,j + δxiand yi,j = yi,j + δyj, where (δxi, δyj) denotes the distortion. Therefore, the expression Si,j = x1,j − xi,j represents distorted line shifting and si,j = (x1,j + δx1) − (xi,j + δxi) provides undistorted line shifting. In this way, δxi = (x1,j − xi,j) − si,j + δx1 = Si,jsi,j + δx1 is used to compute the distortion in the x-axis. To obtain the first line shifting without distortion, the laser line is placed near to the image center to achieve δx1 = 0 and s1,j = S1,j. Thus, the expression si,j = i*S1,j provides undistorted shifting, where the distortion in the x-axis is computed using the expression δxi = (x1,j − xi,j) − i*S1,j. Similarly, the distortion in the y-axis is deduced from the expressions (yi,1yi,j) = (yi,1 + δy1) − (yi,j + δyj) and Ti,j = (yi,1 − yi,j). From these terms, the expression δyj = (yi,1 − yi,j) − j*Ti,1 is obtained to compute the distortion in the y-axis.

3. Results of Microsurface Defect Recognition

Microsurface defect recognition was performed using the microscope vision system shown in Figure 5a. In particular, the recognition of holes and scratches was carried out on flat, cylindrical, and free-form surfaces. First, microsurface defect recognition was performed for the metallic flat surface shown in Figure 6a, where the scale is indicated in mm in the x-axis. The laser line projected on the flat surface is also shown in Figure 6b. Thus, the flat surface was scanned in the x-direction by the microscope vision system to retrieve the surface contour. During scanning, the camera captured the laser line to determine the laser line position (xi,j, yi,j) by computing Equations (26) and (27). Then, the surface depth zi,j and the surface width yi,j were calculated by computing Equations (22) and (23), using the position (xi,j, yi,j), where the surface coordinate xi,j is given by the slider platform. Thus, 268 laser lines were processed to retrieve the flat surface topography. The surface contouring accuracy was determined according to the relative error [34], where a contact method was used for reference measurement. Thus, the relative error of surface contouring was calculated as follows:
E r % = 100 n m i = 0 n j = 0 m z i , j h i , j h i , j
In this equation, hi,j is the surface measurement via contact method, zi,j is the surface measurement computed via Equation (22), and nm denotes the number of data. Thus, Equation (28) was computed and the result indicated a relative error of Er% = 0.727%. Then, a Bezier surface was computed from the surface retrieved via microlaser line scanning using the genetic algorithm. For this purpose, the surface was divided into regions of 7 × 7 points in order to compute each Bezier surface SR,T(u,v). Furthermore, the weights w6R+0, 6T+0 = 1, w6R+6,6T+0 = 1, w6R+0,6T+6 = 1, and w6R+6,6T+6 = 1 were established for each Bezier surface. Additionally, the control points (P6*R,1, P6*R,2, P6*R,3, P6*R,4, P6*R,5) and (P1,6*T, P2,6*T, P3,6*T, P4,6*T, P5,6*T) were computed according to the expressions P6*R+6,j = (P6*R+5,j + P6*R+7,j)/2 and Pi,6*T = (Pi,6*T+5 + Pi,6*T+7)/2 in order to ensure continuity G1. Then, the genetic algorithm determined the maximum and minimum of each weight w6R+i,6T+j for the initial Bezier surface via Equation (13). In this context, if SR,T(ui,j, vi,j) was greater than z6R+i,6T+j, the maximum was equal to 1 and the minimum was provided by the expression (z6R+i,6T+j–3[SR,T(ui,j, vi,j) − z6R+i,6Tm+j])/z6R+i,6T+j. Meanwhile, if z6R+i,6T+j was greater than SR,T(ui,j, vi,j), the minimum was equal to 1 and the maximum was provided by the expression (z6R+i,6T+j − 3[SR,T(ui,j, vi,j) − z6R+i,6T+j])/z6R+i,6T+j. Thus, the search space was obtained for each weight. Then, four parents were taken randomly from the search space to obtain the initial population for each weight. Next, the current children were generated by computing Equations (15)–(21). Then, the fitness of each SR,T(ui,j, vi,j) was determined through computing Equation (21) by means of the surface z6R+i,6T+j. Next, P1, k+1 was selected from (P1,k, P2,k), P3,k+1 from (P3,k, P4,k), P2,k+1 from (C1,k, C2,k, C3,k), and P4,k+1 from (C4,k, C5,k, C6,k) to serve as the parents for the (k + 1)th generation. Then, the worst parent with respect to each weight was replaced by a new parent to compute the fitness (Equation (21)). If the new parent enhanced the fitness, the worst parent was mutated; otherwise, the mutation was not performed. Additionally, a new weight was used to replace a weight from a random parent to calculate the fitness via Equation (21). If the new weight enhanced the fitness, the selected weight was mutated; otherwise, mutation was not performed. Then, Equations (15)–(20) were computed to obtain the (k + 1)th generation children. The procedure to compute the (k + 1)th generation population was repeated until the objective function (Equation (21)) was minimized. Then, the control points P6R+i,6T+j = (w6R+i,6T+j)(z6R+i,6T+j) were computed using the optimal weights and the surface data. Next, the control points P6R+i,6T+j were replaced in the Bezier surfaces S0,0(u,v), S1,0(u,v), S1,0(u,v), and S1,1(u,v), ……, SM,N(u,v) to obtain the surface topography shown in Figure 6c. Here, the scale is represented in mm in the x- and y-axes and in microns in the z-axis. The accuracy of the Bezier surface was determined according to Equation (28). Here, zi,j was replaced by the Bezier surface SR,T(ui,j, vi,j) and hi,j was replaced by the surface retrieved through microlaser line scanning. In this case, the accuracy of the surface shown in Figure 6c indicated a relative error of Er% = 0.402%.
Then, surface defect recognition is performed from the Bezier surface shown in Figure 6c. This procedure was carried out by computing the affine moment invariant Equations (1)–(10), employing regions of 34 × 34 surface points. The central moments μp,q of each region were also computed by means of Equations (11) and (12). Here, the surface depth is represented by f(xi,j, yi,j) = zi,j, and the sub-indices (i,j) denote the number of surface points in the x- and y-axes. Equations (1)–(10) were computed to establish the pattern of affine moment invariants for each region. The result of the affine moment invariants for the flat surface was as follows: I1 = 4.6776 × 10−6, I2 = −1.8352 × 10−31, I3 = −1.4511 × 10−18, I4 = −3.6474 × 10−23, I5 = 1.3521 × 10−10, I6 = 2.2314 × 10−16, I7 = 5.4774 × 10−10, I8 = 7.9281 × 10−16, I9 = 6.7816 × 10−33, and I10 = −5.0054 × 10−39. This pattern describes a decreasing function from I1 to I4, where the function peak I1 is smaller than 4.6776 × 10−6 and the moments (I2, I3, I4) are negative. Meanwhile, the function increased from I5 to I7, then tended to zero from I8 to I10. In this way, the pattern of affine moment invariants was established. This is elucidated through the next pattern of affine moment invariants for the flat surface: I1 = 4.2802 × 10−6, I2 = −2.3213 × 10−32, I3 = −1.8357 × 10−19, I4 = −2.4127 × 10−23, I5 = 1.1322 × 10−10, I6 = 1.7093 × 10−16, I7 = 4.5861 × 10−10, I8 = 6.0742 × 10−16, I9 = 0, and I10 = 0. Here, the function peak I1 is smaller than 4.6776 × 10−6 and the moments (I2, I3, I4) are negative. Then, the window was moved in the x- and y-directions to compute the pattern of affine moment invariants for each surface region. When the window covered the hole, the surface shown in Figure 6d was obtained. In this case, a discontinuity appears in the y-axis surface profile, which is indicated by the microlaser line projection. This surface discontinuity was detected when the derivative ∂f(y,x)/∂y changes signs in the y-axis. This criterion is described based on the surface profile discontinuity shown in Figure 3d. Additionally, the surface defect depth was determined by computing the difference between the minimum of the surface defect and the maximum of the surface defect. Here, the surface profile f(y,x) = zi,j was computed via Equation (22), and the surface profile width yi,j was computed via Equation (23). In this case, the maximum of the surface defect was obtained at the border of the surface defect in the y-axis. Also, the presence of a hole is established when the surface discontinuity depth is greater at the borders than in the center in both the x- and y-axes. Based on these statements, the hole length is 336 microns in the x-axis, the hole width is 438 microns in the y-axis, and the hole depth is 32 microns in the z-axis. The bottom of the hole is an irregular surface, presenting topographic variation. Thus, the hole surface was represented as a Bezier surface with smoothed topography in order to compute the pattern of affine moment invariants, and the result was I1 = 1.0513 × 10−5, I2 = −1.4891 × 10−22, I3 = 3.0546 × 10−14, I4 = −2.4710 × 10−18, I5 = 6.5353 × 10−10, I6 = 2.3198 × 10−15, I7 = 8.5784 × 10−8, I8 = 6.0742 × 10−16, I9 = 1.6635 × 10−27, and I10 = −1.6881 × 10−29. This pattern describes a decreasing function from I1 to I4, where I1 represents the function peak and (I2, I4) are negative. Then, the function increases to I7, which represents a peak, and tends to zero from I8 to I10. The peaks I1 and I7 are larger than those of the flat surface, so it is considered that a hole defect was detected.
This determination occurred as the hole peak was greater than 4.7 × 10−6, I4 was negative, and the peak I7 was greater than that of the flat surface. Additionally, the surface defect was greater at the borders than in the center in both the x- and y-axes. Based on these statements, it was deduced that the pattern of affine moment invariants corresponded to a hole surface defect. Thus, the shown region contoured by the microlaser line was recognized as a microhole surface defect according to the pattern of affine moment invariants.
The second microsurface defect recognition test was performed using the cylindrical metallic surface shown in Figure 7a (where the scale is indicated in millimeters in the x-direction). The microlaser line projected onto the cylindrical surface is shown in Figure 7b. Thus, the cylindrical surface was scanned in the x-direction using the microscope vision system to retrieve the surface contour. From the scanning result, the laser line position (xi,j, yi,j) was computed using Equations (26) and (27). Then, the surface depth zi,j and the surface width yi,j were obtained by computing Equations (22) and (23). The surface coordinate xi,j is provided by the slider platform. Thus, 242 laser lines were processed to retrieve the microcylindrical surface. The surface contouring accuracy was determined via Equation (28), where zi,j denotes the surface measured via the contact method, hi,j is the surface contour computed via Equation (22), and nm is the number of data. From the computed result, a relative error of Er% = 0.818% was determined. Then, a Bezier surface was computed from the surface retrieved via microlaser line scanning using the genetic algorithm. For this purpose, the cylindrical surface was divided into regions of 7 × 7 points to compute each Bezier surface SR,T(u,v). Furthermore, for each Bezier surface, the weights w6R+0, 6T+0 = 1, w6R+6,6T+0 = 1, w6R+0,6T+6 = 1, and w6R+6,6T+6 = 1 were established. Meanwhile, the control points (P6*R,1, P6*R,2, P6*R,3, P6*R,4, P6*R,5) and (P1,6*T, P2,6*T, P3,6*T, P4,6*T, P5,6*T) were computed according to the expressions P6*R+6,j = (P6*R+5,j+P6*R+7,j)/2 and Pi,6*T = (Pi,6*T+5 +Pi,6*T+7)/2 in order to ensure continuity G1. Then, the first step of the genetic algorithm was performed to determine the maximum and minimum value of each weight w6R+i,6T+j through the initial Bezier surface Equation (13). If SR,T(ui,j, vi,j) was greater than z6R+i,6T+j, the maximum was equal to 1, and the minimum was computed using the expression (z6R+i,6T+j − 3[SR,T(ui,j, vi,j) − z6R+i,6Tm+j])/z6R+i,6T+j. Meanwhile, if z6R+i,6T+j was greater than SR,T(ui,j, vi,j), the minimum was equal to 1 and the maximum was calculated according to the expression (z6R+i,6T+j − 3[SR,T(ui,j, vi,j) − z6R+i,6T+j])/z6R+i,6T+j. Then, four parents were collected at random from the search space to obtain the initial population for each weight. Next, the current children were generated by computing Equations (15)–(21). Then, the fitness of each SR,T(ui,j, vi,j) was determined by computing Equation (21) according to the surface z6R+i,6T+j. Next, P1, k+1 was selected from (P1,k, P2,k), P3,k+1 from (P3,k, P4,k), P2,k+1 from (C1,k, C2,k, C3,k), and P4,k+1 from (C4,k, C5,k, C6,k), serving as the parents of the (k + 1)-generation. Next, the worst parent was replaced by a new parent for each weight and the fitness was calculated according to Equation (21). If the new parent enhanced the fitness, the worst parent was replaced; otherwise, mutation was not performed. Additionally, a new weight replaced a weight from a randomly chosen parent and the fitness was calculated via Equation (21). If the new weight enhanced the fitness, the selected weight was mutated; otherwise, mutation was not performed. Then, Equations (15)–(20) were computed to obtain the (k + 1)th generation children. The procedure to compute the (k + 1)th generation population was repeated until the objective function (Equation (21)) had been minimized. Then, the control points P6R+i,6T+j = (w6R+i,6T+j)(z6R+i,6T+j) were calculated using the optimal weights. Next, the control points P6R+i,6T+j were replaced in the Bezier surfaces S0,0(u,v), S1,0(u,v), S1,0(u,v), and S1,1(u,v), ……, SM,N(u,v) to obtain the surface topography shown in Figure 7c, where the scale is presented in mm for the x- and y-axes but in microns for the z-axis. The accuracy of the Bezier surface was determined via Equation (28). For this purpose, zi,j was replaced by the Bezier surface SR,T(ui,j, vi,j) and hi,j was replaced by the surface retrieved through microlaser line scanning. The results indicated a relative error of Er% = 0.5305%. Then, surface defect recognition was performed using the Bezier surface shown in Figure 7c. This procedure was carried out by computing the affine moment invariants via Equations (1)–(10), employing regions of 38 × 38 surface points. Furthermore, the central moments μp,q of each region were computed via Equations (11) and (12) by means of the surface depth f(xi,j, yi,j) = zi,j, where the sub-indices (i,j) depict the number of surface points in the x- and y-axes. Thus, Equations (1)–(10) were computed to establish the pattern of affine moment invariants for each region. The resulting affine moment invariants on the cylindrical surface were as follows: I1 = 3.9808 × 10−6, I2 = −4.9844 × 10−74, I3 = 2.6080 × 10−40, I4 = −4.3482 × 10−45, I5 = 9.8394 × 10−11, I6 = 1.3935 × 10−16, I7 = 3.9194 × 10−10, I8 = 4.9154 × 10−16, I9 = −1.9091 × 10−66, and I10 = 1.8154 × 10−82. This pattern describes a decreasing function from I1 to I4, where I1 represents the peak. Meanwhile, the function increases from I5 to I7, then decreases from I8 to I10. From this pattern, it is deduced that the peak I1 is smaller than those for the flat surface and the hole surface defect. Furthermore, the peak I7 is also smaller than those for the flat surface and the hole surface defect. This criterion is elucidated by the pattern of affine moment invariants for another cylindrical surface: I1 = 4.0776 × 10−6, I2 = −1.1929 × 10−48, I3 = 8.9806 × 10−28, I4 = −7.8272 × 10−25, I5 = 1.0294 × 10−10, I6 = 1.4854 × 10−16, I7 = 4.1449 × 10−10, I8 = 5.2635 × 10−16, I9 = 6.3026 × 10−54, and I10 = −4.2746 × 10−45. Then, the window is moved in the x-direction and y-direction to compute the pattern of affine moment invariants in each surface region. When the window covered a hole, an irregular topography was determined. In this case, a discontinuity appears in the y-axis in the surface profile, which is provided by the microlaser line projection. This surface discontinuity was detected due to the derivative ∂f(y,x)/∂y changing sign in the y-axis. The surface defect depth was determined by computing the difference between the minimum and maximum depth values for the surface defect. The surface profile f(y,x) = zi,j was computed via Equation (22), and the surface profile width yi,j was computed via Equation (23). Meanwhile, the maximum of the surface defect is obtained at the border of the surface defect in the y-axis. Furthermore, the presence of a hole was established as the surface discontinuity depth was greater at the borders than in the center in both the x- and y-axes. In this case, the hole presented an irregular topography, with variations in the x-, y-, and z-axes. The hole length was 620 microns in the x-axis, the hole width was 504 microns in the y-axis, and the hole depth was 32 microns in the z-axis.
The hole surface was represented by the Bezier surface to compute the pattern of affine moment invariants and the results were as follows: I1 = 4.9004 × 10−6, I2 = −6.1116 × 10−24, I3 = 2.1951 × 10−15, I4 = −9.1065 × 10−20, I5 = 1.4666 × 10−10, I6 = 2.5385 × 10−16, I7 = 6.4527 × 10−9, I8 = 9.0208 × 10−16, I9 = 5.7381 × 10−29, and I10 = −2.2245 × 10−31. This pattern describes a decreasing function from I1 to I4, where I1 represents the function’s peak. The function then increased until I7 and tended to zero from I8 to I10. In this case, it can be deduced that the peak I1 was greater than those for the flat and cylindrical surfaces. Furthermore, the peak I7 was greater than those for the flat and cylindrical surfaces. In this way, the characteristic pattern of the hole surface defect was recognized as the function peak I1 was greater than 4.7 × 10−6 and (I2, I4) were negative. Furthermore, the surface defect was greater at the borders than in the center in both the x- and y-axes. Based on these statements, it can be deduced that the pattern of affine moment invariants corresponded to a hole surface defect. From this pattern of affine moment invariants, the surface defect was recognized as a hole. Thus, a region contoured by the microlaser line was recognized as a microsurface hole defect on a cylindrical surface. Then, the window size was modified to 38 × 26 surface points to perform microsurface defect recognition based on the presence of scratches. When the window covered the scratched area indicated by the arrow, the surface shown in Figure 7d was obtained. In this case, a discontinuity appeared in the y-axis in the surface profile provided by the microlaser line projection. This surface discontinuity was detected when the derivative ∂f(y,x)/∂y changed signs in the y-axis. The surface defect depth was determined by computing the difference between the minimum and maximum depth values of the surface defect, where the surface profile f(y,x) = zi,j was computed via Equation (22) and the surface profile width yi,j was computed via Equation (23). The maximum of the surface defect was obtained on the border of the surface defect in the y-axis, and the presence of a scratch can be established when the surface discontinuity depth is not greater at the borders than in the center in the x-axis. The scratch length was 412 microns in the x-axis, the scratch width was 298 microns in the y-axis, and the scratch depth was 22 microns in the z-axis. The bottom of the scratch presents an irregular surface, which contains topographic variations in the x-, y-, and z-axes. The pattern of affine moment invariants was computed from the Bezier surface using Equations (1)–(10), and the result was as follows: I1 = 5.4895 × 10−6, I2 = −1.7040 × 10−24, I3 = 9.0153 × 10−16, I4 = −2.5433 × 10−20, I5 = 1.8663 × 10−10, I6 = 3.6278 × 10−16, I7 = 5.1067 × 10−9, I8= 1.284910−15, I9 = 9.5397 × 10−30, and I10 = −1.3892 × 10−32. This pattern indicates a decreasing function from I1 to I4, where I1 represents the function peak and (I2, I4) are negative. Then, the function increases to I7, which represents a peak, following which the function tends to zero from I8 to I10. Additionally, the peak I1 is greater than 4.7 × 10−6. Furthermore, the surface defect is not greater at the borders than in the center in the x-axis. From this pattern of affine moment invariants, the surface defect was recognized as a scratch. Thus, a region contoured by the microlaser line was recognized as a scratch-type microdefect on a cylindrical surface. This criterion was elucidated by the pattern of affine moment invariants of another scratch-type surface defect as follows: I1 = 5.4084 × 10−6, I2 = 1.5246 × 10−25, I3 = −1.2930 × 10−15, I4 = −4.0845 × 10−21, I5 = 1.8104 × 10−10, I6 = 3.4704 × 10−16, I7 = 4.9610 × 10−9, I8 = 1.2282 × 10−15, I9 = 3.0332 × 10−30, and I10 = −2.6570 × 10−33. Here, the peak I1 is greater than 4.7 × 10−6, and the surface defect is not greater at the borders than in the center in the x-axis.
Next, microsurface defect recognition was performed on the plastic free-form surface shown in Figure 8a, where the scale is indicated in millimeters in the x-direction. The microlaser line projected onto the plastic free-form surface is shown in Figure 8b. The free-form surface was scanned via microlaser line in the x-axis to compute the surface depth zi,j and the surface width yi,j via Equations (22) and (23). The coordinate xi,j was obtained from the slider platform. Thus, 232 laser lines were processed to retrieve the free-form surface. The surface accuracy was determined via Equation (28), where zi,j was the surface measured via contact method, hi,j was the surface contour computed via Equation (22), and nm denotes the number of data. Thus, the result indicated a relative error of Er% = 0.883%. Then, the Bezier surfaces S0,0(u,v), S1,0(u,v), S1,0(u,v), and S1,1(u,v), ……, SM,N(u,v) were computed using the genetic algorithm to obtain the surface topography shown in Figure 8c. Here, the scale is represented in mm for the x- and y-axes and in microns for the z-axis. The Bezier surface accuracy was calculated via Equation (28). Here, zi,j is given by the Bezier surface SR,T(ui,j, vi,j) and hi,j is the surface retrieved through microlaser line scanning. The result indicated a relative error of Er% = 0.617%. Then, the pattern of affine moment invariants was computed from the Bezier surface shown in Figure 8c to recognize the microsurface holes. For this purpose, the affine moment invariants were computed for each surface region using Equations (1)–(10).
In this way, the central moments μp,q for each region were computed by means of Equations (11) and (12), where the surface depth is represented by f(xi,j, yi,j) = zi,j. Thus, the pattern of affine moment invariants was computed for the free-form surface. When the window covered hole 1, as shown in Figure 8c, a discontinuity appeared in the y-axis of the surface profile. This surface discontinuity was detected when the derivative ∂f(y,x)/∂y changed signs in the y-axis. The surface of this hole is shown in Figure 8d, where the hole length was 410 microns in the x-axis and the hole width was 480 microns in the y-axis. The surface defect depth was determined by computing the difference between the minimum and maximum depths of the surface defect, where the surface profile f(y,x) = zi,j was computed via Equation (22) and the surface profile width yi,j was computed via Equation (23). As expected, the maximum of the surface defect was obtained on the border of the surface defect in the y-axis. The hole depth was 34 microns in the z-axis, and the bottom of this hole presented surface irregularities. Thus, the pattern of affine moment invariants was computed, resulting in I1 = 5.1340 × 10−6, I2 = −1.2086 × 10−23, I3 = 2.3292 × 10−15, I4 = −9.8397 × 10−20, I5 = 1.5805 × 10−10, I6 = 2.8393 × 10−16, I7 = 7.0254 × 10−9, I8 = 1.0185 × 10−15, I9 = 8.9124 × 10−29, and I10 = −3.2539 × 10−31. This pattern describes a decreasing function from I1 to I4, following which the function increases until I7. Then, the function tends to zero from I8 to I10. In this case, the peak I1 was greater than 4.7 × 10−6 and (I2, I4) are negative; therefore, the region was recognized as a hole defect, particularly as the surface bottom was greater at the borders than in the center of the x- and y-axes. In the same way, a surface discontinuity appeared on the surface profile of hole 2, which is marked with an arrow in Figure 8c. The hole length was 260 microns in the x-axis, the hole width was 280 microns in the y-axis, and the hole bottom was 22 microns in the z-axis. Thus, the pattern of affine moment invariants was computed, given as follows: I1= 8.9378 × 10−6, I2 = −1.3273 × 10−22, I3 = 1.3318 × 10−14, I4 = −7.3403 × 10−19, I5 = 4.7081 × 10−10, I6 = 1.4533 × 10−15, I7 = 2.0972 × 10−8, I8 = 5.2772 × 10−15, I9 = 1.5830 × 10−27, and I10 = −8.9553 × 10−30. In this case, the peak I1 is greater than 4.7 × 10−6 and (I2, I4) are negative; therefore, the region is recognized as a hole defect. As the surface bottom was greater at the borders than in the center of both the x- and y-axes, it was deduced that the pattern of affine moment invariants corresponded to a hole surface defect. Additionally, the pattern of affine invariant moments was computed for all the regions of the free-form surface, but the patterns were different to those for hole and scratch defects.
The fourth microsurface defect recognition test was carried out for the metallic flat surface shown in Figure 9a. The microlaser line was projected to retrieve the surface topography, and the flat surface was scanned in the x-axis to allow for computation of the surface depth zi,j and the surface width yi,j via Equations (22) and (23), while the slider platform provided the coordinate xi,j. Thus, 228 laser lines were processed to retrieve the flat surface. The accuracy of this surface indicated a relative error of Er% = 0.795%, as computed via Equation (28). Here, zi,j is the surface measured via contact method, hi,j is the surface contour computed via Equation (22), and nm is the number of data. Then, Bezier surfaces S0,0(u,v), S1,0(u,v), S1,0(u,v), and S1,1(u,v),……, SM,N(u,v) were computed to obtain the surface topography shown in Figure 10b. Here, the scale is indicated in mm in the x- and y-axes, and in microns for the z-axis. According to Equation (28), the Bezier surface presented a relative error of Er%= 0.601%. Then, the recognition of microscratches was performed by computing the pattern of affine moment invariants for each region of the Bezier surface shown in Figure 9b. This procedure was carried out by computing Equations (1)–(10) for each region of the flat surface. For this purpose, Equations (11) and (12) were computed to obtain the central moments of each region. Then, Equations (1)–(10) were computed to obtain the affine moment invariants on the flat surface, yielding I1 = 4.0635 × 10−6, I2 = −2.3280 × 10−29, I3 = −1.5206 × 10−17, I4 = −3.3215 × 10−22, I5 = 1.0203 × 10−10, I6 = 1.4636 × 10−16, I7 = 4.1340 × 10−10, I8 = 5.1978 × 10−16, I9 = 2.0020 × 10−31, and I10 = −4.7761 × 10−39. This result is similar to the pattern of affine moment invariants for a flat surface, where the peak I1 is smaller than 4.7 × 10−6. Then, the presence of a discontinuity was detected by computing the derivative ∂f(y,x)/∂y in the y-axis, associated with the point at which the derivative changes sign in the y-axis. In this way, the window was moved to the location of the scratch marked with an arrow in Figure 9b. In this way, the surface shown in Figure 9c was obtained. The scratch length was 440 microns in the x-axis and its width was 202 microns in the y-axis. Furthermore, the surface defect depth was determined by computing the difference between the minimum and maximum depth values of the surface defect, where the surface profile f(y,x) = zi,j was computed via Equation (22). The maximum of the surface defect was obtained on the border of the surface defect in the y-axis, and the scratch depth was found to be 28 microns in the z-axis, with the bottom presenting surface irregularities. Thus, the pattern of affine moment invariants was computed from the Bezier surface, and the resulting values were I1 = 1.5337 × 10−5, I2 = −2.0332 × 10−24, I3 = −4.6206 × 10−15, I4 = −1.3259 × 10−20, I5 = 1.3140 × 10−9, I6 = 5.7091 × 10−15, I7 = 2.8682 × 10−8, I8 = 2.4603 × 10−14, I9 = 8.4472 × 10−29, and I10 = 2.0184 × 10−30. This pattern indicates a decreasing function from I1 to I4, after which the function increased until I7. Then, the function tended to zero from I8 to I10. In this case, the peak I1 was greater than 4.7 × 10−6, and the surface bottom was not greater at the border than in the center of the x-axis. Therefore, the region was recognized as a scratch defect. This criterion was elucidated by moving the window in the x-axis to compute the pattern of the neighboring region. Thus, the pattern of affine moment invariants was computed, yielding I1 = 1.6157 × 10−5, I2 = −1.0939 × 10−24, I3 = −7.0285 × 10−16, I4 = −2.1275 × 10−21, I5 = 1.4549 × 10−10, I6 = 6.6265 × 10−15, I7 = 3.1959 × 10−8, I8 = 2.8683 × 10−14, I9 = 1.9100 × 10−29, and I10 = 3.2143 × 10−31. This result is similar to that of the scratch marked by the arrow in Figure 9b. Here, the function decreases from I1 to I4, then increases until I7, and finally tends to zero from I8 to I10. In this case, the peak I1 is greater than 4.7 × 10−6 and the surface bottom is not greater at the borders than in the center of the x-axis. Therefore, the region is recognized as a scratch defect.
The fifth microsurface defect recognition test was carried out on the plastic free-form surface shown in Figure 10a. Here, the scale is represented in millimeters in the x-direction. Additionally, the microlaser line projected onto the free-form surface is shown in Figure 10b. Thus, the free-form surface was scanned in the x-axis to compute the surface depth zi,j and the surface width yi,j via Equations (22) and (23), while the slider platform provided the coordinate xi,j. Thus, 310 laser lines were processed to retrieve the free form surface. The contouring accuracy indicated a relative error of Er% = 0.826%, as computed via Equation (28) in a similar manner as mentioned above. Then, Bezier surfaces S0,0(u,v), S1,0(u,v), S1,0(u,v), and S1,1(u,v), ……, SM,N(u,v) were computed to obtain the surface topography shown in Figure 10c, where the scale is indicated in mm for the x- and y-axes and in microns for the z-axis. The Bezier surface accuracy indicated a relative error of Er% = 0.641%, as computed via Equation (28). Then, microsurface defect recognition was performed by computing the pattern of affine moment invariants from each region of the Bezier surface shown in Figure 10c. For this purpose, Equations (1)–(10) were computed for each region, and Equations (11) and (12) were computed to obtain the central moments for each region. Then, a discontinuity was detected by computing the derivative ∂f(y,x)/∂y in the y-axis due to the derivative changing signs in the y-axis. In this way, the window was moved to cover scratch 1 (marked with an arrow in Figure 10c). In this case, the surface shown in Figure 10d was obtained, where the scratch length was 610 microns in the x-axis and the scratch width was 286 microns in the y-axis.
The surface defect depth was also determined by computing the difference between the minimum and maximum depths of the surface defect, where the surface profile f(y,x) = zi,j was computed via Equation (22). The maximum of the surface defect was obtained on the border of the surface defect in the y-axis. Therefore, the depth of scratch 1 was determined as 28 microns in the z-axis. Furthermore, the bottom of the scratch presented surface irregularities. The pattern of affine moment invariants was computed, and the result was as follows: I1 = 1.4788 × 10−5, I2 = −1.6251 × 10−23, I3 = −8.7892 × 10−17, I4 = −1.8519 × 10−20, I5 = 1.2225 × 10−9, I6 = 5.1200 × 10−15, I7 = 2.6508 × 10−8, I8 = 2.2065 × 10−14, I9 = 2.5372 × 10−28, and I10 = 1.1187 × 10−30. This pattern describes a decreasing function from I1 to I4, after which the function increases until I7. Then, the function tends to zero from I8 to I10. In this case, the peak I1 is greater than 4.7 × 10−6; therefore, this region was recognized as a scratch, particularly as the surface bottom was not greater at the borders than in the center of the x-axis. This criterion was elucidated by obtaining the pattern of affine moment invariants of the scratch 2 surface defect, resulting in I1 = 5.4084 × 10−6, I2 = 1.5246 × 10−25, I3 = −1.2930 × 10−15, I4 = −4.0845 × 10−21, I5 = 1.8104 × 10−10, I6 = 3.4704 × 10−16, I7 = 4.9610 × 10−9, I8 = 1.2282 × 10−15, I9 = 3.0332 × 10−30, and I10 = −2.6570 × 10−33. In this case, the peak I1 was greater than 4.7 × 10−6, and the surface bottom was not greater at the borders than in the center of the x-axis. Additionally, the pattern of affine moment invariants was computed for the hole, also marked with an arrow in Figure 10c. Here, the hole length was 460 microns in the x-axis, the hole width was 534 microns in the y-axis, and the hole depth was 46 microns in the z-axis. The hole’s bottom presented surface irregularities. The pattern of affine moment invariants is computed, yielding I1 = 1.1280 × 10−5, I2 = −3.0274 × 10−21, I3 = 1.0087 × 10−13, I4 = −3.3440 × 10−18, I5 = 6.5086 × 10−10, I6 = 2.2408 × 10−15, I7 = 1.0998 × 10−8, I8 = 9.1200 × 10−15, I9 = 4.1001 × 10−26, and I10 = −8.2710 × 10−29. This pattern describes a decreasing function from I1 to I4, while the function increases to I7 and then tends to zero from I8 to I10. In this case, the peak I1 is greater than 4.7 × 10−6, while I4 is negative. Therefore, the region was recognized as a hole defect, particularly as the surface bottom was greater at the borders than in the center of both the x- and y-axes. In the same way, the pattern of affine invariant moments was computed for all the regions of the free-form surface, but these differed from the hole and scratch defect patterns.
The sixth microsurface defect recognition test was carried out for the metallic free-form surface shown in Figure 11a, where the scale is indicated in millimeters in the x-axis. The microlaser line projected onto the metallic free form surface is also shown in Figure 11b. Thus, the free-form surface was scanned in the x-axis to compute the surface depth zi,j and the surface width yi,j via Equations (22) and (23), while the slider platform provided the coordinate xi,j. Thus, 224 laser lines were processed to retrieve the free-form surface. The contouring accuracy presented a relative error of Er% = 0.884%, as computed via Equation (28). Then, Bezier surfaces S0,0(u,v), S1,0(u,v), S1,0(u,v),and S1,1(u,v), ……, SM,N(u,v) were computed to obtain the surface topography shown in Figure 11c. Here, the scale is indicated in mm for the x- and y-axes and in microns for the z-axis. The Bezier surface accuracy yielded a relative error of Er% = 0.664%, which was computed via Equation (28). Then, microsurface defect recognition was performed by computing the pattern of affine moment invariants for each region of the Bezier surface shown in Figure 11c. In particular, Equations (1)–(10) were computed for each region, and Equations (11) and (12) were computed to obtain the central moments for each region. Thus, the affine moment invariants were computed to establish the pattern in each region. Then, a discontinuity was detected by computing the derivative ∂f(y,x)/∂y in the y-axis, revealing the hole shown in Figure 11c, which corresponded to the location where the derivative changed signs in the y-axis. In this case, the surface shown in Figure 11d was obtained. Here, the hole length was 472 microns in the x-axis, the hole width was 400 microns in the y-axis, and the hole depth was 27 microns in the z-axis, with the hole’s bottom presenting surface irregularities. The pattern of affine moment invariants is computed from the Bezier surface, yielding I1 = 8.6825 × 10−6, I2 = −5.7967 × 10−24, I3 = 3.4759 × 10−16, I4 = −1.8328 × 10−18, I5 = 4.4638 × 10−10, I6 = 1.3420 × 10−15, I7 = 1.9741 × 10−8, I8 = 4.8606 × 10−15, I9 = 5.29607 × 10−27, and I10 = −3.9497 × 10−29. This pattern describes a decreasing function from I1 to I4, after which the function increases to I7. Then, the function tends to zero from I8 to I10. In this case, the peak I1 was greater than 4.7 × 10−6. Therefore, the region is recognized as a hole defect, particularly as the surface bottom was greater at the borders than in the center of both the x- and y-axes. In the same way, the pattern of affine invariant moments was computed for all the regions of the free-form surface, but these patterns differed from the hole and scratch defect patterns.
In the following, the contributions of the proposed microsurface defect recognition are described based on its advantages over the existing hole and scratch detection methods using optical-microscope-based systems. The advantages of the proposed visual testing method are described as follows. First, the patterns of affine moment invariants and microlaser scanning provide high accuracy (with a maximum relative error of 0.721% in the tests) to recognize microholes and scratches. The validation of this accuracy was performed by computing the pattern of affine moment invariants from the surface profiles measured using the contact method and microlaser line projection. The pattern recognition of holes and scratches using the contact method is considered to be the most accurate procedure to detect surface defects as this method utilizes the real surface profile. Therefore, the pattern of affine moment invariants via microlaser line projection was compared with respect to that obtained via the contact method to obtain the accuracy. In this way, the accuracy of patterns of affine moment invariants was computed as the relative error by means of Equation (28), where zi,j denotes the affine moment invariants computed from the surface measured via contact method, hi,j is the affine moment invariants computed via the microlaser line Equation (22), and nm is the number of data. In particular, zi,j and hi,j are substituted by (I1, I2, I3, I4, I5, I6, I7, I8, I9, I10) by employing the sub-index zi,j = Ii for j = 0. In this way, the accuracy provided by the microscope vision system and the affine moment invariants was found to be less than 2%, which is the level typically provided by traditional defect detection methods. However, it should be noted that, for traditional defect detection methods, the accuracy is computed as (TP + TN)/(TP + FP +TN + FN) by means of the expressions for precision = TP/(TP + FP) and recall = TP/(TN + FN) [35]. Here, TP denotes true positives, FP denotes false positives, TN denotes true negatives, and FN denotes false negatives. Overall, the accuracy obtained when using the pattern of affine moment invariants provided an advantage over traditional optical-microscope-system-based methods due to the obtained relative error being lower than 2%. Second, the use of affine moment invariants and microlaser line contouring provides good robustness in terms of the characterization of microholes and scratches. In this regard, a hole surface defect contoured using a microlaser line provides the same pattern of affine moment invariants. This allowed us to consistently recognize hole surface defects in each test. In the same way, scratch surface defects contoured via microlaser line always provide the same pattern of affine moment invariants. Thus, scratch surface defects can also be consistently recognized. In addition, flat and cylindrical surfaces contoured via microlaser lines produced the same respective patterns of affine moment invariants in each test. Third, microlaser line contouring provides the real topography of microsurfaces as the microlaser line reflects the real surface contour onto the camera’s image plane. In contrast, traditional optical microscope systems do not retrieve a surface contour to perform surface defect recognition. Based on these statements, the recognition of microholes and scratches has been achieved in a generally superior manner. A further discussion of the contributions of the proposed microsurface defect recognition approach is provided in Section 4.

4. Discussion

The viability of a microsurface defect recognition approach is determined by means of its recognition accuracy [35], so the capability of the proposed method to effectively recognize microholes and scratches was deduced through calculation of the recognition accuracy [36,37]. In this way, the contribution of the proposed microsurface defect recognition approach was established, indicating the high accuracy of hole and scratch recognition. In particular, the accuracy of the microsurface defect recognition approach was determined through a comparison with defect recognition based on a contact method [38,39]. Furthermore, the effectiveness of recognition indicated the viability of the method. Regarding the proposed microsurface defect recognition approach using patterns of affine moment invariants, the recognition accuracy and the efficiency indicated that it yields good results. For instance, the proposed approach for microsurface defect recognition via affine moment invariants and microlaser line contouring consistently recognizes hole defects; this is because hole defects always produce the same pattern of affine moment invariants. This pattern is described as a decreasing function from I1 to I4, then increasing to I7 and tending to zero from I8 to I10. Here, the peak I1 is greater than 4.7 × 10−6, and the surface depth is greater at the borders than in the center of both the x- and y-axes. A region satisfying these conditions can be effectively recognized as a hole defect. In the same way, the microsurface defect recognition approach consistently recognizes scratch defects as scratches always produce the same pattern of affine moment invariants. In particular, this pattern presents a decreasing function from I1 to I4 and then increases to I7 and tends to zero from I8 to I10. Furthermore, the peak I1 is greater than 4.7 × 10−6, and the surface bottom is not greater at the borders than in the center in the x-axis. A region satisfying these conditions can be effectively recognized as a scratch defect. To elucidate the viability of the proposed surface defect recognition approach, the accuracies of traditional methods for the detection of hole and scratch defects are mentioned in the following. The accuracy of surface defect recognition is related to the surface contouring, which is not included in traditional surface defect recognition methods. Typically, the recognition of holes and scratches is performed with a relative error exceeding 3.8% when using traditional optical microscope systems [40,41]. In these approaches, the surface data of holes and scratches are deduced through gray-level microscope images. Therefore, surface defect recognition is not performed utilizing the surface contour. This lack of microsurface contouring leads to reduced surface defect recognition accuracy. The traditional optical-microscope-based techniques may also characterize the surface defect patterns through the use of image intensity data [42,43]. However, the image intensity does not reproduce the real surface contours. Therefore, traditional optical microscope imaging systems do not characterize the forms of microsurface defect patterns accurately. In contrast, the microlaser line reflects the accurate form of the surface contour on the image plane through the microscope. This surface contouring leads to consistent patterns of affine moment invariants being provided for holes and scratches. This statement is elucidated by means of the hole and scratch surface defect recognition results provided in Section 3, where the accuracy of surface defect recognition was within a relative error of 0.721%. This indicates a certain degree of enhancement over traditional microscope imaging systems. To elucidate this improvement, the accuracy of the traditional optical microscope imaging systems is discussed in the following. A deep learning approach performing hole surface defect detection via image intensity obtained a relative error over 3%. Furthermore, surface scratch defect detection was carried out through a computer vision approach based on intensity descriptors, with a relative error over 3% [44]. Moreover, surface scratch defect detection was carried out using a deep learning approach, also with a relative error over 3% [45]. In the same way, a deep learning model performing hole and scratch detection yielded a relative error exceeding 3% [46]. Based on these results, it can be established that the proposed surface defect recognition approach utilizing the pattern of affine moment invariants and microlaser contouring presents superior accuracy when compared to traditional surface defect detection systems. To elucidate this statement, the accuracy values of the traditional visual testing methods for detecting holes and scratches were compared with respect to the proposed recognition approach. For this purpose, the accuracy and performance of traditional defect detection methods were computed according to the expression accuracy = (TP + TN)/(TP + FP + TN + FN). In this way, the accuracies of the visual testing methods were obtained, as presented in Table 3. Here, the visual testing methods are listed in the first column, the algorithmic structure of each method is mentioned in the second column, the tested surface is depicted in the third column, the defect shape is mentioned in the fourth column, and the error (in terms of percentage) is provided in the fifth column. In particular, a machine vision approach based on edge detection to detect holes and scratches on cylindrical surfaces obtained an error of 5% [47]. A machine vision approach based on segmentation detected holes and scratches on flat surfaces with an error of 3% [48]. A machine vision approach based on regularization detected holes and scratches on flat surfaces with an error of 5% [49]. A machine vision approach based on the Fourier transform detected holes and scratches on flat surfaces with an error of 6% [50]. A statistics-based approach using the local binary pattern detected holes and scratches on flat surfaces with an error of 3% [51]. A statistics-based method using a Gaussian function detected holes and scratches on cylindrical surfaces with an error of 2% [52]. A machine learning approach based on neural networks detected holes and scratches on flat surfaces with an error of 9% [53]. A machine learning approach based on convolutional neural networks detected holes and scratches on cylindrical surfaces with an error of 5% [54]. A machine learning approach based on self-supervised learning detected holes and scratches on flat surfaces with an error of 2.1% [55]. A deep learning approach based on multi-scale and channel-compressed mechanisms detected holes and scratches with an error of 5% [56]. A deep learning approach based on convolutional neural networks detected holes and scratches with an error of 2% [57]. A deep learning approach based on residual neural networks detected holes and scratches with an error of 3.3% [57]. A deep learning and machine vision approach based on convolutional neural networks detected holes and scratches with an error of 3.3% [58,59]. Additionally, the time consumption for training the convolutional neural network was over 450 s. Therefore, hole and scratch detection via deep learning takes over 450 s. While the times consumed by the statistics, machine vision, and machine learning approaches are generally much less than 450 s, their error is increased. In comparison, the proposed hole and scratch recognition method consistently obtained an error smaller than 2%, while its time consumption is moderately lower than that of traditional visual testing methods.
Additionally, the effectiveness of the proposed surface defect recognition was determined via the structured procedure, which allows for the recognition of surface defects. For instance, microlaser line contouring allows the surface topography to be retrieved with great accuracy. Furthermore, the Bezier surface Equation (13) provides all the surface points necessary to compute the pattern of affine moment invariants. Therefore, the pattern of affine moment invariants yields the same characteristic patterns for holes and scratches, respectively. In the same way, the method produces the same characteristic patterns for flat and cylindrical surfaces. Therefore, the pattern-based characterization is computed by means of efficient procedures that facilitate robust surface defect recognition. These statements were validated through the trials focused on microhole and scratch recognition on various surfaces, as presented in Section 3. The improvements provided by the proposed approach were further deduced based on a comparison with deep learning methods, which are commonly used to detect holes and scratches at present. A deep learning model has been implemented using a convolutional neural network and a large data set of images related to surface defects [60]. The deep learning approach involves performing training utilizing several hundred images or more [61] that do not necessarily provide the same pattern. This is because the characteristic patterns are computed from image intensity data, which can vary according to the surface’s reflectance, light source, and viewer angle. Therefore, surface defect recognition via patterns of affine moment invariants and microlaser line contouring provides a more suitable, robust, and effective structure when compared to those methods based on characterization via image intensity. This statement was validated by means of the steps of the proposed method, where the capability of the proposed approach to enable microsurface defect recognition using the pattern of affine moment invariants and microlaser line contouring was proven. Furthermore, the simple optical-microscope-based arrangement provides an inexpensive system, making the proposed microsurface defect recognition approach more suitable. Thus, the proposed surface defect recognition approach can be considered as a novel contribution in the field of microhole and scratch surface defect recognition.
The microscope vision system was used to inspect a surface area of 3 cm in the y-axis and 60 cm in the x-axis in a single movement as a slider is used to move the microscope vision system a distance of 60 cm in the x-axis while observing a 3 cm region in the y-axis. To inspect surfaces greater than 3 cm in the y-axis, the slider platform must also move the microscope in the y-axis. In this way, the dimensions of the slider platform should be adjusted according to the surface area to be inspected in the x- and y-axes. Additionally, an important condition of the system is to capture the microlaser line using the microscope system as the microlaser line allows the surface profile to be determined. Therefore, it may be necessary to adjust the microscope parameters to focus on the microlaser line.
The microsurface defect recognition approach was implemented on a computer at 2.4 GHz of velocity. Regarding this computer, 64 images are captured per second through the CCD camera. The computer moves the slider platform by means of a computer program. Thus, the contouring of a transverse section is computed in 0.0049 s through the processing of one laser line image. The overall time for surface defect recognition includes surface contouring via laser line scanning, Bezier surface representation, and the calculation of the pattern of fine moment invariants for each region. In particular, hole surface defect recognition on the flat metallic surface was performed in 102.43 s, hole and scratch surface defect recognition on the cylindrical surface was performed in 176.26 s, hole recognition on the free-form surface was performed in 192.65 s, scratch recognition on the flat surface shown in Figure 9b was performed in 189.88 s, hole and scratch recognition on the free-form surface shown in Figure 10c was performed in 207.12 s, and hole recognition on the free-form surface shown in Figure 11c was performed in 186.53 s.

5. Conclusions

A technique to perform hole and scratch surface defect recognition using the pattern of affine moment invariants and microlaser line contouring was presented. The surface defect recognition results computed using the proposed approach demonstrated improved accuracy when compared to traditional optical microscope imaging systems. The capability of the microsurface defect recognition approach was validated in terms of the recognition accuracy of surface defects and its effectiveness in terms of characterizing hole and scratch surface patterns. Overall, the joint use of the pattern of affine moment invariants and microlaser line contouring improved the accuracy of surface defect recognition, leading to a relative error of 0.721%. This high accuracy was obtained as the computational process for microhole and scratch surface defect recognition involves the real surface contour. Furthermore, the developed structure enables more efficient and robust pattern characterization than traditional microscope imaging systems. Thus, the proposed surface defect recognition approach can be considered a good tool for the recognition of hole and scratch defects on flat and cylindrical surfaces. Moreover, the simple microscope system used increases the capability to perform microsurface defect recognition. Thus, the proposed microhole and scratch surface defect recognition approach based on patterns of affine moment invariants and microlaser line contouring can be considered a highly effective and novel contribution to relevant fields.

Funding

This research received no external funding.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

Data is contained within the article.

Conflicts of Interest

The author declares no conflicts of interest.

References

  1. Ghate, N.D.; Shrivastava, A. Numerical and experimental investigation of complex surface topography evolution during laser surface modification with raster scan. J. Manuf. Process. 2021, 69, 368–377. [Google Scholar] [CrossRef]
  2. Wen, X.; Shan, J.; He, Y.; Song, K. Steel surface defect recognition: A survey. Coatings 2023, 13, 17. [Google Scholar] [CrossRef]
  3. Zhang, J.; Li, Z.; Hao, R.; Wang, X.; Du, X.; Yan, B.; Ni, G.; Liu, J.; Liu, L.; Liu, Y. Classification of microscopic laser engraving surface defect images based on transfer learning method. Electronics 2021, 10, 1993. [Google Scholar] [CrossRef]
  4. Gupta, M.; Khan, M.A.; Butola, R.; Singari, R.M. Advances in applications of non-destructive testing (NDT): A review. Adv. Mater. Process. Technol. 2021, 8, 2286–2307. [Google Scholar] [CrossRef]
  5. Ha, J.M.; Seung, H.M.; Choi, W. Autoencoder-based detection of near-surface defects in ultrasonic testing. Ultrasonics 2022, 119, 106637. [Google Scholar] [CrossRef]
  6. Liu, S.; Wang, X.; Liu, Z.; Wang, Y.; Chen, H. Machined surface defects monitoring through VMD of acoustic emission signals. J. Manuf. Process. 2022, 79, 587–599. [Google Scholar] [CrossRef]
  7. Xu, H.; Yan, Z.H.; Ji, B.W.; Huang, P.F.; Cheng, J.P.; Wu, X.D. Defect detection in welding radiographic images based on semantic segmentation methods. Measurement 2022, 188, 110569. [Google Scholar] [CrossRef]
  8. Wu, Q.; Dong, K.; Qin, X.; Hu, Z.; Xiong, X. Magnetic particle inspection: Status, advances, and challenges—Demands for automatic non-destructive testing. NDT E Int. 2024, 143, 103030. [Google Scholar] [CrossRef]
  9. Kutman, M.K.; Muftuler, F.Z.B.; Harmansah, C.; Kozgus Guldu, O. Use of bacteria as fluorescent penetrant for penetrant testing (PT). J. Nondestruct. Eval. 2020, 39, 15. [Google Scholar] [CrossRef]
  10. Mondal, A.; Kumar Halder, A.; Nayak, S.; Ranjan Kumar, R.; Chakraborty, A.; Kumar Gudimetla, S.; Ghosh, R.; Dubois, M. Root cause analysis of indentation mark defect on Zn coated steel sheet in continuous galvanizing line. Eng. Fail. Anal. 2024, 157, 107883. [Google Scholar] [CrossRef]
  11. Zhou, J.; Li, H.; Lu, L.; Cheng, Y. Machine vision-based surface defect detection study for ceramic 3D printing. Machines 2024, 12, 166. [Google Scholar] [CrossRef]
  12. Zhang, W.; Hu, Y.; Shan, H.; Liu, E. An online automatic carbide insert high-resolution surface defect detection system based on template-guided model. Expert Syst. Appl. 2024, 238, 122089. [Google Scholar]
  13. Zhang, J.; Kang, X.; Ni, H.; Ren, F. Surface defect detection of steel strips based on classification priority YOLOv3-dense network. Ironmak. Steelmak. 2021, 48, 547–558. [Google Scholar]
  14. Wang, J.; Li, Q.; Gan, J.; Yu, H.; Yang, X. Surface defect detection via entity sparsity pursuit with intrinsic priors. IEEE Trans. Ind. Inform. 2020, 16, 141–150. [Google Scholar]
  15. Qu, T.; Zou, L.; Zhang, Q.; Chen, X.; Fan, C. Defect detection on the fabric with complex texture via dual-scale over-complete dictionary. J. Text. Inst. 2016, 107, 743–756. [Google Scholar]
  16. Yan, Y.; Kaneko, S.; Asano, H. Accumulated and aggregated shifting of intensity for defect detection on micro 3D textured surfaces. Pattern Recognit. 2020, 98, 107057. [Google Scholar]
  17. Zorić, B.; Matić, T.; Hocenski, Ž. Classification of biscuit tiles for defect detection using Fourier transform features. ISA Trans. 2022, 125, 400–414. [Google Scholar]
  18. Chen, Y.; Ding, Y.; Zhao, F.; Zhang, E.; Wu, Z.; Shao, L. Surface defect detection methods for industrial products: A review. Appl. Sci. 2021, 11, 76. [Google Scholar] [CrossRef]
  19. Massaro, A.; Dipierro, G.; Cannella, E.; Galiano, A.M. Comparative analysis among discrete Fourier transform, k-means and artificial neural networks image processing techniques oriented on quality control of assembled tires. Information 2020, 11, 257. [Google Scholar] [CrossRef]
  20. Zhou, Y. Research on image-based automatic wafer surface defect detection algorithm. J. Image Graph. 2019, 7, 26–31. [Google Scholar]
  21. Wang, J.; Xu, G.; Li, C.; Wang, Z.; Yan, F. Surface defects detection using non-convex total variation regularized RPCA with kernelization. IEEE Trans. Instrum. Meas. 2021, 70, 5007013. [Google Scholar] [CrossRef]
  22. Luo, Q.; Fang, X.; Liu, L.; Yang, C.; Sun, Y. Automated visual defect detection for flat steel surface: A Survey. IEEE Trans. Instrum. Meas. 2020, 69, 626–644. [Google Scholar] [CrossRef]
  23. Mariniuc, A.M.; Cojocaru, D.; Abagiu, M.M. Building surface defect detection using machine learning and 3D scanning techniques in the construction domain. Buildings 2024, 14, 669. [Google Scholar] [CrossRef]
  24. Li, R.; Jin, M.; Paquit, V.C. Geometrical defect detection for additive manufacturing with machine learning models. Mater. Des. 2021, 206, 109726. [Google Scholar] [CrossRef]
  25. Wei, B.; Hao, K.; Gao, L.; Tang, X. Detecting textile micro-defects: A novel and efficient method based on visual gain mechanism. Inf. Sci. 2020, 541, 60–74. [Google Scholar] [CrossRef]
  26. Demir, K.; Ay, M.; Cavas, M. Automated steel surface defect detection and classification using a new deep learning-based approach. Neural Comput. Applic. 2023, 35, 8389–8406. [Google Scholar]
  27. Shaikh, S.; Hujare, D.; Yadav, S. Surface defect detection using convolutional neural network model architecture. J. Eng. Res. Sci. 2022, 1, 134–144. [Google Scholar] [CrossRef]
  28. Tao, X.; Zhang, D.; Ma, W.; Liu, X.; Xu, D. Automatic metallic surface defect detection and recognition with convolutional neural networks. Appl. Sci. 2018, 8, 1575. [Google Scholar] [CrossRef]
  29. Bai, T.; Gao, J.; Yang, J.; Yao, D. A study on railway surface defects detection based on machine vision. Entropy 2021, 23, 1437. [Google Scholar] [CrossRef]
  30. Liu, J.; Li, D.; Tao, W.; Yan, L. An automatic method for generating affine moment invariants. Pattern Recognit. Lett. 2007, 28, 2295–2304. [Google Scholar]
  31. Suk, T.; Flusser, J. Affine moment invariants generated by graph method. Pattern Recognit. 2011, 44, 2047–2056. [Google Scholar]
  32. Tan, K.C.; Chiam, S.C.; Mamun, A.A.; Goh, C.K. Balancing exploration and exploitation with adaptive variation for evolutionary multi–objective optimization. Eur. J. Oper. Res. 2009, 197, 701–713. [Google Scholar]
  33. Muñoz-Rodríguez, J.A.; Rodríguez-Vera, R. Evaluation of the light line displacement location for object shape detection. J. Mod. Opt. 2003, 50, 137–154. [Google Scholar]
  34. Yu, H.; Huang, Q.; Zhao, J. Fabrication of an optical fiber micro-sphere with a diameter of several tens of micrometers. Materials 2014, 7, 4878–4895. [Google Scholar] [CrossRef] [PubMed]
  35. Cui, L.; Jiang, X.; Xu, M.; Li, W.; Lv, P.; Zhou, B. SDDNet: A fast and accurate network for surface defect detection. IEEE Trans. Instrum. Meas. 2021, 70, 2505713. [Google Scholar]
  36. Usamentiaga, R.; Lema, D.G.; Pedrayes, O.D.; Garcia, D.F. Automated surface defect detection in metals: A comparative review of object detection and semantic segmentation using deep learning. IEEE Trans. Ind. Appl. 2022, 58, 4203–4213. [Google Scholar]
  37. Lin, H.I.; Wibowo, F.S. Image data assessment approach for deep learning-based metal surface defect-detection systems. IEEE Access 2021, 9, 47621–47638. [Google Scholar]
  38. Konovalenko, I.; Maruschak, P.; Brezinová, J.; Viňáš, J.; Brezina, J. Steel surface defect classification using deep residual neural network. Metals 2020, 10, 846. [Google Scholar] [CrossRef]
  39. Choi, E.; Sul, O.; Lee, J.; Seo, H.; Kim, S.; Yeom, S.; Ryu, G.; Yang, H.; Shin, Y.; Lee, S.B. Biomimetic tactile sensors with bilayer fingerprint ridges demonstrating texture recognition. Micromachines 2019, 10, 642. [Google Scholar] [CrossRef]
  40. Lee, Y.K.; Lee, S.; Kim, S.H. Real-time defect monitoring of laser micro-drilling using reflective light and machine learning models. Int. J. Precis. Eng. Manuf. 2024, 25, 155–164. [Google Scholar] [CrossRef]
  41. Jiang, Q.; Tan, D.; Li, Y.; Ji, S.; Cai, C.; Zheng, Q. Object detection and classification of metal polishing shaft surface defects based on convolutional neural network deep learning. Appl. Sci. 2020, 10, 87. [Google Scholar] [CrossRef]
  42. Williams, J.; Dryburgh, P.; Clare, A.; Rao, P.; Samal, A. Defect detection and monitoring in metal additive manufactured parts through deep learning of spatially resolved acoustic spectroscopy signals. Smart Sustain. Manuf. Syst. 2018, 2, 204–226. [Google Scholar] [CrossRef]
  43. Fu, G.; Sun, P.; Zhu, W.; Yang, J.; Cao, Y.; Yang, Y.M.; Cao, Y. A deep-learning-based approach for fast and robust steel surface defects classification. Opt. Lasers Eng. 2019, 121, 397–405. [Google Scholar]
  44. Juhler Hansen, A.; Moeslund, T.B.; Knoche, H. Defect or design? leveraging the angle of opportunity for detecting Scratches on brushed aluminium surfaces. IEEE Access 2021, 9, 99526–99538. [Google Scholar]
  45. Zheng, X.; Zheng, S.; Kong, Y.; Chen, J. Recent advances in surface defect inspection of industrial products using deep learning techniques. Int. J. Adv. Manuf. Technol. 2021, 113, 35–58. [Google Scholar]
  46. Xia, K.; Lv, Z.; Zhou, C.; Gu, G.; Zhao, Z.; Liu, K.; Li, Z. Mixed receptive fields augmented YOLO with multi-path spatial pyramid pooling for steel surface defect detection. Sensors 2023, 23, 5114. [Google Scholar] [CrossRef]
  47. Zhou, P.; Zhang, C.; Zhou, G.; He, Z.; Yan, X.; Wang, S.; Sun, M.; Hu, B. Whole surface defect detection method for bearing rings based on machine vision. Meas. Sci. Technol. 2023, 34, 015017. [Google Scholar]
  48. Jia, L.; Chen, C.; Xu, S.; Shen, J. Fabric defect inspection based on lattice segmentation and template statistics. Inf. Sci. 2020, 512, 964–984. [Google Scholar]
  49. Tsai, D.M.; Fan, S.K.S.; Chou, Y.H. Auto-annotated deep segmentation for surface defect detection. IEEE Trans. Instrum. Meas. 2021, 70, 5011410. [Google Scholar]
  50. Si, J.; Kim, S. V-DAFT: Visual technique for texture image defect recognition with denoising auto encoder and Fourier Transform. Signal Image Video Process. 2024, 18, 7405–7418. [Google Scholar]
  51. Luo, Q.; Fang, X.; Sung, Y.; Liu, L.; Ai, J.; Yang, C.; Simpson, O. Surface defect classification for hot-rolled Steel strips by selectively dominant Local binary patterns. IEEE Access 2019, 7, 23488–23499. [Google Scholar] [CrossRef]
  52. Yu, D.; Zhang, X.; Zhou, J.; Wu, N. An enhancement algorithm based on adaptive updating template with Gaussian model for Si3N4 ceramic bearing roller surface defects detection. Ceram. Int. 2022, 48, 6672–6680. [Google Scholar]
  53. Chen, W.; Zou, B.; Yang, J.; Huang, C.; Yao, P.; Liu, J. The machined surface defect detection of improved superpixel segmentation and two-level region aggregation based on machine vision. J. Manuf. Process. 2022, 80, 287–301. [Google Scholar] [CrossRef]
  54. Huang, Y.C.; Hung, K.C.; Lin, J.-C. Automated machine learning system for defect detection on cylindrical metal surfaces. Sensors 2022, 22, 9783. [Google Scholar] [CrossRef] [PubMed]
  55. Xu, R.; Hao, R.; Huang, B. Efficient surface defect detection using self-supervised learning strategy and segmentation network. Adv. Eng. Inform. 2022, 52, 101566. [Google Scholar] [CrossRef]
  56. Lv, X.; Duan, F.; Jiang, J.J.; Fu, X.; Gan, L. Deep metallic surface defect detection: The new benchmark and detection network. Sensors 2020, 20, 1562. [Google Scholar] [CrossRef]
  57. Konovalenko, I.; Maruschak, P.; Brevus, V. Steel surface defect detection using an ensemble of deep residual neural networks. J. Comput. Inf. Sci. Eng. 2022, 22, 014501. [Google Scholar] [CrossRef]
  58. Yang, H.; Wang, Y.; Hu, J.; He, J.; Yao, Z.; Bi, Q. Deep learning and machine vision-based inspection of rail surface defects. IEEE Trans. Instrum. Meas. 2022, 71, 5005714. [Google Scholar] [CrossRef]
  59. Singh, S.A.; Choudhari, S.J.; Desai, K.A. Augmenting human-guided progressive learning with machine vision systems for robust surface defect detection. Adv. Eng. Inform. 2024, 62, 102906. [Google Scholar] [CrossRef]
  60. Yue, X.; Chen, J.; Zhong, G. Metal surface defect detection based on metal-YOLOX. Int. J. Netw. Dyn. Intell. 2023, 2, 100020. [Google Scholar] [CrossRef]
  61. Deng, H.; Cheng, Y.; Feng, Y.; Xiang, J. Industrial laser welding defect detection and image defect recognition based on deep learning model developed. Symmetry 2021, 13, 1731. [Google Scholar] [CrossRef]
Figure 1. Surface points to compute affine moment invariants.
Figure 1. Surface points to compute affine moment invariants.
Coatings 15 00385 g001
Figure 2. (a) Surface hole to compute the pattern of affine moment invariants. (b) Surface scratch to compute the pattern of affine moment invariants.
Figure 2. (a) Surface hole to compute the pattern of affine moment invariants. (b) Surface scratch to compute the pattern of affine moment invariants.
Coatings 15 00385 g002
Figure 3. (a) Surface hole with surface depth of 10 microns to compute the pattern of affine moment invariants. (b) Irregular surface hole to compute the pattern of affine moment invariants. (c) Irregular surface scratch with surface depth of 12 microns to compute the pattern of affine moment invariants. (d) Surface profile showing discontinuity used to determine surface defects.
Figure 3. (a) Surface hole with surface depth of 10 microns to compute the pattern of affine moment invariants. (b) Irregular surface hole to compute the pattern of affine moment invariants. (c) Irregular surface scratch with surface depth of 12 microns to compute the pattern of affine moment invariants. (d) Surface profile showing discontinuity used to determine surface defects.
Coatings 15 00385 g003
Figure 4. (a) Surface points to generate a Bezier surface. (b) Sixth-order Bezier surface obtained through the control points computed via genetic algorithm.
Figure 4. (a) Surface points to generate a Bezier surface. (b) Sixth-order Bezier surface obtained through the control points computed via genetic algorithm.
Coatings 15 00385 g004
Figure 5. (a) Microscope vision system used to perform microsurface defect recognition. (b) Optical geometry of the microscope vision system.
Figure 5. (a) Microscope vision system used to perform microsurface defect recognition. (b) Optical geometry of the microscope vision system.
Coatings 15 00385 g005
Figure 6. (a) Flat surface to perform surface defect recognition (scale in mm in x-direction). (b) Microlaser line projected on the flat surface. (c) Microsurface generated using the Bezier surface (Equation (13)). (d) Hole surface to compute the pattern of affine moment invariants.
Figure 6. (a) Flat surface to perform surface defect recognition (scale in mm in x-direction). (b) Microlaser line projected on the flat surface. (c) Microsurface generated using the Bezier surface (Equation (13)). (d) Hole surface to compute the pattern of affine moment invariants.
Coatings 15 00385 g006
Figure 7. (a) Cylindrical metallic surface used to perform surface defect recognition (scale in mm in x-direction). (b) Microlaser line projected onto the cylindrical surface. (c) Microsurface generated using the Bezier surface Equation (13). (d) Scratch surface used to compute the pattern of affine moment invariants.
Figure 7. (a) Cylindrical metallic surface used to perform surface defect recognition (scale in mm in x-direction). (b) Microlaser line projected onto the cylindrical surface. (c) Microsurface generated using the Bezier surface Equation (13). (d) Scratch surface used to compute the pattern of affine moment invariants.
Coatings 15 00385 g007
Figure 8. (a) Plastic free-form surface to perform surface defect recognition (scale in mm in x-direction). (b) Microlaser line projected onto the free-form surface. (c) Microsurface generated by the Bezier surface Equation (13). (d) Hole surface used to compute the pattern of affine moment invariants.
Figure 8. (a) Plastic free-form surface to perform surface defect recognition (scale in mm in x-direction). (b) Microlaser line projected onto the free-form surface. (c) Microsurface generated by the Bezier surface Equation (13). (d) Hole surface used to compute the pattern of affine moment invariants.
Coatings 15 00385 g008
Figure 9. (a) Microlaser line projected onto metallic flat surface to perform surface defect recognition. (b) Surface generated by the Bezier surface Equation (13). (c) Scratch surface used to compute the pattern of affine moment invariants.
Figure 9. (a) Microlaser line projected onto metallic flat surface to perform surface defect recognition. (b) Surface generated by the Bezier surface Equation (13). (c) Scratch surface used to compute the pattern of affine moment invariants.
Coatings 15 00385 g009
Figure 10. (a) Plastic free-form surface used to perform surface defect recognition (scale in mm in x-direction). (b) Microlaser line projected onto the free-form surface. (c) Microsurface generated using the Bezier surface Equation (13). (d) Scratch surface used to compute the pattern of affine moment invariants.
Figure 10. (a) Plastic free-form surface used to perform surface defect recognition (scale in mm in x-direction). (b) Microlaser line projected onto the free-form surface. (c) Microsurface generated using the Bezier surface Equation (13). (d) Scratch surface used to compute the pattern of affine moment invariants.
Coatings 15 00385 g010
Figure 11. (a) Metallic free-form surface used to perform surface defect recognition (scale in mm in x-direction). (b) Microlaser line projected onto the free-form surface. (c) Microsurface generated using the Bezier surface Equation (13). (d) Hole surface used to compute the pattern of affine moment invariants.
Figure 11. (a) Metallic free-form surface used to perform surface defect recognition (scale in mm in x-direction). (b) Microlaser line projected onto the free-form surface. (c) Microsurface generated using the Bezier surface Equation (13). (d) Hole surface used to compute the pattern of affine moment invariants.
Coatings 15 00385 g011
Table 1. Surface control points generated via genetic algorithm for the first generation.
Table 1. Surface control points generated via genetic algorithm for the first generation.
Pi,jP1,1P2,1P3,1P4,1C1,1C2,1C3,1C4,1C5,1C6,1
P1,128.905628.646928.196828.273528.785328.767227.722428.237828.232528.8730
P1,227.394127.350928.088427.313927.374027.371027.288627.728427.673929.6848
P1,328.312628.382227.769427.957528.349828.344926.713727.870127.856928.9754
P1,426.815726.732626.896226.986826.777026.771225.798826.944626.938328.8012
P1,524.946324.880724.876924.889824.915824.911224.829024.883824.882925.1638
P2,128.855728.075229.619729.056428.492928.438127.412129.357829.318329.6697
P2,229.451327.325427.118329.196628.463028.313627.163928.230528.084430.4944
P2,327.745328.568529.118027.193628.185828.128026.444028.223428.088229.2922
P2,425.962825.647327.272728.862525.816125.794025.532428.123428.011729.3302
P2,525.817725.297125.760725.255125.575725.539124.684825.525725.490125.9688
P3,128.314427.262627.642128.731127.825527.751626.786828.224928.148328.8677
P3,226.472526.474727.092928.505226.473726.473526.420427.848627.749429.8719
P3,329.519026.825929.260729.701028.267128.077826.096429.496329.465430.0632
P3,426.362525.840029.414426.229226.119626.082925.129227.933727.709929.7836
P3,525.325925.224926.509924.157125.278925.271824.225625.416225.250826.5848
P4,126.472028.385827.743126.231427.496227.361725.868527.040426.934128.6909
P4,227.093928.152028.497628.397527.660127.585825.723628.451028.444029.5432
P4,326.267125.350725.489128.208425.841125.776725.191426.944326.753229.8229
P4,430.387028.505329.785624.423329.512329.380024.784927.292926.916130.1598
P4,523.626725.434425.313526.247824.594124.467023.498425.813525.747826.2922
P5,126.620626.689125.905726.523826.657326.652524.915626.236426.193027.7168
P5,226.408726.359626.012025.228526.385926.382424.751025.647725.592728.3167
P5,327.972524.961924.947928.648526.573026.361424.446926.928226.668228.6723
P5,428.296826.017228.716627.804927.237127.076923.831328.292828.228729.2507
P5,524.049723.352424.829625.204323.725623.676622.761225.030125.003826.0630
fitness1.46081.23231.58531.48591.35961.32890.77421.55721.51022.2006
Table 2. Surface control points generated via genetic algorithm for the second generation.
Table 2. Surface control points generated via genetic algorithm for the second generation.
Pi,jP1,1P2,1P3,1P4,1C1,1C2,1C3,1C4,1C5,1C6,1Last Iteration
P1,128.646927.722428.273527.908028.217228.152227.704328.103628.077928.847327.6033
P1,227.350927.288627.313928.272627.321927.317627.285627.826927.759629.752226.5566
P1,328.382226.713727.957526.890527.606527.489326.718627.461527.386528.900525.9509
P1,426.732625.798826.986827.624526.298526.232925.792927.328127.283228.846124.0033
P1,524.880724.829024.889824.974124.856724.853024.824424.934924.929025.169723.2542
P2,128.075227.412129.056428.297027.766927.720327.357228.703428.650029.616326.8506
P2,227.325427.163929.196629.182727.250327.239027.014529.190129.189130.493426.4636
P2,328.568526.444027.193627.136727.580927.431626.501827.167227.163229.288225.8039
P2,425.647325.532428.862529.111325.593925.585825.510328.995628.978229.347723.8593
P2,525.297124.684825.255125.250225.012524.969424.648225.252825.252525.968422.9206
P3,127.262626.786828.731128.179327.041427.008026.712928.474628.435828.829026.1063
P3,226.474726.420428.505226.621426.449426.445626.420527.629527.497129.739525.8393
P3,326.825926.096429.701026.824026.486826.435525.907228.363628.161429.861025.5426
P3,425.840025.129226.229228.275625.509625.459625.092427.324327.180529.927423.1096
P3,525.224924.225624.157124.923424.760324.690124.218524.567224.513326.638621.9303
P4,128.385825.868526.231426.455427.215627.038726.003026.351326.335528.706624.9330
P4,228.152025.723628.397525.957127.023126.852525.797927.263127.091629.371724.6096
P4,325.350725.191428.208426.033025.276625.265425.127027.197127.044329.670124.3633
P4,428.505324.784924.423325.215326.775826.514424.652724.847124.791530.215522.5072
P4,525.434423.498426.247825.040024.534424.398423.625525.686325.601426.207321.0366
P5,126.689124.915626.523826.150125.864725.740124.920426.350126.323827.690523.7936
P5,226.359624.751025.228527.277225.611825.498824.747526.324826.180828.460623.4075
P5,324.961924.446928.648526.156724.722524.686324.235427.490127.315028.497223.1939
P5,426.017223.831327.804927.525825.001124.847423.671127.675227.655529.231121.3660
P5,523.352422.761225.204323.965923.077623.036022.712224.628624.541625.976020.5068
fitness1.23230.77421.48591.31051.16111.14181.01421.37481.35291.94220.0001
Table 3. Accuracy of existing visual testing methods in comparison with the proposed method.
Table 3. Accuracy of existing visual testing methods in comparison with the proposed method.
Visual Testing
Method
Algorithm StructureTested SurfaceDefect ShapeRecognition
Error (%)
Machine visionEdge detectionCylindrical surfaceHoles and scratches5%
Machine visionSegmentation and template statisticsFlat surfaceHoles and scratches3%
Machine visionModel-based RegularizationFlat surfaceHoles and scratches5%
Machine visionFourier TransformFlat surfaceHoles and scratches6%
StatisticalLocal binary patternFlat surfaceHoles and scratches3%
StatisticalSegmentation via Gaussian FunctionCylindrical surfaceHoles and scratches2%
Machine learningBP neural networkFlat surfaceHoles and scratches9%
Machine learningConvolutional neural networksCylindrical surfaceHoles and scratches5%
Machine learningSelf-supervised learning and image segmentationFlat surfaceHoles and scratches2.1%
Deep LearningMulti-scale and channel-compressed featuresFlat surfaceHoles and scratches5%
Deep LearningConvolutional neural networksFlat surfaceHoles and scratches2%
Deep LearningResidual neural networksFlat surfaceHoles and scratches3.3%
Deep Learning and machine visionConvolutional neural networksFlat surfaceHoles and scratches3%
Deep Learning and machine visionConvolutional neural networksCylindrical surfaceHoles and scratches4%
Proposed methodAffine moment invariants and microlaser line projectionFlat, cylindrical, and free-form surfacesHoles and scratches0.721%
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Rodríguez, J.A.M. Microsurface Defect Recognition via Microlaser Line Projection and Affine Moment Invariants. Coatings 2025, 15, 385. https://doi.org/10.3390/coatings15040385

AMA Style

Rodríguez JAM. Microsurface Defect Recognition via Microlaser Line Projection and Affine Moment Invariants. Coatings. 2025; 15(4):385. https://doi.org/10.3390/coatings15040385

Chicago/Turabian Style

Rodríguez, J. Apolinar Muñoz. 2025. "Microsurface Defect Recognition via Microlaser Line Projection and Affine Moment Invariants" Coatings 15, no. 4: 385. https://doi.org/10.3390/coatings15040385

APA Style

Rodríguez, J. A. M. (2025). Microsurface Defect Recognition via Microlaser Line Projection and Affine Moment Invariants. Coatings, 15(4), 385. https://doi.org/10.3390/coatings15040385

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop