A product appearance defect detection method based on machine vision

By using the eigenvalue decomposition and null projection transformation of the local structure tensor matrix, weak defects on the surface of conductive components in power systems can be identified, solving the problems of high false alarm rate and high missed detection rate in existing technologies, and achieving high-precision and real-time defect detection.

CN121678681BActive Publication Date: 2026-04-10XIAMEN BOSHIYUAN MASCH VISION TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-02-10
Publication Date
2026-04-10

AI Technical Summary

Technical Problem

Existing technologies struggle to effectively identify subtle defects on the surface of conductive components in power systems, especially against backgrounds with strong directional textures. This results in high false alarm and false false alarm rates, and also requires significant computational resources, making it difficult to balance detection accuracy and real-time performance.

Method used

By calculating the eigenvalue decomposition of the local structure tensor matrix, a dominant eigenvector is generated. A linear observation domain is defined along this vector, a tensor trace sequence is extracted, the rate of change of the energy evolution distribution chain is calculated, non-stationary pulses are identified, and orthogonal projection transformation is performed using the null space projection operator to generate the residual pixel distribution. A dynamic adjustment mechanism for the structure coherence index is introduced to suppress background energy leakage.

Benefits of technology

It achieves mathematical decoupling between background structure signals and defect signals, eliminates artifacts caused by complex texture topological deformation, breaks through the limit of directional parallel defect recognition, and improves the detection accuracy and real-time performance of the system under strong texture background.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121678681B_ABST
    Figure CN121678681B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of health monitoring of electric energy supply systems, and discloses a product appearance defect detection method based on machine vision, which comprises the following steps: acquiring original image data from a controlled loop entity, and calculating a local structure tensor matrix of a sampling point; determining a dominant texture direction through an eigenvalue decomposition operation, extracting a tensor trace sequence along the direction, and calculating a spatial axis change rate to identify a non-stationary pulse; adjusting a projection operator gain weight according to the pulse intensity, completing an orthogonal projection transformation under the constraint of the texture direction, generating a deviation response graph, and outputting an alarm signal; through tensor energy flow evolution analysis, the application realizes physical separation of background texture and homodirectional deviation signals, solves the feature coupling masking dilemma in appearance detection of a current-carrying loop entity, and enhances the physical damage detection sensitivity of the electric energy supply loop entity.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application relates to a product appearance defect detection method based on machine vision and belongs to the technical field of health monitoring of electric energy supply systems. BACKGROUND

[0002] At present, in power distribution devices and power supply systems, the surface integrity of copper-aluminum busbars and power distribution panels and other conductive components is related to the insulation strength and operation safety of the power system. The industry generally adopts a detection method based on machine vision, acquires component surface images through an image acquisition device, and identifies surface scratches, cracks and pit defects and other defect features by using a spatial domain filtering algorithm in cooperation with a threshold segmentation method. The surface of the conductive component usually has a strong directional wire texture. In a real industrial production environment, the texture component of the metal surface is highly coupled with the weak defect features in the gradient distribution. When filtering the texture background noise, the isotropic image processing method simultaneously loses the defect edge features, resulting in mutual restriction between the missed detection rate and the false positive rate of the detection system. The gray level jump caused by environmental light fluctuation produces background energy residue, which generates a large number of structural false artifacts in the residual space.

[0003] To solve the above problems, the conventional improvement path mainly focuses on increasing the number of light sources to achieve multiple exposures, or using a deep learning model for feature classification, increasing the system complexity and maintenance cost, and prolonging the single detection period. The deep learning method relies on large-scale high-quality labeled samples, and the model has high computational overhead, which is difficult to execute in low-power edge hardware such as power distribution terminals. The existing technology attempts to enhance the flexibility of the filter through an adaptive mechanism from the bottom control algorithm. For example, the Chinese invention patent with the publication number CN102117480A discloses an image spatial domain filtering system and method based on function level evolution hardware, which automatically solves the configuration string by using an evolution strategy, and adjusts the hardware circuit structure to adapt to noise changes. Such evolution logic essentially belongs to a random search process based on adaptive value evaluation. When facing the wire texture with long-range physical coherence on the surface of the power component, it lacks the mathematical perception of the background topological structure, cannot accurately lock the main direction of the texture, and is difficult to establish a texture energy active annihilation mechanism from the mathematical level to suppress the directionally parallel defect signal damage in the strong texture background.

[0004] Specifically, the prior art mainly has the following deficiencies: 1. The isotropic operator lacks the ability to perceive the dominant direction of local texture, resulting in the loss of defect features in a strong texture background; 2. The system has weak stability to background topological deformation and noise fluctuations, and systematic false alarms occur under complex working conditions; 3. The feature extraction process has high demand for computing resources, making it difficult to balance detection accuracy and real-time performance. Therefore, how to select local structure tensor features to realize orthogonal decoupling of background texture and defect signals, and use the non-stationary characteristics of energy flow to restore weak defects parallel to the texture direction, has become a technical problem to be solved by the present application. SUMMARY

[0005] To solve the problems raised in the background art, the technical solution of the present application is as follows: A product appearance defect detection method based on machine vision for health monitoring of a current-carrying circuit entity of an electric energy supply system, comprising the following steps:

[0006] Step S101, acquiring original image data representing the physical form of a distributed parameter entity in the controlled circuit;

[0007] Step S102, calculating the local structure tensor matrix of the sampling points in the original image data, and performing eigenvalue decomposition operation on the local structure tensor matrix to generate the dominant eigenvector representing the background texture distribution;

[0008] Step S103, according to the preset sampling interval, extracting the tensor trace sequence of the sampling points and the adjacent sampling points along the linear observation domain defined by the dominant eigenvector, to construct a local energy evolution distribution chain;

[0009] Step S104, calculating the rate of change of the local energy evolution distribution chain on the spatial axis, and identifying a non-stationary pulse at the sampling point when the absolute value of the rate of change deviates from the preset stationary threshold interval;

[0010] Step S105, adjusting the gain weight of the null space projection operator according to the modulus of the non-stationary pulse, and performing orthogonal projection transformation on the sampling points under the projection constraint of the dominant eigenvector, to generate a residual pixel distribution compensated by the gain weight;

[0011] Step S106, generating a deviation response map using the residual pixel distribution, and outputting an alarm signal indicating that the electric energy supply system has a physical damage risk;

[0012] And, in the process of performing the orthogonal projection transformation of step S105, a dynamic adjustment mechanism based on a structure coherence index is introduced; the structure coherence index at the sampling point is calculated in real time by using the ratio of the maximum eigenvalue to the second largest eigenvalue of the local structure tensor matrix; when the structure coherence index is lower than a preset coherence threshold, the projection weight factor of the null space projection operator is reduced to limit the energy leakage generated at the turning point of the current-carrying loop entity texture.

[0013] Preferably, step S104 comprises the following steps: obtaining the tensor trace difference value between adjacent nodes in the local energy evolution distribution chain by using the central difference operator; calculating the spatial derivative of the tensor trace difference value with respect to the spatial sampling step d determined according to the sampling interval, to generate the rate of change on the spatial axis; and defining the absolute value of the spatial derivative as the modulus value of the non-stationary pulse, wherein the modulus value is used to adjust the gain weight to achieve energy enhancement of the co-directional weak deviation signal on the distributed parameter entity surface; wherein the preset stationary threshold interval is determined according to the gradient mean value of the background area in the local energy evolution distribution chain.

[0014] Preferably, step S105 further comprises: extracting the neighborhood tensor field spatial cohesion strength of the sampling point within a range of 3 to 7 pixels; and performing nonlinear smoothing filtering on the non-stationary pulse by using the spatial cohesion strength, to eliminate sensor noise artifacts in the original image data and ensure the physical purity of the residual pixel distribution.

[0015] Preferably, the specific formula for calculating the rate of change on the spatial axis in step S104 is: wherein, is the rate of change, and are the tensor trace values of the adjacent sampling points along the dominant eigenvector direction, and d is the spatial sampling step.

[0016] Preferably, the tensor trace in step S103 is an objective physical index representing the total energy of the local area gradient; the tensor trace is obtained by calculating the sum of the main diagonal elements of the local structure tensor matrix, to quantify the structural complexity of the physical morphology of the distributed parameter entity surface.

[0017] Preferably, after step S106 is performed, the deviation response map is further subjected to a normalization hedging process; the pixel values in the residual pixel distribution are linearly scaled by using the tensor trace as the normalization denominator, to eliminate the deviation of the photosensitive intensity caused by the environmental light fluctuation in the power supply system.

[0018] Preferably, the gain weight of the zero space projection operator in step S105 is adjusted by: defining a monotonically increasing mapping function; when the modulus value of the non-stationary pulse exceeds a preset pulse trigger threshold, increasing the gain weight by using the mapping function, so that the deviation signal consistent with the background texture direction is retained in the deviation response map.

[0019] Preferably, in step S102, when performing the eigen decomposition operation, a multi-scale constraint factor is introduced; a plurality of sets of candidate vector sets are obtained by performing Gaussian kernel convolution processing within a spatial scale of 0.5 to 1.5 pixels, and a set of vectors with the highest consistency with the main trend of the current-carrying loop entity is selected as the dominant eigen vector.

[0020] Preferably, the generation of the deviation response map in step S106 includes: performing a morphological closing operation and connected domain identification on the residual pixel distribution after the orthogonal projection transformation; and extracting an abnormal physical region in the residual pixel distribution that meets a preset area range and a geometric feature constraint, and generating the deviation response map based on the abnormal physical region.

[0021] Compared with the prior art, the present application has the following advantages:

[0022] 1. In product appearance defect detection, the background structure signal and the defect signal are decoupled, the gradient distribution features of the pixel neighborhood are represented by a local structure tensor matrix, the dominant eigen direction of the background texture is locked by feature decomposition, and a null space projection operator is constructed accordingly. The mechanism projects the original image signal into the null space orthogonal to the texture main direction, so that the background signal meeting the structural rules is eliminated in the projection dimension, and the defect signal with unstructured features is highlighted and amplified in the residual space. This logical decoupling based on the pixel topological relationship avoids the passivation phenomenon caused by traditional spatial domain filtering on the defect edge, and solves the problem of masking of weak scratch defects on the surface of the power distribution assembly with strong texture background.

[0023] 2. Eliminate structural artifacts caused by complex texture topological deformation. The present application introduces a dynamic adjustment mechanism based on the coherence threshold during the projection process. By analyzing the energy proportion of the maximum eigenvalue and the second maximum eigenvalue of the local structure tensor matrix, the structural coherence of the pixel block is evaluated in real time. At the topological ambiguity point where the texture curvature changes or interweaves, the system automatically reduces the amplitude of the projection weight factor to suppress the background energy leakage caused by the deviation of the projection direction. This mechanism cooperates with the spatial cohesion enhancement logic of the tensor field to correct the logical deviation of isolated points using the group consensus of neighborhood pixels, ensuring that the residual feature map at the texture turning point remains pure and eliminating systematic false alarms caused by sensor noise or background micro-deformation in complex industrial conditions.

[0024] 3. Break through the theoretical limit of the direction parallel defect recognition, for the extreme working condition that the defect extension direction is highly consistent with the background texture dominant direction, the application introduces a compensation link based on the non-stationary detection of energy flow space, the method extracts the trace of local structure tensor along the dominant direction determined by the first eigenvector, and calculates the variation rate of the energy sequence on the spatial axis, using the energy stationarity of the background texture in the extension direction and the impulse mutation characteristics of the defect signal, the system automatically weakens the suppression strength of the projection operator when identifying the non-stationary pulse, so that the parallel defect signal which is easily filtered out due to direction overlap can be fully presented in the residual domain. This evolution from static direction mapping to dynamic energy flow analysis improves the ability dimension of the system to distinguish long-range stationary texture and local transient defects. BRIEF DESCRIPTION OF DRAWINGS

[0025] Figure 1 The flowchart of the product appearance defect detection method based on machine vision of the application;

[0026] Figure 2 The signal processing logic and overall architecture schematic diagram of the detection system of the application. DETAILED DESCRIPTION

[0027] The technical solutions in the embodiments of the application will be clearly described below with reference to the drawings in the embodiments of the application. Obviously, the described embodiments are part of the embodiments of the application, rather than all the embodiments of the application. All other embodiments obtained by those skilled in the art based on the embodiments in the application belong to the scope of protection of the application.

[0028] A product appearance defect detection method based on machine vision, comprising the following steps:

[0029] Step S101, acquiring original image data representing the physical form of a distributed parameter entity in a controlled loop;

[0030] Step S102, calculating the local structure tensor matrix of the sampling points in the original image data, and performing eigenvalue decomposition operation on the local structure tensor matrix to generate the dominant eigenvector representing the background texture distribution;

[0031] Step S103, according to the preset sampling interval, extracting the tensor trace sequence of the sampling points and the adjacent sampling points along the linear observation domain defined by the dominant eigenvector, to construct a local energy evolution distribution chain;

[0032] Step S104, calculating the variation rate of the local energy evolution distribution chain on the spatial axis, and identifying the non-stationary pulse at the sampling point when the absolute value of the variation rate deviates from the preset stationary threshold interval;

[0033] Step S105, adjusting the gain weight of the null space projection operator according to the modulus value of the non-stationary pulse, and performing an orthogonal projection transformation on the sampling points under the projection constraint of the dominant eigenvector to generate a residual pixel distribution compensated in energy by the gain weight;

[0034] Step S106, generating a deviation response map using the residual pixel distribution, and outputting an alarm signal indicating that the power supply system is at risk of physical damage;

[0035] In addition, during the orthogonal projection transformation of step S105, a dynamic adjustment mechanism based on the structure coherence index is introduced; the structure coherence index at the sampling point is calculated in real time using the ratio of the maximum eigenvalue to the second largest eigenvalue of the local structure tensor matrix; when the structure coherence index is lower than a preset coherence threshold, the projection weight factor of the null space projection operator is reduced to limit the energy leakage at the texture turning point of the current-carrying loop entity.

[0036] Preferably, step S104 comprises the following steps: obtaining the tensor trace difference value between adjacent nodes in the local energy evolution distribution chain using a central difference operator; calculating the spatial derivative of the tensor trace difference value with respect to the spatial sampling step d determined according to the sampling interval, to generate the rate of change on the spatial axis; defining the absolute value of the spatial derivative as the modulus value of the non-stationary pulse, wherein the modulus value is used to adjust the gain weight to achieve energy enhancement of the uniform weak deviation signal on the surface of the distribution parameter entity; wherein the preset stationary threshold interval is determined according to the gradient mean value of the background region in the local energy evolution distribution chain.

[0037] Preferably, step S105 further comprises: extracting the neighborhood tensor field spatial cohesion strength of the sampling point within a range of 3 to 7 pixels; performing nonlinear smoothing filtering on the non-stationary pulse using the spatial cohesion strength to eliminate sensor noise artifacts in the original image data and ensure the physical purity of the residual pixel distribution.

[0038] Preferably, the specific formula for calculating the rate of change on the spatial axis in step S104 is: wherein, is the rate of change, and are the tensor trace values of adjacent sampling points along the direction of the dominant eigenvector, and d is the spatial sampling step.

[0039] Preferably, the tensor trace in step S103 is an objective physical index representing the total gradient energy of the local region; the tensor trace is obtained by calculating the sum of the main diagonal elements of the local structure tensor matrix, which is used to quantify the structural complexity of the physical morphology of the surface of the distribution parameter entity.

[0040] Preferably, after step S106, a normalization hedging process is further performed on the deviation response map; the pixel values in the residual pixel distribution are linearly scaled by using the tensor trace as the normalization denominator to eliminate the deviation of the photosensitive intensity caused by the environmental light fluctuation in the power supply system.

[0041] Preferably, the gain weight adjustment of the null space projection operator in step S105 includes: defining a monotonically increasing mapping function; when the modulus value of the non-stationary pulse exceeds the preset pulse trigger threshold, the gain weight is increased by using the mapping function, so that the deviation signal consistent with the background texture direction is retained in the deviation response map.

[0042] Preferably, when performing the eigenvalue decomposition operation in step S102, a multi-scale constraint factor is introduced; a plurality of sets of candidate vector sets are obtained by performing Gaussian kernel convolution processing within a spatial scale of 0.5 to 1.5 pixels, and the set of vectors with the highest consistency with the main direction of the current-carrying loop entity is selected as the dominant eigenvector.

[0043] Preferably, the generation of the deviation response map in step S106 includes: performing morphological closing operation and connected domain identification on the residual pixel distribution after the orthogonal projection transformation; extracting an abnormal physical region in the residual pixel distribution that meets the preset area range and geometric feature constraint, and generating the deviation response map based thereon.

[0044] Embodiment one: In the metal panel appearance detection scene with strong directional wire drawing texture on the surface, the environmental light fluctuation causes the gray level jump amplitude of the background texture to exceed the gray level gradient of the fine scratch defect, and the gray level gradient direction of the scratch defect coincides with the gray level gradient direction of the background wire drawing texture. The isotropic image processing operator applies the same penalty weight in all directions, and the loss of the defect signal parallel to the texture direction is generated when the background texture is suppressed. The machine vision system produces constraints between false positives and missed detections. The method obtains the original discrete pixel matrix of the product to be detected. For the target pixel point in the original discrete pixel matrix, a local structure tensor matrix M is constructed based on the gradient distribution of the pixels in the neighborhood. The first eigenvector e1 representing the dominant direction of the local background texture is determined by performing eigenvalue decomposition operation on the local structure tensor matrix M. After eigenvalue decomposition, the maximum eigenvalue and the second largest eigenvalue of the local structure tensor matrix M are extracted, and the structure coherence index c at the sampling point is calculated according to the energy difference ratio of the maximum eigenvalue and the second largest eigenvalue.

[0045] The system constructs a null space projection operator P using a first eigenvector e1, projects gradient components of a target pixel point into a space corresponding to the null space projection operator P, converts a structure coherence index c into a projection weight factor w through a preset monotonically increasing mapping function, and modulates a projection gain of the null space projection operator P using the projection weight factor w to obtain a modified projection operator The calculation formula of the modified projection operator is as follows: , wherein is a unit matrix, e1 is the first eigenvector, and w is the projection weight factor. This mechanism projects image signals into the zero space of the dominant gradient direction of the background texture in the local image block, and the energy of the structural background texture is annihilated due to the small component in the zero space. When the extension direction of the scratch defect is consistent with the dominant direction of the background texture, the system starts the compensation link based on the non-stationarity detection of the energy flow space. The system defines a linear observation operator along the dominant direction determined by the first eigenvector e1, extracts the tensor trace Tr of the target pixel point and its adjacent sampling points along the dominant direction using the linear observation operator, and obtains the tensor trace Tr by calculating the sum of the main diagonal elements of the local structure tensor matrix M, which is used to represent the total gradient energy of the local region. The system calculates the spatial axis variation rate of the tensor trace Tr in the dominant direction, and the calculation formula is as follows: , wherein is the spatial axis variation rate, and are the tensor traces of the adjacent sampling points before and after the dominant direction, respectively, and d is the spatial sampling step. When the spatial axis variation rate exceeds a preset stationary threshold interval, a non-stationarity pulse is identified. The system reduces the suppression intensity of the modified projection operator to the signal component parallel to the first eigenvector e1, and generates a residual pixel distribution compensated by the gain weight.

[0046] The system uses the tensor trace Tr as a reference index for measuring the total local gradient energy, normalizes the residual pixel value, converts the absolute gradient deviation into a relative structure deviation, and makes the residual intensity not affected by the reflectivity difference of the workpiece surface or the spatial attenuation of the light source. The system performs adaptive threshold determination based on the reconstructed residual feature image, identifies the pixel cluster deviating from the background distribution, and visualizes the subtle scratch defects originally submerged in the strong texture background through the reconstructed residual feature image. The modified projection operator Based on the dynamic generation of local image features, the system is adaptive to global uneven illumination or background texture deformation, the background structure signal and the defect signal are decoupled in the feature space, the defect signal parallel to the texture direction is completely presented in the residual domain, and the system solves the problem of detecting subtle defects in complex texture background while maintaining the existing hardware configuration.

[0047] In the image processing verification platform simulating the industrial pipeline environment, the surface image of the metal panel is obtained by establishing a simulation environment based on a physical optical reflection model, the surface layer structure generated by the drawing process is simulated by using a finite element analysis method, and the scattering distribution of the structure to the incident light is simulated, the imaging sensor of the data acquisition device has a pixel specification of 2048*2048, the sampling frequency is set to 60Hz, in the test process, Gaussian white noise with a signal-to-noise ratio of 20dB is actively injected into the original discrete pixel matrix, and power frequency flicker interference with an amplitude of 5% of the average gray scale of the background is superimposed, which is used to simulate the random disturbance of electromagnetic noise and light source fluctuation in the real workshop environment to the image signal, when calculating the local structure tensor matrix M, the value logic of the neighborhood window size N is involved, the selection of the neighborhood window size N depends on the trade-off between the minimum feature width of the defect to be identified and the energy distribution of the image noise, if the neighborhood window size N is too small, the local structure tensor is sensitive to the local high-frequency noise, which causes the direction of the first principal vector e1 to deviate from the physical real direction, if the neighborhood window size N is too large, the curvature feature of the local texture is excessively smoothed, which causes the structure coherence index c of the defect edge to decrease, in this test, for the scratch defect with a width of 2 to 3 pixels, the neighborhood window size N is determined as 5*5 pixels, so that the gradient feature of the defect area can be retained while suppressing the 20dB background noise.

[0048] In the running process of the sample group, the local structure tensor matrix M of the drawing background area is extracted, the ratio of the maximum eigenvalue to the second largest eigenvalue presents a one-way distribution characteristic, and the measured structure coherence index c is stable near 0.85, indicating that the background texture has structural consistency, the control group with the removal of the compensation link, i.e., the projection transformation of the modified projection operator is performed without the non-stationary detection of the spatial axis change rate , it is observed that for the scratch defect with an angle less than 5 degrees with the direction of the first principal vector e1, the signal-to-noise ratio of the control group in the residual image decreases to 1.2, the defect signal and the texture background are overlapped, the system cannot extract the effective defect contour, after introducing the non-stationary detection based on the tensor energy flow, the system calculates the tensor trace Tr sequence at the target pixel point, and the gradient mutation is captured at the scratch position, and the measured spatial axis change rate The value reached 15.6, exceeding the preset stable threshold range. This abrupt change triggered the correction projection operator. Gain compensation enhances the energy of suppressed signal components parallel to the main texture direction by 3.5 times. Data shows that, under the same background noise interference, the detection sensitivity of the sample group of this invention for defects parallel to the texture direction is increased from 45% in the control group to 92%, and the background suppression ratio of the residual image is stable above 28dB when the structural coherence index c is in the range of 0.8 to 0.9. As the defect size is further reduced, when the scratch width is less than 1.5 pixels, the spatial axis change rate is limited by the optical transfer function of the imaging sensor. The pulse intensity shows a decay trend, indicating that the system's detection capability is approaching the physical limit. Within the parameter range defined by the present invention, by synergistically utilizing the eigenvalue decomposition of the local structure tensor and the dynamic compensation of energy flow, the system achieves deep annihilation of background energy under strong texture interference. Experiments verify that the method can decouple directionally coupled feature signals, and its output residual feature image provides definite technical indicators for subsequent defect quantification analysis, meeting the reproducibility requirements of surface quality detection in industrial settings.

[0049] Example 3: In an industrial scenario requiring compatibility testing of metal parts from different brushed batches, the surface texture roughness differences between batches cause a shift in the background noise distribution of the structure tensor trace. Using a fixed threshold can lead to missed detections at low-contrast defects. To determine the physical property benchmark for a specific batch, the processor acquires 50 defect-free sample images from the same batch. The processor calculates the local structure tensor matrix M at the sampling points in the defect-free sample set, extracts the tensor trace Tr distribution globally, and calculates the corresponding spatial axis change rate. A sequence is used to calculate the arithmetic mean of a sample set. with standard deviation Upper limit of the stable threshold range The formula for determining it is as follows: ,in, The upper limit of the stable threshold range, The mean of the rate of change of the spatial axis. Standard deviation, As the confidence factor, in this calibration process, With a value of 3.0, this procedure establishes a physical relationship between the threshold and the background noise power spectral density, reducing the uncertainty caused by manual setting.

[0050] For the mapping process between the structural coherence index c and the projection weighting factor w, the system adopts a nonlinear mapping operator. The calculation logic of the projection weighting factor w is as follows: wherein w is a projection weight factor, c is a structure coherence index, and a is a gain coefficient controlling the steepness of the mapping, is a bias constant, in the specific deployment of the present solution, a is set to 10, while is set to 0.5, when the local texture presents strong anisotropy, i.e. c tends to 1, the mapping function makes w approaching to 1, in the modified projection operator , background energy annihilation is produced, when the region presents isotropic noise, i.e. c is small, the weight factor w is reduced, false residual distribution produced by ambiguous projection direction is suppressed; the system performs calibration on the spatial sampling step size d of the linear observation operator, the processor acquires the equivalent pixel size δ of the imaging system on the target object plane, sets the spatial sampling step size d to be 2 times the length of δ, to meet the sampling constraint of spatial discrete signal recovery, by substituting the calibrated step size d into the calculation of the spatial axis variation rate , the gradient energy flow description aligned with the physical scale is acquired, by introducing the statistical calibration procedure and the nonlinear mapping logic, the system completes the parameter update of the detection operator within 5 seconds when facing batch switching of texture feature fluctuation, the threshold value decision is converted into a calculation process based on observation facts, the contrast gain of the scratch defect in the residual image is kept above 20dB.

[0051] Example Four: In the appearance defect detection working condition with high reflectivity metal substrate, the gain characteristics of the imaging sensor and the bidirectional reflectance distribution function difference of the workpiece surface produce dynamic range deviation of the local structure tensor trace, the processor runs the preset calibration procedure, determines the structure coherence reference distribution of the background texture by using the reference sample image with known roughness distribution collected under the illumination condition, calculates the structure coherence index c at the global internal sampling points of the reference sample and generates the probability density function, determines the characteristic value at the cumulative distribution function reaching 0.95 in the probability distribution curve as the bias constant .

[0052] When the system is in the imaging light path geometry adjustment or environmental background radiation intensity changes of the working conditions, the processor runs the parameter reconstruction procedures based on adaptive gain feedback, the gain coefficient of the calibration through the system power after the initialization sequence is completed: the system in 200 ms for 10 consecutive image acquisition of the defect-free reference area, the average energy of the background gradient, if the current background average energy relative to the 1000.0 energy reference value deviation exceeds 15%, then according to the deviation of each 1% corresponding to 0.05 step value of the proportion, the gain proportion coefficient is adjusted to ensure that in different reflectivity of the metal surface, non-stationary pulse trigger threshold is always maintained above the 4.0 times standard deviation level of the noise floor, the system acquires the gray gradient energy component of the background area, the gain coefficient a of the control mapping steepness is corrected according to the ratio of the gray gradient energy component and the reference sample reference energy, the correction formula of the gain coefficient a is as follows: Wherein, a is the corrected gain coefficient, The basic gain coefficient is 10, The gradient average energy of the reference sample, The gradient average energy of the current background area, the calculation process makes the mapping logic and the coupling relationship between the imaging system and the photoelectric conversion characteristics and surface scattering characteristics is associated, the system updates the parameter value in the register to make the response curve of the projection weight factor w match the change trend of the image signal-to-noise ratio characteristics, and the background energy residual value in the residual image is kept below the preset noise floor.

[0053] Example five: in the deployment scene of the circumferential surface scratch detection of the shaft type parts, the nonlinear distortion of the imaging system will cause the dominant direction of the local structure tensor to produce angle deflection with the discrete pixel axial direction, the processor runs the coordinate discretization calibration program, and the center position of the target pixel point in the image coordinate system is obtained And The direction cosine components u and v of the first eigenvector e1, the processor calculates the discrete coordinates of the sampling point sequence according to the spatial sampling step d, and the calculation formula of the discrete coordinates is as follows: , Wherein, And The integer pixel coordinates of the ith sampling point, i is the sampling index, which takes the integer value between negative 5 and positive 5, and d is the spatial sampling step. The program uses the coordinate rounding operation to map the continuous direction vector to the grid point of the original discrete pixel matrix, solving the position offset problem of the feature extraction path in the discrete sampling space.

[0054] When the system uses the modified projection operator When the residual feature image is generated and the defect component is identified, the processor runs a decision rule based on statistical background modeling, selects a sample point sequence in the residual feature image to construct a noise sample set, and calculates the mean value of the pixel gray scale of the sample set and the standard deviation The appearance defect detection threshold is set as the mean value and 4 times the standard deviation When the residual pixel value at the sample point exceeds the appearance defect detection threshold , the position is determined as a defect candidate region and the pixel connected domain satisfying the geometric size constraint is extracted. The rule adaptively calibrates the determination condition with the change of the environmental illumination fluctuation or the workpiece surface reflectivity by establishing the statistical benchmark of the background feature distribution. The background suppression strength of the residual image is maintained above 30dB.

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

[0056] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application but not limit the present application. Although the present application has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present application can be modified or replaced equivalently without departing from the spirit and scope of the present application.

Claims

1. A machine vision based product appearance defect detection method for health monitoring of a current carrying circuit entity of an electric energy supply system, characterized in that, The method comprises the following steps: Step S101, acquiring original image data representing the physical form of the distributed parameter entity in the controlled loop; Step S102, calculating the local structure tensor matrix of the sampling points in the original image data, and performing eigenvalue decomposition operation on the local structure tensor matrix to generate a dominant eigenvector representing the background texture distribution; Step S103, according to a preset sampling interval, extracting a tensor trace sequence of the sampling points and adjacent sampling points along a linear observation domain defined by the dominant eigenvector, to construct a local energy evolution distribution chain; Step S104, calculating the rate of change of the local energy evolution distribution chain on the spatial axis, and identifying a non-stationary pulse at the sampling point when the absolute value of the rate of change deviates from a preset stationary threshold interval; Step S105, adjusting the gain weight of the null space projection operator according to the modulus of the non-stationary pulse, and performing orthogonal projection transformation on the sampling points under the projection constraint of the dominant eigenvector to generate a residual pixel distribution compensated by the gain weight; Step S106, generating a deviation response map using the residual pixel distribution, and outputting an alarm signal indicating that the power supply system has a physical damage risk; And in the process of performing the orthogonal projection transformation of step S105, a dynamic adjustment mechanism based on a structure coherence index is introduced; the structure coherence index at the sampling point is calculated in real time by using the ratio of the maximum eigenvalue to the second largest eigenvalue of the local structure tensor matrix; when the structure coherence index is lower than a preset coherence threshold, the projection weight factor of the null space projection operator is reduced to limit the energy leakage at the texture turning point of the current-carrying loop entity.

2. The method of claim 1, wherein the method further comprises: Step S104 comprises the following steps: obtaining the tensor trace difference value between adjacent nodes in the local energy evolution distribution chain by using a central difference operator; calculating the spatial derivative of the tensor trace difference value with respect to the spatial sampling step d determined by the sampling interval to generate the rate of change on the spatial axis; and defining the absolute value of the spatial derivative as the modulus of the non-stationary pulse, wherein the modulus is used to adjust the gain weight to achieve energy enhancement of the uniform weak deviation signal on the surface of the distributed parameter entity; wherein the preset stationary threshold interval is determined according to the gradient mean value of the background area in the local energy evolution distribution chain.

3. The method of claim 1, wherein the method further comprises: Step S105 further comprises: extracting the neighborhood tensor field spatial cohesion strength of the sampling point within a range of 3 to 7 pixels; and performing nonlinear smoothing filtering on the non-stationary pulse using the spatial cohesion strength to eliminate sensor noise artifacts in the original image data and ensure the physical purity of the residual pixel distribution.

4. The method of claim 1, wherein the method further comprises: The specific formula for calculating the rate of change on the spatial axis in step S104 is: wherein, is the rate of change, and are the tensor trace values of adjacent sampling points in the direction of the dominant eigenvector, and d is the spatial sampling step.

5. The method of claim 1, wherein the method further comprises: The tensor trace in step S103 is an objective physical index representing the total gradient energy of the local area; the tensor trace is obtained by calculating the sum of the main diagonal elements of the local structure tensor matrix, which is used to quantify the structural complexity of the physical morphology of the surface of the distributed parameter entity.

6. The method of claim 1, wherein the method further comprises: After step S106, the deviation response map is further subjected to normalization hedging processing; the pixel values in the residual pixel distribution are linearly scaled using the tensor trace as the normalization denominator to eliminate the photosensitive intensity deviation caused by environmental light fluctuations in the power supply system.

7. The method of claim 1, wherein the method further comprises: The gain weight of the null space projection operator is adjusted in step S105, which includes defining a monotonically increasing mapping function, and increasing the gain weight by using the mapping function when the modulus of the non-stationary pulse exceeds a preset pulse trigger threshold, so that the deviation signal consistent with the background texture direction is retained in the deviation response map.

8. The method of claim 1, wherein the method further comprises: In step S102, the eigen decomposition operation is performed by introducing a multi-scale constraint factor, a plurality of sets of candidate vector sets are obtained by performing Gaussian kernel convolution processing within a spatial scale of 0.5 to 1.5 pixels, and a set of vectors with the highest consistency with the main trend of the carrier loop entity is selected as the dominant eigen vector. 9.The machine vision-based product appearance defect detection method of claim 1, wherein, In step S106, the deviation response map is generated by performing morphological closing operation and connected domain identification on the residual pixel distribution after the orthogonal projection transformation, and extracting an abnormal physical region in the residual pixel distribution that meets the preset area range and geometric feature constraint, and generating the deviation response map based on the abnormal physical region.

Citation Information

Patent Citations

  • Function-level evolvable hardware-based image spatial filtering system and method

    CN102117480A

  • Automatic motor assembly line and method thereof

    CN120110105A

  • Industrial product surface defect image analysis method for few-sample scene

    CN121391886A