A product quality detection method based on deep learning and machine vision

By constructing a multi-scale structural tensor group and a deep learning classification model, the problem of feature decoupling between the environmental interference field and the material defect field in the quality inspection of high reflectivity surface products was solved, and efficient inspection under complex lighting conditions was achieved.

CN121724983BActive Publication Date: 2026-04-24XIAMEN BOSHIYUAN MASCH VISION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
XIAMEN BOSHIYUAN MASCH VISION TECH CO LTD
Filing Date
2026-02-11
Publication Date
2026-04-24

AI Technical Summary

Technical Problem

Existing technologies struggle to effectively separate the characteristics of environmental interference fields and material defect fields in product quality inspection with high reflectivity surface features without relying on preset lighting models, leading to reduced inspection reliability, especially with insufficient ability to extract weak and singular signals against complex texture backgrounds.

Method used

By constructing a multi-scale structural tensor set, calculating the energy evolution rate and performing local directional energy suppression mapping, and combining it with a deep learning classification model, topological singularities and linear defects are identified, thereby achieving feature decoupling between the environmental disturbance field and the material defect field.

Benefits of technology

It improves the reliability of detection and the ability to extract weak defect features under complex lighting conditions, ensures the objectivity and accuracy of defect features, reduces the dependence on high-performance computing units, and has strong adaptability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121724983B_ABST
    Figure CN121724983B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of online monitoring of power supply and distribution circuit devices, and discloses a product quality detection method based on deep learning and machine vision, which comprises the following steps: acquiring discrete space distribution signals of the surface state of a controlled power supply and distribution physical entity, adopting multiple scale factors to construct a multi-scale structure tensor group based on gradient characteristics of sampling points to be analyzed, determining energy evolution rates of the multi-scale structure tensor group at different scales, determining regional attributes of the sampling points, executing local directional energy suppression mapping to peel off interference components, superimposing a virtual disturbance component matrix on the multi-scale structure tensor group, determining topological singular points according to a principal axis direction deflection vector, and filling a virtual gradient into an amplitude saturation connected domain by using a topological extrapolation algorithm constrained by a Laplace operator, so that blind source decoupling of an environmental interference field and a material defect field can be realized, a signal blind area caused by strong reflection can be compensated, and the detection precision of a power supply conducting component is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to a product quality inspection method based on deep learning and machine vision, belonging to the field of online monitoring technology for power supply and distribution circuit devices. Background Technology

[0002] Currently, in the production quality monitoring process of precision manufacturing and power distribution equipment components, surface quality inspection is selected as an important link to ensure the safe operation of power systems for workpieces with high reflectivity surface features. Industrial vision inspection systems typically use high-resolution cameras to acquire raw image data and combine them with image preprocessing algorithms to extract the physical features of the workpiece surface. In actual production environments and operating conditions, due to the anisotropic intrinsic properties of materials such as busbars and terminals, there are often complex ambient light field interferences in the raw images. When the light source shines on the polished or textured metal surface, it produces specular reflection spots with extremely high local energy. The grayscale distribution pattern of these spots highly overlaps with the micro-defect features such as scratches and dents that may exist on the workpiece surface in the spatial domain.

[0003] Existing technologies typically employ common methods such as linear filtering, global histogram equalization, or frequency domain filtering to suppress background noise and enhance target features. However, these approaches face inherent limitations in practical applications. When algorithms attempt to filter out non-stationary reflected light spots, they often result in the loss of geometric information at defect edges. If the filtering intensity is reduced to preserve weak defect features, artifacts generated by environmental interference fields can mask the true defects, leading to energy degeneracy in the feature space and consequently reducing detection reliability. Some solutions introduce deep convolutional neural networks to learn the mapping relationship between environmental noise and defect features through large-scale sample training. However, in scenarios with high real-time requirements, such as the inspection of power equipment components, these methods rely excessively on high-performance computing units, making it difficult to achieve millisecond-level feature conversion and response in mainstream embedded vision controllers. Most existing algorithms assume that image energy distribution is spatially independent, ignoring the dynamic differences in feature flow fields during multi-scale evolution. This creates a technical bottleneck for accurately separating heterogeneous features in the same direction under strong directional interference. To address these limitations, some industry players have attempted to introduce deep convolutional neural networks to learn the mapping relationship between environmental noise and defect features through large-scale sample training. However, in scenarios with extremely high real-time requirements, such as power equipment component inspection, these methods reveal an over-reliance on high-performance computing units. It is difficult to achieve millisecond-level feature transformation and response in mainstream embedded vision controllers. Furthermore, most existing algorithms assume that image energy distribution is spatially independent, ignoring the dynamic differences in feature flow fields during multi-scale evolution. This still presents a physical technical bottleneck for accurately separating heterogeneous features in the same direction under strong directional interference.

[0004] Therefore, the technical problem to be solved by this invention is how to achieve feature decoupling between environmental interference field and material defect field by mining the energy distribution law of local image space without relying on a preset lighting model, and improve the ability to extract weak and singular signals in complex texture backgrounds. Summary of the Invention

[0005] To address the problems mentioned in the background art, the technical solution of the present invention is as follows: A product quality inspection method based on deep learning and machine vision, comprising the following steps:

[0006] Step S101: Obtain the discrete spatial distribution signal characterizing the surface properties of the controlled power supply and distribution physical entity;

[0007] Step S102: Based on the gradient characteristics of the sampling points to be analyzed in the discrete spatial distribution signal, the first spatial scale factor is adopted. and the second spatial scale factor Construct a multi-scale structure tensor set;

[0008] Step S103: Calculate the first eigenvalue energy response corresponding to the multi-scale structure tensor group respectively. and By calculating the energy response of the first eigenvalue minus The difference and divided by To determine the energy evolution rate of multiscale structure tensors at different spatial scales;

[0009] Step S104: Compare the energy evolution rate with a preset decay threshold to determine whether the region to be analyzed is a linear defect region or an intrinsic texture region.

[0010] Step S105: Based on the judgment result, perform local directional energy suppression mapping on the discrete spatial distribution signal to remove interference components that are in the same direction as the background texture of the controlled power supply and distribution physical entity.

[0011] Step S106: Superimpose virtual perturbation component matrices onto the multi-scale structure tensor set, calculate the direction deflection vector of the principal axis direction of the multi-scale structure tensor set before and after superimposing the virtual perturbation component matrix, and determine the topological singularity based on the direction deflection vector.

[0012] Step S107: Extract the boundary energy flow direction of the amplitude-saturated connected domain in the discrete spatial distribution signal, and use the topological extrapolation algorithm with Laplace operator as constraint to fill the virtual gradient into the amplitude-saturated connected domain.

[0013] Step S108: Based on the feature space filled with virtual gradients, a pre-trained deep learning classification model is used to identify topological singularities and linear defects, and output detection results that characterize the quality status of controlled power supply and distribution physical entities.

[0014] Preferably, in step S104, the determination includes: when the energy evolution rate exceeds a preset attenuation threshold, determining that the region to which the sampling point to be analyzed belongs carries linear defect information; when the energy evolution rate is lower than or equal to the preset attenuation threshold, determining that the region to which the sampling point to be analyzed belongs is an intrinsic texture region; for the region determined to carry linear defect information, performing nonlinear compensation gain arbitration, and correcting the gain coefficient of the local directional energy suppression mapping based on the result of the nonlinear compensation gain arbitration, so as to maintain the characteristic sharpness of the defect edge on the surface of the controlled power supply and distribution physical entity during the signal transformation process.

[0015] Preferably, in step S102, the first spatial scale factor The second spatial scale factor is used to capture the signal singularity characteristics of the sampling points under analysis at the single-point level. Used to describe regional periodic intrinsic textures; energy evolution rate is used to distinguish between steady evolution characteristics caused by material properties and gradient decay characteristics caused by linear defects on the surface of a controlled power supply and distribution physical entity.

[0016] Preferably, in step S106, the determination of topological singularities includes: calculating the local flux divergence D of the normalized gradient flow field, wherein the local flux divergence D satisfies the formula: Where D is the local flux divergence. For the normalized gradient vector, It is a discrete gradient operator; based on the local flux divergence D, it identifies the difference in the stimulated response of the surface of the controlled power supply and distribution physical entity to the virtual disturbance component matrix, so as to extract the slowly varying defects in the discrete spatial distribution signal space that are in a state of flooding.

[0017] Preferably, in step S107, the topological extrapolation algorithm includes: identifying amplitude-saturated connected regions in discrete spatial distribution signals, using the energy flow direction at the boundary of the amplitude-saturated connected region as a boundary constraint condition, and numerically filling the interior of the amplitude-saturated connected region using the Laplacian operator to compensate for the signal blind zone caused by the strong reflection interference formed by the bright surface.

[0018] Preferably, the deep learning classification model is trained on a training set containing high-reflectivity interference samples and intrinsic texture samples; the deep learning classification model is used to extract multidimensional semantic features of discrete spatial distribution signals in the feature space after performing local directional energy suppression mapping, and combine the location information of topological singularities to determine the defect classification of the surface of controlled power supply and distribution physical entities.

[0019] Preferably, in step S105, the local directional energy suppression mapping is performed by calculating the local coherence parameter of the multi-scale structural tensor set; when the energy evolution rate is detected to exceed the preset decay threshold, even if the local coherence parameter is higher than the preset coherence threshold, it is still determined that the region carries linear defect information, and the dynamic range of energy suppression is adjusted based on the energy evolution rate.

[0020] Preferably, the controlled power supply and distribution physical entities include conductive busbars, terminals, and metal fasteners in the power supply circuit; the discrete spatial distribution signal is collected from the controlled lighting environment, and the interference components it contains include amplitude oversaturation noise due to specular reflection and the brushed texture of the material processing on the surface of the conductive busbar.

[0021] Preferably, the method further includes: when the detection result shows that the controlled power supply and distribution physical entity has scratches or dents, generating an early warning signal for the power distribution system and triggering the sorting execution mechanism to perform physical isolation operation on the controlled power supply and distribution physical entity with quality defects.

[0022] Compared with the prior art, the beneficial effects of the present invention are:

[0023] 1. In product quality inspection, by constructing a local structure tensor and calculating the coherence parameter characterizing the degree of anisotropy, an energy dynamic adjustment mechanism based on the feature distribution law is established. According to the coherence parameter, nonlinear weight allocation is implemented on the energy gain of the pixel space. While suppressing specular reflection spots with strong directional characteristics and material intrinsic texture, the defect components with isotropic characteristics are maintained. This processing method realizes the feature decoupling of the environmental interference field and the material defect field, so that the power supply and distribution detection system no longer depends on the harsh constant lighting conditions, improves the adaptive suppression capability of the variable light field in the industrial site, and ensures the objectivity of defect feature extraction.

[0024] 2. This scheme uses a multi-scale spatial scale factor to construct a parallel structural tensor set and uses the evolution rate of energy response at different scales as the arbitration basis for feature recognition. Since the periodic intrinsic texture of the power equipment surface exhibits a stable energy evolution state under cross-scale observation, while the linear defects, as signal singularities, exhibit a sharp energy decay gradient as the scale increases, by calculating the energy decay ratio and implementing reverse compensation on the compression coefficient of the mapping function, this multi-dimensional energy level differential detection method eliminates the energy degeneracy constraint of homogeneous signals at a single scale, so that the weak scratch features that are highly similar to the background texture can be effectively separated from the highly coherent background, thus broadening the system's perception boundary for extremely fine structural anomalies.

[0025] 3. This scheme introduces a pre-defined virtual perturbation component into the gradient space and analyzes the deflection rate of the principal axis of the structural tensor after stimulation, constructing an active detection-type topological feature extraction path. By calculating the local flux divergence of the normalized gradient flow field, weak contrast defects that were originally submerged in the original brightness space are transformed into observable topological singularities. By utilizing the difference in the stimulated response functions of the defect region and the normal surface to logical perturbations, the scheme compensates for the lack of recognition of slowly changing defects such as shallow pits by traditional passive observation logic. Without increasing the physical perception cost, the scheme improves the system's ability to capture implicit physical features through in-depth mining of existing gradient vector space information. Attached Figure Description

[0026] Figure 1 This is a flowchart of the product quality inspection method based on deep learning and machine vision of the present invention. Detailed Implementation

[0027] The technical solutions of the embodiments of this application will be clearly described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of this application are within the scope of protection of this application.

[0028] A product quality inspection method based on deep learning and machine vision includes the following steps:

[0029] Step S101: Obtain the discrete spatial distribution signal characterizing the surface properties of the controlled power supply and distribution physical entity;

[0030] Step S102: Based on the gradient characteristics of the sampling points to be analyzed in the discrete spatial distribution signal, the first spatial scale factor is adopted. and the second spatial scale factor Construct a multi-scale structure tensor set;

[0031] Step S103: Calculate the first eigenvalue energy response corresponding to the multi-scale structure tensor group respectively. and By calculating the energy response of the first eigenvalue minus The difference and divided by To determine the energy evolution rate of multiscale structure tensors at different spatial scales;

[0032] Step S104: Compare the energy evolution rate with a preset decay threshold to determine whether the region to be analyzed is a linear defect region or an intrinsic texture region.

[0033] Step S105: Based on the judgment result, perform local directional energy suppression mapping on the discrete spatial distribution signal to remove interference components that are in the same direction as the background texture of the controlled power supply and distribution physical entity.

[0034] Step S106: Superimpose virtual perturbation component matrices onto the multi-scale structure tensor set, calculate the direction deflection vector of the principal axis direction of the multi-scale structure tensor set before and after superimposing the virtual perturbation component matrix, and determine the topological singularity based on the direction deflection vector.

[0035] Step S107: Extract the boundary energy flow direction of the amplitude-saturated connected domain in the discrete spatial distribution signal, and use the topological extrapolation algorithm with Laplace operator as constraint to fill the virtual gradient into the amplitude-saturated connected domain.

[0036] Step S108: Based on the feature space filled with virtual gradients, a pre-trained deep learning classification model is used to identify topological singularities and linear defects, and output detection results that characterize the quality status of controlled power supply and distribution physical entities.

[0037] Preferably, in step S104, the determination includes: when the energy evolution rate exceeds a preset attenuation threshold, determining that the region to which the sampling point to be analyzed belongs carries linear defect information; when the energy evolution rate is lower than or equal to the preset attenuation threshold, determining that the region to which the sampling point to be analyzed belongs is an intrinsic texture region; for the region determined to carry linear defect information, performing nonlinear compensation gain arbitration, and correcting the gain coefficient of the local directional energy suppression mapping based on the result of the nonlinear compensation gain arbitration, so as to maintain the characteristic sharpness of the defect edge on the surface of the controlled power supply and distribution physical entity during the signal transformation process.

[0038] Preferably, in step S102, the first spatial scale factor The second spatial scale factor is used to capture the signal singularity characteristics of the sampling points under analysis at the single-point level. Used to describe regional periodic intrinsic textures; energy evolution rate is used to distinguish between steady evolution characteristics caused by material properties and gradient decay characteristics caused by linear defects on the surface of a controlled power supply and distribution physical entity.

[0039] Preferably, in step S106, the determination of topological singularities includes: calculating the local flux divergence D of the normalized gradient flow field, wherein the local flux divergence D satisfies the formula: Where D is the local flux divergence. For the normalized gradient vector, It is a discrete gradient operator; based on the local flux divergence D, it identifies the difference in the stimulated response of the surface of the controlled power supply and distribution physical entity to the virtual disturbance component matrix, so as to extract the slowly varying defects in the discrete spatial distribution signal space that are in a state of flooding.

[0040] Preferably, in step S107, the topological extrapolation algorithm includes: identifying amplitude-saturated connected regions in discrete spatial distribution signals, using the energy flow direction at the boundary of the amplitude-saturated connected region as a boundary constraint condition, and numerically filling the interior of the amplitude-saturated connected region using the Laplacian operator to compensate for the signal blind zone caused by the strong reflection interference formed by the bright surface.

[0041] Preferably, the deep learning classification model is trained on a training set containing high-reflectivity interference samples and intrinsic texture samples; the deep learning classification model is used to extract multidimensional semantic features of discrete spatial distribution signals in the feature space after performing local directional energy suppression mapping, and combine the location information of topological singularities to determine the defect classification of the surface of controlled power supply and distribution physical entities.

[0042] Preferably, in step S105, the local directional energy suppression mapping is performed by calculating the local coherence parameter of the multi-scale structural tensor set; when the energy evolution rate is detected to exceed the preset decay threshold, even if the local coherence parameter is higher than the preset coherence threshold, it is still determined that the region carries linear defect information, and the dynamic range of energy suppression is adjusted based on the energy evolution rate.

[0043] Preferably, the controlled power supply and distribution physical entities include conductive busbars, terminals, and metal fasteners in the power supply circuit; the discrete spatial distribution signal is collected from the controlled lighting environment, and the interference components it contains include amplitude oversaturation noise due to specular reflection and the brushed texture of the material processing on the surface of the conductive busbar.

[0044] Preferably, the method further includes: when the detection result shows that the controlled power supply and distribution physical entity has scratches or dents, generating an early warning signal for the power distribution system and triggering the sorting execution mechanism to perform physical isolation operation on the controlled power supply and distribution physical entity with quality defects.

[0045] Preferably, in step S107, the method uses the filling gradient generated by the topological extrapolation algorithm to compensate for the signal gaps remaining after the interference components are removed in step S105, so as to maintain the consistency of the feature space across the entire field and thus construct a closed-loop feature field for deep learning classification models to recognize.

[0046] Example 1: In the quality inspection of polished metal busbars with high reflectivity, the specular reflection spots generated by ambient light and the minor scratches on the material surface highly overlap in the grayscale space of the original image data acquired by the vision acquisition system. At this point, the system faces the technical challenge of how to suppress the interference of directional reflection spots while avoiding blurring or loss of features at the edges of minor defects. An image data transformation method based on local directional energy suppression is used to decouple the features of the aforementioned environmental interference field and material defect field. This transformation method acquires the original image data to be processed and extracts a 5-dimensional coordinate system centered on each pixel in the original image data. 5. Preset gradient features within the neighborhood window; to address the strong anisotropic interference exhibited by polished metal surfaces, the system employs a multi-scale tensor parallel construction mechanism, utilizing the first spatial scale factor. With the second spatial scale factor Gradient convolution is performed on the neighborhood window to construct a first structure tensor and a second structure tensor, respectively; in this embodiment, the first spatial scale factor... The value is set to 1.0 to capture pixel-level signal singularity features; the second spatial scale factor is... A value of 3.0 is selected to describe the periodic intrinsic texture at the region level. The system evaluates the evolution gradient of local energy at different spatial scales by calculating the energy attenuation ratio R of the first structure tensor and the second structure tensor along the principal axis. Since the brushed intrinsic texture of the material surface has spatial periodicity, its energy response exhibits a stable evolution characteristic with increasing scale. However, the energy response of minute scratches and defects, which are signal singularities, exhibits a sharp gradient attenuation with increasing scale. The energy attenuation ratio R satisfies the following calculation formula: Where R is the energy decay ratio, The first eigenvalue of the first structure tensor. The first eigenvalue of the second structure tensor is used. When the system detects that the energy attenuation ratio R exceeds the preset attenuation threshold of 0.25, it determines that the region to which the pixel to be processed belongs carries linear defect information. At this time, the system performs nonlinear compensation gain arbitration, and applies inverse compensation gain to the output value of the nonlinear mapping function according to the energy attenuation ratio R to obtain the target pixel response value. The nonlinear mapping function satisfies the following mathematical logic: Where f(γ,R) is the final target pixel response value. The basic suppression component is based on the local coherence parameter γ, and α is the gain adjustment operator. In this embodiment, α is selected as 0.15.

[0047] Through the aforementioned multi-scale energy level difference mechanism, the system achieves energy compression of a large-area anisotropic background using the local structure tensor, while simultaneously logically activating defect components that were originally masked by their convergence with the background texture. Furthermore, the system introduces a virtual sinusoidal perturbation signal with a preset frequency and direction into the original gradient field during the calculation process. The virtual perturbation component matrix is ​​generated by the signal generation module of the field controller and is defined as a two-dimensional discrete sinusoidal signal with a working frequency of 1000Hz and a constant amplitude. The amplitude of each grid point is calibrated to the 5×5 neighborhood of the pixel to be processed. At 5% of the average gradient value, during the superposition operation, the system calls the underlying computing unit to sum each element of the virtual perturbation component matrix with the corresponding gradient magnitude in the original gradient vector space pixel by pixel to form an excited gradient flow field. It then analyzes the deflection rate of the principal axes of the structure tensor after excitation. By calculating the local flux divergence D of the normalized gradient flow field, weak contrast defects that were originally submerged in the original brightness space are transformed into observable topological singularities. The local flux divergence D satisfies the formula: D = ∇⋅G, where D is the local flux divergence and G is the normalized gradient vector. As a discrete gradient operator, targeting pixel saturation regions on polished metal surfaces caused by extreme strong reflections, the system identifies pixel saturation connected regions in the original image data, extracts the principal axis direction of the structure tensor at the boundary of this region, and topologically extrapolates the boundary gradient features into the pixel saturation connected regions along the principal axis direction to generate a virtual gradient distribution field. This eliminates the detection blind spot in overexposed areas. After the above processing, the transformed image suppresses specular reflection spots and material textures while enhancing defect features. This scheme transforms the physical lighting interference problem into a nonlinear data transformation logic in the image space, solving the technical bottleneck of decoupling heterogeneous features in the same direction. Finally, the generated transformed image is output to a preset deep learning classification model to extract the semantic features of defects in the image and output the product quality inspection results.

[0048] Example 2: In a physical experimental platform for detecting surface defects on polished metal busbars, the system acquires discrete spatial distribution signals characterizing the surface properties of a controlled power supply and distribution physical entity, using a resolution of 5 megapixels and a pixel size of 3.45. An industrial image sensor with a focal length of 1m, equipped with a 50mm optical lens and a high-frequency ring light source operating at 20kHz; to verify the decoupling capability of this technical solution against non-stationary interference fields, Gaussian white noise with a signal-to-noise ratio of 15dB was actively injected into the acquisition end in the experiment, and a non-uniform light field environment with an illuminance fluctuation amplitude of 15.2% was simulated; the first spatial scale factor used in the experiment... With the second spatial scale factor The setting follows the following decision-making logic, namely The selection needs to balance the 10 The ability to detect minute scratches at the m level and the effect of suppressing shot noise in the sensor were selected in this experiment. A value of 1.0 is used to ensure that the singularity of the gradient at the sampling point is not masked by the spatial smoothing process, while The selection requires brushed texture primitives covering the material surface with an average period of 0.5mm. The window size is determined by establishing the reciprocal relationship between the window size and the intrinsic texture spatial frequency. To provide a stable local energy reference, version 3.0 is used.

[0049] During the verification process, the sample group of this invention utilizes the first spatial scale factor. With the second spatial scale factor A multi-scale structure tensor set was constructed, and the energy evolution rate R of the multi-scale structure tensor set at different spatial scales was calculated. Experiments showed that for a scratched region with a contrast of 1.15 in the original image, the corresponding first eigenvalue energy response was... The scale is 1258.6, and at... When the scale decreases to 412.3, the calculated energy evolution rate R is 2.05, exceeding the preset decay threshold of 0.25. For the strong light spot region generated by specular reflection, its first eigenvalue energy response is... The scale is 4521.4, and at... The response value at the scale is 4215.7, and the calculated energy evolution rate R is 0.07. This confirms that linear defects, as signal singularities, have energy level decay characteristics in cross-scale transformation, while the environmental interference field exhibits cross-scale energy coherence. Based on this, the system performs local directional energy suppression mapping to suppress the pixel response value of the strong spot area to the background level. At the same time, the contrast of the defect area is increased from the original 1.15 to 4.85 through reverse compensation gain, thus realizing the extraction of defect features under noisy and strong reflection interference environment.

[0050] To demonstrate the synergistic effect and numerical range of this technical solution, a multi-dimensional control system was set up, including a partially missing control group and an out-of-range control group. Control group A removed the multi-scale tensor parallel construction mechanism and only used a single spatial scale factor for transformation. Its experimental data showed that when processing scratches parallel to the material texture direction, due to the lack of evolutionary feature criteria between scales, the system could not distinguish between texture and defects, leading to a defect false detection rate of 22.5%, while the false detection rate of the present invention's sample group was 0.78%. Furthermore, in the boundary test for attenuation thresholds, when an out-of-range attenuation threshold of 0.05 was selected, normal texture fluctuations on the material surface were judged as abnormal energy evolution, generating pseudo-defect noise, causing the signal-to-noise ratio of the transformed image to decrease from 32.4 dB in the present invention's sample group to 12.8 dB. However, when an out-of-range attenuation threshold of 0.60 was selected, the depth was less than 15 dB. The shallow scratches of m failed to meet the triggering conditions due to the energy evolution characteristics, resulting in a 65.2% decrease in capture rate. The above comparison results confirm that the energy evolution rate R determination logic defined in this invention, as well as the relevant threshold range, is a working window that balances the suppression of interference and the preservation of weak signals. This research and development verification experiment, by introducing physically meaningful noise disturbances and gradient performance benchmarking, confirmed that this technical solution can utilize the energy distribution law of the local image space to achieve feature decoupling between the environmental interference field and the material defect field. The defect edge contrast in the transformed image obtained from the experiment was improved by 4.2 times and the background suppression ratio reached 28.3dB.

[0051] Example 3: In the online monitoring of the surface of a high-frequency pulse power supply busbar with dynamic illumination fluctuations, the specular reflectance coefficient of the material fluctuates with the thermal effect of the current. In the image data acquired by the vision acquisition system, local areas experience amplitude flooding due to photoelectric conversion saturation. The gradient distribution field inside the saturated connected domain is reconstructed by topological extrapolation constrained by the Laplacian operator. The set of pixels in the image data whose pixel gray values ​​exceed the saturation threshold of 250 is identified and a saturated connected domain S is constructed. The gradient features of the 8 neighboring pixels at the edge of the saturated connected domain S are extracted as the initial boundary conditions for iterative calculation. In each iteration, the gray potential energy diffusion of the internal virtual pixels is performed using the discrete Laplacian operator. The discrete Laplacian operator acts on the pixels to be filled so that their gradient values ​​are equal to the weighted average of the neighboring gradients. The process continues until the energy functional difference between two adjacent iterations is less than 0.001, thereby generating a virtual gradient distribution that is logically consistent with the surrounding texture in the overexposed blind zone.

[0052] To match the surface roughness distribution of busbars from different production batches, the system calibrates the attenuation threshold. This procedure applies to a defect-free busbar reference image dataset and processes it using a field controller. It calculates the energy evolution rate R of 1000 random sampling points in the reference image and calculates the mean of this sample set. with standard deviation Attenuation threshold Satisfies the calculation formula: ,in, The calculated adaptive attenuation threshold, The mean of the baseline sample set, The standard deviation of the benchmark sample set is used. By setting the statistical bias, the system excludes random texture fluctuations of the material itself from the judgment range, ensuring that the trigger signal corresponds to a singular defect with non-stationary evolution characteristics when the nonlinear compensation gain arbitration is subsequently performed. When the system detects that the calibrated energy evolution rate R exceeds the attenuation threshold, the system will determine the trigger signal. At that time, the region to which the sampling point belongs is determined to be a potential site of a linear defect, and compensation is applied to the output of the nonlinear mapping function based on the divergence distribution of the local gradient field; during the transformation process, the system monitors the average gradient entropy of the transformed image in real time. ,like If the feature purity index is lower than the preset value of 4.5, the gain adjustment operator α is automatically increased in steps of 0.05 until the defective feature forms a closed connected contour in the gradient space. This parameter adjustment logic based on feedback loop eliminates the signal drift induced by drastic changes in ambient illumination, so that the transformed feature field completes the transformation from the original brightness space to the topological feature space before entering the preset deep learning model.

[0053] Example 4: In a newly deployed polished metal busbar surface inspection production line environment, the system executes a pre-calibration procedure for the sampling window size and discrete gradient operator to obtain the modulation transfer function (MTF) curve of the optical imaging system. Combining the pixel size p of the industrial image sensor and the average physical period L of the material surface texture, the span of the neighborhood window is determined by calculating the pixel span N occupied by the texture in the image space, where the pixel span N satisfies the equation N = L / p. Based on this, the system acquires 50 frames of images on the defect-free busbar surface and calculates the first eigenvalue energy response. The coefficient of variation, when the coefficient of variation stabilizes below 0.05, represents the first eigenvalue energy response at the current scale. The statistical mean is stored in the controller's memory as an environmental noise reference, providing an initial physical quantity for performing localized energy suppression.

[0054] When the system faces a condition where the surface reflectivity of the material fluctuates by more than 20%, the controller executes a step-closed-loop calibration procedure for the gain adjustment operator α, superimposing a virtual disturbance component matrix with an amplitude of 5% of the background energy mean and a randomly distributed phase onto the original gradient field. The algorithm monitors the principal axis deflection vector Δθ of the multi-scale structural tensor group and iteratively searches for the minimum gain coefficient that makes the target pixel response value f(γ,R) reach the preset gradient contrast threshold of 3.5. When the fluctuation range of the feature index corresponding to the minimum gain coefficient is less than 1% in 5 consecutive iterations, the value is determined as the effective gain adjustment operator α under the current working condition. This logic eliminates the nonlinear deviation of the sensor photoelectric response and enables the transformed image to maintain the topological stability of the defect semantic features on different reflectivity surfaces.

[0055] Example 5: In the on-site deployment and debugging scenario of a polished metal busbar inspection system, the control unit executes a pre-calibration procedure to determine the spatial scale of the gradient operator. The system reads reference material sample data with a spatial resolution of 0.05 mm / pixel acquired by an industrial image sensor, and determines the spatial correlation length of the material surface texture in the image space. Calculations are performed to determine the width W of the neighborhood window, where the width W is related to the spatial length. Satisfy linear proportional relationship By adjusting the scaling factor k stepwise and statistically analyzing the signal distribution of the transformed image at the corresponding scale, when k is 1.25, periodic interference from the material surface is filtered out. This allows the preset neighborhood window span to be determined to be 5×5 pixels. The system then continuously acquires 100 frames of discrete signals under defect-free conditions and calculates the background variance of the feature energy. The background variance is stored in the controller's memory as a noise reference quantity in the energy evolution rate R discrimination logic to eliminate signal deviations induced by sensor temperature drift. Where W is the spatially relevant length, W is the width of the neighborhood window, and k is the scaling factor. As the background variance, when the system is in online monitoring mode and performing topological extrapolation with Laplace operator constraints, the field controller determines the termination time of the iterative calculation based on the gradient potential energy diffusion state at the boundary of the saturated connected domain S. The system extracts the gradient features of the edge of the saturated region and performs diffusion calculation. By calculating the energy functional J(n) under each iteration n in real time, the steady state of the virtual gradient distribution is determined. The energy functional J(n) satisfies the formula: Where J(n) is the energy functional, n is the number of iterations, and ∇ is the discrete gradient operator. The gradient tensor generated in the nth iteration is used. The system calculates the functional variation ΔJ in adjacent iteration cycles. When ΔJ is detected to be less than 0.0001 and the energy flux residual at the boundary drops to less than 3.5% of the initial value, the gradient repair of the saturated region is determined to be complete. The system outputs the product quality inspection results based on the reconstructed feature field, so that the inspection system can still maintain the topological integrity of the defect features when the camera optical axis has an installation deviation of 5.2° to 8.1° relative to the normal of the measured surface.

[0056] In online product quality analysis based on a deep learning architecture, the system inputs transformed image data containing reconstructed gradients into a pre-defined deep learning classification model. The deep learning classification model utilizes multiple 3D modeling methods... A feature extraction unit consisting of three convolutional layers extracts semantic features of defects in the transformed image. A four-layer cascaded convolutional neural network structure is adopted. The first to third layers each deploy 32 convolutional operators of size 3×3 with a stride of 1 pixel. After each convolutional processing, a 2×2 max pooling layer is connected to achieve feature dimensionality reduction. The fourth layer is a fully connected layer with its input dimension fixed at 512 dimensions and finally mapped to a 2-dimensional classification probability output. The model performs inference on a 100MHz embedded vision processor, and the convolutional accumulation computation of each frame is limited to within 12.5ms. Since the specular reflection interference and periodic material texture in the original image have been anisotropically stripped during the local directional energy suppression mapping process, the feature response distribution at the model input end exhibits high purity for singular signals. The model output layer generates classification confidence scores for the sample points to be analyzed. The system uses classification confidence scores. The quantitative comparison result between the system outputs the product quality inspection result and the dynamically set classification threshold of 0.88. This design method, which utilizes the energy distribution law of the local image space to physically reduce the dimension of the feature space, eliminates the nonlinear disturbance of the non-stationary illumination field on the classification task, enabling the system to have a logically consistent judgment output when processing dynamic video stream data with a single frame time of less than 12.5ms. The transformed image data is input into the convolutional feature extraction layer of the deep learning model in tensor form. Due to the suppression of specular reflection spots in the image and the completion of gradient repair in the saturation blind zone, the semantic feature distribution extracted by the model exhibits a compact clustering state. In the fluctuating test where the ambient illumination increases from 500lx to 2500lx, the defect judgment result output by the system after the above adaptive calibration and topology reconstruction achieves a consistency of 99.2% with the offline verification result.

[0057] Example 6: A two-dimensional sinusoidal discrete signal with a specific spatial frequency is selected as the perturbation source. The signal frequency is twice the average spatial frequency of the intrinsic texture of the controlled power supply and distribution physical entity surface, and the amplitude is five percent of the average gradient in the preset neighborhood of the sampling point to be analyzed. The sinusoidal discrete signal is superimposed on the gradient vector space of the multi-scale structure tensor group. The deflection vector Δθ before and after superposition in the principal axis direction is calculated. When it exceeds the preset deflection angle threshold, the coordinate point is determined as a topological singularity. Physical perturbation is used to trigger the nonlinear deflection response of the slowly changing defect in the gradient flow field, and the weak contrast target features in the original brightness space are extracted.

[0058] A topological extrapolation algorithm constrained by the Laplacian operator is used to fill gradients. A set of pixels with gray values ​​exceeding 250 within a discrete spatial distribution signal is identified to construct an amplitude-saturated connected region S. Gradient features of the saturated region boundary are extracted as Dirichlet boundary constraints. The discrete Laplacian operator is used to perform gradient potential energy diffusion iterations on the internal virtual pixels. When the change in energy functional J ΔJ between two adjacent iterations is less than 0.0001, a virtual gradient distribution field logically consistent with the surrounding texture is generated in the overexposed region, eliminating the detection blind zone induced by specular reflection. The arithmetic mean of the energy evolution rate R is calculated on a defect-free benchmark sample set. with standard deviation Set an adaptive decay threshold for With three times The sum of these values ​​serves as the quantification criterion for determining the regional attributes of the sampling points to be analyzed.

[0059] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the present invention can be implemented in other specific forms without departing from the spirit or essential characteristics of the present invention.

[0060] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention.

Claims

1. A product quality inspection method based on deep learning and machine vision, characterized in that, Includes the following steps: Step S101: Obtain the discrete spatial distribution signal characterizing the surface properties of the controlled power supply and distribution physical entity; Step S102: Based on the gradient characteristics of the sampling points to be analyzed in the discrete spatial distribution signal, the first spatial scale factor is adopted. and the second spatial scale factor Construct a multi-scale structure tensor set; Step S103: Calculate the first eigenvalue energy response corresponding to the multi-scale structure tensor group respectively. and By calculating the energy response of the first eigenvalue minus The difference and divided by To determine the energy evolution rate of multiscale structure tensors at different spatial scales; Step S104: Compare the energy evolution rate with a preset decay threshold to determine whether the region to be analyzed is a linear defect region or an intrinsic texture region. Step S105: Based on the judgment result, perform local directional energy suppression mapping on the discrete spatial distribution signal to remove interference components that are in the same direction as the background texture of the controlled power supply and distribution physical entity. Step S106: Superimpose virtual perturbation component matrices onto the multi-scale structure tensor set, calculate the direction deflection vector of the principal axis direction of the multi-scale structure tensor set before and after superimposing the virtual perturbation component matrix, and determine the topological singularity based on the direction deflection vector. Step S107: Extract the boundary energy flow direction of the amplitude-saturated connected domain in the discrete spatial distribution signal, and use the topological extrapolation algorithm with Laplace operator as constraint to fill the virtual gradient into the amplitude-saturated connected domain. Step S108: Based on the feature space filled with virtual gradients, a pre-trained deep learning classification model is used to identify topological singularities and linear defects, and output detection results that characterize the quality status of controlled power supply and distribution physical entities.

2. The product quality inspection method based on deep learning and machine vision according to claim 1, characterized in that, In step S104, the determination includes: when the energy evolution rate exceeds a preset attenuation threshold, determining that the region to which the sampling point to be analyzed belongs carries linear defect information; when the energy evolution rate is lower than or equal to the preset attenuation threshold, determining that the region to which the sampling point to be analyzed belongs is an intrinsic texture region; for the region determined to carry linear defect information, performing nonlinear compensation gain arbitration, and correcting the gain coefficient of the local directional energy suppression mapping based on the result of the nonlinear compensation gain arbitration, so as to maintain the characteristic sharpness of the defect edge on the surface of the controlled power supply and distribution physical entity during the signal transformation process.

3. The product quality inspection method based on deep learning and machine vision according to claim 1, characterized in that, In step S102, the first spatial scale factor The second spatial scale factor is used to capture the signal singularity characteristics of the sampling points under analysis at the single-point level. Used to describe regional periodic intrinsic textures; energy evolution rate is used to distinguish between steady evolution characteristics caused by material properties and gradient decay characteristics caused by linear defects on the surface of a controlled power supply and distribution physical entity.

4. The product quality inspection method based on deep learning and machine vision according to claim 1, characterized in that, In step S106, the determination of topological singularities includes: calculating the local flux divergence D of the normalized gradient flow field, where the local flux divergence D satisfies the formula: Where D is the local flux divergence. For the normalized gradient vector, It is a discrete gradient operator; based on the local flux divergence D, it identifies the difference in the stimulated response of the surface of the controlled power supply and distribution physical entity to the virtual disturbance component matrix, so as to extract the slowly varying defects in the discrete spatial distribution signal space that are in a state of flooding.

5. The product quality inspection method based on deep learning and machine vision according to claim 1, characterized in that, In step S107, the topological extrapolation algorithm includes: identifying amplitude-saturated connected regions in discrete spatial distribution signals, using the energy flow direction at the boundary of the amplitude-saturated connected region as a boundary constraint condition, and numerically filling the interior of the amplitude-saturated connected region using the Laplacian operator to compensate for the signal blind zone caused by the strong reflection interference formed by the bright surface.

6. The product quality inspection method based on deep learning and machine vision according to claim 1, characterized in that, The deep learning classification model is trained on a training set containing high-reflectivity interference samples and intrinsic texture samples. The deep learning classification model is used to extract multidimensional semantic features of discrete spatial distribution signals in the feature space after performing local directional energy suppression mapping, and combine the location information of topological singularities to determine the defect classification of the surface of controlled power supply and distribution physical entities.

7. The product quality inspection method based on deep learning and machine vision according to claim 1, characterized in that, In step S105, the local directional energy suppression mapping is performed by calculating the local coherence parameters of the multi-scale structural tensor set. When the energy evolution rate is detected to exceed the preset decay threshold, even if the local coherence parameters are higher than the preset coherence threshold, it is still determined that the region carries linear defect information, and the dynamic range of energy suppression is adjusted based on the energy evolution rate.

8. A product quality inspection method based on deep learning and machine vision according to claim 1, characterized in that, The controlled power supply and distribution physical entities include conductive busbars, terminals, and metal fasteners in the power supply circuit; the discrete spatial distribution signal is collected from the controlled lighting environment, and the interference components it contains include amplitude oversaturation noise due to specular reflection and the brushed texture of the material processing on the surface of the conductive busbar.

9. A product quality inspection method based on deep learning and machine vision according to claim 1, characterized in that, The method also includes generating an early warning signal for the power distribution system when the detection results show that the controlled power supply and distribution physical entity has scratches or dents, and triggering the sorting execution mechanism to perform physical isolation operation on the controlled power supply and distribution physical entity with quality defects.

Citation Information

Patent Citations

  • Filter screen quality detection method based on aperture consistency analysis

    CN120298371A

  • Method, system, medium and equipment for analyzing and predicting wear morphology and contact stress based on rough contact surface

    CN120688311A