Ship navigation scale and traffic flow detection method, device, equipment and medium
Through the integration of laser point cloud data processing and AIS data, the synchronous detection of ship scale and traffic flow is achieved, solving the problems of low detection accuracy and efficiency in the prior art, and reducing equipment cost and complexity.
Patent Information
- Application Number
- CN202510557660.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-29
- Publication Date
- 2025-08-01
- Estimated Expiration
- 2045-04-29
AI Technical Summary
In the prior art, the accuracy of ship navigation scale and traffic flow detection is poor, the detection efficiency is low, and the equipment cost and deployment complexity are high.
By obtaining the original laser point cloud data, performing point cloud processing, calculating the minimum external cuboid size of the ship point cloud data, and combining distance detection for traffic flow detection, and combining AIS data for identity verification.
It realizes accurate measurement of ship scale and real-time acquisition of traffic flow, improves detection efficiency, reduces equipment costs and deployment complexity.
Smart Images

Figure CN120403431A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of ship navigation, and particularly relates to a method, device, equipment and medium for detecting ship navigation scale and traffic flow. Background Art
[0002] In recent years, the inland shipping industry in China has developed rapidly. With the continuous increase in the scale of cargo transportation, the trend of ship enlargement has become increasingly obvious. The scale and navigation density of navigating ships are getting larger and larger, and the risk of collision when passing through buildings such as bridges and locks is also increasing, bringing unprecedented challenges to navigation safety.
[0003] In related technologies, the scale and traffic flow of navigating ships are usually detected separately by different technical means. The ship scale mainly uses technical means such as video surveillance analysis and infrared ultra-high detection, and the measurement accuracy is poor; the ship traffic flow is mainly based on AIS (Automatic Identification System) to count the cross-sectional ship flow of the river section. Factors such as the artificial shutdown and failure of ship AIS will interfere with the statistical accuracy. In addition, the separate detection of the scale and traffic flow of navigating ships not only reduces the detection efficiency, but also increases the equipment cost and deployment complexity.
[0004] Based on this, it is particularly urgent to provide a technical method and device that can be intensive, efficient, accurate and can detect the ship scale and traffic flow density at the same time. Summary of the Invention
[0005] The present invention provides a method, device, equipment and medium for detecting ship navigation scale and traffic flow, so as to solve the defects of poor accuracy, low detection efficiency, high equipment cost and high deployment complexity in the detection of the scale and traffic flow of navigating ships in the prior art. The present invention provides a method for detecting ship navigation scale and traffic flow, including: Obtaining original lidar point cloud data; Performing point cloud processing on the original lidar point cloud data to obtain ship point cloud data of a ship to be measured, where the point cloud processing includes at least one of point cloud screening, coordinate system conversion, and point cloud filtering; Based on the main direction of the ship point cloud data, calculating the dimensions of the minimum circumscribed cuboid of the ship point cloud data, and performing smoothing processing on the dimensions of the minimum circumscribed cuboid to obtain the ship scale of the ship to be measured; Based on the ship point cloud data, calculating the distances between the ship to be measured and a specified lidar at the current moment and the previous moment of the current moment respectively, and performing traffic flow detection based on the distances.
[0006] According to the ship navigation dimension and traffic flow detection method provided by the present invention, calculating the dimensions of the minimum circumscribed cuboid of the ship point cloud data based on the principal direction of the ship point cloud data includes: Calculating the centroid of the ship point cloud data, and determining the principal direction of the ship point cloud data based on the centroid; Projecting the ship point cloud data onto the principal direction to obtain projected point cloud data; Determining the dimensions of the minimum circumscribed cuboid based on the minimum and maximum coordinates of the projected point cloud data in each direction.
[0007] According to the ship navigation dimension and traffic flow detection method provided by the present invention, determining the principal direction of the ship point cloud data based on the centroid includes: Calculating a covariance matrix based on the centroid and the coordinates of each point cloud in the ship point cloud data, where the covariance matrix reflects the distribution of the point cloud in each direction; Performing eigenvalue decomposition on the covariance matrix to obtain eigenvalues and corresponding eigenvectors in each direction; Taking the eigenvector corresponding to the largest eigenvalue as the principal direction of the ship point cloud data.
[0008] According to the ship navigation dimension and traffic flow detection method provided by the present invention, traffic flow detection based on the distance includes: If the current distance is less than or equal to a preset distance threshold and the ship to be measured has not been counted, then judge the magnitude relationship between the current distance and the previous distance, and perform traffic flow statistics based on the magnitude relationship between the current distance and the previous distance; If the current distance is greater than the preset distance threshold and the ship to be measured has been counted, then reset the status of the ship to be measured; Wherein, the current distance refers to the distance between the ship to be measured and a specified lidar at the current moment, and the previous distance refers to the distance between the ship to be measured and the specified lidar at the previous moment of the current moment.
[0009] According to the ship navigation dimension and traffic flow detection method provided by the present invention, traffic flow statistics based on the magnitude relationship between the current distance and the previous distance includes: If the current distance is less than the previous distance, it is determined that the ship to be measured is approaching the specified water area section; If the current distance is greater than the previous distance, it is determined that the ship to be measured has passed the specified water area section, and the ship to be measured is marked as having been counted.
[0010] According to the method for detecting the navigable dimension and traffic flow of a ship provided by the present invention, after obtaining the ship dimension of the ship to be measured, the method further includes: Based on the radar ship position indicated by the ship point cloud data, convert the radar ship position into the standard coordinate system of the Automatic Identification System (AIS) of ships; Obtain the AIS ship position reported in the AIS data; Match the radar ship position and the AIS ship position at the same moment, and authenticate the identity of the ship to be measured based on the matching result.
[0011] According to the method for detecting the navigable dimension and traffic flow of a ship provided by the present invention, the point cloud processing of the original laser point cloud data to obtain the ship point cloud data of the ship to be measured includes: Based on the intensity values of the points in the original laser point cloud data, screen and obtain the initial ship point cloud data of the ship to be measured; Convert the initial ship point cloud data from the lidar coordinate system to the world coordinate system to obtain the converted ship point cloud data; After performing multi-level direction filtering, grid sampling, selecting representative points, and removing outliers on the converted ship point cloud data in sequence, obtain the ship point cloud data of the ship to be measured.
[0012] The present invention also provides a device for detecting the navigable dimension and traffic flow of a ship, including: A point cloud acquisition unit for acquiring the original laser point cloud data; A point cloud processing unit for performing point cloud processing on the original laser point cloud data to obtain the ship point cloud data of the ship to be measured, and the point cloud processing includes at least one of point cloud screening, coordinate system conversion, and point cloud filtering; A dimension calculation unit for calculating the dimensions of the minimum circumscribed cuboid of the ship point cloud data based on the main direction of the ship point cloud data, and performing smoothing processing on the dimensions of the minimum circumscribed cuboid to obtain the ship dimension of the ship to be measured; A traffic flow detection unit for calculating the distances between the ship to be measured and a specified lidar at the current moment and the previous moment of the current moment respectively based on the ship point cloud data, and performing traffic flow detection based on the distances.
[0013] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, and when the processor executes the computer program, it implements the method for detecting the navigable dimension and traffic flow of a ship as described in any one of the above.
[0014] The present invention also provides a non-transitory computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, it implements the ship navigation scale and traffic flow detection method as described in any one of the above.
[0015] The present invention also provides a computer program product, including a computer program. When the computer program is executed by a processor, it implements the ship navigation scale and traffic flow detection method as described in any one of the above.
[0016] The ship navigation scale and traffic flow detection method, device, equipment and medium provided by the present invention realize synchronous ship scale monitoring and traffic flow detection through lidar point cloud data. This technology can not only accurately measure the ship scale, but also obtain traffic flow data in real time, significantly improving the detection efficiency, while reducing the equipment cost and deployment complexity.
[0017] In addition, by continuously scanning the ship with a lidar and combining advanced point cloud data processing algorithms, it is possible to calibrate in real time and output high-precision ship scale data (length, width, height), effectively solving the problem of insufficient accuracy in real-time measurement of traditional methods. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the drawings in the following description are some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.
[0019] Figure 1 It is a flowchart of the ship navigation scale and traffic flow detection method provided by the present invention.
[0020] Figure 2 It is a schematic diagram of the transmitted ship point cloud image provided by the present invention.
[0021] Figure 3 It is a schematic diagram of the structure of the ship navigation scale and traffic flow detection device provided by the present invention.
[0022] Figure 4 It is a schematic diagram of the structure of the electronic device provided by the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0023] To make the objectives, technical solutions, and advantages of the present invention clearer, the technical solutions in the present invention will be clearly and completely described below with reference to the accompanying drawings in the present invention. Obviously, the described embodiments are some, but not all, of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments in the present invention without creative efforts shall fall within the protection scope of the present invention.
[0024] During the navigation of inland waterway vessels, structures such as bridges and locks impose certain restrictions on the height, width, and even traffic flow density of vessels. If not strictly observed and passed in accordance with regulations, it will pose great safety hazards to the vessels themselves and structures such as bridges and locks. In related technologies, methods for real-time measurement of vessel dimensions include: 1. Video surveillance and image analysis method. By installing cameras at key positions of bridges, the dimensions, speed, and heading of vessels are analyzed to timely detect potential risks. Among them, the binocular vision measurement algorithm captures images of the same scene from different angles through two cameras, and uses parallax information to calculate the depth and three-dimensional position of an object, capable of real-time monitoring of the height and position of vessels to ensure the safe passage of vessels through bridges. However, the video surveillance method is greatly affected by the environment. Lighting conditions, weather (such as fog, rain, snow), etc. will affect the image quality, and thus affect the measurement accuracy. In addition, the image processing and analysis algorithms are relatively complex, especially binocular vision measurement, which requires high computing resources.
[0025] 2. LiDAR measurement method. LiDAR can obtain characteristic information such as the position and speed of a target object by emitting laser pulses and detecting their reflections from the target object. The control system calculates the distance and azimuth of the object based on the speed of light and the time difference of reflection, and generates a three-dimensional environmental model to calculate the dimensions of the vessel, including length, width, height, etc. The calculation accuracy of the LiDAR measurement method is higher than that of the video surveillance and image analysis method. The LiDAR can still operate stably at night or under low-light conditions, and has a certain penetration ability for haze, smoke, etc. However, the generated three-dimensional point cloud data requires complex algorithms for processing and analysis.
[0026] In recent years, with the development of unmanned aerial vehicle (UAV) technology, UAVs equipped with high-definition cameras or LiDAR devices have also been applied in vessel dimension measurement. In addition, multi-sensor data fusion has also become a hot topic in related fields. By using information from different types of sensors, complementary and collaborative effects between different sensor data can be achieved through fusion algorithms.
[0027] In view of the problems of poor detection accuracy, low detection efficiency, high equipment cost and high deployment complexity in the related art, an embodiment of the present invention provides a method for detecting the navigation scale and traffic flow of ships. In this method, first, the original lidar point cloud data is processed to obtain the ship point cloud data of the ship to be measured, where the point cloud processing includes at least one of point cloud screening, coordinate system conversion, and point cloud filtering; then, by calculating the dimensions of the minimum circumscribed cuboid of the ship point cloud data, the ship scale of the ship to be measured is obtained, realizing a measurement accuracy of millimeters. At the same time, based on the ship point cloud data, the distances between the ship to be measured and the specified lidar at the current moment and the previous moment of the current moment are calculated, and traffic flow detection is performed based on the distances.
[0028] The embodiment of the present invention innovatively realizes the synchronous monitoring of ship scale and traffic flow detection based on lidar point cloud data. This technology can not only accurately measure the ship scale, but also obtain traffic flow data in real time, significantly improving the detection efficiency, while reducing the equipment cost and deployment complexity.
[0029] In addition, by continuously scanning the ship with a lidar and combining advanced point cloud data processing algorithms, high-precision ship scale data (length, width, height) can be calibrated and output in real time, effectively solving the problem of insufficient accuracy in real-time measurement by traditional methods.
[0030] The embodiment of the present invention can be applied to scenarios where ship navigation scale and traffic flow detection are required. For example, it can give early warnings and take early interventions for over-scale ships preparing to pass through bridges or locks, and can also count the number of passing ships within a selected period to achieve reliable real-time monitoring of ship navigation scale and traffic flow. The execution subject of this method can be an electronic device such as a terminal device, a computer, a server, a server cluster or a specially designed detection device, or a detection device set in the electronic device, and the detection device can be implemented by software, hardware or a combination of both.
[0031] Figure 1 is a schematic flow chart of the method for detecting the navigation scale and traffic flow of ships provided by the present invention. As Figure 1 shown, the method includes the following steps: Step 110, obtain the original lidar point cloud data.
[0032] Specifically, the original lidar point cloud data is the three-dimensional point cloud data of the surrounding environment including ships collected by a three-dimensional lidar sensor. The lidar obtains the three-dimensional point cloud data of the surrounding environment by emitting laser beams and receiving reflected signals. Each original lidar point cloud data point usually contains the following information: x, y, z: the coordinates of the point in three-dimensional space.
[0033] intensity: The reflection intensity, which represents the intensity of the laser beam reflected back.
[0034] Step 120: Perform point cloud processing on the original laser point cloud data to obtain the ship point cloud data of the ship to be measured. The point cloud processing includes at least one of point cloud screening, coordinate system transformation, and point cloud filtering.
[0035] Specifically, considering that the original laser point cloud data obtained by the lidar usually contains noise and invalid points, in order to improve the accuracy of ship scale detection, it is necessary to perform point cloud processing on the original laser point cloud data to obtain the ship point cloud data of the ship to be measured. Here, the ship to be measured refers to the ship whose size needs to be detected. The ship point cloud data of the ship to be measured is the point cloud data that has removed the point cloud noise and only contains the point cloud on the surface of the ship to be measured.
[0036] Among them, point cloud screening refers to extracting a subset that meets specific conditions from the original laser point cloud data according to geometric range, attribute threshold, or semantic rules.
[0037] Coordinate system transformation refers to transforming the point cloud from the local coordinate system of the acquisition device (such as the lidar coordinate system) to the global reference system (such as the world coordinate system).
[0038] Point cloud filtering refers to removing noise and retaining significant features through local weighted averaging or geometric simplification algorithms.
[0039] In this embodiment, at least one of point cloud screening, coordinate system transformation, and point cloud filtering can be performed on the original laser point cloud data to improve the accuracy of subsequent ship scale detection.
[0040] In some embodiments, step 120 specifically includes: Step 121: Based on the intensity values of each point cloud in the original laser point cloud data, screen to obtain the initial ship point cloud data of the ship to be measured; Step 122: Transform the initial ship point cloud data from the lidar coordinate system to the world coordinate system to obtain the transformed ship point cloud data; Step 123: After performing multi-level direction filtering, grid sampling, selecting representative points, and removing outliers on the transformed ship point cloud data in sequence, obtain the ship point cloud data of the ship to be measured.
[0041] Specifically, first, perform point cloud screening on the original lidar point cloud data. The purpose of point cloud screening in this step is to separate different objects in the original lidar point cloud data. Traverse each point in the original lidar point cloud and determine whether to retain the point based on the intensity value. An intensity value threshold can be preset. For example, the intensity value threshold can be set to 25. If the intensity value of a point is less than 25, then filter out the point; if the intensity value of a point is greater than or equal to 25, then retain the point and assign a color value. By filtering based on the intensity value, some invalid points (such as water surface reflection points) can be removed, and the point cloud data of the target object (such as a ship) can be retained, thereby obtaining the initial ship point cloud data of the ship to be measured.
[0042] In step 122, considering that the point cloud data obtained by the lidar is usually represented in the coordinate system of the lidar itself. For subsequent processing and analysis, it is necessary to convert this point cloud data to the world coordinate system, such as the geocentric rectangular coordinate system, which can be achieved through the rotation and translation of the point cloud.
[0043] Rotation: Rotate the point cloud from the attitude of the lidar coordinate system to the attitude of the target coordinate system.
[0044] Translation: Translate the point cloud from the origin of the lidar coordinate system to the origin of the target coordinate system.
[0045] Define a transformation matrix T of 4x4, set the rotation matrix R and the translation vector t. Traverse each point in the input initial ship point cloud and convert it from the lidar coordinate system to the world coordinate system.
[0046]
[0047] Where: R is a 3x3 rotation matrix representing the rotation from the lidar coordinate system to the target coordinate system. t is a 3x1 translation vector representing the translation from the lidar coordinate system to the target coordinate system. R and t are obtained from the precise position and attitude of the lidar in the world coordinate system.
[0048] The coordinate transformation formula of the point cloud is:
[0049] Represent each point as homogeneous coordinates (X L , Y L , Z L , 1), and multiply it by the transformation matrix T to obtain the transformed point (X W , Y W , Z W , 1). Store the transformed points in the output point cloud, that is, obtain the transformed ship point cloud data.
[0050] In step 123, since the point cloud data obtained by the lidar usually contains noise and invalid points, filtering processing is performed on the point cloud, which can be achieved through multi-level direction filtering, grid sampling, selecting representative points, and outlier removal.
[0051] Multi-level direction filtering: Filter the point cloud along the Z-axis and retain the points within the specified range; filter the point cloud along the Y-axis and retain the points within the specified range; filter the point cloud along the Z-axis and retain the points within the specified range. The specified range here can be preset.
[0052] Grid sampling: Determine that the side length of each grid cell (voxel) is 0.01; divide the entire point cloud space into several cubic grids according to the defined voxel size. For each voxel, find all the points that fall within it.
[0053] Selecting representative points: Calculate the centroid of all points within each voxel (i.e., the average coordinates of all points), use the centroid as the representative point of the voxel, and construct a new point cloud using the selected representative points.
[0054] Outlier removal: Use statistical filtering or radius filtering methods to remove outliers.
[0055] If the number of points after sampling is less than 50% of the original number of points, then statistical filtering is used. Consider the 50 nearest neighbor points to estimate the average distance. If the distance deviation of a point from its neighbor points exceeds 0.7 times the standard deviation of the average distance, then it is considered an outlier.
[0056] If the number of points after sampling is between 50% and 80% of the original number of points, then radius filtering is used, and the specified search radius is 2 meters. Check the number of neighbors of each point within its specified search radius of 2 meters. If there are not enough neighbors within its search radius (such as less than the set minimum number of neighbors 8), then it is considered an outlier.
[0057] If the number of points after sampling is greater than 80%, then change the radius filtering parameter. For example, the specified search radius can be set to 3 meters. Check the number of neighbors of each point within its specified search radius of 3 meters. If there are not enough neighbors within its search radius (such as less than the set minimum number of neighbors 6), then it is considered an outlier.
[0058] The method provided by the embodiment of the present invention can obtain more accurate ship point cloud data of the ship to be measured through an advanced point cloud preprocessing algorithm, thereby improving the accuracy of subsequent ship scale calculation.
[0059] In step 130, based on the main direction of the ship point cloud data, calculate the dimensions of the minimum circumscribed cuboid of the ship point cloud data, and smooth the dimensions of the minimum circumscribed cuboid to obtain the ship scale of the ship to be measured.
[0060] Specifically, the main direction of the ship point cloud data can be obtained by calculating the main extension direction of the point cloud data in three-dimensional space through principal component analysis (PCA), which usually corresponds to the length, width, and height directions of the ship. The minimum bounding cuboid refers to the smallest cuboid that can completely enclose the ship point cloud data, and its size reflects the distribution range of the point cloud in three-dimensional space. Subsequently, filtering processing is performed on the size of the calculated minimum bounding cuboid to reduce the influence of noise or outliers on the result, improve the stability and reliability of the data, and thus obtain the ship scale of the ship to be measured.
[0061] In some embodiments, in step 130, calculating the size of the minimum bounding cuboid of the ship point cloud data based on the main direction of the ship point cloud data specifically includes: Step 131, calculating the centroid of the ship point cloud data and determining the main direction of the ship point cloud data based on the centroid; Step 132, projecting the ship point cloud data onto the main direction to obtain projected point cloud data; Step 133, determining the size of the minimum bounding cuboid based on the minimum and maximum coordinates of the projected point cloud data in each direction.
[0062] Specifically, the centroid refers to the geometric center of the ship point cloud data and can be obtained by calculating the coordinate mean of all points. The centroid calculation formula of the point cloud is as follows:
[0063] where is the th point in the point cloud, and N is the total number of points.
[0064] Subsequently, the main direction of the ship point cloud data is determined based on the centroid. Specifically, it includes the following steps: Step 131-1, calculating the covariance matrix based on the centroid and the coordinates of each point cloud in the ship point cloud data. The covariance matrix reflects the distribution of the point cloud in each direction; Step 131-2, performing eigenvalue decomposition on the covariance matrix to obtain the eigenvalues and corresponding eigenvectors in each direction; Step 131-3, taking the eigenvector corresponding to the largest eigenvalue as the main direction of the ship point cloud data.
[0065] Specifically, after obtaining the centroid and the coordinates of each point cloud in the ship point cloud data, the covariance matrix can be calculated. The covariance matrix can be expressed by the formula:
[0066] Performing eigenvalue decomposition on the covariance matrix to obtain three eigenvalues λ1, λ2, λ3 and corresponding eigenvectors v1, v2, v3:
[0067] Among them, is the eigenvalue, is the corresponding eigenvector.
[0068] The eigenvector corresponding to the largest eigenvalue is the main direction of the point cloud (i.e., the direction in which the point cloud is most widely distributed).
[0069] After obtaining the main direction of the ship point cloud data, project the ship point cloud data onto the main direction to obtain the projected point cloud data.
[0070] Construct a 3x3 matrix whose column vectors are the eigenvectors of the covariance matrix, and sort the eigenvectors according to the eigenvalue size. Generate the third direction eigenvector by cross-multiplying the first direction eigenvector and the second direction eigenvector to ensure its orthogonality to the previous two directions and satisfy the right-hand rule. Transpose the eigenvector matrix to obtain the rotation matrix R’.
[0071] Projecting the ship point cloud data onto the main direction is expressed by the formula:
[0072] Calculate the minimum and maximum coordinates of the projected point cloud:
[0073] Calculate the dimensions of the minimum bounding cuboid:
[0074] Among them, , are the maximum and minimum values of the point cloud in the length direction, , are the maximum and minimum values of the point cloud in the width direction, , are the maximum and minimum values of the point cloud in the height direction.
[0075] On the basis of obtaining the dimensions of the minimum bounding cuboid, smooth the dimensions of the minimum bounding cuboid to reduce the influence of noise, and use the smoothed dimensions as the ship dimensions of the ship to be measured.
[0076] In some embodiments, smoothing the dimensions of the minimum bounding cuboid can be achieved through Kalman filtering.
[0077] Kalman filtering is a recursive filtering algorithm that can effectively estimate the state of the system. Kalman filtering is divided into two steps: prediction (Predict) and update (Update), and the optimal estimate is achieved by dynamically adjusting the weights of the predicted value and the measured value.
[0078] Prediction step:
[0079] State prediction: Based on the estimated value at the previous moment , predict the state at the current moment . A = 1 indicates that the state remains unchanged (such as in a uniform motion model).
[0080] Covariance prediction: Predict the error covariance which reflects the uncertainty of the prediction. Q is the process noise covariance, representing the uncertainty of the model (such as acceleration perturbation).
[0081] Update step: Calculate the Kalman gain:
[0082] Kalman gain determines the weight of the measurement value. R’’ is the measurement noise covariance, representing the noise level of the sensor.
[0083] State update:
[0084] Fuse the predicted value and the measurement value zk, and output the optimal estimate .
[0085] If the measurement noise is small (R’’ → 0), more trust is placed in the measurement value; if the model noise is small (Q → 0), more trust is placed in the predicted value.
[0086] Covariance update:
[0087] Update the estimated error covariance , which reflects the uncertainty of the current state.
[0088] The length, width, and height of the ship obtained after smoothing through Kalman filtering are sent to the remote server via the TCP protocol. Figure 2 is a schematic diagram of the transmitted ship point cloud image provided by the present invention.
[0089] Step 140: Based on the ship point cloud data, calculate the distances between the ship to be measured and the specified lidar at the current moment and the previous moment of the current moment respectively, and perform traffic flow detection based on the distances.
[0090] Specifically, through the processing of the lidar point cloud data in this embodiment, not only can the ship scale be accurately measured, but also the traffic flow data can be obtained in real time, the number, motion state, and direction of the passing ships can be accurately counted, overcoming the problem of inaccurate acquisition of the number of ships in the traditional statistical method, and providing reliable data support for traffic flow analysis.
[0091] For traffic flow detection, it is achieved by analyzing the distances between the ship to be measured and a specified lidar at the current moment and the previous moment of the current moment respectively. The distance here can be calculated by the Euclidean distance formula. Select a specific point (such as the geometric center of the ship or a specific marked point) in the ship point cloud data as the reference point. Use the Euclidean distance formula to calculate the distance between the reference point and the position of the lidar.
[0092] Analyze the changing trend of the distance to judge the motion state of the ship (such as approaching, moving away or stationary). Based on the analysis of the distance change, calculate traffic flow parameters such as the speed, acceleration of the ship, and whether it passes through a specified water area cross-section. In this step, traffic flow detection refers to monitoring the ship traffic conditions in the water area by analyzing parameters such as the distance change between the ship and the specified lidar, the speed of the ship, and the navigation direction.
[0093] In some embodiments, the traffic flow detection based on distance in step 140 specifically includes: Step 141, if the current distance is less than or equal to the preset distance threshold and the ship to be measured has not been counted, then judge the magnitude between the current distance and the previous distance, and perform traffic flow statistics based on the magnitude between the current distance and the previous distance; Step 142, if the current distance is greater than the preset distance threshold and the ship to be measured has been counted, then reset the state of the ship to be measured; Wherein, the current distance refers to the distance between the ship to be measured and the specified lidar at the current moment, and the previous distance refers to the distance between the ship to be measured and the specified lidar at the previous moment of the current moment.
[0094] Specifically, the distance threshold is a preset value for judging whether the ship is approaching or moving away from the lidar. When the current distance is less than or equal to the preset distance threshold, it may indicate that the ship is approaching the lidar, and vice versa, it indicates that the ship is moving away. The distance threshold can be preset according to actual needs.
[0095] The judgment of the ship state includes whether it has been counted. If the ship has not been counted and the current distance is less than or equal to the preset distance threshold, it may indicate that this is a new ship entering the monitoring area (such as a specified water area cross-section), and it is necessary to continue monitoring, such as counting and updating the ship state to "counted". If the ship has been counted and the current distance is greater than the preset distance threshold, it may indicate that this ship has left the monitoring area and its state needs to be reset.
[0096] Here, the method for traffic flow statistics includes making a judgment based on the comparison between the current distance and the previous distance. By analyzing the magnitudes of the current distance and the previous distance, the motion state of the ship (such as approaching, moving away, or stationary) is determined. If the current distance is less than the previous distance, it may indicate that the ship is approaching the lidar; otherwise, it means that the ship has passed through the specified water area section. Through this method, the traffic flow of ships can be counted, that is, the number of ships passing through the monitoring area per unit time.
[0097] Preferably, in step 141, traffic flow statistics based on the comparison between the current distance and the previous distance includes: If the current distance is less than the previous distance, it is determined that the ship to be measured is approaching the specified water area section; If the current distance is greater than the previous distance, it is determined that the ship to be measured has passed through the specified water area section, and the ship to be measured is marked as having been counted.
[0098] In some embodiments, the method for traffic flow statistics includes: 1. Based on the ship point cloud data, store the coordinate trajectory of each ship according to the timestamp.
[0099] 2. Extract the last two positions from the position records, which respectively represent the ship positions at the previous moment and the current moment, denoted as loc_prev and loc_curr.
[0100] 3. Use the Euclidean distance to calculate the planar distance from each position point to the known lidar. dist_prev and dist_curr respectively represent the distances from the previous position and the current position to the lidar.
[0101] 4. Determine whether the ship has passed through the cross-section of the specified water area: If the current distance dist_curr is less than the set threshold and the ship has not been counted yet, further inspection is performed (approaching the water area cross-section and not counted).
[0102] If the current distance dist_curr is smaller than the previous distance dist_prev, it indicates that the ship is approaching the water area cross-section. If the ship approaches the water area cross-section from the specified direction and loc_curr>loc_prev, at this time, the ship is marked as having been counted, indicating that the ship has just passed through the water area cross-section, and the traffic flow count is incremented by 1. If the current distance dist_curr is greater than the threshold, it means that the ship has left the water area. At this time, the ship state is reset so that it can be recounted when passing through again next time.
[0103] Based on any of the above embodiments, after obtaining the ship scale of the ship to be measured in step 130, the method further includes: Based on the radar ship position indicated by the ship point cloud data, convert the radar ship position into the standard coordinate system of the Automatic Identification System (AIS) for ships; Obtain the AIS ship position reported in the AIS data; Match the radar ship position and the AIS ship position at the same moment, and verify the identity of the ship to be measured based on the matching result.
[0104] Specifically, the AIS base station equipment is responsible for the collection, processing, and identification of ship AIS data within a certain range around it, mainly playing roles such as ship positioning and identity recognition. The AIS data content includes dynamic data and static data. Among them, the dynamic data includes: the nine-digit ship code, ship positioning information (longitude and latitude), heading, speed, equipment time, etc.; the static data includes the nine-digit code, ship English name, departure port, destination port, etc.
[0105] AIS relies on ships to report data autonomously (such as position, speed, length / width of the ship), and there are risks of data fraud, signal delay, or equipment failure. For example, ships violating regulations may turn off the AIS or forge information. LiDAR directly measures the true size and precise position of the ship through point clouds, does not rely on the active cooperation of the ship, and can verify the authenticity of AIS data. And when the AIS signal is lost, LiDAR can still provide the position and size. Therefore, in this embodiment, by fusing AIS data and LiDAR data, the identity of the ship to be measured is verified, the credibility of target recognition is improved, and a complete portrait of the target ship is formed.
[0106] First, based on the radar ship position indicated by the ship point cloud data, convert the radar ship position into the standard coordinate system of the Automatic Identification System (AIS) for ships.
[0107] WGS-84 (World Geodetic System 1984) is the standard reference coordinate system for AIS longitude and latitude data.
[0108]
[0109] Among them, r is the radius of the earth. Through this method, the ship position detected by the radar is converted from the geocentric rectangular coordinate system to WGS-84 longitude and latitude.
[0110] AIS data includes the ship's MMSI (Maritime Mobile Service Identity), ship position (longitude and latitude), speed, heading, length, width, etc. LiDAR data includes the longitude and latitude of the geometric center of the ship, length, width, height, and heading (calculated by PCA). Here, the AIS ship position is the ship position in the AIS data, and the radar ship position is the ship position indicated in the LiDAR data.
[0111] Align AIS and lidar data at the same moment through timestamps. Match the radar ship position and the AIS ship position at the same moment. For example, it can be calculating the distance between the radar ship position detected by lidar and the AIS ship position reported by AIS. If the distance is less than the threshold (such as 50 meters), it is considered that the position matching is successful, regarded as the same target, and the identity verification passes; if the distance is greater than the threshold, it is considered that the position matching is unsuccessful and the identity verification fails.
[0112] The longitude, latitude, and semantic data of AIS (such as ship type, destination), combined with the geometric data of lidar, can cross-verify the target identity, improve the credibility of target recognition, and form a complete portrait of the target ship. Through data fusion, it enables managers to achieve a paradigm upgrade from "passive response" to "active warning" and from "local monitoring" to "global intelligence".
[0113] The method provided by the embodiments of the present invention, through the precise fusion of point cloud data and AIS information, solves the limitation that lidar cannot identify the identity of ships, realizes the unity of ship scale detection and identity recognition, and provides comprehensive technical support for application scenarios such as ship warning and scheduling.
[0114] The ship navigation scale and traffic flow detection device provided by the present invention will be described below. The ship navigation scale and traffic flow detection device described below can be mutually corresponding and referred to the ship navigation scale and traffic flow detection method described above.
[0115] Figure 3 is a schematic structural diagram of the ship navigation scale and traffic flow detection device provided by the present invention, as Figure 3 shown, the device includes: A point cloud acquisition unit 310, configured to acquire original lidar point cloud data; A point cloud processing unit 320, configured to perform point cloud processing on the original lidar point cloud data to obtain ship point cloud data of a ship to be measured, where the point cloud processing includes at least one of point cloud screening, coordinate system conversion, and point cloud filtering; A scale calculation unit 330, configured to calculate the size of the minimum circumscribed cuboid of the ship point cloud data based on the main direction of the ship point cloud data, and smooth the size of the minimum circumscribed cuboid to obtain the ship scale of the ship to be measured; A traffic flow detection unit 340, configured to calculate the distances between the ship to be measured and a specified lidar at the current moment and the previous moment of the current moment respectively based on the ship point cloud data, and perform traffic flow detection based on the distances.
[0116] The device provided by the embodiment of the present invention realizes the synchronous monitoring of ship dimensions and traffic flow detection based on lidar point cloud data. This technology can not only accurately measure ship dimensions but also obtain traffic flow data in real time, significantly improving the detection efficiency while reducing equipment costs and deployment complexity.
[0117] In addition, by continuously scanning ships with lidar and combining advanced point cloud data processing algorithms, high-precision ship dimension data (length, width, height) can be calibrated and output in real time, effectively solving the problem of insufficient accuracy in real-time measurement by traditional methods.
[0118] Based on any of the above embodiments, the dimension calculation unit is specifically configured to: Calculate the centroid of the ship point cloud data and determine the main direction of the ship point cloud data based on the centroid; Project the ship point cloud data onto the main direction to obtain projected point cloud data; Determine the dimensions of the minimum bounding cuboid based on the minimum and maximum coordinates of the projected point cloud data in each direction.
[0119] Based on any of the above embodiments, the dimension calculation unit is specifically configured to: Calculate the covariance matrix based on the centroid and the coordinates of each point cloud in the ship point cloud data, and the covariance matrix reflects the distribution of the point cloud in each direction; Perform eigenvalue decomposition on the covariance matrix to obtain the eigenvalues and corresponding eigenvectors in each direction; Take the eigenvector corresponding to the largest eigenvalue as the main direction of the ship point cloud data.
[0120] Based on any of the above embodiments, the traffic flow detection unit is specifically configured to: If the current distance is less than or equal to the preset distance threshold and the ship to be measured has not been counted, then determine the magnitude relationship between the current distance and the previous distance, and perform traffic flow statistics based on the magnitude relationship between the current distance and the previous distance; If the current distance is greater than the preset distance threshold and the ship to be measured has been counted, then reset the status of the ship to be measured; Wherein, the current distance refers to the distance between the ship to be measured and the specified lidar at the current moment, and the previous distance refers to the distance between the ship to be measured and the specified lidar at the previous moment of the current moment.
[0121] Based on any of the above embodiments, the traffic flow detection unit is specifically configured to: If the current distance is less than the previous distance, then determine that the ship to be measured is approaching the specified water area section; If the current distance is greater than the previous distance, it is determined that the ship to be measured has passed through the specified water area section, and the ship to be measured is marked as counted.
[0122] Based on any of the above embodiments, the device further includes an authentication unit for: Based on the radar ship position indicated by the ship point cloud data, converting the radar ship position into the standard coordinate system of the Automatic Identification System (AIS) of ships; Obtaining the AIS ship position reported in the AIS data; Matching the radar ship position and the AIS ship position at the same moment, and authenticating the ship to be measured based on the matching result.
[0123] Based on any of the above embodiments, the point cloud processing unit is specifically used for: Based on the intensity values of the points in the original lidar point cloud data, screening to obtain the initial ship point cloud data of the ship to be measured; Converting the initial ship point cloud data from the lidar coordinate system to the world coordinate system to obtain the converted ship point cloud data; After successively performing multi-level direction filtering, grid sampling, selecting representative points, and removing outliers on the converted ship point cloud data, obtaining the ship point cloud data of the ship to be measured.
[0124] Based on any of the above embodiments, the device further includes an electronic navigational chart module. The electronic navigational chart module realizes the display function of the monitoring area of the system main interface by integrating and accessing electronic navigational chart data in S-57 / S-52 and CJ-57 / CJ-52 standards, and provides functions such as map zooming in, zooming out, moving, superimposed display of ship targets, and point selection and query of ship targets.
[0125] Figure 4 Illustrated is a schematic physical structure diagram of an electronic device, as Figure 4As shown in the figure, the electronic device may include: a processor 410, a communications interface 420, a memory 430, and a communication bus 440. Among them, the processor 410, the communications interface 420, and the memory 430 communicate with each other through the communication bus 440. The processor 410 may call the logical instructions in the memory 430 to execute the method for detecting the navigable scale and traffic flow of a ship. The method includes: obtaining original lidar point cloud data; performing point cloud processing on the original lidar point cloud data to obtain the ship point cloud data of the ship to be measured, where the point cloud processing includes at least one of point cloud screening, coordinate system conversion, and point cloud filtering; calculating the dimensions of the minimum bounding rectangular parallelepiped of the ship point cloud data based on the main direction of the ship point cloud data, and performing smoothing processing on the dimensions of the minimum bounding rectangular parallelepiped to obtain the ship scale of the ship to be measured; calculating the distances between the ship to be measured and a specified lidar at the current moment and the previous moment of the current moment respectively based on the ship point cloud data, and performing traffic flow detection based on the distances.
[0126] In addition, when the logical instructions in the above-mentioned memory 430 are implemented in the form of software functional units and sold or used as independent products, they may be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or a part of this technical solution, may be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of the present invention. The foregoing storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memories (ROM, Read-Only Memory), random access memories (RAM, Random Access Memory), magnetic disks, or optical discs that can store program codes.
[0127] On the other hand, the present invention also provides a computer program product, which includes a computer program. The computer program can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the ship navigation scale and traffic flow detection method provided by each of the above methods. The method includes: acquiring original laser point cloud data; performing point cloud processing on the original laser point cloud data to obtain ship point cloud data of a ship to be measured, where the point cloud processing includes at least one of point cloud screening, coordinate system conversion, and point cloud filtering; calculating the dimensions of the minimum circumscribed cuboid of the ship point cloud data based on the main direction of the ship point cloud data, and performing smoothing processing on the dimensions of the minimum circumscribed cuboid to obtain the ship scale of the ship to be measured; calculating the distances between the ship to be measured and a specified lidar at the current moment and the previous moment of the current moment respectively based on the ship point cloud data, and performing traffic flow detection based on the distances.
[0128] In another aspect, the present invention also provides a non-transitory computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, it is implemented to execute the ship navigation scale and traffic flow detection method provided by each of the above methods. The method includes: acquiring original laser point cloud data; performing point cloud processing on the original laser point cloud data to obtain ship point cloud data of a ship to be measured, where the point cloud processing includes at least one of point cloud screening, coordinate system conversion, and point cloud filtering; calculating the dimensions of the minimum circumscribed cuboid of the ship point cloud data based on the main direction of the ship point cloud data, and performing smoothing processing on the dimensions of the minimum circumscribed cuboid to obtain the ship scale of the ship to be measured; calculating the distances between the ship to be measured and a specified lidar at the current moment and the previous moment of the current moment respectively based on the ship point cloud data, and performing traffic flow detection based on the distances.
[0129] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place, or may be distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art can understand and implement it without creative labor.
[0130] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on such an understanding, the above technical solution, in essence, or the part that contributes to the prior art can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0131] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements on some of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for detecting the navigable dimensions and traffic flow of ships, characterized in that, Including: Obtaining the original lidar point cloud data; Performing point cloud processing on the original lidar point cloud data to obtain the ship point cloud data of the ship to be measured, where the point cloud processing includes at least one of point cloud screening, coordinate system conversion, and point cloud filtering; Based on the main direction of the ship point cloud data, calculating the dimensions of the minimum circumscribed cuboid of the ship point cloud data, and performing smoothing processing on the dimensions of the minimum circumscribed cuboid to obtain the ship scale of the ship to be measured; Based on the ship point cloud data, calculating the distances between the ship to be measured and a specified lidar at the current moment and the previous moment of the current moment respectively, and performing traffic flow detection based on the distances; 2. The ship navigation dimension and traffic flow detection method according to claim 1, characterized in that The calculating the dimensions of the minimum circumscribed cuboid of the ship point cloud data based on the main direction of the ship point cloud data includes: Calculating the centroid of the ship point cloud data, and determining the main direction of the ship point cloud data based on the centroid; Projecting the ship point cloud data onto the main direction to obtain projected point cloud data; Based on the minimum and maximum coordinates of the projected point cloud data in each direction, determining the dimensions of the minimum circumscribed cuboid; 3. The ship navigation dimension and traffic flow detection method according to claim 2, wherein The determining the main direction of the ship point cloud data based on the centroid includes: Calculating a covariance matrix based on the centroid and the coordinates of each point cloud in the ship point cloud data, where the covariance matrix reflects the distribution of the point cloud in each direction; Performing eigenvalue decomposition on the covariance matrix to obtain the eigenvalues and corresponding eigenvectors in each direction; Taking the eigenvector corresponding to the maximum eigenvalue as the main direction of the ship point cloud data; 4. The ship navigation dimension and traffic flow detection method according to claim 1, characterized in that The performing traffic flow detection based on the distances includes: If the current distance is less than or equal to a preset distance threshold and the ship to be measured has not been counted, then judging the magnitude relationship between the current distance and the previous distance, and performing traffic flow statistics based on the magnitude relationship between the current distance and the previous distance; If the current distance is greater than the preset distance threshold and the ship to be measured has been counted, then resetting the state of the ship to be measured; Wherein, the current distance refers to the distance between the ship to be measured and the specified lidar at the current moment, and the previous distance refers to the distance between the ship to be measured and the specified lidar at the previous moment of the current moment; 5. The ship navigation dimension and traffic flow detection method according to claim 4, characterized in that The performing traffic flow statistics based on the magnitude relationship between the current distance and the previous distance includes: If the current distance is less than the previous distance, determining that the ship to be measured is approaching a specified water area section; If the current distance is greater than the previous distance, determining that the ship to be measured has passed the specified water area section, and marking the ship to be measured as having been counted; 6. The ship navigation dimension and traffic flow detection method according to claim 1, wherein After obtaining the ship scale of the ship to be measured, the method further includes: Based on the radar ship position indicated by the ship point cloud data, converting the radar ship position into the standard coordinate system of the Automatic Identification System (AIS) of ships; Obtaining the AIS ship position reported in the AIS data; Matching the radar ship position and the AIS ship position at the same moment, and performing identity verification on the ship to be measured based on the matching result.
7. The ship navigation dimension and traffic flow detection method according to any one of claims 1 to 6, characterized in that Performing point cloud processing on the original lidar point cloud data to obtain the ship point cloud data of the ship to be measured, including: Based on the intensity values of the points in the original lidar point cloud data, screening to obtain the initial ship point cloud data of the ship to be measured; Converting the initial ship point cloud data from the lidar coordinate system to the world coordinate system to obtain the converted ship point cloud data; After performing multi-level direction filtering, grid sampling, selecting representative points, and outlier removal on the converted ship point cloud data in sequence, obtaining the ship point cloud data of the ship to be measured.
8. A device for detecting the navigable dimensions and traffic flow of a ship, characterized in that, Including: A point cloud acquisition unit for acquiring the original lidar point cloud data; A point cloud processing unit for performing point cloud processing on the original lidar point cloud data to obtain the ship point cloud data of the ship to be measured, where the point cloud processing includes at least one of point cloud screening, coordinate system conversion, and point cloud filtering; A scale calculation unit for calculating the dimensions of the minimum circumscribed cuboid of the ship point cloud data based on the main direction of the ship point cloud data, and performing smoothing processing on the dimensions of the minimum circumscribed cuboid to obtain the ship scale of the ship to be measured; A traffic flow detection unit for calculating the distances between the ship to be measured and a specified lidar at the current moment and the previous moment of the current moment respectively based on the ship point cloud data, and performing traffic flow detection based on the distances.
9. An electronic device, comprising a memory, a processor, and a computer program stored on the memory and running on the processor, characterized in that, When the processor executes the computer program, it implements the ship navigation scale and traffic flow detection method according to any one of claims 1 to 7.
10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the ship navigation scale and traffic flow detection method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Cabin position detection method based on multi-sensor fusion
CN112462373A
Ship identification method and device based on laser radar and AIS
CN115308762A
Automatic detection method and device suitable for long reinforcement cage
CN115854883A
Channel ship flow statistical method and system based on laser radar
CN116626649A
Ship size measurement method based on laser radar three-dimensional point cloud algorithm
CN117706577A