Ship head and tail automatic identification method, device, equipment and medium
By installing a cluster of laser scanners on the dock shoreline, the position of the head and tail of the ship is automatically identified, which solves the difficulty of manual identification in automatic ship loading operations, and achieves efficient and accurate automatic identification, supporting unmanned ship loading operations.
Patent Information
- Application Number
- CN202411791768.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-06
- Publication Date
- 2025-03-28
AI Technical Summary
In automatic loading operations, manual observation and determination of the position of the head and tail of the ship is required, resulting in low automation of loading operations and high labor consumption.
By installing a cluster of laser scanners with interval distribution on the dock shoreline, a grid coordinate system is constructed, laser scanners for bows and sterns are automatically selected, point cloud data sets for bows and sterns are obtained, and position coordinates of bows and sterns are determined in the grid coordinate system.
It realizes automatic identification of the head and tail of the ship, saves manpower, improves the accuracy and operating efficiency of identification, and supports the unmannedization of automatic ship loading operations.
Smart Images

Figure CN119723558A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of three-dimensional scanning of ships, and in particular to a method, device, equipment and medium for automatically identifying the bow and stern of a ship. Background Art
[0002] Against the backdrop of rapid development and popularization of smart terminals, the level of automation in ship loading and unloading operations is developing at a high speed. Smart loading technology is an important technology in port intelligence. The smart loading technology of dry bulk terminals requires laser scanning of the ship deck to identify and locate cargo hold hatches, identify tall obstacles such as the cockpit, so as to achieve the purpose of automatically guiding the loader to move safely and accurately.
[0003] At present, it is necessary to manually control the laser scanner on the loader to perform scanning operations based on the monitoring screen. In particular, the starting point of the scanning needs to be determined by manual observation, which has become an obstacle to the realization of unmanned loading operations. The terminal is divided into multiple berths according to the length of the shoreline and the size of the ship, but each berth gives the ship sufficient space to move. The specific berthing position of the ship is not fixed, and it will also move according to the direction of the water flow. This is the main reason why manual observation is still required to determine the position of the ship. Therefore, the intelligent loading technology of the dry bulk terminal urgently needs to be supported by technology that can automatically identify the bow and stern of the ship. Summary of the invention
[0004] The purpose of the present application is to at least provide a method, device, equipment and medium for automatic identification of the bow and stern of a ship, which can at least solve the problem of automatic identification of the starting point of the operation during the automatic loading operation, thereby saving manpower and improving accuracy and operation efficiency.
[0005] To solve the above technical problems, at least one embodiment of the present application provides a method for automatically identifying the bow and stern of a ship, comprising:
[0006] Constructing a grid coordinate system based on a laser scanner cluster installed on the dock shoreline, wherein the laser scanner cluster is formed by a plurality of laser scanners spaced apart and distributed along the dock shoreline direction;
[0007] Selecting a bow scanner and a stern scanner corresponding to the ship to be tested when it is moored in the laser scanner cluster, wherein the bow scanner is used to scan the bow of the ship to be tested to obtain a bow point cloud data set; and the stern scanner is used to scan the stern of the ship to be tested to obtain a stern point cloud data set;
[0008] The bow position coordinates and the stern position coordinates are determined in the grid coordinate system according to the bow point cloud data set and the stern point cloud data set.
[0009] In some optional embodiments, selecting a bow scanner and a stern scanner corresponding to the moored ship to be measured in the laser scanner cluster includes:
[0010] Dividing the scanning area of each laser scanner in the horizontal direction into a left scanning area and a right scanning area;
[0011] Selecting a first laser scanner, the first laser scanner being a laser scanner in the laser scanner cluster whose point cloud quantity in the right scanning area accounts for more than a first preset percentage, the first preset percentage being a value greater than 95%;
[0012] A second laser scanner is selected, the second laser scanner being a laser scanner in the laser scanner cluster whose point cloud quantity in the left scanning area accounts for more than a second preset percentage, the second preset percentage being a value greater than 95%;
[0013] One of the first laser scanner and the second laser scanner is determined as the bow scanner, and the other is determined as the stern scanner.
[0014] In some optional embodiments, selecting the first laser scanner further comprises:
[0015] When the number of laser scanners in the laser scanner cluster whose point cloud number in the right scanning area exceeds a first preset percentage exceeds one, selecting the laser scanner with the largest number of point clouds in the scanning area as the first laser scanner;
[0016] Selecting the second laser scanner also includes: when there is more than one laser scanner in the laser scanner cluster whose point cloud quantity in the left scanning area accounts for more than a second preset percentage, selecting the laser scanner with the largest number of point clouds in the scanning area as the second laser scanner.
[0017] In some optional embodiments, selecting a bow scanner and a stern scanner corresponding to the moored ship to be measured in the laser scanner cluster further includes:
[0018] Turn off other laser scanners in the laser scanner cluster except the first laser scanner and the second laser scanner.
[0019] In some optional embodiments, a grid coordinate system is constructed based on a laser scanner cluster installed on the dock shoreline, including:
[0020] A two-dimensional data grid is constructed with the position of the first laser scanner in the laser scanner cluster as the origin, the direction of the dock shoreline as the x-axis, the direction perpendicular to the dock shoreline as the y-axis, and a grid side length of n.
[0021] In some optional embodiments, determining the bow position coordinates and the stern position coordinates in the grid coordinate system according to the bow point cloud dataset and the stern point cloud dataset includes:
[0022] Based on the two-dimensional data grid, performing two-dimensional rasterization processing on the bow point cloud dataset and the stern point cloud dataset;
[0023] Performing data filtering processing on the bow point cloud data set and the stern point cloud data set after two-dimensional rasterization processing, filtering abnormal point cloud data in the bow point cloud data set and the stern point cloud data set, wherein the abnormal point cloud data includes point cloud data of the cable of the ship to be tested;
[0024] Based on the bow point cloud data set and the stern point cloud data set after data filtering, the bow position coordinates and the stern position coordinates are determined in the grid coordinate system.
[0025] In some optional embodiments, based on the two-dimensional data grid, two-dimensional rasterization processing is performed on the bow point cloud dataset and the stern point cloud dataset, including:
[0026] The coordinates of each point cloud in the bow point cloud data set and the stern point cloud data set are respectively converted to corresponding grids in the two-dimensional data grid, and the grids corresponding to each point cloud are marked to obtain marked grids.
[0027] In some optional embodiments, the data filtering process includes an erosion operation and a dilation operation performed sequentially.
[0028] In some optional embodiments, determining the bow position coordinates and the stern position coordinates in the grid coordinate system based on the bow point cloud data set and the stern point cloud data set after data filtering includes:
[0029] Taking the bow scanner or the stern scanner as the origin and the dock shoreline direction as the reference line, the projection coordinates of each marked grid are determined on the reference line;
[0030] The grid corresponding to the minimum coordinate value and the grid corresponding to the maximum coordinate value in the projection coordinates are selected as the bow position coordinates and the stern position coordinates.
[0031] In some optional embodiments, the automatic identification method further includes:
[0032] The scanning starting point of the ship to be measured is determined according to the bow position coordinates and the stern position coordinates, and the scanning starting point is used for preliminary positioning of the ship to be measured during the automatic loading operation.
[0033] In some optional embodiments, a scanning angle of each laser scanner in the laser scanner cluster does not exceed 90 degrees, and the scanning angle includes a horizontal scanning angle and a vertical scanning angle.
[0034] At least one embodiment of the present application further provides a device for automatically identifying the bow and stern of a ship, comprising:
[0035] A construction module, for constructing a grid coordinate system based on a laser scanner cluster installed on the dock shoreline, wherein the laser scanner cluster is formed by a plurality of laser scanners distributed at intervals along the dock shoreline direction;
[0036] A selection module is used to select a bow scanner and a stern scanner corresponding to the ship to be tested when it is moored in the laser scanner cluster, wherein the bow scanner is used to scan the bow of the ship to be tested to obtain a bow point cloud data set; and the stern scanner is used to scan the stern of the ship to be tested to obtain a stern point cloud data set;
[0037] A determination module is used to determine the bow position coordinates and the stern position coordinates in the grid coordinate system according to the bow point cloud data set and the stern point cloud data set.
[0038] At least one embodiment of the present application also provides an electronic device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the above-mentioned method for automatic identification of the bow and stern of a ship.
[0039] At least one embodiment of the present application further provides a computer-readable storage medium storing a computer program, which implements the above-mentioned method for automatically identifying the bow and stern of a ship when executed by a processor.
[0040] In the method, device, equipment and medium for automatically identifying the bow and stern of a ship provided in the present application, a grid coordinate system is constructed by a laser scanner cluster formed by multiple laser scanners installed on the dock shoreline and distributed at intervals along the dock shoreline direction, and a bow scanner and a stern scanner are automatically selected and determined in the laser scanner cluster, so as to use the bow point cloud data set and the stern point cloud data set obtained by the bow scanner and the stern scanner respectively, so as to determine the bow position coordinates and the stern position coordinates corresponding to the ship to be tested in the grid coordinate system, so as to realize automatic identification of the operation starting point during the automatic loading operation, thereby saving manpower, improving accuracy and operation efficiency. In addition, in the embodiment of the present application, the bow and stern of the ship at the berthing position are determined in the grid coordinate system according to the bow point cloud data set and the stern point cloud data set, which reduces the amount of data compared with the method of scanning the entire ship in the related art, and ensures the efficiency of data processing.
[0041] The automatic identification method for the bow and stern of a ship provided in the embodiment of the present application accurately identifies the bow and stern of the ship to be tested by automatically scanning and identifying the bow and stern of the ship, and locates the positions of the bow and stern, thereby meeting the requirements of automatic loading operations for preliminary positioning of the ship, and is conducive to realizing unmanned loading operations. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] One or more embodiments are exemplarily described by the pictures in the corresponding drawings, and these exemplary descriptions do not constitute limitations on the embodiments.
[0043] Figure 1 is a flow chart of a method for automatically identifying the bow and stern of a ship provided by an embodiment of the present application;
[0044] Figure 2 It is a schematic diagram of the installation position and scanning range of the laser scanner in the automatic identification method of the bow and stern of a ship provided by an embodiment of the present application;
[0045] Figure 3 It is a flowchart of selecting a bow scanner and a stern scanner in a method for automatically identifying the bow and stern of a ship provided by an embodiment of the present application;
[0046] Figure 4 This is a schematic diagram of point cloud distribution of a ship scanned by a laser scanner in a method for automatically identifying the bow and stern of a ship provided in an embodiment of the present application;
[0047] Figure 5 It is a flow chart of determining the bow position coordinates and the stern position coordinates in a grid coordinate system in a method for automatically identifying the bow and stern of a ship provided by an embodiment of the present application;
[0048] Figure 6It is a projection grid of a bow point cloud dataset and a stern point cloud dataset on a horizontal plane and a schematic diagram of the projection on the dock shoreline after filtering out the cable point cloud, provided by an embodiment of the present application;
[0049] Figure 7 is a flow chart of a method for automatically identifying the bow and stern of a ship provided by another embodiment of the present application;
[0050] Figure 8 It is a schematic diagram of the recognition result of the automatic recognition method of the bow and stern of a ship of the present application;
[0051] Fig. 9 is a block diagram of an automatic identification device for the bow and stern of a ship provided by another embodiment of the present application;
[0052] Fig.10 It is a schematic diagram of the structure of an electronic device provided by another embodiment of the present application. DETAILED DESCRIPTION
[0053] To make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the embodiments of the present application will be described in detail below in conjunction with the accompanying drawings. However, it will be appreciated by those skilled in the art that in the present application, many technical details are proposed in order to enable the reader to better understand the present application. However, even without these technical details and various changes and modifications based on the following embodiments, the technical scheme claimed in the present application can also be implemented. The division of the following embodiments is for the convenience of description, and the specific implementation of the present application should not be construed as any limitation, and the various embodiments can be combined and referenced with each other under the premise of no contradiction.
[0054] In order to solve the technical problem that the bow and stern positions of a ship still require manual observation, the present application proposes a method for automatic identification of the bow and stern of a ship. The implementation details of the automatic identification method of the bow and stern of a ship in this embodiment are specifically described below. The following content is only the implementation details provided for ease of understanding and is not necessary for the implementation of this solution.
[0055] Embodiment 1:
[0056] The method for automatically identifying the bow and stern of a ship in this embodiment can be applied to electronic devices with communication, computing and data storage capabilities. The specific process can be as follows: Figure 1 As shown, the automatic identification method of the bow and stern of the ship includes:
[0057] Step S110, based on a grid coordinate system of a laser scanner cluster installed on the dock shoreline, the laser scanner cluster is formed by a plurality of laser scanners spaced apart and distributed along the dock shoreline direction.
[0058] Specifically, if Figure 2As shown, a plurality of mooring piles 10 are arranged in front of the pier in the direction of the pier shoreline X. When the ship is docked at the pier shoreline, one end of the cable 30 located at the bow and / or stern of the ship will be tied to the mooring pile 10 on the shore, and the other end will be tied to the cable car or mooring pile on the ship. The number of laser scanners can be determined according to the number of mooring piles, for example, the number of laser scanners can be consistent with the number of mooring piles, and of course, the number of laser scanners can also be inconsistent with the number of mooring piles.
[0059] Specifically, when installing multiple laser scanners, the positions of the multiple laser scanners are first arranged. Each laser scanner can be installed between two mooring piles, or can be installed at equal or unequal intervals. For example, the interval between two laser scanners can be about 50 meters. For example, Figure 2 As shown, a laser scanner 20 is installed at the middle position between every two mooring piles 10 along the dock shoreline direction X, the number of laser scanners 20 is, for example, 20, and the multiple laser scanners 20 are distributed at intervals along the dock shoreline direction X. The multiple laser scanners 20 include laser scanners located at the bow, stern and side of the ship, so as to form a laser scanner cluster in the form of a laser array to scan the ship to be tested 40 docked at the dock. The laser scanner is, for example, a laser.
[0060] In this embodiment, if a small number of laser scanners are used, a larger scanning angle and a long distance are required. Since the accuracy of the point cloud decreases with distance, and there will be interference from other passing ships, obstacles, etc. nearby. Therefore, the design uses a larger number of laser scanners. Due to the large number of laser scanners, low-cost lasers with low power and short range can be selected to reduce the overall cost. In addition, due to the large number of laser scanners, when scanning the ship to be measured, there is always at least one laser scanner that is relatively close to the bow or stern. The closer the distance, the higher the accuracy of the point cloud. The point cloud is obtained by the laser scanner emitting laser signals to the surroundings and then collecting the reflected laser signals.
[0061] To avoid interference, in some examples, the scanning angle of each laser scanner in the laser scanner cluster installed on the dock shoreline does not exceed 90 degrees, and the scanning angle includes a horizontal scanning angle and a vertical scanning angle.
[0062] Specifically, refer to Figure 2After the position of each laser scanner 20 is fixed, the scanning angle of each laser scanner 20 needs to be set. The scanning angle is set to ensure that the bow and stern of any ship after berthing are covered by the scanning range of at least one laser scanner. Specifically, when setting the scanning angle of the laser scanner 20, if the scanning angle is too small, there will be a scanning blind area between two adjacent laser scanners, and if the scanning angle is too large, two adjacent laser scanners will be able to scan too much bow (head) or stern, which will cause trouble in the automatic selection of the bow scanner and the stern scanner. In this embodiment, in order to avoid the influence of the above-mentioned interference on each laser scanner, the scanning angle of each laser scanner can be set not to exceed 90 degrees.
[0063] Specifically, the scanning angle of the laser scanner includes a horizontal scanning angle and a vertical scanning angle. The horizontal scanning angle is a scanning angle in the horizontal direction based on the horizontal plane, and the vertical scanning angle is a scanning angle looking upward based on the horizontal plane. In order to prevent the laser scanner from scanning objects on the shore, the horizontal scanning angle of the laser scanner shall not exceed 90 degrees. At the same time, in order to prevent the laser scanner from scanning a ship loader or unloader, the vertical scanning angle of the laser scanner shall not exceed 90 degrees.
[0064] In some embodiments, in step S110, a grid coordinate system is constructed based on a laser scanner cluster installed on the dock shoreline, including: taking the position of the first laser scanner in the laser scanner cluster as the origin, the dock shoreline direction as the x-axis, the direction perpendicular to the dock shoreline as the y-axis, and constructing a two-dimensional data grid with a grid side length of n.
[0065] Specifically, the direction of the wharf is, for example, east-west. When constructing a grid coordinate system, the location of the westernmost laser scanner can be taken as the origin, the direction of the wharf shoreline can be taken as the x-axis, the direction perpendicular to the shoreline can be taken as the y-axis, and the grid side length of the grid is set to n for construction to obtain a two-dimensional data grid, wherein the grid side length can be set according to actual needs, for example, the grid side length is 10 cm, and the number of rows and columns of the grid can also be set according to the size of the ship. For example, a two-dimensional data grid with 10,000 rows and 1,000 columns can be set to obtain a projection grid two-dimensional array P[10000, 1000] to meet the three-dimensional scanning needs of a ship to be measured.
[0066] In other embodiments, the location of the easternmost laser scanner can be used as the origin, the direction of the dock shoreline can be used as the x-axis, the direction perpendicular to the shoreline can be used as the y-axis, and the grid side length can be set to n to obtain a two-dimensional data grid.
[0067] Step S112, selecting a bow scanner and a stern scanner corresponding to the ship to be tested when it is moored in the laser scanner cluster, the bow scanner is used to scan the bow of the ship to be tested to obtain a bow point cloud data set; the stern scanner is used to scan the stern of the ship to be tested to obtain a stern point cloud data set.
[0068] Specifically, when it is necessary to locate the bow and stern of the ship to be tested, it is necessary to select the bow scanner and stern scanner corresponding to the ship to be tested when it is moored in the laser scanner cluster, so as to use the bow scanner to scan the bow of the ship to be tested to obtain the bow point cloud data set, and use the stern scanner to scan the stern of the ship to be tested to obtain the stern point cloud data set. The bow point cloud data set is a collection of multiple point cloud data obtained by the bow scanner scanning, emitting laser signals around the bow, and then collecting the reflected laser signals. The stern point cloud data set is a collection of multiple point cloud data obtained by the stern scanner scanning, emitting laser signals around the stern, and then collecting the reflected laser signals.
[0069] Step S114, determining the bow position coordinates and the stern position coordinates in the grid coordinate system according to the bow point cloud data and the stern point cloud data.
[0070] In this embodiment, a grid coordinate system is constructed by a laser scanner cluster formed by multiple laser scanners installed on the dock shoreline and distributed at intervals along the dock shoreline direction. The bow scanner and the stern scanner are automatically selected and determined in the laser scanner cluster. The bow point cloud data set and the stern point cloud data set obtained by the bow scanner and the stern scanner are used to determine the bow position coordinates and the stern position coordinates corresponding to the ship to be tested in the grid coordinate system, so as to realize automatic identification of the operation starting point during the automatic loading operation, thereby saving manpower and improving accuracy and operation efficiency. In addition, in the embodiment of the present application, the bow and stern of the ship at the berthing position are determined in the grid coordinate system according to the bow point cloud data set and the stern point cloud data set, which reduces the amount of data compared to the method of scanning the entire ship in the related art, and ensures the efficiency of data processing.
[0071] The automatic identification method for the bow and stern of a ship provided in the embodiment of the present application accurately identifies the bow and stern of the ship to be tested by automatically scanning and identifying the bow and stern of the ship, and locates the positions of the bow and stern, thereby meeting the requirements of automatic loading operations for preliminary positioning of the ship, and is conducive to realizing unmanned loading operations.
[0072] Embodiment 2:
[0073] This embodiment mainly shows an implementation method of selecting a bow scanner and a stern scanner corresponding to the moored ship to be tested in the laser scanner cluster. The bow scanner and the stern scanner corresponding to the moored ship to be tested in the laser scanner cluster can be selected by Figure 3 The steps shown in the figure are implemented, including:
[0074] Step S210: Divide the scanning area of each laser scanner in the horizontal direction into a left scanning area and a right scanning area.
[0075] Specifically, the scanning area of each laser scanner is evenly divided, such as Figure 2 As shown, for example, with the direction perpendicular to the dock shoreline as the center line, the scanning area of each laser scanner 20 is evenly divided into a left scanning area and a right scanning area. The point cloud obtained by scanning the left scanning area can be marked as the point cloud of the left scanning area, and the point cloud obtained by scanning the right scanning area can be marked as the point cloud of the right scanning area, so that all the point clouds in the entire scanning area of each laser scanner are divided into two categories: left point cloud and right point cloud. When the mooring of the ship to be tested berthed at the dock is stable, all laser scanners of the entire dock shoreline can be started for scanning. When all laser scanners are started for scanning, it is necessary to automatically select the best two laser scanners in the laser scanner cluster as the bow scanner and the stern scanner according to the proportion of the number of point clouds on both sides.
[0076] Step S212, selecting a first laser scanner, where the first laser scanner is a laser scanner in the laser scanner cluster whose point cloud quantity in the right scanning area accounts for more than a first preset percentage, and the first preset percentage is a value greater than 95%.
[0077] Specifically, during the bow scanning process, the laser scanner selected is the laser scanner that is closest to the bow and is not blocked by the hull. For the laser scanner located at the bow or the laser scanner located at the stern, the point cloud ratio obtained by scanning the left scanning area and the right scanning area of each laser scanner can be used to determine the point cloud ratio.
[0078] like Figure 2 As shown, the direction from the bow to the stern of the ship to be tested 40 is from west to east (from left to right in the figure), and the first laser scanner 201 is used as a laser scanner located at the bow for example. It can be understood that, with reference to Figure 2As shown, when the laser scanner 20 is closest to the bow and is not blocked by the hull, it may be selected as the bow scanner. Considering the triangular structure of the cross section of the bow, the number of point clouds in the right scanning area of the laser scanning as the bow scanner is relatively large, while the number of point clouds in the left scanning area is relatively small, and the number of point clouds in the right scanning area is much larger than the number of point clouds in the left scanning area. Therefore, it is necessary to select a laser scanner with point clouds distributed as described above in the laser scanner cluster as the bow scanner. Therefore, the first laser scanner 201 whose percentage of point clouds in the right scanning area exceeds a first preset percentage is selected as the bow scanner in the laser scanner cluster. Among them, the percentage of the number of point clouds in the right scanning area of each laser scanner is the ratio of the number of point clouds in the right scanning area of the laser scanner to the number of point clouds in the entire scanning area of the laser scanner. As shown Figure 4 As shown, a schematic diagram of point cloud distribution of a ship scanned by a laser scanner is exemplified.
[0079] Because it is possible that the point cloud obtained by the bow scanner is distributed in the left scanning area and the right scanning area, and the existence of a small number of non-hull point clouds must be considered, and in order to screen out laser scanners located on the side of the hull, laser scanners that cannot scan the bow or stern, and laser scanners that are too far away from the ship to scan the ship, the first preset percentage is set to a value greater than 95%. The first preset percentage is, for example, 95%, 96%, 97%, 98%, and 99%, and no specific limitation is made here.
[0080] Among them, reference Figure 2 The laser scanners located on the side of the hull include a third laser scanner 203 in which the number of point clouds in the left scanning area and the number of point clouds in the right scanning area in the laser scanner cluster account for 50%; the laser scanners that are far away from the ship and cannot scan the ship include: a fourth laser scanner 204 in the laser scanner cluster in which the number of point clouds in the scanning area is close to zero, and a fifth laser scanner (not shown in the figure) in which the number of point clouds in the left scanning area or the number of point clouds in the right scanning area in the laser scanner cluster accounts for no more than 95%.
[0081] In some embodiments, selecting the first laser scanner also includes: when the number of laser scanners in the laser scanner cluster whose point cloud number in the right scanning area exceeds a first preset percentage exceeds one, selecting the laser scanner with the largest number of point clouds in the scanning area as the first laser scanner.
[0082] Specifically, when the bow scanner is selected and determined by the proportion of the number of point clouds in the right scanning area in the laser scanner cluster, it is possible that the proportion of the number of point clouds in the right scanning area exceeds the first preset percentage and there is more than one laser scanner. For example, there are two laser scanners as mentioned above. In this case, the number of point clouds in the entire scanning area of the two laser scanners can be compared, and the laser scanner with the largest number of point clouds in the scanning area can be selected as the first laser scanner. A larger number of point clouds means more accurate positioning of the bow position information.
[0083] Step S214, selecting a second laser scanner, where the second laser scanner is a laser scanner in the laser scanner cluster whose point cloud quantity in the left scanning area accounts for more than a second preset percentage, and the second preset percentage is a value greater than 95%.
[0084] Specifically, the selection of the second laser scanner is the same as the selection of the first laser scanner. In the process of scanning the stern, the laser scanner selected is the laser scanner closest to the stern and not blocked by the hull. Figure 2 As shown, the direction from the bow to the stern of the ship is still from west to east, and the second laser scanner 202 is taken as an example of a laser scanner located at the stern. When the laser scanning is closest to the stern and is not blocked by the hull, it may be selected as a stern scanner. Considering the cross-sectional triangular structure of the stern, the number of point clouds in the left scanning area of the laser scanning as the stern scanner is large, while the number of point clouds in the right scanning area is small, and the number of point clouds in the left scanning area is much larger than the number of point clouds in the right scanning area. Therefore, it is necessary to select a laser scanner with point clouds distributed as described above in the laser scanner cluster as a stern scanner. Therefore, the second laser scanner 202 whose proportion of the point cloud number in the left scanning area exceeds the second preset percentage is selected as the stern scanner in the laser scanner cluster. The second preset percentage is a value greater than 95%, and the second preset percentage is, for example, 95%, 96%, 97%, 98%, 99%, and is not specifically limited here. The first preset percentage can be the same as the second preset percentage.
[0085] In some embodiments, selecting the second laser scanner also includes: when the number of laser scanners in the laser scanner cluster whose point cloud number in the left scanning area exceeds a second preset percentage exceeds one, selecting the laser scanner with the largest number of point clouds in the scanning area as the second laser scanner.
[0086] Specifically, when the stern scanner is selected by the proportion of the number of point clouds in the left scanning area in the laser scanner cluster, it is possible that the proportion of the number of point clouds in the left scanning area exceeds the second preset percentage. If there is more than one laser scanner, for example, there are two laser scanners as mentioned above. In this case, the number of point clouds in the entire scanning area of the two laser scanners can be compared, and the laser scanner with the largest number of point clouds in the scanning area can be selected as the second laser scanner. A larger number of point clouds means more accurate positioning of the stern position information.
[0087] Step S216, determining one of the first laser scanner and the second laser scanner as a bow scanner, and the other as a stern scanner.
[0088] Specifically, in the initial positioning during the automatic loading operation, the bow and stern may not be accurately identified, so that the scanning starting point of the ship to be measured can be obtained by determining the bow position coordinates and the stern position coordinates. Therefore, one of the selected first laser scanner and the second laser scanner can be determined as the bow scanner, and the other as the stern scanner. That is, the first laser scanner is used as the bow scanner and the second laser scanner is used as the stern scanner; or the second laser scanner is used as the bow scanner and the first laser scanner is used as the stern scanner.
[0089] Step S218, shutting down other laser scanners in the laser scanner cluster except the first laser scanner and the second laser scanner.
[0090] Specifically, after the bow scanner and the stern scanner are selected, other laser scanners that are not related to the bow position coordinates and the stern position coordinates can be turned off to remove the laser scanners that may bring interference point clouds, and finally only the bow scanner and the stern scanner are retained.
[0091] Embodiment three:
[0092] In this embodiment, an implementation method of determining the bow position coordinates and the stern position coordinates in a grid coordinate system based on the bow point cloud dataset and the stern point cloud dataset is mainly shown. In some embodiments, the bow position coordinates and the stern position coordinates are determined in a grid coordinate system based on the bow point cloud dataset and the stern point cloud dataset. Figure 5 The steps shown are implemented, specifically including:
[0093] Step S310: performing two-dimensional rasterization processing on the bow point cloud dataset and the stern point cloud dataset based on the two-dimensional data grid.
[0094] In some embodiments, based on the two-dimensional data grid, two-dimensional rasterization processing is performed on the bow point cloud dataset and the stern point cloud dataset, including:
[0095] The coordinates of each point cloud in the bow point cloud data set and the stern point cloud data set are respectively converted to the corresponding grids in the two-dimensional data grid, and the grids corresponding to each point cloud are marked to obtain the marked grids; the point cloud coordinates include longitude, latitude and altitude.
[0096] Specifically, each point cloud p obtained by each laser scanner has three coordinate parameters x, y, and z, where x, y, and z represent longitude, latitude, and altitude, respectively. In the constructed two-dimensional data grid, a two-dimensional array P[i, j] is set for each point cloud, and the initial value P of the two-dimensional array set for all point clouds is i,j All of them are 0, i is the maximum value of x divided by n and rounded to an integer, and j is the maximum value of y divided by n and rounded to an integer. Traverse each point cloud in the bow scanner and the stern scanner, and mark the corresponding grid in which it falls in the two-dimensional data grid, for example, p i,j becomes the value 1.
[0097] Step S312, performing data filtering processing on the bow point cloud dataset and the stern point cloud dataset after two-dimensional rasterization processing, filtering out abnormal point cloud data in the bow point cloud dataset and the stern point cloud dataset, wherein the abnormal point cloud data includes the point cloud data of the cable of the ship to be tested.
[0098] Specifically, after obtaining the bow point cloud data set and the stern point cloud data set after two-dimensional rasterization processing, it is necessary to perform data filtering processing on the bow point cloud data set and the stern point cloud data set respectively to filter out abnormal point cloud data in the bow point cloud data set and the stern point cloud data set. In this embodiment, the abnormal point cloud data is, for example, the point cloud data of the cable of the ship to be tested, so as to avoid the point cloud data of the cable interfering with the determination of the bow position coordinates and the stern position coordinates, thereby affecting the positioning accuracy.
[0099] However, the point cloud data of the cable is formed by isolated points. In some embodiments, the data filtering process includes corrosion operation and expansion operation performed in sequence. Specifically, the two-dimensional array P[i, j] corresponding to each point cloud is first subjected to corrosion operation m times, and then to expansion operation m times, where m should not be less than the diameter of the cable divided by n. In this embodiment, the corrosion operation can query the 8 adjacent values around each value in the two-dimensional array P[i, j], and if one value is 0, the value becomes 0, otherwise the value is not changed. The expansion operation can query the 8 adjacent values around each value in the two-dimensional array P[i, j], and if one value is 1, the value becomes 1, otherwise the value is not changed. In this process, the principle of removing the cable in the grid by using the algorithm of corrosion first and then expansion is that the cable disappears after corrosion and the hull shrinks, and the cable cannot be restored after expansion while the hull can be restored. Therefore, after the corrosion operation and expansion operation performed above, the point cloud data of the cable in the bow point cloud data set and / or the stern point cloud data set can be automatically filtered out.
[0100] Step S314, based on the bow point cloud data set and the stern point cloud data set after data filtering, the bow position coordinates and the stern position coordinates are determined in the grid coordinate system.
[0101] After data filtering of the bow point cloud data set and the stern point cloud data set, the bow point cloud data set and the stern point cloud data set that can accurately locate the bow and the stern are obtained, thereby improving the positioning accuracy.
[0102] In some embodiments, based on the bow point cloud dataset and the stern point cloud dataset after data filtering, determining the bow position coordinates and the stern position coordinates in the grid coordinate system includes:
[0103] Taking the bow scanner or the stern scanner as the origin and the dock shoreline direction as the reference line, the projection coordinates of each marked grid are determined on the reference line;
[0104] The grid corresponding to the minimum coordinate value and the grid corresponding to the maximum coordinate value in the projection coordinates are selected as the bow position coordinates and the stern position coordinates.
[0105] Specifically, taking any one of the laser scanners of the bow scanner and the stern scanner as the origin and the direction of the line connecting the bow scanner and the stern scanner, that is, the direction of the dock shoreline as the baseline, calculate the projection coordinates of the projection points on the baseline of all grids with a value of 1 in the two-dimensional array P[i, j] corresponding to each point cloud in the two-dimensional data grid, select the two grids corresponding to the two projection points with the minimum and maximum coordinate values after projection, and record the positions P[i, j] corresponding to the two grids, that is, the positions of the grids are represented by i and j respectively, where i is the i-th in the horizontal direction of the two-dimensional data grid, and j is the j-th in the vertical direction of the two-dimensional data grid.
[0106] Specifically, since the direction of the dock shoreline is the same as the horizontal direction (X axis) in the two-dimensional data grid, the largest i and the smallest i are used as the bow position coordinates and the stern position coordinates in the two-dimensional data grid, respectively, to obtain the endpoints of the grid along the dock shoreline direction, that is, the bow or stern is the two end points along the dock shoreline direction from a bird's-eye view. The bow position coordinates and the stern position coordinates can both be represented by the coordinate values on the x-axis.
[0107] like Figure 6 As shown, the projection grids of the bow point cloud dataset and the stern point cloud dataset on the horizontal plane and the projection schematic diagram on the dock shoreline after filtering out the cable point cloud are shown, wherein area 1 represents the grid projection of the cable point cloud, area 2 represents the grid projection of the hull point cloud, and area 3 represents the grid projection of the area without point cloud; area 4 represents the projection of the bow point cloud dataset and the stern point cloud dataset on the dock shoreline after filtering out the cable point cloud data.
[0108] In one embodiment, when multiple point clouds are close to each other, two-dimensional rasterization processing is performed on the bow point cloud dataset and the stern point cloud dataset. After the rasterization processing, several point clouds may fall in the same grid at the same time in the bow point cloud dataset or the stern point cloud dataset. When the grids representing the bow and the stern are found, that is, the positions P[i, j] corresponding to the two grids are recorded, the three coordinate parameters x, y, and z of all the point clouds in the two grids are searched, and the point cloud with the largest z value in the two grids is selected to represent the bow or the stern, and the z values of all the point clouds falling on the surrounding grids P[i±1, j±1] of the two grids are searched. If the z value of the point cloud representing the bow or the stern is the largest, the result is normal; if the z value of the point cloud representing the bow or the stern is not the largest, the result is abnormal and an error is reported.
[0109] Embodiment 4:
[0110] The method for automatically identifying the bow and stern of a ship in this embodiment can be applied to electronic devices with communication, computing and data storage capabilities. The specific process can be as follows: Figure 7 As shown, including:
[0111] Step S410: constructing a grid coordinate system based on a laser scanner cluster installed on the dock shoreline, where the laser scanner cluster is formed by a plurality of laser scanners spaced apart and distributed along the dock shoreline direction;
[0112] Step S412: Select a bow scanner and a stern scanner corresponding to the ship to be tested when it is moored in the laser scanner cluster, wherein the bow scanner is used to scan the bow of the ship to be tested to obtain a bow point cloud data set; and the stern scanner is used to scan the stern of the ship to be tested to obtain a stern point cloud data set;
[0113] Step S414, determining the bow position coordinates and the stern position coordinates in the grid coordinate system according to the bow point cloud data set and the stern point cloud data set;
[0114] Step S416: determine the scanning starting point of the ship to be measured according to the bow position coordinates and the stern position coordinates. The scanning starting point is used for preliminary positioning of the ship to be measured during the automatic loading operation.
[0115] The implementation method of steps S410 to S414 of the embodiment of the present application is the same as that of steps S110 to S114 of the above embodiment, and will not be repeated here.
[0116] Specifically, in step S416, after the bow position coordinates and the stern position coordinates are determined, the scanning starting point of the ship to be tested during the automatic loading operation can be determined based on the bow position coordinates and the stern position coordinates, thereby achieving the preliminary positioning of the ship to be tested during the automatic loading operation.
[0117] like Figure 2 As shown, taking a ship 40 to be tested moored at a berth as an example, the ship chart after mooring records that the length of the ship 40 to be tested is 225 meters. The recognition result of the automatic recognition method for the bow and stern of a ship provided by the embodiment of the present application is as follows: Figure 8 As shown, the x-coordinate of the bow A is 518.0, the x-coordinate of the stern B is 743.4, and the x-coordinate interval between the bow A and the stern B is about 224.6 meters. The recognition result is accurate and meets the requirements of automatic loading operations for the initial positioning of the ship.
[0118] Embodiment five:
[0119] Another embodiment of the present application relates to an automatic identification device for the bow and stern of a ship. The implementation details of the automatic identification device for the bow and stern of a ship of this embodiment are specifically described below. The following content is only for the convenience of understanding the implementation details, and is not necessary for the implementation of this solution. The schematic diagram of the automatic identification device for the bow and stern of a ship of this embodiment can be as follows Fig. 9 As shown, the automatic identification device for the bow and stern of a ship includes a building module, a building module 100, a selection module 200 and a determination module 300.
[0120] A construction module 100 is used to construct a grid coordinate system based on a laser scanner cluster installed on the dock shoreline, where the laser scanner cluster is formed by a plurality of laser scanners spaced apart and distributed along the dock shoreline direction;
[0121] The selection module 200 is used to select a bow scanner and a stern scanner corresponding to the ship to be tested when it is moored in the laser scanner cluster, wherein the bow scanner is used to scan the bow of the ship to be tested to obtain a bow point cloud data set; and the stern scanner is used to scan the stern of the ship to be tested to obtain a stern point cloud data set;
[0122] The determination module 300 is used to determine the bow position coordinates and the stern position coordinates in the grid coordinate system according to the bow point cloud data set and the stern point cloud data set.
[0123] In some embodiments, the selection module 200 is further used to divide the scanning area of each laser scanner in the horizontal direction into a left scanning area and a right scanning area;
[0124] Selecting a first laser scanner, the first laser scanner being a laser scanner in the laser scanner cluster whose point cloud quantity in the right scanning area accounts for more than a first preset percentage, the first preset percentage being a value greater than 95%;
[0125] A second laser scanner is selected, where the second laser scanner is a laser scanner in the laser scanner cluster whose point cloud quantity in the left scanning area accounts for more than a second preset percentage, and the second preset percentage is a value greater than 95%;
[0126] One of the first laser scanner and the second laser scanner is determined as a bow scanner, and the other is determined as a stern scanner.
[0127] In some embodiments, the selection module 200 is further configured to select the laser scanner with the largest number of point clouds in the scanning area as the first laser scanner when the number of laser scanners in the laser scanner cluster whose percentage of the point clouds in the right scanning area exceeds a first preset percentage exceeds one;
[0128] Selecting the second laser scanner also includes: when there is more than one laser scanner in the laser scanner cluster whose point cloud quantity in the left scanning area accounts for more than a second preset percentage, selecting the laser scanner with the largest number of point clouds in the scanning area as the second laser scanner.
[0129] In some embodiments, the selection module 200 is further used to shut down other laser scanners in the laser scanner cluster except the first laser scanner and the second laser scanner.
[0130] In some embodiments, the determination module 300 is further used to perform two-dimensional rasterization processing on the bow point cloud dataset and the stern point cloud dataset based on the two-dimensional data grid;
[0131] The bow point cloud data set and the stern point cloud data set after two-dimensional rasterization are respectively subjected to data filtering processing, and abnormal point cloud data in the bow point cloud data set and the stern point cloud data set are filtered, and the abnormal point cloud data include the point cloud data of the cable of the ship to be tested;
[0132] Based on the bow point cloud data set and the stern point cloud data set after data filtering, the bow position coordinates and the stern position coordinates are determined in the grid coordinate system.
[0133] In some embodiments, the determination module 300 is also used to convert each point cloud coordinate in the bow point cloud data set and the stern point cloud data set to a corresponding grid in the two-dimensional data grid, mark the grid corresponding to each point cloud, and obtain the marked grids.
[0134] In some embodiments, the determination module 300 is further used to determine the projection coordinates of each marked grid on the reference line with the bow scanner or the stern scanner as the origin and the direction of the dock shoreline as the reference line;
[0135] The grid corresponding to the minimum coordinate value and the grid corresponding to the maximum coordinate value in the projection coordinates are selected as the bow position coordinates and the stern position coordinates.
[0136] In some embodiments, the determination module 300 is further used to determine the scanning starting point of the ship to be measured according to the bow position coordinates and the stern position coordinates, and the scanning starting point is used for the preliminary positioning of the ship to be measured during the automatic loading operation.
[0137] It is worth mentioning that all modules involved in this embodiment are logic modules. In practical applications, a logic unit can be a physical unit, a part of a physical unit, or a combination of multiple physical units. In addition, in order to highlight the innovative part of this application, this embodiment does not introduce units that are not closely related to solving the technical problems proposed by this application, but this does not mean that there are no other units in this embodiment.
[0138] Embodiment six:
[0139] Another embodiment of the present application relates to an electronic device, such as Fig.10 As shown, it includes: at least one processor 901; and a memory 902 that is communicatively connected to the at least one processor 901; wherein the memory 902 stores instructions that can be executed by the at least one processor 901, and the instructions are executed by the at least one processor 901, so that the at least one processor 901 can execute the automatic identification method of the bow and stern of the ship in the above-mentioned embodiments.
[0140] Among them, the memory and the processor are connected in a bus manner, and the bus may include any number of interconnected buses and bridges, and the bus connects various circuits of one or more processors and memories together. The bus can also connect various other circuits such as peripherals, voltage regulators, and power management circuits, which are well known in the art and are therefore not further described herein. The bus interface provides an interface between the bus and the transceiver. The transceiver can be one element or multiple elements, such as multiple receivers and transmitters, providing a unit for communicating with various other devices on a transmission medium. The data processed by the processor is transmitted on a wireless medium via an antenna, and further, the antenna also receives data and transmits the data to the processor.
[0141] The processor is responsible for managing the bus and general processing, and can also provide various functions, including timing, peripheral interfaces, voltage regulation, power management, and other control functions. Memory can be used to store data used by the processor when performing operations.
[0142] Embodiment seven:
[0143] Another embodiment of the present application relates to a computer-readable storage medium storing a computer program, which implements the above method embodiment when executed by a processor.
[0144] That is, those skilled in the art can understand that all or part of the steps S in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a program, and the program is stored in a storage medium, including a number of instructions to enable a device (which can be a single-chip microcomputer, chip, etc.) or a processor (processor) to execute all or part of the steps S of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, referred to as: ROM), random access memory (Random Access Memory, referred to as: RAM), disk or optical disk and other media that can store program codes.
[0145] Those skilled in the art will appreciate that the above embodiments are specific embodiments for implementing the present application, and in actual applications, various changes may be made thereto in form and detail without departing from the spirit and scope of the present application.
Claims
1. A method for automatically identifying the bow and stern of a ship, characterized in that: include: Constructing a grid coordinate system based on a laser scanner cluster installed on the dock shoreline, wherein the laser scanner cluster is formed by a plurality of laser scanners spaced apart and distributed along the dock shoreline direction; Selecting a bow scanner and a stern scanner corresponding to the ship to be tested when it is moored in the laser scanner cluster, wherein the bow scanner is used to scan the bow of the ship to be tested to obtain a bow point cloud data set; and the stern scanner is used to scan the stern of the ship to be tested to obtain a stern point cloud data set; The bow position coordinates and the stern position coordinates are determined in the grid coordinate system according to the bow point cloud data set and the stern point cloud data set.
2. The method for automatically identifying the bow and stern of a ship according to claim 1, characterized in that: Selecting a bow scanner and a stern scanner corresponding to the moored ship to be measured from the laser scanner cluster includes: Dividing the scanning area of each laser scanner in the horizontal direction into a left scanning area and a right scanning area; Selecting a first laser scanner, the first laser scanner being a laser scanner in the laser scanner cluster whose point cloud quantity in the right scanning area accounts for more than a first preset percentage, the first preset percentage being a value greater than 95%; A second laser scanner is selected, the second laser scanner being a laser scanner in the laser scanner cluster whose point cloud quantity in the left scanning area accounts for more than a second preset percentage, the second preset percentage being a value greater than 95%; One of the first laser scanner and the second laser scanner is determined as the bow scanner, and the other is determined as the stern scanner.
3. The method for automatically identifying the bow and stern of a ship according to claim 2, characterized in that: Select the First Laser Scanner also includes: When the number of laser scanners in the laser scanner cluster whose point cloud number in the right scanning area exceeds a first preset percentage exceeds one, selecting the laser scanner with the largest number of point clouds in the scanning area as the first laser scanner; Selecting the second laser scanner also includes: when there is more than one laser scanner in the laser scanner cluster whose point cloud quantity in the left scanning area accounts for more than a second preset percentage, selecting the laser scanner with the largest number of point clouds in the scanning area as the second laser scanner.
4. The method for automatically identifying the bow and stern of a ship according to claim 2, characterized in that: Selecting a bow scanner and a stern scanner corresponding to the moored ship to be measured in the laser scanner cluster further includes: Turn off other laser scanners in the laser scanner cluster except the first laser scanner and the second laser scanner.
5. The method for automatically identifying the bow and stern of a ship according to any one of claims 1 to 4, characterized in that: The grid coordinate system is constructed based on the laser scanner cluster installed on the dock shoreline, including: A two-dimensional data grid is constructed with the position of the first laser scanner in the laser scanner cluster as the origin, the direction of the dock shoreline as the x-axis, the direction perpendicular to the dock shoreline as the y-axis, and a grid side length of n.
6. The method for automatically identifying the bow and stern of a ship according to claim 5, characterized in that: Determining the bow position coordinates and the stern position coordinates in the grid coordinate system according to the bow point cloud data set and the stern point cloud data set includes: Based on the two-dimensional data grid, performing two-dimensional rasterization processing on the bow point cloud dataset and the stern point cloud dataset; Performing data filtering processing on the bow point cloud data set and the stern point cloud data set after two-dimensional rasterization processing, filtering abnormal point cloud data in the bow point cloud data set and the stern point cloud data set, wherein the abnormal point cloud data includes point cloud data of the cable of the ship to be tested; Based on the bow point cloud data set and the stern point cloud data set after data filtering, the bow position coordinates and the stern position coordinates are determined in the grid coordinate system.
7. The method for automatically identifying the bow and stern of a ship according to claim 6, characterized in that: Based on the two-dimensional data grid, two-dimensional rasterization processing is performed on the bow point cloud dataset and the stern point cloud dataset, including: The coordinates of each point cloud in the bow point cloud data set and the stern point cloud data set are respectively converted to corresponding grids in the two-dimensional data grid, and the grids corresponding to each point cloud are marked to obtain marked grids.
8. The method for automatically identifying the bow and stern of a ship according to claim 7, characterized in that: The data filtering process includes an erosion operation and a dilation operation performed in sequence.
9. The method for automatically identifying the bow and stern of a ship according to claim 7, characterized in that: Determining the bow position coordinates and the stern position coordinates in the grid coordinate system based on the bow point cloud data set and the stern point cloud data set after data filtering, including: Taking the bow scanner or the stern scanner as the origin and the dock shoreline direction as the reference line, the projection coordinates of each marked grid are determined on the reference line; The grid corresponding to the minimum coordinate value and the grid corresponding to the maximum coordinate value in the projection coordinates are selected as the bow position coordinates and the stern position coordinates.
10. The method for automatically identifying the bow and stern of a ship according to claim 1, characterized in that: The automatic identification method further comprises: The scanning starting point of the ship to be measured is determined according to the bow position coordinates and the stern position coordinates, and the scanning starting point is used for preliminary positioning of the ship to be measured during the automatic loading operation.
11. The method for automatically identifying the bow and stern of a ship according to claim 1, characterized in that: The scanning angle of each laser scanner in the laser scanner cluster does not exceed 90 degrees, and the scanning angle includes a horizontal scanning angle and a vertical scanning angle.
12. An automatic identification device for the bow and stern of a ship, characterized in that: include: A construction module, for constructing a grid coordinate system based on a laser scanner cluster installed on the dock shoreline, wherein the laser scanner cluster is formed by a plurality of laser scanners distributed at intervals along the dock shoreline direction; A selection module is used to select a bow scanner and a stern scanner corresponding to the ship to be tested when it is moored in the laser scanner cluster, wherein the bow scanner is used to scan the bow of the ship to be tested to obtain a bow point cloud data set; and the stern scanner is used to scan the stern of the ship to be tested to obtain a stern point cloud data set; A determination module is used to determine the bow position coordinates and the stern position coordinates in the grid coordinate system according to the bow point cloud data set and the stern point cloud data set.
13. An electronic device, characterized in that: At least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor so that the at least one processor can execute the method for automatic identification of the bow and stern of a ship as described in any one of claims 1 to 11.
14. A computer-readable storage medium, characterized in that: A computer program is stored, and when the computer program is executed by a processor, the method for automatically identifying the bow and stern of a ship as described in any one of claims 1 to 11 is implemented.