Parking coordinate acquisition method and device, computer equipment and readable storage medium
By acquiring the first set of coordinates and images of the berth, calculating the deviation and making corrections, the problems of low efficiency and poor accuracy of traditional berth coordinate acquisition methods are solved, and efficient and high-precision berth coordinate acquisition is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-03
- Publication Date
- 2026-04-03
AI Technical Summary
Traditional berth coordinate acquisition methods are susceptible to weather conditions and are inefficient. On-site calibration methods are labor-intensive, and video calibration methods require frame-by-frame extraction, resulting in low efficiency.
By acquiring the first set of coordinates and images of consecutive berths, the deviation of each berth is calculated, and the first coordinate is corrected when the deviation is greater than a preset value, until the deviation is less than the preset value, thus obtaining the target coordinate set. The deviation is then used to correct the first coordinate to improve accuracy.
It improves the efficiency and accuracy of berth coordinate acquisition, ensures that coordinate errors are within the preset range, reduces the time cost of repeated coordinate acquisition, and improves the accuracy of coordinate acquisition.
Smart Images

Figure CN121788604A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of coordinate acquisition technology, and in particular to a berth coordinate acquisition method, apparatus, computer equipment, and readable storage medium. Background Technology
[0002] With the development of the on-street parking industry, on-street parking space calibration technology has also developed rapidly. Traditionally, parking space coordinate acquisition methods mainly include on-site calibration and video calibration. On-site calibration involves staff recording the start and end coordinates of each parking space on-site. Video calibration involves simultaneously recording video and GPS coordinates, binding each frame of the video to the coordinates, and then finding the start and end coordinates of the parking space from the bound video.
[0003] Field calibration methods are susceptible to weather conditions. Video calibration methods can solve the problems associated with field calibration methods, but they require extracting data frame by frame, which is labor-intensive and inefficient. Summary of the Invention
[0004] Therefore, it is necessary to provide a berth coordinate acquisition method, device, computer equipment, computer-readable storage medium, and computer program product that can at least improve the efficiency of coordinate acquisition, in order to address the above-mentioned technical problems.
[0005] Firstly, this application provides a method for acquiring berth coordinates, the method comprising:
[0006] Obtain a first coordinate set of a continuous berth, the first coordinate set including the first coordinate of each berth in the continuous berth;
[0007] Obtain the image set of the continuous berths;
[0008] The deviation of each berth is calculated based on the first coordinate set and the image set;
[0009] If the deviation is greater than a preset deviation, the first coordinate in the first coordinate set is corrected until the deviation is less than the preset deviation, thus obtaining a target coordinate set, which includes the target coordinates of each berth.
[0010] In one embodiment, the first coordinates include a first starting point coordinate and a first ending point coordinate;
[0011] The step of correcting the first coordinate in the first coordinate set when the deviation is greater than a preset deviation, until the deviation is less than the preset deviation, to obtain the target coordinate set, includes:
[0012] The first coordinate in the first coordinate set is corrected using the deviation to obtain a second coordinate set; the second coordinate set includes the second coordinate of each berth, and the second coordinate includes the second starting point coordinate and the second ending point coordinate.
[0013] Based on the second coordinate set, the deviation of each berth is re-acquired until the deviation of each berth is less than the preset deviation, thus obtaining the target coordinate set.
[0014] In one embodiment, the deviation includes a starting point deviation and an ending point deviation; the consecutive berths include m berths;
[0015] The step of correcting the first coordinates in the first coordinate set using the deviation to obtain the second coordinate set includes:
[0016] The sum of the starting point deviation of the first berth and the first starting point coordinate of the first berth is used as the second starting point coordinate of the first berth;
[0017] The second endpoint coordinate of the nth berth is obtained by summing the endpoint deviation of the nth berth with the first endpoint coordinate of the nth berth; n is a positive integer.
[0018] When n is greater than or equal to 1 and less than m, the second end coordinate of the nth berth is taken as the second starting coordinate of the (n+1)th berth;
[0019] Obtain the second coordinates of all the berths to obtain the second coordinate set.
[0020] In one embodiment, the deviation includes a starting point deviation and an ending point deviation;
[0021] The step of correcting the first coordinates in the first coordinate set using the deviation to obtain the second coordinate set includes:
[0022] The sum of the starting point deviation corresponding to each berth and the first starting point coordinate of the berth is used as the second starting point coordinate of the first berth;
[0023] The second endpoint coordinate is the sum of the endpoint deviation corresponding to each berth and the first endpoint coordinate of the berth.
[0024] Obtain the second coordinates of all the berths to form a second coordinate set.
[0025] In one embodiment, the images in the image set carry corresponding shooting coordinates;
[0026] The deviations include longitude deviations and latitude deviations;
[0027] The step of calculating the deviation of each berth based on the first coordinate set and the image set includes:
[0028] Obtain the image corresponding to the shooting coordinates based on the first coordinates;
[0029] Identify the pixel difference between the offset of a right angle and the midline of the image; the right angle is used to represent the start or end point of a berth in the image;
[0030] The offset value is determined based on the offset pixel difference and the actual width represented by a unit pixel;
[0031] The longitude and latitude deviations are calculated based on the offset values, using the following formulas:
[0032]
[0033]
[0034] in, Indicates longitude deviation. This indicates the latitude deviation, where d represents the offset value. Indicates the direction angle of consecutive berths. This represents the radius of the latitudinal section of the location of the continuous berths.
[0035] In one embodiment, after correcting the first coordinates in the first coordinate set when the deviation is greater than a preset deviation, until the deviation is less than the preset deviation, and obtaining the target coordinate set, the method further includes:
[0036] The orientation angle of each berth is determined based on the target coordinates;
[0037] Obtain the difference between the heading angle of each berth and the average heading angle of the consecutive berths;
[0038] If the difference is greater than a preset difference, the berth is determined to be an error berth;
[0039] Obtain the percentage of the number of the error berths in the consecutive berths;
[0040] If the proportion of the number is greater than the preset proportion, the target coordinates corresponding to the consecutive berths are determined to be unqualified, and the target coordinates of the consecutive berths are re-determined.
[0041] In one embodiment, obtaining the first coordinate set of a continuous berth segment includes:
[0042] Obtain the starting and ending coordinates of a continuous berth segment;
[0043] The distance between the starting point coordinates and the ending point coordinates is divided equally to obtain the coordinate change of each berth;
[0044] Based on the starting or ending coordinates of the consecutive berths and the coordinate change, the first starting coordinates and the first ending coordinates of each berth are calculated to obtain the first coordinates of all the berths, forming a first coordinate set.
[0045] Secondly, this application also provides a berth coordinate acquisition device, comprising:
[0046] The first coordinate acquisition module is used to acquire a first coordinate set of a continuous berth, the first coordinate set including the first coordinate of each berth in the continuous berth;
[0047] The image acquisition module is used to acquire a set of images of the continuous berths;
[0048] The deviation calculation module is used to calculate the deviation of each berth based on the first coordinate set and the image set;
[0049] The coordinate correction module is used to correct the first coordinate in the first coordinate set when the deviation is greater than the preset deviation, until the deviation is less than the preset deviation, to obtain a target coordinate set, wherein the target coordinate set includes the target coordinates of each berth.
[0050] Thirdly, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the above-described method.
[0051] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the above-described method.
[0052] Fifthly, this application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the above-described method.
[0053] The aforementioned berth coordinate acquisition method, apparatus, computer equipment, computer-readable storage medium, and computer program product, by determining the deviation between the acquired first coordinates and the actual berth in the image using a first coordinate set and an image, can determine the difference between the acquired first coordinates and the actual berth in the image. Correcting the first coordinates by adjusting the deviation can reduce the error between the first coordinates and the actual berth coordinates, improving coordinate accuracy. By limiting the acquisition until the deviation is less than a preset deviation to obtain the target coordinate set, errors can be reduced, ensuring high-precision berth coordinates. By limiting the acquisition to only one time, and continuously correcting the first coordinates based on the image set, coordinate acquisition efficiency can be improved. Attached Figure Description
[0054] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0055] Figure 1 This is an application environment diagram of the berth coordinate acquisition method in one embodiment;
[0056] Figure 2 This is a flowchart illustrating a berth coordinate acquisition method in one embodiment;
[0057] Figure 3 This is a flowchart illustrating the berth coordinate acquisition method in another embodiment;
[0058] Figure 4 This is a flowchart illustrating the berth coordinate acquisition method in another embodiment;
[0059] Figure 5 This is a flowchart illustrating the berth coordinate acquisition method in another embodiment;
[0060] Figure 6 This is a flowchart illustrating the berth coordinate acquisition method in another embodiment;
[0061] Figure 7 This is a flowchart illustrating the berth coordinate acquisition method in another embodiment;
[0062] Figure 8 This is a flowchart illustrating the berth coordinate acquisition method in another embodiment;
[0063] Figure 9 This is a structural block diagram of a berth coordinate acquisition device in one embodiment;
[0064] Figure 10 This is a structural block diagram of the berth coordinate acquisition device in another embodiment;
[0065] Figure 11 This is a schematic diagram of the offset pixel difference of a berth in one embodiment;
[0066] Figure 12 This is an internal structural diagram of a computer device in one embodiment.
[0067] Figure label:
[0068] Terminal: 102; Server: 104; Berth coordinate acquisition device: 900; First coordinate acquisition module: 902; Image acquisition module: 904; Deviation calculation module: 906; Coordinate correction module: 908; Inspection module: 910. Detailed Implementation
[0069] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0070] It should be noted that the terms "first," "second," etc., used in this application can be used to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish the first element from the second element. The terms "comprising" and "having," and any variations thereof, used in this application, are intended to cover non-exclusive inclusion. The term "multiple" used in this application refers to two or more. The term "and / or" used in this application refers to one of the embodiments, or any combination of multiple embodiments.
[0071] The berth coordinate acquisition method provided in this application embodiment can be applied to, for example... Figure 1 In the application environment shown, terminal 102 communicates with server 104 via a network. A data storage system can store the data that server 104 needs to process. The data storage system can be integrated onto server 104, or it can be located on the cloud or other network servers. Terminal 102 can be, but is not limited to, various personal computers, laptops, smartphones, tablets, etc. Server 104 can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services.
[0072] In one exemplary embodiment, such as Figure 2 As shown, a method for acquiring berth coordinates is provided, including the following steps 202 to 206.
[0073] Step 202: Obtain the first coordinate set of a continuous berth, which includes the first coordinate of each berth in the continuous berth.
[0074] Continuous parking spaces refer to multiple parking spaces that are consecutively marked on a road without any breaks in between. The first coordinates of each parking space include the coordinates of a first starting point and a first ending point. The first coordinate set can be presented in a tabular format; all coordinate sets in this embodiment can be presented in a tabular format. A schematic diagram of continuous parking spaces can also be generated.
[0075] Step 204: Obtain the image set of consecutive berths.
[0076] The image set of continuous berths can be obtained by an inspection vehicle. The inspection vehicle generally has three camera directions: a front camera, a middle camera, and a rear camera. The middle camera is directly facing the berth to take pictures. In this embodiment of the application, the middle camera of the inspection vehicle is used to take the image set of continuous berths. The inspection vehicle can take pictures based on the first coordinate, or it can take pictures continuously along the continuous berths. There is no limitation here.
[0077] Step 206: Calculate the deviation of each berth based on the first coordinate set and image set.
[0078] Understandably, the actual location of the berth shown in the image is determined by a camera positioned directly above the berth. Normally, the starting or ending point of the berth in the image, based on its coordinates, should be centered and coincide with the image's centerline. However, since the initial coordinates may not be accurate, the exact location of the berth's starting or ending point in the image may deviate from some of the coordinates in the initial coordinate system.
[0079] Step 208: If the deviation is greater than the preset deviation, correct the first coordinate in the first coordinate set until the deviation is less than the preset deviation, and obtain the target coordinate set, which includes the target coordinates of each berth.
[0080] By correcting the first coordinate using the deviation, the difference between the first coordinate and the actual coordinate of the berth can be reduced, making the obtained target coordinates more accurate.
[0081] The preset deviation can be in the range of 1 cm to 10 cm. For example, the preset deviation can be 1 cm, 2 cm, 3 cm, 4 cm, 5 cm, 6 cm, 7 cm, 8 cm, 9 cm, 10 cm or any value in the range of 1 cm to 10 cm.
[0082] The aforementioned berth coordinate acquisition method determines the difference between the acquired first coordinates and the actual berth in the image by comparing the first coordinate set with the image to identify the deviation. Correcting the first coordinates based on this deviation reduces the error between the first coordinates and the actual berth coordinates, improving accuracy. By limiting the acquisition to a target coordinate set until the deviation is less than a preset deviation, errors are minimized, ensuring high-precision berth coordinates. Furthermore, by requiring only one coordinate acquisition, the first coordinates can be continuously corrected based on the image set, improving acquisition efficiency.
[0083] In one embodiment, see [reference] Figure 3 Step 208 includes steps 302 and 304:
[0084] Step 302: Correct the first coordinates in the first coordinate set using the deviation method to obtain the second coordinate set. The second coordinate set includes the second coordinates of each berth, and the second coordinates include the second starting point coordinates and the second ending point coordinates.
[0085] Step 304: Re-acquire the deviation of each berth based on the second coordinate set until the deviation of each berth is less than the preset deviation, and obtain the target coordinate set.
[0086] The deviation of each berth is re-acquired based on the second coordinate set, including obtaining images corresponding to the start and end points of each berth. The deviation is re-acquired based on the images. If the re-acquired deviation is less than or equal to a preset deviation, the second coordinate set is used as the target coordinate set. If the re-acquired deviation is greater than the preset deviation, steps 302 and 304 are repeated, that is, the second coordinates in the second coordinate set are corrected based on the re-acquired deviation to obtain a third coordinate set. The deviation of each berth is re-acquired based on the third coordinate set again until the deviation of each berth is less than the preset deviation, thus obtaining the target coordinate set.
[0087] Understandably, in this process, the coordinates are corrected only based on the deviation obtained from the images, without re-collecting the coordinates, thus reducing time costs and improving the efficiency of coordinate acquisition. Furthermore, by limiting the output of the target coordinate set to only those berths with deviations less than a preset deviation, the accuracy of the berth coordinates is improved, ensuring that the berth coordinates remain within the preset deviation range.
[0088] In one embodiment, the deviation includes a starting point deviation and an ending point deviation, and the consecutive berths include m berths.
[0089] See Figure 4 Step 302 includes steps 402 to 408:
[0090] Step 402: Use the sum of the starting point deviation of the first berth and the first starting point coordinate of the first berth as the second starting point coordinate of the first berth.
[0091] Step 404: Use the sum of the endpoint deviation of the nth berth and the first endpoint coordinate of the nth berth as the second endpoint coordinate of the nth berth; n is a positive integer.
[0092] Step 406: If n is greater than or equal to 1 and less than m, take the second endpoint coordinate of the nth berth as the second starting point coordinate of the (n+1)th berth.
[0093] When n equals m, since there is no (n+1)th berth, the second endpoint coordinate of the nth berth will not be used as the second starting point coordinate of the (n+1)th berth.
[0094] Step 408: Obtain the second coordinates of all berths to get the second coordinate set.
[0095] That is, the second starting point coordinate of the first berth is calculated using the starting point deviation and the first starting point coordinate of the first berth, and the second ending point coordinate of the first berth is calculated using the ending point deviation and the first ending point coordinate of the first berth. The second ending point coordinate of the first berth is used as the second starting point coordinate of the second berth, and so on. Except for the first berth, which requires the starting point deviation to calculate the second starting point coordinate, the second starting point coordinate of the other berths can be obtained from the second ending point coordinate of the previous berth. The second ending point coordinate of each berth needs to be calculated using the ending point deviation and the first ending point coordinate.
[0096] Understandably, within a continuous stretch of berths, the lengths of each berth are not necessarily identical. If the starting point of a berth is offset by A centimeters, the ending point may be offset by B centimeters, and A and B are not equal. In this case, it is necessary to correct both the starting and ending points of the berths separately to obtain more accurate berth coordinates. Furthermore, within a continuous stretch of berths, the ending coordinates of the current berth coincide with the starting coordinates of the next berth. By directly using the second ending coordinates of the current berth as the second starting coordinates of the next berth, calculations can be simplified, and data processing efficiency can be improved.
[0097] In another embodiment, the deviation includes a starting point deviation and an ending point deviation.
[0098] See Figure 5 Step 302 may also include steps 502 to 506:
[0099] Step 502: Use the sum of the starting point deviation corresponding to each berth and the first starting point coordinate of the berth as the second starting point coordinate of the first berth.
[0100] Step 504: Use the sum of the endpoint deviation corresponding to each berth and the first endpoint coordinate of the berth as the second endpoint coordinate.
[0101] Step 506: Obtain the second coordinates of all berths to form a second coordinate set.
[0102] In this embodiment, the second starting point coordinates and the second ending point coordinates of each berth are calculated separately, which can avoid the error in the calculation of the current berth from affecting the next berth, thereby improving the accuracy of the coordinates of each berth.
[0103] If a third or more coordinate sets are required, the calculation method is the same as that for the second coordinate set, and will not be elaborated here.
[0104] In one embodiment, the images in the image set carry corresponding shooting coordinates. The deviations include longitude deviations and latitude deviations.
[0105] The images carry corresponding shooting coordinates, facilitating the acquisition of images for the corresponding berths when calculating deviations. During the image capture process using inspection vehicles, the vehicles can be controlled to output shooting coordinates at a high frequency, ensuring that each image has corresponding shooting coordinates. The inspection vehicle can capture multiple images of a single berth at a time. When updating to the second and third coordinate sets, the images with the corresponding shooting coordinates can be directly obtained based on the second and third coordinate sets. Alternatively, multiple rounds of shooting can be performed, with a new set of images of consecutive berths captured each time the coordinate set is updated; this is not limited to this approach.
[0106] Based on the inclusion of starting point deviation and ending point deviation, deviation further includes longitude deviation and latitude deviation. That is, deviation includes starting point longitude deviation, starting point latitude deviation, ending point longitude deviation, and ending point latitude deviation, and the longitude and latitude of different points are corrected through different deviations.
[0107] See Figure 6 Step 206 includes steps 602 to 608:
[0108] Step 602: Obtain the image corresponding to the shooting coordinates based on the first coordinates.
[0109] It is understandable that the shooting coordinates and the first coordinate will not completely coincide; they may be at the same longitude or latitude. If no shooting coordinates at the same longitude or latitude exist, the image corresponding to the closest longitude or latitude will be selected as the image corresponding to the first coordinate. This ensures that the selected image contains the berth corresponding to the first coordinate.
[0110] Step 604: Identify the pixel offset difference between right angles and the center line in the image. Right angles are used to indicate the start or end point of a berth in the image.
[0111] Since berths are typically rectangular, right angles are the most easily identifiable feature. By identifying right angles in an image, the start or end point of the berth can be determined. Right angles in images can be obtained using object recognition algorithms or other algorithms; no restrictions are placed here. See also... Figure 11 In this diagram, the area within the dashed box represents a top-down view of the berth taken by the center camera, the dashed line within the dashed box represents the center line of the image, and D represents the pixel difference in offset from the center line of the image. Figure 11 The image shown is not taken by the center camera and is only used to represent the relative position of the offset pixel difference. To determine the offset pixel difference between the right angle and the center line of the image, you can first determine a parallel line passing through the right angle and parallel to the center line of the image, and then determine the pixel difference between the parallel line and the center line of the image as the offset pixel difference. Alternatively, you can directly determine the pixel distance from the vertex of the right angle to the center line of the image as the offset pixel difference; there is no restriction here.
[0112] Step 606: Determine the offset value based on the offset pixel difference and the actual width represented by a unit pixel. The offset value is equal to the product of the offset pixel difference and the actual width represented by a unit pixel.
[0113] The actual width represented by a unit pixel can be obtained by dividing the actual distance displayed in the image by the total horizontal pixels of the image. The actual distance displayed in the image can be determined empirically, by measurement, or by controlling the shooting distance between the central camera and the berth; no restrictions are imposed here.
[0114] Step 608: Calculate the longitude and latitude deviations based on the offset values. The calculation formula is as follows:
[0115]
[0116]
[0117] in, Indicates longitude deviation. This indicates the latitude deviation, where d represents the offset value. Indicates the direction angle of consecutive berths. The radius of the latitudinal section representing the location of consecutive berths. It can be calculated using the following formula:
[0118]
[0119] Where R represents the Earth's average radius, which is a constant, usually taken as 6317 kilometers. The latitude coordinates representing the berth can be either the latitude coordinates of the starting point or the latitude coordinates of the ending point of the berth.
[0120] Since the starting or ending point of the berth is captured by a central camera from the front, under normal circumstances, the starting or ending point of the berth should be at the center of the image, i.e., the right angle should be at the center of the image. Because the obtained first coordinates may contain errors, the right angle in the image may not coincide with the center line, resulting in an error. It is necessary to determine the specific offset value in the coordinates corresponding to the error displayed in the image. Since the coordinate deviation between the right angle and the center line in the image cannot be directly calculated, this embodiment first calculates the offset pixel difference between the two in the image, then determines the offset value based on the actual width represented by a unit pixel, and further calculates the longitude and latitude deviations based on the offset values. Through a series of calculations, the coordinate deviation of the berth's starting or ending point can be obtained using the image, thereby enabling rapid correction of the first coordinate using the coordinate deviation.
[0121] In one embodiment, see [reference] Figure 7After step 208, the method further includes steps 702 to 710:
[0122] Step 702: Determine the orientation angle of each berth based on the target coordinates.
[0123] The heading angle can be calculated using the Vincenty formula, as follows:
[0124]
[0125] in, This represents the orientation angle of the nth berth. and These represent the starting and ending longitude coordinates of the nth berth, respectively. and These represent the starting latitude coordinates and ending latitude coordinates of the nth berth, respectively.
[0126] Because the Vincenti formula compensates for the Earth's ellipsoidal parameters through iterative calculations, it corrects for the Earth's oblateness. Using this formula, a more accurate berth orientation angle can be calculated with high precision.
[0127] Step 704: Obtain the difference between the heading angle of each berth and the average heading angle of consecutive berths.
[0128] The mean heading angle of consecutive berths is the average of the sum of the heading angles of all berths.
[0129] Step 706: If the difference is greater than the preset difference, the berth is determined to be an error berth.
[0130] The preset difference is generally less than or equal to 5 degrees. For example, it can be 1 degree, 2 degrees, 3 degrees, 4 degrees, 5 degrees, or any value less than or equal to 5 degrees.
[0131] If the difference between the berth's heading angle and its mean is greater than a preset difference, it indicates that the berth deviates significantly from the set direction of the continuous berths, which is highly likely due to a calibration error and can be identified as an error berth. Identifying error berths helps determine whether the acquisition of coordinates for the continuous berths is up to standard and also improves the efficiency of subsequent inspection processes.
[0132] Step 708: Obtain the percentage of erroneous berths in consecutive berths. This is done by comparing the number of erroneous berths to the total number of consecutive berths (m), and the resulting ratio is the percentage.
[0133] Step 710: If the proportion of the number of consecutive berths is greater than the preset proportion, determine that the target coordinates of the consecutive berths are unqualified, and redetermine the target coordinates of the consecutive berths.
[0134] The preset percentage is determined based on the required calibration accuracy. If the required calibration accuracy is high, a smaller preset percentage can be set, for example, 5%, 10%, 15%, 20%, etc. If the required calibration accuracy is low, a larger preset percentage can be set, for example, 30%, 40%, etc. No specific preset percentage is limited here.
[0135] Understandably, a continuous stretch of berths should generally be on a straight line, with consistent azimuth angles across all berths. A large difference in azimuth angles indicates a potential significant error in the target coordinates. If the proportion of erroneous berths is small (less than a predetermined percentage), the impact on the overall continuous berths is minimal, and the accuracy of the target coordinates of other berths is also relatively low. These berths with a small percentage of errors can be manually or through other methods for calibration. Conversely, if the proportion of erroneous berths is large (greater than a predetermined percentage), it indicates a large number of erroneous berths, significantly impacting the overall continuous berths and potentially affecting the longitude of the target coordinates of other berths, necessitating recalibration. This embodiment effectively verifies the accuracy of the target berths by calculating azimuth angles and determining erroneous berths.
[0136] In one embodiment, see [reference] Figure 8 Step 202 includes steps 802 to 806:
[0137] Step 802: Obtain the starting and ending coordinates of a continuous berth.
[0138] The starting and ending coordinates can be obtained using Real-Time Kinematic (RTK) positioning technology. The starting coordinates of the first berth and the ending coordinates of the last berth are the starting and ending coordinates of the consecutive berths. For example, when the total number of consecutive berths is 20, the starting coordinates of the first berth and the ending coordinates of the twentieth berth in that consecutive berth segment are obtained.
[0139] Step 804: Divide the distance between the starting point coordinates and the ending point coordinates equally to obtain the coordinate change for each berth. The coordinate change includes the change in longitude coordinates and the change in latitude coordinates.
[0140] For example, the longitude difference between the endpoint and the starting point coordinates is obtained, and the longitude difference is divided by m-1 to obtain the change in longitude coordinates, where m represents the total number of consecutive berths. Similarly, the change in latitude coordinates is obtained by obtaining the latitude difference between the endpoint and the starting point coordinates and dividing the latitude difference by m-1.
[0141] Step 806: Based on the starting point coordinates or ending point coordinates of the consecutive berths and the coordinate change, calculate the first starting point coordinates and the first ending point coordinates of each berth to obtain the first coordinates of all berths and form the first coordinate set.
[0142] For example, the coordinates of the first starting point of the nth berth are equal to the sum of the starting point coordinates of the consecutive berths and n-1 coordinate changes. Similarly, the coordinates of the first ending point of the nth berth are equal to the sum of the starting point coordinates of the consecutive berths and n coordinate changes. Specifically, the longitude coordinate of the first starting point of the nth berth is equal to the sum of the longitude coordinates of the starting point and n-1 longitude coordinate changes, and the latitude coordinate of the first starting point of the nth berth is equal to the sum of the latitude coordinates of the starting point and n-1 latitude coordinate changes. Likewise, the longitude coordinate of the first ending point of the nth berth is equal to the sum of the longitude coordinates of the starting point and n longitude coordinate changes, and the latitude coordinate of the first ending point of the nth berth is equal to the sum of the latitude coordinates of the starting point and n latitude coordinate changes. The first starting point and first ending point coordinates of each berth can also be calculated using the ending point coordinates of the consecutive berths, in the same way as calculating using the starting point coordinates of the consecutive berths, and will not be elaborated here.
[0143] In this embodiment of the application, only the starting coordinates and ending coordinates of the consecutive berths are needed to obtain the first coordinates of each berth, which reduces the complexity of obtaining the coordinates.
[0144] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages in other steps. It is understood that the steps in different embodiments can be freely combined as needed, and all non-contradictory solutions formed by such combinations are within the scope of protection of this application.
[0145] Based on the same inventive concept, this application also provides a bit coordinate acquisition device for implementing the bit coordinate acquisition method described above. The solution provided by this device is similar to the solution described in the above method; therefore, the specific limitations in one or more bit coordinate acquisition device embodiments provided below can be found in the limitations of the bit coordinate acquisition method described above, and will not be repeated here.
[0146] In one exemplary embodiment, such as Figure 9 As shown, a berth coordinate acquisition device 900 is provided, comprising a first coordinate acquisition module 902, an image acquisition module 904, a deviation calculation module 906, and a coordinate correction module 908.
[0147] The first coordinate acquisition module 902 is used to acquire the first coordinate set of a continuous berth, which includes the first coordinate of each berth in the continuous berth.
[0148] Image acquisition module 904 is used to acquire a set of images of consecutive berths.
[0149] The deviation calculation module 906 is used to calculate the deviation of each berth based on the first coordinate set and the image set.
[0150] The coordinate correction module 908 is used to correct the first coordinate in the first coordinate set when the deviation is greater than the preset deviation, until the deviation is less than the preset deviation, to obtain the target coordinate set, which includes the target coordinates of each berth.
[0151] The aforementioned berth coordinate acquisition device 900 determines the difference between the acquired first coordinates and the actual berth in the image by comparing the first coordinate set with the image to identify the deviation. Correcting the first coordinates based on this deviation reduces the error between the first coordinates and the actual berth coordinates, improving coordinate accuracy. By limiting the acquisition to a target coordinate set until the deviation is less than a preset deviation, errors are further reduced, ensuring high-precision berth coordinates. Furthermore, by requiring only one coordinate acquisition, the first coordinates can be continuously corrected based on the image set, improving coordinate acquisition efficiency.
[0152] In one embodiment, see [reference] Figure 10 The berth coordinate acquisition device 900 also includes an inspection module 910.
[0153] The inspection module 910 is used to determine the heading angle of each berth based on the target coordinates; and to obtain the difference between the heading angle of each berth and the average heading angle of consecutive berths. If the difference is greater than a preset difference, the berth is determined to be an error berth. The percentage of error berths in the consecutive berths is obtained. If the percentage is greater than a preset percentage, the target coordinates of the corresponding consecutive berths are determined to be unqualified, and the target coordinates of the consecutive berths are redefined. If the percentage is less than or equal to the preset percentage, the target coordinates are output.
[0154] By setting the inspection module 910, it can be ensured that the output target coordinates are on a straight line.
[0155] Each module in the aforementioned berth coordinate acquisition device 900 can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of a computer device in hardware form or independent of it, or stored in the memory of a computer device in software form, so that the processor can call and execute the operations corresponding to each module.
[0156] In one exemplary embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 12 As shown, the computer device includes a processor, memory, input / output interface, communication interface, display unit, and input device. The processor, memory, and input / output interface are connected via a system bus, and the communication interface, display unit, and input device are also connected to the system bus via the input / output interface. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The input / output interface is used for exchanging information between the processor and external devices. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, Near Field Communication (NFC), or other technologies. When the computer program is executed by the processor, it implements a berth coordinate acquisition method. The display unit is used to form a visually visible image and can be a display screen, projection device, or virtual reality imaging device. The display screen can be an LCD screen or an e-ink screen. The input device of the computer device can be a touch layer covering the display screen, or buttons, trackballs, or touchpads set on the casing of the computer device, or external keyboards, touchpads, or mice, etc.
[0157] Those skilled in the art will understand that Figure 12 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0158] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.
[0159] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0160] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A method for acquiring berth coordinates, characterized in that, The method includes: Obtain a first coordinate set of a continuous berth, the first coordinate set including the first coordinate of each berth in the continuous berth; Obtain the image set of the continuous berths; The deviation of each berth is calculated based on the first coordinate set and the image set; If the deviation is greater than a preset deviation, the first coordinate in the first coordinate set is corrected until the deviation is less than the preset deviation, thus obtaining a target coordinate set, which includes the target coordinates of each berth.
2. The method according to claim 1, characterized in that, The first coordinate system includes the coordinates of the first starting point and the coordinates of the first ending point; The step of correcting the first coordinate in the first coordinate set when the deviation is greater than a preset deviation, until the deviation is less than the preset deviation, to obtain the target coordinate set, includes: The first coordinate in the first coordinate set is corrected using the deviation to obtain a second coordinate set; the second coordinate set includes the second coordinate of each berth, and the second coordinate includes the second starting point coordinate and the second ending point coordinate. Based on the second coordinate set, the deviation of each berth is re-acquired until the deviation of each berth is less than the preset deviation, thus obtaining the target coordinate set.
3. The method according to claim 2, characterized in that, The deviation includes the starting point deviation and the ending point deviation; The continuous berths include m berths; The step of correcting the first coordinates in the first coordinate set using the deviation to obtain the second coordinate set includes: The sum of the starting point deviation of the first berth and the first starting point coordinate of the first berth is used as the second starting point coordinate of the first berth; The second endpoint coordinate of the nth berth is obtained by summing the endpoint deviation of the nth berth with the first endpoint coordinate of the nth berth; n is a positive integer. When n is greater than or equal to 1 and less than m, the second end coordinate of the nth berth is taken as the second starting coordinate of the (n+1)th berth; Obtain the second coordinates of all the berths to obtain the second coordinate set.
4. The method according to claim 2, characterized in that, The deviation includes the starting point deviation and the ending point deviation; The step of correcting the first coordinates in the first coordinate set using the deviation to obtain the second coordinate set includes: The sum of the starting point deviation corresponding to each berth and the first starting point coordinate of the berth is used as the second starting point coordinate of the first berth; The second endpoint coordinate is the sum of the endpoint deviation corresponding to each berth and the first endpoint coordinate of the berth. Obtain the second coordinates of all the berths to form a second coordinate set.
5. The method according to claim 3 or 4, characterized in that, The images in the image set carry corresponding shooting coordinates; The deviations include longitude deviations and latitude deviations; The step of calculating the deviation of each berth based on the first coordinate set and the image set includes: Obtain the image corresponding to the shooting coordinates based on the first coordinates; Identify the pixel difference between the offset of a right angle and the midline of the image; the right angle is used to represent the start or end point of a berth in the image; The offset value is determined based on the offset pixel difference and the actual width represented by a unit pixel; The longitude and latitude deviations are calculated based on the offset values, using the following formulas: in, Indicates longitude deviation. This indicates the latitude deviation, where d represents the offset value. Indicates the direction angle of consecutive berths. This represents the radius of the latitudinal section of the location of the continuous berths.
6. The method according to claim 1, characterized in that, After correcting the first coordinates in the first coordinate set when the deviation is greater than a preset deviation, until the deviation is less than the preset deviation, and obtaining the target coordinate set, the method further includes: The orientation angle of each berth is determined based on the target coordinates; Obtain the difference between the heading angle of each berth and the average heading angle of the consecutive berths; If the difference is greater than a preset difference, the berth is determined to be an error berth; Obtain the percentage of the number of the error berths in the consecutive berths; If the proportion of the number is greater than the preset proportion, the target coordinates corresponding to the consecutive berths are determined to be unqualified, and the target coordinates of the consecutive berths are re-determined.
7. The method according to claim 1, characterized in that, The process of obtaining the first coordinate set of a continuous berth segment includes: Obtain the starting and ending coordinates of a continuous berth segment; The distance between the starting point coordinates and the ending point coordinates is divided equally to obtain the coordinate change of each berth; Based on the starting or ending coordinates of the consecutive berths and the coordinate change, the first starting coordinates and the first ending coordinates of each berth are calculated to obtain the first coordinates of all the berths, forming a first coordinate set.
8. A berth coordinate acquisition device, characterized in that, include: The first coordinate acquisition module is used to acquire a first coordinate set of a continuous berth, the first coordinate set including the first coordinate of each berth in the continuous berth; The image acquisition module is used to acquire a set of images of the continuous berths; The deviation calculation module is used to calculate the deviation of each berth based on the first coordinate set and the image set; The coordinate correction module is used to correct the first coordinate in the first coordinate set when the deviation is greater than the preset deviation, until the deviation is less than the preset deviation, to obtain a target coordinate set, wherein the target coordinate set includes the target coordinates of each berth.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 7.