Alloy resistor surface defect real-time detection method and system based on image processing

By constructing local perturbation factors, grayscale texture perturbation factors, and significant region structural responsivity, combined with weighted grayscale histograms and an improved Otsu threshold segmentation algorithm, the problems of missed detection and false alarms in the detection of minute defects on the surface of alloy resistors are solved, achieving higher accuracy in detection.

CN120894367AActive Publication Date: 2025-11-04SUZHOU PROSEMI MICRO-ELECTRONIC TECH CO LTD

Patent Information

Application Number
CN202511415792.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-30
Publication Date
2025-11-04
Estimated Expiration
2045-09-30

AI Technical Summary

Technical Problem

Traditional Otsu threshold segmentation algorithm has difficulty effectively identifying minute defects, especially inclusions and pores, in the detection of surface defects in alloy resistors, leading to missed detections and false alarms.

Method used

By constructing local perturbation factors, grayscale texture perturbation factors, local defect response factors, and significant region structural response, and combining weighted grayscale histograms with an improved Otsu threshold segmentation algorithm, the detection accuracy of surface defects in alloy resistors is improved.

Benefits of technology

It improves the ability to identify minute defects on the surface of alloy resistors, reduces missed detections and false alarms, and enhances the stability and accuracy of detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120894367A_ABST
    Figure CN120894367A_ABST
Patent Text Reader

Abstract

The invention relates to the field of resistor defect detection, in particular to an alloy resistor surface defect real-time detection method and system based on image processing. The method comprises the following steps: acquiring an alloy resistor surface image, calculating a local sudden disturbance factor of a pixel point, analyzing a gray offset condition and a gradient direction deflection condition in a neighborhood of the pixel point, and calculating a gray texture disturbance factor; calculating a local defect response factor; obtaining each candidate region, analyzing the shape of each candidate region, and constructing a salient region structure responsivity in combination with local defect influence factors of pixel points in the candidate regions; giving a suspected abnormal weight to each pixel point in the gray scale resistor surface image, constructing a weighted gray scale histogram based on the suspected abnormal weight and the gray scale value, obtaining a segmentation threshold in the weighted gray scale histogram by using an Otsu threshold segmentation algorithm, and detecting the surface defect of the alloy resistor; and the precision of alloy resistor surface defect detection is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of resistance defect detection, in particular to an alloy resistance surface defect real-time detection method and system based on image processing. BACKGROUND

[0002] The alloy resistance is applied to high-end electronic instruments, precision measurement equipment, industrial automation control systems, automobile electronics, aerospace devices, power converters, medical imaging equipment and renewable energy inverters and other fields due to its excellent temperature coefficient stability, high-precision resistance retention and good long-term reliability; in these occasions, the alloy resistance not only bears basic functions such as voltage division, current limiting, load, damping, but also is used as a bridge-type measurement reference element or a feedback network core unit, and the performance directly determines the measurement accuracy, signal stability and safety and reliability of the entire system. Therefore, it is necessary to perform high-precision defect detection on the surface of the alloy resistance; when micro defects such as inclusions and pores appear on the surface of the alloy resistance, local current concentration and thermal spot effect are intensified, which causes problems such as resistance drift and increased thermal noise; real-time and automatic surface defect detection of the alloy resistance can improve the reliability and life of the equipment operation, reduce the number of maintenance downtime and reduce safety hazards.

[0003] The traditional Otsu threshold segmentation algorithm only relies on the gray histogram of the entire image, and assumes that the foreground and background are bimodal distribution. However, the alloy resistance surface texture is complex, and the defect pixel ratio is extremely small, so the histogram is often close to unimodal or the peak and valley are not obvious, it is difficult to find a reasonable threshold, and it is easy to submerge the small defects in the background; the Otsu threshold segmentation algorithm only considers the gray statistics, and the surface texture may cause similar defect gray pseudo-pixels, which interfere with the threshold selection in the global histogram, causing defects to be missed. SUMMARY

[0004] In order to solve the problem that the coupling between different types of process parameters and the change trend are not considered, which easily leads to the problem that the normal adjustment of the process parameters is misreported as abnormal data, the present application provides an alloy resistance surface defect real-time detection method and system based on image processing.

[0005] In the first aspect, the present application provides an alloy resistance surface defect real-time detection method based on image processing, which adopts the following technical scheme: An image of the gray resistance surface of the alloy resistance is obtained, and a local disturbance factor is calculated based on the difference between each pixel point in the image of the gray resistance surface and the maximum gray value in its neighborhood; a gray texture disturbance factor is calculated by analyzing the gray offset and the difference in gradient direction in the neighborhood of the pixel point; and the product of the normalized local disturbance factor and the normalized gray texture disturbance factor is calculated as a local defect response factor. Cluster analysis is performed on grayscale resistive surface images based on local defect response factors to obtain candidate regions. The shape characteristics of each candidate region are analyzed, and a significant region structural response is constructed by combining the local defect influence factors of pixels within the candidate regions. The significant region structural response is positively correlated with the local defect influence factors. Based on the significant region structural response, a suspected anomaly weight is assigned to each pixel in the grayscale resistive surface image. A weighted grayscale histogram is constructed based on the suspected anomaly weight and grayscale value. The Otsu threshold segmentation algorithm is used to obtain the segmentation threshold in the weighted grayscale histogram to detect surface defects in alloy resistors.

[0006] The beneficial effects are as follows: First, by analyzing the gray-level differences between each pixel and its neighborhood, a local perturbation factor with local mutation perception capability is constructed, which can respond to defective pixels with blurred edges and weak gray-level changes. Second, by introducing a gray-level texture perturbation factor, two common defect features, gray-level offset and texture direction deviation, are fused to improve the ability to identify non-significant defect areas. Third, by using clustering analysis to screen potential defect areas, background noise, atypical textures, and real abnormal targets are effectively distinguished. Fourth, the method of constructing a significant region structure responsivity and a weighted gray-level histogram introduces prior spatial distribution information into the global gray-level analysis of the image, improving the response intensity of gray-level statistics to abnormal areas. Finally, the improved threshold segmentation strategy enables stable detection even when low-contrast defects appear on the surface of the alloy resistor.

[0007] Furthermore, the method for obtaining the grayscale texture perturbation factor is as follows: The grayscale drift factor of a pixel is obtained based on the grayscale shift within the pixel's neighborhood. The gradient operator is used to calculate the gradient direction of each pixel and all other pixels in its neighborhood, and the average gradient direction of all pixels in the neighborhood of a pixel is calculated. The formula for calculating the grayscale texture perturbation factor is as follows: In the formula, This represents the grayscale texture perturbation factor for each pixel. This refers to the normalized grayscale shift factor for each pixel. It is a cosine function. The gradient direction for each pixel. It is the average of the gradient directions of all pixels in the neighborhood of each pixel; These are preset parameter tuning coefficients.

[0008] The beneficial effect is that: by extracting the extreme value of the absolute value of the gray difference between the pixel points in the neighborhood and all other pixel points, it is beneficial to analyze the pixel area with local mutation characteristics, and to enhance the identification of high gradient change areas such as alloy resistance surface inclusion boundaries and pore profiles; The introduction of two directions of gray shift and gradient direction statistics enhances the response ability to surface defects and enhances the identification accuracy of gray texture disturbance factors.

[0009] Further, the method for obtaining the gray shift factor is: for each pixel point in the gray resistance surface image, calculate the mean value of the gray values of all pixel points in the neighborhood of the pixel point as the first mean value, and calculate the absolute value of the difference between the gray value of the pixel point and the first mean value as the gray shift factor.

[0010] The beneficial effect is that: the gray shift factor as a deviation measure in image static distribution can obtain pixel points that do not show mutation edges but have long-term gray deviation from the average value of normal areas, which is beneficial to subsequent identification of inclusion centers or pore inner walls, which have no obvious boundaries but have obvious abnormal gray characteristics.

[0011] Further, the method for obtaining the gray shift factor is: for each pixel point in the gray resistance surface image, calculate the mean value of the gray values of all pixel points in the neighborhood of the pixel point as the first mean value, and calculate the absolute value of the difference between the gray value of the pixel point and the first mean value as the gray shift factor.

[0012] Further, the method for obtaining the significant region structure response degree is: The method for obtaining the significant region structure response degree is:

[0013] The beneficial effect is that: the significant region structure response degree is constructed, which combines the local defect response strength and the region shape regularity, retains the abnormal intensity information at the local pixel level, and performs secondary discrimination through the geometric morphological characteristics at the region scale.

[0014] Further, the method for obtaining the geometric shape factor is: for each candidate region, use an edge detection algorithm to obtain the edge line of each candidate region, the number of pixel points on the edge line is the length of the edge of each candidate region, the number of pixel points in each candidate region is the area of the candidate region, and the circularity of the candidate region is calculated based on the area and the length of the edge, and the reciprocal of the circularity is the geometric shape factor of each candidate region.

[0015] The beneficial effect is that the roundness evaluation index based on the side length and area relationship is constructed, the shape factor is formed by calculating the ratio between the number of pixels on the edge of the region and the number of pixels inside the region, and the reciprocal of the roundness evaluation is taken as the shape factor, so that the compactness degree of the shape is quantified.

[0016] Further, the suspected abnormal weight is the normalized significant region structure response degree of the candidate region where the pixel point is located.

[0017] Further, the alloy resistance surface defect is detected by using the Otsu threshold segmentation algorithm to obtain the segmentation threshold in the weight gray histogram, including: using the Otsu threshold segmentation method to obtain the segmentation threshold of the weighted gray histogram, obtaining a binary image, and taking the region greater than the segmentation threshold as a defect region.

[0018] In the second aspect, the application provides an alloy resistance surface defect real-time detection system based on image processing, which adopts the following technical scheme: The alloy resistance surface defect real-time detection system based on image processing comprises a processor and a memory, and the memory stores computer program instructions.

[0019] The alloy resistance surface defect real-time detection method based on image processing is generated into a computer program and stored in the memory to be loaded and executed by the processor, so that the system is made of the memory and the processor, and is convenient to use.

[0020] The application has the following technical effects: The present application improves the construction of the gray scale histogram in the Otsu threshold segmentation algorithm by analyzing the features of the small inclusions and pores on the surface of the alloy resistor in the image, solves the problem that the selection effect of the segmentation threshold in the Otsu threshold segmentation algorithm is poor due to the fact that only the gray scale features are considered without specific analysis of the features of the small defects, and the detection effect of the alloy resistor surface defects is poor; specifically, the present application constructs a local disturbance factor by extracting the maximum gray scale jump strength in the pixel neighborhood, strengthens the capture ability of the micro-mutation such as the pore edge and inclusion profile, and has a strong response characteristic to the weak edge isolated abnormal points; a gray scale drift factor reflects the continuous gray scale field distortion phenomenon in the pore interior or inclusion area by calculating the stable deviation of the pixel gray scale and the neighborhood mean; a gradient direction consistency measure introduces the statistical characteristics of the gradient direction, converts the abstract texture flow into a quantifiable parameter by using the cosine function, the denominator term constructs a sensitive evaluation mechanism for the degree of continuity destruction of the surface processing texture by calculating the absolute deviation of the gradient direction of the current pixel and the neighborhood direction mean, and when the metal wire drawing lines are truncated or distorted by defects, the parameter can present a nonlinear amplification response, and the gray scale drift factor forms a complementary verification of gray scale and texture; a local defect response factor is constructed by synergistic fusion, and the coupling effect of feature enhancement is realized by normalized product operation.

[0021] Further, the geometric shape factor automatically suppresses non-defect areas such as elongated cracks and broken edges by calculating the reciprocal of the roundness, focuses on the circular target by using the topological structure difference between the defect and the background noise, and constructs a high-level feature descriptor with spatial consistency and reasonable shape by dynamically associating the local defect intensity and the overall shape regularity. Finally, a suspected abnormal weight is constructed, the statistical weight of the potential defect pixels is improved, the weak gray scale difference submerged in the background noise in the traditional histogram is amplified, the weight of the pixels in the irregular area is weakened, so that the improved Otsu threshold segmentation algorithm can obtain a more accurate segmentation threshold, more accurately detects the alloy resistor surface defects, and improves the precision of the alloy resistor surface defect detection. BRIEF DESCRIPTION OF DRAWINGS

[0022] Figure 1 is a method flowchart of the alloy resistor surface defect real-time detection method based on image processing of the present application. DETAILED DESCRIPTION

[0023] The embodiment of the application discloses an alloy resistance surface defect real-time detection method based on image processing, acquires an alloy resistance surface image, calculates a local disturbance factor of a pixel point, analyzes a gray offset condition and a gradient direction deflection condition in a neighborhood of the pixel point, and calculates a gray texture disturbance factor; a local defect response factor is calculated; each candidate region is acquired, the shape of each candidate region is analyzed, and a significant region structure response degree is constructed in combination with the local defect influence factor of the pixel point in the candidate region; a suspected abnormal weight of each pixel point in the gray resistance surface image is given, a weighted gray histogram is constructed based on the suspected abnormal weight and in combination with a gray value, an Otsu threshold segmentation algorithm is used to acquire a segmentation threshold in the weighted gray histogram, and alloy resistance surface defects are detected; and the precision of alloy resistance surface defect detection is improved.

[0024] Reference Figure 1 The alloy resistance surface defect real-time detection method based on image processing comprises steps S1-S4.

[0025] Step S1: acquiring a gray resistance surface image of an alloy resistance.

[0026] The alloy resistance surface image is acquired, the application uses an industrial CCD camera and a uniform light source to acquire the alloy resistance surface image, the uniform light source selected in an embodiment of the application is a diffuse reflection backlight, and other light sources can be selected by the implementer based on actual conditions; in order to reduce the interference of noise, a Gaussian filter is selected in an embodiment of the application to perform denoising processing on the alloy resistance surface image, and a denoised alloy resistance surface image is acquired, and other denoising methods can be selected by the implementer based on actual conditions; the denoised alloy resistance surface image is subjected to gray processing to acquire a gray resistance surface image. The gray processing is a known technology, and will not be described herein.

[0027] Step S2: calculating a local disturbance factor based on the difference between each pixel point in the gray resistance surface image and the maximum gray value in the neighborhood of the pixel point; calculating a gray texture disturbance factor by analyzing the gray offset condition and the difference of the gradient direction in the neighborhood of the pixel point; and calculating the product of the normalized local disturbance factor and the normalized gray texture disturbance factor as a local defect response factor.

[0028] In the process of alloy resistance production and processing, low-contrast and small-scale defects such as inclusions and pores may occur on the surface of the alloy resistance; specifically, in the gray resistance surface image, pores and inclusions usually exhibit a sudden local disturbance in the image gray space, especially near the boundary. Such disturbance does not necessarily change the gray mean value of the whole region, but exhibits a sharp jump between a pixel and surrounding pixels.

[0029] Based on the above analysis, for each pixel point in the gray resistance surface image, a rectangular window with a side length of n is constructed with the pixel point as the center, and n is 3 in an embodiment of the present application, and other values can be selected by the implementer based on the actual situation; the absolute value of the difference between the gray value of each pixel point and the gray value of other pixel points in the neighborhood of the pixel point is calculated, and the absolute value of the difference between the gray value of the pixel point and the gray value of all other pixel points in the neighborhood of the pixel point is taken as the local disturbance factor of each pixel point.

[0030] At the same time, on the alloy resistance surface, especially in the pore area, the phenomenon of stable low or high gray value often occurs, but there is no severe local mutation calculation; at the same time, the alloy resistance surface usually has certain processing texture, such as metal wire drawing direction or contour texture extension line. When inclusions or pores appear, they often cause the interruption or deflection of the local texture flow direction. This phenomenon is manifested as a sudden change in the direction angle in the gradient direction field.

[0031] Based on the above analysis, the gray texture disturbance factor is calculated, specifically: for each pixel point in the gray resistance surface image, the mean value of the gray values of all pixel points in the neighborhood of the pixel point is calculated as the first mean value, and the absolute value of the difference between the gray value of the pixel point and the first mean value is calculated as the gray drift factor; at the same time, the gradient direction of each pixel point and all other pixel points in its neighborhood is calculated using the sobel gradient operator, the mean value of the gradient direction of all pixel points in the neighborhood of the pixel point is calculated, and the gray texture disturbance factor of each pixel point is constructed, and the calculation formula is: ; in the formula, is the gray texture disturbance factor of each pixel point, is the normalized gray drift factor of each pixel point, is the cosine function, is the gradient direction of each pixel point, is the mean value of the gradient direction of all pixel points in the neighborhood of each pixel point; is a preset tuning coefficient to prevent the denominator from being 0, and in an embodiment of the present application the value of is 0.01, and other values can be selected by the implementer based on the actual situation.

[0032] It should be noted that for the neighborhood region of each pixel point, if the neighborhood region is a normal region, the surface has the texture of the alloy resistance processing, and the gray value remains consistent without deviation; when the neighborhood region has inclusions or pores, the original processing texture of the alloy resistance will be disturbed, and the angle of the gradient direction of each pixel point will change suddenly, and by comparing the consistency of the current pixel direction and the neighborhood direction, the local area that destroys the continuity of the original texture can be effectively detected, and when the directions are inconsistent, the greater the value of The closer the value of the formula is to 1, the smaller the value of the denominator in the formula, and meanwhile, the gray value in the neighborhood of the pixel point will be offset, the value of the obtained gray texture disturbance factor is larger, and the value of the obtained gray texture disturbance factor is larger at this time; otherwise, the value of the obtained gray texture disturbance factor is smaller.

[0033] Further, the local defect response factor of each pixel point is calculated by normalizing the local defect response factor and the gray texture disturbance factor of all pixel points, and the calculation formula is: ; in the formula, is the local defect response factor of each pixel point; is the normalized gray texture disturbance factor of each pixel point, is the normalized local defect response factor of each pixel point.

[0034] It should be noted that the local defect response factor reflects the small changes of weak contrast, gray offset and direction anomaly in the neighborhood of the pixel point, and improves the response ability of fine inclusions and pores; the greater the value of the local defect response factor of the pixel point is, the greater the possibility of inclusions and pores in the pixel point and its neighborhood is; otherwise, the smaller the value of the local defect response factor of the pixel point is, the smaller the possibility of inclusions and pores in the pixel point and its neighborhood is.

[0035] Step S3: obtaining each candidate region based on the local defect response factor for clustering analysis of the gray resistance surface image, analyzing the shape features of each candidate region, and constructing a significant region structure response degree in combination with the local defect influence factor of the pixel point in the candidate region, wherein the significant region structure response degree and the local defect influence factor are in a positive correlation.

[0036] Further, on the alloy resistance surface, when the alloy resistance surface has relatively inconspicuous pores or inclusion defects, the pores usually exhibit a closed edge close to a circle, and the inclusions can be in an elliptical or lump shape; and the area formed by the background texture and edge noise is more likely to be slender, broken or irregular in shape.

[0037] In the above steps, the local defect response factor of each pixel point is obtained, which reflects the characteristics of local extreme difference, gray deviation and texture disturbance in the image in the neighborhood of the pixel point, and the greater the value of the local defect response factor is, the more likely the pixel point is at the core position of the defect area.

[0038] Therefore, the DBSCAN clustering algorithm is used to cluster the pixel points based on the local defect response factor, and the area composed of the pixel points in each clustering cluster is obtained as each candidate region.

[0039] For each candidate region, an edge line of the candidate region is obtained using a Canny edge detection algorithm, a number of pixel points on the edge line is taken as a side length of the candidate region, a number of pixel points in the candidate region is taken as an area of the candidate region, a circularity of the candidate region is calculated based on the area and the side length of the candidate region, and an inverse of the circularity is taken as a geometric shape factor of the candidate region.

[0040] It should be noted that the geometric shape factor can effectively distinguish non-structural defects. If the candidate region is non-circular, the circularity value is much greater than 1, the value of the geometric shape factor is significantly magnified, and the possibility of the candidate region being abnormal is smaller. Conversely, the possibility of the candidate region being abnormal is greater.

[0041] Further, for each candidate region, a ratio of a maximum value of the local defect response factor of the pixel points in the candidate region to the geometric shape factor of the candidate region is taken as a significant region structure response degree of the candidate region.

[0042] It should be noted that the greater the value of the significant region structure response degree of the candidate region, the greater the possibility of the candidate region having unobvious pores or inclusion defects. Conversely, the smaller the possibility of the candidate region having unobvious pores or inclusion defects.

[0043] Step S4: Based on the significant region structure response degree, a suspected abnormal weight of each pixel point in the gray resistance surface image is given, a weighted gray histogram is constructed according to the suspected abnormal weight and the gray value, a segmentation threshold value in the weighted gray histogram is obtained using an Otsu threshold segmentation algorithm, and the alloy resistance surface defects are detected.

[0044] The significant region structure response degrees of all the candidate regions are normalized. Further, for each pixel point in the gray resistance surface image, a normalized significant region structure response degree of a candidate region in which the pixel point is located is taken as a suspected abnormal weight of the pixel point, and a weighted gray histogram of the gray resistance surface image is constructed based on the suspected abnormal weight. The construction method of the weighted gray histogram is a known technology, and will not be described herein.

[0045] The weighted gray histogram gives higher statistical weights to more representative pixels in the image, so that weak gray differences caused by defects are effectively magnified in the histogram, so that the segmentation threshold value is naturally inclined to focus on the defect region rather than the background noise. At the same time, the weighted processing can suppress the interference of large-area background uneven texture and light changes on the peak and valley positions of the histogram, so that the global segmentation threshold value is more stable and reliable.

[0046] The segmentation threshold value of the weighted gray histogram is obtained using an Otsu threshold segmentation method, so as to obtain a binary image. The region greater than the segmentation threshold value is taken as a defect region, and the detection of the defect region of the alloy resistance surface is completed.

[0047] Specifically, in the process of industrial production of alloy resistor, the products are sent through the field of view one by one by a conveyor belt, a camera is triggered to take a picture by using a photoelectric switch; then the taken picture is transmitted to a PC for the above-mentioned image analysis processing, to detect whether a surface defect exists, to screen out the real defect and to mark the position of the defect. The detection result is sent to a control system in real time, to drive a sorting mechanism to remove the product containing the defect. For the product needing double-side detection, the product can also be repeatedly taken pictures by using a turnover mechanism, so as to complete the real-time monitoring of the surface defect of the alloy resistor.

[0048] The embodiment of the present application further discloses an alloy resistor surface defect real-time detection system based on image processing, comprising a processor and a memory, and the memory stores computer program instructions, which realize the alloy resistor surface defect real-time detection method based on image processing according to the present application when the computer program instructions are executed by the processor.

[0049] The above-mentioned system further comprises other components such as a communication bus and a communication interface which are well known to those skilled in the art, and the setting and functions of the components are known in the art, thus the details are not described herein.

[0050] The above are the preferred embodiments of the present application, and do not limit the protection scope of the present application, so: all equivalent changes made according to the structure, shape, principle of the present application should be covered in the protection scope of the present application.

Claims

1. A real-time detection method for surface defects in alloy resistors based on image processing, characterized in that, The steps include: acquiring a grayscale resistivity surface image of the alloy resistor, and calculating the local disturbance factor based on the difference between each pixel in the grayscale resistivity surface image and the maximum grayscale value in its neighborhood; The grayscale texture perturbation factor is calculated by analyzing the grayscale offset and gradient direction differences in the neighborhood of the pixel; the product of the normalized local perturbation factor and the normalized grayscale texture perturbation factor is calculated as the local defect response factor. Cluster analysis is performed on grayscale resistive surface images based on local defect response factors to obtain candidate regions. The shape characteristics of each candidate region are analyzed, and a significant region structural response is constructed by combining the local defect influence factors of pixels within the candidate regions. The significant region structural response is positively correlated with the local defect influence factors. Based on the significant region structural response, a suspected anomaly weight is assigned to each pixel in the grayscale resistive surface image. A weighted grayscale histogram is constructed based on the suspected anomaly weight and grayscale value. The Otsu threshold segmentation algorithm is used to obtain the segmentation threshold in the weighted grayscale histogram to detect surface defects in alloy resistors.

2. The real-time detection method for surface defects of alloy resistors based on image processing according to claim 1, characterized in that, The local perturbation factor is the maximum absolute value of the difference between the gray values ​​of a pixel and all other pixels in its neighborhood.

3. The real-time detection method for surface defects of alloy resistors based on image processing according to claim 1, characterized in that, The method for obtaining the grayscale texture perturbation factor is as follows: The grayscale drift factor of a pixel is obtained based on the grayscale shift within the pixel's neighborhood. The gradient operator is used to calculate the gradient direction of each pixel and all other pixels in its neighborhood, and the average gradient direction of all pixels in the neighborhood of a pixel is calculated. The formula for calculating the grayscale texture perturbation factor is as follows: In the formula, This represents the grayscale texture perturbation factor for each pixel. This refers to the normalized grayscale shift factor for each pixel. It is a cosine function. The gradient direction for each pixel. It is the average of the gradient directions of all pixels in the neighborhood of each pixel; These are preset parameter tuning coefficients.

4. The real-time detection method for surface defects of alloy resistors based on image processing according to claim 3, characterized in that, The method for obtaining the grayscale drift factor is as follows: for each pixel in the grayscale resistive surface image, the mean of the grayscale values ​​of all pixels in the neighborhood of the pixel is calculated as the first mean, and the absolute value of the difference between the grayscale value of the pixel and the first mean is calculated as the grayscale drift factor.

5. The real-time detection method for surface defects of alloy resistors based on image processing according to claim 1, characterized in that, The method of obtaining candidate regions by clustering analysis of grayscale resistive surface images based on local defect response factors includes: using a clustering algorithm to cluster pixels based on local defect response factors, and obtaining the regions composed of pixels in each cluster as candidate regions.

6. The real-time detection method for surface defects of alloy resistors based on image processing according to claim 1, characterized in that, The method for obtaining the structural response of the salient region is as follows: The geometric shape factors of each candidate region are obtained by analyzing the geometric shape features of each candidate region. The ratio of the maximum value of the local defect response factor of the pixel in the candidate region to the geometric shape factor of each candidate region is taken as the significant regional structure response of the candidate region.

7. The real-time detection method for surface defects of alloy resistors based on image processing according to claim 6, characterized in that, The method for obtaining the geometric shape factor is as follows: for each candidate region, the edge line of each candidate region is obtained using an edge detection algorithm, the number of pixels on the edge line is taken as the side length of each candidate region, the number of pixels in each candidate region is taken as the area of ​​the candidate region, the roundness of the candidate region is calculated based on the area and side length of the candidate region, and the reciprocal of the roundness is taken as the geometric shape factor of each candidate region.

8. The real-time detection method for surface defects of alloy resistors based on image processing according to claim 1, characterized in that, The suspected anomaly weight is the normalized salient region structure response of the candidate region where the pixel is located.

9. The real-time detection method for surface defects of alloy resistors based on image processing according to claim 1, characterized in that, The method of using the Otsu threshold segmentation algorithm to obtain the segmentation threshold in the weighted grayscale histogram to detect defects on the alloy resistor surface includes: using the Otsu threshold segmentation method to obtain the segmentation threshold of the weighted grayscale histogram, obtaining a binary image, and identifying areas larger than the segmentation threshold as defect areas.

10. A real-time detection system for surface defects in alloy resistance based on image processing, characterized in that, include: A processor and a memory, the memory storing computer program instructions that, when executed by the processor, implement the image processing-based real-time detection method for surface defects of alloy resistors according to any one of claims 1-9.

Citation Information

Patent Citations

  • Method and system for identifying metal solidification area with texture

    CN107657620A

  • Photoelectric product detection method and system based on image processing

    CN119850602A

  • Aluminum profile surface defect automatic detection method and system based on image recognition

    CN120374615A

  • Cloth defect detection and classification method for garment production

    CN120410984A

  • Thyroid ultrasound-assisted scanning method and system

    CN120510106A

Cited By

  • Weld defect intelligent detection method based on machine vision

    CN121095262A

  • Radiator weld defect identification method and system

    CN121147228A

  • Distributed data processing method and system for color sorting equipment

    CN121166384A

  • Method and system for automatically identifying electrical equipment identifier based on image processing

    CN121305577A

  • Precious metal quality defect detection method based on image recognition

    CN121545021A