Parking space correction method and device

By using parking space line segments and parking space correction information in automatic parking technology for heading correction, the problem of inaccurate heading caused by parking spot corner detection deviation in the prior art is solved, and the passing rate of vehicle parking posture is improved.

CN119763357APending Publication Date: 2025-04-04UISEE SHANGHAI AUTOMOTIVE TECH LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411998852.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-31
Publication Date
2025-04-04

AI Technical Summary

Technical Problem

The existing automatic parking technology has deviations in the detection of parking space corner points, resulting in inaccurate parking space heading, which in turn affects the passing rate of the vehicle's parking posture.

Method used

By obtaining the image around the vehicle, determining the parking space line segment, and determining the parking space correction information based on the parking space type and parking space line segment, the heading correction of the parking space to be corrected is carried out.

Benefits of technology

It improves the accuracy of the parking space and improves the passing rate of the vehicle's parking posture, ensuring that the vehicle can accurately park the parking space.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119763357A_ABST
    Figure CN119763357A_ABST
Patent Text Reader

Abstract

The present disclosure relates to a parking space correction method and device. The parking space correction method includes: obtaining an image of the surroundings of the vehicle; determining a parking space line segment according to the image of the surroundings of the vehicle; determining parking space correction information according to the parking space type and the parking space line segment; wherein the parking space correction information indicates parking space heading information; correcting the parking space to be corrected at the current moment according to the parking space correction information to obtain the first corrected parking space at the current moment. The present disclosure can correct the parking space to be corrected, improve the accuracy of the parking space heading, and thereby improve the qualified rate of the vehicle parking posture.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the technical field of intelligent parking, and in particular to a parking space correction method and device. Background Art

[0002] With the development of autonomous driving technology, automatic parking technology has emerged. Automatic parking is divided into three stages: parking space perception, decision-making planning and control. Among them, parking space perception is the basis of automatic parking. Whether the parking space can be accurately extracted determines whether the automatic parking task can be completed accurately.

[0003] Existing automatic parking technologies are mainly based on traditional image processing methods or deep learning methods, which construct parking spaces by detecting the corner points of parking spaces. However, the existing methods have deviations in the detection of the center position of the corner points, resulting in inaccurate heading of the constructed parking spaces, which in turn causes the parking posture of the vehicle to fail. Summary of the invention

[0004] In order to solve the above technical problems or at least partially solve the above technical problems, the present disclosure provides a parking space correction method and device to correct the parking space to be corrected, improve the accuracy of the parking space heading, and thereby improve the pass rate of the vehicle parking posture.

[0005] In a first aspect, the present disclosure provides a parking space correction method, comprising:

[0006] Acquire images around the vehicle;

[0007] Determine a parking space line segment according to the vehicle surrounding image;

[0008] Determine parking space correction information according to the parking space type and the parking space line segment; wherein the parking space correction information indicates parking space heading information;

[0009] The parking space to be corrected at the current moment is corrected according to the parking space correction information to obtain a first corrected parking space at the current moment.

[0010] In a second aspect, the present disclosure provides a parking space correction device, comprising:

[0011] An image acquisition module, used to acquire images around the vehicle;

[0012] A parking space line segment determination module, used to determine the parking space line segment according to the vehicle surrounding image;

[0013] A parking space correction information determination module, used to determine parking space correction information according to the parking space type and the parking space line segment; wherein the parking space correction information indicates parking space heading information;

[0014] The parking space correction module is used to correct the parking space to be corrected at the current moment according to the parking space correction information to obtain the first corrected parking space at the current moment.

[0015] In a third aspect, the present disclosure provides an electronic device, including:

[0016] memory and one or more processors;

[0017] Among them, the memory is communicatively connected to the one or more processors, and the memory stores instructions that can be executed by the one or more processors. When the instructions are executed by the one or more processors, the electronic device is used to implement the parking space correction method described in the first aspect of the present disclosure.

[0018] In a fourth aspect, the present disclosure provides a computer-readable storage medium having computer-executable instructions stored thereon. When the computer-executable instructions are executed by a computing device, they can be used to implement the parking space correction method described in the first aspect of the present disclosure.

[0019] Compared with the prior art, the technical solution provided by the embodiments of the present disclosure has the following advantages:

[0020] The technical solution provided by the embodiment of the present disclosure determines the parking space line segments based on the image around the vehicle, and then determines the parking space correction information indicating the parking space heading information based on the parking space type and the parking space line segments, and finally corrects the parking space to be corrected at the current moment according to the parking space correction information, so that the parking space to be corrected can be corrected to the same heading as indicated by the parking space correction information. The parking space line segments are determined based on the image around the vehicle, and can accurately reflect the line features of the parking space line, so that the parking space heading information obtained based on the parking space line segments is more accurate. Therefore, the above-mentioned parking space line segments can accurately indicate the parking space heading, so as to adjust the parking space to be corrected to the accurate parking space heading. In this way, the embodiment of the present disclosure can give corresponding parking space correction information for different types of parking spaces, realize the heading correction of different types of parking spaces to be corrected, thereby improving the accuracy of the parking space heading and improving the qualified rate of the vehicle parking posture. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.

[0022] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0023] Figure 1 A schematic diagram of a flow chart of a parking space correction method provided in an embodiment of the present disclosure;

[0024] Figure 2 A functional module block diagram of a parking space correction device provided in an embodiment of the present disclosure;

[0025] Figure 3 A schematic diagram of the structure of an electronic device suitable for implementing the embodiment of the present disclosure is provided for an embodiment of the present disclosure. DETAILED DESCRIPTION

[0026] In order to more clearly understand the above-mentioned objectives, features and advantages of the present disclosure, the scheme of the present disclosure will be further described below. It should be noted that the embodiments of the present disclosure and the features in the embodiments can be combined with each other without conflict.

[0027] In the following description, many specific details are set forth to facilitate a full understanding of the present disclosure, but the present disclosure may also be implemented in other ways different from those described herein; it is obvious that the embodiments in the specification are only part of the embodiments of the present disclosure, rather than all of the embodiments.

[0028] The parking spaces to be corrected involved in the embodiments of the present disclosure are parking spaces that may have heading deviations (i.e., the detected parking spaces are tilted at a certain angle relative to the actual parking spaces) detected based on traditional image processing methods or deep learning methods. Among them, the deep learning-based methods include but are not limited to deep neural network methods such as convolutional neural networks (CNNs) and target detection networks (such as YOLO, Faster R-CNN, etc.). The relevant detection of the parking spaces to be corrected involved in the embodiments of the present disclosure is described by taking the method based on the target detection network as an example.

[0029] In the related art, the object detection network needs to learn and train a large amount of annotated image data. Therefore, when the object detection network is used to detect the corner points of the parking space, it may detect wrong values, resulting in inaccurate center positions of the detected corner points, and further resulting in deviations in the heading of the parking space constructed based on the corner points.

[0030] In view of the above technical problems, the embodiments of the present disclosure provide a parking space correction method. The method is applicable to situations where an unmanned vehicle performs automatic parking or assisted parking at a parking spot with parking space lines, such as a parking lot. Based on the parking space correction method provided by the embodiments of the present disclosure, it is possible to determine parking space correction information according to the parking space type and the parking space line segment, and perform heading correction on the parking space to be corrected according to the parking space correction information, so as to improve the accuracy of detecting the parking space heading and improve the pass rate of the vehicle parking posture.

[0031] In some embodiments, the driverless car can support manual driving and intelligent driving. When the driverless car is in manual driving mode, the driver can drive the vehicle by operating the device that controls the vehicle's travel, such as the brake pedal, steering wheel, and accelerator pedal. When the driverless car is in intelligent driving mode, the intelligent driving system can perceive the surrounding environment and locate the driverless car based on the sensing information of the sensor group, and make planning decisions on the driving of the driverless car based on the sensing information and positioning results, and generate control instructions based on the planning decisions, and send the control instructions to the underlying execution system for controlling the vehicle's travel. In the intelligent driving mode, the steering of the driverless car is achieved by the electric power steering system. In some embodiments, whether the driverless car is in manual driving mode or intelligent driving mode, the intelligent driving system determines the parking space to be corrected and corrects the parking space to be corrected. What is different is that when the driverless car is in manual driving mode, the corrected parking space is displayed on the display screen, and the driver controls the driverless car to park according to the corrected parking space, thereby realizing assisted parking; when the driverless car is in intelligent driving mode, the intelligent driving system generates a parking path and control instructions based on the corrected parking space, and sends the control instructions to the underlying execution system to control the driverless car to park, thereby realizing automatic parking.

[0032] Figure 1 The following is a flow chart of a parking space correction method provided by an embodiment of the present disclosure. The method is applicable to low computing power platforms and can perform heading correction on parking spaces detected by a target detection network. Figure 1 As shown, the method comprises the following steps:

[0033] S110: Acquire an image of the surroundings of the vehicle.

[0034] Exemplarily, the image around the vehicle can be a 360-degree panoramic image around the vehicle. Specifically, four fisheye cameras are installed around the vehicle body, and the installation positions of the four fisheye cameras are respectively the outermost ends of the left and right rearview mirrors of the car, the center of the intersection of the car hood and the air intake grille, and the center of the lower edge of the rear license plate. After the four fisheye cameras are installed, the four fisheye cameras are calibrated respectively using the spherical perspective projection calibration method to obtain the distortion coefficients of the four fisheye cameras respectively. Afterwards, in the parking scene, the vehicle collects four fisheye images in real time through the four fisheye cameras. According to the distortion coefficients of the four fisheye cameras, based on the polynomial approximate projection model of the fisheye camera proposed by Kannala on the basis of the isometric projection model, the collected four fisheye images are respectively subjected to distortion correction. Therefore, the distortion of the image can be eliminated through distortion correction, and the originally parallel parking space lines in the image can be prevented from having a certain angle, which helps to ensure the accuracy of subsequent parking space line recognition. Then, the vehicle stitches the distortion-corrected four-way fisheye images into a bird's-eye view based on the internal and external parameters of the four-way fisheye cameras, that is, a 360-degree panoramic image around the vehicle.

[0035] S120: Determine parking space line segments according to the image surrounding the vehicle.

[0036] The image around the vehicle contains pixels of different semantic categories, and pixels of the same semantic category represent the same object. Therefore, semantic segmentation can be used to semantically classify each pixel in the image around the vehicle to obtain parking line pixels. Then, the parking line pixels are fitted into multiple parking line segments through the line detection algorithm.

[0037] In some embodiments, determining a parking space line segment according to an image surrounding the vehicle includes:

[0038] S121, performing semantic segmentation on the image around the vehicle to obtain a parking space line semantic segmentation result;

[0039] S122, performing binarization processing on the parking space line semantic segmentation result to obtain a parking space line binary image;

[0040] S123, performing straight line fitting on the parking space line binary image to obtain parking space line segments.

[0041] Specifically, the parking line semantic segmentation result is a pixel point set whose semantic category is the parking line. A deep learning method can be used to semantically segment the image around the vehicle. Afterwards, the parking line semantic segmentation result is binarized to obtain a parking line binary image, that is, a parking line contour image, so as to avoid interference from other information in the parking line semantic segmentation result except the parking line contour, and improve the detection efficiency and accuracy of the parking line. When the parking line semantic segmentation result is binarized, the pixel value belonging to the parking line area in the parking line semantic segmentation result is specifically determined as 255, and the pixel value not belonging to the parking line area is determined as 0, so as to obtain a binary image with all pixel values ​​of 255 or 0. After the parking line semantic segmentation result is binarized, a straight line detection algorithm can be used to perform straight line detection on the parking line binary image. Specifically, a Radon transform detection algorithm or a Hough transform detection algorithm can be used, but not limited to, to perform straight line detection on the parking line binary image; the least squares method can also be used to fit the straight line.

[0042] In some embodiments, after the parking space line semantic segmentation result is binarized to obtain a parking space line binary image, the binary image may be preprocessed, which may include: reducing the binary image to half its size to increase the processing speed; and performing morphological dilation on the binary image to reduce edge fragmentation.

[0043] Based on the above embodiment, the parking space line binary image is fitted with a straight line. Specifically, the following steps can be performed: first, the Hough transform detection algorithm is used to detect line segments from the binary image, the detected line segments are traversed and the length is calculated, and the line segments with a length between [10cm, 200cm] (which can be adjusted according to the actual situation) are retained to remove the line segments that are too short or too long. Then, the line segments are grouped according to the slope and spatial position of the line segments to ensure that a group of line segments belongs to the same parking space line segment. Exemplarily, for each line segment, if the slope difference is less than the set slope difference threshold and the minimum distance between the line segments is less than the set distance threshold, the line segment is added to the group. If the line segment cannot match any existing group, a new group is created. Further, all point pairs in the group are traversed, the Euclidean distance is calculated, and the point pair with the largest distance is found; the line segment of the point pair with the largest distance is extended or shortened to eliminate the influence of the two ends of the garage line and increase the accuracy of the line segment. Finally, the least squares method is used to perform straight line fitting on the points in each line segment group to obtain the parking space line segment and its two end points and save them.

[0044] After performing straight line fitting on the parking space line binary image, the vertical distances from all points in the line segment group to the fitting straight line can be calculated, and the square error and standard deviation can be calculated as quality evaluation indicators of the fitting results.

[0045] S130: Determine parking space correction information according to the parking space type and the parking space line segment.

[0046] The parking space correction information indicates the parking space heading information, which is used to instruct the vehicle to adjust the heading of the parking space to be corrected to the heading indicated by the parking space heading information. The parking space type can be directly output by the target detection network, including vertical parking spaces, oblique parking spaces, or horizontal parking spaces. The correction method of horizontal parking spaces is similar to that of vertical parking spaces. The embodiments of the present disclosure are described by taking the correction of vertical parking spaces and oblique parking spaces as examples.

[0047] S140: Correct the parking space to be corrected at the current moment according to the parking space correction information to obtain a first corrected parking space at the current moment.

[0048] In one embodiment, based on S130 and S140, the correction steps of the vertical parking space are described below.

[0049] The parking space correction information includes the parking space line angle of the parking space after the first correction. According to the parking space type and the parking space line segment, the parking space correction information is determined, including the following steps:

[0050] S131, if the parking space type is determined to be a vertical parking space, the parking space line segments are grouped according to a plurality of preset angle ranges to obtain a plurality of line segment groups;

[0051] S132 performs 90-degree matching on the multiple line segment groups to obtain a first line segment group and a second line segment group;

[0052] The angle of the parking space line segments of the first line segment group is smaller than the angle of the parking space line segments of the second line segment group.

[0053] S133, adding 90 degrees to the angle of the parking space line segments of the first group of line segments, and averaging the angle of the parking space line segments of the second group of line segments to obtain the parking space line angle of the first corrected parking space.

[0054] Specifically, in the image coordinate system (the upper left corner vertex of the image can be used as the origin), the angle of each parking space line segment is determined (it can be calculated according to the coordinates of the two end points of the line segment), and the angle of each parking space line segment is matched with multiple preset angle ranges (for example, (0°, 5°], (5°, 15°], (15°, 25°], ..., (85°, 90°]), and the parking space line segments belonging to the same preset angle range are grouped into one group to obtain multiple line segment groups. Then, the multiple line segment groups are matched by 90 degrees, that is, every two line segment groups are compared to determine the parking space line segments of the two line segment groups. The angle difference of the line segments is about 90 degrees (for example, [85°, 90°]), and the first group of line segments and the second group of line segments are obtained. Then the parking line segments in the first group of line segments and the second group of line segments must belong to the two parking lines perpendicular to each other in the vertical parking space. In order to make the parking line angle of the first corrected parking space more accurate, the angle of the parking line segments of the first group of line segments with a smaller angle is added by 90 degrees, and then the angle of the parking line segments of the second group of line segments is averaged to obtain the parking line angle of the first corrected parking space. It can be understood that the parking line angle refers to the angle of the parking line corresponding to the second group of line segments.

[0055] Accordingly, the parking space to be corrected at the current moment is corrected according to the parking space correction information, including the following steps:

[0056] S141, obtaining the target corner point with the highest confidence at the entrance of the parking space to be corrected;

[0057] S142: Rotate the parking space line angle of the parking space to be corrected around the target corner point to the parking space line angle of the first corrected parking space.

[0058] Among them, the confidence reflects the accuracy of the detection, and the higher the confidence, the higher the accuracy. Specifically, the target corner point can be detected by the target detection network, and the target detection network can output the confidence score value of each corner point at the entrance of the parking space to be corrected, so that the target corner point with the highest confidence can be determined based on the confidence score value. In this way, the parking line angle of the parking space to be corrected is rotated around the target corner point to the parking line angle of the parking space after the first correction, which can not only correct the heading of the parking space to be corrected, but also adjust the position of the parking space to be corrected to the accurate position, that is, correct the position of the parking space to be corrected.

[0059] In particular, for some parking spots, the garage line includes not only the parking space line, but also the solid line outside the garage. The solid line outside the garage is usually a continuous white or yellow line drawn on the ground along the outermost edge of the garage building structure. Its purpose is to clearly demarcate the outer boundary of the garage and distinguish it from the surrounding passages, other parking spaces or public areas. For vertical parking spaces, the heading of the parking space is perpendicular to the solid line outside the garage, so the parking space to be corrected can be corrected by detecting the solid line outside the garage, and then the optimal corrected parking space can be selected.

[0060] Specifically, in some embodiments, the method also includes: determining a solid line segment outside the garage based on an image surrounding the vehicle (refer to the method for determining the parking line segment described in the embodiments of the present disclosure); rotating the parking space to be corrected around the target corner point to be perpendicular to the solid line segment outside the garage to obtain the second corrected parking space at the current moment; determining a first angle difference based on the difference between the parking line angle of the first corrected parking space at the current moment and the parking line angle of the first corrected parking space at the previous moment; determining a second angle difference based on the difference between the parking line angle of the second corrected parking space at the current moment and the parking line angle of the second corrected parking space at the previous moment; if both the first angle difference and the second angle difference are less than a preset angle difference threshold, the first corrected parking space or the second corrected parking space at the current moment corresponding to the smaller of the first angle difference and the second angle difference is used as the final corrected parking space at the current moment.

[0061] In order to obtain the parking space line angle of the first corrected parking space at the previous moment and the parking space line angle of the second corrected parking space at the previous moment, after each obtaining of the first corrected parking space and the second corrected parking space, the first corrected parking space and the second corrected parking space are saved as corresponding historical corrected parking spaces in their respective time sequence.

[0062] In addition, when the above-mentioned first angle difference and the second angle difference are both greater than or equal to the preset angle difference threshold (empirical value), it is considered that the parking space detection result based on the target detection network is more accurate, and the parking space to be corrected at the current moment is used as the final corrected parking space at the current moment.

[0063] In another embodiment, based on S130 and S140, the steps for correcting the oblique parking space are described below.

[0064] The parking space correction information includes the average distance from the parking space line segment at the long side of the parking space to the long side of the parking space to be corrected, and the target positions of the two corner points at the end of the parking space. Determining the parking space correction information according to the parking space type and the parking space line segment includes the following steps:

[0065] S131', determining that the parking space type is an oblique parking space, obtaining the positions of two corner points at the entrance of the parking space to be corrected, the length of the long side of the parking space, and the parking space line segment at the position of the long side of the parking space;

[0066] Among them, the positions of the two corner points at the entrance of the parking space to be corrected can be detected by the target detection network; the length of the long side of the parking space is usually a fixed length and can be set in advance.

[0067] S132′, calculating the average angle of the parking space line segment at the long side of the parking space, and the average distance from the parking space line segment at the long side of the parking space to the long side of the parking space to be corrected;

[0068] S133', determining the target positions of the two corner points at the end of the parking space according to the positions of the two corner points at the entrance of the parking space to be corrected, the length of the long side of the parking space and the average angle;

[0069] For example, the positions of the two corner points at the entrance of the parking space are known ((x1, y1) and (x2, y2)) and the average angle θ, the length of the long side of the parking space is 5.1 meters, and the positions of the two corner points at the end of the parking space are defined as (x3, y3) and (x4, y4), respectively. Then x4=x1-0.51cos(θ), y4=y1-0.51sin(θ), x3=x2-0.51cos(θ), y3=y2-0.51sin(θ).

[0070] S134', the parking space correction information includes the average distance from the parking space line segment at the long side of the parking space to the long side of the parking space to be corrected, and the target positions of the two corner points at the end of the parking space.

[0071] Accordingly, the parking space to be corrected at the current moment is corrected according to the parking space correction information, including the following steps:

[0072] S141', correcting the positions of the two corner points at the end of the parking space to be corrected at the current moment to the target position;

[0073] S142', translating the parking space to be corrected after the corner points are corrected by an average distance along a preset direction, wherein the preset direction is parallel to a line connecting two corner points at the entrance of the parking space to be corrected, and points from the long side of the parking space to be corrected to the parking space line segment at the corresponding position.

[0074] In some embodiments, before determining the parking space correction information according to the parking space type and the parking space line segment, the method may further include: filtering the parking space line segments according to the line segment length to select parking space line segments with high credibility. For example, a line segment length threshold may be set according to an empirical value, and parking space line segments with lengths less than the line segment length threshold may be filtered out to obtain parking space line segments with high credibility. Then, parking space correction is performed according to parking space line segments with high credibility, thereby further improving the accuracy of parking space correction.

[0075] The parking space correction method provided in this embodiment determines the parking space line segments based on the image around the vehicle, and then determines the parking space correction information indicating the parking space heading information based on the parking space type and the parking space line segments, and finally corrects the parking space to be corrected at the current moment according to the parking space correction information, so that the parking space to be corrected can be corrected to the same heading as indicated by the parking space correction information. The parking space line segments are determined based on the image around the vehicle, and can accurately reflect the line characteristics of the parking space line, so that the parking space heading information obtained based on the parking space line segments is more accurate. Therefore, the above-mentioned parking space line segments can accurately indicate the parking space heading, so as to adjust the parking space to be corrected to the accurate parking space heading. In this way, this embodiment can give corresponding parking space correction information for different types of parking spaces, realize heading correction for different types of parking spaces to be corrected, thereby improving the accuracy of the parking space heading and improving the qualified rate of the vehicle parking posture.

[0076] At present, during the parking process, the vehicle is likely to hit a corner point at the entrance of the parking space, so that the vehicle cannot build a parking space according to the corner point, and thus cannot park. In this regard, in some embodiments, the method further includes: when a complete parking space is not detected at the current moment, obtaining a historically corrected parking space; if a historically corrected parking space exists, retrieving a parking space line through the corner point detected at the current moment; if at least one parking space line is retrieved, using the historically corrected parking space along the detected corner point and the retrieved parking space line to complete the parking space.

[0077] In this embodiment, if the parking space exists after historical correction, it means that the parking space was detected before, but due to occlusion and other problems, the parking space cannot be detected at the current moment. Based on this, the parking space line connected to the corner point can be retrieved according to the detected corner point. If at least one parking space line is retrieved, the parking space is completed using the corner point detected after historical correction and the retrieved parking space line. In this way, the parking task of the vehicle can be completed by completing the parking space.

[0078] In some embodiments, after the parking space to be corrected at the current moment is corrected according to the parking space correction information to obtain the first corrected parking space at the current moment, it also includes: weighted filtering the corner point position in the first corrected parking space at the current moment and the corner point position in the first corrected parking space at the most recent two moments to obtain the target corner point position.

[0079] The parking space position can be smoothed by performing weighted filtering on the corner point position of the first corrected parking space at the current moment and the corner point position of the first corrected parking space at the most recent two moments.

[0080] Specifically, the weight calculation formula is:

[0081] w[i]=e -0.5*i .

[0082] An exponential decay formula is used, i is the number of filtered frames, the larger i is, the smaller the weight is, and the constant -0.5 that controls the decay speed is a designed parameter that determines how fast the weight decreases. Each weight represents the contribution of the corresponding frame. The current frame has the largest weight (exponential decay), and the farther away from the current frame, the smaller the weight is. This design can reduce the interference of historical frames. The corrected parking spaces are processed in time series, and higher weights are given to the recently detected corrected parking spaces in the time series to reduce the impact of historical data.

[0083] Figure 2 This is a functional module block diagram of the parking space correction device provided by the embodiment of the present disclosure. Figure 2 As shown, the parking space correction device includes an image acquisition module 201, a parking space line segment determination module 202, a parking space correction information determination module 203 and a parking space correction module 204.

[0084] The image acquisition module 201 is used to acquire the image around the vehicle;

[0085] The parking space line segment determination module 202 is used to determine the parking space line segment according to the vehicle surrounding image;

[0086] The parking space correction information determination module 203 is used to determine the parking space correction information according to the parking space type and the parking space line segment; wherein the parking space correction information indicates the parking space heading information;

[0087] The parking space correction module 204 is used to correct the parking space to be corrected at the current moment according to the parking space correction information to obtain the first corrected parking space at the current moment.

[0088] In some embodiments, the parking space line segment determination module 202 is specifically used to:

[0089] Perform semantic segmentation on the image around the vehicle to obtain the semantic segmentation result of the parking space line;

[0090] Binarize the parking space line semantic segmentation result to obtain a parking space line binary image;

[0091] Perform straight line fitting on the binary image of parking space lines to obtain parking space line segments.

[0092] In some embodiments, the parking space correction information determination module 203 is specifically used to:

[0093] If it is determined that the parking space type is a vertical parking space, the parking space line segments are grouped according to a plurality of preset angle ranges to obtain a plurality of line segment groups;

[0094] Matching the multiple line segment groups at 90 degrees to obtain a first line segment group and a second line segment group, wherein the angle of the parking space line segments of the first line segment group is smaller than the angle of the parking space line segments of the second line segment group;

[0095] After adding 90 degrees to the angle of the parking space line segments of the first group of line segments, the angle of the parking space line segments of the second group of line segments is averaged to obtain the parking space line angle of the first corrected parking space;

[0096] The parking space correction information includes the parking space line angle of the first corrected parking space.

[0097] In some embodiments, the parking space correction module 204 is specifically used to:

[0098] Obtain the target corner point with the highest confidence at the entrance of the parking space to be corrected;

[0099] The parking space line angle of the parking space to be corrected is rotated around the target corner point to the parking space line angle of the first corrected parking space.

[0100] In some embodiments, the apparatus further includes a parking space correction optimization module, which is used to:

[0101] According to the image around the vehicle, determine the solid line segment outside the garage;

[0102] The parking space to be corrected is rotated around the target corner point to be perpendicular to the solid line segment outside the garage, and the second corrected parking space at the current moment is obtained;

[0103] Determine a first angle difference according to a difference between a parking space line angle of the first corrected parking space at a current moment and a parking space line angle of the first corrected parking space at a previous moment;

[0104] Determine a second angle difference according to a difference between a parking space line angle of the second corrected parking space at a current moment and a parking space line angle of the second corrected parking space at a previous moment;

[0105] If both the first angle difference and the second angle difference are smaller than the preset angle difference threshold, the first corrected parking space or the second corrected parking space at the current moment corresponding to the smaller one of the first angle difference and the second angle difference is used as the final corrected parking space at the current moment.

[0106] In some embodiments, the parking space correction optimization module is further used to:

[0107] If the first angle difference and the second angle difference are both greater than or equal to the preset angle difference threshold, the parking space to be corrected at the current moment is used as the final corrected parking space at the current moment.

[0108] In some embodiments, the parking space correction information determination module 203 is specifically used to:

[0109] If the parking space type is determined to be an oblique parking space, the positions of the two corner points at the entrance of the parking space to be corrected, the length of the long side of the parking space, and the parking space line segment at the long side of the parking space are obtained;

[0110] Calculate the average angle of the parking space line segment at the long side of the parking space, and the average distance from the parking space line segment at the long side of the parking space to the long side of the parking space to be corrected;

[0111] According to the positions of the two corner points at the entrance of the parking space to be corrected, the length of the long side of the parking space and the average angle, the target positions of the two corner points at the end of the parking space are determined;

[0112] The parking space correction information includes the average distance from the parking space line segment at the long side of the parking space to the long side of the parking space to be corrected, and the target positions of the two corner points at the end of the parking space.

[0113] In some embodiments, the parking space correction module 204 is specifically used to:

[0114] Correct the positions of the two corner points at the end of the parking space to be corrected at the current moment to the target position;

[0115] The parking space to be corrected after the corner points are corrected is translated by an average distance along a preset direction, wherein the preset direction is parallel to the line connecting the two corner points at the entrance of the parking space to be corrected, and points from the long side of the parking space to be corrected to the parking space line segment at the corresponding position.

[0116] In some embodiments, the device further includes a parking space completion module, which is used to:

[0117] If no complete parking space is detected at the current moment, obtain the historical corrected parking space;

[0118] If the parking space exists after historical correction, the parking space line is retrieved through the corner point detected at the current moment;

[0119] If at least one parking space line is retrieved, the parking space is completed using the corner points detected along the historically corrected parking space and the retrieved parking space line.

[0120] In some embodiments, the apparatus further comprises a weighted filtering module, configured to:

[0121] After the parking space to be corrected at the current moment is corrected according to the parking space correction information to obtain the first corrected parking space at the current moment, the corner point position in the first corrected parking space at the current moment and the corner point position in the first corrected parking space at the most recent two moments are weighted filtered to obtain the target corner point position.

[0122] The parking space correction device disclosed in the above embodiments can execute the parking space correction method disclosed in the above embodiments, and has the same or corresponding beneficial effects. To avoid repetition, it will not be described again here.

[0123] An embodiment of the present disclosure also provides an electronic device, including: a memory and one or more processors; wherein the memory is communicatively connected to the one or more processors, and the memory stores instructions that can be executed by the one or more processors. When the instructions are executed by the one or more processors, the electronic device is used to implement the parking space correction method described in any embodiment of the present disclosure.

[0124] Figure 3 Schematic diagram of the structure of an electronic device suitable for implementing the embodiments of the present disclosure. Figure 3 As shown, the electronic device 300 includes a central processing unit (CPU) 301, which can perform various processes in the aforementioned embodiments according to a program stored in a read-only memory (ROM) 302 or a program loaded from a storage part 308 into a random access memory (RAM) 303. In the RAM 303, various programs and data required for the operation of the electronic device 300 are also stored. The CPU 301, the ROM 302, and the RAM 303 are connected to each other via a bus 304. An input / output (I / O) interface 305 is also connected to the bus 304.

[0125] The following components are connected to the I / O interface 305: an input section 306 including a keyboard, a mouse, etc.; an output section 307 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 308 including a hard disk, etc.; and a communication section 309 including a network interface card such as a LAN card, a modem, etc. The communication section 309 performs communication processing via a network such as the Internet. A drive 310 is also connected to the I / O interface 305 as needed. A removable medium 311, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 310 as needed, so that a computer program read therefrom is installed into the storage section 308 as needed.

[0126] In particular, according to an embodiment of the present disclosure, the method described above can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program tangibly contained on a readable medium, and the computer program includes a program code for executing the aforementioned obstacle avoidance method. In such an embodiment, the computer program can be downloaded and installed from a network through the communication part 309, and / or installed from the removable medium 311.

[0127] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the devices, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the road map or block diagram can represent a module, a program segment or a part of a code, and a part of a module, a program segment or a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flow chart, and the combination of boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0128] The units or modules involved in the embodiments described in the present disclosure may be implemented by software or hardware. The units or modules described may also be arranged in a processor, and the names of these units or modules do not constitute limitations on the units or modules themselves in some cases.

[0129] In addition, the embodiment of the present disclosure further provides a computer-readable storage medium, which may be the computer-readable storage medium included in the device described in the above embodiment; or may be a computer-readable storage medium that exists independently and is not assembled into the device. The computer-readable storage medium stores computer-executable instructions, which, when executed by the computing device, can be used to implement the parking space correction method described in any embodiment of the present disclosure.

[0130] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0131] The above description is only a specific embodiment of the present disclosure, so that those skilled in the art can understand or implement the present disclosure. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present disclosure. Therefore, the present disclosure will not be limited to the embodiments described herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A parking space correction method, characterized in that: include: Acquire images around the vehicle; Determine a parking space line segment according to the vehicle surrounding image; Determine parking space correction information according to the parking space type and the parking space line segment; wherein the parking space correction information indicates parking space heading information; The parking space to be corrected at the current moment is corrected according to the parking space correction information to obtain a first corrected parking space at the current moment.

2. The method according to claim 1, characterized in that Determining parking space correction information according to the parking space type and the parking space line segment includes: If it is determined that the parking space type is a vertical parking space, the parking space line segments are grouped according to a plurality of preset angle ranges to obtain a plurality of line segment groups; Matching the multiple line segment groups at 90 degrees to obtain a first line segment group and a second line segment group, wherein the angle of the parking space line segments of the first line segment group is smaller than the angle of the parking space line segments of the second line segment group; The angle of the parking space line segment of the first group of line segments is added by 90 degrees, and the average is calculated with the angle of the parking space line segment of the second group of line segments to obtain the parking space line angle of the first corrected parking space; The parking space correction information includes the parking space line angle of the first corrected parking space.

3. The method according to claim 2, characterized in that Correcting the parking space to be corrected at the current moment according to the parking space correction information includes: Obtaining the target corner point with the highest confidence at the entrance of the parking space to be corrected; The parking space line angle of the parking space to be corrected is rotated around the target corner point to the parking space line angle of the first corrected parking space.

4. The method according to claim 3, characterized in that The method further comprises: Determine a solid line segment outside the garage according to the image surrounding the vehicle; Rotate the parking space to be corrected around the target corner point to be perpendicular to the solid line segment outside the garage, to obtain a second corrected parking space at the current moment; Determine a first angle difference according to a difference between a parking space line angle of the first corrected parking space at a current moment and a parking space line angle of the first corrected parking space at a previous moment; Determine a second angle difference according to a difference between a parking space line angle of the second corrected parking space at a current moment and a parking space line angle of the second corrected parking space at a previous moment; If both the first angle difference and the second angle difference are smaller than a preset angle difference threshold, the first corrected parking space or the second corrected parking space at the current moment corresponding to the smaller one of the first angle difference and the second angle difference is used as the final corrected parking space at the current moment.

5. The method according to claim 4, characterized in that The method further comprises: If the first angle difference and the second angle difference are both greater than or equal to a preset angle difference threshold, the parking space to be corrected at the current moment is used as the final corrected parking space at the current moment.

6. The method according to claim 1, characterized in that Determining parking space correction information according to the parking space type and the parking space line segment includes: If the parking space type is determined to be an oblique parking space, the positions of two corner points at the entrance of the parking space to be corrected, the length of the long side of the parking space, and the parking space line segment at the position of the long side of the parking space are obtained; Calculating the average angle of the parking space line segment at the long side of the parking space, and the average distance from the parking space line segment at the long side of the parking space to the long side of the parking space to be corrected; Determine the target positions of the two corner points at the end of the parking space according to the positions of the two corner points at the entrance of the parking space to be corrected, the length of the long side of the parking space and the average angle; The parking space correction information includes the average distance from the parking space line segment at the long side of the parking space to the long side of the parking space to be corrected, and the target positions of the two corner points at the end of the parking space.

7. The method according to claim 6, characterized in that Correcting the parking space to be corrected at the current moment according to the parking space correction information includes: Correcting the positions of the two corner points at the end of the parking space to be corrected at the current moment to the target position; The parking space to be corrected after the corner points are corrected is translated by the average distance along a preset direction, wherein the preset direction is parallel to a line connecting two corner points at the entrance of the parking space to be corrected and points from the long side of the parking space to be corrected to the parking space line segment at the corresponding position.

8. The method according to any one of claims 1 to 7, characterized in that: The method further comprises: If no complete parking space is detected at the current moment, obtain the historical corrected parking space; If the parking space exists after historical correction, the parking space line is retrieved through the corner point detected at the current moment; If at least one parking space line is retrieved, the corner points detected along the historically corrected parking space and the retrieved parking space line are used to complete the parking space.

9. The method according to claim 1, characterized in that: After correcting the parking space to be corrected at the current moment according to the parking space correction information to obtain the first corrected parking space at the current moment, the method further includes: The corner point position in the first corrected parking space at the current moment and the corner point position in the first corrected parking space at the last two moments are weighted filtered to obtain the target corner point position.

10. A parking space correction device, characterized in that: include: An image acquisition module, used to acquire images around the vehicle; A parking space line segment determination module, used to determine the parking space line segment according to the vehicle surrounding image; A parking space correction information determination module, used to determine parking space correction information according to the parking space type and the parking space line segment; wherein the parking space correction information indicates parking space heading information; The parking space correction module is used to correct the parking space to be corrected at the current moment according to the parking space correction information to obtain the first corrected parking space at the current moment.