RC Photo Paper, Inkjet Photo Paper, RC Photo Paper Original Material Guangzhou Quanxu Technology Co Ltd , https://www.anticorrosionpigment.com
As we all know, industrial CT technology as an advanced non-destructive testing technology, it can not only be used for non-destructive testing, quality assessment, qualitative analysis and judgment of the internal structure and defects of the workpiece, but also can achieve the internal structure of the workpiece through the measurement of industrial CT images. The measurement and quantitative analysis of the size and defect size provide high measurement accuracy and repeatability. In recent years, the development from qualitative detection to quantitative measurement is an important research direction of industrial CT technology, and great progress has been made. However, most of the measurement of industrial CT images at home and abroad still depend on manual methods. Not only is the measurement repeatability poor and the measurement accuracy is low, it is more and more difficult to adapt to the needs of high-volume image processing work. Therefore, the article combines engineering practice, some problems in manual measurement in the paper, and discusses the methods of automatic measurement of industrial CT images. According to the characteristics of industrial CT images, an automatic measurement method based on edge extraction is proposed.
2Canny's edge detection principle Introduction Through the industrial CT machine to obtain large-scale metal artifacts of the tomographic image, and then transmitted to the central management system, the system uses image processing technology to analyze the acquired images, extract the relevant defect size information of the workpiece, stored in the database, The image analysis system provides accurate and objective analysis of the matrix structure, impurity content, tissue composition, and defect size of metals or other materials, providing a reliable basis for product quality.
From the point of view of signal acquisition, the photons transmitted through the measured workpiece are converted into analog signals by the detector and then converted into digital signals through A/D. In the above process, the edge of different material regions of the original workpiece is [1], according to the CT volume. The principle of point spread in the product backprojection reconstruction algorithm [2] shows that the real boundary is 3 pixels in the edge range of the digital image.
Canny transformed the edge detection problem into the problem of detecting the maximum value of the unit function [3]. In Gaussian noise, a typical edge represents the change in intensity of a step.
(1) A good edge detection operator should have three indicators:
With low probability of error, we must not only lose the real edge, but also judge the margin as a margin.
With high positioning accuracy, the detected edge should be at the true edge position;
There is a unique response to each edge and the resulting edge is a single pixel width.
(2) Canny proposed three criteria to determine the edge detection operator [4]:
Good signal-to-noise ratio: A good signal-to-noise ratio criterion means that the probability that a non-edge point is judged as an edge point is low, and the probability that an edge point is judged as a non-edge point is low. The mathematical expression of the SNR:
(1)
Where f(x) is the filter impulse response with the boundary [-ω, +ω], G(-x) represents the edge function, and σ is the mean square error of Gaussian noise. If the signal-to-noise ratio is large, the edge extraction quality is good. .
Positioning accuracy criteria. The positioning accuracy means that the detected edge point is as far as possible in the center of the actual edge. The mathematical expression of positioning accuracy is:
(2)
Among them, G'(x) and f'(x) denote the first derivatives of G(x) and f(x), respectively. If the Localization value is larger, it indicates that the edge positioning accuracy is high.
Unilateral response criteria. That is, to ensure that the single edge has only one pixel response, the zero-crossing point average distance D(f') of the impulse response derivative of the detection operator should satisfy f"(x) (which is the second derivative of f(x)).
(3)
Finally, Canny deduces the first derivative of the Gaussian function using the functional derivative method. This is the best approximation of the best function, and the calculation method is simple.
3 Canny edge detection algorithm The Canny algorithm actually uses a dual-threshold method to achieve edge extraction, where the two thresholds are h1 and h2, respectively. Canny suggested that h2 be 2 to 3 times of h1. The algorithm flow is as follows [5]:
Step1: Initialize edge point position EdgeDot=(col,vol), col=0,vol=0. Defines an edgeedge figure edge array, size nWidth x nHeight, initialized to full 255 (non-edge);
Step2: View the value of EdgeDot point in the non-maximally suppressed graph and assign it to IfEdge;
Step3: if(IfEdge=noedge)thenStep7;
Step4: View the value of the EdgeDot point in the gradient map and assign it to magni-tude;
Step5: if (magnitudeStep6: Record the EdgeDot point in the edge map of the recording result and set the non-maximum suppression map corresponding point value to noedge, then view the eight neighboring point gradient magnitudenear of the EdgeDot point in the gradient graph, if magnitudenear>h1, Repeat Step 6; otherwise, execute Step 7;
Step7:col++;
If(col>=nWidth)thenvol++;
If(vol>=nHeight)thenend;(end of program)
Perform Step2.
The choice of the threshold in the algorithm directly affects the performance of the Canny operator.
The author implemented this algorithm with Visual C++6.0, including: image smoothing (Gaussian filtering here, differentiation processing, non-maximum suppression non-maximum suppression), edge thresholding and other steps. Select a slice in the CT image sequence (as shown in Figure 1). The effect of the image segmentation algorithm in practical applications is shown in Figure 1.
Fig. 1 Edge extraction effect Fig. 4 Automatic measurement of industrial CT images The substances in different areas of the industrial CT image appear as gray values ​​that are different from the surrounding substances. Therefore, researchers often use the edge detection technology and image segmentation technology to separate this area, making it an independent analysis object, and then make accurate measurements. At present, most of the common area measurements rely on manual completion. The user mainly uses the mouse to click around the measured area to obtain a closed area. The area is approximated as the area to be measured, and then the pixels within the area are counted. The number of the approximate calculation area. The common perimeter and polar measurements are also just an approximation of the area measurement. Obviously, these measurement methods, due to human reasons or the shortcomings of the algorithm itself, give the measurement a large error, and do not have repeatability, making it difficult to achieve batch image measurement.
Therefore, in the following, the edge is obtained by accurately segmenting the industrial CT image, and based on this, an automatic measurement method for the CT image area, perimeter, and polar radius of large metal workpieces is proposed.
4.1 Area Measurement Since the area of ​​the area is not related to the change of its internal gray scale, it is only related to the boundary of the area. Therefore, as long as the coordinates of the area boundary point are determined, the area of ​​the area can be calculated by using the boundary coordinates. In Green's theorem, it is pointed out that the area enclosed by a closed curve in the xy plane is given by its integral integral, ie (4)
Among them, the integration takes place along this closed curve. The Green formula shows that as long as the coordinates of each point of a closed curve are determined, the area of ​​the area enclosed by the curve can be calculated from these coordinate points.
The above method can be used to calculate the area as follows: Since the industrial CT image is a discretized data form, then the edge of the region is also a discrete point set. Therefore, Green's theorem needs to be discretized before the area can be calculated. The discrete form of Green's theorem is as follows:
(5)
The discrete form expression essentially treats the area defined by the closed edge curve as a polygon, divides it into multiple triangles with a point in the area as a center, and then calculates the area of ​​all the triangles.
4.2 Perimeter The perimeter of the measurement area is the boundary length of the divided area. The boundaries can usually be represented by gap codes, chain codes, and areas. When the gap code method is expressed, the measurement length process includes a number of turns, thereby exaggerating the actual perimeter value; and when the area method is expressed, only the boundary points are counted, and thus the boundary length of each pixel is ignored, thereby reducing the size. The actual perimeter value; and when the chain code method is expressed, it takes into account the boundary length of each pixel and turns the turn into a straight line, which improves the measurement accuracy of the perimeter. The main idea of ​​the boundary chain code measurement is as follows: The chain code starts from the coordinates of a certain starting point arbitrarily selected on the object boundary. The starting point has 8 adjoining points, at least one of which is the boundary point. The boundary chain code specifies the direction that must be used for the step from the current boundary point to the next boundary point. Because there are 8 possible directions, you can number them from 0 to 7 [6], as shown in Figure 2. The boundary chain code contains the coordinates of the starting point and the encoding sequence used to determine the path around the boundary path.
In this border chain code, the pixel points numbered 0, 2, 4, and 6 are called even-step pixels, while the pixel points numbered 1, 3, 5, and 7 are called odd-step pixels.
The method for calculating the perimeter from this theory is to define the region boundary as a polygon with the center of each boundary pixel as the vertex. Thus, the corresponding perimeter is the sum of a series of horizontal and vertical directions (Δp1=l) and the diagonal direction () [7]. The perimeter of a defect can be expressed as:
(6)
Where Ne and No are the number of dual steps (0, 2, 4, and 6) and odd steps (1, 3, 5, and 7) agreed in the boundary chain code, respectively.
4.3 Polar Diameter Measurement The polar diameter is a description of the dimensions of the specified area of ​​the workpiece. The most direct measurement method of polar diameter is as follows: Since the industrial CT image is a discretized data form, the polar diameter of each point on the area is the distance from the geometric center of the area to the boundary point of the area. The essence of seeking the polar path is to find the coordinates of the boundary point and the coordinates of the geometric center of the area. However, the coordinates of the boundary point can be obtained from the edge image obtained by the edge extraction. The geometric center coordinates of the area can be found by averaging the area as the average of all the geometric center coordinates of the triangle formed by an infinite number of boundary points to the geometric center. take. Therefore, using the Green theorem and the algorithm of the triangle geometry center, the discrete form of the geometric center of any region can be obtained as (7)
(8)
4.4 Automatic measurement of area, perimeter and polar diameter Based on the above theory, the automatic measurement is divided into semi-automatic measurement of the region of interest of the workpiece and fully automatic measurement of all different regions of the workpiece.
The main idea of ​​this method is: by automatically recognizing different areas in the industrial CT image and defining the materials of different materials from the perspective of the area, the area measurement can be performed.
The specific implementation steps are: the first step is to automatically obtain the edge image of the industrial CT image; the second step is to automatically search for all closed curves and non-closed curve traces in the edge image; and the third step is to use all the closed curves to create the industrial CT. All the different material areas in the image and all non-closed curve traces are marked; Finally, the different areas are automatically identified and the area, perimeter, and polar diameters are measured for these areas.
The experimental demonstration: In the automatic measurement of industrial CT images, the area measurement accuracy reaches 97.6% on average, the perimeter measurement accuracy reaches 98.2%, and the measurement accuracy reaches 100% in the polar diameter measurement of the standard circle and elliptical image.
The automatic measurement time of the entire CT image is related to the area of ​​each area of ​​the image, that is, the larger the area of ​​the image area, the greater the time for creating the image area and the longer the total measurement time. In the batch (1500) CT image measurement of a given workpiece, the total measurement time was 17 minutes.
5 Concluding remarks From the above-mentioned actual measurement results of the workpiece, it can be seen that the method proposed in the article not only achieves better accuracy but also has high repeatability for measuring different material regions of industrial CT images and measuring defects. Features. It is not only suitable for measuring the geometrical dimensions of the area of ​​interest (eg defects) of the workpiece, but also for the measurement of the internal structure size of the industrial CT image of the batch workpiece. Therefore, the application prospect of machine vision in the detection of large workpieces is optimistic.
1 Introduction Machine vision is the use of machines instead of the human eye to make measurements and judgments. The machine vision system refers to the hardware and software equipment that converts the ingested target into an image signal through a machine vision product and then sends it to a dedicated information processing device for further processing. Because machine vision systems can quickly acquire large amounts of information and are easy to automate and integrate with process control information, in modern automated production processes, machine vision systems are widely used for condition monitoring, product inspection, and quality control. And other fields. The machine vision system is characterized by automatic, objective, non-contact, high precision, and can easily increase the flexibility and automation of production. In some dangerous working environments that are not suitable for manual work or artificial vision is difficult to meet requirements, machine vision is often used to replace artificial vision; in the process of large-scale industrial production, using artificial vision to check the quality of products is inefficient and the precision is not high. Using machine vision inspection methods can greatly increase production efficiency and production automation. Because machine vision is easy to implement information integration, it is one of the basic technologies for achieving computer integrated manufacturing. In short, with the maturity and development of machine vision technology itself, it can be expected that it will become more and more widely used in modern and future manufacturing enterprises.