Chip inductor surface defect detection method and system based on machine vision
By employing techniques such as wavelet transform denoising, Fourier transform phase component extraction, convolutional neural network analysis, and K-means clustering, the problem of insufficient accuracy in surface defect detection of chip inductors in existing technologies has been solved, achieving high-precision defect identification and quality assessment.
Patent Information
- Application Number
- CN202511710118.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-20
- Publication Date
- 2026-02-27
AI Technical Summary
Existing machine vision inspection methods based on image amplitude analysis cannot effectively capture subtle defects in the surface defect detection of chip inductors, and have a high rate of misjudgment and missed detection in complex environments, resulting in insufficient detection accuracy.
By employing wavelet transform denoising, Fourier transform to extract phase components, convolutional neural network to analyze phase change amplitude, edge detection and phase information optimization, and K-means clustering, a complete defect detection chain is constructed to achieve multi-level feature fusion recognition and classification of defect areas.
It significantly improves the accuracy of defect detection, reduces false positive and false negative rates, provides comprehensive quality assessment reports, and supports production process improvements.
Smart Images

Figure CN121582181A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of industrial vision inspection technology, and in particular to a method and system for detecting surface defects in chip inductors based on machine vision. Background Technology
[0002] Currently, the accuracy of surface defect detection for chip inductors, as a fundamental electronic component, directly affects the quality and reliability of the entire electronic product. With the ever-increasing demands for industrial inspection accuracy, traditional inspection methods face growing technical challenges in handling microscopic defects.
[0003] One existing technology primarily employs a machine vision inspection scheme based on image amplitude analysis. This scheme acquires an image of the component surface using a high-resolution imaging device, then analyzes and processes the image brightness features using edge detection algorithms and threshold segmentation techniques, and finally determines the defect based on the feature matching results.
[0004] Therefore, it can be deduced that this amplitude analysis-dependent detection method has inherent limitations. Because this method fails to effectively extract the key feature information of the phase component in the image, its ability to capture the spatial distribution patterns of defects is significantly insufficient. When faced with complex background textures and lighting interference in actual production environments, existing technologies struggle to accurately distinguish between real defects and noise signals. They lack the ability to capture subtle defects, and suffer from high rates of misjudgment and missed detection in complex environments. Consequently, the stability and accuracy of the detection system cannot meet the quality requirements of modern precision manufacturing, resulting in insufficient detection precision. Summary of the Invention
[0005] This invention provides a machine vision-based method and system for detecting surface defects in chip inductors, which solves the problem that existing technologies rely on image amplitude analysis and ignore phase information, resulting in insufficient ability to capture subtle defects, high misjudgment and false negative rates in complex environments, and thus insufficient detection accuracy.
[0006] In a first aspect, to address the aforementioned technical problems, the present invention provides a machine vision-based method for detecting surface defects in chip inductors, comprising: Obtain the initial image set of the chip inductor; The initial image set is subjected to wavelet transform denoising processing to obtain a denoised image; Perform a Fourier transform on the denoised image and separate the phase components to generate a phase feature map; Based on the phase feature map, the phase change amplitude is analyzed by a convolutional neural network, and the defect region is identified according to the phase change amplitude to obtain a defect location map; Local regions of potential defects are extracted from the defect location map, and edge detection and boundary optimization based on phase information are performed on the local regions to obtain an enhanced defect map. Calculate the phase difference between the defect region and the preset normal texture region in the enhanced defect map, classify the defects based on the phase difference, and obtain the defect classification result; The substantive defects in the defect classification results are grouped using K-means clustering to determine the defect type distribution; The defect type distribution is compared with the preset quality acceptance standard to generate the final quality assessment result.
[0007] In one optional implementation, acquiring the initial image set of the chip inductor includes: Surface images of chip inductors are acquired using high-resolution industrial cameras; The acquired surface images are subjected to grayscale conversion and preliminary contrast adjustment to form the initial image set.
[0008] In one optional implementation, the step of performing wavelet transform denoising on the initial image set to obtain a denoised image includes: The initial image set is subjected to wavelet transform processing to obtain decomposed images; Threshold filtering is applied to the high-frequency components in the decomposed image to remove noise, resulting in a filtered image. The filtered image is reconstructed by inverse wavelet transform to obtain the denoised image.
[0009] In one optional implementation, performing a Fourier transform on the denoised image and separating the phase components to generate a phase feature map includes: Perform a Fourier transform on the denoised image to obtain a frequency domain image; Separate the phase component from the frequency domain image; The phase component is subjected to an inverse Fourier transform to generate the phase feature map.
[0010] In one optional implementation, the step of analyzing the phase change amplitude using a convolutional neural network based on the phase feature map, identifying the defect region according to the phase change amplitude, and obtaining a defect location map includes: The phase feature map is input into a preset convolutional neural network, and the phase change amplitude of the phase feature map is analyzed by the convolutional neural network. The regions where the phase change amplitude exceeds a preset amplitude change threshold are identified and the defects are marked to obtain a defect location map.
[0011] In one optional implementation, the step of extracting local regions of potential defects from the defect location map and performing edge detection and phase-information-based boundary optimization on the local regions to obtain an enhanced defect map includes: Extract local regions of potential defects from the defect location map; Edge detection is performed on the extracted local region to obtain the initial boundary; Based on the phase information in the phase feature map, the initial boundary is optimized to generate the enhanced defect map.
[0012] In one optional implementation, the step of calculating the phase difference between the defect region and the preset normal texture region in the enhanced defect map, and classifying defects based on the phase difference to obtain a defect classification result, includes: Calculate the phase difference between the defect region and the preset normal texture region in the enhanced defect map; If the calculated phase difference is greater than the preset classification threshold, the corresponding defect will be classified as a substantial defect. All substantive defects are summarized to form the defect classification result.
[0013] In one optional implementation, the substantive defects in the defect classification results are grouped using K-means clustering to determine the defect type distribution, including: Extract the feature vector for each substantive defect; Based on the feature vectors, defects are classified into different categories using K-means clustering. Based on the defect characteristics of each category, determine the corresponding defect type distribution.
[0014] In one optional implementation, the step of comparing the defect type distribution with a preset quality acceptance standard to generate a final quality assessment result includes: The defect type distribution is compared with the preset quality acceptance standards, and the number and proportion of each type of defect are counted to obtain the defect statistics results. Based on the defect statistics, a quality assessment report is generated that includes detailed defect statistics and overall pass / fail determination.
[0015] Secondly, the present invention provides a machine vision-based surface defect detection system for chip inductors, comprising: The image acquisition module is used to acquire the initial image set of the chip inductor; The image denoising module is used to perform wavelet transform denoising processing on the initial image set to obtain a denoised image. The phase extraction module is used to perform Fourier transform on the denoised image and separate the phase components to generate a phase feature map; The defect localization module is used to analyze the phase change amplitude based on the phase feature map using a convolutional neural network, identify the defect region according to the phase change amplitude, and obtain the defect localization map. The boundary enhancement module is used to extract local regions of potential defects from the defect location map, and perform edge detection and boundary optimization based on phase information on the local regions to obtain an enhanced defect map. The defect classification module is used to calculate the phase difference between the defect region and the preset normal texture region in the enhanced defect map, and to classify the defects based on the phase difference to obtain the defect classification result. The defect grouping module is used to group the substantive defects in the defect classification results using K-means clustering to determine the defect type distribution. The quality assessment module is used to compare the defect type distribution with preset quality acceptance standards and generate the final quality assessment result.
[0016] Thirdly, the present invention also provides an electronic device, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor executes the computer program to implement the machine vision-based method for detecting surface defects of chip inductors as described in any one of the preceding claims.
[0017] Fourthly, the present invention also provides a computer-readable storage medium comprising a stored computer program, wherein, when the computer program is executed, it controls the device containing the computer-readable storage medium to perform the machine vision-based chip inductor surface defect detection method described in any one of the above.
[0018] Compared with the prior art, the present invention has the following beneficial effects: (1) This invention uses wavelet transform multi-scale decomposition and reconstruction for image denoising, combined with Fourier transform phase component extraction, to construct a new paradigm for defect detection based on phase features. The technical derivation of this method lies in the fact that existing technologies mainly rely on image amplitude information, which has limited ability to capture the spatial variation patterns of subtle defects. By introducing phase component analysis, this invention can effectively capture the structural features of defects in the frequency domain, thereby solving the problem of existing technologies being insensitive to the identification of subtle surface defects and significantly improving the accuracy of defect detection.
[0019] (2) This invention analyzes the phase change amplitude using a convolutional neural network and combines edge detection with phase information boundary optimization to achieve multi-level feature fusion recognition of defect areas. The technical derivation of this method lies in the fact that traditional methods have difficulty distinguishing between real defects and noise interference in complex backgrounds. This invention establishes a complete detection chain from frequency domain features to spatial positioning by combining phase change amplitude threshold determination with boundary optimization, thereby accurately identifying and locating various surface defects and effectively reducing the false detection rate and false negative rate.
[0020] (3) This invention establishes a complete quality inspection system from defect identification to quality assessment by calculating phase difference and using K-means clustering. The technical derivation of this method lies in the fact that existing inspection methods lack a systematic defect classification and assessment mechanism. This invention achieves automatic identification and statistical analysis of defect types by quantifying defect characteristics and establishing classification standards, thereby generating a comprehensive quality assessment report and providing reliable data support for production process improvement. Attached Figure Description
[0021] Figure 1 This is a schematic flowchart of the machine vision-based surface defect detection method for chip inductors provided in the first embodiment of the present invention; Figure 2 This is a flowchart of the core algorithm of the machine vision-based chip inductor surface defect detection method provided in the first embodiment of the present invention; Figure 3 This is a schematic diagram of the surface defect detection method for chip inductors based on machine vision provided in the second embodiment of the present invention. Detailed Implementation
[0022] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0023] Reference Figure 1 The first embodiment of the present invention provides a method for detecting surface defects of chip inductors based on machine vision, comprising the following steps: S11, Obtain the initial image set of the chip inductor; S12, perform wavelet transform denoising on the initial image set to obtain a denoised image; S13, Perform Fourier transform on the denoised image and separate the phase components to generate a phase feature map; S14, Based on the phase feature map, the phase change amplitude is analyzed by a convolutional neural network, and the defect region is identified according to the phase change amplitude to obtain a defect location map; S15, extract the local region of potential defects from the defect location map, and perform edge detection and boundary optimization based on phase information on the local region to obtain an enhanced defect map; S16, calculate the phase difference between the defect region and the preset normal texture region in the enhanced defect map, classify the defects according to the phase difference, and obtain the defect classification result; S17, K-means clustering is used to group the substantive defects in the defect classification results to determine the defect type distribution; S18, compare the defect type distribution with the preset quality acceptance standard to generate the final quality assessment result.
[0024] In step S11, an initial image set of the chip inductor is obtained, including: Surface images of chip inductors are acquired using high-resolution industrial cameras; The acquired surface images are subjected to grayscale conversion and preliminary contrast adjustment to form the initial image set.
[0025] First, surface images of the chip inductor are acquired using a high-resolution industrial camera. For example, a 20-megapixel CCD industrial camera is selected, equipped with a ring-shaped LED light source to provide uniform, shadowless illumination, thereby minimizing the interference of shadows and reflections on subsequent identification of minute defects. The working distance of the camera lens is set to 5 cm, based on the optical imaging formula. The calculation determines that, among which For the lens focal length, For object distance, To ensure a depth of field of approximately 0.5 mm at an aperture of F / 5.6, while meeting the minimum resolution requirement of 5 micrometers for the inspection system, the image distance was determined based on the typical dimensions of a chip inductor (1.0 mm × 0.5 mm) and the minimum resolution requirement of 5 micrometers. This distance aims to ensure that the physical size represented by a single pixel is less than 5 micrometers, thus meeting the accuracy requirements for capturing minute scratches and dents. The aperture was set to F / 5.6, a value determined through system optical parameter optimization experiments based on a depth-of-field calculation formula, to achieve a depth of field of approximately 0.5 mm at the working distance. This depth of field range was designed to be greater than the typical thickness of the chip inductor, ensuring that the entire upper surface features of the inductor element are within the sharp focal plane. Simultaneously, under these shooting conditions, camera calibration was performed using a checkerboard calibration method to determine the pixel size corresponding to each pixel, which is used to convert the pixel area into the physical area in subsequent defect area calculations.
[0026] Subsequently, the acquired surface image undergoes grayscale conversion and preliminary contrast adjustment. For example, the grayscale conversion uses a weighted average method to convert the color image to a grayscale image; the calculation formula for this method is as follows: in These represent the red, green, and blue component values of a pixel, respectively. This represents the calculated grayscale value. These weighting coefficients are determined based on the sensitivity characteristics of the human visual system to different wavelengths of light, enabling the generation of grayscale images that conform to human visual perception. Initial contrast adjustment uses a linear contrast stretching algorithm, the specific mapping function of which is: in Represents the original image in pixel coordinates grayscale value at that location This represents the output grayscale value of the pixel after contrast stretching. The threshold representing the lower limit of gray levels in the original image. For example, the upper limit threshold representing the gray levels of the original image is... , The values are 50 and 200 respectively. This algorithm enhances contrast by establishing a linear mapping between the grayscale values of the original image and the grayscale values of the output image. It linearly maps the grayscale levels of the original image from [50, 200] to the full range of [0, 255] to enhance subtle differences in brightness and darkness within the image. This grayscale range of 50 to 200 is determined based on statistical analysis of the grayscale histograms of 1000 typical chip inductor surface images. Statistical analysis shows that the grayscale values of normal chip inductor surface areas are mainly concentrated in the range of 80 to 180, while the grayscale values of defective areas are typically distributed below 30 or above 220. Setting the stretching range to 50 to 200 effectively enhances the contrast between normal surface areas and defective areas while avoiding excessive amplification of background noise, ultimately forming the initial image set.
[0027] In step S12, performing wavelet transform denoising on the initial image set to obtain a denoised image includes: The initial image set is subjected to wavelet transform processing to obtain decomposed images; Threshold filtering is applied to the high-frequency components in the decomposed image to remove noise, resulting in a filtered image. The filtered image is reconstructed by inverse wavelet transform to obtain the denoised image.
[0028] First, wavelet transform processing is performed on the initial image set. For example, the Daubechies 4 wavelet basis with fourth-order vanishing moments is selected to perform a three-level multi-scale decomposition of the image. This wavelet basis is chosen for its good localization properties in both the frequency and spatial domains, making it particularly suitable for capturing and characterizing the local singularity features exhibited by defects on the surface of sheet inductors. The wavelet transform decomposes the image into frequency components of different scales through convolution operations. Each level of decomposition produces one low-frequency approximate sub-band and three high-frequency detail sub-bands, corresponding to detail information in the horizontal, vertical, and diagonal directions, respectively. After three levels of decomposition, a decomposed image is obtained, including one low-frequency approximate sub-band and nine high-frequency detail sub-bands, fully characterizing the multi-scale features of the image from coarse to fine.
[0029] Subsequently, threshold filtering is applied to the high-frequency components in the decomposed image for noise reduction. Exemplarily, this invention uses a soft thresholding function, the mathematical expression of which is: in Represents wavelet coefficients, This represents the output wavelet coefficients after processing with the soft thresholding function. Indicates the noise reduction threshold. For a sign function, when hour ,when hour ; This is a function to find the maximum value. Represents wavelet coefficients The absolute value of . The denoising threshold T is determined using a general thresholding method based on image noise level estimation, and the calculation formula is: in, This represents the final calculated denoising threshold. The standard deviation of noise. Represents the natural logarithm function; This indicates the number of rows in the image, which is the number of pixels in the height direction of the image; This represents the number of columns in the image, i.e., the number of pixels in the image's width direction. The noise standard deviation is calculated by examining the diagonal high-frequency subbands of the first-level wavelet decomposition. The absolute median difference of the coefficients is used for robust estimation. This sub-band is chosen because it mainly contains noise and image edge information, and the inherent structural information of the image is usually weak in the diagonal direction, thus more accurately representing the image noise level. The specific calculation formula is as follows: in, This represents the estimated standard deviation of image noise. This represents the diagonal high-frequency subband of the first-level wavelet decomposition. The absolute median difference of all wavelet coefficients in the Gaussian distribution is 0.6745, which is the standard deviation scaling factor for the Gaussian distribution. For wavelet coefficients in each high-frequency subband, if their absolute value is less than a threshold... If the threshold value is greater than or equal to T, it is set to 0; if it is greater than or equal to T, it is processed using a soft thresholding function. This process can effectively suppress random noise introduced by camera sensor and illumination fluctuations, while preserving edge and texture features related to real defects to the maximum extent, resulting in a filtered image with noise suppressed.
[0030] Finally, the filtered image is reconstructed using inverse wavelet transform. For example, the same Daubechies 4 wavelet basis as used in decomposition is employed, and the wavelet coefficients of each layer and direction are reconstructed following the inverse process of decomposition. The reconstruction process begins with the coarsest low-frequency subband, progressively fusing the thresholded high-frequency detail subbands, and gradually recovering the spatial domain information of the image through a wavelet reconstruction algorithm, ultimately yielding a denoised spatial domain image. This image effectively suppresses random noise while fully preserving the main structural and defect features of the chip inductor surface, providing a high-quality image foundation for subsequent defect detection steps based on phase information.
[0031] In step S13, performing a Fourier transform on the denoised image and separating the phase components to generate a phase feature map includes: Perform a Fourier transform on the denoised image to obtain a frequency domain image; Separate the phase component from the frequency domain image; The phase component is subjected to an inverse Fourier transform to generate the phase feature map.
[0032] First, a two-dimensional fast Fourier transform is performed on the denoised image to obtain a frequency domain image. Specifically, let the input denoised image be... ,in and These represent the horizontal and vertical coordinates of a pixel in the image, respectively. This represents the grayscale intensity value at that coordinate point. Perform a two-dimensional fast Fourier transform to obtain the frequency domain representation. .in and These represent the horizontal and vertical frequency variables in the frequency domain, respectively, and are used to quantify the rate of spatial change in an image. It is a complex matrix, which can be represented as ,in This represents the real part of the frequency component. The frequency component is represented by the imaginary part, where j is the imaginary unit. The frequency domain image is thus derived from... The structure consists of elements that simultaneously contain amplitude information characterizing the intensity of that frequency component. And phase information that characterizes its spatial location.
[0033] Subsequently, the phase component is separated from the frequency domain image. The phase component... The calculation formula is: in, Represents the coordinates in the frequency domain Phase value at that point, It is the arctangent function. Representing frequency domain image exist The imaginary part of the value at the location, Representing frequency domain image exist The real part value at the point, separated This is the phase component, which precisely encodes the spatial relative relationships of structural features such as edges and contours in an image. Since scratches, cracks, and other defects on the surface of a chip inductor are essentially abnormal changes in the spatial structure of a local area, this phase component is a sensitive feature for capturing such defects.
[0034] Finally, an inverse Fourier transform is performed on the phase components to generate the phase feature map. Exemplarily, this process employs a phase-only reconstruction algorithm. Specifically, a new frequency-domain complex matrix is first constructed. Its construction method is as follows: in, This represents a constructed frequency-domain complex matrix containing only phase information; It is a cosine function; It is a sine function; Indicates the separated phase components; The imaginary unit is used. This expression is equivalent to a number with a constant amplitude of 1 and a phase of... The plural form. Then, regarding... Perform a two-dimensional inverse fast Fourier transform to convert the frequency domain back to the spatial domain. The result is a complex matrix, and its real part is taken as the final output.
[0035] In step S14, the step of analyzing the phase change amplitude using a convolutional neural network based on the phase feature map, identifying the defect region according to the phase change amplitude, and obtaining a defect location map includes: The phase feature map is input into a preset convolutional neural network, and the phase change amplitude of the phase feature map is analyzed by the convolutional neural network. The regions where the phase change amplitude exceeds a preset amplitude change threshold are identified and the defects are marked to obtain a defect location map.
[0036] First, the phase feature map is input into a preset convolutional neural network. For example, the convolutional neural network is a fully convolutional encoder network specifically designed for pixel-level defect localization, and its input is a single-channel phase feature map. The output is a defect confidence map of the same size as the input. ,in For pixel coordinates, This represents the probability of a defect existing at this coordinate. The network employs an encoder structure, with four sequentially connected convolutional blocks forming the core feature extractor. Each convolutional block contains: a convolutional layer using a 3×3 kernel with a stride of 1 and padding of 1 to ensure the spatial size of the output feature map remains constant; a batch normalization layer to accelerate network training and improve model stability; and a ReLU activation function layer to introduce non-linear transformation capabilities into the network. The number of output channels in the four convolutional blocks increases sequentially, specifically set to 16, 32, 64, and 128, to achieve multi-scale abstraction from low-level features to high-level semantic features. The network ends with a 1×1 convolutional layer, which maps the 128-dimensional high-dimensional features to a single channel, followed by a Sigmoid activation function to normalize the output value to the range [0,1]. This output value... This refers to the defect confidence level estimated by the network for each pixel location, which quantifies the degree of anomalousness of the phase information at that point, i.e., the amplitude of the phase change.
[0037] For example, the training process of the convolutional neural network is supervised learning. The training dataset is constructed as follows: five thousand images of the surface of sheet inductors covering different batches and production conditions are collected, and corresponding phase feature maps are generated after processing in steps S11 to S13. During the independent annotation of the original images by three experienced quality inspection engineers, the annotation work strictly follows the "GB / T General Specification for Surface Defect Detection of Electronic Components". The annotation result is a binary mask accurate to the pixel level. In this model, defective pixels are labeled with a value of 1, and normal pixels are labeled with a value of 0. The Fleiss-Kappa coefficient is used to evaluate the consistency among annotators, requiring a Kappa coefficient of at least 0.85. The final annotation results are determined based on a majority vote to eliminate subjective bias. During training, the phase feature map generated in the preceding steps is used as the network input. Using the corresponding labeled mask As a monitoring target Binary cross-entropy is used as the loss function. The calculation formula is as follows: in, This represents the calculated loss function value; This indicates the total number of samples contained in a training batch; This indicates that the loss terms of all samples in the batch are summed. Indicates the first The true label of each sample is either 0 or 1, where 0 represents a normal area and 1 represents a defective area. This indicates that the convolutional neural network represents the first... The defect confidence score predicted for each sample ranges from [0,1]. Let represent the natural logarithm function. This loss function aims to minimize the difference between the network predictions and the ground truth labels. The optimization process uses the Adam optimizer with an initial learning rate set to 0.001, and the first moment estimates the decay factor. Set to 0.9, second-order moment estimation attenuation factor Set to 0.999. The learning rate scheduling uses a cosine annealing strategy; within a training cycle, the learning rate... The changes follow the formula: in, Indicates the first The learning rate used in each iteration; This indicates the preset minimum learning rate of 0.0001; This indicates a preset initial learning rate of 0.001. Indicates the number of steps in the current iteration; This represents the preset total number of iterations within a training cycle; Represents the cosine function; This represents pi. Training is performed with a batch size of 16 until the model's loss function converges on an independent validation set randomly selected from the training data, representing 15% of the total dataset, and the intersection-over-union (IoU) ratio stabilizes above 0.85. At this point, the model is considered sufficiently trained and capable of accurately capturing defect patterns in the phase feature map.
[0038] Subsequently, regions where the phase change amplitude exceeds a preset amplitude change threshold are identified and marked as defects. For example, the preset amplitude change threshold... The threshold was set to 0.65. This threshold was determined based on experimental statistics: after model training, a separate threshold calibration dataset, containing 1000 samples with no overlap with the training and validation sets, was used specifically for threshold selection. The sample sources and defect type distributions were consistent with the training set. On this dataset, possible confidence thresholds from 0.1 to 0.9 were iterated over, with a step size of 0.05, to calculate the corresponding confidence level for each threshold. Fraction. The score is the harmonic mean of precision and recall, and its calculation formula is: in, Represents the calculated result The score ranges from [0,1], with higher values indicating better overall classification performance of the model. Indicates accuracy; Recall rate. Precision rate. The calculation formula is: in, This represents the number of true cases, that is, the number of samples that are actually defects and are correctly predicted as defects by the model. Precision represents the number of false positives, i.e., the number of samples that are actually normal regions but were incorrectly predicted as defects by the model. Recall measures the proportion of true defects among the defects predicted by the model. The calculation formula is: in, Indicates the actual number of instances; This represents the number of false negatives, i.e., the number of samples that are actually defects but were incorrectly predicted as normal by the model. Recall measures the proportion of all true defects that were successfully predicted by the model. Ultimately, the model selects... The confidence threshold of 0.65, corresponding to the maximum score of 0.89, is used as the preset amplitude variation threshold. This method aims to achieve an optimal balance between the number of defects identified by the model and its accuracy. In practical applications, the defect confidence map output by the network is used... To satisfy all The pixels are initially labeled as defect pixels. Subsequently, connected component analysis is performed on these binarized defect pixels, aggregating spatially adjacent defect pixels into independent connected regions, each representing a potential defect instance. Finally, a binarized defect localization map is generated. The white area, which has a value of 1, represents the identified defect, while the black background, which has a value of 0, represents the normal area.
[0039] In step S15, extracting local regions of potential defects from the defect location map and performing edge detection and phase-information-based boundary optimization on the local regions to obtain an enhanced defect map includes: Extract local regions of potential defects from the defect location map; Edge detection is performed on the extracted local region to obtain the initial boundary; Based on the phase information in the phase feature map, the initial boundary is optimized to generate the enhanced defect map.
[0040] First, local regions of potential defects are extracted from the defect location map. Exemplarily, this process aims to refine individual defect regions from the initially located binary map for subsequent detailed analysis. The specific execution flow is as follows: [The text then abruptly shifts to a different topic:] ...the defect location map... First, a morphological closing operation is performed using a 3×3 circular structuring element. Then, morphological dilation and erosion are performed sequentially to fill any small holes that may exist inside the defect area and smooth its irregular boundaries, thus obtaining a more complete region outline. Subsequently, regarding Perform connected component analysis to identify and label all independent connected regions, and calculate the area of each region in pixels. Set an area filtering threshold. The pixel threshold was determined based on the analysis of the noise characteristics of the imaging system. By analyzing one hundred defect-free sample images, it was found that over 95% of the false connected regions caused by noise had an area less than 15 pixels. Therefore, this value was set as the filtering standard. All images meeting this threshold were then filtered. The defective regions are preserved. Finally, for each preserved defective region, its minimum bounding rectangle is calculated, and the four boundaries of this rectangle are extended outward by 5 pixels to form an analysis region. Using this region as the scope, the denoised image obtained in step S12 is analyzed. and the phase feature map obtained in step S13 The corresponding image blocks are cropped out from the image, and the set of these image blocks is the extracted local region.
[0041] Next, edge detection is performed on the extracted local region to obtain the initial boundary. Exemplarily, this step employs the Canny edge detection algorithm, aiming to initially locate the contour of the defect from the local region of the denoised grayscale image. The algorithm execution process includes the following steps: First, a Gaussian filter is used to smooth the local region image to suppress image noise that may interfere with edge detection; the standard deviation of the Gaussian kernel... The value is set to 1.0. Next, the gradient magnitude and direction of the image are calculated using a 3×3 Sobel operator. Then, non-maximum suppression is applied to refine the gradient magnitude image, retaining only the local maxima in each gradient direction. Finally, a dual-threshold method is used for edge connection and discrimination: a low threshold is set... High threshold The threshold values were determined based on experimental statistics: on a training set containing 500 samples of various defects, the combination of high and low thresholds was systematically adjusted, and its ability to capture edges of various defects and its noise suppression effect were evaluated. Finally, a 30 / 90 combination was selected that achieved the best balance between recall and precision under the current imaging conditions. Gradient magnitude is higher than... The point is identified as a strong edge point and accepted immediately; due to... and Points between points are considered weak edge points and are only retained if they are connected to strong edge points. All the resulting edge points constitute the initial boundary. .
[0042] Then, based on the phase information in the phase feature map, the initial boundary is optimized. Exemplarily, the optimization algorithm is performed according to the following steps: for the initial boundary... Each boundary point on Take its 3×3 neighborhood at that point. Calculate the intrinsic phase feature map of this neighborhood. Standard deviation of the phase value of the corresponding pixel Set a phase consistency threshold. Radius. This threshold is determined based on dynamic algorithmic calculation: For a set of samples known to have clear, true edges, the phase standard deviation of the neighborhood of each edge point is statistically analyzed, and the fifth percentile of this distribution is taken as... This means that edge points below this value have a 95% probability of not being stable true edges. Based on this, boundary point filtering is performed: if... If the phase change at that point is too gradual and lacks the dramatic changes expected of a true edge, it is considered to originate from noise or texture interference, and therefore this point is removed from the boundary set; if If the condition is met, then that point is retained. After this phase consistency check, a more reliable set of optimized boundary points is obtained. Finally, regarding Morphological thinning algorithms, such as the Zhang-Suen thinning algorithm, are applied to iteratively remove peripheral pixels along the boundary lines until all boundary lines are single-pixel wide, thereby obtaining a precise, single-pixel-wide defect contour. To make this final outline The image is overlaid on the original local grayscale image to generate the enhanced defect map, which clearly highlights the precisely calibrated shape and location of the defect.
[0043] In step S16, the calculation of the phase difference between the defect region and the preset normal texture region in the enhanced defect map, and the defect classification based on the phase difference to obtain the defect classification result, includes: Calculate the phase difference between the defect region and the preset normal texture region in the enhanced defect map; If the calculated phase difference is greater than the preset classification threshold, the corresponding defect will be classified as a substantial defect. All substantive defects are summarized to form the defect classification result.
[0044] First, the phase difference between the defect region and the preset normal texture region in the enhanced defect map is calculated. For example, the preset normal texture region is defined by constructing a statistical benchmark model. The model is established as follows: One thousand confirmed defect-free chip inductor samples are selected from historical production data. Images are acquired from these samples, and steps S11 to S13 are performed to obtain their phase feature maps. On these phase feature maps, five 100×100 pixel image blocks are automatically and uniformly cropped from the center and surrounding areas of each sample, resulting in a total of five thousand normal texture map blocks. A joint histogram of pixel phase values in all normal texture map blocks is calculated. This histogram is divided into 256 intervals, covering the phase value range of [-π, π], and normalized to a probability distribution. ,in This is the histogram interval index. This is the phase statistical model of the normal texture region.
[0045] For each identified defect region in the enhanced defect map Extract all pixels within its phase feature map The corresponding phase values are calculated, and their normalized phase histograms are plotted. Then, calculations were performed. and The Bartholomew's distance between them is used as the phase difference. The formula for calculating the Bach distance is as follows: in, The Bartholomew's Law coefficient; The summation symbol indicates summation at index. Summing all intervals from 1 to 256; Indicates the first The defect area is in the first Normalized probability values for each histogram interval; Indicates the normal texture region in the th... Normalized probability values for each histogram interval; The calculated Bach distance; It is the natural logarithm function. The value of is in the range of [0, +∞), and the closer its value is to 0, the more likely it is a defective area. The more similar the phase distribution is to the normal texture, the larger the value, the more significant the difference in phase distribution.
[0046] Subsequently, if the calculated phase difference is greater than a preset classification threshold, the corresponding defect is classified as a substantial defect. For example, the preset classification threshold... The threshold is set to 0.45. This threshold is determined based on experimental statistics: an independent dataset containing 2,000 labeled samples reserved from historical production data is used, where the ratio of substantive defect samples to pseudo-defect samples is 1:1 to ensure balanced classifier training. The phase dissimilarity of each sample region in the dataset is calculated. The receiver operating characteristic (ROC) curve was plotted based on the actual labels. The Youden index on this ROC curve was calculated; the Youden index is the sum of sensitivity and specificity minus one. The value corresponding to the Youden index reaching its maximum of 0.82 was selected. A value of 0.45 is used as the preset classification threshold. This method ensures optimal overall classification performance when distinguishing between substantial defects and pseudo-defects. In actual discrimination, for any defect area... If its phase difference If the defect is found to be substantial, then the area is determined to be a substantial defect; otherwise, it is classified as a pseudo-defect and excluded.
[0047] Finally, all substantive defects are summarized to form the defect classification result. For example, this step integrates information on all areas determined to be substantive defects. The defect classification result is a structured data list, where each record corresponds to a substantive defect area. It should include at least the following fields: a unique identifier for the defect, its location coordinates in the external image, and the defect area calculated based on pixels. and its phase difference The classification results provide filtered and quantified data input for subsequent defect grouping and quality assessment.
[0048] In step S17, the substantive defects in the defect classification results are grouped using K-means clustering to determine the defect type distribution, including: Extract the feature vector for each substantive defect; Based on the feature vectors, defects are classified into different categories using K-means clustering. Based on the defect characteristics of each category, determine the corresponding defect type distribution.
[0049] First, the feature vector for each substantial defect is extracted. For example, the feature vector consists of six features to comprehensively characterize the geometry and phase properties of the defect. Let's assume a substantial defect region... Its eigenvectors The extraction method is as follows. The first feature is area. This is defined as the total number of pixels contained in the defective region. The second feature is the aspect ratio. The calculation method involves determining the ratio of the width to the height of the smallest bounding rectangle of the defect area. The third characteristic is the perimeter. It is defined as the total length of all pixels on the contour of the defect region. The fourth feature is the real area ratio. The calculation method involves calculating the area of the defective region. Its convex hull area The ratio of the two features is used to measure the compactness of the region versus the complexity of its contour. The fifth feature is the phase mean. The calculation method is to calculate the arithmetic mean of the phase values of all corresponding pixels in the phase feature map of the defective region. The sixth feature is the phase standard deviation. The calculation method involves calculating the standard deviation of the phase values of all corresponding pixels in the phase feature map for the defective region. Therefore, each defect... It is represented as a six-dimensional feature vector This vector contains the six eigenvalues mentioned above. This process is performed on all substantial defects to form a set of eigenvectors.
[0050] Subsequently, based on the feature vectors, the defects are divided into different categories using the K-means clustering algorithm. Exemplarily, this step employs an unsupervised K-means clustering algorithm to group the feature vector set in order to discover the inherent defect categories within the data. Before the algorithm is executed, the number of clusters K is first determined. The value of K is determined using the silhouette coefficient method. Specifically, K is assumed to range from 2 to 6, and K-means clustering is performed once for each candidate K value, calculating the average silhouette coefficient of all samples. The formula for calculating the average silhouette coefficient is the arithmetic mean of the silhouette coefficients of all samples, where the silhouette coefficient of a single sample is defined as the difference between the average distance of that sample to other samples in the same cluster and the average distance to all samples in the nearest neighbor cluster, divided by the larger of the two. Finally, the K that maximizes the average silhouette coefficient is selected as the optimal number of clusters. In practical applications, analysis of chip inductor defect data shows that K equal to 3 usually yields the optimal silhouette coefficient, which is consistent with prior knowledge of the three main defect types: scratches, cracks, and dents.
[0051] After determining the value of K, K-means clustering is formally executed. First, the six-dimensional feature vector set is Z-score standardized to eliminate biases caused by different feature dimensions and numerical ranges. The standardization formula is the original feature value minus the mean of that feature dimension, then divided by the standard deviation of that feature dimension. The clustering process initializes K cluster centers, and then iteratively executes the following two steps until convergence. The first step is the assignment step, assigning each standardized feature vector to the cluster with the nearest Euclidean distance to its nearest cluster center. The Euclidean distance is calculated as the square root of the sum of the squares of the differences between the two vectors in each dimension. The second step is the update step, recalculating the mean of all feature vectors in each cluster as the new cluster center. The termination condition for the iteration is set when the moving distance of all cluster centers is less than 10 to the power of -4, or when the number of iterations reaches 100. Finally, the algorithm outputs K defect groups.
[0052] Finally, based on the defect characteristics of each category, the corresponding defect type distribution is determined. For example, this step aims to assign specific physical semantics to the clusters automatically generated by the algorithm. After clustering, the numerical characteristics of the centroid vector of each final cluster are analyzed. By mapping the values of each dimension of the centroid vector of each cluster to the physical characteristics of known defect types, the corresponding defect type is determined. For example, if the centroid features of a cluster are small area, large aspect ratio, and high phase mean, the cluster is identified as a scratch defect. If the centroid features of a cluster are medium area, small solid area ratio, and large phase standard deviation, the cluster is identified as a crack defect. If the centroid features of a cluster are large area, aspect ratio close to 1, and low phase mean, the cluster is identified as a pit defect. After completing the semantic annotation of all clusters, the number of substantial defects contained in each cluster is counted to obtain the quantified defect type distribution. This distribution accurately describes the composition of various defects in the currently detected sample. For example, the output result can be expressed as 15 scratch defects, 8 crack defects, and 5 pit defects detected.
[0053] In step S18, comparing the defect type distribution with a preset quality acceptance standard to generate the final quality assessment result includes: The defect type distribution is compared with the preset quality acceptance standards, and the number and proportion of each type of defect are counted to obtain the defect statistics results. Based on the defect statistics, a quality assessment report is generated that includes detailed defect statistics and overall pass / fail determination.
[0054] First, the defect type distribution is compared with preset quality acceptance standards. For example, this step verifies the compliance of the defect distribution severity based on preset quantitative rules. The quality acceptance standards are stored in the system's rule base as one or more logical rules. These rules are formulated based on the electronic component surface defect judgment standards and the tolerance analysis of the chip inductor manufacturing process, and the allowable thresholds for each type of defect are determined through statistical analysis methods. Exemplary rules include, but are not limited to, the first rule, which stipulates that the cumulative number of scratch-type defects on a single component shall not exceed 3; the second rule, which stipulates that no crack-type defects are allowed on a single component; and the third rule, which stipulates that the total projected area of all pit-type defects on a single component shall not exceed 1% of the nominal surface area of the component. The system automatically compares the defect type distribution determined in step S17, including the quantity and area information of each type of defect, with each rule in the rule base.
[0055] Then, the number and proportion of various defects are counted to obtain the defect statistics. For example, this step quantifies and summarizes the defect status of the currently inspected component. The system accurately counts the occurrence frequency of scratch defects and records their specific location coordinates. The occurrence frequency of crack defects is also counted. Using the pixel-physical calibration relationship determined in step S11, the pixel area in the image is converted into physical area, and then the total area of all pit defects is calculated. This total area is then divided by the nominal surface area of the component to obtain its area proportion. For example, a typical statistical result might show that there are 3 scratch defects on the current component, no crack defects were detected, and the total area proportion of pit defects is 0.5%. These quantified data constitute the defect statistics.
[0056] Finally, based on the defect statistics, a quality assessment report containing detailed defect statistics and an overall pass / fail determination is generated. For example, this step integrates all information to generate the final quality decision and structured output. The quality assessment report is a data structure or document containing multiple fields. Its content first includes the unique identifier of the inspected component and the timestamp of the inspection task. Second, it lists detailed defect statistics, which at least includes the type, quantity, location information, and area percentage of each type of defect. Subsequently, the report outputs a conformity judgment against quality standards item by item, obtained by comparing the defect statistics with preset rules one by one. For example, it can output specific conclusions such as the number of scratches conforming to standards, the number of cracks conforming to standards, and the area of dents conforming to standards. Finally, the system performs a logical AND operation based on all conformity judgment results. If all rules are satisfied, an overall pass / fail determination is generated; if any one or more rules are not satisfied, an overall pass / fail determination is generated. This clearly structured and evidence-based quality assessment report can be directly used for product quality release decisions, production data traceability, and manufacturing process optimization analysis.
[0057] Reference Figure 2 The first embodiment of the present invention provides a flowchart of the core algorithm for implementing the method of the present invention. The flowchart clearly reveals the core algorithm process from phase feature extraction to defect localization.
[0058] The process begins with denoising the image. Through Fourier transform and phase separation, the structural information of the image is condensed into a phase feature map, which is the key difference between this invention and traditional amplitude analysis. Subsequently, the process enters an intelligent recognition stage based on a convolutional neural network. The network analyzes the amplitude of phase changes to accurately locate the defect region. Finally, a defect location map is output based on a threshold determination. The entire process constitutes a technical chain of frequency domain transformation → phase extraction → intelligent analysis → precise location, providing algorithmic support for the high-precision detection achieved in this invention.
[0059] Reference Figure 3 The second embodiment of the present invention provides a machine vision-based surface defect detection system for chip inductors, comprising: The image acquisition module is used to acquire the initial image set of the chip inductor; The image denoising module is used to perform wavelet transform denoising processing on the initial image set to obtain a denoised image. The phase extraction module is used to perform Fourier transform on the denoised image and separate the phase components to generate a phase feature map; The defect localization module is used to analyze the phase change amplitude based on the phase feature map using a convolutional neural network, identify the defect region according to the phase change amplitude, and obtain the defect localization map. The boundary enhancement module is used to extract local regions of potential defects from the defect location map, and perform edge detection and boundary optimization based on phase information on the local regions to obtain an enhanced defect map. The defect classification module is used to calculate the phase difference between the defect region and the preset normal texture region in the enhanced defect map, and to classify the defects based on the phase difference to obtain the defect classification result. The defect grouping module is used to group the substantive defects in the defect classification results using K-means clustering to determine the defect type distribution. The quality assessment module is used to compare the defect type distribution with preset quality acceptance standards and generate the final quality assessment result.
[0060] It should be noted that the machine vision-based chip inductor surface defect detection device provided in this embodiment of the invention is used to execute all the process steps of the machine vision-based chip inductor surface defect detection method in the above embodiment. The working principles and beneficial effects of the two are one-to-one, so they will not be described again.
[0061] This invention also provides an electronic device. The electronic device includes a processor, a memory, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the steps described in the method embodiments above.
[0062] For example, the computer program may be divided into one or more modules / units, which are stored in the memory and executed by the processor to complete the present invention. The one or more modules / units may be a series of computer program instruction segments capable of performing a specific function, which describe the execution process of the computer program in the electronic device.
[0063] The electronic device may be a desktop computer, laptop, handheld computer, or smart tablet, etc. The electronic device may include, but is not limited to, a processor and memory. Those skilled in the art will understand that the above components are merely examples of electronic devices and do not constitute a limitation on the electronic device. It may include more or fewer components than described above, or combine certain components, or different components. For example, the electronic device may also include input / output devices, network access devices, buses, etc.
[0064] The processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor can be a microprocessor or any conventional processor. The processor is the control center of the electronic device, connecting all parts of the electronic device via various interfaces and lines.
[0065] The memory can be used to store the computer programs and modules. The processor implements various functions of the electronic device by running or executing the computer programs and modules stored in the memory and by calling data stored in the memory. The memory may mainly include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function (such as sound playback function, image playback function, etc.), etc.; the data storage area may store data created according to the use of the mobile phone (such as audio data, phonebook, etc.). In addition, the memory may include high-speed random access memory, and may also include non-volatile memory, such as hard disk, RAM, plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, at least one disk storage device, flash memory device, or other volatile solid-state storage device.
[0066] Wherein, if the modules / units integrated in the electronic device are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments of the present invention can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include: any entity or device capable of carrying the computer program code, recording media, USB flash drives, portable hard drives, magnetic disks, optical disks, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the content included in the computer-readable medium can be appropriately added or removed according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electrical carrier signals and telecommunication signals.
[0067] It should be noted that the system embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Furthermore, in the accompanying drawings of the system embodiments provided by this invention, the connection relationships between modules indicate that they have communication connections, which can be specifically implemented as one or more communication buses or signal lines. Those skilled in the art can understand and implement this without any creative effort.
[0068] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above descriptions are merely specific embodiments of the present invention and are not intended to limit the scope of protection of the present invention. In particular, it should be noted that any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention for those skilled in the art.
Claims
1. A method for detecting surface defects in chip inductors based on machine vision, characterized in that, include: Obtain the initial image set of the chip inductor; The initial image set is subjected to wavelet transform denoising processing to obtain a denoised image; Perform a Fourier transform on the denoised image and separate the phase components to generate a phase feature map; Based on the phase feature map, the phase change amplitude is analyzed by a convolutional neural network, and the defect region is identified according to the phase change amplitude to obtain a defect location map; Local regions of potential defects are extracted from the defect location map, and edge detection and boundary optimization based on phase information are performed on the local regions to obtain an enhanced defect map. Calculate the phase difference between the defect region and the preset normal texture region in the enhanced defect map, and classify the defects based on the phase difference to obtain the defect classification result; The substantive defects in the defect classification results are grouped using K-means clustering to determine the defect type distribution; The defect type distribution is compared with the preset quality acceptance standard to generate the final quality assessment result.
2. The method for detecting surface defects of chip inductors based on machine vision according to claim 1, characterized in that, The acquisition of the initial image set of the chip inductor includes: Surface images of chip inductors are acquired using high-resolution industrial cameras; The acquired surface images are subjected to grayscale conversion and preliminary contrast adjustment to form the initial image set.
3. The method for detecting surface defects of chip inductors based on machine vision according to claim 1, characterized in that, The step of performing wavelet transform denoising on the initial image set to obtain a denoised image includes: The initial image set is subjected to wavelet transform processing to obtain decomposed images; Threshold filtering is applied to the high-frequency components in the decomposed image to remove noise, resulting in a filtered image. The filtered image is reconstructed by inverse wavelet transform to obtain the denoised image.
4. The method for detecting surface defects of chip inductors based on machine vision according to claim 1, characterized in that, The step of performing a Fourier transform on the denoised image and separating the phase components to generate a phase feature map includes: Perform a Fourier transform on the denoised image to obtain a frequency domain image; Separate the phase component from the frequency domain image; The phase component is subjected to an inverse Fourier transform to generate the phase feature map.
5. The method for detecting surface defects of chip inductors based on machine vision according to claim 1, characterized in that, The step of analyzing the phase change amplitude using a convolutional neural network based on the phase feature map, identifying the defect region according to the phase change amplitude, and obtaining a defect location map includes: The phase feature map is input into a preset convolutional neural network, and the phase change amplitude of the phase feature map is analyzed by the convolutional neural network. The regions where the phase change amplitude exceeds a preset amplitude change threshold are identified and the defects are marked to obtain a defect location map.
6. The method for detecting surface defects of chip inductors based on machine vision according to claim 1, characterized in that, The process of extracting local regions of potential defects from the defect location map and performing edge detection and phase-information-based boundary optimization on these local regions to obtain an enhanced defect map includes: Extract local regions of potential defects from the defect location map; Edge detection is performed on the extracted local region to obtain the initial boundary; Based on the phase information in the phase feature map, the initial boundary is optimized to generate the enhanced defect map.
7. The method for detecting surface defects of chip inductors based on machine vision according to claim 1, characterized in that, The calculation of the phase difference between the defect region and the preset normal texture region in the enhanced defect map, and the classification of defects based on the phase difference to obtain the defect classification result, includes: Calculate the phase difference between the defect region and the preset normal texture region in the enhanced defect map; If the calculated phase difference is greater than the preset classification threshold, the corresponding defect will be classified as a substantial defect. All substantive defects are summarized to form the defect classification result.
8. The method for detecting surface defects of chip inductors based on machine vision according to claim 1, characterized in that, The substantive defects in the defect classification results are grouped using K-means clustering to determine the defect type distribution, including: Extract the feature vector for each substantive defect; Based on the feature vectors, defects are classified into different categories using K-means clustering. Based on the defect characteristics of each category, determine the corresponding defect type distribution.
9. The method for detecting surface defects of chip inductors based on machine vision according to claim 1, characterized in that, The step of comparing the defect type distribution with preset quality acceptance standards to generate the final quality assessment result includes: The defect type distribution is compared with the preset quality acceptance standards, and the number and proportion of each type of defect are counted to obtain the defect statistics results. Based on the defect statistics, a quality assessment report is generated that includes detailed defect statistics and overall pass / fail determination.
10. A machine vision-based surface defect detection system for chip inductors, characterized in that, include: The image acquisition module is used to acquire the initial image set of the chip inductor; The image denoising module is used to perform wavelet transform denoising processing on the initial image set to obtain a denoised image. The phase extraction module is used to perform Fourier transform on the denoised image and separate the phase components to generate a phase feature map; The defect localization module is used to analyze the phase change amplitude based on the phase feature map using a convolutional neural network, identify the defect region according to the phase change amplitude, and obtain the defect localization map. The boundary enhancement module is used to extract local regions of potential defects from the defect location map, and perform edge detection and boundary optimization based on phase information on the local regions to obtain an enhanced defect map. The defect classification module is used to calculate the phase difference between the defect region and the preset normal texture region in the enhanced defect map, and to classify the defects based on the phase difference to obtain the defect classification result. The defect grouping module is used to group the substantive defects in the defect classification results using K-means clustering to determine the defect type distribution. The quality assessment module is used to compare the defect type distribution with preset quality acceptance standards and generate the final quality assessment result.