Axial size detection method for pipeline corrugated compensator

文档序号:9258 发布日期:2021-09-17 浏览:28次 中文

1. A method for detecting the axial dimension of a pipe corrugated compensator, comprising the steps of:

step 1: calibrating the working angle and working distance of the CCD camera;

step 2: selecting a light source, and polishing the corrugated compensator;

and step 3: uploading the obtained image information to a PC terminal, smoothing the image by applying Gaussian filtering, and setting a standard deviation

And 4, step 4: performing edge detection on the image after Gaussian filtering by using a Sobel edge detection operator, and performing graying processing on the image;

and 5: performing threshold segmentation on the image by using a self-adaptive Otsu operator;

step 6: carrying out hole filling processing on the binarized image;

and 7: correcting the binary image to obtain edge feature points;

and 8: calculating the absolute value of the horizontal and vertical coordinate difference of the required characteristic points;

and step 9: when the corrugated compensator works, the size of the connecting pipe part cannot be changed due to the fact that the pipe wall is thick, and therefore the axial overall size of the corrugated compensator and the axial size between adjacent corrugations are calculated by taking the size of the connecting pipe as a reference size.

2. The method for detecting the axial dimension of the pipeline ripple compensator of claim 1, wherein the camera calibration distance, the camera calibration angle and the imaging quality in the step 1 are required to be clear and accurate so as to solve the problem of vertical tilt.

3. The method for detecting the axial dimension of the pipeline ripple compensator according to claim 1, wherein the step 3 is to set a standard deviation, smooth the image, eliminate noise and ensure the authenticity of the contour edge.

4. The method for detecting the axial dimension of the pipeline ripple compensator according to claim 1, wherein the step 4 is to obtain a true edge of the image for obtaining the edge feature point.

5. The method for detecting the axial size of the pipeline ripple compensator of claim 1, wherein in the step 5, the threshold value is segmented, parameters are not required to be set, and an optimal threshold value is calculated in a self-adaptive mode according to image information.

6. The method for detecting the axial dimension of the pipeline ripple compensator according to claim 1, wherein the step 7 of performing correction processing on the image comprises, after the correction processing, traversing the image to obtain edge feature points according to the particularity of the shape of the ripple compensator, and performing median operation on the obtained edge feature points to ensure the accuracy of the coordinates of the feature points.

7. The method for detecting the axial dimension of the pipeline ripple compensator of claim 1, wherein the step 8 comprises calculating the distance between the abscissa and the ordinate of each feature point.

8. The method for detecting the axial dimension of the pipeline ripple compensator according to claim 1, wherein the step 9 selects the connecting pipe with unchanged dimension as a reference dimension for calculating the actual dimension, and the calculated scale is combined with the step 8 to calculate the actual dimension.

Background

Industrial pipe networks are at a great position in industrial production, and the corrugated compensator is widely used in industrial pipelines as a compensating element for compensating dimensional changes of the pipelines caused by various reasons. In practical application, the corrugated compensator is damaged, and once the corrugated compensator is damaged, production equipment is stopped and a series of chain reactions are easily generated, which seriously threatens the normal operation of the equipment and the life safety of operators. Therefore, in order to ensure the safe operation of the production system, it is increasingly important to detect the axial dimension change of the corrugated compensator in the pipeline. In industry, the conventional axial dimension detection of the corrugated compensator is realized by a displacement sensor, but the method can only measure the change of the overall axial dimension of the corrugated compensator, but cannot measure the change of the axial dimension between adjacent corrugations of the corrugated compensator, so that whether the displacement load borne between the adjacent corrugations is uniform or not cannot be known, and if the non-uniformity of the displacement load borne exceeds a certain limit, the corrugated compensator is unstable, the corrugated compensator is damaged, and the production safety is seriously affected.

Disclosure of Invention

The invention aims to provide a method for detecting the axial size of a corrugated compensator of a pipeline, which detects the integral axial size of the corrugated compensator in the pipeline and the axial size between adjacent corrugations by using a mechanical vision technology to monitor the integral axial size change of the corrugated compensator and the uniformity of displacement load bearing between the adjacent corrugations in real time and solve the problem that the corrugated compensator in an industrial pipeline is damaged due to overlarge non-uniformity degree between the corrugations of the corrugated compensator.

The purpose of the invention is realized by the following technical scheme:

a method for detecting the axial dimension of a pipe corrugated compensator, the method comprising the steps of:

step 1: calibrating the working angle and working distance of the CCD camera;

step 2: selecting a light source, and polishing the corrugated compensator;

and step 3: uploading the obtained image information to a PC terminal, smoothing the image by applying Gaussian filtering, and setting a standard deviation

And 4, step 4: performing edge detection on the image after Gaussian filtering by using a Sobel edge detection operator, and performing graying processing on the image;

and 5: performing threshold segmentation on the image by using a self-adaptive Otsu operator;

step 6: carrying out hole filling processing on the binarized image;

and 7: correcting the binary image to obtain edge feature points;

and 8: calculating the absolute value of the horizontal and vertical coordinate difference of the required characteristic points;

and step 9: when the corrugated compensator works, the size of the connecting pipe part cannot be changed due to the fact that the pipe wall is thick, and therefore the axial overall size of the corrugated compensator and the axial size between adjacent corrugations are calculated by taking the size of the connecting pipe as a reference size.

In the method for detecting the axial dimension of the pipeline corrugated compensator, the camera calibration distance, the camera calibration angle and the imaging quality are required to be clear and accurate in step 1, and the problem of vertical inclination is solved.

In the method for detecting the axial size of the pipeline ripple compensator, the standard deviation is set in the step 3, the image is subjected to smoothing treatment and noise elimination, and the authenticity of the contour edge is ensured.

In the method for detecting the axial size of the pipeline ripple compensator, the real edge of the image is acquired in the step 4, so as to acquire the edge feature points.

According to the method for detecting the axial size of the pipeline ripple compensator, in the step 5, the optimal threshold value is calculated in a self-adaptive mode according to image information without setting parameters through threshold value segmentation.

In the method for detecting the axial size of the pipeline ripple compensator, the image is corrected in the step 7, so that the problem of horizontal inclination is solved; after correction processing, according to the particularity of the shape of the ripple compensator, traversing the image to obtain edge feature points, and performing median operation on the obtained edge feature points to ensure the accuracy of the feature point coordinates.

In the method for detecting the axial size of the pipeline ripple compensator, in step 8, the distance between the abscissa and the ordinate of each feature point is calculated respectively.

In the method for detecting the axial size of the pipeline corrugated compensator, the connecting pipe with unchanged size is selected in the step 9 to serve as a reference size for calculating the actual size, and the actual size is calculated by combining the step 8 with the calculated scale.

The invention has the advantages and effects that:

the invention not only can realize the function of the displacement sensor, namely, the whole axial dimension of the corrugated compensator can be detected, but also the axial dimension between corrugations of the corrugated compensator can not be detected by the displacement sensor. The detection method has great technical and economic significance under the condition that the corrugated compensator in the industrial pipeline is damaged due to overlarge unevenness among corrugations of the corrugated compensator.

Drawings

FIG. 1 is a flow diagram of an overall scheme;

FIG. 2 is a diagram of moire compensator image information obtained by MATLAB;

FIG. 3 is a Gaussian denoising effect diagram;

FIG. 4 is a Sobel edge detection effect diagram;

FIG. 5 is a grayed-out image;

FIG. 6 is a binarized image according to the present invention;

FIG. 7 is a diagram of hole filling after inversion;

FIG. 8 is a binarized image with a target gray level of 1 and a background gray level of 0;

FIG. 9 is an image of an annotated feature location;

FIG. 10 is an acquired feature point image;

FIG. 11 is a top view of the camera calibration.

Detailed Description

The present invention will be described in detail with reference to the embodiments shown in the drawings.

Fig. 1 is a flow chart of an embodiment of the present invention for detecting the axial dimension of a corrugated compensator, and the embodiment of the present invention is mainly used for detecting the axial overall dimension of the corrugated compensator in an industrial pipeline and the axial dimension between adjacent corrugations.

Step 1: the corrugated compensator itself is straight cylindrical so that it can be installed in straight sections of straight and non-straight pipes. The ripple compensator in the non-straight pipeline is inclined according to the information presented in the image, the inclination can be divided into a vertical inclination and a horizontal inclination, the vertical inclination is the inclination of the z-axis, the horizontal inclination is within (x, y), and any inclination affects the subsequent edge feature point acquisition operation. Therefore, the working angle of the CCD camera is calibrated, so that the radial plane where the camera lens is located is parallel to the perpendicular bisector of the corrugated compensator, and the influence caused by vertical inclination is overcome; and the vertical distance between the radial plane where the camera lens is located and the perpendicular bisector of the ripple compensator is calibrated to be M, and the millimeter is taken as a unit, so that the image characteristic information of the ripple compensator is ensured to be complete.

Step 2: and an LED bank lamp is selected for background illumination, and the edge area of the corrugated compensator is highlighted, so that the illumination is uniform, and the interference of background information is reduced.

And step 3: due to the influence of the high-temperature working environment and poor illumination of the ripple compensator, Gaussian noise is inevitably generated, and therefore the method adopts Gaussian filtering to carry out smoothing processing on the image 2, and reduces the interference of the noise on image information.

In the formulaPoint coordinates, which can be considered as integers in image processing;is the standard deviation; two-dimensional Gaussian filtering is the most important standard deviation in image smoothing processingThe selection of (a) is carried out,the larger the selection is, the wider the frequency band of the Gaussian filter is, the better the smoothness is, and the method setsTo 2, adoptAnd (5) template.

And 4, step 4: processing the graph 3 by using Sobel edge detection operatorThe template calculates the gradient amplitude and direction to obtain the real edge. Let A be the gray value of the image, the gradient magnitude formula of the Sobel operator in the transverse direction and the longitudinal direction is as follows:

whereinIs a transverse gradient;is a longitudinal gradient. At each point on the image, gradients in two directions can be obtained, and the gradient amplitude is obtained by the following formulaAnd direction of gradient

And

after the edge detection, graying processing is performed on the image of fig. 4, R, G, B values of each pixel point in the image are unified into a value, unnecessary information is reduced, and the subsequent processing speed is accelerated.

And 5: using Otsu operator to self-adaptively calculate optimal threshold value, and carrying out threshold value segmentation on the image 5, wherein the image pixel number is N, and the gray scale range is [0, L-1 ]]The number of pixels corresponding to the gray level i isThe probability is:

dividing pixels in an image into two categories by using a threshold value T according to gray valuesAndfrom the gray value of [0, T]The composition of the pixels of (a) is,from gray value at [ T +1, L-1]The average of the whole image:

andthe mean value of (A) is:

wherein

Obtained by the above formula

The between-class variance is defined as

So that T is in [0, L-1 ]]Within the range, when taking values in sequenceAt maximum value, the threshold value obtainedT is the optimal threshold value of the Otsu algorithm.

Step 6: and performing negation operation on the image 6 to facilitate hole filling processing, removing unnecessary parts in the image, only retaining edge information, and performing negation to obtain a binary image with a target gray value of 1 and a background gray value of 0.

And 7: the radon transform is applied to perform the tilt detection and correction process on fig. 8, so that the central axis of the ripple compensator is perpendicular to the horizontal direction. Traversing the corrected part of the binary image with the gray value of 1 by utilizing the particularity of the shape of the ripple compensator to obtain edge feature points: the point where the leftmost image gradation value is 1, the point where the rightmost image gradation value is 1, the point where the uppermost image gradation value is 1, and the point where the lowermost image gradation value is 1 are taken, and the point is taken as shown in fig. 9. In fig. 9, each feature is visually observed as one point, but after the image is enlarged, the point is actually a straight line obtained by fitting multiple points, and therefore, it is necessary to perform a median operation on each of the obtained 12 edge feature points to obtain 12 feature points as shown in fig. 10, establish a coordinate system with the upper left corner as the origin, and calculate the coordinates of each edge point.

And 8: after the edge feature point coordinates are obtained, it is necessary to calculate absolute values of the horizontal coordinate difference values between points a and m and between points f and g in fig. 10, and to set the absolute values to the valuesAnd(ii) a Then calculating the absolute values of the difference values of the vertical coordinates of the points b and c, the points c and d, the points d and e, the points h and j, the points j and k, the points k and l, the points b and e, and the points h and l, and setting the absolute values as the difference values

And step 9: the corrugated compensator is a compensating device which utilizes the effective telescopic deformation of an elastic element to absorb the dimensional change of a pipeline, a conduit or a container caused by expansion and contraction due to heat and cold. It can be seen that the size of the nozzle positions (am and fg portions) in FIG. 10 are unchanged. The actual sizes of a point a and a point m, a point f and a point g corresponding to the connecting pipe of the corrugated compensator are set asAnd in practice. ByAndthe relation of (a) is obtained to obtain a scale, and calculation is carried outRespectively is set asThe size represented is not the external diameter of the corrugated compensator connecting pipe, which is determined by the calibrated distance between the external diameter of the corrugated compensator connecting pipe and the camera, and the top view of the positions of the points a and m is shown in FIG. 11.

The calculation formula is as follows:

in the above formula, the first and second carbon atoms are,the distance between the camera lens and the central axis of the corrugated compensator is taken as the distance;the ripple compensator takes over the outer radius.

The scale calculation formula and the actual size calculation formula are as follows:

in the above formula, the first and second carbon atoms are,actual am size;is the absolute value of the difference between the abscissa of the m point and the abscissa of the a point in the image,is a scale bar.

In the above formula, the first and second carbon atoms are,in order to calculate the actual size of the object,is the absolute value of the difference between the specified coordinates.

完整详细技术资料下载
上一篇:石墨接头机器人自动装卡簧、装栓机
下一篇:一种基于深度学习的风景道景观评价方法

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!