A loading rate measurement method and device, electronic equipment and storage medium
By using point cloud data segmentation and interpolation, the loading rate of the carriage is automatically calculated, solving the problems of accuracy deviation and low efficiency of manual measurement, and realizing high-precision loading rate calculation.
Patent Information
- Application Number
- CN202210204908.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-03
- Publication Date
- 2026-02-06
- Estimated Expiration
- 2042-03-03
AI Technical Summary
In existing technologies, the calculation of the loading rate of a vehicle compartment relies on manual acquisition of the volume of the cargo, which results in measurement accuracy deviations and cumulative errors, making it impossible to accurately obtain the loading rate. Furthermore, the updates are not timely, leading to low efficiency and low accuracy in loading rate calculation.
By using point cloud data based on the target carriage, a single line of the point cloud is determined, segmented, and interpolated to obtain a set of voxels. The loading rate is calculated based on the number of voxels, and automated calculation is achieved using a loading rate measurement device and electronic equipment.
It has realized the automated calculation of the loading rate of the carriage, improved the calculation accuracy and precision, avoided the shortcomings of manual measurement, and ensured the efficiency and accuracy of loading rate calculation.
Smart Images

Figure CN116740166B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of traffic logistics, and particularly relates to a loading rate measuring method and device, electronic equipment and a storage medium. BACKGROUND
[0002] In the process of vehicle carrying goods, the loading rate of the vehicle compartment is a key indicator affecting the profit level of the entire logistics industry, and the loading rate directly affects train scheduling and unit freight cost. Generally, the loading rate of the vehicle compartment is calculated by manually obtaining the volume of the vehicle cargo in advance. However, the volume measurement accuracy of the vehicle cargo, the cumulative error and the specific difference in loading the vehicle cargo cannot obtain the actual loading rate of the vehicle cargo after loading.
[0003] In addition, the manual acquisition of the volume of the vehicle cargo is low in efficiency, and the vehicle compartment vehicle cargo data is not updated in time, and the accuracy cannot be verified. Therefore, there is an urgent need for a loading rate measuring method that can automatically calculate the loading rate of the vehicle cargo and improve the calculation accuracy. SUMMARY
[0004] The embodiments of the present application provide a loading rate measuring method and device, electronic equipment and a storage medium to automatically calculate the loading rate of the vehicle cargo and improve the calculation accuracy of the vehicle cargo.
[0005] The embodiments of the present application provide a loading rate measuring method, comprising:
[0006] Based on the point cloud data of the target vehicle compartment, a point cloud single line is determined;
[0007] The point cloud single line is segmented to obtain a segmented line segment corresponding to the point cloud single line;
[0008] The segmented line segment is subjected to an interpolation processing between line segments to obtain an interpolated line segment;
[0009] The interpolated line segment is subjected to a voxel filling processing to obtain a voxel set, and the voxel set includes filled voxels;
[0010] The number of the filled voxels is determined;
[0011] The loading rate of the target vehicle compartment is determined according to the number of the filled voxels.
[0012] The embodiments of the present application also provide a loading rate measuring device, comprising:
[0013] A single line determination module is configured to determine a point cloud single line based on point cloud data of a target vehicle compartment;
[0014] A single line segmentation module is configured to segment the point cloud single line to obtain a segmented line segment corresponding to the point cloud single line;
[0015] The line segment interpolation module is configured to perform line segment interpolation processing on the segmented line segments to obtain interpolated line segments.
[0016] The voxel filling module is configured to perform voxel filling processing on the interpolated line segments to obtain a voxel set, the voxel set including filled voxels.
[0017] The voxel number determination module is configured to determine the number of the filled voxels.
[0018] The loading rate determination module is configured to determine the loading rate of the target carriage according to the number of the filled voxels.
[0019] In some embodiments, the single line determination module is configured to:
[0020] establish a carriage coordinate system;
[0021] perform horizontal rotation of a target detector in the target carriage to an hth preset rotation angle based on a first plane of the carriage coordinate system by sending a horizontal rotation instruction;
[0022] perform scanning of the target detector at the hth preset rotation angle from bottom to top along a third coordinate axis of the carriage coordinate system by a preset angle by sending a scanning instruction, the target detector being configured to acquire a plurality of point cloud data corresponding to the hth preset horizontal rotation angle, h≤n, n being a total number of rotations;
[0023] receive the plurality of point cloud data corresponding to the hth preset horizontal rotation angle sent by the target detector, and connect the plurality of point cloud data corresponding to the hth preset horizontal rotation angle to obtain a point cloud single line corresponding to the hth preset horizontal rotation angle;
[0024] when it is detected that the target detector is horizontally rotated to an nth preset rotation angle, obtain n point cloud single lines corresponding to the n preset horizontal rotation angles, respectively.
[0025] In some embodiments, the single line segmentation module includes a roof point identification module, a tail point addition module, and a segmentation module, wherein,
[0026] The roof point identification module is configured to identify a roof point of the point cloud single line to obtain a point cloud single line after the roof point is removed.
[0027] The tail point addition module is configured to add a tail point to the point cloud single line after the roof point is removed to obtain a point cloud single line after the tail point is added, the tail point being located on a side surface of the target carriage.
[0028] The segmentation module is configured to segment the point cloud single line after the tail point is added into line segments to obtain segmented line segments.
[0029] In some embodiments, the roof point identification module is configured to:
[0030] determining a coordinate of the j+kth point cloud data in the point cloud single line and a coordinate of the jth point cloud data, j≤t, j+k≤t, t being a total number of point clouds in the point cloud single line, k being a positive integer;
[0031] subtracting the coordinate of the jth point cloud data in the point cloud single line from the coordinate of the j+kth point cloud data in the point cloud single line to obtain a judgment vector;
[0032] determining a first coordinate axis value of the judgment vector;
[0033] when the third coordinate axis value of the j+kth point cloud data and the third coordinate axis value of the jth point cloud data are both less than the third coordinate axis threshold value, and the first coordinate axis value of the judgment vector is less than or equal to the first coordinate axis threshold value, taking the j+kth point cloud data to the tth point cloud data in the point cloud single line as a roof point;
[0034] performing rejection on the roof point to obtain a point cloud single line after the roof point is rejected.
[0035] In some embodiments, the tail point adding module is configured to:
[0036] determine a position coordinate of the target detector;
[0037] based on a scanning order of the target detector scanning a preset angle from bottom to top along the third coordinate axis of the vehicle cabin coordinate system, determine a current tail point of the point cloud single line after the roof point is rejected;
[0038] when the current tail point is not located on a side surface of the target vehicle cabin, determine a ray passing through the current tail point through the position coordinate of the target detector;
[0039] obtain an intersection point of the ray and the side surface of the target vehicle cabin;
[0040] take the intersection point as a tail point of the point cloud single line after the roof point is rejected to obtain a point cloud single line after a tail point is added.
[0041] In some embodiments, the segmentation module is configured to:
[0042] based on the first plane of the vehicle cabin coordinate system, determine a distance between two adjacent point cloud data in the point cloud single line after the tail point is added;
[0043] when the distance is greater than a distance threshold value, segment a position between the two adjacent point cloud data to obtain a segmented line segment.
[0044] In some embodiments, the line segment interpolation module is configured to:
[0045] obtain an rth line segment and an r+1th line segment in the segmented line segment;
[0046] determining a to-be-interpolated line segment between the rth line segment and the (r+1)th line segment when the rth line segment and the (r+1)th line segment satisfy a preset condition;
[0047] determining a start point of the to-be-interpolated line segment and an end point of the to-be-interpolated line segment;
[0048] determining a direction vector according to the start point of the to-be-interpolated line segment and the end point of the to-be-interpolated line segment;
[0049] performing point cloud interpolation on the direction vector according to a preset step length to obtain interpolated point cloud data;
[0050] obtaining a line segment processed by interpolation based on the interpolated point cloud data.
[0051] In some embodiments, the line segment interpolation module comprises a to-be-interpolated line segment determination module configured to:
[0052] determining a start point and an end point of the rth line segment;
[0053] determining a start point and an end point of the (r+1)th line segment;
[0054] when a first coordinate axis value of the start point of the (r+1)th line segment is less than a first coordinate axis value of the end point of the rth line segment, or when the first coordinate axis value of the start point of the (r+1)th line segment is greater than or equal to the first coordinate axis value of the end point of the rth line segment and a third coordinate axis value of the start point of the (r+1)th line segment is greater than or equal to a third coordinate axis value of the end point of the rth line segment, determining a first to-be-interpolated line segment between the rth line segment and the (r+1)th line segment, wherein a start point of the first to-be-interpolated line segment is the end point of the rth line segment, and an end point of the first to-be-interpolated line segment is the start point of the (r+1)th line segment;
[0055] when the first coordinate axis value of the start point of the (r+1)th line segment is not less than the first coordinate axis value of the end point of the rth line segment, the third coordinate axis value of the start point of the (r+1)th line segment is less than the third coordinate axis value of the end point of the rth line segment, and the first coordinate axis value of the end point of the rth line segment is not less than the first coordinate axis value of the start point of the rth line segment, determining a second to-be-interpolated line segment between the rth line segment and the (r+1)th line segment, wherein a start point of the second to-be-interpolated line segment has coordinates of the first coordinate axis value of the end point of the rth line segment, a second coordinate axis value of the end point of the rth line segment, and a third coordinate axis value of the start point of the (r+1)th line segment, and an end point of the second to-be-interpolated line segment is the start point of the (r+1)th line segment;
[0056] When the first coordinate axis value of the start point of the r+1th line segment is not less than the first coordinate axis value of the end point of the rth line segment, the third coordinate axis value of the start point of the r+1th line segment is less than the third coordinate axis value of the end point of the rth line segment, and the first coordinate axis value of the end point of the rth line segment is less than the first coordinate axis value of the start point of the rth line segment, a third to-be-interpolated line segment between the rth line segment and the r+1th line segment is determined, the coordinates of the start point of the third to-be-interpolated line segment are the first coordinate axis value of the start point of the rth line segment, the second coordinate axis value of the start point of the rth line segment, and the third coordinate axis value of the start point of the r+1th line segment, and the end point of the third to-be-interpolated line segment is the start point of the r+1th line segment.
[0057] In some embodiments, the voxel filling module comprises a filling sub-module, and the filling sub-module is configured to:
[0058] Voxelize each point cloud data in the interpolated line segment to obtain a plurality of voxels, each voxel containing one point cloud data, and each voxel having a preset volume;
[0059] Determine the first coordinate axis value of the start point of the line segment and the first coordinate axis value of the end point of the line segment.
[0060] When the first coordinate axis value of the start point of the line segment is greater than the first coordinate axis value of the end point of the line segment, determine that the plurality of voxels are within a first preset range of the target car bottom.
[0061] Perform voxel filling in the first preset range to obtain a voxel set, and the voxel set comprises a plurality of filled voxels.
[0062] In some embodiments, the voxel filling module comprises a voxel elimination module, and the voxel elimination module is configured to:
[0063] When the first coordinate axis value of the start point of the line segment is not greater than the first coordinate axis value of the end point of the line segment, determine that the plurality of voxels are within a second preset range of the target car bottom.
[0064] Perform voxel elimination in the second preset range to obtain a plurality of eliminated voxels.
[0065] Remove the plurality of eliminated voxels from the voxel set to obtain a voxel set after the voxels are removed.
[0066] In some embodiments, the voxel filling module comprises a boundary filling module, and the boundary filling module is configured to:
[0067] Determine the range of the side surface of the target car based on the car coordinate system.
[0068] Obtain a target car interior boundary range at a preset distance from the side surface of the target car according to the range of the side surface of the target car.
[0069] acquire any one of boundary coordinate points of a target vehicle compartment internal boundary range;
[0070] when the boundary coordinate point is not filled with the voxel, determine a third preset range of the boundary coordinate point;
[0071] when there is at least one voxel in the third preset range, fill the boundary coordinate point to obtain a voxel corresponding to the boundary coordinate point;
[0072] add the voxel corresponding to the boundary coordinate point to the voxel set.
[0073] In some embodiments, the voxel filling module comprises an internal filling module, and the internal filling module is configured to:
[0074] determine any one of internal coordinate points in the target vehicle compartment;
[0075] when the internal coordinate point is not filled with the voxel, determine a negative direction of a first coordinate axis of the vehicle coordinate system;
[0076] based on the negative direction of the first coordinate axis of the vehicle coordinate system, determine a fourth preset range of the internal coordinate point;
[0077] when there is no voxel in the fourth preset range, determine a fifth preset range of the internal coordinate point based on a second coordinate axis of the vehicle coordinate system;
[0078] when there is at least one voxel in the fifth preset range, fill the internal coordinate point to obtain a voxel corresponding to the internal coordinate point;
[0079] add the voxel corresponding to the internal coordinate point to the voxel set.
[0080] In some embodiments, the loading rate determination module is configured to:
[0081] determine the number of voxels not filled in the target vehicle compartment according to the voxel set;
[0082] add the number of filled voxel points to the number of voxels not filled in the target vehicle compartment to obtain the total number of voxels in the target vehicle compartment;
[0083] determine the ratio between the number of filled voxel points and the total number of voxels in the target vehicle compartment;
[0084] take the ratio as the loading rate of the target vehicle compartment.
[0085] Embodiments of the present application also provide an electronic device, which comprises a device backend, the device backend comprising a processor, a memory, and a loading rate measurement program stored in the memory and executable on the processor, and the processor executes the loading rate measurement program to implement the steps in any one of the loading rate measurement methods.
[0086] In some embodiments, the electronic device further comprises a device front end, the device front end comprising a target detector, the target detector being configured to:
[0087] determine a carriage coordinate system established by the device rear end;
[0088] receive a horizontal rotation instruction sent by the device rear end, and horizontally rotate to an hth preset rotation angle based on a first plane of the carriage coordinate system established by the device rear end;
[0089] receive a scanning instruction sent by the device rear end, and scan a preset angle along a third coordinate axis of the carriage coordinate system from bottom to top at the hth preset rotation angle to obtain a plurality of point cloud data corresponding to the hth preset horizontal rotation angle, where h≤n, and n is a total number of rotations;
[0090] send the plurality of point cloud data corresponding to the hth preset horizontal rotation angle to the device rear end.
[0091] The embodiments of the present application also provide a storage medium, which stores a plurality of instructions, and the instructions are suitable for being loaded by a processor to execute steps in any one of the load rate measurement methods provided by the embodiments of the present application.
[0092] The embodiments of the present application first determine a point cloud single line based on point cloud data of a target carriage; then segment the point cloud single line to obtain segmented line segments corresponding to the point cloud single line; then perform interpolation processing between the segmented line segments to obtain interpolated line segments; perform voxel filling processing on the interpolated line segments to obtain a voxel set, the voxel set comprising filled voxels; then determine a number of the filled voxels; and finally determine a load rate of the target carriage according to the number of the filled voxels.
[0093] In this way, the present application can effectively realize automatic load rate volume measurement in a target carriage, avoid the shortcomings of manual measurement, and ensure the measurement accuracy. The present application first determines a point cloud single line, then segments the point cloud single line into line segments, and further performs voxel filling on the line segments, which can effectively improve the filling accuracy and further improve the load rate measurement accuracy. BRIEF DESCRIPTION OF DRAWINGS
[0094] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed in the embodiment description will be briefly introduced. 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 creative labor.
[0095] Figure 1 is a scene schematic diagram of the load rate measurement system provided by the embodiments of the present application.
[0096] Figure 2a is a flowchart of a loading rate measurement method provided by an embodiment of the present application.
[0097] Figure 2b is a schematic diagram of a vehicle compartment coordinate system provided by an embodiment of the present application.
[0098] Figure 2c is a schematic diagram of a judgment vector provided by an embodiment of the present application.
[0099] Figure 2d-1 is a first schematic diagram of a first to-be-interpolated line segment provided by an embodiment of the present application.
[0100] Figure 2d-2 is a second schematic diagram of a first to-be-interpolated line segment provided by an embodiment of the present application.
[0101] Figure 2d-3 is a schematic diagram of a second to-be-interpolated line segment provided by an embodiment of the present application.
[0102] Figure 2d-4 is a schematic diagram of a third to-be-interpolated line segment provided by an embodiment of the present application.
[0103] Figure 2e is a schematic diagram of voxel filling according to a line segment provided by an embodiment of the present application.
[0104] Figure 2f is a schematic diagram of voxel elimination according to a line segment provided by an embodiment of the present application.
[0105] Figure 2g is a schematic diagram of boundary voxel filling provided by an embodiment of the present application.
[0106] Figure 2h is a schematic diagram of vehicle compartment internal voxel filling provided by an embodiment of the present application.
[0107] Figure 3 is a structural schematic diagram of a loading rate measurement device provided by an embodiment of the present application.
[0108] Figure 4 is a structural schematic diagram of a device backend provided by an embodiment of the present application. DETAILED DESCRIPTION
[0109] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, but not all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work fall within the scope of protection of the present application.
[0110] The embodiment of the present application provides a loading rate measuring method and device, electronic equipment and a storage medium.
[0111] The loading rate measuring device can be integrated in the electronic equipment, which can be a terminal, a server or the like. The terminal can be a mobile phone, a tablet computer, a smart Bluetooth device, a notebook computer or a personal computer (PC), and the like. The server can be a single server or a server cluster composed of multiple servers.
[0112] In some embodiments, the loading rate measuring device can also be integrated in multiple electronic equipment, for example, the loading rate measuring device can be integrated in multiple servers, and the multiple servers can implement the loading rate measuring method of the present application.
[0113] In some embodiments, the server can also be implemented in the form of a terminal.
[0114] For example, the electronic equipment in which the loading rate measuring device is integrated can be a terminal, a server or the like.
[0115] Please refer to Figure 1 , Figure 1 The system scene schematic diagram of the loading rate measuring system provided by the embodiment of the present application can include an image processing server 10 and a storage terminal 11. The storage terminal 11 stores style transfer image sample data. The image processing server 10 and the storage terminal 11 are in communication connection with each other, and details are not described herein.
[0116] The image processing server 10 can include a processor and a memory, and the like. The storage terminal 11 can include a cloud server, and the like.
[0117] It should be noted that Figure 1 The system scene schematic diagram shown is only an example. The loading rate measuring server and the scene described in the embodiment of the present application are used to more clearly illustrate the technical solutions of the embodiment of the present application, and do not constitute a limitation on the technical solutions provided by the embodiment of the present application. Those skilled in the art can know that, with the evolution of the system and the appearance of new business scenarios, the technical solutions provided by the embodiment of the present application are also applicable to similar technical problems. The following will be described in detail. It should be noted that the description order of the following embodiments does not limit the preferred order of the embodiments.
[0118] The embodiment of the present disclosure firstly aims to provide a loading rate measurement method, point cloud single lines are determined based on point cloud data of a target carriage; the point cloud single lines are segmented to obtain segmented line segments corresponding to the point cloud single lines; interpolation processing is performed on the segmented line segments to obtain interpolated line segments; voxel filling processing is performed on the interpolated line segments to obtain a voxel set, and the voxel set includes filled voxels; then the number of the filled voxels is determined; and the loading rate of the target carriage is determined according to the number of the filled voxels.
[0119] Therefore, the present scheme can effectively realize automatic measurement of the loading rate and volume in the target carriage, avoid the shortcomings of manual measurement, and ensure the measurement accuracy. The present application first determines the point cloud single lines, then segments the point cloud single lines into line segments, and further performs voxel filling on the line segments, which can effectively improve the filling accuracy and further improve the loading rate measurement accuracy.
[0120] As shown in Figure 2a , the specific process of the loading rate measurement method can be as follows:
[0121] 100. Determine point cloud single lines based on point cloud data of a target carriage.
[0122] In the embodiment of the present application, a plurality of point cloud data with target surface characteristics can be obtained based on a target detector in the target carriage according to the laser measurement principle, each point cloud data corresponds to a sampling point, and one point cloud data can include three-dimensional coordinates and laser reflection intensity of the sampling point, and can also include color information. The point cloud single line can be a line connected by the point cloud data obtained by scanning the target detector in the target carriage from bottom to top once.
[0123] In an embodiment, the point cloud single lines are determined based on the point cloud data of the target carriage, comprising:
[0124] establishing a carriage coordinate system;
[0125] rotating the target detector in the target carriage to the first plane of the carriage coordinate system to the hth preset rotation angle by sending a horizontal rotation instruction;
[0126] scan the target detector at the hth preset rotation angle along the third coordinate axis of the carriage coordinate system from bottom to top by sending a scanning instruction, and the target detector is used to obtain a plurality of point cloud data corresponding to the hth preset horizontal rotation angle h≤n, n is the total number of rotations;
[0127] receive the plurality of point cloud data corresponding to the hth preset horizontal rotation angle sent by the target detector, connect the plurality of point cloud data corresponding to the hth preset horizontal rotation angle to form a line, and obtain a point cloud single line corresponding to the hth preset horizontal rotation angle;
[0128] When it is detected that the target detector is horizontally rotated to the nth preset rotation angle, n point cloud single lines respectively corresponding to n preset horizontal rotation angles are obtained.
[0129] As shown in Figure 2b The embodiment of the application can establish a carriage coordinate system xyz with the left top vertex of the tail of the target carriage as the origin o, wherein the x axis is the first coordinate axis, indicating the body direction, and the positive direction is from the tail to the head; the y axis is the second coordinate axis, indicating the width direction, and the positive direction is from the left side to the right side; and the z axis is the third coordinate axis, indicating the height direction, and the positive direction is from the top to the bottom. The first plane of the carriage coordinate system is the xoy plane. The target detector can be arranged at a preset distance from the origin of the carriage coordinate system, and the target detector can include a holder and a radar device located on the holder. The holder can be horizontally rotated based on the first plane of the carriage coordinate system, and the radar device located on the holder can scan a preset angle from the bottom to the top along the third coordinate axis of the carriage coordinate system, i.e., the radar device can scan a preset angle from the bottom to the top of the target carriage. The preset angle can be 90 degrees or 100 degrees, etc.
[0130] In the embodiment of the application, the holder of the target detector can be first horizontally rotated to a certain angle (such as the hth preset rotation angle), and then the radar device on the holder can scan a preset angle from the bottom to the top along the third coordinate axis of the carriage coordinate system, to obtain a plurality of point cloud data N h The plurality of point cloud data N h under the hth preset rotation angle are connected to form a line, to obtain a point cloud single line corresponding to the hth preset horizontal rotation angle. Then, the holder of the target detector is horizontally rotated to the next angle (such as the (h+1)th preset rotation angle), and the radar device continues to scan a preset angle from the bottom to the top along the third coordinate axis of the carriage coordinate system, to obtain a plurality of point cloud data N h+1 The plurality of point cloud data N h+1 under the (h+1)th preset rotation angle are connected to form a line, to obtain a point cloud single line corresponding to the (h+1)th preset horizontal rotation angle. After the holder is rotated n times for scanning, n point cloud single lines respectively corresponding to n preset horizontal rotation angles can be obtained.
[0131] 110. The point cloud single line is segmented to obtain a segmented line segment corresponding to the point cloud single line.
[0132] In this embodiment of the invention, since the loading inside the target carriage has an irregular surface, the point cloud line formed by connecting several point cloud data after the target detector scans from bottom to top along the third coordinate axis of the carriage coordinate system at a preset angle is not a straight line, but a broken line. When the distance between two adjacent points in the broken line is relatively far, it can be divided at the position between these two adjacent points with relatively far distance, so that a point cloud line can be divided into several line segments.
[0133] In one embodiment, a single line in a point cloud is segmented into line segments to obtain the segmented line segments, including:
[0134] 111. Perform vehicle vertex identification on the single line of the point cloud to obtain the single line of the point cloud after removing the vehicle vertex.
[0135] In one embodiment, vehicle vertex identification is performed on the point cloud single lines to obtain point cloud single lines after removing vehicle vertices, including:
[0136] Determine the coordinates of the (j+k)th point cloud data and the coordinates of the jth point cloud data in a single point cloud line, where j≤t, j+k≤t, t is the total number of points in the single point cloud line, and k is a positive integer;
[0137] Subtract the coordinates of the j-th point cloud data in the point cloud single line from the coordinates of the (j+k)-th point cloud data in the point cloud single line to obtain the judgment vector;
[0138] Determine the value of the first coordinate axis of the judgment vector;
[0139] When the third coordinate axis value of the (j+k)th point cloud data and the third coordinate axis value of the jth point cloud data are both less than the third coordinate axis threshold, and the first coordinate axis value of the judgment vector is less than or equal to the first coordinate axis threshold, the (j+k)th to the tth point cloud data in the single line of the point cloud are taken as the vehicle vertex.
[0140] Remove the car vertices to obtain the point cloud single line after removing the car vertices.
[0141] In embodiments of the present invention, such as Figure 2c As shown, based on the scanning order of the target detector, the coordinates of the (j+k)th point cloud data A and the jth point cloud data B in the single line of the point cloud can be determined. The (j+k)th point cloud data corresponds to the (j+k)th sampling point, and the jth point cloud data corresponds to the jth sampling point. If the (j+k)th point cloud data A is the apex of the vehicle, the first coordinate axis value (i.e., the x-coordinate value) of the (j+k)th point cloud data A will be less than the first coordinate axis value of the jth point cloud data B. Therefore, the first coordinate axis value of the judgment vector AB is less than or equal to the first coordinate axis threshold. This invention can set the first coordinate axis threshold to 0. In addition, since the positive direction of the z-axis of the vehicle coordinate system is downward, the closer to the roof of the target vehicle, the smaller the z-axis value (third coordinate axis value) of the point cloud data will be.
[0142] Therefore, the third coordinate axis threshold and the first coordinate axis threshold are set in the embodiment of the present application, when the third coordinate axis value of the j+kth point cloud data and the third coordinate axis value of the jth point cloud data are both less than the third coordinate axis threshold, and the first coordinate axis value of the judgment vector is less than or equal to the first coordinate axis threshold, the j+kth point cloud data to the tth point cloud data in the point cloud single line can be regarded as the roof point, so that the roof point is further removed, and the point cloud single line after removing the roof point is obtained.
[0143] 112、adding a tail point to the point cloud single line after removing the roof point to obtain a point cloud single line after adding the tail point, and the tail point is located on the side of the target carriage.
[0144] In the embodiment of the present application, in order to prevent the point cloud voxel filling from being insufficient due to the tail point of the point cloud single line not being on the side wall of the target carriage during the point cloud voxel filling, the embodiment of the present application proposes a single line supplementing method based on a ray. For the point cloud single line after removing the roof point, the threshold of the carriage size in the carriage coordinate system can be used to supplement the tail point.
[0145] In an embodiment, adding a tail point to the point cloud single line after removing the roof point to obtain a point cloud single line after adding the tail point, comprising:
[0146] determining the position coordinates of the target detector;
[0147] determining the current tail point of the point cloud single line after removing the roof point based on the scanning order of the target detector scanning a preset angle from bottom to top along the third coordinate axis of the carriage coordinate system;
[0148] when the current tail point is not located on the side of the target carriage, determining a ray passing through the current tail point through the position coordinates of the target detector;
[0149] obtaining the intersection point of the ray and the side of the target carriage;
[0150] regarding the intersection point as the tail point of the point cloud single line after removing the roof point to obtain the point cloud single line after adding the tail point.
[0151] In the embodiment of the present application, the side of the target vehicle compartment can include a front side, a left side and a right side of the vehicle compartment, and the embodiment of the present application can determine a ray by the position coordinates of the target detector and the current tail point of the point cloud single line after removing the roof point, that is, taking the position of the target detector as an end point, so that the ray passes through the side of the target vehicle, and the coordinates of the intersection point of the ray and the side of the target vehicle compartment can be determined according to the threshold of the size of the vehicle compartment in the vehicle compartment coordinate system, for example, the threshold of the size of the front side of the vehicle compartment in the vehicle compartment coordinate system is {x=X_MAX, y∈[Y_MIN, Y_MAX], z∈[Z_MIN, Z_MAX]}, x=X_MAX represents the first coordinate axis value of the front side of the vehicle compartment, y∈[Y_MIN, Y_MAX] represents the second coordinate axis value range of the front side of the vehicle compartment, and z∈[Z_MIN, Z_MAX] represents the third coordinate axis value range of the front side of the vehicle compartment. Because the ray has been determined by the position coordinates of the target detector and the current tail point of the point cloud single line after removing the roof point, the second coordinate axis value and the third coordinate axis value of the intersection point can be determined by substituting x=X_MAX into the equation about the ray. After the embodiment of the present application obtains the intersection point, the intersection point can be taken as the tail point of the point cloud single line after removing the roof point, and the point cloud single line after adding the tail point is obtained.
[0152] 113. The point cloud single line after adding the tail point is segmented into line segments to obtain the segmented line segments.
[0153] In the embodiment of the present application, in order to facilitate more fine voxel filling in the subsequent steps, the point cloud single line is segmented into line segments according to the distance between the sampling points in the point cloud single line, so that the single line set after adding the tail point and being segmented into line segments is obtained.
[0154] In an embodiment, the point cloud single line after adding the tail point is segmented into line segments to obtain the segmented line segments, including:
[0155] Based on the first plane of the vehicle compartment coordinate system, the distance between the adjacent two point cloud data in the point cloud single line after adding the tail point is determined.
[0156] When the distance is greater than the distance threshold, the position between the adjacent two point cloud data is segmented to obtain the segmented line segments.
[0157] In the embodiment of the present application, the point cloud single line can be segmented according to the distance between the adjacent two sampling points (that is, the adjacent two point cloud data) on the first plane (that is, the xoy plane) of the vehicle compartment coordinate system , so as to ensure that the distance between the adjacent two line segments is not less than the distance threshold, (p vx , p vy ) are the coordinates of the sampling point v on the xoy plane, (p (v+1)x , p (v+1)y) is the coordinate of the sampling point v+1 on the xoy plane, and the distance threshold can be set to 0.1.
[0158] 120, performing line segment interpolation processing on the segmented line segments to obtain interpolated line segments.
[0159] In the embodiment of the present application, since the distance between the two adjacent line segments after segmentation is greater than the distance threshold, in order to fully fill the voxels in the subsequent step of line segment down-filling processing, interpolation needs to be performed between the line segments of the point cloud single line. Therefore, the embodiment of the present application proposes a line segment filling method. The target detector can be installed at the left top end of the door close to the target carriage. From the position of the target detector, the point cloud single line is continuous, but when filling voxels downward, from the top end of the carriage (the positive direction of the z-axis), the distance between points (projecting the points to the xoy plane in the carriage coordinate system) should be less than or equal to the unit length of the voxel in the subsequent voxelization. Therefore, the embodiment of the present application needs to perform interpolation between the line segments of the point cloud single line segmented into line segments.
[0160] In an embodiment, the line segment interpolation processing is performed on the segmented line segments to obtain interpolated line segments, comprising:
[0161] obtaining an rth line segment and an (r+1)th line segment in the segmented line segments;
[0162] when the rth line segment and the (r+1)th line segment meet a preset condition, determining a to-be-interpolated line segment between the rth line segment and the (r+1)th line segment;
[0163] determining a starting point of the to-be-interpolated line segment and an ending point of the to-be-interpolated line segment;
[0164] determining a direction vector according to the starting point of the to-be-interpolated line segment and the ending point of the to-be-interpolated line segment;
[0165] performing point cloud interpolation on the direction vector according to a preset step length to obtain interpolated point cloud data;
[0166] obtaining the interpolated line segments based on the interpolated point cloud data.
[0167] In the embodiment of the present application, the rth line segment and the (r+1)th line segment adjacent to each other after segmentation can be obtained in an order opposite to the scanning order of the target detector. When the rth line segment and the (r+1)th line segment meet a certain preset condition, the starting point and the ending point of the to-be-interpolated line segment can be determined according to the rth line segment and the (r+1)th line segment. Then, a direction vector can be obtained according to the starting point and the ending point of the to-be-interpolated line segment. A plurality of point cloud data can be inserted on the direction vector according to a preset step length. The embodiment of the present application can insert a line segment between the two adjacent line segments after segmentation. The line segment can include at least two point cloud data.
[0168] In an embodiment, when the rth line segment and the (r+1)th line segment satisfy a preset condition, a line segment to be interpolated between the rth line segment and the (r+1)th line segment is determined, including:
[0169] determining a start point and an end point of the rth line segment;
[0170] determining a start point and an end point of the (r+1)th line segment;
[0171] when a first coordinate axis value of the start point of the (r+1)th line segment is less than a first coordinate axis value of the end point of the rth line segment, or when the first coordinate axis value of the start point of the (r+1)th line segment is greater than or equal to the first coordinate axis value of the end point of the rth line segment and a third coordinate axis value of the start point of the (r+1)th line segment is greater than or equal to a third coordinate axis value of the end point of the rth line segment, a first line segment to be interpolated between the rth line segment and the (r+1)th line segment is determined, a start point of the first line segment to be interpolated is the end point of the rth line segment, and an end point of the first line segment to be interpolated is the start point of the (r+1)th line segment;
[0172] when the first coordinate axis value of the start point of the (r+1)th line segment is not less than the first coordinate axis value of the end point of the rth line segment, the third coordinate axis value of the start point of the (r+1)th line segment is less than the third coordinate axis value of the end point of the rth line segment, and the first coordinate axis value of the end point of the rth line segment is not less than the first coordinate axis value of the start point of the rth line segment, a second line segment to be interpolated between the rth line segment and the (r+1)th line segment is determined, a start point of the second line segment to be interpolated has coordinates of the first coordinate axis value of the end point of the rth line segment, the second coordinate axis value of the end point of the rth line segment, and the third coordinate axis value of the start point of the (r+1)th line segment, and an end point of the second line segment to be interpolated is the start point of the (r+1)th line segment;
[0173] when the first coordinate axis value of the start point of the (r+1)th line segment is not less than the first coordinate axis value of the end point of the rth line segment, the third coordinate axis value of the start point of the (r+1)th line segment is less than the third coordinate axis value of the end point of the rth line segment, and the first coordinate axis value of the end point of the rth line segment is less than the first coordinate axis value of the start point of the rth line segment, a third line segment to be interpolated between the rth line segment and the (r+1)th line segment is determined, a start point of the third line segment to be interpolated has coordinates of the first coordinate axis value of the start point of the rth line segment, the second coordinate axis value of the start point of the rth line segment, and the third coordinate axis value of the start point of the (r+1)th line segment, and an end point of the third line segment to be interpolated is the start point of the (r+1)th line segment.
[0174] In the embodiments of the present application, interpolation between line segments can be divided into three cases:
[0175] The first case is when or when When interpolating, the endpoint of the r-th line segment (denoted as line segment r) is directly taken as the starting point of the line segment to be interpolated, and the starting point of the (r+1)-th line segment (denoted as line segment r+1) is taken as the endpoint of the line segment to be interpolated. Figure 2d-1 For when A schematic diagram of the line segment to be interpolated, in Figure 2d-1 In the diagram, line segment r+1 and line segment r are two adjacent line segments. The arrow symbol indicates the direction of the line segment. The black dot indicates the start or end point of the line segment. The x-coordinate value of the start point of line segment r+1 is less than the x-coordinate value of the end point of line segment r. The dashed line with the arrow symbol indicates the line segment to be interpolated. Figure 2d-2 For when A schematic diagram of the line segment to be interpolated, in Figure 2d-2 In the given equation, the x-coordinate value of the starting point of line segment r+1 is greater than the x-coordinate value of the ending point of line segment r, and the z-coordinate value of the starting point of line segment r+1 is greater than the z-coordinate value of the ending point of line segment r. The starting point of the first line segment to be interpolated is the ending point of the r-th line segment, and the ending point of the line segment to be interpolated is the starting point of the (r+1)-th line segment.
[0176] In the second scenario, when When interpolating, the x-coordinate value of the endpoint of the r-th line segment, the y-coordinate value of the endpoint of the r-th line segment, and the z-coordinate value of the starting point of the (r+1)-th line segment are used as the coordinates of the starting point of the line segment to be interpolated, and the starting point of the (r+1)-th line segment is used as the endpoint of the line segment to be interpolated. For example... Figure 2d-3 As shown, the x-coordinate value of the starting point of line segment r+1 is greater than the x-coordinate value of the ending point of line segment r, the z-coordinate value of the starting point of line segment r+1 is less than the z-coordinate value of the ending point of line segment r, and the x-coordinate value of the ending point of line segment r is greater than the x-coordinate value of the starting point of line segment r. The coordinates of the starting point of the second line segment to be interpolated are the x-coordinate value of the ending point of the r-th line segment, the y-coordinate value of the ending point of the r-th line segment, and the z-coordinate value of the starting point of the (r+1)-th line segment. The coordinates of the ending point of the second line segment to be interpolated are the starting point of the (r+1)-th line segment.
[0177] The third scenario, when When interpolating, the x-coordinate value of the starting point of the r-th line segment, the y-coordinate value of the starting point of the r-th line segment, and the z-coordinate value of the starting point of the (r+1)-th line segment are used as the coordinates of the starting point of the line segment to be interpolated, and the starting point of the (r+1)-th line segment is used as the ending point of the line segment to be interpolated. For example... Figure 2d-4 As shown, the x-coordinate value of the starting point of line segment r+1 is greater than the x-coordinate value of the ending point of line segment r, the z-coordinate value of the starting point of line segment r+1 is less than the z-coordinate value of the ending point of line segment r, and the x-coordinate value of the ending point of line segment r is less than the x-coordinate value of the starting point of line segment r. The coordinates of the starting point of the third line segment to be interpolated are the x-coordinate value of the starting point of the r-th line segment, the y-coordinate value of the starting point of the r-th line segment, and the z-coordinate value of the starting point of the (r+1)-th line segment. The ending point of the third line segment to be interpolated is the starting point of the (r+1)-th line segment.
[0178] In the discriminant formula for the three cases, x, y, and z are the x-axis value, y-axis value, and z-axis value, respectively. The subscript r+1 represents the (r+1)th line segment, the subscript r represents the rth line segment, the superscript 1 represents the starting point of the line segment, and the superscript 2 represents the ending point of the line segment.
[0179] 130. Perform voxel filling on the interpolated line segments to obtain a voxel set, which includes the voxels that have been filled.
[0180] In this embodiment of the invention, the interpolated line segments can represent the surface line segments of the vehicle-mounted objects inside the target vehicle compartment. When these line segments meet the preset conditions, the interior of the vehicle-mounted objects can be filled with voxels by performing voxel filling processing towards the bottom of the vehicle, thereby obtaining a voxel set. The filled voxels in the voxel set can be used to represent the vehicle-mounted objects. Each voxel has a certain preset volume, and each voxel can contain a point cloud data.
[0181] In one embodiment, the interpolated line segments are subjected to voxel filling to obtain a voxel set, including:
[0182] Voxelize each point cloud data in the interpolated line segment to obtain several voxels. Each voxel contains one point cloud data and has a preset volume.
[0183] Determine the first coordinate axis value of the starting point and the first coordinate axis value of the ending point of the line segment;
[0184] When the first coordinate axis value of the starting point of the line segment is greater than the first coordinate axis value of the ending point of the line segment, determine the first preset range of several voxels to the bottom of the target carriage.
[0185] Voxel filling is performed within a first preset range to obtain a voxel set, which includes several filled voxels.
[0186] In this embodiment of the invention, when the first coordinate axis value of the starting point of the line segment is not greater than the first coordinate axis value of the ending point of the line segment, such as Figure 2e As shown, line segment p 12 The x-coordinate of the starting point p1 is greater than that of line segment p. 12 The x-coordinate of the endpoint p2, based on line segment p 12 The voxel filling is performed within a first preset range under the target carriage. In this embodiment of the invention, it can be based on line segment p. 12 After voxelizing the point cloud data, the corresponding voxels are obtained. The first preset range is set to the line segment p. 12 The range between the voxel corresponding to the midpoint cloud data and the bottom of the vehicle.
[0187] In addition, to improve computational efficiency and achieve precise fill alignment, the first preset range can also be set to first obtain line segment p. 12 The integer coordinates of the point cloud data are voxelized to obtain the voxels corresponding to the integer coordinates. The range between the voxel corresponding to the integer coordinate and the bottom of the vehicle is taken as the first preset range.
[0188] This invention can be applied to line segment p. 12 The integer coordinates of each point cloud data point are voxelized, for example, line segment p. 12 Given a point cloud data point e with coordinates (x, y, z), and integer coordinates [Inx, Iny, Inz], voxelize the integer coordinates of point cloud data e to determine a voxel. The center coordinates of this voxel are the integer coordinates [Inx, Iny, Inz] corresponding to point cloud data e. Then, based on the voxels corresponding to the integer coordinates of the point cloud data, fill downwards until the bottom of the vehicle is filled. That is, when the coordinate axis values are the same as the integer x-axis value Inx and the integer y-axis value Iny of point cloud data e, voxel filling operation is performed on the integer z-axis value Inz towards the bottom of the vehicle, so that the positions with coordinates [Inx, Iny, Inz+1], [Inx, Iny, Inz+2], ..., [Inx, Iny, Inz+g] are all filled with voxels. [Inx, Iny, Inz+g] is the target vehicle bottom coordinate position inside the carriage corresponding to the integer coordinates of point cloud data e.
[0189] In one embodiment, the interpolated line segments are subjected to voxel filling to obtain a voxel set, including:
[0190] When the first coordinate axis value of the starting point of the line segment is not greater than the first coordinate axis value of the ending point of the line segment, determine the second preset range of several voxels to the bottom of the target carriage.
[0191] Voxel elimination is performed within a second preset range to obtain several eliminated voxels;
[0192] Several voxels that were eliminated are removed from the voxel set to obtain the voxel set after voxel removal.
[0193] In this embodiment of the invention, since the surface of the vehicle-borne objects in the target carriage is uneven, if voxels are filled downwards based solely on the line segments, it is highly likely that the space below the line segments that is not occupied by the vehicle-borne objects will be filled. Therefore, this embodiment of the invention also requires voxel elimination processing based on the line segments.
[0194] In this embodiment of the invention, when the first coordinate axis value of the starting point of a line segment is not greater than the first coordinate axis value of the ending point of the line segment, a second preset range from several voxels to the bottom of the target carriage is determined, such as... Figure 2f As shown, line segment p23 The x-coordinate of the starting point p2 is not greater than that of line segment p. 23 The x-coordinate of the endpoint p3, based on line segment p 23 Voxel elimination is performed within a second preset range under the target carriage. In this embodiment of the invention, it can be based on line segment p. 23 After voxelizing the point cloud data, the corresponding voxels are obtained. The second preset range is set to the line segment p. 23 The range between the voxel corresponding to the midpoint cloud data and the bottom of the vehicle. Figure 2f The area between the two dashed lines is the range for voxel elimination, i.e., the second preset range.
[0195] In addition, to improve computational efficiency and achieve precise alignment elimination, the second preset range can also be set to first obtain line segment p. 23 The integer coordinates of the point cloud data are voxelized to obtain the voxels corresponding to the integer coordinates. The nine-grid range between the voxel corresponding to the integer coordinate and the bottom of the vehicle is used as the first preset range. That is, for line segment p 23 For each point in the grid, first voxelize it to obtain integer coordinates [Inx′,Iny′,Inz′]. Then, perform a 3×3 grid elimination downwards until the bottom of the car is reached. This means that under the current integer z-axis value Inz′, the voxel with center coordinates [Inx′,Iny′,Inz′] is eliminated, and the eight voxels around the voxel with center coordinates [Inx′,Iny′,Inz′] are also eliminated; the voxel with center coordinates [Inx′,Iny′,Inz′+1] is eliminated, and the eight voxels around the voxel with center coordinates [Inx′,Iny′,Inz′+1] are also eliminated. Continue eliminating downwards until the elimination position reaches the bottom of the car. Among them, the center coordinates of the eight voxels of the voxel with center coordinates [Inx′,Iny′,Inz′] are [Inx′-1,Iny′-1,Inz′], [Inx′-1,Iny′,Inz′], [Inx′-1,Iny′+1,Inz′], [Inx′,Iny′-1,Inz′], [Inx′,Iny′+1,Inz′], [Inx′+1,Iny′-1,Inz′], [Inx′+1,Iny′,Inz′], [Inx′+1,Iny′+1,Inz′].
[0196] In one embodiment, the interpolated line segments are subjected to voxel filling to obtain a voxel set, including:
[0197] Based on the car body coordinate system, determine the range of the side of the target car body;
[0198] The internal boundary range of the target carriage is obtained from the side of the target carriage at a preset distance from the side of the target carriage.
[0199] Obtain the coordinates of any boundary point within the target carriage's internal boundary range;
[0200] When the boundary coordinate point is not filled by voxels, determine the third preset range of the boundary coordinate point;
[0201] When there is at least one voxel within the third preset range, the boundary coordinate points are filled to obtain the voxel corresponding to the boundary coordinate points;
[0202] Add the voxels corresponding to the boundary coordinate points to the voxel set.
[0203] In this embodiment of the invention, due to the changes in the gimbal rotation frequency and radar scanning frequency in the target detector, the filling between point cloud single lines cannot completely cover the entire voxel set representing the vehicle. That is, there are still areas between the point cloud single lines that cannot be filled. Therefore, it is necessary to fill between the point cloud single lines. Thus, this embodiment of the invention proposes a local filling method between single lines. Specifically, this embodiment of the invention can first fill the boundaries near the four sides of the vehicle body, and then fill the voxel set from the rear to the front of the vehicle body.
[0204] When filling the boundaries near the four sides of the carriage, the boundary range can be set according to the range of the four sides of the carriage, and then the eight points around the point cloud data in the boundary range can be determined. For example, based on the carriage coordinate system, the range of the front side of the carriage can be x = x_nums, y ∈ [0, y_nums], z ∈ [0, z_nums]}. Then the range of the area near the front boundary of the carriage can be set as x = x_nums-1, y ∈ [0, y_nums-1], z ∈ [0, z_nums-1]}. When point q1 in the area near the front boundary of the carriage is not filled by voxels, the eight points around point q1 in the area near the front boundary of the carriage can be determined. It is then determined whether at least one of the eight points around point q1 in the area near the front boundary of the carriage is filled by voxels. If not, point q1 is not filled; if so, point q1 is filled, and the voxels of the points in the area near the front boundary of the carriage are obtained and added to the voxel set, such as... Figure 2g As shown, if point q1 in the area near the front boundary of the carriage is not filled with voxels, and one of the eight points surrounding point q1 in the area near the front boundary of the carriage is filled with voxels, then voxel filling is performed on point q1.
[0205] In one embodiment, the interpolated line segments are subjected to voxel filling to obtain a voxel set, including:
[0206] Determine any internal coordinate point within the target carriage;
[0207] When the internal coordinate points are not filled by voxels, determine the negative direction of the first coordinate axis of the carriage coordinate system;
[0208] Based on the negative direction of the first coordinate axis of the carriage coordinate system, determine the fourth preset range of internal coordinate points;
[0209] When no voxel exists within the fourth preset range, the fifth preset range of internal coordinate points is determined based on the second coordinate axis of the carriage coordinate system.
[0210] When there is at least one voxel within the fifth preset range, the internal coordinate points are filled to obtain the voxel corresponding to the internal coordinate points.
[0211] Add the voxels corresponding to the internal coordinate points to the voxel set.
[0212] In this embodiment of the invention, when filling the internal coordinate points of the target carriage other than the boundary coordinate points, the voxel set can be filled from the rear to the front of the target carriage.
[0213] Specifically, based on the internal boundary range of the target carriage, an arbitrary internal coordinate point q2 within the target carriage is determined. When this internal coordinate point q2 is not filled by a voxel, a fourth preset range for the internal coordinate point q2 is determined based on the negative direction of the x-axis of the carriage coordinate system, such as... Figure 2h As shown, the coordinates of the internal coordinate point q2 are (x... q2 ,y q2 ,z q2 If the internal coordinates of point q2 are within the fourth preset range, then the coordinates of point q3 can be (x...). q2 -1,y q2 ,z q2 Then, it is determined whether the points in the fourth preset range are filled with voxels. If so, the internal coordinate point p2 is filled; otherwise, the fifth preset range of internal coordinate points is determined based on the y-axis of the carriage coordinate system. For example, the coordinates of the points in the fifth preset range of internal coordinate point p2 can be (x... p2 ,y p2 -1,z p2 ) and (x p2 ,y p2 +1,z p2 ),Right now Figure 2hPoints q4 and q5 in the internal coordinates p2 are considered. The process checks if at least one point in the y-axis direction of internal coordinate point p2 is filled with a voxel, specifically whether point q4 or q5 is filled. If either q4 or q5 is filled, then internal coordinate point p2 is filled; otherwise, it is not. Finally, by traversing all internal coordinate points in the target carriage from the rear to the front, the unfilled areas between single lines in the point cloud are fully filled. Furthermore, by checking if the point in front of internal coordinate point p1 (in the negative x-direction) is occupied by a voxel, and then checking if the two points to the left and right (in the positive and negative y-directions) are occupied by voxels, the accuracy of voxel filling is very high.
[0214] 140. Determine the number of voxels to be filled.
[0215] In this embodiment of the invention, after the cargo in the target carriage is filled with a number of voxels, the number of voxels filled can be determined, thereby further obtaining the loading rate of the target carriage.
[0216] 150. Determine the loading rate of the target car based on the number of voxels filled.
[0217] The loading rate is the ratio between the volume of the cargo carried on board and the maximum cargo volume that can be carried in the target compartment.
[0218] In one embodiment, determining the loading rate of the target carriage based on the number of filled voxel dots includes:
[0219] Based on the voxel set, determine the number of unfilled voxels in the target carriage;
[0220] The total number of voxels in the target car is obtained by adding the number of voxels to be filled to the number of unfilled voxels in the target car.
[0221] Determine the ratio between the number of voxel points being filled and the total number of voxels in the target carriage;
[0222] The ratio is used as the loading rate of the target car.
[0223] In this embodiment of the invention, the number of unfilled voxels in the target carriage is determined by voxel set, and then the number of filled voxel points is added to the number of unfilled voxels in the target carriage to obtain the total number of voxels in the target carriage. The ratio is then used as the loading rate of the target carriage.
[0224] In addition, embodiments of the present invention can first obtain the maximum volume of the target carriage, and then multiply the number of filled voxel points by the unit voxel volume to obtain the total volume of filled voxels. The total volume of filled voxels is equal to the volume of the vehicle cargo. The loading rate of the target carriage can be obtained by the ratio between the volume of the vehicle cargo and the maximum volume of the target carriage.
[0225] This invention provides a method for measuring loading rate. The method first determines a single point cloud line based on point cloud data of the target carriage; then, it segments the single point cloud line to obtain segmented line segments; next, it performs inter-segment interpolation on the segmented line segments to obtain interpolated line segments; then, it performs voxel filling on the interpolated line segments to obtain a voxel set, which includes the filled voxels; next, it determines the number of filled voxels; and finally, it determines the loading rate of the target carriage based on the number of filled voxels.
[0226] This invention effectively achieves automated calculation of the loading rate volume within a target carriage, avoiding the drawbacks of manual measurement while ensuring calculation accuracy. The invention first defines a single point cloud line, then divides the point cloud line into line segments, and further performs voxel filling on these segments. During voxel filling, point cloud filling and point cloud elimination are combined. Furthermore, this invention employs a method of first filling the boundaries near the four sides of the carriage, and then filling coordinate points from the rear of the carriage towards the front, which effectively improves filling accuracy, thereby further enhancing the accuracy of loading rate calculation.
[0227] To better implement the above methods, this application also provides a load rate measuring device, which can be integrated into an electronic device, such as a terminal or server. The terminal can be a mobile phone, tablet computer, smart Bluetooth device, laptop computer, or personal computer; the server can be a single server or a server cluster composed of multiple servers.
[0228] For example, in this embodiment, the method of this application embodiment will be described in detail by taking the loading rate measurement device as specifically integrated into the image processing server.
[0229] For example, such as Figure 3 As shown, the loading rate measurement device may include a single-line determination module 301, a single-line segmentation module 302, a line segment interpolation module 303, a voxel filling module 304, a voxel quantity determination module 305, and a loading rate determination module 306, for example:
[0230] (I) Single-line determination module 301
[0231] The single-line determination module 301 is used to determine the single line of the point cloud based on the point cloud data of the target carriage.
[0232] In some embodiments, the single-line determination module is used for:
[0233] Establish the carriage coordinate system;
[0234] By sending a horizontal rotation command, the target detector inside the target carriage is horizontally rotated to the h-th preset rotation angle based on the first plane of the carriage coordinate system.
[0235] By sending a scanning command, the target detector scans from bottom to top along the third coordinate axis of the carriage coordinate system at the h-th preset rotation angle. The target detector is used to obtain several point cloud data h≤n corresponding to the h-th preset horizontal rotation angle, where n is the total number of rotations.
[0236] Receive several point cloud data corresponding to the h-th preset horizontal rotation angle sent by the target detector, and connect the several point cloud data corresponding to the h-th preset horizontal rotation angle into a line to obtain the point cloud single line corresponding to the h-th preset horizontal rotation angle.
[0237] When the target detector is detected to rotate horizontally to the nth preset rotation angle, n point cloud lines corresponding to the n preset horizontal rotation angles are obtained.
[0238] (II) Single-line segmentation module 302
[0239] The single-line segmentation module 302 is used to segment a single line in the point cloud to obtain the segmented line segments corresponding to the single line in the point cloud.
[0240] In some embodiments, the single-line segmentation module includes a vehicle vertex recognition module, a tail point addition module, and a segmentation module, wherein...
[0241] The vehicle vertex recognition module is used to identify vehicle vertices on single lines of the point cloud and obtain single lines of the point cloud after removing vehicle vertices.
[0242] The tail point addition module is used to add tail points to the single line of the point cloud after removing the top of the car, so as to obtain the single line of the point cloud with added tail points. The tail points are located on the side of the target car.
[0243] The segmentation module is used to segment a single line in a point cloud after adding tail points into line segments, thus obtaining the segmented line segments.
[0244] In some embodiments, the vehicle vertex recognition module is used for:
[0245] Determine the coordinates of the (j+k)th point cloud data and the coordinates of the jth point cloud data in a single point cloud line, where j≤t, j+k≤t, t is the total number of points in the single point cloud line, and k is a positive integer;
[0246] Subtract the coordinates of the j-th point cloud data in the point cloud single line from the coordinates of the (j+k)-th point cloud data in the point cloud single line to obtain the judgment vector;
[0247] Determine the value of the first coordinate axis of the judgment vector;
[0248] When the third coordinate axis value of the (j+k)th point cloud data and the third coordinate axis value of the jth point cloud data are both less than the third coordinate axis threshold, and the first coordinate axis value of the judgment vector is less than or equal to the first coordinate axis threshold, the (j+k)th to the tth point cloud data in the single line of the point cloud are taken as the vehicle vertex.
[0249] Remove the car vertices to obtain the point cloud single line after removing the car vertices.
[0250] In some embodiments, the tail point addition module is used for:
[0251] Determine the position coordinates of the target detector;
[0252] Based on the scanning sequence of the target detector scanning from bottom to top along the third coordinate axis of the carriage coordinate system at a preset angle, the current tail point of the point cloud single line after removing the top of the carriage is determined.
[0253] When the current tail point is not located on the side of the target carriage, a ray passing through the current tail point is determined by the position coordinates of the target detector;
[0254] Obtain the intersection point of the ray and the side of the target carriage;
[0255] Using the intersection point as the tail point of the point cloud line after removing the car vertex, we obtain the point cloud line with the added tail point.
[0256] In some embodiments, the segmentation module is used for:
[0257] Based on the first plane of the carriage coordinate system, determine the distance between two adjacent point cloud data in the single line of the point cloud after adding the tail point;
[0258] When the distance is greater than the distance threshold, the points between two adjacent point cloud data are segmented to obtain the segmented line segments.
[0259] (III) Line Segment Interpolation Module 303
[0260] The line segment interpolation module 303 is used to perform inter-segment interpolation on the segmented line segments to obtain the interpolated line segments.
[0261] In some embodiments, the line segment interpolation module is used for:
[0262] Obtain the r-th segment and the (r+1)-th segment from the divided line segments;
[0263] When the r-th line segment and the (r+1)-th line segment meet the preset conditions, determine the interpolation line segment between the r-th line segment and the (r+1)-th line segment;
[0264] Determine the starting point and ending point of the line segment to be interpolated;
[0265] The direction vector is determined based on the starting point and the ending point of the line segment to be interpolated;
[0266] Point cloud interpolation is performed on the direction vector according to a preset step size to obtain the interpolated point cloud data.
[0267] Based on the interpolated point cloud data, the interpolated line segments are obtained.
[0268] In some embodiments, the line segment interpolation module includes a line segment determination module, which is used to:
[0269] Determine the start and end points of the r-th line segment;
[0270] Determine the start and end points of the (r+1)th line segment;
[0271] When the first coordinate axis value of the starting point of the (r+1)th line segment is less than the first coordinate axis value of the ending point of the rth line segment, or when the first coordinate axis value of the starting point of the (r+1)th line segment is greater than or equal to the first coordinate axis value of the ending point of the rth line segment and the third coordinate axis value of the starting point of the (r+1)th line segment is greater than or equal to the third coordinate axis value of the ending point of the rth line segment, the first interpolation line segment between the rth line segment and the (r+1)th line segment is determined, the starting point of the first interpolation line segment is the ending point of the rth line segment, and the ending point of the first interpolation line segment is the starting point of the (r+1)th line segment.
[0272] When the first coordinate axis value of the starting point of the (r+1)th line segment is not less than the first coordinate axis value of the ending point of the rth line segment, the third coordinate axis value of the starting point of the (r+1)th line segment is less than the third coordinate axis value of the ending point of the rth line segment, and the first coordinate axis value of the ending point of the rth line segment is not less than the first coordinate axis value of the starting point of the rth line segment, the second interpolation line segment between the rth line segment and the (r+1)th line segment is determined. The coordinates of the starting point of the second interpolation line segment are the first coordinate axis value of the ending point of the rth line segment, the second coordinate axis value of the ending point of the rth line segment, and the third coordinate axis value of the starting point of the (r+1)th line segment. The ending point of the second interpolation line segment is the starting point of the (r+1)th line segment.
[0273] When the first coordinate axis value of the starting point of the (r+1)th line segment is not less than the first coordinate axis value of the ending point of the rth line segment, the third coordinate axis value of the starting point of the (r+1)th line segment is less than the third coordinate axis value of the ending point of the rth line segment, and the first coordinate axis value of the ending point of the rth line segment is less than the first coordinate axis value of the starting point of the rth line segment, the third interpolation line segment between the rth line segment and the (r+1)th line segment is determined. The coordinates of the starting point of the third interpolation line segment are the first coordinate axis value of the starting point of the rth line segment, the second coordinate axis value of the starting point of the rth line segment, and the third coordinate axis value of the starting point of the (r+1)th line segment. The ending point of the third interpolation line segment is the starting point of the (r+1)th line segment.
[0274] (iv) Voxel Filling Module 304
[0275] The voxel filling module 304 is used to perform voxel filling on the interpolated line segments to obtain a voxel set, which includes the voxels to be filled.
[0276] (V) Voxel Quantity Determination Module 305
[0277] The voxel quantity determination module 305 is used to determine the number of voxels to be filled.
[0278] In some embodiments, the voxel filling module includes a filling submodule, which is used for:
[0279] Voxelize each point cloud data in the interpolated line segment to obtain several voxels. Each voxel contains one point cloud data and has a preset volume.
[0280] Determine the first coordinate axis value of the starting point and the first coordinate axis value of the ending point of the line segment;
[0281] When the first coordinate axis value of the starting point of the line segment is greater than the first coordinate axis value of the ending point of the line segment, determine the first preset range of several voxels to the bottom of the target carriage.
[0282] Voxel filling is performed within a first preset range to obtain a voxel set, which includes several filled voxels.
[0283] In some embodiments, the voxel filling module includes a voxel elimination module, which is used for:
[0284] When the first coordinate axis value of the starting point of the line segment is not greater than the first coordinate axis value of the ending point of the line segment, determine the second preset range of several voxels to the bottom of the target carriage.
[0285] Voxel elimination is performed within a second preset range to obtain several eliminated voxels;
[0286] Several voxels that were eliminated are removed from the voxel set to obtain the voxel set after voxel removal.
[0287] In some embodiments, the voxel filling module includes a boundary filling module, which is used for:
[0288] Based on the car body coordinate system, determine the range of the side of the target car body;
[0289] The internal boundary range of the target carriage is obtained from the side of the target carriage at a preset distance from the side of the target carriage.
[0290] Obtain the coordinates of any boundary point within the target carriage's internal boundary range;
[0291] When the boundary coordinate point is not filled by voxels, determine the third preset range of the boundary coordinate point;
[0292] When there is at least one voxel within the third preset range, the boundary coordinate points are filled to obtain the voxel corresponding to the boundary coordinate points;
[0293] Add the voxels corresponding to the boundary coordinate points to the voxel set.
[0294] In some embodiments, the voxel filling module includes an internal filling module, which is used for:
[0295] Determine any internal coordinate point within the target carriage;
[0296] When the internal coordinate points are not filled by voxels, determine the negative direction of the first coordinate axis of the carriage coordinate system;
[0297] Based on the negative direction of the first coordinate axis of the carriage coordinate system, determine the fourth preset range of internal coordinate points;
[0298] When no voxel exists within the fourth preset range, the fifth preset range of internal coordinate points is determined based on the second coordinate axis of the carriage coordinate system.
[0299] When there is at least one voxel within the fifth preset range, the internal coordinate points are filled to obtain the voxel corresponding to the internal coordinate points.
[0300] Add the voxels corresponding to the internal coordinate points to the voxel set.
[0301] (vi) Loading Rate Determination Module 306
[0302] Loading rate determination module 306 is used to determine the loading rate of the target car based on the number of voxels being filled.
[0303] In some embodiments, the load rate determination module is used for:
[0304] Based on the voxel set, determine the number of unfilled voxels in the target carriage;
[0305] The total number of voxels in the target car is obtained by adding the number of voxels to be filled to the number of unfilled voxels in the target car.
[0306] Determine the ratio between the number of voxel points being filled and the total number of voxels in the target carriage;
[0307] The ratio is used as the loading rate of the target car.
[0308] In practice, the above modules can be implemented as independent entities or combined in any way to be implemented as the same or several entities. For the specific implementation of the above modules, please refer to the previous method implementation examples, which will not be repeated here.
[0309] As can be seen from the above, the loading rate measurement device of this embodiment can determine the single line of the point cloud based on the point cloud data of the target car; then segment the single line of the point cloud to obtain the segmented line segments corresponding to the single line of the point cloud; then perform inter-segment interpolation processing on the segmented line segments to obtain the interpolated line segments; perform voxel filling processing on the interpolated line segments to obtain a voxel set, the voxel set including the filled voxels; then determine the number of filled voxels; and then determine the loading rate of the target car based on the number of filled voxels.
[0310] This invention effectively achieves automated calculation of the loading rate volume within a target carriage, avoiding the drawbacks of manual measurement while ensuring calculation accuracy. The invention first defines a single point cloud line, then divides the point cloud line into line segments, and further performs voxel filling on these segments. During voxel filling, point cloud filling and point cloud elimination are combined. Furthermore, this invention employs a method of first filling the boundaries near the four sides of the carriage, and then filling coordinate points from the rear of the carriage towards the front, which effectively improves filling accuracy, thereby further enhancing the accuracy of loading rate calculation.
[0311] Accordingly, this application also provides an electronic device, which may include a front-end and a back-end, which may be integrated into one unit. The back-end may be a terminal or a server. The terminal may be a smartphone, tablet, laptop, touch screen, game console, personal computer, personal digital assistant (PDA), or other terminal device. The server may be a single server or a server cluster composed of multiple servers.
[0312] like Figure 4 As shown, Figure 4This is a schematic diagram of the device backend structure provided in an embodiment of this application. The device backend includes: a memory 401, a processor 402, and a communication module 403.
[0313] The memory 401 can be, but is not limited to, random access memory (RAM), read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), a hard disk, or a solid-state drive, etc. The memory 401 is used to store programs, and the processor 402 executes the programs after receiving execution instructions.
[0314] Processor 402 may be an integrated circuit chip with data processing capabilities. The aforementioned processor 402 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc. It can implement or execute the methods, steps, and logic block diagrams of this invention. The general-purpose processor can be a microprocessor or any conventional processor.
[0315] The communication module 403 is used for communication connections between electronic devices and external devices, enabling the transmission and reception of network signals and data. These network signals may include wireless or wired signals.
[0316] In some embodiments, the device front end may include a target detector, which is used for:
[0317] Determine the carriage coordinate system established at the back end of the equipment;
[0318] Receive the horizontal rotation command sent by the device backend, and rotate horizontally to the h-th preset rotation angle based on the first plane of the carriage coordinate system established by the device backend;
[0319] The device receives a scanning command from the backend of the device and scans from bottom to top along the third coordinate axis of the carriage coordinate system at the h-th preset rotation angle to obtain several point cloud data corresponding to the h-th preset horizontal rotation angle, where h≤n and n is the total number of rotations.
[0320] The point cloud data corresponding to the h-th preset horizontal rotation angle is sent to the device backend. For details on the implementation of each module, please refer to the previous embodiments; they will not be repeated here.
[0321] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.
[0322] As can be seen from the above, the electronic equipment provided in this embodiment can effectively realize the automated calculation of the loading rate volume in the target carriage, avoiding the disadvantages of manual measurement, while ensuring the accuracy of the calculation.
[0323] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be performed by instructions, or by instructions controlling related hardware. These instructions can be stored in a computer-readable storage medium and loaded and executed by a processor.
[0324] Therefore, embodiments of this application provide a computer-readable storage medium storing a plurality of computer programs that can be loaded by a processor to execute the steps in any of the load rate measurement methods provided in embodiments of this application.
[0325] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.
[0326] The storage medium may include: read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.
[0327] Since the computer program stored in the storage medium can execute the steps in any of the load rate measurement methods provided in the embodiments of this application, the beneficial effects that any of the load rate measurement methods provided in the embodiments of this application can achieve can be realized, as detailed in the preceding embodiments, and will not be repeated here.
[0328] The above provides a detailed description of a loading rate measurement method, apparatus, electronic device, and storage medium provided in the embodiments of this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The description of the above embodiments is only for the purpose of helping to understand the method and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A method of measuring loading rate, characterized by, The method comprises the following steps: determining a point cloud single line based on point cloud data of a target carriage; segmenting the point cloud single line to obtain segmented line segments corresponding to the point cloud single line; performing line segment interpolation processing on the segmented line segments to obtain interpolated line segments; performing voxel filling processing on the interpolated line segments to obtain a voxel set, the voxel set comprising filled voxels; determining the number of filled voxels; determining the loading rate of the target carriage according to the number of filled voxels; wherein the method further comprises: determining the range of the side surface of the target carriage based on a carriage coordinate system; obtaining a target carriage internal boundary range at a predetermined distance from the side surface of the target carriage according to the range of the side surface of the target carriage; obtaining an arbitrary boundary coordinate point of the target carriage internal boundary range; when the boundary coordinate point is not filled with voxels, determining a third predetermined range of the boundary coordinate point; when there is at least one voxel in the third predetermined range, filling the boundary coordinate point to obtain a voxel corresponding to the boundary coordinate point; adding the voxel corresponding to the boundary coordinate point to the voxel set.
2. The loading rate measuring method according to claim 1, wherein The method of determining a point cloud single line based on point cloud data of a target carriage comprises the following steps: establishing a carriage coordinate system; rotating a target detector in the target carriage to a first plane of the carriage coordinate system by a horizontal rotation instruction to a hth preset horizontal rotation angle; the target detector is instructed to scan from bottom to top along the third coordinate axis of the vehicle coordinate system by a preset angle at the hth preset horizontal rotation angle, and the target detector is used to acquire a plurality of point cloud data corresponding to the hth preset horizontal rotation angle n is the total number of rotations receiving a plurality of point cloud data corresponding to the hth preset horizontal rotation angle sent by the target detector, connecting the plurality of point cloud data corresponding to the hth preset horizontal rotation angle to obtain a point cloud single line corresponding to the hth preset horizontal rotation angle; when the target detector is detected to be horizontally rotated to an nth preset rotation angle, n point cloud single lines corresponding to the n preset horizontal rotation angles are obtained respectively.
3. The loading rate measuring method according to claim 1 or 2, characterized by, The method of segmenting the point cloud single line to obtain segmented line segments corresponding to the point cloud single line comprises the following steps: performing roof point recognition on the point cloud single line to obtain a point cloud single line after removing roof points; adding a tail point to the point cloud single line after removing roof points to obtain a point cloud single line after adding a tail point, the tail point being located on the side surface of the target carriage; segmenting the point cloud single line after adding a tail point into line segments to obtain segmented line segments.
4. The loading rate measuring method according to claim 3, wherein The method of performing roof point recognition on the point cloud single line to obtain a point cloud single line after removing roof points comprises the following steps: determining the coordinates of the j+kth point cloud data in the point cloud single line and the coordinates of the jth point cloud data, , , t is the total number of point cloud in the point cloud single line, and k is a positive integer; subtracting the coordinates of the jth point cloud data in the point cloud single line from the coordinates of the j+kth point cloud data in the point cloud single line to obtain a judgment vector; determining a first coordinate axis value of the judgment vector; when the third coordinate axis value of the j+kth point cloud data and the third coordinate axis value of the jth point cloud data are both less than a third coordinate axis threshold value, and the first coordinate axis value of the judgment vector is less than or equal to a first coordinate axis threshold value, the j+kth point cloud data to the tth point cloud data in the point cloud single line are regarded as roof points; removing the roof points to obtain a point cloud single line after removing roof points.
5. The loading rate measuring method according to claim 4, wherein The point cloud single line after the roof vertex is removed is increased with a tail point to obtain a point cloud single line after the tail point is increased, including: determining the position coordinates of the target detector; determining the current tail point of the point cloud single line after the roof vertex is removed based on the scanning order of the target detector scanning a preset angle from bottom to top along the third coordinate axis of the vehicle cabin coordinate system; when the current tail point is not located on the side of the target vehicle cabin, determining a ray passing through the current tail point through the position coordinates of the target detector; obtaining the intersection of the ray and the side of the target vehicle cabin; taking the intersection as the tail point of the point cloud single line after the roof vertex is removed to obtain the point cloud single line after the tail point is increased.
6. The loading rate measuring method according to claim 4, wherein The point cloud single line after the tail point is increased is divided into line segments to obtain divided line segments, including: determining the distance between adjacent two point cloud data in the point cloud single line after the tail point is increased based on the first plane of the vehicle cabin coordinate system; when the distance is greater than a distance threshold, dividing at the position between the adjacent two point cloud data to obtain the divided line segments.
7. The loading rate measuring method according to claim 1, wherein The divided line segments are subjected to line interpolation processing to obtain interpolated line segments, including: obtaining the rth line segment and the r+1th line segment in the divided line segments; when the rth line segment and the r+1th line segment satisfy a preset condition, determining a to-be-interpolated line segment between the rth line segment and the r+1th line segment; determining the start point of the to-be-interpolated line segment and the end point of the to-be-interpolated line segment; determining a direction vector according to the start point of the to-be-interpolated line segment and the end point of the to-be-interpolated line segment; performing point cloud interpolation on the direction vector according to a preset step length to obtain interpolated point cloud data; based on the interpolated point cloud data, obtaining the interpolated line segments.
8. The loading rate measuring method according to claim 7, wherein When the rth line segment and the r+1th line segment satisfy a preset condition, the to-be-interpolated line segment between the rth line segment and the r+1th line segment is determined, including: determining the start point and the end point of the rth line segment; determining the start point and the end point of the r+1th line segment; when the first coordinate axis value of the start point of the r+1th line segment is less than the first coordinate axis value of the end point of the rth line segment, or when the first coordinate axis value of the start point of the r+1th line segment is greater than or equal to the first coordinate axis value of the end point of the rth line segment and the third coordinate axis value of the start point of the r+1th line segment is greater than or equal to the third coordinate axis value of the end point of the rth line segment, determining a first to-be-interpolated line segment between the rth line segment and the r+1th line segment, the start point of the first to-be-interpolated line segment being the end point of the rth line segment, and the end point of the first to-be-interpolated line segment being the start point of the r+1th line segment; when the first coordinate axis value of the start point of the r+1th line segment is not less than the first coordinate axis value of the end point of the rth line segment, the third coordinate axis value of the start point of the r+1th line segment is less than the third coordinate axis value of the end point of the rth line segment, and the first coordinate axis value of the end point of the rth line segment is not less than the first coordinate axis value of the start point of the rth line segment, a second to-be-interpolated line segment between the rth line segment and the r+1th line segment is determined, the coordinates of the start point of the second to-be-interpolated line segment are the first coordinate axis value of the end point of the rth line segment, the second coordinate axis value of the end point of the rth line segment, and the third coordinate axis value of the start point of the r+1th line segment, and the end point of the second to-be-interpolated line segment is the start point of the r+1th line segment; when the first coordinate axis value of the start point of the r+1th line segment is not less than the first coordinate axis value of the end point of the rth line segment, the third coordinate axis value of the start point of the r+1th line segment is less than the third coordinate axis value of the end point of the rth line segment, and the first coordinate axis value of the end point of the rth line segment is less than the first coordinate axis value of the start point of the rth line segment, a third to-be-interpolated line segment between the rth line segment and the r+1th line segment is determined, the coordinates of the start point of the third to-be-interpolated line segment are the first coordinate axis value of the start point of the rth line segment, the second coordinate axis value of the start point of the rth line segment, and the third coordinate axis value of the start point of the r+1th line segment, and the end point of the third to-be-interpolated line segment is the start point of the r+1th line segment.
9. The loading rate measuring method according to Claim 1, wherein the voxel filling processing on the interpolated line segment to obtain a voxel set, comprising: voxelizing each point cloud data in the interpolated line segment to obtain a plurality of voxels, each voxel containing a point cloud data, and the voxel having a preset volume; determining the first coordinate axis value of the start point of the line segment and the first coordinate axis value of the end point of the line segment; when the first coordinate axis value of the start point of the line segment is greater than the first coordinate axis value of the end point of the line segment, determining a first preset range of the plurality of voxels to the target car carriage floor; performing voxel filling in the first preset range to obtain a voxel set, and the voxel set comprising a plurality of filled voxels.
10. The loading rate measuring method according to claim 9, wherein the voxel filling processing on the interpolated line segment to obtain a voxel set, comprising: when the first coordinate axis value of the start point of the line segment is not greater than the first coordinate axis value of the end point of the line segment, determining a second preset range of the plurality of voxels to the target car carriage floor; performing voxel elimination in the second preset range to obtain a plurality of eliminated voxels; eliminating the plurality of eliminated voxels from the voxel set to obtain a voxel set after elimination.
11. The loading rate measuring method according to claim 1, wherein the voxel filling processing on the interpolated line segment to obtain a voxel set, comprising: determining any one internal coordinate point in the target car carriage; when the internal coordinate point is not voxel filled, determining the negative direction of the first coordinate axis of the car carriage coordinate system; determine a fourth preset range of the internal coordinate point based on a negative direction of a first coordinate axis of the vehicle compartment coordinate system; when there is no voxel in the fourth preset range, determine a fifth preset range of the internal coordinate point based on a second coordinate axis of the vehicle compartment coordinate system; when there is at least one voxel in the fifth preset range, fill the internal coordinate point to obtain a voxel corresponding to the internal coordinate point; add the voxel corresponding to the internal coordinate point to the voxel set.
12. The loading rate measuring method according to claim 1, wherein The method further includes: determining a number of voxels not filled in the target vehicle compartment according to the voxel set; adding the number of filled voxels and the number of voxels not filled in the target vehicle compartment to obtain a total number of voxels in the target vehicle compartment; determining a ratio between the number of filled voxels and the total number of voxels in the target vehicle compartment; taking the ratio as the loading rate of the target vehicle compartment.
13. A loading rate measuring device characterized by comprising: The method further includes: a single line determination module configured to determine a point cloud single line based on point cloud data of a target vehicle compartment; a single line segmentation module configured to segment the point cloud single line to obtain segmented line segments corresponding to the point cloud single line; a line segment interpolation module configured to perform interpolation processing between the segmented line segments to obtain interpolated line segments; a voxel filling module configured to perform voxel filling processing on the interpolated line segments to obtain a voxel set, the voxel set including filled voxels; a voxel number determination module configured to determine a number of the filled voxels; a loading rate determination module configured to determine a loading rate of the target vehicle compartment according to the number of the filled voxels. The voxel filling module includes a boundary filling module configured to: determine a range of a side surface of the target vehicle compartment based on a vehicle compartment coordinate system; obtain a target vehicle compartment internal boundary range at a preset distance from the side surface of the target vehicle compartment according to the range of the side surface of the target vehicle compartment; obtain any one boundary coordinate point of the target vehicle compartment internal boundary range; when the boundary coordinate point is not filled with voxels, determine a third preset range of the boundary coordinate point; when there is at least one voxel in the third preset range, fill the boundary coordinate point to obtain a voxel corresponding to the boundary coordinate point; add the voxel corresponding to the boundary coordinate point to the voxel set.
14. An electronic device, comprising: The electronic device includes a device backend, the device backend including a processor, a memory, and a loading rate measurement program stored in the memory and executable on the processor, the processor executing the loading rate measurement program to implement the steps in the loading rate measurement method of any one of claims 1 to 12.
15. The electronic device of claim 14, wherein, The electronic device further includes a device front end, the device front end including a target detector configured to: determine a vehicle compartment coordinate system established by the device backend; receive a horizontal rotation instruction sent by the device backend, and horizontally rotate to an hth preset horizontal rotation angle based on a first plane of the vehicle compartment coordinate system established by the device backend; receive the scanning instruction sent by the device backend, and scan from bottom to top along a third coordinate axis of the vehicle compartment coordinate system by a preset angle at the hth preset horizontal rotation angle to obtain a plurality of point cloud data corresponding to the hth preset horizontal rotation angle, n is the total number of rotations. send the point cloud data corresponding to the hth preset horizontal rotation angle to the device backend.
Citation Information
Patent Citations
Ship 3D scanning point cloud data processing method
CN111968224A
Carriage loading and unloading rate calculation method and device
CN113988740A