PARKING LOT CORNER POINT CORRECTION METHOD, PARKING LOT CORNER POINT CORRECTION SYSTEM, AND VEHICLE
20220198811 · 2022-06-23
Inventors
Cpc classification
G06V10/457
PHYSICS
G06V10/44
PHYSICS
G06V10/98
PHYSICS
International classification
G06V20/58
PHYSICS
Abstract
The invention relates to a parking lot corner point correction method and system. The method includes: an obtaining step of obtaining a parking lot corner point of a parking lot; and a correction step of performing, based on a position relationship between parking lot corner points of the parking lot, rectangular correction on the parking lot corner points to obtain a corrected parking lot. The obtaining step includes: a first obtaining sub-step of obtaining a parking lot corner point of a parking lot; a determination sub-step of determining whether a corner point confidence level of the parking lot corner point meets a first threshold and whether a corner point offset thereof meets a second threshold, and jumping to the correction step if it is determined that the corner point confidence level meets the first threshold and the corner point offset meets the second threshold, otherwise, proceeding to a second obtaining sub-step; and the second obtaining sub-step of discarding the parking lot corner point of the parking lot that is detected in the first obtaining sub-step, and then using a parking lot corner point at a corresponding position that is predicted by an odometer, as the parking lot corner point of the parking lot. According to the invention, the parking accuracy may be improved.
Claims
1. A parking lot corner point correction method, comprising: an obtaining step of obtaining a parking lot corner point of a parking lot; and a correction step of performing, based on a position relationship between parking lot corner points of the parking lot, rectangular correction on the parking lot corner points to obtain a corrected parking lot.
2. The parking lot corner point correction method according to claim 1, wherein the obtaining step comprises: a first obtaining sub-step of obtaining a parking lot corner point of a parking lot; a determination sub-step of determining whether a corner point confidence level of the parking lot corner point meets a first threshold and whether a corner point offset of the parking lot corner point meets a second threshold, and jumping to the correction step if it is determined that the corner point confidence level of the parking lot corner point meets the first threshold and the corner point offset of the parking lot corner point meets the second threshold, otherwise, proceeding to a second obtaining sub-step; and the second obtaining sub-step of discarding the parking lot corner point of the parking lot that is detected in the first obtaining sub-step, and then using a parking lot corner point at a corresponding position that is predicted by an odometer, as the parking lot corner point of the parking lot.
3. The parking lot corner point correction method according to claim 1, wherein the correction step comprises: forming four sides by the parking lot corner points of the parking lot, and obtaining four rectangles separately by taking one side in the four sides as a reference and taking the depth as a mean of the side length of the side; and taking, from among the four rectangles and as the corrected parking lot, a rectangle with the maximum confidence level on a thermodynamic diagram.
4. The parking lot corner point correction method according to claim 3, wherein the confidence level of the rectangle on the thermodynamic diagram is obtained by means of the confidence levels of the four corner points of the rectangle on the thermodynamic diagram.
5. The parking lot corner point correction method according to claim 3, wherein the confidence levels on the thermodynamic diagram are obtained by means of a corner point prediction model.
6. The parking lot corner point correction method according to claim 1, wherein the correction step comprises: selecting two sides from four sides formed by the parking lot corner points of the parking lot, and calculating a center line of the two sides; obtaining a parking lot entrance line segment of the parking lot according to a position relationship between a vehicle and the parking lot corner point of the parking lot; obtaining a point at which the center line intersects with the parking lot entrance line segment; and based on the position of the intersection point and the positions of the two sides, performing rectangular correction on the parking lot corner point by using a geometric relationship to obtain the corrected parking lot.
7. The parking lot corner point correction method according to claim 6, wherein if the two sides are parallel, a line which is parallel to the two sides and has an equal distance to the two sides is taken as a center line, a perpendicular line is drawn for the center line from the intersection point, points at which the perpendicular line respectively intersects with the two sides are used as corrected parking lot corner points, and rectangularization is performed based on the corrected parking lot corner points to obtain the corrected parking lot.
8. The parking lot corner point correction method according to claim 6, wherein if the two sides are not parallel, an angular bisector of an angle formed by extension lines of the two sides is used as the center line, a perpendicular line is drawn for the center line from the intersection point, points at which the perpendicular line respectively intersects with the two sides are used as corrected parking lot corner points, and rectangularization is performed based on the corrected parking lot corner points to obtain the corrected parking lot.
9. A parking lot corner point correction system, comprising: an obtaining module for obtaining a parking lot corner point of a parking lot; and a correction module for performing, based on a position relationship between parking lot corner points of the parking lot, rectangular correction on the parking lot corner points to obtain a corrected parking lot.
10. The parking lot corner point correction system according to claim 9, wherein the obtaining module comprises: a first obtaining sub-module configured to obtain a parking lot corner point of a parking lot; a determination sub-module configured to determine whether a corner point confidence level of the parking lot corner point acquired by the first obtaining sub-module meets a first threshold and whether a corner point offset of the parking lot corner point meets a second threshold, and then output a determination result; and a second obtaining sub-module configured to obtain a parking lot corner point at a corresponding position that is predicted by an odometer; and an output module configured to provide, based on the determination result from the determination sub-module and to the correction module, the parking lot corner point output by the first obtaining sub-module or the parking lot corner point output by the second obtaining sub-module.
11. The parking lot corner point correction system according to claim 9, wherein in the correction module, four sides are formed by the parking lot corner points of the parking lot, four rectangles are obtained separately by taking one side in the four sides as a reference and taking the depth as a mean of the side length of the side, and a rectangle with the maximum confidence level on a thermodynamic diagram is taken from among the four rectangles and is used as the corrected parking lot.
12. The parking lot corner point correction system according to claim 11, wherein the confidence level of the rectangle on the thermodynamic diagram is obtained by means of the confidence levels of the four corner points of the rectangle on the thermodynamic diagram.
13. The parking lot corner point correction system according to claim 12, wherein the confidence levels on the thermodynamic diagram are obtained by means of a corner point prediction model.
14. The parking lot corner point correction system according to claim 9, wherein in the correction module, two sides are selected from four sides formed by the parking lot corner points of the parking lot, a center line of the two sides is calculated, a parking lot entrance line segment of the parking lot is obtained according to a position relationship between a vehicle and the parking lot corner points of the parking lot, a point at which the center line intersects with the parking lot entrance line segment is obtained, and based on the position of the intersection point and the positions of the two sides, rectangular correction is performed on the parking lot corner point to obtain the corrected parking lot.
15. The parking lot corner point correction system according to claim 14, wherein if the two sides are parallel, a line which is parallel to the two sides and has an equal distance to the two sides is taken as a center line, a perpendicular line is drawn for the center line from the intersection point, points at which the perpendicular line respectively intersects with the two sides are used as corrected parking lot corner points, and rectangularization is performed based on the corrected parking lot corner points to obtain the corrected parking lot.
16. The parking lot corner point correction system according to claim 15, wherein if the two sides are not parallel, an angular bisector of an angle formed by extension lines of the two sides is used as the center line, a perpendicular line is drawn for the center line from the intersection point, points at which the perpendicular line respectively intersects with the two sides are used as corrected parking lot corner points, and rectangularization is performed based on the corrected parking lot corner points to obtain the corrected parking lot.
17. A computer device, comprising a storage module, a processor, and a computer program stored on the storage module and executable on the processor, wherein the computer program implements, when executed by the processor, a parking lot corner point correction method, the method comprising: an obtaining step of obtaining a parking lot corner point of a parking lot; and a correction step of performing, based on a position relationship between parking lot corner points of the parking lot, rectangular correction on the parking lot corner points to obtain a corrected parking lot.
Description
BRIEF DESCRIPTION OF THE DRAWINGS
[0040]
[0041]
[0042]
[0043]
[0044]
[0045]
[0046]
[0047]
[0048]
DETAILED DESCRIPTION OF EMBODIMENTS
[0049] Some of multiple embodiments of the invention are introduced below and are intended to provide a basic understanding of the invention. They are not intended to confirm key or decisive elements of the invention or limit the scope of protection.
[0050] For the sake of brevity and illustrative purposes, this document mainly describes the principles of the invention with reference to its exemplary embodiments. However, those skilled in the art will readily recognize that the same principles can be equivalently applied to all types of parking lot corner point correction methods, parking lot corner point correction systems, and vehicles including the parking lot corner point correction system, and the same principles can be implemented therein. Any such changes do not depart from the true spirit and scope of this patent application.
[0051] The inventors of the invention have found that in the case of vertical, horizontal and small-angle inclined parking lots, there are currently also the following problems to be solved:
[0052] a phenomenon of jitter occurs in a parking lot detection result in a video;
[0053] a model detection result is a non-standard rectangle, which increases the difficulty in parking path planning; and
[0054] when a small-angle inclined parking lot is determined to be a vertical/horizontal parking lot, inclined parking is caused.
[0055] In order to solve the problems above, the invention provides a parking lot corner point correction method. The parking lot corner point correction method provided in the invention includes the following steps:
[0056] an obtaining step of obtaining a parking lot corner point of a parking lot; and
[0057] a correction step of performing, based on a position relationship between parking lot corner points of the parking lot, rectangular correction on the parking lot corner points to obtain a corrected parking lot.
[0058] Here, the parking lot corner points are obtained by detecting parking lot corner point coordinates in an image acquired by a camera, for example, obtained by means of a corner point detection model (based on a deep learning network). Here, preferably, the state of the parking lot corner points can be determined reasonably.
[0059] A parking lot corner point correction method in an implementation of the invention will be described below.
[0060]
[0061] As shown in
[0062] step S100: detecting a parking lot corner point of a parking lot;
[0063] step S200: determining the state of the parking lot corner point, which specifically involves, for example, determining whether a corner point confidence level of the parking lot corner point meets a preset first threshold and whether a corner point offset thereof meets a preset second threshold, proceeding to step S300 if it is determined that the corner point confidence level meets the first threshold and the corner point offset meets the second threshold, otherwise, proceeding to step S400;
[0064] step S300: reserving the parking lot corner point detected in step S100;
[0065] step S400: discarding the parking lot corner point detected in step S100, and then using a parking lot corner point at a corresponding position that is predicted by an odometer, as the parking lot corner point of the parking lot;
[0066] step S500: determining four parking lot corner points based on step S300 or step S400; and
[0067] step S600: performing, based on a position relationship between parking lot corner points of the parking lot, rectangular correction on the parking lot corner points to obtain a corrected parking lot.
[0068] Here, determination of the state of the parking lot corner point mainly refers to determining whether the corner point detected by a model is reasonable. For example, a corner point tracked by the odometer should be at position (x, y), but there is a large offset in a model detection result (a threshold is preset). In this case, it is considered that the corner point detected by the model is less accurate, and the detection result of the corner point is discarded. A determination criterion may be set as follows: corner point confidence level>first threshold and corner point offset <second threshold. Here, the confidence level is output by the detection model, the detection model may represent possible coordinates (x, y) at which a point is a parking lot corner point and the possibility (confidence level) that the coordinates belong to the corner point, and the corner point offset refers to the distance between the detected corner point and a corner point predicted according to a result at a previous time.
[0069] Determining the state of the parking lot corner points is for the purpose of ensuring that the four corner points are as accurate as possible. For a parking lot corner point at a time t, there are three groups of data available, which are respectively as follows: (1) a parking lot corner point predicted by using the odometer from the beginning (which parking lot corner point has the lowest accuracy, but is not too far away from a target parking lot); (2) a parking lot corner point detected by the corner point detection model (which parking lot corner point may achieve the highest accuracy, but there may be a case where an individual corner point is deviated); and (3) a parking lot corner point predicted using the odometer according to a detection result at a time t-1 (that is, the previous time) (which parking lot corner point has a higher accuracy and is relatively stable). “Using a corner point at a corresponding position that is tracked by the odometer” above refers to the parking lot corner point predicted at the previous time in the case (3).
[0070] Next, two embodiments of the parking lot corner point correction method of the invention will be described.
[0071]
[0072] The parking lot corner point correction method provided in Embodiment 1 of the invention includes the following steps:
[0073] step S1: detecting a parking lot corner point of a parking lot;
[0074] step S2: determining the state of the parking lot corner point, which specifically involves, for example, determining whether a corner point confidence level of the parking lot corner point meets a preset first threshold and whether a corner point offset thereof meets a preset second threshold, proceeding to step S3 if it is determined that if it is determined that the corner point confidence level meets the preset first threshold and the corner point offset meets the preset second threshold , otherwise, proceeding to step S4;
[0075] step S3: reserving the parking lot corner point detected in step S1;
[0076] step S4: discarding the parking lot corner point detected in step S1, and then using a parking lot corner point at a corresponding position that is predicted by an odometer, as the parking lot corner point of the parking lot;
[0077] step S5: determining four parking lot corner points; and
[0078] step S6: forming four sides by the parking lot corner points of the parking lot, and obtaining four rectangles separately by taking one side in the four sides as a reference and taking the depth as a mean of the side length of the side; and
[0079] step S7: taking, from among the four rectangles and as the corrected parking lot, a rectangle with the maximum confidence level on a thermodynamic diagram. (i.e., a predicted parking lot), where the confidence level of the rectangle on the thermodynamic diagram can be obtained by means of the levels of confidence of the four corner points of the rectangle on the thermodynamic diagram (the confidence levels on the thermodynamic diagram are obtained by means of a corner point prediction model.).
[0080]
[0081] In the thermodynamic diagram of
[0082]
[0083] The parking lot corner point correction method in Embodiment 1 of the invention mainly solves the problem that, when there is an interference point, points obtained from the thermodynamic diagram lack shape information of the parking lot and there may be deviations in the detection of the parking lot corner point. In
[0084] Therefore, as described above, according to the parking lot corner point correction method in Embodiment 1 of the invention, the influence of a deviation from the detection result can be reduced, and the parking accuracy can be improved.
[0085]
[0086] The parking lot corner point correction method provided in Embodiment 2 of the invention includes the following steps:
[0087] step S11: detecting a parking lot corner point of a parking lot;
[0088] step S12: determining the state of the parking lot corner point, which specifically involves, for example, determining whether a corner point confidence level of the parking lot corner point meets a preset first threshold and whether a corner point offset thereof meets a preset second threshold, proceeding to step S13 if it is determined that the corner point confidence level meets the first threshold and the corner point offset meets the second threshold, otherwise, proceeding to step S14;
[0089] step S13: reserving the parking lot corner point detected in step S11;
[0090] step S14: discarding the parking lot corner point detected in step S11, and then using a parking lot corner point at a corresponding position that is predicted by an odometer, as the parking lot corner point of the parking lot;
[0091] step S15: determining four parking lot corner points according to step S13 or step S14; and
[0092] step S16: determining whether long sides of the parking lot are parallel, if yes, proceeding to step S17, and if not, proceeding to step S18;
[0093] step S17: obtaining a center line of the two parallel long sides;
[0094] step S18: obtaining an angular bisector of an angle formed by the two long sides;
[0095] step S19: correcting the positions of two corner points of short sides; and
[0096] step S20: performing rectangularization on the parking lot according to the two corner points.
[0097] If the long sides are not parallel, as shown in the left-side view of
[0098] Here, assuming that the coordinates of point A are A (x.sub.A, y.sub.A), the coordinates of point B are B (x.sub.B, y.sub.B), the coordinates of point C are C (x.sub.C, y.sub.C), the coordinates of point D are D (x.sub.D, y.sub.D), the coordinates of point 0′ are 0′ (x.sub.0′, y.sub.0′), and the coordinates of point 1′ are 1′ (x.sub.1′, y.sub.1′), the coordinates of point 0′ and point 1′ may be calculated based on the coordinates of point A, point B, point C, and point D.
[0099] The following formulas represent the calculation process for solving x.sub.0′ and y.sub.0′ in the coordinates 0 (x.sub.0′, y.sub.0′) of point 0′, and the calculation process for solving x.sub.1′ and y.sub.1′ in the coordinates 1′ (x.sub.1′, y.sub.1′) of point 1′ is similar to the process for solving the coordinates 0′ (x.sub.0′, y.sub.0′) of point 0′.
[0100] If the long sides are parallel, as shown in the right-side view of
[0101] In this way, after the positions of the two corner points of the short sides are corrected in two cases of parallel and non-parallel long sides, the parking lot may be subjected to rectangularization according to the corrected positions of the two corner points, so as to obtain the corrected parking lot.
[0102]
[0103]
[0104]
[0105] Next, a parking lot corner point correction system of the invention will be described.
[0106]
[0107] As shown in
[0108] an obtaining module 100 for obtaining a parking lot corner point of a parking lot; and
[0109] a correction module 200 for performing, based on a position relationship between parking lot corner points of the parking lot, rectangular correction on the parking lot corner points to obtain a corrected parking lot.
[0110] The obtaining module 100 includes:
[0111] a first obtaining sub-module 110 configured to obtain a parking lot corner point of a parking lot;
[0112] a determination sub-module 120 configured to determine whether a corner point confidence level of the parking lot corner point acquired by the first obtaining sub-module meets a first threshold and whether a corner point offset of the parking lot corner point meets a second threshold, and then output a determination result; and
[0113] a second obtaining sub-module 130 configured to obtain a parking lot corner point at a corresponding position that is predicted by an odometer; and
[0114] an output module 140 configured to provide, based on the determination result from the determination sub-module and to the correction module, the parking lot corner point output by the first obtaining sub-module or the parking lot corner point output by the second obtaining sub-module.
[0115] Optionally, in the correction module 200, four sides are formed by the parking lot corner points of the parking lot, four rectangles are obtained separately by taking one side in the four sides as a reference and taking the depth as a mean of the side length of the side, and a rectangle with the maximum confidence level on a thermodynamic diagram is taken from among the four rectangles and is used as the corrected parking lot. The confidence level of the rectangle on the thermodynamic diagram is obtained by means of the confidence levels of the four corner points of the rectangle on the thermodynamic diagram. The confidence levels on the thermodynamic diagram are obtained by means of a corner point prediction model.
[0116] Optionally, in the correction module 200, two sides are selected from four sides formed by the parking lot corner points of the parking lot, a center line of the two sides is calculated, a parking lot entrance line segment of the parking lot is obtained according to a position relationship between a vehicle and the parking lot corner points of the parking lot, a point at which the center line intersects with the parking lot entrance line segment is obtained, and based on the position of the intersection point and the positions of the two sides, rectangular correction is performed on the parking lot corner point by using a geometric relationship in
[0117] If the two sides are parallel, a line which is parallel to the two sides and has an equal distance to the two sides is taken as a center line, a perpendicular line is drawn for the center line from the intersection point, points at which the perpendicular line respectively intersects with the two sides are used as corrected parking lot corner points, and rectangularization is performed based on the corrected parking lot corner points to obtain the corrected parking lot.
[0118] If the two sides are not parallel, an angular bisector of an angle formed by extension lines of the two sides is used as the center line, a perpendicular line is drawn for the center line from the intersection point, points at which the perpendicular line respectively intersects with the two sides are used as corrected parking lot corner points, and rectangularization is performed based on the corrected parking lot corner points to obtain the corrected parking lot.
[0119] The invention further provides a computer-readable medium having a computer program stored thereon, where the computer program implements, when executed by a processor, a parking lot corner point correction system as described above.
[0120] The invention further provides a computer device, which includes a storage module, a processor, and a computer program stored on the storage module and executable on the processor, where the computer program implements, when executed by the processor, a parking lot corner point correction system as described above.
[0121] The invention further provides a vehicle, the vehicle including a parking lot corner point correction system as described above.
[0122] The examples above mainly illustrate a parking lot corner point correction method, a parking lot corner point correction system, and a vehicle including the parking lot corner point correction system in the invention. Although only some specific implementations of the invention are described, a person of ordinary skill in the art should understand that the invention may be implemented in multiple other forms without departing from the essence and scope of the invention. Accordingly, the presented examples and implementations are considered to be illustrative rather than restrictive, and the invention may encompass various modifications and replacements without departing from the spirit and scope of the invention that are defined by the appended claims.