CN114926454A - Parking space detection method and device and electronic equipment - Google Patents

Parking space detection method and device and electronic equipment Download PDF

Info

Publication number
CN114926454A
CN114926454A CN202210666841.0A CN202210666841A CN114926454A CN 114926454 A CN114926454 A CN 114926454A CN 202210666841 A CN202210666841 A CN 202210666841A CN 114926454 A CN114926454 A CN 114926454A
Authority
CN
China
Prior art keywords
corner
corner point
point
parking space
vector
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
CN202210666841.0A
Other languages
Chinese (zh)
Other versions
CN114926454B (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.)
Mgjia Beijing Technology Co ltd
Original Assignee
Mgjia Beijing Technology 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 Mgjia Beijing Technology Co ltd filed Critical Mgjia Beijing Technology Co ltd
Priority to CN202210666841.0A priority Critical patent/CN114926454B/en
Publication of CN114926454A publication Critical patent/CN114926454A/en
Application granted granted Critical
Publication of CN114926454B publication Critical patent/CN114926454B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/70Determining position or orientation of objects or cameras
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/74Image or video pattern matching; Proximity measures in feature spaces
    • G06V10/761Proximity, similarity or dissimilarity measures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/762Arrangements for image or video recognition or understanding using pattern recognition or machine learning using clustering, e.g. of similar faces in social networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20081Training; Learning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30248Vehicle exterior or interior
    • G06T2207/30252Vehicle exterior; Vicinity of vehicle
    • G06T2207/30264Parking

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Databases & Information Systems (AREA)
  • Evolutionary Computation (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Software Systems (AREA)
  • Multimedia (AREA)
  • Quality & Reliability (AREA)
  • Traffic Control Systems (AREA)

Abstract

The invention discloses a parking space detection method and device and electronic equipment, wherein the method comprises the following steps: acquiring environmental information of parking lots around a vehicle to obtain an angular point set; the four angular points respectively correspond to the four embedded vector sets; calculating cosine similarity of an embedded vector of a first angular point and an embedded vector of a third angular point, screening out a combination of the first angular point and a third angular point which possibly belong to the same parking space, calculating cosine similarity of an embedded vector of a second angular point and an embedded vector of a fourth angular point, and screening out a combination of the second angular point and a fourth angular point which possibly belong to the same parking space; clustering the first angular point and the second angular point which are screened out, clustering all possible parking space entry points, and screening out the situation that a plurality of parking spaces are possibly crossed in a parking space combination by using the clustered entry points; and finally, obtaining a first angular point, a second angular point, a third angular point and a fourth angular point which belong to the same parking space by using an NMS algorithm. Therefore, the parking space prediction accuracy can be improved.

Description

Parking space detection method and device and electronic equipment
Technical Field
The invention relates to the technical field of automatic driving, in particular to a parking space detection method and device and electronic equipment.
Background
In-line parking is a painful experience for many drivers, and large cities have limited parking space, and it has become a necessary skill to drive cars into narrow spaces. There are few cases where the vehicle is stopped without taking a turn. The automatic parking function is developed for the situation, when a driver uses the automatic parking function, the driver only needs to lightly start a button, sit, relax, and other things can be automatically completed. However, the premise for realizing automatic parking is that a parking space needs to be predicted, and a vehicle can be automatically and safely operated to park in the parking space.
In the existing parking space detection scheme, due to the type difference of parking spaces, most of the parking spaces are target parking spaces obtained by predicting the coordinates of four angular points of the parking spaces, but the method for forming the parking spaces by predicting the angular points has the defects of low prediction precision of the parking spaces, increased uncertainty of parking space detection results and reduced parking space detection precision.
Disclosure of Invention
Therefore, the invention provides a parking space detection method and device and electronic equipment to solve the problems that the current parking space prediction process is too complicated and low in accuracy.
In order to achieve the purpose, the invention adopts the following technical scheme:
the embodiment of the invention provides a parking space detection method, which comprises the following steps: acquiring environmental information of parking lots around a vehicle; inputting the environment information into an image processing model to obtain a first corner set, a second corner set, a third corner set and a fourth corner set; selecting any one first corner point from the first corner point set, and calculating the first cosine similarity of the first corner point and each third corner point embedded vector in the third corner point set; screening out a third corner point which possibly belongs to the same parking space as the first corner point from the third corner point set according to the first cosine similarity; forming a first vector set of two diagonal corner points of the same parking space by using the first corner point and the screened third corner point; selecting any one second corner point from the second corner point set, and calculating second cosine similarity of the second corner point and each fourth corner point embedded vector in the fourth corner point set; screening out a fourth angular point which possibly belongs to the same parking space as the second angular point from the fourth angular point set according to the second cosine similarity; forming a second vector set of two diagonal corner points of the same parking space by using the second corner point and the screened fourth corner point; calculating the line segment intersection of each first vector in the first vector set and each second vector in the second vector set, and screening out a first vector and a second vector which may belong to the same parking space from the first vector set and the second vector set according to the line segment intersection; obtaining a first angular point, a second angular point subset, a third angular point subset and a fourth angular point subset which can belong to the same parking space according to the first vector set and the second vector set; clustering a second angular point which belongs to the same parking space with the first angular point in the first angular point set and the second angular point set by using a clustering algorithm; and respectively screening out a third corner point and a fourth corner point which belong to the same parking space as the first corner point by utilizing a second corner point which belongs to the same parking space as the first corner point and is clustered by utilizing the first corner point and the second corner point after clustering in the third corner point subset and the fourth corner point subset, and finally obtaining the first corner point, the second corner point, the third corner point and the fourth corner point which belong to the same parking space.
Optionally, the parking space detection method further includes: selecting any one first corner point from the first corner point set, and calculating a first cosine similarity between the first corner point and each third corner point embedding vector in the third corner point set, including: acquiring a thermodynamic diagram, an offset diagram and an embedded vector diagram of each corner point in the first corner point and the third corner point set; correcting the positions of the corner points in the first corner point set and the third corner point set by using the offset map; determining an embedded vector of each corner point in the first corner point and the third corner point set according to the corresponding relation between the thermodynamic diagram and the embedded vector diagram; calculating a first cosine similarity of the embedded vector of the first corner point and each third corner embedded vector in the third corner set; and/or selecting any one second corner point from the second corner point set, and calculating second cosine similarity of the second corner point and each fourth corner point embedded vector in the fourth corner point set, including: acquiring thermodynamic diagrams, offset diagrams and embedded vector diagrams of each corner in the second corner set and the fourth corner set; correcting the positions of the corner points in the second corner point set and the fourth corner point set by using the offset map; determining an embedded vector of each corner point in the second corner point set and the fourth corner point set according to the corresponding relation between the thermodynamic diagram and the embedded vector diagram; and calculating a second cosine similarity of the embedding vector of the second corner point and each fourth corner point embedding vector in the fourth corner point set.
Optionally, the correcting the coordinates obtained by the thermodynamic diagram by using the offset map includes: determining a first coordinate of the corner point according to the thermodynamic diagram of the corner point; determining the offset of the corner point according to the offset map of the corner point; and correcting the coordinates of the corner points by using the offset of the corner points to obtain second coordinates after the corner points are corrected.
Optionally, screening out a third corner point which may belong to the same parking space as the first corner point in the third corner point set according to the first cosine similarity, including: when the first cosine similarity is greater than a preset first threshold, determining that a third corner point in the third corner point set and the first corner point may belong to the same parking space; and/or screening out a fourth corner point which possibly belongs to the same parking space as the second corner point in the fourth corner point set according to the second cosine similarity, wherein the fourth corner point comprises: and when the second cosine similarity is greater than a preset first threshold, determining that a fourth corner point in the fourth corner point set and the second corner point may belong to the same parking space.
Optionally, the parking space detection method further includes: acquiring a first corner which takes the first corner as a vertex, the fourth corner and the second corner; acquiring a second corner which takes the second corner point as a vertex, and consists of the third corner point and the first corner point; and when the first corner is similar to the second corner, determining the first corner, the second corner, the third corner and the fourth corner as the first corner, the second corner, the third corner and the fourth corner belonging to the same parking space.
Optionally, be in according to the second angular point of screening and this first angular point that belongs to same parking stall third angular point subset and fourth angular point subset screen respectively and belong to the third angular point and the fourth angular point of same parking stall with this first angular point, include: determining a third corner point which belongs to the same parking space as the first corner point in the third corner point subset according to the first corner point; and determining fourth corner points which belong to the same parking space with the second corner points in the fourth corner point subset according to second corner points which belong to the same parking space with the first corner points.
Optionally, the determining the first coordinate of the corner point according to the thermodynamic diagram of the corner point further includes: determining the occupation probability of the corner points according to the thermodynamic diagram of the corner points; and determining the occupation condition of the parking space according to the occupation probability of the angular points.
According to a second aspect, the present invention also discloses a parking space detection method and apparatus, including: the system comprises an acquisition module, a storage module and a display module, wherein the acquisition module is used for acquiring environmental information of parking lots around a vehicle; the set determining module is used for inputting the environment information into an image processing model to obtain a first corner set, a second corner set, a third corner set and a fourth corner set; the first construction module is used for selecting any one first corner point from the first corner point set and calculating the first cosine similarity of the first corner point and each third corner point embedding vector in the third corner point set; screening out a third corner point which possibly belongs to the same parking space as the first corner point from the third corner point set according to the first cosine similarity; forming a first vector set of two diagonal corner points of the same parking space by using the first corner point and the screened third corner point; the second building module is used for selecting any one second corner point from the second corner point set and calculating second cosine similarity of the second corner point and each fourth corner point embedded vector in the fourth corner point set; screening out a fourth angular point which possibly belongs to the same parking space as the second angular point from the fourth angular point set according to the second cosine similarity; forming a second vector set of two diagonal corner points of the same parking space by using the second corner point and the screened fourth corner point; the calculation module is used for calculating the line segment intersection of each first vector in the first vector set and each second vector in the second vector set, and screening out a first vector and a second vector which possibly belong to the same parking space from the first vector set and the second vector set according to the line segment intersection; obtaining a first angular point, a second angular point subset, a third angular point subset and a fourth angular point subset which can belong to the same parking space according to the first vector set and the second vector set; the clustering module is used for clustering a second angular point which belongs to the same parking space with the first angular point in the first angular point set and the second angular point set by utilizing a clustering algorithm; and respectively screening out a third corner point and a fourth corner point which belong to the same parking space as the first corner point by utilizing a second corner point which belongs to the same parking space as the first corner point and is clustered by utilizing the first corner point and the second corner point after clustering in the third corner point subset and the fourth corner point subset, and finally obtaining the first corner point, the second corner point, the third corner point and the fourth corner point which belong to the same parking space.
According to a fourth aspect, an embodiment of the present invention further discloses an electronic device, including: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to cause the at least one processor to perform the steps of the parking space detection method according to the first aspect or any one of the optional embodiments of the first aspect.
According to a fifth aspect, the present invention further discloses a computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, implements the parking space detection method steps according to the first aspect or any one of the optional embodiments of the first aspect.
The technical scheme of the invention has the following advantages:
1. the method comprises the steps of obtaining environmental information of a parking lot around a vehicle, inputting the environmental information of the parking lot into an image processing model to obtain a first corner set, a second corner set, a third corner set and a fourth corner set of a parking space, selecting any one first corner from the first corner set, calculating first cosine similarity of each third corner in the first corner set and the third corner set, screening out a third corner which possibly belongs to the same parking space as the first corner from the third corner set according to the first cosine similarity, forming a parking space diagonal set by using the first corner and the screened third corner, selecting any one second corner from the second corners and screening out a fourth corner which possibly belongs to the same parking space as the second corner, obtaining another parking space diagonal set formed by the second corner and the fourth corner to obtain the first parking space which can belong to the same parking space, And screening out a first angular point, a second angular point, a third angular point and a fourth angular point which may belong to the same parking space by using a clustering algorithm. The method can accurately predict the position of the parking space, and improve the accuracy and the real-time performance of the parking space prediction.
2. According to the method and the device, the occupation probability of each corner point of the parking space is determined by utilizing the thermodynamic diagrams of the corner points, so that the occupation probability of the whole parking space is obtained, the occupation probability of the parking space is finally obtained, the prediction precision of the occupation condition of the listening plan is improved, and the experience of a user is improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
Fig. 1 is a schematic flow chart of a parking space detection method according to an embodiment of the present invention;
fig. 2 is a specific schematic diagram of a parking space detection method according to an embodiment of the present invention;
fig. 3 is another specific schematic diagram of a parking space detection method according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a parking space detection apparatus according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of an electronic device in an embodiment of the invention.
Detailed Description
The technical solutions of the present invention will be described clearly and completely with reference to the accompanying drawings, and it is to be understood that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be obtained by a person skilled in the art without making any creative effort based on the embodiments in the present invention, belong to the protection scope of the present invention.
In describing the present invention, it is noted that the term "and/or" as used in this specification and the appended claims is intended to mean and include any and all possible combinations of one or more of the associated listed items.
In addition, the technical features involved in the different embodiments of the present invention described below may be combined with each other as long as they do not conflict with each other.
The embodiment of the invention discloses a parking space detection method, which comprises the following steps of:
step 101, obtaining environmental information of a parking lot around a vehicle.
As a specific implementation manner, the environment picture of the parking lot around the vehicle can be collected through a 360-degree around-the-vehicle system, so as to obtain the environment information of the parking lot around the vehicle.
And 102, inputting the environment information into an image processing model to obtain a first corner set, a second corner set, a third corner set and a fourth corner set.
As shown in fig. 2, the image processing model may be a neural Network model with a stacked Hourglass Network structure (Hourglass Network) as a core (backbone), and the training mode of the image processing model is as follows: the method comprises the steps of collecting image data, marking the image data by using a preset marking rule to obtain training data, and training a model to be trained by using the training data to obtain an image processing model.
Because the parking space is detected based on the four corner points of the parking space, in order to improve the accuracy of the algorithm, the image data needs to be labeled according to a certain labeling rule to obtain training data. The labeling rule may be sequentially labeling from an entrance of the parking space in a clockwise direction, as shown in fig. 3, for example, l may label from an entrance corner point 1 of the parking space in the clockwise direction to obtain training data with identifiers 1, 2, 3, and 4.
Furthermore, the environment information of the parking lot around the vehicle can be input into the trained image processing model, so that a first corner point set, a second corner point set, a third corner point set and a fourth corner point set in the environment of the parking lot around the vehicle are obtained.
103, selecting any one first corner point from the first corner point set, and calculating a first cosine similarity between the first corner point and each third corner point embedded vector in the third corner point set; screening out a third corner point which possibly belongs to the same parking space as the first corner point from the third corner point set according to the first cosine similarity; and forming a first vector set of two diagonal corner points which possibly form the same parking space by using the first corner point and the screened third corner point.
104, selecting any one second corner point from the second corner point set, and calculating second cosine similarity of the second corner point and each fourth corner point embedded vector in the fourth corner point set; screening out a fourth angular point which possibly belongs to the same parking space as the second angular point from the fourth angular point set according to the second cosine similarity; and forming a second vector set of two diagonal corner points which possibly form the same parking space by using the second corner point and the screened fourth corner point.
As a specific implementation manner, for any one corner point set among the first corner point set, the second corner point set, the third corner point set and the fourth corner point set, a thermodynamic diagram and an offset diagram of a corner point in the corner point set are obtained, a first coordinate of the corner point is determined through the thermodynamic diagram of the corner point, an offset of the corner point is obtained by using the offset diagram of the corner point, and the first coordinate of the corner point is corrected according to the offset to obtain a corrected second coordinate of the corner point. The thermodynamic diagram, the offset diagram and the embedded vector diagram are in one-to-one correspondence, and each pixel position in the embedded vector diagram is a multi-dimensional vector. The embedded vector diagram represents the feature of each point, the feature is multidimensional, and the problem that some image features cannot be distinguished in a low dimension can be avoided by distinguishing the image features in the high dimension.
And then calculating a first cosine similarity of the embedded vector of the first corner point and the embedded vector of any one third corner point in the set of third corner points, and when the first cosine similarity is greater than a preset first threshold value, proving that the first corner point and the third corner point may belong to the same parking space. And forming a set first vector of diagonal lines of the parking space by using the first angular point and the screened third angular point. Traversing all third corners in the set of third corners to obtain all third corners which may belong to the same parking space as the first corner, selecting any one second corner in the set of second corners by using the method for all diagonal sets of parking spaces which may be composed of the first third corners, calculating a second cosine similarity between an embedded vector of the second corner and an embedded vector of any one fourth corner in the set of fourth corners, and when the second cosine similarity is greater than a first threshold, proving that the second corner and the fourth corner may belong to the same parking space. And forming a second vector by using the second angular point and the screened fourth angular point. And traversing all fourth angular points in the fourth angular point set to obtain all fourth angular points which possibly belong to the same parking space with the second angular point, wherein all parking space diagonal sets can be formed by the second angular points.
Step 105, calculating line segment intersection third cosine similarity of each pair of corner point combination first vectors in the first vector set and each second vector in a second vector set, and screening out first vectors and second vectors which may belong to the same parking space in the first vector set and the second vector set according to the line segment intersection third cosine similarity; and obtaining the first angular point, the second angular point subset, the third angular point subset and the fourth angular point subset which can belong to the same parking space according to the first vector set vector and the second vector set vector.
As a specific implementation manner, the intersection of line segments formed by two diagonals may be judged by optionally selecting one diagonal in a first diagonal combination and then optionally selecting one diagonal in a second diagonal combination, if the line segments formed by the two diagonals intersect, the two diagonals may form a parking space, and four points forming the two diagonals may be a first corner point, a second corner point, a third corner point and a fourth corner point belonging to the same parking space.
And then screening out a set of all the first angular points, the second angular points, the third angular points and the fourth angular points which possibly belong to the same parking space.
106, clustering a second angular point subset of points of possible parking space inlets in the first angular point set and the second angular point set by using a clustering algorithm to screen out a second angular point belonging to the same parking space as the first angular point; and respectively screening out a third corner point and a fourth corner point which belong to the same parking space with the first corner point according to a third corner point subset and a fourth corner point subset which are screened and clustered by using the first corner point and the second corner point of the clustered entrance and are possibly crossed by a plurality of parking spaces in the parking space combination, and finally obtaining the first corner point, the second corner point, the third corner point and the fourth corner point which belong to the same parking space.
And clustering entry points of the parking spaces by using a clustering algorithm, screening the obtained possible parking space combinations, and screening out the entry lines of the parking spaces when the entry lines cross at least three entry points, wherein the entry lines are considered as incorrect and need to be screened out. As a specific implementation manner, clustering may be performed by using a clustering algorithm, for example, a mean-shift algorithm, to cluster entry points of parking spaces, and then only two clustering points are present between two points at an entrance of any parking space to screen out a final result within a certain threshold range, and finally only two entry points are present between a certain threshold range according to an obtained connecting line segment of the two entry points of a parking space, if the connecting line segment is greater than the two entry points, it is determined that the parking space spans multiple parking spaces, and a first angular point, a second angular point, a third angular point, and a fourth angular point that belong to the same parking space are finally obtained. Further, before the clustering algorithm is performed on the parking space entrance corner points, the first corner point is used as a vertex, the first corner point and the fourth corner point form an edge, the first corner point and the two edges form a first corner. And forming an edge by using the second corner point as a vertex, the second corner point and the third corner point, and an edge by using the second corner point and the first corner point, and further forming a second corner by using the vertex and the two edges. And then compare the similar degree of this first angle and second angle, when this first angle is similar with the second angle, can confirm this first angle and second angle point probably belong to same parking stall because perpendicular parking stall, horizontal parking stall, the skew parking stall itself both sides are symmetrical.
Meanwhile, the thermodynamic diagram of each corner also has a group of data used for representing the occupation probability of the parking space, and the integral probability of the parking space can be determined according to the occupation probability of each corner. For example, after the occupation probabilities of the four corner points are obtained, an average value of the occupation probabilities of the four corner points is calculated, when the average value is larger than an occupation probability threshold value, it can be determined that the parking space is occupied, the parking habit of a car owner in the parking lot can be analyzed according to big data collection, the closest corner point during parking is determined, and then weighting calculation is performed on the four corner points.
The present invention also provides a parking space detection apparatus, as shown in fig. 4, the apparatus includes:
an obtaining module 41, configured to obtain environmental information of a parking lot around a vehicle, details of which are described with reference to step 101;
a set determining module 42, configured to input the environment information into an image processing model to obtain a first corner set, a second corner set, a third corner set, and a fourth corner set, where the detailed contents refer to step 102;
a first building module 43, configured to select any one first corner point from the first corner point set, and calculate a first cosine similarity between the first corner point and each third corner point embedding vector in the third corner point set; screening out a third corner point which possibly belongs to the same parking space as the first corner point from the third corner point set according to the first cosine similarity; forming a first vector set of two diagonal corner points of the same parking space by using the first corner point and the screened third corner point, and referring to step 103 for details;
a second building module 44, configured to select any one second corner point from the second corner point set, and calculate a second cosine similarity between the second corner point and each fourth corner point embedding vector in the fourth corner point set; screening out a fourth angular point which possibly belongs to the same parking space as the second angular point from the fourth angular point set according to the second cosine similarity; forming a second vector set of two diagonal corner points of the same parking space by using the second corner point and the screened fourth corner point, and referring to the step 104 for details;
a calculating module 45, configured to calculate line segment intersection of each first vector in the first vector set and each second vector in the second vector set, and screen a first vector and a second vector that may belong to the same parking space from the first vector set and the second vector set according to the line segment intersection; obtaining a first angular point, a second angular point subset, a third angular point subset and a fourth angular point subset which can belong to the same parking space according to the first vector set and the second vector set, and referring to step 105 for details;
a clustering module 46, configured to cluster a second angular point that belongs to the same parking space as the first angular point in the first angular point set and the second angular point set by using a clustering algorithm; and (3) respectively screening out a third corner point and a fourth corner point which belong to the same parking space as the first corner point by utilizing a second corner point which belongs to the same parking space as the first corner point and is clustered by utilizing the first corner point and the second corner point after clustering in the third corner point subset and the fourth corner point subset, and finally obtaining the first corner point, the second corner point, the third corner point and the fourth corner point which belong to the same parking space, wherein the detailed content refers to step 106.
An embodiment of the present invention further provides a construction machine, and as shown in fig. 5, the electronic device may include a processor 501 and a memory 502, where the processor 501 and the memory 502 may be connected through a bus or in another manner, and fig. 5 takes the connection through the bus as an example.
The processor 501 may be a Central Processing Unit (CPU). The processor 501 may also be other general purpose processors, Digital signal processors (DAPs), Application specific Integrated circuits (AAICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components, or any combination thereof.
The memory 502, which is a non-transitory computer-readable storage medium, may be used to store non-transitory software programs, non-transitory computer-executable programs, and modules, such as program instructions/modules corresponding to the key shielding method of the parking space detection method apparatus in the embodiments of the present invention. The processor 501 executes various functional applications and data processing of the processor by running non-transitory software programs, instructions and modules stored in the memory 502, that is, implements the parking space detection method in the above method embodiment.
The memory 502 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created by the processor 501, and the like. Further, the memory 502 may include high speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid state storage device. In some embodiments, memory 502 optionally includes memory located remotely from processor 501, which may be connected to processor 501 via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The one or more modules are stored in the memory 502 and when executed by the processor 501 perform the parking space detection method as in the embodiment of fig. 1-3.
The details of the electronic device may be understood with reference to the corresponding descriptions and effects in the embodiments shown in fig. 1 to 3, and are not described herein again.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a flash Memory (FlaAhMemory), a Hard disk Drive (Hard disk Drive, abbreviated as HDD), or a solid state Drive (Aolid-ate Drive, AAD), etc.; the storage medium may also comprise a combination of memories of the kind described above.
Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the invention, and such modifications and variations fall within the scope defined by the appended claims.

Claims (10)

1. A parking space detection method, comprising:
acquiring environmental information of parking lots around a vehicle;
inputting the environment information into an image processing model to obtain a first corner set, a second corner set, a third corner set and a fourth corner set;
selecting any one first corner point from the first corner point set, and calculating the first cosine similarity of the first corner point and each third corner point embedded vector in the third corner point set; screening out a third corner point which possibly belongs to the same parking space as the first corner point from the third corner point set according to the first cosine similarity; forming a first vector set of two diagonal corner points of the same parking space by using the first corner point and the screened third corner point;
selecting any one second corner point from the second corner point set, and calculating second cosine similarity of the second corner point and each fourth corner point embedded vector in the fourth corner point set; screening out a fourth angular point which possibly belongs to the same parking space as the second angular point from the fourth angular point set according to the second cosine similarity; forming a second vector set of two diagonal corner points of the same parking space by using the second corner point and the screened fourth corner point;
calculating the line segment intersection of each first vector in the first vector set and each second vector in the second vector set, and screening out a first vector and a second vector which may belong to the same parking space from the first vector set and the second vector set according to the line segment intersection; obtaining a first angular point, a second angular point subset, a third angular point subset and a fourth angular point subset which can belong to the same parking space according to the first vector set and the second vector set;
clustering a second angular point which belongs to the same parking space with the first angular point in the first angular point set and the second angular point set by using a clustering algorithm; and respectively screening out a third corner point and a fourth corner point which belong to the same parking space as the first corner point by utilizing a second corner point which belongs to the same parking space as the first corner point and is clustered by utilizing the first corner point and the second corner point after clustering in the third corner point subset and the fourth corner point subset, and finally obtaining the first corner point, the second corner point, the third corner point and the fourth corner point which belong to the same parking space.
2. The method of claim 1,
selecting any one first corner point from the first corner point set, and calculating a first cosine similarity between the first corner point and each third corner point embedding vector in the third corner point set, including:
acquiring a thermodynamic diagram, an offset diagram and an embedded vector diagram of each corner point in the first corner point and the third corner point set;
correcting the positions of the corner points in the first corner point set and the third corner point set by using the offset map;
determining an embedded vector of each corner point in the first corner point and the third corner point set according to the corresponding relation between the thermodynamic diagram and the embedded vector diagram;
calculating a first cosine similarity of the embedding vector of the first corner point and each embedding vector of the third corner points in the third corner point set;
and/or the presence of a gas in the gas,
selecting any one second corner point from the second corner point set, and calculating second cosine similarity of the second corner point and each fourth corner point embedded vector in the fourth corner point set, including:
acquiring a thermodynamic diagram, an offset diagram and an embedded vector diagram of each corner in the second corner set and the fourth corner set;
correcting the positions of the corners in the second corner set and the fourth corner set by using the offset map;
determining an embedded vector of each corner point in the second corner point set and the fourth corner point set according to the corresponding relation between the thermodynamic diagram and the embedded vector diagram;
and calculating a second cosine similarity of the embedding vector of the second corner point and each fourth corner point embedding vector in the fourth corner point set.
3. The method of claim 2, wherein correcting the thermodynamic diagram derived coordinates using the offset map comprises:
determining a first coordinate of the corner point according to the thermodynamic diagram of the corner point;
determining the offset of the corner point according to the offset map of the corner point;
and correcting the coordinates of the corner points by using the offset of the corner points to obtain second coordinates after the corner points are corrected.
4. The method of claim 1,
according to the first cosine similarity, third corner points which possibly belong to the same parking space as the first corner point are screened from the third corner point set, and the method comprises the following steps:
when the first cosine similarity is greater than a preset first threshold, determining that a third corner point in the third corner point set and the first corner point may belong to the same parking space;
and/or the presence of a gas in the atmosphere,
screening out a fourth corner point which possibly belongs to the same parking space as the second corner point in the fourth corner point set according to the second cosine similarity, wherein the screening comprises the following steps:
and when the second cosine similarity is greater than a preset first threshold, determining that a fourth corner point in the fourth corner point set and the second corner point may belong to the same parking space.
5. The method of claim 1, further comprising:
acquiring a first corner which is formed by taking the first corner point as a vertex, the fourth corner point and the second corner point;
acquiring a second corner which is formed by taking the second corner point as a vertex, the third corner point and the first corner point;
and when the first corner is similar to the second corner, determining the first corner, the second corner, the third corner and the fourth corner as the first corner, the second corner, the third corner and the fourth corner belonging to the same parking space.
6. The method of claim 1, wherein the step of respectively selecting a third corner point and a fourth corner point belonging to the same parking space as the first corner point from the third corner point subset and the fourth corner point subset according to the selected second corner point belonging to the same parking space as the first corner point comprises:
determining a third corner point which belongs to the same parking space as the first corner point in the third corner point subset according to the first corner point;
and determining fourth corner points which belong to the same parking space with the second corner points in the fourth corner point subset according to second corner points which belong to the same parking space with the first corner points.
7. The method of claim 3, wherein determining the first coordinate of the corner point based on a thermodynamic diagram of the corner point further comprises:
determining the occupation probability of the corner points according to the thermodynamic diagram of the corner points;
and determining the occupation condition of the parking space according to the occupation probability of the angular points.
8. A parking space detection device, comprising:
the system comprises an acquisition module, a storage module and a display module, wherein the acquisition module is used for acquiring environmental information of parking lots around a vehicle;
the set determining module is used for inputting the environment information into an image processing model to obtain a first corner set, a second corner set, a third corner set and a fourth corner set;
the first construction module is used for selecting any one first corner point from the first corner point set and calculating the first cosine similarity of the first corner point and each third corner point embedding vector in the third corner point set; screening out a third corner point which possibly belongs to the same parking space as the first corner point from the third corner point set according to the first cosine similarity; forming a first vector set of two diagonal corner points of the same parking space by using the first corner point and the screened third corner point;
the second building module is used for selecting any one second corner point from the second corner point set and calculating second cosine similarity of the second corner point and each fourth corner point embedded vector in the fourth corner point set; screening out a fourth angular point which possibly belongs to the same parking space as the second angular point from the fourth angular point set according to the second cosine similarity; forming a second vector set of two diagonal corner points of the same parking space by using the second corner point and the screened fourth corner point;
the calculation module is used for calculating the line segment intersection of each first vector in the first vector set and each second vector in the second vector set, and screening out a first vector and a second vector which possibly belong to the same parking space from the first vector set and the second vector set according to the line segment intersection; obtaining a first angular point, a second angular point subset, a third angular point subset and a fourth angular point subset which can belong to the same parking space according to the first vector set and the second vector set;
the clustering module is used for clustering a second angular point which belongs to the same parking space with the first angular point in the first angular point set and the second angular point set by utilizing a clustering algorithm; and respectively screening out a third corner point and a fourth corner point which belong to the same parking space with the first corner point by utilizing a second corner point which is clustered by the first corner point and the second corner point and belongs to the same parking space with the first corner point in the third corner point subset and the fourth corner point subset, and finally obtaining the first corner point, the second corner point, the third corner point and the fourth corner point which belong to the same parking space.
9. An electronic device, comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory having stored therein computer instructions, the processor executing the computer instructions to perform the parking space detection method according to any one of claims 1 to 7.
10. 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 parking space detection method according to any one of claims 1-7.
CN202210666841.0A 2022-06-13 2022-06-13 Parking space detection method and device and electronic equipment Active CN114926454B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210666841.0A CN114926454B (en) 2022-06-13 2022-06-13 Parking space detection method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210666841.0A CN114926454B (en) 2022-06-13 2022-06-13 Parking space detection method and device and electronic equipment

Publications (2)

Publication Number Publication Date
CN114926454A true CN114926454A (en) 2022-08-19
CN114926454B CN114926454B (en) 2023-03-24

Family

ID=82814450

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210666841.0A Active CN114926454B (en) 2022-06-13 2022-06-13 Parking space detection method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN114926454B (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170234694A1 (en) * 2016-02-11 2017-08-17 International Business Machines Corporation Cognitive parking guidance
CN110796063A (en) * 2019-10-24 2020-02-14 百度在线网络技术(北京)有限公司 Method, device, equipment, storage medium and vehicle for detecting parking space
CN112052782A (en) * 2020-08-31 2020-12-08 安徽江淮汽车集团股份有限公司 Around-looking-based parking space identification method, device, equipment and storage medium
CN112580508A (en) * 2020-12-18 2021-03-30 蔚来汽车科技(安徽)有限公司 Parking space corner correction method, parking space corner correction system and vehicle
CN112749577A (en) * 2019-10-29 2021-05-04 北京初速度科技有限公司 Parking space detection method and device
CN113076845A (en) * 2021-03-26 2021-07-06 上海欧菲智能车联科技有限公司 Parking space acquisition method, parking space determination device, vehicle and readable storage medium
CN113269163A (en) * 2021-07-16 2021-08-17 中汽创智科技有限公司 Stereo parking space detection method and device based on fisheye image
US20210256680A1 (en) * 2020-02-14 2021-08-19 Huawei Technologies Co., Ltd. Target Detection Method, Training Method, Electronic Device, and Computer-Readable Medium
US20220161784A1 (en) * 2020-11-25 2022-05-26 Hyundai Mobis Co., Ltd. Apparatus for recognizing parking area for autonomous parking and method thereof

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170234694A1 (en) * 2016-02-11 2017-08-17 International Business Machines Corporation Cognitive parking guidance
CN110796063A (en) * 2019-10-24 2020-02-14 百度在线网络技术(北京)有限公司 Method, device, equipment, storage medium and vehicle for detecting parking space
CN112749577A (en) * 2019-10-29 2021-05-04 北京初速度科技有限公司 Parking space detection method and device
US20210256680A1 (en) * 2020-02-14 2021-08-19 Huawei Technologies Co., Ltd. Target Detection Method, Training Method, Electronic Device, and Computer-Readable Medium
CN112052782A (en) * 2020-08-31 2020-12-08 安徽江淮汽车集团股份有限公司 Around-looking-based parking space identification method, device, equipment and storage medium
US20220161784A1 (en) * 2020-11-25 2022-05-26 Hyundai Mobis Co., Ltd. Apparatus for recognizing parking area for autonomous parking and method thereof
CN112580508A (en) * 2020-12-18 2021-03-30 蔚来汽车科技(安徽)有限公司 Parking space corner correction method, parking space corner correction system and vehicle
CN113076845A (en) * 2021-03-26 2021-07-06 上海欧菲智能车联科技有限公司 Parking space acquisition method, parking space determination device, vehicle and readable storage medium
CN113269163A (en) * 2021-07-16 2021-08-17 中汽创智科技有限公司 Stereo parking space detection method and device based on fisheye image

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
HEI LAW ET AL: "CornerNet: Detecting Objects as Paired Keypoints", 《ARXIV》 *
王万良 等: "基于边缘相关性距离约束的角点匹配", 《计算机科学》 *
黄肖琳: "基于图像处理的车位状态检测算法研究", 《中国优秀硕士学位论文全文数据库》 *

Also Published As

Publication number Publication date
CN114926454B (en) 2023-03-24

Similar Documents

Publication Publication Date Title
CN108038474B (en) Face detection method, convolutional neural network parameter training method, device and medium
WO2021003823A1 (en) Video frame image analysis-based vehicle illegal parking detection method and apparatus
CN112085056B (en) Target detection model generation method, device, equipment and storage medium
CN109726678B (en) License plate recognition method and related device
CN112198878B (en) Instant map construction method and device, robot and storage medium
CN113065427A (en) Vehicle parking state determination method, device, equipment and storage medium
CN114038004A (en) Certificate information extraction method, device, equipment and storage medium
CN110659658A (en) Target detection method and device
CN113850136A (en) Yolov5 and BCNN-based vehicle orientation identification method and system
CN110852327A (en) Image processing method, image processing device, electronic equipment and storage medium
CN112101205A (en) Training method and device based on multi-task network
CN114820679A (en) Image annotation method and device, electronic equipment and storage medium
CN116229406B (en) Lane line detection method, system, electronic equipment and storage medium
CN114926454B (en) Parking space detection method and device and electronic equipment
CN112528994A (en) Free-angle license plate detection method, license plate identification method and identification system
CN114926817B (en) Method and device for identifying parking space, electronic equipment and computer readable storage medium
CN113554611B (en) Insulator self-explosion defect detection method and device, terminal and storage medium
CN115618602A (en) Lane-level scene simulation method and system
CN115527187A (en) Method and device for classifying obstacles
CN114926803A (en) Lane line detection model establishing method, lane line detection method, device and equipment
CN112101139B (en) Human shape detection method, device, equipment and storage medium
CN114724107A (en) Image detection method, device, equipment and medium
CN115546522A (en) Moving object identification method and related device
CN112634141A (en) License plate correction method, device, equipment and medium
CN112149600A (en) Big data automobile driving area image analysis method and system

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