Compartment volume measurement method, computer device, storage medium and program product
By fitting a volume measurement plane to the point cloud inside the carriage, and combining low-precision 3D imaging equipment and fitting constraints, the problem of balancing efficiency and accuracy in carriage volume measurement was solved, achieving efficient and accurate volume measurement.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-27
- Publication Date
- 2026-03-27
AI Technical Summary
Existing technologies struggle to balance measurement efficiency and accuracy in measuring the volume of a vehicle compartment. Single-time acquisition of dimensional parameters is prone to errors due to vehicle compartment deformation or misalignment of measurement angles, while multiple acquisitions are too time-consuming.
By fitting the point cloud inside the carriage, a volume measurement plane is obtained. The dimensional parameters of the carriage are determined by the positional relationship between the volume measurement plane and the measurement points. Low-precision 3D imaging equipment is used in conjunction with fitting constraints to simplify data processing and improve measurement accuracy.
It achieves a balance between measurement efficiency and accuracy in the measurement of carriage volume, reduces measurement errors caused by deformation or angular errors, and improves the flexibility and accuracy of measurement.
Smart Images

Figure CN121740183A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of computer vision, and in particular, to a vehicle compartment volume measurement method, a computer device, a computer readable storage medium, and a computer program product. BACKGROUND
[0002] With the continuous development of science and technology, an "intelligent logistics" system emerges as the times require, and the volume measurement of a vehicle compartment is an indispensable part. After the volume of the vehicle compartment is measured, there is a definite basis for cost control, vehicle allocation, and loading rate, etc.
[0003] Currently, the volume measurement of a vehicle compartment usually involves the collection of size parameters, and then the calculation of the volume based on the size parameters. However, single collection of size parameters may cause measurement errors due to vehicle compartment deformation or misalignment of the measurement angle, and multiple collections of size parameters may consume a large amount of time, thereby leading to the situation that the final measured volume does not meet the actual measurement expectations of the user. Therefore, it is difficult to balance the measurement efficiency and the measurement accuracy when the volume of a vehicle compartment is measured. SUMMARY
[0004] Therefore, it is necessary to provide a vehicle compartment volume measurement method, a computer device, a computer readable storage medium, and a computer program product that balance the measurement efficiency and the measurement accuracy in view of the above technical problems.
[0005] In a first aspect, the present application provides a vehicle compartment volume measurement method, comprising:
[0006] Fitting an irregular surface associated with the volume measurement of the vehicle compartment in the vehicle compartment based on the vehicle compartment internal point cloud collected at the measurement point to obtain a volume measurement plane, wherein the vehicle compartment internal point cloud is obtained by scanning each inner wall surface of the vehicle compartment, and each inner wall surface includes the irregular surface;
[0007] Determining the size parameters of the vehicle compartment according to the positional relationship between the measurement point and the volume measurement plane;
[0008] Measuring the volume of the vehicle compartment according to the size parameters.
[0009] In one embodiment, fitting an irregular surface associated with the volume measurement of the vehicle compartment in the vehicle compartment based on the vehicle compartment internal point cloud collected at the measurement point to obtain a volume measurement plane comprises:
[0010] Selecting the irregular surface associated with the volume measurement of the vehicle compartment from each inner wall surface according to the position of the measurement point in the vehicle compartment;
[0011] determine a fitting constraint condition for fitting the irregular surface according to the point cloud inside the vehicle compartment;
[0012] fit the irregular surface according to the fitting constraint condition to obtain the volumetric measurement plane.
[0013] In one of the embodiments, the irregular surface includes a first irregular surface and a second irregular surface, the fitting constraint condition includes a first fitting constraint condition and a second fitting constraint condition; and the fitting the irregular surface according to the fitting constraint condition to obtain the volumetric measurement plane includes:
[0014] when fitting the first irregular surface, a first loop process is performed until the first fitting constraint condition is met; and the first loop process includes:
[0015] fit the first irregular surface according to at least three sampling points selected from the point cloud inside the vehicle compartment to obtain a first candidate plane;
[0016] determine first sampling points belonging to the first candidate plane from the point cloud inside the vehicle compartment;
[0017] compare a first sampling point statistic of the first sampling points with a first preset statistic threshold, wherein the fitting constraint condition is that the first sampling point statistic is greater than the first preset statistic threshold;
[0018] take the first candidate plane as the volumetric measurement plane corresponding to the first irregular surface;
[0019] when fitting the second irregular surface, a second loop process is performed until the second fitting constraint condition is met; and the second loop process includes:
[0020] update the point cloud inside the vehicle compartment to obtain an updated point cloud inside the vehicle compartment;
[0021] fit the second irregular surface according to at least three sampling points selected from the updated point cloud inside the vehicle compartment to obtain a second candidate plane;
[0022] determine second sampling points belonging to the second candidate plane from the updated point cloud inside the vehicle compartment; and compare a second sampling point statistic of the second sampling points with a second preset statistic threshold, wherein the second fitting constraint condition is that the second sampling point statistic is greater than the second preset statistic threshold;
[0023] take the second candidate plane as the volumetric measurement plane corresponding to the second irregular surface.
[0024] In one of the embodiments, the fitting constraint conditions include a third fitting constraint condition; and the step of taking the first candidate plane as the volume measurement plane corresponding to the first irregular surface includes:
[0025] According to a first distance between the first candidate plane and a preset coordinate center point, the interior points cloud of the vehicle compartment is divided into a first interior points cloud of the vehicle compartment and a second interior points cloud of the vehicle compartment;
[0026] A third sampling point statistic of the first interior points cloud of the vehicle compartment and a fourth sampling point statistic corresponding to the first interior points cloud of the vehicle compartment and the second interior points cloud of the vehicle compartment are determined respectively;
[0027] If the third sampling point statistic and the fourth sampling point statistic satisfy the third fitting constraint condition, the first candidate plane is taken as the volume measurement plane corresponding to the first irregular surface, wherein the third fitting constraint condition is that the third sampling point statistic is greater than a third preset statistic threshold value and the fourth sampling point statistic is greater than a fourth preset statistic threshold value;
[0028] If the third sampling point statistic or the fourth sampling point statistic does not satisfy the third fitting constraint condition, the first loop process is returned to be executed.
[0029] In one of the embodiments, the step of selecting the irregular surface associated with the volume measurement of the vehicle compartment from the inner wall surfaces according to the position of the measurement point in the vehicle compartment includes:
[0030] A measurement direction vector of the measurement point in the vehicle compartment is determined according to the position of the measurement point in the vehicle compartment;
[0031] A measurement angle between the measurement direction vector and the normal vector of each inner wall surface of the vehicle compartment is determined;
[0032] The irregular surface associated with the volume measurement of the vehicle compartment is selected from each inner wall surface according to each measurement angle.
[0033] In one of the embodiments, the volume measurement plane includes a first volume measurement plane and a second volume measurement plane parallel to the first volume measurement plane; and the step of determining the size parameter of the vehicle compartment according to the positional relationship between the measurement point and the volume measurement plane includes:
[0034] A second distance between the measurement point and the first volume measurement plane is determined according to the positional relationship between the measurement point and the first volume measurement plane, and a third distance between the measurement point and the first volume measurement plane is determined according to the positional relationship between the measurement point and the second volume measurement plane;
[0035] The size parameter of the vehicle compartment is obtained by fusing the second distance and the third distance.
[0036] In one of the embodiments, before the size parameter of the vehicle compartment is determined according to the positional relationship between the measurement point and the volume measurement plane, the vehicle compartment volume measurement method further comprises:
[0037] A fifth sampling point belonging to the volume measurement plane is obtained.
[0038] The volume measurement plane is optimized according to the fifth sampling point, and a volume measurement optimized plane of the volume measurement plane under a preset geometric constraint condition is obtained.
[0039] The volume measurement optimized plane is taken as the volume measurement plane.
[0040] In a second aspect, the present application further provides a vehicle compartment volume measurement device, comprising:
[0041] A fitting module is configured to fit an irregular surface associated with vehicle compartment volume measurement in a vehicle compartment according to a vehicle compartment internal point cloud collected at a measurement point, so as to obtain a volume measurement plane, wherein the vehicle compartment internal point cloud is obtained by scanning each internal wall surface of the vehicle compartment, and each internal wall surface comprises the irregular surface.
[0042] A determining module is configured to determine a size parameter of the vehicle compartment according to a positional relationship between the measurement point and the volume measurement plane.
[0043] A measuring module is configured to measure a volume of the vehicle compartment according to the size parameter.
[0044] In a third aspect, the present application further provides a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the following steps when executing the computer program:
[0045] An irregular surface associated with vehicle compartment volume measurement in a vehicle compartment is fitted according to a vehicle compartment internal point cloud collected at a measurement point, so as to obtain a volume measurement plane, wherein the vehicle compartment internal point cloud is obtained by scanning each internal wall surface of the vehicle compartment, and each internal wall surface comprises the irregular surface; a size parameter of the vehicle compartment is determined according to a positional relationship between the measurement point and the volume measurement plane; and a volume of the vehicle compartment is measured according to the size parameter.
[0046] In a fourth aspect, the present application further provides a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement the following steps:
[0047] According to the point cloud of the inside of the carriage collected at the measuring point, an irregular surface associated with the volume measurement of the carriage is fitted in the inside of the carriage to obtain a volume measurement plane, wherein the point cloud of the inside of the carriage is obtained by scanning each inner wall surface of the carriage, and each inner wall surface includes the irregular surface; according to the positional relationship between the measuring point and the volume measurement plane, the size parameter of the carriage is determined; and according to the size parameter, the volume of the carriage is measured.
[0048] In a fifth aspect, the present application further provides a computer program product comprising a computer program which, when executed by a processor, implements the following steps:
[0049] According to the point cloud of the inside of the carriage collected at the measuring point, an irregular surface associated with the volume measurement of the carriage is fitted in the inside of the carriage to obtain a volume measurement plane, wherein the point cloud of the inside of the carriage is obtained by scanning each inner wall surface of the carriage, and each inner wall surface includes the irregular surface; according to the positional relationship between the measuring point and the volume measurement plane, the size parameter of the carriage is determined; and according to the size parameter, the volume of the carriage is measured.
[0050] The vehicle compartment volume measurement method, the computer device, the computer readable storage medium and the computer program product have the following advantages. Firstly, the irregular surface associated with the vehicle compartment volume measurement is fitted by using the vehicle compartment internal point cloud obtained by scanning the inner wall surface of the vehicle compartment at the measurement point, so that the volume measurement plane is obtained. In this way, the irregular surface associated with the vehicle compartment volume measurement is fitted by using the vehicle compartment internal point cloud, and the volume measurement plane accurately reflects the geometric characteristics of the irregular surface. Then, the size parameter of the vehicle compartment is determined according to the positional relationship between the volume measurement plane and the measurement point. Finally, the volume of the vehicle compartment is measured by using the size parameter. Since the volume measurement surface is obtained by fitting the irregular surface associated with the vehicle compartment volume measurement in the inner wall surface of the vehicle compartment, the volume measurement plane has the characteristics associated with the vehicle volume measurement. Compared with the limited multi-point distributed sampling method, the volume measurement plane can more accurately reflect the geometric characteristics of the irregular surface. At the same time, the vehicle compartment internal point cloud is simplified to the volume measurement plane for representation, so that the size parameter of the vehicle compartment can be intuitively reflected from the spatial structure, thereby reducing the data processing amount in the process of determining the size parameter of the vehicle compartment. Therefore, the technical defects that the measurement error is caused by the deformation of the vehicle compartment or the misalignment of the measurement angle in the process of determining the size parameter of the vehicle compartment by using the volume measurement surface, and a large amount of time is consumed in the process of collecting the size parameter multiple times, and the volume measured finally does not meet the actual measurement expectation of the user are overcome. Therefore, when the volume is measured by using the size parameter determined by the volume measurement surface, the volume of the vehicle compartment that meets the actual measurement expectation of the user can be obtained. In other words, the measurement efficiency and the measurement accuracy are considered when the volume of the vehicle compartment is measured. BRIEF DESCRIPTION OF DRAWINGS
[0051] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related art, the following will briefly introduce the drawings needed to be used in the embodiments or the related art description. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without any creative effort.
[0052] Figure 1 A flowchart of a vehicle compartment volume measurement method in an embodiment;
[0053] Figure 2 An internal structure diagram of a vehicle compartment in a vehicle compartment volume measurement method in an embodiment;
[0054] Figure 3 A diagram of fitting a volume measurement plane in a vehicle compartment volume measurement method in an embodiment;
[0055] Figure 4Fig. 1 is a schematic diagram of a volume measurement plane for a vehicle compartment volume measurement method in one embodiment;
[0056] Figure 5 Fig. 2 is a schematic diagram of identifying size parameters of a vehicle compartment for a vehicle compartment volume measurement method in one embodiment;
[0057] Figure 6 Fig. 3 is a schematic diagram of a flow chart of a vehicle compartment volume measurement method in another embodiment;
[0058] Figure 7 Fig. 4 is a schematic diagram of a measurement point setting position for a vehicle compartment volume measurement method in one embodiment;
[0059] Figure 8 Fig. 5 is a schematic diagram of a plane fitting of fitting three irregular surfaces for a vehicle compartment volume measurement method in one embodiment;
[0060] Figure 9 Fig. 6 is a schematic diagram of selecting irregular surfaces based on measurement angles for a vehicle compartment volume measurement method in one embodiment;
[0061] Figure 10 Fig. 7 is a schematic diagram of solving size parameters of a vehicle compartment for a vehicle compartment volume measurement method in one embodiment;
[0062] Figure 11 Fig. 8 is a structural block diagram of a vehicle compartment volume measurement device in one embodiment;
[0063] Figure 12 Fig. 9 is an internal structure diagram of a computer device in one embodiment. DETAILED DESCRIPTION
[0064] In order to make the purpose, technical scheme and advantages of the present application clearer, the present application will be further described in detail below with reference to the drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and should not be used to limit the present application.
[0065] First of all, it should be understood that for the logistics field, measuring the volume of the carriage is the key to controlling the cost of land transportation, controlling the vehicle allocation and calculating the loading rate, and there are many ways to measure the volume of the carriage at present. For example, for a van trailer, a tape measure or a laser range finder is mainly used to measure the volume of the carriage. The measurement process is as follows: a tape measure or a laser range finder is used to sample and measure a single point along the length, width and height of the carriage, and the size parameters length, width and height are obtained, and the product of length, width and height is taken as the volume of the carriage. However, due to the deformation of the carriage body, the roughness of the carriage surface and the fact that the measurement angle cannot be aligned with the carriage boundary, the size parameters obtained by single-point sampling and measurement usually have large errors. In order to make up for the errors caused by single-point sampling and measurement, multiple distributed sampling is usually performed in the carriage, and the average value of the values measured by multiple points is taken as the size parameter, and finally the volume of the carriage is measured. However, the multi-point distributed sampling and measurement method not only increases the measurement time due to the complicated process, but also has certain limitations in measurement accuracy due to the limited number of samplings. Therefore, there is an urgent need for a carriage volume measurement method that takes into account the measurement efficiency and accuracy of the carriage volume measurement.
[0066] In one embodiment, as shown in Figure 1 A carriage volume measurement method is provided. The method is applied to a terminal in this embodiment, which includes but is not limited to a personal computer, a notebook computer, a smart phone and a tablet computer, etc. The terminal includes a fitting module, a determination module and a measurement module. The fitting module is used to fit irregular surfaces associated with carriage volume measurement in each inner wall surface of the carriage according to the point cloud of the inside of the carriage obtained by scanning each inner wall surface of the carriage at the measurement point, to obtain a volume measurement plane. The determination module is used to determine the size parameters of the carriage through the positional relationship between the measurement point and the volume measurement plane. The measurement module is used to measure the volume of the carriage according to the size parameters. Through the information interaction between the fitting module, the determination module and the measurement module, the positional relationship between the volume measurement plane and the measurement point can be determined by means of the volume measurement plane having the characteristics associated with the carriage volume measurement and accurately reflecting the geometric characteristics of the irregular surface, and the accurate size parameters of the carriage can be determined simply, thereby avoiding the problems of poor accuracy of the carriage volume measurement caused by poor accuracy of the size parameters obtained by single sampling and the low efficiency of the carriage volume measurement caused by too long time consumption of multiple samplings. Therefore, the measurement efficiency and accuracy of the carriage volume measurement can be taken into account. It should be understood that the method can also be applied to a server and a system including a terminal and a server, and can be realized through the interaction between the terminal and the server. In this embodiment, the method includes the following steps:
[0067] At step 202, according to the point cloud in the vehicle compartment collected at the measuring point, the irregular surface associated with the volume measurement of the vehicle compartment is fitted to obtain a volume measurement plane, wherein the point cloud in the vehicle compartment is obtained by scanning each inner wall surface of the vehicle compartment, and each inner wall surface includes an irregular surface.
[0068] It should be noted that the point cloud in the vehicle compartment is obtained by scanning each inner wall surface of the vehicle compartment, specifically a set of sampling points of the interior space of the vehicle compartment, wherein the sampling points of the point cloud in the vehicle compartment can include position information and intensity information, etc., the position information can be specifically three-dimensional coordinates of the sampling points , the intensity information can be specifically an intensity value of 0-255, each inner wall surface of the vehicle compartment collectively constitutes the boundary of the interior space of the vehicle compartment, and can specifically include a top wall surface, a side wall surface and a bottom wall surface, etc., for example, in an implementable manner, referring to Figure 2 , Figure 2 is a schematic diagram showing the internal structure of the vehicle compartment, wherein each inner wall surface of the vehicle compartment includes a top wall surface 11, a side wall surface 12, a side wall surface 13, a side wall surface 14, a side wall surface 15 and a bottom wall surface 16, wherein the side wall surface 12 is a surface away from the vehicle head, the side wall surface 14 is a surface close to the vehicle head, except that the side wall surface 12 is movable, the other inner wall surfaces of the vehicle compartment are fixed, the side wall surface 12 can load and unload goods when it is opened, and the side wall surface 12 can collectively constitute a closed interior space of the vehicle compartment with other inner wall surfaces when it is closed. It can be understood that when the side wall surface 12 is closed, each inner wall surface of the vehicle compartment can be used as an irregular surface associated with the volume measurement of the vehicle compartment, and when the side wall surface 12 is opened, the side wall surface other than the side wall surface 12 can be used as an irregular surface associated with the volume measurement of the vehicle compartment, because when the side wall surface 12 is opened, effective point cloud data cannot be scanned, and thus plane fitting of the side wall surface 12 cannot be realized.
[0069] It should be noted that since each inner wall surface of the vehicle compartment is irregular, in order to accurately reflect the geometric characteristics of the vehicle compartment, plane fitting can be performed on the surface based on the collected point cloud in the vehicle compartment. It can be understood that in order to realize the volume measurement of the vehicle compartment, only the specified surface is subjected to plane fitting when plane fitting is performed, wherein the determination of the irregular surface associated with the volume of the vehicle compartment can be determined based on the geometric relationship between the measuring point and the irregular surface, wherein the point cloud in the vehicle compartment can be collected by a three-dimensional imaging device, which can be specifically a planar scanning laser radar, and thus the complete volume measurement plane can be obtained by imaging processing of the irregular surface based on the point cloud in the vehicle compartment. The measuring point refers to the position point where the three-dimensional imaging device is placed to collect the point cloud in the vehicle compartment, which can be specifically the intersection of three or more surfaces, for example, in an implementable manner, referring to Figure 3 , Figure 3To illustrate the fitted volume measurement plane, where 21 is the measurement point and 22 is the fitted volume measurement plane, a preset three-dimensional coordinate system is shown in the figure. Since the volume measurement plane is a complete plane, then... It can reflect the dimensional parameter "height" of the carriage. It can reflect the dimensional parameter "width" of the carriage, and the distance between the measurement point and the volume measurement plane. The length of the carriage reflects its dimensional parameters. The volume of the carriage can be measured using these parameters; that is, the volume of the carriage is... .
[0070] It should be noted that the volume measurement plane is used for volume measurement, and specifically it can be a complete plane carrying partial dimensional parameters of the carriage. For example, in one feasible approach, it refers to... Figure 4 , Figure 4 To illustrate the volume measurement plane, we assume the interior space of the carriage is approximately cylindrical, with the measurement point located at the bottom left corner of the rear of the carriage. The volume measurement plane can then be a complete plane tangent to the inner right surface of the carriage. The depth of the carriage can be obtained through this volume measurement plane. The radius of the carriage can be obtained based on the distance from the measurement point to the plane. After reflecting the geometric characteristics of the carriage through the volume measurement plane, there is a simplified solution process for the carriage size parameters.
[0071] As an example, step 202 includes: connecting the measurement point and the origin of a preset three-dimensional coordinate system to obtain a measurement baseline; selecting any inner wall surface on each inner wall surface of the carriage as the inner wall surface to be measured; detecting whether the measurement baseline and the inner wall surface to be measured meet preset geometric constraints; if the measurement baseline and the inner wall surface to be measured meet the preset geometric constraints, then the inner wall surface to be measured is regarded as an irregular surface associated with the carriage volume measurement; and selecting from the inner wall surface of the carriage based on the distance from the point cloud inside the carriage collected at the measurement point to the irregular surface. The process proceeds to the point cloud to be fitted. The irregular surface is fitted using the point cloud to obtain the volume measurement plane. If the measurement baseline and the inner wall surface to be measured do not meet the preset geometric constraints, the process returns to the following steps: Select any inner wall surface from the various inner wall surfaces of the carriage as the inner wall surface to be measured, until an inner wall surface that meets the preset geometric constraints with the measurement baseline is selected. Specifically, the preset geometric constraints can be that the straight line in the inner wall surface to be measured is parallel to the measurement baseline. The point cloud to be fitted refers to the point cloud belonging to the irregular surface that is waiting to be fitted.
[0072] Step 204: Determine the dimensional parameters of the carriage based on the positional relationship between the measurement point and the volume measurement plane.
[0073] It should be noted that when the volume measurement plane can fully reflect the geometric characteristics of the irregular surface associated with the volume measurement of the vehicle compartment, the volume measurement plane will have a size parameter in a certain dimension, for example, in an implementable manner, with reference to Figure 5 , Figure 5 The schematic diagram for representing the size parameter of the vehicle compartment is shown in the figure, wherein the plane with solid lines is the volume measurement plane, E is the measurement point, and the volume of the vehicle compartment is calculated by the size parameters long , wide and high The size parameter long is determined by the positional relationship between the measurement point 31 and the volume measurement plane 32, and the size parameters wide and high are carried by the volume measurement plane 32, wherein may be the distance between the measurement point and the vertical point of the measurement point on the volume measurement plane.
[0074] As an example, step 204 includes: determining a first size parameter of the vehicle compartment according to the positional relationship between the measurement point and the volume measurement plane, extracting a second size parameter on the volume measurement plane, and taking the first size parameter and the second size parameter together as the size parameter of the vehicle compartment.
[0075] In an implementable manner, assuming that the three-dimensional position coordinates of the measurement point are , and the plane equation of the volume measurement plane is , the first size parameter can be:
[0076]
[0077] wherein is the inclination of the volume measurement plane in the x-axis direction, is the inclination of the volume measurement plane in the y-axis direction, is the inclination of the volume measurement plane in the z-axis direction, is a constant term, and d is the first size parameter, and it can be understood that , , and are known quantities.
[0078] Step 206, according to the size parameter, the volume of the vehicle compartment is measured.
[0079] As an example, step 206 includes: taking the product of the first size parameter and the second size parameter as the measured volume.
[0080] In an implementable manner, the first size parameter is , and the second size parameter is and The measured volume of the vehicle compartment is:
[0081]
[0082] wherein v is the volume of the vehicle compartment.
[0083] In the above method for measuring the volume of the vehicle compartment, firstly, the irregular surface associated with the volume measurement of the vehicle compartment is determined in each inner wall surface of the vehicle compartment through the measurement point and the preset geometric constraint condition, then the irregular surface is taken as the screening condition for screening the point cloud of the interior of the vehicle compartment obtained by scanning each inner wall surface of the vehicle compartment at the measurement point, the point cloud belonging to the irregular surface and waiting for fitting is obtained by screening the point cloud of the interior of the vehicle compartment, and the volume measurement surface is obtained by fitting the irregular surface through the above point cloud, then the first size parameter is obtained through the positional relationship between the volume measurement surface and the measurement point, and the second size parameter is extracted from the volume measurement surface, so that the size parameters of the vehicle compartment are integrated, and the product of the size parameters of the vehicle compartment is taken as the volume of the vehicle compartment. Since the volume measurement surface is obtained by fitting the irregular surface associated with the volume measurement of the vehicle compartment in the inner wall surface of the vehicle compartment, the volume measurement plane has the characteristics associated with the volume measurement of the vehicle, and since the volume measurement plane is obtained based on all the point clouds of the interior of the vehicle compartment, it can more accurately reflect the geometric characteristics of the irregular surface compared to the limited multi-point distributed sampling method. At the same time, a large amount of point cloud of the interior of the vehicle compartment is simplified to the volume measurement plane for characterization, which can more intuitively reflect the size parameters of the vehicle compartment from the spatial structure, thereby reducing the amount of data processing in the process of determining the size parameters of the vehicle compartment. Therefore, the technical defects that the measurement error is caused by the deformation of the vehicle compartment or the misalignment of the measurement angle due to single collection of size parameters, and a large amount of time is consumed due to multiple collection of size parameters, thereby leading to the situation that the finally measured volume does not meet the actual measurement expectation of the user, are overcome. Therefore, when the volume is measured based on the size parameters determined by the volume measurement surface, the volume of the vehicle compartment that meets the actual measurement expectation of the user can be obtained, that is, the measurement efficiency and the measurement accuracy are considered when the volume of the vehicle compartment is measured.
[0084] In one embodiment, as shown in Figure 6 , the irregular surface associated with the volume measurement of the vehicle compartment is fitted based on the point cloud of the interior of the vehicle compartment collected at the measurement point to obtain the volume measurement plane, including:
[0085] Step 302, selecting the irregular surface associated with the volume measurement of the vehicle compartment in each inner wall surface of the vehicle compartment according to the position of the measurement point in the vehicle compartment;
[0086] It should be noted that in the actual measurement scene, the configuration of the high-precision three-dimensional imaging device will lead to the increase of the measurement cost for measuring the volume of the vehicle compartment, and with the continuous development of technology, the low-precision three-dimensional imaging device is not only low in price, but also in continuous optimization, such as TOF (Time of flight, time of flight) camera, line scanning laser radar and cloud platform three-dimensional imaging device. In order to control the measurement cost of measuring the volume of the vehicle compartment, the low-precision three-dimensional imaging device can be used to replace the high-precision three-dimensional imaging device to measure the volume of the vehicle compartment. Compared with the high-precision three-dimensional imaging device, the completeness of the volume measurement plane obtained by fitting the irregular surface of the low-precision three-dimensional imaging device is poor, and thus specific fitting constraints need to be set to fit the required volume measurement plane.
[0087] It should be noted that due to the different deployment requirements of the measurement point in the actual application scene, the position of the measurement point in the vehicle compartment is selected to select the irregular surface associated with the volume measurement of the vehicle compartment, for example, in an implementable manner, a mapping relationship table between the position attribute of the measurement point position and the irregular surface is established, when the position of the measurement point is P1, the selected irregular surface is V1, when the position of the measurement point is P2, the selected irregular surface is V2, and the mapping relationship table is as follows: Figure 7 , Figure 7 The setting position diagram of the measurement point is shown in the figure. Since different size parameters need to be determined based on the distance of A1 to each volume measurement plane, if A1 is set as the measurement point, the position attribute is 1, and then the inner wall surfaces B1, B2 and B3 are selected as the irregular surface associated with the volume measurement of the vehicle compartment. If A2 is set as the measurement point, the position attribute is 2, and then the inner wall surfaces B1, B2, B3, B4, B5 and B6 are selected as the irregular surface associated with the volume measurement of the vehicle compartment. If A3 is set as the measurement point, the position attribute is 3, and then the inner wall surfaces B4, B5 and B6 are selected as the irregular surface associated with the volume measurement of the vehicle compartment. If A4 is set as the measurement point, the position attribute is 4, and then the inner wall surfaces B1, B2, B3 and B4 are selected as the irregular surface associated with the volume measurement of the vehicle compartment.
[0088] As an example, step 302 includes: determining the position attribute of the measurement point according to the position of the measurement point in the vehicle compartment, querying the preset mapping table with the position attribute as the index to obtain the corresponding surface identifier, and selecting the inner wall surface identified by the surface identifier as the irregular surface associated with the volume measurement of the vehicle compartment.
[0089] Step 304, determining the fitting constraint condition for fitting the irregular surface according to the point cloud inside the vehicle compartment.
[0090] It should be noted that when the volume measurement plane fitted for any irregular surface cannot carry the size parameters of the carriage due to incompleteness, the fitting constraint condition can be set so that the volume measurement plane and the volume measurement plane can reflect the size parameters of the carriage. It can be understood that the fitting constraint condition is different when the number of selected irregular surfaces is different. For example, in an implementable manner, with reference to Figure 8 , Figure 8 A plane fitting diagram for fitting three irregular surfaces is shown, where the measurement point is set at 41, the distance between the volume measurement plane 42 and the measurement point 41 is the size parameter "length", the distance between the volume measurement plane 43 (front surface) and the measurement point 41 is the size parameter "width", and the distance between the volume measurement plane 44 (top surface) and the measurement point is the size parameter "height". Further, the fitting constraint condition is that the volume measurement planes fitted for the three irregular surfaces are perpendicular or approximately perpendicular to each other.
[0091] It should be noted that for any irregular surface, under the condition of no constraint, a plurality of planes can be fitted by the point cloud inside the carriage, and different sampling points of the point cloud inside the carriage belong to different irregular surfaces. Therefore, the plane structure of different irregular surfaces can be determined by segmenting the point cloud inside the carriage, and further fitting constraint conditions can be established based on the plane structure.
[0092] As an example, step 304 includes segmenting the point cloud inside the carriage to obtain point cloud subsets belonging to each irregular surface, and determining the fitting constraint condition for fitting the irregular surface according to the plane fitted from each point cloud subset.
[0093] It can be understood that the plane preliminarily fitted based on the point cloud subset can represent the approximate geometry of different irregular surfaces to some extent, and further fitting constraint conditions between the planes can be extracted to lay the foundation for further fitting the volume measurement plane that meets the fitting constraint condition.
[0094] Step 306, fitting the irregular surface according to the fitting constraint condition to obtain the volume measurement plane.
[0095] As an example, step 306 includes fitting each irregular surface by each point cloud subset under the constraint of the fitting constraint condition to obtain the volume measurement plane corresponding to each irregular surface.
[0096] It can be understood that after fitting the volume measurement plane corresponding to each irregular surface based on the fitting constraint condition, the different volumes of the carriage can be simply calculated according to the geometric relationship between each volume measurement plane and the position relationship between each volume measurement plane and the measurement point.
[0097] In the embodiment, first, irregular surfaces associated with the volume measurement of the vehicle cabin are selected from each inner wall surface of the vehicle cabin by measuring the positions of the points in the vehicle cabin, in other words, a plurality of irregular surfaces reflecting different size parameters of the vehicle cabin can be determined by measuring the positions of the points in the vehicle cabin, and then a preliminary fitting of the plurality of irregular surfaces is performed by the point cloud in the vehicle cabin to reflect the geometric characteristics of the different irregular surfaces, and then fitting constraint conditions required to be satisfied by the different irregular surfaces are extracted, and finally the fitting of the plurality of irregular surfaces is completed under the fitting constraint conditions to obtain the volume measurement planes corresponding to the different irregular surfaces. Since the irregular surfaces associated with the volume measurement of the vehicle cabin can be selected from the measuring points arranged at any position, the plurality of irregular surfaces reflecting the size parameters of the vehicle cabin can be determined by measuring the positions of the points in the vehicle cabin, and then the point cloud in the vehicle cabin can be collected by the low-precision three-dimensional imaging device, and after the fitting constraint conditions of the plurality of irregular surfaces are determined, the volume measurement planes corresponding to the plurality of irregular surfaces fitted under the fitting constraint conditions can more accurately reflect the different size parameters of the vehicle cabin. Therefore, the fitting manner of the embodiment lays a foundation for taking into account the measurement efficiency and measurement accuracy while improving the measurement flexibility of the volume measurement of the vehicle cabin.
[0098] In one embodiment, the irregular surface includes a first irregular surface and a second irregular surface, and the fitting constraint condition includes a first fitting constraint condition and a second fitting constraint condition; fitting the irregular surface according to the fitting constraint condition to obtain the volume measurement plane includes: when fitting the first irregular surface, performing a first loop process until the first fitting constraint condition is met; the first loop process includes: fitting the first irregular surface according to at least three sampling points selected from the point cloud in the vehicle cabin to obtain a first candidate plane; determining first sampling points belonging to the first candidate plane in the point cloud in the vehicle cabin; comparing a first sampling point statistic of the first sampling points with a first preset statistic threshold, wherein the fitting constraint condition is that the first sampling point statistic is greater than the first preset statistic threshold; taking the first candidate plane as the volume measurement plane corresponding to the first irregular surface; when fitting the second irregular surface, performing a second loop process until the second fitting constraint condition is met; the second loop process includes: updating the point cloud in the vehicle cabin to obtain an updated point cloud in the vehicle cabin; fitting the second irregular surface according to at least three sampling points selected from the updated point cloud in the vehicle cabin to obtain a second candidate plane; determining second sampling points belonging to the second candidate plane in the updated point cloud in the vehicle cabin; comparing a second sampling point statistic of the second sampling points with a second preset statistic threshold, wherein the second fitting constraint condition is that the second sampling point statistic is greater than the second preset statistic threshold; and taking the second candidate plane as the volume measurement plane corresponding to the second irregular surface.
[0099] It should be noted that, in the process of obtaining the volume measurement plane based on the fitting of the irregular surface inside the vehicle compartment, when multiple irregular surfaces are involved in the fitting, since the point cloud inside the vehicle compartment can be fitted to obtain multiple volume measurement planes that meet the requirements, the determination of the volume measurement plane can be performed through the specified fitting constraint condition, and the point cloud inside the vehicle compartment is sequentially screened to improve the fitting efficiency of the plane fitting of multiple irregular surfaces. The first irregular surface refers to a reference irregular surface for fitting, which can be one in particular. The second irregular surface refers to a non-reference irregular surface for fitting, which can be one or more. It can be understood that, after the volume measurement plane corresponding to the first irregular surface is fitted, the point cloud inside the vehicle compartment belonging to the first irregular surface is removed through screening, which can reduce the number of plane fittings of the volume measurement plane corresponding to the second irregular surface. By analogy, the plane fitting efficiency of the second irregular surface can be improved. For example, as shown in FIG. 4, the volume measurement plane 42 is taken as the volume measurement plane corresponding to the first irregular surface, and the volume measurement plane 43 and the volume measurement plane 44 are taken as the volume measurement planes corresponding to the second irregular surface. First, a first loop process is performed based on a first fitting constraint condition to fit the volume measurement plane 42. Then, the point cloud belonging to the volume measurement plane 42 is screened from the point cloud inside the vehicle compartment, and a second loop process is performed based on a second fitting constraint condition until the volume measurement plane 43 and the volume measurement plane 44 are fitted. The order of fitting the volume measurement plane 43 and the volume measurement plane 44 is not specifically limited. Figure 8
[0100] It should be noted that the first sampling point statistic refers to the sampling point statistic belonging to the first candidate plane, which can be the number of sampling points with a distance less than a preset distance threshold to the first candidate plane or the proportion of the number of sampling points belonging to the first candidate plane in the overall number of point clouds inside the vehicle compartment. The second sampling point statistic refers to the sampling point statistic belonging to the second candidate plane, which can be the number of sampling points with a distance less than a preset distance threshold to the second candidate plane or the proportion of the number of sampling points belonging to the second candidate plane in the overall number of point clouds inside the vehicle compartment. The first preset statistical threshold and the second preset statistical threshold are set according to actual requirements. It can be understood that the first preset statistical threshold and the second preset statistical threshold can be the same or different.
[0101] As an example, when fitting the first irregular surface, a first loop process is performed until the first fitting constraint condition is met. The first loop process includes:
[0102] Three sampling points are randomly selected from the point cloud in the vehicle compartment, a first plane equation is solved according to position coordinates of the three sampling points, and a plane described by the first plane equation is taken as a first candidate plane; a first sampling point belonging to the first candidate plane in the point cloud in the vehicle compartment is determined according to a size relationship between a distance from the point cloud in the vehicle compartment to the first candidate plane and a first preset distance threshold value;
[0103] When the point cloud proportion of the first sampling point in the point cloud in the vehicle compartment is greater than the first preset point cloud proportion threshold value, the first candidate plane is taken as a volume measurement plane of the first irregular surface; when the second irregular surface is fitted, a second loop process is performed until a second fitting constraint condition is met, and the second loop process includes:
[0104] The first sampling point is removed from the point cloud in the vehicle compartment to obtain an updated point cloud in the vehicle compartment; three sampling points are randomly selected from the updated point cloud in the vehicle compartment, a second plane equation is solved according to position coordinates of the three sampling points, and a plane described by the second plane equation is taken as a second candidate plane; a second sampling point belonging to the second candidate plane in the point cloud in the vehicle compartment is determined according to a size relationship between a distance from the point cloud in the vehicle compartment to the first candidate plane and a second preset distance threshold value, wherein the first preset distance threshold value and the second preset distance threshold value can be the same or different; a point cloud proportion of the second sampling point in the point cloud in the vehicle compartment is compared with a second preset point cloud proportion threshold value;
[0105] When the point cloud proportion of the second sampling point in the point cloud in the vehicle compartment is greater than the second preset point cloud proportion threshold value, the second candidate plane is taken as a volume measurement plane of the second irregular surface.
[0106] In an implementable manner, assuming that irregular surfaces associated with vehicle volume measurement include a first irregular surface H1, a second irregular surface H2 and a third irregular surface H3, first, a point cloud quantity N of the point cloud in the vehicle compartment is counted, and a distance threshold value of a sampling point on a candidate plane is set as (a preset distance threshold value), and a distance threshold value of the sampling point on one side of the candidate plane is set as Then, the first irregular surface H1 is fitted first, and the fitting process is as follows: 1) three points are randomly sampled from the point cloud in the vehicle compartment, a first candidate plane is obtained by substituting position coordinates of the three points into a plane equation; 2) a point cloud with a distance from the point cloud in the vehicle compartment to the first candidate plane is taken as a first sampling point belonging to the first candidate plane; 3) a quantity M1 of the first sampling point is counted, and a minimum point cloud quantity contained by the first candidate plane is set as , or a proportion of the quantity M1 of the first sampling point in the overall quantity N of the point cloud in the vehicle compartment is counted and set the minimum proportion of the first sampling points in the point cloud inside the vehicle compartment ; 4) when M1 , or , the first candidate plane is taken as the volume measurement plane corresponding to the first irregular surface H1; after determining the volume measurement plane corresponding to the first irregular surface H1, the second irregular surface H2 is fitted, and the fitting process is as follows: 1) the first sampling points are removed from the point cloud inside the vehicle compartment to obtain an updated point cloud inside the vehicle compartment; 2) three points are randomly sampled in the updated point cloud inside the vehicle compartment, and a second candidate plane is obtained by substituting the position coordinates of the three points into the plane equation; 3) the point cloud with a distance from the second candidate plane is taken as the second sampling points belonging to the second candidate plane; 4) the number M2 of the second sampling points is counted, and the number of points contained in the second candidate plane is set to , or the proportion of the number M2 of the second sampling points in the total number N of the point cloud inside the vehicle compartment is counted and the minimum proportion of the second sampling points in the point cloud inside the vehicle compartment is set ; 5) when M2 , or , the second candidate plane is taken as the volume measurement plane corresponding to the second irregular surface H1; after determining the volume measurement plane corresponding to the second irregular surface H2, the third irregular surface H3 is fitted in the same way as the fitting of the second irregular surface H2, thereby completing the plane fitting process of the three irregular surfaces.
[0107] It can be understood that after the different volume measurement planes are fitted, the point clouds belonging to the different volume measurement planes are recorded, and the above fitting embodiments are carried out without considering whether the device coordinates are consistent with the size parameters of the vehicle compartment, i.e., the size parameters are all expressed in absolute values.
[0108] In the embodiment, when fitting multiple irregular surfaces, by setting corresponding fitting constraints for different irregular surfaces, the candidate planes fitted for the irregular surfaces are iteratively screened in the fitting process until the volume measurement plane meeting the fitting constraints is screened. Since the plane fitting of all the interior point clouds of the vehicle compartment is involved in the screening process, the volume measurement plane corresponding to the fitted irregular surface can more objectively reflect the geometric characteristics of the irregular surface. At the same time, in the fitting process of multiple irregular surfaces, the screening of the number of interior point clouds of the vehicle compartment is sequentially performed, so that the screening of different irregular surfaces does not need to completely rely on the overall interior point clouds of the vehicle compartment, and the fitting process of multiple irregular surfaces is time-consuming. Therefore, the plane fitting method of the embodiment can further lay a foundation for balancing the measurement efficiency and accuracy of the vehicle compartment volume.
[0109] In one embodiment, the fitting constraints include a third fitting constraint; and taking the first candidate plane as the volume measurement plane corresponding to the first irregular surface includes:
[0110] According to a first distance between the first candidate plane and the preset coordinate center point, the interior point clouds of the vehicle compartment are divided into first interior point clouds of the vehicle compartment and second interior point clouds of the vehicle compartment; a third sampling point statistic of the first interior point clouds of the vehicle compartment and a fourth sampling point statistic corresponding to the first interior point clouds of the vehicle compartment and the second interior point clouds of the vehicle compartment are determined respectively; if the third sampling point statistic and the fourth sampling point statistic meet the third fitting constraint, the first candidate plane is taken as the volume measurement plane corresponding to the first irregular surface, wherein the third fitting constraint is that the third sampling point statistic is greater than a third preset statistical threshold, and the fourth sampling point statistic is greater than a fourth preset statistical threshold; if the third sampling point statistic or the fourth sampling point statistic does not meet the third fitting constraint, the first loop process is returned to be executed.
[0111] It should be noted that, in the process of irregular surface fitting, due to the error of the collected point cloud in the vehicle compartment, the volume measurement plane corresponding to the irregular surface selected by the first fitting constraint condition and the second fitting constraint condition cannot reflect the boundary characteristics of the inner wall surface, and then the third fitting constraint condition can be set to judge the candidate plane again which meets the first fitting constraint condition or the second fitting constraint condition, and after meeting the third fitting constraint condition, the candidate plane is taken as the volume measurement plane corresponding to the irregular surface, wherein the third sampling point statistic can be the number of sampling points located on the side of the candidate plane away from the measurement point, the fourth sampling point statistic can be the ratio between the number of sampling points located on the side of the candidate plane away from the measurement point and the number of sampling points located on the side of the candidate plane close to the measurement point, and the third preset statistical threshold and the fourth preset statistical threshold can be set according to requirements, for example, the third preset statistical threshold can be set as the maximum number of point clouds located on the side of the candidate plane away from the measurement point, and the fourth preset statistical threshold can be set as the maximum ratio between the number of point clouds located on the side of the candidate plane away from the measurement point and the number of point clouds located on the side of the candidate plane close to the measurement point.
[0112] As an example, the point cloud in the vehicle compartment with a distance to the first candidate plane greater than the first distance between the first candidate plane and the preset coordinate center point is taken as the first vehicle interior point cloud, and the point cloud in the vehicle compartment with a distance to the first candidate plane less than or equal to the first distance is taken as the second vehicle interior point cloud; the first point cloud number of the first vehicle interior point cloud is counted, and the point cloud number ratio between the first point cloud number and the second point cloud number of the second vehicle interior point cloud is counted; when the first point cloud number is less than the set maximum point cloud number and the point cloud number ratio is less than the set maximum point cloud number ratio, the first candidate plane is taken as the volume measurement plane corresponding to the first irregular surface; when the first point cloud number is greater than or equal to the set maximum point cloud number, or the second point cloud number is greater than or equal to the set maximum point cloud number ratio, the first loop process is returned to execute.
[0113] In an implementable manner, the first distance of the first candidate plane to the preset coordinate center point is calculated as It can be understood that After obtaining the first candidate plane meeting the first constraint condition, the first point cloud number O located on the side of the first candidate plane away from the measurement point and the second point cloud number I located on the side of the first candidate plane close to the measurement point are counted respectively, and the number of point clouds allowed on the first candidate plane and away from the measurement point is set as and the ratio of the number of point clouds allowed on the side of the first candidate plane away from the measurement point and the number of point clouds allowed on the side of the first candidate plane close to the measurement point is set as , the first candidate plane is taken as the volume measurement plane corresponding to the first irregular surface, otherwise the generation and determination of the first candidate plane are re-performed. It can be understood that when determining whether the second candidate plane satisfying the second fitting constraint condition can be taken as the volume measurement plane corresponding to the second irregular surface, the above third fitting constraint condition can also be used for multiple determinations. and , the first candidate plane is taken as the volume measurement plane corresponding to the first irregular surface, otherwise the generation and determination of the first candidate plane are re-performed. It can be understood that when determining whether the second candidate plane satisfying the second fitting constraint condition can be taken as the volume measurement plane corresponding to the second irregular surface, the above third fitting constraint condition can also be used for multiple determinations.
[0114] In this embodiment, for the candidate plane meeting the preliminary fitting constraint condition, based on the comparison of the statistical quantities of the point clouds inside and outside the candidate plane, it is ensured that the candidate plane obtained by fitting the irregular surface is the boundary plane of the interior of the carriage, that is, the technical defect that the candidate plane parallel to the volume measurement plane is mistakenly taken as the volume measurement plane due to the error of the point cloud in the interior of the carriage or the error of the environment in the interior of the carriage is avoided, and the edge feature of the volume measurement plane obtained by fitting is fully ensured, so that after the irregular surface fitting according to the point cloud in the interior of the carriage, the volume measurement plane obtained can objectively feedback the geometric characteristics and edge characteristics of the irregular surface, and therefore, a foundation is laid for further improving the measurement accuracy of the volume measurement of the carriage.
[0115] In one embodiment, according to the position of the measurement point in the carriage, the irregular surface associated with the volume measurement of the carriage is selected from each inner wall surface of the carriage, including:
[0116] According to the position of the measurement point in the carriage, the measurement direction vector of the measurement point in the carriage is determined, the measurement angle between the measurement direction vector and the normal vector of each inner wall surface of the carriage is determined, and according to each measurement angle, the irregular surface associated with the volume measurement of the carriage is selected from each inner wall surface.
[0117] It should be noted that in the process of selecting the irregular surface associated with the volume measurement of the carriage, there are multiple inner wall surfaces that can be selected as the irregular surface. Since the placement position of the measurement point is fixed, the measurement angle of the three-dimensional measurement device is also fixed, and the larger the measurement angle, the more point clouds in the interior of the carriage can be scanned, and the geometric characteristics of the inner wall surface can be more comprehensively fed back, and then the irregular surface can be selected based on the measurement angle, referring to Figure 9 , Figure 9 To select the irregular surface based on the measurement angle, assuming that the measurement point 61 is the position of the measurement point in the compartment, when 3D imaging, the three surfaces close to the three-dimensional imaging device cannot generate effective point cloud data due to the small angle, and the selection of the irregular surface in the compartment is better determined at this time. When the measurement point 62 is the position of the measurement point in the compartment, point cloud data will be generated on each inner wall surface. Since only three surfaces need to be selected for plane fitting among the six surfaces, the positive correlation between the point cloud imaging quantity and the measurement angle can be used to filter the irregular surface on the mutually parallel inner wall surface through the measurement angle.
[0118] As an example, according to the position coordinates of the measurement point in the compartment and the origin coordinates of the preset three-dimensional coordinate system, the measurement direction vector of the measurement in the compartment is calculated; the reference plane of each inner wall surface is obtained, and the normal vector corresponding to each inner wall surface is calculated. Each normal vector and the measurement direction vector are input into a preset measurement angle calculation formula to calculate a plurality of measurement angles; the target measurement angle greater than the preset measurement angle is selected from the measurement angles, and the inner wall surface corresponding to the target measurement angle is selected as the irregular surface associated with the volume of the compartment. In this embodiment, the positive correlation between the measurement angle and the point cloud scanning quantity is used. When there are multiple inner wall surfaces with the same feature that can be selected as irregular surfaces, the inner wall surface with a larger measurement angle (more point cloud scanning quantity) is always selected as the irregular surface, that is, the geometric characteristics of the inner wall surface can be fed back to the greatest extent, thereby laying a foundation for more accurately fitting the volume measurement plane.
[0119] In one embodiment, the volume measurement plane includes a first volume measurement plane and a second volume measurement plane parallel to the first volume measurement plane; according to the positional relationship between the measurement point and the volume measurement plane, the size parameter of the compartment is determined, including:
[0120] According to the positional relationship between the measurement point and the first volume measurement plane, a second distance between the measurement point and the first volume measurement plane is determined, and according to the positional relationship between the measurement point and the second volume measurement plane, a third distance between the measurement point and the first volume measurement plane is determined; the size parameter of the compartment is obtained by fusing the second distance and the third distance.
[0121] It should be noted that when the measurement point is arranged at any position, the measurement point and the fitted volume measurement plane have no geometric relationship related to the size parameter of the compartment. At this time, the fitting amount of the irregular surface can be increased in the fitting process to construct the geometric relationship between the fitted volume measurement planes, so that the size parameter of the compartment can be solved without complex position coordinate conversion, for example, in an implementable manner, referring to Figure 10 , Figure 10As shown in FIG. 6, the size parameters of the vehicle compartment are solved by the schematic diagram, wherein the volume measurement plane 71 is parallel to the volume measurement plane 73, the volume measurement plane 72 is parallel to the volume measurement plane 74, and the volume measurement plane 75 is parallel to the volume measurement plane 76. Then, the size parameter "length" of the vehicle compartment is obtained by calculating the distance from the measurement point to the volume measurement plane 71 and the volume measurement plane 73, respectively, the size parameter "width" of the vehicle compartment is obtained by calculating the distance from the measurement point to the volume measurement plane 72 and the volume measurement plane 74, respectively, and the size parameter "height" of the vehicle compartment is obtained by calculating the distance from the measurement point to the volume measurement plane 75 and the volume measurement plane 76, respectively.
[0122] As an example, the second distance from the measurement point to the first volume measurement plane is calculated according to the position coordinates of the measurement point and the position coordinates of the measurement point perpendicular to the first volume measurement plane, and the third distance from the measurement point to the second volume measurement plane is calculated according to the position coordinates of the measurement point and the position coordinates of the measurement point perpendicular to the second volume measurement plane. The sum of the second distance and the third distance is taken as the size parameter of the vehicle compartment. In this embodiment, by setting the geometric constraint relationship between the planes in the fitting of the irregular surface, the size parameter of the vehicle compartment can be obtained by simple geometric conversion, so that the efficiency of converting the volume measurement plane to the size parameter of the vehicle compartment is improved, and the measurement efficiency of the vehicle compartment volume measurement is laid a foundation.
[0123] In one embodiment, before the size parameter of the vehicle compartment is determined according to the positional relationship between the measurement point and the volume measurement plane, the vehicle compartment volume measurement method further comprises:
[0124] A fifth sampling point belonging to the volume measurement plane is obtained, and the volume measurement plane is optimized according to the fifth sampling point to obtain a volume measurement optimization plane of the volume measurement plane under a preset geometric constraint condition. The volume measurement optimization plane is taken as the volume measurement plane.
[0125] As an example, before the size parameter of the vehicle compartment is determined, the geometric relationship between the obtained volume measurement planes may not satisfy the geometric constraint condition required by the vehicle compartment volume measurement, and the geometric relationship between the different volume measurement planes can be optimized based on the set geometric constraint condition to facilitate the determination of the size parameter. For example, in an implementable manner, the set geometric constraint condition can be that the three volume measurement planes are perpendicular to each other and the plane normal vectors of the volume measurement planes are unit vectors, and the geometric relationship between the volume measurement planes is optimized by the least square method to minimize the distance from the point cloud inside the vehicle compartment belonging to different volume measurement planes to the volume measurement plane. For example, it is assumed that the three volume measurement planes are M1, M2 and M3 in turn, the plane equation of M1 is , the plane equation of M2 is The plane equation of M3 is The optimization expression is as follows:
[0126]
[0127] wherein,
[0128]
[0129] wherein, is a point cloud set belonging to the volume measurement plane M1, is a point cloud set belonging to the volume measurement plane M2, is a point cloud set belonging to the volume measurement plane M3, is a normal vector of the volume measurement plane M1, is a normal vector of the volume measurement plane M1, is a normal vector of the volume measurement plane M1, , , , , , , , , , , , are all constants.
[0130] As an example, the fifth sampling point contained in the statistical volume measurement plane is included; according to the fifth sampling point, the volume measurement plane is optimized by using the least square method to obtain a volume measurement optimization plane; and the volume measurement optimization plane is taken as the volume measurement plane. In this embodiment, the volume measurement plane is optimized by the fifth sampling point contained in the volume measurement plane, the distance between the fifth sampling point and the volume measurement plane is minimized, and the volume measurement optimization plane obtained by optimization satisfies the preset geometric constraint condition, and then the volume measurement optimization plane is replaced by the volume measurement plane, so that the different volume measurement planes satisfy the preset geometric constraint condition, and the point cloud in the vehicle compartment accurately feeds back the geometric characteristics of the volume measurement plane. Therefore, it lays a foundation for accurately solving the size parameters of the vehicle compartment.
[0131] In an implementable mode, the three-dimensional imaging device is placed at the edge corner point of the lower left corner of the vehicle cabin, at this time only three inner wall surfaces away from the three-dimensional imaging device will generate effective vehicle cabin interior point cloud, and then the three-dimensional imaging device is used to collect the vehicle cabin interior point cloud generated in the vehicle cabin, and then three sampling points are selected in the vehicle cabin interior point cloud to fit a plurality of candidate planes, the plurality of candidate planes are screened through the first fitting constraint condition, the second fitting constraint condition and the third fitting constraint condition, and the corresponding volume measurement planes are fitted for the three inner wall surfaces, at this time, the least square method and the preset geometric constraint condition (constraining the three volume measurement planes to be perpendicular to each other and the normal vectors to be unit vectors) are used to optimize the three volume measurement planes, and the optimized volume measurement planes are used as the volume measurement planes again, and then the distance from the measurement points to the three volume measurement planes is used to obtain the size parameters of the length, the width and the height of the vehicle cabin in turn, and finally the product of the length, the width and the height is used as the volume of the vehicle cabin, and finally the measurement of the volume of the vehicle cabin is completed.
[0132] Since the volume measurement surface is fitted from the irregular surface in the vehicle cabin inner wall surface related to the vehicle cabin volume measurement, the volume measurement plane has the characteristics related to the vehicle volume measurement, and since the volume measurement plane is fitted based on all the vehicle cabin interior point cloud, compared with the limited multi-point distributed sampling mode, the irregular surface geometric characteristics can be more accurately reflected, at the same time, a large amount of vehicle cabin interior point cloud is simplified to the volume measurement plane for characterization, which can more intuitively reflect the size parameters of the vehicle cabin from the spatial structure, thereby reducing the data processing amount in the process of determining the size parameters of the vehicle cabin, so that the technical defects that the measurement error is caused by single collection of size parameters due to deformation of the vehicle cabin or misalignment of the measurement angle, and a large amount of time is consumed in multiple collection of size parameters, and the volume measured finally is not consistent with the actual measurement expectation of the user are overcome, so that when the volume is measured by relying on the size parameters determined by the volume measurement surface, the vehicle cabin volume consistent with the actual measurement expectation of the user can be obtained, that is, the measurement efficiency and the measurement accuracy are considered when the volume of the vehicle cabin is measured.
[0133] It should be understood that although the steps in the flowcharts involved in the above embodiments are shown in sequence according to the arrows, the steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified herein, the execution of the steps is not strictly limited in sequence, and the steps can be executed in other orders. Moreover, at least some of the steps in the flowcharts involved in the above embodiments can include multiple steps or multiple stages, which are not necessarily executed at the same time, but can be executed at different times, and the execution order of the steps or stages is not necessarily sequential, but can be alternately executed with at least part of other steps or stages.
[0134] Based on the same inventive concept, the embodiments of the present application also provide a vehicle compartment volume measuring device for implementing the above-mentioned vehicle compartment volume measuring method. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme described in the above method, so the specific limitations in one or more vehicle compartment volume measuring device embodiments provided below can refer to the limitations of the vehicle compartment volume measuring method described above, which will not be repeated here.
[0135] In one exemplary embodiment, as shown in Figure 11 a vehicle compartment volume measuring device is provided, comprising: an acquisition module 401, a determination module 402, and a measurement module 403, wherein:
[0136] The acquisition module 401 is configured to fit irregular surfaces associated with vehicle compartment volume measurement in the vehicle compartment according to the vehicle compartment internal point cloud collected at the measurement point, to obtain a volume measurement plane, wherein the vehicle compartment internal point cloud is obtained by scanning each inner wall surface of the vehicle compartment, and each inner wall surface includes the irregular surface;
[0137] The determination module 402 is configured to determine the size parameters of the vehicle compartment according to the positional relationship between the measurement point and the volume measurement plane;
[0138] The measurement module 403 is configured to measure the volume of the vehicle compartment according to the size parameters.
[0139] In one embodiment, the fitting module 401 is further configured to:
[0140] select irregular surfaces associated with vehicle compartment volume measurement in each inner wall surface according to the position of the measurement point in the vehicle compartment; determine fitting constraints for fitting the irregular surfaces according to the vehicle compartment internal point cloud; and fit the irregular surfaces according to the fitting constraints to obtain the volume measurement plane.
[0141] In one of the embodiments, the irregular surface includes a first irregular surface and a second irregular surface, and the fitting constraint condition includes a first fitting constraint condition and a second fitting constraint condition; the fitting module 401 is further configured to:
[0142] In fitting the first irregular surface, a first loop process is performed until the first fitting constraint condition is met; the first loop process includes: fitting the first irregular surface according to at least three sampling points selected from the interior point cloud of the vehicle compartment to obtain a first candidate plane; determining first sampling points belonging to the first candidate plane in the interior point cloud of the vehicle compartment; comparing a first sampling point statistic of the first sampling points with a first preset statistic threshold, wherein the fitting constraint condition is that the first sampling point statistic is greater than the first preset statistic threshold; taking the first candidate plane as the volume measurement plane corresponding to the first irregular surface; in fitting the second irregular surface, a second loop process is performed until the second fitting constraint condition is met; the second loop process includes: updating the interior point cloud of the vehicle compartment to obtain an updated interior point cloud of the vehicle compartment; fitting the second irregular surface according to at least three sampling points selected from the updated interior point cloud of the vehicle compartment to obtain a second candidate plane; determining second sampling points belonging to the second candidate plane in the updated interior point cloud of the vehicle compartment; comparing a second sampling point statistic of the second sampling points with a second preset statistic threshold, wherein the second fitting constraint condition is that the second sampling point statistic is greater than the second preset statistic threshold; and taking the second candidate plane as the volume measurement plane corresponding to the second irregular surface.
[0143] In one of the embodiments, the fitting constraint condition includes a third fitting constraint condition; the fitting module 401 is further configured to:
[0144] According to a first distance between the first candidate plane and a preset coordinate center point, the interior point cloud of the vehicle compartment is divided into a first interior point cloud of the vehicle compartment and a second interior point cloud of the vehicle compartment; a third sampling point statistic of the first interior point cloud of the vehicle compartment and a fourth sampling point statistic corresponding to the first interior point cloud of the vehicle compartment and the second interior point cloud of the vehicle compartment are respectively determined; if the third sampling point statistic and the fourth sampling point statistic meet the third fitting constraint condition, the first candidate plane is taken as the volume measurement plane corresponding to the first irregular surface, wherein the third fitting constraint condition is that the third sampling point statistic is greater than a third preset statistic threshold, and the fourth sampling point statistic is greater than a fourth preset statistic threshold; if the third sampling point statistic or the fourth sampling point statistic does not meet the third fitting constraint condition, the first loop process is returned to be performed.
[0145] In one of the embodiments, the fitting module 401 is further configured to:
[0146] According to the position of the measuring point at the vehicle cabin, a measuring direction vector of the measuring point at the vehicle cabin is determined; a measuring angle between the measuring direction vector and a normal vector of each inner wall surface of the vehicle cabin is determined; according to each measuring angle, an irregular surface associated with the vehicle cabin volume measurement is selected at each inner wall surface.
[0147] In one of the embodiments, the volume measurement plane includes a first volume measurement plane and a second volume measurement plane parallel to the first volume measurement plane; the determining module 402 is further configured to:
[0148] According to the positional relationship between the measuring point and the first volume measurement plane, a second distance between the measuring point and the first volume measurement plane is determined, and according to the positional relationship between the measuring point and the second volume measurement plane, a third distance between the measuring point and the first volume measurement plane is determined; by fusing the second distance and the third distance, a size parameter of the vehicle cabin is obtained.
[0149] In one of the embodiments, the vehicle cabin volume measurement device is further configured to:
[0150] A fifth sampling point belonging to the volume measurement plane is obtained; according to the fifth sampling point, the volume measurement plane is optimized to obtain a volume measurement optimized plane of the volume measurement plane under a preset geometric constraint condition; the volume measurement optimized plane is taken as the volume measurement plane.
[0151] Each module in the vehicle cabin volume measurement device described above can be realized by software, hardware and combinations thereof in whole or in part. Each module described above can be embedded in or independent of a processor in a computer device in hardware form, or can be stored in a memory in a computer device in software form, so as to be called and executed by a processor to perform the operations corresponding to each module.
[0152] In one exemplary embodiment, a computer device is provided, which can be a terminal, and an internal structure diagram of the computer device can be as shown in Figure 12As shown. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. Among them, the processor, the memory and the input / output interface are connected through the system bus, the communication interface, the display unit and the input device are connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capability. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operating system and the computer program in the non-volatile storage medium to run. The input / output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used to communicate with the external terminal in a wired or wireless manner. The wireless manner can be realized through WIFI, mobile cellular network, NFC (near field communication) or other technologies. The computer program is executed by the processor to realize a kind of car volume measurement method. Those skilled in the art can understand, Figure 12 The structure shown in the figure is only the block diagram of part of the structure related to the scheme of the present application, and does not constitute a limitation on the computer device to which the scheme of the present application is applied. The specific computer device can include more or fewer components than those shown in the figure, or combine certain components, or have a different component arrangement.
[0153] In one embodiment, a computer device is also provided, including a memory and a processor, the memory stores a computer program, and the processor executes the computer program to realize the steps in each method embodiment described above.
[0154] In one embodiment, a computer readable storage medium is provided, which stores a computer program, and the computer program is executed by a processor to realize the steps in each method embodiment described above.
[0155] In one embodiment, a computer program product is provided, which includes a computer program, and the computer program is executed by a processor to realize the steps in each method embodiment described above.
[0156] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer readable storage medium, and when the computer program is executed, the processes of the above-mentioned embodiments of the methods can be included. Any reference to memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical storage, high-density embedded non-volatile memory, resistive memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration but not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc. The database involved in the embodiments provided in the present application can include at least one of a relational database and a non-relational database. The non-relational database can include a distributed database based on a block chain, etc., without being limited thereto. The processor involved in the embodiments provided in the present application can be a general-purpose processor, a central processing unit, a graphics processing unit, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., without being limited thereto.
[0157] Any combination of the technical features of the above embodiments can be made. In order to make the description simple, all possible combinations of the technical features in the above embodiments are not described, however, as long as the combination of the technical features does not exist, it should be considered as the scope of the present application.
[0158] The above embodiments only express several implementation manners of the present application, and the description is more specific and detailed, but it should not be understood as a limitation on the scope of the patent of the present application. It should be pointed out that for ordinary skilled in the art, without departing from the concept of the present application, a number of modifications and improvements can be made, which are within the scope of protection of the present application. Therefore, the protection scope of the present application should be subject to the appended claims.
Claims
1. A method for measuring the volume of a carriage, characterized in that, The method includes: Based on the point cloud inside the carriage collected at the measurement points, the irregular surface inside the carriage associated with the volume measurement is fitted to obtain the volume measurement plane. The point cloud inside the carriage is obtained by scanning each inner wall surface of the carriage, and each inner wall surface includes the irregular surface. The dimensional parameters of the carriage are determined based on the positional relationship between the measurement point and the volume measurement plane; The volume of the carriage is measured according to the stated dimensional parameters.
2. The method according to claim 1, characterized in that, The step of fitting the irregular surface inside the carriage related to the volume measurement with the point cloud collected at the measurement points to obtain the volume measurement plane includes: Based on the location of the measurement point in the carriage, an irregular surface associated with the carriage volume measurement is selected from each of the inner wall surfaces; Based on the point cloud inside the carriage, the fitting constraints for fitting the irregular surface are determined. The irregular surface is fitted according to the fitting constraints to obtain the volume measurement plane.
3. The method according to claim 2, characterized in that, The irregular surface includes a first irregular surface and a second irregular surface, and the fitting constraint conditions include a first fitting constraint condition and a second fitting constraint condition; the step of fitting the irregular surface according to the fitting constraint conditions to obtain the volume measurement plane includes: When fitting the first irregular surface, a first loop process is executed until the first fitting constraint condition is met; the first loop process includes: Based on at least three sampling points selected from the point cloud inside the carriage, the first irregular surface is fitted to obtain a first candidate plane; Determine the first sampling point in the point cloud inside the carriage that belongs to the first candidate plane; Compare the first sampling point statistic of the first sampling point with a first preset statistic threshold, wherein the fitting constraint condition is that the first sampling point statistic is greater than the first preset statistic threshold; The first candidate plane is used as the volume measurement plane corresponding to the first irregular surface; When fitting the second irregular surface, a second loop process is executed until the second fitting constraint condition is met; the second loop process includes: The point cloud inside the carriage is updated to obtain the updated point cloud inside the carriage. Based on at least three sampling points selected from the updated point cloud inside the carriage, the second irregular surface is fitted to obtain a second candidate plane; Determine the second sampling point belonging to the second candidate plane in the updated point cloud inside the carriage; compare the second sampling point statistic and the second preset statistic threshold, wherein the second fitting constraint is that the second sampling point statistic is greater than the second preset statistic threshold; The second candidate plane is used as the volume measurement plane corresponding to the second irregular surface.
4. The method according to claim 3, characterized in that, The fitting constraints include a third fitting constraint; the step of using the first candidate plane as the volume measurement plane corresponding to the first irregular surface includes: Based on the first distance between the first candidate plane and the preset coordinate center point, the point cloud inside the carriage is divided into a first point cloud inside the carriage and a second point cloud inside the carriage. The third sampling point statistic and the fourth sampling point statistic corresponding to both the first and second carriage interior point clouds are determined respectively. If the third sampling point statistic and the fourth sampling point statistic satisfy the third fitting constraint, the first candidate plane is used as the volume measurement plane corresponding to the first irregular surface. The third fitting constraint is that the third sampling point statistic is greater than the third preset statistic threshold, and the fourth sampling point statistic is greater than the fourth preset statistic threshold. If the statistics of the third sampling point or the statistics of the fourth sampling point do not satisfy the third fitting constraint, then return to execute the first loop process.
5. The method according to claim 2, characterized in that, The step of selecting an irregular surface related to the volume measurement of the carriage from among the inner wall surfaces based on the location of the measurement point in the carriage includes: Based on the location of the measurement point in the carriage, determine the measurement direction vector of the measurement point in the carriage; Determine the measurement angle between the measurement direction vector and the normal vector of each inner wall surface of the carriage; Based on the respective measurement angles, an irregular surface associated with the measurement of the carriage volume is selected on each of the respective inner wall surfaces.
6. The method according to claim 1, characterized in that, The volume measurement plane includes a first volume measurement plane and a second volume measurement plane parallel to the first volume measurement plane; determining the dimensional parameters of the carriage based on the positional relationship between the measurement point and the volume measurement plane includes: Based on the positional relationship between the measurement point and the first volume measurement plane, a second distance between the measurement point and the first volume measurement plane is determined, and based on the positional relationship between the measurement point and the second volume measurement plane, a third distance between the measurement point and the first volume measurement plane is determined. The dimensions of the carriage are obtained by fusing the second distance and the third distance.
7. The method according to claim 1, characterized in that, Before determining the dimensional parameters of the carriage based on the positional relationship between the measurement point and the volume measurement plane, the carriage volume measurement method further includes: Obtain the fifth sampling point belonging to the volume measurement plane; Based on the fifth sampling point, the volume measurement plane is optimized to obtain the volume measurement optimized plane under preset geometric constraints. The volume measurement optimization plane is used as the volume measurement plane.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 7.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 7.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 7.