Parking space detection method, vehicle-mounted controller and vehicle

Through the combination of panoramic top view and panoramic driving perception network, the existing parking space detection methods have solved the problem that high image quality requirements and inaccurate detection results, and achieved a more robust and generalized parking space detection effect.

CN117392635BActive Publication Date: 2025-06-13BYD CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210756702.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-30
Publication Date
2025-06-13
Estimated Expiration
2042-06-30

AI Technical Summary

Technical Problem

The existing parking space detection methods have problems such as high image quality requirements and inaccurate detection results.

Method used

The parking space detection is carried out using panoramic top view and panoramic driving perception network. The target parking space is obtained through the semantic segmentation results of the parking space line and the parking space entrance detection box, which improves the robustness and generalization ability of the detection.

Benefits of technology

Parking lines and entrances can be accurately identified without high-quality images, improving the accuracy and applicability of parking space inspection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117392635B_ABST
    Figure CN117392635B_ABST
Patent Text Reader

Abstract

The present invention discloses a parking space detection method, an in-vehicle controller, and an automobile. The method includes: obtaining a panoramic top view; using a panoramic driving perception network to identify the panoramic top view to obtain a network output result, where the network output result includes a parking space line semantic segmentation result and a parking space entrance detection box; performing parking space line corner point detection on the parking space line semantic segmentation result to obtain parking space line corner points; and obtaining a target parking space according to the parking space line corner points and the parking space entrance detection box. This method can detect the target parking space without using high-quality images, ensuring the generalization ability and detection accuracy of the target parking space detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of automotive assisted driving, and particularly to a parking space detection method, an in-vehicle controller, and an automobile. Background Art

[0002] Parking space detection is the basis of an automatic parking system and an assisted parking system. That is, assisted driving systems such as an automatic parking system and an assisted parking system all rely on the detected parking space for assisted driving. Existing parking space detection methods generally use a straight line detection algorithm or a key point detection algorithm for detection, and there are problems of high image quality requirements and inaccurate detection results. Summary of the Invention

[0003] Embodiments of the present invention provide a parking space detection method, an in-vehicle controller, and an automobile to solve the problems of high image quality requirements and inaccurate detection results in existing parking space detection.

[0004] Embodiments of the present invention provide a parking space detection method, including:

[0005] Obtain a panoramic top view;

[0006] Use a panoramic driving perception network to identify the panoramic top view, and obtain a network output result, where the network output result includes a parking space line semantic segmentation result and a parking space entrance detection frame;

[0007] Perform parking space line corner point detection on the parking space line semantic segmentation result to obtain parking space line corner points;

[0008] Obtain a target parking space according to the parking space line corner points and the parking space entrance detection frame.

[0009] Preferably, the obtaining of the panoramic top view includes:

[0010] Obtain M single-camera images, where M≥2;

[0011] Perform distortion correction and inverse projection transformation on the M single-camera images to obtain M transformed camera images;

[0012] Perform stitching on the M transformed camera images to obtain a panoramic top view.

[0013] Preferably, the performing of parking space line corner point detection on the parking space line semantic segmentation result to obtain parking space line corner points includes:

[0014] Perform preprocessing on the parking space line semantic segmentation result to obtain a parking space line contour image;

[0015] Perform parking space line detection on the parking space line contour image to obtain a target parking space line;

[0016] Perform corner detection on the target parking space line to obtain the corner points of the parking space line.

[0017] Preferably, the preprocessing of the semantic segmentation result of the parking space line to obtain the contour image of the parking space line includes:

[0018] Perform binarization processing on the semantic segmentation result of the parking space line to obtain a binary image;

[0019] Perform thinning processing on the binary image to obtain the contour image of the parking space line.

[0020] Preferably, the detection of the parking space line on the contour image of the parking space line to obtain the target parking space line includes:

[0021] Perform line detection on the contour image of the parking space line to obtain the original parking space line;

[0022] Perform filtering processing on the original parking space line to obtain the target parking space line.

[0023] Preferably, the filtering processing of the original parking space line to obtain the target parking space line includes:

[0024] Obtain the length of the parking space line and the included angle of the parking space line of the original parking space line;

[0025] Perform filtering processing according to the length of the parking space line and the included angle of the original parking space line to obtain the target parking space line.

[0026] Preferably, the filtering processing according to the length of the parking space line and the included angle of the original parking space line to obtain the target parking space line includes:

[0027] Obtain the target length range and the target included angle range;

[0028] Obtain the length detection result according to the length of the parking space line of the original parking space line and the target length range;

[0029] Obtain the included angle detection result according to the included angle of the parking space line of the original parking space line and the target included angle range;

[0030] Perform filtering processing on the original parking space line according to the length detection result and the included angle detection result to obtain the target parking space line.

[0031] Preferably, the corner detection of the target parking space line to obtain the corner points of the parking space line includes:

[0032] Obtain the target included angle range, and the target included angle range includes at least one included angle range of the parking space line;

[0033] Classify the target parking space lines according to at least one of the included parking space line angle ranges, and obtain a set of parking space lines corresponding to at least one of the included parking space line angle ranges;

[0034] Merge all the target parking space lines in each of the sets of parking space lines to obtain a merged parking space line corresponding to each of the sets of parking space lines;

[0035] Perform corner detection on the merged parking space lines corresponding to at least one of the sets of parking space lines to obtain parking space line corners.

[0036] Preferably, the step of merging all the target parking space lines in each of the sets of parking space lines to obtain a merged parking space line corresponding to each of the sets of parking space lines includes:

[0037] Determine a reference parking space line in the set of parking space lines according to all the target parking space lines in each of the sets of parking space lines;

[0038] Obtain the line spacing between each of the target parking space lines and the reference parking space line in the set of parking space lines;

[0039] If the line spacing is less than a preset spacing, merge the target parking space line and the reference parking space line to obtain a merged parking space line.

[0040] Preferably, the step of obtaining a target parking space according to the parking space line corners and the parking space entrance detection frame includes:

[0041] Obtain a valid parking space entrance according to the parking space line corners and the parking space entrance detection frame;

[0042] Obtain a target parking space according to the valid parking space entrance.

[0043] Preferably, the step of obtaining a valid parking space entrance according to the parking space line corners and the parking space entrance detection frame includes:

[0044] Determine whether the parking space line corners are within the parking space entrance detection frame;

[0045] If the parking space line corners are within the parking space entrance detection frame, determine the parking space line corners as valid corners;

[0046] Obtain a valid parking space entrance according to the parking space entrance detection frame and the valid corners.

[0047] Preferably, the network output result further includes a parking space type;

[0048] The step of obtaining a target parking space according to the valid parking space entrance includes:

[0049] Obtain a parking space included angle and a fitting line length according to the parking space type;

[0050] Obtain a target parking space according to the effective parking space entrance, the included angle of the parking space, and the length of the fitted line.

[0051] An embodiment of the present invention provides a vehicle-mounted controller, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the above-mentioned parking space detection method is implemented.

[0052] An embodiment of the present invention provides a vehicle, which includes the above vehicle-mounted controller.

[0053] The above parking space detection method, vehicle-mounted controller, and vehicle use a panoramic top view for parking space detection. Since the panoramic top view contains more image information, there is no need to use images of higher quality, which improves the generalization ability of parking space detection; use a panoramic driving perception network to detect the panoramic top view to obtain a parking space entrance detection frame and a parking space line semantic segmentation result; first perform parking space line corner detection on the parking space line semantic segmentation result output by YOLOP, so that the parking space line corners can learn the learning result of YOLOP on the panoramic top view, which improves the robustness and generalization ability of parking space detection. Without requiring high-quality images, the parking space line corners can be accurately identified; then use the parking space entrance detection frame output by YOLOP to detect and judge the parking space line corners to determine whether a target parking space can be determined according to the parking space line corners, which can ensure the accuracy of parking space detection. Description of the Drawings

[0054] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following will briefly introduce the drawings required for the description of the embodiments of the present invention. Obviously, the following drawings are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained according to these drawings.

[0055] Figure 1 is a flowchart of a parking space detection method in an embodiment of the present invention;

[0056] Figure 2 is another flowchart of a parking space detection method in an embodiment of the present invention;

[0057] Figure 3 is another flowchart of a parking space detection method in an embodiment of the present invention;

[0058] Figure 4 is another flowchart of a parking space detection method in an embodiment of the present invention;

[0059] Figure 5 is another flowchart of a parking space detection method in an embodiment of the present invention;

[0060] Figure 6 It is another flowchart of the parking space detection method in an embodiment of the present invention;

[0061] Figure 7 It is another flowchart of the parking space detection method in an embodiment of the present invention;

[0062] Figure 8 It is another flowchart of the parking space detection method in an embodiment of the present invention;

[0063] Figure 9 It is another flowchart of the parking space detection method in an embodiment of the present invention;

[0064] Figure 10 It is another flowchart of the parking space detection method in an embodiment of the present invention;

[0065] Figure 11 It is another flowchart of the parking space detection method in an embodiment of the present invention;

[0066] Figure 12 It is another flowchart of the parking space detection method in an embodiment of the present invention. Detailed implementation manners

[0067] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.

[0068] The parking space detection method provided by the embodiment of the present invention can be applied to an automobile, specifically, it can be applied to an in-vehicle controller. For example, it can be applied to the in-vehicle controllers corresponding to an automatic parking system and an assisted parking system, so as to enable the automatic parking system to perform automatic parking or the assisted parking system to perform assisted parking according to the parking spaces detected by the in-vehicle controller. Among them, the in-vehicle controller refers to the controller assembled on the automobile.

[0069] In one embodiment, as Figure 1 shown, a parking space detection method is provided. Taking the application of this method to an in-vehicle controller as an example, the method includes the following steps:

[0070] S101: Obtain a panoramic top view;

[0071] S102: Use a panoramic driving perception network to identify the panoramic top view, obtain the network output result, and the network output result includes the parking space line semantic segmentation result and the parking space entrance detection frame;

[0072] S103: Detect the corner points of the parking space lines from the semantic segmentation results of the parking space lines to obtain the corner points of the parking space lines.

[0073] S104: Obtain the target parking space according to the corner points of the parking space lines and the detection frame of the parking space entrance.

[0074] The panoramic top view refers to the panoramic view formed by looking down at the road surface from the vehicle.

[0075] As an example, in step S101, the vehicle-mounted controller can obtain the camera installed on the vehicle and look down at the road surface to form a panoramic top view. In this example, since the panoramic top view contains a lot of image information, it is not necessary to use high-quality images to ensure that it has sufficient image information, making the generalization ability of using the panoramic top view for parking space detection relatively strong.

[0076] The Panoptic Driving Perception Network (You Only Look Once for Panoptic Driving Perception, hereinafter referred to as YOLOP) is a neural network that can simultaneously perform object detection, drivable area segmentation, and parking space line detection. Generally speaking, YOLOP includes a shared encoder and three task decoders, and the three task decoders refer to the object detection decoder, the drivable area segmentation decoder, and the parking space line detection decoder respectively.

[0077] As an example, in step S102, the vehicle-mounted controller can input the obtained panoramic top view into the Panoptic Driving Perception Network, use the shared encoder in the Panoptic Driving Perception Network to extract features from the panoramic top view, perform multi-scale fusion on the extracted features to obtain multi-scale features; then use the three task decoders to process the multi-scale features output by the shared encoder to obtain the network output results. In this example, the network output results include the detection frame of the parking space entrance output by the object detection decoder, the semantic segmentation result of the drivable area output by the drivable area segmentation decoder, and the semantic segmentation result of the parking space lines output by the parking space line detection decoder. In this example, using YOLOP to identify the panoramic top view can obtain the detection frame of the parking space entrance and the semantic segmentation result of the parking space lines, so as to use the detection frame of the parking space entrance and the semantic segmentation result of the parking space lines for parking space line detection, which can increase the detection accuracy of the parking space lines and make up for the problem of insufficient robustness in detecting parking space lines using geometric features.

[0078] Furthermore, the network output result also includes the parking space type. The parking space type is the one output by YOLOP. As an example, according to the shape of the parking space entrance, it can be divided into parking space types such as I-shaped parking spaces, L-shaped parking spaces, U-shaped parking spaces, and T-shaped parking spaces. According to the geometric shape of the parking space and the included angle of the parking space entrance, it can be divided into types such as perpendicular parking spaces, horizontal parking spaces, inclined parking spaces, and irregular-shaped parking spaces.

[0079] As an example, during the training process of the YOLOP model, YOLOP is trained using training data labeled with parking space types, so that after the trained YOLOP recognizes the panoramic top view, it can not only recognize the lane line semantic segmentation result and the parking space entrance detection box, but also directly recognize its parking space type, so as to detect the parking spaces corresponding to different parking space types and ensure the accuracy of the parking space detection result.

[0080] Among them, the corner point is the extreme point, that is, the point that is particularly prominent in certain aspects. In this example, the corner point of the lane line can be the intersection of two lane lines or the end point of a single lane line.

[0081] As an example, in step S103, after the vehicle-mounted controller obtains the lane line semantic segmentation result output by YOLOP, it can use, but is not limited to, line detection algorithms such as the Radon transform detection algorithm and the Hough transform detection algorithm to perform line detection on the lane line semantic segmentation result to obtain the detected target lane line; then perform corner point detection on the detected target lane line to obtain the corner points of the lane line. The target lane line here refers to the lane line determined according to the lane line semantic segmentation result for corner point detection. The corner points of the lane line here can be the end points of a target lane line or the intersections of at least two target lane lines. In this example, performing corner point detection on the lane line semantic segmentation result output by YOLOP enables the obtained corner points of the lane line to learn the deep learning result and line detection result of YOLOP for the panoramic top view, overcomes the deficiency of low robustness existing in the traditional line detection algorithm for parking space detection, and has low requirements for image quality, which helps to improve the generalization ability.

[0082] As an example, in step S104, after the vehicle-mounted controller obtains the corner points of the parking space line determined according to the semantic segmentation result of the parking space line, it can use the parking space entrance detection frame output by YOLOP to detect and judge the corner points of the parking space line. Specifically, it judges whether the corner points of the parking space line are within the parking space entrance detection frame to determine whether the corner points of the parking space line are the corner points in the parking space entrance detection frame; when it is determined that the corner points of the parking space line are the corner points in the parking space entrance detection frame, the target parking space can be determined according to the corner points of the parking space line; when it is determined that the corner points of the parking space line are not the corner points in the parking space entrance detection frame, the target parking space cannot be determined according to the corner points of the parking space line. It can be understood that using the parking space entrance detection frame output by YOLOP to detect and judge the corner points of the parking space line determined by the semantic segmentation result of the parking space line to judge whether the target parking space can be determined according to the corner points of the parking space line can ensure the accuracy of parking space detection.

[0083] In this embodiment, a panoramic top view is used for parking space detection. Since the panoramic top view contains more image information, there is no need to use images of higher quality, which improves the generalization ability of parking space detection; a panoramic driving perception network is used to detect the panoramic top view to obtain the parking space entrance detection frame and the semantic segmentation result of the parking space line; first, the corner points of the parking space line are detected for the semantic segmentation result of the parking space line output by YOLOP, so that the corner points of the parking space line can learn the learning result of YOLOP for the panoramic top view, which improves the robustness and generalization ability of parking space detection. Without requiring high-quality images, the corner points of the parking space line can be accurately recognized; then, the parking space entrance detection frame output by YOLOP is used to detect and judge the corner points of the parking space line to judge whether the target parking space can be determined according to the corner points of the parking space line, which can ensure the accuracy of parking space detection.

[0084] In one embodiment, as Figure 2 shown, step S101, that is, obtaining the panoramic top view, includes:

[0085] S201: Obtain M single-camera images, where M≥2;

[0086] S202: Perform distortion correction and inverse projection transformation on the M single-camera images to obtain M transformed camera images;

[0087] S203: Stitch the M transformed camera images to obtain the panoramic top view.

[0088] Among them, the single-camera image refers to the image captured by a single camera. M is the number of single-camera images, that is, the number of single cameras.

[0089] As an example, in step S201, the vehicle-mounted controller is connected to M single cameras set at different positions of the vehicle. The M single-camera images formed by the M single cameras looking down at the road surface can send the collected M single-camera images to the vehicle-mounted controller so that the vehicle-mounted controller can receive the M single-camera images. In this example, the number of M depends on the position of each single camera and its maximum shooting angle, and it is necessary to ensure that the M single-camera images can be stitched to form a 360-degree panoramic view. For example, the M single-camera images include the front-camera image taken by the front camera, the rear-camera image taken by the rear camera, the left-camera image taken by the left camera, and the right-camera image taken by the right camera.

[0090] Among them, distortion correction is a mapping that projects distorted pixels onto corrected pixel positions. Inverse projection transformation refers to the process of restoring the parking space lines at a certain angle presented in the image collected by the camera to be parallel. Transformed camera image refers to the image obtained after performing distortion correction and inverse projection transformation on the single-camera image.

[0091] As an example, in step S202, after the vehicle-mounted controller obtains the M single-camera images, it first performs distortion correction on each single-camera image to eliminate the distortion of the image; then performs inverse projection transformation on the corrected single-camera image to obtain a transformed camera image, so that the parking space lines of the transformed camera image are normal, which helps to ensure the image quality of the subsequent stitched panoramic top view.

[0092] As an example, in step S203, after the vehicle-mounted controller obtains the M transformed camera images, it can stitch the M transformed camera images in the preset stitching order to form a panoramic top view. For example, the four transformed camera images can be stitched in the order of "front - left - rear - right" to form a panoramic top view.

[0093] In this embodiment, performing distortion correction and inverse projection transformation on the M single-camera images to obtain transformed camera images can eliminate the distortion of the images and also avoid the parking space lines that were originally parallel in the images having a certain angle, which helps to ensure the accuracy of subsequent parking space line recognition; then stitching the M transformed camera images to obtain a panoramic top view. Since the panoramic top view integrates the image information of the M transformed camera images, even if the image quality of the panoramic top view is low, it can ensure the accuracy of the subsequent target parking space.

[0094] In one embodiment, as Figure 3 shown, step 103, that is, performing parking space line corner detection on the parking space line semantic segmentation result to obtain parking space line corners, includes:

[0095] S301: Preprocess the parking space line semantic segmentation result to obtain a parking space line contour image;

[0096] S302: Perform lane line detection on the lane line contour image to obtain the target lane line;

[0097] S303: Perform corner detection on the target lane line to obtain the lane line corners.

[0098] As an example, in step S301, after the vehicle-mounted controller obtains the lane line semantic segmentation result output by YOLOP, it can preprocess the lane line semantic segmentation result to extract the lane line contour according to the lane line semantic segmentation result, so as to obtain the lane line contour image and avoid the interference of other information except the lane line contour in the lane line semantic segmentation result. The preprocessing here refers to the process of extracting the lane line contour. The lane line contour image refers to an image containing the lane line contour, which can be understood as an image extracted from the panoramic top view and only contains the lane line contour without other information.

[0099] As an example, in step S302, after the vehicle-mounted controller obtains the lane line contour image, it can use, but is not limited to, line detection algorithms such as the Radon transform detection algorithm and the Hough transform detection algorithm to perform line detection on the lane line contour image to obtain the target lane line. In this example, the target lane line can be the lane line directly output by the line detection algorithm or the lane line after screening and filtering the lane line directly output by the line detection algorithm.

[0100] As an example, in step S303, after the vehicle-mounted controller obtains the target lane line, it can perform corner detection on the target lane line to determine the endpoints of a target lane line or the intersection points of at least two target lane lines as the lane line corners.

[0101] In this embodiment, first preprocess the lane line semantic segmentation result to obtain the lane line contour image, then perform lane line detection on the lane line contour image to obtain the target lane line, which can avoid the interference of other information except the lane line contour in the lane line semantic segmentation result and improve the detection efficiency and accuracy of the target lane line; finally, perform corner detection on the target lane line to obtain the lane line corners.

[0102] In one embodiment, as Figure 4 shown, step S301, that is, preprocess the lane line semantic segmentation result to obtain the lane line contour image, includes:

[0103] S401: Perform binarization processing on the lane line semantic segmentation result to obtain a binarized image;

[0104] S402: Perform thinning processing on the binarized image to obtain the lane line contour image.

[0105] As an example, in step S401, after the vehicle-mounted controller obtains the lane line semantic segmentation result output by YOLOP, it can perform binarization processing on the lane line semantic segmentation result. Specifically, in the lane line semantic segmentation result, the pixel values belonging to the lane line area are determined to be 255, and the pixel values not belonging to the lane line area are determined to be 0, so as to obtain a binary image with all pixel values being 255 or 0. The binary image here is the image after binarization processing of the lane line semantic segmentation result. In this example, performing binarization processing on the lane line semantic segmentation result can facilitate the extraction of lane lines and improve the detection efficiency and detection results of lane lines.

[0106] As an example, in step S402, since the lane line has a certain width, after the vehicle-mounted controller obtains the binary image, it needs to perform thinning processing on the binary image to thin the lane line contour in the binary image and obtain a lane line contour image. In this example, the vehicle-mounted controller can use, but is not limited to, the skeleton thinning algorithm to perform subdivision processing on the binary image to extract the lane line contour image containing the lane line contour. The lane line contour image here refers to the image obtained after thinning processing of the binary image, specifically the image containing the enhanced lane line contour. In this example, performing thinning processing on the binary image can extract the lane line contour, making the lane line contour displayed in the lane line contour image, which helps to more accurately extract the lane line and improve the detection efficiency and detection results of the lane line.

[0107] In this embodiment, performing binarization processing on the lane line semantic segmentation result to obtain a binary image can facilitate the extraction of lane lines; then performing thinning processing on the binary image to accurately extract the lane line contour, which helps to improve the detection efficiency and detection results of lane lines.

[0108] In one embodiment, as Figure 5 shown, step S302, that is, performing lane line detection on the lane line contour image to obtain the target lane line, includes:

[0109] S501: Perform line detection on the lane line contour image to obtain the original lane line;

[0110] S502: Perform filtering processing on the original lane line to obtain the target lane line.

[0111] As an example, in step S501, after the vehicle-mounted controller obtains the lane line contour image, it can use a line detection algorithm to perform line detection on the lane line contour image. Specifically, it can use, but is not limited to, the Radon transform detection algorithm and the Hough transform detection algorithm to perform line detection on the lane line contour image to obtain the original vehicle lane line. The original lane line here refers to the lane line obtained by performing line detection on the lane line contour image.

[0112] In this embodiment, since the parking space line contour image is an image obtained by binarizing and thinning the semantic segmentation result of the parking space line recognized by YOLOP, the straight line detection algorithm is used to process the parking space line contour image, so that the original parking space line can learn the characteristics of the deep learning result of YOLOP and the straight line detection result, overcome the deficiency of low robustness in parking space detection by traditional straight line detection algorithms, and have low requirements for image quality, which helps to improve the generalization ability.

[0113] Generally speaking, when using the straight line detection algorithm to detect straight lines in the parking space line contour image, the obtained original parking space lines have different lengths, some are short, some are long, there are parallel lines and intersecting lines. If subsequent parking space detection is directly based on the original parking space lines, the detection accuracy of the target parking space will be relatively low.

[0114] As an example, in step S502, after the vehicle-mounted controller obtains the original parking space lines, it needs to execute the pre-set parking space line filtering logic to filter all the original parking space lines to filter out the original parking space lines that obviously do not conform to the characteristics of the parking space line, and obtain the target parking space lines. Among them, the parking space line filtering logic refers to the logic for filtering parking space lines determined according to the characteristics of the parking space line. The characteristics of the parking space line include but are not limited to characteristics such as the length, width and included angle of the parking space line, which are used to evaluate whether it is a parking space line. In this example, the target parking space line can be understood as the remaining parking space line after filtering the original parking space line, specifically referring to the original parking space line that meets the pre-set characteristics of the parking space line.

[0115] In this embodiment, after obtaining multiple original parking space lines according to the parking space line contour image, the original parking space lines can be filtered to filter out the original parking space lines that do not conform to the characteristics of the parking space line, so that the remaining target parking space lines all conform to the characteristics of the parking space line, which helps to ensure the detection efficiency and detection results of subsequent parking space detection.

[0116] In one embodiment, as Figure 6 shown, step S502, that is, filtering the original parking space lines to obtain the target parking space lines, includes:

[0117] S601: Obtain the length of the parking space line and the included angle of the parking space line of the original parking space line;

[0118] S602: Perform filtering processing according to the length of the parking space line and the included angle of the parking space line of the original parking space line to obtain the target parking space lines.

[0119] Among them, the length of the parking space line refers to the length of the original parking space line. The included angle of the parking space line refers to the included angle of the original parking space line relative to the preset coordinate axis, and the preset coordinate axis here can be the X-axis or the Y-axis.

[0120] As an example, in step S601, after the vehicle-mounted controller obtains the original parking space lines, it can detect the length of each original parking space line and calculate the angle of the original parking space line relative to the preset coordinate axis.

[0121] As an example, in step S601, the vehicle-mounted controller can perform filtering processing based on the detected length and angle of the original parking space line. Specifically, it determines whether the length and angle and other parking space line characteristics are satisfied according to the length and angle of the parking space line. If the length and angle and other parking space line characteristics are satisfied, the original parking space line is retained and determined as the target parking space line. If the length and angle and other parking space line characteristics are not satisfied, the original parking space line is deleted to filter out the original parking space lines that do not meet the parking space line characteristics.

[0122] In this embodiment, evaluating whether the parking space line characteristics are satisfied according to the length and angle of the original parking space line, and then determining whether it is necessary to filter the original parking space line to obtain the target parking space line that meets the parking space line characteristics helps to ensure the detection efficiency and detection results of subsequent parking space detection.

[0123] In one embodiment, as Figure 7 shown, step S602, that is, performing filtering processing according to the length and angle of the original parking space line to obtain the target parking space line, includes:

[0124] S701: Obtain the target length range and the target angle range;

[0125] S702: Obtain the length detection result according to the length of the original parking space line and the target length range;

[0126] S703: Obtain the angle detection result according to the angle of the original parking space line and the target angle range;

[0127] S704: Perform filtering processing on the original parking space line according to the length detection result and the angle detection result to obtain the target parking space line.

[0128] Among them, the target length range is a preset range for evaluating whether the length of the parking space line meets the length characteristics. The target angle range is a preset range for evaluating whether the angle of the parking space line meets the angle characteristics.

[0129] As an example, in step S701, the vehicle-mounted controller can obtain the preset target length range and target angle range so as to evaluate whether the straight line on the road surface is a parking space line based on the target length range and the target angle range.

[0130] In one embodiment, step S102, that is, the network output result further includes the parking space type; correspondingly, in step S801, obtaining the target length range and the target angle range includes: obtaining the target length range and the target angle range corresponding to the parking space type.

[0131] As an example, during the training process of the YOLOP model, the YOLOP is trained using training data annotated with the parking space type, so that after the trained YOLOP recognizes the panoramic top view, it can not only recognize the semantic segmentation result of the parking space line and the detection frame of the parking space entrance, but also directly recognize its parking space type. In this example, after the vehicle-mounted controller obtains the parking space type output by the YOLOP, it can query the pre-set parking space line angle configuration table according to the parking space type, and query and obtain the target length range and the target angle range corresponding to the parking space type from the parking space line angle configuration table. The target angle range includes at least one parking space line angle range, so that the obtained target angle range matches the corresponding parking space type, which helps to ensure the pertinence of the target angle range and helps to improve the accuracy of parking space detection.

[0132] As an example, in step S702, the vehicle-mounted controller can compare the parking space line length of the original parking space line with the target length range; if the parking space line length of the original parking space line is within the target length range, a length detection result of passing the detection is obtained; if the parking space line length of the original parking space line is not within the target length range, a length detection result of failing the detection is obtained. That is to say, only when the parking space line length is within the target length range can it be determined that the parking space line length meets the length characteristics of the parking space line. If the parking space line length is too long or too short, it is determined that the parking space line length does not meet the length characteristics of the parking space line. For example, the target length range includes a long side length range and a short side length range. The long side length range can be set to 6-7m, and the short side length range can be set to 2.8-3.5m, which can be set independently according to actual needs.

[0133] As an example, in step S703, the vehicle-mounted controller may compare the included angle of the original parking space line with the target included angle range; if the included angle of the original parking space line is within the target included angle range, an included angle detection result of passing the detection is obtained; if the included angle of the original parking space line is not within the target included angle range, an included angle detection result of failing the detection is obtained. That is to say, only when the included angle of the parking space line is within the target included angle range can it be determined that the included angle of the parking space line meets the included angle characteristics of the parking space line; if the included angle of the parking space line is too large or too small, it is determined that the included angle of the parking space line does not meet the included angle characteristics of the parking space line. For example, taking a horizontal parking space as an example, the included angle of the original parking space line is the included angle between the original parking space line and the X-axis. If the included angle of the original parking space line is [-15, 15] degrees, it is determined that the included angle of the parking space line meets the included angle characteristics of the parking space line, and the original parking space line is the horizontal parking space line of the horizontal parking space; if the included angle of the original parking space line is [75, 105] degrees, it is determined that the included angle of the parking space line meets the included angle characteristics of the parking space line, and the original parking space line is the vertical parking space line of the horizontal parking space; conversely, if the included angle of the original parking space line is not within [-15, 15] degrees or [75, 105] degrees, it is determined that it does not meet the included angle characteristics of the parking space line.

[0134] As an example, in step S704, after the vehicle-mounted controller obtains the length detection result and the included angle detection result, when both the length detection result and the included angle detection result of the original parking space line are passed the detection, the original parking space line is determined as the target parking space line; when at least one of the length detection result and the included angle detection result of the original parking space line fails the detection, the original parking space line is deleted to filter out the original parking space lines that do not meet the length characteristics or the included angle characteristics.

[0135] In this embodiment, the length of the parking space line is detected according to the target length range, and the included angle of the parking space line is detected according to the target included angle range to determine whether a certain original parking space line meets the length characteristics and the included angle characteristics of the parking space line. According to the length detection result and the included angle detection result, it is determined whether it is necessary to filter the original parking space line to retain the target parking space line that simultaneously meets the length characteristics and the included angle characteristics, which helps to ensure the detection efficiency and the detection result of the subsequent parking space detection.

[0136] In one embodiment, as Figure 8 shown, step S303, that is, performing corner detection on the target parking space line to obtain the parking space line corners, includes:

[0137] S801: Obtain the target included angle range, and the target included angle range includes at least one parking space line included angle range;

[0138] S802: Classify the target parking space line according to at least one parking space line included angle range to obtain a parking space line set corresponding to at least one parking space line included angle range;

[0139] S803: Merge all the target parking space lines in each set of parking space lines to obtain the merged parking space line corresponding to each set of parking space lines;

[0140] S804: Detect the corner points of the merged parking space lines corresponding to at least one set of parking space lines to obtain the corner points of the parking space lines.

[0141] As an example, in step S801, the vehicle-mounted controller can obtain the target angle range from the memory, or can calculate and determine the corresponding target angle range in real time according to the actual situation. The target angle range includes at least one parking space line angle range. The parking space line angle range is a pre-set range used to evaluate whether the angle of a certain parking space line meets the angle characteristics. The target angle range is a general term for at least one parking space line angle.

[0142] For example, for a parallelogram parking space, its corresponding target angle range includes a first angle range and a second angle range. The first angle range is a pre-set range used to evaluate whether the angle of the parking space line meets the angle characteristics corresponding to the first parking space line in the parking space. For example, if the first parking space line in a horizontal parking space is a horizontal parking space line, its corresponding first angle range can be set to [-15, 15] degrees. The second angle range is a pre-set range used to evaluate whether the angle of the parking space line meets the angle characteristics corresponding to the second parking space line in the parking space. For example, if the second parking space line in a horizontal parking space is a vertical parking space line, its corresponding second angle range can be set to [75, 105] degrees.

[0143] In an embodiment, step S102, that is, the network output result further includes the parking space type;

[0144] Correspondingly, in step S801, obtaining the target length range and the target angle range includes:

[0145] Obtain the target angle range corresponding to the parking space type.

[0146] As an example, during the training process of the YOLOP model, the YOLOP is trained using the training data marked with the parking space type, so that after the trained YOLOP recognizes the panoramic top view, it can not only recognize the semantic segmentation result of the parking space line and the detection frame of the parking space entrance, but also directly recognize its parking space type. In this example, after the vehicle-mounted controller obtains the parking space type output by the YOLOP, it can query the pre-set parking space line angle configuration table according to the parking space type, and query and obtain the target angle range corresponding to the parking space type from the parking space line angle configuration table. The target angle range includes at least one parking space line angle range, so that the obtained target angle range matches the corresponding parking space type, which helps to ensure the pertinence of the target angle range and helps to improve the accuracy of parking space detection.

[0147] As an example, in step S802, after obtaining at least one parking line angle range, the vehicle-mounted controller can classify all target parking lines according to the at least one parking line angle range, so as to divide all target parking lines into the parking line sets corresponding to the corresponding parking line angle ranges, so as to process the target parking lines in each parking line set. The parking line set here refers to the set of target parking lines corresponding to the parking line angle range.

[0148] For example, for a parallelogram parking space, the corresponding target angle ranges include a first angle range and a second angle range. After the vehicle-mounted controller obtains the first angle range and the second angle range, it can classify the target parking lines according to the first angle range and the second angle range, so as to divide the target parking lines into the first parking line set corresponding to the first angle range and the second parking line set corresponding to the second angle range respectively. Among them, the first parking line set refers to the data set with the parking line angle in the first angle range, and the second parking line set refers to the data set with the parking line angle in the second angle range.

[0149] For example, in a horizontal parking space, if the first angle range is [-15, 15] degrees and the second angle range is [75, 105] degrees, when the parking line angle of the target parking line is [-15, 15] degrees, the target parking line is divided into the first parking line set, and all the target parking lines in the first parking line set are horizontal parking lines; when the parking line angle of the target parking line is [75, 105] degrees, the target parking line is divided into the second parking line set, and all the target parking lines in the second parking line set are vertical parking lines.

[0150] Another example, in a slanted parking space, if the first angle range is [5, 35] degrees and the second angle range is [130, 150] degrees, when the parking line angle of the target parking line is [5, 35] degrees, the target parking line is divided into the first parking line set; when the parking line angle of the target parking line is [130, 150] degrees, the target parking line is divided into the second parking line set.

[0151] As an example, in step S803, after obtaining the parking line sets corresponding to at least one parking line angle range, the vehicle-mounted controller needs to merge all the target parking lines in each parking line set corresponding to the at least one parking line angle range respectively, so as to merge at least one target parking line in the parking line set into one merged parking line. The merged parking line here refers to the parking line formed by merging all the target parking lines in a certain parking line set.

[0152] For example, for a parallelogram parking space, the corresponding target angle range includes a first angle range and a second angle range. The vehicle-mounted controller merges the target parking lines in the first set of parking lines to obtain a first merged parking line, and merges the target parking lines in the second set of parking lines to obtain a second merged parking line. In this example, the vehicle-mounted controller will first determine whether the first set of parking lines and the second set of parking lines are empty sets. If any one of the first set of parking lines and the second set of parking lines is an empty set and the other is a non-empty set, it means that there are only target parking lines in one parking line angle range. Only the target parking lines in the non-empty set of parking lines need to be merged, that is, only the target parking lines in the first set of parking lines are merged to obtain a first merged parking line; or only the target parking lines in the second set of parking lines are merged to obtain a second merged parking line. If both the first set of parking lines and the second set of parking lines are non-empty sets, it means that there are target parking lines in two angle ranges. At this time, the target parking lines in the two sets of parking lines need to be merged to obtain a first merged parking line and a second merged parking line respectively.

[0153] As an example, in step S804, the vehicle-mounted controller obtains the corner points of the parking lines according to the merged parking lines corresponding to at least one set of parking lines. The processing process includes the following two types: First, the vehicle-mounted controller only obtains one merged parking line. That is, only one of the at least one set of parking lines is a non-empty set and the others are empty sets. All the target parking lines in the non-empty set of parking lines are merged to obtain one merged parking line. At this time, it means that there are no intersecting parking lines. At this time, the endpoints of the merged parking line can be determined as the corner points of the parking lines. Second, the vehicle-mounted controller can obtain at least two merged parking lines. That is, at least two of the at least one set of parking lines are non-empty sets. Based on the at least two non-empty sets of parking lines, they are respectively merged to obtain at least two merged parking lines. At this time, if the at least two merged parking lines are intersecting parking lines, therefore, the intersection points of the at least two merged parking lines can be determined as the corner points of the parking lines.

[0154] In this embodiment, all the target parking lines can be classified according to the at least one obtained parking line angle to determine at least one set of parking lines, so that the angles of all the target parking lines in each set of parking lines are similar; then, all the target parking lines with similar angles in each set of parking lines are merged to obtain one merged parking line; finally, only the at least one merged parking line needs to be detected for corner points, so that the computational amount of corner point detection is small, which helps to improve the efficiency of parking line corner point detection.

[0155] In one embodiment, as Figure 9 shown, step S803, that is, merging all the target parking lines in each set of parking lines to obtain the merged parking line corresponding to each set of parking lines, includes:

[0156] S901: Determine a reference parking line in the set of parking lines based on all target parking lines in each set of parking lines.

[0157] S902: Obtain the line spacing between each target parking line and the reference parking line in the set of parking lines.

[0158] S903: If the line spacing is less than a preset spacing, merge the target parking line and the reference parking line to obtain a merged parking line.

[0159] The reference parking line refers to the parking line used as a reference object.

[0160] As an example, in step S901, the vehicle-mounted controller can determine the reference parking line according to all target parking lines in the set of parking lines. Specifically, any one of the target parking lines in any set of parking lines can be used as the reference parking line. For example, the outermost target parking line can be determined as the reference parking line.

[0161] As an example, in step S902, after the vehicle-mounted controller determines the reference parking line, it can calculate the line spacing between each target parking line and the reference parking line to determine whether they are the same parking line pointing to the ground based on this line spacing. In this example, the intersection point of the straight line perpendicular to the midpoint of the reference parking line and the target parking line can be determined, and the distance between this intersection point and the midpoint of the reference parking line is determined as the line spacing.

[0162] The preset spacing refers to the spacing set in advance, which can be determined according to the line width range of the parking line.

[0163] As an example, in step S903, when the line spacing between the target parking line and the reference parking line is less than the preset spacing, the vehicle-mounted controller determines that the spacing between the target parking line and the reference parking line is small, and it is very likely that they correspond to the same parking line on the road surface. Therefore, the target parking line and the reference parking line can be merged to obtain a merged parking line. Correspondingly, when the line spacing between the target parking line and the reference parking line is not less than the preset spacing, it means that the line spacing between the two parking lines is large and does not meet the parking line merging condition, so the target parking line is not merged onto the reference parking line, so as to achieve the purpose of only merging all target parking lines that are close to the reference parking line and have a similar angle into one merged parking line, which helps to reduce the computational complexity of subsequent corner detection and thus improve the processing efficiency.

[0164] In one embodiment, as Figure 10 shown, step S104, that is, obtaining the target parking space according to the parking line corner points and the parking space entrance detection frame, includes:

[0165] S1001: Obtain a valid parking space entrance according to the parking line corner points and the parking space entrance detection frame.

[0166] S1002: Obtain the target parking space according to the valid parking space entrance.

[0167] Among them, the valid parking space entrance refers to a valid parking space entrance, that is to say, a parking space entrance that can be used to determine the target parking space.

[0168] As an example, in step S1001, after the vehicle-mounted controller obtains the corner points of the parking space line and the detection frame of the parking space entrance, it can determine whether the corner points of the parking space line are within the detection frame of the parking space entrance. If the corner points of the parking space line are within the detection frame of the parking space entrance, it means that the corner points of the parking space line determined based on the semantic segmentation result of the parking space line input by YOLOP are within the detection frame of the parking space entrance output by YOLOP, and the two detection results correspond to each other. The valid parking space entrance can be determined according to the corner points of the parking space line within the detection frame of the parking space entrance; if the corner points of the parking space line are not within the detection frame of the parking space entrance, it means that the corner points of the parking space line determined based on the semantic segmentation result of the parking space line input by YOLOP are not within the detection frame of the parking space entrance output by YOLOP, and the two detection results do not correspond, and the valid parking space entrance cannot be determined.

[0169] As an example, in step S1002, after the vehicle-mounted controller obtains the valid parking space entrance, it can use the pre-set parking space fitting logic to fit the valid parking space entrance to obtain the target parking space. Among them, the parking space fitting logic is a pre-set processing logic for fitting the parking space according to the valid parking space entrance. Generally speaking, the valid parking space entrance includes two corner points of the parking space line located in the detection frame of the parking space entrance. The remaining two corner points of the parking space line can be deduced according to the two corner points of the parking space line in the valid parking space entrance and the included angle of the target parking space line. The target parking space is fitted according to the four corner points of the parking space line.

[0170] In this embodiment, first, according to the corner points of the parking space line and the detection frame of the parking space entrance, the valid parking space entrance is determined to ensure that the corner points of the parking space line after the semantic segmentation result of the parking space line output by YOLOP are detected are within the detection frame of the parking space entrance output by YOLOP; then, according to the valid parking space entrance, the target parking space is determined, which can ensure the accuracy of the target parking space detection.

[0171] In one embodiment, as Figure 11 shown, step S1001, that is, obtaining the valid parking space entrance according to the corner points of the parking space line and the detection frame of the parking space entrance, includes:

[0172] S1101: Determine whether the corner points of the parking space line are within the detection frame of the parking space entrance;

[0173] S1102: If the corner points of the parking space line are within the detection frame of the parking space entrance, then determine the corner points of the parking space line as valid corner points;

[0174] S1103: Obtain the valid parking space entrance based on the parking space entrance detection frame and the valid corner points.

[0175] As an example, in step S1101, the vehicle-mounted controller first determines whether the corner points of the parking space line are within the parking space entrance detection frame to determine whether the corner points of the parking space line are valid corner points. In this example, when the corner point of the parking space line is the intersection of at least two parking space lines, it is also necessary to first determine whether the intersection of at least two parking space lines is within the panoramic top view or within the parking space line contour image. Only when the intersection of the parking space lines is within the image will it be further determined whether the effect of the parking space line is within the parking space entrance detection frame; if the intersection of the parking space lines is not within the image, it is impossible for it to be within the parking space entrance detection frame. Therefore, there is no need to perform subsequent judgments, which can save computing resources.

[0176] As an example, in step S1102, when the vehicle-mounted controller determines that the corner point of the parking space line is within the parking space entrance detection frame, it can determine that the corner point of the parking space line is a valid corner point. The valid corner point here can be understood as the corner point that can be used to fit and determine the valid parking space entrance.

[0177] As an example, in step S1103, when the vehicle-mounted controller determines that there are valid corner points, it can obtain the number of valid corner points in the parking space entrance detection frame. If the number of valid corner points is two, the remaining two valid corner points can be directly derived based on the two valid corner points in the parking space entrance detection frame and the included angle of the target parking space line. Based on the four valid corner points, the target parking space is fitted. If the number of valid corner points is one, then first, based on the parking space entrance detection frame, another valid corner point is generated in the parking space entrance detection frame. For example, another valid corner point can be generated symmetrically; then the remaining two valid corner points are derived based on the two valid corner points in the parking space entrance detection frame and the included angle of the target parking space line. Based on the four valid corner points, the target parking space is fitted.

[0178] In one embodiment, step S102, that is, the network output result further includes the type of parking space;

[0179] Correspondingly, as Figure 12 shown, step S1002, that is, obtaining the target parking space based on the valid parking space entrance, includes:

[0180] S1201: Obtain the included angle of the parking space and the fitting line length according to the type of parking space;

[0181] S1202: Obtain the target parking space based on the valid parking space entrance, the included angle of the parking space, and the fitting line length.

[0182] Among them, the parking space type is the parking space type output by YOLOP. As an example, according to the shape of the parking space entrance, it can be divided into parking space types such as I-shaped parking spaces, L-shaped parking spaces, U-shaped parking spaces, and T-shaped parking spaces. According to the geometric shape of the parking space and the included angle of the parking space entrance, it can be divided into types such as perpendicular parking spaces, horizontal parking spaces, inclined parking spaces, and special-shaped parking spaces.

[0183] Among them, the parking space included angle refers to the included angle between two intersecting parking space lines in the parking space corresponding to the parking space type, specifically referring to the included angle between the parking space line where the effective parking space entrance is located and the parking space line intersecting with it. The fitting line length refers to the length of the parking space length intersecting with the parking space line where the effective parking space entrance is located.

[0184] As an example, in step S1201, after the vehicle-mounted controller obtains the parking space type output by YOLOP, it can query the pre-set parking space information table according to the parking space type, and obtain the parking space included angle and fitting line length corresponding to the parking space type from the parking space information table, so as to perform parking space fitting operations according to the obtained parking space included angle and fitting line length.

[0185] As an example, in step S1202, the vehicle-mounted controller can perform parking space fitting according to the effective parking space entrance, parking space included angle, and fitting line length determined in the parking space entrance detection frame to obtain the target parking space line. For example, it can start from the two effective corner points of the effective parking space entrance, perform linear fitting according to the parking space included angle, obtain two fitting parking space lines connected to the effective corner points, so that the length of the fitting parking space line is the fitting line length, thereby determining the remaining two effective corner points; finally, obtain the target parking space according to the determined four effective corner points. The fitting parking space line here refers to the parking space line fitted according to the effective parking space entrance, parking space included angle, and fitting line length.

[0186] In this example, the parking space included angle and fitting line length determined according to the parking space type recognized by YOLOP can be combined with the effective parking space entrance to perform parking space fitting, and the target parking space can be obtained. Parking space detection can be performed according to different parking space types to ensure the accuracy of parking space detection for parking space types such as I-shaped parking spaces, L-shaped parking spaces, U-shaped parking spaces, and T-shaped parking spaces, or to ensure the accuracy of parking space detection for parking space types such as perpendicular parking spaces, horizontal parking spaces, inclined parking spaces, and special-shaped parking spaces.

[0187] It should be understood that the magnitudes of the sequence numbers of the steps in the above embodiments do not mean the order of execution. The order of execution of each process should be determined according to its function and internal logic, and should not constitute any limitation to the implementation process of the embodiments of the present invention.

[0188] In one embodiment, a vehicle-mounted controller is provided, which includes a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the computer program, the parking space detection method in the above embodiment is implemented. For example Figure 1 as shown in S101 - S104, or Figures 1 to 12 as shown in [reference not provided]. To avoid repetition, it will not be elaborated here.

[0189] In one embodiment, a vehicle-mounted controller is provided, which includes the above vehicle-mounted controller. When the computer program is executed, the parking space detection method in the above embodiment is implemented. For example Figure 1 as shown in S101 - S104, or Figures 1 to 12 as shown in [reference not provided]. To avoid repetition, it will not be elaborated here.

[0190] Those of ordinary skill in the art can understand that all or part of the processes in the above embodiment methods can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above methods. Among them, any reference to a memory, storage, database, or other medium used in the embodiments provided in the present application can include non-volatile and / or volatile memories. Non-volatile memories can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memories can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and Rambus dynamic RAM (RDRAM), etc.

[0191] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the above division of each functional unit and module is used as an example. In practical applications, the above functions can be allocated to different functional units and modules according to needs, that is, the internal structure of the vehicle-mounted controller can be divided into different functional units or modules to complete all or part of the functions described above.

[0192] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements on some of the technical features; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the various embodiments of the present invention, and should all be included in the protection scope of the present invention.

Claims

1. A parking space detection method, characterized in that, it includes: Obtain a panoramic top view; Use a panoramic driving perception network to identify the panoramic top view, obtain a network output result, and the network output result includes a parking space line semantic segmentation result and a parking space entrance detection box; Preprocess the parking space line semantic segmentation result to obtain a parking space line contour image; Perform parking space line detection on the parking space line contour image to obtain a target parking space line; Obtain a target angle range, and the target angle range includes at least one parking space line angle range; classify the target parking space line according to at least one of the parking space line angle ranges to obtain a parking space line set corresponding to at least one of the parking space line angle ranges; Merge all the target parking space lines in each parking space line set to obtain a merged parking space line corresponding to each parking space line set; Each parking space line set corresponds to one merged parking space line; The merged parking space line refers to a parking space line formed by merging all the target parking space lines in a parking space line set; Perform corner detection on the merged parking space lines corresponding to at least one of the parking space line sets to obtain parking space line corner points; Obtain a target parking space according to the parking space line corner points and the parking space entrance detection box.

2. The parking space detection method according to claim 1, characterized in that, the obtaining of the panoramic top view includes: Obtain M single-camera images, where M≥2; Perform distortion correction and inverse projection transformation on the M single-camera images to obtain M transformed camera images; Stitch the M transformed camera images to obtain a panoramic top view.

3. The parking space detection method according to claim 1, characterized in that, the preprocessing of the parking space line semantic segmentation result to obtain a parking space line contour image includes: Perform binarization processing on the parking space line semantic segmentation result to obtain a binarized image; Perform thinning processing on the binarized image to obtain a parking space line contour image.

4. The parking space detection method according to claim 1, characterized in that, the performing of parking space line detection on the parking space line contour image to obtain a target parking space line includes: Perform straight line detection on the parking space line contour image to obtain an original parking space line; Perform filtering processing on the original parking space line to obtain a target parking space line.

5. The parking space detection method according to claim 4, characterized in that, the performing of filtering processing on the original parking space line to obtain a target parking space line includes: Obtain the parking space line length and the parking space line angle of the original parking space line; Perform filtering processing according to the parking space line length and the parking space line angle of the original parking space line to obtain a target parking space line.

6. The parking space detection method according to claim 5, characterized in that, the performing of filtering processing according to the parking space line length and the parking space line angle of the original parking space line to obtain a target parking space line includes: Obtain a target length range and a target angle range; Obtain a length detection result according to the parking space line length of the original parking space line and the target length range; Obtain an angle detection result according to the parking space line angle of the original parking space line and the target angle range; Filter the original parking space lines according to the length detection result and the included angle detection result to obtain target parking space lines.

7. The parking space detection method according to claim 1, wherein, the merging of all target parking space lines in each parking space line set to obtain a merged parking space line corresponding to each parking space line set includes: determining a reference parking space line in the parking space line set according to all target parking space lines in each parking space line set; obtaining the line spacing between each target parking space line and the reference parking space line in the parking space line set; if the line spacing is less than a preset spacing, merge the target parking space line and the reference parking space line to obtain a merged parking space line.

8. The parking space detection method according to claim 1, wherein, the obtaining of the target parking space according to the corner points of the parking space line and the parking space entrance detection frame includes: obtaining a valid parking space entrance according to the corner points of the parking space line and the parking space entrance detection frame; obtaining the target parking space according to the valid parking space entrance.

9. The parking space detection method according to claim 8, wherein, the obtaining of the valid parking space entrance according to the corner points of the parking space line and the parking space entrance detection frame includes: judging whether the corner points of the parking space line are within the parking space entrance detection frame; if the corner points of the parking space line are within the parking space entrance detection frame, determine the corner points of the parking space line as valid corner points; obtaining the valid parking space entrance according to the parking space entrance detection frame and the valid corner points.

10. The parking space detection method according to claim 8, wherein, the network output result further includes the type of the parking space; the obtaining of the target parking space according to the valid parking space entrance includes: obtaining the included angle of the parking space and the fitting line length according to the type of the parking space; obtaining the target parking space according to the valid parking space entrance, the included angle of the parking space and the fitting line length.

11. An in-vehicle controller includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein, when the processor executes the computer program, the parking space detection method according to any one of claims 1 to 10 is implemented.

12. A vehicle, wherein, it includes the in-vehicle controller according to claim 11.

Citation Information

Patent Citations

  • A parking space detection method and device based on vision

    CN109685000A

  • Vision-based detection method for surrounding obstacles in automobile parking

    CN113762134A