Next Article in Journal
Review of Soft Robotic Gloves and Functional Electrical Stimulation Affecting Hand Function Rehabilitation for Stroke Patients
Previous Article in Journal
Design and Evaluation of a Trunk–Limb Robotic Exoskeleton for Gait Rehabilitation in Cerebral Palsy
Previous Article in Special Issue
A Symmetric Encoder–Decoder Network with Enhanced Group–Shuffle Modules for Robust Lung Nodule Detection in CT Scans
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Crack Contour Modeling Based on a Metaheuristic Algorithm and Micro-Laser Line Projection

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
Biomimetics 2026, 11(2), 102; https://doi.org/10.3390/biomimetics11020102
Submission received: 8 October 2025 / Revised: 22 January 2026 / Accepted: 29 January 2026 / Published: 2 February 2026

Abstract

Currently, bio-inspired metaheuristic algorithms play an important role in computer vision for assessing surface cracks. Also, manufacturing industries need non-destructive technologies based on biomimetics theory for characterizing micro-crack contours to determine surface quality. In this way, it is necessary to develop bio-inspired algorithms to construct crack contour models for determining crack regions through an optical microscope system. In this study, a metaheuristic genetic algorithm is implemented to build crack contour models by means of Bezier functions and crack coordinates. The contour modeling is performed by a microscope vision system based on micro-laser line scanning, which provides the crack coordinates through a broken laser line in the crack region. Thus, the metaheuristic algorithm builds the crack contour model by fitting the Bezier functions toward the crack topography. At this stage, an objective function moves the Bezier functions toward the crack topography via control points. The proposed technique provides micro-scale crack contours with a relative error smaller than 2%. Thus, the proposed crack contour modeling enhances the traditional crack contour inspection based on microscope image processing. This contribution is supported by a comparison between the proposed technique and the crack characterization performed via conventional image processing algorithms.

Graphical Abstract

1. Introduction

Nowadays, computer vision algorithms have been employed to develop crack contour models for assessing surface quality in the manufacturing sector [1]. This mathematical modeling is a crucial process for determining crack regions on the surface being examined [2]. Thus, computer vision techniques have been employed for characterizing crack contours to quantify crack areas on a surface being inspected [3]. Hence, the crack areas are determined from the crack contours to assess the surface quality. This enables an effective surface crack inspection during the manufacturing process. Typically, the characterization of crack contours has been performed using computer vision methods such as filtering, segmentation, frequency domain, and deep learning. For instance, the characterization of crack contours has been deployed through Gaussian filtering and morphological operations [4], which identify crack regions through a contour fitting. Also, the characterization of crack contours has been carried out using homomorphic filtering that relies on a local threshold to establish the crack area [5], which is outlined by means of morphological operations and edge detection. Similarly, the crack contour has been defined by applying a Laplacian operator with a Gaussian smoothing filter [6], which determines the crack region by detecting high frequencies. Moreover, characterization of the crack contour has been developed via segmentation using image processing methods. In this context, the characterization of crack contours has been performed by means of segmentation using histogram equalization and binarization [7], which determines the region in which to perform a thinning for obtaining a crack skeleton. Also, the characterization of crack contours has been realized through segmentation utilizing an ortoboundary algorithm [8], which determines the crack area through the edge’s shortest distance and an orthogonal projection. Additionally, characterization of crack contours has been carried out using a segmentation network that relies on refined masks [9], which perform a semantic feature extraction to obtain crack edge details. In the same way, characterization of crack contours has been performed using skeleton techniques based on image processing. For example, characterization of crack contours has been carried out using a linear crack skeleton [10], which is fitted by a polynomial curve to determine the measurements of crack contours. Similarly, outlining of crack contours has been carried out using a linear crack skeleton with a flexible kernel of appropriate range [11], which extracts the skeleton from a division of the crack’s boundaries. Furthermore, characterization of crack contours has been implemented employing frequency domain methods. In this field, the characterization of crack contours has been effectuated using the Fourier transform [12], which determines discontinuities across the surfaces of the filled crack. Also, characterization of crack contours has been carried out using Fourier transform to detect planar defects [13], where the crack shape is determined based on a growth equation. Similarly, characterization crack of contours has been performed using multi-stage Fourier transform [14], which detects the crack surface through the secondary peaks in the Fourier transform spectrum. Recently, characterization of crack regions has been performed using deep learning methods via residual and convolutional neural networks. For instance, the modeling of crack contours has been carried out using a residual neural network [15], which learns from an image dataset and model hyper parameters to identify crack regions. Also, the modeling of crack contours has been performed through a residual neural network trained on ImageNet featuring cracks [16] and by computing a gradient-weighted class activation mapping. Similarly, the modeling of crack areas has been developed using a convolutional neural network focused on segmentation via crack images [17] and utilizes a stochastic gradient for learning to classify and locate crack areas. Also, crack modeling has been implemented using a convolutional neural network that relies on feature maps [18], where the training is effectuated with a crack dataset to identify cracks by means of feature maps.
The above-mentioned methods perform the modeling of crack contours using the distribution of pixel intensity. Nonetheless, the intensity profile does not accurately represent the crack topography. This is because the intensity distribution varies based on the surface reflectance, light source position, and viewer’s angle. These statements imply that conventional crack modeling techniques do not represent the crack profile through the real topography. This reduces accuracy in the modeling of crack contours. Additionally, deep learning methods build extensive models using a great number of images, resulting in reduced accuracy and slower performance [19]. This occurs because thousands of images are used to train the neural network models. Consequently, complex optimization must be performed to achieve the modeling of crack contours. Moreover, model optimization is carried out through additional parameters, resulting in supplementary procedures to obtain the crack contour model. On the other hand, simpler curve models such as polylines, B-splines, and clothoids have been used to build contour models. In this case, the polylines method fails to accurately represent contour curves [20], requiring a great number of lines to represent a contour curve. Also, the simpler B-splines do not intersect all points [21], requiring weights to achieve an accurate contour curve. Additionally, the clothoids curve is defined by cosine and sine functions [22], but an optimal curvature should be optimized to provide a contour curve. Furthermore, contour curves have been built using least squares to optimize Bezier functions [23], which do not pass through all points. Moreover, classical ridge/valley detectors have been employed to detect crack areas using image processing methods [24], which provide bi-dimensional information but low accuracy in three-dimensional coordinates. These criteria indicate that the modeling of crack contours remains a challenging endeavor. Consequently, it is essential to develop biomimetics theories for constructing crack contour models, emulating models of nature through metaheuristic algorithms and crack topography to improve crack assessment.
The proposed micro-scale crack contour modeling is performed using metaheuristic algorithms to determine crack areas, employing three-dimensional topography retrieved via laser line scanning. Thus, the crack contour model is developed by a metaheuristic algorithm employing Bezier functions and the coordinates of a broken laser line. Thus, the metaheuristic algorithm optimizes the Bezier functions using three-dimensional control points, which are computed by bio-inspired algorithms to generate crack contour models. Through this procedure, the crack contour model yields a three-dimensional Bezier curve, which depicts the crack contour area. The micro-scale crack contour modeling is carried out by an optical microscope vision system that includes a CCD camera and a 42 μm laser line. The microscope system is mounted on a slider device to move the vision system, which performs the scanning in the x-axis. Thus, the micro-laser line scans the surface, while the camera captures the broken laser line images to retrieve the crack contour region. In this process, the micro-scale topography is computed using the laser line position and the microscope’s geometry. Thus, the crack contour is determined using topography coordinates, providing high accuracy to improve the conventional crack inspection performed via image processing. In this context, the proposed technique provides crack contour measurements with a relative error smaller than 2%. Also, the proposed crack contour modeling can detect crack contours with a minimum surface width of 20 microns. This crack contour modeling improves the accuracy of the crack characterization via gray-scale image processing. The enhancement is achieved through the crack contouring performed by the micro-laser line projection. Also, the crack contour modeling approach improves the accuracy of measuring the crack region. This occurs due to the calculation of the Bezier basis functions by means of the three-dimensional crack topography. The contribution of crack contour modeling is established through a discussion focused on the accuracy of the crack characterization and detection via gray-scale image processing. The remainder of this paper is organized as follows: the basic theory for crack contour modeling using Bezier basis functions is described in Section 2.1, the crack contour modeling utilizing a metaheuristic algorithm based on Bezier basis functions is presented in Section 2.2, the recovering of crack surfaces through the broken laser line is detailed in Section 2.3, Section 2.4 covers the calibration of microscope parameters, the results of micro-surface crack modeling are presented in Section 3, and the contributions of the proposed micro-scale crack modeling are discussed in Section 4.

2. Materials and Methods

2.1. Basic Theory

The micro-scale crack contour modeling is performed using a metaheuristic algorithm and crack coordinates retrieved via micro-laser line scanning. In this context, the surface crack is defined as a deep surface discontinuity or fracture [25], where the surface material is absent. To determine a crack area, it is necessary to establish the crack contour, which defines the crack boundaries in a continuous form. Therefore, a mathematical model should be developed to represent the crack contour in continuous form. In this way, a metaheuristic algorithm is proposed to construct crack contour models by optimizing Bezier curves by means of control points. To carry it out, the algorithm performs explorations and exploitations to achieve optimal crack contour models. This procedure is carried out by minimizing an objective function, which is defined by means of Bezier functions and crack coordinates. Thus, the metaheuristic algorithm calculates the control points that move the Bezier curves toward the crack surface, generating crack contour models. In this way, the metaheuristic algorithm establishes the procedure for implementing crack contour models based on the coordinates of crack topography. The crack surface coordinates (xi, yj, zi) are illustrated in Figure 1a, where the subscript (i) indicates the number of the surface point in the contour topography. The coordinates of the crack surface are computed from a micro-laser line, which is broken in the crack region. Thus, the broken laser line yields the crack surface coordinates (x0, y0, z0), (x1, y1, z1), (x2, y2, z2), …, (xN, yN, zN), where the sub-index (N) indicates the total number of surface points in the crack topography. From these coordinates, the crack contour model is built by using the following fifth Bezier basis function:
C s ( u ) = r = 0 r = 5 B r ( u ) P r + 5 s ,   B r ( u ) = 5 ! r ! ( 5 r ) ! ( 1 u ) 5 r u r ,   0 u 1 .
In this equation, Pr+5s represents the control points that move the Bezier curve toward the position (xr+5s, yr+5s, zr+5s), where the subscript (s) indicates the number of the Bezier curve in the crack contour. From Equation (1), the following equations are obtained:
X s ( u ) = r = 0 r = 5 B r ( u ) P r + 5 s ,     u r = ( x r + 5 s x 5 s ) ( x 5 ( s + 1 ) x 5 s ) ,   0 u 1 .
Y s ( v ) = r = 0 r = 5 B r ( v ) P r + 5 s ,     v r = ( y r + 5 s y 5 s ) ( y 5 ( s + 1 ) y 5 s ) ,   0 v 1 .
Z s ( w ) = r = 0 r = 5 B r ( w ) P r + 5 s ,     w r = ( z r + 5 s z 5 s ) ( z 5 ( s + 1 ) z 5 s ) ,   0 w 1 .
For these equations, the control points are defined by the expressions Pr+5s = (wr+5s)xr+5s, Pr+5s = (wr+5s)yr+5s, Pr+5s = (wr+5s)zr+5s, where (wr+5s, wr+5s, wr+5s) are the weights that move the Bezier curve in x-direction, y-direction, and z-direction, respectively. Also, the sub-indices (r, s) are related to the sub-index (i) through the expression i = r + 5s, for s = 0, 1, 2,…, M. Thus, the crack contour model is represented by the curves [X0(u), Y0(v), Z0(w)], [X1(u), Y1(v), Z1(w)], [X2(u), Y2(v), Z2(w)], …, [XM(u), YM(v), ZM(w)], where the sub-index (M) indicates the total number of Bezier curves in the crack contour model. The Bezier curves [Xs(u), Ys(v), Zs(w)] of the crack points shown in Figure 1a are computed via Equations (2)–(4) to generate the crack contour illustrated in Figure 1b. These Bezier curves are determined by control points, which are computed using the weights (wr+5s, wr+5s, wr+5s). Thus, the crack contour model is defined by the following systems of equations:
X 0 ( u ) X 1 , ( u ) X 2 , ( u ) X M ( u ) = B 0 P 0 + B 1 P 1 + B 2 X 2 + B 3 , P 3 , + B 4 , P 4 + B 5 , P 5 B 0 P 5 + B 1 P 6 + B 2 P 7 + B 3 , P 8 , + B 4 , P 9 + B 5 , P 10 B 0 P 10 + B 1 P 11 + B 2 P 12 + B 3 , P 13 , + B 4 , P 14 + B 5 , P 15 B 0 P M 5 + B 1 P M 4 + B 2 P M 3 + B 3 , P M 2 , + B 4 , P M 1 + B 5 , P M ,
Y 0 ( v ) Y 1 , ( v ) Y 2 , ( v ) Y M ( v ) = B 0 P 0 + B 1 P 1 + B 2 P 2 + B 3 , P 3 , + B 4 , P 4 + B 5 , P 5 B 0 P 5 + B 1 P 6 + B 2 P 7 + B 3 , P 8 , + B 4 , P 9 + B 5 , P 10 B 0 P 10 + B 1 P 11 + B 2 P 12 + B 3 , P 13 , + B 4 , P 14 + B 5 , P 15 B 0 P M 5 + B 1 P M 4 + B 2 P M 3 + B 3 , P M 2 , + B 4 , P M 1 + B 5 , P M ,
Z 0 ( w ) Z 1 , ( w ) Z 2 , ( w ) Z M ( w ) = B 0 P 0 + B 1 P 1 + B 2 P 2 + B 3 , P 3 , + B 4 , P 4 + B 5 , P 5 B 0 P 5 + B 1 P 6 + B 2 P 7 + B 3 , P 8 , + B 4 , P 9 + B 5 , P 10 B 0 P 10 + B 1 P 11 + B 2 P 12 + B 3 , P 13 , + B 4 , P 14 + B 5 , P 15 B 0 P M 5 + B 1 P M 4 + B 2 P M 3 + B 3 , P M 2 , + B 4 , P M 1 + B 5 , P M .
These systems of equations are solved to determine the weights (wr+5s, wr+5s, wr+5s), which yield the control points (Pr+5s, Pr+5s, Pr+5s) for creating the crack contour model. Thus, the weights (wr+5s, wr+5s, wr+5s) are computed through a metaheuristic algorithm to build the crack contour model. In this way, the metaheuristic algorithm constructs a crack contour model using Bezier functions as shown in Figure 1b, where the Bezier curves [Xs(u), Ys(v), Zs(w)] intersect all points on the crack surface.
The procedure to compute the weights (wr+5s, wr+5s, wr+5s) through the metaheuristic algorithm is described in Section 2.2, where the control points (Pr+5s, Pr+5s, Pr+5s) are determined based on weights and crack surface coordinates. Thus, the metaheuristic algorithm determines the intervals of the weights (wr+5s, wr+5s, wr+5s) by utilizing the crack surface coordinates (xr+5s, yr+5s, zr+5s). This procedure moves the Bezier curves toward the crack surface via control points. Thus, the crack contour model is accomplished as shown in Figure 1b. To establish the viability of employing optimized Bezier curves to generate crack contour models, the features of the curves such as polylines, clothoids, B-splines, and Bezier curves are mentioned as follows. The polylines method builds a line segment for each surface point [26], requiring a great number of segments to generate a contour curve and reducing accuracy when the points are sampled. The clothoids method constructs smooth curve segments through cosine and sine functions, where the curvature is optimized to reduce the fitting error. The clothoids method is mathematically more complex and expensive compared to the Bezier curves [27]. The simpler B-splines method generates smooth curve segments providing continuity [28], but in some cases, the curve does not intersect all points. Consequently, an optimization of B-splines should be performed to improve accuracy. Moreover, the simpler Bezier curves have been optimized using least squares to reduce the fitting error [29]. To elucidate these criteria, a cubic B-spline curve and a Bezier curve optimized via least squares are fitted to a set of points. Figure 2 illustrates the result of the B-splines and the Bezier curve. The cubic B-splines method calculates curve segments through the points [30], which are indicated by the symbol • in Figure 2. In this figure, the outcome of the B-splines curve is represented by the dashed line. Similarly, the Bezier curve is computed using Equations (2) and (3), which are optimized through the least squares method [31] to determine the control points. The outcome of the Bezier curve generated via least squares is shown in Figure 2 by the solid line. As it is possible to see, the curves do not intersect all points. Consequently, the curve fitting can be improved to attain better accuracy. In this way, a metaheuristic algorithm is implemented to achieve an accurate crack contour model using Bezier curves. The implementation of the metaheuristic algorithm to generate a contour curve is described in Section 2.2.

2.2. Crack Contour Modeling via Metaheuristic Algorithm

The micro-sale crack contour model is generated through a metaheuristic algorithm and crack surface coordinates. In this way, the crack contour model is built by employing the crack coordinates (xi, yi, zi) shown in Figure 1a. Thus, the crack contour model is built by solving Equations (5)–(7) through the control points (Pr+5s, Pr+5s, Pr+5s). In this way, the control points are computed via weights using the expressions Pr+5s = (wr+5s)xr+5s, Pr+5s = (wr+5s)yr+5s, Pr+5s = (wr+5s)zr+5s. For calculating the weights, the crack coordinates and the parametric values (ui, vi, wi) are substituted in Equations (5)–(7) to obtain the following system of equations:
X s ( u 0 ) X s , ( u 1 ) X s , ( u 2 ) X s ( u 5 ) = B 0 ( u 0 ) B 1 ( u 0 ) B 2 ( u 0 ) B 3 , ( u 0 ) B 4 , ( u 0 ) B 5 ( u 0 ) B 0 ( u 1 ) B 1 ( u 1 ) B 2 ( u 1 ) B 3 , ( u 1 ) B 4 , ( u 1 ) B 5 ( u 1 ) B 0 ( u 2 ) B 1 ( u 2 ) B 2 ( u 2 ) B 3 , ( u 2 ) B 4 , ( u 2 ) B 5 ( u 2 ) B 0 ( u 5 ) B 1 ( u 5 ) B 2 ( u 5 ) B 3 , ( u 5 ) B 4 , ( u 5 ) B 5 ( u 5 ) w 9 + 5 s x 9 + 5 s w 1 + 5 s x 1 + 5 s w 2 + 5 s x 2 + 5 s w 5 + 5 s x 5 + 5 s ,
Y s ( v 0 ) Y s , ( v 1 ) Y s , ( v 2 ) Y s ( v 5 ) = B 0 ( v 0 ) B 1 ( v 0 ) B 2 ( v 0 ) B 3 , ( v 0 ) B 4 , ( v 0 ) B 5 ( v 0 ) B 0 ( v 1 ) B 1 ( v 1 ) B 2 ( v 1 ) B 3 , ( v 1 ) B 4 , ( v 1 ) B 5 ( v 1 ) B 0 ( v 2 ) B 1 ( v 2 ) B 2 ( v 2 ) B 3 , ( v 2 ) B 4 , ( v 2 ) B 5 ( v 2 ) B 0 ( v 5 ) B 1 ( v 5 ) B 2 ( v 5 ) B 3 , ( v 5 ) B 4 , ( v 5 ) B 5 ( v 5 ) w 0 + 5 s y 0 + 5 s w 1 + 5 s y 1 + 5 s w 2 + 5 s y 2 + 5 s w 5 + 5 s y 5 + 5 s ,
Z s ( w 0 ) Z s , ( w 0 ) Z s , ( w 2 ) Z s ( w 5 ) = B 0 ( w 0 ) B 1 ( w 0 ) B 2 ( w 0 ) B 3 , ( w 0 ) B 4 , ( w 0 ) B 5 ( w 0 ) B 0 ( w 1 ) B 1 ( w 1 ) B 2 ( w 1 ) B 3 , ( w 1 ) B 4 , ( w 1 ) B 5 ( w 1 ) B 0 ( w 2 ) B 1 ( w 2 ) B 2 ( w 2 ) B 3 , ( w 2 ) B 4 , ( w 2 ) B 5 ( w 2 ) B 0 ( w 5 ) B 1 ( w 5 ) B 2 ( w 5 ) B 3 , ( w 5 ) B 4 , ( w 5 ) B 5 ( w 5 ) w 0 + 5 s z 0 + 5 s w 1 + 5 s z 1 + 5 s w 2 + 5 s z 2 + 5 s w 5 + 5 s z 5 r + 5 s .
These systems of equations are solved for s = 0, 1, 2, 3, …, M through the metaheuristic algorithm to obtain the weights (wr+5s, wr+5s, wr+5s), which generate the crack contour model [Xs(u), Ys(v), Zs(w)]. Metaheuristics algorithms include genetic algorithms, which are implemented utilizing a random initial population, an objective function, an evaluation of the population’s fitness, selection of parents, a crossover to generate a new population, and a mutation in the new population [32,33]. Based on this conventional structure, a metaheuristic algorithm is implemented to compute the weights (wr+5s, wr+5s, wr+5s) that determine the control points of the crack contour model. To do so, the metaheuristic algorithm performs explorations and exploitations to find the optimal weights. In this way, the metaheuristic algorithm computes the weights in five steps, which are described as follows.
The first step computes Equations (2)–(4) using the control points Pr+5s = xr+5s, Pr+5s = yr+5s, Pr+5s = zr+5s to determine the initial population of weights. Thus, if Zs(wr) exceeds the coordinate zr+5s, the upper limit for wr+5s is set at 1, while the lower limit for wr+5s is designated as 0.3. However, if Zs(wr) lies below the coordinate zr+5s, the minimum is set at 1, while the maximum is set at 1.7. Also, if Ys(vr) exceeds the coordinate yr+5s, the maximum wr+5s is set at 1, and the minimum wr+5s is set at 0.3. But, if Ys(vr) falls below the coordinate yr+5s, the minimum is set at 1, and the maximum is set at 1.7. Similarly, if Xs(ur) exceeds the coordinate xr+5s, the maximum wr+5s is set at 1, and the minimum wr+5s is set at 0.3. But, if Xs(ur) falls below the coordinate xr+5s, the minimum is specified as 1, whereas the maximum is set at 1.7. From this search space, the initial population is obtained by randomly selecting four values for each weight. These four values represent the parents ( W 1,k, W 2,k, W 3,k, W 4,k) of each weight, with the k-index indicating the generation number. Thus, the initial population is established. Also, the search space provides all necessary weights to determine the optimal control points. This is because the solution space includes weights that generate curves both above and below the surface points. Additionally, the population’s size is bigger and encompasses all candidates from the search space. This is because a new parent is randomly tested from the search space during the iteration of the algorithm. In this context, the size of the population is unlimited, and the potentials candidates are not eliminated.
The second step creates the k-generation children via crossover by computing explorations and exploitations [34]. This procedure provides two children within parents and one child outside parents. Thus, the children (C1,k, C2,k) and (C4,k, C5,k) are created by means of explorations from the parents ( W 1,k, W 2,k) and ( W 3,k, W 4,k), respectively. Additionally, the children (C3,k, C6,k) are created by means of exploitations. In this way, the current children are determined by computing the following equations:
C 1 , k = 0.5 W 1 , k + W 2 , k + 0.5 β W 1 , k W 2 , k ,
C 2 , k = 0.5 W 1 , k + W 2 , k 0.5 β W 1 , k W 2 , k ,
C 4 , k = 0.5 W 4 , k + W 3 , k + 0.5 β W 4 , k W 3 , k ,
C 5 , k = 0.5 W 4 , k + W 3 , k 0.5 β W 4 , k W 3 , k ,
C 3 , k = W 0 , k + β W 1 , k W 0 , k ,
C 6 , k = W 4 , k + β W 5 , k W 4 , k .
For these equations, W 0,k and W 5,k represent the minimum and maximum of each weight, respectively. The parameter β is calculated through a factor α, which is randomly selected from the interval between 0 and 1. Thus, β = (2α)1/2 if α > 0.5; otherwise, β = [2(1 − α)]1/2. In this way, Equations (11)–(14) compute the children within parents, while Equations (15) and (16) compute the children external to parents. From these criteria, the k-generation children are computed. The third step evaluates the population’s fitness through an objective function, which is represented by the following expression:
O s = min 1 6 r = 0 r = 5 [ ( X s ( u r ) x r + 5 s ) 2 + ( Y s ( u r ) y r + 5 s ) 2 + ( Z s ( u r ) z r + 5 s ) 2 ] .
The fourth step takes the best current parents and children to select the (k + 1)-generation parents. Thus, the parent W1, k+1, is obtained from ( W 1,k, W 2,k), the parent W 3,k+1 is gathered from ( W 3,k, W 4,k), the parent W 2,k+1 is taken from (C1,k, C2,k, C3,k), and the parent W 4,k+1 is selected from (C4,k, C5,k, C6,k).
The fifth step mutates one parent and one weight to avoid a local minimum. To do so, a new parent takes the place of the worst parent to evaluate the fitness according to Equation (17). If the new parent enhances the fitness, it replaces the worst parent. Otherwise, the mutation does not occur. Additionally, a new weight randomly replaces a weight from a parent that is chosen in random form. Thus, if the updated weight improves the fitness, the new weight will replace the chosen weight. If not, the chosen weight remains unchanged. Also, the (k + 1)-generation children are generated by computing Equations (11)–(16). Based on these statements, steps two through five are iteratively computed to obtain the optimal weights that minimize the objective function Equation (17).
To elucidate the stages of the metaheuristic algorithm, the crack contour [X0(u), Y0(v), Z0(w)] is computed from the crack surface points illustrated in Figure 1a. In this way, the control points (P0+5s, P0+5s, P0+5s), (P1+5s, P1+5s, P1+5s), (P2+5s, P2+5s, P2+5s), …, (P5+5s, P5+5s, P5+5s) are calculated using the metaheuristic algorithm sketched in the flowchart shown in Figure 3. For a Bezier curve [Xs(u), Ys(v), Zs(w)], the control points are defined as P0s = x5s, P0s = y5s, P5s = z0s, P5s = x5s, P5s = y5s, P5s = z5s, while the weights are set at w0s = 1, w0s = 1, w0s = 1, w5s = 1, w5s = 1, w5s = 1. Additionally, the control points (P1+5s, P1+5s, P1+5s), and (P4+5s, P4+5s, P4+5s) are determined by the expressions P1+5s = (x0+5s +x1+4s)/2, P1+5s = (y0+5s + y1+4s)/2, P1+5s = (z0+4s + z1+4s)/2, P4+5s = (x3+4s + x4+4s)/2, P4+5s = (y3+4s + y4+4s)/2, P4+5s = (z3+4s + z4+4s)/2 to provide continuity G1. According to these criteria, the control points (P2+5s, P2+5s, P2+5s), (P3+5s, P3+5s, P3+5s) are computed by the metaheuristic algorithm as follows.
The first step computes Equations (2)–(4) using the weights wr+5s = 1, wr+5s = 1, wr+5s = 1s to determine the initial population of each weight. Thus, if Zs(ur) exceeds zr+5s, the upper and lower limits for wr+5s are set at 1 and 0.3, respectively. But, if Zs(ur) falls under zr+5s, the maximum and minimum are defined as 1.7 and 1. Also, if Ys(ur) exceeds yr+5s, the maximum and the minimum values of wr+5s are set at 1 and 0.3, respectively. But, if Ys(ur) is under yr+5s, the maximum and minimum are set at 1.7 and 1. Likewise, if Xs(ur) exceeds xr+5s, the maximum and minimum values of wr+5s are defined as 1 and 0.3. However, if Xs(ur) is under xr+5s, the maximum and minimum values are set at 1.7 and 1. From this solution space, four parents ( W 1,1, W 2,1, W 3,1, W 4,1) are randomly chosen to generate the initial population for every weight. Table 1 illustrates these initial parents, with the control points to be calculated in the first column and the parents identified in the second through fifth columns. The second step computes Equations (11)–(16) to generate the current children (C1,k, C2,k, C3,k, C4,k, C5,k, C6,k) via crossover. Also, the control points P1+5s = (x0+5s + x1+4s)/2, P1+5s = (y0+5s + y1+4s)/2, P1+5s = (z0+4s + z1+4s)/2, P4+5s = (x3+4s + x4+4s)/2, P4+5s = (y3+4s + y4+4s)/2, P4+5s = (z3+4s + z4+4s)/2 are computed to provide continuity G1. Thus, the first children are computed for k = 1, and they are shown in the sixth through eleventh columns of Table 1. Next, the third step computes the fitness by substituting [Xs(ur), Ys(vr), Zs(wr)] and [xr, yr, zr] into the objective function Equation (17) for s = 0 and r = 0, 1, 2, 3, 4, 5. The fitness of the first population is indicated in the seventh row of Table 1. This fitness shows that the initial population provides a small error after the first generation. Then, the fourth step selects the (k + 1)-generation parents from the best current parents and children. In this way, the parent W 1,k+1 is selected from ( W 1,k, W 2,k), the parent W 3,k+1 is gathered from ( W 3,k, W 4,k), the parent W 2,k+1 is sourced from (C1,k, C2,k, C3,k), and the parent W 4,k+1 is chosen from (C4,k, C5,k, C6,k). Thus, W 1,2 = W 1,1, W 2,2 = C2,1, W 3,2 = W  4,1, W 4,2 = C5,1 are obtained.
Following this, the fifth step mutates the worst parent W 3,2, which is selected via fitness. Thus, a new parent takes the place of the worst parent to evaluate Equation (17). In this case, the fitness has been improved, so the new parent replaces the parent W 3,2. Also, the parent W 1,2 is randomly selected to mutate the weight w3,2, which is chosen in random form. Thus, a new weight substitutes the weight w3,2 to evaluate the fitness. In this case, the new weight enhances the fitness, so the new weight replaces the weight w3,2. Next, the second step computes Equations (11)–(16) to generate the second children. Additionally, the control points P1+5s = (x0+5s + x1+4s)/2, P1+5s = (y0+5s + y1+4s)/2, P1+5s = (z0+4s + z1+4s)/2, P4+5s = (x3+4s + x4+4s)/2, P4+5s = (y3+4s + y4+4s)/2, P4+5s = (z3+4s+ z4+4s)/2 are calculated to provide continuity G1. Also, the fitness of the second children is computed via Equation (17). Table 2 illustrates the second-generation population.
The process to compute the (k + 1)-generation population is iteratively computed to minimize the objective function Equation (17). Thus, the weights are obtained to determine the optimal control points, which are indicated in the twelfth column of Table 2. These control points are used to compute the crack contour curve [X0(u), Y0(v), Z0(w)] shown in Figure 1b. Similarly, the contour curves [X1(u), Y1(v), Z1(w)], [X2(u), Y2(v), Z2(w)], …, [XM(u), YM(v), ZM(w)] are computed to obtain the crack contour illustrated in Figure 1b. In this way, the crack contour model has been built. Section 2.3 describes the detection of crack surface through micro-laser line scanning.

2.3. Crack Detection via Micro-Laser Line Scanning

The micro-scale crack contour model is constructed employing crack surface coordinates retrieved via micro-laser line scanning. Thus, the laser line scanning is carried out by the microscope vision system shown in Figure 4a. This microscope system includes a micro-laser line and a CCD array, which are connected to the optical microscope. Additionally, the microscope system is mounted on a slider device, which moves the arrangement to perform laser line scanning. In this microscope system, the x-axis denotes the horizontal axis, the y-axis depicts the depth, and the z-axis indicates the vertical axis. Thus, the microscope system perpendicularly projects the micro-laser line on the surface, while the CCD camera captures the laser line reflection to detect the surface crack. In this context, the surface crack is defined as a deep surface discontinuity or a material’s fracture. Additionally, the laser line is broken in the crack area due to the significant surface discontinuity. this is because a fracture does not reflect the laser line due to the absence of the surface. These criteria are elucidated by the broken laser line illustrated in Figure 4b, which has been captured from a surface crack. In this case, the broken laser line indicates the surface crack region from yA to yB along the y-axis. Also, the crack contour area is established in the x-axis and y-axis, while the crack contour height is defined in the z-direction. Thus, the surface crack coordinates are computed based on the position of the broken laser line. To do this, the surface is scanned in order to compute the crack coordinates by using the laser line position and the microscope’s geometry.
The crack coordinates in the z-axis are deduced from the microscope geometry in the x-direction, which is illustrated in Figure 5a, where a 42 μm laser line is perpendicularly projected on the surface, which reflects the laser line onto the CCD array through the microscope. In this geometry, the symbol θ denotes the angle formed by the laser line and the optical axis; the length d0 depicts the distance from the topography point O to the objective lens; the length d1 represents the distance from the intermediate plane to the first objective lens, while F1 denotes the focal position of the objective lens. The length L depicts the distance from the ocular lens to the intermediate image plane; the length d2 represents the distance from the CCD array to the ocular lens, while F2 indicates the focal position of the ocular lens. The microscope’s lateral geometry in the y-axis is depicted in Figure 5b. Additionally, the location of the laser line in the image plane is represented by (xi,j, yi,j); the image center is denoted by (xc, yc); and the pixel size is represented by the symbol η.
The surface height zi,j and the surface width yi,j are calculated from the geometry depicted in Figure 5a,b by means of the following expressions:
z i , j = η ( x i , j x c ) F 1 F 2 ( F 1 d 1 ) ( d 2 F 2 ) s i n θ + O ,
y i , j = η ( y i , m y c ) F 1 F 2 ( F 1 d 1 ) ( d 2 F 2 ) + η y c .
From these equations, the surface height zi,j and the surface width yi,j are computed by means of the parameters (xc, yc, η, θ, d1, F1, d2, F2). But, the surface coordinate xi,j is provided by the slider device. In this way, the microscope vision system scans the target surface to determine the laser line coordinates (xi,j, yi,j) from the image. Thus, the surface depth zi,j is computed by substituting xi,j in Equation (18), while the surface width yi,j is calculated by replacing yi,j in Equation (19). In the image plane, the laser line coordinates (xi,j, yi,j) are determined by detecting the maximum intensity in each row of the image. Thus, the laser line detection is performed by computing the intensity maximum sum of five pixels in each row. This summation includes the maximum pixel, two pixels to the left of the maximum, and two pixels to the right of the maximum. Thus, if the intensity sum exceedes 680, the laser line exists. But, if the intensity summation is smaller than 680, the laser line is nonexistent. In this case, a crack region is identified, and the position of the laser line is not computed. Thus, the laser line coordinate xi,j is calculated through the maximum intensity in the x-axis [35]. To do this, the laser line intensity is fitted to a Bezier curve in the x-direction by means of the following expressions:
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 .
For these equations, xi,j denotes the pixel position of the laser line along the x-axis, Ii,j represents the pixel intensity, and N indicates the number of pixels of the laser line width in the x-axis. In this case, the sub-indices (i, j) represent the pixel number in the x-axis and y-axis, respectively. For calculating the Bezier curve, the pixel location xi,j and the intensity Ii,j are substituted in Equations (20) and (21), respectively. By computing these equations, a concave curve [x(u), I(u)] is obtained within the interval 0 ≤ u ≤ 1, where the second derivative I”(u) is positive. In this way, the maximum intensity is determined by computing the first derivative I’(u) = 0, where u is calculated using the Bisection method. Thus, the value u is substituted in Equation (20) to calculate x(u), which represents the laser line position xi,j = x(u) in the x-axis. On the other hand, the laser line coordinate yi,j is obtained from the row number in the y-axis. Additionally, the laser line edges yi,0 and yi,m are determined by calculating the first derivative in the y-axis. In this case, the sub-index (m) indicates the total number of rows of the laser line in the y-axis. Thus, the coordinate xi,j is substituted in Equation (18) to calculate the surface height zi,j, while the coordinate yi,j is replaced in Equation (19) to determine the surface width yi,j. Through this procedure, the surface height zi,j and the surface width yi,j are computed from the laser line image, while the surface coordinate xi,j is given by the slider mechanism. Consequently, the crack contour position is determined from the beginning and end of the broken laser position on the y-axis. In this way, the crack contour coordinates are acquired to compute the crack contour model using the metaheuristic algorithm described in Section 2.2. The procedure to compute the parameters of the microscope vision system is described in Section 2.4.

2.4. Vision Parameters of the Optical Microscope Vision System

The surface depth zi,j and the surface width yi,j are determined through the microscope parameters (xc, yc, η, θ, d1, d2, F1, F2). These parameters are calculated through a metaheuristic algorithm employing Equations (18) and (19) to deduce the objective function. To do this, the algorithm uses the known surface height (zi,jz0,j) and the known surface width (yi,jyi,m). In context, the surface width (yi,jyi,m) is obtained by employing a line pattern with known dimensions in the y-axis. This line pattern is shown in Figure 6, where the scale is indicated in millimeters in the y-axis. In this case, the line pattern is placed at the position z0,j in the z-axis. For this line pattern, the position of each line is indicated by yi,0, yi,1, yi,2, …, yi,m in the image plane. These line positions are determined by computing the maximum intensity through the Bezier curves Equations (20) and (21), where xi,j is obtained from the line pixel position along the y-axis and yi,j = x(u). Based on the line positions, the surface width (yi,jyi,m) is obtained for j = 0, 1, 2, 3, …, m. Then, the line pattern is moved at the position z0,j in the z-axis by means of the micrometric stage, which is shown in Figure 4a. Thus, the micrometric stage provides the surface positions zi,j and z0,j in the z-axis. In this way, surface height (zi,jz0,j) is obtained to determine the microscope vision parameters by means of the metaheuristic algorithm. The implementation of the metaheuristic algorithm is performed by the following steps. The first step calculates the search space and the initial population for every parameter. The search space of the parameters (xc, yc, η) is deduced from the image dimensions. But, the search space of the parameters (d1, F1, d2, F2, θ) is determined based on the microscope geometry illustrated in Figure 5a. Thus, the minimum F2 is deduced by multiplying the ocular lens ratio by 1.3, while the maximum F2 is determined by multiplying the ocular lens ratio by 2.3.
Similarly, the minimum d2 is defined by multiplying the ocular lens ratio by 1.4, while the maximum d2 is deduced by multiplying the ocular lens ratio by 2.8. Also, the minimum and maximum values of F1 are determined by multiplying the objective lens ratio by 1.3 and 2.3, respectively. Additionally, the minimum and maximum values of d1 are deduced by multiplying the objective lens ratio by 1.4 and 3.2, respectively. The minimum and maximum values of θ are set at 15° and 50°, respectively. Then, four parents ( W 1,k, W 2,k, W 3,k, W 4,k) are randomly selected from the limits of each parameter’s range. Thus, the initial population of the parameters (xc, yc, η, θ, d1, F1, d2, F2) are established. The second step calculates Equations (11)–(16) to create the children (C1,k, C2,k, C3,k, C4,k, C5,k, C6,k). Next, the third step evaluates the fitness using the following expressions:
O 1 = min 1 m x n i = n j = 0 m ( z i , j z 0 , j ) η ( x c x i , j ) F 1 F 2 ( d 1 d 2 d 1 F 2 d 2 F 1 + F 1 F 2 ) s i n θ + η ( x c x i , m ) F 1 F 2 ( d 1 d 2 d 1 F 2 d 2 F 1 + F 1 F 2 ) s i n θ 2 ,
O 2 = min 1 m x n i = n j = 0 m ( y i , m y i , 0 ) + η ( y c y i , j ) F 1 F 2 ( d 1 d 2 d 1 F 2 d 2 F 1 + F 1 F 2 ) η ( y c y i , m ) F 1 F 2 ( d 1 d 2 d 1 F 2 d 2 F 1 + F 1 F 2 ) 2 .
From these equations, the fitness is computed by the expression O = (O1 + O2)/2, where the data (zi,jzi,m) and (yi,jyi,m) are known. Then, the fourth step selects the parents for the (k + 1)-generation. Thus, the parents W 1,k+1 and W 3,k+1 are selected from the parents ( W 1,k, W 2,k) and ( W 3,k, W 4,k). But, the parents W  2,k+1 and W 4,k+1 are chosen from the children (C1,k, C2,k, C3,k) and (C4,k, C5,k, C6,k), respectively. Then, the fifth step replaces the worst parent with a new parent. Thus, if the new parent improves the fitness, the worst parent undergoes mutation. If not, the worst parent remains unchanged. Also, a new parameter replaces a parameter that is randomly selected. Thus, if the new parameter improves the fitness, the parameter undergoes mutation. If not, the parameter remains unchanged. In this way, the (k + 1)-generation parents are acquired. Also, the (k + 1)-generation children are generated by computing Equations (11)–(16) to obtain the (k + 1)-generation population. The procedure to determine the (k + 1)-generation population is iteratively computed to find the parameters (xc, yc, η, θ, d1, F1, d2, F2) that minimize Equations (22) and (23). Additionally, the distance between zero and the point O is determined by computing the expression z0,j = η(x0,jxc) F1F2/(d1F1)(d2F2)sin θ. Thus, the metaheuristic algorithm has computed the vision parameters (xc, yc, η, θ, d1, F1, d2, F2), obtaining the next results: d1 = 62.361 mm, F1 = 30.689 mm, d2 = 60.253 mm, F2 = 27.403 mm, θ = 22.431°, xc = 395.96 pixels, yc = 373.36 pixels, η = 2.22 microns/pixel. In this procedure, the metaheuristic algorithm was computed 110 times to determine the uncertainties of the microscope parameters (xc, yc, η, θ, d1, F1, d2, F2) by means of the standard deviation. To do this, the coordinates (xi,j, yi,j) computed from (zi,jz0,j) and (yi,jyi,m) should be the same for each time that the algorithm computes the microscope parameters. Thus, the same values of (zi,jz0,j) and (yi,jyi,m) are employed for each time that the parameters are computed. In this way, the algorithm computes the uncertainty of vision parameters via standard deviation. The values of the microscope vision parameters and the variables of crack contour modeling are described in Table 3, where the first column depicts the symbol of every variable of the microscope system and the crack contour modeling; the second column represents the units of each variable; the values of the microscope vision parameters are shown in the third column; the vision parameters uncertainty is pointed in the fourth column; the values of the microscope vision parameters with uncertainty are represented in the fifth column. In this case, the microscope parameters computed through the metaheuristic algorithm are indicated in the first through eighth rows of Table 3. the next rows indicate the units of the variables of crack contour modeling.
In this microscope vision system, the radial distortion is determined through the coordinates of the laser line position (xi,j, yi,j), which are computed by means of Equations (20) and (21). In this way, the true coordinates are determined from distorted coordinates (xi,j, yi,j) through the expressions xi,j= xi,j + δxi and yi,j = yi,j + δyj, where (δxi, δyj) represent the distortion. Thus, a distorted line shifting is computed by the expression Si,j = x1,j − xi,j, while the expression si,j = (x1,j + δx1) − (xi,j + δxi) computes the undistorted line shifting. Therefore, the distortion along the x-axis is calculated by the expression δxi = (x1,j − xi,j) − si,j + δx1 = Si,jsi,j + δx1. To do this, the laser line is positioned near to the image center to obtain the initial line shifting without distortion, where δx1 = 0, and s1,j = S1,j. In this way, the expression si,j = i*S1,j determines the undistorted shifting, while the distortion along the x-axis is calculated by 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). With these terms, the expression δyj = (yi,1 − yi,j) − j*Ti,1 is deduced to calculate the distortion along the y-axis. The results of the micro-scale modeling are described in Section 3.

3. Micro-Scale Crack Contour Modeling Results

The micro-scale crack contour modeling is carried out by the microscope vision system shown in Figure 4a. Thus, the first micro-scale crack contour modeling is performed for the wood surface shown in Figure 7a, where the scale is indicated in millimeters along the x-axis. Also, the micro-laser line projected on the wood surface is shown in Figure 7b, where the broken laser line indicates the crack area along the y-axis. In this way, the wood surface is scanned along the x-axis to determine the laser line coordinates (xi,j, yi,j) by computing Equations (20) and (21). Then, xi,j is replaced in Equation (18) to compute the surface height zi,j, while yi,j is substituted in Equation (19) to calculate the surface width yi,j. Additionally, the slider device provides the surface length xi,j. Thus, two hundred and eighty-four images were processed of the wood surface shown in Figure 8a, where the x-axis and y-axis are indicated in mm, while the z-axis is indicated in microns. The surface-recovering accuracy is determined through the relative error [36] with the following expression:
E r % = 100 n m i = 0 n j = 0 m z i , j h i , j h i , j .
In this equation, zi,j represents the surface computed via Equation (18), hi,j denotes the surface measured through a contact method, and n·m is the data number. Thus, Equation (24) is computed for the wood surface illustrated in Figure 8a, resulting in a relative error of Er% = 1.6216%. The position of the crack contour is obtained during the surface scanning, starting from the beginning and the end of the broken laser position along the y-axis. In this procedure, the broken laser line is identified by summing the intensity of five adjacent pixels along the x-axis. Hence, if the intensity summation exceeds 680, the laser line exists. If not, the laser line is nonexistent. In this case, a crack region is identified, and the laser line position is not computed. But, the crack contour position is acquired from the last laser position along the y-axis. Thus, the beginning of the crack region has been obtained along the y-axis. Then, the procedure calculates the maximum in the subsequent rows until to it achieves an intensity summation exceeding 680. Thus, the final location of the crack region is determined in the y-axis.
In this way, a crack region is identified when there are three rows of broken laser lines on the y-axis and three broken laser lines on the x-axis. Based on these criteria, the coordinates (xi, yj, zi) of the broken line are acquired during the scanning of the wood surface. From these crack surface coordinates, a crack contour model is built through the metaheuristc algorithm that relies on Bezier functions as described in Section 2.2. Thus, the first step generates the search space by computing Equations (2)–(4) employing Pr+5s = xr+5s, Pr+5s = yr+5s, Pr+5s = zr+5s. If Zs(wr) exceeds zr+5s, the maximum and minimum values of wr+5s are 1 and 0.3. But, if Zs(wr) is below zr+5s, the maximum and minimum values of wr+5s are 1.7 and 1. Also, if Ys(vr) exceeds yr+5s, the maximum and minimum values of wr+5s are 1 and 0.3. But, if Ys(vr) falls below yr+5s, the maximum and minimum values of wr+5s are 1.7 and 1. Similarly, if Xs(ur) exceeds xr+5s, the maximum and minimum values of wr+5s are 1 and 0.3. But, if Xs(ur) is below xr+5s, the maximum and minimum values of wr+5s are 1.7 and 1. Subsequently, four values ( W 1,k, W 2,k, W 3,k, W 4,k) are randomly selected between the maximum and minimum to obtain the initial population for each weight. Next, the second step generates the current children (C1,k, C2,k, C3,k, C4,k, C5,k, C6,k) by computing Equations (11)–(16). Also, the control points P1+5s = (x0+5s + x1+4s)/2, P1+5s = (y0+5s + y1+4s)/2, P1+5s = (z0+4s + z1+4s)/2, P4+5s = (x3+4s + x4+4s)/2, P4+5s = (y3+4s + y4+4s)/2, P4+5s = (z3+4s + z4+4s)/2 are computed to provide continuity G1. Subsequently, the third step calculates the fitness by replacing [Xs(ur), Ys(vr), Zs(wr)] and [xr, yr, zr] in Equation (17). Then, the fourth step determines the (k + 1)-generation parents by selecting the parents [ W 1,k+1, W 2,k+1, W 3,k+1, W 4,k+1] from [( W 1,k, W 2,k), (C1,k, C2,k, C3,k), ( W 3,k, W 4,k), (C4,k, C5,k, C6,k)]. Next, the fifth step mutates the last fit parent, introducing a new parent. Thus, if the new parent enhances the fitness, the worst parent undergoes mutation. If not, the mutation does not occur. Additionally, a new weight takes the place of a weight that is randomly selected. Thus, if the new weight improves the fitness, weight mutation takes place. In other cases, the chosen weight remains unchanged. Also, the (k + 1)-generation children are generated by computing Equations (11)–(16). Next, steps two through five are repeated until the optimal weights that minimize the objective function Equation (17) are obtained. Thus, a fifth Bezier curve has been obtained. This procedure is carried out to compute the Bezier curves [X0(u), Y0(v), Z0(w)], [X1(u), Y1(v), Z1(w)], [X2(u), Y2(v), Z2(w)], [X3(u), Y3(v), Z3(w)], …, [XM(u), YM(v), ZM(w)] in order to generate the crack contour model. The contour curve provided by the crack contour model is shown in Figure 8b. The accuracy provided by the crack contour model is computed by the following expression:
e r r o r % = 100 M s = 0 s = M r = 0 r = 5 Z s ( u r ) z r + 5 s 3 z r + 5 s + Y s ( u r ) y r + 5 s 3 y r + 5 s + X s ( u r ) x r + 5 s 3 x r + 5 s
By computing Equation (25), the crack contour model produces a relative error of 0.872% for the crack contour shown in Figure 8b. Thus, the crack contour model has been constructed by the metaheuristic algorithm.
The second micro-scale crack contour modeling is performed for the paper surface shown in Figure 9a, where the scale is indicated in millimeters along the y-axis. Also, the micro-laser line projected on the paper surface is illustrated in Figure 9b, where the broken laser line depicts the crack region along the y-axis. Thus, the paper surface is scanned along the x-axis to determine the surface height zi,j and the surface width yi,j by computing Equations (18) and (19) using the coordinates (xi,j, yi,j), respectively. Moreover, the slider device provides the coordinate xi,j. Thus, two hundred and twenty-two images were processed of the paper surface illustrated in Figure 10a, where the x-axis and y-axis are represented in millimeters, while the z-axis is indicated in microns. The accuracy is computed by employing the surface zi,j and the surface hi,j provided by a contact method. Thus, Equation (24) is computed for the paper surface shown in Figure 10a, resulting in a relative error of Er% = 1.524%. Additionally, the coordinates of the crack surface are collected during the scanning from the beginning and end of the broken laser position along the y-axis. In this procedure, the broken laser line is detected when the sum intensity of five adjacent pixels along the x-axis falls below 680. When the laser line does not exist, the crack contour position is obtained from the last laser position along the y-axis. Thus, the beginning of the crack region is obtained along the y-axis. Next, the maximum is computed in the subsequent rows until achieving an intensity summation exceeding 680 to determine the end position in the y-axis. Thus, a crack region is detected when there are three rows of the broken laser line in the y-axis and three broken laser lines in the x-axis. In this way, the broken line coordinates are computed during the paper surface scanning. Then, the crack contour model is built using the metaheuristc algorithm through the Bezier functions. Thus, the first step computes Equations (2)–(4) via Pr+5s = xr+5s, Pr+5s = yr+5s, Pr+5s = zr+5s to establish the initial population. If Zs(wr) is over zr+5s, the maximum and minimum values of wr+5s are 1 and 0.3. If not, the maximum and minimum values of wr+5s are 1.7 and 1. Also, if Ys(vr) exceeds yr+5s, the maximum and minimum values of wr+5s are 1 and 0.3. Otherwise, the maximum and minimum are 1.7 and 1. Additionally, if Xs(ur) exceeds xr+5s, the maximum and minimum values of wr+5s are 1 and 0.3. If not, the maximum and minimum are 1.7 and 1. Then, four values ( W 1,k, W 2,k, W 3,k, W 4,k) are randomly selected between the maximum and minimum to determine the initial population for each weight. Then, the second step computes Equations (11)–(16) to obtain the current children (C1,k, C2,k, C3,k, C4,k, C5,k, C6,k). Also, P1+5s = (x0+5s + x1+4s)/2, P1+5s = (y0+5s + y1+4s)/2, P1+5s = (z0+4s + z1+4s)/2, P4+5s = (x3+4s + x4+4s)/2, P4+5s = (y3+4s + y4+4s)/2, P4+5s = (z3+4s + z4+4s)/2 are computed to provide continuity G1.
Then, the third step computes the fitness Equation (17) based on [Xs(ur), Ys(vr), Zs(wr)] and [xr, yr, zr]. Next, the fourth step selects the (k + 1)-generation parents [ W 1,k+1, W 2,k+1, W 3,k+1, W 4,k+1] from [( W 1,k, W 2,k), (C1,k, C2,k, C3,k), ( W 3,k, W 4,k), (C4,k, C5,k, C6,k)], respectively. Then, the fifth step performs a mutation by replacing the least fit parent with a new one. Also, a new weight replaces a weight that is selected at random. Then, Equations (11)–(16) are computed to obtain the (k+1)-generation children. Subsequently, steps two through five are repeated until the optimal weights that minimize the objective function Equation (17) are obtained. This procedure is carried out to compute the optimal Bezier curves [X0(u), Y0(v), Z0(w)], [X1(u), Y1(v), Z1(w)], [X2(u), Y2(v), Z2(w)], [X3(u), Y3(v), Z3(w)], …, [XM(u), YM(v), ZM(w)] that represent the crack contour model. From this crack contour model, the crack contour shown in Figure 10b is obtained. The accuracy provided by the crack contour model is computed via Equation (25), and the result is a relative error of 0.9612%. Thus, the micro-scale crack contour model has been built using the metaheuristic algorithm and micro-laser line scanning.
The third micro-scale crack contour modeling is performed for the metallic surface illustrated in Figure 11a, where the scale is indicated in millimeters along the x-axis. Figure 11b illustrates the broken laser line within the crack region of the metallic surface along the y-axis. Thus, the metallic surface is scanned at the x-axis to retrieve the coordinates (xi,j, yi,j). At the same time, the surface height zi,j and surface width yi,j are retrieved by computing Equations (18) and (19) by means of the coordinates (xi,j, yi,j). Additionally, the slider device provides the coordinate xi,j. Thus, two hundred and seventy-four images were processed of the metallic surface shown in Figure 12a, where the x-axis and y-axis are indicated in millimeters, while the z-axis is indicated in microns. The accuracy is computed via relative error using the coordinate zi,j and the surface hi,j measured by a contact method. Thus, Equation (24) is computed for the metallic surface shown in Figure 12a, resulting in a relative error of 1.436%. Additionally, the coordinates of the crack surface are computed during the scanning based on the position of the broken laser line along the y-axis. Thus, the broken laser line is detected when the sum of five adjacent pixels along the x-axis falls below 680. Also, the crack contour position is obtained from the last laser position on the y-axis to establish the beginning of the crack region. Then, the summation is computed in the next rows to find a value greater than 680, which determines the end position of the crack region on the y-axis. Also, a crack region is detected when there are three rows of broken laser line on the y-axis and three broken laser lines on the x-axis. In this way, the broken line coordinates are obtained during the scanning. Then, the crack contour model is constructed by the metaheuristc algorithm via Bezier functions. Thus, the first step computes Equations (2)–(4) to determine the initial population. If Zs(wr) exceeds zr+5s, the maximum and minimum values of wr+5s are 1 and 0.3. Otherwise, the maximum and minimum values of wr+5s are 1.7 and 1. Also, if Ys(vr) exceeds yr+5s, the maximum and minimum values of wr+5s are 1 and 0.3. If not, the maximum and minimum are 1.7 and 1. Additionally, if Xs(ur) exceeds xr+5s, the maximum and minimum values of wr+5s are 1 and 0.3. If not, the maximum and minimum are 1.7 and 1. Then, four values ( W 1,k, W 2,k, W 3,k, W 4,k) are randomly selected from the search space to obtain the initial population for each weight. Then, the second step computes Equations (11)–(16) to generate the current children (C1,k, C2,k, C3,k, C4,k, C5,k, C6,k). Also, P1+5s = (x0+5s + x1+4s)/2, P1+5s = (y0+5s + y1+4s)/2, P1+5s = (z0+4s + z1+4s)/2, P4+5s = (x3+4s + x4+4s)/2, P4+5s = (y3+4s + y4+4s)/2, and P4+5s = (z3+4s + z4+4s)/2 are computed to provide continuity G1.
Next, the third step computes the fitness Equation (17) employing [Xs(ur), Ys(vr), Zs(wr)] and [xr, yr, zr]. Then, the fourth step selects the (k + 1)-generation parents [ W 1,k+1, W 2,k+1, W 3,k+1, W 4,k+1] from [( W 1,k, W 2,k), (C1,k, C2,k, C3,k), ( W 3,k, W 4,k), (C4,k, C5,k, C6,k)], respectively. Next, the fifth step performs the mutation of the worst parent and the mutation of a weight. Also, Equations (11)–(16) are computed to obtain the (k + 1)-generation children. Then, steps two through five are repeated to obtain the optimal weights that minimize Equation (17). This procedure is carried out to compute the optimal Bezier curves [X0(u), Y0(v), Z0(w)], [X1(u), Y1(v), Z1(w)], [X2(u), Y2(v), Z2(w)], [X3(u), Y3(v), Z3(w)], …, [XM(u), YM(v), ZM(w)] that represent the crack contour model. Thus, the crack contour illustrated in Figure 12b is obtained from the crack contour model. The accuracy of the crack contour model is computed via Equation (25), obtaining a relative error of 0.8964%. Thus, the micro-scale crack contour model has been constructed by the metaheuristic algorithm and micro-laser line scanning.
The fourth micro-scale crack contour modeling is performed for a non-planar crack surface with high reflectivity, which is shown in Figure 13a, where the scale is represented in millimeters on the y-axis. Additionally, the high reflectivity is illustrated by the brightness produced on the surface. This brightness produces saturation intensity in the image. The saturation intensity is detected when every pixel in a region exceeds 255. To avoid high brightness, the system reduces the light fed into the CCD array. In this way, the laser line is observed without interference with the surface brightness as shown in Figure 13b. Also, the broken laser line indicates the crack region along the y-axis. Thus, the non-planar surface is scanned along the x-axis to determine the coordinates (xi,j, yi,j) by computing Equations (20) and (21). These equations provide a smooth curve from the pixel intensity, reducing noise in the laser line’s pixels and inaccuracies. This criterion is elucidated by the Bezier curve shown in Figure 2. Thus, the surface height zi,j and the surface width yi,j are determined by computing Equations (18) and (19) using the coordinates (xi,j, yi,j), respectively. Additionally, the coordinate xi,j is provided by the slider device. Thus, two hundred and forty-six images were processed of the non-planar surface shown in Figure 14a, where the x-axis and y-axis are indicated in millimeters, while the z-axis is represented in microns. The accuracy is computed by employing the surface zi,j and the surface hi,j provided by a contact method. Thus, Equation (24) is computed for the non-planar crack surface shown in Figure 15a, and the result is a relative error of Er% = 1.672%. Additionally, the coordinates of the crack surface are collected from the beginning and end of the broken laser position along the y-axis. The broken laser line is detected when the intensity sum of five adjacent pixels along the x-axis falls below 680. In the absence of the laser line, the crack contour position is obtained from the last laser position in the y-axis. Next, the maximum is computed in the following rows to find an intensity sum over 680 to determine the end position on the y-axis. Thus, a crack region is detected when there are three rows of the broken laser line along the y-axis and three broken laser lines along the x-axis. In this way, the broken line coordinates are computed during the scanning of the non-planar surface. Then, the metaheuristc algorithm generates the crack contour model through the Bezier functions. Thus, the first step calculates Equations (2)–(4) via Pr+5s = xr+5s, Pr+5s = yr+5s, Pr+5s = zr+5s to determine the initial population. If Zs(wr) exceeds zr+5s, the maximum and minimum values of wr+5s values are 1 and 0.3. If not, the maximum and minimum values of wr+5s are 1.7 and 1. Also, if Ys(vr) exceeds yr+5s, the maximum and minimum values of wr+5s are 1 and 0.3. Otherwise, the maximum and minimum are 1.7 and 1. Additionally, if Xs(ur) exceeds xr+5s, the maximum and minimum values of wr+5s are 1 and 0.3. If not, the maximum and minimum are 1.7 and 1. Then, four values ( W 1,k, W 2,k, W 3,k, W 4,k) are randomly selected within the range of the maximum and minimum to determine the initial population for every weight. Next, the second step computes Equations (11)–(16) to obtain the current children (C1,k, C2,k, C3,k, C4,k, C5,k, C6,k). Also, P1+5s = (x0+5s + x1+4s)/2, P1+5s = (y0+5s + y1+4s)/2, P1+5s = (z0+4s + z1+4s)/2, P4+5s = (x3+4s + x4+4s)/2, P4+5s = (y3+4s + y4+4s)/2, and P4+5s = (z3+4s + z4+4s)/2 are computed to provide continuity G1.
Then, the third step calculates the fitness Equation (17) employing [Xs(ur), Ys(vr), Zs(wr)] and [xr, yr, zr]. Next, the fourth step selects the (k + 1)-generation parents [ W 1,k+1, W 2,k+1, W 3,k+1, W 4,k+1] from [( W 1,k, W 2,k), (C1,k, C2,k, C3,k), ( W 3,k, W 4,k), (C4,k, C5,k, C6,k)], respectively. Then, the fifth step performs a mutation by replacing the weakest parent with a new one. Also, a new weight replaces a weight that is randomly selected. Then, Equations (11)–(16) are computed to obtain the (k + 1)-generation children. Subsequently, the process from steps two through five is repeated to obtain the optimal weights that minimize the objective function Equation (17). This procedure is performed to determine the Bezier curves [X0(u), Y0(v), Z0(w)], [X1(u), Y1(v), Z1(w)], [X2(u), Y2(v), Z2(w)], [X3(u), Y3(v), Z3(w)], …, [XM(u), YM(v), ZM(w)] that represent the crack contour model. From this crack contour model, the crack contour illustrated in Figure 14b is obtained. The accuracy obtained from the crack contour model is calculated via Equation (25), yielding a relative error of 0.9217%. Thus, the micro-scale crack contour model has been built for the non-planar crack surface using the metaheuristic algorithm.
The fifth micro-scale crack contour modeling is performed for the textured surface shown in Figure 15a, where the scale is indicated in millimeters along the x-axis. Thus, the micro-laser line is projected on the texture surface as shown in Figure 15b. This image elucidates the effectiveness of the micro-laser line width in avoiding interference with the texture surface. Figure 15b illustrates the laser line displacement on the x-axis due to the surface variation along the z-axis. The sensitivity of the laser line width is deduced based on the line shifting along the x-axis due to the surface variation along the z-axis. Thus, the minimum surface zi,j that produces the minimum line shifting (xi,j,–xc) = 1 pixel is determined based on the surface point O. In this way, Equation (18) is computed by substituting the values of the vision parameters (xc, yc, η, θ, d1, F1, d2, F2) and (xi,j,–xc) = 1 to obtain zi,j, which produces a shifting of 1 pixel along the x-axis. The values of the vision parameters substituted in Equation (18) are described in Section 2.4. By computing Equation (19), the result is a surface zi,j = 4.7 microns from the surface point O. Thus, the laser line width is allowed to determine surface variations of 4.7 microns along the z-axis. In this way, the laser line width is allowed to make displacements along the x-axis due to the micro-scale texture variation over 4.7 microns. This criterion is elucidated in the texture surface shown in Figure 15b, where the laser line is displaced along the x-axis due to the texture variation. Thus, the line displacements provide the laser line location to determine the micro-scale texture surface. Also, the broken laser line indicates the crack region along the y-axis. In this way, the texture surface is scanned along the x-axis to determine the coordinates (xi,j, yi,j) by computing Equations (20) and (21). These equations provide a smooth curve from the pixel intensity, eliminating noise in the pixels of the laser line as shown in Figure 2. During the scanning, the surface height zi,j and the surface width yi,j are calculated by computing Equations (18) and (19) employing the coordinates (xi,j, yi,j), respectively. Additionally, the slider device provides the coordinate xi,j. Thus, two hundred and ninety-two images were processed of the texture surface shown in Figure 16a, where the x-axis and y-axis are indicated in millimeters, while the z-axis is indicated in microns. The accuracy is determined by using the surface zi,j and the surface hi,j measured by a contact method. Thus, Equation (24) is calculated for the texture surface illustrated in Figure 16a, and the result is a relative error of Er% = 1.852%. Also, the crack surface coordinates are obtained during the scanning from the beginning and the end of the broken laser along the y-axis. The broken laser line is identified when the sum of the intensities of five adjacent pixels along the x-axis falls below 680. In this case, the position of the crack contour is acquired from the last laser position in the y-axis. Next, the maximum is computed in the following rows to find an intensity sum over 680 to determine the end position of the crack along the y-axis. Thus, a crack region is detected when there are three rows of the broken laser line pn the y-axis and three broken laser lines on the x-axis. In this way, the broken line coordinates are retrieved during the scanning of the texture surface. Then, the metaheuristc algorithm performs the crack contour model through the Bezier functions.
Thus, the first step computes Equations (2)–(4) via Pr+5s = xr+5s, Pr+5s = yr+5s, Pr+5s = zr+5s to obtain the initial population. If Zs(wr) is greater than zr+5s, the maximum and minimum values of wr+5s are 1 and 0.3. If not, the maximum and minimum values of wr+5s are 1.7 and 1. Also, if Ys(vr) exceeds yr+5s, the maximum and minimum values of wr+5s are 1 and 0.3. Otherwise, the maximum and minimum are 1.7 and 1. Additionally, if Xs(ur) exceeds xr+5s, the maximum and minimum values of wr+5s are 1 and 0.3. If not, the maximum and minimum are 1.7 and 1. Then, four values ( W 1,k, W 2,k, W 3,k, W 4,k) are randomly selected from the maximum and minimum to establish the initial population for every weight. Then, the second step computes Equations (11)–(16) to generate the current children (C1,k, C2,k, C3,k, C4,k, C5,k, C6,k). Also, the control points P1+5s = (x0+5s + x1+4s)/2, P1+5s = (y0+5s + y1+4s)/2, P1+5s = (z0+4s + z1+4s)/2, P4+5s = (x3+4s + x4+4s)/2, P4+5s = (y3+4s + y4+4s)/2, P4+5s = (z3+4s + z4+4s)/2 are calculated to provide continuity G1.
Then, the third step evaluates the fitness Equation (17) employing [Xs(ur), Ys(vr), Zs(wr)] and [xr, yr, zr]. Next, the fourth step chooses the (k + 1)-generation parents [ W 1,k+1, W 2,k+1, W 3,k+1, W 4,k+1] from [( W 1,k, W 2,k), (C1,k, C2,k, C3,k), ( W 3,k, W 4,k), (C4,k, C5,k, C6,k)], respectively. Then, the fifth step mutates the weakest parent with a new one. Also, a new weight replaces a weight that is randomly selected. Then, Equations (11)–(16) are computed to obtain the (k + 1)-generation children. Subsequently, the process from steps two through five is repeated to obtain the optimal weights that minimize the objective function Equation (17). This procedure is performed to determine the Bezier curves [X0(u), Y0(v), Z0(w)], [X1(u), Y1(v), Z1(w)], [X2(u), Y2(v), Z2(w)], …, [XM(u), YM(v), ZM(w)], which represent the crack contour model of the crack contour shown in Figure 16b. The accuracy obtained from the crack contour model is calculated via Equation (25), yielding a relative error of 0.945%. Thus, the micro-scale crack contour model has been built for the textured crack surface using the metaheuristic algorithm.
The capability of the metaheuristic algorithm is established based on the fitting accuracy of the crack contour model to represent the crack topography [37]. This capability includes model fitting accuracy and algorithm efficiency. To elucidate these criteria, the fitting algorithm accuracy and the number of iterations are described as follows. In this way, the error of the algorithm is determined during the iterations to construct the crack contour model. This error is determined by computing the average error of the crack contour model of the wood surface, paper surface, metallic surface, non-planar surface with a high reflectance, and texture surface. From these crack contour models, the average error in the first iteration is 2.261 microns. Then, the error decreases in the next iterations, obtaining an average error of 0.000651 in iteration 108. The behavior of the error of the metaheuristic algorithm in these crack contour models is depicted in Figure 17, where the black line represents the error of the metaheuristic algorithm during the iterations.
Also, the errors of algorithms such as particle swarm and ant colony are shown as a reference for accuracy. Based on these results, the metaheuristic algorithm provides a good fitting accuracy and efficiency. Additionally, the number of operations for one Bezier curve [Xs(ur), Ys(vr), Zs(wr)] in each iteration is established to determine the efficiency. Based on Equations (2)–(4), the number of operations to compute the expressions [Xs(ur), Ys(vr), Zs(wr)] is 153, including sums and multiplications.
The computer employed to perform the micro-scale crack contour modeling is a PC at 2.4 GHz of velocity. In this computer, 68 images are captured per second by means of the CCD camera. Also, the computer moves the slider device by means of a control software to perform the micro-laser line scanning via optical microscope. Thus, a laser line image is processed in 0.0046 s to determine the topography of a transverse section. The crack contour model for the wood surface was computed in 33.21 s. This time includes the surface scanning and the crack contour modeling. In the same way, the crack contour model for the paper surface was obtained in 31.21 s, the crack contour model for the metallic surface was determined in 33.87 s, the crack contour model for the non-planar surface of high reflectance was computed in 36.35 s, and the crack contour model for the texture surface was obtained in 37.12 s.

4. Discussion

Typically, the viability of crack modeling is established based on the accuracy in detecting and characterizing crack contour regions [38]. In this way, the contribution of the proposed metaheuristic algorithm is established based on the accuracy of the crack contour models in representing crack regions. This statement includes the accuracy of the crack contour models and crack surface detection. In these matters, the metaheuristic algorithm generates crack contour models that accurately fit a Bezier curve toward the crack topography in efficient form. The accuracy of the crack contour models is determined by means of the relative error of Equation (25), which represents the quality gap of the algorithm. In this way, the crack contour fitting is accomplished by moving the Bezier curves toward the crack topography by means of the control points (P, P, P). Thus, the metaheuristic algorithm generates crack contour models that represent crack surface contours with a relative error smaller than 1.0%. Additionally, crack surface detection through the broken micro-laser line provides high efficiency in detecting crack regions. This is because the micro-laser line is broken in a crack region. Thus, the broken laser line determines the real crack region based on the laser line coordinates. Therefore, the crack contour model accurately represents the real crack surface contour. This procedure improves the accuracy of the inspection of crack regions to determine surface quality. Additionally, the metaheuristic algorithm’s efficiency is established based on the algorithm structure and solution quality. In this case, the metaheuristic algorithm provides a suitable structure for adjusting the crack contour model to the crack topography. This is because the metaheuristic algorithm moves the Bezier functions toward the crack surface coordinates, adjusting the crack contour model. Moreover, the research space is deduced from the crack topography to optimize the weights of the crack contour model. In this way, a good fit is achieved after the first generation. Thus, a moderated number of iterations optimizes the crack contour model, where each iteration performs 153 operations to compute the expressions [Xs(ur), Ys(vr), Zs(wr)] of the crack contour model. Thus, the metaheuristic algorithm achieves a moderated running time. Moreover, the micro-laser line scanning accuracy has an influence on the accuracy of the crack contour model. This is because micro-laser line projection provides good accuracy in retrieving the real crack topography. Based on these statements, the proposed metaheuristic algorithm improves the crack contour modeling of the traditional algorithms. This is because the traditional algorithms based on image intensity distribution characterize the crack models with a relative error over 8.0% [39,40]. Additionally, algorithms of artificial intelligence have been implemented to perform characterization of crack regions [41]. These algorithms characterize crack regions through the traditional structure [42] in which the research space is not deduced from the crack topography. Instead, the metaheuristic algorithm determines the solution space from the crack topography. Therefore, the metaheuristic algorithm optimizes the crack contour model based on the crack surface coordinates, where the control points move the crack contour toward the crack topography. In this way, the structure provides a low error after the first iterations. This is one difference from the traditional algorithms, which generate the initial population in random form [43]. Also, the proposed algorithm searches inside and outside parents to find the optimal weights. This procedure avoids the elimination of potential candidates to find the optimal solution. To elucidate the contribution of the crack contour modeling, the accuracy of the traditional crack characterization methods is as follows. Typically, crack modeling and detection are performed with a relative error over 8% by means of the traditional optical microscope systems [44], where the crack surface data are determined through gray-scale microscope images. Therefore, the traditional optical microscope techniques characterize the crack regions through the image intensity distribution [45]. Therefore, these microscope imaging systems do not characterize the crack region in accurate form. This is because the intensity profile does not accurately characterize the crack topography. Instead, the micro-laser line accurately depicts the crack topography via microscope images. Therefore, the crack is always detected through the broken micro-laser line. This statement has been elucidated through the crack surface detection shown in Section 3, where the crack contour models were fitted with a relative error of 0.945%. On the other hand, the characterization and detection accuracy of the traditional algorithms is computed by the expression Accuracy = (TP + TN)/(TP + FP + TN + FN), where TP indicates the true positives, FP represents the false positives, TN depicts the true negatives, and FN represents the false negatives. For instance, crack characterization via Gaussian filtering provides a relative error over 8% for crack modeling and detection [46]. Also, crack characterization via homomorphic filtering performs crack contouring and detection with a relative error over 8% for [47]. In the same way, Laplacian–Gaussian filtering performs crack contouring and detection with a relative error over 8% [48]. Moreover, crack modeling via segmentation performs crack contouring and detection with a relative error over 8% [49]. Also, skeletonization based on segmentation performs crack contour characterization with a relative error over 8% [50]. Furthermore, frequency domain methods yield crack contouring with a relative error over 8% [51]. In this field, the Fourier transform method carries out crack modeling with an accuracy of 86% [52]. On the other hand, deep learning methods realize crack contouring with a relative error over 8% [53]. In this field, convolutional neural networks perform crack modeling with an accuracy of 90% [54]. Also, crack contour edge detection via convolutional neural networks achieve an accuracy of 92% [55]. But, residual neural networks perform crack contour modeling with a relative error over 8% [56]. Also, crack contour edge detection via YoloV8 is achieved with an error of 5% [57]. Based on these statements, it is established that the proposed metaheuristic algorithm and micro-laser projection enhance the accuracy of traditional crack characterization and detection.
Additionally, the proposed metaheuristic algorithm was examined based on traditional metaheuristic algorithms such as particle swarm and ant colony. To accomplish this, the accuracy of crack characterization and detection of traditional metaheuristic algorithms was examined. The particle swarm algorithm achieves crack characterization and detection with a relative error over 8% [58]. Moreover, ant colony optimization performs crack contouring and detection with a relative error over 8% [59]. Also, the metaheuristic algorithm structure was examined based on the particle swarm structure, which is very useful in the contour curves optimization [60]. The particle swarm method computes the velocity and position of a particle to determine the population of each generation. Thus, the expression Vi(t + 1) = wVi(t) + αR1[Pbg(t) − Pi(t)] + βR2[Pbi(t) − Pi(t)] computes the velocity of the particle, where w is an inertia weight, t is the number of iterations, (α, β) represent the learning factors, and (R1, R2) are selected in random form in the interval from 0 to 1. The position of the particle is computed by the expression Pi(t + 1) = Pi(t) + Vi(t + 1). Therefore, the particle swarm computes five parameters to create the population in each k-generation. But, these additional parameters are not related to the crack topography. Based on these statements, the metaheuristic algorithm and particle swarm structure can be examined to build crack contour models. To do this, the particle swarm can be utilized based on the contour models of the wood surface, paper surface, metallic surface, surface with high reflectance, and texture surface. Thus, the first examination involves the initial population, where the particle swarm randomly selects the range of the particles. Instead, the metaheuristic algorithm determines the range of every weight by computing Equations (2)–(4) based on the surface topography. Thus, the range of each particle is defined as [−2, 2] to compute the initial particles. But, the first step of the metaheuristic algorithm determines the range of every weight based on the initial Bezier curve and crack surface as described in Section 2.2. From this stage, the metaheuristic algorithm produces smaller errors after the first iteration. The second examination is the number of tested particles, where the particle swarm initially defines the number of particles. This procedure leads to falls in a local minimum. Instead, the metaheuristic algorithm begins with four parents, but a new parent and a new weight are tested in each new generation to avoid a local minimum. This procedure is performed by the mutation described in Section 2.2. Thus, 40 particles are defined to perform the particle swarm, and the metaheuristic algorithm tests 240 potential candidates. The third assessment is the population for the next iteration, where the particle swarm computes Vi(t + 1) and Pi(t + 1). In this case, the metaheuristic algorithm determines the children by computing Equations (11)–(16). Thus, the particle swarm computes 84 operations for six parameters, and the metaheuristic algorithm computes 36 operations. In this case, the metaheuristic algorithm provides the population of each k-generation from crack topography through the parameters (β, α). Thus, the metaheuristic algorithm implements a suitable structure to obtain the next generation. The fourth examination is the selection, where the particle swarm selects the individual and global best. But, the metaheuristic algorithm selects the best parents and children. The fifth examination is the fitness error, where the particle swarm begins with a bigger error and slowly decreases. In this case, the particle swarm establishes the number of iterations since the beginning, interrupting the procedure at bigger errors. Instead, the error of the metaheuristic algorithm begins with a smaller error and decreases in moderated form. The error of the particle swarm is depicted in Figure 17 by the red line. Also, the error of the metaheuristic algorithm in every generation is depicted in Figure 17 by the black line.
Also, the metaheuristic algorithm can be examined based on the ant colony optimization regarding fitting accuracy and structure efficiency. In this case, the fitting accuracy of the ant colony is over 3% and computes more variables than the metaheuristic algorithm to determine crack contour models. Thus, the metaheuristic algorithm elucidates the viability to construct crack contour models with a relative error smaller than 1%. To corroborate these statements, the metaheuristic algorithm can be compared to the ant colony optimization of the crack contour models [Xs(ur), Ys(vr), Zs(wr)], where the contour curves include wood surface, paper surface, metallic surface, surface with high reflectance, and texture surface. In this way, the ant colony structure is compared to the metaheuristic algorithm as follows. Thus, the first examination is the initial population, where the ant colony defines the range of the ants as a discrete set. Thus, the number of ants is six with a range of [0, 3], and their discrete values have the same probability. Instead, the metaheuristic algorithm determines the range of every weight by computing Equations (2)–(4) based on the surface topography. From this stage, the metaheuristic produces a smaller error in the first iteration. Also, the efficiency is elucidated by the search space, which provides the population near the optimal solution. This procedure reduces the number of iterations to construct the crack contour model. The second examination is the number of tested ants, where the ant colony initially defines the number of ants. This procedure leads to fall in a local minimum. Instead, the metaheuristic algorithm tests a new parent and a new weight in each generation through the mutation to avoid a local minimum. The third assessment is the population for the next iteration, where the ant colony computes the pheromone evaporation τnew = (1-evaporation rate)τold, the pheromone deposit (Deposit/Objective function), and a probability function Pi = τi./Σ τj. In this case, the metaheuristic algorithm determines the children by computing Equations (11)–(16). Thus, the ant colony computes 54 operations for six parameters, and the metaheuristic algorithm computes 36 operations. The fourth examination is the selection, where the ant colony selects the higher probability. But, the metaheuristic selects the best parents and children. The fifth evaluation is the fitness error, where the ant colony begins with a bigger error and decreases slowly. Instead, the error of the metaheuristic algorithm begins with smaller error and decreases in moderated form. The error of the ant colony is shown in Figure 17 by the green line.
Additionally, the metaheuristic algorithm is examined based on the simpler cubic B-splines. To do this, the B-splines generate the crack contour curves of the wood surface, paper surface, metallic surface, surface with high reflectance, and texture surface. Thus, the B-splines generate the contour curve through the expression C(t) = ΣPiNi,3(t), where Pi contains the three-dimensional coordinates, Ni,3 (t) are basis functions, and t is a point on the curve. In this way, the basis functions are computed by the expression Ni,3(t) = (tui)(Ni,3-1(t))/(ui+3ui) + (ui+3+1t)(Ni+1,3-1(t))/(ui+3+1ui+1) [61]. Thus, the three-dimensional B-spline curve is computed by Cx(t) = ΣxiNi,3 (t), Cy(t) = ΣyiNi,3 (t), and Cx(t) = ΣziNi,3 (t). The accuracy provided by the B-splines method is a relative error of 2.84%. Instead, the metaheuristic algorithm generates crack contour models, which represent crack surface contours with a relative error smaller than 1.0%.
Moreover, the metaheuristic algorithm is examined based on the least squares optimization as shown in Figure 2. To carry this out, the least squares method computes the weights of the crack contour curves [Xs(ur), Ys(vr), Zs(wr)] of the wood surface, paper surface, metallic surface, surface with high reflectance, and texture surface. Thus, the least squares method computes the weights by minimizing the error between the crack coordinates and the Bezier functions, where the error is defined by the expressions ex = Σ[xi − xs(ui)]2, ey = Σ[yiys(vi)]2, ez = Σ[zi − zs(wi)]2. From these errors, the derivatives ∂ex/∂wi = 0, ∂ey/∂wi = 0, ∂ez/∂wi = 0 are computed to minimize the error. Expanding the summations of these derivatives, an equation system is obtained for each derivative, where each element of the equation system is a summation. Then, the systems of equations are solved to obtain the weights [wi, wi, wi]. Thus, least squares method computes the crack contour curves with a relative error of 3.167%, which is bigger than error of the metaheuristic algorithm. Additionally, the leas squares method performs more operations than the metaheuristic algorithm. This is because the systems of equations are deduced by summations.
Furthermore, the clothoids structure performs more operations than the Bezier curves through the cosine and sine functions. This is because the sine and cosine are determined by a summation of multiplications and divisions. Also, the curvature should be optimized to reduce the fitting error. But, the procedure to compute the curvature is performed by a great number of operations. Therefore, Bezier curves have been employed to optimize clothoids [62].
Additionally, the method based on peak–valley fails because the intensity profile does not provide the real surface topography. This criterion is elucidated by the surface of high reflectivity shown in Figure 13a, where the pick intensity is not located in the peak surface. Instead, the laser line projection depicts the real surface profile as shown in Figure 13b.
From these statements, the contribution of the crack contour modeling via the metaheuristic algorithm and micro-laser lane projection has been validated. Moreover, the simple setup increases the capability of the metaheuristic algorithm to perform crack contour modeling for surface quality inspection. This is because the arrangement includes only simple components such as a laser diode, CCD camera, slider device, and a computer. In this way, the proposed surface technique provides a contribution in the field of crack modeling and detection.

5. Conclusions

A technique to perform crack contour modeling by means of a metaheuristic algorithm and micro-laser line has been presented herein. The metaheuristic algorithm enhances crack contour modeling through the broken micro-laser line, which retrieves the crack topography. Thus, the crack contour model determines the crack region with great accuracy through the broken micro-laser line. This contribution is corroborated through the fitting accuracy and efficiency in optimizing the Bezier basis functions. The fitting accuracy contribution is achieved through the algorithm structure, which moves the Bezier curves toward the crack topography. This statement is validated by the results achieved in the crack contour modeling shown in Section 3, where the crack contour modeling provides a fitting accuracy of a relative error smaller than 1%. Also, the contour fitting accuracy includes the laser line scanning, which detects the crack region with great accuracy through the broken micro-laser line. Moreover, the algorithm’s efficiency is elucidated through the structure, which computes the control points through the crack surface in moderated time. Thus, the metaheuristic algorithm provides a valuable tool for performing crack contour modeling in the field of crack characterization and detection for surface quality inspection. In this way, the metaheuristic algorithm optimization via Bezier functions and laser line scanning has been performed to construct crack contour models in a good manner. In addition, the simple optical microscope system is available at a suitable cost to corroborate the capability of the crack contour modeling and detection. Thus, crack contour modeling can be carried out to good effect by employing a metaheuristic algorithm and micro-laser line scanning.

Funding

This research received no external funding.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

All data supporting the findings are accessible by requesting a link or by e-mail to be added upon acceptance.

Acknowledgments

The authors also thank the SECIHTI and CIO for accepting this research area.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Fang, X.-Y.; Gong, J.-E.; Huang, W.; Wu, J.-H.; Ding, J.-J. Novel characterizations of effective SIFs and fatigue crack propagation rate of welded rail steel using DIC. Metals 2023, 13, 227. [Google Scholar] [CrossRef]
  2. Wu, J.; Xu, S.; Li, A.; Wang, B.; Wang, Y. Prediction model of fatigue crack propagation life of corroded steel plate considering pit characteristics. Int. J. Fatigue 2025, 190, 108591. [Google Scholar] [CrossRef]
  3. López-Uruñuela, F.J.; Wang, L.; Fernández, B.; Aguirrebeitia, J.; Pinedo, B. A study on the three key concepts of white etching crack failure mode in its very early stages—Contrast with different testing methods. Wear 2023, 530–531, 205044. [Google Scholar] [CrossRef]
  4. Wang, G.; Tan, F.; Jin, S.; Pan, L.; He, Z.; Wang, X.; Li, Y.; Li, J. Image-processing-based automatic crack detection and classification for refractory evaluation. Ceram. Int. 2022, 48, 23232–23240. [Google Scholar] [CrossRef]
  5. Lan, Y.; Huang, S.; Wang, Z.; Pan, Y.; Zhao, Y.; Sun, J. Width calculation of tiny bridge cracks based on unmanned aerial vehicle images. Recent Adv. Comput. Sci. Commun. 2024, 17, 52–60. [Google Scholar] [CrossRef]
  6. Fang, H.; He, N. Detection method of cracks in expressway asphalt pavement based on digital image processing technology. Appl. Sci. 2023, 13, 12270. [Google Scholar] [CrossRef]
  7. Li, Z.; Yin, C.; Zhang, X. Crack segmentation extraction and parameter calculation of asphalt pavement based on image processing. Sensors 2023, 23, 9161. [Google Scholar] [CrossRef]
  8. Li, Z.; Miao, Y.; Torbaghan, M.E.; Zhang, H.; Zhang, J. Semi-automatic crack width measurement using an orthoboundary algorithm. Autom. Constr. 2024, 158, 105251. [Google Scholar] [CrossRef]
  9. Chu, H.; Yu, D.; Chen, W.; Ma, J.; Deng, L. A rendering-based lightweight network for segmentation of high-resolution crack images. Comput. Aided Civ. Struct. Eng. 2025, 40, 323–347. [Google Scholar]
  10. Wang, J.W.; Yu, P.F.; Luo, H.B.; Yu, P.L. A linear crack length measurement method for railway bridges based on calibration points fitting. J. Meas. Sci. Instrum. 2020, 11, 118. [Google Scholar]
  11. Jin, S.; Lee, S.E.; Hong, J.W. A vision-based approach for autonomous crack width measurement with flexible kernel. Autom. Constr. 2020, 110, 103019. [Google Scholar] [CrossRef]
  12. Sylovanyuk, V.P.; Ivantyshyn, N.A.; Didukh, A.I. Stressed-strain and limiting states of a prestressed body with a healed crack. Mater Sci. 2024, 60, 265–272. [Google Scholar] [CrossRef]
  13. Livieri, P.; Segala, F. Fatigue crack propagation of planar three-dimensional cracks. Int. J. Fatigue 2022, 163, 107062. [Google Scholar] [CrossRef]
  14. Al-hababi, T.; Cao, M.; Alkayem, N.F.; Shi, B.; Wei, Q.; Cui, L.; Sumarac, D.; Ragulskis, M. The dual Fourier transform spectra (DFTS): A new nonlinear damage indicator or identification of breathing cracks in beam-like structures. Nonlinear Dyn. 2022, 110, 2611–2633. [Google Scholar] [CrossRef]
  15. Wang, R.; Zhou, X.; Liu, Y.; Liu, D.; Lu, Y.; Su, M. Identification of the surface cracks of concrete based on ResNet-18 depth residual network. Appl. Sci. 2024, 14, 3142. [Google Scholar] [CrossRef]
  16. Kumar Li, Y.; Bao, T.; Xu, B.; Shu, X.; Zhou, Y.; Du, Y.; Wang, R.; Zhang, K. A deep residual neural network framework with transfer learning for concrete dams patch-level crack classification and weakly-supervised localization. Measurement 2022, 188, 110641. [Google Scholar]
  17. Ali, R.; Chuah, J.H.; Talip, M.S.A.; Mokhtar, N.; Shoaib, M.A. Structural crack detection using deep convolutional neural networks. Autom. Constr. 2022, 133, 103989. [Google Scholar] [CrossRef]
  18. Yuan, Y.; Ge, Z.; Su, X.; Guo, X.; Suo, T.; Liu, Y.; Yu, Q. Crack length measurement using convolutional neural networks and image processing. Sensors 2021, 21, 5894. [Google Scholar] [CrossRef]
  19. Ding, J.; Jiao, P.; Li, K.; Du, W. Road surface crack detection based on improved YOLOv5s. Math. Biosci. Eng. 2024, 21, 4269–4285. [Google Scholar] [CrossRef] [PubMed]
  20. Wu, Z.; Zhong, D.; Li, Z.; Wang, L.; Bi, L. Orebody modeling method based on the normal estimation of cross-contour polylines. Mathematics 2022, 10, 473. [Google Scholar] [CrossRef]
  21. Hoek, R.V.; Ploeg, J.; Nijmeijer, H. Cooperative driving of automated vehicles using B-splines for trajectory planning. IEEE Trans. Intell. Veh. 2021, 6, 594–604. [Google Scholar] [CrossRef]
  22. Zeng, W.; Xiong, T.; Wang, C. Optimization of smooth trajectories for two-wheel differential robots under kinematic constraints using Clothoid Curves. Sensors 2025, 25, 3143. [Google Scholar] [CrossRef]
  23. Goran, A.M.; Ming, H. Optimization of active muscle force–length models using least squares curve fitting. IEEE Trans. Biomed. Eng. 2016, 63, 630–635. [Google Scholar]
  24. Hongxun, S.; Weixing, W.; Fengping, W.; Linchun, W.; Zhiwei, W. Pavement crack detection by ridge detection on fractional calculus and dual-thresholds. Int. J. Multimed. Ubiquitous Eng. 2015, 10, 19–30. [Google Scholar]
  25. Luan, C.; Guan, X.; He, J. Time-dependent sensitivity of structural reliability assessment to multi-source uncertainties using lamb wave. ASME J. Nondestruct. Eval. 2023, 6, 011004. [Google Scholar] [CrossRef]
  26. Aronov, B.; Asano, T.; Katoh, N.; Mehlhorn, K.; Tokuyama, T. Polyline fitting of planar points under min-sum criteria. Int. J. Comput. Geom. Appl. 2006, 16, 97–116. [Google Scholar] [CrossRef]
  27. Chen, Y.; Cai, Y.; Zheng, J.; Thalmann, D. Accurate and efficient approximation of clothoids using Bezier curves for path planning. IEEE Trans. Robot. 2017, 33, 1242–1247. [Google Scholar] [CrossRef]
  28. Park, H. An error-bounded approximate method for representing planar curves in B-splines. Comput. Aided Geom. Des. 2004, 21, 479–497. [Google Scholar] [CrossRef]
  29. Horst, E. A least squares method for estimation of Bezier curves and surfaces and its applicability to multivariate analysis. Math. Biosci. 1986, 79, 155–170. [Google Scholar] [CrossRef]
  30. Hasan, M.S.; Alam, M.N.; Fayz-Al-Asad, M.; Muhammad, N.; Tunç, C. B-spline curve theory: An overview and applications in real life. Nonlinear Eng. 2024, 13, 20240054. [Google Scholar] [CrossRef]
  31. 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] [CrossRef]
  32. Kurdistan Wns, A.; Shahab Wahhab, K.; Shavan Kamal, A.; Roojwan, S.H.; Farah Sami, K. Metaheuristic algorithms in optimization and its application: A review. J. Adv. Res. Electr. Eng. 2022, 6, 7–12. [Google Scholar]
  33. Razavi, F.; Abyaneh, H.A.; Al-Dabbagh, M.; Mohammadi, R.; Torkaman, H. A new comprehensive genetic algorithm method for optimal overcurrent relays coordination. Electr. Power Syst. Res. 2008, 78, 713–720. [Google Scholar] [CrossRef]
  34. 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] [CrossRef]
  35. Muñoz-Rodríguez, J.A. Laser imaging and approximation networks for calibration of three-dimensional vision. Opt. Laser Technol. 2011, 43, 491–500. [Google Scholar] [CrossRef]
  36. 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]
  37. Landström, A.; Thurley, M.J. Morphology-based crack detection for steel slabs. IEEE J. Sel. Top. Signal Process. 2012, 6, 866–875. [Google Scholar] [CrossRef]
  38. Hao, C.; He, Y.; Li, Y.; Niu, X.; Wang, Y. An image-based hairline crack identification method for metal parts. IEEE Trans. Instrum. Meas. 2023, 72, 200114. [Google Scholar] [CrossRef]
  39. Chen, H.; Zhang, Z.; Yin, W.; Zhou, G.; Wang, L.; Li, Y.; Zhao, C.; Wang, C. Shape characterization and depth recognition of metal cracks based on laser infrared thermography and machine learning. Expert Syst. Appl. 2024, 238, 122083. [Google Scholar] [CrossRef]
  40. Cung, L.T.; Dao, T.D.; Nguyen, P.C.; Bui, T.D. A model-based approach for estimation of the crack depth on a massive metal structure. Meas. Control 2018, 51, 182–191. [Google Scholar] [CrossRef]
  41. Müller, A.; Karathanasopoulos, N.; Roth, C.C.; Mohr, D. Machine learning classifiers for surface crack detection in fracture experiments. Int. J. Mech. Sci. 2021, 209, 106698. [Google Scholar] [CrossRef]
  42. Konda, N.; Verma, R.; Jayaganthan, R. Machine learning based predictions of fatigue crack growth rate of additively manufactured Ti6Al4V. Metals 2022, 12, 50. [Google Scholar] [CrossRef]
  43. Aparecida de Melo, S.; Dutra Pereira, R.B.; Fortes da Silva Reis, A.; Lauro, C.H.; Cardoso Brandão, L. Multi-objective evolutionary optimization of unsupervised latent variables of turning process. Appl. Soft Comput. 2022, 120, 108713. [Google Scholar] [CrossRef]
  44. Jiping, Z. A critical review of crack detection based on image processing. J. Comput. Nat. Sci. 2023, 3, 204–215. [Google Scholar] [CrossRef]
  45. Zumaquero, P.L.; Correa, E.; Justo, J.; París, F. Microscopical observations of interface cracks from inter-fibre failure under compression in composite laminates. Compos. Part A Appl. Sci. Manuf. 2018, 110, 76–83. [Google Scholar] [CrossRef]
  46. Azouz, Z.; Honarvar Shakibaei Asli, B.; Khan, M. Evolution of crack analysis in structures using image processing technique: A review. Electronics 2023, 12, 3862. [Google Scholar] [CrossRef]
  47. Dai, C.; Jiang, K.; Wang, Q. Recognition of tunnel lining cracks based on digital image processing. Math. Probl. Eng. 2020, 2020, 5162583. [Google Scholar] [CrossRef]
  48. Guanjun, B.; Mimi, J.; Yi, X.; Shibo, C.; Qinghua, Y. Cracked egg recognition based on machine vision. Comput. Electron. Agric. 2019, 158, 159–166. [Google Scholar] [CrossRef]
  49. Zhang, Z.; Shen, Z.; Liu, J.; Shu, J.; Zhang, H. A binocular vision-based crack detection and measurement method incorporating semantic segmentation. Sensors 2024, 24, 3. [Google Scholar] [CrossRef]
  50. Feng, Y.; Zhang, X.L.; Feng, S.J.; Zhang, W.; Hu, K.; Da, Y.W. Intelligent segmentation and quantification of tunnel lining cracks via computer vision. Struct. Health Monit. 2024, 24, 1896–1926. [Google Scholar] [CrossRef]
  51. Wang, C.; Kong, Y.; Wang, W.; Chen, Z.; Chen, J.; Zhu, W.; Ju, B.F. Finite element analysis of laser-generated Rayleigh wave for sizing subsurface crack in frequency domain. Optik 2022, 260, 169145. [Google Scholar] [CrossRef]
  52. Liu, Y.; Yuan, G.; Li, J.; Hu, S. FSDGNet: Frequency and spatial dual guide network for crack detection. J. Electron. Imag. 2024, 33, 013027. [Google Scholar]
  53. Huang, H.; Zhao, S.; Zhang, D.; Chen, J. Deep learning-based instance segmentation of cracks from shield tunnel lining images. Struct. Infrastruct. Eng. 2020, 18, 183–196. [Google Scholar] [CrossRef]
  54. Elghaish, F.; Talebi, S.; Abdellatef, E.; Matarneh, S.T.; Hosseini, M.R.; Wu, S.; Mayouf, M.; Hajirasouli, A.; Nguyen, T.Q. Developing a new deep learning CNN model to detect and classify highway cracks. J. Eng. Des. Technol. 2022, 20, 993–1014. [Google Scholar] [CrossRef]
  55. Nhat-Duc, H.; Nguyen, Q.L.; Tran, V.D. Automatic recognition of asphalt pavement cracks using metaheuristic optimized edge detection algorithms and convolution neural network. Autom. Constr. 2018, 94, 203–213. [Google Scholar] [CrossRef]
  56. Jing, P.; Yu, H.; Hua, Z.; Xie, S.; Song, C. Road crack detection using deep neural network based on attention mechanism and residual structure. IEEE Access 2023, 11, 919–929. [Google Scholar] [CrossRef]
  57. Du, K.; Dai, Y. RADNet: Adaptive spatial-dilation learning for efficient road crack detection. IEEE Access 2025, 13, 57767–57779. [Google Scholar] [CrossRef]
  58. Yang, J.; Chen, B.; Wang, Y.; Wang, C. Crack detection in carbide anvil using acoustic signal and deep learning with particle swarm optimization. Measurement 2021, 173, 108668. [Google Scholar]
  59. Zhang, W.; Wu, T.; Li, Z.; Li, Y.; Qiu, A.; Shi, Y. Automatic detection of fractures based on optimal path search in well logging images. J. Sens. 2021, 2021, 5577084. [Google Scholar]
  60. Li, J.; He, P.; Li, H.; Li, S.; Xu, L.; He, K. Multi-objective cutting parameter optimization method for the energy consumption and machining quality of computerized numerical control lathes. Appl. Sci. 2024, 14, 905. [Google Scholar] [CrossRef]
  61. Elbanhawi, M.; Simic, M.; Jazar, R.N. Continuous path smoothing for car-like robots using B-Spline Curves. J. Intell. Robot. Syst. 2015, 80, 23–56. [Google Scholar] [CrossRef]
  62. Faroukia, R.T.; Pelosib, F.; Sampolic, M.L. Approximation of monotone clothoid segments by degree 7 Pythagorean–hodograph curves. J. Comput. Appl. Math. 2021, 382, 113110. [Google Scholar] [CrossRef]
Figure 1. (a) Surface points to construct a crack contour model. (b) Crack contour generated by means of the Bezier curves in Equations (2)–(4).
Figure 1. (a) Surface points to construct a crack contour model. (b) Crack contour generated by means of the Bezier curves in Equations (2)–(4).
Biomimetics 11 00102 g001
Figure 2. Cubic B-spline curve fitted from the surface points and Bezier curve generated via least squares.
Figure 2. Cubic B-spline curve fitted from the surface points and Bezier curve generated via least squares.
Biomimetics 11 00102 g002
Figure 3. Flowchart of the metaheuristic algorithm to compute the control points of the crack contour model.
Figure 3. Flowchart of the metaheuristic algorithm to compute the control points of the crack contour model.
Biomimetics 11 00102 g003
Figure 4. (a) Microscope vision system to retrieve micro-scale crack contour. (b) Micro-laser line projected on a crack surface.
Figure 4. (a) Microscope vision system to retrieve micro-scale crack contour. (b) Micro-laser line projected on a crack surface.
Biomimetics 11 00102 g004
Figure 5. (a) Lateral geometry of the microscope system in x-axis. (b) Geometry of the microscope system in y-axis.
Figure 5. (a) Lateral geometry of the microscope system in x-axis. (b) Geometry of the microscope system in y-axis.
Biomimetics 11 00102 g005
Figure 6. Line pattern with known dimensions to compute microscope parameters.
Figure 6. Line pattern with known dimensions to compute microscope parameters.
Biomimetics 11 00102 g006
Figure 7. (a) Wood surface for performing crack contour modeling with scale in mm along the x-axis. (b) Micro-laser line projected on the wood surface to retrieve the crack region.
Figure 7. (a) Wood surface for performing crack contour modeling with scale in mm along the x-axis. (b) Micro-laser line projected on the wood surface to retrieve the crack region.
Biomimetics 11 00102 g007
Figure 8. (a) Micro-scale wood surface recovered via micro-laser line scanning. (b) Crack contour constructed via crack contour model based on Bezier functions.
Figure 8. (a) Micro-scale wood surface recovered via micro-laser line scanning. (b) Crack contour constructed via crack contour model based on Bezier functions.
Biomimetics 11 00102 g008
Figure 9. (a) Paper surface for performing crack contour modeling with scale in mm along the y-axis. (b) Micro-laser line projected on the paper surface to retrieve the crack region.
Figure 9. (a) Paper surface for performing crack contour modeling with scale in mm along the y-axis. (b) Micro-laser line projected on the paper surface to retrieve the crack region.
Biomimetics 11 00102 g009
Figure 10. (a) Micro-scale paper surface recovered via micro-laser line scanning. (b) Crack contour constructed via crack contour modeling based on Bezier basis function.
Figure 10. (a) Micro-scale paper surface recovered via micro-laser line scanning. (b) Crack contour constructed via crack contour modeling based on Bezier basis function.
Biomimetics 11 00102 g010
Figure 11. (a) Metallic surface for performing crack contour modeling with scale in mm on x-axis. (b) Micro-laser line projected on the metallic surface to retrieve the crack region.
Figure 11. (a) Metallic surface for performing crack contour modeling with scale in mm on x-axis. (b) Micro-laser line projected on the metallic surface to retrieve the crack region.
Biomimetics 11 00102 g011
Figure 12. (a) Micro-scale metallic surface recovered via micro-laser line scanning. (b) Crack contour constructed via crack contour modeling.
Figure 12. (a) Micro-scale metallic surface recovered via micro-laser line scanning. (b) Crack contour constructed via crack contour modeling.
Biomimetics 11 00102 g012
Figure 13. (a) Non-planar surface with high reflectivity for performing crack contour modeling with scale in mm on the y-axis. (b) Micro-laser line projected on the non-planar surface to retrieve the crack region.
Figure 13. (a) Non-planar surface with high reflectivity for performing crack contour modeling with scale in mm on the y-axis. (b) Micro-laser line projected on the non-planar surface to retrieve the crack region.
Biomimetics 11 00102 g013
Figure 14. (a) Micro-scale non-planar surface recovered via micro-laser line scanning. (b) Crack contour constructed via crack contour model based on Bezier functions.
Figure 14. (a) Micro-scale non-planar surface recovered via micro-laser line scanning. (b) Crack contour constructed via crack contour model based on Bezier functions.
Biomimetics 11 00102 g014
Figure 15. (a) Texture surface for performing crack contour modeling with scale in mm on x-axis. (b) Micro-laser line projected on the texture surface to retrieve crack surface.
Figure 15. (a) Texture surface for performing crack contour modeling with scale in mm on x-axis. (b) Micro-laser line projected on the texture surface to retrieve crack surface.
Biomimetics 11 00102 g015
Figure 16. (a) Micro-scale texture surface recovered via micro-laser line scanning. (b) Crack contour constructed via crack contour modeling based on Bezier basis function.
Figure 16. (a) Micro-scale texture surface recovered via micro-laser line scanning. (b) Crack contour constructed via crack contour modeling based on Bezier basis function.
Biomimetics 11 00102 g016
Figure 17. Evolution of the error of metaheuristic algorithm based on the number of iterations.
Figure 17. Evolution of the error of metaheuristic algorithm based on the number of iterations.
Biomimetics 11 00102 g017
Table 1. Contour control points generated via metaheuristic algorithm for the first generation.
Table 1. Contour control points generated via metaheuristic algorithm for the first generation.
Control PointW1,1W2,1W3,1W4,1C1,1C2,1C3,1C4,1C5,1C6,1
P28.65319.242812.14858.93349.41438.96268.624010.713810.849112.2839
P26.27545.52095.47685.65105.87955.91685.48365.55965.56825.6596
P26.31038.27246.64828.05167.24287.33996.21327.31527.38468.1211
P37.52458.11227.75429.84227.80387.83297.49548.74668.84999.9456
P35.68605.86925.78065.01255.77315.78215.67695.37765.41565.8186
P38.16527.50737.03065.79577.82007.85257.47486.38266.44377.0918
Fitness2.37142.53242.13132.69182.44752.44272.50982.40622.39492.3088
Table 2. Contour control points generated via metaheuristic algorithm for the second generation.
Table 2. Contour control points generated via metaheuristic algorithm for the second generation.
Control PointW1,2W3,2W2,2W4,2C1,2C2,2C3,2C4,12C5,2C6,2n = 103
P28.653110.694612.148512.28398.93428.96178.625610.717710.845212.276112.8107
P26.27545.38505.47685.65965.88065.91585.48575.55985.56805.65915.3214
P27.52456.87616.64828.12117.24567.33716.21887.31727.38268.11708.4953
P35.75328.01247.75429.94567.80477.83217.49718.74968.84699.939611.9875
P38.16525.70045.78065.81865.77335.78195.67745.37875.41455.81644.9751
P36.31036.39317.03067.09187.82097.85167.47666.38446.44207.08828.4786
Fitness2.36922.35922.13132.30882.44742.44292.50942.40592.39522.30910.0002
Table 3. Microscope vision parameters and variables of the crack contour modeling.
Table 3. Microscope vision parameters and variables of the crack contour modeling.
VariableUnitsValueUncertaintyVariable with Uncertainty
xcPixels395.9613±0.004310395.9613 ± 0.00431
ycPixels373.3625±0.005130373.3625 ± 0.00513
ηMillimeter/pixels0.0022±0.0001220.0022 ± 0.000122
θDeg22.4316±0.00226022.4316 ± 0.002260
d1Millimeters62.3621±0.00162562.3621 ± 0.001625
F1Millimeters30.6889±0.00123230.6889 ± 0.001232
d2Millimeters60.2534±0.00117660.2534 ± 0.001176
F2Millimeters27.4037±0.00108327.4037 ± 0.001083
zi,jMillimeters
yi,jMillimeters
xi,jMillimeters
xi,jPixels
yi,jPixels
Xs(u)Millimeters
Ys(u)Millimeters
Zs(u)Millimeters
wr+5sNon-dimensional
wr+5sNon-dimensional
wr+5sNon-dimensional
Pr+5sMicrons
Pr+5sMicrons
Pr+5sMicrons
xi,jPixels
Ii,jGray level
x(u)Pixels
I(u)Gray level
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

Muñoz Rodríguez, J.A. Crack Contour Modeling Based on a Metaheuristic Algorithm and Micro-Laser Line Projection. Biomimetics 2026, 11, 102. https://doi.org/10.3390/biomimetics11020102

AMA Style

Muñoz Rodríguez JA. Crack Contour Modeling Based on a Metaheuristic Algorithm and Micro-Laser Line Projection. Biomimetics. 2026; 11(2):102. https://doi.org/10.3390/biomimetics11020102

Chicago/Turabian Style

Muñoz Rodríguez, J. Apolinar. 2026. "Crack Contour Modeling Based on a Metaheuristic Algorithm and Micro-Laser Line Projection" Biomimetics 11, no. 2: 102. https://doi.org/10.3390/biomimetics11020102

APA Style

Muñoz Rodríguez, J. A. (2026). Crack Contour Modeling Based on a Metaheuristic Algorithm and Micro-Laser Line Projection. Biomimetics, 11(2), 102. https://doi.org/10.3390/biomimetics11020102

Article Metrics

Article metric data becomes available approximately 24 hours after publication online.
Back to TopTop