Ship berth detection method, electronic equipment and ship berth detection system
By performing double noise reduction processing on ship berth detection points and extracting straight lines corresponding to the berth, the problem of low berth detection accuracy in the existing technology is solved, and the safety and accuracy of ship berthing are improved.
Patent Information
- Application Number
- CN202410956253.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-17
- Publication Date
- 2024-10-01
- Estimated Expiration
- 2044-07-17
AI Technical Summary
Existing ship berth detection methods have the problem of low berth detection accuracy, which affects the safety of ships during berthing.
By obtaining the positions and radar reflection cross-sections of multiple detection points, double noise reduction processing is performed to extract straight lines to achieve accurate detection of berths. Specific steps include dividing the grid according to the position of the detection point, filtering out points with low density and reflection cross-sectional area less than the maximum inter-class variance value, and then extracting the straight line corresponding to the berth.
It improves the precision and accuracy of berth detection, reduces the impact of non-berth target interference and multiple reflections, and enhances the safety of ship berthing.
Smart Images

Figure CN118501883B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of ship berthing, and in particular to a ship berth detection method, electronic equipment and a ship berth detection system. Background Art
[0002] The safe berthing of ships is an important safety indicator in the process of ship operation. In the process of ship berthing, accurate detection of berths is the basis for safe berthing of ships. However, in the existing berth detection process, there is a problem of low berth detection accuracy. Summary of the invention
[0003] In order to solve the above problems, the present invention provides a ship berth detection method, electronic equipment and a ship berth detection system, which can improve the accuracy of ship berth detection.
[0004] In a first aspect, the present invention provides a ship berth detection method, comprising: obtaining a position and a radar reflection cross-sectional area of each first detection point among a plurality of first detection points, wherein the plurality of first detection points are points detected by a plurality of radars on a ship at the same time, and the position and the radar reflection cross-sectional area of each first detection point among the plurality of first detection points are obtained based on the acquisition of the plurality of radars; according to the position of each first detection point, performing noise reduction on the plurality of first detection points to obtain a plurality of second detection points; according to the radar reflection cross-sectional area of each second detection point among the plurality of second detection points, performing noise reduction on the plurality of second detection points to obtain a plurality of third detection points; according to the position of each third detection point among the plurality of third detection points, extracting a straight line from the plurality of third detection points to obtain at least one first straight line; wherein the at least one first straight line corresponds one-to-one to at least one berth.
[0005] Optionally, the denoising of the multiple first detection points according to the position of each first detection point to obtain the multiple second detection points includes: determining the area where the multiple first detection points are located according to the position of each first detection point; dividing the area where the multiple first detection points are located into multiple grids; determining the density of each grid according to the number of the first detection points in each grid in the multiple grids; determining the grid with a density less than a preset density as the first grid; and screening out the first detection points in the first grid from the multiple first detection points to obtain the multiple second detection points.
[0006] Optionally, determining the density of each grid according to the number of the first detection points in each grid of the multiple grids includes: determining the number of the first detection points in each grid as the density of each grid; or determining the density of each grid according to the number of the first detection points in each grid and the distance between each grid and the corresponding neighboring grid.
[0007] Optionally, determining the density of each grid according to the number of the first detection points in each grid and the distance between each grid and a corresponding neighboring grid includes: determining the density of each grid by the following formula:
[0008]
[0009] in, is the density of the ith grid, is the number of the first detection points in the i-th grid, is the number of the first detection points in the jth neighboring grid corresponding to the i-th grid, is the attenuation factor, is the distance between the ith grid and the jth neighboring grid corresponding to the ith grid, is the number of neighboring grids corresponding to the i-th grid.
[0010] Optionally, the denoising of the multiple second detection points according to the radar reflection cross-section of each second detection point among the multiple second detection points to obtain a plurality of third detection points includes: determining the maximum inter-class variance value of the multiple second detection points according to the radar reflection cross-section of each second detection point; and screening out the second detection points whose radar reflection cross-section is smaller than the maximum inter-class variance value from the multiple second detection points to obtain the multiple third detection points.
[0011] Optionally, extracting straight lines from the multiple third detection points according to the position of each third detection point to obtain at least one first straight line includes: extracting straight lines from the multiple third detection points according to the position of each third detection point to obtain a plurality of second straight lines and the number of inner points of each second straight line in the multiple second straight lines; and screening out second straight lines whose number of inner points is less than a preset number from the multiple second straight lines to obtain at least one first straight line.
[0012] Optionally, the method also includes: obtaining the speed of each fourth detection point among a plurality of fourth detection points, wherein the plurality of fourth detection points are a plurality of third detection points on a third straight line, the third straight line is one of the at least one first straight line, and the speed of each fourth detection point among the plurality of fourth detection points is obtained based on the plurality of radar acquisitions; determining the distance from the ship to the third straight line, the speed of the third straight line relative to the ship, and the posture of the ship according to the position and speed of each fourth detection point and in combination with the positions of the bow, the midship and the stern of the ship.
[0013] Optionally, the determining the distance from the ship to the third straight line, the speed of the third straight line relative to the ship, and the posture of the ship according to the position and speed of each fourth detection point and in combination with the positions of the bow, the middle of the ship, and the stern of the ship includes: determining a fifth detection point according to the position of the bow and the position of each fourth detection point; wherein the fifth detection point is the fourth detection point closest to the bow; determining a sixth detection point according to the position of the middle of the ship and the position of each fourth detection point; wherein the sixth detection point is the fourth detection point closest to the middle of the ship; determining a sixth detection point according to the position of the stern and the position of each fourth detection point The seventh detection point is determined according to the position of the bow, the middle of the ship and the stern; the distance from the fifth detection point to the bow, the distance from the sixth detection point to the middle of the ship and the distance from the seventh detection point to the stern are determined as the distance from the ship to the third straight line; the speed of the fifth detection point, the speed of the sixth detection point and the speed of the seventh detection point are determined as the speed of the third straight line relative to the ship; the position and posture of the ship are determined according to the positions of the bow, the middle of the ship and the stern, and in combination with the positions of the fifth detection point, the sixth detection point and the seventh detection point.
[0014] In a second aspect, the present invention provides an electronic device, comprising: a memory and a processor; the memory is used to store a computer program; the processor is used to implement the ship berth detection method as described in any one of the first aspects when executing the computer program.
[0015] In a third aspect, the present invention provides a ship berth detection system, comprising: multiple radars, detection equipment, and a switch, wherein: the multiple radars are arranged on the ship; the switch is used to provide a communication path to the multiple radars and the detection equipment; a first radar is used to detect obstacles in the surrounding environment of the ship in real time to obtain first detection data of the first radar, and the first detection data of the first radar is sent to the detection equipment through the communication path provided by the switch; wherein the first radar is any one of the multiple radars, and the first detection data of the first radar includes radar data of each of the multiple points detected by the first radar based on the coordinate system of the first radar. reflection cross-sectional area, position and speed; the detection device is used to transform the first detection data of the first radar into the second detection data of the first radar, and, from the second detection data of the multiple radars, obtain the position and radar reflection cross-sectional area of the points detected by the multiple radars at the same time, so as to obtain the position and radar reflection cross-sectional area of each first detection point in the multiple first detection points, and according to the position and radar reflection cross-sectional area of each first detection point, execute the ship berth detection method described in any one of the first aspects; wherein the second detection data of the first radar includes the radar reflection cross-sectional area, position and speed of each point in the multiple points detected by the first radar based on the hull coordinate system of the ship.
[0016] In a fourth aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the ship berth detection method as described in the first aspect is implemented.
[0017] The beneficial effects of the ship berth detection method of the present invention are:
[0018] According to the position of each first detection point, multiple first detection points are subjected to noise reduction, which can reduce the influence of interference factors such as non-berth targets on multiple first detection points, so as to improve the accuracy of multiple second detection points obtained by noise reduction. According to the radar reflection cross-sectional area of each second detection point, multiple second detection points are subjected to noise reduction, which can reduce the influence of multiple reflections generated by radar in a complex port environment on multiple second detection points, so as to improve the accuracy of multiple third detection points obtained by noise reduction. In other words, by performing the above-mentioned double noise reduction on multiple first detection points, the accuracy of multiple third detection points obtained can be improved. In this way, according to the position of each third detection point in multiple third detection points, a straight line is extracted from multiple third detection points, and at least one first straight line corresponding to at least one berth can be obtained, thereby realizing the detection of berths. Moreover, since multiple third detection points are obtained by performing double noise reduction on multiple first detection points, the accuracy of multiple third detection points is improved. Therefore, according to the position of each third detection point in multiple third detection points, at least one first straight line is extracted, and the extraction precision and accuracy of at least one first straight line are improved, thereby improving the accuracy of berth detection. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] Figure 1 A schematic diagram of the structure of a ship berth detection system provided in an embodiment of the present application;
[0020] Figure 2 A schematic diagram of the installation position of the radar on a ship provided in an embodiment of the present application;
[0021] Figure 3 A schematic diagram of a flow chart of a detection device receiving first detection data of a first radar provided in an embodiment of the present application;
[0022] Figure 4 A schematic diagram of a flow chart of a detection device receiving first detection data of a first radar provided in an embodiment of the present application;
[0023] Figure 5 A schematic diagram of a process flow of a ship berth detection method provided in an embodiment of the present application;
[0024] Figure 6 A schematic diagram of a first straight line shown in an embodiment of the present application;
[0025] Figure 7 A schematic diagram of berth detection according to an embodiment of the present application;
[0026] Figure 8 A schematic diagram of a process for determining the distance from a ship to a third straight line, the speed of the third straight line relative to the ship, and the position and posture of the ship provided in an embodiment of the present application;
[0027] Fig. 9A schematic diagram of the distance from a ship to a third straight line provided in an embodiment of the present application;
[0028] Fig.10 A schematic diagram of a berth and the distance from a ship to the berth and the speed of the berth relative to the ship shown in an embodiment of the present application;
[0029] Fig.11 A schematic diagram of a process for reducing noise at multiple first detection points provided in an embodiment of the present application;
[0030] Fig.12 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0031] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the specific embodiments of the present invention are described in detail below in conjunction with the accompanying drawings. Although certain embodiments of the present invention are shown in the accompanying drawings, it should be understood that the present invention can be implemented in various forms and should not be interpreted as being limited to the embodiments described herein. On the contrary, these embodiments are provided to provide a more thorough and complete understanding of the present invention. It should be understood that the drawings and embodiments of the present invention are only for exemplary purposes and are not intended to limit the scope of protection of the present invention.
[0032] It should be understood that the various steps described in the method embodiments of the present invention may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present invention is not limited in this respect.
[0033] The term "including" and its variations used in this article are open inclusions, that is, "including but not limited to"; the term "based on" means "based at least in part on"; the term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one other embodiment"; the term "some embodiments" means "at least some embodiments"; the term "optionally" means "optional embodiments". The relevant definitions of other terms will be given in the following description. It should be noted that the concepts of "first", "second", etc. mentioned in the present invention are only used to distinguish between different devices, modules or units and other objects, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units and other objects.
[0034] It should be noted that the modifications of "one" and "plurality" mentioned in the present invention are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise clearly indicated in the context, it should be understood as "one or more".
[0035] The names of the messages or information exchanged between multiple devices in the embodiments of the present invention are only used for illustrative purposes, and are not used to limit the scope of these messages or information.
[0036] In order to solve the above technical problems, an embodiment of the present application provides a ship berth detection system. Figure 1 This is a schematic diagram of the structure of the ship berth detection system provided in the embodiment of the present application. The ship berth detection system can be arranged on a ship. Figure 1 As shown, the ship berth detection system may include: a plurality of radars 110 , a detection device 120 and a switch 130 .
[0037] Multiple radars 110 are arranged on the ship, and the number of multiple radars 110 can be set according to demand, for example, the number of multiple radars 110 can be 8, 10, 11, etc., and the embodiment of the present application does not specifically limit this. The setting positions of multiple radars 110 on the ship can be adjusted and determined according to demand or test results. The radar can be, for example, a laser radar, a navigation radar, a millimeter wave radar, etc., and the embodiment of the present application does not specifically limit this.
[0038] It should be noted that millimeter-wave radar is widely used in detection because of its better penetration, less impact from the environment and ability to detect around the clock.
[0039] For example, Figure 2 A schematic diagram of the installation position of the radar on a ship provided in an embodiment of the present application, such as Figure 2 As shown, the plurality of radars 110 are 8 millimeter wave radars (D1 to D8), wherein:
[0040] A millimeter wave radar D8 is installed at the middle of the stern of the ship, and the radiation angle a of the millimeter wave radar D8 is about 90°, and the millimeter wave radar D8 forms an angle of 45° with the stern plane. A millimeter wave radar D1 is installed at the bow of the ship, and the radiation angle a of the millimeter wave radar D1 is about 90°, and the radiation surface of the millimeter wave radar D1 is facing the front. Millimeter wave radars are installed at intervals on the hull of the ship. Figure 2 As shown, a total of 6 millimeter wave radars are arranged on the hull of the ship, namely, millimeter wave radars D3, D5, D7, D2, D4, and D6. The arrangement positions of the 6 millimeter wave radars are as follows: Figure 2 The radiation angles a of the six millimeter-wave radars are all 90°, and the six millimeter-wave radars form an angle of 45° with the hull plane.
[0041] Exemplarily, the detection distance of the above-mentioned millimeter wave radar can be 0.25-250m, and the detection azimuth angle range can be ±60°.
[0042] It should be noted that in Figure 2In the figure, the radar blind areas of the eight millimeter-wave radars (D1 to D8) are also shown.
[0043] The detection device 120 may be, for example, an electronic device such as a laptop computer, a desktop computer, a server, or may also be a dedicated device with information processing capabilities, which is not particularly limited in the embodiments of the present application.
[0044] The switch 130 can provide communication paths for multiple radars 110 and detection devices 120. Specifically, the switch 130 is a network device for forwarding electrical (optical) signals, and the switch 130 can provide communication paths for multiple radars 110 and detection devices 120 in a network connected to the switch 130.
[0045] Next, the working process of the first radar is described. It should be noted that the first radar is any one of the multiple radars 110 .
[0046] The first radar can detect obstacles in the surrounding environment of the ship in real time to obtain first detection data of the first radar, and send the first detection data of the first radar to the detection device 120 through the communication path provided by the switch 130.
[0047] The first detection data of the first radar includes the radar reflection cross-sectional area, position and speed of each of the multiple points detected by the first radar based on the coordinate system of the first radar. The multiple points detected by the first radar based on the coordinate system of the first radar may indicate obstacles detected by the first radar, and the obstacles include but are not limited to berths of ports, etc.
[0048] The real-time detection of the first radar can be understood as: the first radar performs detection at a time interval, and the time interval can be, for example, 30 milliseconds, 40 milliseconds or 50 milliseconds, etc., and the embodiment of the present application does not make any special limitation on this.
[0049] After each detection is completed, the first radar may send the first detection data of the first radar based on the detection this time to the detection device 120. Based on this, the first radar may send the first detection data of the first radar to the detection device 120 based on a time interval.
[0050] Exemplarily, a process in which the first radar sends the first detection data of the first radar to the detection device 120 is described exemplarily.
[0051] After completing a detection, the first radar may encapsulate the first detection data of the first radar into a frame and send it to the detection device 120. The frame may include column header information and data information.
[0052] The list header information may include a frame header and data, wherein the frame header in the list header information may be, for example, 0x600, so as to indicate the starting position of the list header information by 0x600. The data in the list header information may include at least identification information of the first radar, the working state of the first radar, the length of the frame, and the number of the plurality of points detected by the first radar. The working state of the first radar may include normal and abnormal.
[0053] The data information may include a frame header and data, wherein the frame header in the data information may be, for example, 0x701, to indicate the starting position of the data information through 0x701, and the data in the data information may include the first detection data of the first radar (i.e., the radar reflection cross-sectional area, position and speed of each of the multiple points detected by the first radar based on the coordinate system of the first radar).
[0054] It should be noted that the first radar is any one of the multiple radars 110 , and therefore, the working process of each radar in the multiple radars 110 can be found above.
[0055] The detection device 120 may receive first detection data of the first radar.
[0056] Next, the first detection data of the first radar is packaged into a frame and sent as an example, and combined with Figure 3 and Figure 4 , a process in which the detection device 120 receives the first detection data of the first radar is exemplarily described.
[0057] The process of the detection device 120 receiving the first detection data of the first radar may be as follows:
[0058] 301. When the system starts, initialize the QUdpsocket object in the detection device 120.
[0059] 302. The QUdpsocket object configures the identification information of each radar in the plurality of radars. The identification information of each radar may be, for example, the IP address of each radar.
[0060] 303. The QUdpsocket object receives and caches the frame sent by the first radar, which indicates the first detection data obtained by the first radar after completing a detection.
[0061] 304. The QUdpsocket object determines whether the buffer is full. If yes, it executes 305; if no, it executes 303.
[0062] Specifically, if the buffer is full, it indicates that the reception of a frame sent by the first radar is completed, and if the buffer is not full, it indicates that the reception of a frame sent by the first radar is not completed. In other words, 304 is used to determine whether the frame is received completely.
[0063] 305.The QUdpsocket object reads the data in a received frame.
[0064] 306. The QUdpsocket object determines whether the frame header is 0x600. If so, execute 307. If not, execute 308.
[0065] 307. The QUdpsocket object stores the data after the frame header (ie, the data in the column header information) into the state container of the first radar, and clears the data container of the first radar.
[0066] 308. The QUdpsocket object determines whether the frame header is 0x701. If yes, execute 309; if no, execute 304.
[0067] It should be noted that the execution of step 304 here indicates determining whether the next frame has been received.
[0068] 309. The QUdpsocket object stores the data after the frame header (ie, the data in the data information) into the data container of the first radar.
[0069] 310. The QUdpsocket object generates a data parsing instruction according to the data in the state container and the data container of the first radar.
[0070] 311.The QUdpsocket object sends parsing instructions to the slot function under the QUdpsocket object.
[0071] It should be noted that each of the multiple radars has a state container and a data container.
[0072] like Figure 4 As shown, 401. the slot function receives the parsing instruction.
[0073] 402. The slot function parses the parsing instruction to obtain the first detection data of the first radar.
[0074] Exemplarily, the parsing process may be: obtaining the first detection data of the first radar from the parsing instruction. It should be noted that the data in the state container carried in the parsing instruction may be used to verify the correctness of the first detection data of the first radar during the parsing process.
[0075] 403. The slot function stores the first detection data of the first radar in the memory.
[0076] The detection device 120 may also transform the first detection data of the first radar into the second detection data of the first radar, wherein the second detection data of the first radar may include the radar reflection cross-sectional area, position and speed of each of the multiple points detected by the first radar based on the hull coordinate system of the ship.
[0077] That is, the first detection data of the first radar is transformed from the coordinate system of the first radar to the hull coordinate system to obtain the second detection data of the first radar.
[0078] In the above manner, the detection device 120 can receive the first detection data sent by each radar of the multiple radars, and convert the first detection data of each radar into the second detection data of each radar.
[0079] The detection device 120 can also obtain the positions and radar reflection cross-sectional areas of the points detected by the multiple radars at the same time from the second detection data of the multiple radars, so as to obtain the position and radar reflection cross-sectional area of each first detection point among the multiple first detection points, and execute the following ship berth detection method according to the position and radar reflection cross-sectional area of each first detection point to detect the berth of the ship to obtain at least one berth. The ship berth detection method can improve the accuracy of berth detection, thereby improving the safety of ship berthing. It should be noted that the ship berth detection method will be described below and will not be repeated here.
[0080] It should be noted that the multiple first detection points may refer to points detected by multiple radars at the same time, and the position and radar reflection cross-sectional area of each first detection point are based on the position and radar reflection cross-sectional area of the hull coordinate system.
[0081] It should be noted that the first detection data of the radar may also carry the time of radar detection, and thus, the second detection data of the radar may also carry the time of radar detection.
[0082] Figure 5 A schematic flow chart of a ship berth detection method provided in an embodiment of the present application. The ship berth detection method can be executed by the above-mentioned detection device 120. The detection device 120 has been described above and will not be described again here. The ship berth detection method can be started before the ship enters the port, or it can be run during the process of the ship entering the port, and there is no special limitation here.
[0083] like Figure 5 As shown, the ship berth detection method may include the following steps:
[0084] 501. Obtain the position and radar reflection cross-sectional area of each first detection point among multiple first detection points.
[0085] The multiple first detection points are points detected by multiple radars on the ship at the same time. The position and radar reflection cross-sectional area of each of the multiple first detection points are obtained based on the collection of multiple radars. For details, please refer to the above description and will not be repeated here.
[0086] 502. According to the position of each first detection point, perform noise reduction on the multiple first detection points to obtain multiple second detection points.
[0087] Since the radar may be affected by interference factors such as non-berth targets during operation, there may be noise points in the points detected by the radar. In other words, there may be noise points in multiple first detection points. Therefore, it is necessary to reduce the noise of multiple first detection points to reduce the influence of interference factors such as non-berth targets on multiple first detection points, so as to improve the accuracy of multiple second detection points obtained by noise reduction, thereby improving the precision and accuracy of subsequent berth detection.
[0088] The discrete points among the multiple first detection points may be a manifestation of noise points of the multiple first detection points. Therefore, the multiple first detection points may be denoised according to the position of each first detection point among the multiple first detection points.
[0089] Exemplarily, the noise reduction process may be: determining the distribution of multiple first detection points in the hull coordinate system according to the position of each first detection point, and determining noise points from the multiple first detection points according to the distribution of the multiple first detection points in the hull coordinate system, and filtering out noise points from the multiple first detection points to obtain multiple second detection points.
[0090] That is, the plurality of second detection points may refer to the plurality of first detection points remaining after noise points are screened out from the plurality of first detection points.
[0091] It should be noted that the above noise reduction process is only exemplary and is not intended to limit the implementation process of noise reduction.
[0092] Obviously, by performing noise reduction on multiple first detection points according to the position of each first detection point, the influence of interference factors such as non-berth targets on the multiple first detection points can be reduced, so as to improve the accuracy of the multiple second detection points obtained by noise reduction, thereby improving the precision and accuracy of subsequent berth detection.
[0093] 503. According to the radar reflection cross-sectional area of each second detection point in the plurality of second detection points, perform noise reduction on the plurality of second detection points to obtain a plurality of third detection points.
[0094] Since the radar will generate multiple reflections in a complex port environment, the points detected by the radar may contain noise points, in other words, multiple first detection points may also contain noise points. Therefore, after performing noise reduction in 502 on multiple first detection points to obtain multiple second detection points, noise reduction can also be performed on the multiple second detection points according to the radar reflection cross-sectional area of each second detection point in the multiple second detection points to reduce the impact of multiple reflections generated by the radar in a complex port environment on the multiple second detection points, thereby improving the accuracy of the multiple third detection points obtained by noise reduction.
[0095] For example, the specific implementation process of 503 may be as follows:
[0096] First, according to the radar reflection cross-sectional area of each second detection point, the maximum inter-class variance value of the plurality of second detection points is determined. Then, the second detection points whose radar reflection cross-sectional area is smaller than the maximum inter-class variance value are screened out from the plurality of second detection points to obtain a plurality of third detection points.
[0097] It can be understood that the plurality of third detection points may be the second detection points remaining after second detection points having radar reflection cross-sectional areas smaller than the maximum inter-class variance value are screened out from the plurality of second detection points.
[0098] Obviously, by performing noise reduction on multiple second detection points according to the radar reflection cross-sectional area of each second detection point, the influence of multiple reflections generated by the radar in a complex port environment on multiple second detection points can be reduced, so as to improve the accuracy of multiple third detection points obtained by noise reduction.
[0099] 504. According to the position of each third detection point in the plurality of third detection points, extract a straight line from the plurality of third detection points to obtain at least one first straight line.
[0100] At least one first straight line corresponds to at least one berth, that is, one first straight line corresponds to one berth. Since a berth is usually a straight line, the detection of at least one berth can be achieved by extracting the straight line.
[0101] For example, the specific implementation process of 504 may be as follows:
[0102] First, according to the position of each third detection point, straight line extraction is performed among the plurality of third detection points to obtain a plurality of second straight lines and the number of inner points of each second straight line in the plurality of second straight lines.
[0103] Specifically, n (exemplarily, n>=3) third detection points may be randomly selected from a plurality of third detection points, and a straight line may be fitted based on the position of each third detection point among the n third detection points, and the number of inner points of the straight line may be calculated according to the position of each third detection point and the straight line, wherein the number of inner points of the straight line may refer to the number of third detection points whose distance from the straight line is less than the first preset distance among the plurality of third detection points. The above process is repeated to obtain a plurality of straight lines and the number of inner points of each of the plurality of straight lines. It should be noted that the n third detection points randomly selected are different in each repetition process. A straight line fitting is performed according to the position of each inner point among the plurality of inner points of the straight line with the largest number of inner points, to obtain a second straight line and the number of inner points of the second straight line.
[0104] It should be noted that, based on the position of each of the n third detection points, a straight line is fitted and can be expressed as formula (1):
[0105] (1)
[0106] in, is the independent variable, is the dependent variable, is the slope, is the intercept on the Y axis.
[0107] It can be calculated by formula (2):
[0108] (2)
[0109] in, is the sum of the products of the values of the X axis and the values of the Y axis at the positions of the n third detection points, is the product of the average value of the X axis and the average value of the Y axis in the positions of the n third detection points, is the sum of the squares of the values of the X-axis at the positions of the n third detection points, It is the square of the average value of the X-axis values at the positions of the n third detection points.
[0110] In getting Then, the X-axis values and Y-axis values of the positions of the n third detection points are substituted into formula (1) to obtain The numerical value of .
[0111] It should be noted that, since a value of b can be determined according to each third detection point, the value of b finally obtained may be an average of multiple values of b calculated based on multiple third detection points.
[0112] The number of repetitions can be calculated using the following formula (3).
[0113] (3)
[0114] Wherein, M is the number of repetitions, p indicates the proportion of inliers in the third detection points, n is the number of third detection points selected for each calculation, and z is the probability of at least one success for each sampling.
[0115] The third detection points on the second straight line are screened out from the plurality of third detection points to obtain the remaining third detection points. Based on the remaining third detection points, the above process is repeated to obtain a plurality of second straight lines and the number of inner points of each second straight line.
[0116] Then, second straight lines with less than a preset number of inner points are screened out from the plurality of second straight lines to obtain at least one first straight line. The preset number can be adjusted and determined according to experimental results, and will not be described in detail here.
[0117] Obviously, at least one first straight line may be a second straight line having a number of inner points greater than or equal to a preset number among the plurality of second straight lines.
[0118] It should be noted that the above-mentioned method for extracting straight lines is only exemplary and is not intended to limit the method for extracting straight lines in this application.
[0119] For example, Figure 6 This is a schematic diagram of the first straight line shown in the embodiment of the present application. Figure 6 As shown, through the above method, 5 first straight lines are extracted, and the 5 first straight lines correspond to 5 berths. Figure 6 In the example, a straight line formed by points of the same shape is a first straight line. Points forming different first straight lines have different shapes.
[0120] For example, Figure 7 This is a schematic diagram of berth detection shown in an embodiment of the present application. Figure 7 In the figure, the left side shows the distribution of multiple first detection points. Based on the multiple first detection points in the figure on the left side, after executing the above ship berth detection method, the figure on the right side is obtained. Among them, the figure on the right side shows 4 first straight lines, that is, 4 berths.
[0121] As can be seen from the above, according to the position of each first detection point, the noise reduction of multiple first detection points can reduce the influence of interference factors such as non-berth targets on the multiple first detection points, so as to improve the accuracy of multiple second detection points obtained by noise reduction. According to the radar reflection cross-sectional area of each second detection point, the noise reduction of multiple second detection points can reduce the influence of multiple reflections generated by the radar in a complex port environment on the multiple second detection points, so as to improve the accuracy of multiple third detection points obtained by noise reduction. In other words, by performing the above double noise reduction on multiple first detection points, the accuracy of multiple third detection points obtained can be improved. In this way, according to the position of each third detection point in the multiple third detection points, a straight line is extracted from the multiple third detection points, and at least one first straight line corresponding to at least one berth can be obtained, thereby realizing the detection of the berth. In addition, since the multiple third detection points are obtained by performing double noise reduction on the multiple first detection points, the accuracy of the multiple third detection points is improved. Therefore, according to the position of each third detection point in the multiple third detection points, at least one first straight line is extracted, and the extraction precision and accuracy of at least one first straight line are improved, thereby improving the accuracy of berth detection.
[0122] In other embodiments of the present application, after determining at least one first straight line, the speed of each fourth detection point in a plurality of fourth detection points may also be obtained first. The plurality of fourth detection points are a plurality of third detection points on a third straight line, the third straight line is one of at least one first straight line, and the speed of each fourth detection point in the plurality of fourth detection points is obtained based on the acquisition of a plurality of radars. Specifically, the speed of each fourth detection point in the plurality of fourth detection points may be obtained from the second detection data of the plurality of radars. It should be noted that the speed of each fourth detection point is based on the speed of the hull coordinate system. Then, according to the position and speed of each fourth detection point, and in combination with the positions of the bow, midship and stern of the ship, the distance from the ship to the third straight line, the speed of the third straight line relative to the ship, and the position and posture of the ship are determined.
[0123] In other words, after detecting at least one first straight line, that is, after detecting at least one berth, one of the at least one first straight line can be selected as the third straight line, that is, one of the at least one berth can be selected as the berth for the ship to dock. And the speed of each of the plurality of fourth detection points is obtained, wherein the plurality of fourth detection points are the plurality of third detection points on the third straight line. And, according to the position and speed of each fourth detection point, and in combination with the positions of the bow, the middle and the stern of the ship, the distance from the ship to the third straight line, the speed of the third straight line relative to the ship and the posture of the ship are determined, so as to control the ship to dock at the berth corresponding to the third straight line according to the distance from the ship to the third straight line, the speed of the third straight line relative to the ship and the posture of the ship.
[0124] For example, Figure 8 As shown, the process of determining the distance from the ship to the third straight line, the speed of the third straight line relative to the ship, and the position and posture of the ship may include the following steps:
[0125] 801. According to the position of the bow and the position of each fourth detection point, a fifth detection point is determined. The fifth detection point is the fourth detection point closest to the bow.
[0126] Specifically, the distance from the bow to each fourth detection point can be calculated according to the position of the bow and the position of each fourth detection point, and the fourth feature point closest to the bow is determined as the fifth detection point.
[0127] 802. According to the position of the ship and the position of each fourth detection point, determine the sixth detection point. The sixth detection point is the fourth detection point closest to the ship. The specific implementation process of 802 can refer to the specific implementation process of 801, which will not be repeated here.
[0128] 803. According to the position of the stern and the position of each fourth detection point, determine the seventh detection point. The seventh detection point is the fourth detection point closest to the stern. The specific implementation process of 803 can refer to the specific implementation process of 801, which will not be repeated here.
[0129] 804. The distance from the fifth detection point to the bow, the distance from the sixth detection point to the middle of the ship, and the distance from the seventh detection point to the stern are determined as the distance from the ship to the third straight line.
[0130] That is to say, Fig. 9 As shown, the distance from the ship to the third straight line may include three distances, namely, the distance D(A) from the fifth detection point to the bow PA, the distance D(B) from the sixth detection point to the middle of the ship PB, and the distance D(C) from the seventh detection point to the stern PC.
[0131] 805. The speed of the fifth detection point, the speed of the sixth detection point and the speed of the seventh detection point are determined as the speed of the third straight line relative to the ship.
[0132] 806. According to the positions of the bow, the middle of the ship and the stern, and in combination with the positions of the fifth detection point, the sixth detection point and the seventh detection point, the position and posture of the ship are determined.
[0133] like Fig. 9 As shown, the distances D(A), D(B), and D(C) from the bow PA, the midship PB, and the stern PC to the third straight line are determined. According to the positions of the bow PA, the midship PB, and the stern PC and the positions of the fifth, sixth, and seventh detection points, and combined with the above three distances D(A), D(B), and D(C), the position and posture of the ship can be calculated by geometry.
[0134] For example, Fig.10This is a schematic diagram of a berth and the distance from the ship to the berth and the speed of the berth relative to the ship shown in an embodiment of the present application. Fig.10 In the above figure, three straight lines are detected, that is, three berths are detected. Fig.10 In the figure, the straight line with the positive arrow is determined to be the straight line corresponding to berth 1. Fig.10 It can be seen that the distance from the bow to berth 1 is 48 meters, the distance from the middle of the ship to berth 1 is 55 meters, and the distance from the stern to berth 1 is 63 meters. The speed of berth 1 relative to the ship includes the speed of berth 1 relative to the bow (0.5 m / s), the speed of berth 1 relative to the middle of the ship (0.7 m / s), and the speed of berth 1 relative to the stern (0.8 m / s).
[0135] It should be noted that during the berthing process of the ship, the first detection data collected in real time by multiple radars can be combined with the above process to determine in real time the distance from the ship to the berth, the speed of the berth relative to the ship and the position of the ship. In this way, the berthing of the ship can be controlled based on the real-time determined distance from the ship to the berth, the speed of the berth relative to the ship and the position of the ship, so as to improve the accuracy and safety of the ship berthing.
[0136] Fig.11 A schematic diagram of a process for reducing noise at multiple first detection points provided in an embodiment of the present application. Fig.11 As shown, according to the position of each first detection point, the process of performing noise reduction on multiple first detection points to obtain multiple second detection points may include the following steps:
[0137] 1101. Determine the area where the multiple first detection points are located based on the position of each first detection point.
[0138] 1102. Divide the area where the first detection points are located into a plurality of grids. The size and shape of the grids can be adjusted and determined according to the experimental results.
[0139] 1103. Determine the density of each grid according to the number of first detection points in each grid of the multiple grids.
[0140] Exemplarily, the density of each grid can be determined in the following two ways:
[0141] First, the number of first detection points in each grid may be determined as the density of each grid.
[0142] The second method is to determine the density of each grid according to the number of first detection points in each grid and the distance between each grid and the corresponding neighboring grid.
[0143] The number of neighboring grids corresponding to each grid may be one or more, and the embodiment of the present application does not specifically limit this. Exemplarily, for a grid, a grid whose distance from the grid is less than a second preset distance is a neighboring grid corresponding to the grid. The second preset distance can be obtained based on experimental effect tests. The distance between two grids can be understood as the distance between points in the two grids.
[0144] For example, the density of each grid can be determined by formula (4).
[0145]
[0146] in, is the density of the ith grid, is the number of the first detection points in the i-th grid, is the number of the first detection points in the jth neighboring grid corresponding to the i-th grid, is the attenuation factor, is the distance between the i-th grid and the j-th neighboring grid corresponding to the i-th grid, is the number of neighboring grids corresponding to the i-th grid.
[0147] 1104. Determine a grid whose density is less than a preset density as the first grid.
[0148] Exemplarily, the inter-class variance value of each grid may be determined according to the density of each grid, and the maximum value of the inter-class variance values of multiple grids may be determined as the preset density. The preset density may also be obtained according to experimental tests.
[0149] 1105. Filter out the first detection points in the first grid from the multiple first detection points to obtain multiple second detection points.
[0150] That is, the plurality of second detection points may be the first detection points remaining after the first detection points in the first grid are screened out from the plurality of first detection points.
[0151] like Fig.12 As shown, an electronic device 1200 provided in an embodiment of the present invention includes a memory 1210 and a processor 1220; the memory 1210 is used to store a computer program; the processor 1220 is used to implement the ship berth detection method as described above when executing the computer program.
[0152] An embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the ship berth detection method as described above is implemented.
[0153] An electronic device 1200 that can be used as a server or client of the present invention will now be described, which is an example of a hardware device that can be applied to various aspects of the present invention. Electronic device 1200 is intended to represent various forms of digital electronic computer equipment, such as laptop computers, desktop computers, workbenches, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. Electronic device 1200 can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples, and are not intended to limit the implementation of the present invention described and / or required herein.
[0154] The electronic device 1200 includes a computing unit, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) or a computer program loaded from a storage unit into a random access memory (RAM). In the RAM, various programs and data required for the operation of the device can also be stored. The computing unit, ROM, and RAM are connected to each other via a bus. An input / output (I / O) interface is also connected to the bus.
[0155] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be implemented by instructing the relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, the storage medium can be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc. In the present application, the unit described as a separate component may or may not be physically separated, and the component displayed as a unit may or may not be a physical unit, that is, it may be located in one place, or it may be distributed on multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the embodiment of the present invention. In addition, each functional unit in each embodiment of the present invention can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
[0156] Although the present invention is disclosed as above, the protection scope of the present invention is not limited thereto. Those skilled in the art may make various changes and modifications without departing from the spirit and scope of the present invention, and these changes and modifications will fall within the protection scope of the present invention.
Claims
1. A ship berth detection method, characterized in that: include: Obtaining a position and a radar reflection cross-sectional area of each of a plurality of first detection points, wherein the plurality of first detection points are points detected by a plurality of radars on the ship at the same time, and the position and the radar reflection cross-sectional area of each of the plurality of first detection points are obtained based on the acquisition of the plurality of radars; According to the position of each of the first detection points, denoising the plurality of first detection points to obtain a plurality of second detection points; According to the radar reflection cross-sectional area of each second detection point in the plurality of second detection points, denoising the plurality of second detection points to obtain a plurality of third detection points; extracting a straight line from the plurality of third detection points according to the position of each third detection point in the plurality of third detection points to obtain at least one first straight line; Wherein, the at least one first straight line corresponds to at least one berth on a one-to-one basis; The extracting a straight line from the plurality of third detection points according to the position of each third detection point in the plurality of third detection points to obtain at least one first straight line comprises: According to the position of each third detection point, straight line extraction is performed among the plurality of third detection points to obtain a plurality of second straight lines and the number of inner points of each second straight line in the plurality of second straight lines; Screening out the second straight lines having the number of inner points less than a preset number from the plurality of second straight lines to obtain the at least one first straight line; The number of inner points of the second straight line refers to the number of third detection points whose distance from the second straight line is less than a first preset distance among the plurality of third detection points.
2. The method according to claim 1, characterized in that The step of reducing noise on the plurality of first detection points according to the position of each first detection point to obtain a plurality of second detection points comprises: Determining the area where the plurality of first detection points are located according to the position of each first detection point; Dividing the area where the plurality of first detection points are located into a plurality of grids; Determining the density of each grid according to the number of the first detection points in each grid of the plurality of grids; Determine the grid whose density is less than the preset density as the first grid; The first detection points in the first grid are screened out from the plurality of first detection points to obtain the plurality of second detection points.
3. The method according to claim 2, characterized in that Determining the density of each grid according to the number of the first detection points in each grid of the plurality of grids comprises: determining the number of the first detection points in each grid as the density of each grid; or The density of each grid is determined according to the number of the first detection points in each grid and the distance between each grid and a corresponding neighboring grid.
4. The method according to claim 3, characterized in that Determining the density of each grid according to the number of the first detection points in each grid and the distance between each grid and a corresponding neighboring grid includes: The density of each grid is determined by the following formula: in, is the density of the ith grid, is the number of the first detection points in the i-th grid, is the number of the first detection points in the jth neighboring grid corresponding to the i-th grid, is the attenuation factor, is the distance between the ith grid and the jth neighboring grid corresponding to the ith grid, is the number of neighboring grids corresponding to the i-th grid.
5. The method according to claim 1, characterized in that The step of performing noise reduction on the plurality of second detection points according to the radar reflection cross-sectional area of each second detection point in the plurality of second detection points to obtain a plurality of third detection points comprises: Determining the maximum inter-class variance value of the plurality of second detection points according to the radar reflection cross-sectional area of each second detection point; The second detection points whose radar reflection cross-sectional areas are smaller than the maximum inter-class variance value are screened out from the plurality of second detection points to obtain the plurality of third detection points.
6. The method according to claim 1, characterized in that The method further comprises: Obtaining a speed of each of a plurality of fourth detection points, wherein the plurality of fourth detection points are a plurality of third detection points on a third straight line, the third straight line is one of the at least one first straight line, and the speed of each of the plurality of fourth detection points is obtained based on the plurality of radar acquisitions; According to the position and speed of each fourth detection point and in combination with the positions of the bow, midship and stern of the ship, the distance from the ship to the third straight line, the speed of the third straight line relative to the ship and the position and posture of the ship are determined.
7. The method according to claim 6, characterized in that Determining the distance from the ship to the third straight line, the speed of the third straight line relative to the ship, and the position and posture of the ship according to the position and speed of each fourth detection point and in combination with the positions of the bow, the middle, and the stern of the ship includes: Determine a fifth detection point according to the position of the bow and the position of each of the fourth detection points; wherein the fifth detection point is the fourth detection point closest to the bow; Determine a sixth detection point according to the position of the midship and the position of each of the fourth detection points; wherein the sixth detection point is the fourth detection point closest to the midship; Determine a seventh detection point according to the position of the stern and the position of each of the fourth detection points; wherein the seventh detection point is the fourth detection point closest to the stern; Determine the distance from the ship to the third straight line as the distance from the ship to the bow, the distance from the sixth detection point to the middle of the ship, and the distance from the seventh detection point to the stern; Determine the speed of the fifth detection point, the speed of the sixth detection point, and the speed of the seventh detection point as the speed of the third straight line relative to the ship; The position and posture of the ship are determined according to the positions of the bow, the midship and the stern, and in combination with the position of the fifth detection point, the position of the sixth detection point and the position of the seventh detection point.
8. An electronic device, characterized in that: include: Memory and processor; The memory is used to store computer programs; The processor is used to implement the ship berth detection method according to any one of claims 1 to 7 when executing the computer program.
9. A ship berth detection system, comprising: Multiple radars, detection equipment, switches, including: The plurality of radars are arranged on the ship; The switch is used to provide a communication path for the plurality of radars and the detection equipment; a first radar, configured to detect obstacles in the surrounding environment of the ship in real time to obtain first detection data of the first radar, and to send the first detection data of the first radar to the detection device through a communication path provided by the switch; The first radar is any one of the multiple radars, and the first detection data of the first radar includes a radar reflection cross-sectional area, a position and a speed of each of the multiple points detected by the first radar based on the coordinate system of the first radar; The detection device is used to transform the first detection data of the first radar into the second detection data of the first radar, and obtain the positions and radar reflection cross-sectional areas of the points detected by the multiple radars at the same time from the second detection data of the multiple radars, so as to obtain the position and radar reflection cross-sectional area of each first detection point in the multiple first detection points, and perform the ship berth detection method according to any one of claims 1 to 7 according to the position and radar reflection cross-sectional area of each first detection point; The second detection data of the first radar includes the radar reflection cross-sectional area, position and speed of each point among a plurality of points detected by the first radar based on the hull coordinate system of the ship.
