Method for rapidly measuring volume of granary and related product
By correcting the granary point cloud data in different directions and calculating the scaling ratio, the error problem during lidar measurement is solved, and fast and accurate granary volume measurement is achieved, reducing the calculation pressure.
Patent Information
- Application Number
- CN202411901793.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-23
- Publication Date
- 2025-04-29
AI Technical Summary
When measuring the volume of a cylindrical granary, the point cloud data deviation caused by equipment errors and installation errors affects the accuracy of the measurement. In addition, the traditional point cloud data calibration method is cumbersome to process and has a large amount of calculation, resulting in high calculation pressure.
By obtaining the manufacturing data and point cloud data of the granary, correcting the point cloud data in different directions, calculating the scaling ratio, and adjusting the point cloud data according to the scaling ratio to obtain the equivalent graph of the granary, thereby calculating its volume.
The radar point cloud data is quickly and accurately corrected, significantly reducing calculation pressure, and improving the speed and accuracy of granary volume measurement.
Smart Images

Figure CN119901204A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure generally relates to the field of measurement technology. More specifically, the present disclosure relates to a method for quickly measuring the volume of a grain silo and related products. Background Art
[0002] In the field of modern agriculture and storage, cylindrical silos are widely used for large-scale grain storage due to their strong structural stability and high material utilization. Accurately monitoring the amount of grain in these silos is a key part of food security management. Laser radar (LiDAR) technology is used to calculate the volume of remaining grain inside silos due to its high efficiency and accurate measurement capabilities. This technology can generate high-precision 3D point cloud images of the interior of the silo, providing data support for accurate estimation of grain volume.
[0003] However, in practical applications, LiDAR is affected by the inherent mechanical structure errors and installation errors of the equipment. These errors may make the acquired point cloud data unable to directly reflect the actual situation of the granary, thus affecting the accuracy of volume measurement. Traditional point cloud data calibration methods usually use cylindrical fitting technology to process regular cylindrical silo data. Although this method can achieve high correction accuracy, the processing process is cumbersome and the amount of calculation is large, which puts great pressure on the computing server, especially in large storage systems. This problem is particularly prominent.
[0004] Therefore, it is particularly important to develop a fast, efficient and computationally-reduced method for rapid correction of radar point clouds in silos. This method should be able to process point cloud data at high speed, quickly correct data deviations caused by radar errors and improper installation, ensure the accuracy of grain volume estimation, and thus improve the efficiency and response speed of the entire silo supervision system.
[0005] In view of this, there is an urgent need to provide a method for quickly measuring the volume of a granary and a solution for related products, so as to increase the speed of measuring the volume of the granary and improve the accuracy of detection. Summary of the invention
[0006] In order to at least solve one or more of the technical problems mentioned above, the present disclosure proposes a method for quickly measuring the volume of a granary and solutions for related products in multiple aspects.
[0007] In a first aspect, the present disclosure provides a method for quickly measuring the volume of a granary, the method comprising: obtaining manufacturing data of the granary; obtaining point cloud data of the granary as first data, a collection of the first data forming a first figure; correcting the first figure in different directions to obtain a second figure, wherein the second figure includes second data; calculating a scaling ratio based on the second data and the manufacturing data of the granary; adjusting the second figure based on the scaling ratio to obtain a third figure, wherein the third figure includes third data and is an equivalent figure of the granary; and calculating the volume of the granary based on the third data and the third figure.
[0008] In some embodiments, correcting the first figure in different directions respectively includes: correcting the first figure in a direction perpendicular to the bottom surface of the granary and in a direction parallel to the bottom surface of the granary.
[0009] In some embodiments, correcting the first graphic in the vertical direction includes: calculating a distortion rotation matrix of the first data based on the first data; and processing the first data using the distortion rotation matrix to obtain first vertical data, wherein the first vertical data forms a first vertical graphic.
[0010] In some embodiments, the calculation of the distortion rotation matrix of the first data based on the first data includes: based on the first data, slicing the first graphic in a direction parallel to the bottom surface of the granary to obtain first vertical slice data, wherein the first vertical slice data forms a plurality of first vertical slice graphics; performing a first approximate processing on the first vertical slice data to obtain a plurality of first fitting vertical slice graphics, wherein the plurality of first fitting vertical slice graphics include center point data; performing a second approximate processing on the first fitting vertical center point graphics to obtain a direction vector of the first vertical center point graphics; and calculating the distortion rotation matrix based on the direction vector.
[0011] In some embodiments, the first approximation process includes ellipse fitting and the second approximation process includes straight line fitting.
[0012] In some embodiments, correcting the first graphic in the horizontal direction includes: based on the first vertical data, slicing the first vertical graphic in a direction parallel to the bottom surface of the granary to obtain first horizontal slicing data, wherein the first horizontal slicing data forms a plurality of first horizontal slicing graphics; performing circular fitting on the first horizontal slicing graphics to obtain a first horizontal fitting image, wherein the coordinates of the first horizontal fitting image form the first horizontal fitting data, and the first horizontal fitting data includes the second circle center position coordinates and the second circle radius of the first horizontal fitting image; calculating the average value of the second circle center position coordinates as the horizontal offset of the first vertical graphic; and based on the horizontal offset, translating the first horizontal fitting image in the horizontal direction to obtain a second graphic, wherein the second graphic includes second data.
[0013] In some embodiments, calculating the scaling ratio based on the second graphic and actual data of the granary includes: calculating a second average set of the second data based on the second data, wherein the second average set includes a radius average of the second graphic; and calculating the scaling ratio based on the radius average of the second graphic and the manufacturing data.
[0014] In some embodiments, adjusting the second graphic based on the scaling ratio to obtain a third graphic includes: enlarging or reducing the second graphic based on the scaling ratio to obtain third data.
[0015] In a second aspect, the present disclosure provides an electronic device for quickly measuring the volume of a granary, comprising: a processor; and a memory on which computer instructions for quickly measuring the volume of a granary are stored, and when the computer instructions are executed by the processor, the method described in any one of the first aspects is implemented.
[0016] In a third aspect, the present disclosure provides a computer-readable storage medium having stored thereon computer program instructions for rapidly measuring the volume of a grain silo, wherein when the computer program instructions are executed by one or more processors, the method according to any one of the first aspects is implemented.
[0017] By using the method for quickly measuring the volume of a granary as provided above, the speed of measuring the volume of a granary can be increased and the accuracy of detection can be improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] By reading the detailed description below with reference to the accompanying drawings, the above and other objects, features and advantages of the exemplary embodiments of the present disclosure will become readily understood. In the accompanying drawings, several embodiments of the present disclosure are shown in an exemplary and non-limiting manner, and the same or corresponding reference numerals represent the same or corresponding parts, wherein:
[0019] Figure 1 An exemplary flow chart of a method 100 for quickly measuring the volume of a grain silo according to some embodiments of the present disclosure is shown;
[0020] Figure 2 An exemplary flow chart of a method 200 for correcting a first graphic in a direction perpendicular to the bottom surface of a grain bin according to some embodiments of the present disclosure is shown;
[0021] Figure 3 An exemplary flow chart of a method 300 for calculating a distortion rotation matrix of first data according to some embodiments of the present disclosure is shown;
[0022] Figure 4 An exemplary flow chart of a method 400 for correcting a first graphic in a direction parallel to the bottom surface of a grain bin in some embodiments of the present disclosure is shown;
[0023] Figure 5 An exemplary flow chart showing a method 500 of calculating a scaling ratio according to some embodiments of the present disclosure; and
[0024] Figure 6 An exemplary block diagram of an electronic device 600 for quickly measuring the volume of a grain silo according to some embodiments of the present disclosure is shown. DETAILED DESCRIPTION
[0025] The following will be combined with the drawings in the embodiments of the present disclosure to clearly and completely describe the technical solutions in the embodiments of the present disclosure. Obviously, the described embodiments are part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present disclosure.
[0026] It should be understood that the terms "include" and "comprising" used in the specification and claims of the present disclosure indicate the presence of described features, integers, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or collections thereof.
[0027] It should also be understood that the terms used in this disclosure are only for the purpose of describing specific embodiments and are not intended to limit the disclosure. As used in this disclosure and claims, the singular forms of "a", "an", and "the" are intended to include the plural forms unless the context clearly indicates otherwise. It should also be further understood that the term "and / or" used in this disclosure and claims refers to any combination of one or more of the associated listed items and all possible combinations, including these combinations.
[0028] As used in this specification and claims, the term "if" may be interpreted as "when" or "upon" or "in response to determining" or "in response to detecting," depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" may be interpreted as meaning "upon determination" or "in response to determining" or "upon detection of [described condition or event]" or "in response to detecting [described condition or event]," depending on the context.
[0029] The specific implementation of the present disclosure is described in detail below with reference to the accompanying drawings.
[0030] Figure 1 An exemplary flow chart of a method 100 for quickly measuring the volume of a grain silo according to some embodiments of the present disclosure is shown. Figure 1 As shown, the method includes: S101 obtaining the manufacturing data of the granary; S102 obtaining the point cloud data of the granary as the first data, and the collection of the first data forms a first figure; S103 correcting the first figure in different directions respectively to obtain a second figure, wherein the second figure includes the second data; S104 calculating the scaling ratio based on the second figure and the manufacturing data of the granary; S105 adjusting the second figure based on the scaling ratio to obtain a third figure, wherein the third figure includes the third data, and the third figure is the equivalent figure of the granary; and S106 calculating the volume of the granary based on the third data and the third figure.
[0031] In some embodiments, correcting the first figure in different directions includes: respectively correcting the first figure in a direction perpendicular to the bottom surface of the granary and in a direction parallel to the bottom surface of the granary.
[0032] In some embodiments, the manufacturing data of the aforementioned granary may include the bottom area of the granary bottom, the height of the granary, the building area of the granary, the plane utilization rate, the grain loading height and the grain density, etc. In some embodiments, the manufacturing data of the aforementioned granary may be obtained in a database (e.g., a grain warehouse construction standard database, etc.).
[0033] In some embodiments, the aforementioned point cloud data can be used to represent the data form of the surface characteristics of an object in three-dimensional space. It consists of a large number of discrete points, each of which contains at least three coordinates (X, Y, Z), that is, the position of the point in three-dimensional space. In addition to the basic three-dimensional coordinates, the points in the point cloud data can also contain other attributes, such as color (RGB value), intensity (reflectivity or return intensity), normal (geometric direction of the surface), curvature, etc. The point cloud data can include a large number of points, which can describe the shape and characteristics of the surface of the object in detail. The point cloud data provides three-dimensional geometric information of the object and can be used to reconstruct an accurate three-dimensional model of the object. In some embodiments, the point cloud data of the granary can be obtained by laser scanners, depth cameras, binocular cameras, optical camera multi-view reconstruction, and synthetic aperture radar systems. Preferably, this solution can select a laser scanner, which has the advantages of high precision and data processing. After obtaining the point cloud data of the granary, the aforementioned point cloud data can be used as the first data, and the collection of the aforementioned first data can form a first graph. In some embodiments, the aforementioned point cloud data may have different densities. Specifically, the density of the aforementioned point cloud data may reflect the number of point clouds within a certain range. The higher the point cloud density, the more accurately the characteristics and regularities of the aforementioned granary can be described. In some embodiments, the aforementioned first figure may be formed by a geometric form in a three-dimensional space formed by a set of first data.
[0034] In some embodiments, correcting the first figure in different directions may include correcting the first figure in multiple directions. It is understandable that the first figure can be corrected in two mutually perpendicular directions, which can decompose the complex two-dimensional deformation problem into two relatively simple one-dimensional problems. Preferably, the first figure can be corrected in two directions parallel and perpendicular to the bottom surface of the granary. In this process, the processing of two-dimensional variable changes can be avoided by processing one-dimensional variable changes. Simple linear changes (such as translation, scaling) can be used to operate the granary in two directions parallel and perpendicular to the bottom surface of the granary, which can reduce the complexity of calculation and improve the efficiency of correction.
[0035] Specifically, the direction perpendicular to the bottom surface of the granary can be a vertical direction, and the direction parallel to the bottom surface of the granary can be a horizontal direction. In some embodiments, the center line of the first figure in the vertical direction can include a first axis, and the first axis can be an axis parallel to the vertical direction. The first axis can also be an inclined straight line or a curve. It can be understood that when the first axis is an inclined straight line, the first figure can be inclined in the vertical direction. In this case, when the volume of the first figure is calculated, the amount of calculation may be increased, and the possibility of calculation errors may even be increased. When the first axis is a curve, the first figure can also be a curved shape in the vertical direction. In this case, when the volume of the first figure is calculated, the amount of calculation may also be increased, and the possibility of calculation errors may be increased. When the first axis is a straight line, the first axis can be perpendicular to the bottom surface of the granary, and the calculation of the volume of the granary can be simplified. It can be understood that when the first axis is an inclined straight line or a curve, the granary can be corrected so that the first axis is a straight line perpendicular to the bottom surface of the granary, which can simplify the calculation of the volume of the granary. In some embodiments, after correcting the aforementioned first figure, a second figure can be obtained, and the first axis of the aforementioned second figure can be perpendicular to the bottom surface of the granary.
[0036] By correcting the first graph in different directions, the amount of calculation for calculating the volume of the granary can be reduced, thereby increasing the speed of measuring the volume of the granary. Figure 2 and attached Figure 4 Correction of the first figure in the vertical direction and in the horizontal direction are respectively introduced.
[0037] In some embodiments, in a direction parallel to the bottom surface of the granary, the second data may include the radius of the second figure. The manufacturing data of the granary may include the manufacturing radius of the granary, and the scaling ratio may be the ratio of the radius of the second figure to the manufacturing radius of the granary.
[0038] After obtaining the scaling ratio, the radius of the second figure can be enlarged or reduced using the scaling ratio, so that the third figure can be obtained. In some embodiments, by setting the aforementioned third figure, the volume of the aforementioned third figure can be approximated to the volume of the granary, and the volume of the granary can be obtained by measuring the volume of the third figure. In some embodiments, the aforementioned third figure can be a regular figure, and the volume of the third figure can be obtained according to its corresponding volume calculation formula (for example, if it is a cylinder, the volume of the third figure can be confirmed by the bottom area and height of the cylinder). In other embodiments, the volume of the third figure can also be obtained by methods such as segmentation or integration. Furthermore, the aforementioned third data can be imported into a three-dimensional reconstruction software (such as Geomagic software, Meshmixer software, etc.) to obtain its volume.
[0039] The method for quickly measuring the volume of a granary disclosed in the present invention can increase the speed of measuring the volume of a granary and improve the accuracy of detection.
[0040] Figure 2 FIG. 2 shows an exemplary flow chart of a method 200 for correcting a first graphic in a direction perpendicular to the bottom surface of a grain bin according to some embodiments of the present disclosure. Figure 2 As shown, the correction of the first graphic in the vertical direction includes: S201 calculating the distortion rotation matrix of the first data based on the first data; and S202 using the distortion rotation matrix to process the first data to obtain first vertical data, wherein the first vertical data forms a first vertical graphic.
[0041] In some embodiments, the aforementioned rotation matrix may be a matrix for representing rotation in three-dimensional space. It is a special orthogonal matrix used to rotate a vector by a specific angle along a fixed axis in a coordinate system. In some embodiments, the aforementioned distortion rotation matrix may represent that each vector in the first data is rotated by a specific angle relative to the axis of symmetry of the first figure. In some embodiments, the inverse rotation matrix implements a rotation operation opposite to the original rotation matrix, that is, restoring the rotated vector or object to the state before the rotation.
[0042] In some embodiments, the rotation matrix can be obtained by the relationship between vectors. Specifically, the rotation matrix can be obtained by vector cross product and unit vector. Specifically, the unit vector and rotation angle of the rotation axis can be determined, and then the rotation matrix can be calculated according to the Rodrigues' rotation formula. After obtaining the aforementioned rotation matrix, the aforementioned distortion rotation matrix can be obtained by calculating the inverse rotation matrix of the aforementioned rotation matrix. In other embodiments, the rotation matrix can also be obtained by coordinate transformation.
[0043] After obtaining the distortion rotation matrix of the aforementioned first data, the aforementioned distortion rotation matrix is multiplied by the aforementioned first data to obtain the first vertical data before the first data is rotated and changed. It can be understood that the aforementioned first vertical data can form a first vertical figure. In some embodiments, the aforementioned first data can be a new position and posture obtained by multiple rotations and other changes in the vertical direction of the figure corresponding to the manufacturing data of the granary. If the aforementioned rotation operation is to be undone and the aforementioned granary that has been rotated and deviated is restored to the vertical direction, the rotated first data can be multiplied by the aforementioned distortion rotation matrix, so that the data of the initial granary can be obtained, that is, the first vertical data, and the aforementioned first vertical data can form a first vertical figure.
[0044] It can be understood that the cross-section of the first figure in the direction parallel to the bottom surface of the granary can be an ellipse or other polygon. By correcting the first figure in the vertical direction, the cross-section of the first vertical figure in the direction parallel to the bottom surface of the granary can be a circle. When the volume of the granary needs to be calculated, the calculation amount of measuring the volume of the granary can be simplified, thereby increasing the speed of measuring the volume of the granary.
[0045] Figure 3 An exemplary flow chart of a method 300 for calculating a distortion rotation matrix of the first data in some embodiments of the present disclosure is shown. Figure 3 As shown, in some embodiments, the calculation of the distortion rotation matrix of the first data based on the first data includes: S301 slicing the first graphic based on the first data to obtain first vertical slice data; S302 performing a first approximate processing on the first vertical slice data to obtain a plurality of first vertical slice graphics, wherein the first vertical slice graphics include center point data, and performing a second approximate processing on the first graphic to obtain a direction vector of the first graphic; and S303 calculating the distortion rotation matrix based on the direction vector.
[0046] In some embodiments, the first approximation process includes ellipse fitting and the second approximation process includes straight line fitting.
[0047] In some embodiments, the first figure can be sliced in a direction parallel to the bottom surface of the granary. Specifically, when the first figure is a cylinder or an elliptical cylinder, the cylinder or elliptical cylinder can be divided into a plurality of first cylinders or first elliptical cylinders according to a preset height (e.g., 5 cm). The coordinates of the plurality of first cylinders or first elliptical cylinders can form first vertical slice data, and the plurality of first cylinders or first elliptical cylinders can form the first vertical slice figure.
[0048] The first vertical slice pattern may be the first cylinder or the first elliptical cylinder. It is understandable that the cross section of the first cylinder is circular, and the cross section of the first elliptical cylinder is elliptical.
[0049] In some embodiments, the coordinates of the first cylinder or the first elliptical cylinder in a direction parallel to the bottom surface of the granary can form first vertical slice data. It is understandable that the first vertical slice data is projected along a direction perpendicular to the bottom surface of the granary, so that the first vertical slice graph can be approximately obtained. In some embodiments, multiple first slice graphs can be obtained by slicing the first graph at different heights.
[0050] In some embodiments, performing a first approximate processing on the aforementioned first vertical slice data may include performing an ellipse fitting processing on the aforementioned first vertical slice data. Specifically, the aforementioned first vertical slice data may be fitted using methods such as the least squares method, the Lagrange multiplier method combined with the least squares method, a method based on geometric features, or a random sampling consistency algorithm, so that an ellipse matching the aforementioned first vertical slice data may be obtained. Preferably, the least squares method may be selected to fit the aforementioned first vertical slice data, and the aforementioned least squares method may determine the data fitting model parameters based on minimizing the sum of squared errors, and the coefficients of the ellipse may be determined by minimizing the sum of squared algebraic distances from each point in the data set to the elliptic curve.
[0051] It is understandable that the error of the data point of the present invention is mainly due to the small noise caused by the precision limitation of the measuring equipment, and the aforementioned least square method can effectively average these errors and find the coefficients that make all points as close to the elliptic curve as possible. Compared with some simple geometric estimation methods, it can consider the position information of each data point more carefully, so as to generate an elliptical figure that is more in line with the actual distribution of the data. In addition, when the data points are unevenly distributed, such as there are more data points in a certain part of the ellipse and less in other parts, the aforementioned least square method can still fit the ellipse by balancing the error contribution of each point. It will not be excessively biased towards a certain area due to the density of local data points, but considers the minimization of the overall error of all points to the ellipse. Further, Matlab software or Python software, etc. can be used to perform a first approximation on the aforementioned first vertical slice data, so that the first vertical slice data can be obtained.
[0052] It can be understood that, compared with the use of Lagrange multiplier method combined with least square method and other methods, the use of the aforementioned least square method requires less calculation, can obtain results quickly, and can improve measurement efficiency.
[0053] Through the aforementioned ellipse fitting, the ellipse parameters of the first ellipse that best suits the distribution of the point cloud layer can be obtained, wherein the ellipse parameters of the aforementioned first ellipse may include the center position coordinates, the length of the major axis, the length of the minor axis, etc. of the aforementioned first ellipse.
[0054] In some embodiments, performing a second approximation process on the aforementioned first vertical center point figure may include performing a straight line fitting on the aforementioned ellipse parameters based on the aforementioned first ellipse, so as to obtain the direction vector of the first figure. In some embodiments, the aforementioned straight line fitting may include finding a straight line that best represents the distribution trend of these data points in a given set of data points, which may be optimized to make the straight line as close as possible to all data points.
[0055] Specifically, a straight line fitting can be performed on the center point data set in the aforementioned ellipse parameters, wherein the least squares method can be used to perform a straight line fitting on the aforementioned center point data set, or the total least squares method can be used to perform a straight line fitting on the aforementioned center point data set, and in addition, a linear regression method can be used to perform a straight line fitting on the aforementioned center point data set. Preferably, a linear regression method can be selected to perform a straight line fitting on the center point data in the aforementioned ellipse parameters, so that the aforementioned center point data can be fitted into a first straight line.
[0056] It can be understood that the aforementioned first straight line can be an approximate value of the center point of each slice in the first figure, which can represent the central axis of the aforementioned first figure. In some embodiments, when the aforementioned first straight line is perpendicular to the bottom surface of the granary, the central axis of the aforementioned first figure can be perpendicular to the bottom surface of the granary, and the aforementioned first figure is not distorted in a direction parallel to the bottom surface of the granary. When the aforementioned first straight line is inclined to the bottom surface of the granary, the central axis of the aforementioned first figure can be inclined to the bottom surface of the granary, and the aforementioned first figure is distorted in a direction parallel to the bottom surface of the granary.
[0057] In some embodiments, based on the aforementioned direction vector, calculating the distortion rotation matrix may include determining a rotation axis and a rotation angle. Specifically, the aforementioned direction vector may be rotated to a direction perpendicular to the bottom surface of the granary to obtain the distortion rotation matrix of the process, wherein the aforementioned direction vector may be The second vector perpendicular to the bottom of the granary can be By cross-multiplying the aforementioned direction vector and the aforementioned second vector, the rotation axis vector can be obtained by the following formula
[0058]
[0059] in, can be a direction vector, It can be a second vector that is perpendicular to the bottom surface of the granary.
[0060] In some embodiments, the direction vector and the second vector The rotation angle θ is obtained. Specifically, the formula So it can be transformed into:
[0061]
[0062] in, Can be a direction vector The module length, The second vector The modulus of the second vector The modulus of can be set to 1 to simplify the operation.
[0063] Further, after obtaining the rotation axis vector After the rotation angle θ, the aforementioned distortion rotation matrix R can be confirmed by using the Rodriguez rotation formula. Specifically:
[0064] R=I+sinθK+(1-cosθ)K 2
[0065] Among them, R can be the distortion rotation matrix, I can be the unit matrix, θ can be the rotation angle, and K can be the rotation axis vector to be sure.
[0066] By solving the distortion rotation matrix of the first data, the rotation change information of the first graphic compared to the graphic formed by the granary manufacturing data can be accurately reflected, so that the first graphic can be easily inversely rotated to restore it to the image corresponding to the granary manufacturing data, thereby simplifying the measurement of the granary volume.
[0067] Figure 4 An exemplary flow chart of a method 400 for correcting the first graphic in a direction parallel to the bottom surface of the granary in some embodiments of the present disclosure is shown, as shown in FIG. Figure 4As shown, in some embodiments, the correcting the first graphic in the horizontal direction includes: S401 slicing the first vertical graphic based on the first vertical data to obtain first horizontal slicing data, wherein the first horizontal slicing data forms a plurality of first horizontal slicing graphics; S402 performing circular fitting on the first horizontal slicing graphic to obtain a first horizontal fitting image, wherein the coordinates of the first horizontal fitting image form first horizontal fitting data, and the first horizontal fitting data includes the second circle center position coordinates and the second circle radius of the first horizontal fitting image; S403 calculating the average value of the second circle center position coordinates as the horizontal offset of the first vertical graphic; and S404 translating the first vertical graphic of the first horizontal fitting image in the horizontal direction based on the horizontal offset to obtain a second graphic, wherein the second graphic includes second data.
[0068] In some embodiments, slicing the first corrected pattern may include slicing the first corrected pattern in a direction parallel to the bottom surface of the granary. Specifically, in a direction perpendicular to the bottom surface of the granary, the first corrected pattern is divided into a plurality of horizontal slices according to a preset height (e.g., 5 cm), and the plurality of horizontal slices may be parallel to the bottom surface of the granary, and their coordinates may form the first horizontal slice data.
[0069] In some embodiments, performing circular fitting on the aforementioned first horizontal slice graphic may include performing circular fitting using the least squares method, performing circular fitting using the geometric center method, and performing circular fitting using a random sampling consistency algorithm, thereby obtaining circular fitting data that best matches the distribution of the point cloud layer. The circular fitting data may include the coordinates of the center of the circle and the radius.
[0070] Furthermore, in the direction parallel to the bottom surface of the granary, the average value of the coordinates of the center of the circle of each slice mentioned above can be calculated, which can be used as the first horizontal center coordinate. It can be understood that when the data of the granary is measured without offset, the coordinates of the center of the circle can be set to zero, and the first horizontal center coordinate can be used as the offset of the first correction figure in the direction parallel to the bottom surface of the granary.
[0071] In some embodiments, after obtaining the offset, the center of each slice can be moved according to the offset, so as to obtain a horizontally corrected figure, which can be a second figure. It is understood that the cross section of the second figure parallel to the bottom surface of the granary can be a circle. The axis of the second figure can be a line connecting the centers of any two cross sections, and it is understood that the axis of the second figure can be overlapped as a straight line and is perpendicular to the bottom surface of the granary.
[0072] By correcting the first figure in the horizontal direction and obtaining the second figure, the axis of the second figure can be perpendicular to the bottom surface of the granary. When the volume of the granary needs to be calculated, the calculation amount of measuring the volume of the granary can be simplified, thereby increasing the speed of measuring the volume of the granary.
[0073] Figure 5 FIG. 5 shows an exemplary flow chart of a method 500 for calculating a scaling ratio according to some embodiments of the present disclosure. Figure 5 As shown, the method includes: S501, based on the second data, calculating a second average set of the second data, wherein the aforementioned second average set may include a radius average value of the second graphic; S502, based on the second graphic radius average value and the manufacturing data, calculating a scaling ratio.
[0074] In some embodiments, the second data may include the coordinates of the center of each slice layer of the second figure and the radius of the circle, which may be the circular fitting data of each slice layer. By averaging the radius of the circle of each slice layer, the average radius of the second figure may be obtained, and the average radius of the second figure may be r. Further, the cross-sectional radius R of the granary may be obtained according to the manufacturing data.
[0075] After obtaining the average radius r of the second figure and the cross-sectional radius R of the granary, the scaling ratio k of each slice can be calculated by the following formula, where:
[0076]
[0077] It can be understood that the scaling ratio k can represent the degree of change of the radius of each slice layer compared to the actual manufacturing radius after the circular fitting. When the scaling ratio is close to 1, it can be said that the error of the measured value of the layer compared to the actual manufacturing value is smaller. When the scaling ratio is far from 1, the error is larger than the actual manufacturing value, and further adjustment is required.
[0078] By calculating the scaling ratio, the magnitude of the error between the measured value and the manufactured value can be obtained, which can provide a basis for subsequent adjustment of the second graph using the scaling ratio, thereby improving the accuracy of detection.
[0079] In some embodiments, adjusting the second graphic based on the scaling ratio to obtain a third graphic includes: enlarging or reducing the second graphic based on the scaling ratio to obtain third data.
[0080] After obtaining the scaling ratio k, the circular fitting data of each slice layer can be transformed according to the scaling ratio, so as to obtain the third data, and the third data can form a third figure. It can be understood that at this time, after the aforementioned transformation, the third figure can be an equivalent figure of the granary, that is, the volume enclosed by the third figure can be equal to the volume of the granary, and the volume of the granary can be obtained by calculating the volume enclosed by the third figure. In some embodiments, the third data can be imported into the three-dimensional reconstruction software, and the volume corresponding to the third figure can be quickly obtained.
[0081] By calculating the third figure mentioned above, the volume of the granary can be quickly obtained.
[0082] Figure 6 FIG. 6 shows an exemplary block diagram of an electronic device 600 for quickly measuring the volume of a grain bin according to some embodiments of the present disclosure. Figure 6 As shown, the present invention discloses an electronic device for quickly measuring the volume of a granary, comprising: a processor; and a memory on which computer instructions for quickly measuring the volume of a granary are stored. When the computer instructions are executed by the processor, a method for quickly measuring the volume of a granary is implemented.
[0083] In some embodiments, the electronic device 600 may include a processor 610 and a memory 620, wherein the processor 610 and the memory 620 communicate with each other via a bus. The memory 620 stores computer instructions for simulating the rapid measurement of the volume of a granary. When the aforementioned computer instructions are executed by the processor 610, the electronic device 600 implements the method steps described in the above text in conjunction with the accompanying drawings: obtaining the manufacturing data of the granary; obtaining the point cloud data of the granary as the first data, wherein the collection of the first data forms a first graph; correcting the first graph in different directions to obtain a second graph, wherein the second graph includes the second data; calculating a scaling ratio based on the second data and the manufacturing data of the granary; adjusting the second graph based on the scaling ratio to obtain a third graph, wherein the third graph includes the third data, and the third graph is an equivalent graph of the granary; and calculating the volume of the granary based on the third data and the third graph.
[0084] According to the above description in combination with the accompanying drawings, those skilled in the art can also understand that the embodiments of the present application can also be implemented through software programs. Therefore, the present application also provides a computer-readable storage medium, on which computer program instructions for quickly measuring the volume of a granary are stored. When the computer program instructions are executed by one or more processors, the electronic device executes the method for quickly measuring the volume of a granary. The computer-readable storage medium stores computer-readable instructions for quickly measuring the volume of a granary. When the computer-readable instructions are executed by one or more processors, the present application is implemented in combination with Figure 1 -5 describes an analog method for quickly measuring the volume of a grain silo.
[0085] The computer-readable storage medium may be any suitable magnetic storage medium or magneto-optical storage medium, such as RRAM (Resistive Random Access Memory), DRAM (Dynamic Random Access Memory), SRAM (Static Random-Access Memory), EDRAM (Enhanced Dynamic Random Access Memory), HBM (High-Bandwidth Memory), HMC (Hybrid Memory Cube), etc., or any other medium that can be used to store the required information and can be accessed by the application, module, or both. Any such computer storage medium may be part of the device or accessible or connectable to the device. Any application or module described in the present invention may be implemented using computer-readable / executable instructions that may be stored or otherwise maintained by such a computer-readable medium.
[0086] It should also be understood that any module, unit, component, server, computer, terminal or device that executes instructions of the present invention examples may include or otherwise access computer-readable media, such as storage media, computer storage media or data storage devices (removable) and / or non-removable) such as disks, optical disks or tapes. Computer storage media may include volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information, such as computer-readable instructions, data structures, program modules or other data.
[0087] In summary, through the solution of the embodiment disclosed in this disclosure, the speed of measuring the volume of the granary can be increased and the accuracy of the measurement can be improved.
[0088] Although multiple embodiments of the present disclosure have been shown and described herein, it will be apparent to those skilled in the art that such embodiments are provided by way of example only. Those skilled in the art may think of many changes, modifications, and alternatives without departing from the thought and spirit of the present disclosure. It should be understood that in the process of practicing the present disclosure, various alternatives to the embodiments of the present disclosure described herein may be adopted. The attached claims are intended to define the scope of protection of the present disclosure, and therefore cover equivalents or alternatives within the scope of these claims.
Claims
1. A method for quickly measuring the volume of a granary, characterized in that: The method comprises: Obtaining manufacturing data of the granary; Acquire point cloud data of the granary as first data, wherein a collection of the first data forms a first graph; Correcting the first figure in different directions respectively to obtain a second figure, wherein the second figure includes second data; Calculating a scaling ratio based on the second data and the manufacturing data of the granary; Based on the scaling ratio, adjusting the second graph to obtain a third graph, wherein the third graph includes third data and is an equivalent graph of the granary; and Based on the third data and the third graph, the volume of the granary is calculated.
2. The method according to claim 1, characterized in that The correcting the first figure in different directions respectively includes: correcting the first figure in a direction perpendicular to the bottom surface of the granary and in a direction parallel to the bottom surface of the granary respectively.
3. The method according to claim 2, characterized in that The step of correcting the first figure in a direction perpendicular to the bottom surface of the granary comprises: Based on the first data, calculating a distortion rotation matrix of the first data; and The first data is processed using the distortion rotation matrix to obtain first vertical data, wherein the first vertical data forms a first vertical graph.
4. The method according to claim 3, characterized in that The step of calculating the distortion rotation matrix of the first data based on the first data includes: Based on the first data, the first graphic is sliced in a direction parallel to the bottom surface of the granary to obtain first vertical slice data, wherein the first vertical slice data forms a plurality of first vertical slice graphics; Performing a first approximation process on the first vertical slice data to obtain a plurality of first fitting vertical slice graphics, wherein the plurality of first fitting vertical slice graphics include center point data; performing a second approximation process on the first fitting vertical center point figure to obtain a direction vector of the first vertical center point figure; and Based on the direction vector, a distortion rotation matrix is calculated.
5. The method according to claim 4, characterized in that The first approximation process includes ellipse fitting, and the second approximation process includes straight line fitting.
6. The method according to claim 3, characterized in that The correcting the first graphic in the horizontal direction comprises: Based on the first vertical data, the first vertical graph is sliced in a direction parallel to the bottom surface of the granary to obtain first horizontal slice data, wherein the first horizontal slice data forms a plurality of first horizontal slice graphs; Performing circular fitting on the first horizontal slice graph to obtain a first horizontal fitting image, wherein the coordinates of the first horizontal fitting image form first horizontal fitting data, and the first horizontal fitting data includes the coordinates of the second circle center position and the second circle radius of the first horizontal fitting image; Calculating an average value of the coordinates of the second circle center position as the horizontal offset of the first vertical figure; and Based on the offset, the first horizontal fitting image is translated in a horizontal direction to obtain a second graph, wherein the second graph includes second data.
7. The method according to claim 1, characterized in that Calculating the scaling ratio based on the second graph and the manufacturing data of the granary includes: Based on the second data, a second average set of the second data is calculated, wherein the second average set includes a radius average value of the second graphic; A scaling ratio is calculated based on an average radius of the second graphic and the manufacturing data.
8. The method according to claim 1, characterized in that Adjusting the second graphic based on the scaling ratio to obtain a third graphic includes: enlarging or reducing the second graphic based on the scaling ratio to obtain third data.
9. An electronic device for quickly measuring the volume of a granary, characterized in that: include: processor; as well as A memory having computer instructions for rapidly measuring the volume of a grain silo stored thereon, wherein when the computer instructions are executed by a processor, the method according to any one of claims 1-8 is implemented.
10. A computer-readable storage medium, characterized in that: Computer program instructions for quickly measuring the volume of a granary are stored thereon, and when the computer program instructions are executed by one or more processors, the method according to any one of claims 1-8 is implemented.