Visual inspection method for iron accessory coating quality suitable for mass production

CN122989537APending Publication Date: 2026-10-27ZHONGYA ELECTRICAL EQUIP MANCHENG COUNTY
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202610899875.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-22
Publication Date
2026-10-27

AI Technical Summary

Technical Problem

[0006]为了解决现有技术无法在抑制高频机械振动的同时,有效保留微观缺陷特征的问题,本发明提出适用于批量生产的铁附件镀层质量视觉检测方法,该方法包括:

Benefits of technology

本发明通过机理建模,去除了镀锌层表面的镜面高光,使微小漏镀点、白锈等缺陷在漫反射图上清晰显现,降低了漏检率;并且通过将底层机电运行参数与图像频域相映射,在去除振动伪影的同时,完整保留了高频的真实缺陷形貌,确保了批量生产线高节拍、无人化的实时质量拦截需求。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122989537A_ABST
    Figure CN122989537A_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of metal quality detection, and particularly relates to a visual detection method for plating quality of iron accessories suitable for batch production. The method comprises the following steps: obtaining an original gray matrix of the iron accessories and a running pulse of the motor, converting the pulse into displacement to resample the image, obtaining a calibrated gray matrix and calculating a mechanical reference frequency; constructing a frequency domain optimization window based on the mechanical reference frequency and a transmission belt slip parameter, locating a drift frequency point and performing a notch cut to obtain a denoising gray matrix; calculating a local principal curvature based on the denoising gray matrix, constructing a reflection model to separate a specular reflection component, and obtaining a diffuse reflection component image; extracting an abnormal connected domain and calculating a defect area, performing quality judgment according to the defect area, issuing a level signal to an executing mechanism based on the judgment result, and removing unqualified products. The present application utilizes electromechanical mapping to reduce the interference of mechanical vibration on visual detection, and realizes high-precision defect detection of complex reflective components.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of metal quality inspection technology, and specifically to a visual inspection method for the coating quality of iron accessories suitable for mass production. Background Technology

[0002] With the rapid development of smart grids and power transmission and distribution projects, the surface quality requirements for mass-produced galvanized iron accessories, such as U-bolts, suspension clamps, and tension clamps, are becoming increasingly stringent. These iron accessories are usually produced using hot-dip galvanizing to achieve long-term corrosion protection. However, because the hot-dip galvanized layer forms unique zinc flower grain boundaries after cooling and crystallization, its surface has strong metallic mirror reflection characteristics. In addition, the workpiece itself has complex three-dimensional bending and threaded structures. In the machine vision quality screening process of automated production lines, coaxial supplementary lighting or ring lighting will produce dazzling high-brightness spots on these complex curved surfaces. Under these local high lights, tiny unplated spots, white rust, oxide black spots, or micro-crack defects are easily masked, leading to false alarms and missed alarms in the vision system.

[0003] Chinese patent application CN116071315A discloses a machine vision-based method and system for detecting visible defects in products. It points out that existing visual inspection systems suffer from low signal-to-noise ratios due to multiple factors such as industrial environment, production processes, and noise, making it difficult to detect weak defect signals and effectively distinguish them from noise. To address the problem of strong reflective masking on metal surfaces, the industry typically employs photometric reflectance separation algorithms. This involves performing second-order spatial partial differential operations on two-dimensional grayscale images, constructing a Hessian matrix to extract the maximum eigenvalue, thereby obtaining accurate local principal curvature. Subsequently, a classical optical reflectance model is used to strip away specular reflections. For example, Chinese patent application CN113421263A discloses a method, device, medium, and computer program for detecting defects in parts. This method predicts defects on complex part surfaces by constructing priors.

[0004] However, in mass industrial production, iron attachments are densely placed on flexible conveyor belts driven by AC asynchronous motors and move at high speeds. Industrial cameras need to perform high-frequency dynamic shooting. The high-frequency rotation of the motor spindle and the periodic meshing of the reduction gears will generate micro-vibrations, leaving periodic motion blur on the image. The second-order partial differential operation of the Hessian matrix is ​​mathematically sensitive to high-frequency signals. If the principal curvature is directly extracted from the image containing motion blur, the tiny mechanical vibrations will be misjudged as severe surface deformation, ultimately leading to a large number of false alarms.

[0005] To suppress this vibration amplification effect, existing technologies apply a strong spatial low-pass smoothing filter to the global image. However, this smooths out the high-frequency geometric edges of real, tiny-diameter plating defects or white rust spots, leading to missed detections. Furthermore, existing technologies also attempt to remove vibration noise in the image frequency domain using a fixed-frequency notch filter. However, in production lines, flexible rubber materials exhibit Young's modulus elastic deformation, and motors experience speed slip due to load. This results in a dynamic drift tolerance between the theoretical excitation frequency and the actual vibration frequency of the workpiece, making it impossible for a fixed notch filter to accurately locate the noise spectrum. Summary of the Invention

[0006] To address the problem that existing technologies cannot effectively preserve microscopic defect characteristics while suppressing high-frequency mechanical vibrations, this invention proposes a visual inspection method for the coating quality of iron accessories suitable for mass production. This method includes: S1. Obtain the original grayscale matrix of the transmission device's operating pulse and the iron attachment, convert the operating pulse into a displacement, resample the original grayscale matrix based on the displacement to obtain a calibration grayscale matrix, and calculate the mechanical reference frequency based on the operating pulse; S2. Obtain the transmission belt slip parameter, construct a local optimization window based on the mechanical reference frequency and the transmission belt slip parameter, locate the target spatial frequency point within the local optimization window, perform frequency domain notch removal on the target spatial frequency point to obtain a denoised grayscale matrix; S3. Calculate the local principal curvature based on the denoised grayscale matrix, construct a reflection model, calculate the specular reflection component, and obtain a diffuse reflection component map based on the denoised grayscale matrix and the specular reflection component; S4. Obtain a grayscale threshold, extract abnormal connected components from the diffuse reflection component map based on the grayscale threshold, calculate the defect area of ​​the abnormal connected components, and send a control signal to the actuator based on the defect area to remove defective products.

[0007] This invention acquires running pulses and converts them into displacement values ​​to resample images, eliminating image distortion caused by transmission belt speed fluctuations. Based on pulse calculation of the reference frequency and combined with slip parameters to construct an optimization window, it can dynamically locate vibration frequency points that drift due to the elastic deformation of the transmission belt, reducing motion blur while preserving the true edges of surface defects.

[0008] Further, obtaining the calibration grayscale matrix includes: acquiring the transmission parameters of the transmission device, combining the transmission parameters, mapping the accumulated operating pulses to the actual displacement of the conveyor belt, using the displacement as a reference coordinate system, performing spatial interpolation processing on the original grayscale matrix to generate the calibration grayscale matrix with uniform spatial spacing.

[0009] This invention maps the running pulses to the actual displacement and performs spatial interpolation accordingly, eliminating the nonlinear stretching of the image caused by uneven transmission speed, ensuring the spatial geometric rigidity of the calibration grayscale matrix, and providing a distortion-free image basis for subsequent frequency domain transformation and curvature calculation.

[0010] Furthermore, the calculation of the mechanical reference frequency includes: obtaining the rotation amount of the transmission device based on the operating pulse, determining the excitation period of the transmission device according to the rotation amount, and using the excitation period as the mechanical reference frequency that affects image jitter.

[0011] Further, locating the target spatial frequency point within the local optimization window includes: mapping the mechanical reference frequency to a nominal spatial frequency point on the image coordinate axis by combining the system parameters of the optical system; determining the local optimization window by using the nominal spatial frequency point as a reference and combining the transmission band slip parameter; extracting the spectral energy extreme point within the local optimization window, and defining the extreme point as the target spatial frequency point.

[0012] This invention determines the local optimization window by introducing the conveyor belt slip parameter, and extracts the extreme points of spectral energy within the window as the target frequency point. This effectively solves the problem of vibration frequency drift caused by belt elastic deformation and load changes in industrial sites. It can adaptively track noise spectrum lines, effectively improving the accuracy of noise reduction and on-site adaptability.

[0013] Further, obtaining the denoised grayscale matrix includes: converting the calibration grayscale matrix to the frequency domain to obtain a spectrum matrix; for the spectrum matrix, delineating a cut-off region centered on the target spatial frequency point, removing the spectral energy within the cut-off region, and converting the processed spectrum matrix back to the spatial domain to obtain the denoised grayscale matrix.

[0014] Further, the calculation of local principal curvature includes: calculating the spatial partial derivatives of the pixels in the denoised grayscale matrix, constructing a Hessian matrix using the spatial partial derivatives, extracting the feature parameters of the Hessian matrix, and determining the local principal curvature of the corresponding pixels based on the feature parameters.

[0015] This invention utilizes the spatial partial derivatives of the denoised image to construct the Hessian matrix and extracts feature parameters to determine the local principal curvature, which can effectively assess the degree of deformation on the surface of iron accessories and avoid misjudging mechanical vibration as surface defects.

[0016] Further, obtaining the diffuse reflection component map includes: using the local principal curvature as a normal deflection index, combining the reflection model and material characteristic parameters to calculate the specular reflection component, and removing the specular reflection component from the total pixel light intensity of the denoised grayscale matrix to obtain the diffuse reflection component map.

[0017] Further, calculating the defect area of ​​the abnormal connected component includes: extracting pixels with a grayscale threshold in the diffuse reflection component image and defining them as abnormal pixels; clustering spatially adjacent abnormal pixels to obtain the abnormal connected component; counting the number of pixels contained in the abnormal connected component to determine the defect area.

[0018] Furthermore, the visual inspection method for the coating quality of iron accessories suitable for mass production also includes: a preset area lower limit, wherein when the defect area is greater than the area lower limit, the iron accessory is determined to be unqualified.

[0019] Furthermore, the visual inspection method for the coating quality of iron accessories suitable for mass production also includes: calculating the delay time for the defective product to reach the execution station based on the running pulse, and sending the control signal to the execution mechanism when the delay time is reached to trigger the removal operation.

[0020] This invention uses continuously accumulating operating pulses to calculate the delay time for defective products to reach the execution station and triggers removal operations at regular intervals, ensuring that defective products flowing rapidly on the production line can be accurately isolated, thus improving the efficiency of quality screening.

[0021] The present invention has the following technical effects: This invention removes the specular highlights on the surface of the galvanized layer through mechanism modeling, making defects such as tiny unplated spots and white rust clearly visible on the diffuse reflection image, thus reducing the false negative rate. Furthermore, by mapping the underlying electromechanical operating parameters with the image frequency domain, vibration artifacts are removed while the true high-frequency defect morphology is fully preserved, ensuring the high-speed, unmanned real-time quality interception requirements of mass production lines. Attached Figure Description

[0022] Figure 1 This is a flowchart of a visual inspection method for the coating quality of iron accessories suitable for mass production, provided by an embodiment of the present invention. Figure 2 This is a comparison diagram of the effects of the prior art provided in the embodiments of the present invention and the present invention. Detailed Implementation

[0023] This invention provides a visual inspection method for the coating quality of iron accessories suitable for mass production, referring to... Figure 1 This includes steps S1-S4: S1: Data Acquisition and Preprocessing.

[0024] Specifically, the original grayscale matrix of the transmission device's operating pulse and the iron attachment is obtained, the operating pulse is converted into a displacement, the original grayscale matrix is ​​resampled based on the displacement to obtain a calibration grayscale matrix, and the mechanical reference frequency is calculated based on the operating pulse.

[0025] In terms of hardware environment, this embodiment uses a three-phase AC asynchronous motor as the core power source of the transmission device, which drives the rubber transmission belt through a reduction gear set. In order to accurately capture the motion state, this embodiment preferably installs a high-precision incremental rotary encoder coaxially at the end of the drive roller shaft of the transmission belt. In terms of visual acquisition, this embodiment preferably sets up an industrial camera equipped with a global shutter directly above the production line and uses a coaxial diffuse reflection light source for supplementary lighting to highlight the surface texture.

[0026] When an iron attachment on the production line enters the effective field of view of an industrial camera, an external photoelectric sensor triggers the industrial camera to perform exposure. The photosensitive array inside the industrial camera receives the optical energy reflected from the surface of the iron attachment. After these energy signals are processed by the internal analog-to-digital converter circuit, the output is an original grayscale matrix composed of discrete pixels in length and width. At the same time that the industrial camera is capturing the image, a rotary encoder collects the running pulses generated by the rotation of the active roller in real time. The rotary encoder synchronously sends the continuously accumulated pulse signals to the memory of the control system.

[0027] After acquiring the raw data, spatial calibration preprocessing is performed. Since industrial conveyor belts cannot maintain an absolutely uniform speed due to load fluctuations, if the raw grayscale matrix is ​​processed directly, small speed jitters will cause nonlinear stretching or compression deformation of the image. In order to eliminate this geometric distortion, the radius of the active roller of the conveyor belt and the transmission ratio of the reduction gear are obtained in advance. The total number of collected running pulses is combined with the above transmission parameters and proportionally converted to obtain the actual displacement of the conveyor belt.

[0028] Subsequently, based on the obtained displacement, an absolutely rigid reference coordinate system is constructed. Based on the uniformly distributed displacement nodes under this reference coordinate system, spatial interpolation processing is performed on the continuously acquired original grayscale matrix. Spatial resampling is completed by linearly weighting the grayscale values ​​of adjacent pixels. After resampling, a calibration grayscale matrix with uniform spatial spacing is output. Through the above operations, the discrete pulses in the time dimension are transformed into rigid coordinates in the spatial dimension, eliminating the interference of velocity fluctuations on image features.

[0029] After completing the spatial calibration, the number of running pulses per unit time is extracted, and the rotation of the motor spindle, i.e., the angular velocity, is calculated. Combined with the radius of the active roller and the transmission ratio of the reduction gear obtained in the previous step, the obtained angular velocity is converted into the linear velocity of the conveyor belt. At the same time, since the periodic rotor excitation force generated by the motor spindle when it is running at high speed is the main cause of mechanical vibration, this embodiment divides the obtained angular velocity by twice the pi to obtain the number of excitation cycles completed by the spindle per second. This number of excitation cycles is defined as the mechanical reference frequency that affects the high-frequency jitter of the image.

[0030] S2: Adaptive frequency domain filtering based on elastic slip compensation.

[0031] Specifically, the transmission band slip parameters are obtained, a local optimization window is constructed based on the mechanical reference frequency and the transmission band slip parameters, the target spatial frequency point is located within the local optimization window, and frequency domain notch removal is performed on the target spatial frequency point to obtain the denoised grayscale matrix.

[0032] First, perform a cross-dimensional mapping from electromechanical parameters to visual pixel coordinates; obtain the lateral magnification of the lens as specified by the manufacturer, as well as the single-pixel size of the internal photosensitive array; extract the mechanical reference frequency obtained in S1, divide it by the linear speed of the conveyor belt, and obtain the number of vibration cycles contained in each millimeter length; then, multiply the number of vibration cycles by the single-pixel size and divide it by the lateral magnification, thereby mapping a nominal spatial frequency point on the vertical coordinate axis of the image.

[0033] Next, a local optimization window is defined to track the true frequency. In heavy-duty production lines, rubber conveyor belts exhibit Young's modulus elastic stretching, which causes the actual excitation frequency transmitted to the iron attachments to deviate from the nominal spatial frequency. To determine this drift noise, the conveyor belt slip parameter needs to be obtained. This parameter is obtained through previous dynamic calibration experiments. The specific steps are as follows: In the initial stage of production line deployment, a laser displacement sensor is used to record the vibration frequency of the conveyor belt from no load to full load, and the maximum tolerance ratio of the vibration frequency deviating from the theoretical frequency is calculated. This ratio is used as the conveyor belt slip parameter. With the nominal spatial frequency as the center and the conveyor belt slip parameter as the length, a local optimization window is determined.

[0034] Subsequently, the digital image is converted to the frequency domain; the two-dimensional discrete Fourier transform module is called to convert the calibration grayscale matrix obtained in S1 to the frequency domain, generating a spectrum matrix containing high and low frequency energy coefficients. The local optimization window established above is located in the spectrum matrix. Based on the spectrum energy distribution in the window, local extremum extraction is performed to find the coordinates of the pole with the highest absolute value of energy amplitude. The coordinates of this pole are defined as the target spatial frequency point of the true drift.

[0035] After locking the target spatial frequency, notch filtering is performed on it. A circular cutoff area is delineated with the target spatial frequency as the center. In this embodiment, the range of the cutoff area is determined based on the frequency tolerance parameter of the power supply network. Since the power supply frequency of the industrial three-phase power grid fluctuates slightly at all times, such grid fluctuations will directly cause the rotor excitation frequency of the motor to broaden in a short period of time. First, the frequency fluctuation tolerance specified by the State Grid standard is obtained. In this embodiment, the extreme tolerance fluctuation band of ±0.5%Hz is preferred. The maximum frequency broadening bandwidth is calculated based on the tolerance fluctuation band. This bandwidth is mapped to the radius of the cutoff area to ensure that the cutoff area can both contain the noise drift caused by grid instability and reach the lower limit of the cutoff.

[0036] All spectral energy coefficients falling within the circular cut-off region are assigned a value of zero, while all spectral energy outside the cut-off region is retained. Finally, the two-dimensional discrete Fourier inverse transform module is called to transform the processed spectral matrix back into the spatial domain, resulting in a denoised grayscale matrix with periodic motion blur removed.

[0037] S3: Separation of standard second-order curvature derivative and reflection component.

[0038] Specifically, the local principal curvature is calculated based on the denoised grayscale matrix, a reflection model is constructed, the specular reflection component is calculated, and the diffuse reflection component map is obtained based on the denoised grayscale matrix and the specular reflection component.

[0039] First, the local principal curvature is extracted. Since S2 has removed the pseudo-steps caused by high-frequency vibration, the second-order spatial partial differential operation can be stably performed on the denoised grayscale matrix. Each pixel in the denoised grayscale matrix is ​​traversed, and the second-order partial derivatives in the horizontal direction, the second-order partial derivatives in the vertical direction, and the mixed partial derivatives of the pixel are calculated. Then, using the calculated three partial derivatives, a standard second-order Hessian matrix is ​​constructed, and the eigenvalue equation corresponding to the second-order Hessian matrix is ​​solved to calculate the eigenvalues. The eigenvalue with the largest absolute value is extracted. This largest eigenvalue is the local principal curvature of the pixel on the topological surface. This local principal curvature reflects the microscopic unevenness of the iron accessory surface and removes the false deformation caused by motor vibration.

[0040] Next, a classic optical reflection model is introduced for photometric calculation. Under constant illumination from a coaxial diffuse light source, the total light intensity of each pixel received by the industrial camera's photosensitive array is essentially a superposition of the ambient diffuse reflection component of the underlying material and the specular reflection component of the metal surface. According to the micro-facet optical scattering law, the intensity of the specular reflection component has an exponential decay relationship with the angle at which the micro-surface normal deviates from the incident light. Therefore, the extracted local principal curvature is used as a measure of the degree of normal deflection to calculate the specular reflection component.

[0041] In the specific calculation process, it is necessary to introduce the statistical variance constant characterizing the roughness of the standard qualified zinc layer and the specular high-gloss reflectance constant of the galvanized material. In this embodiment, it is preferable to perform static multi-point image sampling on the qualified standard galvanized test block with no surface defects before formal production, calculate the statistical variance of its local principal curvature, and use the calculation result as the above-mentioned statistical variance constant. At the same time, in this embodiment, it is preferable to extract the inherent reflectance value of the material from the factory by consulting the optical property manual of the standard hot-dip galvanized material as the above-mentioned specular high-gloss reflectance constant.

[0042] After obtaining the above parameters, the local principal curvature is squared and divided by the statistical variance constant. The resulting quotient is then subjected to a negative exponentiation operation. Subsequently, the result of the negative exponentiation operation is multiplied by the specular specular reflection constant to obtain the specular reflection component generated by the corresponding pixel area.

[0043] Finally, an energy subtraction operation is performed to subtract the specular reflection component from the total pixel intensity of the denoised grayscale matrix, thereby obtaining the diffuse reflection component after removing the interference of metallic reflection. The diffuse reflection components of all pixels are then recombined to obtain the diffuse reflection component map. In this component map, real surface defects that were originally covered by highlights, such as gray unplated substrates that have lost their metallic luster or white rust structures that produce diffuse scattering, all exhibit a high black-and-white grayscale contrast difference, which can effectively restore the microscopic geometric morphology of the defects.

[0044] S4: Morphological connectivity determination and removal of defective products.

[0045] Specifically, a grayscale threshold is obtained, and based on the grayscale threshold, abnormal connected components are extracted from the diffuse reflection component map. The defect area of ​​the abnormal connected components is calculated, and a control signal is sent to the actuator according to the defect area to remove defective products.

[0046] First, image segmentation is performed on the diffuse reflection component image output by S3. Since real micro-defects appear as high-contrast dark areas in the diffuse reflection component image, a global grayscale safety threshold needs to be preset for segmentation. In this embodiment, during the equipment debugging phase, diffuse reflection images of 100 qualified standard parts are collected and the average grayscale value of the background is calculated as the preset global grayscale safety threshold. All pixels in the diffuse reflection component image with grayscale values ​​lower than this threshold are marked as abnormal pixels. Subsequently, the eight-neighborhood scanning algorithm is used to traverse the image space and merge spatially adjacent abnormal pixels to form multiple independent abnormal connected regions. These connected regions directly correspond to discrete defects on the workpiece surface in terms of morphology.

[0047] Next, the defect area is calculated; the total number of pixels contained in each abnormal connected region is counted. In order to convert the number of pixels into area, the actual area of ​​a single pixel needs to be determined in advance. Combining the single pixel size of the photosensitive array obtained in S2 and the horizontal magnification of the lens, the actual area of ​​a single pixel is obtained through two-dimensional area conversion. The total number of pixels is multiplied by the actual area of ​​a single pixel to calculate the area of ​​each defect.

[0048] After the area calculation is completed, a quality judgment needs to be made. A judgment benchmark needs to be introduced. In this embodiment, the lower limit of the maximum allowable plating area specified in the national power fittings industry standard is used as the lower limit of the area. The area of ​​each defect obtained is compared with the lower limit of the area one by one. As long as the area of ​​any abnormal connected region is greater than the lower limit, the iron accessory on the current production line is judged to be a defective product.

[0049] Once a product is identified as defective, a hardware-level removal process is initiated. The total number of displacement pulses continuously accumulated by the conveyor belt spindle encoder at the current moment is queried. In order to accurately strike the defective product, the distance between the image capture center and the downstream defect removal center needs to be obtained in advance. Combining the current total number of displacement pulses, distance, and instantaneous linear velocity of the conveyor belt, the delay time required for the defective product to travel on the conveyor belt to the removal station is obtained.

[0050] A high-frequency clock countdown is initiated. When the clock reaches the specified delay time, a digital interrupt control signal is sent from the industrial communication bus to the programmable logic controller (PLC) in the actuator. Upon receiving the signal, the PLC closes its internal normally open relay and outputs an industrial control voltage. This control voltage instantly activates the high-power pneumatic solenoid valve in the pneumatic pipeline. The released high-pressure compressed gas is pushed into the high-speed sorting cylinder, which drives the steel push rod of the cylinder to extend. The push rod accurately hits the non-conforming iron parts in the flow and pushes them directly into the waste transfer box below the assembly line.

[0051] Figure 2 This is a comparison diagram of the effects of the prior art and the present invention provided in the embodiments of the present invention. It can be seen that the detection rates of the two are similar under no-load or extremely low-load conditions. However, as the dynamic load rate continues to rise, the prior art, due to the use of fixed frequency domain notch filtering, cannot determine the noise spectrum drifted by the elastic deformation of the belt, resulting in the omission of vibration noise or even the miscutting of the real high-frequency edge of the defect, and the detection rate decreases. In contrast, the present invention, based on the adaptive optimization mechanism of elastic slip parameters, can accurately cut off the real vibration frequency point no matter how severe the load conditions are, and the detection rate remains at a high and stable level within the load range.

Claims

1. A visual inspection method for the coating quality of iron accessories suitable for mass production, characterized in that, include: S1, acquire the original grayscale matrix of the transmission device's operating pulse and the iron attachment, convert the operating pulse into a displacement, resample the original grayscale matrix based on the displacement to obtain a calibration grayscale matrix, and calculate the mechanical reference frequency based on the operating pulse; S2, obtain the transmission band slip parameters, construct a local optimization window based on the mechanical reference frequency and the transmission band slip parameters, locate the target spatial frequency point within the local optimization window, perform frequency domain notch removal on the target spatial frequency point, and obtain a denoised grayscale matrix; S3. Calculate the local principal curvature based on the denoised grayscale matrix, construct a reflection model, calculate the specular reflection component, and obtain the diffuse reflection component map based on the denoised grayscale matrix and the specular reflection component. S4, obtain a grayscale threshold, extract abnormal connected components from the diffuse reflection component map based on the grayscale threshold, calculate the defect area of ​​the abnormal connected components, and send a control signal to the actuator according to the defect area to remove defective products.

2. The visual inspection method for the coating quality of iron accessories suitable for mass production according to claim 1, characterized in that, The process of obtaining the calibration grayscale matrix includes: acquiring the transmission parameters of the transmission device; combining the transmission parameters, mapping the accumulated operating pulses to the actual displacement of the conveyor belt; using the displacement as a reference coordinate system, performing spatial interpolation processing on the original grayscale matrix to generate the calibration grayscale matrix with uniform spatial spacing.

3. The visual inspection method for the coating quality of iron accessories suitable for mass production according to claim 1, characterized in that, The calculation of the mechanical reference frequency includes: obtaining the rotation amount of the transmission device based on the operating pulse, determining the excitation period of the transmission device according to the rotation amount, and using the excitation period as the mechanical reference frequency that affects image jitter.

4. The visual inspection method for the coating quality of iron accessories suitable for mass production according to claim 1, characterized in that, Locating the target spatial frequency point within the local optimization window includes: mapping the mechanical reference frequency to a nominal spatial frequency point on the image coordinate axis by combining the system parameters of the optical system; determining the local optimization window by using the nominal spatial frequency point as a reference and combining the transmission band slip parameter; extracting the spectral energy extreme point within the local optimization window, and defining the extreme point as the target spatial frequency point.

5. The visual inspection method for the coating quality of iron accessories suitable for mass production according to claim 1, characterized in that, The process of obtaining the denoised grayscale matrix includes: converting the calibration grayscale matrix to the frequency domain to obtain a spectrum matrix; for the spectrum matrix, defining a cut-off region centered on the target spatial frequency point, removing the spectral energy within the cut-off region, and converting the processed spectrum matrix back to the spatial domain to obtain the denoised grayscale matrix.

6. The visual inspection method for the coating quality of iron accessories suitable for mass production according to claim 1, characterized in that, The calculation of local principal curvature includes: calculating the spatial partial derivatives of pixels in the denoised grayscale matrix, constructing a Hessian matrix using the spatial partial derivatives, extracting feature parameters of the Hessian matrix, and determining the local principal curvature of the corresponding pixel based on the feature parameters.

7. The visual inspection method for the coating quality of iron accessories suitable for mass production according to claim 1, characterized in that, The process of obtaining the diffuse reflection component map includes: using the local principal curvature as a normal deflection index, combining the reflection model and material characteristic parameters, calculating the specular reflection component, removing the specular reflection component from the total pixel light intensity of the denoised grayscale matrix, and obtaining the diffuse reflection component map.

8. The visual inspection method for the coating quality of iron accessories suitable for mass production according to claim 1, characterized in that, Calculating the defect area of ​​the abnormal connected component includes: extracting pixels with a grayscale threshold in the diffuse reflection component image and defining them as abnormal pixels; clustering spatially adjacent abnormal pixels to obtain the abnormal connected component; counting the number of pixels contained in the abnormal connected component to determine the defect area.

9. The visual inspection method for the coating quality of iron accessories suitable for mass production according to claim 1, characterized in that, The method further includes: setting a lower limit for the area; when the defect area is greater than the lower limit for the area, the iron accessory is determined to be unqualified.

10. The visual inspection method for the coating quality of iron accessories suitable for mass production according to claim 1, characterized in that, The method further includes: calculating the delay time for the defective product to reach the execution station based on the running pulse, and sending the control signal to the execution mechanism when the delay time is reached to trigger the removal operation.

Citation Information

Patent Citations

  • Part defect detection method and device, medium and computer program product

    CN113421263A

  • Product visual defect detection method and system based on machine vision

    CN116071315A