A method for detecting surface defects of a magnetic tile

By employing attitude adjustment, a multi-camera system, and intelligent image processing, combined with high-pressure air blowing and soft brush cleaning, the efficiency and accuracy issues in the detection of defects on the surface of magnetic tiles have been resolved, achieving high-precision and standardized detection results.

CN122492618APending Publication Date: 2026-07-31ANHUI GUANGYAO MAGNETIC IND CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
ANHUI GUANGYAO MAGNETIC IND CO LTD
Filing Date
2026-05-08
Publication Date
2026-07-31

AI Technical Summary

Technical Problem

Existing methods for detecting surface defects in magnetic tiles are inefficient, lack precision, cannot adapt to tile orientation shifts, are not thoroughly cleaned, are prone to problems in image acquisition, are prone to misjudgment, lack a global attention mechanism, and have no standardized inspection reports, making it difficult to meet high-precision requirements.

Method used

By fixing the magnetic tiles and adjusting their attitude, a multi-camera system and ring and oblique LED light sources are built. Combined with high-pressure air blowing and soft brush cleaning, image preprocessing and multi-scale geometric analysis are performed. A lightweight convolutional neural network is used for defect identification to generate a standardized report.

Benefits of technology

It achieves high-precision, fully traceable magnetic tile defect detection, eliminates blind spots and image distortion, thoroughly cleans, and fully captures surface information, thereby improving detection efficiency and accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122492618A_ABST
    Figure CN122492618A_ABST
Patent Text Reader

Abstract

This invention discloses a method for detecting defects on the surface of magnetic tiles, relating to the field of visual inspection. The method includes: standardized image acquisition and preprocessing of the magnetic tile surface through positioning adjustment, air-blowing brush cleaning, and multi-camera collaborative imaging; preliminary localization of suspected defect areas via adaptive segmentation, edge detection, and morphological processing; extraction of geometric and grayscale features to construct feature vectors; defect identification and classification using a lightweight convolutional neural network with attention mechanism, outputting confidence scores and verification labels; and determining the pass / fail status of the magnetic tiles based on preset standards, generating a detailed inspection report. The advantages of this invention are: through fully automated operation, combined with precise posture adjustment, multi-camera collaborative acquisition, and image processing and recognition technologies, it achieves accurate defect localization, classification, and confidence score determination, balancing detection accuracy and efficiency, and generating standardized reports for full process traceability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of visual inspection, and in particular to a method for detecting defects on the surface of magnetic tiles. Background Technology

[0002] As a key component of permanent magnet motors, the surface quality of magnetic tiles directly affects the motor's performance and reliability. Traditional manual visual inspection methods are inefficient, susceptible to subjective factors, and lack stability, failing to meet the high precision and efficiency demands of modern industry. With the rapid development of machine vision and artificial intelligence technologies, vision-based automated defect detection methods have become a hot topic in industry research and application.

[0003] Current methods for detecting surface defects in magnetic tiles generally suffer from low accuracy, efficiency, and standardization. Most methods lack adaptive adjustment of the tile's posture, cannot correct its position using edge reference marks, and are prone to blind spots and image distortion due to tile posture shifts. Cleaning processes often employ a single method, failing to thoroughly remove stubborn oil and cutting residues, and lack real-time cleaning effect monitoring, allowing impurities to interfere with subsequent inspections. Image acquisition typically uses a single camera or light source, unsuitable for the curved surface of magnetic tiles, leading to issues like overexposure and underexposure, and failing to capture complete surface details. Preprocessing is simplistic, lacking optimization for uneven lighting and minor defects, resulting in poor defect edge detail. The identification process lacks global attention mechanisms and multi-scale geometric analysis, easily misjudging false defects and missing minor defects, and lacks clear confidence output and verification markers. Inspection reports lack standardized formats, hindering full-process traceability and failing to meet the demands for high-precision, standardized quality control of magnetic tiles. Summary of the Invention

[0004] To improve existing methods, a method for detecting defects on the surface of magnetic tiles is provided. This method achieves accurate defect location, classification, and confidence determination through fully automated operation, combined with precise attitude adjustment, multi-camera collaborative acquisition, and intelligent image processing and recognition technology. It balances detection accuracy and efficiency, and can generate standardized reports to achieve full traceability.

[0005] To achieve the above objectives, the technical solution adopted by the present invention is as follows:

[0006] A method for detecting surface defects in magnetic tiles, comprising:

[0007] The magnetic tile to be tested is fixed to the testing station, the reference mark on the edge of the magnetic tile is collected, and the horizontal angle and vertical height of the magnetic tile are adjusted by comparing with the standard contour to effectively collect the surface to be tested.

[0008] High-pressure air blowing and soft brushes work together to clean the surface of the magnetic tiles, removing dust, oil, and cutting residue, and the cleaning effect is monitored in real time.

[0009] A multi-camera collaborative system was built, equipped with ring and oblique LED light sources. The camera parameters were adjusted according to the reflective characteristics of the magnetic tile surface, and images of each surface of the magnetic tile were acquired synchronously.

[0010] The collected images of each surface of the magnetic tile are converted into grayscale images, which are then subjected to Gaussian filtering for noise reduction, improved homomorphic filtering to improve uneven lighting, and histogram equalization to enhance edges, resulting in a standardized grayscale image.

[0011] The candidate defect region and background are divided by adaptive threshold segmentation, and the contour of suspected defects is extracted by Canny edge detection. False defects are removed by morphological processing, and the coordinate information and contour information of the suspected defect region are output after initial localization.

[0012] Geometric and grayscale features are extracted for suspected defect areas. Multi-scale geometric analysis is used to extract details of minute defects, and the feature parameters are organized into feature vectors.

[0013] The feature vector is input into a lightweight convolutional neural network with a global attention module, compared with a preset defect feature template, and qualified and defective regions are identified and classified. The defect confidence score is output, and low-confidence regions to be reviewed are marked.

[0014] Based on the defect identification results, and in conjunction with preset standards, the system determines whether the magnetic tiles are qualified and generates a standardized report containing inspection details.

[0015] Preferably, the steps of fixing the magnetic tile to be tested to the testing station, collecting the reference mark on the edge of the magnetic tile, and adjusting the horizontal angle and vertical height of the magnetic tile by comparing it with the standard contour to effectively collect the surface to be tested specifically include:

[0016] The magnetic tile to be tested is transported to the testing station and fixed in place using a positioning clamp;

[0017] By collecting reference marks on the edge of the magnetic tile and comparing them with the preset standard contour of the magnetic tile, the horizontal angle and vertical height of the magnetic tile are adjusted so that the surface of the magnetic tile and the lens of the image acquisition device maintain a preset parallel distance and vertical angle, and all surfaces of the magnetic tile to be inspected are effectively collected, eliminating blind spots and image distortion caused by the posture deviation of the magnetic tile.

[0018] Preferably, the step of cleaning the surface of the magnetic tile by combining high-pressure air blowing with a soft brush to remove floating dust, oil stains, and cutting residue, and to monitor the cleaning effect in real time, specifically includes:

[0019] For the dust, oil stains and cutting residues that adhere to the surface of the magnetic tiles during production and transportation, a pretreatment method using high-pressure air blowing and soft brush cleaning is adopted.

[0020] High-pressure air blowers evenly sweep along the surface of the magnetic tile to remove surface dust and loose impurities, while soft brushes roll and wipe the curved surface of the magnetic tile at a preset gentle speed to remove oil stains and stubborn residues attached to the surface.

[0021] The cleaning process involves real-time observation of the cleaning effect until there are no cleaning residues or interfering substances on the surface of the magnetic tile.

[0022] Preferably, the construction of the multi-camera collaborative system, equipped with ring-shaped and oblique LED light sources, and the adjustment of camera parameters according to the reflective characteristics of the magnetic tile surface, and the synchronous acquisition of images of each surface of the magnetic tile specifically includes:

[0023] A multi-camera collaborative acquisition system was built, and multiple industrial cameras were evenly arranged around the inspection station according to the curved structure and size characteristics of the magnetic tiles.

[0024] The system is equipped with a ring-shaped LED light source and an oblique LED side light source. The ring-shaped LED light source provides uniformly diffused light to avoid exposure saturation caused by specular reflection on the magnetic tile surface, while the oblique LED side light source enhances the contrast between defect edges and the background.

[0025] All cameras are started simultaneously to capture images of the outer circular surface, inner circular surface, end face, and corners of the magnetic tile. During the acquisition process, the camera's exposure time and focal length are adjusted according to the reflective characteristics of different areas on the magnetic tile surface to obtain clear, complete images without blurring, overexposure, or underexposure.

[0026] Preferably, the step of converting the acquired images of each surface of the magnetic tile into grayscale images, performing Gaussian filtering for noise reduction, improved homomorphic filtering to improve uneven illumination, and histogram equalization to enhance edges, and outputting a standardized grayscale image specifically includes:

[0027] The acquired multi-view images are preprocessed to convert color images to grayscale images, thereby reducing the amount of data.

[0028] Gaussian filtering algorithm is used to denoise grayscale images. By smoothing the grayscale values ​​of the image, the interference of random noise on defect detection is eliminated, and the detailed features of the defect area are preserved.

[0029] By using an improved homomorphic filtering algorithm, the contrast between the defective area and the background is enhanced.

[0030] Histogram equalization enhances the details of defect edges, making the outlines of tiny defects clearer. After preprocessing, a standardized grayscale image is output.

[0031] Preferably, the step of dividing the candidate defect region and background through adaptive threshold segmentation, extracting the contour of suspected defects by combining Canny edge detection, removing false defects through morphological processing, completing the initial localization, and outputting the coordinate information and contour information of the suspected defect region specifically includes:

[0032] The adaptive threshold segmentation algorithm automatically determines the segmentation threshold based on the local gray-level variance of the image, and divides the preprocessed gray-level image into defect candidate regions and background regions.

[0033] The Canny edge detection algorithm is used to extract the edge contours of candidate defect regions and mark the locations of all suspected defects.

[0034] Morphological processing is used to remove noise areas and pseudo-defect areas that are too small, thus completing the initial localization of the defect area and outputting the coordinate and contour information of the suspected defect area.

[0035] Preferably, the step of extracting geometric and grayscale features for suspected defect areas, extracting details of minute defects using multi-scale geometric analysis, and organizing the feature parameters into feature vectors specifically includes:

[0036] For each suspected defect area after initial location, core feature parameters are extracted. These feature parameters include the geometric features and grayscale features of the defect. The geometric features include the area, perimeter, shape factor, and edge roughness of the defect. The perimeter and shape factor of the defect are calculated through edge contour analysis to determine the geometric shape of the defect.

[0037] Gray-scale features include the average gray-scale value, gray-scale variance, and gray-scale gradient of the defect area. By statistically analyzing the gray-scale values, the gray-scale distribution characteristics of the defect area can be distinguished to differentiate between different types of defects.

[0038] For minor defects, a multi-scale geometric analysis algorithm is used to extract detailed features, and all extracted feature parameters are organized into feature vectors.

[0039] Preferably, the step of inputting the feature vector into a lightweight convolutional neural network with a global attention module, comparing it with a preset defect feature template, identifying and classifying qualified and defective regions, outputting defect confidence scores, and marking low-confidence regions to be reviewed specifically includes:

[0040] Based on a lightweight convolutional neural network model, the extracted feature vectors are input into the trained convolutional neural network model, which embeds a global attention module to focus on capturing key information of defect features;

[0041] The convolutional neural network model identifies suspected defective regions by comparing them with a pre-set defect feature template, thus distinguishing between qualified and defective regions.

[0042] The defective areas are classified into corresponding defect types, and the confidence level of each defect is output. When the confidence level is lower than the preset threshold, it is marked as an area to be reviewed.

[0043] Preferably, the step of determining whether the magnetic tile is qualified based on the defect identification results and in accordance with preset standards, and generating a standardized report containing inspection details, specifically includes:

[0044] Based on the defect identification results and combined with the preset detection standards, the quality of the magnetic tiles is determined. Different defect types are set with qualification thresholds. For magnetic tiles whose size or quantity of a single defect exceeds the corresponding threshold or whose defect confidence level reaches the preset standard, they are judged as unqualified products.

[0045] Magnetic tiles with no defects or whose defects do not exceed the judgment threshold are judged as qualified products;

[0046] Generate standardized inspection reports that record the inspection time, inspection station, defect type, defect location, defect size, and confidence level information of the magnetic tiles.

[0047] Compared with the prior art, the advantages of the present invention are:

[0048] The positioning and acquisition stages boast extremely high precision. Through edge benchmark marking and adaptive posture adjustment of the magnetic tiles, blind spots and image distortion are completely eliminated. Combined with high-pressure air blowing and soft brushes for collaborative cleaning and real-time detection, impurities are avoided at the source, ensuring the cleanliness of the inspection substrate. The image acquisition and preprocessing workflow exhibits strong environmental adaptability. Multiple cameras working together, combined with ring and oblique LED light sources, can completely capture information from the entire surface of the magnetic tiles, including the inner and outer circles and end faces. Parameters are optimized for the reflective characteristics of curved surfaces. Subsequent processing, including grayscale conversion, Gaussian filtering, improved homomorphic filtering, and histogram equalization, effectively enhances the edge details of minute defects, improving image quality. Defect detection and recognition combine efficiency and accuracy. Adaptive threshold segmentation combined with Canny edge detection achieves initial defect localization. Morphological processing removes false defects, and multi-scale geometric analysis extracts minute defect details. This information is then input into a lightweight CNN with a global attention module for accurate classification and confidence output. Simultaneously, areas to be reviewed are marked, and finally, a standardized report containing all detection details is generated. This enables traceability and quantification of the entire inspection process, significantly improving the accuracy and efficiency of magnetic tile quality control. Attached Figure Description

[0049] Figure 1 This is a schematic diagram of the method proposed in this invention;

[0050] Figure 2 This is a schematic diagram of the magnetic tile positioning and attitude calibration proposed in this invention;

[0051] Figure 3 This is a schematic diagram of the pretreatment for cleaning the surface of the magnetic tile proposed in this invention;

[0052] Figure 4 This is a schematic diagram of the multi-view image acquisition proposed in this invention;

[0053] Figure 5 This is a schematic diagram of the image preprocessing proposed in this invention;

[0054] Figure 6 This is a schematic diagram of the initial location of the defect area proposed in this invention;

[0055] Figure 7 This is a schematic diagram of the defect feature extraction proposed in this invention;

[0056] Figure 8 This is a schematic diagram illustrating the defect identification and classification method proposed in this invention;

[0057] Figure 9 This is a schematic diagram illustrating the detection result determination and output proposed in this invention. Detailed Implementation

[0058] The following description is intended to disclose the invention and enable those skilled in the art to implement it. The preferred embodiments described below are merely examples, and other obvious variations will occur to those skilled in the art.

[0059] See Figure 1 As shown, a method for detecting defects on the surface of magnetic tiles includes:

[0060] Step 1: Fix the magnetic tile to be tested to the testing station, collect the reference mark on the edge of the magnetic tile, and adjust the horizontal angle and vertical height of the magnetic tile by comparing it with the standard contour to effectively collect the surface to be tested;

[0061] Step 2: Clean the surface of the magnetic tile by using high-pressure air blowing and soft brushes to remove floating dust, oil stains and cutting residue, and monitor the cleaning effect in real time;

[0062] Step 3: Build a multi-camera collaborative system, equipped with ring and oblique LED light sources, adjust camera parameters according to the reflective characteristics of the magnetic tile surface, and synchronously acquire images of each surface of the magnetic tile;

[0063] Step 4: Convert the collected images of each surface of the magnetic tile into grayscale images, then use Gaussian filtering to remove noise, improved homomorphic filtering to improve uneven lighting, and histogram equalization to enhance edges, and output a standardized grayscale image.

[0064] Step 5: Divide the candidate defect region and background by adaptive threshold segmentation, extract the contour of suspected defects by Canny edge detection, remove false defects by morphological processing, complete the initial localization and output the coordinate information and contour information of the suspected defect region;

[0065] Step 6: Extract geometric and grayscale features for suspected defect areas, extract details for minor defects using multi-scale geometric analysis, and organize the feature parameters into feature vectors;

[0066] Step 7: Input the feature vector into a lightweight convolutional neural network with a global attention module, compare it with the preset defect feature template, identify and classify qualified and defective regions, output the defect confidence score, and mark the low confidence region to be reviewed;

[0067] Step 8: Based on the defect identification results and in conjunction with preset standards, determine whether the magnetic tile is qualified and generate a standardized report containing inspection details.

[0068] See Figure 2 As shown, the magnetic tile to be tested is fixed to the testing station, and the reference mark on the edge of the magnetic tile is collected. By comparing with the standard contour, the horizontal angle and vertical height of the magnetic tile are adjusted. The surface to be tested is effectively collected, specifically including:

[0069] The magnetic tile to be tested is transported to the testing station and fixed in place using a positioning clamp;

[0070] By collecting reference marks on the edge of the magnetic tile and comparing them with the preset standard contour of the magnetic tile, the horizontal angle and vertical height of the magnetic tile are adjusted so that the surface of the magnetic tile and the lens of the image acquisition device maintain a preset parallel distance and vertical angle, and all surfaces of the magnetic tile to be inspected are effectively collected, eliminating blind spots and image distortion caused by the posture deviation of the magnetic tile.

[0071] Specifically, during the adjustment process, the edge reference mark image of the magnetic tile is acquired in real time, and the overlap between the adjusted contour and the standard contour is continuously compared until the deviation is less than the preset threshold. The positioning fixture maintains the current clamping state, and the magnetic tile attitude calibration is completed.

[0072] See Figure 3 As shown, the cleaning process utilizes a combination of high-pressure air blowing and soft brushes to remove dust, oil, and cutting residue from the surface of the magnetic tiles, with real-time monitoring of the cleaning effect. Specifically, this includes:

[0073] For the dust, oil stains and cutting residues that adhere to the surface of the magnetic tiles during production and transportation, a pretreatment method using high-pressure air blowing and soft brush cleaning is adopted.

[0074] High-pressure air blowers evenly sweep along the surface of the magnetic tile to remove surface dust and loose impurities, while soft brushes roll and wipe the curved surface of the magnetic tile at a preset gentle speed to remove oil stains and stubborn residues attached to the surface.

[0075] The cleaning process involves real-time observation of the cleaning effect until there are no cleaning residues or interfering substances on the surface of the magnetic tile.

[0076] Specifically, the high-pressure air blowing section uses dry, oil-free compressed air as the air source. After being processed by a pressure reducing and stabilizing device, the air source is delivered to four air nozzles that are evenly arranged around the inspection station. The air nozzles are driven by servo motors to move slowly along the curved surface of the magnetic tile. The movement trajectory is precisely matched with the contours of the outer, inner, and end faces of the magnetic tile. The blowing sequence is end face first, then outer surface, and then inner surface. The blowing time for each area can be automatically adjusted according to the visual monitoring results. The airflow pressure adopts a graded adjustment mode. Low-pressure blowing is used for floating dust, and medium-pressure blowing is used for loose impurities to avoid high-pressure airflow causing impurities to scratch the surface of the magnetic tile.

[0077] The soft brush cleaning section uses an arc-shaped soft brush adapted to the curved surface of the magnetic tile. The base is fixed on an arc-shaped bracket, which is driven by a stepper motor. It can roll and wipe the surface of the magnetic tile. The speed is steplessly adjustable and automatically adjusted according to the degree of oil and dirt adhesion on the surface of the magnetic tile. The soft brush works in conjunction with a high-pressure air blower. The area wiped by the brush is immediately blown away by the air blower to remove the wiped oil and stubborn residue in time.

[0078] See Figure 4 As shown, a multi-camera collaborative system was built, equipped with ring and oblique LED light sources. Camera parameters were adjusted according to the reflective properties of the magnetic tile surface, and images of each surface of the magnetic tile were acquired synchronously. Specifically, this included:

[0079] A multi-camera collaborative acquisition system was built, and multiple industrial cameras were evenly arranged around the inspection station according to the curved structure and size characteristics of the magnetic tiles.

[0080] The system is equipped with a ring-shaped LED light source and an oblique LED side light source. The ring-shaped LED light source provides uniformly diffused light to avoid exposure saturation caused by specular reflection on the magnetic tile surface, while the oblique LED side light source enhances the contrast between defect edges and the background.

[0081] All cameras are started simultaneously to capture images of the outer circular surface, inner circular surface, end face, and corners of the magnetic tile. During the acquisition process, the camera's exposure time and focal length are adjusted according to the reflective characteristics of different areas on the magnetic tile surface to obtain clear, complete images without blurring, overexposure, or underexposure.

[0082] Specifically, a collaborative working mode of ring LED light source and oblique LED side light source is adopted. The ring LED light source surrounds the lens of each camera and adopts a diffuse reflection light emission design, which can emit uniform and soft scattered light. The light evenly covers the surface of the magnetic tile and avoids the exposure saturation area caused by specular reflection on the surface of the magnetic tile. The oblique LED side light source is installed on both sides of the camera and at a 45° angle to the surface of the magnetic tile. The light intensity is automatically adjusted according to the reflective characteristics of the surface of the magnetic tile. The side light illumination enhances the grayscale contrast between the defect edge and the background, and captures tiny defects that are difficult to detect, such as fine cracks and micro-pores.

[0083] Once the system is set up, all cameras start synchronously and begin acquiring images in a preset order: first the outer circular surface, then the inner circular surface, then the two end surfaces, and finally the corners. Each camera acquires images of its assigned area without interruption or repetition. The camera's built-in image acquisition card captures image signals in real time and automatically adjusts the exposure time and focal length based on the reflective characteristics of different areas on the magnetic tile surface: for areas with strong reflectivity, the exposure time is appropriately shortened and the focal length sensitivity is reduced; for areas with weak reflectivity, the exposure time is extended and the focal length sharpness is improved, resulting in clear, complete images without blur, overexposure, underexposure, or distortion.

[0084] See Figure 5 As shown, the collected images of each surface of the magnetic tile are converted into grayscale images. These images are then subjected to Gaussian filtering for noise reduction, improved homomorphic filtering to improve uneven illumination, and histogram equalization to enhance edges. The resulting standardized grayscale image output includes:

[0085] The acquired multi-view images are preprocessed to convert color images to grayscale images, thereby reducing the amount of data.

[0086] Gaussian filtering algorithm is used to denoise grayscale images. By smoothing the grayscale values ​​of the image, the interference of random noise on defect detection is eliminated, and the detailed features of the defect area are preserved.

[0087] By using an improved homomorphic filtering algorithm, the contrast between the defective area and the background is enhanced.

[0088] Histogram equalization enhances the details of defect edges, making the outlines of tiny defects clearer. After preprocessing, a standardized grayscale image is output.

[0089] Specifically, a weighted average method is used for conversion. By assigning different weights to the pixel values ​​of the RGB channels of the color image, the grayscale value of each pixel is calculated, and a single-channel grayscale image is output after conversion. During the filtering process, an appropriate Gaussian convolution kernel is automatically generated based on the local noise distribution of the grayscale image. The convolution kernel performs weighted calculations on each pixel of the grayscale image by sliding through the image, smoothing the grayscale values ​​of the pixel and its neighboring pixels, eliminating random noise and light source interference generated during image acquisition. At the same time, by setting a filtering threshold, it is ensured that the detailed features of the defective area are not obscured by the smoothing process. After denoising, a smoothed grayscale image is output.

[0090] An improved homomorphic filtering algorithm is used to improve the problem of uneven image illumination. First, the grayscale image is converted to the frequency domain. By designing high-pass and low-pass filter templates, the illumination component and reflection component in the image are separated. The low-frequency illumination component is suppressed and the high-frequency reflection component is enhanced, thereby correcting the illumination difference in different areas of the image. In particular, for the problem of uneven illumination between the edge and center caused by the curved surface of magnetic tiles, the grayscale contrast between the defect area and the background is improved by adaptively adjusting the filter template parameters.

[0091] The improved homomorphic filtering formula is as follows:

[0092] in, This is the frequency domain output result after being weighted by the filtering function. The transfer function is the homomorphic filter. The frequency domain image is obtained by performing a two-dimensional Fourier transform on the original grayscale image f(x,y). These are frequency domain coordinates, corresponding to the spatial frequency of the image. This is the high-frequency gain coefficient. This is the low-frequency suppression coefficient. This represents the sharpening factor. Let be the Euclidean distance from the midpoint (u,v) in the frequency domain to the origin in the frequency domain. The cutoff frequency;

[0093] The grayscale histogram of the grayscale image is statistically analyzed, the number of pixels and cumulative probability of each grayscale level are calculated, and then the grayscale values ​​of the original grayscale image are redistributed through a grayscale mapping function to make the grayscale distribution of the image more uniform and increase the grayscale difference between the defect area and the background.

[0094] See Figure 6 As shown, the defect candidate region and background are divided by adaptive threshold segmentation, and the contours of suspected defects are extracted by Canny edge detection. False defects are removed through morphological processing, and the initial localization is completed, outputting the coordinate and contour information of the suspected defect region. Specifically, this includes:

[0095] The adaptive threshold segmentation algorithm automatically determines the segmentation threshold based on the local gray-level variance of the image, and divides the preprocessed gray-level image into defect candidate regions and background regions.

[0096] The Canny edge detection algorithm is used to extract the edge contours of candidate defect regions and mark the locations of all suspected defects.

[0097] Morphological processing is used to remove noise areas and pseudo-defect areas that are too small, thus completing the initial localization of the defect area and outputting the coordinate and contour information of the suspected defect area.

[0098] Specifically, the grayscale image is divided into several equally sized local image blocks. The size of each image block is adapted to the conventional size of defects on the surface of the magnetic tile. For each local image block, its local grayscale variance is calculated using a grayscale variance analysis algorithm. The segmentation threshold for the region is automatically determined based on the variance magnitude—a lower segmentation threshold is set for regions with larger grayscale variance, and a higher segmentation threshold is set for regions with smaller grayscale variance. Through this adaptive adjustment method, the preprocessed grayscale image is accurately divided into defect candidate regions and background regions, generating a binary image in which defect candidate regions are marked in white and background regions are marked in black, effectively eliminating background interference.

[0099] After segmentation, the Canny edge detection algorithm is activated to extract the edge contours of the defect candidate regions. The first step is to perform Gaussian smoothing on the binary image to further eliminate residual noise and avoid noise interference with edge extraction. The second step is to calculate the horizontal and vertical gradients of the image through the gradient calculation module to determine the direction and intensity of the edges. The third step is to use the non-maximum suppression algorithm to remove redundant pixels on the edges and retain clear and continuous edge contours. At the same time, a double threshold screening is used to retain high-confidence edges and remove low-confidence pseudo edges, marking the location of all suspected defect regions and outputting the contour coordinates of each suspected defect.

[0100] Morphological processing removes false defects and noise areas. The marked suspected defect areas are eroded. By using a preset erosion operator, noise points with too small an area and false defects with discontinuous edges, such as tiny white spots caused by image noise, are removed. Then, dilation processing is performed to restore the true outline of the defect area. Areas smaller than a preset range are removed by judging by an area threshold.

[0101] The processed suspected defect areas are summarized, and the coordinate information, outline shape and area size of each suspected defect are recorded to generate a preliminary defect location list, thus completing the preliminary location of the defect areas.

[0102] See Figure 7 As shown, geometric and grayscale features are extracted for suspected defect areas. Multi-scale geometric analysis is used to extract details from minute defects, and the feature parameters are organized into feature vectors, specifically including:

[0103] For each suspected defect area after initial location, core feature parameters are extracted. These feature parameters include the geometric features and grayscale features of the defect. The geometric features include the area, perimeter, shape factor, and edge roughness of the defect. The perimeter and shape factor of the defect are calculated through edge contour analysis to determine the geometric shape of the defect.

[0104] Gray-scale features include the average gray-scale value, gray-scale variance, and gray-scale gradient of the defect area. By statistically analyzing the gray-scale values, the gray-scale distribution characteristics of the defect area can be distinguished to differentiate between different types of defects.

[0105] For minor defects, a multi-scale geometric analysis algorithm is used to extract detailed features, and all extracted feature parameters are organized into feature vectors.

[0106] Specifically, the coordinate and contour information of the suspected defect area is received and output. Feature extraction is performed on each suspected defect area. Before extraction, each suspected defect area is cropped. Based on its coordinate information, an independent defect area image is accurately cropped from the standardized grayscale image. The cropping boundary exceeds the preset range of the defect contour. At the same time, the surrounding background area is removed to reduce interference from irrelevant information.

[0107] Geometric feature extraction uses a contour analysis module to accurately analyze the edge contour of the defect area. It employs a pixel counting method to calculate the defect area, traversing all pixels within the defect area, counting the number of effective pixels, and combining this with the correspondence between image pixels and actual dimensions to calculate the actual area of ​​the defect. A contour tracking algorithm traverses all pixels on the defect edge, calculates and sums the distances between adjacent pixels to obtain the perimeter of the defect. A shape factor formula is used to calculate the shape factor and determine the geometric shape of the defect. Finally, an edge roughness analysis algorithm calculates the deviation of pixels on the defect edge, quantifies the edge roughness, and distinguishes smooth defects.

[0108] Gray-scale feature extraction involves analyzing the gray-scale values ​​of the defect area image through a gray-scale statistics module. This module iterates through all pixels within the defect area, calculates the average gray-scale value of all pixels, and obtains the average gray-scale value of the defect area. The variance calculation formula is used to calculate the dispersion of the gray-scale values ​​in the defect area, resulting in the gray-scale variance, which reflects the gray-scale uniformity within the defect area. Finally, a gradient operator is used to calculate the gray-scale gradient of the defect area, quantifying the intensity of gray-scale changes between the defect edges and the background, further enhancing the difference in defect features.

[0109] See Figure 8 As shown, the feature vector is input into a lightweight convolutional neural network with a global attention module. It compares the feature vector with a preset defect feature template, identifies and classifies qualified and defective regions, outputs the defect confidence score, and marks low-confidence regions requiring further review. Specifically, this includes:

[0110] Based on a lightweight convolutional neural network model, the extracted feature vectors are input into the trained convolutional neural network model, which embeds a global attention module to focus on capturing key information of defect features;

[0111] The convolutional neural network model identifies suspected defective regions by comparing them with a pre-set defect feature template, thus distinguishing between qualified and defective regions.

[0112] The defective areas are classified into corresponding defect types, and the confidence level of each defect is output. When the confidence level is lower than the preset threshold, it is marked as an area to be reviewed.

[0113] Specifically, the trained lightweight convolutional neural network model is invoked. The model is built on the MobileNet lightweight architecture, which eliminates redundant network layers, reduces the amount of computation while ensuring recognition accuracy, adapts to real-time detection requirements, and embeds a global attention module to automatically focus on key information of defect features and filter out irrelevant feature interference.

[0114] After the model starts, the extracted defect feature vectors are fed into the model input layer one by one. The input layer performs a second normalization process on the feature vectors to eliminate the difference in the dimensions of different feature parameters. The feature vectors are then processed step by step through the model's convolutional layer and pooling layer. The convolutional layer extracts deep features from the feature vectors through a preset convolutional kernel, and the pooling layer performs dimensionality reduction on the extracted features to retain the core features. The global attention module works synchronously, and through weight allocation, it focuses on strengthening the weight of key defect features and weakens the influence of irrelevant features.

[0115] The model calls a pre-defined defect feature template library, which stores standard feature templates for common defects in magnetic tiles. Each template corresponds to a defect type and includes the typical geometric features and grayscale feature parameter range of that type of defect. The model uses a feature matching algorithm to compare the input feature vector with each defect template in the template library one by one, calculates the feature similarity, and determines the corresponding defect type if the similarity is higher than a preset threshold; if the similarity is lower than the threshold, it is temporarily listed as a suspected defect.

[0116] The model calculates the confidence level for each defect type based on the similarity of feature matching. The confidence level reflects the reliability of the identification results. A uniform confidence level threshold is set. When the confidence level of a defect type reaches or exceeds the threshold, the defect type is confirmed and the defect classification is completed. When the confidence level is below the threshold, the region is marked as a region to be reviewed. The information of the region to be reviewed is recorded synchronously, including the feature vector, matching results and confidence level.

[0117] See Figure 9 As shown, based on the defect identification results and combined with preset standards, the quality of the magnetic tiles is determined, and a standardized report containing inspection details is generated, specifically including:

[0118] Based on the defect identification results and combined with the preset detection standards, the quality of the magnetic tiles is determined. Different defect types are set with qualification thresholds. For magnetic tiles whose size or quantity of a single defect exceeds the corresponding threshold or whose defect confidence level reaches the preset standard, they are judged as unqualified products.

[0119] Magnetic tiles with no defects or whose defects do not exceed the judgment threshold are judged as qualified products;

[0120] Generate standardized inspection reports that record the inspection time, inspection station, defect type, defect location, defect size, and confidence level information of the magnetic tiles.

[0121] Specifically, judgment criteria are set, and corresponding acceptance thresholds are preset for each type of defect. The threshold settings are combined with the usage scenarios of magnetic tiles and industry testing standards, and a graded judgment logic is adopted: for critical defects that affect the performance of magnetic tiles, they are directly judged as unqualified; for non-critical defects, dual thresholds are set for single volume and quantity. If the volume of a single defect or the total number of defects exceeds the corresponding threshold, it is judged as unqualified.

[0122] Each magnetic tile is compared with a preset threshold for defect information. If a single magnetic tile has a defect whose size or quantity exceeds the corresponding threshold, or whose defect confidence level reaches the preset standard, it is immediately marked as a non-conforming product. If the magnetic tile has no defects, or the size and quantity of all defects do not exceed the corresponding threshold, and there is no area to be reviewed, it is marked as a qualified product. If there is an area to be reviewed, it is marked as a product to be reviewed, archived separately, and awaits manual review.

[0123] It should be noted that the order of the above embodiments of the present invention is merely for descriptive purposes and does not represent the superiority or inferiority of the embodiments. Furthermore, the above description focuses on specific embodiments of this specification. Additionally, the processes depicted in the accompanying drawings do not necessarily require a specific or sequential order to achieve the desired results. In some embodiments, multitasking and parallel processing are possible or may be advantageous.

[0124] The various embodiments in this specification are described in a progressive manner. The same or similar parts between the various embodiments can be referred to each other. Each embodiment focuses on describing the differences from other embodiments.

[0125] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A method for detecting surface defects in magnetic tiles, characterized in that, include: The magnetic tile to be tested is fixed to the testing station, the reference mark on the edge of the magnetic tile is collected, and the horizontal angle and vertical height of the magnetic tile are adjusted by comparing with the standard contour to effectively collect the surface to be tested. High-pressure air blowing and soft brushes work together to clean the surface of the magnetic tiles, removing dust, oil, and cutting residue, and the cleaning effect is monitored in real time. A multi-camera collaborative system was built, equipped with ring and oblique LED light sources. The camera parameters were adjusted according to the reflective characteristics of the magnetic tile surface, and images of each surface of the magnetic tile were acquired synchronously. The collected images of each surface of the magnetic tile are converted into grayscale images, which are then subjected to Gaussian filtering for noise reduction, improved homomorphic filtering to improve uneven lighting, and histogram equalization to enhance edges, resulting in a standardized grayscale image. The candidate defect region and background are divided by adaptive threshold segmentation, and the contour of suspected defects is extracted by Canny edge detection. False defects are removed by morphological processing, and the coordinate information and contour information of the suspected defect region are output after initial localization. Geometric and grayscale features are extracted for suspected defect areas. Multi-scale geometric analysis is used to extract details of minute defects, and the feature parameters are organized into feature vectors. The feature vector is input into a lightweight convolutional neural network with a global attention module, compared with a preset defect feature template, and qualified and defective regions are identified and classified. The defect confidence score is output, and low-confidence regions to be reviewed are marked. Based on the defect identification results, and in conjunction with preset standards, the system determines whether the magnetic tiles are qualified and generates a standardized report containing inspection details.

2. The method for detecting surface defects of a magnetic tile according to claim 1, wherein, The process of fixing the magnetic tile to be tested to the testing station, collecting the reference mark on the edge of the magnetic tile, and adjusting the horizontal angle and vertical height of the magnetic tile by comparing it with the standard contour, and effectively collecting the surface to be tested, specifically includes: The magnetic tile to be tested is transported to the testing station and fixed in place using a positioning clamp; By collecting reference marks on the edge of the magnetic tile and comparing them with the preset standard contour of the magnetic tile, the horizontal angle and vertical height of the magnetic tile are adjusted so that the surface of the magnetic tile and the lens of the image acquisition device maintain a preset parallel distance and vertical angle, and all surfaces of the magnetic tile to be inspected are effectively collected, eliminating blind spots and image distortion caused by the posture deviation of the magnetic tile.

3. The method for detecting surface defects in magnetic tiles according to claim 1, characterized in that, The process of cleaning the surface of the magnetic tiles using a combination of high-pressure air blowing and soft brushes to remove dust, oil, and cutting residue, with real-time monitoring of the cleaning effect, specifically includes: For the dust, oil stains and cutting residues that adhere to the surface of the magnetic tiles during production and transportation, a pretreatment method using high-pressure air blowing and soft brush cleaning is adopted. High-pressure air blowers evenly sweep along the surface of the magnetic tile to remove surface dust and loose impurities, while soft brushes roll and wipe the curved surface of the magnetic tile at a preset gentle speed to remove oil stains and stubborn residues attached to the surface. The cleaning process involves real-time observation of the cleaning effect until there are no cleaning residues or interfering substances on the surface of the magnetic tile.

4. The method for detecting surface defects in magnetic tiles according to claim 1, characterized in that, The construction of the multi-camera collaborative system, equipped with ring-shaped and oblique LED light sources, and the adjustment of camera parameters according to the reflective characteristics of the magnetic tile surface, and the synchronous acquisition of images of each surface of the magnetic tile specifically includes: A multi-camera collaborative acquisition system was built, and multiple industrial cameras were evenly arranged around the inspection station according to the curved structure and size characteristics of the magnetic tiles. The system is equipped with a ring-shaped LED light source and an oblique LED side light source. The ring-shaped LED light source provides uniformly diffused light to avoid exposure saturation caused by specular reflection on the magnetic tile surface, while the oblique LED side light source enhances the contrast between the defect edges and the background. All cameras are started simultaneously to capture images of the outer circular surface, inner circular surface, end face, and corners of the magnetic tile. During the acquisition process, the camera's exposure time and focal length are adjusted according to the reflective characteristics of different areas on the magnetic tile surface to obtain clear, complete images without blurring, overexposure, or underexposure.

5. The method for detecting surface defects in magnetic tiles according to claim 1, characterized in that, The process of converting the collected images of each surface of the magnetic tile into grayscale images, performing Gaussian filtering for noise reduction, improved homomorphic filtering to improve uneven illumination, and histogram equalization to enhance edges, and outputting a standardized grayscale image specifically includes: The acquired multi-view images are preprocessed to convert color images to grayscale images, thereby reducing the amount of data. Gaussian filtering algorithm is used to denoise grayscale images. By smoothing the grayscale values ​​of the image, the interference of random noise on defect detection is eliminated, and the detailed features of the defect area are preserved. By using an improved homomorphic filtering algorithm, the contrast between the defective area and the background is enhanced. Histogram equalization enhances the details of defect edges, making the outlines of tiny defects clearer. After preprocessing, a standardized grayscale image is output.

6. The method for detecting surface defects in magnetic tiles according to claim 1, characterized in that, The process of dividing the candidate defect region into the background through adaptive threshold segmentation, extracting the contour of suspected defects using Canny edge detection, removing false defects through morphological processing, completing the initial localization, and outputting the coordinate and contour information of the suspected defect region specifically includes: The adaptive threshold segmentation algorithm automatically determines the segmentation threshold based on the local gray-level variance of the image, and divides the preprocessed gray-level image into defect candidate regions and background regions. The Canny edge detection algorithm is used to extract the edge contours of candidate defect regions and mark the locations of all suspected defects. Morphological processing is used to remove noise areas and pseudo-defect areas that are too small, thus completing the initial localization of the defect area and outputting the coordinate and contour information of the suspected defect area.

7. The method for detecting surface defects in magnetic tiles according to claim 1, characterized in that, The process of extracting geometric and grayscale features from suspected defect areas, extracting details of minute defects using multi-scale geometric analysis, and organizing the feature parameters into feature vectors specifically includes: For each suspected defect area after initial location, core feature parameters are extracted. These feature parameters include the geometric features and grayscale features of the defect. The geometric features include the area, perimeter, shape factor, and edge roughness of the defect. The perimeter and shape factor of the defect are calculated through edge contour analysis to determine the geometric shape of the defect. Gray-scale features include the average gray-scale value, gray-scale variance, and gray-scale gradient of the defect area. By statistically analyzing the gray-scale values, the gray-scale distribution characteristics of the defect area can be distinguished to differentiate between different types of defects. For minor defects, a multi-scale geometric analysis algorithm is used to extract detailed features, and all extracted feature parameters are organized into feature vectors.

8. The method for detecting surface defects in magnetic tiles according to claim 1, characterized in that, The process of inputting feature vectors into a lightweight convolutional neural network with a global attention module, comparing them with a preset defect feature template, identifying and classifying qualified and defective regions, outputting defect confidence scores, and marking low-confidence regions requiring further review specifically includes: Based on a lightweight convolutional neural network model, the extracted feature vectors are input into the trained convolutional neural network model, which embeds a global attention module to focus on capturing key information of defect features; The convolutional neural network model identifies suspected defective regions by comparing them with a pre-set defect feature template, thus distinguishing between qualified and defective regions. The defective areas are classified into corresponding defect types, and the confidence level of each defect is output. When the confidence level is lower than the preset threshold, it is marked as an area to be reviewed.

9. The method for detecting surface defects in magnetic tiles according to claim 1, characterized in that, The process of determining whether a magnetic tile is qualified based on defect identification results and pre-set standards, and generating a standardized report containing inspection details, specifically includes: Based on the defect identification results and combined with the preset detection standards, the quality of the magnetic tiles is determined. Different defect types are set with qualification thresholds. For magnetic tiles whose size or quantity of a single defect exceeds the corresponding threshold or whose defect confidence level reaches the preset standard, they are judged as unqualified products. Magnetic tiles with no defects or whose defects do not exceed the judgment threshold are judged as qualified products; Generate standardized inspection reports that record the inspection time, inspection station, defect type, defect location, defect size, and confidence level information of the magnetic tiles.