Parking space equal depth and width calculation method and device, electronic equipment and storage medium
By converting the parking space from the global coordinate system to the local coordinate system and using the characteristics of the local coordinate system to calculate the equal depth and width, the problems of parking efficiency and accuracy in narrow parking spaces are solved, and the vehicle parking efficiency and user experience are improved.
Patent Information
- Application Number
- CN202510740577.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-04
- Publication Date
- 2025-09-23
AI Technical Summary
In the presence of obstacles or narrow parking spaces, it is difficult for existing technologies to accurately calculate the parking posture of the vehicle, resulting in low parking efficiency and poor accuracy.
The target parking space is converted from the global coordinate system to the local coordinate system. The horizontal axis of the local coordinate system is the same as the entrance edge, and the vertical axis is the same as the connecting edge. By obtaining the horizontal coordinates on the left and right boundaries of the available area, the equal depth width corresponding to the given depth is calculated to adjust the parking position of the vehicle.
By simplifying two-dimensional operations into one-dimensional operations, the efficiency and accuracy of vehicle parking are improved, the calculation complexity is reduced, the risk of scratching obstacles is reduced, and the user experience is improved.
Smart Images

Figure CN120681145A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of automatic parking, and in particular to a method and device for calculating the equal depth and width of a parking space, an electronic device, and a storage medium. Background Art
[0002] With the development of autonomous driving technology, automatic parking, memory parking, and valet parking functions have greatly reduced the difficulty of parking for drivers. As one of the key modules of parking functions, parking space processing plays a vital role.
[0003] For an empty parking space with no intruding obstacles, the final parking posture can be in the middle of the parking space; however, for a narrow parking space with intruding obstacles, parking the vehicle in the middle of the parking space may cause the door to be unable to open, and there is a risk of scratching obstacles around the vehicle.
[0004] Therefore, for parking spaces with obstacles or narrow spaces, the width of the available area (width at equal depth) must be calculated multiple times during the parking process to determine the vehicle's parking position in the space. Due to errors in parking space marking or slanted parking spaces, the process of calculating width and depth is complicated, affecting parking efficiency and reducing parking accuracy. Summary of the Invention
[0005] In view of this, the present disclosure proposes a method for calculating the equal depth and width of parking spaces, which can improve the efficiency and accuracy of vehicle parking.
[0006] According to one aspect of the present disclosure, a method for calculating the equal depth width of a parking space is provided, including: converting a target parking space from a global coordinate system to a local coordinate system to obtain a first parking space in the local coordinate system, wherein the horizontal axis of the local coordinate system is in the same direction as the entrance edge of the first parking space, the vertical axis of the local coordinate system is in the same direction as the connecting edge of the first parking space, and the entrance edge of the first parking space is connected to the connecting edge of the first parking space; obtaining a first horizontal coordinate of a first point corresponding to a given depth and located on the left boundary of an available area of the first parking space; obtaining a second horizontal coordinate of a second point corresponding to the given depth and located on the right boundary of the available area; and determining a first equal depth width corresponding to the given depth based on the first horizontal coordinate and the second horizontal coordinate, wherein the first equal depth width is used to adjust the parking posture of the vehicle.
[0007] In one possible implementation, converting the target parking space from the global coordinate system to the local coordinate system to obtain the first parking space in the local coordinate system includes: determining the first vertex coordinates of each vertex of the target parking space; based on the transformation relationship between the global coordinate system and the local coordinate system, converting each first vertex coordinate to obtain each second vertex coordinate; and determining the first parking space based on each second vertex coordinate.
[0008] In one possible implementation, the method further includes: determining a first angle between the entrance edge of the target parking space and the horizontal direction in the global coordinate system, and a second angle between the connecting edge of the target parking space and the horizontal direction; and determining the transformation relationship based on the first angle, the second angle, and the first coordinate of the origin of the local coordinate system in the global coordinate system.
[0009] In a possible implementation, when there is a left obstacle at the given depth on the left side of the first parking space, the first coordinates of the first intersection of the left obstacle and the horizontal axis are determined, the first coordinates are used as the first starting coordinates, and the first ending coordinates of the left obstacle are determined; the obtaining of the first horizontal coordinates of the first point corresponding to the given depth and located on the left boundary of the available area of the first parking space includes: determining a third angle between the left obstacle and the horizontal axis based on the first starting coordinates and the first ending coordinates; determining a first distance between the first point and the first intersection; and determining a first distance between the first point and the first intersection based on the first distance, the first starting coordinates, the third angle, and the given depth. degrees, determining the first horizontal coordinate; in the case that there is a right obstacle at the given depth on the right side of the first parking space, determining the second coordinate of a second intersection point of the right obstacle and the horizontal axis, using the second coordinate as a second starting coordinate, and determining the second ending coordinate of the right obstacle; obtaining the second horizontal coordinate of the second point corresponding to the given depth and located on the right boundary of the available area includes: determining a fourth angle between the right obstacle and the horizontal axis based on the second starting coordinate and the second ending coordinate; determining a second distance between the second point and the second intersection point; and determining the second horizontal coordinate based on the second distance, the second starting coordinate, and the fourth angle.
[0010] In a possible implementation, the method further includes: when there is no left obstacle on the left side of the first parking space at the given depth, taking the coordinates of the starting point of the left boundary as the first starting coordinates, and taking the coordinates of the ending point of the left boundary as the first ending coordinates; obtaining the first horizontal coordinate of the first point corresponding to the given depth and located on the left boundary of the available area of the first parking space, including: determining a fifth angle between the left boundary and the horizontal axis based on the first starting coordinate and the first ending coordinate; determining a third distance between the first point and the starting point of the left boundary; and determining a third distance between the first point and the starting point of the left boundary based on the third distance, the first starting coordinate, the fifth angle, and the Given a depth, determine the first horizontal coordinate; when there is no left obstacle on the right side of the first parking space at the given depth, use the coordinates of the starting point of the right boundary as the second starting coordinate, and use the coordinates of the ending point of the right boundary as the second ending coordinate; obtaining the second horizontal coordinate of the second point corresponding to the given depth and located on the right boundary of the available area includes: determining the sixth angle between the right obstacle and the horizontal axis based on the second starting coordinate and the second ending coordinate; determining the fourth distance between the second point and the starting point of the right boundary; and determining the second horizontal coordinate based on the fourth distance, the second starting coordinate, and the sixth angle.
[0011] In one possible implementation, determining the first distance between the first point and the first intersection includes: determining the first distance based on the third angle, the given depth, and the first starting coordinate; determining the second distance between the second point and the second intersection includes: determining the second distance based on the fourth angle, the given depth, and the second starting coordinate.
[0012] In one possible implementation, determining the first equal depth width corresponding to the given depth based on the first horizontal coordinate and the second horizontal coordinate includes: determining the difference between the first horizontal coordinate and the second horizontal coordinate, and using the difference as the second equal depth width; for the given depth, when there are no obstacles on one side or both sides of the first parking space, expanding the second equal depth width toward the side without the obstacle according to a default value to obtain the first equal depth width.
[0013] According to another aspect of the present disclosure, a device for calculating the equal depth and width of a parking space is provided, the device comprising:
[0014] a first parking space determining unit, configured to convert a target parking space from a global coordinate system to a local coordinate system to obtain a first parking space in the local coordinate system, wherein a horizontal axis of the local coordinate system is in the same direction as an entrance edge of the first parking space, a vertical axis of the local coordinate system is in the same direction as a connecting edge of the first parking space, and the entrance edge of the first parking space is connected to the connecting edge of the first parking space;
[0015] a first horizontal coordinate determining unit, configured to obtain a first horizontal coordinate of a first point corresponding to a given depth and located on a left boundary of an available area of the first parking space;
[0016] a second horizontal coordinate determining unit, configured to obtain a second horizontal coordinate of a second point corresponding to the given depth and located on the right boundary of the available area;
[0017] The first isobath width determining unit is configured to determine a first isobath width corresponding to the given depth based on the first horizontal coordinate and the second horizontal coordinate, where the first isobath width is used to adjust the parking posture of the vehicle.
[0018] In a possible implementation, the first parking space determining unit is further configured to:
[0019] Determine the first vertex coordinates of each vertex of the target parking space;
[0020] Based on the transformation relationship between the global coordinate system and the local coordinate system, transform the coordinates of each first vertex to obtain the coordinates of each second vertex;
[0021] The first parking space is determined based on the coordinates of each of the second vertices.
[0022] In a possible implementation, the apparatus further includes:
[0023] an angle determination unit, configured to determine a first angle between an entrance edge of the target parking space and a horizontal direction in a global coordinate system, and a second angle between a connecting edge of the target parking space and the horizontal direction;
[0024] A transformation relationship determining unit is used to determine the transformation relationship based on the first angle, the second angle, and the first coordinate of the origin of the local coordinate system in the global coordinate system.
[0025] In a possible implementation, the device is further configured to:
[0026] In a case where a left obstacle exists at the given depth on the left side of the first parking space, determining a first coordinate of a first intersection of the left obstacle and the horizontal axis, using the first coordinate as a first starting coordinate, and determining a first ending coordinate of the left obstacle;
[0027] The first horizontal coordinate determining unit is further configured to:
[0028] determining a third angle between the left obstacle and the horizontal axis according to the first starting coordinate and the first ending coordinate;
[0029] determining a first distance between the first point and the first intersection point;
[0030] Determine the first horizontal coordinate based on the first distance, the first starting coordinate, the third angle, and the given depth;
[0031] The device is also used for:
[0032] If a right obstacle exists at the given depth on the right side of the first parking space, determining a second coordinate of a second intersection of the right obstacle and the horizontal axis, using the second coordinate as a second starting coordinate, and determining a second ending coordinate of the right obstacle;
[0033] The second horizontal coordinate determining unit is further configured to:
[0034] determining a fourth angle between the right obstacle and the horizontal axis according to the second starting coordinate and the second ending coordinate;
[0035] determining a second distance between the second point and the second intersection point;
[0036] The second horizontal coordinate is determined based on the second distance, the second starting coordinate, and the fourth angle.
[0037] In a possible implementation, the device is further configured to:
[0038] In a case where there is no left obstacle at the given depth on the left side of the first parking space, using the coordinates of the starting point of the left boundary as the first starting coordinates, and using the coordinates of the ending point of the left boundary as the first ending coordinates;
[0039] The first horizontal coordinate determining unit is further configured to:
[0040] Determining a fifth angle between the left boundary and the horizontal axis according to the first starting coordinate and the first ending coordinate;
[0041] determining a third distance between the first point and a starting point of the left boundary;
[0042] determining the first horizontal coordinate based on the third distance, the first starting coordinate, the fifth angle, and the given depth;
[0043] The device is also used for:
[0044] In a case where there is no left obstacle at the given depth on the right side of the first parking space, using the coordinates of the starting point of the right boundary as the second starting coordinates, and using the coordinates of the ending point of the right boundary as the second ending coordinates;
[0045] The second horizontal coordinate determining unit is further configured to:
[0046] determining a sixth angle between the right obstacle and the horizontal axis according to the second starting coordinate and the second ending coordinate;
[0047] determining a fourth distance between the second point and a starting point of the right boundary;
[0048] The second horizontal coordinate is determined based on the fourth distance, the second starting coordinate, and the sixth angle.
[0049] In a possible implementation, the first horizontal coordinate determining unit is further configured to:
[0050] determining the first distance based on the third angle, the given depth, and the first starting coordinate;
[0051] The second horizontal coordinate determining unit is further configured to:
[0052] The second distance is determined based on the fourth angle, the given depth, and the second starting coordinate.
[0053] In a possible implementation, the first equal depth width determining unit is further configured to:
[0054] Determine a difference between the first horizontal coordinate and the second horizontal coordinate, and use the difference as a second equal depth width;
[0055] For the given depth, when there are no obstacles on one or both sides of the first parking space, the second equal depth width is expanded toward the side without obstacles according to a default value to obtain the first equal depth width.
[0056] According to another aspect of the present disclosure, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of the above method.
[0057] According to another aspect of the present disclosure, a non-volatile computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above method are implemented.
[0058] According to another aspect of the present disclosure, a computer program product is provided, including a computer program, or a non-volatile computer-readable storage medium carrying the computer program, wherein the computer program implements the steps of the above method when executed by a processor.
[0059] In the disclosed embodiment, the target parking space is converted from the global coordinate system to the local coordinate system to obtain the first parking space. The entrance edge of the first parking space is in the same direction as the horizontal axis, and the connecting edge is in the same direction as the vertical axis. In this way, for any given depth, the horizontal coordinates of the points (first point, second point) corresponding to any depth on the left and right boundaries of the available area can be used to calculate the width. In this way, the two-dimensional operation that requires the participation of the horizontal and vertical coordinates is converted into a one-dimensional operation, which reduces the computational complexity. In the case where the vertical parking space or the horizontal parking space is not standard (not rectangular), or the parking space is an oblique parking space, by establishing a local coordinate system, the complex oblique parking space related calculations under the global coordinate system are converted into simple coordinate transformations and algebraic operations under the local coordinate system, eliminating the tedious trigonometric function calculations under the global complex angles and position relationships, improving the efficiency and accuracy of determining the equal depth width, thereby improving the vehicle parking efficiency and accuracy, and improving the user experience.
[0060] Further features and aspects of the present disclosure will become apparent from the following detailed description of exemplary embodiments with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0061] The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate exemplary embodiments, features, and aspects of the disclosure and, together with the description, serve to explain the principles of the disclosure.
[0062] Figure 1 A flowchart of a method for calculating the equal depth and width of parking spaces provided in an embodiment of the present disclosure.
[0063] Figure 2 A schematic diagram of the global coordinate system and the local coordinate system provided in an embodiment of the present disclosure.
[0064] Figure 3 A schematic diagram of another global coordinate system and local coordinate system provided in an embodiment of the present disclosure.
[0065] Figure 4 A schematic diagram of calculating a first horizontal coordinate when a left obstacle exists at a given depth is provided in an embodiment of the present disclosure.
[0066] Figure 5 A schematic diagram of calculating the first horizontal coordinate when there is no left obstacle at a given depth provided by an embodiment of the present disclosure.
[0067] Figure 6 A schematic diagram of calculating the equal depth and width of an inclined train station provided in an embodiment of the present disclosure.
[0068] Figure 7 A schematic diagram of the structure of a parking space equal depth and width calculation device provided in an embodiment of the present disclosure.
[0069] Figure 8 A schematic diagram of the structure of an electronic device for calculating the depth and width of a parking space provided in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0070] Various exemplary embodiments, features, and aspects of the present disclosure will be described in detail below with reference to the accompanying drawings. The same reference numerals in the accompanying drawings represent elements with the same or similar functions. Although various aspects of the embodiments are shown in the accompanying drawings, the drawings are not necessarily drawn to scale unless otherwise indicated.
[0071] As used herein, the terms "comprises," "comprising," "having," or variations thereof are open ended and include one or more stated features, integers, elements, steps, parts, or functions, but do not preclude the presence or addition of one or more other features, integers, elements, steps, parts, functions, or groups thereof.
[0072] When an element is referred to as being "connected," "coupled," "responsive" or variations thereof to another element, it can be directly connected, coupled or responsive to the other element or intervening elements may be present.
[0073] Although the terms first, second, third, etc. may be used herein to describe various elements / operations, these elements / operations should not be limited by these terms. These terms are only used to distinguish one element / operation from another element / operation. Therefore, without departing from the teachings of the present invention, the first element / operation in some embodiments may be referred to as the second element / operation in other embodiments.
[0074] The word “exemplary” is used exclusively herein to mean “serving as an example, example, or illustration.” Any embodiment described herein as “exemplary” is not necessarily to be construed as preferred or advantageous over other embodiments.
[0075] In addition, numerous specific details are provided in the following detailed description to better illustrate the present disclosure. Those skilled in the art will appreciate that the present disclosure can be practiced without certain specific details. In some instances, methods, means, components, and circuits well known to those skilled in the art are not described in detail in order to highlight the main points of the present disclosure.
[0076] Figure 1 This is a flow chart of a method for calculating the equal depth and width of parking spaces provided in an embodiment of the present disclosure. The method includes:
[0077] S11, converting the target parking space from the global coordinate system to the local coordinate system to obtain a first parking space in the local coordinate system, wherein the horizontal axis of the local coordinate system is in the same direction as the entrance edge of the first parking space, the vertical axis of the local coordinate system is in the same direction as the connection edge of the first parking space, and the entrance edge of the first parking space is connected to the connection edge of the first parking space.
[0078] The global coordinate system, also known as the world coordinate system or absolute coordinate system, provides a unified positioning and orientation reference for all objects in space. For example, the global coordinate system can be a pre-defined Cartesian coordinate system. The target parking space can be the image data of the physical parking space where the vehicle is to be parked, expressed in the global coordinate system. The target parking space can represent information such as the physical parking space's position, shape, and occupancy status in the global coordinate system.
[0079] The local coordinate system is a coordinate system established for the target parking space. Its horizontal and vertical axes are related to the specific side directions of the parking space and are used to intuitively describe the position relationship within the parking space. For example, the local coordinate system can be a Cartesian coordinate system or an oblique coordinate system.
[0080] For ease of description, the target parking space converted to the local coordinate system is named the first parking space. The first parking space is the representation of the target parking space in the local coordinate system after coordinate transformation. The physical parking space can be a rectangle or a parallelogram. The coordinate values of the target parking space may change when it is converted from the global coordinate system to the local coordinate system.
[0081] For ease of description, the first edge a vehicle passes through when entering the first parking space can be named the entrance edge of the first parking space; the edge in the first parking space that is parallel to the entrance edge can be named the base edge; the edge in the first parking space that is connected to the entrance edge can be named the connecting edge; and the edge in the first parking space that is parallel to the connecting edge can be named the connecting opposite edge. The horizontal axis of the local coordinate system is oriented in the same direction as the entrance edge. Since the entrance edge is parallel to the base edge, the horizontal axis of the local coordinate system is oriented in the same direction as the base edge. The vertical axis of the local coordinate system is oriented in the same direction as the connecting edge in the first parking space. Since the connecting edge is parallel to the connecting opposite edge, the vertical axis of the local coordinate system is oriented in the same direction as the base edge. The origin of the local coordinate system is the intersection of the horizontal and vertical axes.
[0082] In one example, the vertex at the top left corner of the first parking space coincides with the origin of the local coordinate system. Therefore, the entrance edge of the first parking space coincides with the horizontal axis of the local coordinate system; the bottom edge of the first parking space is parallel to the horizontal axis of the local coordinate system; the connecting edge of the first parking space coincides with the vertical axis of the local coordinate system; and the connecting opposite edge of the first parking space is parallel to the vertical axis of the local coordinate system.
[0083] In another example, if no vertex of the first parking space coincides with the origin of the local coordinate system, then the entrance edge and the bottom edge of the first parking space are parallel to the horizontal axis of the local coordinate system, and the connecting edge and the connecting opposite edge of the first parking space are parallel to the vertical axis of the local coordinate system.
[0084] Figure 2 Schematic diagram of the global coordinate system and local coordinate system provided for an embodiment of the present disclosure. The target parking space is converted from the global coordinate system XOY to the local coordinate system X'O'Y', resulting in the first parking space. A vertex of the first parking space coincides with the origin O' in the local coordinate system. The entrance edge of the first parking space coincides with the X' axis, and the bottom edge of the first parking space is parallel to the X' axis. The connecting edge of the first parking space coincides with the Y' axis, and the connecting opposite edge of the first parking space is parallel to the Y' axis.
[0085] Figure 3 A schematic diagram of another global coordinate system and local coordinate system provided for an embodiment of the present disclosure. The target parking space is converted from the global coordinate system XOY to the local coordinate system X"O"Y", resulting in the first parking space. No vertex of the first parking space coincides with the origin O" in the local coordinate system. The entrance edge and base of the first parking space are parallel to the X" axis; the connecting edge and connecting opposite edge of the first parking space are parallel to the Y" axis.
[0086] S12: Obtain a first horizontal coordinate of a first point corresponding to a given depth and located on a left boundary of an available area of the first parking space.
[0087] The available area may be the area of the first parking space that is not occupied by other objects and can be used. If there are no obstacles encroaching on the first parking space, the available area may be the area occupied by the first parking space. If there are no obstacles encroaching on the first parking space, the left boundary of the available area may be the left boundary of the first parking space, and the right boundary of the available area may be the right boundary of the first parking space.
[0088] If the first parking space is occupied by an obstacle, the available area may be the area enclosed by the obstacle and the edge of the first parking space. The first parking space may be occupied by a left obstacle located to the left of the first parking space. The first parking space may be occupied by a right obstacle located to the right of the first parking space. The first parking space may be occupied by both left and right obstacles. If the first parking space is occupied by the left obstacle, a portion of the left boundary of the available area may be the left obstacle, and the remainder of the left boundary of the available area may be the left boundary of the first parking space. If the first parking space is occupied by the right obstacle, a portion of the right boundary of the available area may be the right obstacle, and the remainder of the right boundary of the available area may be the right boundary of the first parking space.
[0089] The given depth can be a preset or temporarily given depth value, and the depth is in the direction of the vehicle entering the parking space (i.e., the longitudinal axis direction) in the local coordinate system of the parking space. A single first parking space can correspond to multiple given depths. A single given depth can represent a single depth of the first parking space. In the local coordinate system, a single depth can correspond to a first numerical value on the longitudinal axis. A first point with the first numerical value as the longitudinal coordinate can exist on the left boundary of the available area. The horizontal coordinate of the first point can be determined. For the sake of convenience of description, the horizontal coordinate of the first point is named the first horizontal coordinate.
[0090] S13: Acquire a second horizontal coordinate of a second point corresponding to the given depth and located on the right boundary of the available area.
[0091] A second point with the first value as the vertical coordinate may exist on the right boundary of the available area. The horizontal coordinate of the second point may be determined, and for ease of description, the horizontal coordinate of the second point is named the second horizontal coordinate.
[0092] S14: Determine a first constant depth width corresponding to the given depth based on the first horizontal coordinate and the second horizontal coordinate, where the first constant depth width is used to adjust the parking posture of the vehicle.
[0093] As mentioned above, the entrance edge of the first parking space is in the same direction as the horizontal axis of the local coordinate system (coincides with or is parallel to it). Then at the same given depth, the line connecting the first point and the second point is parallel to the horizontal axis of the local coordinate system. The length of this line is the first equal depth width corresponding to the given depth. The first point and the second point are located on the same straight line parallel to the horizontal axis, so the length of this line can be the absolute value of the difference between the first horizontal coordinate and the second horizontal coordinate. Therefore, for a given depth, the first horizontal coordinate and the second horizontal coordinate can be used to determine the first equal depth width corresponding to the given depth. Before the vehicle enters the physical parking space, and when the vehicle enters the physical parking space but has not yet completed parking, multiple first equal depth widths can be obtained. The first equal depth width can help the parking system understand the shape of the available area and the width of each part of the available area, and then determine the target parking position of the vehicle. In this way, it can help the vehicle park in an appropriate position, reduce the risk of scratching obstacles, and allow the door to be opened smoothly after the vehicle is parked, thereby improving the user experience.
[0094] In the disclosed embodiment, the target parking space is converted from the global coordinate system to the local coordinate system to obtain the first parking space. The entrance edge of the first parking space is in the same direction as the horizontal axis, and the connecting edge is in the same direction as the vertical axis. In this way, for any given depth, the horizontal coordinates of the points (first point, second point) corresponding to any depth on the left and right boundaries of the available area can be used to calculate the width. In this way, the two-dimensional operation that requires the participation of the horizontal and vertical coordinates is converted into a one-dimensional operation, which reduces the computational complexity. In the case where the vertical parking space or the horizontal parking space is not standard (not rectangular), or the parking space is an oblique parking space, by establishing a local coordinate system, the complex oblique parking space related calculations under the global coordinate system are converted into simple coordinate transformations and algebraic operations under the local coordinate system, eliminating the tedious trigonometric function calculations under the global complex angles and position relationships, improving the efficiency and accuracy of determining the equal depth width, thereby improving the vehicle parking efficiency and accuracy, and improving the user experience.
[0095] In one possible implementation, converting the target parking space from the global coordinate system to the local coordinate system to obtain the first parking space in the local coordinate system includes: determining the first vertex coordinates of each vertex of the target parking space; based on the transformation relationship between the global coordinate system and the local coordinate system, converting each first vertex coordinate to obtain each second vertex coordinate; and determining the first parking space based on each second vertex coordinate.
[0096] In the disclosed embodiment, each vertex of the target parking space can be identified in the global coordinate system, and the coordinates of each first vertex can be obtained. Using the transformation relationship between the global coordinate system and the local coordinate system, each first vertex coordinate is converted into a corresponding second vertex coordinate in the local coordinate system. This yields the second vertex represented by the second vertex coordinate. A single second vertex is then connected with adjacent second vertices to obtain the first parking space.
[0097] Using the transformation relationship between the global coordinate system and the local coordinate system, the coordinates of the first vertex are transformed to obtain the first parking space. This ensures that the entrance edge of the first parking space is aligned with the horizontal axis of the local coordinate system. This allows for one-dimensional calculations using the first and second horizontal coordinates when calculating the first constant depth width. Thus, using the transformation relationship in the disclosed embodiment, the first parking space and the range it occupies are obtained. Furthermore, this reduces the computational complexity of the first constant depth width and improves parking efficiency and accuracy.
[0098] In one possible implementation, the method further includes: determining a first angle between the entrance edge of the target parking space and the horizontal direction in the global coordinate system, and a second angle between the connecting edge of the target parking space and the horizontal direction; and determining the transformation relationship based on the first angle, the second angle, and the first coordinate of the origin of the local coordinate system in the global coordinate system.
[0099] In the disclosed embodiment, the entrance edge of the target parking space can be identified automatically, semi-automatically, or manually. The angle between the entrance edge and the horizontal axis of the global coordinate system can be determined. For ease of description, this angle is referred to as the first angle. Alternatively, a first line segment can be generated that intersects the entrance edge and is parallel to the horizontal axis of the global coordinate system, with the angle between the entrance edge and the first line segment being the first angle.
[0100] The connecting edge of the target parking space can be identified automatically, semi-automatically, or manually. The angle between the connecting edge and the horizontal axis of the global coordinate system can be determined. For ease of description, this angle is referred to as the second angle. Alternatively, a second line segment can be generated that intersects the connecting edge and is parallel to the horizontal axis of the global coordinate system. The angle between the connecting edge and the second line segment is used as the second angle.
[0101] Furthermore, the first coordinate of the origin of the local coordinate system in the global coordinate system is determined. For example, if the origin of the local coordinate system is desired to coincide with a second vertex of the first parking space, the coordinate of the second vertex can be directly determined in the global coordinate system to obtain the first coordinate.
[0102] In another example, the horizontal axis of the local coordinate system can be established along the direction of the entrance edge of the target parking space, and the vertical axis of the local coordinate system can be established along the direction of the connecting edge of the target parking space. In this way, the local coordinate system can be established within the global coordinate system. With the horizontal and vertical axes of the local coordinate system determined, the first coordinates can be obtained. The first coordinates include: the horizontal coordinate of the first origin and the vertical coordinate of the first origin.
[0103] Then, based on the trigonometric transformation principle in analytic geometry, the transformation relationship between the global coordinate system and the local coordinate system is determined. For ease of understanding, the transformation relationship is expressed using formula (1).
[0104]
[0105] Where α represents the first angle, β represents the second angle, x1 represents the abscissa of the first origin, y1 represents the ordinate of the first origin, x represents the abscissa of a single point in the global coordinate system, y represents the ordinate of the single point in the global coordinate system, x′ represents the abscissa of the single point in the local coordinate system (either the first abscissa or the second abscissa), y′ represents the ordinate of the single point in the local coordinate system, Δx represents the signed distance from the vertex in the first parking space closest to the origin of the local coordinate system to the origin along the horizontal axis, and Δy represents the signed distance from the vertex in the first parking space closest to the origin of the local coordinate system to the origin along the vertical axis. When a single vertex in the first parking space coincides with the origin of the local coordinate system, Δx = Δy = 0.
[0106] The local coordinate system is not fixed for different parking spaces. The local coordinate system changes with the shape of the parking space where the vehicle is to be parked. For each parking space where the vehicle is to be parked, a local coordinate system that matches the parking space needs to be established, and the transformation relationship between the global coordinate system and the local coordinate system needs to be determined. Then, improving the efficiency of determining the transformation relationship is the key. The horizontal and vertical axes of the local coordinate system disclosed in the present invention are related to the directions of the entrance edge and the connecting edge of the target parking space (the first parking space), and it is easy to determine the first angle and the second angle. In this way, the transformation relationship can be quickly determined. The transformation relationship can even be determined in the process of establishing the local coordinate system. Therefore, using the method of the embodiment of the present invention, the efficiency of determining the transformation relationship between the global coordinate system and the local coordinate system can be improved.
[0107] In a possible implementation, when there is a left obstacle at the given depth on the left side of the first parking space, the first coordinates of the first intersection point of the left obstacle and the horizontal axis are determined, the first coordinates are used as the first starting coordinates, and the first ending coordinates of the left obstacle are determined; the obtaining of the first horizontal coordinates of the first point corresponding to the given depth and located on the left boundary of the available area of the first parking space includes: determining a third angle between the left obstacle and the horizontal axis based on the first starting coordinates and the first ending coordinates; determining a first distance between the first point and the first intersection point; and determining a first distance based on the first distance, the first starting coordinates, and the third angle. The first horizontal coordinate; in the case that there is a right obstacle at the given depth on the right side of the first parking space, determining the second coordinate of the second intersection of the right obstacle and the horizontal axis, using the second coordinate as the second starting coordinate, and determining the second ending coordinate of the right obstacle; obtaining the second horizontal coordinate of the second point corresponding to the given depth and located on the right boundary of the available area, including: determining the fourth angle between the right obstacle and the horizontal axis based on the second starting coordinate and the second ending coordinate; determining the second distance between the second point and the second intersection; determining the second horizontal coordinate based on the second distance, the second starting coordinate, and the fourth angle.
[0108] The left and right boundaries of the available area are related to whether an obstacle intrudes into the first parking space and the range occupied by the obstacle within the first parking space. Therefore, when calculating the first and second horizontal coordinates, a categorical discussion should be conducted on whether an obstacle intrudes on the left and right sides of the first parking space. In this disclosed embodiment, the method for determining the first horizontal coordinate when a left obstacle exists at a given depth on the left side of the first parking space, and the method for determining the second horizontal coordinate when a right obstacle exists at a given depth on the right side of the first parking space, will be discussed.
[0109] When there is a left obstacle at a given depth on the left side of the first parking space, the first point is located on the left obstacle. For the sake of convenience of description, the coordinates of the first point in the local coordinate system are named the first ending coordinates. The first ending coordinates include: a first horizontal coordinate and a first vertical coordinate. Among them, the first vertical coordinate is the aforementioned first numerical value. For the sake of convenience of explanation, the point that passes through the first point and intersects with the horizontal axis along the direction of the left obstacle is named the first intersection. And, the coordinates of the first intersection are named the first starting coordinates. The first starting coordinates and the first ending point coordinates can be used to determine the direction of the left obstacle, that is, the third angle. The first intersection is determined in order to locate the position where the left obstacle intersects with the horizontal axis in order to measure the first distance.
[0110] Figure 4 This diagram illustrates an embodiment of the present disclosure for calculating the first horizontal coordinate when a left obstacle exists at a given depth. The left obstacle is represented by a line segment between point A and the first point. The first point is located on the left obstacle at the given depth. A perpendicular line is drawn through the first point to the horizontal axis, intersecting the horizontal axis at point B.
[0111] like Figure 4 As shown, based on the coordinates of the first intersection point and the first point (i.e., the first starting coordinate and the first ending coordinate), the third angle can be obtained. Figure 4 In [1], θ is used to represent the third angle. The first distance between the first intersection point and the first point can be measured. Using trigonometric formulas, the first length between the first intersection point and point B can be determined based on the third angle and the first distance. Furthermore, the abscissa of the first point, i.e., the first abscissa, can be determined based on the first starting coordinate and the first length.
[0112] When there is a right obstacle at a given depth on the right side of the first parking space, the second point is located on the right obstacle. For the sake of convenience of description, the coordinates of the second point in the local coordinate system are named as the second ending coordinates. The second ending coordinates include: a second horizontal coordinate and a second vertical coordinate. Among them, the second vertical coordinate is the aforementioned first value. For the sake of convenience of explanation, the point that passes through the second point and intersects with the horizontal axis in the direction of the right obstacle is named as the second intersection point. And, the coordinates of the second intersection point are named as the second starting coordinates. The second starting coordinates and the second ending coordinates can be used to determine the direction of the right obstacle, that is, the fourth angle. The second intersection point is determined in order to locate the position where the right obstacle intersects with the horizontal axis in order to measure the second distance.
[0113] Based on the coordinates of the second intersection point and the second point (i.e., the second starting coordinate and the second ending coordinate), the fourth angle can be obtained. The second distance between the second intersection point and the second point can be measured. Draw a perpendicular line through the second point to the horizontal axis, and the perpendicular line intersects the horizontal axis at point D. Using trigonometric formulas, the second length between the second intersection point and point D can be determined based on the fourth angle and the second distance. Moreover, based on the second starting coordinate and the second length, the horizontal coordinate of the second point, i.e., the second horizontal coordinate, can be determined.
[0114] For ease of understanding, the process of determining the first horizontal coordinate and the second horizontal coordinate is represented by formula (2).
[0115] x=x s +d*cos(θ) (2)
[0116] In which, when the first horizontal coordinate is determined, x s Represents the horizontal coordinate in the first starting coordinate, x represents the first horizontal coordinate; if there is a left obstacle on the left boundary, θ represents the third angle, and d represents the first distance; if there is no left obstacle on the left boundary, θ represents the fifth angle, and d represents the third distance.
[0117] In the case of determining the second horizontal coordinate, x s represents the horizontal coordinate in the second starting coordinate, x represents the second horizontal coordinate; if there is a right obstacle on the right boundary, θ represents the fourth angle, and d represents the second distance; if there is no right obstacle on the right boundary, θ represents the sixth angle, and d represents the fourth distance.
[0118] In the disclosed embodiment, the third angle can be represented using the first ending coordinate and the first starting coordinate, and the first distance can be obtained by measurement. The fourth angle can be represented using the second ending coordinate and the second starting coordinate, and the second distance can be obtained by measurement. Therefore, the disclosed embodiment uses less data to determine the first and second horizontal coordinates, and the calculation is simple. When there is an obstacle at a given depth, the amount of acquired data is reduced, the calculation is simplified, and the efficiency of determining the first and second horizontal coordinates is improved.
[0119] In a possible implementation, the method further includes: when there is no left obstacle on the left side of the first parking space at the given depth, taking the coordinates of the starting point of the left boundary as the first starting coordinates, and taking the coordinates of the ending point of the left boundary as the first ending coordinates; obtaining the first horizontal coordinate of the first point corresponding to the given depth and located on the left boundary of the available area of the first parking space, including: determining a fifth angle between the left boundary and the horizontal axis based on the first starting coordinate and the first ending coordinate; determining a third distance between the first point and the starting point of the left boundary; and determining a third distance between the first point and the starting point of the left boundary based on the third distance, the first starting coordinate, the fifth angle, and the Given a depth, determine the first horizontal coordinate; when there is no left obstacle on the right side of the first parking space at the given depth, use the coordinates of the starting point of the right boundary as the second starting coordinate, and use the coordinates of the ending point of the right boundary as the second ending coordinate; obtaining the second horizontal coordinate of the second point corresponding to the given depth and located on the right boundary of the available area includes: determining the sixth angle between the right obstacle and the horizontal axis based on the second starting coordinate and the second ending coordinate; determining the fourth distance between the second point and the starting point of the right boundary; and determining the second horizontal coordinate based on the fourth distance, the second starting coordinate, and the sixth angle. In the embodiment of the present disclosure, we first discuss a method for determining the first horizontal coordinate when there is a left obstacle invading the left side of the first parking space; and a method for determining the second horizontal coordinate when there is a right obstacle invading the right side of the first parking space.
[0120] If there is no left obstacle at the given depth on the left side of the first parking space, the left boundary of the available area is the left boundary of the first parking space, and the first point is located on the left boundary of the first parking space. A starting point exists at the left boundary of the first parking space, and the coordinates of this starting point are named the first starting coordinates. The first point is located on the left boundary of the first parking space and corresponds to the given depth.
[0121] Figure 5 A schematic diagram of calculating the first horizontal coordinate when there is no left obstacle at a given depth provided by an embodiment of the present disclosure. A perpendicular line is drawn through the first point to the horizontal axis, and the perpendicular line intersects the horizontal axis at point B.
[0122] Based on the coordinates of the starting point and the first point of the left boundary of the first parking space (i.e., the first starting coordinate and the first ending coordinate), the fifth angle can be obtained. Figure 5 In [1], θ is used to represent the fifth angle. The third distance between the starting point of the left boundary of the first parking space and the first point can be measured. Using trigonometric formulas, the third length between the starting point of the left boundary of the first parking space and point B can be determined based on the fifth angle and the third distance. Furthermore, the abscissa of the first point, i.e., the first abscissa, can be determined based on the first starting coordinate and the third length.
[0123] If there is no right obstacle at the given depth on the right side of the first parking space, the right boundary of the available area is the right boundary of the first parking space, and the first point is located on the right boundary of the first parking space. A starting point exists at the right boundary of the first parking space. The coordinates of this starting point are named the second starting coordinates. The second point is located on the right boundary of the first parking space at the given depth.
[0124] Based on the coordinates of the starting point and the second point of the right boundary of the first parking space (i.e., the second starting coordinate and the second ending coordinate), the sixth angle can be obtained. The fourth distance between the starting point and the second point of the right boundary of the first parking space can be measured. Draw a perpendicular line through the second point to the horizontal axis, and the perpendicular line intersects the horizontal axis at point D. Using trigonometric formulas, the fourth length between the starting point and point D of the right boundary of the first parking space can be determined based on the sixth angle and the fourth distance. In addition, based on the second starting coordinate and the fourth length, the horizontal coordinate of the second point, i.e., the second horizontal coordinate, can be determined.
[0125] The first horizontal coordinate and the second horizontal coordinate can be determined using formula (2).
[0126] In the disclosed embodiment, the fifth angle can be represented using the first ending coordinate and the first starting coordinate, and the third distance can be obtained by measurement. The sixth angle can be represented using the second ending coordinate and the second starting coordinate, and the fourth distance can be obtained by measurement. Therefore, the disclosed embodiment uses less data to determine the first horizontal coordinate and the second horizontal coordinate, and the calculation is simple. In the absence of obstacles at a given depth, the amount of acquired data is reduced, the calculation is simplified, and the efficiency of determining the first horizontal coordinate and the second horizontal coordinate is improved.
[0127] In one possible implementation, determining the first distance between the first point and the first intersection includes: determining the first distance based on the third angle, the given depth, and the first starting coordinate; determining the second distance between the second point and the second intersection includes: determining the second distance based on the fourth angle, the given depth, and the second starting coordinate.
[0128] In addition, determining the third distance between the first point and the starting point of the left boundary includes: determining the third distance based on the fifth angle, the given depth, and the first starting coordinate; determining the fourth distance between the second point and the starting point of the right boundary includes: determining the fourth distance based on the sixth angle, the given depth, and the second starting coordinate.
[0129] In the disclosed embodiment, trigonometric formulas are used to determine the ordinate of the first point, i.e., the first ordinate, based on the first starting coordinates, the first intersection point (or the starting point of the left boundary of the first parking space), and the first length (or the third length). The ordinate of the second point, i.e., the second ordinate, can be determined based on the second starting coordinates, the second intersection point (or the starting point of the right boundary of the first parking space), and the second length (or the fourth length).
[0130] For ease of understanding, the process of determining the first horizontal coordinate and the second horizontal coordinate is represented by formula (3).
[0131] y=y s +d*sin(θ) (3)
[0132] Among them, when determining the first vertical coordinate, y s Indicates the ordinate in the first starting coordinate, y indicates the first ordinate. In the case of determining the second ordinate, y s represents the ordinate in the second starting coordinate, and y represents the second ordinate.
[0133] Among them, d can be represented by y s , given depth representation. For ease of understanding, we can use formula (4) to represent d.
[0134]
[0135] Here, h represents the given depth.
[0136] By combining formulas (2) and (4), formula (5) can be used to express the process of determining the first horizontal coordinate and the second horizontal coordinate.
[0137]
[0138] Where h represents a given depth. θ can be expressed using formula (6).
[0139] θ=tan -1 (yy s ,xx s ) (6)
[0140] In this way, the first distance, the second distance, the third distance, and the fourth distance do not need to be actually calculated or measured, but can be expressed as known quantities, thereby further improving the efficiency of determining the first horizontal coordinate and the second horizontal coordinate.
[0141] In one possible implementation, determining the first equal depth width corresponding to the given depth based on the first horizontal coordinate and the second horizontal coordinate includes: determining the difference between the first horizontal coordinate and the second horizontal coordinate, and using the difference as the second equal depth width; for the given depth, when there are no obstacles on one side or both sides of the first parking space, expanding the second equal depth width toward the side without the obstacle according to a default value to obtain the first equal depth width.
[0142] At the same given depth, the distance between the left and right boundaries of the available area (the second equal depth width) can be the difference between the first horizontal coordinate and the second horizontal coordinate corresponding to the given depth. If there is no left obstacle at the left boundary at a given depth, in order to make the parking position of the vehicle more reasonable, such as not affecting passengers opening the car door, getting off the vehicle, etc., the vehicle can be allowed to park at the left boundary line. In this way, the second equal depth width can be expanded to the left. The expansion value can be a default value, for example: the default value can be the distance between the boundary of the vehicle and the boundary of the parking space on the same side when the vehicle is parked in the center of the parking space. Exemplarily, the default value can be 0.5 meters.
[0143] If there is no right obstacle at the right boundary at a given depth, the vehicle can be allowed to park at the right boundary line. Thus, the second equal depth width can be expanded to the right according to the default value.
[0144] If there are no obstacles at the left and right boundaries of the available area at a given depth, the second equal depth width is expanded in both the left and right directions according to default values to obtain the first equal depth width.
[0145] In the disclosed embodiment, when there are no obstacles on one or both sides of the first parking space, the second equal depth width is expanded toward the side without obstacles according to the default value, which makes the parking position of the vehicle more reasonable and improves the feasibility of parking the vehicle in the parking space.
[0146] Figure 6 This is a schematic diagram of calculating the equal depth and width of the inclined train parking space provided by the embodiment of the present disclosure. Figure 6 As shown, the first parking space is an oblique space. There is a left obstacle to the left of the first parking space, but no obstacle to the right. Therefore, the first point is located on the left obstacle, and the second point is located on the right boundary of the first parking space. A perpendicular line drawn through the first point to the horizontal axis intersects the horizontal axis at point B. A perpendicular line drawn through the second point to the horizontal axis intersects the horizontal axis at point D. The angle between the left obstacle and the horizontal axis is the third angle, and the angle between the first parking space and the right boundary is the sixth angle. Figure 6 θ1 is used to represent the third angle, and θ2 is used to represent the sixth angle.
[0147] In the disclosed embodiment, the isobath distance corresponding to a given depth is transformed into the problem of determining the difference between the first horizontal coordinate of the first point and the second horizontal coordinate of the second point. As shown in the figure, this difference can be further transformed into the difference between the horizontal coordinates of points B and D.
[0148] Based on formulas (5) and (6), the respective horizontal coordinates of points B and D can be determined, that is, the first horizontal coordinate and the second horizontal coordinate are obtained. The difference between the first and second horizontal coordinates is used as the second constant depth width. Because there is a left obstacle on the left side of the first parking space, the second constant depth width can be expanded to the left of the first parking space according to the default value to obtain the first constant depth width.
[0149] In the disclosed embodiment, not only can the efficiency of determining the equal depth and width of the inclined train parking space be improved, but also, when an obstacle invades the inclined train parking space, the probability of the vehicle being parked in a reasonable position is increased, thereby improving the user experience.
[0150] Figure 7 This is a schematic diagram of the structure of a parking space equal depth and width calculation device provided in an embodiment of the present disclosure. The device 20 includes:
[0151] a first parking space determining unit 21 configured to convert a target parking space from a global coordinate system to a local coordinate system to obtain a first parking space in the local coordinate system, wherein the horizontal axis of the local coordinate system is in the same direction as the entrance edge of the first parking space, the vertical axis of the local coordinate system is in the same direction as the connection edge of the first parking space, and the entrance edge of the first parking space is connected to the connection edge of the first parking space;
[0152] a first horizontal coordinate determining unit 22 for obtaining a first horizontal coordinate of a first point corresponding to a given depth and located on a left boundary of an available area of the first parking space;
[0153] A second horizontal coordinate determining unit 23 is configured to obtain a second horizontal coordinate of a second point corresponding to the given depth and located on the right boundary of the available area;
[0154] The first isobath width determining unit 24 is configured to determine a first isobath width corresponding to the given depth based on the first horizontal coordinate and the second horizontal coordinate, where the first isobath width is used to adjust the parking posture of the vehicle.
[0155] In a possible implementation, the first parking space determining unit 21 is further configured to:
[0156] Determine the first vertex coordinates of each vertex of the target parking space;
[0157] Based on the transformation relationship between the global coordinate system and the local coordinate system, transform the coordinates of each first vertex to obtain the coordinates of each second vertex;
[0158] The first parking space is determined based on the coordinates of each of the second vertices.
[0159] In a possible implementation, the apparatus 20 further includes:
[0160] an angle determination unit, configured to determine a first angle between an entrance edge of the target parking space and a horizontal direction in a global coordinate system, and a second angle between a connecting edge of the target parking space and the horizontal direction;
[0161] A transformation relationship determining unit is used to determine the transformation relationship based on the first angle, the second angle, and the first coordinate of the origin of the local coordinate system in the global coordinate system.
[0162] In a possible implementation, the device 20 is further configured to:
[0163] In a case where a left obstacle exists at the given depth on the left side of the first parking space, determining a first coordinate of a first intersection of the left obstacle and the horizontal axis, using the first coordinate as a first starting coordinate, and determining a first ending coordinate of the left obstacle;
[0164] The first horizontal coordinate determining unit 22 is further configured to:
[0165] determining a third angle between the left obstacle and the horizontal axis according to the first starting coordinate and the first ending coordinate;
[0166] determining a first distance between the first point and the first intersection point;
[0167] Determine the first horizontal coordinate based on the first distance, the first starting coordinate, the third angle, and the given depth;
[0168] The device 20 is also used for:
[0169] If a right obstacle exists at the given depth on the right side of the first parking space, determining a second coordinate of a second intersection of the right obstacle and the horizontal axis, using the second coordinate as a second starting coordinate, and determining a second ending coordinate of the right obstacle;
[0170] The second horizontal coordinate determining unit 23 is further configured to:
[0171] determining a fourth angle between the right obstacle and the horizontal axis according to the second starting coordinate and the second ending coordinate;
[0172] determining a second distance between the second point and the second intersection point;
[0173] The second horizontal coordinate is determined based on the second distance, the second starting coordinate, and the fourth angle.
[0174] In a possible implementation, the device 20 is further configured to:
[0175] In a case where there is no left obstacle at the given depth on the left side of the first parking space, using the coordinates of the starting point of the left boundary as the first starting coordinates, and using the coordinates of the ending point of the left boundary as the first ending coordinates;
[0176] The first horizontal coordinate determining unit 22 is further configured to:
[0177] Determining a fifth angle between the left boundary and the horizontal axis according to the first starting coordinate and the first ending coordinate;
[0178] determining a third distance between the first point and a starting point of the left boundary;
[0179] determining the first horizontal coordinate based on the third distance, the first starting coordinate, the fifth angle, and the given depth;
[0180] The device 20 is also used for:
[0181] In a case where there is no left obstacle at the given depth on the right side of the first parking space, using the coordinates of the starting point of the right boundary as the second starting coordinates, and using the coordinates of the ending point of the right boundary as the second ending coordinates;
[0182] The second horizontal coordinate determining unit 23 is further configured to:
[0183] determining a sixth angle between the right obstacle and the horizontal axis according to the second starting coordinate and the second ending coordinate;
[0184] determining a fourth distance between the second point and a starting point of the right boundary;
[0185] The second horizontal coordinate is determined based on the fourth distance, the second starting coordinate, and the sixth angle.
[0186] In a possible implementation, the first horizontal coordinate determining unit 22 is further configured to:
[0187] Determining the first distance based on the third angle, the given depth, and the first starting coordinate;
[0188] The second horizontal coordinate determining unit 23 is further configured to:
[0189] The second distance is determined based on the fourth angle, the given depth, and the second starting coordinate.
[0190] In a possible implementation, the first equal depth width determining unit 24 is further configured to:
[0191] Determine a difference between the first horizontal coordinate and the second horizontal coordinate, and use the difference as a second equal depth width;
[0192] For the given depth, when there are no obstacles on one or both sides of the first parking space, the second equal depth width is expanded toward the side without obstacles according to a default value to obtain the first equal depth width.
[0193] In some embodiments, the functions or modules included in the device provided by the embodiments of the present disclosure can be used to execute the method described in the above method embodiments. The specific implementation can refer to the description of the above method embodiments. For the sake of brevity, it will not be repeated here.
[0194] An embodiment of the present disclosure further provides an electronic device, including a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of the above method.
[0195] An embodiment of the present disclosure further provides a non-volatile computer-readable storage medium having a computer program stored thereon, wherein the computer program implements the steps of the above method when executed by a processor.
[0196] An embodiment of the present disclosure further provides a computer program product, including a computer program, or a non-volatile computer-readable storage medium carrying the computer program, wherein the computer program implements the steps of the above method when executed by a processor.
[0197] Figure 8 This is a schematic diagram of the structure of an electronic device for calculating the depth and width of a parking space provided in an embodiment of the present disclosure. For example, the electronic device 1900 can be provided as a server or a terminal device. Figure 8 The electronic device 1900 includes a processing component 1922, which further includes one or more processors, and a memory resource represented by a memory 1932 for storing instructions executable by the processing component 1922, such as an application. The application stored in the memory 1932 may include one or more modules, each corresponding to a set of instructions. In addition, the processing component 1922 is configured to execute the instructions to perform the above-described method.
[0198] The electronic device 1900 may further include a power supply component 1926 configured to perform power management of the electronic device 1900, a wired or wireless network interface 1950 configured to connect the electronic device 1900 to a network, and an input / output interface 1958 (I / O interface). The electronic device 1900 may operate based on an operating system stored in the memory 1932, such as Windows Server 2003. TM , Mac OS X TM , Unix TM ,Linux TM , FreeBSD TM or similar.
[0199] In an exemplary embodiment, a non-volatile computer-readable storage medium is also provided, such as a memory 1932 including computer program instructions that can be executed by the processing component 1922 of the electronic device 1900 to perform the above method.
[0200] A computer-readable storage medium can be a tangible device that can hold and store programs / instructions used by an instruction execution device. A computer-readable storage medium can be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination thereof. More specific examples (a non-exhaustive list) of computer-readable storage media include: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a static random access memory (SRAM), a portable compact disc read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanical encoding device, such as a punch card or a raised structure in a groove on which instructions are stored, and any suitable combination thereof. As used herein, a computer-readable storage medium is not to be construed as a transient signal per se, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagating through a waveguide or other transmission medium (e.g., a light pulse through a fiber optic cable), or an electrical signal transmitted through an electrical wire.
[0201] The computer programs (or computer-readable program instructions) described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, optical fiber transmission, wireless transmission, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions to be stored in the computer-readable storage medium in each computing / processing device.
[0202] The computer program (or computer program instructions) for performing the operations of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages such as Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The computer readable program instructions may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider). In some embodiments, by utilizing state information of computer-readable program instructions to personalize and customize an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), the electronic circuit can execute the computer-readable program instructions to implement various aspects of the present disclosure.
[0203] Various aspects of the present disclosure are described herein with reference to flowcharts and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the present disclosure. It should be understood that each block of the flowcharts and / or block diagrams, and combinations of blocks in the flowcharts and / or block diagrams, can be implemented by computer-readable program instructions.
[0204] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, so that when these instructions are executed by the processor of the computer or other programmable data processing device, a device is generated that implements the functions / actions specified in one or more blocks in the flowchart and / or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium, where these instructions cause the computer, programmable data processing device, and / or other device to operate in a specific manner. Thus, the computer-readable medium storing the instructions comprises an article of manufacture that includes instructions for implementing various aspects of the functions / actions specified in one or more blocks in the flowchart and / or block diagram.
[0205] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operational steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to implement the functions / actions specified in one or more blocks in the flowchart and / or block diagram.
[0206] The flow charts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the systems, methods and computer program products according to multiple embodiments of the present disclosure. In this regard, each box in the flow chart or block diagram can represent a part of a module, program segment or instruction, and the part of the module, program segment or instruction contains one or more executable instructions for realizing the prescribed logical function. In some alternative implementations, the functions marked in the box can also occur in a sequence different from that marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flow chart, and the combination of the boxes in the block diagram and / or flow chart can be implemented by a dedicated hardware-based system that performs the prescribed function or action, or can be implemented by a combination of dedicated hardware and computer instructions.
[0207] While various embodiments of the present disclosure have been described above, the foregoing description is intended to be illustrative, non-exhaustive, and not limited to the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is selected to best explain the principles of the embodiments, their practical applications, or technological improvements in the marketplace, or to enable others skilled in the art to understand the embodiments disclosed herein.
Claims
1. A method for calculating the equal depth and width of a parking space, characterized in that: include: Converting the target parking space from the global coordinate system to a local coordinate system to obtain a first parking space in the local coordinate system, wherein the horizontal axis of the local coordinate system is in the same direction as the entrance edge of the first parking space, the vertical axis of the local coordinate system is in the same direction as the connecting edge of the first parking space, and the entrance edge of the first parking space is connected to the connecting edge of the first parking space; Obtaining a first horizontal coordinate of a first point corresponding to a given depth and located on a left boundary of an available area of the first parking space; Acquire a second horizontal coordinate of a second point corresponding to the given depth and located on the right boundary of the available area; A first equal depth width corresponding to the given depth is determined based on the first horizontal coordinate and the second horizontal coordinate, where the first equal depth width is used to adjust the parking posture of the vehicle.
2. The method according to claim 1, characterized in that The step of converting the target parking space from the global coordinate system to the local coordinate system to obtain the first parking space in the local coordinate system includes: Determine the first vertex coordinates of each vertex of the target parking space; Based on the transformation relationship between the global coordinate system and the local coordinate system, transform the coordinates of each first vertex to obtain the coordinates of each second vertex; The first parking space is determined based on the coordinates of each of the second vertices.
3. The method according to claim 2, characterized in that The method further comprises: Determining a first angle between an entrance edge of the target parking space and a horizontal direction in a global coordinate system, and a second angle between a connecting edge of the target parking space and the horizontal direction; The transformation relationship is determined based on the first angle, the second angle, and a first coordinate of the origin of the local coordinate system in the global coordinate system.
4. The method according to claim 1, wherein In a case where a left obstacle exists at the given depth on the left side of the first parking space, determining a first coordinate of a first intersection of the left obstacle and the horizontal axis, using the first coordinate as a first starting coordinate, and determining a first ending coordinate of the left obstacle; The obtaining of a first horizontal coordinate of a first point corresponding to a given depth and located on a left boundary of an available area of the first parking space includes: determining a third angle between the left obstacle and the horizontal axis according to the first starting coordinate and the first ending coordinate; determining a first distance between the first point and the first intersection point; Determine the first horizontal coordinate based on the first distance, the first starting coordinate, the third angle, and the given depth; If a right obstacle exists at the given depth on the right side of the first parking space, determining a second coordinate of a second intersection of the right obstacle and the horizontal axis, using the second coordinate as a second starting coordinate, and determining a second ending coordinate of the right obstacle; The acquiring a second horizontal coordinate of a second point corresponding to the given depth and located on the right boundary of the available area includes: determining a fourth angle between the right obstacle and the horizontal axis according to the second starting coordinate and the second ending coordinate; determining a second distance between the second point and the second intersection point; The second horizontal coordinate is determined based on the second distance, the second starting coordinate, and the fourth angle.
5. The method according to claim 4, characterized in that The method further includes: when there is no left obstacle at the given depth on the left side of the first parking space, using the coordinates of the starting point of the left boundary as the first starting coordinates and using the coordinates of the ending point of the left boundary as the first ending coordinates; The obtaining of a first horizontal coordinate of a first point corresponding to a given depth and located on a left boundary of an available area of the first parking space includes: Determining a fifth angle between the left boundary and the horizontal axis according to the first starting coordinate and the first ending coordinate; determining a third distance between the first point and a starting point of the left boundary; determining the first horizontal coordinate based on the third distance, the first starting coordinate, the fifth angle, and the given depth; In a case where there is no left obstacle at the given depth on the right side of the first parking space, using the coordinates of the starting point of the right boundary as the second starting coordinates, and using the coordinates of the ending point of the right boundary as the second ending coordinates; The acquiring a second horizontal coordinate of a second point corresponding to the given depth and located on the right boundary of the available area includes: determining a sixth angle between the right obstacle and the horizontal axis according to the second starting coordinate and the second ending coordinate; determining a fourth distance between the second point and a starting point of the right boundary; The second horizontal coordinate is determined based on the fourth distance, the second starting coordinate, and the sixth angle.
6. The method according to claim 4, characterized in that The determining a first distance between the first point and the first intersection point includes: Determining the first distance based on the third angle, the given depth, and the first starting coordinate; The determining a second distance between the second point and the second intersection point includes: The second distance is determined based on the fourth angle, the given depth, and the second starting coordinate.
7. The method according to claim 1, characterized in that The determining, based on the first horizontal coordinate and the second horizontal coordinate, a first equal depth width corresponding to the given depth includes: Determine a difference between the first horizontal coordinate and the second horizontal coordinate, and use the difference as a second equal depth width; For the given depth, when there are no obstacles on one or both sides of the first parking space, the second equal depth width is expanded toward the side without obstacles according to a default value to obtain the first equal depth width.
8. A parking space equal depth and width calculation device, characterized in that: The device comprises: a first parking space determining unit, configured to convert a target parking space from a global coordinate system to a local coordinate system to obtain a first parking space in the local coordinate system, wherein a horizontal axis of the local coordinate system is in the same direction as an entrance edge of the first parking space, a vertical axis of the local coordinate system is in the same direction as a connecting edge of the first parking space, and the entrance edge of the first parking space is connected to the connecting edge of the first parking space; a first horizontal coordinate determining unit, configured to obtain a first horizontal coordinate of a first point corresponding to a given depth and located on a left boundary of an available area of the first parking space; a second horizontal coordinate determining unit, configured to obtain a second horizontal coordinate of a second point corresponding to the given depth and located on the right boundary of the available area; The first isobath width determining unit is configured to determine a first isobath width corresponding to the given depth based on the first horizontal coordinate and the second horizontal coordinate, where the first isobath width is used to adjust the parking posture of the vehicle.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory, characterized in that: The processor executes the computer program to implement the steps of the method according to any one of claims 1 to 7.
10. A non-volatile computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.