Subway tunnel mobile scanning point cloud fine division method based on image recognition

文档序号:1599714 发布日期:2020-01-07 浏览:30次 中文

阅读说明:本技术 一种基于图像识别的地铁隧道移动扫描点云精细划分方法 (Subway tunnel mobile scanning point cloud fine division method based on image recognition ) 是由 黄帆 吴廷 李维涛 鲍金 郭玲 陈素贞 高磊 李航天 张天 于 2019-09-23 设计创作,主要内容包括:本发明涉及图像识别及三维测量方法技术领域,具体来说是一种基于图像识别的地铁隧道移动扫描点云精细划分方法,获得隧道平铺图中的前景像素,并对前景像素进行邻域分析,以生成若干像素联合单元,并将符合设定规则的像素联合单元保存,将不符合设定规则的像素联合单元转化为背景像素的颜色,最后根据像素联合单元确定每条环缝在环平铺图中的位置,并对扫描线进行修正。本发明同现有技术相比,其优点在于:本发明精细化划分移动激光扫描出的点云模型,通过进行平铺图投影并处理,实现点云模型的修复与分割,并快速的赋予点云模型中每一管片所处里程区间,有助于减少移动测量中点云测量的误差,并呈现出更为准确的点云模型。(The invention relates to the technical field of image recognition and three-dimensional measurement methods, in particular to a subway tunnel moving scanning point cloud fine dividing method based on image recognition, which comprises the steps of obtaining foreground pixels in a tunnel tiled image, carrying out neighborhood analysis on the foreground pixels to generate a plurality of pixel combination units, storing the pixel combination units meeting set rules, converting the pixel combination units not meeting the set rules into colors of background pixels, finally determining the position of each circular seam in the ring tiled image according to the pixel combination units, and correcting a scanning line. Compared with the prior art, the invention has the advantages that: the method disclosed by the invention has the advantages that the point cloud model scanned by the mobile laser is finely divided, the repair and the segmentation of the point cloud model are realized by performing the projection and the processing of the tiled image, the mileage interval of each segment in the point cloud model is rapidly given, the error of point cloud measurement in the mobile measurement is favorably reduced, and a more accurate point cloud model is presented.)

1. A subway tunnel moving scanning point cloud fine dividing method based on image identification is characterized in that foreground pixels in a tunnel tiled image are obtained, neighborhood analysis is conducted on the foreground pixels to generate a plurality of pixel combination units, the pixel combination units meeting set rules are stored, the pixel combination units not meeting the set rules are converted into colors of background pixels, finally the position of each circular seam in the tunnel tiled image is determined according to the pixel combination units, and scanning lines are corrected.

2. The subway tunnel moving scanning point cloud fine division method based on image recognition as claimed in claim 1, characterized in that foreground pixels in a tunnel tile map are obtained by the following method: and carrying out edge detection on the tunnel tile image, and generating a black-white two-color binary image by an Otsu algorithm, wherein black is background pixels which are not interested, and white is foreground pixels which are interested.

3. The method as claimed in claim 2, wherein the edge detection comprises calculating image gradients by vertical template convolution using Sobel gradient operators.

4. The subway tunnel moving scanning point cloud fine dividing method based on image recognition as claimed in claim 2, wherein said Otsu algorithm comprises the following steps:

traversing a gradient interval range, wherein the variance between classes corresponds to a threshold value, the segmentation threshold value of the image background and the foreground is assumed to be T, and the threshold value range is [ T ]min,Tmax]And are all taken as integers, the number of background pixels accounts for the ratio of w to the whole image0Average gray scale is recorded as μ0(ii) a The ratio of the number of foreground pixels to the whole image is w1Average gray scale is recorded as μ1The inter-class variance calculation formula is as follows:

g=w0w101)2

wherein g is the between-class variance.

5. The subway tunnel moving scanning point cloud fine partitioning method based on image recognition as claimed in claim 1, wherein said neighborhood analysis includes the following steps:

adopting a four-neighborhood or eight-neighborhood marking algorithm for a pixel connected domain, calculating the connected domain by adopting a Two-Pass method, and endowing the smallest label in each foreground pixel neighborhood during the first scanning, wherein the neighborhoods contain different labels and are put into the same set; and in the second scanning, the label of each point is updated to the minimum label in the belonged set.

6. The subway tunnel moving scanning point cloud fine division method based on image recognition as claimed in claim 5, wherein the position and area range of the connected domain are determined by the following formula:

Figure FDA0002210971250000021

in the formula, mid _ h and mid _ x are expressed as the middle points of the connected domain, max _ height and max _ weight are the width and height sections of the connected domain, max (x) and max (h) are the maximum values of the connected domain units in the x and h directions, and ellip is the ellipticity.

7. The subway tunnel moving scanning point cloud fine division method based on image recognition as claimed in claim 1, characterized in that said tunnel tile map is obtained by the following method: and performing mobile laser scanning in the subway tunnel to generate three-dimensional point cloud data and expanding the three-dimensional point cloud data into a tunnel floor map.

8. The method for finely dividing the moving scanning point cloud of the subway tunnel based on the image recognition as claimed in claim 1, wherein before obtaining the foreground pixels in the tunnel tile map, the known gray levels of the adjacent points are used to interpolate and smooth the tile map, so as to eliminate the black points of the vertical stripes in the tunnel tile map.

9. The method for finely dividing the moving scanning point cloud of the subway tunnel based on the image recognition as claimed in claim 1, wherein before obtaining the foreground pixel in the tunnel tile image, the tunnel tile image is subjected to pixel gray level interval stretching processing to enhance the definition.

Technical Field

The invention relates to the technical field of image recognition and three-dimensional measurement methods, in particular to a subway tunnel mobile scanning point cloud fine partitioning method based on image recognition.

Background

Because the subway is stopped for a short time, the detection time for detecting the subway tunnel is only about 3-4 hours at night, and the traditional method is difficult to meet the subway monitoring requirements in terms of efficiency and applicability by arranging monitoring points in the tunnel and using a detection method of a total station, a profiler and a convergence instrument. The method for mobile measurement can greatly improve the measurement efficiency and reduce the possible human errors, and meanwhile, a high-precision tunnel point cloud model can be directly obtained by combining a three-dimensional laser scanning technology. The national patent publication No. CN107869958A discloses a 3D scanning method for iron detection and measurement, and a tunnel floor plan is established according to three-dimensional point cloud data.

The accuracy of detection and the convenient degree of use are directly influenced by correction and identification of the point cloud scanned by the mobile laser. For the point cloud model of the tunnel, multiple errors exist in the movement measurement, so that the point cloud model generates stretching compression, local inclination or redundancy. There are mainly the following reasons: (1) in the process of travelling of the trolley, the odometer records mileage according to the rolling of the rotating wheel, and the rotating wheel can be empty; (2) the tunnel linearity is composed of a straight line, a gentle curve and a circular curve; (3) moving a monitoring starting position, wherein the position of the alignment circular seam has deviation; (4) odometer and scanner synchronization error, etc.

If the annular seam point cloud mileage can be determined, an annular point cloud mileage area can be determined by the seam mileage, and at present, the number of the ring of the segment is simply and evenly divided or manually calibrated, so that a large amount of manpower is consumed during the post-processing, and the efficiency is low.

Disclosure of Invention

The invention aims to overcome the defects of the prior art, and provides a subway tunnel mobile scanning point cloud fine dividing method based on image identification, which can determine the position of each circular seam in a circular tiled image, and further can realize the repair of a scanning point cloud model through the positions of the circular seams in the circular tiled image.

In order to achieve the purpose, a subway tunnel mobile scanning point cloud fine dividing method based on image recognition is designed, foreground pixels in a tunnel paving image are obtained, neighborhood analysis is conducted on the foreground pixels to generate a plurality of pixel combination units, the pixel combination units meeting set rules are stored, the pixel combination units not meeting the set rules are converted into colors of background pixels, finally the position of each circular seam in the circular paving image is determined according to the pixel combination units, and scanning lines are corrected.

The invention also has the following preferable technical scheme:

obtaining foreground pixels in the tunnel tile map by the following method: and carrying out edge detection on the tiled image, and generating a black-white two-color binary image by an Otsu algorithm, wherein black is background pixels which are not interested, and white is foreground pixels which are interested.

And the edge detection comprises the step of performing convolution calculation on a vertical template by adopting a Sobel gradient operator to obtain the image gradient.

The Otsu algorithm comprises the following steps:

traversing a gradient interval range, wherein the variance between classes corresponds to a threshold value, the segmentation threshold value of the image background and the foreground is assumed to be T, and the threshold value range is [ T ]min,Tmax]And are all taken as integers, the number of background pixels accounts for the ratio of w to the whole image0Average gray scale is recorded as μ0(ii) a The ratio of the number of foreground pixels to the whole image is w1Average gray scale is recorded as μ1The inter-class variance calculation formula is as follows:

g=w0w101)2

wherein g is the between-class variance.

The neighborhood analysis comprises the following steps: adopting a four-neighborhood or eight-neighborhood marking algorithm for a pixel connected domain, calculating the connected domain by adopting a Two-Pass method, and endowing the smallest label in each foreground pixel neighborhood during the first scanning, wherein the neighborhoods contain different labels and are put into the same set; and in the second scanning, the label of each point is updated to the minimum label in the belonged set.

Determining the position and the area range of the connected domain by the following formula:

Figure BDA0002210971260000031

in the formula, mid _ h and mid _ x are expressed as the middle points of the connected domain, max _ height and max _ weight are the width and height sections of the connected domain, max (x) and max (h) are the maximum values of the connected domain units in the x and h directions, and ellip is the ellipticity.

The tunnel paving map is obtained by the following method: and performing mobile laser scanning in the subway tunnel to generate three-dimensional point cloud data and expanding the three-dimensional point cloud data into a tunnel floor map.

And before foreground pixels in the tunnel tile image are obtained, interpolation smoothing is carried out on the tile image by using the known gray levels of adjacent points, and black points of vertical stripes in the tile image are eliminated.

And before foreground pixels in the tunnel tile image are obtained, stretching the pixel gray scale interval of the tile image to enhance the definition.

Compared with the prior art, the invention has the advantages that: each ring of the tunnel is used as an independent bearing body, the accuracy of point cloud observation of each ring can directly determine the accuracy of ring deformation and other disease screening results, and the method is of great importance to the data achievement of tunnel convergence post-processing. The method disclosed by the invention has the advantages that the point cloud model scanned by the mobile laser is finely divided, the repair and the segmentation of the point cloud model are realized by performing the projection and the processing of the tiled image, the mileage interval of each segment in the point cloud model is rapidly given, the error of point cloud measurement in the mobile measurement is favorably reduced, and a more accurate point cloud model is presented.

Drawings

FIG. 1 is a schematic flow chart illustrating the general process of the present invention in one embodiment;

FIG. 2a is a schematic diagram of a horizontal template of a Sobel operator for gray scale gradient convolution according to an embodiment;

FIG. 2b is a schematic diagram of a vertical template of a Sobel operator for gray scale gradient convolution according to an embodiment;

FIG. 2c is a schematic diagram of a diagonal template of a Sobel operator for gray scale gradient convolution according to an embodiment;

FIG. 2d is another schematic diagram of a diagonal template of the Sobel operator for gray scale gradient convolution according to an embodiment;

FIG. 3 is a diagram of four neighboring regions of an A pixel in an embodiment;

FIG. 4 is a template of a connected component labeling algorithm for the A-pixel four-neighborhood algorithm in one embodiment;

FIG. 5 is a diagram of eight neighborhoods of A pixels in an embodiment;

FIG. 6 is a template of a connected component labeling algorithm for the A-pixel eight neighborhood algorithm in one embodiment;

FIG. 7 is a flow chart of a Two-pass four-neighbor algorithm in one embodiment;

FIG. 8 is a diagram illustrating an example of a pixel after processing a communication field according to an embodiment;

FIG. 9 is a flow chart of the circular seam split stitching in one embodiment.

Detailed Description

The principles of this method will be apparent to those skilled in the art from the following further description of the invention, taken in conjunction with the accompanying drawings. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.

The embodiment provides a subway tunnel moving scanning point cloud fine dividing method based on image recognition, which comprises the steps of obtaining foreground pixels in a tunnel tiled image, carrying out neighborhood analysis on the foreground pixels to generate a plurality of pixel combination units, storing the pixel combination units meeting set rules, converting the pixel combination units not meeting the set rules into colors of background pixels, finally determining the position of each circular seam in the tunnel tiled image according to the pixel combination units, and correcting scanning lines. With reference to fig. 1, the following embodiments are taken as examples, and specifically include the following steps:

a. performing mobile laser scanning in a subway tunnel to generate three-dimensional point cloud data and expanding the three-dimensional point cloud data into a tunnel floor map;

b. the known gray levels of adjacent points are used for conducting interpolation smoothing on the tunnel paving map, and vertical stripe black points in the tunnel paving map are eliminated;

c. stretching the pixel gray level interval of the tunnel tiled image to enhance the definition;

d. performing edge detection on the tiled image, performing convolution calculation by adopting a small-area template, and generating a binary image (black and white) by an Otsu algorithm, wherein black is background pixels which are not interested, and white is foreground pixels which are interested;

e. performing neighbor domain analysis on foreground pixels in the binary image to generate a plurality of independent pixel combination units, sequentially analyzing the units, storing the units according with a set rule, and converting the color of irregular units into black;

f. combining the unit information and the position relation of adjacent seams, determining the position of each circular seam in a circular tiled image, cutting and correcting each scanning line, and finally splicing the point cloud again.

Wherein, the step a further comprises: for the tunnel paving map obtained by unfolding the axis in each ring, recording the maximum and minimum advancing coordinates in the cloud data of each ring point as follows: y ismax、yminThe maximum and minimum vertical coordinates are: lmax、lminWhen the width and height are wp and hp and the suffix is BMP expansion map is generated, the observation point (y ', l') corresponds to the pixel position:

in the formula, wp1 and hp1 indicate the dot-in-image position, and (int) indicates rounding-down.

For a pixel region of a plurality of observation points, the gray value interval of each observation point is [0,255 ]. The calculation formula of the gray value per pixel is as follows:

Figure BDA0002210971260000062

wherein n is the number of dots included in the pixel, giIs the dot gray scale and pg is the pixel gray scale.

And the step b comprises the gray interpolation smoothing treatment of the tiled image, namely, the weighted average of the gray distances of the surrounding multiple pixels is utilized, and a smooth template is adopted to calculate a reasonable gray value. The smooth template is determined according to the reciprocal of the distance between the unknown pixel and the adjacent pixel, and the template specification is 5 rows and 5 columns. The specific smooth template is:

if no point exists in a certain pixel, a weighted average is performed by using adjacent pixels with known gray levels. The middle of the template corresponds to a pixel without gray value, the weight of the gray value corresponding to the pixels at the upper, lower, left and right sides is 1.00, and the gray value of the pixel is obtained by weighted averaging of a 5 multiplied by 5 template.

Two rows of pixels on the ring tiled graph adopt the lower three rows of the template weight matrix; two lines of pixels at the lower ring adopt three lines on a template weight matrix; two columns of pixels on the leftmost side of the ring, and a template is adopted as a right three-column matrix of the weight matrix; and two columns of pixels on the rightmost side of the ring adopt the template as a left three-column matrix of the weight matrix.

C, stretching the gray scale of the tiled image to exclude the interval with less pixel gray scale distribution, and specifically, performing image enhancement processing on each ring to linearly stretch the interval of the gray scale interval [100,250] to [0,255], wherein if the gray scale of the pixel is lower than 100, the gray scale of the pixel is changed to 0; if the pixel gradation is higher than 250, the pixel gradation becomes 255.

The step d comprises the following steps: the areas with gray difference are identified through edge detection, Sobel gradient operator vertical template convolution is adopted to calculate and approximate to obtain image gradient, gradient value of each pixel of the image is shown in figures 2 a-2 d, an Otsu algorithm is adopted to calculate and divide gradient threshold values, parts below the threshold values are marked with black, and parts above the threshold values are marked with white.

The processing steps of the Daluo method are as follows: and traversing the gradient interval range, wherein the maximum gradient of the inter-class variance corresponds to a threshold value. Suppose the segmentation threshold of the background and foreground of the image is T, and the threshold range is [ Tmin,Tmax]And are all taken as integers, the number of background pixels accounts for the ratio of w to the whole image0Average gray scale is recorded as μ0(ii) a The ratio of the number of foreground pixels to the whole image is w1Average gray scale is recorded as μ1. The inter-class variance calculation formula is as follows:

g=w0w101)2

wherein g is the between-class variance. If the maximum between-class variance gmaxThe corresponding threshold value is TthrIs less than a threshold value TthrPositioning as a background part and giving the gray level of the corresponding pixel to be 0; greater than or equal to a threshold value TthrThe corresponding pixel is assigned to the foreground portion with a gray scale of 255. The processed tile is shown in fig. 5.

The step e comprises the following steps: with reference to fig. 3-8, a four-neighborhood or eight-neighborhood labeling algorithm is applied to the connected pixel region, the connected region analysis is calculated by a Two-Pass method, the smallest label in each foreground pixel neighborhood is given during the first scanning, and the neighborhoods contain different labels and are put into the same set; and in the second scanning, the label of each point is updated to the minimum label in the belonged set. And changing the connected domain from the foreground to the background by the aid of the width of the connected domain of the ring binary image being more than 5 pixels and the height of the connected domain being less than 10 pixels or the ellipticity of the connected domain being less than 2.

In order to determine the position and the area range of the connected domain in the image, the following calculation formula is adopted to filter the unit through the width and the height range marked above:

in the formula, mid _ h and mid _ x are expressed as the middle points of the connected domain, max _ height and max _ weight are the width and height sections of the connected domain, max (x) and max (h) are the maximum values of the connected domain units in the x and h directions, and ellip is the ellipticity.

With reference to fig. 9, step f includes: and counting the number of foreground pixels contained in a rectangular area with the width of 3 pixels and the height of the image. And sequentially processing the filtered binary image of each connected domain, wherein the foreground pixels contained in the rectangular region are the most, namely the position of the adjacent seam of the ring is considered. For example, in the embodiment, after each ring of tiles is unfolded, the sizes of the travel direction and the vertical direction are 1.2m and 11.519m, respectively, since the width of the scanning line is much larger than the vertical dot pitch, and the resolution of the travel direction is 0.03m, the travel direction per ring can be 40 pixels, and the approximate vertical direction can be 400 pixels. In the ring expansion diagram, the actual distances corresponding to the traveling direction and the vertical direction of each pixel are different and are respectively 0.030m and 0.029 m. And by cutting the point cloud, the segment pixel width in the corrected tiled image corresponds to the actual length of each ring of segment, the spatial position relation of the scanning lines is redistributed, and the segment pixel width is spliced into a new point cloud.

12页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:动态环境下的视觉SLAM初始化方法、系统、装置

网友询问留言

已有0条留言

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

精彩留言,会给你点赞!