Automatic parking optimization method and system and vehicle
The vehicle position and parking space width are optimized through the fisheye camera vision algorithm and repositioning algorithm, and the problem of insufficient positioning accuracy in automatic parking is solved, and more accurate parking space posture and path planning is achieved.
Patent Information
- Application Number
- CN202510484189.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2024-03-18
- Filing Date
- 2025-04-17
- Publication Date
- 2025-07-15
AI Technical Summary
In the existing automatic parking technology, the vehicle positioning and target parking space position detection accuracy is insufficient, resulting in large errors in parking posture, affecting the accuracy of the parking process.
The visual algorithm based on the fisheye camera is used to obtain vehicle parameters and target parking space parameters through image information, combine the repositioning algorithm to calculate the vehicle position and parking space width, and optimize the positioning parameters using detection confidence, and perform sliding average filtering to improve the accuracy of the vehicle position and parking space width.
The detection accuracy of vehicle position and target parking space during automatic parking is improved, the cumulative error of track calculation is corrected, and the reliability of parking posture and the accuracy of planning control is improved.
Smart Images

Figure CN120308097A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of automatic parking, and specifically, to an automatic parking optimization method, system and vehicle. Background Art
[0002] When automatically parking, in order for the vehicle to accurately park in the target parking space, it is necessary to determine the positioning pose of the vehicle in real time, and at the same time determine the width and depth information of the target parking space. In the known automatic parking technology, the real-time positioning pose of the vehicle is usually determined by dead reckoning. This technology is based on the Ackermann steering angle kinematic model of the vehicle, collects wheel speed and pulse information to calculate the odometer, calculates the position of the vehicle relative to the previous moment, and accumulates it to estimate the pose of the vehicle relative to the initial position. However, during the parking process, due to the insufficient accuracy of vehicle sensors and random walk errors, as the running distance increases, the positioning error will also increase, affecting the final parking pose. The width and depth information of the target parking space is usually determined by an ultrasonic sensor. By calculating the time difference between transmitting and receiving ultrasonic waves, the distances on both sides of the parking space and the depth distance of the parking space are detected, and then the width and depth of the parking space are deduced. However, the detection accuracy of the ultrasonic sensor is low, the detection of depth and width depends on obstacles on both sides and behind the parking space, and the detection ability for obstacles at a relatively long distance is limited.
[0003] It should be noted that the information disclosed in the above background art section is only used to enhance the understanding of the background of the present disclosure, and therefore may include information that does not constitute the prior art known to those of ordinary skill in the art. Summary of the Invention
[0004] One aspect of the present application aims to solve the technical problem of how to improve the accuracy of the detected vehicle position and the target parking space position during automatic parking.
[0005] In addition, other aspects of the present application also aim to solve or alleviate other technical problems existing in the prior art.
[0006] The present application provides an automatic parking optimization method, system and vehicle. Specifically, according to one aspect of the present application, there is provided:
[0007] An automatic parking optimization method, which includes the following steps:
[0008] Obtain vehicle parameters and camera parameters, collect image information through a vehicle camera, and obtain target parking space parameters according to the image information;
[0009] Convert the vehicle pose in the global coordinate system into the vehicle pose in the target parking space coordinate system according to the vehicle parameters and the target parking space parameters, and obtain the coordinates of the center of the rear axle of the vehicle in the target parking space coordinate system (x dr , ydr , θ dr );
[0010] Input the image information, vehicle parameters, camera parameters, target parking space parameters, and vehicle pose in the target parking space coordinate system into the relocalization algorithm module to calculate and obtain the positioning parameters;
[0011] Update the vehicle pose in the target parking space coordinate system and update the target parking space width value according to the positioning parameters;
[0012] Calculate the shortest distance from the parking space tail line to the vehicle envelope rectangle according to the positioning parameters and the vehicle rear axle center coordinates;
[0013] Output the updated vehicle pose in the target parking space coordinate system, the updated target parking space width value, and the shortest distance to the path planning control module for automatic parking path planning.
[0014] Optionally, according to an embodiment of the present application, the positioning parameters include the detection confidence Confi_L of the left parking space inner line, the detection confidence Confi_R of the right parking space inner line, the distance fDist_L and the angle fTheta_L between the vehicle envelope rectangle and the left parking space inner line, the distance fDist_R and the angle fTheta_R between the vehicle envelope rectangle and the right parking space inner line, the distance fDist_E and the angle fTheta_E between the vehicle envelope rectangle and the parking space tail line, the coordinate A(x A , y A ) of the entrance point of the right parking space inner line, and the coordinate B(x B , y B ) of the entrance point of the left parking space inner line.
[0015] Optionally, according to an embodiment of the present application, updating the vehicle pose in the target parking space coordinate system according to the positioning parameters includes the following steps:
[0016] When the detection confidence of the left parking space inner line is greater than that of the right parking space inner line, calculate the vehicle pose in the target parking space coordinate system using the distance fDist_L and the angle fTheta_L between the vehicle envelope rectangle and the left parking space inner line. When the detection confidence of the right parking space inner line is greater than that of the left parking space inner line, calculate the vehicle pose in the target parking space coordinate system using the distance fDist_R and the angle fTheta_R between the vehicle envelope rectangle and the right parking space inner line.
[0017] Optionally, according to an embodiment of the present application, when the detection confidence of the left parking space inner line is greater than that of the right parking space inner line, update the vehicle pose (x relo , y relo , θrelo ):
[0018]
[0019] When the detection confidence of the right inner line of the parking space is greater than that of the left inner line of the parking space, update the vehicle pose in the target parking space coordinate system through the following formula:
[0020]
[0021] where car_width is the vehicle width, car_rear is the vehicle rear overhang, and slot_width is the target parking space width.
[0022] Optionally, according to an embodiment of the present application, updating the target parking space width value according to the positioning parameters includes the following steps:
[0023] Judge whether the detection confidence of the left inner line of the parking space and the detection confidence of the right inner line of the parking space are both greater than a preset detection confidence threshold. If so, update the target parking space width slot_width through the following formula
[0024]
[0025] Optionally, according to an embodiment of the present application, calculating the shortest distance from the tail line of the parking space to the vehicle envelope rectangle according to the positioning parameters and the vehicle rear axle center coordinates includes the following steps:
[0026] Calculate the distance dist from the rear axle center to the tail line of the parking space through the following formula:
[0027]
[0028] Calculate the longitudinal movement distance Δd of the vehicle from the previous path planning to this path planning, and obtain the shortest distance dist2bot from the tail line of the parking space to the vehicle envelope rectangle through the following formula:
[0029]
[0030] where car_width is the vehicle width and car_rear is the vehicle rear overhang.
[0031] Optionally, according to an embodiment of the present application, updating the vehicle pose in the target parking space coordinate system according to the positioning parameters includes the following steps:
[0032] Calculate the vehicle pose in the target parking space coordinate system according to the positioning parameters;
[0033] Perform a moving average filter on the vehicle pose in the target parking space coordinate system obtained by calculation, and use the filtered vehicle pose in the target parking space coordinate system as the updated vehicle pose in the target parking space coordinate system.
[0034] According to another aspect of the present application, the present application provides an automatic parking optimization system, which includes
[0035] An acquisition module, which acquires vehicle parameters and camera parameters, acquires image information through a vehicle camera, and obtains target parking space parameters according to the image information;
[0036] An initialization module, which converts the vehicle pose in the global coordinate system into the vehicle pose in the target parking space coordinate system according to the vehicle parameters and the target parking space parameters, and calculates the vehicle rear axle center coordinate in the target parking space coordinate system;
[0037] A relocalization algorithm module, which calculates a localization coefficient according to the image information, vehicle parameters, camera parameters, target parking space parameters, and vehicle pose in the target parking space coordinate system;
[0038] A calculation module, which updates the vehicle pose in the target parking space coordinate system and updates the target parking space width value according to the localization parameters; calculates the shortest distance from the parking space tail line to the vehicle envelope rectangle according to the localization parameters and the vehicle rear axle center coordinate; and outputs the updated vehicle pose in the target parking space coordinate system, the updated target parking space width value, and the shortest distance to the planning and control module;
[0039] A planning and control module, which performs automatic parking path planning according to the updated vehicle pose in the target parking space coordinate system, the updated target parking space width value, and the shortest distance.
[0040] Optionally, according to an implementation manner of another aspect of the present application, the relocalization algorithm module includes
[0041] A target parking space line data creation module, which obtains a cropped image from the image information;
[0042] A parking space line ROI cropping module, which processes the cropped image to obtain an ROI image;
[0043] An inner parking space line detection module, which processes the ROI image to obtain a set of inner parking space line pixel coordinates;
[0044] A relocalization result calculation module, which obtains the localization parameters according to the set of inner parking space line pixel coordinates.
[0045] According to still another aspect of the present application, the present application provides a vehicle, which includes the above-mentioned automatic parking optimization system.
[0046] The advantages of the present application include:
[0047] 1. The automatic parking optimization method of the present application is based on the image information collected by a fish-eye camera. Through vision algorithms, it can effectively and accurately detect the left and right inner lines or the rear line of the parking space, and can accurately obtain the distances and angles between the vehicle envelope rectangle and the left and right inner lines and the rear line of the parking space, as well as the detection confidence. And according to the detected information, it calculates more accurate parking space width information, the shortest distance from the rear line of the parking space to the vehicle envelope rectangle, and the vehicle pose and transmits them to the planning and control module, improving the accuracy of the target pose of the planning and control module and enhancing the reliability of the final parking pose;
[0048] 2. The automatic parking optimization method of the present application combines the accurate vehicle lateral pose and heading angle information given by the vision image with the vehicle pose information obtained by dead reckoning of the vehicle, corrects the cumulative lateral pose and heading angle errors of the vehicle real-time dead reckoning during the parking process, and at the same time smooths the corrected lateral pose and heading angle information, and can obtain a more accurate and more realistic vehicle pose. Description of the Drawings
[0049] Referring to the accompanying drawings, the above and other features of the present application will become obvious. It is easy for those skilled in the art to understand that these drawings are only for illustrative purposes and are not intended to limit the protection scope of the present application. In addition, similar numbers in the drawings are used to represent similar components, where
[0050] Figure 1 shows a schematic flow chart of the automatic parking optimization method proposed according to an embodiment of the present application;
[0051] Figure 2 shows a schematic diagram of the target parking space coordinate system;
[0052] Figure 3 shows the distances and angles between the vehicle envelope rectangle and the left inner line and the right inner line of the parking space;
[0053] Figure 4 shows the distances and angles between the vehicle envelope rectangle and the rear line of the parking space;
[0054] Figure 5 shows the distance from the center of the rear axle to the rear line of the parking space and the shortest distance from the rear line of the parking space to the vehicle envelope rectangle;
[0055] Figure 6 shows a schematic diagram of the modules of the automatic parking optimization system proposed according to an embodiment of the present application. Detailed Embodiments
[0056] It is easy to understand that according to the technical solution of the present application, under the condition of not changing the essential spirit of the present application, those of ordinary skill in the art can propose various interchangeable structural forms and implementation methods. Therefore, the following specific embodiments and drawings are only exemplary descriptions of the technical solution of the present application, and should not be regarded as all of the present application or as a limitation or restriction on the technical solution of the present application.
[0057] The orientation terms such as up, down, left, right, front, back, front side, back side, top, bottom, etc. mentioned or possibly mentioned in this specification are defined relative to the structures shown in the respective drawings. They are relative concepts, and thus may change accordingly depending on their different positions and different usage states. Therefore, these or other orientation terms should not be interpreted as restrictive terms. In addition, the terms "first", "second", "third", etc. or similar expressions are only used for descriptive and differentiating purposes, and cannot be understood as indicating or implying the relative importance of the corresponding components or the sequence of components or the assembly sequence.
[0058] Automatic parking is a function that detects the surrounding environment information of the vehicle and the available parking space through sensors distributed around the vehicle, plans a parking path, and controls the steering, acceleration, and deceleration of the vehicle to enable the vehicle to complete the parking operation semi - automatically or automatically.
[0059] According to the degree of automation, automatic parking can be divided into four product forms: semi - automatic parking, fully automatic parking, memory parking, and autonomous valet parking. Among them, according to the different sensors installed and usage scenarios, fully automatic parking can be further divided into three forms: ultrasonic - based fully automatic parking, ultrasonic - fused surround - view camera fully automatic parking, and remote control parking. With the continuous iteration of automatic parking technology, the practicality of the automatic parking function is becoming stronger and stronger.
[0060] With the rapid development of automotive intelligent technologies, vision technology based on cameras has brought new possibilities to the assisted parking system. During the parking process, the application of the vision module greatly improves the vehicle positioning accuracy during parking, bringing great convenience to the driver and providing a more reliable and safer parking experience.
[0061] The automatic parking optimization technology of the present application is based on vision technology of in - vehicle cameras, and can correct errors in automatic parking and update the depth and width of the target parking space. Refer to Figure 1 , which shows a schematic flow diagram of an automatic parking optimization method proposed according to an embodiment of the present application. The automatic parking optimization method includes the following steps:
[0062] S100: Obtain vehicle parameters and camera parameters, collect image information through the vehicle camera, and obtain target parking space parameters according to the image information.
[0063] S200: Convert the vehicle pose in the global coordinate system to the vehicle pose in the target parking space coordinate system according to the vehicle parameters and the target parking space parameters, and calculate the coordinates of the center of the vehicle's rear axle (x dr , y dr , θ dr ) in the target parking space coordinate system;
[0064] S300: Input the image information, vehicle parameters, camera parameters, target parking space parameters, and the vehicle pose in the target parking space coordinate system into the relocalization algorithm module to calculate and obtain the positioning parameters;
[0065] S400: Update the vehicle pose in the target parking space coordinate system and update the target parking space width value according to the positioning parameters;
[0066] S500: Calculate the shortest distance from the tail line of the parking space to the vehicle envelope rectangle according to the positioning parameters and the coordinates of the center of the vehicle's rear axle;
[0067] S600: Output the updated vehicle pose in the target parking space coordinate system, the updated target parking space width value, and the shortest distance to the path planning control module for automatic parking path planning.
[0068] The above first step S100 is actually the initialization operation of automatic parking. The vehicle parameters and camera parameters are preset in the vehicle. The vehicle parameters include, for example, the vehicle length, vehicle width, vehicle rear overhang (i.e., the distance from the vehicle's rear axle to the rear of the vehicle body), etc. The camera parameters include, for example, the internal parameters and external parameters of the camera. The target parking space information includes the width, length, etc. of the target parking space detected by the camera. The automatic parking system generally calculates the vehicle pose in the global coordinate system based on the above parameters and the image information according to dead reckoning. After the target parking space is determined, it is necessary to convert the vehicle pose in the global coordinate system to the vehicle pose in the target parking space coordinate system and calculate the coordinates of the center of the rear axle (x dr , y dr , θ dr ), that is, step S200. The vehicle pose in the target parking space coordinate system is represented by the coordinates (x relo , y relo , θ relo ). Refer to Figure 2 , which shows a schematic diagram of the target parking space coordinate system. In this figure, AB is the parking space entrance line, BC is the left parking space inner line, AD is the right parking space inner line, A is the entrance point of the right parking space inner line, B is the entrance point of the left parking space inner line. Taking B as the origin of the parking space coordinate system, the positive direction of the x-axis of the parking space coordinate system is to the right along the entrance line direction, and the positive direction of the y-axis of the parking space coordinate system is upward perpendicular to the x-axis. x relo is the x-axis coordinate of the vehicle in this target parking space coordinate system, y relo is the y-axis coordinate of the vehicle in this target parking space coordinate system, θrelo is the heading angle of the vehicle in the parking space coordinate system, that is, the angle between the vehicle head orientation and the positive x-axis direction of the parking space coordinate system, with counterclockwise being positive. For example, Figure 2 in which θ is positive, and its angle range is (-180°, +180°). Similarly, for the rear axle center coordinates, it is the coordinates of the rear axle center in the target parking space coordinate system and its heading angle.
[0069] In the third step S300, input the various parameters obtained and the vehicle pose in the target parking space coordinate system into the relocalization algorithm module, and the relocalization algorithm module calculates the localization parameters based on these parameters.
[0070] In an embodiment of the present application, the localization parameters include the detection confidence Confi_L of the left parking space inner line, the detection confidence Confi_R of the right parking space inner line, the distance fDist_L and the angle fTheta_L between the vehicle envelope rectangle and the left parking space inner line, the distance fDist_R and the angle fTheta_R between the vehicle envelope rectangle and the right parking space inner line, the distance fDist_E and the angle fTheta_E between the vehicle envelope rectangle and the parking space end line, the coordinates A(x A , y A ) of the entrance point of the right parking space inner line, and the coordinates B(x B , y B ) of the entrance point of the left parking space inner line.
[0071] Refer to Figure 3 and 4 , which respectively show the distances and angles between the vehicle envelope rectangle and the left and right parking space inner lines and the distances and angles between the vehicle envelope rectangle and the parking space end line. All localization parameters are defined based on the relative position of the vehicle envelope rectangle and the parking space. The distances and angles between the vehicle envelope rectangle and the left and right parking space inner lines and the parking space end line have positive and negative values. Taking the two vertices at the rear of the vehicle as the center, when the left parking space inner line is on the left side of the vertex near the left parking space inner line at the rear of the vehicle, the distance is positive, and when it is on the right side, it is negative; when the right parking space inner line is on the right side of the vertex near the right parking space inner line at the rear of the vehicle, the distance is positive, and when it is on the left side, it is negative; when the parking space end line is below the vertex, the distance is positive, and when it is above, it is negative; the above angle range is between -90° and +90°. For the left and right parking space inner lines, the angle is positive when the line where it is located rotates counterclockwise by an acute angle relative to the y-axis of the vehicle coordinate system, and vice versa. For the parking space end line, the angle is positive when the line where it is located rotates counterclockwise by an acute angle relative to the x-axis of the vehicle coordinate system, and vice versa.
[0072] Step S400 is to update the vehicle pose and the target parking space width value according to the above positioning parameters to obtain a more accurate vehicle pose and target parking space width value. It should be understood that although the vehicle pose has been obtained in step S200 and the target parking space width value has also been obtained as a target parking space parameter from the camera, the vehicle pose is not a sufficiently accurate vehicle pose relative to the inner line of the parking space, and the target parking space width value is not a sufficiently accurate distance between the left and right inner lines of the parking space. There is still a possibility to further improve the accuracy of these two parameters through mathematical calculations.
[0073] In an embodiment of the present application, when the detection confidence of the left inner line of the parking space is greater than the detection confidence of the right inner line of the parking space, the distance fDist_L and the angle fTheta_L between the vehicle envelope rectangle and the left inner line of the parking space are used to calculate the vehicle pose in the target parking space coordinate system. When the detection confidence of the right inner line of the parking space is greater than the detection confidence of the left inner line of the parking space, the distance fDist_R and the angle fTheta_R between the vehicle envelope rectangle and the right inner line of the parking space are used to calculate the vehicle pose in the target parking space coordinate system.
[0074] In this embodiment, it should be understood that the detection confidence in the positioning parameters reflects the confidence level of the position information of the detected left inner line of the parking space and the right inner line of the parking space, and also reflects its accuracy. The comparison between the two detection confidences is used to determine whether it is more accurate to calculate the vehicle pose in the target parking space coordinate system using the parameters relative to the left inner line of the parking space or the parameters relative to the right inner line of the parking space. By judging the detection confidence, the reliability and accuracy of the calculated vehicle pose are further improved.
[0075] In an embodiment of the present application, when the detection confidence of the left inner line of the parking space is greater than the detection confidence of the right inner line of the parking space, the vehicle pose (x relo , y relo , θ relo ) in the target parking space coordinate system is updated by the following formula:
[0076]
[0077] When the detection confidence of the right inner line of the parking space is greater than the detection confidence of the left inner line of the parking space, the vehicle pose in the target parking space coordinate system is updated by the following formula:
[0078]
[0079] Where, car_width is the vehicle width, car_rear is the vehicle rear overhang, and slot_width is the target parking space width.
[0080] It should be understood that both the vehicle width and the vehicle rear overhang belong to the above-mentioned vehicle parameters. The target parking space width belongs to the above-mentioned target parking space parameters, which is calculated from the image information of the camera.
[0081] In one embodiment of the present application, updating the target parking space width value according to the positioning parameters includes the following steps:
[0082] Judge whether the detection confidence of the left inner parking space line and the detection confidence of the right inner parking space line are both greater than a preset detection confidence threshold. If so, update the target parking space width slot_width through the following formula
[0083]
[0084] In this embodiment, when the detection confidence of the left inner parking space line and the detection confidence of the right inner parking space line both exceed the preset detection confidence threshold, the target parking space width is updated with the coordinates of the entry points of the left inner parking space line and the right inner parking space line. Here, the detection confidence threshold can be set to 0.9, for example, in order to obtain a more accurate target parking space width. It should be understood that different detection confidence thresholds can also be set according to the accuracy requirements of automatic parking.
[0085] In one embodiment of the present application, step S500, that is, calculating the shortest distance from the parking space tail line to the vehicle envelope rectangle according to the positioning parameters and the vehicle rear axle center coordinates, includes the following steps:
[0086] Calculate the distance dist from the rear axle center to the parking space tail line through the following formula:
[0087]
[0088] Calculate the longitudinal movement distance Δd of the vehicle from the previous path planning to this path planning, and calculate the shortest distance dist2bot from the parking space tail line to the vehicle envelope rectangle through the following formula:
[0089]
[0090] Wherein, car_width is the vehicle width and car_rear is the vehicle rear overhang.
[0091] Reference Figure 5 , which shows the distance from the rear axle center to the parking space tail line and the shortest distance from the parking space tail line to the vehicle envelope rectangle. In this embodiment, it is necessary to calculate the longitudinal movement distance Δd of the vehicle from the previous path planning to this path planning. In this way, the shortest distance dist2bot from the parking space tail line to the vehicle envelope rectangle can be calculated in real time to obtain smooth data on the shortest distance.
[0092] In an embodiment of the present application, updating the vehicle pose in the target parking space coordinate system according to the positioning parameters includes the following steps:
[0093] Calculate the vehicle pose in the target parking space coordinate system according to the positioning parameters;
[0094] Perform a moving average filter on the calculated vehicle pose in the target parking space coordinate system to obtain the filtered vehicle pose in the target parking space coordinate system as the updated vehicle pose in the target parking space coordinate system.
[0095] The method of performing a moving average filter on the vehicle pose is to perform filtering on it in the x direction of the parking space coordinate system and the y direction of the parking space coordinate system respectively. If the absolute value of the difference between the current value and the previous filtering result is greater than the preset filtering threshold, for example, the filtering preset is set to 600, then select the sum of the difference between these two filtering results and the previous filtering result to obtain a predicted value to participate in the filtering calculation, otherwise select the current value to participate in the filtering calculation. Through the filtering process, a smoothly fused vehicle pose can be finally obtained. Updating the vehicle pose to the current target coordinate system can improve the accuracy of the vehicle pose for automatic parking.
[0096] Another aspect of the present application also proposes an automatic parking optimization system. Refer to Figure 6 , which shows a schematic diagram of the modules of the automatic parking optimization system proposed according to an embodiment of the present application. The automatic parking optimization system 100 includes
[0097] An acquisition module 1, which obtains vehicle parameters and camera parameters, acquires image information through a vehicle camera, and obtains target parking space parameters according to the image information;
[0098] An initialization module 2, which converts the vehicle pose in the global coordinate system into the vehicle pose in the target parking space coordinate system according to the vehicle parameters and the target parking space parameters, and calculates the vehicle rear axle center coordinate in the target parking space coordinate system;
[0099] A relocalization algorithm module 3, which calculates a positioning coefficient according to the image information, vehicle parameters, camera parameters, target parking space parameters, and vehicle pose in the target parking space coordinate system;
[0100] A calculation module 4, which updates the vehicle pose in the target parking space coordinate system according to the positioning parameters and updates the target parking space width value; calculates the shortest distance from the parking space tail line to the vehicle envelope rectangle according to the positioning parameters and the vehicle rear axle center coordinate; and outputs the updated vehicle pose in the target parking space coordinate system, the updated target parking space width value, and the shortest distance to a planning control module 5;
[0101] The planning and control module 5 performs automatic parking path planning based on the vehicle pose in the updated target parking space coordinate system, the updated target parking space width value, and the nearest distance.
[0102] In an embodiment of the present application, the relocalization algorithm module 3 includes
[0103] A target parking space line data creation module that obtains a cropped image from the image information;
[0104] A parking space line ROI cropping module that processes the cropped image to obtain an ROI image;
[0105] An inner parking space line detection module that processes the ROI image to obtain a set of inner parking space line pixel coordinates;
[0106] A relocalization result calculation module that obtains the positioning parameters based on the set of inner parking space line pixel coordinates.
[0107] The above four modules will be introduced in detail below.
[0108] The target parking space line data creation module uses a neural network combined with dead reckoning to obtain the parking space corner point coordinates (entrance point coordinates) on the top view, and constructs left and right parking space line segments based on these coordinates. Then, a part of the line segment in the image field of view is intercepted as a prior line segment for relocalization detection. The target parking space line data creation module performs a certain affine transformation based on the endpoint coordinates of the prior parking space line segment on the camera fisheye image to obtain a cropping rectangle, and crops the fisheye image according to the cropping rectangle to obtain a cropped image that contains the region of interest and has the smallest area.
[0109] The parking space line ROI cropping module mainly processes the cropped image. It obtains a rotation matrix based on the rotation center and rotation angle, rotates the cropped image through the rotation matrix until the line segment is parallel to the y-axis to obtain the rotated cropped image. Then, the rotated cropped image is offset according to the endpoint coordinates of the rotated parking space prior line segment to obtain the region of interest, and is cropped to obtain the region of interest image; and the image is binarized to obtain a binary image. Then, image processing is performed on the binary image, and connected component detection is performed on the binary image to obtain a connected component image and a list of connected components. Finally, the maximum height of each connected component is multiplied by a coefficient as a threshold, and the connected components with a height greater than this threshold are used to regenerate a new ROI image for detection, and image processing is performed again.
[0110] The in-parking-space line detection module mainly processes the ROI image, sets a window of a certain size, and slides it on the ROI image at a certain step length. When sliding on the same number of image rows, the in-parking-space line detection module performs a mean operation on the pixels in the window. If the mean value is greater than a certain threshold, the window position is recorded, indicating that a parking space line is detected here. During the sliding process of the entire row, the finally recorded window position is used as the position of the in-parking-space line detected in this row. Then, the detection positions of all rows of the image are detected and integrated to obtain a set of pixel coordinates of the in-parking-space line, and the elements in this set are sorted according to the ordinate.
[0111] The repositioning result calculation module calculates the above positioning parameters and removes the detection points located at the edges of the cropped image. The set of pixel coordinates of the in-parking-space line after processing is inverse perspective transformed from the fisheye image coordinates to the top-view image coordinates. The RANSAC algorithm is used to solve the coefficients A, B, and C of the in-parking-space line equation Ax + By + C = 0 using the set of pixel coordinates of the in-parking-space line after processing. According to the obtained in-parking-space line equation Ax + By + C = 0, the position of the vehicle in the image, and the mapping relationship between the image and the world, the distance angles between the vehicle and the left and right in-parking-space lines and the end line of the parking space are calculated; the confidence level of the parking space line detection is obtained according to the detected set of pixel coordinates of the in-parking-space line and the detection results; the in-parking-space line entry point is solved according to the obtained in-parking-space line equation and the prior parking space corner points.
[0112] It should be understood that the automatic parking optimization system of the present application can be installed on various vehicles, including sedans, trucks, buses, hybrid electric vehicles, pure electric vehicles, etc. Therefore, the subject matter of the present application also aims to protect various vehicles equipped with the automatic parking optimization system of the present application.
[0113] It should be understood that all the above preferred embodiments are exemplary rather than restrictive, and all modifications or deformations made by those skilled in the art to the specific embodiments described above under the concept of the present application should be within the scope of legal protection of the present application.
Claims
1. An automatic parking optimization method, characterized in that, It includes the following steps: Obtain vehicle parameters and camera parameters, collect image information through a vehicle camera, and obtain target parking space parameters based on the image information; Convert the vehicle pose in the global coordinate system into the vehicle pose in the target parking space coordinate system according to the vehicle parameters and the target parking space parameters, and obtain the coordinates of the center of the rear axle of the vehicle in the target parking space coordinate system (x dr , y dr , θ dr ); Input the image information, vehicle parameters, camera parameters, target parking space parameters, and vehicle pose in the target parking space coordinate system into the relocalization algorithm module to calculate and obtain the positioning parameters; Update the vehicle pose in the target parking space coordinate system and update the target parking space width value according to the positioning parameters; Calculate the shortest distance from the parking space tail line to the vehicle envelope rectangle according to the positioning parameters and the vehicle rear axle center coordinate; Output the updated vehicle pose in the target parking space coordinate system, the updated target parking space width value, and the shortest distance to the path planning control module for automatic parking path planning.
2. The automatic parking optimization method according to claim 1, wherein The positioning parameters include the detection confidence Confi_L of the left parking space inner line, the detection confidence Confi_R of the right parking space inner line, the distance fDist_L and the included angle fTheta_L between the vehicle envelope rectangle and the left parking space inner line, the distance fDist_R and the included angle fTheta_R between the vehicle envelope rectangle and the right parking space inner line, the distance fDist_E and the included angle fTheta_E between the vehicle envelope rectangle and the parking space end line, and the coordinates A(x A , y A ) of the entrance point of the right parking space inner line, and the coordinates B(x B , y B ) of the entrance point of the left parking space inner line.
3. The automatic parking optimization method according to claim 2, wherein Updating the vehicle pose in the target parking space coordinate system according to the positioning parameters includes the following steps: When the detection confidence of the left parking space inner line is greater than that of the right parking space inner line, calculate the vehicle pose in the target parking space coordinate system using the distance fDist_L and angle fTheta_L between the vehicle envelope rectangle and the left parking space inner line. When the detection confidence of the right parking space inner line is greater than that of the left parking space inner line, calculate the vehicle pose in the target parking space coordinate system using the distance fDist_R and angle fTheta_R between the vehicle envelope rectangle and the right parking space inner line.
4. The automatic parking optimization method according to claim 3, characterized in that When the detection confidence of the left inner parking space line is greater than that of the right inner parking space line, update the vehicle pose (x relo , y relo , θ relo ) in the target parking space coordinate system through the following formula: When the detection confidence of the right inner parking space line is greater than that of the left inner parking space line, update the vehicle pose (x relo , y relo , θ relo ) in the target parking space coordinate system through the following formula: Wherein, car_width is the vehicle width, car_rear is the vehicle rear overhang, and slot_width is the target parking space width.
5. The automatic parking optimization method according to claim 2, wherein Updating the target parking space width value according to the positioning parameters includes the following steps: Judge whether the detection confidence of the left parking space inner line and the detection confidence of the right parking space inner line are both greater than a preset detection confidence threshold. If so, update the target parking space width slot_width through the following formula 6. The automatic parking optimization method according to claim 2, characterized in that Calculating the shortest distance from the parking space tail line to the vehicle envelope rectangle according to the positioning parameters and the vehicle rear axle center coordinate includes the following steps: Calculate the distance dist from the rear axle center to the parking space tail line through the following formula: Calculate the longitudinal movement distance Δd of the vehicle from the previous path planning to this path planning, and obtain the shortest distance dist2bot from the parking space tail line to the vehicle envelope rectangle through the following formula: Wherein, car_width is the vehicle width, and car_rear is the vehicle rear overhang.
7. The automatic parking optimization method according to claim 1, characterized in that Updating the vehicle pose in the target parking space coordinate system according to the positioning parameters includes the following steps: Calculate the vehicle pose in the target parking space coordinate system according to the positioning parameters; Perform moving average filtering on the calculated vehicle pose in the target parking space coordinate system to obtain the filtered vehicle pose in the target parking space coordinate system as the updated vehicle pose in the target parking space coordinate system.
8. An automatic parking optimization system, characterized in that, including An acquisition module that obtains vehicle parameters and camera parameters, collects image information through a vehicle camera, and obtains target parking space parameters based on the image information; An initialization module that converts the vehicle pose in the global coordinate system into the vehicle pose in the target parking space coordinate system according to the vehicle parameters and the target parking space parameters, and calculates the coordinate of the center of the rear axle of the vehicle in the target parking space coordinate system; A repositioning algorithm module that calculates a positioning coefficient according to the image information, vehicle parameters, camera parameters, target parking space parameters, and vehicle pose in the target parking space coordinate system; A calculation module that updates the vehicle pose in the target parking space coordinate system and updates the target parking space width value according to the positioning parameter; calculates the shortest distance from the parking space tail line to the vehicle envelope rectangle according to the positioning parameter and the vehicle rear axle center coordinate; And outputs the updated vehicle pose in the target parking space coordinate system, the updated target parking space width value, and the shortest distance to the planning and control module; A planning and control module that performs automatic parking path planning according to the updated vehicle pose in the target parking space coordinate system, the updated target parking space width value, and the shortest distance.
9. The automatic parking optimization system according to claim 8, characterized in that, The repositioning algorithm module includes A target parking space line data creation module that obtains a cropped image from the image information; A parking space line ROI cropping module that processes the cropped image to obtain an ROI image; An inner parking space line detection module that processes the ROI image to obtain a set of pixel coordinates of the inner parking space line; A repositioning result calculation module that obtains the positioning parameter according to the set of pixel coordinates of the inner parking space line.
10. A vehicle, characterized in that, An automatic parking optimization system according to claim 8 or 9.