Optical means-based test system and method for forging flaws of strain clamp

The tension clamp forging defect testing system, which uses optical methods, removes image blur by employing Fourier transform and deep learning models, and combines histogram equalization and dynamic threshold setting to solve the problems of low efficiency and poor accuracy in traditional detection methods, thus achieving efficient and accurate detection of tension clamp defects.

CN120820546BActive Publication Date: 2026-02-10NANTONG LIJIA ELECTRIC CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511021677.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-07-24
Publication Date
2026-02-10
Estimated Expiration
2045-07-24

AI Technical Summary

Technical Problem

Traditional manual visual inspection of tension clamp defects is inefficient and easily affected by subjective factors. Existing non-destructive testing methods are costly and not suitable for rapid inspection. In optical inspection, forging vibration causes image blurring, affecting the accuracy of defect testing.

Method used

An optical-based forging defect testing system for tension clamps is adopted, which includes a vibration detection unit, a fuzzy mapping unit, and a segmentation testing unit. The system removes image blur by using Fourier transform and deep learning models, and extracts defect points and evaluates quality by combining histogram equalization and dynamic threshold setting.

Benefits of technology

It improves the precision and accuracy of surface defect testing for tension clamps, enabling timely detection of minor defects, reducing the obscuration of defects by a rough background, and improving product quality and reliability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120820546B_ABST
    Figure CN120820546B_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of flaw testing, in particular to a tension clamp forging flaw testing system and method based on optical means, which comprises a vibration detection unit, a fuzzy mapping unit and a segmentation testing unit. The conversion mapping module of the present application performs gray level histogram statistics on the de-fuzzed tension clamp image, calculates the cumulative distribution value of the gray level, linearly maps the cumulative distribution value of the gray level to the target gray level range, generates a new gray level after rounding, realizes image equalization through pixel gray level replacement, enhances the image through image equalization, makes the detailed features on the surface of the tension clamp more obvious in the equalized image, reduces the covering of the detailed features on the surface of the tension clamp by the rough background in the de-fuzzed tension clamp image, increases the difference between the gray level of the detailed features on the surface of the tension clamp and the surrounding rough background area, and uses the gray level to distinguish the detailed features and the rough background to increase the accuracy of the flaw testing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of defect testing technology, and more specifically, to a system and method for testing defects in forging tension clamps based on optical means. Background Technology

[0002] Tension clamps are key hardware used to fix conductors, bear conductor tension, and connect conductors to insulator strings or towers. Their quality directly affects the safety and reliability of power transmission. Therefore, accurate defect detection of tension clamps is an important part of ensuring the stable operation of the power system.

[0003] Traditional inspection of defects in tension clamps mainly relies on manual visual inspection. However, this method has significant drawbacks. Manual inspection is extremely inefficient and cannot meet the speed requirements of large-scale production. Furthermore, the inspection results are easily affected by the subjective factors of the inspectors, and the accuracy and consistency cannot be guaranteed. For some minor defects, missed inspections often occur.

[0004] To compensate for the shortcomings of manual inspection, some non-destructive testing methods such as ultrasonic testing and X-ray testing have been introduced. Although these methods can detect internal defects in tension clamps, the equipment purchase cost is high, the inspection process is complicated, and professional operators are required to operate them. At the same time, their detection effect on surface defects is not as intuitive as optical inspection methods, and the inspection speed is slow, making them unsuitable for rapid inspection on production lines.

[0005] Based on the above, optical inspection methods have gradually attracted attention. However, in practical applications, the vibration generated during the forging process of tension clamps can cause optical imaging to become blurred. Therefore, traditional deblurring methods are usually used to remove the blur kernel in the image and improve the image clarity. Although the image clarity is improved, the detailed features of the tension clamp surface are still not obvious enough. This is because the tiny surface defects caused by vibration during the forging of tension clamps are masked by the rough background in the image, which seriously affects the accuracy and effectiveness of defect testing. Therefore, we provide a forging defect testing system and method for tension clamps based on optical methods. Summary of the Invention

[0006] The purpose of this invention is to provide a testing system and method for forging defects of tension clamps based on optical means, so as to solve the problems mentioned in the background art.

[0007] To achieve the above objectives, one of the objectives of this invention is to provide an optical-based testing system for forging defects in tension clamps, including a vibration detection unit, a fuzzy mapping unit, and a segmentation testing unit.

[0008] The vibration detection unit uses an optical vibration sensor to monitor the vibration data of the tension clamp during the forging process to trigger the image sensor, and the image sensor acquires the image of the tension clamp as a blurred image of the tension clamp.

[0009] The fuzzy mapping unit is used to generate an equalization image in response to the fuzzy tension clamp image in the vibration detection unit, and performs the following steps:

[0010] The blurred image of the tension clamp is first converted into a grayscale image, and then a two-dimensional Fourier transform is used to obtain the transformed frequency domain blurred image of the tension clamp, so as to analyze the amplitude spectrum characteristics of the blurred image of the tension clamp.

[0011] The blur kernel of the blurred tension clamp image is evaluated by combining the amplitude spectrum features of the blurred tension clamp image with the deep learning model and outputting blur parameters. The blur parameters are then combined with the known parameters in the blur kernel to evaluate the blur kernel of the blurred tension clamp image.

[0012] The blur kernel is converted into the frequency domain of the blur kernel using Fourier transform. The frequency domain of the blurred image of the tension clamp is extracted and divided by the frequency domain of the blur kernel. Then, the deblurred image of the tension clamp is obtained by using inverse Fourier transform.

[0013] The frequency of gray values ​​in the deblurred tension clamp image is statistically analyzed, the cumulative distribution value of gray values ​​is calculated, and the cumulative distribution value of gray values ​​is linearly mapped to the target gray range to obtain new gray values ​​to replace the gray values ​​of pixels in the deblurred tension clamp image, thereby generating an equalized image.

[0014] The segmentation test unit is used to receive the equalized image from the fuzzy mapping unit, segment it to test for defects, and implement the following test steps:

[0015] The grayscale histogram is obtained by traversing the pixels in the equalized image and dividing it into several sub-images to determine whether the marked sub-image is a background sub-image or a target sub-image. The grayscale values ​​of the marked target sub-image and the marked background sub-image are recorded.

[0016] The grayscale values ​​of the marked background sub-image and the marked target sub-image are calculated separately, and then the relative contrast is calculated to test whether the marked target sub-image is an abnormal sub-image.

[0017] The grayscale threshold and tolerance error threshold of the marked background sub-image are dynamically set. Then, the grayscale values ​​of the pixels extracted from the abnormal target sub-image are combined with the grayscale threshold and tolerance error threshold of the marked background sub-image to test and identify the pixels extracted from the abnormal target sub-image as defect points.

[0018] The target sub-image of the splicing mark is the complete target image. The defect points are connected in the target image to form the defect shape, and the quality of the tension clamp is evaluated.

[0019] As a further improvement to this technical solution, the conversion mapping module is used to receive the fuzz kernel and the converted frequency domain tension clamp fuzzy image from the fuzz kernel module, convert the fuzz kernel to the frequency domain of the fuzz kernel using Fourier transform, extract the frequency domain of the tension clamp fuzzy image from the converted frequency domain tension clamp fuzzy image, divide the frequency domain of the tension clamp fuzzy image by the frequency domain of the fuzz kernel, and then perform an inverse Fourier transform to convert the converted frequency domain tension clamp fuzzy image back to the spatial domain, thereby obtaining the defuzzified tension clamp image.

[0020] As a further improvement to this technical solution, the conversion mapping module also employs a histogram equalization method to enhance the image of the deblurred tension clamp, and performs the following implementation steps:

[0021] First, the frequency of grayscale pixels in the deblurred tension clamp image is statistically analyzed, and the total number of pixels is recorded. Then, the cumulative distribution value of the grayscale value is calculated using the pixel frequency H, the total number of pixels N, and the grayscale value k. Among them, H i This refers to the frequency of occurrence of the i-th pixel;

[0022] The cumulative distribution value of grayscale is linearly mapped to the target grayscale range to obtain the new grayscale value. Here, "round" refers to the rounding operation, and then the gray values ​​of the pixels in the deblurred tension clamp image are replaced with the corresponding new gray values ​​to generate an equalized image.

[0023] As a further improvement to this technical solution, the segmentation and marking module is used to receive the equalized image from the conversion and mapping module, traverse the pixels in the equalized image to obtain a grayscale histogram, segment the grayscale histogram into several sub-images, extract the number of pixels in the sub-images and mark the sub-images, and determine whether the marked sub-image is the main peak or the secondary peak based on the number of pixels corresponding to the marked sub-image. The main peak refers to the marked background sub-image, and the secondary peak refers to the marked target sub-image. The grayscale values ​​of the marked target sub-image and the marked background sub-image are recorded.

[0024] As a further improvement to this technical solution, the defect point module is used to receive the grayscale value of the background sub-image with the background marker and the grayscale value of the marked target sub-image from the segmentation marker module to test whether the marked target sub-image is an abnormal sub-image, and to implement the following test steps:

[0025] The mean gray value of the marked background sub-image and the mean gray value of the marked target sub-image are calculated using the gray values ​​of the marked background sub-image and the gray value of the marked target sub-image, respectively. Then, the variance of the gray values ​​of the marked background sub-image and the variance of the gray values ​​of the marked target image are calculated respectively.

[0026] The relative contrast is calculated using the average gray levels of the background sub-image and the target sub-image.

[0027] Set a relative contrast threshold, and use the relative contrast and the relative contrast threshold to test whether the marked target sub-image is an abnormal sub-image.

[0028] As a further improvement to this technical solution, the defect point module further tests the gray-level variance of the marked background sub-image, the gray-level variance of the marked target sub-image, the gray-level mean of the marked background sub-image, and the gray-level mean of the marked target sub-image to extract pixels as defect points and the shape of defects from the abnormal target sub-image, and implements the following test steps:

[0029] Based on the grayscale variance of the marked background sub-image and the grayscale variance of the marked target sub-image, the grayscale threshold and tolerance error threshold of the marked background sub-image are dynamically set respectively, and then the grayscale values ​​of the pixels are extracted from the abnormal target sub-image.

[0030] The absolute values ​​of pixels relative to the background sub-image and the absolute values ​​of pixels relative to the target sub-image are calculated using the gray values ​​of the pixels, the average gray values ​​of the marked background sub-image, and the average gray values ​​of the marked target sub-image, respectively.

[0031] When the absolute value of a pixel and the background sub-image is greater than the grayscale threshold of the background sub-image, and the absolute value of a pixel and the target sub-image is greater than the tolerance error threshold, the pixels extracted from the abnormal target sub-image are identified as defect points, and the location of the defect points is recorded.

[0032] The marked target sub-images are stitched together to form the target image, and then the defect points are connected on the target image according to their locations to form the defect shape. The quality of the tension clamp is evaluated by the defect shape.

[0033] The second objective of this invention is to provide a method for operating a forging defect testing system for tension wire clamps based on optical means, comprising the following method steps:

[0034] S1. The vibration detection unit uses an optical vibration sensor to monitor the vibration data of the tension clamp during the forging process to trigger the image sensor. The image sensor acquires the image of the tension clamp and treats it as a blurred image of the tension clamp.

[0035] S2. The fuzzy mapping unit converts the fuzzy tension clamp image into a grayscale image. It obtains the converted frequency domain fuzzy tension clamp image through two-dimensional Fourier transform and analyzes the amplitude spectrum features. It uses a deep learning model combined with the amplitude spectrum features to output fuzzy parameters, evaluates the fuzzy kernel, and uses inverse Fourier transform to obtain the defuzzified tension clamp image. Then, it generates an equalization image to make the grayscale values ​​of the detailed features on the surface of the tension clamp different from the surrounding background.

[0036] S3. The segmentation test unit generates a grayscale histogram of the equalized image and segments it into several sub-images. The sub-images are then marked to determine whether they are background sub-images or target sub-images. The grayscale values ​​of the target sub-image and the background sub-image are recorded to calculate the grayscale mean of the marked background and target sub-images. At the same time, the relative contrast test is performed to identify the marked target sub-image as an abnormal sub-image. The defect points are then detected by dynamically setting the grayscale threshold and tolerance error threshold for the marked background.

[0037] Compared with the prior art, the beneficial effects of the present invention are as follows:

[0038] 1. In this optical-based forging defect testing system and method for tension clamps, the conversion mapping module performs grayscale histogram statistics on the deblurred tension clamp image, calculates the cumulative distribution value of grayscale values, linearly maps the cumulative distribution value of grayscale values ​​to the target grayscale range, generates new grayscale values ​​after rounding, and then achieves image equalization through pixel grayscale replacement. Through image enhancement by image equalization, the detailed features of the tension clamp surface become more obvious in the equalized image, reducing the obscuration of the detailed features of the tension clamp surface by the rough background in the deblurred tension clamp image, increasing the difference between the grayscale values ​​of the detailed features of the tension clamp surface and the surrounding rough background area, and improving the accuracy of defect testing by using grayscale values ​​that distinguish between detailed features and rough background.

[0039] 2. In this optical-based forging defect testing system and method for tension clamps, the defect point module dynamically sets the threshold and tolerance error threshold of the marked background sub-image based on the grayscale variance of the marked background and target sub-images. After extracting the grayscale values ​​of pixels in the abnormal target sub-image, it calculates the absolute values ​​of the pixels with respect to the background sub-image and the absolute values ​​of the pixels with respect to the target sub-image. The pixels extracted from the abnormal target sub-image are identified as defect points, and their locations are recorded. By stitching together a complete target image and connecting the defect points to form the defect shape, the quality assessment of the tension clamp is completed. By comprehensively considering the grayscale differences between pixels and the background and target, and combining this with dynamically set thresholds, it is possible to distinguish between minute defects and rough backgrounds on the surface of tension clamps in the equalized image. This reduces the chance of minute defects on the surface of tension clamps being masked by the rough background in the equalized image, and highlights the real minute defects from the rough background, thus improving the accuracy of testing for minute surface defects. At the same time, by detecting defective tension clamps through defect shape, timely repair or scrapping can be carried out to prevent unqualified defective products from entering the market, thereby improving the overall quality and reliability of tension clamp products. Attached Figure Description

[0040] Figure 1 This is a block diagram illustrating the overall system framework of the present invention;

[0041] Figure 2 This is a flowchart illustrating the overall module flow of the present invention.

[0042] Figure 3 A flowchart illustrating the steps involved in generating an equalized image using the transformation mapping module of this invention.

[0043] Figure 4 This is a flowchart of the defect testing process for the defect module of the present invention;

[0044] Figure 5 This is a flowchart illustrating the overall method steps of the present invention.

[0045] The meanings of the labels in the diagram are as follows:

[0046] 1. Vibration detection unit; 11. Vibration triggering module; 12. Variance detection module;

[0047] 2. Fuzzy mapping unit; 21. Fuzzy kernel module; 22. Transformation mapping module;

[0048] 3. Segmentation test unit; 31. Segmentation marking module; 32. Defect point module. Detailed Implementation

[0049] The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0050] Example 1

[0051] Please see Figure 1 As shown, one of the objectives of this embodiment is to provide a testing system for forging defects of tension clamps based on optical means, including a vibration detection unit 1, a fuzzy mapping unit 2, and a segmentation testing unit 3;

[0052] The system includes a vibration detection unit 1 that uses an optical vibration sensor to monitor the vibration data of the tension clamp during the forging process to trigger an image sensor. The image sensor acquires an image of the tension clamp, which is then considered a blurred image. A fuzzy mapping unit 2 responds to the blurred tension clamp image from the vibration detection unit 1 by generating an equalization image. This involves converting the blurred tension clamp image into a grayscale image, then performing a two-dimensional Fourier transform to obtain a transformed frequency-domain blurred image of the tension clamp, which is then analyzed for its amplitude spectrum characteristics. Finally, a deep learning model is used to... The model combines the amplitude spectrum features of the blurred image of the tension clamp and outputs blur parameters. These blur parameters, along with known parameters in the blur kernel, are then used to evaluate the blur kernel of the blurred tension clamp image. A Fourier transform is used to convert the blur kernel to its frequency domain. The frequency domain of the blurred tension clamp image is extracted and divided by the frequency domain of the blur kernel. An inverse Fourier transform is then used to obtain the deblurred tension clamp image. The pixel frequencies of gray values ​​in the deblurred tension clamp image are statistically analyzed, and the cumulative distribution value of the gray values ​​is calculated. This cumulative distribution value is then linearly mapped to the target gray range. The image is divided into several sub-images. The first sub-image is divided into two parts: a background sub-image and a target sub-image. The gray values ​​of the background sub-image and the target sub-image are divided into two parts. The gray values ​​of the background sub-image and the target sub-image are divided into two parts. The gray values ​​of the background sub-image and the target sub-image are recorded. The gray values ​​of the background sub-image and the target sub-image are calculated respectively. The relative contrast is then calculated to test whether the target sub-image is an abnormal sub-image. The gray value threshold and the tolerance error threshold of the background sub-image are dynamically set. The gray values ​​of the pixels extracted from the abnormal target sub-image are combined with the gray value threshold and the tolerance error threshold to test whether the pixels extracted from the abnormal target sub-image are defective points. The target sub-image is spliced ​​to form a complete target image. The defective points are connected in the target image to form a defective shape and to evaluate the quality of the tension clamp.

[0053] The following is a more detailed explanation of the above units; please refer to [link / reference]. Figures 2-4 As shown

[0054] Vibration detection unit 1 includes a vibration triggering module 11 and a variance detection module 12;

[0055] The vibration triggering module 11 uses an optical vibration sensor to monitor the vibration data of the tension clamp during the forging process. The monitored vibration data includes the vibration amplitude and frequency of the tension clamp during forging. Vibration amplitude and frequency thresholds are then set. The module tests whether the image sensor is triggered by comparing the vibration amplitude and frequency of the tension clamp during forging with these thresholds. When the vibration amplitude exceeds the amplitude threshold and the vibration frequency exceeds the frequency threshold, it indicates that the clarity of the optical image will be affected, thus triggering the image sensor. For example, when the vibration amplitude exceeds 0.5 mm and the vibration frequency is higher than 50 Hz, the possibility of blurred optical images increases significantly.

[0056] The variance detection module 12 receives the trigger command from the vibration trigger module 11 to activate the image sensor. It then acquires an image of the tension clamp during the forging process using the image sensor, obtaining an image of the tension clamp. Next, it extracts the grayscale value f(x,y) and the number of pixels N at pixel (x,y) in the tension clamp image. Finally, it uses a four-neighbor Laplace kernel to calculate the Laplace response value L of the i-th pixel based on the grayscale value f(x,y). i Based on the Laplacian response value L of the i-th pixel i The average value μ of the Laplacian response is calculated based on the number of pixels N, the average value μ of the Laplacian response, and the Laplacian response value L of the i-th pixel. i Calculate the Laplace variance for (x,y). Laplacian variance is extremely sensitive to abrupt changes in grayscale in an image, and can highlight the edges and details of the image. When the image of a tension clamp is blurred due to vibration, its edges and details will become blurred, and the grayscale change will tend to be gradual. By calculating the Laplacian variance and comprehensively considering the difference between the Laplacian response value and the average value of each pixel in the image of the tension clamp, the pixel detail changes in the image of the tension clamp can be accurately captured.

[0057] A Laplace variance threshold is set, and the Laplace variance and the Laplace variance threshold are used to detect whether the vibration generated during the forging process of the tension clamp causes optical image blurring. When the Laplace variance is lower than the Laplace variance threshold, it indicates that the image of the tension clamp is less clear, and the vibration generated during the forging process of the tension clamp causes optical image blurring. The tension clamp image is then regarded as a blurry tension clamp image. For example, for a normally clear tension clamp image, the Laplace variance value is usually above 100. When the detected Laplace variance is only 30, it can be determined that the tension clamp image has an optical image blurring problem.

[0058] The process of calculating the Laplacian response value of each pixel:

[0059] Determine the kernel matrix of the four-neighbor Laplace kernel:

[0060] The Laplacian response value L of the i-th pixel is calculated using the kernel matrix of the four-neighbor Laplacian kernel based on the grayscale value f(x,y) at the pixel. i Specific algorithm formula:

[0061] L i =f(x+1,y)+f(x-1,y)+f(x,y-1)-4f(x,y);

[0062] This formula is used to calculate the Laplacian response value of a pixel. The structure of the tension clamp is relatively complex, and the image features of different parts may differ. When calculating the average value of the Laplacian response, all pixels in the tension clamp image are considered, which can comprehensively evaluate the image features of different regions. Whether it is the main body of the clamp or special areas such as edges and holes, they can all be reflected in the average value, ensuring accurate and reliable blur detection of the entire tension clamp image.

[0063] The fuzzy mapping unit 2 includes a fuzzy kernel module 21 and a transformation mapping module 22;

[0064] The fuzzy kernel module 21 receives a command from the variance detection module 12 indicating that the vibration of the tension clamp during forging causes optical imaging blurring. The fuzzy kernel module 21 obtains the blurred tension clamp image from the variance detection module 12. Since the blurred tension clamp image is a color image, it is first converted to a grayscale image, resulting in a blurred grayscale image of the tension clamp. Then, a two-dimensional Fourier transform is applied to the blurred grayscale image to obtain the transformed frequency domain blurred image of the tension clamp. The amplitude spectrum characteristics of the blurred image are analyzed. These characteristics include motion blur, defocus blur, and Gaussian blur. The amplitude spectrum characteristics of the blurred image are input into a deep learning model. The deep learning model combines these characteristics with the analysis of blur parameters (such as the length / angle of motion blur, Gaussian mode). The standard deviation of the blur is calculated, and the blur parameters are output. Then, based on the blur parameters and the known parameters in the blur kernel (such as motion blur kernel (length / angle), Gaussian blur kernel (standard deviation), defocus blur kernel (radius)), the blur kernel of the blurred tension clamp image is evaluated. The blur kernel describes the degradation mode of the blurred tension clamp image during the blurring process. It reflects the influence of vibration on the clamp image. By evaluating the blur kernel, the search space can be reduced. The known blur kernel parameters provide a general direction. Instead of blindly searching in the entire parameter space, optimization can be focused on the parameter region related to the evaluated blur kernel. This can greatly reduce the amount of computation and running time, and improve the efficiency of deblurring. Especially when processing a large number of blurred tension clamp images, it can significantly shorten the processing time and improve the detection efficiency when processing a large number of blurred tension clamp images.

[0065] Analysis of the frequency distribution implementation process of the blurred image of the tension cable clamp in the frequency domain:

[0066] The spectrum is extracted from the blurred image of the frequency domain tension clamp, the zero-frequency component of the spectrum is calculated based on the spectrum, and the zero-frequency component of the spectrum is moved to the center position to obtain the centered complex spectrum.

[0067] Since the complex spectrum contains both amplitude and phase information, the amplitude of the spectrum is extracted from the centered complex spectrum, and then the logarithm of the amplitude is taken to obtain the logarithmic amplitude spectrum.

[0068] When directional fringes appear in the logarithmic amplitude spectrum (the direction of the fringes is perpendicular to the direction of blur), it is motion blur; when concentric rings appear in the logarithmic amplitude spectrum (the radius of the rings is related to the degree of blur), it is defocus blur; when the overall high frequency attenuation of the logarithmic amplitude spectrum (without significant geometric features), it is Gaussian blur.

[0069] Motion blur, defocus blur, and Gaussian blur are considered as amplitude spectrum features of the blurred image of the tension clamp.

[0070] Please see Figure 3 As shown, the conversion mapping module 22 receives the blur kernel and the converted frequency domain tension clamp blur image from the blur kernel module 21, uses Fourier transform to convert the blur kernel into the frequency domain of the blur kernel, extracts the frequency domain of the tension clamp blur image from the converted frequency domain tension clamp blur image, divides the frequency domain of the tension clamp blur image by the frequency domain of the blur kernel, and then performs inverse Fourier transform to convert the converted frequency domain tension clamp blur image back to the spatial domain, thereby obtaining the deblurred tension clamp image. Although the clarity of the deblurred tension clamp image is improved, the detailed features on the surface of the tension clamp may still not be obvious enough.

[0071] The defects are not obvious because the tension clamp will have tiny surface defects due to vibration during the forging process. These tiny defects will be covered by the rough background in the deblurred tension clamp image, affecting the test of defects.

[0072] Therefore, we used histogram equalization to enhance the image of the deblurred tension clamp. First, we statistically analyzed the frequency H of each pixel with a gray value k (e.g., 0-255) in the deblurred tension clamp image and recorded the total number of pixels N. Then, we calculated the cumulative distribution value of the gray values ​​using the pixel frequency H, the total number of pixels N, and the gray value k. Among them, H i This refers to the frequency of occurrence of the i-th pixel;

[0073] The cumulative distribution of grayscale values ​​is linearly mapped to the target grayscale range (e.g., 0–255) to obtain new grayscale values. Here, "round" refers to the rounding operation. The essence of this operation is to stretch the grayscale range of the deblurred tension clamp image. The originally concentrated grayscale distribution becomes more dispersed after linear mapping, covering a wider grayscale range (for example, pixels whose grayscale values ​​were originally concentrated between 50 and 150 may be distributed in a wider range of 0 to 255 after mapping). This stretching of the grayscale range increases the grayscale difference between different areas in the deblurred tension clamp image. For the detailed features of the tension clamp surface (such as small scratches and textures), they are not obvious in the deblurred tension clamp image because the grayscale difference is not large. However, after stretching the grayscale range, the difference between the grayscale values ​​of the areas where these detailed features are located and the surrounding areas becomes larger, thereby improving the accuracy of visual detection.

[0074] The grayscale value of each pixel in the deblurred tension clamp image is replaced with the corresponding new grayscale value to generate an equalized image. Image enhancement is performed through histogram equalization. The detailed features of the tension clamp surface will be more obvious in the equalized image, reducing the small defects on the tension clamp surface from being covered by the rough background in the deblurred tension clamp image, which is beneficial for subsequent defect testing.

[0075] The segmentation test unit 3 includes a segmentation marking module 31 and a defect point module 32;

[0076] The segmentation and labeling module 31 receives the equalized image from the transformation and mapping module 22, traverses all pixels in the equalized image, counts the frequency of each gray value (0-255) in the equalized image, and obtains discrete data (discrete gray values) by counting the frequency of each gray value. The discrete data is then converted into a visual chart to obtain a gray-level histogram. The gray-level histogram is then segmented into several (e.g., α) sub-images, and the number of pixels in each sub-image is extracted. The sub-images are then labeled differently (e.g., labeled as sub-image 1, sub-image 2, ...). . , Sub-image α), obtain the marked sub-image. Determine whether the marked sub-image is the main peak or secondary peak by the number of pixels corresponding to the marked sub-image. Set a pixel number threshold. When the number of pixels corresponding to the marked sub-image is greater than the pixel number threshold, it indicates that there are many pixels and the distribution is concentrated. The marked sub-image is determined to be the main peak (background sub-image), and the gray value of the marked background sub-image is recorded. When the number of pixels corresponding to the marked sub-image is less than the pixel number threshold, the marked sub-image is determined to be the secondary peak (target sub-image), and the gray value of the marked target sub-image is recorded.

[0077] The defect point module 32 receives the grayscale values ​​of the marked background sub-image, the grayscale values ​​of the marked target sub-image, and the number of pixels in the sub-image from the segmentation marking module 31. Based on the grayscale values ​​of the marked background sub-image, the grayscale values ​​of the marked target sub-image, and the number of pixels in the sub-image, it calculates the mean grayscale value of the marked background sub-image and the mean grayscale value of the marked target sub-image, respectively. Then, based on the grayscale values ​​of the marked background sub-image, the grayscale value of the marked target sub-image, the number of pixels in the sub-image, the mean grayscale value of the marked background sub-image, and the mean grayscale value of the marked target sub-image, it calculates the grayscale variance σ of the marked background sub-image, respectively. bg and the gray-level variance σ of the labeled target sub-image target Using the gray-scale mean μ of the marked background sub-image bg and the gray mean μ of the marked target sub-image target Calculate relative contrast Then set a relative contrast threshold, and use the relative contrast and the relative contrast threshold to test whether the marked target sub-image is an abnormal sub-image. When the relative contrast is greater than the relative contrast threshold, the marked target sub-image is tested to be an abnormal sub-image and recorded as an abnormal target sub-image.

[0078] When a defect or anomaly is detected in the marked target sub-image, the grayscale variance σ of the marked background sub-image is used as the basis for the determination. bg Dynamically set the grayscale threshold of the background sub-image T = β × σ bg Where β is a coefficient, usually taken as 2 or 3, and then based on the gray-level variance σ of the marked target sub-image. target Dynamically set tolerance error threshold ∈=γ×σ target γ is a coefficient, usually taken as 1 or 2. The gray value I of a pixel is extracted from the abnormal target sub-image. The absolute value |I-μ| of the pixel relative to the background sub-image is calculated using the pixel's gray value, the average gray value of the marked background sub-image, and the average gray value of the marked target sub-image. bg |and the absolute value of pixels in the target subimage|I-μ target Then, using the absolute values ​​of the pixel and background sub-image, the absolute values ​​of the pixel and target sub-image, and the grayscale threshold and tolerance error threshold of the marked background sub-image, we test whether the pixels extracted from the abnormal target sub-image are defective points. When the absolute value of the pixel and background sub-image is greater than the grayscale threshold of the marked background sub-image, and the absolute value of the pixel and target sub-image is greater than the tolerance error threshold, the pixels extracted from the abnormal target sub-image are tested as defective points, and the defective point positions (i.e., pixel positions) are recorded. The marked target sub-images are then stitched together to form the target image (tension clamp), and then connected on the target image according to the defective point positions to form... Defect shape is used to assess the quality of tension clamps. By comprehensively considering the grayscale differences between pixels and the background and target, and combining this with dynamically set thresholds, it can distinguish between minute defects and rough backgrounds on the surface of tension clamps in the equalized image. This reduces the chance of minute defects being masked by the rough background in the equalized image, highlighting the true minute defects from the rough background and improving the accuracy of testing for minute surface defects. At the same time, detecting defective tension clamps by defect shape allows for timely repair or scrapping, preventing unqualified defective products from entering the market and improving the overall quality and reliability of tension clamp products.

[0079] Please see Figure 5 As shown, a second objective of this invention is to provide a method for operating the aforementioned optical-based forging defect testing system for tension clamps, comprising the following steps:

[0080] S1. Vibration detection unit 1 uses an optical vibration sensor to monitor the vibration data of the tension clamp during the forging process to trigger the image sensor. The image sensor acquires the image of the tension clamp and treats it as a blurred image of the tension clamp.

[0081] S2, the fuzzy mapping unit 2 converts the fuzzy tension clamp image into a grayscale image, obtains the converted frequency domain fuzzy tension clamp image through two-dimensional Fourier transform and analyzes the amplitude spectrum features, uses a deep learning model combined with amplitude spectrum features to output fuzzy parameters, evaluates the fuzzy kernel, uses inverse Fourier transform to obtain the defuzzified tension clamp image, and then generates an equalized image to make the grayscale values ​​of the detailed features on the surface of the tension clamp different from the surrounding background.

[0082] S3. The segmentation test unit 3 generates a grayscale histogram of the equalized image and segments it into several sub-images. Then, it marks the sub-images and determines whether the marked sub-images are background sub-images or target sub-images. It records the grayscale values ​​of the target sub-images and background sub-images to calculate the grayscale mean of the marked background and target sub-images. At the same time, it calculates the relative contrast test. The marked target sub-images are abnormal sub-images. Then, the defects are detected by dynamically setting the grayscale threshold and tolerance error threshold of the marked background.

[0083] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The embodiments and descriptions in the specification are merely preferred examples and are not intended to limit the invention. Various changes and modifications can be made to the invention without departing from its spirit and scope, and all such changes and modifications fall within the scope of the present invention as claimed. The scope of protection of the present invention is defined by the appended claims and their equivalents.

Claims

1. A forging defect testing system for tension clamps based on optical methods, characterized in that: The system includes a vibration detection unit (1), which uses an optical vibration sensor to monitor the vibration data of the tension clamp during the forging process to trigger an image sensor, and uses the image sensor to acquire an image of the tension clamp as a blurred image of the tension clamp; characterized in that it further includes: The fuzzy mapping unit (2) is used to generate an equalization image in response to the fuzzy tension clamp image in the vibration detection unit (1), and performs the following steps: The blurred image of the tension clamp is first converted into a grayscale image, and then a two-dimensional Fourier transform is used to obtain the transformed frequency domain blurred image of the tension clamp, so as to analyze the amplitude spectrum characteristics of the blurred image of the tension clamp. The blur kernel of the blurred tension clamp image is evaluated by combining the amplitude spectrum features of the blurred tension clamp image with the deep learning model and outputting blur parameters. The blur parameters are then combined with the known parameters in the blur kernel to evaluate the blur kernel of the blurred tension clamp image. The blur kernel is converted into the frequency domain of the blur kernel using Fourier transform. The frequency domain of the blurred image of the tension clamp is extracted and divided by the frequency domain of the blur kernel. Then, the deblurred image of the tension clamp is obtained by using inverse Fourier transform. The frequency of gray values ​​in the deblurred tension clamp image is statistically analyzed, the cumulative distribution value of gray values ​​is calculated, and the cumulative distribution value of gray values ​​is linearly mapped to the target gray range to obtain new gray values ​​to replace the gray values ​​of pixels in the deblurred tension clamp image, thereby generating an equalized image. The segmentation test unit (3) is used to receive the equalized image from the fuzzy mapping unit (2) for segmentation to test for defects, and to implement the following test steps: The grayscale histogram is obtained by traversing the pixels in the equalized image and dividing it into several sub-images to determine whether the marked sub-image is a background sub-image or a target sub-image. The grayscale values ​​of the marked target sub-image and the marked background sub-image are recorded. The grayscale values ​​of the marked background sub-image and the marked target sub-image are calculated separately, and then the relative contrast is calculated to test whether the marked target sub-image is an abnormal sub-image. The grayscale threshold and tolerance error threshold of the marked background sub-image are dynamically set. Then, the grayscale values ​​of the pixels extracted from the abnormal target sub-image are combined with the grayscale threshold and tolerance error threshold of the marked background sub-image to test and identify the pixels extracted from the abnormal target sub-image as defect points. The target sub-image of the splicing mark is the complete target image. The defect points are connected in the target image to form the defect shape, and the quality of the tension clamp is evaluated.

2. The optical-based forging defect testing system for tension clamps according to claim 1, characterized in that: The vibration detection unit (1) includes a vibration triggering module (11) and a variance detection module (12); The vibration triggering module (11) uses an optical vibration sensor to monitor the vibration data of the tension clamp during the forging process. The vibration data includes vibration amplitude and vibration frequency. The vibration amplitude and vibration frequency are used to test whether the image sensor is triggered.

3. The optical-based forging defect testing system for tension clamps according to claim 2, characterized in that: The variance detection module (12) is used to receive the trigger image sensor command in the vibration trigger module (11), acquire the image of the tension clamp during the forging process through the image sensor, extract the gray value of the pixel in the tension clamp image, and calculate the Laplace variance based on the gray value of the pixel through the four-neighbor Laplace kernel. The Laplace variance was used to detect whether the vibration generated by the tension clamp during the forging process caused optical image blurring. When the vibration caused optical image blurring, the tension clamp image was regarded as a blurred tension clamp image.

4. The optical-based forging defect testing system for tension clamps according to claim 3, characterized in that: The fuzzy mapping unit (2) includes a fuzzy kernel module (21) and a transformation mapping module (22); The fuzzy kernel module (21) is used to receive the optical imaging blur command caused by the vibration of the tension clamp during the forging process in the variance detection module (12). The fuzzy kernel module (21) responds to the fuzzy tension clamp image obtained in the variance detection module (12) to realize the evaluation of the fuzzy kernel and implement the following evaluation steps: The blurred tension clamp image is first converted into a grayscale image, and then a two-dimensional Fourier transform is applied to the blurred tension clamp grayscale image to obtain the transformed frequency domain blurred tension clamp image. The amplitude spectrum characteristics of the blurred tension clamp image are analyzed. The amplitude spectrum characteristics of the blurred tension clamp image include motion blur, defocus blur and Gaussian blur. The blur parameters are analyzed by combining the amplitude spectrum features of the blurred image of the tension clamp with a deep learning model, and the blur parameters are output, including the length and angle of motion blur and the standard deviation of Gaussian blur. The blur kernel of the blurred tension clamp image is evaluated by using the blur parameters and the known parameters in the blur kernel. The known parameters in the blur kernel include the motion blur kernel and the Gaussian blur kernel.

5. The optical-based forging defect testing system for tension clamps according to claim 4, characterized in that: The conversion mapping module (22) is used to receive the fuzz kernel and the converted frequency domain tension clamp fuzzy image from the fuzz kernel module (21), convert the fuzz kernel into the frequency domain of the fuzz kernel using Fourier transform, extract the frequency domain of the tension clamp fuzzy image from the converted frequency domain tension clamp fuzzy image, divide the frequency domain of the tension clamp fuzzy image by the frequency domain of the fuzz kernel, and then perform an inverse Fourier transform to convert the converted frequency domain tension clamp fuzzy image back to the spatial domain, thereby obtaining the defuzzified tension clamp image.

6. The optical-based forging defect testing system for tension clamps according to claim 5, characterized in that: The conversion mapping module (22) also employs a histogram equalization method to enhance the image of the deblurred tension clamp, and performs the following implementation steps: First, the frequency of grayscale pixels in the deblurred tension clamp image is statistically analyzed, and the total number of pixels is recorded. Then, the cumulative distribution value of the grayscale value is calculated using the pixel frequency H, the total number of pixels N, and the grayscale value k. Among them, H i This refers to the frequency of occurrence of the i-th pixel; The cumulative distribution value of grayscale is linearly mapped to the target grayscale range to obtain the new grayscale value. Here, "round" refers to the rounding operation, and then the gray values ​​of the pixels in the deblurred tension clamp image are replaced with the corresponding new gray values ​​to generate an equalized image.

7. The optical-based forging defect testing system for tension clamps according to claim 6, characterized in that: The segmentation test unit (3) includes a segmentation marking module (31) and a defect point module (32); The segmentation and marking module (31) is used to receive the equalized image in the transformation and mapping module (22), traverse the pixels in the equalized image to obtain the grayscale histogram, divide the grayscale histogram into several sub-images, extract the number of pixels in the sub-images and mark the sub-images, and determine whether the marked sub-image is the main peak or the secondary peak by the number of pixels corresponding to the marked sub-image. The main peak refers to the marked background sub-image, and the secondary peak refers to the marked target sub-image. The grayscale values ​​of the marked target sub-image and the marked background sub-image are recorded.

8. The optical-based forging defect testing system for tension clamps according to claim 7, characterized in that: The defect point module (32) is used to receive the gray values ​​of the background sub-image with the back marking and the gray values ​​of the marked target sub-image in the segmentation marking module (31) to test whether the marked target sub-image is an abnormal sub-image, and to implement the following test steps: The mean gray value of the marked background sub-image and the mean gray value of the marked target sub-image are calculated using the gray values ​​of the marked background sub-image and the gray value of the marked target sub-image, respectively. Then, the variance of the gray values ​​of the marked background sub-image and the variance of the gray values ​​of the marked target image are calculated respectively. The relative contrast is calculated using the average gray levels of the background sub-image and the target sub-image. Set a relative contrast threshold, and use the relative contrast and the relative contrast threshold to test whether the marked target sub-image is an abnormal sub-image.

9. The optical-based forging defect testing system for tension clamps according to claim 8, characterized in that: The defect point module (32) then combines the gray-level variance of the marked background sub-image, the gray-level variance of the marked target sub-image, the gray-level mean of the marked background sub-image, and the gray-level mean of the marked target sub-image to perform tests, thereby extracting pixels as defect points and defect shapes from the abnormal target sub-images, and implementing the following test steps: Based on the grayscale variance of the marked background sub-image and the grayscale variance of the marked target sub-image, the grayscale threshold and tolerance error threshold of the marked background sub-image are dynamically set respectively, and then the grayscale values ​​of the pixels are extracted from the abnormal target sub-image. The absolute values ​​of pixels relative to the background sub-image and the absolute values ​​of pixels relative to the target sub-image are calculated using the gray values ​​of the pixels, the average gray values ​​of the marked background sub-image, and the average gray values ​​of the marked target sub-image, respectively. When the absolute value of a pixel and the background sub-image is greater than the grayscale threshold of the background sub-image, and the absolute value of a pixel and the target sub-image is greater than the tolerance error threshold, the pixels extracted from the abnormal target sub-image are identified as defect points, and the location of the defect points is recorded. The marked target sub-images are stitched together to form the target image, and then the defect points are connected on the target image according to their locations to form the defect shape. The quality of the tension clamp is evaluated by the defect shape.

10. A method for operating a forging defect testing system for tension clamps based on optical means as described in any one of claims 1-9, characterized in that: The methods and steps include the following: S1, Vibration detection unit (1) uses optical vibration sensor to monitor the vibration data of tension clamp during forging process to trigger image sensor, and obtains tension clamp image through image sensor to regard it as blurred tension clamp image; S2, the fuzzy mapping unit (2) converts the fuzzy tension clamp image into a grayscale image, obtains the converted frequency domain fuzzy tension clamp image through two-dimensional Fourier transform and analyzes the amplitude spectrum features, uses a deep learning model combined with amplitude spectrum features to output fuzzy parameters, evaluates the fuzzy kernel, uses inverse Fourier transform to obtain the defuzzified tension clamp image, and then generates an equalized image to make the grayscale values ​​of the detailed features on the surface of the tension clamp different from the surrounding background. S3, the segmentation test unit (3) generates a grayscale histogram of the equalized image and segments it into several sub-images, then marks them, determines whether the marked sub-image is a background sub-image or a target sub-image, records the grayscale values ​​of the target sub-image and the background sub-image to calculate the average grayscale value of the marked background and target sub-image, and calculates the relative contrast test. The marked target sub-image is an abnormal sub-image, and the defect points are tested by dynamically setting the grayscale threshold and tolerance error threshold of the marked background.

Citation Information

Patent Citations

  • Automobile surface defect rapid detection method based on neural network

    CN112581423A

  • Textile blending ratio flaw detection method

    CN119516242A