Next Article in Journal
Improving Cost Contingency Estimation in Infrastructure Projects with Artificial Neural Networks and a Complexity Index
Previous Article in Journal
Electricity Losses in Focus: Detection and Reduction Strategies—State of the Art
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Entropy-Driven Adaptive Neighborhood Selection and Fitting for Sub-Millimeter Defect Detection and Quantitative Evaluation in Magnetic Tiles

1
School of Automation and Information Engineering, Sichuan University of Science and Engineering, Zigong 643000, China
2
Artificial Intelligence Key Laboratory of Sichuan Province, Zigong 643000, China
*
Author to whom correspondence should be addressed.
Appl. Sci. 2025, 15(7), 3518; https://doi.org/10.3390/app15073518
Submission received: 22 February 2025 / Revised: 21 March 2025 / Accepted: 21 March 2025 / Published: 23 March 2025

Abstract

:
Surface defects in magnetic tiles pose significant challenges to the performance and reliability of permanent magnet motors. Traditional defect detection methods, including visual inspection and 2D imaging, are limited by subjectivity, resolution constraints, and a lack of depth information, making precise defect quantification challenging. To address this challenge, this study explores a defect detection and quantitative evaluation framework based on high-resolution 3D laser scanning technology. Our approach integrates point cloud acquisition with luminance and point cloud mapping (LPM) to enhance defect visualization. Furthermore, we introduce an adaptive neighborhood selection method based on information entropy, enabling accurate normal vector and curvature estimation while reducing reliance on manual parameter tuning. Even when the point cloud density decreases to 40%, the mean estimation error and root-mean-square error remain within 3°. By leveraging single-frame and multi-frame point cloud fitting, our method transitions from coarse defect extraction to fine refinement, enhancing detection precision. To further improve accuracy and minimize false negatives, we apply region-growing techniques for defect region completion. Experimental results indicate that our method can reliably detect surface defects as small as 0.07 mm2, achieving an average precision of 93.91%, a recall of 95.97%, and an F1 of 94.91%. Compared to conventional 2D image-based methods, our method offers superior defect quantification, lower computational costs, and minimal hardware requirements, making it highly suitable for real-time online defect detection in industrial applications.

1. Introduction

1.1. Problem Statement

Magnetic tiles, as essential components of permanent magnet motors, play a pivotal role in generating stable magnetic fields [1]. However, their surfaces are susceptible to various defects, including cracks, dents, scratches, and microscopic irregularities [2]. These defects can arise from manufacturing imperfections, mechanical stress, thermal expansion, or prolonged wear and aging. If left undetected, they may lead to non-uniform magnetic fields, increased vibration and noise, localized overheating, and ultimately, motor performance degradation or failure [3]. Therefore, the development of automated defect detection algorithms is crucial. Such algorithms enable precise and timely identification of surface anomalies, facilitating early intervention to prevent irreversible damage. Moreover, they contribute to sustainability and circular economy practices by extending product lifespans and minimizing material waste, while also improving the reliability and efficiency of permanent magnet motors.
Traditional defect detection techniques, including visual inspection, ultrasonic testing [4], eddy current testing [5], magnetic particle testing [6], and penetrant testing [7], have been widely employed but exhibit inherent limitations. Visual inspection is highly subjective, relies on human expertise, and is prone to inconsistencies. Ultrasonic testing, while effective for detecting subsurface defects, may lack the resolution required for identifying minute surface irregularities. Eddy current testing, limited to conductive materials, struggles with complex surface geometries and is less effective for detecting non-metallic inclusions or fine cracks. Magnetic particle testing, commonly used for ferromagnetic materials, requires surface preparation and is ineffective for non-magnetic regions or defects that do not significantly disrupt the local magnetic field. Similarly, penetrant testing, which relies on liquid dyes seeping into surface-breaking defects, is limited to identifying open cracks and cannot detect subsurface flaws. Furthermore, these methods often require extensive preprocessing and post-processing, making them time-consuming and labor-intensive.
With advancements in non-destructive testing (NDT) techniques [8], vision-based surface topography measurement has gained significant attention due to its ease of implementation and cost-effectiveness. This approach utilizes digital cameras to capture surface images and applies image processing techniques to detect and assess defects. While it offers advantages such as ease of implementation and cost-effective hardware, it also presents significant challenges [9]. Image-based methods are highly sensitive to external factors such as lighting conditions, viewing angles, and surface reflectivity, which can compromise detection accuracy. More critically, conventional 2D imaging is inherently limited in its ability to capture complex three-dimensional surface structures. As a result, it struggles to detect microscopic defects that lack significant texture or contrast variations, making them virtually imperceptible to the human eye. These tiny defects, although visually subtle, can have profound implications for product quality, performance, and safety [10]. Furthermore, 2D imaging lacks depth information, making it difficult to quantitatively assess defect size, depth, and volume—key parameters for evaluating structural integrity and predicting failure risks.
To overcome these limitations, 3D point cloud data present a compelling alternative. High-resolution 3D laser scanning technology enables the precise acquisition of geometric and topological information, facilitating the accurate localization and quantification of defects on the magnetic tile surface [11]. Unlike traditional image-based methods, point cloud data capture complete three-dimensional spatial information, allowing for a detailed analysis of defect depth, volume, and curvature variations. This capability is particularly advantageous for detecting microscopic surface anomalies that may go unnoticed in 2D images. Additionally, a point cloud analysis is inherently less affected by variations in lighting conditions and surface reflectivity, ensuring greater robustness across different environments. By leveraging advanced point cloud processing techniques, such as curvature-based feature extraction, clustering, and deep learning models optimized for 3D data, a more comprehensive and precise assessment of magnetic tile defects can be achieved [12]. This shift from conventional image-based approaches to 3D point cloud analysis not only enhances defect detection accuracy but also enables a quantitative evaluation, providing critical insights into defect severity and its potential impact on motor performance.

1.2. Related Work

1.2.1. Methods Based on 2D Images

Traditional methods for surface defect detection on magnetic tiles, particularly those based on 2D images, have evolved considerably. Yang et al. [13] utilized a wavelet transform to detect low-contrast defects under varying lighting conditions, while Xie et al. [14] employed a discrete shearlet transform to enhance contrast between defective and normal regions, followed by a two-step defect extraction strategy. Li et al. [15] applied Gabor functions to represent surface textures and refined the Gabor energy spectrum for fuzzy C-means clustering, enabling defect identification based on regional grayscale variations. Despite their advancements, traditional methods struggle in complex scenarios, such as low contrast or diverse defect shapes.
With the rise of deep learning, more sophisticated methods have emerged, leveraging neural networks to automatically learn task-specific features directly from raw data, enhancing defect detection efficiency and adaptability. Wan et al. [16] introduced semantic-guided and edge-aware modules to enhance spatial details and improve defect boundary clarity. Yang et al. [17] combined a densely nested U-Net with a residual shape-adaptive module to extract multi-level features, ensuring stable training and supporting lightweight model pruning for tiny defect detection. Similarly, Luo et al. [18] proposed a U-shaped multi-view residual attention network with Gaussian residual attention convolution to handle low-contrast features, while Zhong et al. [19] utilized a low-rank decomposition and the Retinex theory to enhance defect contrast. Huang et al. [20,21] integrated a U-Net with decision networks and saliency preprocessing, improving defect localization and computational efficiency. Other approaches, like Yuan et al.’s [22] multi-layer perceptron for low-contrast images and Zhu et al.’s [23] rotation-invariant convolutions, further contribute to more accurate and efficient defect classification.
As manufacturing processes improve, large defects on product surfaces have become rarer, while tiny defects, often invisible to conventional cameras, remain challenging to detect. This has led to class imbalances between defective and non-defective samples, making dataset creation both time-consuming and labor-intensive. To address this, Liu et al. [24] leveraged transfer learning and pseudo-labels, achieving high classification accuracy with minimal labeled samples. Kang et al. [25] used distance transformation and auxiliary tasks to enhance the precision of surface defect detection, while Dekhovich et al. [26] applied a linear discriminant analysis to improve incremental learning. Hou et al. [27] combined transfer learning with coordinate attention to address dataset insufficiencies, while Gong et al. [28] utilized domain expert knowledge for high-fidelity image generation, improving multi-class task optimization. Yu et al. [29] introduced a method that used shared weights for defect and non-defect image correlation, further improving model localization.
Several studies have focused on defect detail extraction to detect subtle imperfections. Li et al. [30] developed a bio-inspired attention network based on retinal characteristics to enhance defect feature representation, while Zhou et al. [31] used dual-attention transformers to capture local defect details. Cheng et al. [32] proposed a linear transformation-based data augmentation method to emphasize defects, and Hu et al. [33] utilized attention mechanisms for enhanced defect feature amplification. Liu et al. [34] introduced a region-of-interest attention network for precise defect localization and differentiation.
Despite their effectiveness in detecting common defects, these methods often fail to quantify defect severity, complicating quality assessment and hindering improvements in quality control. Additionally, these algorithms are computationally intensive and heavily reliant on large, high-quality datasets, limiting their practical application. Notably, even the most advanced models currently detect defects no smaller than 0.5 mm, which falls short of the stringent requirements for certain high-precision products.

1.2.2. Methods Based on 3D Point Clouds

From the perspective of learning mechanisms, 3D defect detection methods are classified into traditional and deep learning-based approaches. The former can be further categorized into two types: comparison methods, which detect defects by aligning the defect point cloud with the nominal point cloud and analyzing their differences, and feature-based methods, which rely on carefully crafted handcrafted features for defect detection.
Li et al. [35] aligned the source and target point clouds and employed a patch-based approach to compute features, such as the mean and maximum distances between them, which were then input into a classification model for defect detection. Momtaz et al. [36] conducted a color space analysis on point clouds, using color space distances as criteria for defect identification. Xiong et al. [37] utilized an adaptive iterative closest point (ICP) algorithm to calculate distance deviations, followed by clustering to merge defect regions, and classified defects using a decision tree classifier. Similarly, He et al. [38] combined ICP with fast point feature histograms (FPFHs) to compute registration errors, employed an octree structure for rapid defect region localization, and applied region growing to extract complete defects. Zhao et al. [39] utilized an enhanced normal rotation projection statistical feature to identify discrepancies between defect and nominal point clouds, extracting potential defects and further refining them using curvature-based Euclidean clustering.
Some studies leverage the K-nearest neighbors (KNN) algorithm to compute surface normals and curvatures of point clouds as critical defect identification features, identifying defects by comparing normal vectors or curvature deviations, or by transforming these characteristics into mathematical expressions to serve as inputs for specific filters [9,40,41,42,43,44,45,46]. Building on this, other methods employ surface or curve fitting techniques, calculating the height difference between defect point clouds and the fitted curves or surfaces as defect features, and subsequently clustering the results to delineate complete defect regions [47,48,49,50,51]. Notably, certain methods exploit mapping techniques to assign grayscale image values as color features to point clouds, or render 3D point clouds into 2D projections with preserved depth information, facilitating their use in neural network training [52,53,54,55].
Qi et al. [56] introduced PointNet, the first end-to-end network designed explicitly for processing unordered point clouds, paving the way for subsequent advancements, such as PointNet++ [57], Transformer [58], PointConv [59], PointMLP [60], and PointNeXt [61]. These innovative architectures have successfully extended deep learning to the domain of 3D point cloud analysis. Building on the Transformer network, Zhou et al. [62] incorporated an enhanced edge convolution mechanism alongside KNN to improve local feature extraction and integration in point clouds. Wang et al. [63] proposed a grouped sampling strategy to extract raw point cloud features, further refining the training process with an adaptive momentum optimizer and a cosine learning rate decay scheduler to achieve superior defect classification and segmentation. Hu et al. [64] developed a dual-stream regional attention network, leveraging backpropagation to focus directly on regions of interest. This approach reduced redundant processing, mitigated dependence on boundary annotations, and significantly enhanced real-time performance. García et al. [65] extracted defect features from both 3D and 2D images, employing these features to train a fully convolutional neural network for defect detection. Pan et al. [66] extended the PointNet architecture to extract multi-scale features from point cloud data, employing a cascaded fusion strategy across different layers to enhance defect detection accuracy.
Despite the advancements made with these 3D point cloud-based methods, there are still notable challenges. First, the computational cost associated with processing high-resolution point clouds is significant, particularly in real-time applications. Furthermore, the reliance on dense point clouds for accurate defect detection often limits the scalability of these methods for large-scale industrial applications, where point cloud data may be sparse or incomplete.

1.3. Our Contributions

Considering the reliance of deep learning on large volumes of meticulously annotated data and the inherently massive scale of point cloud data, the creation of such datasets becomes an exceedingly labor-intensive and time-consuming process. As a result, deep learning approaches were not adopted in this study for the investigation of surface defects in magnetic tiles. Instead, our research focused on leveraging point cloud data to achieve higher precision in detecting tiny defects. Nevertheless, we emphasize the significant potential of deep learning in this domain. Inspired by neuroscience, Hebbian learning [67], which forms the foundation of neural networks, represents a promising direction for our future research endeavors. Our contributions are as follows:
  • Combining the improved weighted covariance matrix and information entropy, the accuracy of defect detection is enhanced while reducing the need for extensive feature engineering.
  • Leveraging luminance and point cloud mapping (LPM), the ability to identify potential defects is enhanced.
  • Combining single-frame and multi-frame point cloud fitting reduces false detection rates, minimizes reliance on feature engineering, and aids in effective defect assessment.
The remainder of this paper is structured as follows: Section 2 describes the materials required for the experiments, Section 3 presents the methodology, Section 4 reports and discusses the experimental results, and Section 5 provides the conclusion.

2. Materials

2.1. Magnetic Tiles

Magnetic tiles are integral components in permanent magnet motors, playing a pivotal role in generating a stable and efficient magnetic field. These tiles, often made from high-performance permanent magnet materials such as neodymium–iron–boron (NdFeB) or samarium–cobalt (SmCo), are crucial for enhancing motor efficiency and power density by providing a strong magnetic field without relying on current flowing through coils. The use of permanent magnet motors has grown rapidly with advancements in automation technologies, becoming increasingly prevalent across a wide range of industries. The benefits of permanent magnet motors include a simplified structure, ease of maintenance, compact size, low copper loss, and reduced energy consumption, making them particularly suitable for applications where efficiency and reliability are paramount. The performance of magnetic tiles directly influences the efficiency, torque, and thermal stability of permanent magnet motors. Therefore, the design and arrangement of these tiles, as well as the direction of the magnetic field they generate, are critical factors in optimizing motor performance. As shown in Figure 1, magnetic tiles are typically mounted on the rotor, where they rotate at high speeds. This high-speed rotation amplifies the importance of detecting surface defects in the tiles, as such defects can worsen under operational conditions and lead to uneven magnetic fields. This, in turn, can negatively affect motor stability, reduce efficiency, and shorten the motor’s lifespan. Surface cracks, peeling, or other forms of damage can cause additional vibrations, noise, or overheating, potentially leading to motor failure or performance degradation. Given the critical role that magnetic tiles play in the optimal functioning of permanent magnet motors, it is essential to ensure their quality and integrity. As such, effective detection and assessment of surface defects in these tiles is vital for maintaining motor performance, preventing failure, and ensuring long-term operational reliability.

2.2. System Setup

This study employed a laser scanning system developed in-house by the authors’ organization, with the overall hardware configuration illustrated in Figure 2. The entire system is orchestrated by a Siemens control box, which regulates the servo motors driving the carrier table. Integrated sensors emit pulses at predetermined intervals, signaling the scanner’s controller to initiate data acquisition. The detailed parameters of the laser scanner are provided in Table 1. To align with the precision requirements of the scanner, the carrier table was designed with a minimum step resolution of 1 μ m and an adjustable range.
The coordinate system for the point cloud data was defined by the laser scanner. The origin corresponded to the first point captured during the data acquisition process. The x-axis aligned with the laser line emitted by the scanner, the y-axis represented the direction of the carrier table’s linear movement, and the z-axis corresponded to the surface height of the object being measured. The resulting output was a file containing only the z-axis data and the corresponding luminance information. Luminance is, in fact, a form of radiative information, which is related to the power of the reflected laser beam. Hence, it is often referred to as “intensity” [68]. The equation for the reflected laser beam intensity is as follows:
P r = π P t ρ 4 R 2 η a η s cos ( θ )
where P r represents the received signal power, with larger values corresponding to higher reflected intensity; P t denotes the transmitted signal power; ρ indicates the reflectance of the target, which reflects the surface characteristics such as color and roughness; R stands for the distance between the laser profilometer and the target; η a represents the atmospheric transmission factor; η s signifies the system transmission factor; and θ denotes the incident angle.

2.3. Experimental Data

Currently, 2D image datasets related to surface defect detection are relatively common, while 3D datasets, particularly for specialized applications such as surface defects in magnetic tiles, remain scarce. This lack of publicly available 3D datasets for magnetic tile surface defects presents a significant challenge for researchers and practitioners working to develop robust defect detection algorithms. As of now, no dedicated datasets for magnetic tile surface defects exist, especially ones that include diverse defect types such as cracks, dents, peeling, scratches, and microdefects.
To address this gap, we designed and built a custom data acquisition system capable of capturing high-resolution 3D point cloud data from the surface of magnetic tiles. All point clouds were obtained with an XY scanning resolution of 5 μ m, resulting in high-density point clouds that captured sufficient defect details. For each point cloud file, we created two copies: one for the defect analysis and the other meticulously labeled for validation. Figure 3 shows a portion of the carefully labeled dataset, which primarily includes cracks, dents, peeling, scratches, and tiny defects. Additionally, we utilized some publicly available 3D point cloud models from the Stanford 3D Scanning Repository (the Bunny and Dragon models), which feature high levels of detail and complex surface structures, containing tens of thousands of vertices and faces. These models were employed to assess the robustness of the proposed method.

3. Methodology

Nowadays, surface defect detection algorithms based on traditional image processing have achieved remarkable results, capable of detecting common surface defects with high precision. However, there is still significant room for improvement in detecting tiny defects. From a data perspective, these methods require much higher image quality than ordinary images, but the quality is often affected by factors such as lighting intensity, acquisition angle, and camera resolution. This leads to the neglect of certain tiny defects during the acquisition process, directly impacting the performance of the algorithms and limiting their applicability in high-precision fields. Furthermore, 2D images lack depth-related information, meaning these methods can only detect defects but are unable to perform any quantitative analysis. In this study, we used a high-precision laser scanner to acquire point cloud data and luminance from the surface of magnetic tiles. By constructing a mapping relationship, we assigned luminance values to the point cloud data, providing color information that enhanced defect detection accuracy. We then introduced an information entropy-based adaptive neighborhood selection method to optimize the cumbersome parameter settings in feature engineering. Following this, we estimated the normal vectors and curvature deviations for rough defect extraction and performed both single-frame and multi-frame point cloud fitting for defect refinement. Finally, we used region growing to complete the defects, thus reducing the miss-detection rate. A brief technical flowchart of the proposed method is shown in Figure 4.

3.1. Height-Based Target Extraction

During the acquisition of surface point cloud data, laser scanners inevitably capture redundant information, such as portions of the mounting platform or extraneous parts of the object itself. These redundant data points introduce unnecessary experimental errors and computational overhead, making data processing less efficient. A notable characteristic of these redundant points is their significantly lower z-axis height compared to the desired effective region. Consequently, these redundant points can be filtered out by applying an appropriate height threshold, ensuring that only the relevant surface data are retained. Based on the height range of the laser scanner, we set the threshold to ±7.3 mm, which corresponds to the range where valid surface data typically reside. Figure 5 illustrates an example where height-based filtering was applied to remove redundant data from a chip, effectively isolating the copper-plated circuit on its surface.

3.2. Outlier and Extraneous Point Removal

Height-based filtering serves as an effective means for removing redundant points and performing coarse target extraction; however, it is insufficient for eliminating outliers or extraneous points. Such points not only increase computational burden but more critically, they compromise the accuracy of normal vector and curvature computations. Figure 6 illustrates the impact of stray light caused by multiple reflections and diffuse reflection on the point cloud. As shown in Figure 6a, stray light introduces numerous outliers along the edges of the magnetic tile’s surface (highlighted by the red dashed region). If these outliers are included in normal vector and curvature estimation, they cause significant deviations, leading to the misclassification of standard edge points as defects. Figure 6b presents the effective point cloud after filtering, while Figure 6c shows the removed outliers and noise. Figure 6d depicts a raw point cloud of a circuit board before stray-light suppression, where stray light distorts the board’s overall shape and introduces substantial noise and outliers (marked by the red dashed region). In contrast, Figure 6e shows the corresponding point cloud after stray-light suppression, revealing a significant reduction in noise and outliers and a clearer representation of key features. The laser scanner employed in this study not only integrated stray-light suppression but also incorporated multiple correction functions, including position, height, and deformation correction, ensuring high-quality data acquisition.
After evaluating various filtering techniques, we adopted the method proposed by Rusu et al. [69]. This approach leverages a KD-tree to identify the k nearest neighbors of a given point p, computes the mean distance μ and standard deviation σ of these neighbors, and removes points outside the range μ ± α σ , where α is chosen based on the density of the point cloud. Furthermore, downsampling also contributes to the removal of outliers and extraneous points. Related techniques can be found in the works of Suchocki et al. [68], Mancini et al. [70], Lin et al. [71], and Maglo et al. [72].

3.3. Luminance and Point Cloud Mapping

Texture mapping is a widely utilized technique for integrating image and point cloud data, leveraging grayscale or RGB values from images to enhance visual detail. This integration facilitates the detection of tiny surface defects with improved precision. As shown in Figure 7, we propose a Luminance and Point Cloud Mapping (LPM) method that incorporates image luminance to provide color information for point cloud data. This method comprises three key steps: length mapping, width mapping, and luminance mapping. The first two steps align the position and scale between the image and point cloud, while luminance mapping assigns color to the point cloud.
The length ( L p ) and width ( W p ) of the point cloud can be calculated based on the intrinsic parameters of the laser scanner. Specifically, L p is determined by the scanning frame S f and scan interval S i , while W p is determined by the number of points per frame N p and the distance between points D p . Thus, L p and W p can be expressed as follows:
L p = S f × S i
W p = N p × D p
With the length and width of the point cloud determined, aligning the image with the point cloud can be achieved by simply scaling the image dimensions by their respective factors. However, this process generates a significant number of virtual pixels without luminance values. To assign appropriate luminance values to these virtual pixels, bilinear interpolation was employed [73]. Assuming that ( x 1 , y 1 , l 11 ), ( x 1 , y 2 , l 12 ), ( x 2 , y 1 , l 21 ), ( x 2 , y 2 , l 22 ) are the four neighboring pixels surrounding the given point ( x i , y j , l i j ), where x 1 < x i < x 2 , y 1 < y j < y 2 , with l 11 , l 12 , l 21 , and l 22 representing their respective luminance values, the luminance value l i j for the given point can be expressed as:
l i j = y 2 y y 2 y 1 x 2 x x 2 x 1 l 11 + x x 1 x 2 x 1 l 21 + y y 1 y 2 y 1 x 2 x x 2 x 1 l 12 + x x 1 x 2 x 1 l 22
Through the aforementioned steps, the LPM method effectively assigned appropriate luminance values to each point and achieved alignment between the image and point cloud, thereby enhancing the accuracy of defect detection.

3.4. Adaptive Neighborhood Selection

In different regions of the same point cloud, the point density varies, especially near edges, corners, and areas with complex surface geometry. This spatial variation in density leads to significant challenges in accurately estimating geometric properties such as normal vectors and curvature. Specifically, using a fixed k-value for the neighborhood selection in such varying-density regions can result in inaccurate normal vector estimations and curvature calculations. For example, in regions with higher point density, the fixed k value may lead to an overly localized estimate of the normal, which may not fully represent the true surface orientation. Conversely, in sparse areas or near edges, a fixed k value may include too few points, resulting in unreliable normal vectors and curvature values, thus introducing significant bias in the defect detection process. These inaccuracies can severely impact the precision of surface defect identification and quantitative evaluation. Figure 8 presents a projected point map of a house. At P 1 , the ground surface is structurally simple and uniform, resulting in negligible changes to normal and curvature estimation regardless of neighborhood size adjustments. At P 2 , an excessively large neighborhood encompasses two intersecting planes at a corner, leading to significant estimation bias. At P 3 , an overly large neighborhood fails to capture local variations around the window, while at P 4 , an overly small neighborhood overlooks details of the eaves. These observations further underscore the importance of adaptive neighborhood selection.
Existing studies widely employ entropy, neighborhood self-information, and neighborhood mutual information to quantify nonlinear relationships between features and classes, thereby reducing uncertainty in the output [74,75,76,77]. Although these approaches were not originally designed for point cloud data, the inherent uncertainty and unstructured nature of point clouds make them a subset of complex data. Therefore, these concepts can be effectively applied to point cloud processing for key point extraction. To overcome the limitations imposed by a fixed k value, we propose an adaptive neighborhood selection method based on information entropy. This approach adapts to local variations in point cloud density, enabling more accurate estimations of normal vectors and curvature, especially in regions where the point density is low or irregular. The entropy function is used to measure the information content and distribution characteristics of the data, reflecting the complexity and irregularity of the point cloud in each region. By adjusting the neighborhood size dynamically based on the local point distribution, this method ensures that the neighborhood size is optimized for each region, leading to more accurate geometric property estimates and, in turn, improving defect detection accuracy. Specifically, the process involves the following five steps:
a. The radius search range ( r m i n , r m a x ) and step size Δ r are defined based on the point cloud density, with the initial radius r i set to r m i n . Specifically, r m i n and r m a x are determined using a k-nearest neighbor search. Based on previous studies, a smaller k is preferable in high-density regions, while a larger k is more suitable for low-density areas. The optimal k value typically ranges between 9 and 60 [9,40,41,42,43,44,45,46,78]. Therefore, in this study, we set the range to 3–80 to encompass common values of k. For k = 3 , the Euclidean distances from the nearest neighbors to the central point were computed, and the maximum distance across the entire point cloud was assigned to r m i n . Similarly, for k = 80 , the maximum distance was assigned to r m a x . Regarding the step size Δ r , a smaller Δ r improves accuracy but increases computational cost, whereas a larger Δ r reduces accuracy while enhancing efficiency. To balance precision and computational performance, we fine-tuned Δ r by setting it to 1–2 times the last significant digit of r m i n .
b. All points within a boundary sphere of radius r m i n are searched, and an improved weighted covariance matrix C is constructed [79], which can be expressed as:
C = i = 1 k τ i ( p i p ¯ ) ( p i p ¯ ) T
where p i represents the coordinates of each point, p ¯ denotes the weighted average of these coordinates, and τ i signifies the weighting coefficient, with points closer to the center receiving higher coefficients. τ i and p ¯ can be expressed as follows:
τ i = e x p ( | | p i μ d | | 2 2 σ d 2 )
p ¯ = i = 1 k τ i · p i i = 1 k τ i
where μ d denotes the average of the coordinates of each point, while σ d represents the standard deviation of the distances from the points to the center. Subsequently, a singular value decomposition (SVD) [80] is employed to compute the eigenvalues of the covariance matrix C , which are then arranged in descending order as λ 0 λ 1 λ 2 > 0 .
c. The eigenvalues are used to compute three metrics of the structure tensor: L λ , P λ , and S λ . L λ represents the linearity metric, indicating whether the point cloud predominantly extends along one direction. P λ is the planarity metric, reflecting whether the points are mainly distributed within a plane. S λ is the scattering metric, describing whether the points are uniformly distributed in three-dimensional space. These metrics can be expressed as follows:
L λ = λ 0 λ 1 + ϵ λ 0 P λ = λ 1 λ 2 + ϵ λ 0 S λ = λ 2 + ϵ λ 0
where ϵ = 1 × 10 10 is a small constant introduced to avoid division by zero. Based on Shannon’s entropy theory [81], the entropy function is constructed using the aforementioned metrics and can be expressed as:
E p = ( L λ l n ( L λ ) + P λ l n ( P λ ) + S λ l n ( S λ ) )
d. Adjust the search radius by setting r i = r i + Δ r and repeat steps b to d until r i > r m a x .
e. Select the radius that minimizes E p as the optimal radius for the point, as the entropy function reflects the complexity of the point cloud. Higher entropy values indicate greater complexity and lower correlation between points in the neighborhood, while lower entropy values suggest a simpler structure with stronger correlations between points.

3.5. Normals and Curvature Estimation

Surface normals and curvature are critical spatial geometric features for defect detection, effectively identifying defects large enough to cause significant changes in these attributes.
As illustrated in Figure 9, defect regions typically exhibit significant deviations in normal vectors and pronounced curvature variations. Consequently, by defining appropriate thresholds for normal vector angular deviation or curvature variation rates, it is possible to preliminarily identify the approximate locations of defects. However, this approach may result in false positives or missed detections. In step b of the previous section, the three eigenvalues of the weighted covariance matrix were computed and arranged in descending order. Thus, the normal vector for each point can be derived by identifying the eigenvector ν corresponding to the smallest eigenvalue according to C ν = λ ν , as the eigenvalues of the weighted covariance matrix represent variance, with smaller variance indicating a higher concentration of data points. Similarly, the curvature C of each point is also defined based on these eigenvalues [53], which can be expressed as follows:
C = λ 2 λ 0 + λ 1 + λ 2

3.6. Contour Fitting Based on Single-Frame and Multi-Frame Point Clouds

Comparing defect point clouds with nominal point clouds is an effective method for defect detection. Nominal point clouds are typically generated in two ways: CAD modeling and fitting. Although CAD modeling can construct a standard workpiece model, point clouds acquired by laser scanners often contain noise and outliers and require transformation at a certain scale. As a result, it is difficult to ensure that the number of points in the acquired point cloud closely matches that of the nominal model, which introduces unnecessary errors, as a point cloud analysis is conducted on a point-by-point basis. Therefore, we employed the fitting method, directly deriving the nominal contour from the acquired point cloud. This approach allowed for a more accurate and direct comparison by aligning the nominal model to the actual surface geometry, minimizing the effects of noise and misalignment.
Although statistical filtering can effectively remove most noise and outliers, some still remain, which introduces bias in the fitting process. Furthermore, our objective was to fit the nominal model from the defective point cloud; however, the most distinct characteristic of the defective regions was their irregularity and insufficient number of points, which complicated the fitting. As a result, we did not aim to fit the complete workpiece model but instead fit a partial nominal contour. In fact, for objects with symmetrical structures, such as magnetic tiles, a single nominal contour can represent the entire workpiece, as the entire object is essentially an ordered arrangement of multiple nominal contours. As shown in Figure 10, we performed fittings in both the x- and y-directions, and both methods could generate a complete contour. In the x-direction, a contour corresponded to one frame of the laser scanner, thus we referred to it as a single-frame point cloud. In contrast, in the y-direction, a contour was composed of multiple frames of point clouds, and we referred to it as a multi-frame point cloud. The fitting result in the x-direction was a straight line, while the fitting result in the y-direction was a curve. Specifically, we used the least-squares method [82] to achieve the fitting process.
In the y-direction, during our fitting process, we assumed that the data points could be described by a quadratic function, expressed as follows:
z y = a y 2 + b y + c
where a, b and c are the parameters of the fitting function, y is the independent variable, and z is the dependent variable. Our objective was to find the optimal parameters a, b, and c that minimized the residuals for all data points. The residuals were defined as the difference between the actual value z a and the fitted value z y . We then constructed the objective function S y , and by minimizing S y , we obtained the best parameter set, as expressed in the following equation:
S y = i = 1 n ( z a i ( a y i 2 + b y i + c ) ) 2
Similarly, for the fitting in the x-direction, a linear equation was given in the form:
z x = k x + d
where z is the dependent variable, x is the independent variable, k is the slope of the fitted line, and d is the intercept. The expressions for k and d were as follows:
k = n x i z i x i z i n x i 2 ( x i ) 2
b = z i k x i n
Next, the objective function S x was constructed, expressed as:
S x = i = 1 n ( z a i ( k x i + d ) ) 2
To assess the accuracy of the fitting results, we used the coefficient of determination ( R 2 ) [83], a commonly used statistical measure to evaluate the goodness of fit. The closer the value is to 1, the better the fit. The calculation formula is as follows:
R 2 = 1 i = 1 n ( z a i z f i ) 2 i = 1 n ( z a i z ¯ )
where z ¯ is the mean value of the z-coordinates of all points. The value of z f i was determined by the direction of the fitting. If the fitting was performed along the y-direction, z f i was obtained from Equation (11); if the fitting was performed along the x-direction, z f i was derived from Equation (13).

3.7. Surface Defect Detection

Defect detection was performed in two stages: coarse detection and fine extraction. The former leveraged the deviation of normal vectors and curvature within an adaptive neighborhood to identify potential defects, albeit often accompanied by partial false positives. Specifically, for a given point p, if the angular deviation between its normal vector and the average normal vector of its adaptive neighbors exceeded a predefined threshold α i , the point was marked as defective. Regarding curvature, the mean μ and standard deviation σ of the curvature values of the adaptive neighborhood surrounding point p were first computed. A threshold was then defined as μ + β σ . If the curvature at point p exceeded this threshold, the point was marked as a defect. The candidate defect points obtained from coarse detection constituted the union of these two sets.
Subsequently, macroscopic defects were extracted by analyzing the residuals of curve fitting. In the x-direction, a linear fit was applied to obtain a profile that satisfied Equation (13). A certain number of profiles along this direction were selected, and their slopes were averaged to yield S. Given that the spacing of points along the x-direction was constant, specifically 0.005 mm, the height difference Δ z i , i ± 1 between any two points was calculated as 0.005 S . When fitting data along the y-direction, a standard profile equation was first obtained, and the remaining profiles were subsequently aligned with this reference by applying a vertical shift equal to Δ z i , i ± 1 . Next, for each fitted y-direction profile, the residual Δ z in the z-direction between the original data and the fitted curve was calculated. Conventionally, points are identified as defects when the residual exceeds a predetermined threshold. However, we adopted a more robust approach by converting the z-direction residuals into a probability density using kernel density estimation (KDE) [84], a non-parametric statistical method. The primary advantage of KDE is its flexibility in capturing the true underlying data distribution without assuming a specific parametric form. The corresponding mathematical expression is as follows:
f ( Δ z ) = 1 n h i = 1 n 1 2 π e ( Δ z Δ z i h ) 2 2
where n represents the sample size (number of residuals), and h denotes the bandwidth (smoothing parameter) determined by Silverman’s rule of thumb [85]:
h = 1.06 ϵ n 1 / 5
where ϵ represents the standard deviation of the residuals Δ z .
Using Equation (18), we obtained the probability density corresponding to each residual. A lower probability density indicates a larger residual, suggesting a higher likelihood of a defect. We then ranked these probability densities in ascending order and set a quantile threshold for defect identification. For instance, by selecting the 5th percentile, the residuals falling within the lowest 5% of the probability density distribution were classified as defects. For macro defects, they were characterized by larger residuals. However, with the continuous improvement in manufacturing processes, large macro defects are less common in actual products, meaning they occupy a smaller percentage of the total. Consequently, the quantile threshold could be set to a lower value. This approach allowed us to accurately detect macro defects with minimal false positives. We then applied this method to the candidate defect points previously identified by normal vector and curvature deviation filtering. These points exhibited smaller residuals, but there remained a certain disparity between the residuals of defect and non-defect points. By slightly increasing the quantile threshold, we could effectively minimize false positives while retaining smaller defects with some depth. When these micro defects were combined with macro defects, we obtained a comprehensive representation of the surface defects. Moreover, for the scratches on the magnet tile surface, we conducted a histogram analysis on the RGB color channels of each point to identify the peak-to-peak values of their normalized colors. The points within this peak range corresponded to the normal color of the magnet tile. We then categorized regions outside of the peak range: those with color values lower than the peak were designated as dark regions, while those with color values higher than the peak were classified as bright regions. Subsequently, Otsu’s thresholding method was applied to both the dark and bright regions, enabling the extraction of scratches from each region based on their respective thresholds. Lastly, to address the incomplete defect areas identified in the previous steps and reduce the possibility of missed detections, we utilized region growing, specifically employing DBSCAN clustering [86]. This density-based clustering technique allowed us to effectively complete the defect regions by controlling the density ( m i n P t s ) between points and the required neighborhood size ( ϵ ) for the core points.

3.8. Quantitative Evaluation of Defect Severity

After completing the clustering step, we obtained different defect types and the three-dimensional coordinates of all defect points. This facilitated the quantification of defect severity. As shown in Figure 11c, defect depth is the easiest to quantify. By traversing all points within the defect region, points with the same x-coordinate correspond to the same standard fitting curve along the y-direction. By substituting their respective y-coordinates into the standard fitting curve, the fitted z-values can be obtained. The difference (residual) between the fitted z-values and the actual z-values represents the defect depth. The maximum residual from all points corresponds to the maximum depth of the defect, highlighting the importance of fitting.
For length and width, the defect length refers to the distance along the maximum extension direction in the 2D space, while the width refers to the maximum extent in the direction perpendicular to the length. These directions correspond to the first and second principal components in PCA [87], respectively. Specifically, the covariance matrix of the defect point cloud was first computed using PCA, from which eigenvalues were derived. The eigenvector corresponding to the largest eigenvalue represented the longest direction of the defect region (i.e., the length direction). The maximum projection range was then calculated, which represented the defect length. Let the coordinates of a defect point be ( x i , y i , z i ), then the relevant calculation expressions are as follows:
M = 1 n 1 i = 1 n ( x i μ x ) ( x i μ x ) T
where M represents the covariance matrix, μ x is the mean of the coordinates of the points, and n denotes the number of points. An eigenvalue decomposition was then performed according to Equation (20) to obtain the eigenvectors:
M ν = λ ν
where λ represents the eigenvalues, and ν represents the eigenvectors. Assuming ν 1 and ν 2 denote the vectors corresponding to the first and second principal components, respectively, the length (L) and width (W) of the defect can then be calculated using the following expressions:
L = m a x ( P · ν 1 ) m i n ( P · ν 1 )
W = m a x ( P · ν 2 ) m i n ( P · ν 2 )
where P represents the point cloud coordinate matrix.
Notably, we could also quantify irregular areas. As shown in Figure 11b, the contours in the x-direction are ideally straight lines, and the corresponding height values, i.e., z-axis coordinates, are constants. When surface irregularities occur, the fitted contour in the x-direction becomes a line represented by a first-degree polynomial, which forms an angle with the ideal contour line. If this angle exceeds a certain threshold, the contour is considered irregular, and points with z-axis values above or below this constant are marked as defect points. The constant value corresponding to each contour is determined by the average z-axis coordinate value of all points on that contour.

4. Experimental Results and Discussion

In this section, we provide comprehensive details related to the experiments, followed by the validation of our proposed method using relevant datasets and evaluation metrics. The experiments were conducted on Python 3.7, utilizing the Open3D and PCL libraries. The entire algorithm was executed on a computational workstation equipped with a 3 GHz Intel CPU, 256 GB of RAM, and an NVIDIA GeForce RTX 3090 GPU.

4.1. Feasibility of Normal Vectors and Curvature

The accuracy of normal vector and curvature estimation depends on the effectiveness of the adaptive neighborhood selection method. Due to the simplicity of the magnetic tile dataset, we used the publicly available Stanford Bunny dataset for validation. As shown in Figure 12, we selected the Bunny and Dragon models from the dataset and determined the optimal radius for each point through adaptive neighborhood selection. Subsequently, a principal component analysis was applied to the neighboring points within the optimal radius to compute the best normal vector for each point. Finally, a consistent orientation was assigned to all normal vectors using an extended Gaussian image.
Specifically, we selected eight distinct k values (50, 45, 40, 35, 30, 25, 20, and 15) and computed the corresponding normal vectors for each point. The average of these vectors was taken as the reference normal vector for each point. Subsequently, the normal vectors obtained for each k value, as well as the optimal normal vectors, were compared against the reference normals to compute their angular deviations, yielding the overall mean error (ME) and root-mean-square error (RMSE). Furthermore, since the accuracy of normal vector estimation is influenced by point cloud density, we performed random sampling at different levels: 100%, 80%, 60%, and 40% of the original point cloud. The selection of the Bunny and Dragon models was intentional, as the Bunny dataset represents a lower density point cloud with 34,834 points, while the Dragon dataset features a higher density with 435,545 points. For the Bunny dataset, we set parameters r m i n = 0.0002 , r m a x = 0.0064 , Δ r = 0.0002 , while for the Dragon dataset, the parameters were set to r m i n = 0.0002 , r m a x = 0.0054 , Δ r = 0.0002 . As shown in Figure 13, the overall mean and root-mean-square errors increased as the point cloud density decreased. However, the proposed adaptive method consistently outperformed fixed-k-value approaches in terms of lower error. When using normal vector deviation to detect significant surface defects, a deviation threshold of 5° to 10° is typically set, with points exceeding this threshold considered defect points. For tiny defects, the angle deviation threshold is generally set between 3° to 5°. A threshold that is too small may lead to the misclassification of non-defect points as defects while detecting tiny ones. However, the deviation of our method remained below 3° across varying point cloud densities, confirming its feasibility.
We further analyzed the Bunny model, quantifying the distribution percentage of the total number of neighborhood points at the optimal radius for each point, as well as the total number of points contained within each optimal radius, as shown in Figure 14a,b. From Figure 14a, it is evident that different points had distinct optimal neighborhoods. While they may fall within the same range, the number of points in their optimal neighborhoods can vary. Notably, the largest range was between 50 and 55, with a proportion of zero beyond this range. This suggests that the number of optimal neighborhood points at the optimal radius for any given point was a fixed value, unaffected by further increases in the radius, demonstrating the effectiveness of information entropy. This finding emphasizes the uniqueness of the optimal neighborhood selection for each point, reinforcing the importance of adaptive methods in point cloud analyses. Figure 14b further supports this validity. Previously, we set the maximum radius, r m a x , to 0.0064. As shown, when the radius reached 0.0060, all points had already found their optimal radius, and any further increase in the radius did not affect the outcome. This highlights the precision and stability of the proposed method, which is crucial for accurate and efficient defect detection.
Figure 15 illustrates the effectiveness of the proposed method on the magnetic tile dataset. Due to the high density of the original magnetic tile point cloud, we performed uniform voxel downsampling to facilitate visualization. As seen in Figure 15b, all normal vectors pointed toward the same viewpoint, which aligned with the structural characteristics of the magnetic tiles. Figure 15c shows that even at the most error-prone locations, such as edges or corner points, the normal vectors were well aligned. This consistency helped reduce the false positive rate in subsequent defect detection.

4.2. Validity of the Fitting

The accuracy of defect detection is directly tied to the precision of the selected fitting model. Figure 16 presents the fitting results for both the y- and x-directions. In the y-direction, 2000 contours were selected for fitting from a total of 3200, a fixed number determined by the factory settings of the laser scanner. To ensure a representative selection, we first identified all unique y-values, sorted them by frequency, and then selected the 2000 contours with the highest occurrences. The standard contour was subsequently derived using the method described earlier. This frequency-based approach was crucial, as defect regions often exhibited complex shapes and may suffer from data loss or poor scanning quality, leading to these points being excluded as outliers. As a result, the fitted model was primarily based on intact contours that were less likely to be influenced by scanning artifacts.
In the x-direction, the ideal fitted contour was a horizontal straight line. However, due to practical scanning limitations, slight deviations often introduced a small slope, though the contour remained fundamentally linear. Compared to nonlinear methods, such as quadratic curve fitting, linear fitting introduces significantly fewer errors due to its simpler, more stable nature. When surface defects were small, all available contours were used for fitting. For larger or deeper defects, we applied a similar method to the y-direction: the 5000 contours with the highest frequency were selected, and their average was used to generate a standard x-direction contour. Once this standard contour was obtained, it was adjusted for vertical displacement by translating it based on the average height difference in the z-direction. This ensured the resulting fitting model accurately reflected the nominal structure, while still accounting for the influence of surface defects.
In both the y- and x-directions, the average R 2 value of 0.998 indicated that the fitted models closely approximated the original point cloud. However, there were clear differences in the defect regions, where the fitting diverged from the actual data. This divergence was expected, as the fitted models represented the ideal, defect-free surface, providing a reliable baseline for detecting defects. Ultimately, the fitting process effectively captured the overall structural characteristics, while also highlighting discrepancies in the defect regions, which is essential for precise and reliable defect detection.

4.3. Case Study of Defect Detection

In this section, we present the results of surface defect detection on magnetic tiles to highlight the practical effectiveness of the proposed method. Figure 17 compares our approach with alternative methods based solely on normal vector deviation (Nd), curvature deviation (Cd), or multi-frame fitting (Mf). The figure displays detection results for various types of defects, including severe defects (such as dents and cracks, characterized by a large size and significant depth), tiny defects (small in size but relatively deep), severe scratches (shallow in depth with a very dark color), and light scratches (shallow with negligible depth but high brightness). For peeling and bulging defects, these were classified as severe defects due to their impact and characteristics. It is important to note that our primary goal was defect detection and quantification, rather than defect classification.
Before analyzing the results, we first provide a summary of some manually set parameters used during the experiment, as detailed in Table 2. All other parameters were automatically computed during the algorithm’s execution. For further details on the equations, refer to Appendix A. A key consideration was the Otsu threshold, which occasionally required fine-tuning. As shown in Figure 18, we initially calculated the Otsu threshold for both dark and bright regions using histogram analysis. However, this method alone did not fully separate dark scratches and bright scratches from the background, especially in cases where the defects exhibited subtle differences in color or brightness. Consequently, minor adjustments were necessary to fine-tune the threshold, and the required adjustment values varied depending on the specific characteristics of the point cloud. These adjustments were crucial in improving the accuracy of defect detection, ensuring that both dark and light scratches were properly distinguished from the background, and thus enhancing the overall detection performance. Overall, the experimental results demonstrate that our proposed method outperformed traditional techniques by providing a more robust and accurate detection framework, capable of handling a variety of defect types and surface conditions.
First, let us examine the defect detection results based on the Nd. It is evident that this method was sensitive to edges and corners, which was due to the fact that during the neighbor search, the region within a boundary sphere of a fixed radius was examined. Edges and corners were prone to sudden changes, which could cause deviations to exceed the set threshold. Furthermore, for non-defective areas where data were missing, the surrounding points were spaced farther apart, creating larger differences, which made them more likely to be incorrectly identified as defects. This issue was largely attributable to the quality of the collected data. Importantly, for larger defects, this method only detected the approximate boundary of the defect. This was because the differences between neighboring points within the defect region were relatively small. In other words, this method could only serve as a rough localization of the defect but could not fully detect it and was prone to false positives. The defect detection results based on Cd were similar to those based on Nd. It also lacked robustness when detecting larger defects. However, it could detect more boundary points of the defect, as it was more sensitive to curvature. Additionally, its sensitivity to edges and corners was lower than that of Nd.
Now, consider the method based on Mf. Its primary advantage was that it could detect both large and small defects, depending on the threshold set. However, it was not sensitive to cracks, as some cracks may simply be interrupted at certain points without involving significant changes in depth. Consequently, the residuals were minimal, and no matter how the threshold was set, such cracks could not be detected.
Regarding the effectiveness of texture mapping, or more specifically, the efficacy of the proposed LPM algorithm, its best demonstration was the restoration of the original color of the magnetic tile, given that the point cloud itself lacked color information. As shown in the last column of Figure 17, we added the LPM algorithm on top of each method to detect light and dark scratches. These tiny scratches, which had almost no depth, exhibited a significant color difference compared to the surrounding normal points. They were difficult to detect using Nd, Cd, or Mf, but we successfully extracted these defects based on color differences. However, it is worth noting that this method could only detect light and dark scratches with a very obvious change in brightness. Its robustness was relatively poor for more subtle scratches, as relying solely on luminance to color the point cloud was too simplistic. However, following the concept of this method, other color spaces such as hue, chroma, or saturation could be applied to the point cloud to provide more detailed color features. Since our equipment could only capture luminance-related information, we only used luminance to color the point cloud.
Finally, we turn to the proposed hybrid approach, which effectively leveraged the strengths of individual methods while compensating for their respective shortcomings through their complementary nature. As seen in the Figure 17, the proposed method not only retained small defects but also significantly reduced the false positive rate. Additionally, the internal regions of larger defects were also fully extracted, demonstrating the feasibility of the method. To further evaluate its performance, we employed three evaluation metrics: P r e c i s i o n , R e c a l l , and F 1 [88], which can be computed using the following formulas:
P r e c i s i o n = T P T P + F P
R e c a l l = T P T P + F N
F 1 = 2 × P r e c i s i o n × R e c a l l P r e c i s i o n + R e c a l l
where T P represents the number of correctly detected defects, F P denotes the number of false positives, and F N indicates the number of missed defects.
We further validated the performance of the proposed method using the evaluation metrics from Equations (24)–(26), in conjunction with a custom magnetic-tile surface-defect point cloud dataset. This dataset contained 500 point cloud files, with 100 files each for minor defects, severe scratches, and light scratches, and 200 files for severe defects. Table 3 provides the detailed results of the proposed method and the individual methods across the three evaluation metrics.
As seen in the table, the proposed method was effective in detecting severe defects, minor defects, and severe scratches, which was attributed to the two-step approach of coarse detection and fine extraction. The former provided candidate defect points, capturing potential defects, while the latter refined these points to filter out false positives, enabling the method to extract both large and small defects without the need for separate processes, thereby effectively capturing the entire defect region. In detecting shallow scratches, the method showed lower robustness, as the single luminance channel provided limited color information, leading to higher false positives and false negatives despite threshold adjustments. However, the contours of light and dark scratches could still be effectively detected. In conclusion, our method proved effective for detecting defects that could severely affect the quality of magnetic tiles, though it showed slightly lower robustness for objective cosmetic interference.

4.4. Comparison of Defect Sizes

We measured seven defects, as shown in Figure 17, including their maximum length, width, and depth. To obtain reference values for these measurements, we utilized two tools. The first was the built-in measurement function of the laser scanner (LJ-X Observer), which provided highly accurate measurements for larger defects. The second tool was a NREEOHY electron microscope, used to magnify smaller defects that were difficult to discern with the naked eye. Figure 19 displays an image magnified 20 times, where, with the provided scale, defects could be directly measured using the built-in function. However, this tool was limited in that it could not measure the depth of the defects.
It is important to note that the methods used to measure length and width, as shown in the figure, are intended solely for estimating the approximate area of the defect region. For more precise calculations, when area is not a factor, length and width should be computed based on the projections along the first and second principal components derived from PCA. This approach was also used when obtaining the reference values.
Table 4 presents a detailed comparison of defect sizes, where “R” represents the reference values and “M” represents the measured values using the proposed method. The error standard for each measurement was calculated as follows:
E r r o r = | R M | R
The data presented in the table demonstrate that our method consistently maintained relatively low and stable errors when measuring defect length, width, and depth, with average errors of 3.43%, 4.50%, and 5.12%, respectively. Notably, the average error in depth measurement was higher than that for length and width. This was due to the generally shallow nature of these defects, and the fact that defect depth was measured by examining residuals, which were influenced by the fitted curve. Although our fitted reference contours closely matched the true shape of the part, some discrepancies remained. As shown for defects 6 and 7, their depths were negligible, and no depth information could be captured with high-precision instruments during reference value collection. It is also worth noting that the defect sizes in the table are smaller than those detectable by current image processing-based deep learning methods, further confirming the effectiveness of our approach in detecting tiny defects. This suggests its potential application in fields requiring high precision.

4.5. Future Work

The primary future work involves conducting real-world case studies, as the defects observed in our experiments were common surface defects artificially created, and other more complex defects were not considered. We need to further validate the robustness of the proposed method. Additionally, one of our upcoming publications will focus on deep learning approaches, which, thanks to the powerful feature extraction capabilities of neural networks, generally outperform traditional methods. Our goal is to use defects identified through the current method as labels to train the neural network, rather than relying on manually created datasets, which is a time-consuming process. We also plan to develop a new automated solution for input parameter initialization, as different types of magnetic tiles require different input parameters. Notably, our method exhibits lower robustness to stains on the magnetic tile surface, due to the inherent color of the tiles. Although stains are visible to the naked eye, their reflectivity is nearly identical to the tile surface, causing them to be absent from the collected data. Since stains typically only affect aesthetics and have negligible impact on product performance, we ignored them in this study, but we may explore the use of newly developed laser scanners to address this limitation. Finally, we will focus on the challenge of handling large datasets, as overly dense point cloud data have been shown to be unnecessary, imposing a significant computational burden. Several downsampling methods have been proposed to reduce redundant data while preserving accuracy, though there is still substantial room for improvement.

5. Conclusions

Manual inspection of surface defects in magnet tiles is highly subjective, inefficient, and prone to high false detection rates. Traditional defect detection algorithms based on 2D imaging impose stringent requirements on image quality, which are often unmet by standard industrial cameras, making it challenging to capture subtle, concealed microscopic defects. These limitations pose potential safety risks to the stable operation of permanent magnet motors. With the rapid advancement of sensor technology, high-resolution 3D vision sensors offer a more competitive alternative for defect detection. This study developed a surface defect detection and quantitative evaluation framework for magnetic tiles using high-resolution 3D laser scanning technology.
To ensure defect detection accuracy, we first applied height-based and statistical filtering to eliminate noise and outliers in the high-resolution point cloud. Next, we introduced a luminance and point cloud mapping scheme, wherein bilinear interpolation effectively reconstructed the surface color of the magnet tile, enhancing visual details crucial for microscopic defect detection. To improve normal vector and curvature estimation, we proposed an adaptive neighborhood selection method based on an improved weighted covariance matrix and information entropy. Unlike the conventional covariance matrix, the proposed weighted version assigned varying weights to neighboring points, with closer points exhibiting stronger correlations with the central point, thereby receiving higher weights. A singular value decomposition was then performed on the weighted covariance matrix to extract eigenvalues, which were used to construct an entropy-based criterion, where a lower entropy value indicated a stronger local point correlation. The proposed entropy measure integrated linearity, planarity, and scattering metrics to characterize the disorder and unstructured nature of the point cloud. The optimal neighborhood selection derived from this entropy criterion significantly enhanced the accuracy of normal vector and curvature estimation, particularly at critical regions such as edges and corner points. This improvement laid the foundation for precise microscopic defect thresholding.
An initial screening of microscopic defect candidates was performed using normal vector and curvature deviation thresholds; however, this method was less sensitive to macroscopic defects. To address this limitation, we proposed a single-frame and multi-frame point cloud fitting approach based on the topological structure of the magnet tile surface. This approach enabled the simultaneous extraction of both macroscopic and microscopic defects while ensuring accurate defect depth measurement. During this process, kernel density estimation was employed to transform the fitting residuals into probabilities, which significantly enhanced the robustness of the entire detection algorithm. Finally, we implemented defect completion and segmentation using region-growing and DBSCAN clustering, effectively reducing both false positive and false negative rates. For segmented defects, the maximum defect depth was calculated based on a residual analysis. A Principal Component Analysis (PCA) was then applied for dimensionality reduction, allowing the extraction of the maximum length and width of the defect region using the components along the first and second principal axes.
Compared to conventional 2D image-based defect detection algorithms, the proposed method demonstrated a significant advantage in identifying defects that were challenging to detect with the naked eye. It was capable of detecting defects as small as approximately 0.07 mm² while simultaneously enabling a precise quantitative evaluation. This provides a valuable reference for subsequent quality control in magnet tile manufacturing. Specifically, the proposed method achieved an average precision of 93.91%, a recall rate of 95.97%, and an F1-score of 94.91%, with measurement errors for defect length, width, and depth of 3.43%, 4.50%, and 5.12%, respectively, meeting the stringent demands of the magnet tile production industry.
Despite its effectiveness, the method has some limitations. The computational cost associated with processing high-density point clouds remains a challenge, and further optimization is needed to improve real-time performance. Furthermore, while this study focused on surface defects, future research will explore the integration of photoacoustic multimodal techniques to simultaneously detect both surface and subsurface defects, as well as assess their applicability to other materials and industrial components. Integrating deep learning-based point cloud processing techniques and enhancing defect classification capabilities are also promising directions for further research. By addressing these challenges, the proposed framework can contribute to more efficient and precise defect detection in industrial settings, paving the way for improved quality control and predictive maintenance strategies.

Author Contributions

Methodology, J.H. and Q.H.; software, J.H., W.J. and F.S.; validation, J.H., Q.H., W.J. and F.S.; formal analysis, J.H. and Q.H.; investigation, J.H., W.J. and F.S.; data curation, Q.H., W.J. and F.S.; writing—original draft preparation, J.H.; writing—review and editing, J.H., Q.H., W.J. and F.S.; visualization, J.H., W.J. and F.S.; supervision, Q.H.; project administration, Q.H.; funding acquisition, Q.H. All authors have read and agreed to the published version of the manuscript.

Funding

This work was supported by the Sichuan Science and Technology Program (Grant No. 2024NSFSC0137), the Talent Introduction Project of Sichuan University of Science and Engineering (Grant No. 2021RC30), and the Graduate Innovation Fund of Sichuan University of Science and Engineering (Grant No. Y2023316).

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

Certain portions of the data are being used in ongoing related research and projects; premature disclosure may disrupt the progression of these studies or affect the outcomes of associated experiments. To ensure research integrity and orderly project advancement, the feasibility of data disclosure will be evaluated after all related research and projects are completed. For interested researchers, reasonable data requests will be assessed by the corresponding author, and the necessary data support will be provided within permissible boundaries.

Conflicts of Interest

The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.

Appendix A

To better understand the parameters in this article, descriptive definitions are provided below.
(1)
Indices
i and j: The index of a pixel or a point, where i = 0, 1, 2, …, n; j = 0, 1, 2, …, n.
(2)
Statistical filtering
k: The k nearest neighbors surrounding a given point p.
μ : The mean Euclidean distance of the k nearest neighbors from the given point p.
σ : The standard deviation of the Euclidean distances between the k nearest neighbors and the given point p.
α : A scaling factor used to adjust the stringency of filtering.
(3)
Bilinear interpolation
x i j : The x-coordinate of a given pixel p i j .
y i j : The y-coordinate of a given pixel p i j .
l i j : The luminance value of a given pixel p i j .
(4)
Least-squares fitting
y: The y-coordinate of a given point p.
z: The z-coordinate of a given point p.
x: The x-coordinate of a given point p.
z a i : The original z-coordinate value of the ith point.
(5)
Surface defect detection algorithm
α i : The angular deviation between the optimal normal vector of the ith point and the average normal vector of its neighboring points.
μ : The mean curvature of all points within the adaptive neighborhood.
σ : The standard deviation of the curvature of all points within the adaptive neighborhood.
β : A scale factor used to adjust the range of curvature deviation.
Δ z i , i ± 1 : The height difference between two adjacent points on the same fitted contour in the x-direction.
Δ z : The value of the height difference (residual) to be estimated.
Δ z i : The height difference (residual) of the ith observation point.

References

  1. Cao, X.; Chen, B.; He, W. Unsupervised Defect Segmentation of Magnetic Tile Based on Attention Enhanced Flexible U-Net. IEEE Trans. Instrum. Meas. 2022, 71, 1–10. [Google Scholar] [CrossRef]
  2. Ben Gharsallah, M.; Ben Braiek, E. Defect identification in magnetic tile images using an improved nonlinear diffusion method. Trans. Inst. Meas. Control 2021, 43, 2413–2424. [Google Scholar] [CrossRef]
  3. Jiang, C.; Zhang, X.; Xu, B.; Zheng, Q.; Li, Z.; Zhang, L.; Zhang, D. MT-U2Net: Lightweight detection network for high-precision magnetic tile surface defect localization. Mater. Today Commun. 2024, 41, 110480. [Google Scholar] [CrossRef]
  4. Li, Z.; Song, S.; Liu, X.; Suo, H.; Liu, W.; Song, Y. A zero-shot quantitative evaluation model for subsurface defects size based on ultrasonic nondestructive testing. Measurement 2025, 241, 115738. [Google Scholar] [CrossRef]
  5. Liang, C.; Wang, G.; Ma, H.; Xiao, Q.; Yu, X. A composite testing method of homologous magnetic flux leakage and motion-induced eddy current for inner and outer defects. Measurement 2025, 240, 115544. [Google Scholar] [CrossRef]
  6. Wu, Q.; Dong, K.; Qin, X.; Hu, Z.; Xiong, X. Magnetic particle inspection: Status, advances, and challenges—Demands for automatic non-destructive testing. NDT E Int. 2024, 143, 103030. [Google Scholar] [CrossRef]
  7. Vera, J.; Caballero, L.; Taboada, M. Reliability of Dye Penetrant Inspection Method to Detect Weld Discontinuities. Russ. J. Nondestr. Test. 2024, 60, 85–95. [Google Scholar] [CrossRef]
  8. Segovia Ramírez, I.; García Márquez, F.P.; Papaelias, M. Review on additive manufacturing and non-destructive testing. J. Manuf. Syst. 2023, 66, 260–286. [Google Scholar] [CrossRef]
  9. Chen, L.; Yao, X.; Xu, P.; Moon, S.K.; Bi, G. Rapid surface defect identification for additive manufacturing with in-situ point cloud processing and machine learning. Virtual Phys. Prototyp. 2021, 16, 50–67. [Google Scholar] [CrossRef]
  10. Inês Silva, M.; Malitckii, E.; Santos, T.G.; Vilaça, P. Review of conventional and advanced non-destructive testing techniques for detection and characterization of small-scale defects. Prog. Mater. Sci. 2023, 138, 101155. [Google Scholar] [CrossRef]
  11. Tang, S.; Wang, G.; Zhang, H. In situ 3D monitoring and control of geometric signatures in wire and arc additive manufacturing. Surf. Topogr-Metrol. 2019, 7, 025013. [Google Scholar] [CrossRef]
  12. Sohail, S.S.; Himeur, Y.; Kheddar, H.; Amira, A.; Fadli, F.; Atalla, S.; Copiaco, A.; Mansoor, W. Advancing 3D point cloud understanding through deep transfer learning: A comprehensive survey. Inform. Fusion 2025, 113, 102601. [Google Scholar] [CrossRef]
  13. Yang, C.; Liu, P.; Yin, G.; Jiang, H.; Li, X. Defect detection in magnetic tile images based on stationary wavelet transform. NDT E Int. 2016, 83, 78–87. [Google Scholar] [CrossRef]
  14. Xie, L.; Lin, L.; Yin, M.; Meng, L.; Yin, G. A novel surface defect inspection algorithm for magnetic tile. Appl. Surf. Sci. 2016, 375, 118–126. [Google Scholar] [CrossRef]
  15. Li, D.; Niu, Z.; Peng, D. Magnetic Tile Surface Defect Detection Based on Texture Feature Clustering. J. Shanghai Jiaotong Univ. Sci. 2019, 24, 663–670. [Google Scholar] [CrossRef]
  16. Wan, B.; Zhou, X.; Zheng, B.; Yin, H.; Zhu, Z.; Wang, H.; Sun, Y.; Zhang, J.; Yan, C. LFRNet: Localizing, Focus, and Refinement Network for Salient Object Detection of Surface Defects. IEEE Trans. Instrum. Meas. 2023, 72, 1–12. [Google Scholar] [CrossRef]
  17. Yang, B.; Liu, Z.; Duan, G.; Tan, J. Residual shape adaptive dense-nested Unet: Redesign the long lateral skip connections for metal surface tiny defect inspection. Pattern Recogn. 2024, 147, 110073. [Google Scholar] [CrossRef]
  18. Luo, F.; Cui, Y.; Liao, Y. MVRA-UNet: Multi-View Residual Attention U-Net for Precise Defect Segmentation on Magnetic Tile Surface. IEEE Access 2023, 11, 135212–135221. [Google Scholar] [CrossRef]
  19. Zhong, Z.; Wang, H.; Xiang, D. Small Defect Detection Based on Local Structure Similarity for Magnetic Tile Surface. Electronics 2023, 12, 185. [Google Scholar] [CrossRef]
  20. Huang, Y.; Huang, Z.; Jin, T. DEU-Net: A Multi-Scale Fusion Staged Network for Magnetic Tile Defect Detection. Appl. Sci. 2024, 14, 4724. [Google Scholar] [CrossRef]
  21. Huang, Y.; Qiu, C.; Yuan, K. Surface defect saliency of magnetic tile. Vis. Comput. 2020, 36, 85–96. [Google Scholar] [CrossRef]
  22. Yuan, H.; Peng, J. LCSeg-Net: A low-contrast images semantic segmentation model with structural and frequency spectrum information. Pattern Recogn. 2024, 151, 110428. [Google Scholar] [CrossRef]
  23. Zhu, Y.; Xie, L.; Yin, M.; Yin, G. Convolution With Rotation Invariance for Online Detection of Tiny Defects on Magnetic Tile Surface. IEEE Trans. Instrum. Meas. 2023, 72, 1–12. [Google Scholar] [CrossRef]
  24. Liu, T.; Ye, W. A semi-supervised learning method for surface defect classification of magnetic tiles. Mach. Vision Appl. 2022, 33, 35. [Google Scholar] [CrossRef]
  25. Kang, D.; Lai, J.; Han, Y. Accurate detection of surface defects by decomposing unreliable tasks under boundary guidance. Expert. Syst. Appl. 2024, 244, 122977. [Google Scholar] [CrossRef]
  26. Dekhovich, A.; Bessa, M.A. Continual learning for surface defect segmentation by subnetwork creation and selection. J. Intell. Manuf. 2024, 1–15. [Google Scholar] [CrossRef]
  27. Hou, W.; Jing, H. RC-YOLOv5s: For tile surface defect detection. Vis. Comput. 2024, 40, 459–470. [Google Scholar] [CrossRef]
  28. Gong, Y.; Wang, X.; Zhou, C.; Ge, M.; Liu, C.; Zhang, X. Human–machine knowledge hybrid augmentation method for surface defect detection based few-data learning. J. Intell. Manuf. 2024, 36, 1723–1742. [Google Scholar] [CrossRef]
  29. Yu, R.; Guo, B. Dynamic Reasoning Network for Image-Level Supervised Segmentation on Metal Surface Defect. IEEE Trans. Instrum. Meas. 2024, 73, 1–10. [Google Scholar] [CrossRef]
  30. Li, J.; Wang, K.; He, M.; Ke, L.; Wang, H. Attention-based convolution neural network for magnetic tile surface defect classification and detection. Appl. Soft. Comput. 2024, 159, 111631. [Google Scholar] [CrossRef]
  31. Zhou, X.; Zhou, S.; Zhang, Y.; Ren, Z.; Jiang, Z.; Luo, H. GDALR: Global Dual Attention and Local Representations in transformer for surface defect detection. Measurement 2024, 229, 114398. [Google Scholar] [CrossRef]
  32. Lv, C.; Zhang, E.; Qi, G.; Li, F.; Huo, J. A lightweight parallel attention residual network for tile defect recognition. Sci. Rep. 2024, 14, 21872. [Google Scholar] [CrossRef] [PubMed]
  33. Hu, C.; Liao, H.; Zhou, T.; Zhu, A.; Xu, C. Online recognition of magnetic tile defects based on UPM-DenseNet. Mater. Today Commun. 2022, 30, 103105. [Google Scholar] [CrossRef]
  34. Liu, T.; Cao, G.Z.; He, Z.; Xie, S. RoIA: Region of Interest Attention Network for Surface Defect Detection. IEEE Trans. Semiconduct. Manuf. 2023, 36, 159–169. [Google Scholar] [CrossRef]
  35. Li, R.; Jin, M.; Paquit, V.C. Geometrical defect detection for additive manufacturing with machine learning models. Mater. Des. 2021, 206, 109726. [Google Scholar] [CrossRef]
  36. Momtaz Dargahi, M.; Khaloo, A.; Lattanzi, D. Color-space analytics for damage detection in 3D point clouds. Struct. Infrastruct. Eng. 2022, 18, 775–788. [Google Scholar] [CrossRef]
  37. Xiong, Z.; Li, Q.; Mao, Q.; Zou, Q. A 3D Laser Profiling System for Rail Surface Defect Detection. Sensors 2017, 17, 1791. [Google Scholar] [CrossRef]
  38. He, Y.; Ma, W.; Li, Y.; Hao, C.; Wang, Y.; Wang, Y. An Octree-Based Two-Step Method of Surface Defects Detection for Remanufacture. Int. J. Precis. Eng. Manuf.-Green Technol. 2023, 10, 311–326. [Google Scholar] [CrossRef]
  39. Zhao, X.; Li, Q.; Xiao, M.; He, Z. Defect detection of 3D printing surface based on geometric local domain features. Int. J. Adv. Manuf. Technol. 2023, 125, 183–194. [Google Scholar] [CrossRef]
  40. Jovančević, I.; Pham, H.-H.; Orteu, J.-J.; Gilblas, R.; Harvent, J.; Maurice, X.; Brèthes, L. 3D Point Cloud Analysis for Detection and Characterization of Defects on Airplane Exterior Surface. J. Nondestruct. Eval. 2017, 36, 74. [Google Scholar] [CrossRef]
  41. Huang, D.; Du, S.; Li, G.; Zhao, C.; Deng, Y. Detection and monitoring of defects on three-dimensional curved surfaces based on high-density point cloud data. Precis. Eng. 2018, 53, 79–95. [Google Scholar] [CrossRef]
  42. Zhang, W.; Zhou, F.; Liu, Y.; Sun, P.; Chen, Y.; Wang, L. Object defect detection based on data fusion of a 3D point cloud and 2D image. Meas. Sci. Technol. 2023, 34, 025002. [Google Scholar] [CrossRef]
  43. Lee, E.T.; Fan, Z.; Sencer, B. A new approach to detect surface defects from 3D point cloud data with surface normal Gabor filter (SNGF). J. Manuf. Process. 2023, 92, 196–205. [Google Scholar] [CrossRef]
  44. Xu, Z.; Lin, Y.; Chen, D.; Yuan, M.; Zhu, Y.; Ai, Z.; Yuan, Y. Wood broken defect detection with laser profilometer based on Bi-LSTM network. Expert. Syst. Appl. 2024, 242, 122789. [Google Scholar] [CrossRef]
  45. Li, R.; Jin, M.; Pei, Z.; Wang, D. Geometrical defect detection on additive manufacturing parts with curvature feature and machine learning. Int. J. Adv. Manuf. Technol. 2022, 120, 3719–3729. [Google Scholar] [CrossRef]
  46. Makuch, M.; Gawronek, P. 3D Point Cloud Analysis for Damage Detection on Hyperboloid Cooling Tower Shells. Remote Sens. 2020, 12, 1542. [Google Scholar] [CrossRef]
  47. Tang, Y.; Wang, Q.; Wang, H.; Li, J.; Ke, Y. A novel 3D laser scanning defect detection and measurement approach for automated fibre placement. Meas. Sci. Technol. 2021, 32, 075201. [Google Scholar] [CrossRef]
  48. Cao, X.; Xie, W.; Ahmed, S.M.; Li, C.R. Defect detection method for rail surface based on line-structured light. Measurement 2020, 159, 107771. [Google Scholar] [CrossRef]
  49. Liu, M.; Bai, X.; Xi, S.; Dong, H.; Li, R.; Zhang, H.; Zhou, X. Detection and quantitative evaluation of surface defects in wire and arc additive manufacturing based on 3D point cloud. Virtual Phys. Prototyp. 2024, 19, e2294336. [Google Scholar] [CrossRef]
  50. Zheng, Q.; Zou, B.; Chen, W.; Wang, X.; Quan, T.; Ma, X. Study on the 3D-printed surface defect detection based on multi-row cyclic scanning method. Measurement 2023, 223, 113823. [Google Scholar] [CrossRef]
  51. Liu, X.; Wu, L.; Guo, X.; Andriukaitis, D.; Królczyk, G.; Li, Z. A novel approach for surface defect detection of lithium battery based on improved K-nearest neighbor and Euclidean clustering segmentation. Int. J. Adv. Manuf. Technol. 2023, 127, 971–985. [Google Scholar] [CrossRef]
  52. Puliti, M.; Montaggioli, G.; Sabato, A. Automated subsurface defects’ detection using point cloud reconstruction from infrared images. Autom. Constr. 2021, 129, 103829. [Google Scholar] [CrossRef]
  53. Wang, Q.; Wang, X.; He, Q.; Huang, J.; Huang, H.; Wang, P.; Yu, T.; Zhang, M. 3D tensor-based point cloud and image fusion for robust detection and measurement of rail surface defects. Autom. Constr. 2024, 161, 105342. [Google Scholar] [CrossRef]
  54. Zheng, L.; Lou, H.; Xu, X.; Lu, J. Tire Defect Detection via 3D Laser Scanning Technology. Appl. Sci. 2023, 13, 11350. [Google Scholar] [CrossRef]
  55. Zong, Y.; Liang, J.; Wang, H.; Ren, M.; Zhang, M.; Li, W.; Lu, W.; Ye, M. An intelligent and automated 3D surface defect detection system for quantitative 3D estimation and feature classification of material surface defects. Opt. Lasers Eng. 2021, 144, 106633. [Google Scholar] [CrossRef]
  56. Charles, R.Q.; Su, H.; Kaichun, M.; Guibas, L.J. PointNet: Deep Learning on Point Sets for 3D Classification and Segmentation. In Proceedings of the 2017 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Honolulu, HI, USA, 21–26 July 2017; pp. 77–85. [Google Scholar] [CrossRef]
  57. Qi, C.R.; Yi, L.; Su, H.; Guibas, L.J. Pointnet++: Deep hierarchical feature learning on point sets in a metric space. In Proceedings of the 31th Neural Information Processing Systems (NeurIPS), Long Beach, CA, USA, 4–9 December 2017; Volume 30. [Google Scholar] [CrossRef]
  58. Liu, Z.; Lin, Y.; Cao, Y.; Hu, H.; Wei, Y.; Zhang, Z.; Lin, S.; Guo, B. Swin Transformer: Hierarchical Vision Transformer using Shifted Windows. In Proceedings of the 2021 IEEE/CVF International Conference on Computer Vision (ICCV), Montreal, QC, Canada, 10–17 October 2021; pp. 9992–10002. [Google Scholar] [CrossRef]
  59. Wu, W.; Qi, Z.; Fuxin, L. PointConv: Deep Convolutional Networks on 3D Point Clouds. In Proceedings of the 2019 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), Long Beach, CA, USA, 15–20 June 2019; pp. 9613–9622. [Google Scholar] [CrossRef]
  60. Ma, X.; Qin, C.; You, H.; Ran, H.; Fu, Y. Rethinking network design and local geometry in point cloud: A simple residual MLP framework. In Proceedings of the 10th International Conference on Learning Representations, Virtual, 25–29 April 2022; p. 07123. [Google Scholar] [CrossRef]
  61. Qian, G.; Li, Y.; Peng, H.; Mai, J.; Hammoud, H.; Elhoseiny, M.; Ghanem, B. PointNeXt: Revisiting PointNet++ with Improved Training and Scaling Strategies. In Proceedings of the 36th Neural Information Processing Systems (NeurIPS), New Orleans, LA, USA, 28 November 2022; Volume 35, pp. 23192–23204. [Google Scholar] [CrossRef]
  62. Zhou, Y.; Ji, A.; Zhang, L. Sewer defect detection from 3D point clouds using a transformer-based deep learning model. Autom. Constr. 2022, 136, 104163. [Google Scholar] [CrossRef]
  63. Wang, N.; Ma, D.; Du, X.; Li, B.; Di, D.; Pang, G.; Duan, Y. An automatic defect classification and segmentation method on three-dimensional point clouds for sewer pipes. Tunn. Undergr. Space Technol. 2024, 143, 105480. [Google Scholar] [CrossRef]
  64. Hu, Q.; Hao, K.; Wei, B.; Li, H. An efficient solder joint defects method for 3D point clouds with double-flow region attention network. Adv. Eng. Inform. 2022, 52, 101608. [Google Scholar] [CrossRef]
  65. García Peña, D.; García Pérez, D.; Díaz Blanco, I.; Juárez, J.M. Exploring deep fully convolutional neural networks for surface defect detection in complex geometries. Int. J. Adv. Manuf. Technol. 2024, 134, 97–111. [Google Scholar] [CrossRef]
  66. Pan, Y.; Yang, F.; Peng, W.; Liu, Q.; Zhang, C. Improved PointNet with accuracy and efficiency trade-off for online detection of defects in laser processing. Opt. Lasers Eng. 2025, 184, 108610. [Google Scholar] [CrossRef]
  67. Munakata, Y.; Pfaffly, J. Hebbian learning and development. Dev. sci. 2004, 7, 141–148. [Google Scholar] [CrossRef]
  68. Suchocki, C.; Błaszczak-Bąk, W.; Janicka, J.; Dumalski, A. Detection of defects in building walls using modified OptD method for down-sampling of point clouds. Build. Res. Inf. 2021, 49, 197–215. [Google Scholar] [CrossRef]
  69. Rusu, R.B.; Marton, Z.C.; Blodow, N.; Dolha, M.; Beetz, M. Towards 3D Point cloud based object maps for household environments. Robot. Auton. Syst. 2008, 56, 927–941. [Google Scholar] [CrossRef]
  70. Mancini, F.; Castagnetti, C.; Rossi, P.; Dubbini, M.; Fazio, N.L.; Perrotti, M.; Lollino, P. An Integrated Procedure to Assess the Stability of Coastal Rocky Cliffs: From UAV Close-Range Photogrammetry to Geomechanical Finite Element Modeling. Remote Sens. 2017, 9, 197–215. [Google Scholar] [CrossRef]
  71. Lin, Y.J.; Benziger, R.R.; Habib, A. Planar-based adaptive down-sampling of point clouds. Photogramm. Eng. Remote Sens. 2016, 82, 955–966. [Google Scholar] [CrossRef]
  72. Maglo, A.; Lavoué, G.; Dupont, F.; Hudelot, C. 3d mesh compression: Survey, comparisons, and emerging trends. ACM Comput. Surv. 2015, 47, 1–41. [Google Scholar] [CrossRef]
  73. Smith, P.R. Bilinear interpolation of digital images. Ultramicroscopy 1981, 6, 201–204. [Google Scholar] [CrossRef]
  74. Chen, Y.; Wu, K.; Chen, X.; Tang, C.; Zhu, Q. An entropy-based uncertainty measurement approach in neighborhood systems. Inf. Sci. 2014, 279, 239–250. [Google Scholar] [CrossRef]
  75. Lord, W.M.; Sun, J.; Bollt, E.M. Geometric k-nearest neighbor estimation of entropy and mutual information. Chaos 2018, 28, 033114. [Google Scholar] [CrossRef]
  76. Mariello, A.; Battiti, R. Feature Selection Based on the Neighborhood Entropy. IEEE Trans. Neural Netw. Learn. Syst. 2018, 29, 6313–6322. [Google Scholar] [CrossRef]
  77. Wang, C.; Huang, Y.; Shao, M.; Hu, Q.; Chen, D. Feature Selection Based on Neighborhood Self-Information. IEEE Trans. Cybern. 2020, 50, 4031–4042. [Google Scholar] [CrossRef]
  78. Guldur Erkal, B.; Hajjar, J.F. Laser-based surface damage detection and quantification using predicted surface properties. Autom. Constr. 2017, 83, 285–302. [Google Scholar] [CrossRef]
  79. D’Agostini, G. On the use of the covariance matrix to fit correlated data. Nucl. Instrum. Methods Phys. Res. Sect. A 1994, 346, 306–311. [Google Scholar] [CrossRef]
  80. Klema, V.; Laub, A. The singular value decomposition: Its computation and some applications. IEEE Trans. Autom. Control 1980, 25, 164–176. [Google Scholar] [CrossRef]
  81. Lin, J. Divergence measures based on the Shannon entropy. IEEE Trans. Inf. Theory 1991, 37, 145–151. [Google Scholar] [CrossRef]
  82. Levie, R.d. Curve Fitting with Least Squares. Crit. Rev. Anal. Chem. 2000, 30, 59–74. [Google Scholar] [CrossRef]
  83. Chicco, D.; Warrens, M.J.; Jurman, G. The coefficient of determination R-squared is more informative than SMAPE, MAE, MAPE, MSE and RMSE in regression analysis evaluation. Peerj Comput. Sci. 2021, 7, e623. [Google Scholar] [CrossRef]
  84. Kristan, M.; Leonardis, A.; Skočaj, D. Multivariate online kernel density estimation with Gaussian kernels. Pattern Recong. 2011, 44, 2630–2642. [Google Scholar] [CrossRef]
  85. Andersson, B.; von Davier, A.A. Improving the bandwidth selection in kernel equating. J. Educ. Meas. 2014, 51, 223–238. [Google Scholar] [CrossRef]
  86. Mahesh Kumar, K.; Rama Mohan Reddy, A. A fast DBSCAN clustering algorithm by accelerating neighbor searching using Groups method. Pattern Recogn. 2016, 58, 39–48. [Google Scholar] [CrossRef]
  87. Groth, D.; Hartmann, S.; Klie, S.; Selbig, J. Principal Components Analysis. Comput. Toxicol. 2013, 2, 527–547. [Google Scholar] [CrossRef]
  88. Goutte, C.; Gaussier, E. A Probabilistic Interpretation of Precision, Recall and F-Score, with Implication for Evaluation. In Advances in Information Retrieval; Springer: Berlin/Heidelberg, Germany, 2005; pp. 345–359. [Google Scholar] [CrossRef]
Figure 1. Different types of magnetic tiles and their distribution within the motor.
Figure 1. Different types of magnetic tiles and their distribution within the motor.
Applsci 15 03518 g001
Figure 2. The hardware setup of the laser scanning system.
Figure 2. The hardware setup of the laser scanning system.
Applsci 15 03518 g002
Figure 3. Point cloud dataset of surface defects on magnetic tiles.
Figure 3. Point cloud dataset of surface defects on magnetic tiles.
Applsci 15 03518 g003
Figure 4. Data processing and defect detection workflow for magnetic tile inspection.
Figure 4. Data processing and defect detection workflow for magnetic tile inspection.
Applsci 15 03518 g004
Figure 5. Height-based target extraction: (a) original copper-plated PCB; (b) raw point cloud of the chip; (c) copper-plated circuit after substrate removal.
Figure 5. Height-based target extraction: (a) original copper-plated PCB; (b) raw point cloud of the chip; (c) copper-plated circuit after substrate removal.
Applsci 15 03518 g005
Figure 6. Impact of stray light on the point cloud: (a) magnetic tile with noise and outliers; (b) magnetic tile after noise and outlier removal; (c) filtered noise and outliers; (d) point cloud before stray-light suppression; (e) point cloud after stray-light suppression; red dashed lines: noise and outliers.
Figure 6. Impact of stray light on the point cloud: (a) magnetic tile with noise and outliers; (b) magnetic tile after noise and outlier removal; (c) filtered noise and outliers; (d) point cloud before stray-light suppression; (e) point cloud after stray-light suppression; red dashed lines: noise and outliers.
Applsci 15 03518 g006
Figure 7. Illustration of luminance and point cloud mapping.
Figure 7. Illustration of luminance and point cloud mapping.
Applsci 15 03518 g007
Figure 8. Projected point map of a structurally complex house.
Figure 8. Projected point map of a structurally complex house.
Applsci 15 03518 g008
Figure 9. Illustration of normal vector and curvature deviations.
Figure 9. Illustration of normal vector and curvature deviations.
Applsci 15 03518 g009
Figure 10. Contour fitting of single-frame and multi-frame point clouds based on least-squares method.
Figure 10. Contour fitting of single-frame and multi-frame point clouds based on least-squares method.
Applsci 15 03518 g010
Figure 11. Illustration of defect quantification analysis: (a) defective magnet tile; (b) deviation along x-direction; (c) deviation along y-direction.
Figure 11. Illustration of defect quantification analysis: (a) defective magnet tile; (b) deviation along x-direction; (c) deviation along y-direction.
Applsci 15 03518 g011
Figure 12. Normal estimation on the Stanford Bunny dataset.
Figure 12. Normal estimation on the Stanford Bunny dataset.
Applsci 15 03518 g012
Figure 13. The ME and RMSE between the optimal normals and the reference normals.
Figure 13. The ME and RMSE between the optimal normals and the reference normals.
Applsci 15 03518 g013
Figure 14. Qualitative analysis of the information entropy-based adaptive neighborhood selection method on the rabbit model. (a) Distribution of the proportion of the total number of optimal neighborhoods for each point at the optimal radius; (b) total number of points included within the optimal radius.
Figure 14. Qualitative analysis of the information entropy-based adaptive neighborhood selection method on the rabbit model. (a) Distribution of the proportion of the total number of optimal neighborhoods for each point at the optimal radius; (b) total number of points included within the optimal radius.
Applsci 15 03518 g014
Figure 15. Normal estimation on the magnetic tile dataset.
Figure 15. Normal estimation on the magnetic tile dataset.
Applsci 15 03518 g015
Figure 16. Model results based on single-frame and multi-frame fitting. (a) Fitting results in the y- and x-directions. (b) Difference (residual) between the actual and fitted values in the z-direction. (c) Actual model fitted in the y- and x-directions.
Figure 16. Model results based on single-frame and multi-frame fitting. (a) Fitting results in the y- and x-directions. (b) Difference (residual) between the actual and fitted values in the z-direction. (c) Actual model fitted in the y- and x-directions.
Applsci 15 03518 g016
Figure 17. Detection results for certain types of defects.
Figure 17. Detection results for certain types of defects.
Applsci 15 03518 g017
Figure 18. Threshold selection for light and dark scratches.
Figure 18. Threshold selection for light and dark scratches.
Applsci 15 03518 g018
Figure 19. Measurement of tiny defects under electron microscope: tiny defects (red dashed lines); defect length and width (red arrows).
Figure 19. Measurement of tiny defects under electron microscope: tiny defects (red dashed lines); defect length and width (red arrows).
Applsci 15 03518 g019
Table 1. Laser scanner parameters.
Table 1. Laser scanner parameters.
ModelScan Z HeightScan X LengthZ-Axis AccuracyX-Axis AccuracySingle Line Points
KEYENCE LJ-X806064 ± 7.3 mm16 mm0.4 μ m0.5 μ m3200
Table 2. Details of the manually specified parameters required for the experiment.
Table 2. Details of the manually specified parameters required for the experiment.
Method NameParameter Details
Statistical filtering k = 50 , α = 2.2
Adaptive neighborhood selection r m i n = 0.1 , r m a x = 0.2 , Δ r = 0.01 , k: adaptive
Normal vector deviation α i = 3 ° , k: adaptive
Curvature deviation β = 1.5 , k: adaptive
Coarse detection and fine extractionCorresponding to the top 5th percentile and top 2nd percentile, respectively.
DBSCAN clustering m i n P t s = 40 , ϵ = 0.16
Table 3. Evaluation results of different methods for various defects.
Table 3. Evaluation results of different methods for various defects.
Method NameSevere DefectTiny DefectSevere ScratchMinor Scratch
PreRecF1PreRecF1PreRecF1PreRecF1
Nd0.54170.48770.51330.34630.84960.49200.56310.58020.5715---
Cd0.56290.50780.53390.36880.85470.51530.56980.59920.5841---
Mf0.96340.95120.95730.93200.94160.93680.88570.84040.86250.35050.72970.4735
Ours0.95280.96970.96120.92330.95880.94070.94130.95050.94540.73750.76490.7510
Note: Bold text represents the optimal values of different methods under various metrics.
Table 4. Comparison of measurements of selected defects with reference values.
Table 4. Comparison of measurements of selected defects with reference values.
DefectLength (mm)Error (%)Width (mm)Error (%)Depth (mm)Error (%)
RMRMRM
116.16015.623.343.4703.3513.430.4830.4722.28
20.5270.5494.170.2350.2475.110.0310.0423.55
30.3600.3723.330.1150.1835.910.0820.0776.10
40.6150.6383.740.2910.3044.470.0520.0555.77
59.6829.4192.720.4780.4593.970.0380.0417.89
67.0807.2542.460.3650.3773.29-0.013-
714.84514.2154.240.4300.4075.35-0.011-
Average Error--3.43--4.50--5.12
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

Huang, J.; Huang, Q.; Jiang, W.; Sun, F. Entropy-Driven Adaptive Neighborhood Selection and Fitting for Sub-Millimeter Defect Detection and Quantitative Evaluation in Magnetic Tiles. Appl. Sci. 2025, 15, 3518. https://doi.org/10.3390/app15073518

AMA Style

Huang J, Huang Q, Jiang W, Sun F. Entropy-Driven Adaptive Neighborhood Selection and Fitting for Sub-Millimeter Defect Detection and Quantitative Evaluation in Magnetic Tiles. Applied Sciences. 2025; 15(7):3518. https://doi.org/10.3390/app15073518

Chicago/Turabian Style

Huang, Jiaxiong, Qinyuan Huang, Wengziyang Jiang, and Fei Sun. 2025. "Entropy-Driven Adaptive Neighborhood Selection and Fitting for Sub-Millimeter Defect Detection and Quantitative Evaluation in Magnetic Tiles" Applied Sciences 15, no. 7: 3518. https://doi.org/10.3390/app15073518

APA Style

Huang, J., Huang, Q., Jiang, W., & Sun, F. (2025). Entropy-Driven Adaptive Neighborhood Selection and Fitting for Sub-Millimeter Defect Detection and Quantitative Evaluation in Magnetic Tiles. Applied Sciences, 15(7), 3518. https://doi.org/10.3390/app15073518

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

Article Metrics

Back to TopTop