Parking space recognition method, parking space recognition device and vehicle
By acquiring and processing three-dimensional images of the parking lot where the vehicle is located, identifying the idle parking spaces in the parking space, the difficulty of identifying the parking spaces is solved, the accuracy of the identification of idle parking spaces is improved and the parking efficiency is improved, and the user experience is improved.
Patent Information
- Application Number
- CN202510455739.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-11
- Publication Date
- 2025-07-18
AI Technical Summary
When the parking space is blocked by moving objects or stationary objects, it is difficult for users to accurately identify whether the parking space is an idle parking space, which affects the parking experience.
By obtaining the initial three-dimensional image of the parking lot where the vehicle is located, identifying the first plane and multiple side planes where the parking space is located, determining the target three-dimensional image of the intersection line perpendicular to the first plane, identifying the idle parking spaces based on perspective principles and geometric principles, and outputting parking space information.
It improves the accuracy of idle parking space identification, simplifies parking selection operations, and improves vehicle parking efficiency and user experience.
Smart Images

Figure CN120340264A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of vehicles, and particularly to a parking space recognition method, a parking space recognition device and a vehicle in the technical field of vehicles. Background Art
[0002] When a vehicle has a parking need, the user can visually judge whether there is an available parking space in the parking lot where the vehicle is located, and when an available parking space is determined, drive the vehicle to park in the available parking space.
[0003] However, when a parking space is blocked by a moving object or a stationary object, the user may not be able to identify whether the parking space is an available parking space due to visual reasons, thus affecting the accuracy of available parking space recognition and reducing the user's parking experience.
[0004] Therefore, how to improve the accuracy of available parking space recognition is an urgent problem to be solved currently. Summary of the Invention
[0005] This application provides a parking space recognition method, a parking space recognition device and a vehicle, and this method can improve the accuracy of available parking space recognition.
[0006] In a first aspect, this application provides a parking space recognition method, and this method includes:
[0007] Obtain an initial three-dimensional image of the parking lot where the vehicle is located; wherein, the initial three-dimensional image includes a first plane where the parking space is located and multiple side planes of the target object; the target object is used to represent the object blocking the parking space;
[0008] Based on the first plane and the multiple side planes, obtain a target three-dimensional image; wherein, the intersection line of two adjacent side planes among the multiple side planes in the target three-dimensional image is perpendicular to the first plane;
[0009] Based on the target three-dimensional image, identify the available parking spaces in the parking space;
[0010] Output the parking space information of the available parking spaces.
[0011] In an embodiment of the present application, when obtaining a three-dimensional image of the parking lot where the vehicle is located (i.e., the initial three-dimensional image), a three-dimensional image (i.e., the target three-dimensional image) in which the intersection line of two adjacent side planes among the multiple side planes is perpendicular to the first plane can be obtained through the first plane where the parking space is located and the multiple side planes of the target object in the initial three-dimensional image, and the available parking spaces in the parking space can be identified through the target three-dimensional image, and finally the parking space information of the determined available parking spaces is output. Compared with the prior art, if the parking space is blocked and it is impossible to determine whether the blocked parking space is an available parking space, this solution can, when the parking space is blocked by the target object, obtain a target three-dimensional image for identifying available parking spaces through the first plane where the parking space is located and the multiple side planes of the target object in the initial three-dimensional image of the parking lot where the vehicle is located, so as to identify the available parking spaces in the parking space through the target three-dimensional image, solving the problem that it is impossible to determine whether the blocked parking space is an available parking space when the parking space is blocked, thereby improving the accuracy of identifying available parking spaces.
[0012] In combination with the first aspect, in some implementation manners of the first aspect, the method further includes:
[0013] Obtain a projection plane; and determine the perspective direction corresponding to the projection plane;
[0014] The above-mentioned obtaining the target three-dimensional image based on the first plane and the multiple side planes includes:
[0015] Project the first plane and each side plane among the multiple side planes onto the projection plane respectively to obtain a first three-dimensional image;
[0016] Rotate the first three-dimensional image based on the perspective direction to obtain the target three-dimensional image.
[0017] In an embodiment of the present application, projecting the planes in the initial three-dimensional image onto the same plane and appropriately rotating the projected three-dimensional image can make the finally obtained three-dimensional image (i.e., the target three-dimensional image) more convenient for judgment and calculation, reduce the analysis deviation of the target three-dimensional image, improve the accuracy of the analysis result of the target three-dimensional image, and thus further improve the accuracy of identifying available parking spaces.
[0018] In combination with the first aspect and the above implementation manners, in some implementation manners of the first aspect, the above-mentioned identifying the available parking spaces in the parking space based on the target three-dimensional image includes:
[0019] Determine the target graphic in the target three-dimensional image; where the target graphic is used to represent the graphic formed by the intersection lines of the first plane and each side plane;
[0020] If the target graphic includes target parking space information, identify the available parking spaces based on the target graphic and the perspective direction; and / or identify the available parking spaces based on the target object and the target graphic.
[0021] In the embodiments of the present application, when determining the figure formed by the intersection lines of the first plane and each side plane in the target three-dimensional image, the available parking spaces in the parking space can be identified through the perspective direction corresponding to the figure and the projection plane; and / or, the available parking spaces in the parking space can be identified through the figure and the target object, providing multiple ways to determine the available parking spaces, avoiding the situation of only being able to determine the available parking spaces through a single method, thereby improving the flexibility and diversity of available parking space identification; moreover, these multiple methods can also be combined with each other to determine the available parking spaces, further improving the accuracy of available parking space identification.
[0022] Combined with the first aspect and the above implementation manners, in some implementation manners of the first aspect, the number of the above target figures is at least one; identifying the available parking spaces based on the target figure and the perspective direction includes:
[0023] Determine the figure area of each target figure;
[0024] Determine the figure area of the target figure that non-linearly changes in the perspective direction;
[0025] Determine the parking space corresponding to the target figure as the available parking space.
[0026] In the embodiments of the present application, when determining the figure area of each target figure, the figure area that non-linearly changes (i.e., the target figure area) can be obtained based on the perspective principle, so as to determine the parking space corresponding to the target figure where the non-linearly changing figure area is located as the available parking space. Determining the available parking spaces in the parking space through the perspective principle can reduce the deviation of available parking space identification and further improve the accuracy of available parking space identification.
[0027] Combined with the first aspect and the above implementation manners, in some implementation manners of the first aspect, the above identifying the available parking spaces based on the target object and the target figure includes:
[0028] Determine the center point of the first side plane in the target object; wherein, the first side plane is used to represent the front side of the target object;
[0029] Determine the vertical line of the center point perpendicular to the first plane;
[0030] If the intersection point of the vertical line and the first plane is not within the target figure, determine the parking space corresponding to the target figure as the available parking space.
[0031] In the embodiment of the present application, when determining the center point of the front side of the target object, the vertical line between the center point and the first plane can be determined first. When the intersection point of the vertical line and the first plane is not within the target graphic, the parking space corresponding to the target graphic can be determined as an idle parking space. By first determining the vertical line between the center point of the front side of the target object and the first plane, and then determining whether the vertical point of intersection of the vertical line and the first plane is within the target graphic to determine whether the parking space corresponding to the target graphic is an idle parking space, the deviation in identifying idle parking spaces can be reduced, and the accuracy of identifying idle parking spaces can be further improved.
[0032] Combined with the first aspect and the above implementation, in some implementations of the first aspect, the number of the above idle parking spaces is at least one, and the method further includes:
[0033] Obtain the target information of each idle parking space; wherein, the target information represents information related to vehicle parking;
[0034] Based on the target information, obtain the scoring result of each idle parking space;
[0035] Determine the idle parking space corresponding to the highest scoring result among the scoring results of each idle parking space as the target idle parking space;
[0036] The above output of the parking space information of the idle parking space includes:
[0037] Output the parking space information of the target idle parking space.
[0038] In the embodiment of the present application, by determining the scoring result of each idle parking space through the information related to vehicle parking of each idle parking space and outputting the parking space information of the idle parking space corresponding to the highest scoring result, the parking space information of the most suitable parking idle parking space can be directly output, without the need to select a parking space among multiple idle parking spaces, thereby simplifying the operation of selecting an idle parking space. When the user receives the optimal idle parking space (i.e., the target idle parking space), the vehicle can be directly controlled to park in the optimal idle parking space, improving the parking efficiency and convenience of the vehicle, and further improving the user's parking experience.
[0039] Combined with the first aspect and the above implementation, in some implementations of the first aspect, the method further includes:
[0040] Obtain the actual position of the target idle parking space and the current position of the vehicle;
[0041] Based on the actual position and the current position, determine the driving path of the vehicle;
[0042] The output of the parking space information of the target idle parking space includes:
[0043] Output the parking space information of the target idle parking space and the driving path.
[0044] In the embodiment of the present application, when a target idle parking space is determined, in order to guide the driving route of the vehicle and enable the vehicle to park in the target idle parking space as soon as possible, a driving route for the vehicle to drive to the target idle parking space can be generated based on the actual position of the target idle parking space and the current position of the vehicle. At the same time, the parking space information of the target idle parking space and the driving route for the vehicle to drive to the target idle parking space are output, so that the user can park the vehicle in the target idle parking space according to the driving route, thereby improving the parking efficiency and convenience of the vehicle, and further improving the user's parking experience.
[0045] Combined with the first aspect and the above implementation manners, in some implementation manners of the first aspect, the obtaining of the initial three-dimensional image of the parking lot where the vehicle is located includes:
[0046] If it is detected that the vehicle is in the parking lot, obtain the captured image collected by the vehicle;
[0047] Construct a three-dimensional image corresponding to the captured image to obtain the initial three-dimensional image.
[0048] In the embodiment of the present application, when it is detected that the vehicle is in the parking lot, it means that the vehicle has a parking demand at this time. In order to accurately determine the idle parking space, the captured image collected by the vehicle can be converted into a corresponding three-dimensional image to facilitate more accurate data analysis, thereby improving the accuracy of the determined idle parking space.
[0049] Among them, the captured image can be a picture directly captured by a camera, or a picture intercepted from the relevant captured video captured by the camera. The embodiment of the present application does not limit this.
[0050] In a second aspect, the present application provides a parking space recognition device, which includes:
[0051] An obtaining module, configured to obtain an initial three-dimensional image of the parking lot where the vehicle is located; wherein, the initial three-dimensional image includes a first plane where the parking space is located and multiple side planes of the target object; the target object is used to represent an object that blocks the parking space;
[0052] A processing module, configured to obtain a target three-dimensional image based on the first plane and the multiple side planes; wherein, the intersection line of two adjacent side planes among the multiple side planes in the target three-dimensional image is perpendicular to the first plane;
[0053] An identification module, configured to identify the idle parking spaces in the parking space based on the target three-dimensional image;
[0054] An output module, configured to output the parking space information of the idle parking space.
[0055] In a third aspect, the present application provides a vehicle, including a memory and a processor. The memory is used to store executable program code, and the processor is used to call and run the executable program code from the memory, so that the vehicle executes the method in the first aspect or any possible implementation manner of the first aspect described above.
[0056] In a fourth aspect, the present application provides a computer program product, including: computer program code, when the computer program code runs on a computer, enabling the computer to execute the method in the first aspect or any possible implementation manner of the first aspect described above.
[0057] In a fifth aspect, the present application provides a computer-readable storage medium storing computer program code, when the computer program code runs on a computer, enabling the computer to execute the method in the first aspect or any possible implementation manner of the first aspect described above. Description of the Drawings
[0058] Figure 1 It is a schematic diagram of the scenario of vehicle parking in the related art.
[0059] Figure 2 It is a schematic flowchart of the parking space recognition method provided by an embodiment of the present application.
[0060] Figure 3 It is a schematic diagram of the vehicle camera provided by an embodiment of the present application.
[0061] Figure 4 It is a schematic diagram of the vehicle parking lot provided by an embodiment of the present application.
[0062] Figure 5 It is a schematic diagram of a vehicle parking lot provided by an embodiment of the present application.
[0063] Figure 6 It is a schematic diagram of another vehicle parking lot provided by an embodiment of the present application.
[0064] Figure 7 It is a schematic diagram of plane processing provided by an embodiment of the present application.
[0065] Figure 8 It is a schematic diagram of a plane processing provided by an embodiment of the present application.
[0066] Figure 9 It is a schematic diagram of feature dimension processing provided by an embodiment of the present application.
[0067] Figure 10 It is a schematic diagram of another plane processing provided by an embodiment of the present application.
[0068] Figure 11It is a schematic diagram of parking space processing provided by an embodiment of the present application.
[0069] Figure 12 It is a schematic diagram of a display interface provided by an embodiment of the present application.
[0070] Figure 13 It is a schematic flowchart of a parking space recognition method provided by an embodiment of the present application.
[0071] Figure 14 It is another schematic flowchart of a parking space recognition method provided by an embodiment of the present application.
[0072] Figure 15 It is a schematic structural diagram of a parking space recognition device provided by an embodiment of the present application.
[0073] Figure 16 It is a schematic structural diagram of a vehicle provided by an embodiment of the present application. Detailed implementation manners
[0074] Next, the technical solutions in the present application will be clearly and elaborately described in conjunction with the accompanying drawings. Among them, in the description of the embodiments of the present application, unless otherwise specified, " / " means "or". For example, A / B may represent A or B. The "and / or" in the text is only a description of the association relationship of the associated objects, indicating that there can be three relationships. For example, A and / or B may represent: A exists alone, A and B exist simultaneously, and B exists alone. In addition, in the description of the embodiments of the present application, "a plurality of" means two or more than two.
[0075] Hereinafter, the terms "first" and "second" are only used for descriptive purposes and cannot be construed as indicating or implying relative importance or implicitly indicating the quantity of the indicated technical features. Thus, the features defined with "first" and "second" may explicitly or implicitly include one or more of such features.
[0076] Figure 1 It is a schematic diagram of a vehicle parking scenario in the related art.
[0077] Exemplarily, as Figure 1 shown, the parking lot 100 includes a vehicle 101, a plurality of parking spaces 102, and an occlusion object 103. Among them, some of the plurality of parking spaces 102 are occupied parking spaces, and the other part are vacant parking spaces; the occlusion object 103 may include a moving object or a stationary object.
[0078] Exemplarily, when the user drives the vehicle 101 into the parking lot 100 to park, the user can actively observe with the naked eye whether there are vacant parking spaces in the parking lot 100, and when finding a vacant parking space, drive the vehicle 101 to the vacant parking space to park.
[0079] However, when a parking space is blocked by an object 103, the user may not be able to detect the empty parking space due to visual reasons, resulting in an incorrect judgment, which may lead to the failure of the vehicle 101 to park and reduce the user's parking experience.
[0080] As Figure 1 shown, parking space 1021 and parking space 1022 are two adjacent parking spaces. There is an object 103 (i.e., vehicle 1031) parked on parking space 1021, and parking space 1021 is closer to the user than parking space 1022. Due to the presence of vehicle 1031, it affects the user's vision, and the user may regard parking space 1021 and parking space 1022 as one parking space and fail to notice that there is also a parking space 1022 on the adjacent side of parking space 1021, thus missing parking space 1022.
[0081] Therefore, in order to solve the problem of difficult determination of idle parking spaces, the present application proposes a parking space recognition method, a parking space recognition device, and a vehicle.
[0082] Next, in combination with Figures 2 to 14 the parking space recognition method provided by the embodiments of the present application will be described in detail.
[0083] Figure 2 is a schematic flow chart of the parking space recognition method provided by the embodiments of the present application. This method can be executed by Figure 1 the vehicle 101 in
[0084] Exemplarily, as Figure 2 shown, this method 200 includes the following implementation processes:
[0085] S201, collect an image of the parking lot.
[0086] Exemplarily, when the vehicle travels to the parking lot, it indicates that the vehicle has a parking requirement. Therefore, in order to determine an idle parking space where the vehicle can park, a real-time image of the current surrounding environment of the vehicle (which can be called the "original image") can be collected; and the collected original image is transmitted to the image processing module in the vehicle.
[0087] As Figure 3As shown in the figure, a camera 104 is installed on the roof of the vehicle 101. The camera 104 is a camera that aggregates four directions and is a four-way integrated and high-definition planar lens camera. For example, it is a 360° panoramic camera. Among them, aggregating four directions means that the camera 104 can simultaneously collect images (which can be called "field of view information") in four different directions, thereby helping to better find available parking spaces in a complex garage environment. For example, the four directions of up, down, left, and right, or the four directions of front, back, left, and right. Four-way integration means a camera system that integrates the shooting capabilities of four directions into one. "Four-way" means that the camera can simultaneously cover four different directions or angles, and "integration" means that these functions are integrated in one device, rather than being composed of multiple independent cameras. High-definition planar lens means that the resolution of the camera 104 is very high and can provide clear and delicate image quality; for example, it supports a resolution of 4K or even higher. Also, in order for the imaging of the camera 104 to be closer to the true proportion and not produce obvious distortion, the imaging of the camera 104 can be selected as a planar lens instead of a curved lens (such as a fish-eye lens).
[0088] Optionally, the height of the camera 104 can be automatically adjusted to obtain a better viewing field of view.
[0089] Optionally, a supplementary lighting device 1041 (which can be called a "light compensator") can also be installed in the camera 104. Among them, the supplementary lighting device 1041 can automatically adjust the brightness through its own configured brightness sensor, and the user can also manually adjust it. For example, when the brightness in the parking lot is too dark, the brightness of the supplementary lighting device 1041 can be adjusted to brighten it, so as to perform supplementary lighting through the supplementary lighting device 1041, thereby improving the clarity of the images captured by the camera 104.
[0090] Exemplarily, when the vehicle 101 travels to the parking lot, the camera 104 can collect images in the four directions of the front, back, left, and right of the vehicle body frame by frame during the vehicle 104's travel, and use the images collected in the four directions of the front, back, left, and right as the original images, and transmit the collected original images to the image processing module in the vehicle.
[0091] S202, identify visually polygonal available parking spaces in the parking lot through images.
[0092] Among them, the polygon can represent an irregular polygon or a regular polygon. For example, the regular polygon is a rectangle or a square.
[0093] Exemplarily, when the acquired original images are obtained, first grayscale the original images, convert the original images from color images to grayscale images, so as to simplify the processing process and improve the operation speed when performing image recognition. For example, Figure 4In (a) thereof, a grayscale image (i.e., the preprocessed image) is obtained.
[0094] Optionally, in order to enhance the accuracy of the recognition of the original image, one or more preprocessings such as denoising, contrast enhancement, grayscale conversion, binarization, and illumination correction can be performed on the original image, and the effect is as Figure 4 In (b) thereof, a preprocessed image is obtained.
[0095] When the preprocessed image (taking (a) in Figure 4 as an example) is obtained, the preprocessed image can be classified, keyword-tagged, and each object element can be converted into a keyword through computer vision image processing technology. Among them, image classification means classifying each object in the preprocessed image according to categories, for example, vehicles, walls, etc. Keyword tagging means extracting descriptive words (i.e., keywords) about each object from the preprocessed image, such as name, category, color, size, texture, etc.
[0096] When the keyword is determined, the object corresponding to the keyword can be detected, the object corresponding to the keyword in the preprocessed image can be recognized, and the object corresponding to the keyword can be marked with a bounding box, so as to obtain a marked image. As Figure 5 shown in (a) thereof, the vehicle is marked with a bounding box 301, the ground is marked with a bounding box 302, and the wall is marked with a bounding box 303.
[0097] When the marked image is obtained, contour extraction can be performed on the bounding box marking to obtain a contour map corresponding to the bounding box marked object (as Figure 5 shown in (b) thereof). The Contour Proposal Network (CPN) is used to detect the possibly overlapping objects in the contour map. When overlapping objects are detected, pixel-precise closed object contours can be fitted, and then the Hough transform in Python OpenCV can be used to detect and measure irregular shapes formed by different planes and perform edge calculation to extract the lines and features in the picture, and polygon boundary annotation can be performed. When the annotated contour map is overlapped with the preprocessed image to obtain an overlapped image, the effect is as Figure 5 shown in (c) thereof, so as to perform a segmentation mask on the overlapped image, thereby batch-extracting one or more parking space areas (such as Figure 6 the shaded area 304 shown in the figure).
[0098] Among them, the overlapping object can represent the overlapping part between an object and the object that occludes itself.
[0099] Exemplarily, in order to better perform border extraction and closed fitting of a part of the ground visually presented as a polygon, asFigure 7 As shown in (a) in , a plane B of the ground where the vehicle is located, a plane C of the vehicle's front, and a plane D of the vehicle's door can be constructed.
[0100] If plane C and plane D intersect, the overlapping parts in plane C and plane D can be removed; and after removing the duplicates, the intersecting line segments between plane B, plane C, and plane D are extracted for border and closed fitting. And the fitted plane is projected onto the virtual plane A as shown in Figure 7 (b) in . The projected plane is corrected by rotating it at an appropriate angle with the virtual plane A as the main perspective direction, so that a three-dimensional image located in the virtual plane A and with the virtual plane A as the main perspective can be obtained (as shown in Figure 7 (b) in ), and the parking space contour corresponding to the three-dimensional image is determined, that is, Figure 7 the polygon E shown in (b) in . Among them, when three-dimensional images as shown in Figure 7 (b) in are established for multiple objects, three-dimensional images as shown in Figure 8 can be obtained.
[0101] Furthermore, when obtaining the polygon, the polygon can be input into the convolutional neural network (Backbone CNN) in the image processing model to obtain the feature information of the polygon. The feature information may include, but is not limited to, one or more of the shape information, contour information, ground texture information, and color information of the polygon. And when the degree of coincidence between the feature information of the polygon and the detailed features of the parking space is relatively high, the probability value that the polygon is a parking space can be determined to be relatively high, for example, 85%. And when the degree of coincidence between the feature information of the polygon and the feature information of the parking space is relatively low, the probability value that the polygon is a parking space can be determined to be relatively low, for example, 10% or 0%.
[0102] The feature information of the polygon obtained by the CNN and the probability value that the polygon is a parking space are input into the activation function layer in the image processing model, and the rectified linear unit (ReLU) is used to determine whether there are detailed features of the parking space in the feature information of the polygon. And the detailed features belonging to the parking space in the feature information of the polygon are sent to the pooling layer in the image processing model. The pooling layer can use the maximum pooling method to reduce the dimension of the feature information of the polygon.
[0103] Exemplarily, as shown in Figure 9 when processing the dimension of the feature information of the polygon through the pooling layer, a window with a size of n×n can be set up (as shown in Figure 9The 2×2 window 1) shown, which represents a window that has not been pooled yet. The maximum value of each feature in window 1 is selected through max pooling (e.g., 5, 4, 4, 6), and the selected maximum value is placed into a window smaller than n×n size (such as Figure 9 The 1×1 window 2) shown, which represents the window after pooling is completed and retains important features; thereby reducing the dimension of the feature information of the polygon by 2 times, reducing the feature size of the polygon, and reducing the processing difficulty of the characteristic information of the polygon, making the characteristic information of the polygon easier to process.
[0104] The characteristic information of the polygon obtained after being processed by the pooling layer (i.e., window 2) is input into the fully connected layer in the image processing model for integration. All feature maps are flattened to form a one-dimensional list. And specific weights are assigned to this shift. By calculating the product of these weights and the features in window 2, an accurate likelihood assessment result is finally generated, that is, to determine whether the polygon is part of a parking space. Table 1 is used to illustrate the one-dimensional list exemplarily:
[0105] Table 1
[0106]
[0107] Table 1 exemplifies the detailed parking space features required when determining whether a polygon is part of a parking space, such as the head and tail of the fitted line segments being connected, the number of sides must be greater than or equal to 3, at least two parallel line segments, the line segment projections being in the same plane, the entity annotation needs to be the ground (i.e., there is a plane B), and at least two parking space lines. And, the weights corresponding to each parking space detailed feature, for example, the weight corresponding to the head and tail of the fitted line segments being connected is 0.8, the weight corresponding to the number of sides must be greater than or equal to 3 is 0.4, the weight corresponding to at least two parallel line segments is 0.8, the weight corresponding to the line segment projections being in the same plane is 0.5, the weight corresponding to the entity annotation needing to be the ground is 0.6, and the weight corresponding to at least two parking space lines is 0.2.
[0108] Exemplarily, when the polygon satisfies one or more of the parking space detailed features shown in Table 1, the weights corresponding to the one or more parking space detailed features can be multiplied by the corresponding features in window 2 to obtain a weighted value. The larger the weighted value, the greater the likelihood that the polygon is a parking space. For example, the head and tail of the fitted line segments of the polygon are connected and the polygon has at least two parking space lines. And the feature of the head and tail of the fitted line segments of the polygon in window 2 is A, and the feature of the polygon having at least two parking space lines in window 2 is B. The weighted value = 0.8×A + 0.2×B.
[0109] Further, when it is determined that the polygon is part of a parking space, it can be continued to determine whether the parking space corresponding to the polygon is an empty parking space.
[0110] Judgment method 1:
[0111] As Figure 10 shown, in order to determine whether the parking space corresponding to the determined polygon is an available parking space, the center point of the plane C where the vehicle head is located (such as the point E in Figure 10 ) can be determined by the superposition of the perspective principle and the geometric principle, and a vertical line segment EF perpendicular to the plane B is made based on this point E to obtain the vertical point F where the vertical line segment EF intersects the plane B.
[0112] Furthermore, it is judged whether the vertical point F falls within the polygon. When the vertical point F falls within the polygon, it indicates that the parking space corresponding to the polygon has been occupied and parking cannot be carried out. When the vertical point F does not fall within the polygon, it indicates that the parking space corresponding to the polygon is not occupied, and the parking space corresponding to the polygon is an available parking space and parking can be carried out.
[0113] Judgment method 2:
[0114] As Figure 10 shown, when the polygon is determined, it can be determined whether the parking space corresponding to the polygon is an available parking space through the basic perspective principle of objects getting smaller as they are farther away. For the area of the polygon, the farther the polygon is from the viewing point, the smaller the polygon area appears, and it should show a linear decreasing law. Therefore, when the polygon area shows a non-linear change, for example, the area of a polygon far from the viewing point suddenly increases (for example, the polygon area G), it indicates that the parking space corresponding to the polygon is not occupied, and the parking space corresponding to the polygon is an available parking space and parking can be carried out. When the polygon area always shows a linear change, it indicates that the parking space corresponding to the polygon has been occupied and parking cannot be carried out.
[0115] Judgment method 3:
[0116] Exemplarily, when the polygon is determined, the projection ratio of the object in the overlapping image within the polygon can be obtained. The larger the projection ratio, the greater the possibility that the parking space corresponding to the polygon is occupied and parking cannot be carried out. The smaller the projection ratio, the smaller the possibility that the parking space corresponding to the polygon is occupied and parking can be carried out.
[0117] It should be noted that when determining whether the parking space corresponding to the polygon is an available parking space through Judgment method 1, Judgment method 2, and / or Judgment method 3, it is not limited to only one of Judgment method 1, Judgment method 2, and Judgment method 3.
[0118] Optionally, when it is determined that the parking space corresponding to the polygon is an available parking space, the contour line corresponding to the polygon in the preprocessed graph can be processed for clarity and roundness, and a new layer corresponding to the polygon can be created and color-filled, so as to enhance the user's perception of the real time and make the available parking space corresponding to the polygon easier to identify. For example, as Figure 11 shown in the filled area H.
[0119] S203. Determine the optimal available parking space among the identified available parking spaces and mark the optimal available parking space.
[0120] Exemplarily, when it is determined that the parking space corresponding to the polygon is an available parking space and there are multiple available parking spaces, the optimal available parking space can be selected from the multiple available parking spaces based on the information related to vehicle parking, and a marking information (such as Figure 11 the marking flag I shown) can be set on the selected optimal available parking space.
[0121] Optionally, when there is only one available parking space in the parking spaces corresponding to the polygon, the single available parking space can be directly determined as the optimal available parking space.
[0122] Among them, the information related to vehicle parking can include, but is not limited to, one or more of the actual area of the polygon, the orientation of the polygon relative to the vehicle head, the distance between the polygon and the vehicle, the surrounding environment of the parking space corresponding to the polygon, and the minimum turning radius of the vehicle. In addition, the surrounding environment of the parking space corresponding to the polygon can include, but is not limited to, one or more of the volume size of the vehicles in the adjacent parking spaces corresponding to the polygon, whether the vehicles in the adjacent parking spaces are parked in a standard manner, the walls (such as columns) around the parking space corresponding to the polygon, the placement of sundries around the parking space corresponding to the polygon, and the positions of people around the parking space corresponding to the polygon.
[0123] Exemplarily, each piece of information related to the vehicle has its own corresponding weight. The information related to the vehicle corresponding to each available parking space is weighted with its corresponding weight, and finally the parking score result corresponding to each available parking space is obtained. The larger the parking score result, the better the parking convenience of the available parking space, and it is easier to park the vehicle into the available parking space; for example, the larger the actual area of the polygon, the shorter the shortest straight-line distance between the parking space corresponding to the polygon and the vehicle, and the fewer sundries around the parking space corresponding to the polygon. Among them, the shortest straight-line distance can represent the distance between the vehicle head and the center point of the parking space corresponding to the polygon.
[0124] For example, the weight corresponding to the actual area of the polygon is 0.5; the weight corresponding to the orientation of the polygon relative to the vehicle head is 0.2; the weight corresponding to the surrounding environment of the parking space corresponding to the polygon is 0.2; the weight corresponding to the shortest straight-line distance between the parking space corresponding to the polygon and the vehicle is 0.1.
[0125] When obtaining the parking score results corresponding to each available parking space, multiple parking score results can be sorted to obtain the highest score result among the multiple parking score results, and the available parking space corresponding to the highest score result can be determined as the optimal available parking space.
[0126] The actual area of the polygon can be measured by target selection in Python image segmentation, and the calculation method is shown by formula (1):
[0127]
[0128] Among them, S 实际面积 represents the actual area of the polygon. S 像素个数 represents the number of pixels corresponding to the polygon in the preprocessed image. represents the actual length represented by each pixel in the preprocessed image, usually called the scale factor or resolution.
[0129] The method for determining the orientation of the polygon relative to the vehicle head: Based on the forward direction of the vehicle, the absolute position coordinates of the vehicle are marked and calculated in the front, back, left, and right directions, so as to obtain the orientation of the polygon relative to the vehicle head.
[0130] Whether the surrounding environment of the parking space corresponding to the polygon is suitable for parking can be illustrated by the scoring method in Table 2.
[0131] Table 2
[0132]
[0133] Among them, Table 2 shows the scoring results of whether the surrounding environment of the parking space corresponding to the polygon is suitable for parking. The surrounding environment of the parking space corresponding to the polygon can be exemplified by the parking situation of adjacent vehicles to the parking space corresponding to the polygon (i.e., the volume size of the vehicles in adjacent parking spaces and whether the vehicles in adjacent parking spaces are parked regularly), the walls around the parking space corresponding to the polygon, and the positions of the personnel around the parking space corresponding to the polygon. When the parking situation of adjacent vehicles, the surrounding walls, and the positions of the personnel around the parking space corresponding to the polygon are very suitable for parking, the corresponding scoring range is [0.9, 1.0]. When the parking situation of adjacent vehicles, the surrounding walls, and the positions of the personnel around the parking space corresponding to the polygon are relatively suitable for parking, the corresponding scoring range is [0.8, 0.9). When the parking situation of adjacent vehicles, the surrounding walls, and the positions of the personnel around the parking space corresponding to the polygon are generally suitable for parking, the corresponding scoring range is [0.7, 0.8). When the parking situation of adjacent vehicles, the surrounding walls, and the positions of the personnel around the parking space corresponding to the polygon are not very suitable for parking, the corresponding scoring range is [0.6, 0.7). When the parking situation of adjacent vehicles, the surrounding walls, and the positions of the personnel around the parking space corresponding to the polygon are not suitable for parking, the corresponding scoring range is [0.0, 0.6). It can be understood that the more suitable the parking situation of adjacent vehicles, the surrounding walls, and the positions of the personnel around the parking space corresponding to the polygon are for parking and the better the parking environment is, the higher the corresponding score is; while the more unsuitable the parking situation of adjacent vehicles, the surrounding walls, and the positions of the personnel around the parking space corresponding to the polygon are for parking and the worse the parking environment is, the lower the corresponding score is.
[0134] S204. Plan the driving route of the vehicle to the optimal idle parking space.
[0135] Exemplarily, when determining the optimal idle parking space among multiple idle parking spaces, the driving route of the vehicle from the current position to the optimal idle parking space can be planned.
[0136] Optionally, when planning the driving route of the vehicle to the optimal idle parking space, the driving route of the vehicle can be planned through one or more of the shortest route distance of the vehicle driving to the optimal idle parking space, the lane line where the vehicle advancing direction is located, the lane markings, etc., and a navigation route for the vehicle to drive to the optimal idle parking space is generated to guide the user, so that the user can drive the vehicle to the optimal idle parking space according to the guidance to park the vehicle in the optimal idle parking space. Or, when generating the navigation route for the vehicle to drive to the optimal idle parking space, the automatic parking function of the vehicle can be activated, so that the vehicle automatically drives according to the navigation route and automatically drives the vehicle to the optimal idle parking space to automatically park the vehicle in the optimal idle parking space.
[0137] Among them, the navigation route can be displayed through the corresponding identifier (such as Figure 11 the marked route J shown).
[0138] For example, on a two-lane road, there is a solid line between the two lanes, and the optimal vacant parking space is to the left of the left lane line, but the vehicle is currently in the right lane. If the lane marking indicates going straight or turning right, the shortest route distance cannot be calculated by crossing the lane line and driving in the opposite direction.
[0139] S205, displaying the optimal free parking space and the corresponding driving route on the screen.
[0140] For example, when no vacant parking space is determined, a display screen (eg, a central control screen) in the vehicle may display the following information: Figure 12 In the display interface shown in (a), the text "Identifying an empty parking space, please keep the vehicle at a low speed" is displayed in the interface. At the same time, the voice corresponding to the text displayed in the interface can be obtained through text-to-speech (TTS) for voice broadcasting.
[0141] For example, when the vacant parking spaces and the optimal vacant parking spaces are determined, the following information may be displayed on the display screen: Figure 12 The display interface shown in (b) in the figure displays the optimal vacant parking space and the driving path corresponding to the optimal vacant parking space.
[0142] 206 , displaying the vacant parking spaces other than the optimal vacant parking space on the screen.
[0143] For example, when there are other vacant parking spaces besides the optimal vacant parking space, for example, Figure 12 The free parking spaces 1, 2 and 3 in the interface shown in (b) of FIG. 1 can also be displayed together with the best free parking space. The other free parking spaces are automatically sorted from left to right or from top to bottom according to the parking score results. In addition, in order to highlight the best free parking space, a larger area of the display interface of the display screen can be used to display the best free parking space. Alternatively, the best free parking space can also be displayed in the central area or any area of the display interface of the display screen.
[0144] Exemplarily, when an empty parking space is determined, a prompt sound (eg, a beeping sound) may be output and the search for an empty parking space may be announced through TTS.
[0145] Optionally, the user can select any vacant parking space displayed on the display screen for full-screen viewing according to personal wishes. Figure 12 As shown in (b) in FIG. 1 , when the user clicks to view the optimal free parking space, the optimal free parking space and the corresponding driving path can be displayed in full screen on the display screen (such as Figure 12 (c) in Figure 2). Or, Figure 12As shown in (b) thereof, when the user clicks to view the vacant parking space 3, the vacant parking space 3 and the corresponding driving path can be fully displayed on the display screen (as shown in Figure 12 (d) thereof).
[0146] Among them, the ways for the user to select any vacant parking space on the display screen for full-screen viewing may include, but are not limited to, clicking, touching the left and right fingers on the touch screen, multiple fingers and multiple touch points, and hovering gestures. Also, when in full-screen display, the same way can be used to return to the initial display interface (as shown in Figure 12 (b) thereof).
[0147] Figure 13 is a schematic flowchart of a parking space recognition method provided by an embodiment of the present application. This method can be executed by the Figure 1 vehicle 101 in
[0148] Exemplarily, as shown in Figure 13 , this method 1300 includes the following implementation processes:
[0149] S310, obtain an initial three-dimensional image of the parking lot where the vehicle is located.
[0150] Among them, the initial three-dimensional image includes a first plane where the parking space is located and multiple side planes of the target object; the target object is used to represent an object that blocks the parking space.
[0151] Exemplarily, when it is detected that the vehicle is located in the parking lot, in order to determine the vacant parking spaces available for parking, a three-dimensional image (i.e., the initial three-dimensional image) around the vehicle in the parking lot can be obtained; the three-dimensional image can also be referred to as a "three-dimensional stereogram".
[0152] Exemplarily, when the vehicle drives into the parking lot, it indicates that the vehicle has a parking demand. Therefore, in order to determine the vacant parking spaces available for parking, real-time images (which can be called "captured images") around the vehicle can be captured by a camera on the vehicle (i.e., the above-mentioned camera 104) or a user terminal. For example, Figure 4 the original image shown in (a) of
[0153] When the captured image is obtained, a corresponding three-dimensional image can be constructed based on the captured image, and the constructed three-dimensional image is determined as the "initial three-dimensional image"; as shown in Figure 7 (a) of
[0154] Among them, the initial three-dimensional image includes a first plane where the parking space is located (i.e., the above-mentioned plane B) and multiple side planes of the target object (i.e., the above-mentioned plane C and the above-mentioned plane D); the target object can represent an object that can block a partial area of the parking space.
[0155] In the embodiment of the present application, when it is detected that the vehicle is in a parking lot, it indicates that the vehicle has a parking demand at this time. In order to accurately determine the available parking spaces, the captured image collected by the vehicle can be converted into a corresponding three-dimensional image, so as to facilitate more accurate data analysis, thereby improving the accuracy of the determined available parking spaces.
[0156] S320. Obtain a target three-dimensional image based on the first plane and multiple side planes.
[0157] Wherein, the intersection line of two adjacent side planes among the multiple side planes in the target three-dimensional image is perpendicular to the first plane.
[0158] Exemplarily, when obtaining the initial three-dimensional image, a projection plane for projecting the initial three-dimensional image (i.e., the above-mentioned virtual plane A) can be obtained; and when the projection plane is obtained, the perspective direction corresponding to the projection plane is determined. The perspective direction corresponding to the projection plane can represent the above-mentioned main perspective direction, or can represent the side perspective direction, the rear perspective direction, etc., and the embodiments of the present application do not limit this. Figure 7 Specifically, when obtaining the initial three-dimensional image, a projection plane for projecting the initial three-dimensional image (i.e., the above-mentioned virtual plane A) can be obtained; and when the projection plane is obtained, the perspective direction corresponding to the projection plane is determined. The perspective direction corresponding to the projection plane can represent the above-mentioned main perspective direction, or can represent the side perspective direction, the rear perspective direction, etc., and the embodiments of the present application do not limit this.
[0159] Optionally, when obtaining the initial three-dimensional image, the projection plane for projecting the initial three-dimensional image (i.e., the above-mentioned virtual plane A) can be obtained first; and when the projection plane is obtained, the perspective direction corresponding to the projection plane is determined. The perspective direction corresponding to the projection plane can represent the above-mentioned main perspective direction, or can represent the side perspective direction, the rear perspective direction, etc., and the embodiments of the present application do not limit this.
[0160] Further, when the projection plane is obtained, the first plane and multiple side planes in the initial three-dimensional image can be respectively projected onto the projection plane to obtain a projected three-dimensional image (which can be called the "first three-dimensional image"). And when the first three-dimensional image is obtained, the first three-dimensional image can be rotated and corrected at an appropriate angle according to the perspective direction corresponding to the projection plane, so as to obtain a target three-dimensional image that is in the projection plane and uses the perspective direction corresponding to the projection plane as the main perspective.
[0161] In the embodiment of the present application, projecting the planes in the initial three-dimensional image onto the same plane and adaptively rotating the projected three-dimensional image can make the finally obtained three-dimensional image (i.e., the target three-dimensional image) more convenient for judgment and calculation, reduce the analysis deviation of the target three-dimensional image, improve the accuracy of the analysis result of the target three-dimensional image, and thus further improve the accuracy of identifying available parking spaces.
[0162] S330. Identify the available parking spaces in the parking spaces based on the target three-dimensional image.
[0163] Exemplarily, when obtaining the above-mentioned target three-dimensional image, the available parking spaces in the parking spaces in the captured image can be identified based on the target three-dimensional image.
[0164] Optionally, when obtaining the above-mentioned target three-dimensional image, a figure formed by the intersection lines of the first plane and each side plane (which can be referred to as the "target figure") can be determined. When determining this target figure (i.e., the above-mentioned polygon), it can be first determined whether the target figure represents a figure of a parking space.
[0165] When the target figure represents a figure of a parking space, the available parking spaces in the parking space can be identified through the perspective direction corresponding to the projection plane of the target figure (i.e., the above-mentioned determination method two). And / or, when the target figure represents a figure of a parking space, the available parking spaces in the parking space can be identified through the target object and the target figure (i.e., the above-mentioned determination method one).
[0166] When the target figure does not represent a figure of a parking space, it indicates that the available parking spaces in the parking space cannot be determined through this target figure.
[0167] In the embodiments of the present application, when determining the figure formed by the intersection lines of the first plane and each side plane in the target three-dimensional image, the available parking spaces in the parking space can be identified through the perspective direction corresponding to the projection plane of the figure; and / or, the available parking spaces in the parking space can be identified through the figure and the target object, providing multiple ways to determine the available parking spaces, avoiding the situation of only being able to determine the available parking spaces through a single way, thereby improving the flexibility and diversity of the identification of available parking spaces; and, these multiple ways can also be combined with each other to determine the available parking spaces, further improving the accuracy of the identification of available parking spaces.
[0168] Optionally, when obtaining the target figure, the figure area of each figure in the target figure (i.e., the above-mentioned polygon area) can be determined.
[0169] Furthermore, when determining at least one figure area, it can be determined whether each figure area shows a linear change in the perspective direction corresponding to the projection plane (for example, the main perspective direction). When each figure area shows a linear change in the corresponding perspective direction, it indicates that the parking space corresponding to each figure has been occupied, and the parking space corresponding to each figure does not belong to an available parking space. When there is one or more figure areas (which can be referred to as "target figure areas") that show a non-linear change in the corresponding perspective direction, it indicates that the parking space corresponding to this target figure has not been occupied, and the parking space corresponding to this target figure can be determined as an available parking space.
[0170] In the embodiments of the present application, when determining the graphic area of each target graphic, the graphic area with non-linear variation (i.e., the target graphic area) can be obtained based on the perspective principle, so as to determine the parking space corresponding to the target graphic where the graphic area with non-linear variation is located as an available parking space. By determining the available parking spaces in the parking lot through the perspective principle, the deviation in the recognition of available parking spaces can be reduced, and the accuracy of recognizing available parking spaces can be further improved.
[0171] Optionally, when obtaining the target graphic, the center point of the front side surface (which can be called the "first side plane") of the target object can be determined first (for example, Figure 10 point E in ); and a vertical line segment perpendicular to the first plane is made based on this point E, such as Figure 10 the vertical line segment EF in. And the vertical point F where the vertical line segment EF intersects with the first plane is determined.
[0172] Furthermore, it is judged whether the vertical point is within the target graphic. When the vertical point is not within the target graphic, it indicates that the parking space corresponding to this vertical point is not occupied, and the parking space corresponding to this target graphic can be determined as an available parking space.
[0173] When the vertical point is within the target graphic, it indicates that the parking space corresponding to this vertical point is occupied, and the parking space corresponding to this target graphic does not belong to an available parking space.
[0174] In the embodiments of the present application, when determining the center point of the front side surface of the target object, the vertical line between the center point and the first plane can be determined first, and when the intersection point of this vertical line and the first plane is not within the target graphic, the parking space corresponding to this target graphic can be determined as an available parking space. First determine the vertical line between the center point of the front side surface of the target object and the first plane, and then judge whether the vertical point where the vertical line intersects with the first plane is within the target graphic to determine whether the parking space corresponding to the target graphic is an available parking space, which can reduce the deviation in the recognition of available parking spaces and further improve the accuracy of recognizing available parking spaces.
[0175] S340, output the parking space information of the available parking space.
[0176] Exemplarily, when determining the available parking spaces in the parking lot, the parking space information corresponding to the available parking space can be output. Among them, the number of available parking spaces is at least one.
[0177] Optionally, the way to output the parking space information of the available parking space can include but is not limited to one or more of voice, image, and text. For example, as shown in (b) in Figure 12 .
[0178] Optionally, when outputting the parking space information of the available parking space, the driving path for the vehicle to drive to the available parking space can also be determined, and this driving path and the corresponding available parking space are output simultaneously.
[0179] Among them, the parking space information of the vacant parking space can represent one or more of the position of the vacant parking space, the orientation of the parking space, the parking space number, the optimal parking space mark (such as the mark flag I shown Figure 11 ), the parking space border mark, etc.
[0180] In the method 1300 shown Figure 13 , when obtaining the three-dimensional image of the parking lot where the vehicle is located (i.e., the initial three-dimensional image), a three-dimensional image (i.e., the target three-dimensional image) in which the intersection line of two adjacent side planes in the multiple side planes is perpendicular to the first plane can be obtained through the first plane where the parking space is located and the multiple side planes of the target object in the initial three-dimensional image, and the vacant parking spaces in the parking space can be recognized through the target three-dimensional image, and finally the parking space information of the determined vacant parking space is output. Compared with the prior art, if the parking space is blocked and it is impossible to determine whether the blocked parking space is a vacant parking space, this solution can, when the parking space is blocked by the target object, obtain a target three-dimensional image for identifying the vacant parking space through the first plane where the parking space is located and the multiple side planes of the target object in the initial three-dimensional image of the parking lot where the vehicle is located, so as to identify the vacant parking spaces in the parking space through the target three-dimensional image, solve the problem that it is impossible to determine whether the blocked parking space is a vacant parking space when the parking space is blocked, and thus improve the accuracy of identifying the vacant parking space. And, the vacant parking space is displayed to the user, so that the user can park the vehicle at the vacant parking space according to the guidance, improving the user's parking experience.
[0181] Optionally, when determining at least one vacant parking space, information related to vehicle parking for each vacant parking space (which can be referred to as "target information") can be obtained. And through this target information, a scoring result corresponding to each vacant parking space (i.e., the above-mentioned parking scoring result) can be obtained. It should be understood that the parking scoring result is introduced in detail in S203 above and will not be elaborated here.
[0182] Further, when determining the scoring result corresponding to each vacant parking space, the multiple scoring results are sorted in descending or ascending order, and the highest scoring result among the scoring results of each vacant parking space is selected; and the vacant parking space corresponding to the highest scoring result is determined as the vacant parking space most suitable for vehicle parking (which can be referred to as the "target vacant parking space"), that is, the above-mentioned optimal vacant parking space.
[0183] Optionally, when there is only one vacant parking space, the one vacant parking space can be determined as the target vacant parking space.
[0184] When determining the target vacant parking space among multiple vacant parking spaces, the parking space information corresponding to the target vacant parking space can be output.
[0185] In the embodiments of the present application, the scoring results of each idle parking space are determined based on the information related to vehicle parking for each idle parking space, and the parking space information of the idle parking space corresponding to the highest scoring result is output, so that the parking space information of the most suitable idle parking space for parking can be directly output, without the need to select a parking space among multiple idle parking spaces. Thus, the operation of selecting an idle parking space is simplified, enabling the user to directly control the vehicle to park in the optimal idle parking space (i.e., the target idle parking space) when receiving it, improving the parking efficiency and convenience of the vehicle, and further enhancing the user's parking experience.
[0186] Optionally, when determining the target idle parking space among at least one idle parking space, the actual position of the target idle parking space in the parking lot and the current position of the vehicle in the parking lot can be obtained. Then, the driving route for the vehicle to travel to the target idle parking space is determined based on the actual position of the target idle parking space and the current position of the vehicle.
[0187] Exemplarily, when determining the driving route of the vehicle based on the actual position of the target idle parking space and the current position of the vehicle, the optimal route of the vehicle can also be jointly planned by combining one or more of the shortest route distance for the vehicle to travel to the optimal idle parking space, the lane line where the vehicle is moving forward, and the lane markings.
[0188] Furthermore, when generating the driving route for the vehicle to travel to the target idle parking space, the parking space information of the target idle parking space and the driving route for the vehicle to travel to the target idle parking space can be output simultaneously (as shown in (c) of Figure 12 ).
[0189] In the embodiments of the present application, when the target idle parking space is determined, in order to guide the driving route of the vehicle and enable the vehicle to park in the target idle parking space as soon as possible, the driving route for the vehicle to travel to the target idle parking space can be generated based on the actual position of the target idle parking space and the current position of the vehicle, and the parking space information of the target idle parking space and the driving route for the vehicle to travel to the target idle parking space are output simultaneously, allowing the user to park the vehicle in the target idle parking space according to this driving route, thereby improving the parking efficiency and convenience of the vehicle, and further enhancing the user's parking experience.
[0190] Figure 14 It is another flowchart of a parking space recognition method provided by the embodiments of the present application.
[0191] Exemplarily, as shown in Figure 14 , the method 1400 includes the following implementation processes:
[0192] S401, if it is detected that the vehicle is in the parking lot, obtain the captured image of the surrounding area of the vehicle collected by the vehicle.
[0193] Exemplarily, when it is detected that the vehicle is in a parking lot, it indicates that the vehicle has a parking demand at this time. In order to accurately determine the available parking spaces, the captured images around the vehicle collected by the vehicle can be obtained.
[0194] S402, construct a three-dimensional image corresponding to the captured image to obtain an initial three-dimensional image; and obtain the projection plane and the perspective direction corresponding to the projection plane.
[0195] Exemplarily, when the captured image collected by the vehicle is obtained, a corresponding three-dimensional image can be constructed based on the captured image to obtain an initial three-dimensional image. And, obtain the projection plane (i.e., the above-mentioned virtual plane A) and the perspective direction corresponding to the projection plane (for example, the main perspective direction).
[0196] S403, project the first plane including the parking space and the multiple side planes of the target object in the initial three-dimensional image onto the projection plane respectively, and rotate the projected three-dimensional image to obtain a target three-dimensional image.
[0197] Exemplarily, when the initial three-dimensional image is obtained, the first plane including the parking space and the multiple side planes of the target object in the initial three-dimensional image can be projected onto the projection plane respectively, and the projected three-dimensional image (i.e., the above-mentioned first three-dimensional image) is rotated in the main perspective direction to obtain a target three-dimensional image.
[0198] S404, determine the target figure formed by the intersection lines of the first plane and each side plane in the target three-dimensional image.
[0199] Exemplarily, when the target three-dimensional image is determined, the target figure formed by the intersection lines of the first plane and each side plane in the target three-dimensional image can be determined. Figure 7 The polygon E shown in (b) in.
[0200] S405, determine the figure area of each target figure, and determine the parking space corresponding to the figure with non-linear change in the perspective direction as the available parking space; and / or, determine the center point of the front side of the target object, draw a vertical line from the center point perpendicular to the first plane, if there is no intersection point of the vertical line and the first plane in the target figure, it indicates that the parking space corresponding to the target figure is an available parking space.
[0201] Exemplarily, when the target figure is obtained, the figure area of each figure in the target figure can be determined, and the figure area with non-linear change in the corresponding perspective direction (for example, the above-mentioned polygon area G) can be determined, and the parking space corresponding to the figure with non-linear change in the perspective direction is determined as the available parking space. And when the figure area of each figure shows a linear change in the corresponding perspective direction, it indicates that the parking space corresponding to each figure has been occupied, and the parking space corresponding to each figure does not belong to the available parking space. (That is, the above-mentioned judgment method two).
[0202] Exemplarily, when the target graph is obtained, the center point of the front side (i.e., the first side mentioned above) of the target object can be determined, and a perpendicular line perpendicular to the first plane is drawn from this midpoint, and the intersection point of the perpendicular line and the first plane is determined, and this intersection point is used as the perpendicular point (for example, the perpendicular point F mentioned above). When the perpendicular point F is not within the target graph, it indicates that the parking space corresponding to the perpendicular point F is not occupied, and the parking space corresponding to the target graph can be determined as an idle parking space. When the perpendicular point F is within the target graph, it indicates that the parking space corresponding to the perpendicular point F is occupied, and the parking space corresponding to the target graph does not belong to an idle parking space (i.e., the first judgment method mentioned above).
[0203] S406, determine whether the number of idle parking spaces is 1. If so, execute S407; if not, execute S408.
[0204] Exemplarily, when determining the number of idle parking spaces, it can be judged whether the number of idle parking spaces is 1.
[0205] S407, determine the 1 idle parking space as the optimal idle parking space.
[0206] Exemplarily, if it is obtained through S406 that the number of idle parking spaces is 1, then this 1 idle parking space can be determined as the optimal idle parking space.
[0207] S408, through the information related to vehicle parking for each idle parking space, obtain the parking score results for each idle parking space.
[0208] Exemplarily, if it is obtained through S406 that the number of idle parking spaces is multiple, the suitability of each idle parking space for parking can be scored through the information related to vehicle parking for each idle parking space, and the parking score results for each idle parking space are obtained.
[0209] S409, determine the idle parking space corresponding to the highest score result among the parking score results of each idle parking space as the optimal idle parking space.
[0210] Exemplarily, when obtaining the parking score results for each idle parking space, the highest score result among the parking score results of each idle parking space can be determined, and the idle parking space corresponding to this highest score result is determined as the optimal idle parking space.
[0211] S410, determine the driving path of the vehicle to the optimal idle parking space through the actual position of the optimal idle parking space and the current position of the vehicle.
[0212] Exemplarily, when determining the optimal idle parking space, the driving path of the vehicle to the optimal idle parking space can be determined through the actual position of the optimal idle parking space and the current position of the vehicle.
[0213] S411. Output the parking space information of the optimal available parking space and the driving route for the vehicle to reach the optimal available parking space.
[0214] Exemplarily, when obtaining the optimal available parking space and the driving route for the vehicle to reach the optimal available parking space, the parking space information of the optimal available parking space and the driving route for the vehicle to reach the optimal available parking space can be output.
[0215] S412. Output the parking space information of the other available parking spaces among the multiple available parking spaces except the optimal available parking space and the driving routes for the vehicle to reach each of the other available parking spaces respectively.
[0216] Exemplarily, when determining the optimal available parking space, the other available parking spaces among the multiple available parking spaces except the optimal available parking space can be determined, and the driving route for the vehicle to reach each of the other available parking spaces can be determined. Further, output the parking space information of the other available parking spaces and the driving routes for the vehicle to reach each of the other available parking spaces respectively.
[0217] It should be noted that S411 and S412 can be executed independently or simultaneously, and the embodiments of the present application do not limit this.
[0218] In summary, when a parking space is blocked by a target object, the present solution can obtain a target 3D image for identifying available parking spaces through the first plane where the parking space is located and multiple side planes of the target object in the initial 3D image of the parking lot where the vehicle is located, so as to identify the available parking spaces in the parking spaces through the target 3D image, solving the problem that it is impossible to determine whether the blocked parking space is an available parking space, thereby improving the accuracy of available parking space identification; further, when outputting the available parking spaces, the user can drive the vehicle to park based on the available parking spaces, improving the user's parking experience. In addition, each available parking space can be displayed on a display screen (for example, an in-vehicle display screen), enabling the user to select the available parking space where they want to park from among the multiple available parking spaces, providing more parking space options for the user. Moreover, the optimal available parking space can be selected from among the multiple available parking spaces and the driving route corresponding to the vehicle reaching the optimal available parking space can be determined, enabling the user to park the vehicle at the target available parking space according to the driving route, thereby improving the parking efficiency and convenience of the vehicle and further improving the user's parking experience.
[0219] It should be noted that Figure 14 All steps in Figure 2 and Figure 13 are introduced in detail in the corresponding embodiments in
[0220] It should be understood that the above examples are provided to help those skilled in the art understand the embodiments of the present application, rather than to limit the embodiments of the present application to the specific numerical values or specific scenarios shown. Those skilled in the art can obviously make various equivalent modifications or changes based on the above examples, and such modifications or changes also fall within the scope of the embodiments of the present application.
[0221] As described above in connection with Figures 1 to 14 the parking space recognition method provided by the embodiments of the present application has been described in detail; hereinafter, in connection with Figure 15 and Figure 16 the device embodiments of the present application will be described in detail. It should be understood that the devices in the embodiments of the present application can execute various methods of the foregoing embodiments of the present application, that is, the specific working processes of the following various products can refer to the corresponding processes in the foregoing method embodiments.
[0222] Figure 15 is a schematic structural diagram of a parking space recognition device provided by an embodiment of the present application.
[0223] Exemplarily, as Figure 15 shown, the device 1500 includes:
[0224] An acquisition module 1510, configured to acquire an initial three-dimensional image of a parking lot where a vehicle is located; wherein, the initial three-dimensional image includes a first plane where a parking space is located and a plurality of side planes of a target object; the target object is used to represent an object that blocks the parking space;
[0225] A processing module 1520, configured to obtain a target three-dimensional image based on the first plane and the plurality of side planes; wherein, the intersection line of two adjacent side planes among the plurality of side planes in the target three-dimensional image is perpendicular to the first plane;
[0226] An identification module 1530, configured to identify an available parking space in the parking space based on the target three-dimensional image;
[0227] An output module 1540, configured to output the parking space information of the available parking space.
[0228] In a possible implementation manner, the acquisition module 1510 is further configured to: acquire a projection plane; and determine a perspective direction corresponding to the projection plane; specifically, the processing module 1520 is configured to: project the first plane and each side plane among the plurality of side planes onto the projection plane respectively to obtain a first three-dimensional image; and rotate the first three-dimensional image based on the perspective direction to obtain a target three-dimensional image.
[0229] In a possible implementation manner, the identification module 1530 is specifically configured to: determine a target graphic in the target three-dimensional image; wherein, the target graphic is used to represent a graphic formed by the intersection lines of the first plane and each side plane; identify an available parking space based on the target graphic and the perspective direction; and / or identify an available parking space based on the target object and the target graphic.
[0230] In a possible implementation, the recognition module 1530 is specifically configured to: determine the graphic area of each target graphic; determine the graphic area of the target graphic that varies non-linearly in the perspective direction; and determine the parking space corresponding to the target graphic as an available parking space.
[0231] In a possible implementation, the recognition module 1530 is specifically configured to: determine the center point of the first side plane in the target object, where the first side plane is used to represent the front side of the target object; determine the perpendicular line of the center point perpendicular to the first plane; and if the intersection point of the perpendicular line and the first plane is not within the target graphic, determine the parking space corresponding to the target graphic as an available parking space.
[0232] In a possible implementation, the acquisition module 1510 is further configured to: acquire the target information of each available parking space, where the target information represents information related to vehicle parking; obtain a scoring result for each available parking space based on the target information; determine the available parking space corresponding to the highest scoring result among the scoring results of each available parking space as the target available parking space; and the output module 1540 is specifically configured to: output the parking space information of the target available parking space.
[0233] In a possible implementation, the acquisition module 1510 is further configured to: acquire the actual position of the target available parking space and the current position of the vehicle; determine the driving path of the vehicle based on the actual position and the current position; and the output module 1540 is specifically configured to: output the parking space information of the target available parking space and the driving path.
[0234] In a possible implementation, the acquisition module 1510 is specifically configured to: if it is detected that the vehicle is in the parking lot, acquire the captured image collected by the vehicle; and construct a three-dimensional image corresponding to the captured image to obtain an initial three-dimensional image.
[0235] It should be noted that the above device 1500 is embodied in the form of functional modules. The term "module" here can be implemented in software and / or hardware forms, and no specific limitation is made thereto.
[0236] For example, the "module" can be a software program, a hardware circuit, or a combination of both that implements the above functions. The hardware circuit may include an Application Specific Integrated Circuit (ASIC), an electronic circuit, a processor (such as a shared processor, a proprietary processor, or a group of processors, etc.) for executing one or more software or firmware programs, a memory, a merged logic circuit, and / or other suitable components that support the described functions.
[0237] Therefore, the modules of the examples described in the embodiments of the present application can be implemented in electronic hardware, or in a combination of computer software and electronic hardware. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. A person skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present application.
[0238] Figure 16 is a schematic structural diagram of a vehicle provided by an embodiment of the present application.
[0239] Exemplarily, as Figure 16 shown, the vehicle 1600 includes: a memory 1610 and a processor 1620. Among them, an executable program code 1611 is stored in the memory 1610, and the processor 1620 is configured to call and execute the executable program code 1611 to execute a parking space recognition method.
[0240] The present application can divide the functions of the vehicle according to the above method examples. For example, each function module can be corresponded, or two or more functions can be integrated into one processing module. The above integrated module can be implemented in the form of hardware. It should be noted that the division of modules in this embodiment is illustrative, only a logical function division, and there may be other division methods in actual implementation.
[0241] In the case of dividing each function module corresponding to each function, the vehicle may include: an acquisition module, a processing module, a recognition module, an output module, etc. It should be noted that all relevant contents of each step involved in the above method embodiment can be cited to the function description of the corresponding function module, and will not be repeated here.
[0242] The vehicle provided by the present application is used to execute the above-mentioned parking space recognition method, and thus can achieve the same effect as the above implementation method.
[0243] In the case of adopting an integrated unit, the vehicle may include a processing module and a storage module. Among them, the processing module can be used to control and manage the actions of the vehicle. The storage module can be used to support the vehicle to execute relevant program codes and data, etc.
[0244] Among them, the processing module can be a processor or a controller, which can implement or execute various exemplary logic blocks, modules and circuits shown in combination with the disclosure of the present application. The processor can also be a combination of computing functions, such as a combination of one or more microprocessors, a combination of digital signal processing (DSP) and a microprocessor, etc. The storage module can be a memory.
[0245] The present application also provides a computer-readable storage medium, on which a computer program is stored, and when the program is executed by a processor, the steps of the method according to any one of the foregoing embodiments are implemented. Among them, the computer-readable storage medium may include, but is not limited to, any type of disk, including floppy disks, optical disks, DVDs (Digital Video Discs), CD-ROMs (Compact Disc Read-Only Memories), microdrives, and magneto-optical disks, ROMs (Read-Only Memories), RAMs (Random Access Memories), EPROMs (Erasable Programmable Read-Only Memories), EEPROMs (Electrically Erasable Programmable Read-Only Memories), DRAMs (Dynamic Random Access Memories), VRAMs (Video Random Access Memories), flash memory devices, magnetic cards or optical cards, nanosystems (including molecular memory ICs), or any type of medium or device suitable for storing instructions and / or data.
[0246] The present application also provides a computer program product, and when the computer program product runs on a computer, the computer is enabled to execute the above-related steps to implement a parking space recognition method in the above embodiments.
[0247] In addition, the vehicle provided in the embodiments of the present application may specifically be a chip, a component or a module, and the vehicle may include a connected processor and a memory; wherein, the memory is used to store instructions, and when the vehicle runs, the processor may call and execute the instructions to enable the chip to execute a parking space recognition method in the above embodiments.
[0248] Among them, the vehicle, computer-readable storage medium, computer program product or chip provided in the present application are all used to execute the corresponding method provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding method provided above, and will not be elaborated here.
[0249] Through the description of the above embodiments, those skilled in the art can understand that, for the convenience and conciseness of description, only the division of the above functional modules is used as an example. In actual applications, the above functions can be allocated to different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above.
[0250] In the embodiments provided in the present application, it should be understood that the disclosed device and method can be implemented in other ways. For example, the device embodiments described above are only illustrative. For example, the division of modules or units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the displayed or discussed coupling or direct coupling or communication connection between each other can be through some interfaces. The indirect coupling or communication connection of the device or unit can be in an electrical, mechanical or other form.
[0251] The above content is only the specific implementation manner of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art within the technical scope disclosed in the present application can easily think of changes or substitutions, which should all be covered by the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
Claims
1. A parking space recognition method, characterized in that, The method includes: Obtaining an initial three-dimensional image of the parking lot where the vehicle is located; wherein, the initial three-dimensional image includes a first plane where the parking space is located and multiple side planes of the target object; the target object is used to represent the object blocking the parking space; Based on the first plane and the multiple side planes, obtaining a target three-dimensional image; wherein, the intersection line of two adjacent side planes among the multiple side planes in the target three-dimensional image is perpendicular to the first plane; Based on the target three-dimensional image, identifying the available parking spaces in the parking space; Outputting the parking space information of the available parking spaces.
2. The method according to claim 1, characterized in that The method further includes: Obtaining a projection plane; and determining the perspective direction corresponding to the projection plane; The obtaining the target three-dimensional image based on the first plane and the multiple side planes includes: Projecting the first plane and each side plane among the multiple side planes onto the projection plane respectively to obtain a first three-dimensional image; Rotating the first three-dimensional image based on the perspective direction to obtain the target three-dimensional image.
3. The method according to claim 2, wherein The identifying the available parking spaces in the parking space based on the target three-dimensional image includes: Determining a target graphic in the target three-dimensional image; wherein, the target graphic is used to represent the graphic formed by the intersection lines of the first plane and each side plane; Identifying the available parking spaces based on the target graphic and the perspective direction; and / or, identifying the available parking spaces based on the target object and the target graphic.
4. The method according to claim 3, wherein The number of the target graphics is at least one; the identifying the available parking spaces based on the target graphic and the perspective direction includes: Determining the graphic area of each target graphic; Determining the target graphic area that non-linearly changes in the perspective direction; Determining the parking space corresponding to the target graphic area as the available parking space.
5. The method according to claim 3, characterized in that The identifying the available parking spaces based on the target object and the target graphic includes: Determining the center point of the first side plane in the target object; wherein, the first side plane is used to represent the front side of the target object; Determining the vertical line of the center point perpendicular to the first plane; If the intersection point of the vertical line and the first plane is not within the target graphic, determining the parking space corresponding to the target graphic as the available parking space.
6. The method according to any one of claims 1 to 5, characterized in that, The number of the available parking spaces is at least one, and the method further includes: Obtaining the target information of each available parking space; wherein, the target information represents the information related to the vehicle parking; Based on the target information, obtaining the scoring result of each available parking space; Determining the available parking space corresponding to the highest scoring result among the scoring results of each available parking space as the target available parking space; The outputting the parking space information of the available parking spaces includes: Outputting the parking space information of the target available parking space.
7. The method according to claim 6, wherein The method further includes: Obtaining the actual position of the target available parking space and the current position of the vehicle; Based on the actual position and the current position, determining the driving path of the vehicle; The outputting the parking space information of the target available parking space includes: Outputting the parking space information of the target available parking space and the driving path.
8. The method according to any one of claims 1 to 5, characterized in that, The obtaining the initial three-dimensional image of the parking lot where the vehicle is located includes: If it is detected that the vehicle is in the parking lot, obtain the captured image collected by the vehicle; Construct a three-dimensional image corresponding to the captured image to obtain the initial three-dimensional image.
9. A parking space recognition device, characterized in that, The device includes: An acquisition module, configured to acquire an initial three-dimensional image of a parking lot where a vehicle is located; wherein, the initial three-dimensional image includes a first plane where a parking space is located and a plurality of side planes of a target object; the target object is used to represent an object that blocks the parking space; A processing module, configured to obtain a target three-dimensional image based on the first plane and the plurality of side planes; wherein, an intersection line between two adjacent side planes among the plurality of side planes in the target three-dimensional image is perpendicular to the first plane; An identification module, configured to identify an available parking space in the parking space based on the target three-dimensional image; An output module, configured to output parking space information of the available parking space.
10. A vehicle, characterized in that, The vehicle includes: A memory, configured to store executable program code; A processor, configured to call and run the executable program code from the memory, so that the vehicle executes the method according to any one of claims 1 to 8.