Earth-rock volume calculation method, system and equipment and storage medium
By obtaining and correcting the three-dimensional coordinate information of earth and stone, using the radial basis function to fit the surface and performing integral calculations, the problem that the quality of aerial image of the drone affects the calculation accuracy of earth and stone is solved, and higher calculation accuracy and adaptability are achieved.
Patent Information
- Application Number
- CN202411186627.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-27
- Publication Date
- 2024-12-17
AI Technical Summary
The existing method of calculating earthwork volume When using drone aerial photography to obtain high-resolution images, weather conditions and light changes may affect image quality, resulting in low modeling accuracy, and software functions limit the adaptability and accuracy of the calculation.
By pre-acquisition of the three-dimensional coordinate information of the earth and rock surface, correct it, use the radial basis function to fit the surface, determine the coordinate range, and calculate the earth and rock volume through the integral method to ensure the accuracy and consistency of the coordinate information and improve the fitting results. Accuracy and adaptability.
Improve the accuracy and adaptability of the calculation of earth and rock volume, reduce errors caused by terrain complexity, ensure that the application of the integral method is based on, accurately reflects the actual volume of the curved column, and solves the problem of weather and light changes affecting image quality. .
Smart Images

Figure CN119152013A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of construction engineering technology, and in particular to a method, system, device and storage medium for calculating earthwork volume. Background Art
[0002] With the rapid development of the economy and the further expansion of urban scale, the development of urban underground space has received more and more attention. In the field of construction engineering, the calculation of the volume of earth and stone excavated at the base is a basic and critical task. Whether it is a new project or a renovation project, it is necessary to determine the required amount of materials, the selection of construction machinery, and the deployment of manpower and other important matters through accurate calculation. The traditional method of calculating the volume of earth and stone relies on drawing analysis or on-site measurement. With the advancement of technology, these methods are gradually supplemented or even replaced by more advanced digital tools. For example, the use of modern technical means such as geographic information system (GIS) and 3D modeling software can significantly improve the calculation accuracy and efficiency. However, each calculation method has its scope of application and limitations. The section method divides the area to be calculated into multiple cross sections, and then estimates the total volume by multiplying the area on each section by the distance between adjacent sections. However, it requires a lot of on-site measurement work, which is time-consuming and labor-intensive. For areas with complex or irregular terrain, inaccurate section division will lead to large errors. Both the grid method and the triangular grid method divide the site into several grids, measure the elevation at the intersection of the grids, and calculate the total earthwork volume by calculating the fill and excavation volume of each grid. However, they are only applicable to flat areas and have poor adaptability to terrain with large undulations, and the calculation process is cumbersome. The combination of drone aerial photography and 3D modeling technology uses drones to obtain high-resolution images, combines professional software to generate 3D terrain models and calculate earthwork volume, but weather conditions and lighting changes may affect image quality, thereby affecting modeling accuracy, and the modeling method will be limited by the functions of the software. Summary of the invention
[0003] In view of this, the embodiments of the present application are committed to providing a method, system, device and storage medium for calculating earthwork volume, which are used to solve the problem that in earthwork volume calculation, high-resolution images are obtained through drone aerial photography, but weather conditions and lighting changes may affect the image quality, thereby affecting the modeling accuracy, and the modeling method will be limited by software functions.
[0004] According to a first aspect of the present invention, the present invention provides a method for calculating earthwork volume, comprising:
[0005] Pre-acquire the three-dimensional coordinate information of the earthwork surface, and perform correction to obtain the corrected point cloud coordinate information;
[0006] Fitting a surface using a radial basis function according to the point cloud coordinate information to obtain a fitting surface equation;
[0007] Determine the range of coordinates X, Y and Z according to the fitting surface equation;
[0008] The volume of earthwork is calculated by an integration method according to the range of the coordinates X, Y and Z.
[0009] Preferably, the step of pre-acquiring the three-dimensional coordinate information of the earthwork surface and correcting it to obtain the corrected point cloud coordinate information includes:
[0010] Obtaining point cloud datasets of earthworks through drone laser scanning radar images;
[0011] Extracting three-dimensional coordinate information of the earthwork surface according to the point cloud data set;
[0012] According to the three-dimensional coordinate information, the three-dimensional coordinate information is corrected with the edge boundary point as the origin to obtain the corrected point cloud coordinate information.
[0013] Preferably, fitting a surface by using a radial basis function according to the point cloud coordinate information to obtain a fitting surface equation comprises:
[0014] Determine the coordinates of each center point of the point cloud coordinate information by a clustering algorithm;
[0015] Calculate the average value of the three-dimensional standard deviation in the three-dimensional coordinate information;
[0016] Calculate the polynomial coefficients and the weight of the Gaussian radial basis function in each center point coordinate through each point cloud coordinate information;
[0017] The fitting surface equation is obtained by fitting each of the center point coordinates, the standard deviation of the three-dimensional coordinate information, the coefficients and the weights of the Gaussian radial basis;
[0018] The fitting surface equation is as follows:
[0019]
[0020] Where: f(x, y) is the value of the fitting surface equation; K is the total number of center points; ω i is the weight; x is the x coordinate; y is the y coordinate; x i is the coordinate of the i-th center point; y i is the coordinate of the ith center point; exp is the radial basis function; σ is the sample standard deviation; p(x, y) is the coefficient of the polynomial.
[0021] Preferably, determining the coordinates of each center point of the point cloud coordinate information by a clustering algorithm comprises:
[0022] Initialize the center point using the point cloud coordinate information to obtain k initialized center points;
[0023] Calculate the distance from each coordinate point in the point cloud coordinate information to each of the initialization center points, and assign each coordinate point to the initialization center point area with the closest distance;
[0024] Iteratively calculating the average of the distances from the coordinate points in each of the initialization center point regions to the initialization center point, and updating the center point according to the average;
[0025] When the distance change before and after the iteration of the center point is less than the set distance threshold or the number of iterations reaches the set number threshold, the iteration is stopped to obtain k center points.
[0026] Preferably, the calculating of the polynomial coefficients and the weight of the Gaussian radial basis function in each center point coordinate by using each point cloud coordinate information comprises:
[0027] The Gaussian radial basis function matrix, polynomial coefficient matrix and target value vector matrix are constructed respectively through the point cloud coordinate information;
[0028] Constructing a system of linear equations through the Gaussian radial basis function matrix, the polynomial coefficient matrix and the constructed target value vector matrix;
[0029] By solving the linear equations, a weight vector matrix and a polynomial coefficient matrix are obtained;
[0030] The weight vector matrix is composed of the weights of the Gaussian radial basis function in the coordinates of each center point.
[0031] Preferably, after obtaining the fitting surface equation by fitting each of the center point coordinates, the standard deviation of the three-dimensional coordinate information, the coefficients and the weights of the Gaussian radial basis, the method further comprises:
[0032] Calculate the square of the deviation of the point cloud coordinate information;
[0033] Calculate the residual square of the point cloud coordinate information;
[0034] Calculate the coefficient of determination by the square of the deviation and the square of the residual;
[0035] Verifying the fitting surface equation by using the coefficient of determination;
[0036] The formula for calculating the coefficient of determination is as follows:
[0037]
[0038] Where: R 2is the coefficient of determination; RSS is the square of deviation; TSS is the residual square.
[0039] Preferably, the earthwork volume is calculated by an integration method according to the range of the coordinates X, Y and Z, including:
[0040] Projecting the range of the coordinates X, Y and Z through the XOY plane to obtain a curved top cylinder;
[0041] Calculate the earthwork volume of the curved top column by the integration method;
[0042] The calculation formula of the earthwork volume is as follows:
[0043]
[0044] Where: V is the volume of earthwork; y max is the maximum value of the Y coordinate; y min is the minimum value of the Y coordinate; x max is the maximum value of the X coordinate; x min is the minimum value of the X coordinate; f(x, y) is the fitting equation value; dx is the integral of x; dy is the integral of y.
[0045] According to a second aspect of the present invention, there is also provided an earthwork calculation system, comprising:
[0046] The correction module obtains the three-dimensional coordinate information of the earthwork surface in advance and corrects it to obtain the corrected point cloud coordinate information;
[0047] A fitting module, which fits a surface using a radial basis function according to the point cloud coordinate information to obtain a fitting surface equation;
[0048] A coordinate module, which determines the range of coordinates X, Y and Z according to the fitting surface equation;
[0049] The calculation module calculates the earthwork volume by an integration method according to the range of the coordinate X, the coordinate Y and the coordinate Z.
[0050] According to a third aspect of the present invention, there is also provided an electronic device, comprising a processor and a memory, wherein the memory stores computer executable instructions that can be executed by the processor, and the processor executes the computer executable instructions to implement the earthwork volume calculation method.
[0051] According to a fourth aspect of the present invention, a computer-readable storage medium is also provided, wherein the computer-readable storage medium stores computer-executable instructions. When the computer-executable instructions are called and executed by a processor, the computer-executable instructions prompt the processor to implement the earthwork volume calculation method.
[0052] The effects provided in the content of the invention are only the effects of the embodiments, not all the effects of the invention. One of the above technical solutions has the following advantages or beneficial effects:
[0053] According to the first aspect of the present invention, the present invention obtains three-dimensional coordinate information in advance and corrects the three-dimensional coordinates to ensure the accuracy and consistency of the coordinate information, reduce measurement errors, and then uses radial basis functions to process irregularly shaped earth and stone, thereby improving the accuracy and adaptability of the fitting results. Through surface fitting, the actual shape of the earth and stone can be more accurately described, and the error caused by complex terrain can be reduced; further, by determining the range of coordinates, the integral has a clear boundary, which is convenient for subsequent volume calculation and ensures that the application of the integral method has a basis; finally, the earthwork volume is calculated by the integral method to accurately reflect the actual volume of the curved top cylinder, especially when conventional methods are difficult to use. The application of the integral method improves the accuracy of the calculation results, reduces possible error accumulation, and solves the problem that in the calculation of earthwork volume, high-resolution images are obtained by drone aerial photography, but weather conditions and lighting changes may affect image quality, thereby affecting modeling accuracy, and the modeling method will be limited by software functions. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] Figure 1 A schematic flow chart of a method for calculating earthwork volume according to an embodiment of the present invention is shown;
[0055] Figure 2 The present invention shows Figure 1 A schematic flow chart of the method for correcting the point cloud coordinate information in step S100;
[0056] Figure 3 The present invention shows Figure 1 A schematic flow chart of the method for obtaining the fitting surface equation in step S200;
[0057] Figure 4 The present invention shows Figure 3 A schematic flow chart of the method for determining the center point coordinates in step S210;
[0058] Figure 5 The present invention shows Figure 3 A schematic flow chart of the method for calculating polynomial coefficients and weights in step S220;
[0059] Figure 6 The figure shows a schematic diagram of a system for calculating earthwork volume according to an embodiment of the present invention. DETAILED DESCRIPTION
[0060] In order to make the above-mentioned purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are described in detail below in conjunction with the accompanying drawings. It is to be understood that the specific embodiments described herein are only used to explain the present application, rather than to limit the present application. It should also be noted that, for ease of description, only some structures related to the present application are shown in the accompanying drawings, rather than all structures. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.
[0061] The terms "including" and "having" and any variations thereof in this application are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device comprising a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products or devices.
[0062] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0063] Figure 1 FIG. 4 is a schematic flow chart showing a method for calculating earthwork volume according to an embodiment of the present invention. Figure 1 As shown, the present invention provides a method for calculating earthwork volume, comprising:
[0064] Step S100, pre-acquire the three-dimensional coordinate information of the earthwork surface, and perform correction to obtain the corrected point cloud coordinate information;
[0065] Step S200, fitting a surface using a radial basis function according to the point cloud coordinate information to obtain a fitting surface equation;
[0066] Step S300, determining the range of coordinates X, Y and Z according to the fitted surface equation;
[0067] Step S400, calculating the earthwork volume by an integration method according to the range of coordinates X, Y and Z.
[0068] By obtaining three-dimensional coordinate information in advance and correcting the three-dimensional coordinates to ensure the accuracy and consistency of the coordinate information and reduce measurement errors, the radial basis function is used to process irregularly shaped earth and stone, which improves the accuracy and adaptability of the fitting results. Through surface fitting, the actual shape of the earth and stone can be more accurately described, reducing errors caused by complex terrain; further, by determining the range of coordinates, the integral has a clear boundary, which is convenient for subsequent volume calculations and ensures that the application of the integral method has a basis; finally, the earth volume is calculated by the integral method to accurately reflect the actual volume of the curved top cylinder, especially when conventional methods are difficult to use. The application of the integral method improves the accuracy of the calculation results and reduces possible error accumulation, solving the problem that in the calculation of earth volume, high-resolution images are obtained through drone aerial photography, but weather conditions and lighting changes may affect image quality, thereby affecting modeling accuracy, and the modeling method will be limited by software functions.
[0069] Figure 2 The present invention shows Figure 1 A schematic flow chart of the method for correcting the point cloud coordinate information in step S100 is shown in FIG. Figure 2 As shown, in step S100, the three-dimensional coordinate information of the earthwork surface is obtained in advance, and the corrected point cloud coordinate information is obtained by correction, including:
[0070] Step S110, obtaining a point cloud data set of earthwork through unmanned aerial vehicle laser scanning radar images;
[0071] Step S120, extracting three-dimensional coordinate information of the earthwork surface according to the point cloud data set;
[0072] Step S130, based on the three-dimensional coordinate information, the three-dimensional coordinate information is corrected with the edge boundary point as the origin to obtain the corrected point cloud coordinate information.
[0073] In this step, the initial point cloud data is obtained through drone laser scanning radar technology to improve the accuracy of the three-dimensional coordinate information; the point cloud data is corrected, with the edge boundary point as the origin, to ensure the accuracy and consistency of the coordinate information and reduce measurement errors.
[0074] Figure 3 The present invention shows Figure 1 A schematic flow chart of the method for obtaining the fitting surface equation in step S200 is as follows: Figure 3 As shown, in step S200, a surface is fitted by a radial basis function according to the point cloud coordinate information to obtain a fitting surface equation, including:
[0075] Step S210, determining the coordinates of each center point of the point cloud coordinate information by a clustering algorithm;
[0076] Step S220, calculating the average value of the three-dimensional standard deviation in the three-dimensional coordinate information;
[0077] Step S230, calculating the polynomial coefficients and the weight of the Gaussian radial basis function in each center point coordinate using each point cloud coordinate information;
[0078] Step S240, performing fitting by using the coordinates of each center point, the standard deviation of the three-dimensional coordinate information, the coefficient and the weight of the Gaussian radial basis to obtain a fitting surface equation;
[0079] Fitting surface equation, the formula is as follows:
[0080]
[0081] Where: f(x, y) is the value of the fitting surface equation; K is the total number of center points; ω i is the weight; x is the x coordinate; y is the y coordinate; x i is the coordinate of the i-th center point; y i is the coordinate of the ith center point; exp is the radial basis function; σ is the sample standard deviation; p(x, y) is the coefficient of the polynomial.
[0082] In this step, radial basis functions are used to perform surface fitting and generate fitting surface equations to prepare for subsequent volume calculations. By using radial basis functions to adapt to irregularly shaped earth and stone, the accuracy and adaptability of the fitting results are improved. At the same time, through surface fitting, the actual shape of the earth and stone can be more accurately described, reducing errors caused by complex terrain.
[0083] Figure 4 The present invention shows Figure 3 A schematic flow chart of the method for determining the center point coordinates in step S210 is shown in FIG. Figure 4 As shown, in step S210, the coordinates of each center point of the point cloud coordinate information are determined by a clustering algorithm, including:
[0084] Step S211, initializing the center point through the point cloud coordinate information to obtain k initialized center points;
[0085] Step S212, calculating the distance between each coordinate point in the point cloud coordinate information and each initialization center point, and assigning each coordinate point to the initialization center point area closest to it;
[0086] Step S213, iteratively calculating the average of the distances from the coordinate points in each initialization center point area to the initialization center point, and updating the center point according to the average;
[0087] Step S214, when the distance change before and after the iteration of the center point is less than the set distance threshold or the number of iterations reaches the set number threshold, the iteration is stopped to obtain k center points.
[0088] The clustering algorithm is used to determine the coordinates of the center point, which reduces the amount of calculation and improves the calculation efficiency. At the same time, each center point is accurately determined to optimize the application effect of the radial basis function. At the same time, the algorithm can dynamically adjust the center point according to the data to adapt to different terrain features.
[0089] Figure 5 The present invention shows Figure 3 A schematic flow chart of the method for calculating polynomial coefficients and weights in step S220 is shown in FIG. Figure 5 As shown, in step S220, the polynomial coefficients and the weight of the Gaussian radial basis function in each center point coordinate are calculated through each point cloud coordinate information, including:
[0090] Step S221, constructing a Gaussian radial basis function matrix, a polynomial coefficient matrix and a target value vector matrix respectively according to the point cloud coordinate information;
[0091] Step S222, constructing a linear equation system through the Gaussian radial basis function matrix, the polynomial coefficient matrix and the target value vector matrix;
[0092] Step S223, obtaining a weight vector matrix and a polynomial coefficient matrix by solving the linear equation system;
[0093] The weight vector matrix consists of the weights of the Gaussian radial basis functions at each center point coordinate.
[0094] In this step, the model framework is improved by constructing a Gaussian radial basis function matrix and a polynomial coefficient matrix; the accuracy of the radial basis weights is ensured by solving a system of linear equations; the fitting effect is optimized to improve the credibility of the fitting surface equation.
[0095] In step S240, after fitting the fitting surface equation by using the standard deviation, coefficient and weight of Gaussian radial basis of each center point coordinate, three-dimensional coordinate information, the following is further included:
[0096] Calculate the square of the deviation of the point cloud coordinate information;
[0097] Calculate the residual square of the point cloud coordinate information;
[0098] The coefficient of determination is calculated by using the square of the deviation and the square of the residual;
[0099] Verify the fitted surface equation through the coefficient of determination;
[0100] The formula for calculating the coefficient of determination is as follows:
[0101]
[0102] Where: R 2is the coefficient of determination; RSS is the square of the deviation; TSS is the residual square.
[0103] The fitting surface equation is verified by calculating the coefficient of determination to ensure the reliability of the fitting result; the model error is analyzed by the square of deviation and the square of residual to optimize the fitting process; at the same time, the credibility of the model is improved through mathematical verification to provide guarantee for practical application.
[0104] In step 400, the volume of earthwork is calculated by an integration method according to the range of coordinates X, Y and Z, including:
[0105] Projection is performed through the XOY plane according to the range of coordinates X, Y and Z to obtain a curved top cylinder;
[0106] Calculate the earthwork volume of the curved top column by the integral method;
[0107] The calculation formula for earthwork volume is as follows:
[0108]
[0109] Where: V is the earthwork volume; yma x The maximum value of the Y coordinate; ymi n is the minimum value of the Y coordinate; x max is the maximum value of the X coordinate; x min is the minimum value of the X coordinate; f(x, y) is the fitting equation value; dx is the integral of x; dy is the integral of y.
[0110] In this step, the volume calculation process is simplified through XOY plane projection; the application of the integral method accurately calculates the earthwork volume and provides detailed volume information; it is also suitable for earthwork volume calculation in various complex terrains, thereby improving the value of engineering applications.
[0111] In one embodiment of the present invention, in step 10, a point cloud data set of earthwork is obtained based on the UAV laser scanning radar image.
[0112] Step 20: extracting the three-dimensional coordinate information of the earthwork surface based on the point cloud data set.
[0113] Step 30, according to the three-dimensional coordinate information of the earth and stone surface, combined with the boundary points and the bottom surface of the foundation pit, the three-dimensional coordinate system is adjusted with the edge boundary points as the origin, and the point cloud coordinate information is corrected.
[0114] Step 40, a surface is fitted according to the coordinate information of the point cloud data, and the ordinate z is the elevation information of the point cloud, and the fitting method is radial basis function (RBF) fitting. In three-dimensional space, a surface can be represented by a certain function, so as long as the radial basis function is selected as the basis function space, and then the corresponding weight coefficient is fitted, the surface can be obtained.
[0115] The fitting surface equation is as follows:
[0116]
[0117] in is the Gaussian radial basis function, which is as follows:
[0118]
[0119] r is the distance from the coordinate (x, y) to the center point coordinate (x i ,y i ), σ i is the sample standard deviation. When the sample is a three-dimensional coordinate, the standard deviation can be calculated for each of the three coordinates and then the average value can be taken. i is the i-th weight, n is the total number of center points (also the total number of regions), and p(x, y) is a low-order polynomial used to ensure the smoothness of the interpolation result in the entire space.
[0120] The center point coordinates are determined according to the K-means clustering algorithm.
[0121] First, initialize the center point: select k point cloud data, K = {(x1, y1)(x2, y2), ..., (x N ,y N )} as the initial center point (x j ,y j ) (t) , t is the number of iterations.
[0122] Next, iterate and for each data point (x i ,y i ), calculate its distance to all center points
[0123] Here j* represents (x i ,y i ) should be assigned to the index of the nearest center point, so that each data point is assigned to the nearest center point.
[0124] For each center point (x j ,y j ) (t) , calculate the mean of all data point coordinates assigned to it, and update the center point to the mean,
[0125] Right now
[0126] Where S j Assigned to the center point (x j ,y j )(t) A set of data points, and lS j | is the number of data points in the set.
[0127] When the distance change before and after the center point iteration is less than the given distance threshold D or reaches the set maximum number of iterations T, the iteration is stopped, and finally k center points K = {(x1, y1)(x2, y2), ..., (x k ,y k )} can be used as the center points of the RBF model.
[0128] Then calculate the standard deviation σ of the three-dimensional coordinate set. First, calculate the average value of the three-dimensional coordinates: The formula for the average value of the x coordinates in all point cloud coordinates is as follows:
[0129]
[0130] The formula for the average value of the y coordinates of all point cloud coordinates is as follows:
[0131]
[0132] The average value of the z coordinates in all point cloud coordinates is as follows:
[0133]
[0134] In the formula, N is the total number and i represents the i-th one.
[0135] Then calculate the standard deviation of each dimension. The formula for calculating the standard deviation of the x dimension is as follows:
[0136]
[0137] The formula for calculating the standard deviation in the y dimension is as follows:
[0138]
[0139] The formula for calculating the standard deviation in the z dimension is as follows:
[0140]
[0141] Finally, the standard deviation of the three dimensions is calculated, and the average value of the standard deviation of the three dimensions is calculated. The formula is as follows:
[0142]
[0143] After calculating the average of the standard deviations of the three dimensions, the weight ω of each center point i To determine p(x, y), we need to construct several matrices to solve the linear equations:
[0144] The first step is to calculate the construction matrix:
[0145] Matrix Φ: This is an N×K matrix, where
[0146] The matrix Φ is a matrix composed of all Gaussian radial basis functions; K is the number of center points, N is the total number of point cloud coordinates, and N>K.
[0147] Matrix P: This is an N×m matrix, where m is the number of coefficients of the polynomial p(x, y). In three-dimensional space, a two-dimensional polynomial is generally chosen, p(x, y) = ax 2 +by 2 +cxy+dx+ey+f, then m==6. The matrix P contains x 2 ,y 2 , xy, x, y, f (that is, substituting all point cloud coordinate values), the matrix P is shown as follows:
[0148]
[0149] In the formula: a, b, c, d, e, f are all constants.
[0150] Vector Z: This is an N×1 vector containing the target value z i ;
[0151] The vector Z is as follows:
[0152]
[0153] The second step is to construct the equation system:
[0154] Combining the above matrix to construct the linear equation system is as follows:
[0155]
[0156] where W is an N×1 vector containing the weight ω for each φ(r) i ; C is an m×1 vector containing the coefficients of the polynomial p(x, y); P T is the transpose of the P matrix, which is an m×N matrix.
[0157] The values of W and C can be found by solving the above system of equations. This can usually be done by matrix inversion or Gaussian elimination.
[0158] Finally, the fitting equation is obtained:
[0159]
[0160] Where: f(x, y) is the value of the fitting surface equation; K is the total number of center points; ω i is the weight; x is the x coordinate; y is the y coordinate; xi is the coordinate of the i-th center point; y i is the coordinate of the ith center point; exp is the radial basis function; σ is the sample standard deviation; p(x, y) is the coefficient of the polynomial.
[0161] Step 50, calculate the total deviation sum of squares of the point cloud data Residual sum of squares And the coefficient of determination formula is as follows,
[0162]
[0163] R 2 The value range of is [0, 1], and the closer it is to 1, the better the fitting effect. Here we assume that R 2 When ≥0.9, the fitting results can be used for the next estimation.
[0164] Step 60, according to the fitting surface equation, the ranges of X, Y, and Z are given again: Xrange = (Xmin, Xmax), Yrange = (Ymin, Ymax), Zrange = meshgrid (Xrange, Yrange).
[0165] Step 70, projecting the fitted surface onto the XOY plane to form an irregular curved-top cylinder with the surface.
[0166] Step 80, calculate the volume using the integral method, assuming that the binary function z = f(x, y), f(x, y) is the fitting equation obtained above. The x and y ranges are Xrange = (Xmin, Xmax), Yrange = (Ymin, Ymax). The volume calculation formula is as follows:
[0167]
[0168] Where: V is the earthwork volume; yma x The maximum value of the Y coordinate; ymi n is the minimum value of the Y coordinate; x max is the maximum value of the X coordinate; x min is the minimum value of the X coordinate; f(x, y) is the fitting equation value; dx is the integral of x; dy is the integral of y.
[0169] Figure 6 FIG. 4 is a schematic diagram showing a system for calculating earthwork volume according to an embodiment of the present invention. Figure 6 As shown, a soil calculation system is provided, comprising:
[0170] The correction module 810 obtains the three-dimensional coordinate information of the earthwork surface in advance, and performs correction to obtain the corrected point cloud coordinate information;
[0171] A fitting module 820 is used to fit a surface using a radial basis function according to the point cloud coordinate information to obtain a fitting surface equation;
[0172] A coordinate module 830 determines the range of coordinates X, Y and Z according to the fitted surface equation;
[0173] The calculation module 840 calculates the earthwork volume by an integration method according to the range of the coordinates X, Y and Z.
[0174] In particular, an electronic device is also provided, the electronic device includes a processor and a memory, the memory stores computer executable instructions that can be executed by the processor, and the processor executes the computer executable instructions to implement the earthwork volume calculation method, for example, to execute the above-described Figure 1 Steps S100 to S400 of the method described above are also performed. Figure 4 Method steps S211 to S214.
[0175] In particular, a computer-readable storage medium is also provided, the computer-readable storage medium storing computer-executable instructions, when the computer-executable instructions are called and executed by a processor, the computer-executable instructions prompt the processor to implement the earthwork volume calculation method, for example, to execute the above-described Figure 1 Steps S100 to S400 of the method described above are also performed. Figure 4 Method steps S211 to S214.
[0176] The processor is used to complete various control logics of the device, which can be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA), a single-chip microcomputer, an ARM (Acorn RISCMachine) or other programmable logic device, a discrete gate or transistor logic, a discrete hardware component, or any combination of these components. In addition, the processor can also be any traditional processor, microprocessor or state machine. The processor can also be implemented as a combination of computing devices, for example, a combination of a DSP and a microprocessor, a plurality of microprocessors, one or more microprocessors combined with a DSP and / or any other such configuration.
[0177] The memory may include a program storage area and a data storage area, wherein the program storage area may store an operating system and applications required for at least one function; the data storage area may store data created according to the use of the device, etc. In addition, the memory may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some embodiments, the memory may optionally include a memory remotely arranged relative to the processor, and these remote memories may be connected to the device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0178] As an example, non-volatile storage media can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) as external cache memory. By way of illustration and not limitation, RAM can be obtained in many forms such as synchronous RAM (SRAM), dynamic RAM, (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), Synchlink DRAM (SLDRAM), and direct Rambus RAM (DRRAM). The disclosed memory components or memories of the operating environment described herein are intended to include one or more of these and / or any other suitable types of memory.
[0179] Of course, those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing related hardware (such as a processor, a controller, etc.) through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium, and the computer program can include the processes of the above-mentioned method embodiments when executed. The storage medium can be a memory, a disk, a floppy disk, a flash memory, an optical storage device, etc.
[0180] The above are only some specific implementation methods of the present application, and any other improvements made based on the concept of the present application are deemed to be within the protection scope of the present application.
Claims
1. A method for calculating earthwork volume, characterized in that: include: Obtain the three-dimensional coordinate information of the earthwork surface in advance, and perform correction to obtain the corrected point cloud coordinate information; Fitting a surface using a radial basis function according to the point cloud coordinate information to obtain a fitting surface equation; Determine the range of coordinates X, Y, and Z according to the fitted surface equation; The volume of earthwork is calculated by an integration method according to the range of the coordinates X, Y and Z.
2. The method according to claim 1, characterized in that The method of pre-acquiring the three-dimensional coordinate information of the earthwork surface and performing correction to obtain the corrected point cloud coordinate information includes: Obtain earthwork point cloud datasets through drone laser scanning radar images; Extracting three-dimensional coordinate information of the earthwork surface based on the point cloud data set; According to the three-dimensional coordinate information, the three-dimensional coordinate information is corrected with the edge boundary point as the origin to obtain the corrected point cloud coordinate information.
3. The method according to claim 1, characterized in that The step of fitting a surface using a radial basis function according to the point cloud coordinate information to obtain a fitting surface equation includes: Determine the coordinates of each center point of the point cloud coordinate information by a clustering algorithm; Calculate the average value of the three-dimensional standard deviation in the three-dimensional coordinate information; Calculating the polynomial coefficients and the weight of the Gaussian radial basis function in each center point coordinate using each point cloud coordinate information; Obtain the fitting surface equation by fitting each of the center point coordinates, the standard deviation of the three-dimensional coordinate information, the coefficients, and the weights of the Gaussian radial basis; The fitting surface equation is as follows: Where: f(x, y) is the value of the fitting surface equation; K is the total number of center points; ω i is the weight; x is the x coordinate; y is the y coordinate; x i is the coordinate of the i-th center point; y i is the coordinate of the ith center point; exp is the radial basis function; σ is the sample standard deviation; p(x, y) is the coefficient of the polynomial.
4. The method according to claim 3, characterized in that Determining the coordinates of each center point of the point cloud coordinate information by a clustering algorithm includes: Initialize the center point using the point cloud coordinate information to obtain k initialized center points; Calculating the distance between each coordinate point in the point cloud coordinate information and each of the initialization center points, and assigning each coordinate point to the initialization center point area with the closest distance; Iteratively calculating the average of the distances from each coordinate point within the initialization center point area to the initialization center point, and updating the center point according to the average; When the distance change between the center points before and after iteration is less than the set distance threshold or the number of iterations reaches the set number threshold, the iteration is stopped to obtain k center points.
5. The method according to claim 3, characterized in that The calculating of the polynomial coefficients and the weight of the Gaussian radial basis function in each center point coordinate using each point cloud coordinate information includes: The Gaussian radial basis function matrix, polynomial coefficient matrix and target value vector matrix are constructed respectively through the point cloud coordinate information; Constructing a system of linear equations using the Gaussian radial basis function matrix, the polynomial coefficient matrix, and the constructed target value vector matrix; Obtaining a weight vector matrix and a polynomial coefficient matrix by solving the linear equations; The weight vector matrix is composed of the weights of the Gaussian radial basis function in the coordinates of each center point.
6. The method according to claim 5, characterized in that After obtaining the fitting surface equation by fitting each of the center point coordinates, the standard deviation of the three-dimensional coordinate information, the coefficients, and the weights of the Gaussian radial basis, the method further includes: Calculating the square of the deviation of the point cloud coordinate information; Calculating the residual square of the point cloud coordinate information; Calculating the coefficient of determination by the square of the deviation and the square of the residual; Verifying the fitted surface equation by the coefficient of determination; The formula for calculating the coefficient of determination is as follows: Where: R 2 is the coefficient of determination; RSS is the square of the deviation; TSS is the square of the residual.
7. The method according to claim 1, characterized in that Calculating the earthwork volume by an integration method based on the range of the coordinates X, Y, and Z includes: Projecting the range of the coordinates X, Y, and Z through the XOY plane to obtain a curved top cylinder; Calculate the earthwork volume of the curved top column by the integration method; The calculation formula for the earthwork volume is as follows: Where: V is the earthwork volume; yma x The maximum value of the Y coordinate; ymi n is the minimum value of the Y coordinate; x max is the maximum value of the X coordinate; x min is the minimum value of the X coordinate; f(x, y) is the value of the fitting equation; dx is the integral of x; dy is the integral of y.
8. An earthwork calculation system, characterized in that: include: The correction module obtains the three-dimensional coordinate information of the earthwork surface in advance and corrects it to obtain the corrected point cloud coordinate information; A fitting module, which fits a surface using a radial basis function according to the point cloud coordinate information to obtain a fitting surface equation; A coordinate module, which determines the range of coordinates X, Y and Z according to the fitted surface equation; The calculation module calculates the earthwork volume by an integration method according to the range of the coordinate X, the coordinate Y and the coordinate Z.
9. An electronic device, characterized in that: The electronic device includes a processor and a memory, the memory stores computer-executable instructions that can be executed by the processor, and the processor executes the computer-executable instructions to implement the earthwork volume calculation method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer-executable instructions. When the computer-executable instructions are called and executed by the processor, the computer-executable instructions prompt the processor to implement the earthwork volume calculation method according to any one of claims 1 to 7.
Citation Information
Cited By
Curved surface fitting imaging method and system for deformed gene chip
CN119579826A
Method and system for curved surface fitting imaging of a gene chip with deformation
CN119579826B
Rock surface erosion volume calculation method based on curved surface fitting optimization
CN120672831A
