Hoisting object size automatic measurement method and device based on point cloud, storage medium and electronic equipment
Through the automatic measurement method based on point cloud, the problem of inaccurate calculation of the size of the hanging objects during the lifting process of the smart tower crane is solved, the size of the hanging objects is quickly, efficiently and accurately calculated, and the safety and automatic control of the smart tower crane are improved. ability.
Patent Information
- Application Number
- CN202410665636.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-27
- Publication Date
- 2024-09-06
AI Technical Summary
With the existing technology, it is difficult to accurately calculate the size of the hoisted objects when lifting objects with a smart tower crane, resulting in inaccurate trajectory planning and collision detection, which increases safety risks.
Using the automatic measurement method of the size of hanging objects based on point cloud, by obtaining the point cloud of the current frame and the position of the suspension point of the steel cable, combined with the size of the hanging object at the previous collection moment, the target point position and the hanging direction are determined, thereby segmenting the current hanging object. Collection of point clouds, calculating their dimensions.
It improves the speed and accuracy of point cloud segmentation of hanging objects, ensures the accuracy and speed of size calculation of hanging objects, is suitable for size calculation of various hanging objects, and enhances the safety and automatic control capabilities of smart tower cranes.
Smart Images

Figure CN118597977A
Abstract
Description
Technical Field
[0001] The present application belongs to the field of building construction technology, and in particular relates to a method, device, storage medium, electronic equipment and computer program product for automatic measurement of hanging object size based on point cloud. Background Art
[0002] A tower crane is an important engineering facility. Through lifting, luffing, and rotation, a tower crane can move and transport large materials in vertical and horizontal directions, so it is widely used in scenes such as construction sites. However, traditional tower cranes require drivers to drive in the operating cabin. During the operation, the avoidance of some obstacles (such as stacked materials, buildings, etc.) and trajectory planning mainly rely on the skills and experience of the driver, which can easily lead to safety accidents. Therefore, smart tower cranes came into being.
[0003] An intelligent tower crane is an intelligent tower crane that integrates multiple engineering technologies such as advanced electronic technology, automatic control technology, and sensor technology. It can realize unmanned driving and autonomous operation. For intelligent tower cranes, trajectory planning, collision detection, and obstacle avoidance are three very important research contents. In the process of lifting objects by intelligent tower cranes, it is necessary to know the size information of the objects in order to provide safe and reliable trajectory planning, which is also a necessary condition for automatic collision detection and obstacle avoidance during the lifting process. However, due to the variety of objects hoisted by the tower crane, the existing technology is prone to difficulties or inaccuracies in calculating the size of the objects when determining the size of the objects. Summary of the invention
[0004] The present application aims to solve at least one of the technical problems existing in the prior art. To this end, the present application proposes a method, device, storage medium, electronic device and computer program product for automatically measuring the size of hanging objects based on point cloud, which can quickly and efficiently calculate the sizes of various hanging objects with high calculation accuracy.
[0005] In a first aspect, the present application provides a method for automatically measuring the size of a suspended object based on a point cloud, comprising:
[0006] In the process of hoisting an object by an engineering machinery with a hoisting function, a current frame point cloud of a collection area where the object is located at a current collection time and a suspension point position of a steel cable are obtained, and an object size of the object at a previous collection time is obtained, wherein the engineering machinery includes a hook for hoisting the object and the steel cable for hanging the hook;
[0007] Determine the target point position on the hook and the hanging direction of the steel cable at the current acquisition time, wherein the target point position is the center position of the hook or the bottom position of the hook;
[0008] Determine a hanging object point cloud set of the hanging object at the current acquisition time from the current frame point cloud according to the hanging object size at the previous acquisition time, and the target point position and the hanging direction at the current acquisition time;
[0009] The hanging object size of the hanging object at the current collection moment is determined according to the hanging object point cloud set and the hanging direction at the current collection moment.
[0010] In a second aspect, the present application provides a device for automatically measuring the size of a suspended object based on a point cloud, comprising:
[0011] An acquisition unit is used to acquire the current frame point cloud and the suspension point position of the steel cable in the acquisition area where the object is located at the current acquisition time, and acquire the object size of the object at the previous acquisition time during the process of the engineering machinery with a lifting function lifting the object, wherein the engineering machinery includes a hook for lifting the object and the steel cable for hanging the hook;
[0012] A first determining unit is used to determine the target point position on the hook and the hanging direction of the steel cable at the current acquisition moment, wherein the target point position is the center position of the hook or the bottom position of the hook;
[0013] A second determining unit is used to determine a hanging object point cloud set of the hanging object at a current acquisition moment from the current frame point cloud according to the hanging object size at a previous acquisition moment, and the target point position and the hanging direction at a current acquisition moment;
[0014] The third determination unit is used to determine the hanging object size of the hanging object at the current collection moment according to the hanging object point cloud set and the hanging direction at the current collection moment.
[0015] In some embodiments, the second determining unit is specifically configured to:
[0016] According to the size of the suspended object at the last acquisition moment, determine a first maximum distance and a minimum distance from a point on the side surface of a bounding box of the suspended object to the longitudinal center axis of the bounding box, and a second maximum distance from a point on the upper and lower surfaces of the bounding box to the transverse center axis of the bounding box;
[0017] Determine a set of candidate point clouds for hanging objects and seed points for hanging objects according to the first maximum distance, the second maximum distance, the target point position and the hanging direction at the current acquisition moment of the minimum distance, the height value in the hanging object size at the previous acquisition moment, and the current frame point cloud;
[0018] According to the hanging seed points, a hanging object point cloud set of the hanging object at the current collection moment is segmented from the hanging object candidate point cloud set.
[0019] In some embodiments, the second determining unit is specifically configured to:
[0020] Determine a first distance from each point cloud in the current frame point cloud to the longitudinal central axis and a second distance to the transverse central axis plane according to the target point position and the hanging direction at the current acquisition moment, the height value in the hanging object size at the previous acquisition moment, and the three-dimensional position coordinates of the point cloud;
[0021] According to the size relationship between the first distance and the first maximum distance, the minimum distance, the size relationship between the second distance and the second maximum distance, and combined with the height value in the hanging object size at the previous acquisition moment and the hanging direction at the current acquisition moment, determine the hanging object candidate point cloud set and the hanging seed point.
[0022] In some embodiments, the second determining unit is specifically configured to:
[0023] If there exists a point cloud whose first distance is not greater than the first maximum distance and whose second distance is not greater than the second maximum distance, the corresponding point cloud is used as a candidate point cloud set for hanging objects;
[0024] If there exists a point cloud in which the first distance is not greater than the minimum distance and the second distance is not greater than the second maximum distance, the corresponding point cloud is used as the hanging seed point; if there does not exist a point cloud in which the first distance is not greater than the minimum distance and the second distance is not greater than the second maximum distance, the target point position at the current collection moment is initialized according to the height value in the hanging object size at the previous collection moment and the hanging direction at the current collection moment to obtain the hanging seed point.
[0025] In some embodiments, the third determining unit is specifically configured to:
[0026] Convert each point cloud in the hanging object point cloud set into a two-dimensional point cloud according to the hanging direction to obtain a two-dimensional point cloud set;
[0027] Determine, from the set of suspended object point clouds, a first point cloud projected onto the suspension direction and having a maximum projection value, and a second point cloud projected onto the suspension direction and having a minimum projection value;
[0028] Determine the three-dimensional position coordinates of each vertex in the bounding box of the hanging object at the current acquisition moment according to the hanging direction, the first point cloud, the second point cloud and the two-dimensional point cloud set;
[0029] The size of the bounding box is determined according to the three-dimensional position coordinates of each vertex to obtain the hanging object size of the hanging object at the current acquisition moment.
[0030] In some embodiments, the third determining unit is specifically configured to:
[0031] Determine a first plane according to the first point cloud and the hanging direction, and determine a second plane according to the second point cloud and the hanging direction;
[0032] Calculating a directed bounding box of the two-dimensional point cloud set, and obtaining the two-dimensional position coordinates of four corner points of the directed bounding box;
[0033] Convert the two-dimensional position coordinates of the four corner points into corresponding three-dimensional position coordinates, and determine a straight line according to the three-dimensional position coordinates of each corner point and the hanging direction to obtain four straight lines;
[0034] respectively determining the intersection points between the four straight lines and the first plane, and the intersection points between the four straight lines and the second plane;
[0035] All the intersection points are used as vertices of the bounding box of the hanging object at the current acquisition moment, and the three-dimensional position coordinates of the intersection points are used as the three-dimensional position coordinates of the corresponding vertices.
[0036] In some embodiments, the apparatus further includes a fourth determining unit, configured to:
[0037] Acquire a first frame point cloud of the acquisition area at a first acquisition moment and a second frame point cloud of the acquisition area at a next adjacent acquisition moment, and acquire the suspension point position of the steel cable at the first acquisition moment;
[0038] Determine a hanging object point cloud set of the hanging object at a first acquisition moment according to the first frame point cloud and the second frame point cloud;
[0039] Determine the hanging direction of the steel cable at the first collection moment according to the first frame point cloud and the hanging point position at the first collection moment;
[0040] The hanging object size of the hanging object at the first collection moment is determined according to the hanging object point cloud set and the hanging direction at the first collection moment.
[0041] In some embodiments, the fourth determining unit is specifically configured to:
[0042] Determine, according to the first frame point cloud and the second frame point cloud, a plurality of changed point cloud clusters that have changed in the first frame point cloud;
[0043] Determine a plurality of candidate hanging object point cloud clusters of suspected hanging objects from the first frame point cloud;
[0044] According to the change point cloud cluster and the candidate point cloud cluster of the suspended object, all point clouds of the suspended object in the first frame point cloud are segmented to obtain a suspended object point cloud set of the suspended object at the first acquisition moment.
[0045] In some embodiments, the fourth determining unit is specifically configured to:
[0046] Performing voxelization of the first frame point cloud and the second frame point cloud in a unified standard;
[0047] Performing rough alignment of horizontal coordinates on the voxelized first frame point cloud and the second frame point cloud to determine point clouds that have changed in the first frame point cloud and the second frame point cloud;
[0048] The changed point cloud in the first frame point cloud is filtered, and the filtered point cloud is clustered to obtain a plurality of changed point cloud clusters in the first frame point cloud.
[0049] In some embodiments, the fourth determining unit is specifically configured to:
[0050] Determine a hook point cloud of the hook and a ground point cloud of the ground in the first frame point cloud;
[0051] Determine all point clouds located below the hook point cloud in the first frame point cloud according to the three-dimensional position coordinates of each point cloud to obtain a target point cloud;
[0052] Clustering the target point cloud to obtain multiple point cloud clusters to be screened;
[0053] The point cloud cluster to be screened that is not connected to the ground point cloud is selected as a candidate point cloud cluster of a suspended object of a suspected suspended object.
[0054] In some embodiments, the fourth determining unit is specifically configured to:
[0055] Determine the minimum distance between any one of the change point cloud clusters and any one of the hanging object candidate point cloud clusters;
[0056] Determine at least one associated point cloud cluster combination from the hanging object candidate point cloud cluster and the change point cloud cluster according to the minimum distance, each of the associated point cloud cluster combinations includes one hanging object candidate point cloud cluster and at least one change point cloud cluster;
[0057] All point clouds of the hanging object in the first frame point cloud are segmented according to the associated point cloud cluster combination.
[0058] In some embodiments, the fourth determining unit is specifically configured to:
[0059] Determining whether the minimum distance is less than or equal to a first preset threshold;
[0060] If so, the corresponding hanging object candidate point cloud cluster and the change point cloud cluster are classified into one associated point cloud cluster combination, and different associated point cloud cluster combinations having the same hanging object candidate point cloud cluster are merged.
[0061] In some embodiments, the fourth determining unit is specifically configured to:
[0062] Counting the total number of first point clouds of the candidate point cloud clusters for the hanging object in each of the associated point cloud cluster combinations and the total number of second point clouds of the change point cloud clusters;
[0063] Calculate the confidence of the corresponding hanging object candidate point cloud cluster according to the total number of the first point clouds and the total number of the second point clouds;
[0064] The point clouds in the suspended object candidate point cloud cluster corresponding to all the confidences greater than or equal to the second preset threshold are used as the point clouds of the suspended object in the first frame point cloud.
[0065] In some embodiments, the first determining unit is specifically configured to:
[0066] Determine a point cloud set to be screened from the current frame point cloud according to the suspension point position at the current acquisition moment, wherein the height of the point cloud in the point cloud set to be screened relative to the ground does not exceed the steel cable;
[0067] Determine the steel cable point cloud set of the steel cable at the current collection time according to the suspension point position at the current collection time and the point cloud set to be screened;
[0068] The hanging direction of the steel cable at the current collection moment is determined according to the steel cable point cloud set and the hanging point position at the current collection moment.
[0069] In some embodiments, the first determining unit is specifically configured to:
[0070] Determine a hook candidate point cloud set according to the suspension direction, the suspension point position, the steel cable point cloud set and the point cloud set to be screened at the current acquisition moment;
[0071] Determine the height coordinate interval of the hook according to the suspension point position, the suspension direction and the hook candidate point cloud set at the current acquisition moment;
[0072] All point clouds of the hook are segmented from the hook candidate point cloud set according to the height coordinate interval to obtain the hook point cloud set of the hook at the current acquisition moment, and the three-dimensional position coordinates of the point cloud corresponding to the hook center or the hook bottom in the hook point cloud set are used as the target point position.
[0073] In some embodiments, the first determining unit is specifically configured to:
[0074] According to the hanging direction at the current acquisition moment and the candidate point cloud set of the hook, a plurality of coordinate intervals are divided on a two-dimensional plane, and the height coordinate interval of the hook is determined according to the maximum distance of each coordinate interval, the actual length value of the top surface of the hook and the actual length value of the bottom surface of the hook.
[0075] In some embodiments, the engineering machinery further includes a boom and a mobile trolley mounted on the boom, the steel cable is fixed on the mobile trolley, and the acquisition unit is specifically used for:
[0076] Obtaining the amplitude change value of the mobile vehicle at the current acquisition moment, as well as the rotation angle of the boom and the lowest height of the boom relative to the ground;
[0077] Determine the center point position of the mobile vehicle according to the amplitude variation value, the rotation angle and the minimum height at the current acquisition moment;
[0078] The suspension point position of the steel cable at the current acquisition moment is determined according to the center point position and the preset calibration value.
[0079] In a third aspect, the present application provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements any of the above-mentioned point cloud-based automatic measurement methods for suspended object dimensions.
[0080] In a fourth aspect, the present application provides an electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the point cloud-based automatic measurement method for suspended object dimensions as described above is implemented.
[0081] In a fifth aspect, the present application provides a computer program product, including a computer program, which, when executed by a processor, implements any of the above-mentioned point cloud-based automatic measurement methods for suspended object dimensions.
[0082] The point cloud-based automatic measurement method, device, storage medium, electronic device and computer program product provided in the embodiments of the present application are as follows: in the process of lifting objects by engineering machinery with lifting function, by obtaining the current frame point cloud of the collection area where the object is located at the current collection time and the suspension point position of the steel cable, and obtaining the object size of the object at the previous collection time; determining the target point position on the hook and the suspension direction of the steel cable at the current collection time, the target point position is the center position of the hook or the bottom position of the hook; according to the object size at the previous collection time, and the target point position and the suspension direction at the current collection time, The current frame point cloud determines the set of hanging object point clouds at the current acquisition moment; according to the hanging object point cloud set and the hanging direction at the current acquisition moment, the size of the hanging object at the current acquisition moment is determined, that is, according to the hanging object size at the previous moment and the steel cable hanging direction and the hook target point position at the current moment, the target tracking method is used to segment the hanging object point cloud at any moment during the movement of the hanging object, and then the size of the hanging object is calculated, thereby effectively improving the segmentation speed and segmentation accuracy of the hanging object point cloud, and then improving the calculation accuracy and speed of the hanging object size, and can be applicable to the size calculation of various hanging objects, and has a wide range of applications. BRIEF DESCRIPTION OF THE DRAWINGS
[0083] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the description of the embodiments in conjunction with the following drawings, in which:
[0084] Figure 1 It is a flow chart of a method for automatically measuring the size of a suspended object based on point cloud provided in an embodiment of the present application;
[0085] Figure 2 It is a structural schematic diagram of a tower crane provided in an embodiment of the present application;
[0086] Figure 3 It is another flow chart of the method for automatically measuring the size of suspended objects based on point cloud provided in an embodiment of the present application;
[0087] Figure 4 It is a schematic diagram of the processing flow of the change point cloud cluster and the hanging object candidate point cloud cluster provided in the embodiment of the present application;
[0088] Figure 5 It is a structural schematic diagram of a device for automatically measuring the size of suspended objects based on point cloud provided in an embodiment of the present application;
[0089] Figure 6 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application;
[0090] Figure 7 It is a schematic diagram of the hardware structure of the electronic device provided in the embodiment of the present application. DETAILED DESCRIPTION
[0091] The embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present application, and cannot be understood as limiting the present application.
[0092] In the process of lifting objects by intelligent tower cranes, it is necessary to know the size information of the objects in order to provide safe and reliable trajectory planning, which is also a necessary condition for automatic collision detection and obstacle avoidance during the lifting process. In the prior art, the size of the objects can be obtained by manual measurement. This method not only has manual measurement errors, but also increases labor costs. In other embodiments, the size measurement of the objects can also be realized based on a deep learning model, specifically: first, a deep learning model for identifying the point cloud of the objects is trained through a large number of point cloud samples and annotation labels of the objects, and the point cloud collected in the working area of the tower crane is segmented by the deep learning model, and then the size of the objects is calculated according to the segmented point cloud of the objects. Although this method can realize the automatic measurement of the size of the objects, due to the variety of objects, it is difficult to obtain comprehensive training point cloud samples when training the deep learning model, which leads to the feature learning of the deep learning model is not comprehensive enough, and the learning model obtained by training cannot accurately segment various point clouds of objects, and the scope of application of the model is relatively limited, which leads to the problem of difficulty or inaccuracy in calculating the size of the objects.
[0093] In order to solve at least one of the above technical problems, the embodiments of the present application provide a method, device, storage medium, electronic device and computer program product for automatic measurement of hanging object size based on point cloud.
[0094] See also Figure 1 , Figure 1 1 is a flow chart of a method for automatically measuring the size of a suspended object based on a point cloud provided in an embodiment of the present application. The method for automatically measuring the size of a suspended object based on a point cloud is applied to an electronic device, which can be implemented as a user terminal or a server, and the user terminal includes a laptop, a tablet computer, a desktop computer, a mobile device (such as a mobile phone, a personal digital assistant, a dedicated messaging device), etc. Specifically, the method for automatically measuring the size of a suspended object based on a point cloud can include the following steps 101-104, wherein:
[0095] 101. During the process of lifting objects by an engineering machinery with lifting function, the current frame point cloud of the acquisition area where the object is located at the current acquisition moment and the position of the hanging point of the steel cable are obtained, and the size of the object at the previous acquisition moment is obtained. The engineering machinery includes a hook for lifting the object and a steel cable for hanging the hook.
[0096] Among them, engineering machinery with lifting function includes but is not limited to lifting machinery, tower cranes, gantry cranes, etc. This application will take the engineering machinery as a tower crane as an example to introduce the automatic measurement method of the size of the hoisted object. Figure 2 , Figure 2 It is a structural schematic diagram of the tower crane provided in an embodiment of the present application, and the tower crane 20 includes a base 21, a tower body 22 vertically fixed on the base 21, a boom 23 and a balance arm 24, a hook 25 and a moving trolley 26 arranged on the tower body 22. The moving trolley 26 is arranged on the boom 23, and the moving trolley 26 is provided with a motor, and the motor drives the moving trolley 26 to move left and right along the boom 23. The top of the steel cable 27 is suspended on the moving trolley 26, and the suspension point position of the steel cable 27 can be regarded as the center point position of the top of the steel cable 27. The hook 25 is suspended at the bottom of the steel cable 27. When the moving trolley 26 moves left and right, it will drive the hook 25 to move left and right. The position of the hook 25 can be adjusted at any time to facilitate the lifting of heavy objects and lift the heavy objects to the required position. It should be noted that Figure 2 Only one structure of the tower crane 20 is simply shown, and the tower crane 20 may also have other structures, which is not limited here.
[0097] When a tower crane is hoisting objects, point cloud acquisition devices such as laser radar or binocular cameras can be used to collect continuous frame point clouds in the collection area where the objects are located. The collected point cloud data includes the geometric position and attribute data of the point cloud, such as color information, reflection intensity information, etc. The point cloud acquisition device can be installed on a mobile trolley and move with the mobile trolley, or it can be fixed around the tower crane, and there is no restriction here.
[0098] In some embodiments, after each frame point cloud is collected, the frame point cloud can also be preprocessed. The preprocessing includes filtering processing such as denoising and outlier removal, as well as downsampling processing, etc., to improve the quality and accuracy of the point cloud data and facilitate subsequent point cloud analysis and processing.
[0099] In some embodiments, the engineering machinery further includes a boom and a mobile trolley mounted on the boom, the steel cable is fixed on the mobile trolley, and the "obtaining the suspension point position of the steel cable at the current acquisition moment" in the above step 101 may specifically include:
[0100] (11) Obtaining the amplitude change value of the mobile vehicle at the current acquisition time, as well as the rotation angle of the boom and the lowest height of the boom relative to the ground;
[0101] (12) determining the center point position of the mobile vehicle according to the amplitude value, the rotation angle and the minimum height at the current acquisition time;
[0102] (13) According to the center point position and the preset calibration value, the suspension point position of the steel cable at the current acquisition time is determined.
[0103] The amplitude variation of the mobile trolley is the turning radius or working radius of the tower crane. For different acquisition moments, any one of the turning angle of the boom and the minimum height of the boom relative to the ground may change, resulting in the suspension point position (x q ,y q , z q ) changes, and needs to be calculated in real time. The specific calculation formula is as follows:
[0104]
[0105] Among them, (x m ,y m , z m ) is the center point of the mobile trolley, R is the amplitude of the mobile trolley, α is the rotation angle of the boom, H is the height of the bottom of the boom (that is, the lowest height relative to the ground), and (x0, y0, z0) is the calibration value from the suspension point Q to the center point of the mobile trolley (that is, the preset calibration value mentioned above).
[0106] It should be pointed out that during the lifting process, the objects themselves may deform to varying degrees, resulting in changes in shape and size, and real-time point cloud tracking and measurement of the objects is required. For any other acquisition time except the first acquisition time, steps 101-104 can be executed to track the point cloud of the objects and automatically measure the size of the objects. For the point cloud segmentation and size measurement of the objects at the first acquisition time, it can be achieved by relying on the position change characteristics of the objects and the characteristics of the hanging area. For details, please refer to Figure 3 , Figure 3 1051 is another flow chart of the method for automatically measuring the size of a hanging object based on point cloud provided in an embodiment of the present application. The method for determining the size of a hanging object at the first acquisition moment includes the following steps 1051-1054, wherein:
[0107] 1051. Obtain the first frame point cloud of the acquisition area at the first acquisition moment and the second frame point cloud of the acquisition area at the next adjacent acquisition moment, and obtain the suspension point position of the steel cable at the first acquisition moment.
[0108] The method for calculating the suspension point position of the steel cable at the first acquisition moment can be referred to the above steps (11)-(13), which will not be repeated here.
[0109] 1052. Determine a hanging object point cloud set of the hanging object at the first acquisition moment according to the first frame point cloud and the second frame point cloud.
[0110] In some embodiments, the above step 1052 may specifically include the following steps (21)-(23), wherein:
[0111] (21) determining, according to the first frame point cloud and the second frame point cloud, a plurality of changed point cloud clusters that have changed in the first frame point cloud;
[0112] Among them, the point clouds in the change point cloud cluster are mainly point clouds of objects that have moved relative to the point cloud acquisition device, such as horizontal movement, vertical movement, etc. When the point cloud acquisition device is installed on a mobile vehicle, these objects may include the ground, surrounding buildings, hanging objects, etc. When the point cloud acquisition device is fixedly installed around a tower crane, these objects may include hanging objects, parts on the tower crane (such as hooks, cables, etc.), etc.
[0113] In some embodiments, the above step (21) may specifically include:
[0114] Performing voxelization of the first frame point cloud and the second frame point cloud in a unified standard;
[0115] Performing rough alignment of horizontal coordinates on the voxelized first frame point cloud and the second frame point cloud to determine point clouds that have changed between the first frame point cloud and the second frame point cloud;
[0116] The changed point cloud in the first frame point cloud is filtered, and the filtered point cloud is clustered to obtain a plurality of changed point cloud clusters in the first frame point cloud.
[0117] That is, considering that the position coordinates of the changed point cloud will be different before and after the change, the first frame point cloud and the second frame point cloud can be voxelized according to the same reference coordinates, and then the horizontal coordinates can be roughly aligned to find the point clouds whose position coordinates have changed in the two frames of point clouds. Then, the changed point cloud in the first frame of point cloud is filtered by outlier removal, and then point cloud clustering is performed. Outliers generally refer to points that deviate from most of the data. Point cloud clustering is to divide the point cloud into different groups according to its spatial distribution and characteristics. Outlier removal methods include, for example, statistical-based methods, field-based methods, etc. Point cloud clustering methods include, for example, K-Means clustering, Euclidean clustering, DBSCAN clustering, etc., which are not limited here.
[0118] (22) determining a plurality of candidate hanging object point cloud clusters of suspected hanging objects from the first frame point cloud;
[0119] Among them, the suspected hanging object can be considered as an object located below the hook in the collection area and not in contact with the ground. The suspected hanging object includes the hanging object and may also include other objects.
[0120] In some embodiments, the above step (23) may specifically include:
[0121] Determine a hook point cloud of the hook and a ground point cloud of the ground in the first frame point cloud;
[0122] Determine all point clouds located below the hook point cloud in the first frame point cloud according to the three-dimensional position coordinates of each point cloud to obtain a target point cloud;
[0123] Clustering the target point cloud to obtain multiple point cloud clusters to be screened;
[0124] The point cloud clusters to be screened that are not connected to the ground point cloud are selected as candidate point cloud clusters of suspended objects.
[0125] Among them, since the shape features of the hook and the ground are relatively fixed, a semantic segmentation model of the point cloud can be trained, and the point cloud of the hook and the point cloud of the ground can be identified and segmented by the trained semantic segmentation model. In other embodiments, the segmentation of the hook point cloud can also be achieved independently of the training model and solely by relying on the algorithm and the actual size of the hook. For details, please refer to the following steps 1024-1026, which will not be repeated here.
[0126] After obtaining the hook point cloud, the point cloud with the lowest height relative to the ground (e.g., the hook point cloud with the smallest z-axis coordinate value) can be found according to the three-dimensional position coordinates of the point cloud (e.g., the coordinates of the xyz axis) to obtain the point cloud at the lowest point of the hook. Then, the point cloud below the hook (i.e., the target point cloud) is cut out with the horizontal plane where the point cloud is located as the boundary to remove the point cloud of the hook and the object above the hook, thereby narrowing the point cloud recognition range of the hanging object. Afterwards, for the target point cloud in each frame of the point cloud, point cloud clustering can be performed first, so that the point clouds with the same spatial distribution and characteristics are classified into a point cloud cluster to be screened. The point clouds in these point cloud clusters to be screened are the point clouds of the objects below the hook. In addition to the hanging objects, these objects also include other objects such as buildings. Considering that the hanging objects are generally suspended below the hook and do not contact the ground, in order to further narrow the point cloud recognition range of the hanging objects, it is necessary to remove the point cloud clusters connected to the ground point cloud from these point cloud clusters to be screened to obtain candidate point cloud clusters of the hanging objects.
[0127] (23) According to the change point cloud cluster and the candidate point cloud cluster of the hanging object, all point clouds of the hanging object in the first frame point cloud are segmented to obtain the hanging object point cloud set of the hanging object at the first acquisition moment.
[0128] In some embodiments, the above step (23) may specifically include:
[0129] (231) Determine the minimum distance between any change point cloud cluster and any hanging object candidate point cloud cluster.
[0130] For example, if the change point cloud cluster corresponding to the first frame point cloud is recorded as The candidate point cloud cluster of the hanging object corresponding to the first frame point cloud is recorded as i is the number of change point cloud clusters, j is the number of candidate point cloud clusters for hanging objects, then please refer to Figure 4 , Figure 4 d is a schematic diagram of the processing flow of the change point cloud cluster and the hanging object candidate point cloud cluster provided in the embodiment of the present application, and it is necessary to calculate the minimum distance d between each change point cloud cluster in i change point cloud clusters and each hanging object candidate point cloud cluster in j hanging object candidate point cloud clusters. mn , m∈[1,i], n∈[1,j].
[0131] (232) determining at least one associated point cloud cluster combination from the hanging object candidate point cloud cluster and the change point cloud cluster according to the minimum distance, each associated point cloud cluster combination including a hanging object candidate point cloud cluster and at least one change point cloud cluster;
[0132] In some embodiments, the above step (232) may specifically include:
[0133] Determining whether the minimum distance is less than or equal to a first preset threshold;
[0134] If so, the corresponding hanging object candidate point cloud cluster and the change point cloud cluster are classified into one associated point cloud cluster combination, and different associated point cloud cluster combinations with the same hanging object candidate point cloud cluster are merged.
[0135] Among them, since the change point cloud cluster corresponds to the moving object (including the hanging object), the hanging object candidate point cloud cluster corresponds to the moving object (including the hanging object) and non-moving object located under the hook and not in contact with the ground. If the change point cloud cluster and the hanging object candidate point cloud cluster are the same moving object, the distance between the point cloud clusters should be relatively small (ideally 0). Therefore, the condition that the minimum distance between the point cloud clusters is not greater than the first preset threshold can be used to find the change point cloud clusters and the hanging object candidate point cloud clusters with a smaller distance, thereby filtering out the point cloud clusters of non-moving objects and narrowing the point cloud segmentation range of the hanging object.
[0136] Usually, if a single hanging object candidate point cloud cluster finds one or more change point cloud clusters with a small distance from it, for example, assuming that the hanging object candidate point cloud cluster and two change point cloud clusters If the minimum distance between them is less than or equal to the first preset threshold, it means that the candidate point cloud cluster of the hanging object The corresponding object is located below the hook and not in contact with the ground, and it has moved. This object is most likely a hanging object. In this case, the hanging object candidate point cloud cluster and the corresponding change point cloud cluster Classify them into a combination (associated point cloud cluster combination) for further hanging object point cloud segmentation. If a single hanging object candidate point cloud cluster cannot find a change point cloud cluster with a smaller distance, for example, assuming that the hanging object candidate point cloud cluster and any change point cloud cluster If the minimum distance between them is less than or equal to the first preset threshold, it means that the candidate point cloud cluster of the hanging object The corresponding object is located below the hook and is not in contact with the ground, but it has not moved. Therefore, the object should not be a hanging object. The candidate point cloud cluster of the hanging object It is not a point cloud of hanging objects. Please continue to refer to Figure 4 , when the minimum distance d between point cloud clusters is mn After combining all point cloud clusters that meet the distance condition, there may be only e hanging object candidate point cloud clusters with change point cloud clusters with a smaller distance, e≤j, that is, the number of associated point cloud cluster combinations is e.
[0137] (233) All point clouds of the hanging object in the first frame point cloud are segmented according to the associated point cloud cluster combination.
[0138] In some embodiments, the above step (233) may specifically include:
[0139] Counting the total number of first point clouds of the candidate point cloud clusters for hanging objects and the total number of second point clouds of the change point cloud clusters in each associated point cloud cluster combination;
[0140] Calculate the confidence of the corresponding hanging object candidate point cloud cluster according to the total number of the first point cloud and the total number of the second point cloud;
[0141] The point clouds in the suspended object candidate point cloud cluster corresponding to all confidence levels greater than or equal to the second preset threshold are used as the point clouds of the suspended object in the first frame of point clouds.
[0142] Among them, the candidate point cloud clusters of hanging objects in the associated point cloud cluster combination can only indicate the point clouds of moving objects located below the hook and not in contact with the ground, not all of which are point clouds of hanging objects. Considering that in the area below the hook and not in contact with the ground, the volume of hanging objects is generally large, and the volume of other interfering objects is relatively small, the confidence that the candidate point cloud cluster of hanging objects belongs to the hanging object point cloud can be determined based on the proportion of the number of point clouds in each candidate point cloud cluster of hanging objects, and the point cloud belonging to the hanging object can be extracted based on the confidence. Specifically, the calculation formula for the confidence con of the candidate point cloud cluster of hanging objects in each associated point cloud cluster combination can be as follows:
[0143]
[0144] is the total number of point clouds of the candidate point cloud cluster of the hanging object in the kth associated point cloud cluster combination corresponding to the first frame point cloud (i.e. the total number of the first point cloud mentioned above), It is the sum of the number of point cloud points of all the changed point cloud clusters in the kth associated point cloud cluster combination corresponding to the first frame point cloud (that is, the total number of the second point cloud mentioned above).
[0145] Afterwards, all confidence levels con not less than the second preset threshold T con The point cloud in the candidate point cloud cluster of the hanging object is identified as the point cloud of the hanging object, completing the segmentation of the hanging object point cloud.
[0146] That is, the segmentation of the suspended object point cloud in the present application is not achieved by training a semantic segmentation model of the point cloud. It does not require the preparation of a large number of suspended object point cloud samples, nor does it require point cloud calibration. Instead, it relies on the characteristics of the change in position of the suspended object during lifting and the characteristics of its specific hanging area to segment the suspended object point cloud. Specifically, based on the point clouds of adjacent frames, the point clouds whose positions have changed in each frame of the point cloud are found and clustered. At the same time, the point clouds in the specific hanging area below the hook and not in contact with the ground are found and clustered in each frame of the point cloud. Then, these two point cloud clusters are combined to automatically segment the suspended object point cloud.
[0147] 1053. Determine the hanging direction of the steel cable at the first collection moment based on the first frame point cloud and the hanging point position at the first collection moment.
[0148] Among them, the calculation method of the hanging direction of the steel cable at the first collection moment can refer to the calculation method of the hanging direction of the steel cable at the current collection moment (that is, the following steps 1021-1023), which will not be repeated here.
[0149] 1054. Determine the size of the hanging object at the first collection moment based on the point cloud set of the hanging object and the hanging direction at the first collection moment.
[0150] Among them, the calculation method of the hanging object size of the hanging object at the first collection moment can refer to the calculation method of the hanging object size of the hanging object at the current collection moment (that is, the following steps 1041-1044), which will not be repeated here.
[0151] 102. Determine the target point position on the hook and the hanging direction of the steel cable at the current acquisition time, the target point position is the center position of the hook or the bottom position of the hook.
[0152] Among them, in the process of lifting the objects, the hook and the steel cable are also in constant motion, and the target point position on the hook and the hanging direction of the steel cable need to be updated in real time. In some embodiments, the target point position and the hanging direction can be determined in a simpler way, such as regarding the hanging direction as the direction of gravity, and roughly estimating the target point position on the hook according to the hanging point position, the steel cable length and the hook height.
[0153] In some embodiments, please see Figure 3 In the above step 102, "determining the hanging direction of the steel cable at the current acquisition moment" may specifically include the following steps 1021-1023, wherein:
[0154] 1021. Extract the point cloud whose height relative to the ground does not exceed the suspension point position at the current acquisition moment from the current frame point cloud to obtain a point cloud set to be screened.
[0155] Among them, the three-dimensional position coordinates of each point cloud and the height coordinate value of the suspension point position of the steel cable (for example, the z-axis coordinate value Z q ), extract the height no greater than Z from the current frame point cloud q All point clouds of the crane arm and the objects above the crane arm are filtered out, thereby removing the point clouds of the remaining structures on the upper part of the cable and obtaining the point cloud set R to be filtered. e .
[0156] 1022. Determine the steel cable point cloud set of the steel cable at the current collection time according to the suspension point position at the current collection time and the point cloud set to be screened.
[0157] In some embodiments, the above step 1022 may specifically include:
[0158] Establishing a tree data structure corresponding to the point cloud set to be screened at the current acquisition time;
[0159] Selecting a point cloud from the tree data structure that is closest to the suspension point and does not exceed a first preset distance as a current cable seed point;
[0160] Determine a target point cloud set from the tree data structure according to a preset search radius and the steel cable seed point;
[0161] Determine whether the target point cloud set meets the preset point cloud growth standard;
[0162] If satisfied, the point cloud in the target point cloud set is taken as the grown point cloud and added to the steel cable point cloud set of the steel cable at the current acquisition moment, until the growth of all point clouds corresponding to the current steel cable seed point is completed, the next steel cable seed point is selected from the tree data structure, and the step of determining the target point cloud set from the tree data structure according to the preset search radius and the steel cable seed point is returned to execute.
[0163] That is, the cable point cloud set of the steel cable is segmented from the point cloud set to be screened using the region growing method. The basic idea of the region growing method is to merge points with similar properties together. For each region, a seed point is first specified as the starting point of growth, and then the points in the area around the seed point are compared with the seed point, and the points with similar properties are merged and continue to grow outward until no points that meet the conditions are included. In this way, the growth of a region is completed. The application in this scheme is as follows: First, establish a point cloud set R to be screened eA kd tree (a kd tree is a tree data structure for storing and retrieving points in a K-dimensional space) is used to search the kd tree for a point (e.g., point A) that is closest to the suspension point position (point Q position) and does not exceed a first preset distance d1 as a seed point on the cable (i.e., the cable seed point). Then, based on the cable seed point A, it is determined whether the point cloud in the nearby search range meets the point cloud growth standard. Specifically, with the cable seed point A as the center, first find the point cloud (i.e., the target point cloud set {S}) in the search range (covering the preset search radius r) near point A in the kd tree, and then determine whether {S} meets the point cloud growth standard. If so, point cloud growth is performed, and the search for the next point cloud in the next range is continued until all point clouds in the kd tree are searched. The point cloud growth process using the cable seed point is terminated, and the next cable seed point is selected. If not, search the kd tree for the next point (e.g., point B) that is closest to point Q and does not exceed the first preset distance d1 (empirical value) as the next cable seed point, and repeat the above operation until no cable seed point with a distance not exceeding d1 is found, and the entire point cloud growth is terminated. Through the region growing method, all the point clouds of the cables in the kd tree can be found to obtain the cable point cloud set {T}.
[0164] In some embodiments, the above step of “determining whether the target point cloud set meets the preset point cloud growth standard” may specifically include:
[0165] Determine the normal vector of the fitting plane equation corresponding to the target point cloud set and the center point cloud in the target point cloud set;
[0166] Determine the direction passing through the current cable seed point and the center point cloud to obtain the target direction;
[0167] Determine the angle between the normal vector and the target direction;
[0168] According to the included angle and the total number of point clouds in the target point cloud set, it is determined whether the target point cloud set meets a preset point cloud growth standard.
[0169] Among them, the formula of the point cloud growth standard can be as follows:
[0170]
[0171] The normal of the plane equation fitted by the target point cloud set {S} is recorded as The center point cloud of {S} is recorded as C, and the direction formed by point A and the center point cloud C (that is, the target direction mentioned above) is recorded as α is and The angle between them, k is the total number of point clouds in the point set {S}. thre_α and thre_k are thresholds. Only when α and k meet the above conditions at the same time, the point cloud growth standard is determined to be met and growth is performed. Otherwise, growth is stopped.
[0172] 1023. Determine the hanging direction of the steel cable at the current collection time based on the steel cable point cloud set and the hanging point position at the current collection time.
[0173] In some embodiments, the above step 1023 may specifically include:
[0174] Determine the minimum bounding box of the cable point cloud set at the current acquisition moment;
[0175] Determine a straight line passing through the point cloud farthest from the suspension point position in the cable point cloud set and the suspension point position, and obtain a first straight line;
[0176] Determine the straight lines in the three directions of the length, width and height of the minimum bounding box to obtain three second straight lines;
[0177] The direction of the second straight line having the smallest angle with the first straight line is selected as the hanging direction of the steel cable at the current acquisition moment.
[0178] That is, if the cable point cloud set is recorded as {T} and the suspension point position is recorded as Q, then the minimum bounding box of {T} can be determined first, and the straight lines {L j}, j is the subscript of the three lines, and find the point farthest from point Q in {T} (for example, point cloud P1), and determine the line passing through points Q and P1 as L. Then, from {L j}, select the straight line with the smallest angle with L as the straight line parallel to the cable direction, that is, the cable suspension direction is obtained. generally, The angle between the direction and the vector from point Q to point P1 is an acute angle.
[0179] In some embodiments, the hook point cloud set of the hook at the current acquisition time can be determined according to the hanging direction, hanging point position, steel cable point cloud set and point cloud set to be screened at the current acquisition time, and then the bottom position of the hook or the center position of the hook in the hook point cloud set is used as the target point position, that is, the "determining the target point position on the hook at the current acquisition time" in the above step 102 specifically includes the following steps 1024-1026, wherein:
[0180] 1024. Determine the candidate point cloud set of the hook according to the suspension direction, the suspension point position, the steel cable point cloud set and the point cloud set to be screened at the current acquisition moment.
[0181] In some embodiments, the above step 1024 may specifically include:
[0182] Fitting the plane equation corresponding to the steel cable point cloud set at the current acquisition time to obtain the steel cable plane;
[0183] Determine a third straight line passing through the suspension point position and the suspension direction at the current acquisition moment;
[0184] According to the maximum length value and the maximum width value of the hook on the horizontal plane, a hook candidate point cloud set is extracted from the point cloud set to be screened.
[0185] That is, fit the plane equation of the cable point cloud set {T} and determine the plane passing through the suspension point Q and the suspension direction Then, the second preset distance d2 is set according to the maximum width value of the hook on the horizontal plane (e.g., the XY plane), and the third preset distance d3 is set according to the maximum length value of the hook on the horizontal plane. Generally, d2 is greater than the maximum width value, and d3 is greater than the maximum length value. For example, the value of d3 can be 50% greater than the maximum length value, and the point cloud set R to be screened is selected. e In the example, the point cloud whose distance from the cable plane is less than the second preset distance d2 and whose distance from the third straight line F is less than the third preset distance d3 is segmented out, that is, the hook candidate point cloud set {G roi}, these point clouds are the point clouds within the estimated hook appearance area.
[0186] Through the limitations of the above-mentioned second preset distance d2 and the third preset distance d3, the finally estimated area where the hook appears can be considered to be a coordinate area where the X-axis coordinate value is slightly larger than the maximum length value of the hook, the Y-axis coordinate value is slightly larger than the maximum width value of the hook, and the Z-axis coordinate value is not higher than the coordinate of the steel cable suspension point Q in the three-dimensional space coordinate system of the point cloud (for example, the XYZ coordinate system), thereby effectively narrowing the point cloud segmentation range of the hook.
[0187] 1025. Determine the height coordinate range of the hook based on the suspension point position, the suspension direction and the candidate point cloud set of the hook at the current acquisition moment.
[0188] In some embodiments, the above step 1025 can be specifically as follows: according to the hanging direction at the current acquisition moment and the candidate point cloud set of the hook, a plurality of coordinate intervals are divided on the two-dimensional plane, and according to the maximum distance of each coordinate interval, the actual length value of the top surface of the hook and the actual length value of the bottom surface of the hook, the height coordinate interval of the hook is determined.
[0189] Furthermore, the above step 1025 may specifically include:
[0190] According to the hanging direction at the current acquisition moment, each point cloud in the hook candidate point cloud set is converted into a plane coordinate point in a two-dimensional plane to obtain a plane coordinate point set, wherein the coordinate system of the two-dimensional plane includes a first coordinate axis and a second coordinate axis;
[0191] Dividing the two-dimensional position coordinates corresponding to the set of plane coordinate points into a plurality of coordinate intervals along the direction of the first coordinate axis, and clustering the plane coordinate points in each coordinate interval to obtain a plurality of clusters;
[0192] According to the maximum distance of each cluster on the second coordinate axis, determine the maximum distance of the corresponding coordinate interval;
[0193] Determine the top boundary position coordinates and the bottom boundary position coordinates of the hook on the two-dimensional plane according to the maximum interval distance of each coordinate interval, the actual length value of the top surface of the hook, and the actual length value of the bottom surface of the hook;
[0194] Determine the height coordinate range of the hook based on the top boundary position coordinates and the bottom boundary position coordinates.
[0195] That is, first set the hanging direction and the hook candidate point cloud set {G roi} projected onto the same two-dimensional plane, we get Direction in a 2D plane and {G roi}The projection point set on the two-dimensional plane (that is, the plane coordinate point set {D 2}), and can be directed The first coordinate axis X1 of the two-dimensional plane is perpendicular to the direction Directions As the second coordinate axis Y1 of the two-dimensional plane, each projection point {D 2 The three-dimensional position coordinates of the point cloud corresponding to {G} are converted from the point cloud space coordinate system (such as the XYZ coordinate system) into the two-dimensional position coordinates under the two-dimensional plane coordinate system X1Y1, thereby realizing {G roi} to {D 2}Transformation of plane coordinate points in .
[0196] After that, you can first 2} is filtered to remove noise and outliers, and then along the first coordinate axis X1 direction, {D 2 The coordinate area corresponding to} (that is, the coordinate area with the minimum X1 coordinate value and the maximum X1 coordinate value as endpoints) is divided into m equally spaced coordinate intervals. Then, the plane coordinate points are clustered in each coordinate interval, and the number of clusters in each cluster is calculated. The maximum distance in the direction is taken as the maximum distance of the corresponding coordinate interval. Afterwards, the top boundary position coordinate S1 and the bottom boundary position coordinate S2 of the hook on the two-dimensional plane (that is, the two-dimensional position coordinates in the two-dimensional plane coordinate system X1Y1) are determined based on the maximum distance of each coordinate interval, the actual length value of the top surface of the hook, and the actual length value of the bottom surface of the hook. The two-dimensional S1 and S2 are projected onto the vertical coordinate axis (that is, the Z axis) in the three-dimensional point cloud space coordinate system XYZ, respectively, to obtain the minimum height coordinate h1 corresponding to S1 and the maximum height coordinate h2 corresponding to S2, and then the height coordinate interval [h1, h2] is obtained.
[0197] In some embodiments, the above step of "determining the top boundary position coordinates and the bottom boundary position coordinates of the hook on the two-dimensional plane according to the maximum interval distance of each coordinate interval, the actual length value of the top surface of the hook, and the actual length value of the bottom surface of the hook" may specifically include: determining a first target coordinate interval from the coordinate interval according to the actual length value of the top surface of the hook, and determining a second target coordinate interval from the coordinate interval according to the actual length value of the bottom surface of the hook;
[0198] The coordinates of the end point in the first target coordinate interval are used as the top boundary position coordinates of the hook on the two-dimensional plane, and the coordinates of the end point in the second target interval are used as the bottom boundary position coordinates of the hook on the two-dimensional plane.
[0199] That is, firstly, the fifth preset distance d5 is set according to the actual length value of the top surface of the hook, and the sixth preset distance d6 is set according to the actual length value of the bottom surface of the hook, and then, The maximum interval distances of each coordinate interval are compared in order from front to back, and the sorting position of the coordinate interval (first target coordinate interval) whose maximum interval distance is greater than the fifth preset distance d5, such as the second coordinate interval, is used as the top boundary b1 of the hook. At this time, the coordinates of the end point in the first target coordinate interval can be used as the coordinates of the top boundary b1 of the hook (i.e., the top boundary position coordinates S1). Then continue to compare the maximum interval distances of subsequent coordinate intervals, and the sorting position of the coordinate interval (second target coordinate interval) whose first distance is less than the sixth preset distance d6, such as the fifth coordinate interval, is used as the bottom boundary b2 of the hook. At this time, the coordinates of the end point in the second target coordinate interval can be used as the coordinates of the bottom boundary b2 of the hook (i.e., the top boundary position coordinates S2).
[0200] For the first target coordinate interval and the second target coordinate interval, their respective end point coordinates can be determined by the following formula:
[0201]
[0202] Wherein, d4 is the fourth preset distance, that is, the interval distance between the coordinate intervals, d min is a set of plane coordinate points {D 2 The first coordinate axis in Minimum coordinate component in direction.
[0203] 1026. Segment all point clouds of the hook from the candidate point cloud set of the hook according to the height coordinate range to obtain the hook point cloud set of the hook at the current acquisition moment, and use the three-dimensional position coordinates of the point cloud corresponding to the hook center or the hook bottom in the hook point cloud set as the target point position.
[0204] Among them, the hook candidate point cloud set {G roi The point cloud whose Z-axis coordinate component is within the height coordinate interval [h1,h2] is used as the point cloud of the hook to achieve the point cloud segmentation of the hook. Afterwards, the point cloud position of the bottom of the hook or the center of the hook (i.e., the target point) in the hook point cloud set is used as the target point position.
[0205] 103. According to the size of the hanging object at the last acquisition moment, and the target point position and the hanging direction at the current acquisition moment, determine the hanging object point cloud set of the hanging object at the current acquisition moment from the current frame point cloud.
[0206] In some embodiments, the above step 103 may specifically include the following steps 1031-1033, wherein:
[0207] 1031. According to the size of the suspended object at the last acquisition moment, determine the first maximum distance and the minimum distance from the points on the side surface of the bounding box of the suspended object to the longitudinal center axis of the bounding box, and the second maximum distance from the points on the upper and lower surfaces of the bounding box to the transverse center axis of the bounding box.
[0208] The bounding box is usually a cuboid, including six surfaces, namely, the upper surface, the lower surface, and four side surfaces located between the upper surface and the lower surface. The longitudinal central axis is a straight line passing through the center point of the upper surface and the center point of the lower surface. The horizontal central axis plane can be determined between the center points of the four side surfaces. The first maximum distance is the distance from the corner point of the upper surface or the lower surface (the surface where the long side and the wide side are located) of the bounding box to the longitudinal central axis, which is equal to The square root of The square root of the second maximum distance is equal to
[0209] 1032. Determine the candidate point cloud set and seed points of the hanging object based on the first maximum distance, the second maximum distance, the target point position and hanging direction of the minimum distance at the current acquisition moment, the height value of the hanging object size at the previous acquisition moment, and the current frame point cloud.
[0210] In some embodiments, the above step 1032 may specifically include:
[0211] According to the target point position and hanging direction at the current acquisition time, the height value of the hanging object size at the previous acquisition time, and the three-dimensional position coordinates of the point cloud, determine the first distance of each point cloud in the current frame point cloud to the longitudinal central axis and the second distance to the transverse central axis plane;
[0212] If there is a point cloud whose first distance is not greater than the first maximum distance and whose second distance is not greater than the second maximum distance, the corresponding point cloud is used as a candidate point cloud set for hanging objects;
[0213] If there is a point cloud whose first distance is not greater than the minimum distance and whose second distance is not greater than the second maximum distance, the corresponding point cloud will be used as the hanging seed point; if there is no point cloud whose first distance is not greater than the minimum distance and whose second distance is not greater than the second maximum distance, the target point position at the current collection moment is initialized according to the height value in the hanging object size at the previous collection moment and the hanging direction at the current collection moment to obtain the hanging seed point.
[0214] Among them, assuming that the target point position is the bottom position of the hook, the candidate point cloud set of the hanging object and the hanging seed point can be determined by the following two inequality groups.
[0215] Inequality group ①:
[0216] Inequality group ②:
[0217]
[0218] A 2 +B 2 +C 2 =1;
[0219] Assuming that the target point is the center point of the hook, the above inequality group ① is changed to:
[0220]
[0221] The above inequality group ② is changed to:
[0222]
[0223] Among them, (x, y, z) is any point cloud P in the current frame point cloud any The three-dimensional position coordinates, (x0, y0, z0) are the target point positions at the current acquisition time, Δd is an empirical value to ensure that the point cloud of the hanging object in the horizontal direction is as complete as possible. is the hanging direction of the cable at the current acquisition time, L b , Wb , H b They are respectively the length, width and height of the hanging object measured at the last collection moment.
[0224] In each inequality group, the left side of the first inequality is used to calculate the point cloud P any The first distance to the longitudinal centerline, the left side of the second inequality is used to calculate the point cloud P any The second distance to the horizontal median axis. any When the coordinates of satisfy the above inequality group ①, the point cloud is located in the predicted hanging object appearance area and can be added to the hanging object candidate point cloud set, so that the regional growing method can be used to further segment the hanging object point cloud, effectively narrow the segmentation range of the hanging object point cloud, and accelerate and improve the segmentation speed of the hanging object point cloud. any When the coordinates of satisfy the above inequality group ②, the point cloud can be used as a hanging seed point, so that the regional growth of the point cloud can be performed based on the hanging seed point to achieve the hanging object point cloud segmentation.
[0225] Consider that it may be impossible to find a point cloud P that satisfies the inequality group ② any At this time, we can get some hanging seed points by initializing the target point position. The initialization formula is as follows:
[0226] and is an integer;
[0227] A 2 +B 2 +C 2 =1;
[0228] Among them, (x0, y0, z0) is the position of the target point in the hook at the current acquisition time, is the hanging direction of the cable at the current acquisition time, H b is the height value of the hanging object measured at the last collection moment, (x t ,y t , z t ) is the coordinate of the initialized point cloud, that is, the three-dimensional position coordinate of the initialized hanging seed point.
[0229] 1033. According to the seed point of the hanging object, the hanging object point cloud set of the hanging object at the current collection moment is segmented from the hanging object candidate point cloud set.
[0230] Among them, (x t ,y t , z t ) is the seed hanging point, and r tWith radius as the center, the region growing method of point cloud is used to cluster all point clouds of hanging objects from the candidate point cloud set of hanging objects to obtain the point cloud set of hanging objects.
[0231] 104. Determine the hanging size of the hanging object at the current collection moment according to the hanging object point cloud set and the hanging direction at the current collection moment.
[0232] In some embodiments, please see Figure 3 The above step 104 may specifically include the following steps 1041-1044, wherein:
[0233] 1041. According to the hanging direction, each point cloud in the hanging object point cloud set is converted into a two-dimensional point cloud to obtain a two-dimensional point cloud set.
[0234] Among them, if the hanging direction is recorded as The point cloud set of the hanging object is denoted as G. When calculating the size of the hanging object, it is necessary to first convert the point cloud in the three-dimensional space coordinate system to the two-dimensional plane coordinate system. Specifically, each point cloud in the hanging object point cloud set G is projected to the direction A plane defined (for example, On the plane M), we get the projection point set G1, and we can The projection direction on plane M is a coordinate axis in the two-dimensional plane coordinate system, and the direction on plane M perpendicular to the projection direction is another coordinate axis in the two-dimensional plane coordinate system. Based on the coordinate axis, the three-dimensional position coordinates of the point cloud are converted into the two-dimensional position coordinates of the projection point to obtain the two-dimensional point cloud set G2.
[0235] 1042. From the set of suspended object point clouds, determine a first point cloud projected to the suspension direction and having a maximum projection value, and a second point cloud projected to the suspension direction and having a minimum projection value.
[0236] Among them, the point cloud in the hanging object point cloud set G is projected onto direction, and obtain each point cloud in The projection value k in the direction, is the coordinate vector of the point cloud in G, and k is the projection value. After that, traverse each projection value to find the largest and smallest two projection values k min , k max , and obtain k from the hanging object point cloud set G max The corresponding point cloud is taken as the first point cloud p max , and k min The corresponding point cloud is used as the second point cloud p min .
[0237] 1043. According to the hanging direction, the first point cloud, the second point cloud and the two-dimensional point cloud set, determine the three-dimensional position coordinates of each vertex in the bounding box of the hanging object at the current acquisition moment.
[0238] In some embodiments, the above step 1043 may specifically include:
[0239] Determine a first plane according to the first point cloud and the hanging direction, and determine a second plane according to the second point cloud and the hanging direction;
[0240] Calculate the directed bounding box of the two-dimensional point cloud set, and obtain the two-dimensional position coordinates of the four corner points of the directed bounding box;
[0241] The two-dimensional position coordinates of the four corner points are converted into corresponding three-dimensional position coordinates, and a straight line is determined according to the three-dimensional position coordinates of each corner point and the hanging direction to obtain four straight lines;
[0242] respectively determining the intersection points between the four straight lines and the first plane, and the intersection points between the four straight lines and the second plane;
[0243] All the intersection points are used as vertices of the bounding box of the hanging object at the current acquisition moment, and the three-dimensional position coordinates of the intersection points are used as the three-dimensional position coordinates of the corresponding vertices.
[0244] That is, first determine the point cloud p max and hanging direction The first plane S max , after the second point cloud p min and hanging direction The second plane S min At the same time, the directed bounding box OBB of the two-dimensional point cloud G2 is calculated, and the two-dimensional coordinates j1, j2, j3, j4 of the four corner points of OBB are obtained, and the two-dimensional coordinates are converted into three-dimensional coordinates J1, J2, J3, J4 in the coordinate system of the point cloud G. Then, according to the hanging direction And four three-dimensional coordinates J1, J2, J3, J4, determine four straight lines L1, L2, L3, L4, and calculate the distance between these four straight lines and plane S respectively min , S max The coordinates of the eight points are obtained from the intersection of the two points. The coordinates of these eight points are the eight vertices of the bounding box of the hanging object.
[0245] 1044. Determine the size of the bounding box according to the three-dimensional position coordinates of each vertex to obtain the hanging object size of the hanging object at the current acquisition moment.
[0246] Among them, by determining the two vertices of the sides corresponding to the length, width, and height respectively, and calculating the distance between the two vertices of the sides, the dimensions of the length, width, and height, that is, the dimensions of the hanging object, can be obtained.
[0247] As can be seen from the above, the method for automatically measuring the size of a suspended object based on a point cloud provided in an embodiment of the present application, in the process of lifting a suspended object by an engineering machinery with a lifting function, obtains the current frame point cloud of the collection area where the suspended object is located at the current collection time and the position of the hanging point of the steel cable, and obtains the size of the suspended object at the previous collection time; determines the target point position on the hook and the hanging direction of the steel cable at the current collection time, where the target point position is the center position of the hook or the bottom position of the hook; determines from the current frame point cloud the size of the suspended object at the previous collection time, and the target point position and the hanging direction at the current collection time. A collection of hanging point clouds of the hanging objects at the current collection moment; determining the hanging size of the hanging objects at the current collection moment according to the collection of hanging point clouds and the hanging direction at the current collection moment, that is, according to the hanging size at the previous moment and the hanging direction of the steel cable and the target point position of the hook at the current moment, using the target tracking method to segment the hanging point cloud of the hanging objects at any moment during the movement of the hanging objects, and then calculate the size of the hanging objects, thereby effectively improving the segmentation speed and accuracy of the hanging point cloud, and thus improving the calculation accuracy and speed of the hanging object size, and can be applied to the size calculation of various hanging objects, with a wide range of applications.
[0248] According to the method described in the above embodiment, the present application embodiment also provides a device for automatically measuring the size of a suspended object based on a point cloud, which is used to perform the steps in the method for automatically measuring the size of a suspended object based on a point cloud. Figure 5 , Figure 5 300 is a schematic diagram of the structure of the automatic measuring device for the size of suspended objects based on point cloud provided in an embodiment of the present application. The automatic measuring device for the size of suspended objects based on point cloud 300 is applied to an electronic device, which can be implemented as a user terminal or a server, and the user terminal includes a laptop, a tablet computer, a desktop computer, a mobile device (such as a mobile phone, a personal digital assistant, a dedicated messaging device), etc.
[0249] Specifically, the point cloud-based automatic measuring device 300 for hanging object size includes an acquisition unit 301, a first determination unit 302, a second determination unit 303 and a third determination unit 304, wherein:
[0250] The acquisition unit 301 is used to acquire the current frame point cloud and the suspension point position of the steel cable in the acquisition area where the object is located at the current acquisition time, and acquire the object size of the object at the previous acquisition time during the process of the engineering machinery with the lifting function lifting the object, and the engineering machinery includes a hook for lifting the object and the steel cable for hanging the hook;
[0251] The first determining unit 302 is used to determine the target point position on the hook and the hanging direction of the steel cable at the current acquisition moment, where the target point position is the center position of the hook or the bottom position of the hook;
[0252] The second determining unit 303 is used to determine the hanging object point cloud set of the hanging object at the current acquisition time from the current frame point cloud according to the size of the hanging object at the previous acquisition time, the target point position and the hanging direction at the current acquisition time;
[0253] The third determining unit 304 is used to determine the hanging object size of the hanging object at the current collection moment according to the hanging object point cloud set and the hanging direction at the current collection moment.
[0254] In some embodiments, the second determining unit 303 is specifically configured to:
[0255] According to the size of the hanging object at the last acquisition time, determine the first maximum distance and the minimum distance between the points on the side surface of the bounding box of the hanging object and the longitudinal center axis of the bounding box, and the second maximum distance between the points on the upper and lower surfaces of the bounding box and the transverse center axis of the bounding box;
[0256] Determine a set of candidate point clouds for hanging objects and seed points for hanging objects according to the first maximum distance, the second maximum distance, the position of the target point at the current acquisition moment and the hanging direction of the minimum distance, the height value of the hanging object size at the previous acquisition moment, and the current frame point cloud;
[0257] According to the hanging seed point, a hanging object point cloud set of the hanging object at the current acquisition moment is segmented from the hanging object candidate point cloud set.
[0258] In some embodiments, the second determining unit 303 is specifically configured to:
[0259] Determine a first distance from each point cloud in the current frame point cloud to the longitudinal central axis and a second distance to the transverse central axis plane according to the target point position and the hanging direction at the current acquisition moment, the height value in the hanging object size at the previous acquisition moment, and the three-dimensional position coordinates of the point cloud;
[0260] According to the size relationship between the first distance and the first maximum distance, the minimum distance, the size relationship between the second distance and the second maximum distance, and combined with the height value of the hanging object size at the previous acquisition moment and the hanging direction at the current acquisition moment, the hanging object candidate point cloud set and the hanging seed point are determined.
[0261] In some embodiments, the second determining unit 303 is specifically configured to:
[0262] If there is a point cloud whose first distance is not greater than the first maximum distance and whose second distance is not greater than the second maximum distance, the corresponding point cloud is used as a candidate point cloud set for hanging objects;
[0263] If there exists a point cloud whose first distance is not greater than the minimum distance and whose second distance is not greater than the second maximum distance, the corresponding point cloud will be used as the hanging seed point; if there does not exist a point cloud whose first distance is not greater than the minimum distance and whose second distance is not greater than the second maximum distance, the target point position at the current collection moment is initialized according to the height value in the hanging object size at the previous collection moment and the hanging direction at the current collection moment to obtain the hanging seed point.
[0264] In some embodiments, the third determining unit 304 is specifically configured to:
[0265] Convert each point cloud in the hanging object point cloud set into a two-dimensional point cloud according to the hanging direction to obtain a two-dimensional point cloud set;
[0266] Determine, from the set of suspended object point clouds, a first point cloud projected onto the suspension direction and having a maximum projection value, and a second point cloud projected onto the suspension direction and having a minimum projection value;
[0267] Determine the three-dimensional position coordinates of each vertex in the bounding box of the hanging object at the current acquisition moment according to the hanging direction, the first point cloud, the second point cloud and the two-dimensional point cloud set;
[0268] The size of the bounding box is determined according to the three-dimensional position coordinates of each vertex to obtain the hanging object size of the hanging object at the current acquisition moment.
[0269] In some embodiments, the third determining unit 304 is specifically configured to:
[0270] Determine a first plane according to the first point cloud and the hanging direction, and determine a second plane according to the second point cloud and the hanging direction;
[0271] Calculate the directed bounding box of the two-dimensional point cloud set, and obtain the two-dimensional position coordinates of the four corner points of the directed bounding box;
[0272] The two-dimensional position coordinates of the four corner points are converted into corresponding three-dimensional position coordinates, and a straight line is determined according to the three-dimensional position coordinates of each corner point and the hanging direction to obtain four straight lines;
[0273] respectively determining the intersection points between the four straight lines and the first plane, and the intersection points between the four straight lines and the second plane;
[0274] All the intersection points are used as vertices of the bounding box of the hanging object at the current acquisition moment, and the three-dimensional position coordinates of the intersection points are used as the three-dimensional position coordinates of the corresponding vertices.
[0275] In some embodiments, the apparatus further includes a fourth determining unit, configured to:
[0276] Obtain the first frame point cloud of the acquisition area at the first acquisition moment and the second frame point cloud of the acquisition area at the next adjacent acquisition moment, and obtain the suspension point position of the steel cable at the first acquisition moment;
[0277] Determine a hanging object point cloud set of the hanging object at a first acquisition moment according to the first frame point cloud and the second frame point cloud;
[0278] Determine the hanging direction of the steel cable at the first collection moment according to the first frame point cloud and the hanging point position at the first collection moment;
[0279] The hanging object size of the hanging object at the first collection moment is determined according to the hanging object point cloud set and the hanging direction at the first collection moment.
[0280] In some embodiments, the fourth determining unit is specifically configured to:
[0281] Determine, according to the first frame point cloud and the second frame point cloud, a plurality of changed point cloud clusters that have changed in the first frame point cloud;
[0282] Determine a plurality of candidate hanging object point cloud clusters of the suspected hanging object from the first frame point cloud;
[0283] According to the change point cloud cluster and the candidate point cloud cluster of the hanging object, all point clouds of the hanging object in the first frame point cloud are segmented to obtain a hanging object point cloud set of the hanging object at the first acquisition moment.
[0284] In some embodiments, the fourth determining unit is specifically configured to:
[0285] Performing voxelization of the first frame point cloud and the second frame point cloud in a unified standard;
[0286] Performing rough alignment of horizontal coordinates on the voxelized first frame point cloud and the second frame point cloud to determine point clouds that have changed between the first frame point cloud and the second frame point cloud;
[0287] The changed point cloud in the first frame point cloud is filtered, and the filtered point cloud is clustered to obtain a plurality of changed point cloud clusters in the first frame point cloud.
[0288] In some embodiments, the fourth determining unit is specifically configured to:
[0289] Determine a hook point cloud of the hook and a ground point cloud of the ground in the first frame point cloud;
[0290] Determine all point clouds located below the hook point cloud in the first frame point cloud according to the three-dimensional position coordinates of each point cloud to obtain a target point cloud;
[0291] Clustering the target point cloud to obtain multiple point cloud clusters to be screened;
[0292] The point cloud cluster to be screened that is not connected to the ground point cloud is selected as a candidate point cloud cluster of the suspended object suspected to be the suspended object.
[0293] In some embodiments, the fourth determining unit is specifically configured to:
[0294] Determine the minimum distance between any one of the change point cloud clusters and any one of the candidate point cloud clusters of the hanging object;
[0295] Determine at least one associated point cloud cluster combination from the hanging object candidate point cloud cluster and the change point cloud cluster according to the minimum distance, each of the associated point cloud cluster combinations includes one hanging object candidate point cloud cluster and at least one change point cloud cluster;
[0296] All point clouds of the hanging object in the first frame point cloud are segmented according to the associated point cloud cluster combination.
[0297] In some embodiments, the fourth determining unit is specifically configured to:
[0298] Determining whether the minimum distance is less than or equal to a first preset threshold;
[0299] If so, the corresponding hanging object candidate point cloud cluster and the change point cloud cluster are classified into a related point cloud cluster combination, and different related point cloud cluster combinations having the same hanging object candidate point cloud cluster are merged.
[0300] In some embodiments, the fourth determining unit is specifically configured to:
[0301] Counting the total number of first point clouds of the hanging object candidate point cloud cluster and the total number of second point clouds of the change point cloud cluster in each of the associated point cloud cluster combinations;
[0302] Calculate the confidence of the corresponding hanging object candidate point cloud cluster according to the total number of the first point cloud and the total number of the second point cloud;
[0303] The point clouds in the candidate point cloud cluster of the suspended object corresponding to all the confidences that are greater than or equal to the second preset threshold are used as the point clouds of the suspended object in the first frame of point clouds.
[0304] In some embodiments, the first determining unit 302 is specifically configured to:
[0305] Determine a point cloud set to be screened from the current frame point cloud according to the position of the suspension point at the current acquisition moment, wherein the height of the point cloud in the point cloud set to be screened relative to the ground does not exceed the steel cable;
[0306] Determine the steel cable point cloud set of the steel cable at the current collection time according to the suspension point position at the current collection time and the point cloud set to be screened;
[0307] According to the point cloud set of the steel cable at the current acquisition moment and the position of the suspension point, the suspension direction of the steel cable at the current acquisition moment is determined.
[0308] In some embodiments, the first determining unit 302 is specifically configured to:
[0309] Determine a hook candidate point cloud set according to the suspension direction, the suspension point position, the steel cable point cloud set and the point cloud set to be screened at the current acquisition moment;
[0310] Determine the height coordinate interval of the hook according to the hanging direction at the current acquisition moment and the candidate point cloud set of the hook;
[0311] According to the height coordinate range, all point clouds of the hook are segmented from the candidate point cloud set of the hook to obtain the hook point cloud set of the hook at the current acquisition moment, and the three-dimensional position coordinates of the point cloud corresponding to the center of the hook or the bottom of the hook in the hook point cloud set are used as the target point position.
[0312] In some embodiments, the first determining unit 302 is specifically configured to:
[0313] Fitting the plane equation corresponding to the steel cable point cloud set at the current acquisition time to obtain the steel cable plane;
[0314] Determine a third straight line passing through the suspension point position and the suspension direction at the current acquisition moment;
[0315] According to the maximum length value and the maximum width value of the hook on the horizontal plane, a hook candidate point cloud set is extracted from the point cloud set to be screened.
[0316] In some embodiments, the first determining unit 302 is specifically configured to:
[0317] According to the hanging direction at the current acquisition moment and the candidate point cloud set of the hook, multiple coordinate intervals are divided on the two-dimensional plane, and the height coordinate interval of the hook is determined according to the maximum distance of each coordinate interval, the actual length value of the top surface of the hook and the actual length value of the bottom surface of the hook.
[0318] In some embodiments, the engineering machinery further includes a boom and a mobile trolley mounted on the boom, the steel cable is fixed on the mobile trolley, and the acquisition unit 301 is specifically used for:
[0319] Obtain the amplitude change value of the mobile vehicle at the current acquisition moment, as well as the rotation angle of the boom and the lowest height of the boom relative to the ground;
[0320] Determine the center point position of the mobile vehicle according to the amplitude value, the rotation angle and the minimum height at the current acquisition moment;
[0321] According to the center point position and the preset calibration value, the suspension point position of the steel cable at the current acquisition moment is determined.
[0322] It should be noted that the specific details of each module unit in the above-mentioned point cloud-based automatic measurement device for hanging object size 300 have been described in detail in the embodiment of the above-mentioned point cloud-based automatic measurement method for hanging object size, and will not be repeated here.
[0323] In some embodiments, the point cloud-based automatic measuring device for hanging object size in the embodiments of the present application can be an electronic device, or a component in an electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal device. Exemplarily, the electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, a vehicle-mounted electronic device, a mobile Internet device (Mobile Internet Device, MID), an augmented reality (augmented reality, AR) / virtual reality (virtual reality, VR) device, a robot, a wearable device, an ultra-mobile personal computer (ultra-mobile personal computer, UMPC), a netbook or a personal digital assistant (personal digital assistant, PDA), etc. It can also be a server, a network attached storage (Network Attached Storage, NAS), a personal computer (personal computer, PC), a television (television, TV), a teller machine or a self-service machine, etc., which is not specifically limited in the embodiments of the present application.
[0324] In some embodiments, Figure 6 As shown, an embodiment of the present application also provides an electronic device 400, including a processor 401, a memory 402, and a computer program stored in the memory 402 and executable on the processor 401. When the program is executed by the processor 401, each process of the above-mentioned point cloud-based automatic measurement method for suspended object size embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be described here.
[0325] It should be noted that the electronic devices in the embodiments of the present application include the mobile electronic devices and non-mobile electronic devices mentioned above.
[0326] Figure 7 A schematic diagram of the hardware structure of an electronic device to implement an embodiment of the present application.
[0327] The electronic device 500 includes but is not limited to: a radio frequency unit 501, a network module 502, an audio output unit 503, an input unit 504, a sensor 505, a display unit 506, a user input unit 507, an interface unit 508, a memory 509 and a processor 510.
[0328] Those skilled in the art will appreciate that the electronic device 500 may also include a power source (such as a battery) for supplying power to various components, and the power source may be logically connected to the processor 510 through a power management system, thereby implementing functions such as managing charging, discharging, and power consumption management through the power management system. Figure 7 The electronic device structure shown in the figure does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently, which will not be described in detail here.
[0329] It should be understood that in the embodiment of the present application, the input unit 504 may include a graphics processor (GPU) 5041 and a microphone 5042, and the graphics processor 5041 processes the image data of a static picture or video obtained by an image capture device (such as a camera) in a video capture mode or an image capture mode. The display unit 506 may include a display panel 5061, and the display panel 5061 may be configured in the form of a liquid crystal display, an organic light emitting diode, etc. The user input unit 507 includes a touch panel 5071 and at least one of other input devices 5072. The touch panel 5071 is also called a touch screen. The touch panel 5071 may include two parts: a touch detection device and a touch controller. Other input devices 5072 may include, but are not limited to, a physical keyboard, function keys (such as a volume control button, a switch button, etc.), a trackball, a mouse, and a joystick, which will not be repeated here.
[0330] The memory 509 can be used to store software programs and various data. The memory 509 may mainly include a first storage area for storing programs or instructions and a second storage area for storing data, wherein the first storage area may store an operating system, an application program or instructions required for at least one function (such as a sound playback function, an image playback function, etc.), etc. In addition, the memory 509 may include a volatile memory or a non-volatile memory, or the memory 509 may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), a static random access memory (SRAM), a dynamic random access memory (DRAM), a synchronous dynamic random access memory (SDRAM), a double data rate synchronous dynamic random access memory (DDRSDRAM), an enhanced synchronous dynamic random access memory (ESDRAM), a synchronous link dynamic random access memory (SLDRAM) and a direct memory bus random access memory (DRRAM). The memory 509 in the embodiment of the present application includes but is not limited to these and any other suitable types of memory.
[0331] The processor 510 may include one or more processing units; the processor 510 integrates an application processor and a modem processor, wherein the application processor mainly processes operations related to an operating system, a user interface, and application programs, and the modem processor mainly processes wireless communication signals, such as a baseband processor. It is understandable that the modem processor may not be integrated into the processor 510.
[0332] An embodiment of the present application also provides a non-transitory computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the various processes of the above-mentioned point cloud-based automatic measurement method for suspended object dimensions are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0333] The processor is the processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory ROM, a random access memory RAM, a magnetic disk or an optical disk.
[0334] An embodiment of the present application also provides a computer program product, including a computer program, which, when executed by a processor, implements the above-mentioned point cloud-based automatic measurement method for suspended object dimensions.
[0335] The processor is the processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory ROM, a random access memory RAM, a magnetic disk or an optical disk.
[0336] It should be noted that, in this article, the terms "comprise", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise one..." do not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.
[0337] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM / RAM, a disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present application.
[0338] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.
[0339] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.
[0340] In the description of the present application, “plurality” means two or more.
[0341] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "illustrative embodiments", "examples", "specific examples", or "some examples" means that the specific features, structures, materials, or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.
[0342] Although the embodiments of the present application have been shown and described, those skilled in the art will appreciate that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present application, and that the scope of the present application is defined by the claims and their equivalents.
Claims
1. A method for automatically measuring the size of suspended objects based on point cloud, characterized in that: include: In the process of hoisting an object by an engineering machinery with a hoisting function, a current frame point cloud of a collection area where the object is located at a current collection time and a suspension point position of a steel cable are obtained, and an object size of the object at a previous collection time is obtained, wherein the engineering machinery includes a hook for hoisting the object and the steel cable for hanging the hook; Determine the target point position on the hook and the hanging direction of the steel cable at the current acquisition time, wherein the target point position is the center position of the hook or the bottom position of the hook; Determine a hanging object point cloud set of the hanging object at the current acquisition time from the current frame point cloud according to the hanging object size at the previous acquisition time, and the target point position and the hanging direction at the current acquisition time; The hanging object size of the hanging object at the current collection moment is determined according to the hanging object point cloud set and the hanging direction at the current collection moment.
2. The method for automatically measuring the size of suspended objects based on point cloud according to claim 1, characterized in that: The method of determining a hanging object point cloud set of the hanging object at the current acquisition time from the current frame point cloud according to the hanging object size at the previous acquisition time, and the target point position and the hanging direction at the current acquisition time includes: According to the size of the suspended object at the last acquisition moment, determine a first maximum distance and a minimum distance from a point on the side surface of a bounding box of the suspended object to the longitudinal center axis of the bounding box, and a second maximum distance from a point on the upper and lower surfaces of the bounding box to the transverse center axis of the bounding box; Determine a set of candidate point clouds of suspended objects and seed points of suspended objects according to the first maximum distance, the second maximum distance, the target point position and the suspension direction at the current acquisition moment of the minimum distance, the height value of the suspended object size at the previous acquisition moment, and the current frame point cloud; According to the hanging seed points, a hanging object point cloud set of the hanging object at the current collection moment is segmented from the hanging object candidate point cloud set.
3. The method for automatically measuring the size of suspended objects based on point cloud according to claim 2 is characterized in that: The method of determining a set of candidate point clouds of suspended objects and seed points of suspended objects according to the first maximum distance, the second maximum distance, the target point position and the suspension direction at the current acquisition moment of the minimum distance, the height value of the suspended object size at the previous acquisition moment, and the current frame point cloud comprises: Determine a first distance from each point cloud in the current frame point cloud to the longitudinal central axis and a second distance to the transverse central axis plane according to the target point position and the hanging direction at the current acquisition moment, the height value in the hanging object size at the previous acquisition moment, and the three-dimensional position coordinates of the point cloud; According to the size relationship between the first distance and the first maximum distance, the minimum distance, the size relationship between the second distance and the second maximum distance, and combined with the height value in the hanging object size at the previous acquisition moment and the hanging direction at the current acquisition moment, determine the hanging object candidate point cloud set and the hanging seed point.
4. The method for automatically measuring the size of suspended objects based on point cloud according to claim 3 is characterized in that: According to the magnitude relationship between the first distance and the first maximum distance, the minimum distance, and the magnitude relationship between the second distance and the second maximum distance, and in combination with the height value in the hanging object size at the last acquisition moment and the hanging direction at the current acquisition moment, a hanging object candidate point cloud set and a hanging object seed point are determined, including: If there exists a point cloud whose first distance is not greater than the first maximum distance and whose second distance is not greater than the second maximum distance, the corresponding point cloud is used as a candidate point cloud set for hanging objects; If there exists a point cloud in which the first distance is not greater than the minimum distance and the second distance is not greater than the second maximum distance, the corresponding point cloud is used as the hanging seed point; if there does not exist a point cloud in which the first distance is not greater than the minimum distance and the second distance is not greater than the second maximum distance, the target point position at the current collection moment is initialized according to the height value in the hanging object size at the previous collection moment and the hanging direction at the current collection moment to obtain the hanging seed point.
5. The method for automatically measuring the size of suspended objects based on point cloud according to claim 1, characterized in that: The determining the hanging object size of the hanging object at the current collection time according to the hanging object point cloud set and the hanging direction at the current collection time includes: Convert each point cloud in the hanging object point cloud set into a two-dimensional point cloud according to the hanging direction to obtain a two-dimensional point cloud set; Determine, from the set of suspended object point clouds, a first point cloud projected onto the suspension direction and having a maximum projection value, and a second point cloud projected onto the suspension direction and having a minimum projection value; Determine the three-dimensional position coordinates of each vertex in the bounding box of the hanging object at the current acquisition moment according to the hanging direction, the first point cloud, the second point cloud and the two-dimensional point cloud set; The size of the bounding box is determined according to the three-dimensional position coordinates of each vertex to obtain the hanging object size of the hanging object at the current acquisition moment.
6. The method for automatically measuring the size of suspended objects based on point cloud according to claim 5, characterized in that: The step of determining the three-dimensional position coordinates of each vertex in the bounding box of the hanging object at the current acquisition moment according to the hanging direction, the first point cloud, the second point cloud and the two-dimensional point cloud set includes: Determine a first plane according to the first point cloud and the hanging direction, and determine a second plane according to the second point cloud and the hanging direction; Calculating a directed bounding box of the two-dimensional point cloud set, and obtaining the two-dimensional position coordinates of four corner points of the directed bounding box; Convert the two-dimensional position coordinates of the four corner points into corresponding three-dimensional position coordinates, and determine a straight line according to the three-dimensional position coordinates of each corner point and the hanging direction to obtain four straight lines; respectively determining the intersection points between the four straight lines and the first plane, and the intersection points between the four straight lines and the second plane; All the intersection points are used as vertices of the bounding box of the hanging object at the current acquisition moment, and the three-dimensional position coordinates of the intersection points are used as the three-dimensional position coordinates of the corresponding vertices.
7. The method for automatically measuring the size of suspended objects based on point cloud according to claim 1, characterized in that: The method for determining the size of the hanging object at the first collection moment includes: Acquire a first frame point cloud of the acquisition area at a first acquisition moment and a second frame point cloud of the acquisition area at a next adjacent acquisition moment, and acquire the suspension point position of the steel cable at the first acquisition moment; Determine a hanging object point cloud set of the hanging object at a first acquisition moment according to the first frame point cloud and the second frame point cloud; Determine the hanging direction of the steel cable at the first collection moment according to the first frame point cloud and the hanging point position at the first collection moment; The hanging object size of the hanging object at the first collection moment is determined according to the hanging object point cloud set and the hanging direction at the first collection moment.
8. The method for automatically measuring the size of suspended objects based on point cloud according to claim 7, characterized in that: The step of determining a hanging object point cloud set of the hanging object at a first acquisition moment according to the first frame point cloud and the second frame point cloud comprises: Determine, according to the first frame point cloud and the second frame point cloud, a plurality of changed point cloud clusters that have changed in the first frame point cloud; Determine a plurality of candidate hanging object point cloud clusters of suspected hanging objects from the first frame point cloud; According to the change point cloud cluster and the candidate point cloud cluster of the suspended object, all point clouds of the suspended object in the first frame point cloud are segmented to obtain a suspended object point cloud set of the suspended object at the first acquisition moment.
9. The method for automatically measuring the size of suspended objects based on point cloud according to claim 8, characterized in that: The step of determining, according to the first frame point cloud and the second frame point cloud, a plurality of changed point cloud clusters that have changed in the first frame point cloud comprises: Performing voxelization of the first frame point cloud and the second frame point cloud in a unified standard; Performing rough alignment of horizontal coordinates on the voxelized first frame point cloud and the second frame point cloud to determine point clouds that have changed in the first frame point cloud and the second frame point cloud; The changed point cloud in the first frame point cloud is filtered, and the filtered point cloud is clustered to obtain a plurality of changed point cloud clusters in the first frame point cloud.
10. The method for automatically measuring the size of suspended objects based on point cloud according to claim 8, characterized in that: The step of determining a plurality of candidate point cloud clusters of suspended objects of suspected suspended objects from the first frame point cloud comprises: Determine a hook point cloud of the hook and a ground point cloud of the ground in the first frame point cloud; Determine all point clouds located below the hook point cloud in the first frame point cloud according to the three-dimensional position coordinates of each point cloud to obtain a target point cloud; Clustering the target point cloud to obtain multiple point cloud clusters to be screened; The point cloud cluster to be screened that is not connected to the ground point cloud is selected as a candidate point cloud cluster of a suspended object of a suspected suspended object.
11. The method for automatically measuring the size of suspended objects based on point cloud according to claim 8, characterized in that: The step of segmenting all point clouds of the suspended object in the first frame point cloud according to the change point cloud cluster and the suspended object candidate point cloud cluster comprises: Determine the minimum distance between any one of the change point cloud clusters and any one of the hanging object candidate point cloud clusters; Determine at least one associated point cloud cluster combination from the hanging object candidate point cloud cluster and the change point cloud cluster according to the minimum distance, each of the associated point cloud cluster combinations includes one hanging object candidate point cloud cluster and at least one change point cloud cluster; All point clouds of the hanging object in the first frame point cloud are segmented according to the associated point cloud cluster combination.
12. The method for automatically measuring the size of suspended objects based on point cloud according to claim 11, characterized in that: The step of determining at least one associated point cloud cluster combination from the candidate point cloud cluster of the hanging object and the change point cloud cluster according to the minimum distance includes: Determining whether the minimum distance is less than or equal to a first preset threshold; If so, the corresponding hanging object candidate point cloud cluster and the change point cloud cluster are classified into one associated point cloud cluster combination, and different associated point cloud cluster combinations having the same hanging object candidate point cloud cluster are merged.
13. The method for automatically measuring the size of suspended objects based on point cloud according to claim 11, characterized in that: The step of segmenting all point clouds of the hanging object in the first frame of point cloud according to the associated point cloud cluster combination includes: Counting the total number of first point clouds of the candidate point cloud clusters for the hanging object in each of the associated point cloud cluster combinations and the total number of second point clouds of the change point cloud clusters; Calculate the confidence of the corresponding hanging object candidate point cloud cluster according to the total number of the first point clouds and the total number of the second point clouds; The point clouds in the suspended object candidate point cloud cluster corresponding to all the confidences greater than or equal to the second preset threshold are used as the point clouds of the suspended object in the first frame point cloud.
14. The method for automatically measuring the size of suspended objects based on point cloud according to claim 1, characterized in that: The determining the hanging direction of the steel cable at the current acquisition moment includes: Determine a point cloud set to be screened from the current frame point cloud according to the suspension point position at the current acquisition moment, wherein the height of the point cloud in the point cloud set to be screened relative to the ground does not exceed the steel cable; Determine the steel cable point cloud set of the steel cable at the current collection time according to the suspension point position at the current collection time and the point cloud set to be screened; The hanging direction of the steel cable at the current collection moment is determined according to the steel cable point cloud set and the hanging point position at the current collection moment.
15. The method for automatically measuring the size of suspended objects based on point cloud according to claim 14, characterized in that: Determining the target point position on the hook at the current acquisition time includes: Determine a hook candidate point cloud set according to the suspension direction, the suspension point position, the steel cable point cloud set and the point cloud set to be screened at the current acquisition moment; Determine the height coordinate interval of the hook according to the hanging direction at the current acquisition moment and the hook candidate point cloud set; All point clouds of the hook are segmented from the hook candidate point cloud set according to the height coordinate interval to obtain the hook point cloud set of the hook at the current acquisition moment, and the three-dimensional position coordinates of the point cloud corresponding to the bottom of the hook or the center of the hook in the hook point cloud set are used as the target point position.
16. The method for automatically measuring the size of suspended objects based on point cloud according to claim 14, characterized in that: The step of determining the height coordinate interval of the hook according to the hanging direction at the current acquisition moment and the hook candidate point cloud set includes: According to the hanging direction at the current acquisition moment and the candidate point cloud set of the hook, a plurality of coordinate intervals are divided on a two-dimensional plane, and the height coordinate interval of the hook is determined according to the maximum distance of each coordinate interval, the actual length value of the top surface of the hook and the actual length value of the bottom surface of the hook.
17. The method for automatically measuring the size of suspended objects based on point cloud according to any one of claims 1 to 16, characterized in that: The engineering machinery further includes a boom and a mobile trolley mounted on the boom, the steel cable is fixed on the mobile trolley, and the obtaining of the suspension point position of the steel cable at the current acquisition moment includes: Obtaining the amplitude change value of the mobile vehicle at the current acquisition moment, as well as the rotation angle of the boom and the lowest height of the boom relative to the ground; Determine the center point position of the mobile vehicle according to the amplitude variation value, the rotation angle and the minimum height at the current acquisition moment; The suspension point position of the steel cable at the current acquisition moment is determined according to the center point position and the preset calibration value.
18. An automatic measuring device for hanging object size based on point cloud, characterized in that: include: An acquisition unit is used to acquire the current frame point cloud and the suspension point position of the steel cable in the acquisition area where the suspended object is located at the current acquisition time, and acquire the size of the suspended object at the previous acquisition time during the process of the engineering machinery with a lifting function lifting the suspended object, wherein the engineering machinery includes a hook for lifting the suspended object and the steel cable for hanging the hook; A first determination unit is used to determine the target point position on the hook and the hanging direction of the steel cable at the current acquisition moment, wherein the target point position is the center position of the hook or the bottom position of the hook; A second determining unit is used to determine a hanging object point cloud set of the hanging object at a current acquisition moment from the current frame point cloud according to the hanging object size at a previous acquisition moment, and the target point position and the hanging direction at a current acquisition moment; The third determination unit is used to determine the hanging object size of the hanging object at the current collection moment according to the hanging object point cloud set and the hanging direction at the current collection moment.
19. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for automatically measuring the size of suspended objects based on point cloud as described in any one of claims 1 to 17 is implemented.
20. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the point cloud-based automatic measurement method for hanging object size as described in any one of claims 1 to 17 is implemented.
21. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the method for automatically measuring the size of suspended objects based on point cloud as described in any one of claims 1 to 17 is implemented.
