Point cloud clustering method, device and equipment for port operation vehicle moving scene
Patent Information
- Application Number
- CN202611150424.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-30
- Publication Date
- 2026-08-28
AI Technical Summary
[0003]然而,现有的点云聚类算法通常直接在三维空间内逐点计算距离并搜索连通关系,计算复杂度较高,计算量随点云规模的增大而显著增加
本申请提供一种用于港口作业车辆移动场景的点云聚类方法,该包括如下步骤:获得港口区域的三维点云,三维点云为港口区域中的港口作业车辆的传感设备在扫描港口作业车辆的周边环境状态后输出的多帧点云的原始三维点的集合;根据港口区域的三维点云,获得三维点云中的移动区域所对应的点云,作为目标三维点云,目标三维点云中的原始三维点为目标原始三维点,移动区域为港口作业车辆在港口区域中移动所需使用的区域;根据目标三维点云和预设的二维网格分辨率构建占据栅格图,占据栅格图包含栅格单元;将目标原始三维点沿传感设备坐标系的高度方向映射到栅格单元,获得目标原始三维点的索引;将目标原始三维点的索引写入与栅格单元对应的栅格容器中,并将存储有目标原始三维点的索引的栅格容器对应的栅格单元标记为占据状态;将占据栅格图中的相邻且处于占据状态的多个栅格单元标记为同一连通区域;将同一连通区域包含的所有栅格单元对应的栅格容器所存储的索引进行合并处理,获得同一连通区域对应的目标原始三维点的索引集合;根据同一连通区域对应的目标原始三维点的索引集合,获得移动区域的点云聚类结果,作为港口作业车辆在移动区域中移动的参考数据。在上述用于港口作业车辆移动场景的点云聚类方法中,将港口作业车辆扫描得到的三维点云映射为二维的占据栅格图,并用连通区域标记运算代替现有的点云聚类算法中在三维空间进行逐点距离计算和邻域搜索的高复杂度运算,在保证聚类效果的同时,降低了运算量,提高了计算效率,能够满足港口作业车辆对感知实时性的要求。同时,本申请可以对移动区域内的三维点云进行聚类处理,无需非移动区域对应的点云进行计算,从而降低计算量,进一步提高计算效率。
Smart Images

Figure CN122657530A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of autonomous driving, specifically to a point cloud clustering method for port operation vehicle movement scenarios; this application also relates to corresponding devices, electronic devices and computer storage media. Background Technology
[0002] Some of the port's operational vehicles are autonomous. During their operations, these vehicles scan the surrounding environment to output 3D point clouds, and then need to detect and identify objects such as containers, trucks, and stacks from these point clouds. Point cloud clustering, as a fundamental step in this object detection and identification process, groups points belonging to the same object within the 3D point cloud into a single category.
[0003] However, existing point cloud clustering algorithms typically calculate distances and search for connectivity point-by-point in 3D space, resulting in high computational complexity, with the computational load increasing significantly as the point cloud size grows. The point clouds generated by port vehicle scanning are large, and existing point cloud clustering methods experience a significant decrease in computational efficiency at this scale, making it difficult to meet the stringent real-time perception requirements of port vehicles.
[0004] Therefore, there is an urgent need for a point cloud clustering method that is more suitable for port operation vehicle movement scenarios, which can reduce the amount of computation and improve the computational efficiency while ensuring the clustering effect, and meet the requirements of port operation vehicles for real-time perception. Summary of the Invention
[0005] This application provides a point cloud clustering method for port operation vehicle movement scenarios. This method reduces the amount of computation and improves the computational efficiency while ensuring the clustering effect, thus meeting the real-time perception requirements of port operation vehicles.
[0006] This application provides a point cloud clustering method for port operation vehicle movement scenarios, including: obtaining a 3D point cloud of a port area, wherein the 3D point cloud is a set of original 3D points from multiple frames of point clouds output by the sensing device of the port operation vehicle in the port area after scanning the surrounding environment of the port operation vehicle; obtaining a point cloud corresponding to the movement area in the 3D point cloud as a target 3D point cloud based on the 3D point cloud of the port area, wherein the original 3D points in the target 3D point cloud are the target original 3D points, and the movement area is the area used by the port operation vehicle to move in the port area; constructing an occupancy grid map based on the target 3D point cloud and a preset 2D grid resolution, wherein the occupancy grid map contains grid cells; and arranging the target original 3D points along the sensing device's coordinates. The height direction of the target system is mapped to the grid cell to obtain the index of the original 3D point of the target. The index of the original 3D point of the target is written into the grid container corresponding to the grid cell, and the grid cell corresponding to the grid container storing the index of the original 3D point of the target is marked as occupied. Multiple adjacent grid cells in the occupied grid map that are in the occupied state are marked as the same connected region. The indexes stored in the grid containers corresponding to all grid cells contained in the same connected region are merged to obtain the index set of the original 3D point of the target corresponding to the same connected region. Based on the index set of the original 3D point of the target corresponding to the same connected region, the point cloud clustering result of the moving region is obtained, which serves as reference data for the movement of port operation vehicles in the moving region.
[0007] Optionally, based on the three-dimensional point cloud of the port area, the point cloud corresponding to the moving region in the three-dimensional point cloud is obtained as the target three-dimensional point cloud, including: cropping the point cloud corresponding to the non-moving region in the three-dimensional point cloud to obtain the point cloud corresponding to the moving region in the three-dimensional point cloud as the target three-dimensional point cloud; wherein, the non-moving region is the region in the port area other than the moving region.
[0008] Optionally, the point cloud corresponding to the non-moving region in the 3D point cloud is cropped to obtain the point cloud corresponding to the moving region in the 3D point cloud, which serves as the target 3D point cloud. This includes: transforming the 3D coordinate data of the original 3D points in the 3D point cloud from the sensing device coordinate system to the world coordinate system using a preset coordinate transformation matrix to obtain the world coordinate system data of the original 3D points; mapping the original 3D points in the 3D point cloud to their corresponding positions in the target area occupancy bitmap based on the world coordinate system data of the original 3D points to obtain the position data of the corresponding positions; wherein, the target area occupancy bitmap is generated by rasterizing the map data corresponding to the port area according to a preset map grid resolution; for any original 3D point in the 3D point cloud... If the position data corresponding to any original 3D point is a preset first data, then that original 3D point is determined to be the target original 3D point. If the position data corresponding to any original 3D point is a preset second data, then that original 3D point is determined not to be the target original 3D point, and that original 3D point is deleted from the 3D point cloud. Here, the first data is the value corresponding to the position of the map data corresponding to the moving area in the bitmap occupied by the target area, and the second data is the value corresponding to the position of the map data corresponding to the non-moving area in the bitmap occupied by the target area. After deleting all original 3D points that are not target original 3D points from the 3D point cloud, the point cloud corresponding to the moving area in the 3D point cloud is obtained, which is used as the target 3D point cloud.
[0009] Optionally, an occupancy grid map is constructed based on the target 3D point cloud and a preset 2D grid resolution, including: determining the minimum and maximum horizontal coordinates of the target 3D point cloud in the horizontal direction of the sensing device coordinate system, and the minimum and maximum vertical coordinates of the target 3D point cloud in the vertical direction of the sensing device coordinate system; determining the bounding box of the target 3D point cloud on the horizontal plane where the origin of the sensing device coordinate system is located based on the minimum and maximum horizontal coordinates, the minimum and maximum vertical coordinates, and the maximum vertical coordinates, where the length of the bounding box is determined based on the maximum and minimum horizontal coordinates, and the width of the bounding box is determined based on the maximum and minimum vertical coordinates; dividing the bounding box into multiple grid units based on the preset 2D grid resolution, the length of the bounding box, and the width of the bounding box, and adding a preset number of grid units along the length and width directions of the bounding box; and obtaining the occupancy grid map based on the multiple grid units and the preset number of grid units.
[0010] Optionally, mapping the original 3D point of the target to a grid cell along the height direction of the sensor device coordinate system to obtain the index of the original 3D point of the target includes: translating the original 3D point of the target in the sensor device coordinate system according to a translation vector, such that the coordinate values of the original 3D point of the target in the horizontal direction of the sensor device coordinate system are all non-negative, and obtaining the translated horizontal coordinate value and the translated vertical coordinate value of the original 3D point of the target in the horizontal direction; wherein, the translation vector is determined according to the negative of the minimum horizontal coordinate value in the horizontal direction and the negative of the minimum vertical coordinate value in the vertical direction of the sensor device coordinate system; and obtaining the index of the original 3D point of the target in the occupied grid map according to the translated horizontal coordinate value, the translated vertical coordinate value and the 2D grid resolution, which serves as the index of the original 3D point of the target.
[0011] Optionally, the index of the original 3D point of the target includes a horizontal index and a horizontal index. The horizontal index is used to identify the column number of the raster cell mapped by the original 3D point of the target in the occupied raster map, and the horizontal index is used to identify the row number of the raster cell mapped by the original 3D point of the target in the occupied raster map. The horizontal index is determined based on the horizontal coordinate value after translation and the resolution of the 2D grid. The horizontal index is determined based on the vertical coordinate value after translation and the resolution of the 2D grid.
[0012] Optionally, marking multiple adjacent and occupied grid cells in the occupied grid map as the same connected region includes: starting from the current grid cell, traversing the grid cells adjacent to the current grid cell, marking the grid cells in the occupied state among the grid cells adjacent to the current grid cell as belonging to the same connected region as the current grid cell, wherein the grid cells adjacent to the current grid cell are grid cells whose horizontal horizontal index is the same as the horizontal horizontal index of the current grid cell and whose horizontal vertical index is adjacent to the horizontal vertical index of the current grid cell, or grid cells whose horizontal vertical index is the same as the horizontal vertical index of the current grid cell and whose horizontal horizontal index is adjacent to the horizontal horizontal index of the current grid cell.
[0013] Optionally, the method further includes: obtaining the number of indices contained in the index set of the original three-dimensional points of the target corresponding to the same connected region; filtering out the point cloud clustering results corresponding to the index set with an index number less than a preset minimum point number threshold; and determining the point cloud clustering results corresponding to the index set with an index number not less than the minimum point number threshold as the filtered point cloud clustering results, which are used as obstacle avoidance reference data for port operation vehicles moving in the mobile area.
[0014] This application embodiment also provides a point cloud clustering device for port operation vehicle movement scenarios, including: a data acquisition unit, used to acquire a three-dimensional point cloud of a port area, wherein the three-dimensional point cloud is a collection of original three-dimensional points of multiple frames of point cloud output by the sensing devices of port operation vehicles in the port area after scanning the surrounding environment of the port operation vehicles; a data preprocessing unit, used to acquire a point cloud corresponding to the movement area in the three-dimensional point cloud of the port area as a target three-dimensional point cloud, wherein the original three-dimensional points in the target three-dimensional point cloud are the target original three-dimensional points, and the movement area is the area used by the port operation vehicle to move in the port area; an occupancy grid construction unit, used to construct an occupancy grid map according to the target three-dimensional point cloud and a preset two-dimensional grid resolution, wherein the occupancy grid map contains grid cells; and to preprocess the target original point cloud into a target three-dimensional point cloud. The initial 3D point is mapped to a grid cell along the height direction of the sensing device coordinate system to obtain the index of the target's original 3D point. The index of the target's original 3D point is written into the grid container corresponding to the grid cell, and the grid cell corresponding to the grid container storing the index of the target's original 3D point is marked as occupied. The connected component processing unit is used to mark multiple adjacent grid cells in the occupied grid map that are in the occupied state as the same connected region. The indices stored in the grid containers corresponding to all grid cells contained in the same connected region are merged to obtain the index set of the target's original 3D point corresponding to the same connected region. Based on the index set of the target's original 3D point corresponding to the same connected region, the point cloud clustering result of the moving region is obtained, which serves as reference data for the movement of port operation vehicles in the moving region.
[0015] This application also provides an electronic device, which includes a processor and a memory; the memory stores a computer program, and the processor executes the above-described method after running the computer program.
[0016] This application also provides a computer storage medium storing a computer program, which, when executed by a processor, performs the above-described method.
[0017] Compared with the prior art, the embodiments of this application have the following advantages: This application provides a point cloud clustering method for port operation vehicle movement scenarios, comprising the following steps: obtaining a 3D point cloud of a port area, wherein the 3D point cloud is a set of original 3D points from multiple frames of point cloud output by the sensing device of the port operation vehicle in the port area after scanning the surrounding environment of the port operation vehicle; obtaining the point cloud corresponding to the movement area in the 3D point cloud as the target 3D point cloud, wherein the original 3D points in the target 3D point cloud are the target original 3D points, and the movement area is the area used by the port operation vehicle to move in the port area; constructing an occupancy grid map based on the target 3D point cloud and a preset 2D grid resolution, wherein the occupancy grid map contains grid cells; and arranging the target original 3D points along the sensing device... The height direction of the coordinate system is mapped to a grid cell to obtain the index of the original 3D point of the target. The index of the original 3D point of the target is written into the grid container corresponding to the grid cell, and the grid cell corresponding to the grid container storing the index of the original 3D point of the target is marked as occupied. Multiple adjacent grid cells in the occupied grid map that are in the occupied state are marked as the same connected region. The indexes stored in the grid containers corresponding to all grid cells contained in the same connected region are merged to obtain the index set of the original 3D point of the target corresponding to the same connected region. Based on the index set of the original 3D point of the target corresponding to the same connected region, the point cloud clustering result of the moving region is obtained, which serves as reference data for the movement of port operation vehicles in the moving region. In the above point cloud clustering method for port operation vehicle movement scenarios, the 3D point cloud obtained by scanning the port operation vehicle is mapped to a 2D occupied grid map, and the connected region marking operation is used to replace the high-complexity operation of point-by-point distance calculation and neighborhood search in 3D space in the existing point cloud clustering algorithm. While ensuring the clustering effect, the amount of computation is reduced and the computational efficiency is improved, which can meet the real-time perception requirements of port operation vehicles. Meanwhile, this application can perform clustering processing on the 3D point cloud within the moving area, eliminating the need to calculate the point cloud corresponding to the non-moving area, thereby reducing the amount of computation and further improving computational efficiency. Attached Figure Description
[0018] Figure 1 This is a flowchart of a point cloud clustering method for port operation vehicle movement scenarios provided in the first embodiment of this application.
[0019] Figure 2 yes Figure 1 Flowchart of the sub-steps in step S102.
[0020] Figure 3-1 This is a schematic diagram of the bounding box of the target 3D point cloud on the horizontal plane in the first embodiment of this application.
[0021] Figure 3-2 yes Figure 3-1The diagram shows the occupied raster map corresponding to the target 3D point cloud after mapping.
[0022] Figure 4 This is a schematic diagram of the same connected region in the first embodiment of this application.
[0023] Figure 5 This is a schematic diagram of a point cloud clustering device for port operation vehicle movement scenarios provided in the second embodiment of this application.
[0024] Figure 6 This is a schematic diagram of an electronic device provided in the third embodiment of this application. Detailed Implementation
[0025] Many specific details are set forth in the following description to provide a full understanding of this application. However, this application can be implemented in many other ways different from those described herein, and those skilled in the art can make similar extensions without departing from the spirit of this application; therefore, this application is not limited to the specific embodiments disclosed below.
[0026] This application provides a point cloud clustering method for port operation vehicle movement scenarios, which can be applied to the autonomous driving perception system of port operation vehicles. In this application, port operation vehicles refer to autonomous driving vehicles engaged in container handling, cargo transportation, and other operations within the port area. The port operation vehicle movement scenario corresponds to the driving process of port operation vehicles within the port area. During the driving process, port operation vehicles need to perceive the distribution of surrounding obstacles in real time, thereby providing a basis for path planning and obstacle avoidance decisions. Related data processing typically includes point cloud acquisition, point cloud clustering, object detection, and object tracking. Among them, point cloud clustering aims to group points belonging to the same object in the 3D point cloud obtained by scanning the port operation vehicle into one category, so that the scattered point cloud forms physically meaningful point clusters, which is the key environment connecting the underlying point cloud data with subsequent object recognition. The accuracy and real-time performance of the clustering results directly affect the recall rate of subsequent object detection, the stability of object tracking, and the safety of the final path planning. If the clustering process results in erroneous merging, two originally independent objects will be incorrectly grouped into one point cluster, leading to missed detections in subsequent object detection. If the clustering process results in erroneous splitting, the point cloud of the same object will be incorrectly split into multiple point clusters, causing false targets to be detected in subsequent object detection, which in turn triggers frequent tracker initialization and causes jitter in the perception results.
[0027] Existing point cloud clustering methods (such as Euclidean clustering, DBSCAN (density-based spatial clustering with noise), and voxel graph clustering) directly construct neighborhood search structures and perform connectivity analysis in 3D space. While these methods can preserve complete geometric information, they have significant shortcomings in port operation vehicle movement scenarios: the ground in port areas is relatively flat, and objects in port areas are mainly trucks, containers, and tractors. The distinction between objects is more significant in the horizontal direction than in the vertical direction, while existing point cloud clustering methods have little effect on distinguishing different objects in the vertical direction; the number of point clouds generated by a single scan of port operation vehicles is huge, and the computational load of 3D neighborhood search increases significantly with the number of points, with single-frame processing time sometimes reaching hundreds of milliseconds, which is difficult to meet the real-time perception requirements of autonomous driving systems; in addition, crane boom reflections, rain and fog noise, etc., can easily cause different objects to be incorrectly connected together, resulting in two originally independent objects being merged into one point cluster, or the points of the same object being incorrectly split into multiple point clusters, which can easily affect the accuracy of clustering results.
[0028] Based on this, this application provides a point cloud clustering method for port operation vehicle movement scenarios. This method effectively reduces computational complexity and computational load while ensuring clustering effect, and improves computational efficiency, thereby meeting the real-time perception requirements of port operation vehicles.
[0029] The present application will be described in detail below with reference to several embodiments and accompanying drawings.
[0030] First Embodiment The first embodiment of this application provides a point cloud clustering method for port operation vehicle movement scenarios, such as... Figure 1 As shown, the method includes the following steps: Step S101: Obtain a three-dimensional point cloud of the port area. The three-dimensional point cloud is a collection of original three-dimensional points of multiple frames of point cloud output by the sensing devices of the port operation vehicles in the port area after scanning the surrounding environment of the port operation vehicles.
[0031] In this application, the port area refers to the physical space where port operation vehicles operate, and its specific boundaries are pre-defined by the corresponding map data. The corresponding map data refers to data stored electronically containing geographic information about the port area, recording the location and shape information of geographic elements such as roads, storage yards, and buildings. This map data has a precision down to the centimeter level and is pre-made and stored in the port operation vehicles during the offline phase for online querying. The specific scope of the port area can be set according to actual application needs, and may include, for example, storage yard areas, operation channels, quay crane loading and unloading areas, gates and verification areas, maintenance and charging areas, etc. The sensing equipment of the port operation vehicles refers to sensors or sensor groups mounted on the vehicles for collecting information about the surrounding environment, including but not limited to lidar, vision cameras, and millimeter-wave radar, used to acquire three-dimensional point cloud data of the surrounding environment. LiDAR will be used as an example below.
[0032] LiDAR (Light Detection and Ranging) is a commonly used environmental perception sensor for port operation vehicles. When operating, LiDAR continuously emits laser beams and receives echoes at a set scanning frequency (e.g., 10 or 20 times per second). The set of all echo points output after each complete scan (i.e., a single scan) constitutes a point cloud frame. As the LiDAR continues to operate, these point clouds are arranged in chronological order of acquisition, forming a continuous multi-frame point cloud sequence. The original 3D points of each frame in this continuous multi-frame point cloud sequence collectively constitute the 3D point cloud described in this application. In other words, the 3D point cloud is the total set of all original 3D points output by the sensing device during continuous scanning, serving as the data foundation for subsequent clustering processing. Each original 3D point (echo point) in each frame of the point cloud includes at least the 3D coordinate data (x, y, z) of that original 3D point in the sensing device's coordinate system, and may also include other attribute data such as reflection intensity, timestamp, and frame number. Reflection intensity reflects the strength of the echo energy after the laser beam is reflected by the target object. Different objects (such as lane lines, metal, and vegetation) have different reflection intensities, so reflection intensity can be used to help distinguish the type of target object. The timestamp records the acquisition time of the original 3D point and is a key basis for synchronizing 3D point cloud data output by different sensing devices in the time dimension. The frame number is an incrementing sequence number used to identify the acquisition order of the point cloud frame to which the original 3D point belongs in a multi-frame point cloud sequence; that is, the point cloud frame number.
[0033] In practical applications, the sensing devices (such as lidar) of port operation vehicles can output data packets via Ethernet interfaces. The port operation vehicles can then parse these data packets using network protocols or software development kits provided by the manufacturer to obtain the aforementioned 3D point cloud. The port operation vehicles can temporarily store the 3D point cloud in memory to meet real-time processing needs. This application does not limit the specific method or source of acquiring the 3D point cloud.
[0034] Step S102: Based on the three-dimensional point cloud of the port area, obtain the point cloud corresponding to the moving area in the three-dimensional point cloud as the target three-dimensional point cloud. The original three-dimensional points in the target three-dimensional point cloud are the target original three-dimensional points, and the moving area is the area used by the port operation vehicle to move in the port area.
[0035] In this application, the mobile area refers to the physical space within the port area directly related to the current task of port operation vehicles, i.e., the area actually used by port operation vehicles for their current operation. The mobile area includes, but is not limited to, container yard operation channels, quay crane loading and unloading areas, dedicated lanes for automated guided vehicles or container trucks, handover areas and waiting berths, gates and verification areas, and maintenance and charging areas. The non-mobile area refers to areas within the port area other than the mobile area, such as office areas, green belts, areas outside fences, seawalls, and non-driving road sections.
[0036] It should be noted that, because the sensing equipment of port operation vehicles typically covers both moving and non-moving areas when scanning the surrounding environment, the 3D point cloud output by the sensing equipment usually contains point clouds corresponding to both moving and non-moving areas. This application, after obtaining the 3D point cloud of the port area, extracts the point cloud corresponding to the moving areas as the target 3D point cloud and performs subsequent clustering processing on this target 3D point cloud. The point cloud corresponding to the non-moving areas is not included in the clustering operation. This method reduces the size of the point cloud participating in clustering and lowers the computational cost of the clustering process.
[0037] In specific implementation, obtaining the point cloud corresponding to the moving region in the three-dimensional point cloud of the port area as the target three-dimensional point cloud includes: cropping the point cloud corresponding to the non-moving region in the three-dimensional point cloud to obtain the point cloud corresponding to the moving region in the three-dimensional point cloud as the target three-dimensional point cloud; wherein, the non-moving region is the region in the port area other than the moving region.
[0038] Furthermore, such as Figure 2 As shown, the step of cropping the point cloud corresponding to the non-moving region in the 3D point cloud to obtain the point cloud corresponding to the moving region in the 3D point cloud as the target 3D point cloud includes: Step S201: Using a preset coordinate transformation matrix, transform the three-dimensional coordinate data of the original three-dimensional points in the three-dimensional point cloud from the sensing device coordinate system to the world coordinate system to obtain the world coordinate system data of the original three-dimensional points.
[0039] In this application, the map data corresponding to the port area describes the location information of its geographic features in a world coordinate system. To achieve spatial matching between the 3D point cloud and this map data, this application introduces a coordinate transformation matrix. The coordinate transformation matrix is used to describe the spatial positional relationship between two different coordinate systems. Through the operation of this coordinate transformation matrix, the 3D coordinate data of the original 3D points in the sensor device coordinate system can be converted into 3D coordinate data in the world coordinate system. The sensor device coordinate system refers to a 3D spatial coordinate system established with the sensor device itself as the origin, used to describe the position of the original 3D points in the sensor device's measurement space. The sensor device coordinate system includes three coordinate axes: horizontal (lateral), vertical (vertical), and height. The horizontal (lateral) and vertical (vertical) axes are located on the horizontal plane where the origin of the sensor device coordinate system is located, and they are perpendicular to each other, corresponding to the X-axis and Y-axis directions of the sensor device coordinate system, respectively. The height direction is perpendicular to the horizontal plane of the sensor device coordinate system, i.e., the vertical direction, corresponding to the Z-axis direction of the sensor device coordinate system. The world coordinate system refers to the unified reference coordinate system used to describe the position of any object in the port area within the entire port physical space. Its specific form can be a geodetic coordinate system or a port-defined global coordinate system.
[0040] In practical implementation, for any original 3D point in the 3D point cloud, let its 3D coordinate data be (x, y, z). First, this 3D coordinate data is converted into a four-dimensional homogeneous coordinate vector (x, y, z, 1), that is, adding a constant term with a value of 1 to the original three coordinate values. Then, this four-dimensional homogeneous coordinate vector is multiplied by the coordinate transformation matrix (i.e., the coordinate transformation matrix is multiplied on the left by the four-dimensional homogeneous coordinate vector). The result is a four-dimensional vector. Taking the first three components of this four-dimensional vector, the 3D coordinate data of the original 3D point in the world coordinate system can be obtained. Through the above transformation, the position of each original 3D point is transformed from the measurement space of the sensing device itself to the world coordinate system. The coordinate transformation matrix can be predetermined by the extrinsic parameter calibration of the sensing device and the vehicle pose information provided by the port operation vehicle positioning system, and is used as a known quantity in the actual processing.
[0041] Step S202: Based on the world coordinate system data of the original three-dimensional points, map the original three-dimensional points in the three-dimensional point cloud to the corresponding positions in the target area occupancy bitmap to obtain the position data of the corresponding positions; wherein, the target area occupancy bitmap is generated by rasterizing the map data corresponding to the port area according to a preset map grid resolution.
[0042] In this application, the target area occupancy bitmap is a two-dimensional raster map used to describe the spatial distribution of mobile and non-mobile areas within a port area. This target area occupancy bitmap is pre-generated in the offline phase and does not consume real-time computing resources during the online phase. The offline phase refers to the phase where data preparation and parameter configuration are completed before the actual online point cloud clustering processing is executed; this is typically performed during the system deployment of port operation vehicles or when map data is updated. Correspondingly, the online phase refers to the phase where port operation vehicles acquire 3D point clouds in real-time and perform clustering processing during actual operation. At this time, the intermediate data generated in the offline phase (such as the target area occupancy bitmap) is directly used to meet real-time requirements.
[0043] The specific process for generating the target area occupancy bitmap includes: First, marking the boundaries between the moving and non-moving areas in the map data corresponding to the port area. These markings are recorded in the map data as vector polygons, forming a vector map labeled with area attributes. Then, the map data with labeled area attributes is rasterized according to a preset map grid resolution. The map grid resolution refers to the actual physical size corresponding to each grid cell; for example, each grid cell can be set to 0.1 meters by 0.1 meters. After rasterization, each polygonal area in the map data is converted into a corresponding set of grid cells, and each grid cell corresponds to a physical area on the map data. Based on the marked boundaries of the moving areas in the map data, the grid cells covered by the moving areas are set as the first data, and the grid cells covered by the non-moving areas are set as the second data. The resulting two-dimensional array after the above marking is the target area occupancy bitmap. Each element in this two-dimensional array corresponds to a grid cell, and the value stored in this element is the location data, used to characterize the area type (moving area or non-moving area) to which the grid cell belongs.
[0044] After the target area occupancy bitmap is generated, it is stored as a binary file and distributed to port operation vehicles along with the map data. During the online phase, port operation vehicles can directly read the pre-stored target area occupancy bitmap and quickly determine whether any original 3D point belongs to a moving or non-moving area by looking up a table, without having to repeatedly perform map rasterization or area boundary calculations during real-time processing.
[0045] In one optional embodiment, the range of the moving area can be dynamically determined based on the current task of the port vehicle. The tasks of the port vehicle mainly include container retrieval, container placement, and passage, and different tasks have different requirements for the sensing range. When the current task of the port vehicle is container retrieval or placement, the moving area is set to a small area centered on the target container location (e.g., a radius of 30 meters), allowing computing resources to focus on the area surrounding the target container location. When the current task of the port vehicle is passage, the moving area is set to a larger area covering a preset distance ahead of the travel path and the lane width, to meet the long-distance sensing requirements during long-distance travel.
[0046] The method of dynamically determining the moving area based on the work task described above can be considered a specific implementation of the aforementioned "marking the boundaries between moving and non-moving areas in map data". Specifically, when port vehicles are performing container lifting or unloading tasks, a smaller area around the target container location is marked as the moving area in the map data; when port vehicles are performing passage tasks, a larger area ahead of the travel path is marked as the moving area in the map data. Through this method, the range of the moving area marked in the map data dynamically changes with the work task of the port vehicles, thus causing the target area occupancy bitmap generated based on the map data in subsequent steps to change accordingly, ultimately matching the point cloud range participating in clustering processing with the actual operational requirements.
[0047] Step S203: For any original 3D point in the 3D point cloud, if the position data corresponding to the original 3D point is a preset first data, then the original 3D point is determined to be the target original 3D point; if the position data corresponding to the original 3D point is a preset second data, then the original 3D point is determined not to be the target original 3D point, and the original 3D point is deleted from the 3D point cloud; wherein, the first data is the value corresponding to the position of the map data corresponding to the moving area in the target area bitmap, and the second data is the value corresponding to the position of the map data corresponding to the non-moving area in the target area bitmap.
[0048] Step S204: After deleting all original three-dimensional points that are not the target original three-dimensional points from the three-dimensional point cloud, obtain the point cloud corresponding to the moving region in the three-dimensional point cloud as the target three-dimensional point cloud.
[0049] During the online phase, the execution of steps S201 and S204 specifically includes the following processing procedures: For any original 3D point in the 3D point cloud, firstly, the 3D coordinate data of the original 3D point is transformed from the sensor coordinate system to the world coordinate system using a coordinate transformation matrix to obtain the 3D coordinate data of the original 3D point in the world coordinate system. Then, based on the horizontal and vertical coordinates of the original 3D point in the world coordinate system, the position of the grid cell in the target area occupies the bitmap where the original 3D point falls is calculated, that is, determining which grid cell in the target area occupies the bitmap corresponding to the original 3D point. Finally, the position data stored in the grid cell is read. If the position data corresponding to the original 3D point is the preset first data, then the original 3D point is determined to belong to the moving area, is identified as the target original 3D point, and is retained. If the position data corresponding to the original 3D point is the preset second data, then the original 3D point is determined to belong to the non-moving area, and is deleted from the 3D point cloud.
[0050] By repeatedly performing the coordinate transformation, raster cell localization, location data reading, and judgment processing steps on each original 3D point in the 3D point cloud, all the original 3D points that are ultimately retained belong to the moving area, and these retained original 3D points constitute the target 3D point cloud. In the above process, each raster cell localization and location data reading is a constant-time operation, and the execution time of this operation is independent of the complexity of the map data and the number of point clouds, thus ensuring the processing efficiency in the online phase.
[0051] For example, suppose a port vehicle is driving on a port terminal, and its lidar is scanning the surrounding environment in real time. The map data corresponding to the port area has been pre-processed into a target area occupancy bitmap, in which areas such as the quay wall and fixed mooring bollards are marked with a value of 100, while areas such as driveways and open storage yards are marked with a value of 0. When the lidar acquires a frame of 3D point cloud containing original 3D point 1 (hit on the fixed quay wall on the left) and original 3D point 2 (hit on another port vehicle driving ahead), it first transforms the 3D coordinate data of original 3D point 1 and original 3D point 2 from the lidar coordinate system to the world coordinate system using a preset coordinate transformation matrix. Then, based on the horizontal x-coordinate and horizontal y-coordinate of original 3D point 1 and original 3D point 2 in the world coordinate system, the grid cell positions in the target area occupancy bitmap that they fall into are calculated, and the position data of the corresponding positions is read. The position data corresponding to original 3D point 1 is the second data, and it is determined to belong to the non-moving region, so it is deleted from the 3D point cloud. The position data corresponding to original 3D point 2 is the first data, and it is determined to belong to the moving region, so it is identified as the target original 3D point and retained. By performing the above processing on each original 3D point in this frame of 3D point cloud, the original 3D points that are ultimately retained all belong to the moving region, forming the target 3D point cloud, while the original 3D points corresponding to the non-moving regions are all deleted.
[0052] It should be noted that the target 3D point cloud refers to the set of original 3D points belonging to the moving region, which are retained after deleting the original 3D points belonging to the non-moving region from the original 3D point cloud. For ease of explanation, the retained original 3D points belonging to the moving region are referred to as target original 3D points. Target original 3D points retain all attribute data of their corresponding original 3D points.
[0053] As an optional embodiment, before cropping the point cloud corresponding to the non-moving region in the 3D point cloud, the point cloud corresponding to the moving region in the 3D point cloud is obtained based on the 3D point cloud of the port area, and used as the target 3D point cloud. The method further includes: cropping the 3D point cloud of the port area along the vertical direction of the sensor coordinate system according to a preset vertical cropping window, and retaining the original 3D points in the 3D point cloud located within the vertical cropping window.
[0054] Specifically, the ground in port areas is relatively flat, with elevation differences typically less than 0.3 meters, and the ground reference height for most docks has been pre-defined and fixed. Based on these characteristics, a vertical clipping window can be set according to the ground reference height provided by the map data. The lower limit of the vertical clipping window is the ground reference height plus a first preset offset, and the upper limit is the ground reference height plus a second preset offset. In a specific example, the first preset offset is 0.2 meters, and the second preset offset is 5 meters. This means that original 3D points with vertical coordinate data located within the range of ground reference height plus 0.2 meters to ground reference height plus 5 meters are retained, while original 3D points with vertical coordinate data below the lower limit of this range (such as ground points) and above the upper limit of this range (such as overhead crane reflection points, elevated facilities, etc.) are discarded.
[0055] The vertical clipping step described above is performed locally before the 3D point cloud enters the subsequent processing flow. This step directly removes original 3D points whose vertical coordinate data lies outside the vertical clipping window, thus reducing the number of point clouds involved in subsequent processing. Furthermore, since the lower and upper limits of the vertical clipping window are determined based on the ground reference height and a preset offset, respectively, there is no need to perform ground plane fitting operations on each frame of the point cloud, avoiding the computational time required by traditional ground fitting methods.
[0056] Step S103: Construct an occupied grid map based on the target 3D point cloud and a preset 2D grid resolution. The occupied grid map contains grid cells. Map the original 3D points of the target to the grid cells along the height direction of the sensing device coordinate system to obtain the index of the original 3D points of the target. Write the index of the original 3D points of the target into the grid container corresponding to the grid cell, and mark the grid cell corresponding to the grid container storing the index of the original 3D points of the target as occupied.
[0057] In specific implementation, the step of constructing an occupancy grid map based on the target 3D point cloud and a preset 2D grid resolution includes: determining, based on the target 3D point cloud, the minimum and maximum horizontal coordinate values of the target 3D point cloud in the horizontal direction of the sensing device coordinate system, and the minimum and maximum vertical coordinate values of the target 3D point cloud in the vertical direction of the sensing device coordinate system; determining, based on the minimum, maximum, minimum, and maximum horizontal coordinate values, a bounding box on the horizontal plane where the origin of the target 3D point cloud is located in the sensing device coordinate system, wherein the length of the bounding box is determined based on the maximum and minimum horizontal coordinate values, and the width of the bounding box is determined based on the maximum and minimum vertical coordinate values; dividing the bounding box into multiple grid units based on the preset 2D grid resolution, the length of the bounding box, and the width of the bounding box, and adding a preset number of grid units along the length and width directions of the bounding box respectively; and obtaining the occupancy grid map based on the multiple grid units and the preset number of grid units. The grid map is a two-dimensional grid map containing multiple grid cells. Each grid cell stores the index data of the original three-dimensional points falling within the corresponding spatial cylinder. The spatial cylinder refers to a columnar spatial region extending along the height direction of the sensing device's coordinate system with the grid cell as its base. The shape and size of the base of this columnar spatial region are consistent with the grid cell, and its height range is limited by a preset vertical height range. Original three-dimensional points at different heights falling within the same spatial cylinder correspond to the same grid cell, which stores the index data of these original three-dimensional points.
[0058] It should be noted that the minimum horizontal coordinate value of the target 3D point cloud in the horizontal direction of the sensing device coordinate system is... and the maximum horizontal coordinate value This refers to the coordinates of all original 3D points of the target in the target 3D point cloud on the X-axis of the sensing device's coordinate system. minimum value and maximum value The minimum vertical coordinate value of the target 3D point cloud in the horizontal direction within the sensor device's coordinate system. and the maximum vertical coordinate value This refers to the coordinates of all original 3D points of the target in the target 3D point cloud on the Y-axis of the sensing device's coordinate system. minimum value and maximum value The calculation formula is as follows: ; ; ; .
[0059] The bounding box refers to the smallest rectangular region that can contain the projections of all original 3D points of the target in the target 3D point cloud onto the horizontal plane of the sensing device's coordinate system. The length of the bounding box is its length along the horizontal direction on the horizontal plane, equal to the difference between the maximum and minimum horizontal coordinate values. The width of the bounding box refers to its width along the horizontal longitudinal direction in the horizontal plane, which is equal to the difference between the maximum and minimum longitudinal coordinate values. The bounding box represents the physical space range that reflects the coverage of the real physical space corresponding to the target 3D point cloud on the horizontal plane of the sensor device coordinate system. In this application, the horizontal plane of the sensor device coordinate system refers to the plane spanned by the horizontal transverse direction (X-axis direction) and the horizontal longitudinal direction (Y-axis direction) of the sensor device coordinate system. This plane passes through the origin of the sensor device coordinate system and is perpendicular to the height direction (Z-axis direction). In the technical solution of this application, since the translation operation in the subsequent steps translates the horizontal coordinates of all the original 3D points of the target 3D point cloud to a non-negative interval, the determination of the bounding box is independent of the specific position of the origin of the sensor device coordinate system on the horizontal plane. Therefore, the "horizontal plane where the origin of the sensor device coordinate system is located" is only used to define the spatial orientation of the horizontal plane, and the bounding box is located on this horizontal plane.
[0060] The preset 2D grid resolution *r* refers to the actual physical space size corresponding to each grid cell when constructing the bounding grid map. The number of grid cells divided along the length of the bounding box is equal to the length of the bounding box divided by the 2D grid resolution and rounded up, denoted as W. The number of grid cells divided along the width of the bounding box is equal to the width of the bounding box divided by the 2D grid resolution and rounded up, denoted as H. The calculation formula is as follows: ; .
[0061] Furthermore, this application adds a preset number of redundant grid cells in both the length and width directions of the bounding box. The number of redundant grid cells can be determined according to the actual application scenario; for example, the number of redundant grid cells can be set to 20. The redundant grid cells are used to ensure that the original 3D points located near the boundary of the bounding box can fall into the effective grid cells, avoiding information loss due to boundary truncation, and also reserving buffer space for subsequent operations such as neighborhood search or sliding window filtering.
[0062] like Figure 3-1 As shown, this is a schematic diagram of the bounding box of the target 3D point cloud on the horizontal plane of the sensing device's coordinate system. Figure 3-1In this diagram, the horizontal plane consists of the X-axis and Y-axis, with coordinates measured in meters (m). A solid-line box represents the bounding box, located on this horizontal plane, with its length and width measured in meters (m). The target 3D point cloud comprises point cloud clusters A, B, and C, each containing several original 3D points. The solid-line box represents the bounding box of the target 3D point cloud on the horizontal plane. This bounding box is the smallest rectangular region capable of containing the projections of all original 3D points in the target 3D point cloud onto the horizontal plane. Its length and width are determined by the differences between the maximum and minimum coordinates of all original 3D points in the horizontal and vertical directions, respectively. After determining the bounding box, it is divided into multiple grid cells according to a preset 2D grid resolution. Each original 3D point in the target 3D point cloud is mapped to a grid cell along the height direction, thus obtaining the result shown below. Figure 3-2 The occupied raster map is shown. Figure 3-2 In this system, the coordinates on the X and Y axes are both measured in meters (m). Each square represents a grid cell. Shaded squares indicate occupied grid cells, meaning that at least one original 3D point of the target falls into the spatial cylinder corresponding to that grid cell. Blank squares indicate vacant grid cells.
[0063] In specific implementation, an occupation grid map is obtained based on multiple grid units and a preset number of grid units. This includes determining the number of rows and columns of the effective area occupied by the target 3D point cloud in the occupation grid map, based on the multiple grid units and the preset number of grid units. The number of rows is the sum of the number of grid units divided by the bounding box along the horizontal vertical direction and a preset number increasing along the horizontal vertical direction. The number of columns is the sum of the number of grid units divided by the bounding box along the horizontal horizontal direction and a preset number increasing along the horizontal horizontal direction. In one implementation, the number of rows and columns of the effective area can be directly used as the size of the occupation grid map, meaning the size of the occupation grid map is consistent with the effective area of the target 3D point cloud in the current frame.
[0064] In another implementation, the occupancy grid is a pre-defined fixed-size two-dimensional grid array. The number of horizontal and vertical grid cells is predetermined by a pre-defined coverage area and a pre-defined two-dimensional grid resolution. In other words, the size of the occupancy grid is fixed, and each frame of 3D point cloud processing only fills it with the index data of the original target 3D points, rather than reconstructing a grid array of different sizes. Constructing the occupancy grid refers to establishing and initializing a fixed-size two-dimensional grid array data structure, enabling it to store point cloud indexes and mark occupancy states. This approach avoids the memory allocation overhead and computational uncertainty caused by dynamically adjusting the grid size according to the 3D point cloud distribution each frame. In this implementation, the number of rows and columns in the effective range of the current frame is less than or equal to the size of the occupancy grid; original 3D points exceeding the pre-defined coverage area are discarded and do not participate in subsequent processing.
[0065] In one specific implementation, the preset coverage area can be configured according to the actual needs of the port operation vehicle movement scenario. A typical container terminal operation area is elongated, with port operation vehicles traveling a considerable distance from the quay crane to the yard (usually 80 meters forward and backward), and the width of the transverse yard aisles is limited (usually 15 to 25 meters to the left and right). Based on these scenario characteristics, the preset coverage area can be set as an asymmetrical rectangle (i.e., the horizontal and longitudinal coverage areas are not equal). Specifically, a larger sensing range is set along the port operation vehicle's travel direction, and a smaller sensing range is set along the port operation vehicle's transverse direction (the horizontal direction perpendicular to the travel direction). This asymmetrical configuration ensures that the shape of the occupied grid map matches the elongated geometric features of the actual operation area. While meeting the long-distance sensing requirements of the port operation vehicle's travel direction, it avoids increasing the number of grid cells in horizontally irrelevant areas (such as the outer edge of the yard, the sea side, etc.), thereby reducing the computational load and memory consumption of the connected region marking stage. For example, the forward and backward range along the direction of travel of port operation vehicles can be set to ±80 meters, and the left and right range along the lateral direction of port operation vehicles can be set to ±25 meters. Taking an asymmetrical range of ±80 meters in the direction of travel and ±25 meters in the lateral direction as an example, its horizontal lateral length is 160 meters, its horizontal longitudinal length is 50 meters, and its coverage area is 8000 square meters. Taking a square range of ±80 meters × ±80 meters as an example, its horizontal lateral and horizontal longitudinal lengths are both 160 meters, and its coverage area is 25600 square meters. With a grid resolution of 0.2 meters for both, the total number of grid cells in the asymmetrical range is 160 × 50 = 200,000, while the total number of grid cells in the square range is 800 × 800 = 640,000. The asymmetrical range has approximately 68% fewer grid cells than the square range.
[0066] This application does not limit either of the above two implementation methods. In practical applications, one of the implementation methods can be selected according to specific needs (such as computing resources, frequency of scene changes, real-time requirements, etc.).
[0067] It should be noted that port operation vehicles can be equipped with multiple LiDARs, such as forward-looking LiDARs and side-looking LiDARs, to achieve all-round perception of the vehicle's surrounding environment. In one optional embodiment, for the 3D point clouds collected by multiple LiDARs, the 3D point clouds of each LiDAR can be transformed to a unified world coordinate system through their respective preset coordinate transformation matrices. Then, the transformed 3D point clouds of each LiDAR are projected onto the occupancy grid map to obtain the occupancy bitmap corresponding to each LiDAR. Finally, the occupancy bitmaps corresponding to all LiDARs are ORed bit by bit to obtain the final occupancy grid map.
[0068] In the above fusion method, the point cloud data of each LiDAR are directly superimposed in the form of a bitmap after being aligned to the same world coordinate system. This eliminates the need for separate 3D spatial clustering of the 3D point cloud for each LiDAR before fusion. Since bitwise OR operations are performed on bits at the same position in parallel, their computational cost is related to the total number of grid cells, and the fusion cost is approximately O(W×H) (W and H being the width and height of the occupied grid cell, respectively). This avoids the additional computational overhead caused by matching and merging clustering results when fusing multiple LiDAR data.
[0069] In specific implementation, the original 3D point of the target is mapped to the grid cell along the height direction of the sensor coordinate system to obtain the index of the original 3D point of the target. This includes: translating the original 3D point of the target in the sensor coordinate system according to the translation vector, so that the coordinate values of the original 3D point of the target in the horizontal direction of the sensor coordinate system are all non-negative, and obtaining the horizontal coordinate value of the original 3D point of the target after translation in the horizontal direction. Vertical coordinates after translation The translation vector is determined by the opposite of the minimum horizontal coordinate value in the horizontal direction and the opposite of the minimum vertical coordinate value in the vertical direction of the sensor coordinate system. Based on the translated horizontal coordinate value, the translated vertical coordinate value and the two-dimensional grid resolution, the index of the original three-dimensional point of the target in the occupied grid is obtained, which serves as the index of the original three-dimensional point of the target.
[0070] in, and The calculation formula is: , .
[0071] Mapping the original 3D point of the target to a grid cell along the height direction of the sensing device's coordinate system means ignoring the coordinate differences of the original 3D point of the target in the height direction, and mapping it to a unique grid cell in the grid map based on the horizontal and vertical coordinate values of the original 3D point of the target. In other words, regardless of the height of the original 3D point of the target, as long as its horizontal and vertical coordinates fall within the horizontal range corresponding to a certain grid cell, the point is mapped to that grid cell.
[0072] In practice, the index of the original 3D point of the target includes a horizontal index and a horizontal index. The horizontal index is used to identify the column number of the raster cell mapped by the original 3D point of the target in the occupied raster map, and the horizontal index is used to identify the row number of the raster cell mapped by the original 3D point of the target in the occupied raster map. The horizontal index is determined based on the horizontal coordinate value after translation and the resolution of the 2D grid. The horizontal index is determined based on the vertical coordinate value after translation and the resolution of the 2D grid.
[0073] Specifically, horizontal index Equals the horizontal coordinate value after translation, divided by the 2D grid resolution, and rounded down, with horizontal and vertical indices. It equals the vertical coordinate value after translation divided by the 2D grid resolution and then rounded down. The calculation formula is: , .
[0074] Since the coordinate values after translation are all non-negative, the calculation results of the above indices are always non-negative integers, which can be directly used as subscripts of two-dimensional arrays without the need for additional boundary checks and negative number handling branches, thereby reducing computational complexity and improving processing efficiency.
[0075] After obtaining the indexes of the original 3D points of the target, the indexes are written into the raster container corresponding to the raster cell, and the raster cell corresponding to the raster container storing the indexes of the original 3D points of the target is marked as occupied. The raster container is a storage structure associated with each raster cell, used to record the index data of all original 3D points of the target falling within the spatial cylinder corresponding to that raster cell. Each raster cell has a unique corresponding raster container, which can be implemented using data structures such as linked lists, dynamic arrays, or fixed-capacity arrays.
[0076] Writing the index of the target's original 3D point to the raster container corresponding to the raster cell means storing the index of the current target's original 3D point point in the original 3D point cloud (i.e., the position number represented by i in the above formula) into the raster container corresponding to that raster cell. In, that is Through the above write operation, the grid container records the indices of all original 3D points of the target that fall into the spatial cylinder corresponding to the grid cell.
[0077] Marking a raster cell corresponding to a raster container storing the index of the target's original 3D points as occupied means that after the index of the target's original 3D points is written into the raster container, the attribute of the raster cell corresponding to that raster container is marked as "occupied," indicating that at least one target's original 3D point exists at the horizontal position corresponding to that raster cell. This occupied status mark is used in the subsequent connected component marking step as a criterion for determining whether a raster cell participates in the connected component search. If no index of any target's original 3D points is written into a raster container, the raster cell remains in an idle state and does not participate in the subsequent connected component marking.
[0078] Step S104: Mark multiple adjacent and occupied raster cells in the occupied raster graph as the same connected region.
[0079] In specific implementation, multiple adjacent and occupied grid cells in the occupied grid map are marked as the same connected region. This includes: starting from the current grid cell, traversing the grid cells adjacent to the current grid cell, and marking the grid cells in the occupied state among the grid cells adjacent to the current grid cell as belonging to the same connected region as the current grid cell. The grid cells adjacent to the current grid cell are grid cells whose horizontal horizontal index is the same as the horizontal horizontal index of the current grid cell and whose horizontal vertical index is adjacent to the horizontal vertical index of the current grid cell in the occupied grid map, or grid cells whose horizontal vertical index is the same as the horizontal vertical index of the current grid cell and whose horizontal horizontal index is adjacent to the horizontal horizontal index of the current grid cell.
[0080] In this application, marking multiple adjacent and occupied raster cells in an occupied raster graph as the same connected region means that by traversing the adjacency relationships between raster cells, raster cells that are horizontally adjacent and all in an occupied state are grouped into the same connected region. A connected region is a connected set consisting of a group of occupied raster cells that satisfy the adjacency relationship. Any two raster cells within the same connected region can be connected by a path consisting of adjacent occupied raster cells.
[0081] The marking process described above is as follows: Starting from the current grid cell, traverse the grid cells adjacent to the current grid cell. The grid cells adjacent to the current grid cell fall into two categories: First, grid cells that are identical to the current grid cell in the horizontal direction and whose horizontal vertical direction is adjacent to the current grid cell's horizontal vertical direction (i.e., differing by 1). Second, grid cells that are identical to the current grid cell in the horizontal direction and whose horizontal horizontal direction is adjacent to the current grid cell's horizontal horizontal direction (i.e., differing by 1). This adjacency relationship corresponds to the four-neighbor connectivity rule, meaning that two grid cells are adjacent in any of the four directions (up, down, left, and right). When a traversed adjacent grid cell is occupied, it is marked as belonging to the same connected region as the current grid cell. The calculation formula is as follows: In this way, multiple occupied grid cells with direct or indirect adjacency are marked as the same connected region, and each connected region corresponds to the projection area of a point cloud cluster on the horizontal plane. Figure 4 This is a schematic diagram of the same connected region. For example... Figure 4As shown in the figure, two connected regions 401 and 402 are illustrated. Each of connected regions 401 and 402 is composed of multiple horizontally adjacent and occupied grid cells. Connected regions 401 and 402 are not horizontally adjacent to each other; that is, any grid cell in connected region 401 is not adjacent to any grid cell in connected region 402 in either the horizontal or vertical direction, thus they belong to different connected regions. All grid cells within each connected region form a connected whole on the horizontal plane, representing the projection area of a point cloud cluster on the horizontal plane.
[0082] It should be noted that an iterative breadth-first search queue can be used to implement connected component marking in this application. The upper limit of the queue length is the total number of occupied grid cells in the occupied grid map. Since the queue length has a clear upper bound, memory can be pre-allocated during the initialization phase to avoid the uncertainty and additional overhead caused by dynamic memory allocation.
[0083] In one alternative embodiment, when marking multiple adjacent and occupied raster cells in an occupied raster graph as the same connected region, a run-based connected region marking method can be used. Specifically, the occupied raster graph is scanned row by row, and consecutive occupied raster cells in each row are aggregated into a run. Each run records its row index, start column index, and end column index. Then, all runs are traversed, and by comparing the overlap or adjacency of the current row run with adjacent row runs in the column direction, all runs belonging to the same connected region are merged and assigned the same connected region label.
[0084] In port operations, target objects (such as containers and container trucks) often project onto a horizontal plane as regular rectangular shapes, typically forming continuous horizontal or vertical stripes in the occupied grid map. The travel-based connected component labeling method utilizes these distribution characteristics to transform grid-by-grid processing into travel-by-travel processing. The number of travels is usually less than the number of occupied grids, reducing the number of units that need to be processed.
[0085] In one optional embodiment, connected component labeling can employ an inter-frame incremental update strategy. For example, port vehicles typically operate at speeds below 30 km / h under normal operating conditions. At a frame rate of 10 Hz, the displacement of the same object between adjacent frames is less than 0.83 meters. When this displacement is less than the object's projected size in the occupied grid map, the occupancy state of some grid cells between adjacent frames remains unchanged. Based on these characteristics, the connected component labeling results of the previous frame's point cloud can be obtained. The connected component labeling results of the previous frame are then translated according to the displacement of each connected component in the previous frame, aligning the translated connected component labeling results with the current frame's 3D point cloud in spatial position. Then, the current frame's occupied grid map is compared with the translated connected component labeling results to identify changed grid cell regions. The connected component labeling algorithm is re-executed for these regions; for grid cells in unchanged regions, the connected component labels from the previous frame are directly reused. This incremental update method reduces the computational load of connected component labeling.
[0086] In one optional embodiment, connected region marking can employ a hot zone priority processing strategy. The target container location for port operations vehicles can be obtained from the terminal operations management system by the vehicle's industrial control computer. A preset range (e.g., 10 meters around the target container location) of grid cells can be marked as hot zone grids. When performing connected region marking, occupied grid cells within the hot zone grid are traversed first, and the index set of the original 3D points of the target corresponding to the connected regions formed within the hot zone grid is output first. After the hot zone processing is completed, the grid cells outside the hot zone are traversed to complete the global connected region marking.
[0087] Step S105: Merge the indices stored in the raster containers corresponding to all raster cells contained in the same connected region to obtain the index set of the original 3D points of the target corresponding to the same connected region; based on the index set of the original 3D points of the target corresponding to the same connected region, obtain the point cloud clustering result of the moving region, which serves as reference data for the movement of port operation vehicles in the moving region.
[0088] In specific implementation, the indices stored in the raster containers corresponding to all raster units contained in the same connected region are merged to obtain the index set of the target original 3D points corresponding to the same connected region. This includes: obtaining the raster containers corresponding to all raster units contained in the same connected region as connected region raster containers; extracting the indexes of the target original 3D points stored in each connected region raster container; and merging the extracted indexes to form an index set, which serves as the index set of the target original 3D points corresponding to the same connected region.
[0089] The process of merging the indices stored in the raster containers corresponding to all raster cells within the same connected region to obtain the index set of the target original 3D points corresponding to the same connected region refers to aggregating the indices stored in all raster containers within the same connected region into a single index set, which is used to represent the set of original 3D points corresponding to the connected region.
[0090] The above merging process is implemented as follows: First, obtain the raster containers corresponding to all raster cells contained in the same connected region, as the connected region raster containers. Since each raster cell is associated with a corresponding raster container when constructing the occupied raster map, all corresponding raster containers can be obtained by traversing all raster cells contained in the connected region. Second, extract the indexes of the target original 3D points stored in each connected region raster container. Each raster container stores the indexes of all target original 3D points falling into the spatial cylinder corresponding to the raster cell. All indexes corresponding to the raster cell can be obtained by reading each raster container. Finally, merge the extracted indexes to form an index set, which serves as the index set of target original 3D points corresponding to the same connected region. The above merging process merges the indexes in all raster containers into an index set. Each index in this index set corresponds to a target original 3D point, and this index set corresponds to all original 3D points corresponding to the connected region. Assuming the kth connected region (also called an island) is \Omega_k, then for each connected region, the index set of target original 3D points... Its calculation formula is .
[0091] As an optional embodiment, when obtaining the point cloud clustering result of the moving region based on the index set of the original 3D points of the target corresponding to the same connected region, the index set of the original 3D points of the target corresponding to each connected region can be directly used as the point cloud clustering result.
[0092] As an optional embodiment, obtaining the point cloud clustering result of the moving region based on the index set of the original three-dimensional points of the target corresponding to the same connected region includes: obtaining the attribute data of the original three-dimensional points of the target corresponding to the index in the index set from the three-dimensional point cloud, and using the set of attribute data as the point cloud clustering result.
[0093] As an optional embodiment, the point cloud clustering result of the moving region is obtained based on the index set of the original 3D points of the target corresponding to the same connected region. This includes: obtaining attribute data of the original 3D points of the target corresponding to the indices in the index set from the 3D point cloud, and using the index set and attribute data together as the point cloud clustering result. Attribute data refers to all or part of the data information of the original 3D points of the target stored in the 3D point cloud, including but not limited to at least one of 3D coordinate data, reflection intensity data, timestamp data, and frame number data. The index set is the number of the storage location of the original 3D points of the target in the 3D point cloud, used to directly locate and extract the corresponding original 3D points of the target in the 3D point cloud. When the attribute data and the index set together constitute the point cloud clustering result, all the information of the original point cloud is preserved, and downstream modules (such as target detection, target tracking, path planning, etc.) can access and use the clustering result in multiple ways.
[0094] Among the three methods mentioned above, the amount of information contained in the point cloud clustering results is different. In practical applications, the appropriate method can be selected according to the specific needs of the downstream modules.
[0095] Since each index in the index set corresponding to the original 3D points of the target in each connected region corresponds to the storage location of the original 3D point in the 3D point cloud, all original attribute data (including but not limited to 3D coordinates, reflection intensity, timestamps, etc.) of the corresponding original 3D point can be directly located and extracted from the 3D point cloud without re-performing neighborhood search or distance calculation in 3D space, thus reducing the computational overhead required to obtain attribute data. Because each index in the index set can be used to access the attribute data of the corresponding original 3D point, this index set represents all the original 3D point information corresponding to each connected region. Downstream modules can obtain the complete spatial location and attribute information of each object point cluster through this index set, and then use it as reference data for port operation vehicles traveling or operating in the moving area.
[0096] Using the above method, the point cloud clustering results not only retain the complete attribute information of the original 3D point cloud, but also avoid copying the point cloud data during data transmission and storage.
[0097] As an optional embodiment, this application further includes a step of filtering the point cloud clustering results. Specifically, the number of indices contained in the index set of the original 3D points corresponding to the same connected region is obtained; the point cloud clustering results corresponding to the index set with an index number less than a preset minimum point number threshold are filtered out; the point cloud clustering results corresponding to the index set with an index number not less than the minimum point number threshold are determined as the filtered point cloud clustering results, and used as obstacle avoidance reference data for port operation vehicles moving in the moving area. The number of indices is used to characterize the number of points contained in the point cloud cluster corresponding to the connected region. The minimum point number threshold is a preset integer used to determine whether a point cloud cluster has enough points to be considered a valid obstacle.
[0098] Specifically, the number of indices contained in the index set of the original 3D points of the target corresponding to the same connected region is obtained, and the number of indices is compared with a preset minimum number of points threshold. The comparison is performed. If the number of indices in the index set corresponding to a connected region is less than the minimum number of points, the point cloud clustering result corresponding to that index set is filtered out; that is, the point cloud clustering result is not output as a valid obstacle. If the number of indices in the index set corresponding to a connected region is not less than the minimum number of points, then... If the point cloud clustering result corresponding to the index set is determined as the filtered point cloud clustering result, it will be used as obstacle avoidance reference data for port operation vehicles when moving in the mobile area.
[0099] Through the above filtering steps, clusters of points consisting of noise points or sparse points can be eliminated, and clusters of points with the number of points meeting the preset requirements can be retained. The above filtering effect can be used as reference data for obstacle avoidance decisions of port operation vehicles.
[0100] It should be noted that existing point cloud clustering algorithms typically rely on multiple coupled parameters such as distance thresholds and the number of neighboring points. These parameters vary greatly depending on different radar models, weather conditions, and operational areas, requiring repeated parameter tuning when migrating between different ports and terminals. In contrast, the connected component labeling method in this application primarily relies on two core parameters—the two-dimensional grid resolution *r* and the minimum point threshold *N_min*. These parameters have clear meanings and can be switched via configuration to adjust the balance between performance and accuracy, avoiding the difficulty of parameter tuning caused by the mutual constraints of multiple coupled parameters. Based on this, this application can set three operating levels according to the computing power level of port operation vehicles: high-precision level uses a smaller *r* and a lower *N_min* for densely populated operational areas; balanced level uses a medium *r* and a medium *N_min* for regular operational areas; and a safeguard level uses a larger *r* and a higher *N_min* for scenarios with limited computing power or sensor malfunctions. This hierarchical strategy does not change the core algorithm and can be implemented through configuration switching. Furthermore, this application can be linked with a task scheduling system. When the task scheduling system detects that the computing power is below a preset threshold or that the sensor status is abnormal, it can switch to the safeguard level configuration; when the computing power recovers, it can switch back to the high-precision level configuration.
[0101] The value of the 2D grid resolution *r* determines the clustering granularity. For example, a standard container is typically 2.44 meters wide. When *r* is 0.5 meters, the container's projection on the horizontal plane occupies approximately 5 grid cells; when *r* is 0.6 meters, it occupies approximately 4 grid cells. If *r* increases further, the number of grid cells occupied by the container's projection decreases, potentially causing adjacent objects' projections to connect at the grid level (i.e., merge). If *r* decreases further, the number of grid cells occupied by the container's projection increases, potentially causing the same object's projection to break into multiple connected regions at the grid level (i.e., fragmentation). Therefore, in port scenarios, *r* can be set between 0.5m and 0.6m, ensuring that the standard container's projection on the horizontal plane occupies 4 to 5 grid cells. This number of grid cells preserves the object's shape characteristics while avoiding the aforementioned merging or fragmentation problems.
[0102] Furthermore, since the size of target objects may vary in different ports or operating areas (e.g., some ports use containers with a width of 2.5 meters), the value of r can be adjusted according to the size of the target object in the specific scenario during practical application. For scenarios with smaller target objects, a smaller r can be selected to improve resolution; for scenarios with larger target objects, a larger r can be selected to reduce computation. The grid resolution r and the minimum point threshold N_min can also be updated through online statistics (such as real-time point density, weather level, and vehicle speed range) to match the parameter configuration with the current operating conditions. All of the above parameters can be switched online as external configurations without changing the core algorithm. When the operating conditions of port vehicles change (e.g., port vehicles enter different operating areas, weather changes, sensor performance fluctuations), the corresponding configuration parameters can be adjusted without modifying or redeploying the algorithm code.
[0103] The following example illustrates the concept using a single frame of a 3D point cloud containing four original 3D points. It should be noted that this example is for illustrative purposes only, and in practical applications, a single frame of a 3D point cloud may contain tens of thousands or even hundreds of thousands of original 3D points. The technical solution of this application is also applicable to the processing of such large-scale point clouds.
[0104] Suppose that a frame of 3D point cloud contains four original 3D points, and the coordinates of the four original 3D points on the horizontal plane of the sensor coordinate system are P1(2.3, 1.1), P2(4.5, 2.9), P3(-0.9, 3.2), and P4(3.7, -1.5), respectively. The preset 2D grid resolution is 0.2 meters.
[0105] First, determine the distribution range of the four original 3D points in the horizontal (X-axis) and horizontal (Y-axis) directions. Calculations show that the minimum horizontal coordinate is -0.9 and the maximum is 4.5; the minimum horizontal coordinate is -1.5 and the maximum is 3.2. Therefore, the horizontal span of the bounding box is determined to be 5.4 meters (4.5 - (-0.9)) and the vertical span is determined to be 4.7 meters (3.2 - (-1.5)).
[0106] To avoid negative index values when coordinates are negative, which would prevent them from being used as array subscripts, the horizontal coordinates of all original 3D points are translated according to a translation vector. The translation vector consists of the negative of the minimum horizontal coordinate value (0.9) and the negative of the minimum vertical coordinate value (1.5), i.e., T = (0.9, 1.5). After translation, the coordinates of the original 3D points are: P1'(3.2, 2.6), P2'(5.4, 4.4), P3'(0.0, 4.7), and P4'(4.6, 0.0), with all coordinate values being non-negative.
[0107] The raster size is calculated based on the maximum coordinate value after translation and the preset 2D grid resolution. The number of horizontal raster cells is ceil(5.4 / 0.2)=27, and the number of horizontal raster cells is ceil(4.7 / 0.2)=24 (where ceil represents rounding up). Based on this, 20 redundant raster cells are added horizontally and vertically respectively, resulting in 47 horizontal raster cells and 44 vertical raster cells occupying the raster image.
[0108] Next, the raster index corresponding to each translated point is calculated. For point P1'(3.2, 2.6), its horizontal index is floor(3.2 / 0.2)=16, and its vertical index is floor(2.6 / 0.2)=13 (where floor represents rounding down), thus mapping to raster cell (16, 13). For point P2'(5.4, 4.4), its horizontal index is floor(5.4 / 0.2)=27, and its vertical index is floor(4.4 / 0.2)=22. Since the horizontal index value of 27 is equal to the number of horizontal raster cells, which exceeds the array index range [0, 26], the index value can be limited to 26 (i.e., the number of horizontal raster cells minus 1), thus mapping to raster cell (26, 22). For point P3'(0.0, 4.7), its horizontal index is 0, and its vertical index is floor(4.7 / 0.2)=23, which is mapped to the raster cell (0,23). For point P4'(4.6, 0.0), its horizontal index is floor(4.6 / 0.2)=23, and its vertical index is 0, which is mapped to the raster cell (23,0).
[0109] After determining the grid cell corresponding to each point, the index of each target original 3D point is written into the grid container corresponding to that grid cell, and the grid cell with the index is marked as occupied, while the remaining grid cells remain in an idle state.
[0110] Perform connected component labeling on the occupied grid. If the four original 3D points in this example fall into their respective independent grid cells and are not adjacent to each other, then each original 3D point constitutes an independent connected component. To illustrate the connected component labeling process more clearly, a 5×5 occupied grid example is used below. Assume that in this occupied grid, grid cells (0,0), (0,1), and (1,0) are occupied and adjacent to each other, forming one connected component; grid cells (1,3), (1,4), and (2,4) are occupied and adjacent to each other, forming another connected component; and grid cell (4,2) is occupied and not adjacent to other occupied grid cells, forming a third connected component.
[0111] Starting from grid cell (0,0), examine its adjacent grid cells. The grid cells below (1,0) and to the right (0,1) of grid cell (0,0) are both occupied. Therefore, (1,0) and (0,1) are marked as belonging to the same connected region as (0,0), which contains the three grid cells (0,0), (0,1), and (1,0). Continuing the scan, starting from grid cell (1,3), its right grid cell (1,4) is occupied, and the grid cell below (1,4) is also occupied. Therefore, these three grid cells are marked as the same connected region. Grid cell (4,2) has no adjacent occupied grid cells and constitutes a separate connected region.
[0112] For the three connected regions mentioned above, the indices in their respective raster containers are merged. Assuming that the raster container of raster cell (0,0) stores indices a and b, (0,1) stores index c, and (1,0) stores indices d, e, and f, then the index set corresponding to island 1 is {a, b, c, d, e, f}, a total of 6 indices. Assuming that raster cell (1,3) stores index g, (1,4) stores indices h and i, and (2,4) stores index j, then the index set corresponding to island 2 is {g, h, i, j}, a total of 4 indices. Assuming that raster cell (4,2) stores index k, then the index set corresponding to island 3 is {k}, a total of 1 index.
[0113] The three connected regions are filtered according to a preset minimum point count threshold (e.g., 5). Island 1 has 6 indexes, which is greater than 5, and is retained. Island 2 has 4 indexes, which is less than 5, and is filtered out. Island 3 has 1 index, which is less than 5, and is filtered out. Finally, the point cloud clustering result corresponding to Island 1 is retained, and this point cloud clustering result is the index set of the original 3D points of the target corresponding to this connected region.
[0114] This application projects a 3D point cloud obtained from scanning port operation vehicles onto a horizontal plane along the height direction to construct a 2D occupancy grid map, and performs connected component marking on the grid map. In this way, the high-complexity computations of point-to-point distance calculation and neighborhood search in existing point cloud clustering algorithms are replaced by low-complexity computations of adjacency checks on 2D grid cells. Specifically, existing point cloud clustering algorithms typically employ neighbor query methods based on spatial index tree structures (such as kd-tree-based neighborhood search methods), whose computational complexity is typically O(n log n), where n is the number of point clouds. When the number of point clouds increases from tens of thousands to hundreds of thousands, the kd-tree construction time and neighborhood query time both increase non-linearly, and the clustering time per frame may increase sharply from tens of milliseconds to hundreds of milliseconds. In this application, each original 3D point is mapped to a grid only once during the construction of the 2D occupied grid map, resulting in a time complexity of O(n). During the connected component marking stage, each occupied grid cell is accessed once, resulting in a time complexity of O(W×H), where W and H are the width and height of the grid map, respectively. Therefore, the overall computational complexity of this application is O(n+W×H), and this complexity is linearly related to the number of point clouds and grid cells. The computational load does not increase non-linearly with the increase in the number of original 3D points.
[0115] In this application, the raster container stores the indexes of the original 3D points of the target, and each connected region corresponds to a set of raster cells and the index set of the original 3D points of the target. Through the above index association method, the complete attribute data of the original 3D points can be accessed through the index in subsequent processing without rereading or copying the point cloud data.
[0116] Furthermore, common port features such as metallic reflections from crane booms, rain and fog scattering points, and isolated reflections from high-mast streetlights create isolated points or noise points in 3D space. Traditional 3D clustering methods may connect these points to adjacent objects or separate them from the same object. This application projects the 3D point cloud along the height direction onto a horizontal plane, ensuring that points of the same object at different heights fall into the same grid cell. Isolated points or noise points along the height direction do not form independent connected regions at the grid level, thus reducing the impact of height-direction noise on the connected region labeling results.
[0117] In continuous port operation shifts, the operating paths of port vehicles are highly repetitive. This application enables the same object to obtain corresponding clustering results across different frames by using the inter-frame association of connected region markings on the raster map and index sets. Since the connected region marking results on the raster map are uniquely determined by the occupancy status and adjacency relationship of the raster cells, when the object's position shifts between frames, its corresponding raster cell set shifts as a whole on the horizontal plane, but the topology of the connected regions remains unchanged. Based on this, the correspondence of the same object can be established across different frames through the inter-frame association of the index sets. Changes in the number of clusters (the same object being clustered into different numbers of clusters across different frames), changes in cluster area (the change in the number of raster cells occupied by the same object in the occupied raster map across different frames), and fluctuations in centroid position (fluctuations in the geometric center position of the same object across different frames) can be suppressed, thereby reducing the number of re-initializations triggered by changes in clustering results in subsequent processing stages.
[0118] In practical applications, this application can form a closed loop with the quality management platform. Each time an algorithm is released, port operation vehicles can record configuration versions, key thresholds, scene tags, and cluster statistical distributions, and report these to the quality management platform, which then generates a version profile. When an anomaly occurs on-site, maintenance personnel can use this version profile to perform version backtracking and trigger a version rollback, reducing port operation vehicle downtime caused by manual troubleshooting.
[0119] Second Embodiment In the first embodiment described above, a point cloud clustering method for port operation vehicle movement scenarios is provided. Correspondingly, the second embodiment of this application provides a point cloud clustering device for port operation vehicle movement scenarios. Since the device embodiment is basically similar to the first method embodiment, it is described simply; relevant details can be found in the descriptions of the method embodiment. The device embodiments described below are merely illustrative.
[0120] Please refer to Figure 5 This is a schematic diagram of a point cloud clustering device 500 for port operation vehicle movement scenarios provided in the second embodiment of this application.
[0121] The data acquisition unit 501 is used to acquire a three-dimensional point cloud of the port area. The three-dimensional point cloud is a collection of original three-dimensional points of multiple frames of point cloud output by the sensing devices of the port operation vehicles in the port area after scanning the surrounding environment of the port operation vehicles. The data preprocessing unit 502 is used to obtain the point cloud corresponding to the moving area in the three-dimensional point cloud of the port area as the target three-dimensional point cloud. The original three-dimensional points in the target three-dimensional point cloud are the target original three-dimensional points, and the moving area is the area used by the port operation vehicle to move in the port area. Occupy grid construction unit 503 is used to construct an occupation grid map based on the target 3D point cloud and a preset 2D grid resolution. The occupation grid map contains grid cells. The original 3D points of the target are mapped to the grid cells along the height direction of the sensing device coordinate system to obtain the index of the original 3D points of the target. The index of the original 3D points of the target is written into the grid container corresponding to the grid cell, and the grid cell corresponding to the grid container storing the index of the original 3D points of the target is marked as occupied. The connected component processing unit 504 is used to mark multiple adjacent and occupied raster cells in the occupied raster map as the same connected region; merge the indexes stored in the raster containers corresponding to all raster cells contained in the same connected region to obtain the index set of the target original 3D points corresponding to the same connected region; and obtain the point cloud clustering result of the moving region based on the index set of the target original 3D points corresponding to the same connected region, which serves as reference data for the movement of port operation vehicles in the moving region.
[0122] Third Embodiment Corresponding to the method embodiments described above, the third embodiment of this application also provides an electronic device. For example... Figure 6 As shown, Figure 6 This is a schematic diagram of an electronic device provided in the third embodiment of this application. The electronic device includes: at least one processor 601, at least one communication interface 602, at least one memory 603, and at least one communication bus 604. Optionally, the communication interface 602 can be an interface for a communication module, such as the interface for a GSM module. The processor 601 may be a CPU, an Application Specific Integrated Circuit (ASIC), or one or more integrated circuits configured to implement embodiments of the present invention. The memory 603 may include high-speed RAM and may also include non-volatile memory, such as at least one disk storage device. The memory 603 stores a program, and the processor 601 calls the program stored in the memory 603 to execute the methods provided in the above embodiments of this application.
[0123] Fourth embodiment Corresponding to the methods described above in this application, the fourth embodiment of this application also provides a computer storage medium. The computer storage medium stores a computer program, which is executed by a processor to perform the methods provided in the above embodiments of this application.
[0124] Although this application discloses preferred embodiments as described above, it is not intended to limit this application. Any person skilled in the art can make possible changes and modifications without departing from the spirit and scope of this application. Therefore, the scope of protection of this application should be determined by the scope defined in the claims of this application.
[0125] In a typical configuration, a computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory.
[0126] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0127] 1. Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information by any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include non-transitory computer-readable media, such as modulated data signals and carrier waves.
[0128] 2. Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0129] It should be noted that the embodiments of this application may involve the use of user data. In practical applications, user-specific personal data may be used in the scheme described herein within the scope permitted by applicable laws and regulations, provided that it complies with the applicable laws and regulations of the country (e.g., with the user's explicit consent, with the user being properly notified, etc.).
[0130] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use and processing of the relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and corresponding operation entry points are provided for users to choose to authorize or refuse.
Claims
1. A point cloud clustering method for port operation vehicle movement scenarios, characterized in that, include: A three-dimensional point cloud of a port area is obtained. The three-dimensional point cloud is a collection of original three-dimensional points of multiple frames of point cloud output by the sensing devices of port operation vehicles in the port area after scanning the surrounding environment of the port operation vehicles. Based on the three-dimensional point cloud of the port area, the point cloud corresponding to the moving area in the three-dimensional point cloud is obtained as the target three-dimensional point cloud. The original three-dimensional points in the target three-dimensional point cloud are the target original three-dimensional points. The moving area is the area used by the port operation vehicle to move in the port area. An occupation grid map is constructed based on the target 3D point cloud and a preset 2D grid resolution, the occupation grid map containing grid cells; The original three-dimensional point of the target is mapped to the grid cell along the height direction of the coordinate system of the sensing device to obtain the index of the original three-dimensional point of the target; Write the index of the original three-dimensional point of the target into the grid container corresponding to the grid cell, and mark the grid cell corresponding to the grid container that stores the index of the original three-dimensional point of the target as occupied; Multiple adjacent and occupied grid cells in the occupied grid diagram are marked as the same connected region; The indices stored in the raster containers corresponding to all raster units contained in the same connected region are merged to obtain the index set of the target original 3D points corresponding to the same connected region. Based on the index set of the original 3D points of the target corresponding to the same connected region, the point cloud clustering result of the moving region is obtained, which serves as reference data for the movement of the port operation vehicle in the moving region.
2. The point cloud clustering method according to claim 1, characterized in that, The step of obtaining the point cloud corresponding to the moving region in the three-dimensional point cloud of the port area, as the target three-dimensional point cloud, includes: The point cloud corresponding to the non-moving region in the three-dimensional point cloud is cropped to obtain the point cloud corresponding to the moving region in the three-dimensional point cloud, which is used as the target three-dimensional point cloud; wherein, the non-moving region is the region in the port area other than the moving region.
3. The point cloud clustering method according to claim 2, characterized in that, The step of cropping the point cloud corresponding to the non-moving region in the 3D point cloud to obtain the point cloud corresponding to the moving region in the 3D point cloud as the target 3D point cloud includes: By using a preset coordinate transformation matrix, the three-dimensional coordinate data of the original three-dimensional points in the three-dimensional point cloud in the sensing device coordinate system are transformed from the sensing device coordinate system to the world coordinate system to obtain the world coordinate system data of the original three-dimensional points. Based on the world coordinate system data of the original 3D points, the original 3D points in the 3D point cloud are mapped to the corresponding positions in the target area occupancy bitmap to obtain the position data of the corresponding positions; wherein, the target area occupancy bitmap is generated by rasterizing the map data corresponding to the port area according to a preset map grid resolution; For any original 3D point in the 3D point cloud, if the position data corresponding to the original 3D point is a preset first data, then the original 3D point is determined to be the target original 3D point; if the position data corresponding to the original 3D point is a preset second data, then the original 3D point is determined not to be the target original 3D point, and the original 3D point is deleted from the 3D point cloud. Wherein, the first data is the value corresponding to the position of the map data corresponding to the moving area in the target area's bitmap, and the second data is the value corresponding to the position of the map data corresponding to the non-moving area in the target area's bitmap. After deleting all original 3D points that are not the target original 3D points from the 3D point cloud, the point cloud corresponding to the moving region in the 3D point cloud is obtained as the target 3D point cloud.
4. The point cloud clustering method according to claim 1, characterized in that, The step of constructing an occupancy grid map based on the target 3D point cloud and a preset 2D grid resolution includes: Based on the target 3D point cloud, determine the minimum and maximum horizontal coordinate values of the target 3D point cloud in the horizontal direction of the sensor device coordinate system, and the minimum and maximum vertical coordinate values of the target 3D point cloud in the vertical direction of the sensor device coordinate system. Based on the minimum horizontal coordinate value, maximum horizontal coordinate value, minimum vertical coordinate value, and maximum vertical coordinate value, the bounding box of the target 3D point cloud on the horizontal plane where the origin of the coordinate system of the sensing device is located is determined. The length value of the bounding box is determined based on the maximum horizontal coordinate value and the minimum horizontal coordinate value, and the width value of the bounding box is determined based on the maximum vertical coordinate value and the minimum vertical coordinate value. Based on the preset two-dimensional grid resolution, the length value of the bounding box, and the width value of the bounding box, the bounding box is divided into multiple grid units, and a preset number of grid units are added along the length direction and the width direction of the bounding box, respectively. The occupied grid map is obtained based on the plurality of grid cells and the preset number of grid cells.
5. The point cloud clustering method according to claim 1, characterized in that, The step of mapping the original 3D point of the target to the grid cell along the height direction of the sensing device coordinate system to obtain the index of the original 3D point of the target includes: The original three-dimensional point of the target is translated in the coordinate system of the sensing device according to the translation vector, so that the coordinate values of the original three-dimensional point of the target in the horizontal direction of the coordinate system of the sensing device are all non-negative, and the translated horizontal coordinate value and the translated vertical coordinate value of the original three-dimensional point of the target in the horizontal direction are obtained; wherein, the translation vector is determined according to the negative of the minimum horizontal coordinate value in the horizontal direction of the sensing device coordinate system and the negative of the minimum vertical coordinate value in the horizontal direction of the sensing device coordinate system; Based on the translated horizontal coordinate value, the translated vertical coordinate value, and the two-dimensional grid resolution, the index of the original three-dimensional point of the target in the occupied grid is obtained, which serves as the index of the original three-dimensional point of the target.
6. The point cloud clustering method according to claim 5, characterized in that, The index of the target original 3D point includes a horizontal index and a horizontal index. The horizontal index is used to identify the column number of the grid cell mapped by the target original 3D point in the occupied grid diagram, and the horizontal index is used to identify the row number of the grid cell mapped by the target original 3D point in the occupied grid diagram. The horizontal index is determined based on the translated horizontal coordinate value and the two-dimensional grid resolution; The horizontal vertical index is determined based on the translated vertical coordinate value and the two-dimensional grid resolution.
7. The point cloud clustering method according to claim 1, characterized in that, The step of marking multiple adjacent and occupied grid cells in the occupied grid map as the same connected region includes: Starting from the current grid cell, traverse the grid cells adjacent to the current grid cell. Mark the grid cells that are occupied among the grid cells adjacent to the current grid cell as belonging to the same connected region as the current grid cell. The grid cells adjacent to the current grid cell are grid cells whose horizontal horizontal index is the same as the horizontal horizontal index of the current grid cell and whose horizontal vertical index is adjacent to the horizontal vertical index of the current grid cell in the occupied grid diagram, or grid cells whose horizontal vertical index is the same as the horizontal vertical index of the current grid cell and whose horizontal horizontal index is adjacent to the horizontal horizontal index of the current grid cell.
8. The point cloud clustering method according to claim 1, characterized in that, The method further includes: Obtain the number of indices contained in the index set of the original 3D points of the target corresponding to the same connected region; Filter out the point cloud clustering results corresponding to index sets whose index count is less than the preset minimum point count threshold; The point cloud clustering results corresponding to the index set with an index number not less than the minimum point number threshold are determined as the filtered point cloud clustering results, and used as obstacle avoidance reference data for the port operation vehicle when moving in the mobile area.
9. A point cloud clustering device for port operation vehicle movement scenarios, characterized in that, include: The data acquisition unit is used to acquire a three-dimensional point cloud of the port area. The three-dimensional point cloud is a collection of original three-dimensional points of multiple frames of point cloud output by the sensing devices of the port operation vehicles in the port area after scanning the surrounding environment of the port operation vehicles. The data preprocessing unit is used to obtain the point cloud corresponding to the moving area in the three-dimensional point cloud of the port area as the target three-dimensional point cloud. The original three-dimensional points in the target three-dimensional point cloud are the target original three-dimensional points, and the moving area is the area used by the port operation vehicle to move in the port area. An occupation grid construction unit is used to construct an occupation grid map based on the target 3D point cloud and a preset 2D grid resolution. The occupation grid map contains grid cells. The original 3D points of the target are mapped to the grid cells along the height direction of the sensing device coordinate system to obtain the index of the original 3D points of the target. The index of the original 3D points of the target is written into the grid container corresponding to the grid cell, and the grid cell corresponding to the grid container storing the index of the original 3D points of the target is marked as occupied. The connected component processing unit is used to mark multiple adjacent and occupied grid cells in the occupied grid map as the same connected region; and to merge the indexes stored in the grid containers corresponding to all grid cells contained in the same connected region to obtain the index set of the target original 3D points corresponding to the same connected region. Based on the index set of the original 3D points of the target corresponding to the same connected region, the point cloud clustering result of the moving region is obtained, which serves as reference data for the movement of the port operation vehicle in the moving region.
10. An electronic device, characterized in that, The electronic device includes a processor and a memory; The memory stores a computer program, and after the processor runs the computer program, it performs the method described in any one of claims 1-8.