System and method for testing copper ratio of NbTi / Cu superconducting wire based on image recognition
Based on image recognition methods, the support vector regression model is used to calculate the copper ratio of the NBTI/CU superconducting wire material to solve the problem of low efficiency of existing test methods and environmental pollution, and achieve efficient and accurate copper ratio tests.
Patent Information
- Application Number
- CN202411884219.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-20
- Publication Date
- 2025-01-21
- Estimated Expiration
- 2044-12-20
AI Technical Summary
In the existing NbTi/Cu superconducting wire copper ratio test methods, the paper cutting method is inefficient and the results are inaccurate, while the density method is cumbersome and has the risk of environmental pollution.
A method based on image recognition is used to collect metallographic image data of superconducting wires and use a support vector regression model to calculate the copper ratio, thereby reducing the impact of human operations and improving test accuracy and efficiency.
It achieves accurate testing of the copper ratio of NbTi/Cu superconducting wires, improves testing efficiency, avoids the use of chemical pollutants, and reduces the risk of environmental pollution.
Smart Images

Figure CN119338817A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of superconducting composite wire processing, and in particular relates to a copper ratio testing system and method of NbTi / Cu superconducting wire based on image recognition. Background Art
[0002] NbTi / Cu superconducting wire is one of the most widely used superconducting materials in MRI. To ensure the stability of MRI operation, strict requirements are placed on the copper ratio of superconducting wire at the beginning of design. The copper ratio is one of the important performance indicators of NbTi / Cu superconducting wire. To meet the delivery requirements of the product, the wire must be accurately tested for the copper ratio.
[0003] The copper ratio of NbTi / Cu superconducting wire refers to the area ratio of the copper area in the superconducting wire to the superconducting area (i.e., the NbTi area). The current copper ratio test methods mainly include the paper-cut method and the density method. However, the paper-cut method is inefficient and can only measure the approximate copper ratio range, and the copper ratio results are inaccurate. Although the density method has accurate test results, it requires the superconducting wire sample to be immersed in concentrated nitric acid to corrode and dissolve the copper, and the weight of the sample before corrosion and the weight of the NbTi core wire after corrosion must be weighed and converted to obtain the copper ratio result. The operation process is cumbersome and involves the use of chemical pollutants, which poses a risk of environmental pollution. Summary of the invention
[0004] The purpose of the present invention is to provide a copper ratio testing system and method for NbTi / Cu superconducting wires based on image recognition, which solves the problems of low efficiency of the paper-cutting method, inaccurate copper ratio results, and cumbersome operation process and environmental pollution risk of the density method in the copper ratio testing method in the prior art.
[0005] The present invention adopts the following technical solution: a method for testing the copper ratio of NbTi / Cu superconducting wire based on image recognition, comprising the following steps: S1: Collect metallographic image data of the cross section of the sample NbTi / Cu superconducting wire and obtain the true copper ratio by density method.
[0006] Metallographic image data is obtained by the following method: S11: Take a sample from the NbTi / Cu superconducting wire and collect a color image of the metallographic cross section of the NbTi / Cu superconducting wire.
[0007] S12: preprocessing the color image; then performing grayscale transformation on the preprocessed color image, and converting the grayscale image into a binary image again through threshold processing; the binary image is metallographic image data.
[0008] S2: Based on the number of pixels in the copper area, superconducting area and background area in the binary image, the copper ratio is calculated using formula (1).
[0009] (1) in, To calculate the copper ratio, is the number of pixels in the copper area, is the number of pixels in the background area, is the number of pixels in the superconducting region, M is the number of pixels in the horizontal direction of the binary image, and N is the number of pixels in the vertical direction of the binary image.
[0010] S3: The metallographic image data, the true copper ratio and the calculated copper ratio in S1 are used as data sets, and the support vector regression model is trained using the data sets.
[0011] S4: Obtain a cross-sectional image of the NbTi / Cu superconducting wire to be tested, and input the cross-sectional image and the calculated copper ratio obtained by processing the cross-sectional image in S2 into the support vector regression model trained in S3 to obtain the actual copper ratio.
[0012] Furthermore, the metallographic images in the data set in S3 and the metallographic images in the input training model are reduced in dimension by principal component analysis, and the first ten principal component results are selected as image data after dimension reduction.
[0013] Furthermore, the data set is divided into a training set and a test set with a ratio of 3:1. The data in the training set is used to train the support vector regression model, and the kernel function used by the support vector regression model is a Gaussian kernel.
[0014] Furthermore, S12 preprocessing includes removing image noise and contrast enhancement.
[0015] Furthermore, methods for removing image noise include Gaussian filtering, bilateral filtering and median filtering; methods for contrast enhancement include contrast stretching and adaptive histogram equalization methods.
[0016] Furthermore, S12 uses a linear weighted average method to convert the color image into a grayscale image. The grayscale image is a single-channel image, and each pixel value is between 0 and 255.
[0017] Furthermore, the threshold processing methods include Otsu threshold segmentation method and maximum entropy threshold segmentation method.
[0018] Furthermore, S2 uses a flood filling algorithm to convert the pixel value of the superconducting region into a value consistent with the pixel value of the copper region surrounding the region, that is, the pixel value of the superconducting region is converted into 1.
[0019] The present invention also provides another technical solution: a NbTi / Cu superconducting wire copper ratio testing system based on image recognition, the system comprising: an acquisition module, a copper ratio calculation module, a model training module and a copper ratio calculation module.
[0020] Furthermore, the acquisition module is used to acquire metallographic image data of the cross section of the sample NbTi / Cu superconducting wire and obtain the real copper ratio by density method.
[0021] Copper ratio calculation module: calculates the copper ratio based on the data from the acquisition module.
[0022] Model training module: Based on the data from the acquisition module and the copper ratio calculation module as a data set, the support vector regression model is trained using the data set.
[0023] Copper ratio calculation module: obtains data from the acquisition module and the copper ratio calculation module and inputs them into the model training module to obtain the actual copper ratio.
[0024] The beneficial effects of the present invention are as follows: the NbTi / Cu superconducting wire copper ratio testing system and method based on image recognition provided by the present invention reduces the influence of factors such as equipment and personnel operation on the calculated copper ratio result, ensures the accuracy of the test, and improves the efficiency of the superconducting wire copper ratio test, while avoiding the risk of environmental pollution. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] Figure 1 This is a flow chart of the copper ratio testing method of NbTi / Cu superconducting wire based on image recognition in this application; Figure 2 This is a schematic diagram of the cross section of the NbTi / Cu superconducting wire after image processing in this application; Figure 3 This is a schematic diagram of the cross section of the NbTi / Cu superconducting wire after the flood filling algorithm of this application; Among them, 1. Background area; 2. Copper area; 3. Superconducting area; 4. Copper area and superconducting area. DETAILED DESCRIPTION
[0026] The technical solutions in the embodiments of the present application are described clearly and completely below. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present application.
[0027] like Figure 1 As shown, the present application provides a copper ratio testing system and method for NbTi / Cu superconducting wires based on image recognition. The method performs copper ratio testing of NbTi / Cu superconducting wires through image recognition method, which can not only ensure the accuracy of the test, but also has higher efficiency, and also avoids the use of chemical pollutants.
[0028] A method for testing the copper ratio of a NbTi / Cu superconducting wire based on image recognition comprises the following steps: S1: Collect metallographic image data of the cross section of the sample NbTi / Cu superconducting wire and obtain the true copper ratio through the density method.
[0029] Metallographic image data is obtained by the following method: S11: Take a sample from the NbTi / Cu superconducting wire and collect a color image of the metallographic cross section of the NbTi / Cu superconducting wire.
[0030] S12: Preprocessing the color image, the preprocessing includes removing image noise and contrast enhancement. The image noise removal method includes Gaussian filtering, bilateral filtering and median filtering; the contrast enhancement method includes contrast stretching and adaptive histogram equalization method.
[0031] Then, the preprocessed color image is transformed into a grayscale image using a linear weighted average method. The grayscale image is a single-channel image, and each pixel value is between 0 and 255.
[0032] The grayscale image is converted into a binary image again through threshold processing; the threshold processing methods include Otsu threshold segmentation method and maximum entropy threshold segmentation method. The binary image is metallographic image data. The binary image is a single-channel image, and the value of each pixel is 0 or 1. White pixels represent "0" and black pixels represent "1".
[0033] At this time, according to the color difference of each area of the image, the pixel value of the copper area 2 will be 1, and the pixel values of the NbTi area 3 and the background area 1 will be 0.
[0034] S2: According to the number of pixels in copper area 2, superconducting area 3 and background area 1 in the binary image, count the number of pixels with a value of 1 in the binary image and mark them as ; Use the flood filling algorithm to convert the pixel value of the superconducting area into a value consistent with the pixel value of the copper area surrounding the area, that is, the pixel value of the superconducting area is converted to 1, and the number of pixels that are 0 at this time is counted and recorded as , and the copper ratio is calculated using formula (1).
[0035] (1) in, To calculate the copper ratio, is the number of pixels in copper area 2, is the number of pixels in background area 1, is the number of pixels in the superconducting region 3, M is the number of pixels in the horizontal direction of the binary image, and N is the number of pixels in the vertical direction of the binary image.
[0036] S3: The metallographic image data, the true copper ratio and the calculated copper ratio in S1 are used as data sets, and the support vector regression model is trained using the data sets.
[0037] When establishing the data set, the metallographic image data was reduced in dimension using the principal component analysis method. After dimensionality reduction, the first ten principal component results were selected as image features to supplement the data set; the data set was divided into a training set and a test set with a ratio of 3:1. The support vector regression model was trained using the data in the training set, and the sum function was selected as the Gaussian kernel.
[0038] The data is stored in the form of M×N×3. M is the number of pixels in the horizontal direction of the image, and N is the number of pixels in the vertical direction. To ensure the accuracy of calculating the copper ratio, the image needs to be as clear as possible, so M and N must be at least greater than 1000.
[0039] The image data includes copper area 2, NbTi area 3 and background area 1. The image data acquired by the image acquisition device is RGB three-channel, each pixel contains 3 values, and each value is between 0 and 255.
[0040] S4: Obtain a cross-sectional image of the NbTi / Cu superconducting wire to be tested, and input the cross-sectional image and the calculated copper ratio obtained by processing the cross-sectional image in S2 into the support vector regression model trained in S3 to obtain the actual copper ratio.
[0041] The present application discloses a copper ratio testing system for NbTi / Cu superconducting wires based on image recognition, comprising: an acquisition module, a copper ratio calculation module, a model training module and a copper ratio calculation module.
[0042] Acquisition module: This module is used to collect metallographic image data of the cross section of the sample NbTi / Cu superconducting wire and obtain the real copper ratio through the density method.
[0043] Copper ratio calculation module: Based on the number of pixels in copper area 2, superconducting area 3 and background area 1 in the binary image in the acquisition module, the copper ratio is calculated using formula (1).
[0044] (1) in, To calculate the copper ratio, is the number of pixels in copper area 2, is the number of pixels in background area 1, is the number of pixels in the superconducting region 3, M is the number of pixels in the horizontal direction of the binary image, and N is the number of pixels in the vertical direction of the binary image.
[0045] Model training module: S1 metallographic image data, true copper ratio and calculated copper ratio are used as data sets, and the data sets are used to train the support vector regression model.
[0046] When establishing the data set, the metallographic image data is reduced in dimension using the principal component analysis method. After the dimension reduction, the first ten principal component results are selected as image features to supplement the data set.
[0047] The principal component analysis method is an efficient data dimensionality reduction method. It can project big data into the feature space through orthogonal transformation. It can capture the key features of the data through a few principal components, reduce the data dimension, and improve the efficiency and accuracy of subsequent analysis and modeling.
[0048] The main reason for using the support vector regression model is that the model has a good training effect on large data sets and the model training efficiency is high, so data can be frequently supplemented to update the model to improve the accuracy of the copper ratio results.
[0049] Copper ratio calculation module: obtain the cross-sectional image of the NbTi / Cu superconducting wire to be tested, input the cross-sectional image and the copper ratio calculated by S2 into the support vector regression model trained by S3 to obtain the actual copper ratio. The purpose is to improve the accuracy and effectiveness of the copper ratio results and reduce the impact of factors such as equipment and personnel operation on the final calculated copper ratio results.
[0050] The trained model was trained using the test set, and the coefficient of determination between the predicted value and the actual value was 0.955, and the absolute root mean square error was less than 0.002.
[0051] The process of setting the pixel value of the superconducting area to 1 adopts the flood filling algorithm. The algorithm detects the information of the pixel point and the eight surrounding pixel points, and adjusts the point with a smaller pixel value to the larger value of the surrounding pixel value. Through this algorithm, the pixel value of the superconducting area 3 can be adjusted to be consistent with the pixel value of the copper area 2.
[0052] Figure 2 This is a schematic diagram of the cross section of the superconducting wire after image processing. Figure 3 is the image after the flood filling algorithm. Among them, 1 is the background area, and its pixel value is 0; 2 is the copper area, and its pixel value is 1; 3 is the superconducting area, and its pixel value is 0. 4 is the copper area and the superconducting area, and 4 is the sum of the copper area 2 and the superconducting area 3, and its pixel value is 1.
[0053] Embodiment 1: This embodiment provides a method for testing the copper ratio of a NbTi / Cu superconducting single-core wire with a copper ratio of 0.410±0.010, comprising the following steps: S1: Collect metallographic image data of the cross section of the sample NbTi / Cu superconducting wire and obtain the true copper ratio by density method. The metallographic image data is obtained by the following method: S11: Take a sample from the NbTi / Cu superconducting wire and collect a color image of the metallographic cross section of the NbTi / Cu superconducting wire.
[0054] A sample was taken from the NbTi / Cu superconducting single-core wire to be tested for copper ratio, the cross section of the wire was ground and polished, and an image acquisition device was used to collect RGB color image data with a complete metallographic cross section of the wire. The number of pixels in the image was set to 2000×2000, and the image data was stored in the form of M×N×3, where M=2000 and N=2000.
[0055] S12: Preprocess the color image data, including removing noise and contrast enhancement. Then, the color image is gray-scaled and converted into a gray-scale image, and the gray-scale image is converted into a binary image again through threshold processing, and the binary image is metallographic image data; at this time, according to the color difference of each area of the image, the pixel value of the copper area will be 1, and the pixel value of the superconducting area and the background area will be 0.
[0056] S2: Based on the number of pixels in copper region 2, superconducting region 3 and background region 1 in the binary image, the copper ratio is calculated using formula (1).
[0057] The number of pixels with a value of 1 in the binary image is 985622, that is, ; Use the flood filling algorithm to set the pixel value of the superconducting area to 1, and count the number of pixels that are 0 at this time to be 586737, that is, , calculated according to the following formula (1), the copper ratio is 0.398.
[0058] Formula (1) in, To calculate the copper ratio, is the number of pixels in copper area 2, is the number of pixels in background area 1, is the number of pixels in the superconducting region 3, M is the number of pixels in the horizontal direction of the binary image, and N is the number of pixels in the vertical direction of the binary image.
[0059] S3: The metallographic image data, the true copper ratio and the calculated copper ratio in S1 are used as data sets, and the support vector regression model is trained using the data sets.
[0060] S4: Obtain a cross-sectional image of the NbTi / Cu superconducting wire to be tested, input the cross-sectional image and the calculated copper ratio obtained by S2 into the support vector regression model trained in S3, and obtain an actual copper ratio result of 0.406.
[0061] The sample was tested for copper ratio by density method and the copper ratio was re-tested. The copper ratio by density method was 0.407. The experimental test result differed by 0.24% from the test result of this application. The experiment was repeated 10 times and it was found that the test result of this application was basically consistent with the test result by density method, and the error was controlled within 1%. The results are as follows:
[0062] From the above test experiments, it can be seen that the copper ratio test method of NbTi / Cu superconducting wire based on image recognition in the present application, during the implementation of Example 1, the copper ratio test result of the superconducting wire is accurate and more efficient.
[0063] Embodiment 2: This embodiment provides a method for testing the copper ratio of a NbTi / Cu superconducting composite wire having a copper ratio of 4.50±0.40, comprising the following steps: S1: Collect metallographic image data of the cross section of the sample NbTi / Cu superconducting wire and obtain the true copper ratio through the density method.
[0064] Metallographic image data is obtained by the following method: S11: Take a sample from the NbTi / Cu superconducting wire and collect a color image of the metallographic cross section of the NbTi / Cu superconducting wire.
[0065] A sample was taken from the NbTi / Cu superconducting single-core wire to be tested for copper ratio, the cross section of the wire was ground and polished, and an image acquisition device was used to collect RGB color image data with a complete metallographic cross section of the wire. The number of pixels in the image was set to 2000×2000, and the image data was stored in the form of M×N×3, where M=2000 and N=2000.
[0066] S12: Preprocess the color image data, including removing noise and contrast enhancement. Then, the color image is gray-scaled and converted into a gray-scale image, and the gray-scale image is converted into a binary image again through threshold processing, and the binary image is metallographic image data; at this time, according to the color difference of each area of the image, the pixel value of the copper area will be 1, and the pixel value of the superconducting area and the background area will be 0.
[0067] S2: Based on the number of pixels in copper region 2, superconducting region 3 and background region 1 in the binary image, the copper ratio is calculated using formula (1).
[0068] The number of pixels with a value of 1 in the binary image is 2954121, that is, ; Use the flood filling algorithm to set the pixel value of the NbTi area to 1. The number of pixels that are 0 at this time is 398613, that is, =398613, and the copper ratio calculated according to formula (1) is 4.564.
[0069] Formula (1) in, To calculate the copper ratio, is the number of pixels in copper area 2, is the number of pixels in background area 1, is the number of pixels in the superconducting region 3, M is the number of pixels in the horizontal direction of the binary image, and N is the number of pixels in the vertical direction of the binary image.
[0070] S3: The metallographic image data, the true copper ratio and the calculated copper ratio in S1 are used as data sets, and the support vector regression model is trained using the data sets.
[0071] S4: Obtain a cross-sectional image of the NbTi / Cu superconducting wire to be tested, input the cross-sectional image and the calculated copper ratio obtained by S2 into the support vector regression model trained in S3, and obtain an actual copper ratio result of 4.582.
[0072] The samples were subjected to a density method copper ratio test and the copper ratio results were re-tested. The copper ratio tested by the density method was 4.591. The experimental test results differed by 0.20% from the test results of this application.
[0073] The experiment was repeated 10 times and it was found that the test results of this application were basically consistent with the test results of the density method, and the error was controlled within 1%. The results are as follows:
[0074] From the above examples, it can be seen that the copper ratio test method of superconducting wire based on image recognition in this application has accurate test results of the copper ratio of superconducting wire and higher efficiency in the specific implementation process.
[0075] Although the content of the present application has been described in detail through the above preferred embodiments, it should be appreciated that the above description should not be considered as a limitation of the present application. After reading the above content, it will be apparent to those skilled in the art that various modifications and substitutions of the present application can be made. Therefore, the protection scope of the present application should be limited by the appended claims.
Claims
1. A method for testing the copper ratio of NbTi / Cu superconducting wire based on image recognition, characterized in that: The steps include: S1: Collecting metallographic image data of the cross section of the sample NbTi / Cu superconducting wire and the real copper ratio obtained by the density method; the metallographic image data is obtained by the following method: S11: Take a sample from the NbTi / Cu superconducting wire and collect a color image of the metallographic cross section of the NbTi / Cu superconducting wire; S12: preprocessing the color image; then performing grayscale conversion on the preprocessed color image, and converting the grayscale image into a binary image again through threshold processing; the binary image is the metallographic image data; S2: Calculating the copper ratio using formula (1) according to the number of pixels of the copper area (2), the superconducting area (3) and the background area (1) in the binary image; (1) in, To calculate the copper ratio, is the number of pixels in the copper area (2), is the number of pixels in the background area (1), is the number of pixels in the superconducting region (3), M is the number of pixels in the horizontal direction of the binary image, and N is the number of pixels in the vertical direction of the binary image; S3: taking the metallographic image data in S1, the true copper ratio and the calculated copper ratio as a data set, and using the data set to train a support vector regression model; S4: Obtain a cross-sectional image of the NbTi / Cu superconducting wire to be tested, and input the cross-sectional image and the calculated copper ratio obtained by processing the cross-sectional image in S2 into the support vector regression model trained in S3 to obtain the actual copper ratio.
2. The method for testing the copper ratio of NbTi / Cu superconducting wire based on image recognition according to claim 1, characterized in that: The metallographic images in the data set in S3 and the metallographic images input into the trained model are subjected to dimensionality reduction by a principal component analysis method, and the first ten principal component results are selected as image data after dimensionality reduction.
3. The copper ratio testing method of NbTi / Cu superconducting wire based on image recognition according to claim 1, characterized in that: The data set is divided into a training set and a test set in a ratio of 3:
1. The support vector regression model is trained using the data in the training set, and the kernel function used by the support vector regression model is a Gaussian kernel.
4. The method for testing the copper ratio of NbTi / Cu superconducting wire based on image recognition according to claim 1, characterized in that: The S12 preprocessing includes removing image noise and enhancing contrast.
5. The method for testing the copper ratio of NbTi / Cu superconducting wire based on image recognition according to claim 4, characterized in that: The image noise removal method includes Gaussian filtering, bilateral filtering and median filtering; the contrast enhancement method includes contrast stretching and adaptive histogram equalization method.
6. The method for testing the copper ratio of NbTi / Cu superconducting wire based on image recognition according to claim 1, characterized in that: The S12 converts the color image into the grayscale image using a linear weighted average method. The grayscale image is a single-channel image, and each pixel value is between 0 and 255.
7. The method for testing the copper ratio of NbTi / Cu superconducting wire based on image recognition according to claim 1, characterized in that: The threshold processing method includes Otsu threshold segmentation method and maximum entropy threshold segmentation method.
8. The method for testing the copper ratio of NbTi / Cu superconducting wire based on image recognition according to claim 1, characterized in that: The S2 uses a flood filling algorithm to convert the pixel value of the superconducting region (3) into a value consistent with the pixel value of the copper region (2) surrounding the region, that is, the pixel value of the superconducting region (3) is converted into 1.
9. A copper ratio testing system using the copper ratio testing method of NbTi / Cu superconducting wire based on image recognition according to any one of claims 1 to 8, characterized in that: The system includes: an acquisition module, a copper ratio calculation module, a model training module and a copper ratio calculation module.
10. The copper ratio testing system of NbTi / Cu superconducting wire based on image recognition according to claim 9, characterized in that: The acquisition module is used to acquire metallographic image data of the cross section of the NbTi / Cu superconducting wire sample and obtain the real copper ratio by density method; The copper ratio calculation module is used to calculate the copper ratio according to the data of the acquisition module; The model training module is used to train a support vector regression model using the data from the acquisition module and the copper ratio calculation module as a data set; The copper ratio calculation module: obtains the data from the acquisition module and the copper ratio calculation module and inputs them into the model training module to obtain the actual copper ratio.
Citation Information
Patent Citations
Method for calculating corn leaf exserohilum turcicum disease spot area ratio and device
CN105180850A
Spectrum reconstruction model establishment method and system, storage medium and electronic equipment
CN110135523A
Steel material structure quantification method combining EBSD and deep learning method
CN111915602A
Flame heat flow real-time detection method based on machine vision and support vector machine
CN114255446A
Method for measuring copper overratio of superconducting wire
CN117554561A
Cited By
Copper ratio control processing method for superconducting wire
CN119864209A
Preparation method of NbTi / Cu superconducting wire based on copper ratio test
CN122245891A
A method for preparing NbTi / Cu superconducting wire based on copper ratio test
CN122245891B
