Tunnel shotcrete roughness identification method, terminal equipment and storage medium
Through the modeling device and image recognition technology, the problem of measuring the roughness of the initial injection concrete of the tunnel is solved, and accurate measurement is achieved in harsh environments, reducing equipment costs and improving measurement accuracy, and is suitable for irregular surfaces.
Patent Information
- Application Number
- CN202210421737.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-21
- Publication Date
- 2024-11-19
- Estimated Expiration
- 2042-04-21
AI Technical Summary
The prior art cannot accurately measure the roughness of the initial injection concrete of the tunnel, especially on curved or sloped surfaces, and has low measurement accuracy in harsh environments, making the equipment expensive and inapplicable.
By using the model collector and image recognition technology, the roughness profile image is extracted by obtaining and correcting the model collector pictures, and pre-processing and correction using image processing technology, overcoming the cumbersomeness of traditional methods and the high equipment price problems, realizing the Accurate measurement in harsh environments.
It realizes accurate measurement of surface roughness in curved or slopes, reduces equipment costs, improves measurement accuracy and applicability, and is suitable for tunnel environments and is promoted and applied.
Smart Images

Figure CN114913134B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the field of tunnel shotcrete surface information measurement, in particular to a tunnel shotcrete roughness identification method, terminal equipment and storage medium. Background Art
[0002] For a long time, water leakage has been a major problem in underground engineering. How to prevent tunnel leakage has always been a huge challenge faced by the tunnel and underground engineering community. The waterproof membrane in the traditional waterproof system cannot be closely attached to the primary support. There are many cavities between the two. Groundwater can easily flow freely in the cavity and leak at the damaged points of the waterproof system, which makes it difficult to find the source of the leakage and greatly increases the difficulty and cost of water blocking in the later stage. The sprayed waterproof material can overcome the water leakage problem existing in the traditional waterproof membrane by virtue of its close bonding performance with the primary support and the secondary lining concrete. This not only improves the waterproof ability of the tunnel, but also can accurately locate the source of leakage when water leakage occurs in the tunnel, and treat the leakage from the source, which greatly reduces the difficulty and cost of tunnel maintenance and has extremely high application value.
[0003] The roughness of the initial support shotcrete of the tunnel is a key control indicator of the new sprayed membrane waterproofing system. Excessive roughness of the initial support will not only significantly increase the amount of sprayed membrane waterproofing materials, increase material and construction costs, but also reduce the mechanical properties of the "initial support-sprayed membrane waterproofing layer-secondary lining" composite structure. Therefore, the measurement and evaluation of the roughness parameters of the initial support shotcrete of the tunnel is of great significance for guiding the construction of sprayed membrane waterproofing materials and ensuring the mechanical properties of the "initial support-sprayed membrane waterproofing layer-secondary lining" composite structure.
[0004] The existing methods for measuring the surface roughness of concrete still have many shortcomings. Among them, the sand filling method is the most widely used, but its measurement procedures are cumbersome, and it can only obtain the average depth, which cannot reflect the microscopic characteristics of the roughness, and cannot be used to test the roughness of non-horizontal surface components, so it cannot be used to detect the roughness of the initial support shotcrete in the tunnel; the stylus average depth method is difficult to measure on particularly irregular surfaces such as bends or slopes, and this method relies on high-precision sensors, signal processors and information acquisition systems. It is generally only used for indoor specimens with less roughness, and cannot be used to measure the initial support shotcrete on site in the tunnel; in addition, although three-dimensional laser scanning can measure and analyze the surface roughness of the initial support shotcrete, the measuring instrument is very expensive, and it is extremely difficult to promote its use, and the measurement accuracy will be reduced in the dusty environment of the tunnel. Summary of the invention
[0005] The technical problem to be solved by the present invention is to provide a tunnel shotcrete roughness identification method, terminal equipment and storage medium to address the deficiencies in the prior art. The method can be used to measure particularly irregular surfaces such as bends or slopes, and can accurately extract the initial support roughness in the harsh environment of the tunnel without the aid of specific sensors and signal processors.
[0006] In order to solve the above technical problems, the technical solution adopted by the present invention is: a method for identifying the roughness of tunnel shotcrete, the method comprising:
[0007] S1. Obtaining a picture of the former. The specific implementation process includes: placing the plane of the former perpendicular to the tunnel shotcrete wall, pressing the former so that the former needle of the former shows the outline of the shotcrete; placing the former on a rectangular size plate, obtaining a picture covering the entire rectangular size plate, and obtaining a picture of the former;
[0008] S2, correcting the inclined rectangular size plate in the image of the mold taker to obtain a first corrected image;
[0009] S3, correcting the tilted shaper in the first corrected image to obtain a second corrected image;
[0010] S4. Using the second corrected image, obtain a roughness profile image.
[0011] The present invention obtains a roughness profile image based on a profiler and image recognition, thereby overcoming the shortcomings of the current concrete roughness measurement method, such as complicated procedures, low reliability, high cost of instruments and equipment, and poor applicability to tunnel environments. Due to the use of image processing technology, the present invention method can be used for measurement on particularly irregular surfaces such as bends or slopes, and no specific sensors or signal processors are required, so that the initial support roughness can be accurately extracted in the harsh environment of the tunnel. Compared with the method of measuring roughness using a three-dimensional laser scanner, the present invention method does not require expensive laser scanning equipment, and the measurement accuracy is not affected by the dust environment of the tunnel, has strong anti-interference ability, and is conducive to promotion and application.
[0012] After step S1 and before step S2, the image of the shaper is also preprocessed, including:
[0013] Converting the image of the molder into a grayscale image;
[0014] Binarizing the grayscale image to obtain a binary image;
[0015] A morphological closing operation is performed on the binary image to obtain a preprocessed image.
[0016] In the present invention,
[0017] ① Preprocessing is the bridge between the original image and the core image processing program. Only the preprocessed image can be calculated by the core algorithm;
[0018] ② This preprocessing process can eliminate the small gaps between the mold needles of the mold picker in the image, making the area where the mold needles are located become a whole, avoiding errors in the subsequent roughness parameter extraction.
[0019] Preferably, in order to facilitate the subsequent automated processing of the program and improve the accuracy and success rate of image recognition, in the present invention, the average grayscale value of the surface of the rectangular size plate and the middle limiter of the mold picker in the grayscale image is set to A, and the average grayscale value of the rectangular size plate frame and the mold picker needle in the grayscale image is set to B, then |AB|>M is satisfied; M is the set threshold.
[0020] Theoretically, the larger the value of M is, the higher the accuracy and success rate of image recognition is. However, in order to facilitate the selection of the mold taker and the size plate, in the present invention, M=100 is set.
[0021] The specific implementation process of step S2 includes:
[0022] Extracting edge contours of the preprocessed image;
[0023] Calculate the edge contour area of all images;
[0024] Draw a rectangular-sized plate outline in the blank image according to the maximum-area edge outline;
[0025] Perform Hough straight line fitting on the outline of the rectangular plate to obtain the straight lines l corresponding to the four outlines of the rectangular plate. 1 , l 2 , l 3 , l 4 The radius r and angle parameter θ in polar coordinate form;
[0026] The four straight lines are combined in pairs to form a U set {(l 1 , l 2 )(l 1 , l 3 )(l 1 , l 4 )(l 2 , l 3 )(l 2 , l 4 )(l 3 , l 4 )};
[0027] Determine whether the θ values of the two straight lines in all combinations are the same, delete the combinations with the same θ values in the U set, and form a new set U';
[0028] Calculate each combination (l i , l j ) are the intersection points (x, y): Among them, θ i , r i The straight lines l i Radius parameter and angle parameter in polar coordinates; θ j , r j The straight lines l j Radius and angle parameters in polar coordinates; i = 1, 2, 3, 4;
[0029] Traverse all the obtained intersection coordinates, eliminate the coordinate points whose horizontal coordinate or vertical coordinate exceeds the original image size (the original image is the image of the molder. It can be understood that the horizontal coordinate exceeds the original image size, which means that in the same coordinate system, the horizontal coordinate value is greater than the maximum horizontal coordinate of the molder image, or less than the minimum horizontal coordinate of the molder image. The vertical coordinate exceeds the original image size, which means that in the same coordinate system, the vertical coordinate value is greater than the maximum vertical coordinate of the molder image, or less than the minimum vertical coordinate of the molder image), or the coordinate points with negative horizontal coordinates or vertical coordinates, and finally obtain the four intersection coordinates;
[0030] Sort the coordinates of the four intersection points: Sort the coordinates of the four intersection points in ascending order according to the horizontal coordinate values, and obtain the coordinate points P in turn. 1 (x 1 ,y 1 ),P 2 (x 2 ,y 2 ),P 3 (x 3 ,y 3 ),P 4 (x 4 ,y 4 ), where x 1 ≤x 2 ≤x 3 ≤x 4 ; Compare y 1 and 2 , where the coordinates of the points corresponding to the smaller values are marked as P lu , that is, the upper left point of the dimension plate contour in the rectangular dimension plate contour diagram is obtained, and the coordinates of the point corresponding to the larger value are marked as P lb , which is the lower left point of the dimension plate outline in the rectangular dimension plate outline diagram; similarly, compare y 3 and 4 , and get P ru , which is the upper right point of the dimension plate outline in the rectangular dimension plate outline drawing, and P rb , which is the lower right point of the dimension plate outline in the rectangular dimension plate outline drawing;
[0031] For the sequence [P lu ,P lb ,P ru ,P rb ] to perform perspective transformation, the target sequence is [(0,0), (0,100*w 0 ),(100*l 0 ,0),(100*l 0 ,100*w 0 )], and remove the white noise in the image after perspective transformation to obtain the first corrected image. 0 ,w 0 They are the length and width of the size board, in cm.
[0032] For the same object, the images obtained by taking pictures at different shooting angles are different. If the roughness results obtained by taking pictures at different shooting angles for the same type taker are not corrected, it is obviously not objective enough. The processing of step S2 is to uniformly correct the images at different shooting angles to the absolute front view shooting effect of the size plate, so that the images taken at the tilted angle can still obtain the effect picture equivalent to the front view shooting after the processing of step S2, so that the images taken at different angles can be compared with each other. In this way, the requirements for the photographer to take pictures are greatly lowered, that is, in actual application, it is not necessary to take pictures at an absolute front view, and it can also be taken at a certain tilted angle, making it more convenient and quick to take pictures on site.
[0033] The specific implementation process of step S3 includes:
[0034] Get the minimum bounding rectangle information of the shaper contour, including the coordinates of the center point of the minimum bounding rectangle (x c ,y c ) and the minimum circumscribed rectangle tilt angle;
[0035] Using the center point coordinates (x c ,y c ) and the minimum circumscribed rectangle tilt angle parameter form an affine transformation matrix rot-Mat;
[0036] In combination with the affine transformation matrix rot-Mat, the first corrected image is subjected to a rotation transformation to obtain a preliminary rotated image;
[0037] Then, the minimum bounding rectangle is rotated on the preliminary rotated image by the center coordinates (x c ,y c ) and expand a certain distance to the surroundings to obtain a local area. The coordinates of the four vertices in the local area are (x c –25*l c ,y c –25*w c ), (x c–25*l c ,y c +25*w c ), (x c +25*l c ,y c –25*w c ), (x c +25*l c ,y c +25*w c ), where l c 、w c are the length and width of the mold taker, in cm;
[0038] Canny edge detection and Hough line detection methods are used to extract the inclination angle of the straight edge information of the limiter in the local area;
[0039] Using the center point coordinates (x c ,y c ) and the tilt angle parameter of the stopper to form an affine change matrix rot-Mat';
[0040] Combined with the affine transformation matrix rot-Mat', the preliminary rotated image is rotated twice to obtain a second corrected image. At this time, the black stopper in the mold taker is parallel to the bottom edge of the second corrected image.
[0041] In actual application, the placement position of the mold taker on the size plate is not parallel to the size plate. If the image is not processed, the roughness parameter obtained is inaccurate. The role of step S3 is to straighten the mold taker by rotating a certain angle (the direction of the mold taker is parallel to the edge of the image), which greatly reduces the requirements for placing the mold taker. Since step S3 can realize the direction correction of the mold taker, the mold taker can be placed arbitrarily on the size plate in actual application, and it is not necessary to make the direction of the mold taker parallel to the edge of the size plate, making it more convenient and quicker to use on site.
[0042] The specific implementation process of step S4 includes:
[0043] Obtain information on four vertices of the minimum regular rectangle of the contour of the shaper in the second corrected image, and crop the rectangular area formed by connecting the four vertices;
[0044] Perform secondary cropping on the cropped rectangular area, cropping M pixels on both sides of the long side of the rectangular area;
[0045] For the area after secondary cropping, scan pixel by pixel along the column from top to bottom. When encountering a white pixel, that is, the edge of the contour of the shaper, store the coordinate information of the white pixel in the Contour_Mat matrix, and transfer to the adjacent right column to continue scanning from top to bottom until all columns in the area after secondary cropping are scanned. The Contour_Mat matrix stores the detailed information of the roughness contour. The Contour_Mat matrix is an n×2-dimensional matrix, where n is the length of the area after secondary cropping. The first column in the Contour_Mat matrix is the x-coordinate of each point on the contour curve, and the second column is the y-coordinate of each point on the contour curve.
[0046] Search for the maximum value y_max in the second column of the Contour_Mat matrix, and crop the area with a width of y_max pixels from the top to the bottom in the area after the secondary cropping. The final image obtained by cropping is the roughness contour image.
[0047] The secondary cropping in step S4 ensures that the area where the roughness information is extracted is the area where the mold needle is located, and no statistics are taken for areas outside the mold needle; secondly, the obtained Contour_Mat matrix contains the coordinate position information of the obtained roughness contour curve, realizing the digital quantification of the roughness contour. This matrix can provide a basis for subsequent roughness parameter calculations.
[0048] After step S4, the roughness contour image is also used to obtain the roughness arithmetic mean deviation, and the specific implementation process includes: obtaining the average value y_mean of the second column in the Contour_Mat coordinate information matrix, and y_mean / 10 is the roughness arithmetic mean deviation, in mm.
[0049] After step S4, the roughness profile image is also used to obtain the maximum roughness deviation. The specific implementation process includes: obtaining the maximum value y_max of the second column in the Contour_Mat coordinate information matrix, and y_max / 100 is the maximum roughness deviation, in units of mm.
[0050] As an inventive concept, the present invention also provides a terminal device, which includes a processor and a memory; the memory stores a computer program / instructions; the processor executes the computer program / instructions stored in the memory; the computer program / instructions are configured to implement the steps of the above method.
[0051] As an inventive concept, the present invention also provides a computer-readable storage medium having a computer program / instruction stored thereon; the computer program / instruction implements the steps of the above method when executed by a processor.
[0052] As an inventive concept, the present invention also provides a computer program product, including a computer program / instruction; when the computer program / instruction is executed by a processor, the steps of the above method are implemented.
[0053] Compared with the prior art, the present invention has the following beneficial effects:
[0054] 1) The present invention solves the shortcomings of the current concrete roughness measurement methods, such as complicated procedures, low reliability, high instrument prices, and poor applicability to tunnel environments, by using a method for accurately identifying the roughness of tunnel shotcrete based on a profiler and image recognition technology;
[0055] 2) Compared with the existing sand filling method for measuring roughness, the method of the present invention overcomes the disadvantage that the sand filling method cannot be used for roughness measurement of non-horizontal surface components and irregular components, and can obtain detailed information on the roughness profile instead of the average depth singleness index obtained by the sand filling method;
[0056] 3) Compared with the stylus roughness measurement method, the method of the present invention can be used for measurement on particularly irregular surfaces such as bends or slopes, and can accurately extract the initial roughness in the harsh environment of tunnels without the need for specific sensors and signal processors;
[0057] 4) Compared with the method of measuring roughness by a three-dimensional laser scanner, the method of the present invention does not require expensive laser scanning equipment, and the measurement accuracy is not affected by the dust environment of the tunnel, has strong anti-interference ability, and is conducive to popularization and application;
[0058] 5) The method of the present invention can standardize the construction of primary support shotcrete in the tunnel on site and improve the mechanical properties of the "primary support - sprayed waterproof layer - secondary lining" composite structure. BRIEF DESCRIPTION OF THE DRAWINGS
[0059] Figure 1 is a flow chart of the method steps of the present invention;
[0060] Figure 2(a) to Figure 2(d) The following are process diagrams of taking photos and sampling in step 1) of the embodiment of the present invention. FIG2(a) is a process diagram of the profiler extracting the tunnel contour; FIG2(b) is a photograph of the profiler with the dimension plate; FIG2(c) is a real picture of the profiler; FIG2(d) is a real picture of the rectangular dimension plate;
[0061] Figure 3 This is a graph showing the image preprocessing result in step 2) of an embodiment of the present invention;
[0062] Figure 4 This is a diagram showing the edge detection result in step 3) of the present invention;
[0063] Figure 5 This is a result diagram of the dimension plate contour extraction in step 3) of the present invention;
[0064] Figure 6 This is a graph showing the Hough line detection result in step 3) of the present invention;
[0065] Figure 7 This is a perspective transformation result diagram in step 3) of the present invention;
[0066] Figure 8 This is a diagram showing the noise reduction result in step 3) of the present invention;
[0067] Fig. 9 The minimum circumscribed moment diagram of the contour in step 4) of the present invention;
[0068] Fig.10 This is a diagram showing the result of the preliminary rotation correction process in step 4) of the present invention;
[0069] Fig.11 A local area diagram of the mold taker in step 4) of the present invention;
[0070] Fig.12 This is a diagram showing the secondary correction processing result in step 4) of the present invention;
[0071] Fig.13 This is a diagram showing the secondary cropping result in step 5) of the present invention;
[0072] Fig.14 This is the final roughness profile image obtained by processing in step 5) of the present invention. DETAILED DESCRIPTION
[0073] like Figure 1 As shown, this example provides a method for accurately identifying the roughness of tunnel shotcrete based on a profiler and image recognition technology, which mainly includes the following steps:
[0074] Step 1) Sampling and photographing: When sampling, make the plane of the prototyping device (i.e., profiling ruler, such as CN210452698U) perpendicular to the tunnel shotcrete wall, press the prototyping device so that the prototyping needle (i.e., measuring needle) of the prototyping device is in full contact with the shotcrete, and the contour of the shotcrete can be displayed on both sides of the prototyping device, as shown in FIG2(a); remove the prototyping device, and the prototyping device still maintains its original contour shape, and then place the prototyping device on a rectangular size plate, and use a mobile phone or an electronic camera to take a photo of the prototyping device and the rectangular size plate, and the shooting range of the electronic photo covers the entire rectangular size plate, as shown in FIG2(b).
[0075] In order to facilitate the subsequent automated processing of the program and improve the accuracy and success rate of image recognition, the color of the size plate and the mold picker in the captured image should meet the following requirements: suppose the average grayscale value of the size plate surface and the middle limiter of the mold picker in the grayscale image is A, and the average grayscale value of the size plate frame and the mold picker's mold needle in the grayscale image is B, then the difference between the two grayscales should be greater than 100, that is, |AB|>100. In the embodiment of the present invention, to meet this requirement, the limiter in the middle part of the mold picker used in step 1) of this embodiment is black, and the long side edge of the limiter is straight without bending; the short side end of the limiter in the middle part of the mold picker is wrapped with silver or white metal or other materials; the mold picker's mold needle is white or silver; the mold picker in this embodiment is long l c =15.5cm, width w c =9.5cm. The mold-taking device is shown in Figure 2(c). The specific rectangular size plate in this step is a hard plate that is not easy to bend or deform. Its surface color is matte black with a white frame on the edge. In this embodiment, the black area of the size plate is l 0 =29cm, width is w 0 = 21 cm. A photo of the size plate is shown in Figure 2(d).
[0076] Step 2) Image preprocessing: read the image, binarize it, and perform morphological processing.
[0077] This step specifically includes the following steps:
[0078] (1) Read the image: Use the cv2.imread() function to convert the electronic image into a grayscale image and load it into the image processing program;
[0079] (2) Image binarization: Use the cv2.THRESH_BINARY method in the cv2.threshold() function to binarize the grayscale image;
[0080] (3) Morphological processing: The cv2.morphologyEx() function of the morphological closing operation is used on the binary image to eliminate the noise between the needles in the molder. The processing result is as follows: Figure 3 shown.
[0081] Step 3) Correction of the tilt of the size plate: Use edge detection, size plate contour search, Hough line detection, edge line selection, determination of outer vertices of the size plate, perspective transformation and connected domain filtering processing algorithms in sequence to correct the tilt of the size plate caused by shooting, and calibrate the image size.
[0082] In this step, edge detection uses the Canny edge detection algorithm to generate a binary image of image edge information. The specific implementation process uses the cv2.Canny() function. The processing results are shown in the figure. Figure 4 As shown;
[0083] The dimension plate contour search in this step includes the following three steps:
[0084] (1) Use cv2.findContours() function to extract all edge information contours, and the contours are stored in cv2.RETR_TREE structure;
[0085] (2) Traverse and calculate the area of all contours, and record the index value of the contour with the largest area (the contour of the dimension plate). The contour area is calculated using the cv2.contourArea() function;
[0086] (3) According to the contour index value in the previous step, the cv2.drawContours() function is used to draw the contour of the dimension plate in the blank image to obtain the contour map of the dimension plate. The processing result is as follows Figure 5 shown.
[0087] In this step, the Hough line detection uses the cv2.HoughLines() function to perform straight line fitting on the dimension plate contour in the dimension plate contour map, and obtains the straight lines corresponding to the four contours of the dimension plate (l 1 , l 2 , l 3 , l 4 ) In the form of polar coordinates, the radius r and angle θ parameters, the four straight lines detected by Hough line are as follows Figure 6 As shown;
[0088] Determining the outer vertices of the size plate in this step includes the following five steps:
[0089] (1) Combine the four contour lines in pairs, and get 6 combinations in total, forming the U set {(l 1 , l 2 )(l 1 , l 3 )(l 1 , l 4 )(l 2 , l 3 )(l 2 , l 4 )(l 3 , l 4 )};
[0090] (2) Check whether the θ values of the two straight lines in each combination are the same. If they are the same, it means that the two straight lines in the combination are parallel. Do not calculate their intersection point and delete the combination in the U set to form a new set U'.
[0091] (3) Calculate each combination (l i , l j) is calculated by the following formula:
[0092]
[0093] Where θ i , r i The straight lines l i Radius parameter and angle parameter in polar coordinates; θ j , r j The straight lines l j Radius and angle parameters in polar coordinates.
[0094] (4) Traverse all the obtained straight line intersection coordinates, remove the coordinate points that are not located on the image, and finally obtain the four intersection coordinates (i.e., the coordinates of the four vertices of the size plate).
[0095] (5) Sort the four coordinate points: First, sort the four coordinate points in ascending order according to the horizontal coordinate values, and obtain the coordinate points P in turn. 1 (x 1 ,y 1 ),P 2 (x 2 ,y 2 ),P 3 (x 3 ,y 3 ),P 4 (x 4 ,y 4 ), where x 1 ≤x 2 ≤x 3 ≤x 4 Then compare y 1 and 2 , where the coordinates of the point corresponding to the smaller value are marked as P lu (upper left point in the image), the coordinates of the point with the larger value are marked as P lb (lower left point in the image); also compare y 3 and 4 , and get P ru (upper right point in the image) and P rb (lower right point in the image).
[0096] In this step, perspective transformation refers to using cv2.getPerspectiveTransform(pts1,pts2) and cv2.warpPerspective() functions to correct the oblique view of the size board caused by the shooting angle to the normal view. The pts1 parameter is a sequence of four point coordinates under the original oblique view [P lu ,P lb ,P ru ,Prb ]; where the pts2 parameter is the coordinate position of the corrected point. Since the size plate is 29cm long and 21cm wide, and in reality 1cm corresponds to 100 pixels in the image, pts2 consists of the sequence [(0,0), (0,2100), (2900,0), (2900,2100)]. The perspective transformation result is as follows Figure 7 shown.
[0097] The connected domain filtering algorithm in this step refers to using the skimage.morphology.remove_small_objects() function to remove the white noise in the corrected image. The processing result is as follows: Figure 8 shown.
[0098] Step 4) Correction of the molder tilt: preliminary correction through the minimum circumscribed rectangle of the molder outline and secondary precise correction through the inclination of the local ruler.
[0099] The preliminary correction of the minimum circumscribed rectangle of the profiler in this step includes the following steps:
[0100] (1) Use the cv2.minAreaRect() function to obtain the minimum circumscribed rectangle information of the shape extractor contour, such as Fig. 9 As shown, it includes the coordinates of the center point of the minimum enclosing rectangle (x c ,y c ) and the minimum circumscribed rectangle tilt angle;
[0101] (2) The center point coordinates (x c ,y c ) and the minimum circumscribed rectangle tilt angle parameter are passed into the cv2.getRotationMatrix2D() function to form the affine change matrix rot-Mat;
[0102] (3) Using the cv2.warpAffine() function and the affine transformation matrix rot-Mat, the final image obtained in step 3) is rotated to obtain a preliminary rotated image, thereby completing the preliminary revision of the orientation of the shaper. The result is as follows: Fig.10 shown.
[0103] The second accurate correction by local scale inclination in this step mainly includes the following steps:
[0104] (1) Cutting the local area containing the black stopper: In this embodiment, the molder is 15.5 cm long and 9.5 cm wide. The center coordinate (x c ,y c ) and expand a certain distance to the surroundings to obtain a local area. The coordinates of the four vertices in the local area are (x c–25*l c ,y c –25*w c ), (x c –25*l c ,y c +25*w c ), (x c +25*l c ,y c –25*w c ), (x c +25*l c ,y c +25*w c ), local area image such as Fig.10 As shown;
[0105] (2) The Canny edge detection and Hough line detection algorithms are used to extract the inclination angle of the straight edge information of the stopper in the cropping area;
[0106] (3) The center point coordinates (x c ,y c ) and the limiter tilt angle parameter are passed into the cv2.getRotationMatrix2D() function to form the affine change matrix rot-Mat';
[0107] (3) Using the cv2.warpAffine() function, combined with the affine transformation matrix rot-Mat', the preliminary rotated image is rotated twice to complete the secondary revision of the orientation of the shaper, and obtain a secondary rotation correction image. At this time, the black stopper in the shaper in the image is parallel to the bottom edge of the image. The secondary accurate correction result is as follows: Fig.12 shown.
[0108] Step 5) extracting roughness profile detailed information, profile image and roughness parameters.
[0109] The extraction of detailed information of roughness profile in this step mainly includes the following steps:
[0110] (1) Use the cv2.boundingRect() function to obtain the four vertex information of the minimum rectangular shape of the shaper in the secondary rotation correction image, and crop the area;
[0111] (2) In order to eliminate the influence of the short edge of the shaper on the roughness information extraction process, the above-mentioned cropped area is cropped again. The specific method is to crop 100 pixels on both sides of the long side of the image. The secondary cropping result is as follows: Fig.13 As shown;
[0112] (3) Scan pixel by pixel from top to bottom along the column starting from the left side of the cropped image. When a white pixel point (edge of the contour of the molder) is encountered, the coordinate information of the point is immediately stored in the Contour_Mat matrix and transferred to the adjacent right column to continue scanning from top to bottom until all columns in the image are scanned. The Contour_Mat matrix stores the detailed information of the roughness contour and is an n×2-dimensional matrix, where n is the length of the image after secondary cropping (the number of columns contained in the image). The first column in the Contour_Mat matrix is the x-coordinate of each point on the contour curve, and the second column is the y-coordinate of each point on the contour curve; the Contour_Mat matrix obtained in this embodiment is as follows (because the data in the embodiment is too large, there are 1351 rows of data, so some of the data are represented by ellipsis):
[0113] [(0,35),(1,36),(2,37),(3,39),(4,47),(5,80),(6,81),(7,82),(8,84),(9,84),(10,86),(11,87),(12,88),(13,88),(14,90),(15,90),(16,90),(17,90),(18,90),(19,92),(20,92),(21,92),(22,93),(23,95),(24,97),(25,99),(26,100),(27,101),(28,102),(29,103),(30,190),(31,192),(32,192),(33,193),(34,195),(35,196),(36,197),(37,198),(38,199),(39,200),(40,200),(41,200),(42,200),(43,201),(44,201),(45,200),(46,200),(47,200),(48,200),(49,200),(50,200),(51,199),(52,199),(53,198),(54,198),(55,198),(56,197),(57,196),(58,196),(59,194),(60,194),……,(1248,182),(1249,181),(1250,181),(1251,180),(1252,180),(1253,178),(1254,178),(1255,178),(1256,178),(1257,178),(1258,178),(1259,178),(1260,178),(1261,178),(1262,178),(1263,178),(1264,178),(1265,177),(1266,178),(1267,178),(1268,177),(1269,178),(1270,177),(1271,177),(1272,177),(1273,177),(1274,177),(1275,177),(1276,177),(1277,177),(1278,177),(1279,177),(1280,177),(1281,177),(1282,177),(1283,176),(1284,176),(1285,176),(1286,177),(1287,176),(1288,176),(1289,176),(1290,176),(1291,176),(1292,177),(1293,176),(1294,176),(1295,175),(1296,176),(1297,176),(1298,176),(1299,176),(1300,176),(1301,176),(1302,177),(1303,177),(1304,176),(1305,176),(1306,177), (1307,177),(1308,177),(1309,177),(1310,177),(1311,177),(1312,176),(1313,176),(1314,175),(1315,174),(1316,173),(1317,172),(1318,171),(1319,171),(1320,170),(1321,168), (1322,164),(1323,155),(1324,154),(1325,153),(1326,152),(1327,152),(1328,150),(1329,150),(1330,149),(1331,148),(1332,139),(1333,136),(1334,134),(1335,133),(1336,132), (1337,132),(1338,131),(1339,132),(1340,131),(1341,131),(1342,131),(1343,131),(1344,131),(1345,130),(1346,131),(1347,130),(1348,130),(1349,132),(1350,132),(1351,131)]. ,
[0114] The roughness contour image extraction in this step mainly includes the following steps: searching for the maximum value y_max of the second column (i.e., the y coordinates of each contour edge point) in the Contour_Mat matrix, cropping the area with a width of y_max pixels from the top to the bottom of the secondary cropped image, and the final image obtained by cropping is the roughness contour image, such as Fig.14 shown.
[0115] The calculation method of the arithmetic mean deviation of roughness in this step is as follows:
[0116] The average value y_mean of the second column (the y coordinate information column corresponding to the contour edge point) in the Contour_Mat coordinate information matrix is obtained. In this embodiment, y_mean is 97.1, and y_mean / 10 is the arithmetic mean deviation of the roughness, in mm, that is, the average deviation of the roughness in this embodiment is 9.71 mm.
[0117] The calculation method of the maximum roughness deviation in this step is as follows:
[0118] Obtain the maximum value y_max of the second column (the y coordinate information column corresponding to the contour edge point) in the Contour_Mat coordinate information matrix, then y_max / 10 is the maximum deviation of the roughness, in mm. In this embodiment, y_max is 201, and since the precision of a pixel point is 0.1 mm, the maximum roughness of this embodiment is 20.1 mm.
[0119] It can be seen that after this step of processing, the quantification of the contour curve is realized, and the contour curve can be reconstructed on other software through the Contour_Mat matrix data. And the above-mentioned quantitative information contains a large amount of contour line data, which facilitates the subsequent statistical analysis of the initial branch contour of the tunnel and the storage of contour information. Since 1cm corresponds to 100 pixels on the image, that is, 1 pixel corresponds to 0.1mm, the recognition accuracy of this example can reach 0.1mm. Therefore, in terms of ease of operation, low price and recognition accuracy, the method of the present invention maintains great advantages over other methods and has extremely high field application value.
[0120] According to an embodiment of the present invention, the present invention also provides a terminal device, a computer-readable medium and a computer program product.
[0121] The terminal device of an embodiment of the present invention includes: a processor; a storage device (memory) for storing one or more programs / instructions, when the one or more programs are executed by the one or more processors, the one or more processors implement the aforementioned method.
[0122] In specific use, users can interact with servers, which are also electronic devices, through electronic devices as terminal devices and based on the network to achieve functions such as receiving or sending messages. Terminal devices are generally various electronic devices equipped with display devices and used based on human-computer interfaces, including but not limited to smart phones, tablet computers, laptops and desktop computers, etc. Various specific application software can be installed on the terminal devices as needed, including but not limited to web browser software, instant messaging software, social platform software, shopping software, etc.
[0123] The server is a network service end used to provide various services, such as a background server that provides corresponding computing services for crack images received from terminal devices, so as to realize automatic crack recognition of received crack images and return the final recognition results to the terminal device.
[0124] The crack image automatic recognition method provided in this embodiment is generally executed by a server. In actual application, under necessary conditions, the terminal device can also directly execute the crack image automatic recognition.
[0125] Similarly, the computer-readable medium of the present invention stores a computer program / instruction thereon, and when the program is executed by a processor, a method for accurately identifying the roughness of tunnel shotcrete based on a shape picker and image recognition technology according to an embodiment of the present invention is implemented.
[0126] The computer program product of the present invention includes a computer program / instruction, and when the program is executed by a processor, a method for accurately identifying the roughness of tunnel shotcrete based on a shape picker and image recognition technology according to an embodiment of the present invention is implemented.
Claims
1. A method for identifying the roughness of tunnel shotcrete, characterized in that: The method includes: S1. Obtaining a picture of the former. The specific implementation process includes: placing the plane of the former perpendicular to the tunnel shotcrete wall, pressing the former so that the former needle of the former shows the outline of the shotcrete; placing the former on a rectangular size plate, obtaining a picture covering the entire rectangular size plate, and obtaining a picture of the former; S2, correcting the inclined rectangular size plate in the image of the mold taker to obtain a first corrected image; S3, correcting the tilted shaper in the first corrected image to obtain a second corrected image; S4, using the second corrected image to obtain a roughness profile image; The specific implementation process of step S4 includes: Obtain information on four vertices of the minimum regular rectangle of the contour of the shaper in the second corrected image, and crop the rectangular area formed by connecting the four vertices; Perform secondary cropping on the cropped rectangular area, cropping M pixels on both sides of the long side of the rectangular area; For the area after secondary cropping, scan pixel by pixel along the column from top to bottom. When encountering a white pixel, that is, the edge of the contour of the shaper, store the coordinate information of the white pixel in the Contour_Mat matrix, and transfer to the adjacent right column to continue scanning from top to bottom until all columns in the area after secondary cropping are scanned. The Contour_Mat matrix stores the detailed information of the roughness contour. The Contour_Mat matrix is an n×2-dimensional matrix, where n is the length of the area after secondary cropping. The first column in the Contour_Mat matrix is the x-coordinate of each point on the contour curve, and the second column is the y-coordinate of each point on the contour curve. Search for the maximum value y_max in the second column of the Contour_Mat matrix, and crop the area with a width of y_max pixels from the top to the bottom in the area after the secondary cropping. The final image obtained by cropping is the roughness contour image.
2. The method for identifying roughness of tunnel shotcrete according to claim 1, characterized in that: After step S1 and before step S2, the image of the shaper is also preprocessed, including: Converting the image of the molder into a grayscale image; Binarizing the grayscale image to obtain a binary image; Applying morphological closing operation to the binary image to obtain a preprocessed image; Assuming that the average grayscale value of the rectangular size plate surface and the middle limiter of the mold picker in the grayscale image is A, and the average grayscale value of the rectangular size plate frame and the mold picker needle in the grayscale image is B, then |AB|>M is satisfied; M is the set threshold.
3. The method for identifying roughness of tunnel shotcrete according to claim 2, characterized in that: M=100。 4. The method for identifying roughness of tunnel shotcrete according to claim 2, characterized in that: The specific implementation process of step S2 includes: Extracting all edge contours of the preprocessed image; Traverse and calculate the area of each edge contour in the image, and select the edge contour with the largest area. This contour is the rectangular size plate contour; Draw a rectangular-sized plate outline in the blank image according to the maximum-area edge outline; Perform Hough straight line fitting on the drawn rectangular plate contour to obtain the straight lines corresponding to the four contours of the rectangular plate. l 1. l 2 、l 3 、l 4 Radius in polar coordinate form r and angle parameters θ ; Combine the four straight lines obtained in pairs to form a U set {( l 1, l 2) ( l 1, l 3) ( l 1, l 4) ( l 2, l 3) ( l 2, l 4)( l 3. l 4)}; Determine the two straight lines in all combinations θ If the values are the same, delete them from the U set. θ The combinations with the same value form a new set U'; Calculate each combination in U'( l i , l j )The coordinates of the intersection of the straight lines ( x , y ): ;in, θ i , r i Straight lines l i Radius parameters and angle parameters in polar coordinates; θ j , r j Straight lines l j Radius parameters and angle parameters in polar coordinates; i=1,2,3,4; Traverse all the obtained intersection coordinates, remove the coordinate points whose horizontal coordinate or vertical coordinate exceeds the image size of the image extractor, or whose horizontal coordinate or vertical coordinate is negative, and obtain the coordinates of four intersection points; Sort the coordinates of the four intersection points: Sort the coordinates of the four intersection points in ascending order according to the horizontal coordinate values, and obtain the coordinate points P1 ( x 1, y 1), P2 ( x 2, y 2), P3 ( x 3. y 3), P4 ( x 4. y 4), where x 1≤ x 2≤ x 3≤ x 4. Contrast y 1 and y 2, where the coordinates of the point corresponding to the smaller value are marked as P lu , that is, the upper left point of the dimension plate contour in the rectangular dimension plate contour diagram is obtained, and the coordinates of the point corresponding to the larger value are marked as P lb , which is the lower left point of the dimension plate outline in the rectangular dimension plate outline diagram; similarly, compare y 3 and y 4. Get P ru , which is the upper right point of the dimension plate outline in the rectangular dimension plate outline drawing, and P rb , which is the lower right point of the dimension plate outline in the rectangular dimension plate outline drawing; For the sequence [P lu , P lb , P ru , P rb ] to perform perspective transformation. The target sequence of perspective transformation is [(0, 0), (0, 100 * w 0), (100* l 0, 0), (100* l 0, 100 *w 0)], after the perspective transformation is completed, the white noise in the perspective transformed image is removed to obtain the first corrected image; l 0, w 0 are the length and width of the size board outline, in cm.
5. The method for identifying roughness of tunnel shotcrete according to claim 1, characterized in that: The specific implementation process of step S3 includes: Get the minimum bounding rectangle information of the shaper contour, including the coordinates of the center point of the minimum bounding rectangle ( x c , y c ) and the minimum circumscribed rectangle tilt angle; Using the center point coordinates ( x c , y c ) and the minimum circumscribed rectangle tilt angle parameter form the affine change matrix rot-Mat; In combination with the affine transformation matrix rot-Mat, the first corrected image is subjected to a rotation transformation to obtain a preliminary rotated image; The minimum circumscribed rectangle rotation center coordinates ( x c , y c ) and expand a certain distance to the surroundings to obtain a local area. The coordinates of the four vertices in the local area are ( x c –25* l c , y c – 25* w c ), x c – 25* l c , y c + 25* w c ), x c + 25* l c , y c – 25* w c ), x c + 25* l c , y c + 25* w c );in, l c , w c are the length and width of the mold taker, in cm; Canny edge detection and Hough line detection methods are used to extract the inclination angle of the straight edge information of the limiter in the local area; Using the center point coordinates ( x c , y c ) and the tilt angle parameter of the stopper to form the affine change matrix rot-Mat'; Combined with the affine transformation matrix rot-Mat', the preliminary rotated image is rotated twice to obtain a second corrected image. At this time, the black stopper in the mold taker is parallel to the bottom edge of the second corrected image.
6. The method for identifying roughness of tunnel shotcrete according to claim 1, characterized in that: After step S4, the roughness arithmetic mean deviation is obtained by using the roughness profile image. The specific implementation process includes: Get the average value y_mean of the second column in the Contour_Mat coordinate information matrix, then y_mean / 10 is the arithmetic mean deviation of the roughness, in mm.
7. The method for identifying roughness of tunnel shotcrete according to claim 1, characterized in that: After step S4, the roughness profile image is also used to obtain the maximum roughness deviation. The specific implementation process includes: obtaining the maximum value y_max of the second column in the Contour_Mat coordinate information matrix, and y_max / 10 is the maximum roughness deviation, in units of mm.
8. A terminal device, characterized in that: The invention comprises a processor and a memory; the memory stores a computer program / instruction; the processor executes the computer program / instruction stored in the memory; the computer program / instruction is configured to implement the steps of the method according to any one of claims 1 to 7.
9. A computer-readable storage medium having a computer program / instruction stored thereon; characterized in that: When the computer program / instructions are executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer program product comprising a computer program / instructions; characterized in that When the computer program / instructions are executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Self-locking profiling ruler
CN210452698U
Device for inspecting shape of road travel surface
US20160060824A1
Method for measuring surface roughness of precast composite concrete slab
WO2021218114A1
