Positioning method for paving prefabricated blocks for channel slope protection
Through the neural network algorithm combined with object detection, point cloud center computing and dung beetle algorithm optimization, the problems of large prediction errors and difficulty in identification in channel prefabricated block paving are solved, and high-precision positioning and automated paving of prefabricated blocks are realized.
Patent Information
- Application Number
- CN202410290102.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-14
- Publication Date
- 2025-04-29
- Estimated Expiration
- 2044-03-14
AI Technical Summary
The existing prefabricated block paving technology lacks digital analysis and prediction methods, resulting in large errors in paving position prediction and low efficiency, and paving equipment has difficulties in prefabricated block identification and position prediction.
The neural network algorithm optimized by object detection, point cloud center computing and dung beetle algorithm is used to identify prefabricated blocks through image acquisition and point cloud processing, calculate their center coordinates, and use the dung beetle algorithm to optimize the neural network algorithm to calculate paving coordinates to achieve accurate positioning of prefabricated blocks.
It improves the prediction accuracy and efficiency of prefabricated block paving points, can effectively identify and locate prefabricated blocks, meets the needs of paving for high-precision calculations, and improves the automation level of paving work.
Smart Images

Figure CN118691669B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to a channel slope protection prefabricated block paving positioning method, belonging to the technical field of prefabricated block paving construction equipment design in channel construction. Background Art
[0002] Channel precast blocks are used to protect channels in water conservancy projects and reduce the erosion of channels by wind and waves. Precast blocks are mainly made of concrete, and the precast blocks are interlocked with each other, making it difficult to lay them. In addition, the cushion layer for paving precast blocks is soft and prone to deformation, so it is impossible to lay precast blocks with uniform spacing. During paving, the paving position of the precast blocks needs to be adjusted in real time according to the actual situation.
[0003] At present, the paving method of precast blocks is basically at the stage of manual paving, and there is a lack of digital analysis and prediction methods for the paving positions of precast blocks. On the one hand, the traditional paving method predicts the paving points of precast blocks based on experience, which has large errors and low efficiency; on the other hand, the paving equipment on the hard base has problems in precast block identification and precast block paving position prediction. Summary of the invention
[0004] The technical purpose of the present invention is to provide a channel slope protection prefabricated block paving positioning method, which applies target detection, point cloud center calculation, dung beetle algorithm optimized neural network algorithm and other technical means to improve the accuracy and effectiveness of the prediction of the prefabricated block paving point. The present invention aims to solve the problems existing in the paving of prefabricated blocks using paving bricks, such as the inability to effectively identify prefabricated blocks and accurately predict the paving position of prefabricated blocks.
[0005] In order to achieve the above technical objectives, the present invention will adopt the following technical solutions:
[0006] A channel slope protection prefabricated block paving positioning method comprises the following steps:
[0007] Step S1, image acquisition target paving area:
[0008] By using an image acquisition device, a color image and a point cloud image are simultaneously acquired for a target paving area, wherein the target paving area is an area including a target prefabricated block;
[0009] Step S2: Identify the color image of the target prefabricated block and map it onto the point cloud image:
[0010] Perform target detection on the collected color image of the target paving area based on the target detection algorithm of YOLOV5, so as to mark and divide the target prefabricated blocks on the color image, and map the color image of the target prefabricated blocks to the point cloud image of the target paving area collected in step S1;
[0011] Step S3, calculate the center coordinates of the target prefabricated block:
[0012] The point cloud center algorithm based on the PCL point cloud algorithm calculates the center coordinates of the target prefabricated block on the point cloud image obtained in step S2;
[0013] Step S4: Obtaining a data set for the target positioning algorithm:
[0014] Taking the center coordinates of the target prefabricated block obtained in step S3 as a reference, a numerical model of the target prefabricated block is established according to the shape of the target prefabricated block, and a simulated paving test is performed to obtain the initial coordinates (x, y) of all points constituting the convex blocks on the target prefabricated block and the groove line model as a data set for the target positioning algorithm in step S5;
[0015] Step S5: Calculate the paving coordinates of the target prefabricated block:
[0016] Taking into account the actual paving requirements of the prefabricated blocks, a target positioning algorithm based on a neural network algorithm optimized by a dung beetle algorithm is used to calculate the paving coordinates (rmx, rmy) of the target prefabricated blocks after inputting the data set obtained in step S4, so as to guide the paving of the target prefabricated blocks;
[0017] The paving coordinates (rmx, rmy) are the coordinates obtained by shifting the initial coordinates (x, y) by dx in the x direction, dy in the y direction, and rotating by an angle of α:
[0018]
[0019] The displacement dx in the x direction, the displacement dy in the y direction, and the angle α satisfy the following equation:
[0020]
[0021] Where: Represents the i-th point p on the convex point model i The minimum distance from the bump point model to the groove line model, i is 1≤i≤n; d represents the minimum distance from the bump point model to the groove line model;
[0022] The set of convex point models is M = {M1, M2, ..., M i ,...,M m}, where the i-th element point is denoted as M i (x i ,y i ), m is a positive integer, representing the total number of element points included in the convex point model;
[0023] The groove line model consists of line segment M l and arc M c composition;
[0024] The set of arcs in the groove line model is p is a positive integer, which indicates the total number of elements included in the arc in the groove line model, where the kth element M ck The center coordinates are (x ck ,y ck ), the radius is r ck The arc of
[0025] The set of line segments in the groove line model is n is a positive integer, which represents the total number of elements included in the line segment of the groove line model, where the jth element M lj Indicates that the starting coordinate is (x lj1 ,y lj1 ), the ending coordinate is (x lj2 ,y lj2 ) of the straight line segment;
[0026] d l It refers to the distance between the bump point model and the line segment in the groove line model after the bump point model is displaced dx along the x direction, displaced dy along the y direction and rotated by an angle α, d l ={d l11 ,d l22 ,...,d lij ,...,d lmn}; where element d lij Represents the element point M i With straight line segment M lj distance;
[0027] d c It refers to the distance between the bump point model and the arc in the groove line model after the bump point model is displaced dx along the x direction, displaced dy along the y direction and rotated by an angle α. c ={d c11 ,d c22 ,...,d cik ,...,d cmp}; where element d cik Represents the element point M i With arc M ck distance;
[0028] Element point M i With straight line segment M lj The distance d lij Calculated by the following formula:
[0029]
[0030] In the formula,
[0031] Element point M i With arc M ck The distance dcik Calculated by the following formula:
[0032]
[0033] As a further improvement of the present invention, in step S1, the specific steps of image acquisition of the target paving area include:
[0034] Step S1.1, using a structured light camera, simultaneously collecting a color image and a point cloud image of the target area, and calculating a mapping relationship between the color image and the point cloud image through a correspondence relationship between points and straight lines;
[0035] Step S1.2: Use filtering, binarization, opening operation and closing operation algorithms to process the color image of the target area obtained in step S1.1, so as to reduce the interference of background and light on the obtained color image.
[0036] As a further improvement of the present invention, in step S3, the specific steps of calculating the center coordinates of the target prefabricated block based on the point cloud center algorithm of the PCL point cloud algorithm include:
[0037] Step S3.1, extracting the plane point cloud image of the target prefabricated block:
[0038] Use the Pass Through algorithm and the Ransac algorithm to remove all points outside the set value segment in the z direction of the original point cloud image; then randomly select three points in the filtered depth map to form a reference plane, calculate the distance from other points to the reference plane, and if it is less than the set threshold, it is considered to belong to the same plane; repeat this process until all points that meet the requirements are obtained, and then the plane point cloud image can be extracted;
[0039] Step S3.2, extracting the boundary of the plane point cloud image of the target prefabricated block:
[0040] Use the Boundary Estimation algorithm to extract the boundary of the plane point cloud image obtained in step S3.1: first perform local sampling on the plane point cloud image to obtain a local plane, then fit the local plane using the least squares method, and project it onto the micro-cut plane, and identify the boundary features of the scattered point cloud based on the maximum angle between the sampling point and the projection point corresponding to its neighbors;
[0041] Step S3.3, calculate the center coordinates of the target prefabricated block:
[0042] According to the boundary of the plane point cloud image of the target prefabricated block extracted in step 3.2, the position of the center of the target prefabricated block in the plane point cloud image is calculated, and the center coordinates of the target prefabricated block can be obtained.
[0043] As a further improvement of the present invention, the numerical model of the target prefabricated block constructed in step S4 includes two protrusions and two grooves; the two protrusions are completely consistent in shape and size, and the two grooves are completely consistent in shape and size.
[0044] As a further improvement of the present invention, in step S5, the actual paving requirements of the prefabricated blocks that need to be considered are:
[0045] A. The convex block of the prefabricated block can fit with the concave groove of the adjacent prefabricated block to form a convex block-concave embedded structure; and in the convex block-concave embedded structure, the prefabricated block is preferably installed with the maximum spacing between the convex block and the concave groove;
[0046] B. The spacing between the protrusions and grooves between the prefabricated blocks is jointly affected by the relative displacement and relative angle between the prefabricated blocks: for any two adjacent prefabricated blocks, when the relative rotation angle is α, the displacement dx of one of the prefabricated blocks along the x direction and the displacement dy along the y direction are consistent with the spacing between the two adjacent prefabricated blocks.
[0047] As a further improvement of the present invention, the first prefabricated block, the second prefabricated block and the third prefabricated block which have been paved are used to perform the training of the neural network algorithm based on the optimization of the dung beetle algorithm described in step S5:
[0048] Wherein: the first prefabricated block is located above the second prefabricated block, and the protrusion on the upper bottom edge of the second prefabricated block is embedded in the groove on the lower bottom edge of the first prefabricated block, the relative angle between the second prefabricated block and the first prefabricated block is α2, the relative displacement in the x direction is x2, and the relative displacement in the y direction is y2; the third prefabricated block is located on the right side of the second prefabricated block, and the protrusion on the left side of the third prefabricated block is embedded in the groove on the right side of the second prefabricated block, the relative angle between the third prefabricated block and the second prefabricated block is α3, the relative displacement in the x direction is x3, and the relative displacement in the y direction is y3;
[0049] The relative angle between the third prefabricated block and the second prefabricated block is α3, the relative displacement in the x direction is x3, and the relative displacement in the y direction is y3 as the input layer neuron parameters of the neural network algorithm optimized based on the dung beetle algorithm, and the relative angle between the second prefabricated block and the first prefabricated block is α2, the relative displacement in the x direction is x2, and the relative displacement in the y direction is y2 as the output layer neuron parameters.
[0050] As a further improvement of the present invention, the implementation process of the YOLOV5-based target detection algorithm described in step S2 is: first, the backbone feature extraction network is used to convert the input color image into a feature set; then the enhanced feature extraction network is used to detect the extracted features; finally, the target detection classifier is used to filter and eliminate redundant prediction boxes according to the probability value, and finally the prediction category with the highest confidence and the position coordinates of the bounding box are output.
[0051] Based on the boundary conditions of the precast block, the precast block line model can be constructed:
[0052]
[0053] Where: (x1, y1), (x2, y2), (x3, y3), (x4, y3), (-x1, y1), (-x2, y2), (-x3, y3), (-x4, y3) correspond to the coordinates of the endpoints of each line segment of the prefabricated block line model; (x5, y5), (-x5, y5) are the center coordinates of the two arcs in the prefabricated block line model, and the radius of the two arcs corresponds to r c1 ,r c2 .
[0054] Based on the above technical objectives, the present invention has the following advantages over the prior art:
[0055] (1) The target recognition algorithm of YOLOV5 can accurately identify the area range of the target prefabricated block in the image, which is of great significance to improving the efficiency of paving work.
[0056] (2) Combining the point cloud processing algorithm with the target detection algorithm provides an effective solution for the precast block paving machinery to identify and locate the precast blocks. The coordinate calculation effect of the precast blocks is good and high in accuracy, meeting the paving requirements.
[0057] (3) By collecting data on site and establishing a numerical model, a numerical simulation test is first conducted. After obtaining the test data, the dung beetle algorithm is used to input the relative displacement and rotation angle between the prefabricated blocks and then output the paving coordinates of the prefabricated blocks. This meets the needs of prefabricated block paving for high-precision calculation of paving points.
[0058] The present invention provides a channel slope protection prefabricated block paving positioning method. Compared with the traditional manual paving method, the method combines target detection and point cloud center calculation, and can use digital processing to locate prefabricated blocks. At the same time, the neural network algorithm optimized by the dung beetle algorithm can accurately predict the paving coordinates of the prefabricated blocks.
[0059] In summary, the method provided by the present invention has broad application prospects and use value in the field of prefabricated block paving, and can provide more efficient and reliable technical value for the automated paving of prefabricated blocks. BRIEF DESCRIPTION OF THE DRAWINGS
[0060] Figure 1 It is a flow chart of the channel slope protection prefabricated block paving positioning method according to the present invention;
[0061] Figure 2 A schematic diagram of the paving position of a paving unit composed of any three prefabricated blocks;
[0062] Figure 2 In Chinese: ① represents the first prefabricated block; ② represents the second prefabricated block; ③ represents the third prefabricated block;
[0063] Figure 3 It is an effect diagram of the recognition and regional division of the central part of the prefabricated block in the color image by the target recognition algorithm based on YOLOV5 in the channel slope protection prefabricated block paving positioning method of the present invention;
[0064] Figure 4 It is a calculation effect diagram of the center coordinates of the prefabricated blocks calculated by the point cloud center algorithm in the channel slope protection prefabricated block paving positioning method described in the present invention;
[0065] Figure 5 is a schematic diagram of a groove line model constructed by paving a target prefabricated block according to the present invention;
[0066] Figure 6 This is a simulation result diagram of using genetic algorithm to optimize BP neural network (GA-BP) and dung beetle algorithm to optimize neural network (DBO-BP) to select 100 groups of data from the data set for simulation. DETAILED DESCRIPTION
[0067] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments. The following description of at least one exemplary embodiment is actually only illustrative and is by no means any limitation to the present invention and its application or use. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention. Unless otherwise specified, the relative arrangement, expressions and numerical values of the components and steps described in these embodiments do not limit the scope of the present invention. The techniques, methods and equipment known to ordinary technicians in the relevant fields may not be discussed in detail, but in appropriate cases, the techniques, methods and equipment should be regarded as part of the specification. In all examples shown and discussed here, any specific value should be interpreted as merely exemplary, rather than as a limitation. Therefore, other examples of the exemplary embodiments may have different values.
[0068] For ease of description, spatially relative terms such as "above", "above", "on the upper surface of", "above", etc. may be used here to describe the spatial positional relationship between a device or feature and other devices or features as shown in the figure. It should be understood that spatially relative terms are intended to include different orientations of the device in use or operation in addition to the orientation described in the figure. For example, if the device in the accompanying drawings is inverted, the device described as "above other devices or structures" or "above other devices or structures" will be positioned as "below other devices or structures" or "below other devices or structures". Thus, the exemplary term "above" can include both "above" and "below". The device can also be positioned in other different ways (rotated 90 degrees or in other orientations).
[0069] like Figures 1 to 5 As shown, the present invention provides a channel slope protection prefabricated block paving positioning method, which is constructed based on image recognition, point cloud center calculation, dung beetle algorithm optimized neural network algorithm and other technologies. The flowchart of the channel slope protection prefabricated block paving positioning method is as follows Figure 1 As shown, the following steps are included:
[0070] Step S1, image acquisition target paving area:
[0071] Through the image acquisition device, the color image and point cloud image of the target paving area are collected at the same time. The target paving area is the area containing the target prefabricated block; and image preprocessing, filtering, denoising and other work are performed as the premise of the subsequent algorithm operation. Specifically, it includes the following steps:
[0072] Step S1.1, using a structured light camera, simultaneously collects a color image and a point cloud image of the target prefabricated block, and calculates a mapping relationship between the color image and the point cloud image through the correspondence between points and straight lines.
[0073] Step S1.2: Use filtering, binarization, opening operation, closing operation and other algorithms to process the image to reduce the interference of background and light on the image, and improve the efficiency and accuracy of subsequent recognition and calculation.
[0074] Step S2: Identify the color image of the target prefabricated block and map it onto the point cloud image:
[0075] The target detection algorithm based on YOLOV5 is used to perform target detection on the collected color image of the target paving area, so as to mark and divide the target prefabricated blocks on the color image, and map the color image of the target prefabricated blocks to the point cloud image of the target paving area collected in step S1; specifically, the following steps are included:
[0076] The implementation process of the target detection algorithm based on YOLOV5 is as follows: it is divided into the backbone feature extraction network, the enhanced feature extraction network, and the target detection classifier. The backbone network is mainly composed of three modules: Conv, C3, and SPPF, which convert the input image into a feature set. The input image data size is , and after image preprocessing, the number of image channels is reduced and the image size is , which can improve the running speed of the model. The enhanced feature extraction network adopts the FPN+PAN structure, and detects the target at three scales of 80×80, 40×40, and 20×20. After NMS is used to filter and eliminate redundant prediction boxes according to the probability value, the prediction category with the highest confidence and the position coordinates of the bounding box are finally output.
[0077] Step S3, calculate the center coordinates of the target prefabricated block:
[0078] The point cloud center algorithm based on the PCL point cloud algorithm calculates the center coordinates of the target prefabricated block on the point cloud image obtained in step S2. Specifically, it includes the following steps:
[0079] Step S3.1, extracting the plane point cloud image of the target prefabricated block:
[0080] Use the Pass Through algorithm and the Ransac algorithm to remove all points outside the set value segment in the z direction of the original point cloud image; then randomly select three points in the filtered depth map to form a reference plane, calculate the distance from other points to the reference plane, and if it is less than the set threshold, it is considered to belong to the same plane; repeat this process until all points that meet the requirements are obtained, and then the plane point cloud image can be extracted;
[0081] Step S3.2, extracting the boundary of the plane point cloud image of the target prefabricated block:
[0082] Use the Boundary Estimation algorithm to extract the boundary of the plane point cloud image obtained in step S3.1: first perform local sampling on the plane point cloud image to obtain a local plane, then fit the local plane using the least squares method, and project it onto the micro-cut plane, and identify the boundary features of the scattered point cloud based on the maximum angle between the sampling point and the projection point corresponding to its neighbors;
[0083] Step S3.3, calculate the center coordinates of the target prefabricated block:
[0084] According to the boundary of the plane point cloud image of the target prefabricated block extracted in step 3.2, the position of the center of the target prefabricated block in the plane point cloud image is calculated, and the center coordinates of the target prefabricated block can be obtained.
[0085] Step S4: Obtaining a data set for the target positioning algorithm:
[0086] Taking the center coordinates of the target precast block obtained in step S3 as a reference, a numerical model of the target precast block is established according to the shape of the target precast block, and a simulated paving test is carried out to obtain the initial coordinates (x, y) of all points constituting the convex blocks on the target precast block and the groove line model as the data set for the target positioning algorithm in step S5.
[0087] In the present invention, the above data is selected as the basis of the data set of the target positioning algorithm because:
[0088] 1. For the numerical model of the target prefabricated block constructed in step S4, among the two protrusions and two grooves included therein, the shapes and sizes of the two protrusions are completely consistent, and the shapes and sizes of the two grooves are completely consistent.
[0089] 2. Actual paving requirements of prefabricated blocks:
[0090] A. The protrusions of the prefabricated blocks can fit with the grooves of the adjacent prefabricated blocks to form a protrusion-groove embedded structure; and in the protrusion-groove embedded structure, the prefabricated blocks are preferably installed with the maximum distance between the protrusions and the grooves.
[0091] B. The spacing between the protrusions and grooves between the prefabricated blocks is jointly affected by the relative displacement and relative angle between the prefabricated blocks: for any two adjacent prefabricated blocks, when the relative rotation angle is α, the displacement dx of one of the prefabricated blocks along the x direction and the displacement dy along the y direction are consistent with the spacing between the two adjacent prefabricated blocks.
[0092] Step S5: Calculate the paving coordinates of the target prefabricated block:
[0093] Taking into account the actual paving requirements of the prefabricated blocks, a target positioning algorithm based on a neural network algorithm optimized by a dung beetle algorithm is used to calculate the paving coordinates (rmx, rmy) of the target prefabricated blocks after inputting the data set obtained in step S4, so as to guide the paving of the target prefabricated blocks;
[0094] The paving coordinates (rmx, rmy) are the coordinates obtained by shifting the initial coordinates (x, y) by dx in the x direction, dy in the y direction, and rotating by an angle of α:
[0095]
[0096] The displacement dx in the x direction, the displacement dy in the y direction, and the angle α satisfy the following equation:
[0097]
[0098] In the formula: In the formula: Represents the i-th point p on the convex point model iThe minimum distance from the bump point model to the groove line model, i is 1≤i≤n; d represents the minimum distance from the bump point model to the groove line model;
[0099] The set of convex point models is M = {M1, M2, ..., M i ,...,M m}, where the i-th element point is denoted as M i (x i ,y i ), m is a positive integer, representing the total number of element points included in the convex point model;
[0100] The groove line model consists of line segment M l and arc M c composition;
[0101] The set of arcs in the groove line model is p is a positive integer, which indicates the total number of elements included in the arc in the groove line model, where the kth element M ck The center coordinates are (x ck ,y ck ), the radius is r ck The arc of
[0102] The set of line segments in the groove line model is n is a positive integer, which represents the total number of elements included in the line segment of the groove line model, where the jth element M lj Indicates that the starting coordinate is (x lj1 ,y lj1 ), the ending coordinate is (x lj2 ,y lj2 ) of the straight line segment;
[0103] d l It refers to the distance between the bump point model and the line segment in the groove line model after the bump point model is displaced dx along the x direction, displaced dy along the y direction and rotated by an angle α, d l ={d l11 ,d l22 ,...,d lij ,...,d lmn}; where element d lij Represents the element point M i With straight line segment M lj distance;
[0104] d c It refers to the distance between the bump point model and the arc in the groove line model after the bump point model is displaced dx along the x direction, displaced dy along the y direction and rotated by an angle α. c ={d c11 ,d c22 ,...,d cik ,...,d cmp}; where element d cik Represents the element point M i With arc M ck distance;
[0105] Element point M i With straight line segment M lj The distance d lij Calculated by the following formula:
[0106]
[0107] In the formula,
[0108] Element point M i With arc M ck The distance d cik Calculated by the following formula:
[0109]
[0110] Based on the boundary conditions of the precast block, the precast block line model can be constructed:
[0111]
[0112] Where: (x1, y1), (x2, y2), (x3, y3), (x4, y3), (-x1, y1), (-x2, y2), (-x3, y3), (-x4, y3) correspond to the coordinates of the endpoints of each line segment of the prefabricated block line model; (x5, y5), (-x5, y5) are the center coordinates of the two arcs in the prefabricated block line model, and the radius of the two arcs corresponds to r c1 ,r c2 The specific structure of the prefabricated block line model is detailed in the attached Figure 5 .
[0113] The training of the neural network algorithm based on the dung beetle algorithm optimization includes the following steps:
[0114] Step S5.1: Use the first prefabricated block, the second prefabricated block and the third prefabricated block that have been paved to perform training of the neural network algorithm based on the optimization of the dung beetle algorithm described in step S5:
[0115] Wherein: the first prefabricated block is located above the second prefabricated block, and the protrusion on the upper bottom edge of the second prefabricated block is embedded in the groove on the lower bottom edge of the first prefabricated block, the relative angle between the second prefabricated block and the first prefabricated block is α2, the relative displacement in the x direction is x2, and the relative displacement in the y direction is y2; the third prefabricated block is located on the right side of the second prefabricated block, and the protrusion on the left side of the third prefabricated block is embedded in the groove on the right side of the second prefabricated block, the relative angle between the third prefabricated block and the second prefabricated block is α3, the relative displacement in the x direction is x3, and the relative displacement in the y direction is y3;
[0116] The relative angle between the third prefabricated block and the second prefabricated block is α3, the relative displacement in the x direction is x3, and the relative displacement in the y direction is y3 as the input layer neuron parameters of the neural network algorithm optimized based on the dung beetle algorithm, and the relative angle between the second prefabricated block and the first prefabricated block is α2, the relative displacement in the x direction is x2, and the relative displacement in the y direction is y2 as the output layer neuron parameters.
[0117] Step S5.2, determine the topological structure and related parameters of the BP neural network (number of iterations of the neural network, threshold of target error, learning rate and fitness function). The fitness function fit(s, t) accumulates the absolute value of the difference between the output value and the expected value.
[0118]
[0119] Where s refers to the output value, t refers to the expected value, and k is the subscript of the cumulative sum function.
[0120] Step S5.3, encode the weights and thresholds of the neurons in each layer of the BP neural network to form a population of the genetic algorithm, and bring the error between the output value and the expected value calculated by the BP neural network according to the weights and thresholds of different populations into the fitness function calculation. Through the operators of rolling behavior, reproduction behavior, foraging behavior, and stealing behavior, the BP neural network evolves in the direction of smaller error.
[0121] Step S5.4, retain the weights and thresholds of the BP neural network with the smallest error as the parameters of the BP neural network, input the test set data to test the accuracy of the neural network, and evaluate the neural network through the number of iterations and error range.
[0122] The present invention is further described below in conjunction with the drawings of the embodiments. The described embodiments are only a part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work belong to the protection scope of the present invention.
[0123] The process of the channel slope protection prefabricated block paving positioning method of this embodiment is as follows Figure 1As shown, it includes target detection algorithm and target positioning algorithm.
[0124] The specific implementation of step S1 is: as described in step S1, the image is preprocessed to reduce the interference of the environment on the image.
[0125] The specific implementation of step S2 is as follows: As described in step S2, the target recognition algorithm based on YOLOV5 is used to identify and divide the central part of the prefabricated block in the color image. The effect of the target detection algorithm is as follows: Figure 3 shown.
[0126] The specific implementation of step S3 is as follows: as described in step S3, the point cloud center algorithm based on the PCL point cloud algorithm is used to calculate the center coordinates of the prefabricated block. The calculation effect of the point cloud algorithm is as follows: Figure 4 shown.
[0127] The specific implementation of step S4 is as follows: as described in step S4, according to the shape of the prefabricated block, a numerical model of the prefabricated block is established, and a simulated paving test is performed as a data set for the target positioning algorithm. The size of the prefabricated block is l×l×h=615mm×615mm×120mm, the length of the groove is 56.75mm, and the length of the convex block is 47.75mm. The angles of the bevels of the convex block and the groove are equal to 45°.
[0128] The specific implementation of step S5 is as follows: as described in step S5, the target positioning algorithm based on the neural network algorithm optimized by the dung beetle algorithm is used to calculate the paving coordinates of the prefabricated blocks to be laid after inputting the coordinates of the prefabricated blocks on the slope. The genetic algorithm optimized BP neural network (GA-BP) is compared with the dung beetle algorithm optimized neural network (DBO-BP). The GA-BP and DBO-BP are trained and simulated using the same data set and test set. The two neural networks are compared in terms of the accuracy of the prediction of the data output and the convergence performance during the training process.
[0129] The overall performance of the neural network is shown in Table 1. MAE refers to the mean absolute error, and MSE refers to the mean square error. The accuracy of the neural network can be analyzed by MAE and MSE. From the perspective of mean absolute error, the test set data of GA-BP is 0.024 higher than the training set data, while the test set data of DBO-BP is 0.005 higher than the training set data, and the average error is not much different. It can be seen that DBO-BP has better training effect and more accurate data prediction effect. The mean absolute error and mean square error values of the DBO-BP neural network for the training set data are smaller than those of GA-BP. It can be seen that using DBO-BP has better adaptability to the data set used for prefabricated block paving than GA-BP.
[0130] Table 1 Performance comparison between GA-BP and DBO-BP
[0131]
[0132] GA-BP and DBO-BP were used to select 100 sets of data from the data set for simulation. The simulation results are shown in Figure 6 As shown in the figure, the maximum prediction error percentage of DBO-BP is 0.134, and the minimum prediction error percentage is 0.001. The overall prediction effect error of GA-BP is relatively large, with the maximum error percentage being 0.280 and the minimum error percentage being 0.005. The prediction error percentage of DBO-BP is 0.056 lower than that of GA-BP on average. In the 99th simulation, the maximum difference in prediction accuracy between DBO-BP and GA-BP is 0.220. The test results show that DBO-BP has better prediction accuracy, and the error between the predicted value and the true value is small, indicating that DBO-BP can adjust the paving conditions in real time and predict a reasonable precast block paving position.
[0133] So far, the embodiments of the present invention are described in detail with reference to the accompanying drawings, but the present invention is not limited to the described embodiments. For those skilled in the art, within the scope of the principles and technical ideas of the present invention, various changes, modifications, substitutions and deformations of these embodiments still fall within the protection scope of the present invention.
Claims
1. A method for paving and positioning prefabricated blocks for channel slope protection, characterized in that: The steps include: Step S1, image acquisition target paving area: By using an image acquisition device, a color image and a point cloud image are simultaneously acquired for a target paving area, wherein the target paving area is an area including a target prefabricated block; Step S2: Identify the color image of the target prefabricated block and map it onto the point cloud image: Perform target detection on the collected color image of the target paving area based on the target detection algorithm of YOLOV5, so as to mark and divide the target prefabricated blocks on the color image, and map the color image of the target prefabricated blocks to the point cloud image of the target paving area collected in step S1; Step S3, calculate the center coordinates of the target prefabricated block: The point cloud center algorithm based on the PCL point cloud algorithm calculates the center coordinates of the target prefabricated block on the point cloud image obtained in step S2; Step S4: Obtaining a data set for the target positioning algorithm: Taking the center coordinates of the target prefabricated block obtained in step S3 as a reference, a numerical model of the target prefabricated block is established according to the shape of the target prefabricated block, and a simulated paving test is performed to obtain the initial coordinates (x, y) of all points constituting the convex blocks on the target prefabricated block and the groove line model as a data set for the target positioning algorithm in step S5; Step S5: Calculate the paving coordinates of the target prefabricated block: Taking into account the actual paving requirements of the prefabricated blocks, a target positioning algorithm based on a neural network algorithm optimized by a dung beetle algorithm is used to calculate the paving coordinates (rmx, rmy) of the target prefabricated blocks after inputting the data set obtained in step S4, so as to guide the paving of the target prefabricated blocks; The paving coordinates (rmx, rmy) are the coordinates obtained by shifting the initial coordinates (x, y) by dx in the x direction, dy in the y direction, and rotating by an angle of α: The displacement dx in the x direction, the displacement dy in the y direction, and the angle α satisfy the following equation: Where: Represents the i-th point p on the convex point model i The minimum distance from the bump point model to the groove line model, i is 1≤i≤n; d represents the minimum distance from the bump point model to the groove line model; The set of convex point models is M = {M1, M2, ..., M i ,...,M m }, where the i-th element point is denoted as M i (x i ,y i ), m is a positive integer, representing the total number of element points included in the convex point model; The groove line model consists of line segment M l and arc M c composition; The set of arcs in the groove line model is p is a positive integer, which indicates the total number of elements included in the arc in the groove line model, where the kth element M ck The center coordinates are (x ck ,y ck ), the radius is r ck The arc of The set of line segments in the groove line model is n is a positive integer, which represents the total number of elements included in the line segment of the groove line model, where the jth element M lj Indicates that the starting coordinate is (x lj1 ,y lj1 ), the ending coordinate is (x lj2 ,y lj2 ) of the straight line segment; d l It refers to the distance between the bump point model and the line segment in the groove line model after the bump point model is displaced dx along the x direction, displaced dy along the y direction and rotated by an angle α, d l ={d l11 ,d l22 ,...,d lij ,...,d lmn }; where element d lij Represents the element point M i With straight line segment M lj distance; d c It refers to the distance between the bump point model and the arc in the groove line model after the bump point model is displaced dx along the x direction, displaced dy along the y direction and rotated by an angle α. c ={d c11 ,d c22 ,...,d cik ,...,d cmp }; where element d cik Represents the element point M i With arc M ck distance; Element point M i With straight line segment M lj The distance d lij Calculated by the following formula: In the formula, Element point M i With arc M ck The distance d cik Calculated by the following formula:
2. The channel slope protection prefabricated block paving and positioning method according to claim 1 is characterized in that: In step S1, the specific steps of image acquisition of the target paving area include: Step S1.1, using a structured light camera, simultaneously collecting a color image and a point cloud image of the target area, and calculating a mapping relationship between the color image and the point cloud image through a correspondence relationship between points and straight lines; Step S1.2: Use filtering, binarization, opening operation and closing operation algorithms to process the color image of the target area obtained in step S1.1, so as to reduce the interference of background and light on the obtained color image.
3. The channel slope protection prefabricated block paving and positioning method according to claim 1 is characterized in that: In step S3, the specific steps of calculating the center coordinates of the target prefabricated block based on the point cloud center algorithm of the PCL point cloud algorithm include: Step S3.1, extracting the plane point cloud image of the target prefabricated block: Use the Pass Through algorithm and the Ransac algorithm to remove all points outside the set value segment in the z direction of the original point cloud image; then randomly select three points in the filtered depth map to form a reference plane, calculate the distance from other points to the reference plane, and if it is less than the set threshold, it is considered to belong to the same plane; Repeat this process until all points that meet the requirements are obtained, and then the plane point cloud image can be extracted; Step S3.2, extracting the boundary of the plane point cloud image of the target prefabricated block: Use the Boundary Estimation algorithm to extract the boundary of the plane point cloud image obtained in step S3.1: first perform local sampling on the plane point cloud image to obtain a local plane, then fit the local plane using the least squares method, and project it onto the micro-cut plane, and identify the boundary features of the scattered point cloud based on the maximum angle between the sampling point and the projection point corresponding to its neighbors; Step S3.3, calculate the center coordinates of the target prefabricated block: According to the boundary of the plane point cloud image of the target prefabricated block extracted in step 3.2, the position of the center of the target prefabricated block in the plane point cloud image is calculated, and the center coordinates of the target prefabricated block can be obtained.
4. The channel slope protection prefabricated block paving and positioning method according to claim 1 is characterized in that: The numerical model of the target prefabricated block constructed in step S4 includes two protrusions and two grooves; the two protrusions are completely consistent in shape and size, and the two grooves are completely consistent in shape and size.
5. The channel slope protection prefabricated block paving and positioning method according to claim 1 is characterized in that: In step S5, the actual paving requirements of the prefabricated blocks that need to be considered are: A. The convex block of the prefabricated block can fit with the concave groove of the adjacent prefabricated block to form a convex block-concave embedded structure; and in the convex block-concave embedded structure, the prefabricated block is preferably installed with the maximum spacing between the convex block and the concave groove; B. The spacing between the protrusions and grooves between the prefabricated blocks is jointly affected by the relative displacement and relative angle between the prefabricated blocks: for any two adjacent prefabricated blocks, when the relative rotation angle is α, the displacement dx of one of the prefabricated blocks along the x direction and the displacement dy along the y direction are consistent with the spacing between the two adjacent prefabricated blocks.
6. The channel slope protection prefabricated block paving and positioning method according to claim 1 is characterized in that: The first prefabricated block, the second prefabricated block and the third prefabricated block that have been paved are used to perform the training of the neural network algorithm based on the optimization of the dung beetle algorithm described in step S5: Wherein: the first prefabricated block is located above the second prefabricated block, and the protrusion on the upper bottom edge of the second prefabricated block is embedded in the groove on the lower bottom edge of the first prefabricated block, the relative angle between the second prefabricated block and the first prefabricated block is α2, the relative displacement in the x direction is x2, and the relative displacement in the y direction is y2; the third prefabricated block is located on the right side of the second prefabricated block, and the protrusion on the left side of the third prefabricated block is embedded in the groove on the right side of the second prefabricated block, the relative angle between the third prefabricated block and the second prefabricated block is α3, the relative displacement in the x direction is x3, and the relative displacement in the y direction is y3; The relative angle between the third prefabricated block and the second prefabricated block is α3, the relative displacement in the x direction is x3, and the relative displacement in the y direction is y3 as the input layer neuron parameters of the neural network algorithm optimized based on the dung beetle algorithm, and the relative angle between the second prefabricated block and the first prefabricated block is α2, the relative displacement in the x direction is x2, and the relative displacement in the y direction is y2 as the output layer neuron parameters.
7. The channel slope protection prefabricated block paving and positioning method according to claim 1 is characterized in that: The implementation process of the YOLOV5-based target detection algorithm described in step S2 is: first, the backbone feature extraction network is used to convert the input color image into a feature set; then the enhanced feature extraction network is used to detect the extracted features; finally, the target detection classifier is used to filter and eliminate redundant prediction boxes according to the probability value, and finally the prediction category with the highest confidence and the position coordinates of the bounding box are output.
8. The channel slope protection prefabricated block paving and positioning method according to claim 1 is characterized in that: Based on the boundary conditions of the precast block, the precast block line model can be constructed: Where: (x1, y1), (x2, y2), (x3, y3), (x4, y3), (-x1, y1), (-x2, y2), (-x3, y3), (-x4, y3) correspond to the coordinates of the endpoints of each line segment of the prefabricated block line model; (x5, y5), (-x5, y5) are the center coordinates of the two arcs in the prefabricated block line model, and the radius of the two arcs corresponds to r c1 ,r c2 .
Citation Information
Patent Citations
Moving target detection and track prediction method based on image processing
CN110223317A
Channel slope protection precast block pavement
CN116335087A