A method and system for quality detection of niobium-titanium capillary based on image processing

In the quality inspection of niobium-titanium capillary tubes, the region growing algorithm and the normalization processing of gray value variance and local reachable density are used to construct a comprehensive outlier sequence and calculate the entropy value, which solves the problem of low accuracy of detection results in the existing technology. problem, achieving more accurate and efficient quality inspection.

CN118397001BActive Publication Date: 2024-10-18BAOJI HENGXIN RARE METALS
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202410840408.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-27
Publication Date
2024-10-18
Estimated Expiration
2044-06-27

AI Technical Summary

Technical Problem

The existing niobium-titanium capillary quality detection method has a single collection angle, resulting in incomplete data samples and difficulty in ensuring the accuracy of the detection results.

Method used

By obtaining the denoised surface grayscale image, use the region growing algorithm to determine the defect area, calculate the normalized and weighted sum of the grayscale value variance and local reachable density, construct a comprehensive outlier sequence, and calculate its entropy value, To improve detection accuracy and efficiency.

Benefits of technology

It achieves more accurate defect detection and quality assessment, improves the accuracy and consistency of capillary surface quality detection, and enhances product reliability and safety.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118397001B_ABST
    Figure CN118397001B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of image processing, and more specifically, to a method and system for quality detection of niobium-titanium capillaries based on image processing. The method comprises: obtaining a grayscale image of the surface of the niobium-titanium capillary after denoising, selecting a seed point, and obtaining a defective area; calculating a regional outlier; taking a target area as the midpoint and a preset neighborhood value as the radius, obtaining the influence range of the target area; taking a defective area within the influence range that has a different regional outlier value from the target area as a reference area; calculating a comprehensive outlier; traversing to obtain the comprehensive outlier value of each defective area, constructing a comprehensive outlier sequence, and calculating the entropy value of the comprehensive outlier sequence to perform quality detection of niobium-titanium capillaries. Through the technical solution of the present invention, the accuracy of the detection results can be improved, and at the same time, the safety of niobium-titanium capillaries when in use can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image processing, and more specifically, to a method and system for detecting the quality of a niobium-titanium capillary based on image processing. Background Art

[0002] Niobium titanium capillary is a material with excellent mechanical properties and good biocompatibility. It is widely used in medical, chemical, aviation and other fields. For example, in the medical field, niobium titanium alloy is widely used in the manufacture of stents, catheters and other medical devices due to its memory effect. Various defects may occur in the niobium titanium capillary during the processing, such as surface scratches, oxidation spots, irregular shapes, etc. These defects may affect its performance and service life. Therefore, strict quality inspection of niobium titanium capillary is a key step to ensure product quality and safety. With the development of image processing and pattern recognition technology, image-based automatic detection methods are gradually applied to the quality inspection of niobium titanium capillaries. These methods can quickly and accurately detect tiny defects on the surface of the capillary, greatly improving the efficiency and accuracy of detection.

[0003] The existing Chinese patent application document with publication number CN117634938A discloses a production quality inspection method and system for seamless steel pipes. The method collects a multi-angle image data set of the target steel pipe, inputs the surface quality inspection model, and obtains the inspection results; configures sampling points, detects and determines the component inspection results; conducts mechanical simulation tests, generates mechanical property inspection results, configures distribution weights based on application requirements, and calculates the production quality coefficient, thereby obtaining the production quality inspection results.

[0004] However, the above method only involves constructing an image data set from images taken of the target steel pipe at different angles, inputting it into a surface quality inspection model to obtain the inspection results. However, the number of samples obtained at each sampling angle is single, resulting in incomplete data samples and difficulty in ensuring the accuracy of the inspection results. Summary of the invention

[0005] In order to solve the problem of low accuracy of detection results, the present invention proposes a niobium-titanium capillary quality detection method and system based on image processing.

[0006] In the first aspect, the present invention discloses a niobium-titanium capillary quality inspection method based on image processing, comprising: obtaining a denoised surface grayscale image of the niobium-titanium capillary, selecting seed points, using a regional growing algorithm to obtain a regional growth image, and subtracting the surface grayscale image from the regional growth image to obtain a defect area; normalizing the calculated grayscale value variance and local reachable density of each defect area, respectively, and adding the normalized grayscale value variance and the normalized local reachable density as a regional outlier; taking a target area as the midpoint and a preset neighborhood value as the radius to obtain an influence range of the target area, wherein the target area is any defect area; and taking a defect area within the influence range with a different regional outlier value from the target area as a reference area.

[0007] Calculate the composite outlier value: ,in, represents the comprehensive outlier value, Indicates The regional outliers of defective regions, Indicates The defect area is affected by The mean of the regional outliers for the reference regions, represents the total number of reference areas, Indicates the total number of defective regions with the same regional outlier value as the target region, Represents the normalization function.

[0008] The comprehensive outlier value of each defect area is obtained by traversal, a comprehensive outlier value sequence is constructed, and the entropy value of the comprehensive outlier value sequence is calculated to perform quality inspection of niobium-titanium capillaries.

[0009] By utilizing the normalization and weighted summation of gray value variance and local reachable density, a quantitative abnormality assessment is provided for each defect area; selecting a defect area that is different from the target area in abnormal values ​​as a reference helps to more comprehensively understand the abnormal characteristics of the target area; by constructing a comprehensive abnormal value sequence and calculating its entropy value, an objective quantitative indicator is provided for the overall quality of the capillary, which not only improves the accuracy and efficiency of defect detection, but also enhances the accuracy of the capillary surface quality inspection results, helps to achieve stricter quality control and process optimization, and ensures product reliability and consistency.

[0010] Preferably, the selection of seed points includes: dividing the surface grayscale image into abnormal areas and normal areas, calculating the grayscale value mean of all pixels in the normal area, and taking the difference between the grayscale value of the pixel in the surface grayscale image and the grayscale value mean as the first eigenvalue of the pixel; calculating the second eigenvalue of the pixel through the grayscale area size matrix; taking the ratio of the second eigenvalue to the first eigenvalue as the key point probability, and taking the pixel corresponding to the largest key point probability as the seed point.

[0011] By dividing the surface grayscale image into abnormal areas and normal areas, the defects and non-defective parts in the image can be clearly distinguished, and then the grayscale value mean of all pixels in the normal area is calculated, which provides a benchmark for subsequent feature extraction and analysis. The first eigenvalue helps to identify abnormalities or deviations in grayscale distribution, and the second eigenvalue can quantify the distribution and size of different grayscale areas in the image.

[0012] Preferably, the surface grayscale image is segmented using the Otsu threshold.

[0013] Preferably, the normalization uses maximum and minimum value normalization.

[0014] Preferably, calculating the regional outlier value further includes: performing weighted summation on the gray value variance and the local reachable density to obtain the regional outlier value.

[0015] By combining variance and local reachable density, the ability to detect outliers can be enhanced because the defective area shows different characteristics from the normal area in both grayscale distribution and texture density.

[0016] Preferably, the constructing of the comprehensive outlier sequence includes: obtaining the position coordinates of the centroid point of each defect area; arranging the defect areas in the surface grayscale image from left to right and from top to bottom in sequence in the surface grayscale image to obtain the comprehensive outlier sequence.

[0017] Generally, defect areas are irregular areas. Obtaining the centroid of the defect area helps to identify and locate the defect. The centroid is relatively stable to small disturbances (such as noise), so it can provide reliable location information even in noisy images. The centroid can provide information about texture distribution.

[0018] Preferably, the quality detection of the niobium-titanium capillary includes: comparing the entropy value of the comprehensive abnormal value sequence of the surface grayscale image with a preset entropy value threshold: when the entropy value is greater than the preset entropy value threshold, the quality of the niobium-titanium capillary is poor, and an alarm signal is generated and sent; when the entropy value is not greater than the preset entropy value threshold, the quality of the niobium-titanium capillary is good, and the detection continues.

[0019] By setting an entropy value that is more in line with the production environment, defective niobium-titanium capillaries can be accurately distinguished, and the degree of defects in the niobium-titanium capillaries can also be determined based on the difference between the entropy value and the threshold.

[0020] In a second aspect, the present invention discloses a niobium-titanium capillary quality detection system based on image processing, comprising: a processor; and a memory, wherein the memory stores computer instructions, and when the computer instructions are executed by the processor, the device executes the above-mentioned niobium-titanium capillary quality detection method based on image processing.

[0021] Beneficial effects of the present invention:

[0022] The present invention obtains the defect area by subtracting the surface grayscale image from the regional growth image, can more accurately determine the position of the abnormal area, calculate the regional outlier value for each defect area, set the influence range of the defect area, calculate the comprehensive outlier value through the difference between the defect area and the corresponding reference area, and calculate the entropy value of the comprehensive outlier value sequence to obtain the defect level of the surface grayscale image of the entire niobium-titanium capillary, thereby obtaining a more accurate detection result and improving the safety of the niobium-titanium capillary when in use. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] By reading the following detailed description with reference to the accompanying drawings, the above and other objects, features and advantages of the exemplary embodiments of the present invention will become readily understood. In the accompanying drawings, several embodiments of the present invention are shown in an exemplary and non-limiting manner, and the same or corresponding reference numerals represent the same or corresponding parts, wherein:

[0024] Figure 1 It is a flow chart of a niobium-titanium capillary quality detection method based on image processing according to an embodiment of the present invention.

[0025] Figure 2 It is a schematic diagram of a niobium-titanium capillary quality detection system based on image processing according to an embodiment of the present invention. DETAILED DESCRIPTION

[0026] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0027] It should be understood that when the terms "first", "second", etc. are used in the claims, descriptions, and drawings of the present invention, they are only used to distinguish different objects, rather than to describe a specific order. The terms "include" and "comprise" used in the description and claims of the present invention indicate the presence of the described features, wholes, steps, operations, elements, and / or components, but do not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components, and / or their collections.

[0028] The present invention provides a method for detecting the quality of a niobium-titanium capillary based on image processing. Figure 1 As shown, a niobium-titanium capillary quality detection method based on image processing includes steps S1 to S5, which are described in detail below.

[0029] S1, obtain the surface grayscale image of the niobium-titanium capillary after denoising, select the seed point, use the region growing algorithm to obtain the region growth map, and subtract the surface grayscale image from the region growth map to obtain the defect area.

[0030] In one embodiment, a line scan camera is used to collect an RGB (Red Green Blue) image of a finished niobium titanium capillary: one side of a finished niobium titanium capillary is clamped and fixed, and the clamped niobium titanium capillary is rotated at a constant speed for one circle, and an RGB image of the outer surface of the niobium titanium capillary is collected by the line scan camera at the same time, and an RGB image that can reflect the outer surface of the niobium titanium capillary is selected, and the RGB image is grayed to obtain an initial surface grayscale image of the niobium titanium capillary, and the initial surface grayscale image is denoised. Exemplarily, a median filtering operation is used to remove noise in the initial surface grayscale image, and the denoising process also includes bilateral filtering, wavelet transform, frequency domain filtering, singular value decomposition and other means.

[0031] The surface grayscale image is segmented into abnormal areas and normal areas, wherein the surface grayscale image is segmented using the Otsu threshold. Exemplarily, the segmentation algorithm also includes: threshold segmentation, edge detection, watershed algorithm, neural network, etc.

[0032] The mean grayscale value of all pixels in the normal area is calculated, and the difference between the grayscale value of the pixel in the surface grayscale image and the mean grayscale value is used as the first eigenvalue of the pixel.

[0033] The second eigenvalue of the pixel is calculated by the grayscale area size matrix. Using the grayscale area size matrix to calculate the second eigenvalue is a well-known technology for those skilled in the art and will not be elaborated here.

[0034] The grayscale area size matrix can describe surface defects from multiple perspectives, including the number, size, and distribution of defects, which makes the assessment of capillary quality more accurate. The grayscale area size matrix can also capture tiny surface defects or flaws and provide a quantitative description of their characteristics. By calculating the second eigenvalue of the image, different types of surface defects can be better measured and distinguished, enhancing the sensitivity of defect detection.

[0035] The ratio of the second eigenvalue to the first eigenvalue is used as the key point probability, and the pixel point corresponding to the maximum key point probability is used as the seed point. The regional growth map is obtained by using the region growing algorithm. Specifically, the number of seed points is at least 1. There may be multiple seed points. The seed point is used as the starting point to merge the pixels with the same grayscale value and grayscale mean in the direction of the seed point 8 neighborhood, and continue to grow until no new pixel points that meet the growth conditions are merged to obtain the regional growth map.

[0036] The defect area is obtained by subtracting the surface grayscale image from the region growth image.

[0037] In another embodiment, the seed point may also be determined by the region growing algorithm itself. Using the region growing algorithm to determine the seed point is a well-known technique to those skilled in the art and will not be elaborated herein.

[0038] S2, calculate regional outliers.

[0039] In one embodiment, the variance of the grayscale value of each pixel in the defect area and the local reachable density of the defect area are calculated, and the normalized grayscale value variance and the normalized local reachable density are added together to obtain the regional outlier value.

[0040] It should be noted that variance is an indicator of the degree of discreteness of data distribution. A higher variance usually indicates that the area has a more complex texture or structure. Variance can also highlight the mutation area in the image, enhance the defect features, and make it easier to identify.

[0041] The local accessible density can quantify the texture characteristics of local areas, which helps to identify and distinguish different types of textures, including the texture of defective areas. Defective areas usually have different texture characteristics from normal areas. The local accessible density can help analyze the texture consistency of defective areas and identify areas with uneven or sudden changes in texture.

[0042] Therefore, the combination of variance and local reachable density can enhance the ability to detect outliers, because the defective area shows different characteristics from the normal area in terms of grayscale distribution and texture density. Eliminating the dimensions of the two features through normalization processing also helps to simplify the amount of calculation. Exemplarily, the normalization method uses maximum and minimum value normalization. In addition, the normalization effect can also be achieved using common normalization functions.

[0043] In another embodiment, the gray value variance and the local reachable density are weightedly summed to obtain the regional outlier value.

[0044] Adjusting weights according to the importance of features helps to enhance the robustness of the model to noise and irrelevant changes, but the accuracy of the determined weights directly affects the accuracy of regional outliers, and the grayscale value variance and local reachable density are not completely correlated, which will lead to poor results of direct weighted summation.

[0045] S3, obtain the influence range of the target area and calculate the comprehensive outlier value.

[0046] In one embodiment, the target area is taken as the midpoint and the preset neighborhood value is the radius to obtain the influence range of the target area, wherein the target area is any defect area. The defect area with different regional abnormality values ​​from the target area in the influence range is taken as the reference area.

[0047] Calculate the composite outlier value:

[0048] ,in, represents the comprehensive outlier value, Indicates The regional outliers of defective regions, Indicates The defect area is affected by The mean of the regional outliers for the reference regions, represents the total number of reference areas, Indicates the total number of defective regions with the same regional outlier value as the target region, Represents the normalization function.

[0049] It should be noted that the regional outliers form a type of defect area, and the comprehensive outlier value is an indicator indicating that the calculated value is for this type of defect area.

[0050] For example, there are 10 defective regions, and their regional outliers are 0.2, 0.8, 0.7, 1.2, 0.7, 1.6, 1.2, 0.2, 0.9 and 0.2, that is, there are six types of regional outliers: 0.2, 0.7, 0.8, 0.9, 1.2 and 1.6. When the comprehensive outlier value is finally calculated, it is also calculated six times, that is, 0.537, 0.885, 0.664, 0.716, 0.983 and 0.921, but the final defective region and the comprehensive outlier value are still in a one-to-one relationship, that is, the comprehensive outlier values ​​of the 10 defective regions are 0.537, 0.664, 0.885, 0.983, 0.885, 0.921, 0.983, 0.537, 0.716 and 0.537. The same comprehensive outlier value indicates the same type of defective region.

[0051] Exemplarily, the comprehensive outlier value of each defect area in the surface grayscale image is calculated, and any defect area with a regional outlier value of 0.8 is taken as the target area to obtain the influence range of the target area. There are 5 defect areas in the influence range except the target area, and the regional outlier values ​​are 0.6, 0.7, 0.65, 0.9 and 0.8 respectively. Then the 4 defect areas with regional outlier values ​​of 0.6, 0.7, 0.65 and 0.9 respectively are the reference areas of the target area. The target area is subtracted from the mean of the regional outlier values ​​of the 4 reference areas, which is 0.7125. The defect areas with a regional outlier value of 0.8 in the surface grayscale image are constructed into an influence range, and the influence range is subtracted from the mean of the regional outlier values ​​of all reference areas in the corresponding influence range. Finally, all the differences are accumulated to obtain the comprehensive outlier value of this type of defect area with a regional outlier value of 0.8.

[0052] S4, traverse to obtain the comprehensive outlier value of each defect area, construct a comprehensive outlier value sequence, and calculate the entropy value of the comprehensive outlier value sequence to perform quality inspection of niobium-titanium capillary.

[0053] In one embodiment, the position coordinates of the centroid point of each defective area are obtained; the defective areas in the surface grayscale image are arranged from left to right and from top to bottom in sequence in the surface grayscale image to obtain a comprehensive abnormal value sequence.

[0054] Calculate the entropy value of the comprehensive outlier sequence of the surface grayscale image. It should be noted that the entropy value provides a way to quantify the randomness of the sequence. The higher the entropy value, the greater the uncertainty of the sequence. The entropy value reflects the uncertainty and complexity of the degree of abnormality in the comprehensive outlier sequence. In pipe surface inspection, a high entropy value may indicate that the defective area has multiple characteristics different from the normal surface.

[0055] The range of entropy values ​​can be used as a basis for distinguishing different types of defects, which helps further defect identification and classification.

[0056] Compare the entropy value of the comprehensive abnormal value sequence of the surface grayscale image with the preset entropy value threshold: when the entropy value is greater than the preset entropy value threshold, the quality of the niobium titanium capillary is poor, and an alarm signal is generated and sent; when the entropy value is not greater than the preset entropy value threshold, the quality of the niobium titanium capillary is good, and continue to detect. Exemplarily, the entropy value can be set by a person skilled in the art.

[0057] The embodiment of the present invention also discloses a niobium titanium capillary quality detection system based on image processing, referring to Figure 2 , including a processor and a memory, the memory stores computer program instructions, and when the computer program instructions are executed by the processor, a niobium-titanium capillary quality detection method based on image processing according to the present invention is implemented.

[0058] The above system also includes other components well known to those skilled in the art, such as a communication bus and a communication interface, and their configuration and functions are known in the art, so they will not be described in detail here.

[0059] In the present invention, the aforementioned memory may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, apparatus or device. For example, a computer-readable storage medium may be any appropriate magnetic storage medium or magneto-optical storage medium, such as a resistive random access memory RRAM (Resistive Random Access Memory), a dynamic random access memory DRAM (Dynamic Random Access Memory), a static random access memory SRAM (Static Random-Access Memory), an enhanced dynamic random access memory EDRAM (Enhanced Dynamic Random Access Memory), a high-bandwidth memory HBM (High-Bandwidth Memory), a hybrid memory cube HMC (Hybrid Memory Cube), etc., or any other medium that can be used to store the required information and can be accessed by an application, a module or both. Any such computer storage medium may be part of a device or accessible or connectable to a device.

[0060] Although this specification has shown and described a number of embodiments of the present invention, it will be apparent to those skilled in the art that such embodiments are provided by way of example only. Those skilled in the art will conceive of many modifications, changes and alternatives without departing from the ideas and spirit of the present invention. It should be understood that in the practice of the present invention, various alternatives to the embodiments of the present invention described herein may be employed.

[0061] The above are all preferred embodiments of the present invention, and are not intended to limit the protection scope of the present invention. Therefore, any equivalent changes made based on the structure, shape, and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A niobium titanium capillary quality detection method based on image processing, characterized in that: include: Obtain the surface grayscale image of the niobium-titanium capillary after denoising, select the seed point, use the region growing algorithm to obtain the region growth map, and subtract the surface grayscale image from the region growth map to obtain the defect area; Normalize the calculated grayscale value variance and local reachable density of each defect area respectively, and add the normalized grayscale value variance and the normalized local reachable density as the regional outlier; Taking the target area as the midpoint and the preset neighborhood value as the radius, the influence range of the target area is obtained, wherein the target area is any defect area; The defect area with different regional outlier values ​​from the target area within the impact range is taken as the reference area; Calculate the composite outlier value: ,in, represents the comprehensive outlier value, Indicates The regional outliers of defective regions, Indicates The defect area is affected by The mean of the regional outliers for the reference regions, represents the total number of reference areas, Indicates the total number of defective regions with the same regional outlier value as the target region, represents the normalization function; The comprehensive abnormal value of each defect area is obtained by traversal, the comprehensive abnormal value sequence is constructed, and the entropy value of the comprehensive abnormal value sequence is calculated to perform quality inspection of niobium titanium capillary; The construction of the comprehensive outlier sequence includes: obtaining the position coordinates of the centroid point of each defect area; arranging the defect areas in the surface grayscale image from left to right and from top to bottom in sequence in the surface grayscale image to obtain the comprehensive outlier sequence.

2. The method for detecting quality of niobium-titanium capillary tubes based on image processing according to claim 1, characterized in that: The selecting of seed points comprises: The surface grayscale image is divided into an abnormal area and a normal area, the grayscale value mean of all pixels in the normal area is calculated, and the difference between the grayscale value of the pixel in the surface grayscale image and the grayscale value mean is used as the first eigenvalue of the pixel; Calculate the second eigenvalue of the pixel through the grayscale area size matrix; The ratio of the second eigenvalue to the first eigenvalue is used as the key point probability, and the pixel point corresponding to the maximum key point probability is used as the seed point.

3. The method for detecting quality of niobium-titanium capillary tubes based on image processing according to claim 2, characterized in that: The surface grayscale image is segmented using Otsu thresholding.

4. The method for detecting quality of niobium-titanium capillary tubes based on image processing according to claim 1, characterized in that: The normalization uses maximum and minimum value normalization.

5. The method for detecting quality of niobium-titanium capillary tubes based on image processing according to claim 1, characterized in that: Calculating the regional outlier value also includes: The regional outliers are obtained by weighted summing of the gray value variance and the local reachable density.

6. The method for quality inspection of niobium-titanium capillary tubes based on image processing according to claim 1, characterized in that: The quality inspection of niobium titanium capillary comprises: Compare the entropy value of the comprehensive outlier sequence of the surface grayscale image with the preset entropy threshold: When the entropy value is greater than a preset entropy value threshold, the quality of the niobium-titanium capillary is poor, and an alarm signal is generated and sent; When the entropy value is not greater than the preset entropy value threshold, the quality of the niobium-titanium capillary is good and the test continues.

7. A niobium-titanium capillary quality detection system based on image processing, characterized in that: include: Processor; and A memory storing computer instructions, wherein when the computer instructions are executed by a processor, the device executes a niobium-titanium capillary quality detection method based on image processing according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Method and system for detecting production quality of seamless steel tube

    CN117634938A

  • Cable insulation skin damage detection method based on machine vision

    CN115511842A

  • Aluminum alloy auto part mold defect detection method based on image processing

    CN117011297A

  • Method for detecting surface quality of aluminum material

    CN117649412A

  • Titanium metal welding quality detection method and system based on image processing

    CN117934467A