CN113516870A - Parking space determining method and device, automatic parking equipment and storage medium - Google Patents

Parking space determining method and device, automatic parking equipment and storage medium Download PDF

Info

Publication number
CN113516870A
CN113516870A CN202110536136.4A CN202110536136A CN113516870A CN 113516870 A CN113516870 A CN 113516870A CN 202110536136 A CN202110536136 A CN 202110536136A CN 113516870 A CN113516870 A CN 113516870A
Authority
CN
China
Prior art keywords
points
corner
target
obstacle
point
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202110536136.4A
Other languages
Chinese (zh)
Other versions
CN113516870B (en
Inventor
窦步源
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Ofilm Intelligent Vehicle Co ltd
Original Assignee
Shanghai Ofilm Intelligent Vehicle Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Ofilm Intelligent Vehicle Co ltd filed Critical Shanghai Ofilm Intelligent Vehicle Co ltd
Priority to CN202110536136.4A priority Critical patent/CN113516870B/en
Publication of CN113516870A publication Critical patent/CN113516870A/en
Application granted granted Critical
Publication of CN113516870B publication Critical patent/CN113516870B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G08SIGNALLING
    • G08GTRAFFIC CONTROL SYSTEMS
    • G08G1/00Traffic control systems for road vehicles
    • G08G1/14Traffic control systems for road vehicles indicating individual free spaces in parking areas
    • GPHYSICS
    • G08SIGNALLING
    • G08GTRAFFIC CONTROL SYSTEMS
    • G08G1/00Traffic control systems for road vehicles
    • G08G1/09Arrangements for giving variable traffic instructions
    • G08G1/0962Arrangements for giving variable traffic instructions having an indicator mounted inside the vehicle, e.g. giving voice messages
    • G08G1/0968Systems involving transmission of navigation instructions to the vehicle
    • G08G1/096805Systems involving transmission of navigation instructions to the vehicle where the transmitted instructions are used to compute a route

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Radar, Positioning & Navigation (AREA)
  • Remote Sensing (AREA)
  • Traffic Control Systems (AREA)

Abstract

The application discloses a parking space determining method and device, automatic parking equipment and a storage medium, belongs to the technical field of vehicle control, and can solve the problem of poor stability of an existing parking space detecting method. The method comprises the following steps: determining target matching corner points, wherein the target matching corner points comprise a first corner point on a first obstacle and a second corner point on a second obstacle; calculating to obtain a first direction and a second direction based on the cost map and the target matching angular points, wherein the first direction is the direction of a first boundary of a first obstacle, the second direction is the direction of a second boundary of a second obstacle, and the first boundary and the second boundary are two boundaries adjacent to a parking space to be parked; determining a third direction of the parking space to be parked according to the first direction and the second direction; determining the target position of the parking space to be parked based on the target matching angular point and the third direction; the absolute value of the difference between the shortest distance from the parking space to the first obstacle and the shortest distance from the parking space to the second obstacle is less than or equal to a first threshold value.

Description

Parking space determining method and device, automatic parking equipment and storage medium
Technical Field
The application relates to the technical field of vehicle control, in particular to a parking space determining method and device, automatic parking equipment and a storage medium.
Background
Currently, the widely applied parking space detection method generally detects the angular point of the parking space through an ultrasonic radar or a camera, and positions the position of the final space parking space based on the angular point.
However, due to the performance difference of the ultrasonic radar or the deviation of the shot video image, the detected angular point may be deviated, and further the spatial parking space may be deviated accordingly.
Disclosure of Invention
The embodiment of the application provides a parking space determining method and device, automatic parking equipment and a storage medium, and can solve the problem of poor stability of an existing parking space detecting method.
In a first aspect, a parking space determining method is provided, and the method includes: determining a target matching corner point, wherein the target matching corner point comprises: a first corner point on the first obstacle and a second corner point on the second obstacle; calculating to obtain a first direction and a second direction based on the cost map and the target matching angular point, wherein the first direction is the direction of a first boundary of a first obstacle, the second direction is the direction of a second boundary of a second obstacle, and the first boundary and the second boundary are two boundaries adjacent to a parking space; determining a third direction of the parking space to be parked according to the first direction and the second direction; determining the target position of the parking space to be parked based on the target matching angular point and the third direction; the shortest distance between the parking space and the first obstacle is a first distance, the shortest distance between the parking space and the second obstacle is a second distance, and the absolute value of the difference value between the first distance and the second distance is smaller than or equal to a first threshold value.
In the embodiment of the application, according to the third direction and the target position, the parking space in which the absolute value of the difference between the first distance (the shortest distance between the parking space and the first obstacle) and the second distance (the shortest distance between the parking space and the second obstacle) is smaller than or equal to the first threshold value can be determined, the parking space meeting the requirement can be quickly and accurately positioned through the scheme, the stability of the parking space detection method can be improved, the requirement on the angular point detection precision in the angular point detection stage can be reduced to a certain extent, the limitation of the target matching angular point detection precision is avoided, and the parking space meeting the requirement can be obtained through the adjustment of the parking space determined by the target matching angular point. Moreover, the phenomenon that the vehicles to be parked are not rubbed or even can not be parked because the vehicles are too close to any side in the parking process can be avoided.
As an optional implementation manner, in the first aspect of the embodiment of the present application, the calculating, based on the cost map and the target matching corner point, a first direction and a second direction includes: determining P points on the first boundary based on the cost map and the first corner point, wherein P is an integer greater than 2; performing linear fitting on P points on a first boundary to obtain a first direction based on a first linear fitting algorithm, wherein the first direction is an extension direction of a straight line obtained by fitting the P points; determining Q points on a second boundary based on the cost map and the second corner point, wherein Q is an integer greater than 2; and performing linear fitting on the Q points on the second boundary based on a second linear fitting algorithm to obtain a second direction, wherein the second direction is an extension direction of a straight line obtained by fitting the Q points.
In the embodiment of the application, the first direction of the first boundary is obtained by obtaining the plurality of points on the first boundary of the first obstacle, the second direction of the second boundary is obtained by obtaining the plurality of points on the second boundary of the second obstacle, and the first direction and the second direction can be quickly and accurately obtained.
As an optional implementation manner, in the first aspect of the embodiment of the present application, the determining P points on the first boundary based on the cost map and the first corner point includes: translating the first corner point to a direction far away from the first boundary on the cost map to obtain a first point; determining a first line based on the first point and a direction perpendicular to a driving direction of the vehicle; respectively translating the P points on the first straight line to the first boundary, and determining the P points on the first boundary; the determining Q points on the second boundary based on the cost map and the second corner point includes: translating the second corner point to a direction far away from the second boundary on the cost map to obtain a second point; determining a second straight line based on the second point and a direction perpendicular to the driving direction; and respectively translating the Q points on the second straight line to the second boundary, and determining the Q points on the second boundary.
In the embodiment of the application, the plurality of points on the first boundary of the first obstacle are obtained through translation, the plurality of points on the second boundary of the second obstacle are obtained through translation, the process is simple, the implementation is easy, and the first direction and the second direction can be quickly and accurately obtained.
As an optional implementation manner, in a first aspect of an embodiment of the present application, the determining a target location of the parking space based on the target matching angular point and the third direction includes: determining a first target rectangular window based on the first corner point, the third direction, the first side length and the second side length, wherein the first side length is greater than or equal to the length of the vehicle, the first side length is the length of the first target rectangular window in the third direction, the first target rectangular window comprises at least one complete pixel point in the direction perpendicular to the third direction, and the first target rectangular window is a rectangular window which is closest to the first obstacle and does not comprise the first obstacle area; determining a second target rectangular window based on the second corner point, the third direction, the third side length and the fourth side length, wherein the third side length is greater than or equal to the length of the vehicle, the third side length is the length of the second target rectangular window in the third direction, the second target rectangular window comprises at least one complete pixel point in the direction perpendicular to the third direction, and the second target rectangular window is a rectangular window which is closest to the second obstacle and does not comprise the second obstacle area; the target position is determined based on the first target rectangular window and the second target rectangular window.
In the embodiment of the application, the target position is determined based on the first target rectangular window and the second target rectangular window by acquiring the first target rectangular window not including the first obstacle area and the second target rectangular window not including the second obstacle area, the operation is simple, the implementation is easy, and the target position of the parking space meeting the requirement can be quickly and accurately obtained.
As an optional implementation manner, in a first aspect of an embodiment of the present application, the determining a target matching corner point includes: and determining the target matching corner points based on the cost map.
In the embodiment of the application, the scheme for determining the target matching corner points based on the cost map is simple in process and easy to implement compared with other schemes for acquiring the target matching corner points.
As an optional implementation manner, in the first aspect of the embodiment of the present application, the target matching corner point is: and in the combination of the angular points in the candidate angular point set of the first barrier and the angular points in the candidate angular point set of the second barrier, the distance between the angular points is greater than or equal to two angular points with the smallest distance and the width of one parking space.
In the embodiment of the application, by setting the target matching corner points as above, a corner point combination which meets the requirements and is relatively accurate can be obtained from the corner point set to be selected of the first obstacle and the corner point set to be selected of the second obstacle.
As an optional implementation manner, in the first aspect of the embodiment of the present application, the determining, based on the cost map, a target matching corner point includes: determining S prepared corner sets based on the cost map, wherein the corners in each prepared corner set are sets of pixel points which are on all straight lines perpendicular to the axis of the vehicle on one obstacle and belong to the boundary of the obstacle, and S is an integer larger than 1; determining S candidate corner sets from the S prepared corner sets, wherein corners in each candidate corner set meet target conditions; and determining the target matching corner points from the S corner point sets to be selected.
In the embodiment of the application, S prepared corner sets are determined, S corner sets to be selected are determined, the target matching corner is determined, and the target matching corner is determined through a scheme of screening layer by layer.
As an alternative implementation, in the first aspect of the embodiments of the present application, the target condition is: the proportion of the pixel points belonging to the obstacle area in the corresponding square is within the target range, and the corresponding square is as follows: and the side length of the square is a square of the second threshold value, and the square is constructed by taking the corresponding corner point as the center.
In the embodiment of the application, the square screening corner points are constructed by taking the corresponding corner points as the centers, so that the corner points which do not meet requirements can be quickly screened out, and the complexity of subsequent corner point re-screening operation can be reduced.
As an optional implementation manner, in the first aspect of the embodiment of the present application, the determining the target matching corner point from the set of S corner points to be selected includes: determining T groups of matching angular points from the S candidate angular point sets, wherein each group of matching angular points are two adjacent obstacles, the distance between the angular points in the candidate angular point set of one obstacle and the angular points in the candidate angular point set of the other obstacle is greater than or equal to the width of one parking space and the distance between the two angular points is the smallest, and T is a positive integer less than or equal to S; the target matching corner is determined from the T set of matching corners.
In the embodiment of the application, the T groups of matching angular points are determined from the S corner point sets to be selected, and then the target matching angular points are determined from the T groups of matching angular points, so that selectivity is increased, matching angular points which meet requirements better can be determined, and then parking spaces to be parked can be determined better.
As an optional implementation manner, in the first aspect of the embodiment of the present application, the target matching corner point is: a set of matching corner points satisfying a predetermined condition, the predetermined condition being: the proportion of the pixel points belonging to the barrier region in the corresponding rectangle is less than or equal to a third threshold value; the corresponding rectangle is: and the rectangle takes the corresponding group of matched angular points as the vertex, takes the length of the vehicle as the side length, and has a center line perpendicular to the driving direction of the vehicle.
In the embodiment of the application, the accuracy of the finally determined parking space to be parked can be improved by matching the target matching angular points meeting the preset conditions.
In a second aspect, a parking space determining apparatus is provided, the apparatus including: a determining module and a calculating module; the determining module is configured to determine a target matching corner, where the target matching corner includes: a first corner point on the first obstacle and a second corner point on the second obstacle; the calculation module is used for calculating a first direction and a second direction based on the cost map and the target matching angular point determined by the determination module, wherein the first direction is the direction of a first boundary of a first obstacle, the second direction is the direction of a second boundary of a second obstacle, and the first boundary and the second boundary are two boundaries adjacent to a parking space to be parked; the determining module is further configured to determine a third direction of the parking space according to the first direction and the second direction obtained by the calculating module; determining the target position of the parking space to be parked based on the target matching angular point and the third direction; the shortest distance between the parking space and the first obstacle is a first distance, the shortest distance between the parking space and the second obstacle is a second distance, and the absolute value of the difference value between the first distance and the second distance is smaller than or equal to a first threshold value.
In the embodiment of the application, according to the third direction and the target position, the parking space in which the absolute value of the difference between the first distance (the shortest distance between the parking space and the first obstacle) and the second distance (the shortest distance between the parking space and the second obstacle) is smaller than or equal to the first threshold value can be determined, the parking space meeting the requirement can be quickly and accurately positioned through the scheme, the stability of the parking space detection method can be improved, the requirement on the angular point detection precision in the angular point detection stage can be reduced to a certain extent, the limitation of the target matching angular point detection precision is avoided, and the parking space meeting the requirement can be obtained through the adjustment of the parking space determined by the target matching angular point. Moreover, the phenomenon that the vehicles to be parked are not rubbed or even can not be parked because the vehicles are too close to any side in the parking process can be avoided.
As an optional implementation manner, in a second aspect of the embodiment of the present application, the calculating module is specifically configured to determine, based on the cost map and the first corner point, P points on the first boundary, where P is an integer greater than 2; performing linear fitting on P points on a first boundary to obtain a first direction based on a first linear fitting algorithm, wherein the first direction is an extension direction of a straight line obtained by fitting the P points; determining Q points on a second boundary based on the cost map and the second corner point, wherein Q is an integer greater than 2; and performing linear fitting on the Q points on the second boundary based on a second linear fitting algorithm to obtain a second direction, wherein the second direction is an extension direction of a straight line obtained by fitting the Q points.
In the embodiment of the application, the first direction of the first boundary is obtained by obtaining the plurality of points on the first boundary of the first obstacle, the second direction of the second boundary is obtained by obtaining the plurality of points on the second boundary of the second obstacle, and the first direction and the second direction can be quickly and accurately obtained.
As an optional implementation manner, in a second aspect of the embodiment of the present application, the calculating module is specifically configured to translate the first corner point in a direction away from the first boundary on the cost map to obtain a first point; determining a first line based on the first point and a direction perpendicular to a driving direction of the vehicle; respectively translating the P points on the first straight line to the first boundary, and determining the P points on the first boundary; translating the second corner point to a direction far away from the second boundary on the cost map to obtain a second point; determining a second straight line based on the second point and a direction perpendicular to the driving direction; and respectively translating the Q points on the second straight line to the second boundary, and determining the Q points on the second boundary.
In the embodiment of the application, the plurality of points on the first boundary of the first obstacle are obtained through translation, the plurality of points on the second boundary of the second obstacle are obtained through translation, the process is simple, the implementation is easy, and the first direction and the second direction can be quickly and accurately obtained.
As an optional implementation manner, in a second aspect of an embodiment of the present application, the determining module is specifically configured to determine a first target rectangular window based on the first corner point, the third direction, the first side length and the second side length, where the first side length is greater than or equal to the length of the vehicle, the first side length is the length of the first target rectangular window in the third direction, the first target rectangular window includes at least one complete pixel point in a direction perpendicular to the third direction, and the first target rectangular window is a rectangular window that is closest to the first obstacle and does not include the first obstacle region; determining a second target rectangular window based on the second corner point, the third direction, the third side length and the fourth side length, wherein the third side length is greater than or equal to the length of the vehicle, the third side length is the length of the second target rectangular window in the third direction, the second target rectangular window comprises at least one complete pixel point in the direction perpendicular to the third direction, and the second target rectangular window is a rectangular window which is closest to the second obstacle and does not comprise the second obstacle area; the target position is determined based on the first target rectangular window and the second target rectangular window.
In the embodiment of the application, the target position is determined based on the first target rectangular window and the second target rectangular window by acquiring the first target rectangular window not including the first obstacle area and the second target rectangular window not including the second obstacle area, the operation is simple, the implementation is easy, and the target position of the parking space meeting the requirement can be quickly and accurately obtained.
As an optional implementation manner, in a second aspect of the embodiment of the present application, the determining module is specifically configured to determine the target matching corner point based on the cost map.
In the embodiment of the application, the scheme for determining the target matching corner points based on the cost map is simple in process and easy to implement compared with other schemes for acquiring the target matching corner points.
As an optional implementation manner, in a second aspect of the embodiments of the present application, the target matching corner point is: and in the combination of the angular points in the candidate angular point set of the first barrier and the angular points in the candidate angular point set of the second barrier, the distance between the angular points is greater than or equal to two angular points with the smallest distance and the width of one parking space.
In the embodiment of the application, by setting the target matching corner points as above, a corner point combination which meets the requirements and is relatively accurate can be obtained from the corner point set to be selected of the first obstacle and the corner point set to be selected of the second obstacle.
As an optional implementation manner, in a second aspect of the embodiment of the present application, the determining module is specifically configured to determine, based on the cost map, S preliminary corner sets, where a corner in each preliminary corner set is a set of pixel points on a straight line perpendicular to an axis of a vehicle on an obstacle and belonging to a boundary of the obstacle, and S is an integer greater than 1; determining S candidate corner sets from the S prepared corner sets, wherein corners in each candidate corner set meet target conditions; and determining the target matching corner points from the S corner point sets to be selected.
In the embodiment of the application, S prepared corner sets are determined, S corner sets to be selected are determined, the target matching corner is determined, and the target matching corner is determined through a scheme of screening layer by layer.
As an alternative implementation, in the second aspect of the embodiments of the present application, the target condition is: the proportion of the pixel points belonging to the obstacle area in the corresponding square is within the target range, and the corresponding square is as follows: and the side length of the square is a square of the second threshold value, and the square is constructed by taking the corresponding corner point as the center.
In the embodiment of the application, the square screening corner points are constructed by taking the corresponding corner points as the centers, so that the corner points which do not meet requirements can be quickly screened out, and the complexity of subsequent corner point re-screening operation can be reduced.
As an optional implementation manner, in a second aspect of the embodiment of the present application, the determining module is specifically configured to determine T groups of matching angular points from the S candidate angular point sets, where each group of matching angular points is two adjacent obstacles, and in a combination of an angular point in the candidate angular point set of one obstacle and an angular point in the candidate angular point set of another obstacle, a distance between the two angular points is greater than or equal to one parking space width and a distance between the two angular points is the smallest, and T is a positive integer smaller than or equal to S; the target matching corner is determined from the T set of matching corners.
In the embodiment of the application, the T groups of matching angular points are determined from the S corner point sets to be selected, and then the target matching angular points are determined from the T groups of matching angular points, so that selectivity is increased, matching angular points which meet requirements better can be determined, and then parking spaces to be parked can be determined better.
As an optional implementation manner, in a second aspect of the embodiments of the present application, the target matching corner point is: a set of matching corner points satisfying a predetermined condition, the predetermined condition being: the proportion of the pixel points belonging to the barrier region in the corresponding rectangle is less than or equal to a third threshold value; the corresponding rectangle is: and the rectangle takes the corresponding group of matched angular points as the vertex, takes the length of the vehicle as the side length, and has a center line perpendicular to the driving direction of the vehicle.
In the embodiment of the application, the accuracy of the finally determined parking space to be parked can be improved by matching the target matching angular points meeting the preset conditions.
In a third aspect, there is provided an automatic parking apparatus comprising: the parking space determining method comprises a processor, a memory and a computer program stored on the memory and capable of running on the processor, wherein the computer program realizes part or all of the steps of the parking space determining method according to the first aspect when being executed by the processor.
In a fourth aspect, a computer-readable storage medium is characterized in that a computer program is stored on the computer-readable storage medium, and when being executed by a processor, the computer program implements part or all of the steps of the parking space determining method according to the first aspect.
In a fifth aspect, a computer program product is provided, which when running on a computer causes the computer to execute some or all of the steps of the parking space determining method of the first aspect.
Compared with the prior art, the embodiment of the application has the following beneficial effects:
according to the parking space determining method provided by the embodiment of the application, a target matching angular point is determined, and a first direction of a first boundary adjacent to the parking space on a first obstacle and a second direction of a second boundary adjacent to the parking space on a second obstacle are obtained through calculation based on a cost map and the target matching angular point; determining a third direction of the parking space to be parked according to the first direction and the second direction; determining the target position of the parking space to be parked based on the target matching angular point and the third direction; therefore, the parking space with the absolute value of the difference value between the first distance (the shortest distance between the parking space and the first obstacle) and the second distance (the shortest distance between the parking space and the second obstacle) smaller than or equal to the first threshold can be obtained, the parking space meeting the requirement can be quickly and accurately positioned, the stability of the parking space detection method can be improved, and the requirement on the angular point detection precision in the angular point detection stage can be reduced to a certain extent. Moreover, the phenomenon that the vehicles to be parked are not rubbed or even can not be parked because the vehicles are too close to any side in the parking process can be avoided.
Drawings
Fig. 1 is a schematic flow chart of a parking space determining method provided in an embodiment of the present application;
fig. 2 is one of parking space determination diagrams of a parking space determination method provided in the embodiment of the present application;
fig. 3 is a second schematic view illustrating parking space determination according to the method for determining a parking space provided in the embodiment of the present application;
fig. 4 is a third schematic view illustrating parking space determination according to the method for determining a parking space provided in the embodiment of the present application;
fig. 5 is a fourth schematic view of determining a parking space in the parking space determining method according to the embodiment of the present application;
fig. 6 is a fifth schematic view of determining a parking space in the parking space determining method according to the embodiment of the present application;
fig. 7 is a sixth schematic view illustrating parking space determination according to the method for determining a parking space provided in the embodiment of the present application;
fig. 8 is a seventh schematic view illustrating parking space determination according to the parking space determination method provided in the embodiment of the present application;
fig. 9 is a schematic structural diagram of a parking space determining device according to an embodiment of the present application;
fig. 10 is a schematic structural diagram of an automatic parking apparatus according to an embodiment of the present application.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.
Reference herein to "a plurality" means two or more. "and/or" describes the association relationship of the associated objects, meaning that there may be three relationships, e.g., a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship.
It should be noted that the terms "first", "second", "third" and "fourth", etc. in the description and claims of the present application are used for distinguishing different objects, and are not used for describing a specific order. The terms "comprises," "comprising," and "having," and any variations thereof, of the embodiments of the present application, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
The Parking space determining method provided by the embodiment of the application can be applied to an automatic Parking scene, for example, can be applied to technologies such as an automatic Parking Assist system (APA) and an automatic valet Parking technology (AVP), and particularly can be applied to a garage patrol stage and a Parking stage in the automatic Parking scene, and specifically can be determined according to actual use requirements, and the embodiment of the application is not limited. In the prior art, a vehicle-mounted sensor (generally, an ultrasonic radar or a camera) is generally used for identifying an effective parking space, and a control unit is used for controlling a vehicle to park, however, the accuracy of an angular point detected by the existing parking space detection method is not high, and a large deviation generally exists, so that a spatial parking space is also deviated accordingly (that is, a final parking space is possibly close to one side), and thus, the stability of the existing parking space detection method is poor.
In order to solve the above technical problem, embodiments of the present application provide a parking space determining method, an apparatus, an automatic parking device, and a storage medium, where a target matching angular point is determined, and a first direction of a first boundary on a first obstacle and adjacent to a parking space and a second direction of a second boundary on a second obstacle and adjacent to the parking space are calculated and obtained based on a cost map and the target matching angular point; determining a third direction of the parking space to be parked according to the first direction and the second direction; determining the target position of the parking space to be parked based on the target matching angular point and the third direction; therefore, the parking space with the absolute value of the difference value between the first distance (the shortest distance between the parking space and the first obstacle) and the second distance (the shortest distance between the parking space and the second obstacle) smaller than or equal to the first threshold can be obtained, the parking space meeting the requirement can be quickly and accurately positioned, the stability of the parking space detection method can be improved, and the requirement on the angular point detection precision in the angular point detection stage can be reduced to a certain extent. Moreover, the phenomenon that the vehicles to be parked are not rubbed or even can not be parked because the vehicles are too close to any side in the parking process can be avoided.
The automatic parking device according to the embodiment of the present application may be a vehicle, a vehicle-mounted terminal device, an automatic parking system, and the like, and the embodiment of the present application is not limited. The automatic parking system can comprise at least one of a vehicle, a vehicle-mounted terminal device and an electronic device, and automatic parking can be realized among different devices through communication connection. The electronic device may be a mobile phone, a tablet, a wearable device, and the like, and the embodiment of the application is not limited.
The execution main body of the parking space determining method provided by the embodiment of the application may be the automatic parking device, or may also be a functional module and/or a functional entity capable of implementing the parking space determining method in the automatic parking device, which may be specifically determined according to actual use requirements, and the embodiment of the application is not limited. The following takes an automatic parking device as an example to exemplarily explain the parking space determining method provided by the embodiment of the present application.
The following describes an exemplary display method provided in an embodiment of the present application with reference to the drawings.
As shown in fig. 1, an embodiment of the present application provides a parking space determining method, which may include the following steps S101 to S104.
S101, the automatic parking equipment determines a target matching corner point.
Wherein, this target matching angular point is used for confirming the parking stall, and this target matching angular point includes: the first corner point on the first obstacle and the second corner point on the second obstacle are adjacent to each other in the driving direction of the vehicle.
Optionally, the automatic parking device may obtain the target matching corner according to any method for obtaining a corner, which is not limited in the embodiment of the present application.
For example, the automatic parking device may determine the target matching corner based on the cost map, may also determine the target matching corner according to an ultrasonic detection scheme, may also determine the target matching corner through a visual detection method according to an acquired parking space picture, and may specifically determine the target matching corner according to actual use requirements, which is not limited in the embodiment of the present application.
Exemplarily, the above S101 may be implemented by S201.
S201, the automatic parking equipment determines the target matching corner points based on the cost map.
It is understood that the above steps may be performed to determine the target matching corner point for the automatic parking device in the garage patrol stage (or in other stages, which are not limited in the embodiment of the present application) based on the cost map (costmap). And in the garage inspection stage, the process of finding the parking space to be parked in the garage by the automatic parking equipment can be understood.
In the embodiment of the present application, before the above step S201, a cost map is obtained. Optionally, the cost map may be built by the automatic parking device itself, or may be obtained by the automatic parking device from another device, which is not limited in the embodiment of the present application.
In the embodiment of the application, the cost map can be established according to the information of obstacles around the vehicle, and the cost map can also be generated according to a global static map of a driving environment and dynamic point cloud data of each dynamic obstacle in the driving environment acquired by each radar. Optionally, the cost map may be established based on a method for establishing a grid map by millimeter waves, or the cost map may be established based on other methods, which is not limited in the embodiment of the present application.
It is understood that the vehicle travels in the traveling direction, and the automatic parking apparatus acquires the cost map, as shown in fig. 2, assuming that an area on the cost map where the pixel value is less than or equal to the second threshold value is regarded as an area with an obstacle. For example, the second threshold may be 20 or 30, which may be determined according to actual usage requirements, and the embodiment of the present application is not limited. The pixel points whose pixel values are less than or equal to the second threshold value may be called target pixel points or black pixel points, and then the target pixel point region or the black pixel point region is determined to be an obstacle region. The obstacle may be another vehicle parked in the parking space, or may be another obstacle, which is not limited in the embodiment of the present application.
It is to be understood that the target matching corner points may further include other corner points besides the first corner point and the second corner point, which is not limited in this embodiment of the application.
Illustratively, the black pixel area is an obstacle area, as shown in fig. 2, the black area in the cost map is an obstacle area, the white area is a compatible area, the mark "1" indicates a running vehicle, the running direction of the vehicle is indicated by a dotted arrow in the figure, the mark "2" indicates a first obstacle, and the mark "3" indicates a second obstacle.
Optionally, the automatic parking device may determine the target matching corner based on the cost map by any method, which is not limited in the embodiment of the present application.
In the embodiment of the application, the scheme for determining the target matching corner points based on the cost map is simple in process and easy to implement compared with other schemes for acquiring the target matching corner points.
Optionally, the target matching corner point is: and in the combination of the angular points in the candidate angular point set of the first barrier and the angular points in the candidate angular point set of the second barrier, the distance between the angular points is greater than or equal to two angular points with the smallest distance and the width of one parking space.
It can be understood that, in the embodiment of the application, the automatic parking device may determine, based on the cost map, a candidate corner set of two adjacent obstacles, and then select, from the candidate corner set of the adjacent obstacles, two corner points with a minimum distance among multiple groups of corner points with a distance greater than or equal to one parking space width as target matching corner points.
In the embodiment of the application, by setting the target matching corner points as above, a corner point combination which meets the requirements and is relatively accurate can be obtained from the corner point set to be selected of the first obstacle and the corner point set to be selected of the second obstacle.
Optionally, in the embodiment of the application, whether there is a corner to be selected that meets the requirement in a set of corner to be selected of all adjacent obstacles in the cost map can be searched simultaneously, and then a target matching corner that meets the requirement is selected from all the corner to be selected; whether a target matching corner meeting the requirement exists in the candidate corner set of the adjacent barrier or not can be searched one by one (specifically, one search is performed, that is, a target matching corner meeting the requirement does not exist in the candidate corner set of one adjacent barrier, and then whether a target matching corner exists in the candidate corner set of the next adjacent barrier or not is searched for), which can be determined specifically according to the actual use requirement, and the embodiment of the present application is not limited.
For example, the scheme of simultaneous search in S201 may be specifically implemented through S201a to S201c described below.
S201a, the automatic parking equipment determines S sets of preparatory corner points based on the cost map.
The corner points in each preparatory corner point set are all sets of pixel points which belong to the boundary of one obstacle on straight lines perpendicular to the axis of the vehicle on the obstacle, and S is an integer larger than 1.
Assuming that the obstacle region is a target pixel point, it can be understood that the corner point in each preliminary corner point set is a set of target pixel points which are closest to the axis of the vehicle one by one along the driving direction on one obstacle in the direction perpendicular to the driving direction, and the target pixel points are pixel points of which the pixel values are smaller than or equal to a second threshold value.
It will be appreciated that in practice the direction of travel of the vehicle may or may not be parallel (at an angle) to the y-axis.
For example, as shown in fig. 2, assuming that the traveling direction of the vehicle is parallel to the y-axis direction, the direction perpendicular to the traveling direction is parallel to the x-axis direction. Thus, based on the established cost map, the first black pixel point is found by pixel points on the left side and the right side of the x axis from top to bottom along the y axis direction (in fig. 2, only the example that the first black pixel point is found by pixel points on the x axis positive direction from top to bottom along the y axis direction is drawn, and similarly, the first black pixel point is found by pixel points on the x axis negative direction from top to bottom along the y axis direction), then all the prepared corner points on each obstacle (i.e. the set of pixel points on all lines perpendicular to the axis of the vehicle on one obstacle and belonging to the boundary of the one obstacle) can be obtained, all the prepared corner points on each obstacle are a prepared corner point set, and then S prepared corner point sets can be obtained.
S201b, the automatic parking device determines S corner point sets to be selected from the S prepared corner point sets.
Wherein, the corner in each corner set to be selected meets the target condition
Alternatively, the target condition may be: the proportion of the pixel points belonging to the obstacle area in the corresponding square is within the target range, and the corresponding square is as follows: and the side length of the square is a square of the second threshold value, and the square is constructed by taking the corresponding corner point as the center.
Assuming that the obstacle area is a target pixel point, it can be understood that the target condition is: the proportion of the pixels belonging to the target in the corresponding square is within the target range.
It is understood that the target range is determined through multiple experiments according to the actual use condition, and the target range may be related to the second threshold or may not be related to the second threshold, and the embodiment of the present application is not limited.
The second threshold is determined according to the size represented by one pixel point in the cost map (i.e., the size in the actual scene represented by one pixel point) and the size of the curved portion (arc region) in front of or behind the vehicle, and may be specifically determined according to the actual use requirement, which is not limited in the embodiment of the present application.
Illustratively, in the embodiment of the present application, one pixel point represents 5cm, and the size of the portion of the vehicle that is bent forward or backward is about 50cm, so the second threshold is 10 pixel points, in which case, the target range is more than one fourth and less than three eighths after many times of experiments.
Exemplarily, as shown in fig. 3, a square is created with the pixel point where each prepared corner is located as the center and 10 pixel points as the side length, a ratio α of the number of black pixel points in each square to the total number of pixel points in the whole square is calculated, and if 1/4< α <3/8, the prepared corner is considered as a corner to be selected. In fig. 3, the spare corner indicated by the reference numeral "4" is not a corner to be selected, the spare corner indicated by the reference numeral "5" is not a corner to be selected, and the spare corner indicated by the reference numeral "6" is a corner to be selected.
In the embodiment of the application, the square screening corner points are constructed by taking the corresponding corner points as the centers, so that the corner points which do not meet requirements can be quickly screened out, and the complexity of subsequent corner point re-screening operation can be reduced.
Optionally, the target condition may also be: the proportion of the pixel points belonging to the barrier area in the corresponding circle is within a preset range, and the corresponding circle is as follows: and constructing a circle with the diameter of the second threshold value by taking the corresponding corner point as the center.
The description of the predetermined range may refer to the above description of the target range, and is not repeated herein.
The target condition may also be that the proportion of the pixel points belonging to the obstacle area in other shapes is within a certain range, and the embodiment of the present application is not limited. The target condition may be other screening conditions, and the embodiment of the present application is not limited.
And S201c, the automatic parking equipment determines the target matching corner points from the set of S corner points to be selected.
Optionally, in the embodiment of the present application, a group of matching corners may be determined from the S corner set to be selected, that is, the group of matching corners is used as a target matching corner; or determining a plurality of groups of matched corner points from the S corner point sets to be selected, and then selecting a target matched corner point from the plurality of groups of matched corner points; the method can be determined according to actual use conditions, and the embodiment of the application is not limited.
In the embodiment of the application, S prepared corner sets are determined, S corner sets to be selected are determined, the target matching corner is determined, and the target matching corner is determined through a scheme of screening layer by layer.
Exemplarily, the above S201c may be specifically realized by S201c1 to S201c2 described below.
S201c1, the automatic parking equipment determines T groups of matching corner points from the set of S corner points to be selected.
Each group of matching angular points is two adjacent obstacles, in the combination of the angular points in the corner point set to be selected of one obstacle and the angular points in the corner point set to be selected of the other obstacle, the distance is greater than or equal to two angular points with the smallest distance of the width of the parking space, and T is a positive integer less than or equal to S.
It can be understood that each group of matching angular points are two angular points with the smallest distance among multiple groups of angular points with the distance greater than or equal to the width of one parking space in the candidate angular point set of two adjacent obstacles.
It can be understood that, in the embodiment of the present application, the distance between two corner points to be selected may be obtained according to the coordinates of the pixel point where the two corner points to be selected are located.
It can be understood that, in the embodiment of the present application, the parking space width may be specifically determined according to the vehicle width, and the embodiment of the present application is not limited.
Illustratively, the slot width may be: the sum of the vehicle width and 40 cm.
Exemplarily, the distance D between two angular points in the candidate angular point set of any two adjacent obstacles is calculated, two angular points with the distance D greater than the vehicle width +40cm and the minimum distance are selected as a group of matching angular points, and the parking space can be formed by successfully matching the matching angular points. As shown in fig. 4, a point on each obstacle in the diagram is a set of corner points to be selected detected in the previous step, where the corner points 1 and 2 may form a set of matching corner points.
And S201c2, the automatic parking equipment determines the target matching corner point from the T groups of matching corner points.
Optionally, the automatic parking device may select a group of matching corner points meeting a certain condition from the T groups of matching corner points as a target matching corner point, which may be determined specifically according to actual use requirements, and the embodiment of the present application is not limited.
Illustratively, the automatic parking device matches corner points for the target, or, alternatively, selects one of the T sets of matching corner points. Or the automatic parking equipment selects a group of matching corner points with the largest distance from the T groups of matching corner points as target matching corner points. The automatic parking device selects a group of matching corner points satisfying a predetermined condition (the predetermined condition is described with reference to the following description, but the embodiment of the present application is not limited) from the T groups of matching corner points as target matching corner points.
In the embodiment of the application, the T groups of matching angular points are determined from the S sets of the angular points to be selected, then the target matching angular points are determined from the T groups of matching angular points, selectivity is increased, the automatic parking equipment selects the target matching angular points from the groups of matching angular points, the target matching angular points which meet requirements better can be obtained, and then the parking space can be determined better.
Optionally, the target matching corner point is: a set of matching corner points satisfying a predetermined condition, the predetermined condition being: the proportion of the pixel points belonging to the barrier region in the corresponding rectangle is less than or equal to a third threshold value; the corresponding rectangle is: and the rectangle takes the corresponding group of matched angular points as the vertex, takes the length of the vehicle as the side length, and has a center line perpendicular to the driving direction of the vehicle.
Assuming that the obstacle area is a target pixel point, it can be understood that the predetermined condition is: and the proportion of the target pixel points in the corresponding rectangle is less than or equal to a third threshold value.
It can be understood that, in the embodiment of the present application, the predetermined condition may be a condition of judging whether the parking space determined by the set of matching angular points is an effective parking space.
It can be understood that the third threshold is related to the performance of the radar, and may be determined specifically according to the actual use condition, and the embodiment of the present application is not limited. The third threshold may be within 5-10%, for example the third threshold may be 10%, 5%, 8% or 6.5%.
The description of the target pixel point and the second threshold refers to the above description of the target pixel point and the second threshold, and is not repeated here.
In the embodiment of the present application, the automatic parking apparatus may approximately calculate the pose (position and posture) at which the vehicle finally stops, that is, including the parking position and the parking direction, based on the detected target matching angle and the information of the vehicle itself.
For example, as shown in fig. 5, taking a group of matching corner points at the upper right in the drawing as an example, a midpoint a of a connection line of the target matching corner points is determined, then a direction θ (parking direction) perpendicular to a vehicle driving direction (driving direction indicated by a mark "7") is determined, and then a target length (distance from a rear axle of the vehicle to a front fender) is extended by taking the point a as a starting point to obtain a point B (parking position), which is a stopping position of a rear axle center of the vehicle (corresponding to a rear axle center point C of the vehicle), and finally the stopping position from the front fender to the rear axle of the vehicle is AB, and the stopping direction is a reverse direction of the θ (i.e., direction indicated by a mark "8"). As shown in fig. 6, two of the matched corner points are taken as starting points, and the distance of one vehicle length is respectively extended along the θ direction, so that a rectangle (i.e. a shadow region indicated by a mark "9") can be obtained, the number of black pixel points in the rectangle is calculated, if the number of black pixel points accounts for more than 10% of all pixel points of the rectangle, it is considered that there is an obstacle or a detection error in the parking space, and the parking space needs to be abandoned, and if the number of black pixel points accounts for less than or equal to 10% of all pixel points of the rectangle, it is considered that there is no obstacle or a detection is correct in the parking space, and the parking space is a parking space.
In the embodiment of the application, the accuracy of the finally determined parking space to be parked can be improved by matching the target matching angular points meeting the preset conditions.
Compared with the prior art, the method for determining the target matching corner based on the cost map can simplify the complexity of the corner identification process.
For example, the scheme of searching one by one in S201 may be specifically implemented by S301 to S304 described below.
S301, determining two preparatory corner point sets aiming at any two adjacent obstacles by the automatic parking equipment based on a cost map. And S302, the automatic parking equipment determines two corner point sets to be selected from the two prepared corner point sets. And S303, the automatic parking equipment determines whether a matching corner exists in the two corner sets to be selected. And S304, if the automatic parking equipment determines that the matching corner exists, namely the target matching corner, ending, and if the automatic parking equipment determines that the matching corner does not exist, returning to S301, and re-determining the two prepared corner sets. The automatic parking apparatus may repeatedly perform the above S301 to S304 until the target matching corner is determined.
Alternatively, S304 may be specifically realized by S304a to S304c described below.
And S304a, if the automatic parking equipment determines that the matching corner exists, executing the following S304b, and if the matching corner does not exist, returning to S301 and re-determining two prepared corner sets. S304b, the automatic parking apparatus determines whether the matching corner point satisfies a predetermined condition. S304c, if the matching corner point is determined to meet the preset condition by automatic parking, the matching corner point is a target matching corner point; if the matching corner point is determined not to meet the predetermined condition, returning to S301, and re-determining the two prepared corner point sets.
It is understood that the above specific processes may refer to the above descriptions of S201a to S201c, and are not described herein again.
Optionally, in this embodiment of the application, before determining the preliminary corner set, the automatic parking device may screen all adjacent obstacles to screen out an adjacent obstacle whose distance is greater than a certain threshold.
And S102, calculating by the automatic parking equipment to obtain a first direction and a second direction based on the cost map and the target matching corner points.
The first direction is the direction of a first boundary of the first obstacle, the second direction is the direction of a second boundary of the second obstacle, and the first boundary and the second boundary are two boundaries adjacent to the parking space.
It will be appreciated that the first direction is: the direction of a first boundary on the first barrier, which is adjacent to the parking space; the second direction is as follows: and the direction of a second boundary adjacent to the parking space on the second barrier.
It is understood that the first boundary and the second boundary are spaced by the parking space and are opposite to each other in the direction perpendicular to the driving direction.
It is understood that the directions in the embodiment of the present application may also be converted into angles with a coordinate axis (for example, an x-axis) of the cost map based on the cost map. For example, the first direction may be transformed to a first angle of the first boundary to the x-axis of the cost map, and the second direction may be transformed to a second angle of the second boundary to the x-axis of the cost map.
Alternatively, S102 may be specifically realized by S102a to S102d described below.
S102a, the automatic parking device determines P points on the first boundary based on the cost map and the first corner point.
Wherein P is an integer greater than 2.
S102b, the automatic parking equipment carries out straight line fitting on the P points on the first boundary based on a first straight line fitting algorithm to obtain a first direction.
The first direction is one extending direction of a straight line fitted to the P points (hereinafter referred to as a first fitted straight line).
Alternatively, the automatic parking device may perform straight line fitting on the P points on the first boundary to obtain a first fitted straight line, then obtain a direction vector of the first fitted straight line in one extending direction according to the first fitted straight line, and finally determine the first direction according to the direction vector.
Alternatively, the automatic parking device may perform straight line fitting on the P points on the first boundary to obtain a first fitted straight line, and then obtain the first direction according to coordinates of any two points on the first fitted straight line.
Optionally, in this embodiment of the application, the first direction may not be specified as the extending direction of the first fitted straight line, or the first direction may also be specified as a first target extending direction of the first fitted straight line, and an included angle between the first target extending direction and the positive direction of the x-axis is less than 90 degrees, which may specifically be determined according to actual use requirements, and this embodiment of the application is not limited.
Alternatively, the above S102a may be specifically realized by the following S102a1 to S102a 3.
S102a1, the automatic parking apparatus translates the first corner point in a direction away from the first boundary (referred to as a fourth direction) on the cost map to obtain a first point.
S102a2, the automatic parking apparatus determines a first straight line based on the first point and a direction perpendicular to the traveling direction of the vehicle.
S102a3, the automatic parking apparatus translates each of the P points on the first straight line toward the first boundary, and determines the P points on the first boundary.
It is understood that in the embodiment of the present application, a specific direction of the fourth direction (i.e., a direction away from the first boundary) is not limited, and for example, as shown in fig. 7, the fourth direction may be 45 ° to the upper right.
Illustratively, the automatic parking device translates the first angle point to the upper right by 45 degrees by N pixel points on the cost map to obtain a first point, where N is a positive integer.
Optionally, the fourth direction may also be a translation N to the x-axis direction1Each pixel point is translated to the y-axis direction by N2Individual pixel point, N1,N2Are integers.
It is to be understood that the first straight line may be on the first obstacle, may also be outside the first obstacle, may also be partially on the first obstacle, and may also be partially outside the first obstacle, which may be determined according to practical situations, and the embodiment of the present application is not limited.
It can be understood that, for a point on the first straight line within the first obstacle, the point is translated to the first boundary until the last pixel point (e.g., target pixel point) belonging to the obstacle area (or until the first pixel point not belonging to the obstacle area), that is, the point on the first boundary; and for the point outside the first obstacle on the first straight line, translating towards the first boundary until the first pixel point (such as a target pixel point) belonging to the obstacle area (or until the first pixel point not belonging to the obstacle area) is the point on the first boundary.
It is understood that P points on the first straight line are respectively translated towards the first boundary along the corresponding direction, and the P points on the first boundary are determined. For example, based on the P points on the first straight line, the first boundary is projected to obtain P points on the first boundary.
In the embodiment of the present application, the first linear fitting algorithm may be a least square method, a gradient descent method, a gauss-newton, a column-horse algorithm, or the like, and the embodiment of the present application is not limited.
And S102c, the automatic parking equipment determines Q points on the second boundary based on the cost map and the second corner point.
Wherein Q is an integer greater than 2.
And S102d, the automatic parking equipment performs straight line fitting on the Q points on the second boundary based on a second straight line fitting algorithm to obtain a second direction.
The second direction is one extending direction of a straight line fitted to the Q points (hereinafter referred to as a second fitted straight line).
Alternatively, the automatic parking device may perform straight line fitting on the Q points on the second boundary to obtain a second fitted straight line, then obtain a direction vector of the second fitted straight line in one extending direction according to the second fitted straight line, and finally determine the second direction according to the direction vector.
Alternatively, the automatic parking device may perform straight line fitting on the Q points on the second boundary to obtain a second fitted straight line, and then obtain the second direction according to coordinates of any two points on the second fitted straight line.
Optionally, in this embodiment of the application, the second direction may not be specified as the extending direction of the second fitted straight line, or the second direction may also be specified as a second target extending direction of the second fitted straight line, for example, an included angle between the second target extending direction and the positive direction of the x-axis is less than 90 degrees, which may be specifically determined according to actual use requirements, and this embodiment of the application is not limited.
Optionally, an included angle between the first direction and the positive direction of the x-axis is smaller than 90 degrees, and an included angle between the second direction and the positive direction of the x-axis is also smaller than 90 degrees. Optionally, an included angle between the first direction and the positive x-axis direction is less than 90 degrees, and an included angle between the second direction and the positive x-axis direction is greater than 90 degrees.
Alternatively, the above S102c may be specifically realized by the following S102c1 to S102c 3.
And S102c1, translating the second corner point to the direction far away from the second boundary on the cost map by the automatic parking equipment to obtain a second point.
Wherein M is a positive integer.
S102c2, the automatic parking apparatus determines a second straight line based on the second point and a direction perpendicular to the traveling direction.
S102c3, the automatic parking apparatus translates the Q points on the second straight line to the second boundary, respectively, and determines the Q points on the second boundary.
For the descriptions of S102c to S102d, reference may be made to the descriptions of S102a to S102b, which are not repeated herein.
It is to be understood that M and N may be the same or different, and the embodiments of the present application are not limited thereto. P and Q may be the same or different, and this application is not limited in this embodiment. The fourth direction and the fifth direction may be the same or different, and the embodiments of the present application are not limited. The second straight line fitting algorithm in S102d may be the same as or different from the first straight line fitting algorithm in S102b, and the embodiment of the present application is not limited.
In the embodiment of the application, the plurality of points on the first boundary of the first obstacle are obtained through translation, the plurality of points on the second boundary of the second obstacle are obtained through translation, the process is simple, the implementation is easy, and the first direction and the second direction can be quickly and accurately obtained.
Optionally, in this embodiment of the application, the first corner point may be used as a starting point, the straight line 1 is determined based on a direction perpendicular to the driving direction, and then P points on the straight line 1 are used as starting points and respectively translate towards the first boundary, so as to determine P points on the first boundary; finally, performing linear fitting on the P points on the first boundary based on a linear fitting algorithm to obtain a first direction; similarly, a straight line 2 is determined based on the direction perpendicular to the driving direction by taking the second corner point as a starting point, and then the Q points on the straight line 2 are respectively translated to the second boundary by taking the Q points as the starting point to determine the Q points on the second boundary; and finally, performing linear fitting on the Q points on the second boundary based on a linear fitting algorithm to obtain a second direction.
Optionally, in this embodiment of the application, the first corner point may also be used as a starting point, P points on the first boundary are searched, and then, based on a straight line fitting algorithm, straight line fitting is performed on the P points on the first boundary to obtain the first direction. And similarly, searching for Q points on the second boundary by taking the second corner point as a starting point, and then performing linear fitting on the Q points on the second boundary based on a linear fitting algorithm to obtain a second direction.
In the embodiment of the application, the first direction of the first boundary is obtained by obtaining the plurality of points on the first boundary of the first obstacle, the second direction of the second boundary is obtained by obtaining the plurality of points on the second boundary of the second obstacle, and the first direction and the second direction can be quickly and accurately obtained.
S103, the automatic parking equipment determines a third direction of the parking space according to the first direction and the second direction.
Optionally, if both the included angle between the first direction and the positive direction of the x-axis and the included angle between the second direction and the positive direction of the x-axis are smaller than 90 degrees or both larger than 90 degrees, the third direction may be a weighted average of the first direction and the second direction, for example, the third direction may be an average of the first direction and the second direction, which is not limited in the embodiment of the present application.
Exemplarily, as shown in fig. 7, 10 pixel points are translated to the upper right by 45 ° to obtain a first intermediate point, the first intermediate point (the translated first corner point) is extended to the θ direction to obtain a first straight line, and then the last one of the pixel points is found downward based on the point on the first straight lineBlack pixel points are fitted by a least square method to obtain a first direction beta1. The second direction beta is obtained by the same method2And the third direction is β ═ β (β)12)/2。
Optionally, if an angle between the first direction and the positive x-axis direction and an angle between the second direction and the positive x-axis direction are one smaller than 90 degrees and the other larger than 90 degrees, the third direction may be a weighted average of a reverse direction of the first direction and the second direction, for example, the third direction may be an average of a reverse direction of the first direction and the second direction, which is not limited in the embodiment of the present application.
And S104, the automatic parking equipment determines the target position of the parking space based on the target matching angular point and the third direction.
The shortest distance between the parking space and the first obstacle is a first distance, the shortest distance between the parking space and the second obstacle is a second distance, and the absolute value of the difference value between the first distance and the second distance is smaller than or equal to a first threshold value.
It should be noted that, in the embodiment of the present application, the target position may be any one of a point, a line, and a shape, that is, a position of the parking space is indicated by one of the point, the line, and the shape. In the embodiment of the present application, a point is taken as an example to describe a position of a parking space, specifically, the point is a position where a center of a rear axle of a vehicle is located.
It will be appreciated that the first threshold is an acceptable maximum difference in the distance between the parking space and the two spaces adjacent to the parking space. The first threshold may be determined according to an actual use condition, and the embodiment of the present application is not limited. For example, the first threshold may be 0.
It is understood that there may be only one available space between the first obstacle and the second obstacle, or there may be multiple (more than two) available spaces.
Optionally, when there are a plurality of available slots between the first obstacle and the second obstacle, an absolute value of a difference between the first distance and the second distance may be within a first range, where any value in the first range is greater than or equal to G slot widths and less than or equal to a target value, the target value is a sum of the G slot width and a first threshold value, and G is a natural number.
It will be appreciated that the width of G slots is related to the number of available slots included between the first obstacle and the second obstacle that meet the requirements, and the location of the slots to be parked. If there are E parking spaces between the target parking space and the first obstacle and F parking spaces between the target parking space and the second obstacle, the G parking spaces are (E-F) absolute parking spaces. E, F are all natural numbers.
Optionally, a first target rectangle that is closest to the first obstacle and does not include a pixel point of the obstacle region (e.g., a target pixel point) may be searched, a second target rectangle that is closest to the second obstacle and does not include a pixel point of the obstacle region (e.g., a target pixel point) may be searched, and then the target position may be determined according to the first target rectangle and the second target rectangle.
Illustratively, the S104 may be specifically realized by the following S104a to S104 c.
S104a, the automatic parking equipment determines a first target rectangular window based on the first corner point, the third direction, the first side length and the second side length.
The first side length is greater than or equal to the length of the vehicle, the first side length is the length of the first target rectangular window in the third direction, the first target rectangular window comprises at least one complete pixel point in the direction perpendicular to the third direction, and the first target rectangular window is a rectangular window which is closest to the first obstacle and does not comprise the first obstacle area.
Assuming that the obstacle region is a target pixel point, the first target rectangular window is a rectangular window which is closest to the first obstacle and does not include the first obstacle region, and it can be understood that the first target rectangular window is a rectangular window which is closest to the first obstacle and does not include the target pixel point.
It will be appreciated that a first target rectangular window is located between the first obstacle and the second obstacle.
The step S104a may specifically be: creating an initial first rectangular window based on the first angular point, the third direction, the first side length and the second side length, wherein the first rectangular window is opposite to the first boundary, and the first angular point is a point on the boundary of the first rectangular window; performing the following step S1 for the first rectangular window loop to obtain a first target rectangular window, wherein S1 includes: under the condition that the first window comprises target pixel points (namely pixel points of an obstacle region), controlling the first window to translate one pixel point along a first direction to obtain a second window, and under the condition that the first window does not comprise the target pixel points, outputting the first window as a first target rectangular window; the first window is a first rectangular window or a second window, and the first direction is a direction perpendicular to the third direction and pointing to the second obstacle.
It can be understood that the first side length may be set according to the vehicle length, and the first side length and the second side length may be determined according to an actual use condition, which is not limited in the embodiment of the present application.
And S104b, the automatic parking equipment determines a second target rectangular window based on the second corner point, the third direction, the third side length and the fourth side length.
The third side length is greater than or equal to the length of the vehicle, the third side length is the length of the second target rectangular window in the third direction, the second target rectangular window comprises at least one complete pixel point in the direction perpendicular to the third direction, and the second target rectangular window is a rectangular window which is closest to the second obstacle and does not comprise the area of the second obstacle.
Assuming that the obstacle region is a target pixel point, the second target rectangular window is a rectangular window which is closest to the second obstacle and does not include the second obstacle region, and it can be understood that the second target rectangular window is a rectangular window which is closest to the second obstacle and does not include the target pixel point.
It will be appreciated that a first target rectangular window is located between the first obstacle and the second obstacle.
The step S104b may specifically be: creating an initial second rectangular window based on a second angular point, a third direction, a third side length and a fourth side length, wherein the second rectangular window is opposite to a second boundary, and the second angular point is a point on the boundary of the second rectangular window; performing the following step S2 for the second rectangular window loop to obtain a second target rectangular window, wherein S2 includes: under the condition that the third window comprises target pixel points (pixel points of the obstacle region), controlling the target rectangular window to translate one pixel point along the second direction to obtain a fourth window, and under the condition that the third window does not comprise the target pixel points, outputting the third window as a second target rectangular window; the third window is a third rectangular window or a fourth window, and the second direction is a direction perpendicular to the third direction and pointing to the second obstacle.
It can be understood that the third side length can be set according to the vehicle length, the third side length and the fourth side length can be determined according to actual use conditions, and the embodiment of the application is not limited.
It can be understood that the third side length and the first side length may be the same or different, and this application embodiment is not limited thereto, and the fourth side length and the second side length may be the same or different, and this application embodiment is not limited thereto.
S104c, the automatic parking apparatus determines the target position based on the first target rectangular window and the second target rectangular window.
Exemplarily, as shown in fig. 8, a rectangle is established by respectively taking a first corner point and a second corner point of the matched corner points as starting points and the direction as β, and the length and width of the rectangle may be set according to specific situations, for example, the length and width may be set as: the method comprises the steps of measuring the length of each pixel point (1.5m), the width of each pixel point (20cm) is 4 (the length of each pixel point is 1.5m), judging whether black pixel points exist in the rectangle, if the black pixel points exist, moving one pixel point to the direction perpendicular to beta until no black pixel points exist in the rectangle, carrying out the same operation on the two pixel points to finally obtain two rectangles (the rectangles corresponding to white areas in the figure), and finally determining a target position according to the middle point (the point marked by the mark 10) between the two rectangles and the beta.
In the embodiment of the application, the target position is determined based on the first target rectangular window and the second target rectangular window by acquiring the first target rectangular window not including the first obstacle area and the second target rectangular window not including the second obstacle area, the operation is simple, the implementation is easy, and the target position of the parking space meeting the requirement can be quickly and accurately obtained.
Optionally, in this embodiment of the application, based on the first corner, the third angle may also determine a third straight line that is closest to the first obstacle and does not include the target pixel point, and based on the second corner, the third angle determines a fourth straight line that is closest to the second obstacle and does not include the target pixel point (the pixel point of the obstacle region), and then determines the target position according to the third straight line and the fourth straight line. Reference may be made in particular to the above description, which is not limiting in the embodiments of the present application.
It is understood that the above-described S103 to S104 can dynamically adjust the final stop pose in the parking stage.
In the embodiment of the application, the precision requirement on the detected target matching angular point is not high, the parking space determining method provided by the embodiment of the application can quickly and accurately position the specific pose (parking space) of the space parking space based on the target matching angular point, and the consumption of computer resources is low.
In the embodiment of the application, according to the third direction and the target position, the parking space in which the absolute value of the difference between the first distance (the shortest distance between the parking space and the first obstacle) and the second distance (the shortest distance between the parking space and the second obstacle) is smaller than or equal to the first threshold value can be determined, the parking space meeting the requirement can be quickly and accurately positioned through the scheme, the stability of the parking space detection method can be improved, the requirement on the angular point detection precision in the angular point detection stage can be reduced to a certain extent, the limitation of the target matching angular point detection precision is avoided, and the parking space meeting the requirement can be obtained through the adjustment of the parking space determined by the target matching angular point. Moreover, the phenomenon that the vehicles to be parked are not rubbed or even can not be parked because the vehicles are too close to any side in the parking process can be avoided.
Optionally, in this embodiment of the application, the automatic parking device may plan a parking route according to a parking space determined by the third direction and the target position, and control the vehicle to enter the parking space according to the parking route.
As shown in fig. 9, an embodiment of the present application provides a device for determining a parking space, where the device 400 for determining a parking space includes: a determination module 401 and a calculation module 402; the determining module 401 is configured to determine a target matching corner point, where the target matching corner point includes: a first corner point on the first obstacle and a second corner point on the second obstacle; the calculating module 402 is configured to calculate a first direction and a second direction based on the cost map and the target matching corner determined by the determining module 401, where the first direction is a direction of a first boundary of a first obstacle, the second direction is a direction of a second boundary of a second obstacle, and the first boundary and the second boundary are two boundaries adjacent to a parking space to be parked; the determining module 401 is further configured to determine a third direction of the parking space according to the first direction and the second direction obtained by the calculating module 402; determining the target position of the parking space to be parked based on the target matching angular point and the third direction; the shortest distance between the parking space and the first obstacle is a first distance, the shortest distance between the parking space and the second obstacle is a second distance, and the absolute value of the difference value between the first distance and the second distance is smaller than or equal to a first threshold value.
In the embodiment of the application, according to the third direction and the target position, the parking space in which the absolute value of the difference between the first distance (the shortest distance between the parking space and the first obstacle) and the second distance (the shortest distance between the parking space and the second obstacle) is smaller than or equal to the first threshold value can be determined, the parking space meeting the requirement can be quickly and accurately positioned through the scheme, the stability of the parking space detection method can be improved, the requirement on the angular point detection precision in the angular point detection stage can be reduced to a certain extent, the limitation of the target matching angular point detection precision is avoided, and the parking space meeting the requirement can be obtained through the adjustment of the parking space determined by the target matching angular point. Moreover, the phenomenon that the vehicles to be parked are not rubbed or even can not be parked because the vehicles are too close to any side in the parking process can be avoided.
As an optional implementation manner of the embodiment of the present application, the calculating module 402 is specifically configured to determine, based on the cost map and the first corner point, P points on the first boundary, where P is an integer greater than 2; performing linear fitting on P points on a first boundary to obtain a first direction based on a first linear fitting algorithm, wherein the first direction is an extension direction of a straight line obtained by fitting the P points; determining Q points on a second boundary based on the cost map and the second corner point, wherein Q is an integer greater than 2; and performing linear fitting on the Q points on the second boundary based on a second linear fitting algorithm to obtain a second direction, wherein the second direction is an extension direction of a straight line obtained by fitting the Q points.
In the embodiment of the application, the first direction of the first boundary is obtained by obtaining the plurality of points on the first boundary of the first obstacle, the second direction of the second boundary is obtained by obtaining the plurality of points on the second boundary of the second obstacle, and the first direction and the second direction can be quickly and accurately obtained.
As an optional implementation manner of the embodiment of the present application, the calculating module 402 is specifically configured to translate the first corner point to a direction away from the first boundary on the cost map, so as to obtain a first point; determining a first line based on the first point and a direction perpendicular to a driving direction of the vehicle; respectively translating the P points on the first straight line to the first boundary, and determining the P points on the first boundary; on the cost map, taking the second corner point as a starting point, and translating the second corner point in the direction far away from the second boundary to obtain a second point; determining a second straight line based on the second point and a direction perpendicular to the driving direction; and respectively translating the Q points on the second straight line to the second boundary, and determining the Q points on the second boundary.
In the embodiment of the application, the plurality of points on the first boundary of the first obstacle are obtained through translation, the plurality of points on the second boundary of the second obstacle are obtained through translation, the process is simple, the implementation is easy, and the first direction and the second direction can be quickly and accurately obtained.
As an optional implementation manner of the embodiment of the present application, the determining module 401 is specifically configured to determine a first target rectangular window based on the first corner point, the third direction, the first side length and the second side length, where the first side length is greater than or equal to the length of the vehicle, the first side length is the length of the first target rectangular window in the third direction, the first target rectangular window includes at least one complete pixel point in a direction perpendicular to the third direction, and the first target rectangular window is a rectangular window that is closest to the first obstacle and does not include the first obstacle region; determining a second target rectangular window based on the second corner point, the third direction, the third side length and the fourth side length, wherein the third side length is greater than or equal to the length of the vehicle, the third side length is the length of the second target rectangular window in the third direction, the second target rectangular window comprises at least one complete pixel point in the direction perpendicular to the third direction, and the second target rectangular window is a rectangular window which is closest to the second obstacle and does not comprise the second obstacle area; the target position is determined based on the first target rectangular window and the second target rectangular window.
In the embodiment of the application, the target position is determined based on the first target rectangular window and the second target rectangular window by acquiring the first target rectangular window not including the first obstacle area and the second target rectangular window not including the second obstacle area, the operation is simple, the implementation is easy, and the target position of the parking space meeting the requirement can be quickly and accurately obtained.
As an optional implementation manner of the embodiment of the present application, the determining module 401 is specifically configured to determine the target matching corner point based on the cost map.
In the embodiment of the application, the scheme for determining the target matching corner points based on the cost map is simple in process and easy to implement compared with other schemes for acquiring the target matching corner points.
As an optional implementation manner of the embodiment of the present application, the target matching corner point is: and in the combination of the angular points in the candidate angular point set of the first barrier and the angular points in the candidate angular point set of the second barrier, the distance between the angular points is greater than or equal to two angular points with the smallest distance and the width of one parking space.
In the embodiment of the application, by setting the target matching corner points as above, a corner point combination which meets the requirements and is relatively accurate can be obtained from the corner point set to be selected of the first obstacle and the corner point set to be selected of the second obstacle.
As an optional implementation manner of the embodiment of the present application, the determining module 401 is specifically configured to determine, based on the cost map, S preliminary corner sets, where a corner in each preliminary corner set is a set of pixel points on a straight line perpendicular to an axis of a vehicle on an obstacle and belonging to a boundary of the obstacle, and S is an integer greater than 1; determining S candidate corner sets from the S prepared corner sets, wherein corners in each candidate corner set meet target conditions; and determining the target matching corner points from the S corner point sets to be selected.
In the embodiment of the application, S prepared corner sets are determined, S corner sets to be selected are determined, the target matching corner is determined, and the target matching corner is determined through a scheme of screening layer by layer.
As an optional implementation manner of the embodiment of the present application, the target conditions are: the proportion of the pixel points belonging to the obstacle area in the corresponding square is within the target range, and the corresponding square is as follows: and the side length of the square is a square of the second threshold value, and the square is constructed by taking the corresponding corner point as the center.
In the embodiment of the application, the square screening corner points are constructed by taking the corresponding corner points as the centers, so that the corner points which do not meet requirements can be quickly screened out, and the complexity of subsequent corner point re-screening operation can be reduced.
As an optional implementation manner of this embodiment of the present application, the determining module 401 is specifically configured to determine T groups of matching angular points from the S candidate angular point sets, where each group of matching angular points is two adjacent obstacles, and in a combination of an angular point in the candidate angular point set of one obstacle and an angular point in the candidate angular point set of another obstacle, a distance between the two angular points is greater than or equal to one angular point that is the parking space width and has the smallest distance, and T is a positive integer less than or equal to S; the target matching corner is determined from the T set of matching corners.
In the embodiment of the application, the T groups of matching angular points are determined from the S corner point sets to be selected, and then the target matching angular points are determined from the T groups of matching angular points, so that selectivity is increased, matching angular points which meet requirements better can be determined, and then parking spaces to be parked can be determined better.
As an optional implementation manner of the embodiment of the present application, the target matching corner point is: a set of matching corner points satisfying a predetermined condition, the predetermined condition being: the proportion of the pixel points belonging to the barrier region in the corresponding rectangle is less than or equal to a third threshold value; the corresponding rectangle is: and the rectangle takes the corresponding group of matched angular points as the vertex, takes the length of the vehicle as the side length, and has a center line perpendicular to the driving direction of the vehicle.
In the embodiment of the application, the accuracy of the finally determined parking space to be parked can be improved by matching the target matching angular points meeting the preset conditions.
In the embodiment of the present application, each module may implement the parking space determining method provided in the embodiment of the foregoing method, and may achieve the same technical effect, and for avoiding repetition, the details are not repeated here.
In the embodiment of the present application, each module may implement the error coefficient calculation method provided in the above method embodiment, and may achieve the same technical effect, and for avoiding repetition, the details are not repeated here.
Fig. 10 is a schematic diagram of a hardware structure of an automatic parking apparatus for implementing various embodiments of the present application, as shown in fig. 10, the automatic parking apparatus includes, but is not limited to: a Radio Frequency (RF) circuit 501, a memory 502, an input unit 503, a display unit 504, a sensor 505, an audio circuit 506, a wireless fidelity (WiFi) module 507, a processor 508, a power supply 509, and a camera 510. The radio frequency circuit 501 includes a receiver 5011 and a transmitter 5012. Those skilled in the art will appreciate that the configuration of the automatic parking apparatus shown in fig. 10 does not constitute a limitation of the automatic parking apparatus, and may include more or less components than those shown, or some components in combination, or a different arrangement of components.
The RF circuit 501 may be used for receiving and transmitting signals during information transmission and reception or during a call, and in particular, receives downlink information of a base station and then processes the received downlink information to the processor 508; in addition, the data for designing uplink is transmitted to the base station. In general, RF circuit 501 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a Low Noise Amplifier (LNA), a duplexer, and the like. In addition, the RF circuitry 501 may also communicate with networks and other devices via wireless communications. The wireless communication may use any communication standard or protocol, including but not limited to global system for mobile communications (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), email, Short Message Service (SMS), etc.
The memory 502 may be used to store software programs and modules, and the processor 508 executes various functional applications and data processing of the automatic parking apparatus by operating the software programs and modules stored in the memory 502. The memory 502 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, a phone book, etc.) created according to the use of the automatic parking apparatus, and the like. Further, the memory 502 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
The input unit 503 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the automatic parking apparatus. Specifically, the input unit 503 may include a touch panel 5031 and other input devices 5032. The touch panel 5031, also called a touch screen, can collect a touch operation performed by a user on or near the touch panel 5031 (e.g., an operation performed by the user on or near the touch panel 5031 by using any suitable object or accessory such as a finger or a stylus pen), and drive a corresponding connection device according to a preset program. Alternatively, the touch panel 5031 may include two parts, that is, a touch detection device and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 508, and can receive and execute commands sent by the processor 508. In addition, the touch panel 5031 can be implemented by using various types such as a resistive type, a capacitive type, an infrared ray, and a surface acoustic wave. The input unit 503 may include other input devices 5032 in addition to the touch panel 5031. In particular, other input devices 5032 can include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like.
The display unit 504 may be used to display information input by the user or information provided to the user, and various menus of the automatic parking apparatus. The display unit 504 may include a display panel 5041, and optionally, the display panel 5041 may be configured in the form of a Liquid Crystal Display (LCD), an organic light-Emitting diode (OLED), or the like. Further, the touch panel 5031 can cover the display panel 5041, and when the touch panel 5031 detects a touch operation on or near the touch panel, the touch operation is transmitted to the processor 508 to determine a touch event, and then the processor 508 provides a corresponding visual output on the display panel 5041 according to the touch event. Although the touch panel 5031 and the display panel 5041 are illustrated as two separate components in fig. 10 to implement the input and output functions of the automatic parking apparatus, in some embodiments, the touch panel 5031 and the display panel 5041 may be integrated to implement the input and output functions of the automatic parking apparatus.
The automatic parking apparatus may further include at least one sensor 505, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor that may adjust the brightness of the display panel 5041 according to the brightness of ambient light, and a proximity sensor that may exit the display panel 5041 and/or a backlight when the automatic parking apparatus is moved to the ear. As one of the motion sensors, the accelerometer sensor may detect the magnitude of acceleration in each direction (generally, three axes), may detect the magnitude and direction of gravity when stationary, and may be used for applications (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer, tapping), and the like, for recognizing the posture of the automatic parking apparatus; as for other sensors such as a gyroscope, a geomagnetic sensor, a barometer, a hygrometer, a thermometer, and an infrared sensor, which may be further configured, details are not repeated herein. In the embodiment of the present application, the automatic parking apparatus may include an acceleration sensor, a depth sensor, a distance sensor, or the like.
The audio circuit 506, speaker 5061, and microphone 5062 may provide an audio interface between the user and the automatic parking apparatus. The audio circuit 506 may transmit the electrical signal converted from the received audio data to the speaker 5061, and convert the electrical signal into an audio signal by the speaker 5061 and output the audio signal; on the other hand, the microphone 5062 converts the collected sound signal into an electric signal, converts the electric signal into audio data after being received by the audio circuit 506, and then outputs the audio data to the processor 508 for processing, for example, to another automatic parking apparatus via the RF circuit 501, or outputs the audio data to the memory 502 for further processing.
WiFi belongs to short-distance wireless transmission technology, and the automatic parking equipment can help a user to receive and send e-mails, browse webpages, access streaming media and the like through the WiFi module 507, and provides wireless broadband internet access for the user. Although fig. 10 shows the WiFi module 507, it is understood that it does not belong to the essential constitution of the automatic parking apparatus, and may be omitted entirely as needed within the scope not changing the essence of the invention.
The processor 508 is a control center of the automatic parking apparatus, connects various parts of the entire automatic parking apparatus using various interfaces and lines, and performs various functions of the automatic parking apparatus and processes data by operating or executing software programs and/or modules stored in the memory 502 and calling up data stored in the memory 502, thereby performing overall monitoring of the automatic parking apparatus. Alternatively, processor 508 may include one or more processing units; preferably, the processor 508 may integrate an application processor, which primarily handles operating systems, user interfaces, application programs, etc., and a modem processor, which primarily handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 508.
The automatic parking apparatus further includes a power supply 509 (such as a battery) for supplying power to various components, which may preferably be logically connected to the processor 508 via a power management system, so as to manage charging, discharging, and power consumption via the power management system. Although not shown, the automatic parking apparatus may further include a bluetooth module or the like, which will not be described in detail herein.
In this embodiment, the processor 508 is configured to determine a target matching corner point, where the target matching corner point includes: a first corner point on the first obstacle and a second corner point on the second obstacle; calculating to obtain a first direction and a second direction based on the cost map and the target matching angular point, wherein the first direction is the direction of a first boundary of a first obstacle, the second direction is the direction of a second boundary of a second obstacle, and the first boundary and the second boundary are two boundaries adjacent to a parking space; determining a third direction of the parking space to be parked according to the first direction and the second direction; determining the target position of the parking space to be parked based on the target matching angular point and the third direction; the shortest distance between the parking space and the first obstacle is a first distance, the shortest distance between the parking space and the second obstacle is a second distance, and the absolute value of the difference value between the first distance and the second distance is smaller than or equal to a first threshold value.
Optionally, the processor 508 may also be configured to implement other processes implemented by the automatic parking apparatus in the foregoing method embodiment, and achieve the same technical effect, and for avoiding repetition, details are not described here again.
An embodiment of the present application further provides an automatic parking apparatus, which may include: the processor, the memory and the computer program stored in the memory and capable of running on the processor, when being executed by the processor, the computer program can implement each process of the parking space determining method provided by the above method embodiment, and can achieve the same technical effect, and in order to avoid repetition, the details are not repeated here.
The embodiment of the present application provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when executed by a processor, the computer program implements each process of the parking space determining method provided in the foregoing method embodiment, and can achieve the same technical effect, and is not described herein again to avoid repetition.
The embodiment of the present application further provides a computer program product, where the computer program product includes a computer instruction, and when the computer program product runs on a processor, the processor executes the computer instruction, so as to implement each process of the parking space determining method provided in the foregoing method embodiment, and achieve the same technical effect, and in order to avoid repetition, details are not repeated here.
An embodiment of the present application further provides an application publishing platform, where the application publishing platform is configured to publish a computer program product, where when the computer program product runs on a computer, the computer is enabled to execute each process of the method in the above method embodiments, and the same technical effect can be achieved, and in order to avoid repetition, details are not repeated here.
It should be appreciated that reference throughout this specification to "one embodiment" or "an embodiment" means that a particular feature, structure or characteristic described in connection with the embodiment is included in at least one embodiment of the present application. Thus, the appearances of the phrases "in one embodiment" or "in an embodiment" in various places throughout this specification are not necessarily all referring to the same embodiment. Furthermore, the particular features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. Those skilled in the art should also appreciate that the embodiments described in this specification are all alternative embodiments and that the acts and modules involved are not necessarily required for this application.
The automatic parking device provided by the embodiment of the application can realize each process shown in the method embodiment, and is not described herein again to avoid repetition.
In various embodiments of the present application, it should be understood that the size of the serial number of each process described above does not mean that the execution sequence is necessarily sequential, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated units, if implemented as software functional units and sold or used as a stand-alone product, may be stored in a computer accessible memory. Based on such understanding, the technical solution of the present application, which is a part of or contributes to the prior art in essence, or all or part of the technical solution, may be embodied in the form of a software product, stored in a memory, including several requests for causing a computer device (which may be a personal computer, a server, a network device, or the like, and may specifically be a processor in the computer device) to execute part or all of the steps of the above-described method of the embodiments of the present application.
It will be understood by those skilled in the art that all or part of the steps in the methods of the embodiments described above may be implemented by hardware instructions of a program, and the program may be stored in a computer-readable storage medium, where the storage medium includes Read-Only Memory (ROM), Random Access Memory (RAM), Programmable Read-Only Memory (PROM), Erasable Programmable Read-Only Memory (EPROM), One-time Programmable Read-Only Memory (OTPROM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Compact Disc Read-Only Memory (CD-ROM), or other disk memories, A tape memory, or any other medium readable by a computer that can be used to carry or store data.

Claims (13)

1. A parking space determining method is characterized by comprising the following steps:
determining a target matching corner point, wherein the target matching corner point comprises: a first corner point on the first obstacle and a second corner point on the second obstacle;
calculating to obtain a first direction and a second direction based on a cost map and the target matching angular points, wherein the first direction is the direction of a first boundary of the first obstacle, the second direction is the direction of a second boundary of the second obstacle, and the first boundary and the second boundary are two boundaries adjacent to a parking space;
determining a third direction of the parking space to be parked according to the first direction and the second direction;
determining the target position of the parking space to be parked based on the target matching angular point and the third direction;
the shortest distance between the to-be-parked position and the first obstacle is a first distance, the shortest distance between the to-be-parked position and the second obstacle is a second distance, and the absolute value of the difference value between the first distance and the second distance is smaller than or equal to a first threshold value.
2. The method of claim 1, wherein calculating a first direction and a second direction based on the cost map and the target matching corner point comprises:
determining P points on the first boundary based on the cost map and the first corner point, wherein P is an integer greater than 2;
performing linear fitting on the P points on the first boundary to obtain a first direction based on a first linear fitting algorithm, wherein the first direction is an extension direction of a straight line obtained by fitting the P points;
determining Q points on the second boundary based on the cost map and the second corner point, wherein Q is an integer greater than 2;
and performing linear fitting on the Q points on the second boundary based on a second linear fitting algorithm to obtain the second direction, wherein the second direction is an extension direction of a straight line obtained by fitting the Q points.
3. The method of claim 2, wherein determining P points on the first boundary based on the cost map and the first corner point comprises:
translating the first corner point to a direction far away from the first boundary on the cost map to obtain a first point;
determining a first line based on the first point and a direction perpendicular to a driving direction of the vehicle;
respectively translating the P points on the first straight line to the first boundary, and determining the P points on the first boundary;
determining Q points on the second boundary based on the cost map and the second corner point includes:
translating the second corner point to a direction far away from the second boundary on the cost map to obtain a second point;
determining a second straight line based on the second point and a direction perpendicular to the driving direction;
and respectively translating the Q points on the second straight line to the second boundary, and determining the Q points on the second boundary.
4. The method of claim 1, wherein determining the target location of the parking space based on the target matching corner and the third direction comprises:
determining a first target rectangular window based on the first corner point, the third direction, a first side length and a second side length, wherein the first side length is greater than or equal to the length of a vehicle, the first side length is the length of the first target rectangular window in the third direction, the first target rectangular window comprises at least one complete pixel point in a direction perpendicular to the third direction, and the first target rectangular window is a rectangular window which is closest to the first obstacle and does not comprise the first obstacle region;
determining a second target rectangular window based on the second corner point, the third direction, a third side length and a fourth side length, wherein the third side length is greater than or equal to the length of the vehicle, the third side length is the length of the second target rectangular window in the third direction, the second target rectangular window comprises at least one complete pixel point in the direction perpendicular to the third direction, and the second target rectangular window is a rectangular window which is closest to the second obstacle and does not comprise the second obstacle region;
determining the target position based on the first target rectangular window and the second target rectangular window.
5. The method according to any one of claims 1 to 4, wherein the determining target matching corner points comprises:
and determining the target matching corner points based on the cost map.
6. The method of claim 5, wherein the target matching corner point is: and in the combination of the angular points in the set of the angular points to be selected of the first barrier and the angular points in the set of the angular points to be selected of the second barrier, the distance between the angular points is greater than or equal to the width of one parking space and the two angular points with the minimum distance.
7. The method of claim 6, wherein determining target matching corner points based on the cost map comprises:
determining S prepared corner sets based on the cost map, wherein the corners in each prepared corner set are sets of pixel points which are on all straight lines perpendicular to the axis of the vehicle on one obstacle and belong to the boundary of the obstacle, and S is an integer larger than 1;
determining S candidate corner sets from the S prepared corner sets, wherein corners in each candidate corner set meet target conditions;
and determining the target matching corner points from the S corner point sets to be selected.
8. The method of claim 7, wherein the target conditions are: the proportion of pixel points belonging to the obstacle area in the corresponding square is within a target range, and the corresponding square is as follows: and the side length of the square is a square of the second threshold value, and the square is constructed by taking the corresponding corner point as the center.
9. The method according to claim 7, wherein said determining the target matching corner point from the S candidate corner point sets comprises:
determining T groups of matching angular points from the S candidate angular point sets, wherein each group of matching angular points are two adjacent obstacles, the distance between two angular points in the candidate angular point set of one obstacle and the distance between two angular points in the candidate angular point set of the other obstacle is greater than or equal to the width of one parking space and the distance between the two angular points is the smallest, and T is a positive integer less than or equal to S;
and determining the target matching corner point from the T groups of matching corner points.
10. The method of claim 6, wherein the target matching corner point is: a set of matching corner points satisfying a predetermined condition, the predetermined condition being: the proportion of the pixel points belonging to the barrier region in the corresponding rectangle is less than or equal to a third threshold value; the corresponding rectangle is: and the rectangle takes the corresponding group of matched angular points as the vertex, takes the length of the vehicle as the side length, and has a center line perpendicular to the driving direction of the vehicle.
11. A parking space determining apparatus, comprising: a determining module and a calculating module;
the determining module is configured to determine a target matching corner, where the target matching corner includes: a first corner point on the first obstacle and a second corner point on the second obstacle;
the calculation module is configured to calculate a first direction and a second direction based on a cost map and the target matching angular point determined by the determination module, where the first direction is a direction of a first boundary of the first obstacle, the second direction is a direction of a second boundary of the second obstacle, and the first boundary and the second boundary are two boundaries adjacent to a parking space to be parked;
the determining module is further configured to determine a third direction of the parking space according to the first direction and the second direction obtained by the calculating module; determining the target position of the parking space to be parked based on the target matching angular point and the third direction;
the shortest distance between the to-be-parked position and the first obstacle is a first distance, the shortest distance between the to-be-parked position and the second obstacle is a second distance, and the absolute value of the difference value between the first distance and the second distance is smaller than or equal to a first threshold value.
12. An automatic parking apparatus, characterized by comprising: processor, memory and computer program stored on the memory and executable on the processor, which computer program, when executed by the processor, carries out the steps of the method of determining a parking space according to any one of claims 1 to 10.
13. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method for determining a space to be parked according to any one of claims 1 to 10.
CN202110536136.4A 2021-05-17 2021-05-17 Parking space determination method and device, automatic parking equipment and storage medium Active CN113516870B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110536136.4A CN113516870B (en) 2021-05-17 2021-05-17 Parking space determination method and device, automatic parking equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110536136.4A CN113516870B (en) 2021-05-17 2021-05-17 Parking space determination method and device, automatic parking equipment and storage medium

Publications (2)

Publication Number Publication Date
CN113516870A true CN113516870A (en) 2021-10-19
CN113516870B CN113516870B (en) 2022-11-11

Family

ID=78064267

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110536136.4A Active CN113516870B (en) 2021-05-17 2021-05-17 Parking space determination method and device, automatic parking equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113516870B (en)

Citations (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009126495A (en) * 2007-11-28 2009-06-11 Mitsubishi Electric Corp Parking assistant device
DE102014212866A1 (en) * 2014-07-02 2016-01-07 Robert Bosch Gmbh Method for determining a parking space from a number of measuring points
JP2018012451A (en) * 2016-07-22 2018-01-25 日産自動車株式会社 Parking support method and parking support device
CN107784290A (en) * 2017-11-03 2018-03-09 浙江工业大学 A kind of method for the bit occupancy digital image recognition that stops
JP2018070085A (en) * 2016-11-04 2018-05-10 ジャパンマリンユナイテッド株式会社 Vehicle deck structure for ship and car ferry
CN108281041A (en) * 2018-03-05 2018-07-13 东南大学 A kind of parking space's detection method blended based on ultrasonic wave and visual sensor
CN109353334A (en) * 2018-10-25 2019-02-19 广州小鹏汽车科技有限公司 Method for detecting parking stalls and device
CN109581389A (en) * 2017-09-28 2019-04-05 上海汽车集团股份有限公司 A kind of method and apparatus identifying parking space boundary
CN109712427A (en) * 2019-01-03 2019-05-03 广州小鹏汽车科技有限公司 A kind of method for detecting parking stalls and device
CN109927715A (en) * 2019-02-19 2019-06-25 惠州市德赛西威智能交通技术研究院有限公司 Vertical method of parking
CN110232835A (en) * 2019-06-27 2019-09-13 浙江工业大学 A kind of underground garage parking space detection method based on image procossing
CN110239522A (en) * 2019-05-17 2019-09-17 浙江吉利控股集团有限公司 A kind of automatic parking method, device and equipment
CN110610649A (en) * 2018-06-14 2019-12-24 北京京东尚科信息技术有限公司 Method and device for generating map
CN111578926A (en) * 2020-04-16 2020-08-25 天津大学 Map generation and navigation obstacle avoidance method based on automatic driving platform
CN112141124A (en) * 2019-08-27 2020-12-29 英属开曼群岛商麦迪创科技股份有限公司 Driving assistance system for vehicle and operation method thereof
CN112193242A (en) * 2020-10-10 2021-01-08 上海欧菲智能车联科技有限公司 Parking control method, system, device and storage medium
CN112558617A (en) * 2021-02-19 2021-03-26 深圳佑驾创新科技有限公司 Parking control method and device, computer equipment and storage medium
CN112622885A (en) * 2020-12-30 2021-04-09 惠州市德赛西威汽车电子股份有限公司 Method and system for constructing inclined parking spaces based on ultrasonic radar

Patent Citations (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009126495A (en) * 2007-11-28 2009-06-11 Mitsubishi Electric Corp Parking assistant device
DE102014212866A1 (en) * 2014-07-02 2016-01-07 Robert Bosch Gmbh Method for determining a parking space from a number of measuring points
JP2018012451A (en) * 2016-07-22 2018-01-25 日産自動車株式会社 Parking support method and parking support device
JP2018070085A (en) * 2016-11-04 2018-05-10 ジャパンマリンユナイテッド株式会社 Vehicle deck structure for ship and car ferry
CN109581389A (en) * 2017-09-28 2019-04-05 上海汽车集团股份有限公司 A kind of method and apparatus identifying parking space boundary
CN107784290A (en) * 2017-11-03 2018-03-09 浙江工业大学 A kind of method for the bit occupancy digital image recognition that stops
CN108281041A (en) * 2018-03-05 2018-07-13 东南大学 A kind of parking space's detection method blended based on ultrasonic wave and visual sensor
CN110610649A (en) * 2018-06-14 2019-12-24 北京京东尚科信息技术有限公司 Method and device for generating map
CN109353334A (en) * 2018-10-25 2019-02-19 广州小鹏汽车科技有限公司 Method for detecting parking stalls and device
CN109712427A (en) * 2019-01-03 2019-05-03 广州小鹏汽车科技有限公司 A kind of method for detecting parking stalls and device
CN109927715A (en) * 2019-02-19 2019-06-25 惠州市德赛西威智能交通技术研究院有限公司 Vertical method of parking
CN110239522A (en) * 2019-05-17 2019-09-17 浙江吉利控股集团有限公司 A kind of automatic parking method, device and equipment
CN110232835A (en) * 2019-06-27 2019-09-13 浙江工业大学 A kind of underground garage parking space detection method based on image procossing
CN112141124A (en) * 2019-08-27 2020-12-29 英属开曼群岛商麦迪创科技股份有限公司 Driving assistance system for vehicle and operation method thereof
CN111578926A (en) * 2020-04-16 2020-08-25 天津大学 Map generation and navigation obstacle avoidance method based on automatic driving platform
CN112193242A (en) * 2020-10-10 2021-01-08 上海欧菲智能车联科技有限公司 Parking control method, system, device and storage medium
CN112622885A (en) * 2020-12-30 2021-04-09 惠州市德赛西威汽车电子股份有限公司 Method and system for constructing inclined parking spaces based on ultrasonic radar
CN112558617A (en) * 2021-02-19 2021-03-26 深圳佑驾创新科技有限公司 Parking control method and device, computer equipment and storage medium

Also Published As

Publication number Publication date
CN113516870B (en) 2022-11-11

Similar Documents

Publication Publication Date Title
CN109785368B (en) Target tracking method and device
CN109067418B (en) Antenna control method and mobile terminal
CN110967024A (en) Method, device, equipment and storage medium for detecting travelable area
CN110926484B (en) Vehicle position obtaining method and device and intelligent vehicle
CN108931246B (en) Method and device for detecting existence probability of obstacle at unknown position
CN109165606B (en) Vehicle information acquisition method and device and storage medium
WO2018214825A1 (en) Method and device for assessing probability of presence of obstacle in unknown position
CN108769893B (en) Terminal detection method and terminal
CN108932515B (en) Method and device for correcting position of topological node based on closed loop detection
CN108917766B (en) Navigation method and mobile terminal
CN111090104A (en) Imaging processing method and electronic device
EP3584768A1 (en) Method of detecting photographic direction shift, device, apparatus, and data storage medium
CN113587938B (en) Vehicle positioning method and device and storage medium
CN110083742B (en) Video query method and device
CN109472825B (en) Object searching method and terminal equipment
CN112562372B (en) Track data processing method and related device
CN110769162B (en) Electronic equipment and focusing method
CN110209449B (en) Method and device for positioning cursor in game
CN110035379B (en) Positioning method and terminal equipment
CN113516870B (en) Parking space determination method and device, automatic parking equipment and storage medium
CN110708673A (en) Position determination method and portable multifunctional equipment
CN108494946B (en) Method and device for correcting electronic compass in mobile terminal
CN109725704B (en) Method and device for controlling application running
CN107256108B (en) Screen splitting method, device and computer readable storage medium
EP4258765A1 (en) Positioning method and related device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant