CN113888622A - Method and device for determining cargo volume in carriage, electronic equipment and storage medium - Google Patents

Method and device for determining cargo volume in carriage, electronic equipment and storage medium Download PDF

Info

Publication number
CN113888622A
CN113888622A CN202111196662.7A CN202111196662A CN113888622A CN 113888622 A CN113888622 A CN 113888622A CN 202111196662 A CN202111196662 A CN 202111196662A CN 113888622 A CN113888622 A CN 113888622A
Authority
CN
China
Prior art keywords
determining
point
volume
triangle
compartment
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111196662.7A
Other languages
Chinese (zh)
Inventor
王剑云
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Jiqi Chengdu Technology Co ltd
Original Assignee
Jiqi Chengdu Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Jiqi Chengdu Technology Co ltd filed Critical Jiqi Chengdu Technology Co ltd
Priority to CN202111196662.7A priority Critical patent/CN113888622A/en
Publication of CN113888622A publication Critical patent/CN113888622A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/60Analysis of geometric attributes
    • G06T7/62Analysis of geometric attributes of area, perimeter, diameter or volume
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T17/00Three dimensional [3D] modelling, e.g. data description of 3D objects
    • G06T17/20Finite element generation, e.g. wire-frame surface description, tesselation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • G06T3/06Topological mapping of higher dimensional structures onto lower dimensional surfaces
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10028Range image; Depth image; 3D point clouds

Landscapes

  • Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Geometry (AREA)
  • Computer Graphics (AREA)
  • Software Systems (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Length Measuring Devices By Optical Means (AREA)

Abstract

The application provides a method and a device for determining the volume of goods in a carriage, an electronic device and a method and a device for storing media, which are used for acquiring point cloud data in the carriage; connecting each sampling point in the point cloud data with an origin of a carriage coordinate system to determine a plurality of intersection points; vertically projecting the determined multiple intersection points to an XOY plane of a carriage coordinate system, determining a projection point of each intersection point, and constructing a triangulation network based on the projection points; determining a sampling point corresponding to each vertex of each triangle in the triangular network; determining a plurality of triangular pyramids based on three sampling points and an origin point corresponding to each triangle; and determining the volume of the goods in the target compartment according to the empty compartment volume of the target compartment and the volume corresponding to each triangular pyramid. Like this, this application passes through this priori condition of the empty railway carriage or compartment volume in carriage, gathers the volume that single point cloud data can confirm the goods in the carriage to can effectively improve the speed and the degree of accuracy of confirming the goods volume.

Description

Method and device for determining cargo volume in carriage, electronic equipment and storage medium
Technical Field
The present application relates to the field of logistics and volume measurement technologies, and in particular, to a method and an apparatus for determining a volume of a cargo in a vehicle compartment, an electronic device, and a storage medium.
Background
In the modern logistics industry, due to the requirements of monitoring the safety of goods and alarming abnormal events in the transportation process, the volume of the goods in a boxcar and the change rate of the volume need to be monitored in real time. A common approach uses an array of infrared sensors and a TOF camera or lidar sensor mounted to collect data to calculate volume. The mature scheme is that the infrared sensor array collects distance data of the top of the carriage to the goods, and the volume is calculated by a triangulation network method, but due to the fact that dozens of infrared sensors and wire arranging guide rails need to be installed at the top of the carriage, installation and maintenance costs are high, accuracy is lowered due to sparse infrared arrays, and cost is increased due to dense arrays. Therefore, the point cloud data acquired by using the TOF camera or the laser radar is easier to popularize and maintain, the common point cloud volume calculation scheme in the industry is a 2.5D volume calculation scheme, and the algorithm in software cloudcompare is taken as an example, and the principle is as follows: two parts of point cloud data are needed, wherein one part of point cloud data is background point cloud data when no object exists, and the other part of point cloud data is point cloud data after the object to be detected is placed; or one of the two is parallel to any plane of XOY, YOZ and XOZ, and the other is point cloud data of the object to be detected. And after the two point cloud data are respectively subjected to fitting curved surfaces, the volume of the columnar microstructure formed by the two point clouds is calculated through fixed step length sampling, and finally the volumes are accumulated to obtain the object volume. The method is a general method for calculating the volume, but the method is not suitable for the point cloud number acquired by a laser radar or a TOF camera in a scene in a carriage, firstly, because the acquisition equipment in the carriage can be knocked and askew by equipment along with the shaking caused by the running of a vehicle or the collision of goods, the angle of the equipment for acquiring two pieces of point cloud data cannot be ensured to be consistent, secondly, because of the tooth-shaped structure and the optical reflection reason of the carriage wall, the point cloud of the whole carriage wall does not form a plane but is a mixed point randomly distributed near the plane, and a larger error can be caused by the method of subtracting two frames.
Disclosure of Invention
In view of this, an object of the present application is to provide a method, an apparatus, an electronic device and a storage medium for determining a cargo volume in a vehicle cabin, which can effectively improve a rate and an accuracy of determining the cargo volume.
The embodiment of the application provides a method for determining the volume of goods in a carriage, which comprises the following steps:
acquiring point cloud data in a target compartment acquired by using point cloud acquisition equipment;
connecting each sampling point in the point cloud data with the origin of a preset compartment coordinate system of the target compartment to determine a plurality of intersection points on a preset auxiliary surface;
vertically projecting the determined multiple intersection points to an XOY plane of the preset carriage coordinate system, determining projection points of each intersection point on the XOY plane, and constructing to obtain a triangular net based on the projection points of each intersection point; wherein the triangulation network comprises a plurality of triangles;
for each triangle in the triangular network, determining a corresponding sampling point of each vertex of the triangle in the point cloud data, and determining three corresponding sampling points of the triangle in the point cloud data;
determining a triangular pyramid corresponding to the triangle in the predetermined compartment coordinate system based on the three sampling points corresponding to the triangle and the origin;
and determining the volume of the goods in the target compartment according to the predetermined empty compartment volume of the target compartment and the volume of the triangular pyramid corresponding to each triangle.
Optionally, the car coordinate system is determined by:
determining the origin of the coordinate system of the point cloud acquisition equipment as the origin of the coordinate system of the carriage;
the X axis of the carriage coordinate system is vertical to the front of the target carriage, the Y axis of the carriage coordinate system is vertical to the side face of the target carriage, and the Z axis of the carriage coordinate system is vertical to the top face of the target carriage.
Optionally, the auxiliary surface is set by:
setting an auxiliary point on an X axis, a Y axis and a Z axis of the carriage coordinate system respectively, and determining a surface formed by connecting the three auxiliary points as an auxiliary surface; and each auxiliary point is equal in distance from the origin, and the auxiliary surface is positioned in a space formed by the target compartment.
Optionally, the triangulation network is constructed by the following steps:
and connecting the projection points on the XOY plane based on a triangular growth method to construct a triangular net.
Optionally, the step of connecting each original point in the point cloud data with an origin of a predetermined car coordinate system of the target car to determine a plurality of intersection points on a preset auxiliary surface includes:
connecting each sampling point in the point cloud data with an origin of a pre-calibrated carriage coordinate system to determine a plurality of straight lines;
for each determined straight line, determining an intersection point of the straight line and the auxiliary surface to obtain a plurality of intersection points.
Optionally, the determining, for each triangle in the triangulation network, a corresponding sampling point of each vertex of the triangle in the point cloud data, and determining three corresponding sampling points of the triangle in the point cloud data include:
aiming at each triangle in the triangular net, determining the intersection point corresponding to each vertex of the triangle;
for each intersection point, determining a sampling point corresponding to the intersection point based on a straight line where the intersection point is located;
and determining a sampling point corresponding to each vertex of the triangle based on the sampling point corresponding to each intersection point.
Optionally, the determining the volume of the goods in the target compartment according to the predetermined empty compartment volume of the target compartment and the volume of the triangular pyramid corresponding to each triangle includes:
determining the volume of the vacant space in the target compartment based on the volume of each triangular pyramid;
and subtracting the volume of the vacant space in the target compartment from the volume of the vacant compartment in the target compartment to determine the volume of the goods in the target compartment.
The embodiment of the present application further provides a device for determining the volume of goods in a compartment, the device for determining includes:
the acquisition module is used for acquiring point cloud data in a target compartment acquired by using point cloud acquisition equipment;
the intersection point determining module is used for connecting each sampling point in the point cloud data with an origin point of a preset compartment coordinate system of the target compartment and determining a plurality of intersection points on a preset auxiliary surface;
the projection point determining module is used for vertically projecting the determined intersection points to an XOY plane of the predetermined compartment coordinate system, determining projection points of each intersection point on the XOY plane, and constructing a triangulation network based on the projection points of each intersection point; wherein the triangulation network comprises a plurality of triangles;
the sampling point determining module is used for determining a corresponding sampling point of each vertex of each triangle in the point cloud data and determining three corresponding sampling points of the triangle in the point cloud data aiming at each triangle in the triangular network;
the triangular pyramid determining module is used for determining the triangular pyramid corresponding to the triangle in the preset compartment coordinate system based on the three sampling points corresponding to the triangle and the origin;
and the volume determining module is used for determining the volume of the goods in the target compartment according to the predetermined empty compartment volume of the target compartment and the volume of the triangular pyramid corresponding to each triangle.
Optionally, the determining apparatus further includes a coordinate system determining module, where the coordinate system determining module is configured to:
determining the origin of the coordinate system of the point cloud acquisition equipment as the origin of the coordinate system of the carriage;
the X axis of the carriage coordinate system is vertical to the front of the target carriage, the Y axis of the carriage coordinate system is vertical to the side face of the target carriage, and the Z axis of the carriage coordinate system is vertical to the top face of the target carriage.
Optionally, the determining apparatus further includes an auxiliary surface constructing module, and the auxiliary surface constructing module is configured to:
setting an auxiliary point on an X axis, a Y axis and a Z axis of the carriage coordinate system respectively, and determining a surface formed by connecting the three auxiliary points as an auxiliary surface; and each auxiliary point is equal in distance from the origin, and the auxiliary surface is positioned in a space formed by the target compartment.
Optionally, the determining apparatus further includes a triangulation network constructing module, where the triangulation network constructing module is configured to:
and connecting the projection points on the XOY plane based on a triangular growth method to construct a triangular net.
Optionally, the intersection determining module is configured to connect each original point in the point cloud data with an origin of a predetermined car coordinate system of the target car, and determine a plurality of intersection points on a preset auxiliary plane, where the intersection determining module is configured to:
connecting each sampling point in the point cloud data with an origin of a pre-calibrated carriage coordinate system to determine a plurality of straight lines;
for each determined straight line, determining an intersection point of the straight line and the auxiliary surface to obtain a plurality of intersection points.
Optionally, when the sampling point determining module is configured to determine, for each triangle in the triangulation network, a corresponding sampling point of each vertex of the triangle in the point cloud data, and determine three corresponding sampling points of the triangle in the point cloud data, the sampling point determining module is configured to:
aiming at each triangle in the triangular net, determining the intersection point corresponding to each vertex of the triangle;
for each intersection point, determining a sampling point corresponding to the intersection point based on a straight line where the intersection point is located;
and determining a sampling point corresponding to each vertex of the triangle based on the sampling point corresponding to each intersection point.
Optionally, when the volume determining module is configured to determine the volume of the cargo in the target compartment according to the predetermined empty compartment volume of the target compartment and the volume of the triangular pyramid corresponding to each triangle, the volume determining module is configured to:
determining the volume of the vacant space in the target compartment based on the volume of each triangular pyramid;
and subtracting the volume of the vacant space in the target compartment from the volume of the vacant compartment in the target compartment to determine the volume of the goods in the target compartment.
An embodiment of the present application further provides an electronic device, including: a processor, a memory and a bus, the memory storing machine-readable instructions executable by the processor, the processor and the memory communicating over the bus when the electronic device is operating, the machine-readable instructions when executed by the processor performing the steps of the method of determining as described above.
Embodiments of the present application further provide a computer-readable storage medium, on which a computer program is stored, where the computer program is executed by a processor to perform the steps of the determining method as described above.
The method, the device, the electronic equipment and the storage medium for determining the cargo volume in the carriage are used for acquiring point cloud data in a target carriage acquired by using a point cloud acquisition device; connecting each sampling point in the point cloud data with the origin of a preset compartment coordinate system of the target compartment to determine a plurality of intersection points on a preset auxiliary surface; vertically projecting the determined multiple intersection points to an XOY plane of the preset carriage coordinate system, determining projection points of each intersection point on the XOY plane, and constructing to obtain a triangular net based on the projection points of each intersection point; wherein the triangulation network comprises a plurality of triangles; for each triangle in the triangular network, determining a corresponding sampling point of each vertex of the triangle in the point cloud data, and determining three corresponding sampling points of the triangle in the point cloud data; determining a triangular pyramid corresponding to the triangle in the predetermined compartment coordinate system based on the three sampling points corresponding to the triangle and the origin; and determining the volume of the goods in the target compartment according to the predetermined empty compartment volume of the target compartment and the volume of the triangular pyramid corresponding to each triangle.
Like this, this application is at first through the sampling point in auxiliary surface and the original data of counting, determines the projection point that can be used to found triangular mesh, then seeks the sampling point that corresponds through the projection point is reverse, then constructs out a plurality of triangular pyramids through the sampling point, and the volume in the empty space in carriage is confirmed to the volume based on a plurality of triangular pyramids, and finally, according to the volume in carriage gross sum and the empty space in carriage, the volume of goods of adorning in the carriage is confirmed.
In order to make the aforementioned objects, features and advantages of the present application more comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained from the drawings without inventive effort.
Fig. 1 is a flowchart of a method for determining a cargo volume in a vehicle cabin according to an embodiment of the present disclosure;
FIG. 2 is a three-dimensional schematic view of a coordinate system of a carriage;
FIG. 3 is a schematic structural diagram of a constructed auxiliary surface;
FIG. 4 is a schematic diagram of a part of intersection points of connecting lines between a sampling point and an origin and an auxiliary surface;
FIG. 5 is a schematic view of a portion of a triangulation network;
fig. 6 is a schematic structural diagram of a device for determining a cargo volume in a vehicle compartment according to an embodiment of the present application;
fig. 7 is a second schematic structural diagram of an apparatus for determining a cargo volume in a vehicle compartment according to an embodiment of the present application;
fig. 8 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all the embodiments. The components of the embodiments of the present application, generally described and illustrated in the figures herein, can be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present application, presented in the accompanying drawings, is not intended to limit the scope of the claimed application, but is merely representative of selected embodiments of the application. Every other embodiment that can be obtained by a person skilled in the art without making creative efforts based on the embodiments of the present application falls within the protection scope of the present application.
In the modern logistics industry, due to the requirements of monitoring the safety of goods and alarming abnormal events in the transportation process, the volume of the goods in a boxcar and the change rate of the volume need to be monitored in real time. In the prior art, a TOF camera or a laser radar is generally used for collecting point cloud data, a 2.5D volume calculation scheme is adopted, and the calculation method needs two parts of point cloud data, wherein one part of point cloud data is background point cloud data when no object exists, and the other part of point cloud data is point cloud data after the object to be detected is placed; or one of the two is parallel to any plane of XOY, YOZ and XOZ, and the other is point cloud data of the object to be detected. And after the two point cloud data are respectively subjected to fitting curved surfaces, the volume of the columnar microstructure formed by the two point clouds is calculated through fixed step length sampling, and finally the volumes are accumulated to obtain the object volume. However, this method is not suitable for use in a car interior scene, and firstly, because the acquisition equipment in the car interior may collide with the equipment askew along with the shaking caused by the running of the vehicle or the collision of the goods, it is impossible to ensure the consistency of the angles of the equipment for acquiring two point cloud data, and secondly, because of the tooth-shaped structure of the car wall and the optical reflection, the point cloud of the whole car wall does not form a plane, but is a mixed point randomly distributed near the plane, and a method of subtracting two frames may cause a large error.
Based on the method, the volume of the goods in the compartment can be determined by acquiring single point cloud data according to the prior condition of the volume of the target compartment, so that the speed and the accuracy of determining the volume of the goods can be effectively improved.
Referring to fig. 1, fig. 1 is a flowchart illustrating a method for determining a cargo volume in a vehicle cabin according to an embodiment of the present disclosure. As shown in fig. 1, a method for determining a cargo volume in a vehicle cabin provided in an embodiment of the present application includes:
s101, point cloud data in a target compartment acquired by using point cloud acquisition equipment is acquired.
In the step, point cloud data in a target compartment with goods can be acquired by using point cloud acquisition equipment such as a laser radar or a TOF camera.
The collected point cloud data of the target compartment can be collected in the running process of the vehicle or in the static state of the vehicle; the point cloud data comprises a plurality of sampling points and information data such as three-dimensional coordinates of each sampling point.
And S102, connecting each sampling point in the point cloud data with the origin of a preset compartment coordinate system of the target compartment, and determining a plurality of intersection points on a preset auxiliary surface.
Optionally, the step of connecting each original point in the point cloud data with an origin of a predetermined car coordinate system of the target car to determine a plurality of intersection points on a preset auxiliary surface includes: connecting each sampling point in the point cloud data with an origin of a pre-calibrated carriage coordinate system to determine a plurality of straight lines; for each determined straight line, determining an intersection point of the straight line and the auxiliary surface to obtain a plurality of intersection points.
In the step, after point cloud data in the target compartment is obtained, each sampling point included in the point cloud data is connected with an origin of a preset compartment coordinate system of the target compartment, a plurality of straight lines can be determined, and each straight line has a point of intersection with a preset auxiliary surface to obtain a plurality of intersection points.
Optionally, the car coordinate system is determined by: determining the origin of the coordinate system of the point cloud acquisition equipment as the origin of the coordinate system of the carriage; the X axis of the carriage coordinate system is vertical to the front of the target carriage, the Y axis of the carriage coordinate system is vertical to the side face of the target carriage, and the Z axis of the carriage coordinate system is vertical to the top face of the target carriage.
The origin of the coordinate system of the vehicle compartment is determined by the origin of the coordinate system of the point cloud acquisition device, and the coordinate system of the vehicle compartment and the coordinate system of the point cloud acquisition device are considered to be coincident. Generally, in order to better acquire point cloud data in a carriage, a point cloud acquisition device is installed at a vertex angle position at the tail of a target carriage, wherein the vertex angle is a carriage coordinate system or an origin of a coordinate system of the point cloud acquisition device.
The coordinate system of the point cloud acquisition equipment is a camera coordinate system; the top angle of the tail part of the target compartment comprises a left top angle and a right top angle; the front of the target carriage is a carriage surface close to the direction of the head.
For example, please refer to fig. 2, fig. 2 is a three-dimensional schematic diagram of a coordinate system of a car. When the point cloud collection device is installed at the upper right corner of the tail, the X-axis, the Y-axis, and the Z-axis of the corresponding car coordinate system are as shown in fig. 2, the X-axis points to the front of the target car, the Y-axis points to the left side of the target car, and the Z-axis points to the top surface of the target car.
In addition, the point cloud collection equipment can also be installed at the position of the upper left corner of the tail part, the origin of the corresponding carriage coordinate system is the left vertex angle, the X axis, the Y axis and the Z axis of the corresponding carriage coordinate system can be the positions that the X axis points to the front of the target carriage, the Y axis points to the right side face of the target carriage, and the Z axis points to the top face of the target carriage.
Optionally, the auxiliary surface is set by: setting an auxiliary point on an X axis, a Y axis and a Z axis of the carriage coordinate system respectively, and determining a surface formed by connecting the three auxiliary points as an auxiliary surface; and each auxiliary point is equal in distance from the origin, and the auxiliary surface is positioned in a space formed by the target compartment.
For example, referring to fig. 3, fig. 3 is a schematic structural diagram of a constructed auxiliary surface. As shown in fig. 3, point a is set as an auxiliary point in the positive direction of the X axis, the coordinate of point a is (1,0,0), point B is set as an auxiliary point in the positive direction of the Y axis, the coordinate of point B is (0,1,0), point C is set as an auxiliary point in the negative direction of the Z axis, the coordinate of point C is (0,0, -1), A, B and point C are connected to form a triangle, the area enclosed by the triangle is an auxiliary surface, and the auxiliary surface is located in the interior space of the vehicle cabin.
Here, the distance of A, B and C from the origin O may be 1 m. The distances from the A, B and the C three auxiliary points to the origin may be selected from other distances as long as the distances from the three auxiliary points to the origin are equal.
And determining a plane equation corresponding to the auxiliary surface according to the coordinates of the three auxiliary points. After the plane equation of the auxiliary surface is determined, the coordinates of each intersection point of each sampling point and the auxiliary surface when each sampling point is connected with the origin can be determined based on the coordinates of each sampling point.
For example, referring to fig. 4, fig. 4 is a schematic diagram of a partial intersection point of a connecting line between a sampling point and an origin and an auxiliary surface. Due to the limitation of a scene, theoretically, the intersection point graph forms an equilateral triangle, but actually, due to the existence of multipath interference, insufficient reflected light energy, errors of the measuring equipment and the like, the intersection point graph has a plurality of problems, so that the details of the intersection point graph are as shown in fig. 4: the intersection points are arranged in a non-uniform gap mode, and hollow areas appear.
S103, vertically projecting the determined multiple intersection points to an XOY plane of the preset compartment coordinate system, determining projection points of each intersection point on the XOY plane, and constructing to obtain a triangulation network based on the projection points of each intersection point; wherein the triangulation comprises a plurality of triangles.
In this step, after a plurality of intersection points located on the auxiliary surface are determined, the plurality of intersection points are vertically projected onto the XOY plane of the car coordinate system, that is, the top surface of the target car, and a projection point of each intersection point on the XOY plane is determined, so as to obtain a plurality of projection points. And constructing a triangular net by using the obtained plurality of projection points, wherein the constructed triangular net comprises a plurality of triangles.
Here, when the projection point of each intersection point on the XOY plane is determined by the computer, based on the coordinates of each intersection point determined in step S102, the Z value in the coordinates of each intersection point is directly discarded, and the projection points of all the intersection points on the XOY plane can be obtained.
Optionally, the triangulation network is constructed by the following steps: and connecting the projection points on the XOY plane based on a triangular growth method to construct a triangular net.
Here, the trigonometric growth method is a Delaunay triangulation method.
For example, please refer to fig. 5, fig. 5 is a schematic diagram of a partial triangulation network. As shown in fig. 5, the projection points shown in fig. 4 are connected in sequence by using the Delaunay triangulation method, resulting in a triangulation as shown in fig. 5. Wherein, the vertex of each triangle in fig. 5 is the projection point on the XOY plane.
S104, aiming at each triangle in the triangular network, determining the corresponding sampling point of each vertex of the triangle in the point cloud data, and determining the corresponding three sampling points of the triangle in the point cloud data.
In the step, after a triangulation network is constructed by the projection points, the triangulation network comprises a plurality of triangles. And determining sampling points in the point cloud data acquired by the point cloud acquisition equipment corresponding to the three vertexes of the triangle respectively aiming at each triangle in the triangular network to obtain three sampling points corresponding to the three vertexes of the triangle.
Here, since a plurality of triangles in the triangulation network share one vertex, the corresponding sampling points are also the same.
Optionally, the determining, for each triangle in the triangulation network, a corresponding sampling point of each vertex of the triangle in the point cloud data, and determining three corresponding sampling points of the triangle in the point cloud data include: aiming at each triangle in the triangular net, determining the intersection point corresponding to each vertex of the triangle; for each intersection point, determining a sampling point corresponding to the intersection point based on a straight line where the intersection point is located; and determining a sampling point corresponding to each vertex of the triangle based on the sampling point corresponding to each intersection point.
In the step, by a reverse search method, firstly, for each triangle in the triangular network, determining an intersection point on the auxiliary surface corresponding to each vertex of the triangle, and obtaining three intersection points corresponding to the three vertices of the triangle; then, aiming at each obtained intersection point (the intersection point is determined by the intersection of a straight line formed by connecting the sampling point and the origin and the auxiliary surface), determining the sampling point corresponding to the intersection point through the straight line formed by connecting the sampling point where the intersection point is located and the origin; and finally, determining sampling points corresponding to three vertexes of the triangle respectively based on the sampling points corresponding to the three intersection points. In this way, the sampling point corresponding to each vertex of each triangle in the triangular mesh can be determined.
And S105, determining the triangular pyramid corresponding to the triangle in the preset compartment coordinate system based on the three sampling points corresponding to the triangle and the origin.
In the step, after the sampling points in the point cloud data corresponding to each vertex of each triangle in the triangular network are determined, each triangle corresponds to three sampling points. And connecting the three sampling points of the triangle with the origin of the carriage coordinate system to obtain a triangular pyramid, and obtaining a plurality of triangular pyramids based on a plurality of triangles included in the triangular network.
And S106, determining the volume of the goods in the target compartment according to the predetermined empty compartment volume of the target compartment and the volume of the triangular pyramid corresponding to each triangle.
Optionally, the determining the volume of the goods in the target compartment according to the predetermined empty compartment volume of the target compartment and the volume of the triangular pyramid corresponding to each triangle includes: determining the volume of the vacant space in the target compartment based on the volume of each triangular pyramid; and subtracting the volume of the vacant space in the target compartment from the volume of the target compartment to determine the volume of the goods in the target compartment.
Here, the empty volume of the target compartment is determined in advance according to the length, width and height of the compartment; and calculating the volume of each triangular pyramid based on the coordinate values and the origin of three sampling points of the triangular pyramid, adding the volumes of all triangular pyramids, and obtaining the total volume after adding, namely the volume of the vacant space in the target compartment.
The embodiment of the application provides a method for determining the volume of goods in a carriage. Firstly, determining projection points which can be used for constructing a triangular grid through sampling points in the auxiliary surface and the original point number data, then reversely finding corresponding sampling points through the projection points, then constructing a plurality of triangular pyramids through the sampling points, determining the volume of a vacant space in a carriage based on the volumes of the triangular pyramids, and finally determining the volume of goods contained in the carriage according to the total volume of the carriage and the volume of the vacant space in the carriage.
Referring to fig. 6 and 7, fig. 6 is a first schematic structural diagram of a device for determining a cargo volume in a vehicle cabin according to an embodiment of the present application, and fig. 7 is a second schematic structural diagram of the device for determining a cargo volume in a vehicle cabin according to the embodiment of the present application. As shown in fig. 6, the determining means 600 includes:
an obtaining module 601, configured to obtain point cloud data in a target compartment, which is collected by a point cloud collection device;
an intersection point determining module 602, configured to connect each sampling point in the point cloud data with an origin of a predetermined compartment coordinate system of the target compartment, and determine a plurality of intersection points on a preset auxiliary plane;
the projection point determining module 603 is configured to vertically project the determined multiple intersection points onto an XOY plane of the predetermined car coordinate system, determine a projection point of each intersection point on the XOY plane, and construct a triangulation network based on the projection point of each intersection point; wherein the triangulation network comprises a plurality of triangles;
a sampling point determining module 604, configured to determine, for each triangle in the triangulation network, a sampling point corresponding to each vertex of the triangle in the point cloud data, and determine three corresponding sampling points of the triangle in the point cloud data;
a triangular pyramid determining module 605, configured to determine a triangular pyramid corresponding to the triangle in the predetermined compartment coordinate system based on the three sampling points corresponding to the triangle and the origin;
and the volume determining module 606 is used for determining the volume of the goods in the target compartment according to the predetermined empty compartment volume of the target compartment and the volume of the triangular pyramid corresponding to each triangle.
Optionally, as shown in fig. 7, the determining apparatus 600 further includes a coordinate system determining module 607, where the coordinate system determining module 607 is configured to:
determining the origin of the coordinate system of the point cloud acquisition equipment as the origin of the coordinate system of the carriage;
the X axis of the carriage coordinate system is vertical to the front of the target carriage, the Y axis of the carriage coordinate system is vertical to the side face of the target carriage, and the Z axis of the carriage coordinate system is vertical to the top face of the target carriage.
Optionally, the determining apparatus 600 further includes an auxiliary surface constructing module 608, and the auxiliary surface constructing module 608 is configured to:
setting an auxiliary point on an X axis, a Y axis and a Z axis of the carriage coordinate system respectively, and determining a surface formed by connecting the three auxiliary points as an auxiliary surface; and each auxiliary point is equal in distance from the origin, and the auxiliary surface is positioned in a space formed by the target compartment.
Optionally, the determining apparatus 600 further includes a triangulation network constructing module 609, where the triangulation network constructing module 609 is configured to:
and connecting the projection points on the XOY plane based on a triangular growth method to construct a triangular net.
Optionally, the intersection determining module 602 is configured to connect each original point in the point cloud data with an origin of a predetermined car coordinate system of the target car, and determine a plurality of intersection points on a preset auxiliary plane, where the intersection determining module 602 is configured to:
connecting each sampling point in the point cloud data with an origin of a pre-calibrated carriage coordinate system to determine a plurality of straight lines;
for each determined straight line, determining an intersection point of the straight line and the auxiliary surface to obtain a plurality of intersection points.
Optionally, when the sampling point determining module 604 is configured to determine, for each triangle in the triangulation network, a corresponding sampling point of each vertex of the triangle in the point cloud data, and determine three corresponding sampling points of the triangle in the point cloud data, the sampling point determining module 604 is configured to:
aiming at each triangle in the triangular net, determining the intersection point corresponding to each vertex of the triangle;
for each intersection point, determining a sampling point corresponding to the intersection point based on a straight line where the intersection point is located;
and determining a sampling point corresponding to each vertex of the triangle based on the sampling point corresponding to each intersection point.
Optionally, when the volume determining module 606 is configured to determine the volume of the cargo in the target compartment according to the predetermined empty compartment volume of the target compartment and the volume of the triangular pyramid corresponding to each triangle, the volume determining module 606 is configured to:
determining the volume of the vacant space in the target compartment based on the volume of each triangular pyramid;
and subtracting the volume of the vacant space in the target compartment from the volume of the vacant compartment in the target compartment to determine the volume of the goods in the target compartment.
Referring to fig. 8, fig. 8 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure. As shown in fig. 8, the electronic device 800 includes a processor 810, a memory 820, and a bus 830.
The memory 820 stores machine-readable instructions executable by the processor 810, when the electronic device 800 runs, the processor 810 and the memory 820 communicate through the bus 830, and when the machine-readable instructions are executed by the processor 810, the steps of the method in the method embodiments shown in fig. 1 to 5 may be performed.
An embodiment of the present application further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps of the method in the method embodiment shown in fig. 1 to 5 may be executed.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one logical division, and there may be other divisions when actually implemented, and for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of devices or units through some communication interfaces, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a non-volatile computer-readable storage medium executable by a processor. Based on such understanding, the technical solution of the present application or portions thereof that substantially contribute to the prior art may be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
Finally, it should be noted that: the above-mentioned embodiments are only specific embodiments of the present application, and are used for illustrating the technical solutions of the present application, but not limiting the same, and the scope of the present application is not limited thereto, and although the present application is described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: any person skilled in the art can modify or easily conceive the technical solutions described in the foregoing embodiments or equivalent substitutes for some technical features within the technical scope disclosed in the present application; such modifications, changes or substitutions do not depart from the spirit and scope of the exemplary embodiments of the present application, and are intended to be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (10)

1. A method of determining a volume of cargo in a vehicle compartment, the method comprising:
acquiring point cloud data in a target compartment acquired by using point cloud acquisition equipment;
connecting each sampling point in the point cloud data with the origin of a preset compartment coordinate system of the target compartment to determine a plurality of intersection points on a preset auxiliary surface;
vertically projecting the determined multiple intersection points to an XOY plane of the preset carriage coordinate system, determining projection points of each intersection point on the XOY plane, and constructing to obtain a triangular net based on the projection points of each intersection point; wherein the triangulation network comprises a plurality of triangles;
for each triangle in the triangular network, determining a corresponding sampling point of each vertex of the triangle in the point cloud data, and determining three corresponding sampling points of the triangle in the point cloud data;
determining a triangular pyramid corresponding to the triangle in the predetermined compartment coordinate system based on the three sampling points corresponding to the triangle and the origin;
and determining the volume of the goods in the target compartment according to the predetermined empty compartment volume of the target compartment and the volume of the triangular pyramid corresponding to each triangle.
2. The determination method according to claim 1, characterized in that the car coordinate system is determined by:
determining the origin of the coordinate system of the point cloud acquisition equipment as the origin of the coordinate system of the carriage;
the X axis of the carriage coordinate system is vertical to the front of the target carriage, the Y axis of the carriage coordinate system is vertical to the side face of the target carriage, and the Z axis of the carriage coordinate system is vertical to the top face of the target carriage.
3. The determination method according to claim 1, characterized in that the auxiliary surface is set by:
setting an auxiliary point on an X axis, a Y axis and a Z axis of the carriage coordinate system respectively, and determining a surface formed by connecting the three auxiliary points as an auxiliary surface; and each auxiliary point is equal in distance from the origin, and the auxiliary surface is positioned in a space formed by the target compartment.
4. The method of determination according to claim 1, characterized in that a triangulation network is constructed by:
and connecting the projection points on the XOY plane based on a triangular growth method to construct a triangular net.
5. The method according to claim 1, wherein the determining a plurality of intersection points on a predetermined auxiliary surface by connecting each original point in the point cloud data with an origin point of a predetermined car coordinate system of the target car comprises:
connecting each sampling point in the point cloud data with an origin of a pre-calibrated carriage coordinate system to determine a plurality of straight lines;
for each determined straight line, determining an intersection point of the straight line and the auxiliary surface to obtain a plurality of intersection points.
6. The method of claim 5, wherein the determining, for each triangle in the triangulation network, the corresponding sample point of each vertex of the triangle in the point cloud data, and the corresponding three sample points of the triangle in the point cloud data comprises:
aiming at each triangle in the triangular net, determining the intersection point corresponding to each vertex of the triangle;
for each intersection point, determining a sampling point corresponding to the intersection point based on a straight line where the intersection point is located;
and determining a sampling point corresponding to each vertex of the triangle based on the sampling point corresponding to each intersection point.
7. The method for determining the volume of the cargo in the target compartment according to the predetermined empty compartment volume of the target compartment and the volume of the triangular pyramid corresponding to each triangle, comprising the following steps:
determining the volume of the vacant space in the target compartment based on the volume of each triangular pyramid;
and subtracting the volume of the vacant space in the target compartment from the volume of the vacant compartment in the target compartment to determine the volume of the goods in the target compartment.
8. A device for determining a volume of cargo in a vehicle compartment, the device comprising:
the acquisition module is used for acquiring point cloud data in a target compartment acquired by using point cloud acquisition equipment;
the intersection point determining module is used for connecting each sampling point in the point cloud data with an origin point of a preset compartment coordinate system of the target compartment and determining a plurality of intersection points on a preset auxiliary surface;
the projection point determining module is used for vertically projecting the determined intersection points to an XOY plane of the predetermined compartment coordinate system, determining projection points of each intersection point on the XOY plane, and constructing a triangulation network based on the projection points of each intersection point; wherein the triangulation network comprises a plurality of triangles;
the sampling point determining module is used for determining a corresponding sampling point of each vertex of each triangle in the point cloud data and determining three corresponding sampling points of the triangle in the point cloud data aiming at each triangle in the triangular network;
the triangular pyramid determining module is used for determining the triangular pyramid corresponding to the triangle in the preset compartment coordinate system based on the three sampling points corresponding to the triangle and the origin;
and the volume determining module is used for determining the volume of the goods in the target compartment according to the predetermined empty compartment volume of the target compartment and the volume of the triangular pyramid corresponding to each triangle.
9. An electronic device, comprising: a processor, a memory and a bus, the memory storing machine-readable instructions executable by the processor, the processor and the memory communicating over the bus when an electronic device is operating, the machine-readable instructions when executed by the processor performing the steps of the determination method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that a computer program is stored on the computer-readable storage medium, which computer program, when being executed by a processor, performs the steps of the determination method according to one of claims 1 to 7.
CN202111196662.7A 2021-10-14 2021-10-14 Method and device for determining cargo volume in carriage, electronic equipment and storage medium Pending CN113888622A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111196662.7A CN113888622A (en) 2021-10-14 2021-10-14 Method and device for determining cargo volume in carriage, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111196662.7A CN113888622A (en) 2021-10-14 2021-10-14 Method and device for determining cargo volume in carriage, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN113888622A true CN113888622A (en) 2022-01-04

Family

ID=79002691

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111196662.7A Pending CN113888622A (en) 2021-10-14 2021-10-14 Method and device for determining cargo volume in carriage, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113888622A (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109029254A (en) * 2018-07-03 2018-12-18 燕山大学 A kind of compartment volume of cargo and volume density quality determining method based on Point Cloud Processing
CN109900338A (en) * 2018-12-25 2019-06-18 西安中科天塔科技股份有限公司 A kind of road surface pit slot volume measuring method and device
CN110057292A (en) * 2019-05-27 2019-07-26 杭州亚美利嘉科技有限公司 The determination method and apparatus of compartment charging ratio
CN110084558A (en) * 2019-04-30 2019-08-02 吉旗(成都)科技有限公司 A kind of method and device calculating cabin space charging ratio
CN113066117A (en) * 2019-12-13 2021-07-02 顺丰科技有限公司 Box volume measuring method and device, computer equipment and storage medium
CN113280733A (en) * 2021-04-07 2021-08-20 深圳市异方科技有限公司 Truck carriage volume measurement method and system based on laser radar

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109029254A (en) * 2018-07-03 2018-12-18 燕山大学 A kind of compartment volume of cargo and volume density quality determining method based on Point Cloud Processing
CN109900338A (en) * 2018-12-25 2019-06-18 西安中科天塔科技股份有限公司 A kind of road surface pit slot volume measuring method and device
CN110084558A (en) * 2019-04-30 2019-08-02 吉旗(成都)科技有限公司 A kind of method and device calculating cabin space charging ratio
CN110057292A (en) * 2019-05-27 2019-07-26 杭州亚美利嘉科技有限公司 The determination method and apparatus of compartment charging ratio
CN113066117A (en) * 2019-12-13 2021-07-02 顺丰科技有限公司 Box volume measuring method and device, computer equipment and storage medium
CN113280733A (en) * 2021-04-07 2021-08-20 深圳市异方科技有限公司 Truck carriage volume measurement method and system based on laser radar

Similar Documents

Publication Publication Date Title
CN107340522B (en) Laser radar positioning method, device and system
CN109029254B (en) Train carriage cargo volume and bulk density quality detection method based on point cloud data processing
EP3096109B1 (en) Measuring surface of a liquid
US8255184B2 (en) Programming system for a coordinate measuring machine and method thereof
EP2526376B1 (en) Optical overhead wire measurement
JP5303873B2 (en) Vehicle shape measuring method and apparatus
US20180031364A1 (en) Method and system for measuring outermost dimension of a vehicle positioned at an inspection station
CN109141347A (en) Vehicle-mounted vidicon distance measuring method and device, storage medium and electronic equipment
CN112513679B (en) Target identification method and device
CN105842678A (en) System for filtering lidar data in vehicle and method thereof
CN108873013A (en) A kind of road using multi-line laser radar can traffic areas acquisition methods
CN113869629A (en) Laser point cloud-based power transmission line safety risk analysis, judgment and evaluation method
Amorim et al. Simple and effective load volume estimation in moving trucks using lidars
CN113859228A (en) Vehicle control method and device, electronic equipment and storage medium
JP5451457B2 (en) 3D model generation apparatus and computer program
CN113888622A (en) Method and device for determining cargo volume in carriage, electronic equipment and storage medium
CN112744217A (en) Collision detection method, travel path recommendation device, and storage medium
CN112432596B (en) Space measuring method, space measuring device, electronic equipment and computer storage medium
CN113947630A (en) Method and device for estimating volume of object and storage medium
CN113768419A (en) Method and device for determining sweeping direction of sweeper and sweeper
CN109000560B (en) Method, device and equipment for detecting package size based on three-dimensional camera
CN110889831A (en) Method and system for detecting and positioning obstacle of tire crane of three-dimensional laser container wharf
CN111742242A (en) Point cloud processing method, system, device and storage medium
CN114814798A (en) External parameter calibration method and system
Kim et al. An active trinocular vision system for sensing mobile robot navigation environments

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination