An automatic parking method, device and equipment

By integrating visual and odometer pose information to generate an automatic parking method, the problem of inaccurate vehicle positioning was solved, the parking path was optimized, and more accurate automatic parking was achieved.

CN115841514BActive Publication Date: 2026-11-27SAIC MOTOR
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202111111107.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-09-18
Publication Date
2026-11-27
Estimated Expiration
2041-09-18

Smart Images

  • Figure CN115841514B_ABST
    Figure CN115841514B_ABST
Patent Text Reader

Abstract

The embodiment of the application discloses an automatic parking method, device and equipment, fusion position information of the self car is obtained by acquiring visual position information and mileage position information of the self car; wherein the visual position information is determined according to the environment image of the self car, and the mileage position information is generated by a wheeled odometer; based on the visual information and the odometer information, more accurate fusion position information of the self car can be obtained. The parking path is generated according to the obtained more accurate fusion position information and the parking position information of the target parking space. The parking path generated based on the more accurate fusion position information can optimize the parking path and realize automatic parking more accurately.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of vehicle control technology, specifically to an automatic parking method, device, and equipment. Background Technology

[0002] When parking, vehicles need to be placed in specific parking spaces. To facilitate drivers in smoothly driving their vehicles into parking spaces, some vehicles are equipped with automatic parking functions. By activating the automatic parking function, the driver can enable the vehicle to automatically detect parking spaces, plan routes, and drive itself into the parking space.

[0003] When a vehicle is automatically parked, its exact location needs to be known in order to accurately plan the parking path. Currently, the vehicle's location is not accurate enough, which can easily lead to inaccurate parking paths planned based on the vehicle's location, causing problems with automatic parking. Summary of the Invention

[0004] In view of this, embodiments of this application provide an automatic parking method, apparatus, and device that can determine the position of a vehicle more accurately.

[0005] Based on this, the technical solution provided by the embodiments of this application is as follows: In a first aspect, this application provides an automatic parking method, the method comprising: The visual pose information of the vehicle is obtained, and the visual pose information is determined based on the environmental image of the vehicle. The vehicle's mileage and pose information is obtained, and the mileage and pose information is generated by the wheel odometer; Based on the visual pose information and the odometer pose information, fused pose information is obtained; Obtain the location information of the target parking space; A parking path is generated based on the fused pose information and the parking space location information; Control the vehicle to travel according to the parking path.

[0006] In one possible implementation, obtaining the fused pose information based on the visual pose information and the odometry pose information includes: Based on the visual pose information, calculate the visual pose change between the target environment image at the current moment and the historical environment image at a historical moment; Based on the mileage pose information, calculate the mileage pose change between the target mileage pose at the current time and the historical mileage pose at the historical time. The fusion parameters are determined based on the visual pose change and the mileage pose change; The fused pose information is obtained by using the fusion parameters, the visual pose change, and the mileage pose change.

[0007] In one possible implementation, determining the fusion parameters based on the visual pose change and the odometry pose change includes: When the difference between the visual pose change and the odometer pose change is greater than a first difference threshold, the number of inlier sets in the target environment image is obtained. When the number of interior points exceeds a threshold, the first parameter is used as the fusion parameter. When the number of interior points is less than or equal to the number threshold, the second parameter is used as the fusion parameter; When the difference between the visual pose change and the mileage pose change is less than the first difference threshold, the third parameter is used as the fusion parameter.

[0008] In one possible implementation, obtaining the vehicle's visual pose information includes: Collect image information of a preset area around the vehicle at the current moment to generate a target environment image; Extract feature points from the target environment image; The feature points in the target environment image are matched with the feature points in the historical environment image, and the feature points in the target environment image that are successfully matched are used as the matching points; the historical environment image is an environment image that was collected and generated at a historical time, and the historical time is a time before the current time. The relative pose at the current moment is calculated based on the matching point to obtain the visual pose information of the vehicle.

[0009] In one possible implementation, obtaining the vehicle's visual pose information includes: Collect image information of a preset area around the vehicle at the current moment to generate a target environment image; Determine the parallax between the target environment image and the historical environment image of the last frame in the sliding window; the sliding window includes environment images, which are sorted according to the chronological order of acquisition time; the historical environment images are environment images acquired and generated at historical moments, where the historical moment is a moment before the current moment. When the disparity is greater than the first disparity threshold, the target environment image is added to the sliding window; Extract feature points from the target environment image; match the feature points in the target environment image with feature points in historical environment images, and use the feature points in the target environment image that are successfully matched as matching points; Based on the matching points, the relative pose corresponding to the current moment is calculated to obtain the visual pose information of the vehicle. When the number of frames of the environment image in the sliding window exceeds the frame number threshold, delete one frame of the historical environment image in the sliding window; When the disparity is less than or equal to the first disparity threshold, the target environment image is deleted, and the process returns to collecting image information within the preset area around the vehicle at the current moment, generating the target environment image, and subsequent steps.

[0010] In one possible implementation, deleting a frame of historical environmental image from the sliding window when the number of frames of the environmental image in the sliding window exceeds a frame number threshold includes: When the number of frames of the environment image in the sliding window is greater than the frame number threshold, and the target environment image is a key frame, the first frame of the historical environment image in the sliding window is deleted; the key frame is an environment image whose number of matching points is less than the number of matching points threshold and whose disparity with the last frame of the historical environment image in the sliding window is greater than a second disparity threshold. When the number of frames of the environment image in the sliding window is greater than the frame number threshold, and the target environment image is not a keyframe, delete the historical environment image with the smallest adjacent average disparity in the sliding window.

[0011] In one possible implementation, calculating the relative pose corresponding to the current moment based on the matching point to obtain the vehicle's visual pose information includes: The matching points of the target environment image and the first historical environment image are divided into at least one first point set, and each first point set includes a first number of matching points of the target. Calculate the first essential matrix for each set of points, and determine the first rotation matrix based on the first essential matrix; The matching points of the target environment image and the second historical environment image are divided into at least one second point set, and each second point set includes a second number of matching points for the target. Calculate the second essential matrix for each of the second point sets, and determine the second rotation matrix based on the second essential matrix; Based on the first rotation matrix and the second rotation matrix, the third rotation matrix is ​​obtained; The translation vector is calculated iteratively using the third rotation matrix, and feature points that do not meet the preset conditions are removed before each iteration. The translation vector and the third rotation matrix are used as the visual pose information of the vehicle.

[0012] In one possible implementation, the method further includes: Match the feature points in the target environment image with the feature points that determine the world coordinates; Adjust the visual pose information corresponding to the current moment based on the feature points of the successfully matched world coordinates.

[0013] In one possible implementation, the method further includes: Determine the loopback image in the historical environmental images whose acquisition time is closest to the current time; the loopback image is an environmental image that forms a loop with other historical environmental images. When the image interval between the target environment image and the loop closure image is greater than the loop closure interval threshold, loop closure detection is performed based on the target environment image. When loop closure detection is successful and the size of the loop closure is greater than the loop closure size threshold, the visual pose information corresponding to the target environment image is adjusted using the visual pose information corresponding to the loop closure image.

[0014] In one possible implementation, generating a parking path based on the fused pose information and the parking space location information includes: The starting point of the parking path is determined based on the fused pose information; The endpoint of the parking path is determined based on the parking space location information; The parking path is formed using arcs and straight lines based on its starting point and ending point; the curvature between the arcs and straight lines is smoothed using Bézier curves or cycloid curves.

[0015] In one possible implementation, controlling the vehicle to travel according to the parking path includes: When the vehicle reaches a key point in the parking path, obtain the boundary line information of the target parking space; Based on the boundary line information of the target parking space and the current fused pose information of the vehicle, update the path from the key point to the target parking space in the parking path; Control the vehicle to travel according to the updated parking path.

[0016] Secondly, this application provides an automatic parking device, the device comprising: The first acquisition unit is used to acquire the visual pose information of the vehicle, which is determined based on the environmental image of the vehicle. The second acquisition unit is used to acquire the mileage and pose information of the vehicle, which is generated by the wheel odometer. The fusion unit is used to obtain fused pose information based on the visual pose information and the odometer pose information; The third acquisition unit is used to acquire the parking space location information of the target parking space; The generation unit is used to generate a parking path based on the fused pose information and the parking space location information; The control unit is used to control the vehicle to travel according to the parking path.

[0017] In one possible implementation, the fusion unit includes: The first calculation subunit is used to calculate the visual pose change between the target environment image at the current time and the historical environment image at a historical time based on the visual pose information. The second calculation subunit is used to calculate the mileage pose change between the target mileage pose at the current time and the historical mileage pose at the historical time based on the mileage pose information. A subunit is defined to determine fusion parameters based on the visual pose change and the mileage pose change; The fusion subunit is used to obtain fused pose information by utilizing the fusion parameters, the visual pose change, and the odometer pose change.

[0018] In one possible implementation, the determining subunit is specifically used to obtain the number of inliers in the target environment image when the difference between the visual pose change and the odometer pose change is greater than a first difference threshold. When the number of interior points exceeds a threshold, the first parameter is used as the fusion parameter. When the number of interior points is less than or equal to the number threshold, the second parameter is used as the fusion parameter; When the difference between the visual pose change and the mileage pose change is less than the first difference threshold, the third parameter is used as the fusion parameter.

[0019] In one possible implementation, the first acquisition unit includes: The first acquisition subunit is used to acquire image information within a preset area around the vehicle at the current moment and generate a target environment image; The first extraction subunit is used to extract feature points in the target environment image; The matching subunit is used to match feature points in the target environment image with feature points in the historical environment image, and to take the feature points in the target environment image that are successfully matched as the matching points; the historical environment image is an environment image that was collected and generated at a historical time, and the historical time is a time before the current time; A sub-unit is generated to calculate the relative pose corresponding to the current moment based on the matching point, so as to obtain the visual pose information of the vehicle.

[0020] In one possible implementation, the first acquisition unit includes: The second acquisition subunit is used to acquire image information within a preset area around the vehicle at the current moment and generate a target environment image; A disparity calculation subunit is used to determine the disparity between the target environment image and the historical environment image of the last frame in the sliding window; the sliding window includes environment images, which are sorted according to the order of acquisition time; the historical environment images are environment images acquired and generated at historical times, and the historical times are times before the current time. Add a sub-unit to add the target environment image to the sliding window when the disparity is greater than a first disparity threshold; The second extraction subunit is used to extract feature points in the target environment image; match the feature points in the target environment image with feature points in historical environment images, and use the feature points in the target environment image that are successfully matched as matching points; A subunit is generated to calculate the relative pose corresponding to the current moment based on the matching point, so as to obtain the visual pose information of the vehicle. The first deletion subunit is used to delete one frame of historical environmental image in the sliding window when the number of frames of the environmental image in the sliding window is greater than the frame number threshold. The second deletion subunit is used to delete the target environment image when the disparity is less than or equal to the first disparity threshold, return to the execution of the image information in the preset area around the vehicle at the current time of acquisition, generate the target environment image and subsequent steps.

[0021] In one possible implementation, the first deletion subunit is specifically used to delete the first frame of the historical environment image in the sliding window when the number of frames of the environment image in the sliding window is greater than a frame number threshold and the target environment image is a key frame; the key frame is an environment image whose number of matching points is less than a matching point number threshold and whose disparity with the last frame of the historical environment image in the sliding window is greater than a second disparity threshold. When the number of frames of the environment image in the sliding window is greater than the frame number threshold, and the target environment image is not a keyframe, delete the historical environment image with the smallest adjacent average disparity in the sliding window.

[0022] In one possible implementation, the generating subunit is specifically used to divide the matching points of the target environment image and the first historical environment image into at least one first point set, each first point set including a first target number of matching points; Calculate the first essential matrix for each set of points, and determine the first rotation matrix based on the first essential matrix; The matching points of the target environment image and the second historical environment image are divided into at least one second point set, and each second point set includes a second number of matching points for the target. Calculate the second essential matrix for each of the second point sets, and determine the second rotation matrix based on the second essential matrix; Based on the first rotation matrix and the second rotation matrix, the third rotation matrix is ​​obtained; The translation vector is calculated iteratively using the third rotation matrix, and feature points that do not meet the preset conditions are removed before each iteration. The translation vector and the third rotation matrix are used as the visual pose information of the vehicle.

[0023] In one possible implementation, the device further includes: A matching unit is used to match feature points in the target environment image with feature points that have determined world coordinates; Adjust the visual pose information corresponding to the current moment based on the feature points of the successfully matched world coordinates.

[0024] In one possible implementation, the device further includes: The loop closure detection unit is used to determine the loop closure image among the historical environmental images whose acquisition time is closest to the current time; the loop closure image is an environmental image that forms a loop with other historical environmental images. When the image interval between the target environment image and the loop closure image is greater than the loop closure interval threshold, loop closure detection is performed based on the target environment image. When loop closure detection is successful and the size of the loop closure is greater than the loop closure size threshold, the visual pose information corresponding to the target environment image is adjusted using the visual pose information corresponding to the loop closure image.

[0025] In one possible implementation, the generation unit is specifically used to determine the starting point of the parking path based on the fused pose information; The endpoint of the parking path is determined based on the parking space location information; The parking path is formed using arcs and straight lines based on its starting point and ending point; the curvature between the arcs and straight lines is smoothed using Bézier curves or cycloid curves.

[0026] In one possible implementation, the control unit is specifically used to acquire the boundary line information of the target parking space when the vehicle travels to a key point in the parking path. Based on the boundary line information of the target parking space and the current fused pose information of the vehicle, update the path from the key point to the target parking space in the parking path; Control the vehicle to travel according to the updated parking path.

[0027] Thirdly, this application provides an automatic parking device, including: a processor, a memory, and a system bus; The processor and the memory are connected via the system bus; The memory is used to store one or more programs, the one or more programs including instructions that, when executed by the processor, cause the processor to perform the automatic parking method described in any of the above embodiments.

[0028] Fourthly, this application provides a computer-readable storage medium storing instructions that, when executed on a terminal device, cause the terminal device to perform the automatic parking method described in any of the above embodiments.

[0029] Therefore, the embodiments of this application have the following beneficial effects: This application provides an automatic parking method, apparatus, and device. By acquiring the vehicle's visual pose information and odometer pose information, fused pose information is obtained. The visual pose information is determined based on the vehicle's environmental image, while the odometer pose information is generated by a wheeled odometer. Based on the visual and odometer information, a more accurate fused pose information for the vehicle can be obtained. Then, the parking space location information of the target parking space is acquired. Based on the more accurate fused pose information and parking space location information, a parking path is generated. The parking path generated based on the more accurate fused pose information can optimize the parking path and achieve more accurate automatic parking. Attached Figure Description

[0030] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0031] Figure 1 A schematic diagram of a scenario for an automatic parking method provided in an embodiment of this application; Figure 2 A flowchart of an automatic parking method provided in an embodiment of this application; Figure 3 A flowchart for determining fusion parameters is provided as an embodiment of this application; Figure 4 This is a schematic diagram of an automatic parking device provided in an embodiment of this application. Detailed Implementation

[0032] To facilitate understanding and explanation of the technical solutions provided in the embodiments of this application, the background technology of this application will be described first.

[0033] Research on traditional automated parking methods revealed that one approach uses monocular simultaneous localization and mapping (MS / MAP) for positioning. However, the positioning information generated by MS / MAP lacks scale information and is typically corrected using wheel speedometer data. This wheel speedometer data is unreliable and prone to cumulative errors, severely impacting the accuracy of scale information and leading to significant positioning errors during automated parking. Another approach utilizes visual odometry (VOA) to generate positioning information. This method is susceptible to scene limitations; in unsuitable scenarios, the positioning information is unreliable. Finally, another approach uses visual positioning information to verify the vehicle's dead-end information. While this method improves positioning accuracy, it is prone to losing pose information, affecting the overall accuracy of automated parking.

[0034] Based on this, embodiments of this application provide an automatic parking method, apparatus, and device. By acquiring the vehicle's visual pose information and odometer pose information, fused pose information is obtained. The visual pose information is determined based on the vehicle's environmental image, while the odometer pose information is generated by a wheeled odometer. Based on the visual information and the odometer information, more accurate fused pose information of the vehicle can be obtained. Then, the parking space location information of the target parking space is acquired. Based on the obtained more accurate fused pose information and parking space location information, a parking path is generated. The parking path generated based on the more accurate fused pose information can optimize the parking path and achieve more accurate automatic parking.

[0035] To facilitate understanding of the technical solutions provided in the embodiments of this application, the application scenario of an automatic parking method provided in the embodiments of this application is described below with reference to the accompanying drawings. See also Figure 1 As shown in the figure, this figure is a schematic diagram of an automatic parking method provided in an embodiment of this application.

[0036] Vehicle 101 may be equipped with a surround-view camera 102 and a binocular camera 103. After automatic parking is initiated, the binocular camera 103 acquires the visual pose information of vehicle 101, and the vehicle 101's odometer 104 acquires the odometer pose information. The visual pose information and the odometer pose information are then fused to obtain fused pose information. The surround-view camera 102 acquires the parking space location information of the target parking space. Based on the fused pose information and the parking space location information, a parking path is generated. Vehicle 101 is then controlled to drive according to the parking path.

[0037] To facilitate understanding of the technical solutions provided in the embodiments of this application, an automatic parking method provided in the embodiments of this application will be described below with reference to the accompanying drawings.

[0038] See Figure 2 As shown in the figure, this figure is a flowchart of an automatic parking method provided in an embodiment of this application, which includes steps S201-S206.

[0039] S201: Obtain the visual pose information of the vehicle, which is determined based on the environmental image of the vehicle.

[0040] This vehicle is equipped with automatic parking. This application does not limit the method of triggering automatic parking; for example, the driver can trigger the automatic parking activation switch in the vehicle. After automatic parking is activated, the vehicle's visual position and pose information can be obtained.

[0041] Visual pose information refers to the position and attitude information generated based on the vehicle's environmental images. The vehicle's environmental images are images of the surrounding environment acquired by the vehicle.

[0042] The environmental images can be acquired by a binocular camera. Specifically, these images can include those from the left front and right front of the vehicle, corresponding to the left and right visual perspectives, respectively. Using a binocular camera allows for the acquisition of environmental images based on binocular vision, avoiding the scale uncertainty inherent in monocular vision.

[0043] In one possible implementation, this application provides two specific implementation methods for obtaining the visual pose information of the vehicle, as detailed below.

[0044] S202: Obtain the mileage and position information of the vehicle, which is generated by the wheel odometer.

[0045] Mileage pose information refers to the position and attitude information generated based on the vehicle's wheel odometer. In one possible implementation, the wheel odometer can obtain the vehicle's current mileage pose information based on a trajectory extrapolation algorithm.

[0046] S203: Obtain fused pose information based on the visual pose information and the mileage pose information.

[0047] Visual pose information is pose information acquired from a visual perspective. Odometer pose information is pose information acquired from a mileage perspective. The acquired visual pose information and mileage pose information are fused to obtain fused pose information. Fused pose information is pose information determined based on both visual and mileage perspectives.

[0048] In one possible implementation, this application provides a specific implementation method for obtaining fused pose information based on the visual pose information and the odometer pose information, as described below.

[0049] S204: Obtain the parking space location information of the target parking space.

[0050] The target parking space is the parking space the vehicle intends to enter. The location information of the target parking space is the location information of the target parking space. This location information may include the specific location of the parking space's boundary lines, as well as information on vehicles parked around the target parking space.

[0051] In one possible implementation, the parking space location information of the target parking space can be generated by a surround-view camera carried by the vehicle. When automatic parking is initiated, the surround-view camera on the vehicle detects the target parking space and generates the corresponding parking space location information.

[0052] S205: Generate a parking path based on the fused pose information and the parking space location information.

[0053] The fused pose information includes the vehicle's position and attitude information, corresponding to the starting point of the parking path. The parking space location information includes the location information of the target parking space, corresponding to the ending point of the parking path. Based on the fused pose information and parking space location information, a parking path is generated. The parking path is the route the vehicle references when performing automatic parking.

[0054] In one possible implementation, this application provides a specific implementation method for generating a parking path based on the fused pose information and the parking space location information, as described below.

[0055] S206: Control the vehicle to travel according to the parking path.

[0056] After determining the parking path, control the vehicle to drive according to the parking path. When the vehicle drives according to the parking path, automatic parking can be performed.

[0057] In one possible implementation, this application provides a specific method for controlling the vehicle to travel according to the parking path, as detailed below.

[0058] As described in S201-S206 above, in this embodiment, fused pose information is obtained by acquiring the vehicle's visual pose information and odometer pose information. The visual pose information is determined based on the vehicle's environmental image, while the odometer pose information is generated by a wheel-mounted odometer. Based on the visual information and the odometer information, a more accurate fused pose information for the vehicle can be obtained. Then, the parking space location information of the target parking space is acquired. Based on the obtained more accurate fused pose information and parking space location information, a parking path is generated. The parking path generated based on the more accurate fused pose information can optimize the parking path and achieve more accurate automatic parking.

[0059] In one possible implementation, the vehicle's visual pose information can be determined based on feature points in the environmental image. This application provides a specific implementation method for obtaining the vehicle's visual pose information, which includes the following four steps: A1: Collect image information of the preset area around the vehicle at the current moment and generate a target environment image.

[0060] Using a camera or webcam mounted on the vehicle, image information of a preset area surrounding the vehicle at the current moment is collected. The preset area can be a region within a certain range centered on the vehicle. The preset area can be determined based on the acquisition range of the camera or webcam, or it can be determined based on the safe driving distance of the vehicle.

[0061] In one possible implementation, images can be acquired in real time to improve the accuracy of the parking path. In another possible implementation, images can be acquired at regular intervals, such as 0.5 seconds.

[0062] The environmental image acquired at the current moment is determined as the target environmental image.

[0063] A2: Extract feature points from the target environment image.

[0064] Feature points in a target environment image are the most prominent points in the image. Feature points can be detected using feature point extraction algorithms. In one possible implementation, feature points can be ORB (Oriented FAST and Rotated BRIEF) feature points.

[0065] A3: Match the feature points in the target environment image with the feature points in the historical environment image, and use the feature points in the target environment image that are successfully matched as the matching points; the historical environment image is an environment image collected and generated at a historical time, and the historical time is a time before the current time.

[0066] Historical environment images are environmental images acquired at historical moments. A historical moment is a moment prior to the current moment when the target environment image was acquired.

[0067] The process involves matching feature points in the target environment image with feature points in historical environment images, and using the successfully matched feature points as the matching points. In one possible implementation, each feature point has a corresponding descriptor, and the matching of feature points can be determined based on the descriptor.

[0068] A4: Calculate the relative pose corresponding to the current moment based on the matching point to obtain the visual pose information of the vehicle.

[0069] The relative pose of the vehicle at the current moment is calculated based on the matching point.

[0070] In one possible implementation, this application provides a specific implementation method for calculating the relative pose corresponding to the current moment based on the matching point to obtain the visual pose information of the vehicle. Please refer to the following for details.

[0071] In this embodiment of the application, by determining the matching point and calculating the visual pose information of the vehicle at the current moment, a relatively accurate visual pose information of the vehicle can be obtained.

[0072] In some cases, the number of environmental images is large, resulting in a significant computational burden in calculating the vehicle's visual pose information. To conserve computational resources, this application provides another specific implementation method for obtaining the vehicle's visual pose information, comprising the following eight steps: B1: Collect image information of the preset area around the vehicle at the current moment and generate a target environment image.

[0073] B1 is similar to A1 above; please refer to the above text for details, which will not be repeated here.

[0074] B2: Determine the parallax between the target environment image and the historical environment image of the last frame in the sliding window; the sliding window includes environment images, which are sorted according to the order of acquisition time; the historical environment image is an environment image acquired and generated at a historical time, and the historical time is a time before the current time.

[0075] The environmental images in the sliding window are sorted according to the order in which they were acquired. For example, environmental images acquired earlier are ranked lower, and those acquired later are ranked higher.

[0076] After acquiring the current environmental image, which is the target environmental image, determine whether to put the target environmental image into the sliding window.

[0077] Calculate the disparity between the target environment image and the historical environment image of the last frame in the sliding window. Disparity refers to the difference between two images. By calculating the disparity between the target environment image and the historical environment image of the last frame in the sliding window, the changes between the historical environment image of the last frame and the target environment image can be measured.

[0078] B3: When the disparity is greater than the first disparity threshold, the target environment image is added to the sliding window.

[0079] When the disparity is greater than the first disparity threshold, the target environment image differs significantly from the last frame of the historical environment image, indicating that the vehicle has traveled a relatively large distance. Therefore, the corresponding visual pose information can be calculated based on the target environment image. The target environment image is then added to the sliding window.

[0080] B4: Extract feature points from the target environment image.

[0081] B5: Match the feature points in the target environment image with the feature points in the historical environment image, and use the feature points in the target environment image that are successfully matched as the matching points.

[0082] B6: Calculate the relative pose corresponding to the current moment based on the matching point to obtain the visual pose information of the vehicle.

[0083] B4-B6 are similar to A2-A4 above; please refer to the description above for details, which will not be repeated here.

[0084] In one possible implementation, this application embodiment also provides a specific implementation method for calculating the relative pose corresponding to the current time based on the matching point to obtain the visual pose information of the vehicle, as detailed below.

[0085] B7: When the number of frames of the environment image in the sliding window is greater than the frame number threshold, delete one frame of historical environment image in the sliding window.

[0086] The sliding window includes environmental images with a frame count threshold. This threshold can be set based on computing power. When the number of environmental images in the sliding window after adding the target environmental image exceeds the frame count threshold, one historical environmental image needs to be deleted from the sliding window to maintain the total number of environmental images included.

[0087] In one possible implementation, the first frame of the historical environment image in the sliding window can be deleted. In another possible implementation, the historical environment image to be deleted can be determined based on the parallax between adjacent environment images. This application provides a specific implementation method for deleting a frame of historical environment image in the sliding window when the number of frames in the environment image window is greater than a frame number threshold; please refer to the following description.

[0088] When automatic parking starts, if the number of frames of the environmental image in the sliding window is less than or equal to the frame count threshold, the acquired environmental image can be added to the sliding window. Environmental images are then deleted once the number of frames exceeds the frame count threshold.

[0089] B8: When the disparity is less than or equal to the first disparity threshold, delete the target environment image, return to the process of collecting image information in the preset area around the vehicle at the current moment, generate the target environment image and subsequent steps.

[0090] When the disparity is less than the first disparity threshold, the target environment image differs little from the last frame of the historical environment image, indicating that the vehicle may be stationary or have moved a small distance. In such cases, the visual pose information of the vehicle at the current moment can be omitted to reduce redundant calculations. The target environment image can be deleted, and the process can be returned to B1.

[0091] Based on the above, it can be seen that by setting a sliding window, the amount of computation in the automatic parking process can be reduced. This can avoid redundant calculations while retaining valid environmental images, thus reducing the amount of computation.

[0092] In one possible implementation, this application provides a specific method for deleting a frame of historical environmental image in the sliding window when the number of frames of the environmental image in the sliding window is greater than a frame number threshold, including the following two steps: C1: When the number of frames of the environment image in the sliding window is greater than the frame number threshold, and the target environment image is a key frame, delete the historical environment image of the first frame in the sliding window; the key frame is an environment image whose number of matching points is less than the number of matching points threshold and whose disparity with the last frame environment image in the sliding window is greater than a second disparity threshold.

[0093] When the number of frames in the environment image within the sliding window exceeds a frame count threshold, it can be determined whether the target environment image is a keyframe. A keyframe is an environment image where the number of matching points is less than a matching point count threshold and the disparity between it and the last historical environment image in the sliding window exceeds a second disparity threshold.

[0094] If the target environment image is a keyframe, then after adding a keyframe, the disparity between the environment image in the sliding window and the previous historical environment image will be larger, and the average disparity between adjacent environment images in the sliding window will be more even. Therefore, the historical environment image with the longest acquisition time from the current time in the sliding window, i.e., the first historical environment image, can be deleted.

[0095] C2: When the number of frames of the environment image in the sliding window is greater than the frame number threshold, and the target environment image is not a keyframe, delete the environment image with the smallest adjacent average disparity in the sliding window.

[0096] When the number of frames of the environment images in the sliding window exceeds a frame threshold, and the target environment image is not a keyframe, the disparity of the environment images in the sliding window becomes unstable after adding keyframes. The average disparity between adjacent environment images in the sliding window is calculated. The average disparity between adjacent environment images is the average of the disparities between that environment image and the environment images in the preceding and following frames. The environment image with the smallest average disparity between adjacent environment images will affect the overall disparity of the environment images in the sliding window; therefore, the environment image with the smallest average disparity between adjacent environment images is removed from the sliding window.

[0097] In this embodiment of the application, by determining whether the target environment image is a keyframe, and then determining the environment image to be deleted, the average disparity between adjacent environment images in the sliding window can be made more stable, thereby improving the effectiveness of visual pose information.

[0098] In one possible implementation, this application provides a specific method for calculating the relative pose corresponding to the current moment based on the matching point to obtain the visual pose information of the vehicle, including the following six steps: D1: Divide the matching points of the target environment image and the first historical environment image into at least one first point set, and each first point set includes a first number of matching points of the target.

[0099] The target environment image and the first historical environment image may have multiple matching points. These matching points are divided to obtain at least one first point set. Each first point set contains a first number of matching points for the target. The first historical environment image can be the previous frame of the target environment image.

[0100] In one possible implementation, a monocular 5-point method and the RANSAC (Random Sample Consensus) algorithm can be used to randomly select several pairs of 5 points from all the matching points, and form a first point set for each pair of 5 points.

[0101] D2: Calculate the first essential matrix for each of the first point sets, and determine the first rotation matrix based on the first essential matrix.

[0102] Calculate the first essential matrix for each set of points. The essential matrix, in a three-dimensional coordinate system, is used to connect two corresponding points. Based on the first essential matrix of the first set of points, calculate the first rotation matrix.

[0103] Specifically, the number of interior points in the matching points of the first point set can be determined firstly based on the first essential matrix of the first point set. Interior points are matching points that are not located at the edge of the shape and whose error is less than the error threshold. Interior points are non-dynamic points. The first essential matrix of the first point set with the largest number of interior points is used as the final solution to obtain the first rotation matrix. The first rotation matrix is ​​the rotation matrix between the current time corresponding to the target environment image and the acquisition time corresponding to the first historical environment image.

[0104] D3: Divide the matching points of the target environment image and the second historical environment image into at least one second point set, and each second point set includes a second number of matching points.

[0105] The second historical environment image is an environment image that differs from the first historical environment image. The second historical environment image can be an environment image acquired before the acquisition time of the first historical environment image. For example, the second historical environment image can be one of the two preceding frames of the target environment image.

[0106] Specifically, in one possible implementation, the monocular 5-point method and the RANSAC algorithm can be used to randomly select several pairs of 5 points from all the matching points, and form a point set for each pair of 5 points.

[0107] D4: Calculate the second essential matrix for each of the second point sets, and determine the second rotation matrix based on the second essential matrix.

[0108] Calculate the second essential matrix for each second point set. The essential matrix, in a three-dimensional coordinate system, is used to connect two corresponding points. Based on the second essential matrix of the second point set, calculate the second rotation matrix.

[0109] Specifically, the number of interior points in the matching points of the second point set can be determined first based on the second essential matrix of the second point set. Interior points are matching points that are not located on the shape edge and whose error is less than the error threshold. The second essential matrix of the point set with the largest number of interior points is used as the final solution to obtain the second rotation matrix. The second rotation matrix is ​​the rotation matrix between the current time corresponding to the target environment image and the acquisition time corresponding to the second historical environment image.

[0110] D5: Based on the first rotation matrix and the second rotation matrix, obtain the third rotation matrix.

[0111] Using the first and second rotation matrices, the third rotation matrix can be obtained. The third rotation matrix is ​​the rotation matrix between a certain historical acquisition time and the current time.

[0112] In one possible implementation, the rotation matrix corresponding to the target environment image can be calculated first using the second rotation matrix.

[0113] Assume the current time corresponding to the target environment image is t, the acquisition time of the first historical environment image is t-1, and the acquisition time of the second historical environment image is t-2.

[0114] The calculation method can be found in formula (1): (1) in, This represents the rotation matrix corresponding to the target environment image. This represents the rotation matrix from time t-2 to time t-1. This represents the rotation matrix from time t-2 to time t. It can be calculated based on the first historical environment image and the second historical environment image.

[0115] The third rotation matrix is ​​then calculated using the first rotation matrix and the rotation matrix corresponding to the target environment image. It can be shown by formula (2): (2) D6: Iteratively calculate the translation vector using the third rotation matrix, and remove feature points that do not meet the preset conditions before each iteration.

[0116] After obtaining the third rotation matrix, the translation vector is solved using the third rotation matrix.

[0117] In one possible implementation, the camera pose can be solved by constructing a least-squares problem using the third rotation matrix, and then the translation vector can be obtained.

[0118] During the solution process, iterative calculations can be performed, employing nonlinear optimization methods to solve for the translation vector. In one possible implementation, the initial value for the iterative calculation can be the pose value of the previous frame of the historical environment image of the target environment image. The descent direction is then found through iterative calculation to optimize the objective function.

[0119] The formula for solving the translation vector can be given by formula (3): (3) in, . These are the matching points between the first historical environment image acquired at time t-1 and the target environment image acquired at time t. The projection function representing the camera pinhole model. It is the camera intrinsic parameter matrix. f is the focal length. This is the depth of the feature point in the camera coordinate system. i represents the feature point index. This represents the total number of matched point pairs, where T is the translation vector, and m is the number of iterations. It refers to the set of interior points obtained in the (m-1)th iteration at time t.

[0120] During the iterative calculation process, matching points that do not meet the preset conditions can also be deleted.

[0121] Specifically, the preset conditions can be conditions related to the normalized reprojection error. For example, the method for judging the matching points can be found in formula (4).

[0122] (4)

[0123] in, These are the matching points between the first historical environment image acquired at time t-1 and the target environment image acquired at time t, where h represents the normalization process applied to the last dimension of the coordinates. This is the mean of the normalized reprojection error for all feature points.

[0124] D7: Use the translation vector and the third rotation matrix as the visual pose information of the vehicle.

[0125] The obtained translation vector and third rotation matrix can reflect the pose changes of the vehicle. The translation vector and third rotation matrix are used as the visual pose information of the vehicle.

[0126] Based on the above, it can be seen that in the embodiments of this application, using the normalized reprojection error as the feature point removal condition can ensure the quality of the feature points used for motion estimation.

[0127] Furthermore, after obtaining the vehicle's visual pose information, pose optimization can be performed. In one possible implementation, in addition to the steps described above, the method further includes: Match the feature points in the target environment image with the feature points that determine the world coordinates; Adjust the visual pose information corresponding to the current moment based on the feature points of the successfully matched world coordinates.

[0128] Some feature points have definite world coordinates. Pose optimization is performed based on these feature points with defined world coordinates. Graph optimization algorithms can be used in the pose optimization process.

[0129] In one possible implementation, feature points in the target environment image can be first matched with feature points in a defined world coordinate system to determine the matching relationship between them. Then, based on this matching relationship, the visual pose information at the current moment can be adjusted to optimize the visual pose information.

[0130] Based on the above, it can be seen that by using feature points with defined world coordinates to optimize visual pose information, the accuracy of visual pose information can be improved.

[0131] In some scenarios, the vehicle may move back and forth. For example, the vehicle may move from position A to position B and then back from position B to position A. During this movement, the acquired environmental images may contain repeated images of the environment at position A, thus creating a loop.

[0132] To address the aforementioned scenarios, this application provides an automatic parking method, which, in addition to the steps described above, includes the following three steps: E1: Determine the loopback image in the historical environmental images whose acquisition time is closest to the current time; the loopback image is an environmental image that forms a loop with other historical environmental images.

[0133] A loopback image is an environment image that forms a loop with other historical environment images within a given historical environment image. Loopback images can be determined based on the similarity between the environment images.

[0134] For example, if there are 20 historical environment images, where the 18th historical environment image forms a loop with the 9th historical environment image, and the 19th and 20th historical environment images do not form a loop with other historical environment images, then the 18th historical environment image is considered as the loop image.

[0135] E2: When the image interval between the target environment image and the loop closure image is greater than the loop closure interval threshold, loop closure detection is performed based on the target environment image.

[0136] After identifying the loopback images of the target environment image, the image interval between the target environment image and the loopback images is obtained. The image interval reflects the distance between the environment images where loopbacks may occur.

[0137] Taking the above as an example, if the target environment image is the 21st frame environment image, then the image interval is 2 frames.

[0138] The relationship between the image interval and the loop closure interval threshold is determined. The loop closure interval threshold can be a pre-set image interval at which loop closure detection begins. When the image interval is greater than the loop closure interval threshold, loop closure detection can be performed to determine whether a loop is formed with the target environment image.

[0139] E3: When loop closure detection is successful and the size of the loop closure is greater than the loop closure size threshold, the visual pose information corresponding to the target environment image is adjusted using the visual pose information corresponding to the loop closure image.

[0140] If loop closure detection is successful, the size of the loop can be determined. The size of the loop can be the number of frames in the environmental image that constitutes the loop.

[0141] Taking the above example again, if the target environment image and the 14th frame environment image form a loop, then the size of the loop can be determined to be 6 frames.

[0142] The loop closure size threshold is a pre-set minimum loop closure size required to determine a valid loop closure. When the size of a loop closure exceeds the threshold, the loop closure is considered valid. The visual pose information corresponding to the loop closure image can be used to adjust the visual pose information corresponding to the target environment image, thus achieving adjustment of the visual pose information of the target environment image.

[0143] In this embodiment, loop closure detection is used, and loop closure interval threshold and loop closure size threshold are used to more accurately determine effective loops, thereby improving the accuracy of visual pose information.

[0144] In one possible implementation, this application provides a specific method for obtaining fused pose information based on the visual pose information and the odometry pose information, which specifically includes the following four steps: F1: Based on the visual pose information, calculate the visual pose change between the target environment image at the current moment and the historical environment image at a historical moment.

[0145] Based on the visual pose information corresponding to the obtained target environment image, the visual pose change is calculated. The visual pose change is calculated using the target environment image at the current time and historical environment images at previous times.

[0146] Visual pose changes include changes in the pose coordinate system and angles. The changes.

[0147] F2: Based on the mileage pose information, calculate the mileage pose change between the target mileage pose at the current time and the historical mileage pose at the historical time.

[0148] Similarly, the mileage pose change is calculated based on the acquired mileage pose information. The mileage pose change is the mileage pose change between the target mileage pose at the current time and the historical mileage pose at a historical time.

[0149] Odometer pose changes include changes in the pose coordinate system and angles. The changes.

[0150] F3: Determine the fusion parameters based on the visual pose change and the mileage pose change.

[0151] Based on the calculated visual pose changes and odometry pose changes, the corresponding fusion parameters are determined. These fusion parameters are used to fuse the visual pose changes and odometry pose changes.

[0152] In one possible implementation, this application provides a specific method for determining fusion parameters based on the visual pose change and the mileage pose change, as described below.

[0153] F4: Using the fusion parameters, the visual pose change, and the mileage pose change, fused pose information is obtained.

[0154] Based on the determined fusion parameters, visual pose changes and odometer pose changes, fused pose information is calculated.

[0155] In one possible implementation, fusing pose information can provide... Correspondingly, the fused pose information can be represented by formula (5).

[0156] (5)

[0157] in, For mileage pose changes, For visual pose changes, odometer pose changes and visual pose changes include changes in the coordinate system and angles. The changes.

[0158] Based on the above, by determining the fusion parameters based on mileage pose changes and visual pose changes, a loosely coupled approach can be used to fuse mileage pose changes and visual pose changes, resulting in more accurate fused pose information.

[0159] Furthermore, this application provides a specific implementation method for determining fusion parameters based on the visual pose change and the mileage pose change, which specifically includes the following four steps.

[0160] G1: When the difference between the visual pose change and the odometer pose change is greater than a first difference threshold, obtain the number of inlier sets in the target environment image.

[0161] Both visual pose change and odometry pose change represent pose changes from a historical moment to the current moment. When the difference between visual pose change and odometry pose change is large, exceeding a first difference threshold, it is necessary to further determine the fusion parameters based on the tracking quality of the environmental image. The tracking quality of the environmental image can be measured by the number of inliers in the target environment image.

[0162] In one possible implementation, the difference between visual pose change and odometer pose change can be measured by calculating the amount of pose change.

[0163] pose change The calculation formula can be found in formula (6).

[0164] (6)

[0165] in, This is the threshold for changes in mileage pose.

[0166] See Figure 3 As shown in the figure, this is a flowchart of determining fusion parameters provided in an embodiment of this application.

[0167] Specifically, the first gap threshold can be 0. The pose change is compared to the first gap threshold. If... If the value is greater than 0, it indicates that the pose calculated by the two methods is relatively different, and it is necessary to obtain the number of interior points in the target environment image.

[0168] G2: When the number of interior points exceeds the threshold, the first parameter is used as the fusion parameter.

[0169] The quantity threshold is a pre-determined threshold for measuring the number of inlier sets. When the number of inlier sets exceeds the quantity threshold, the first parameter is used as the fusion parameter.

[0170] In one possible implementation, the first parameter can be 0.5.

[0171] G3: When the number of interior points is less than or equal to the number threshold, the second parameter is used as the fusion parameter.

[0172] In one possible implementation, the second parameter can be represented by formula (7): (7) in, Let be the number of interior points. The threshold value is the feature point threshold.

[0173] in, It can be expressed by formula (8): (8) G4: When the difference between the visual pose change and the mileage pose change is less than the first difference threshold, the third parameter is used as the fusion parameter.

[0174] When the difference between visual pose change and odometer pose change is small, less than the first difference threshold, the third parameter is used as the fusion parameter.

[0175] Specifically, with Figure 3 For example, when When the value is less than 0, it indicates that the position difference between the two calculation methods is very small, and the fusion parameters can be determined directly.

[0176] In one possible implementation, the third parameter can be represented by formula (9): (9) in, It can be expressed by formula (10): (10) in, Let be the number of interior points. The threshold value is the feature point threshold.

[0177] In the embodiments of this application, based on the differences in pose changes between visual and odometry methods and the image tracking quality, the corresponding fusion parameters can be determined, thereby obtaining more accurate fused pose information.

[0178] Furthermore, this application embodiment also provides a specific implementation method for generating a parking path based on the fused pose information and the parking space location information, including the following three steps: H1: Determine the starting point of the parking path based on the fused pose information.

[0179] The fused pose information is used to determine the vehicle's current pose. Based on the fused pose information, the starting point of the parking path can be determined.

[0180] H2: Determine the endpoint of the parking path based on the parking space location information.

[0181] Parking space location information is used to determine the location of parking spaces. Based on the parking space location information, the endpoint of the parking route can be determined.

[0182] H3: The parking path is formed using arcs and straight lines based on the starting point and the ending point of the parking path; the curvature between the arcs and the straight lines is smoothed using Bézier curves or cycloid curves.

[0183] After determining the starting and ending points of the parking path, the route from these points can be planned. Specifically, a combination of arcs and straight lines can be used to construct the parking path. The radius of the arcs is set to the minimum turning radius, ensuring the parking path is the shortest possible path.

[0184] At the intersection of a straight line and a circular arc, a fourth-order Bézier curve can be added to achieve curvature smoothing, or a spiral curve can be added to achieve curvature smoothing.

[0185] In this embodiment, a combination of circular arcs and straight lines is used to plan the parking path. Utilizing fourth-order Bézier curves and spiral curves can improve the smoothness of curvature between the circular arcs and straight lines, satisfying the curvature smoothness requirement without affecting the overall path.

[0186] When the vehicle approaches the parking space, more accurate parking space information can be obtained. Based on the more accurate parking space information, the incomplete parking path can be replanned.

[0187] Based on this, this application provides a specific implementation method for controlling the vehicle to travel according to the first parking path, which specifically includes the following four steps: I1: Control the vehicle to travel according to the parking path.

[0188] The parking path is the planned route from the vehicle's current position to the target parking space. Controlling the vehicle to follow the parking path will allow it to move to the target parking space.

[0189] I2: When the vehicle reaches a key point in the parking path, obtain the boundary line information of the target parking space.

[0190] The parking path contains key points. Key points can be points pre-defined within the parking path that are close to the target parking space. In one possible implementation, key points can be locations within the parking path where the vehicle can obtain information about the boundary lines of the target parking space.

[0191] I3: Based on the boundary line information of the target parking space and the current fused pose information of the vehicle, update the path from the key point to the target parking space in the parking path.

[0192] The boundary line information of the target parking space can be the position of the boundary line of the target parking space. In one possible implementation, the vehicle is also equipped with two TOF (Time-of-Flight) cameras at the taillights. The TOF cameras can be used to acquire images behind the vehicle and extract the boundary line information of the target parking space. The TOF cameras can obtain the point cloud information of the target parking space and have low sensitivity to lighting, enabling them to output high-precision coordinates of the parking space when the vehicle is close to the target parking space.

[0193] Correspondingly, the key points can be set according to the parking path and the detection range of the TOF camera.

[0194] Based on the obtained boundary line information of the target parking space and the fused pose information of the vehicle, the parking path from the vehicle's position to the target parking space can be replanned. Correspondingly, the path from the key point to the target parking space in the parking path is updated.

[0195] Specifically, the vehicle's pose can be determined based on the fused pose information, and the centerline of the target parking space can be determined based on the boundary line information of the target parking space. The lateral distance between the vehicle's pose and the centerline of the target parking space, as well as the vehicle's heading, are calculated. The calculated lateral distance is compared with a distance threshold, and the vehicle's heading is compared with an orientation threshold. These distance and orientation thresholds can be pre-set thresholds for determining the center position of the vehicle in the target parking space. If the lateral distance is less than the distance threshold, and the vehicle's heading is less than the orientation threshold, a first-order Bézier curve can be used to plan the parking path from the vehicle to the centerline of the target parking space. If the lateral distance is greater than or equal to the distance threshold, or the vehicle's heading is greater than or equal to the orientation threshold, a higher-order Bézier curve can be used to plan the parking path from the vehicle to the centerline of the target parking space.

[0196] I4: Control the vehicle to travel according to the updated parking path.

[0197] Based on the updated parking path and the path from key points to the target parking space, the vehicle continues to move. In one possible implementation, automatic parking can be terminated when the vehicle is detected to be at a preset endpoint.

[0198] Based on the above, it can be seen that by replanning the parking path, vehicles can drive into parking spaces more accurately.

[0199] Based on the automatic parking method provided in the above embodiments, this application also provides an automatic parking device, which will be described below with reference to the accompanying drawings.

[0200] See Figure 4 This figure is a structural schematic diagram of an automatic parking device provided in an embodiment of this application. Figure 4 As shown, the automatic parking device includes: The first acquisition unit 401 is used to acquire the visual pose information of the vehicle, wherein the visual pose information is determined based on the environmental image of the vehicle. The second acquisition unit 402 is used to acquire the mileage and pose information of the vehicle, which is generated by the wheel odometer. The fusion unit 403 is used to obtain fused pose information based on the visual pose information and the odometer pose information; The third acquisition unit 404 is used to acquire the parking space location information of the target parking space; The generation unit 405 is used to generate a parking path based on the fused pose information and the parking space location information; Control unit 406 is used to control the vehicle to travel according to the parking path.

[0201] In one possible implementation, the fusion unit 403 includes: The first calculation subunit is used to calculate the visual pose change between the target environment image at the current time and the historical environment image at a historical time based on the visual pose information. The second calculation subunit is used to calculate the mileage pose change between the target mileage pose at the current time and the historical mileage pose at the historical time based on the mileage pose information. A subunit is defined to determine fusion parameters based on the visual pose change and the mileage pose change; The fusion subunit is used to obtain fused pose information by utilizing the fusion parameters, the visual pose change, and the odometer pose change.

[0202] In one possible implementation, the determining subunit is specifically used to obtain the number of inliers in the target environment image when the difference between the visual pose change and the odometer pose change is greater than a first difference threshold. When the number of interior points exceeds a threshold, the first parameter is used as the fusion parameter. When the number of interior points is less than or equal to the number threshold, the second parameter is used as the fusion parameter; When the difference between the visual pose change and the mileage pose change is less than the first difference threshold, the third parameter is used as the fusion parameter.

[0203] In one possible implementation, the first acquisition unit 401 includes: The first acquisition subunit is used to acquire image information within a preset area around the vehicle at the current moment and generate a target environment image; The first extraction subunit is used to extract feature points in the target environment image; The matching subunit is used to match feature points in the target environment image with feature points in the historical environment image, and to take the feature points in the target environment image that are successfully matched as the matching points; the historical environment image is an environment image that was collected and generated at a historical time, and the historical time is a time before the current time; A sub-unit is generated to calculate the relative pose corresponding to the current moment based on the matching point, so as to obtain the visual pose information of the vehicle.

[0204] In one possible implementation, the first acquisition unit 401 includes: The second acquisition subunit is used to acquire image information within a preset area around the vehicle at the current moment and generate a target environment image; A disparity calculation subunit is used to determine the disparity between the target environment image and the historical environment image of the last frame in the sliding window; the sliding window includes environment images, which are sorted according to the order of acquisition time; the historical environment images are environment images acquired and generated at historical times, and the historical times are times before the current time. Add a sub-unit to add the target environment image to the sliding window when the disparity is greater than a first disparity threshold; The second extraction subunit is used to extract feature points in the target environment image; match the feature points in the target environment image with feature points in historical environment images, and use the feature points in the target environment image that are successfully matched as matching points; A subunit is generated to calculate the relative pose corresponding to the current moment based on the matching point, so as to obtain the visual pose information of the vehicle. The first deletion subunit is used to delete one frame of historical environmental image in the sliding window when the number of frames of the environmental image in the sliding window is greater than the frame number threshold. The second deletion subunit is used to delete the target environment image when the disparity is less than or equal to the first disparity threshold, return to the execution of the image information in the preset area around the vehicle at the current time of acquisition, generate the target environment image and subsequent steps.

[0205] In one possible implementation, the first deletion subunit is specifically used to delete the first frame of the historical environment image in the sliding window when the number of frames of the environment image in the sliding window is greater than a frame number threshold and the target environment image is a key frame; the key frame is an environment image whose number of matching points is greater than a matching point number threshold and whose disparity with the last frame of the historical environment image in the sliding window is greater than a second disparity threshold. When the number of frames of the environment image in the sliding window is greater than the frame number threshold, and the target environment image is not a keyframe, delete the historical environment image with the smallest adjacent average disparity in the sliding window.

[0206] In one possible implementation, the generating subunit is specifically used to divide the matching points of the target environment image and the first historical environment image into at least one first point set, each first point set including a first target number of matching points; Calculate the first essential matrix for each set of points, and determine the first rotation matrix based on the first essential matrix; The matching points of the target environment image and the second historical environment image are divided into at least one second point set, and each second point set includes a second number of matching points for the target. Calculate the second essential matrix for each of the second point sets, and determine the second rotation matrix based on the second essential matrix; Based on the first rotation matrix and the second rotation matrix, the third rotation matrix is ​​obtained; The translation vector is calculated iteratively using the third rotation matrix, and feature points that do not meet the preset conditions are removed before each iteration. The translation vector and the third rotation matrix are used as the visual pose information of the vehicle.

[0207] In one possible implementation, the device further includes: A matching unit is used to match feature points in the target environment image with feature points that have determined world coordinates; Adjust the visual pose information corresponding to the current moment based on the feature points of the successfully matched world coordinates.

[0208] In one possible implementation, the device further includes: The loop closure detection unit is used to determine the loop closure image among the historical environmental images whose acquisition time is closest to the current time; the loop closure image is an environmental image that forms a loop with other historical environmental images. When the image interval between the target environment image and the loop closure image is greater than the loop closure interval threshold, loop closure detection is performed based on the target environment image. When loop closure detection is successful and the size of the loop closure is greater than the loop closure size threshold, the visual pose information corresponding to the target environment image is adjusted using the visual pose information corresponding to the loop closure image.

[0209] In one possible implementation, the generation unit 405 is specifically used to determine the starting point of the parking path based on the fused pose information; The endpoint of the parking path is determined based on the parking space location information; The parking path is formed using arcs and straight lines based on its starting point and ending point; the curvature between the arcs and straight lines is smoothed using Bézier curves or cycloid curves.

[0210] In one possible implementation, the control unit 406 is specifically used to acquire the boundary line information of the target parking space when the vehicle travels to a key point in the parking path. Based on the boundary line information of the target parking space and the current fused pose information of the vehicle, update the path from the key point to the target parking space in the parking path; Control the vehicle to travel according to the updated parking path.

[0211] Based on the automatic parking method provided in the above embodiments, this application also provides an automatic parking device, including: a processor, a memory, and a system bus; The processor and the memory are connected via the system bus; The memory is used to store one or more programs, the one or more programs including instructions that, when executed by the processor, cause the processor to perform the automatic parking method described in any of the above embodiments.

[0212] Based on the automatic parking method provided in the above embodiments, this application provides a computer-readable storage medium storing instructions that, when executed on a terminal device, cause the terminal device to perform the automatic parking method described in any of the above embodiments.

[0213] It should be noted that the various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the systems or apparatus disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the descriptions are relatively simple, and relevant parts can be referred to the method section.

[0214] It should be understood that in this application, "at least one (item)" means one or more, and "more than" means two or more. "And / or" is used to describe the relationship between related objects, indicating that three relationships can exist. For example, "A and / or B" can represent three cases: only A exists, only B exists, and both A and B exist simultaneously, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one (item) of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one (item) of a, b, or c can represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.

[0215] It should also be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0216] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented directly by hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.

[0217] The above description of the disclosed embodiments enables those skilled in the art to make or use this application. Various modifications to these embodiments will be readily 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 this application. Therefore, this application is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. An automatic parking method, characterized in that, The method includes: Obtain the visual pose information of the vehicle, wherein the visual pose information refers to the position and attitude information generated based on the environmental image of the vehicle; The vehicle's mileage and pose information is obtained, and the mileage and pose information is generated by the wheel odometer; Based on the visual pose information, calculate the visual pose change between the target environment image at the current moment and the historical environment image at a historical moment; Based on the mileage pose information, calculate the mileage pose change between the target mileage pose at the current time and the historical mileage pose at the historical time. The fusion parameters are determined based on the visual pose change and the mileage pose change; The visual pose change and the odometer pose change are fused using the fusion parameters and in a loosely coupled manner to obtain fused pose information; Obtain the location information of the target parking space; A parking path is generated based on the fused pose information and the parking space location information; Control the vehicle to travel according to the parking path; The step of determining the fusion parameters based on the visual pose change and the odometer pose change includes: When the difference between the visual pose change and the odometer pose change is greater than a first difference threshold, the number of inlier sets in the target environment image is obtained. When the number of interior points exceeds a threshold, the first parameter is used as the fusion parameter; the first parameter is 0.

5. When the number of inlier sets is less than or equal to a threshold, the second parameter is used as the fusion parameter; the second parameter is determined based on the number of inlier sets and the feature point threshold; when the number of inlier sets is greater than or equal to the feature point threshold, the second parameter is 0.5 times the feature point threshold; when the number of inlier sets is greater than 15 and less than the feature point threshold, the second parameter is 0.25 times the number of inlier sets; when the number of inlier sets is less than or equal to 15, the second parameter is zero; the feature point threshold is greater than 15. When the difference between the visual pose change and the mileage pose change is less than the first difference threshold, the third parameter is used as the fusion parameter; the third parameter is determined based on the number of inlier sets and the feature point threshold; wherein, when the number of inlier sets is greater than the feature point threshold, the third parameter is 0.1; when the number of inlier sets is greater than 15 and less than the feature point threshold, the third parameter is 0.1 times the number of inlier sets; when the number of inlier sets is less than or equal to 15, the third parameter is zero.

2. The method according to claim 1, characterized in that, The acquisition of the vehicle's visual pose information includes: Collect image information of a preset area around the vehicle at the current moment to generate a target environment image; Extract feature points from the target environment image; The feature points in the target environment image are matched with the feature points in the historical environment image, and the feature points in the target environment image that are successfully matched are used as the matching points; the historical environment image is an environment image that was collected and generated at a historical time, and the historical time is a time before the current time. The relative pose at the current moment is calculated based on the matching point to obtain the visual pose information of the vehicle.

3. The method according to claim 1, characterized in that, The acquisition of the vehicle's visual pose information includes: B1: Collect image information within a preset area surrounding the vehicle at the current moment to generate a target environment image; B2: Determine the parallax between the target environment image and the historical environment image of the last frame in the sliding window; the sliding window includes environment images, which are sorted according to the order of acquisition time; the historical environment image is an environment image acquired and generated at a historical time, and the historical time is a time before the current time; B3: When the disparity is greater than the first disparity threshold, the target environment image is added to the sliding window; B4: Extract feature points from the target environment image; match the feature points in the target environment image with the feature points in the historical environment image, and use the feature points in the target environment image that are successfully matched as the matching points; B5: Calculate the relative pose corresponding to the current moment based on the matching point to obtain the visual pose information of the vehicle; B6: When the number of frames of the environment image in the sliding window is greater than the frame number threshold, delete one frame of historical environment image in the sliding window; B7: When the disparity is less than or equal to the first disparity threshold, delete the target environment image and return to execute B1 to B6.

4. The method according to claim 3, characterized in that, The step of deleting a historical environmental image frame from the sliding window when the number of frames in the sliding window exceeds a frame count threshold includes: When the number of frames of the environment image in the sliding window is greater than the frame number threshold, and the target environment image is a key frame, the first frame of the historical environment image in the sliding window is deleted; the key frame is an environment image whose number of matching points is less than the number of matching points threshold and whose disparity with the last frame of the historical environment image in the sliding window is greater than a second disparity threshold. When the number of frames of the environment image in the sliding window is greater than the frame number threshold, and the target environment image is not a keyframe, delete the historical environment image with the smallest adjacent average disparity in the sliding window.

5. The method according to claim 2 or 3, characterized in that, The step of calculating the relative pose at the current moment based on the matching point to obtain the vehicle's visual pose information includes: The matching points of the target environment image and the first historical environment image are divided into at least one first point set, and each first point set includes a first number of matching points of the target. Calculate the first essential matrix for each set of points, and determine the first rotation matrix based on the first essential matrix; The matching points of the target environment image and the second historical environment image are divided into at least one second point set, and each second point set includes a second number of matching points for the target. Calculate the second essential matrix for each of the second point sets, and determine the second rotation matrix based on the second essential matrix; Based on the first rotation matrix and the second rotation matrix, the third rotation matrix is ​​obtained; The translation vector is calculated iteratively using the third rotation matrix, and feature points that do not meet the preset conditions are removed before each iteration. The translation vector and the third rotation matrix are used as the visual pose information of the vehicle.

6. The method according to claim 2 or 3, characterized in that, The method further includes: Match feature points in the target environment image with feature points whose visual coordinates have been determined; The visual pose information corresponding to the current moment is adjusted based on the feature points of the successfully matched visual coordinates.

7. The method according to claim 2 or 3, characterized in that, The method further includes: Determine the loopback image in the historical environmental images whose acquisition time is closest to the current time; the loopback image is an environmental image that forms a loop with other historical environmental images. When the image interval between the target environment image and the loop closure image is greater than the loop closure interval threshold, loop closure detection is performed based on the target environment image. When loop closure detection is successful and the size of the loop closure is greater than the loop closure size threshold, the visual pose information corresponding to the target environment image is adjusted using the visual pose information corresponding to the loop closure image.

8. The method according to claim 1, characterized in that, The step of generating a parking path based on the fused pose information and the parking space location information includes: The starting point of the parking path is determined based on the fused pose information; The endpoint of the parking path is determined based on the parking space location information; The parking path is formed using arcs and straight lines based on its starting point and ending point; the curvature between the arcs and straight lines is smoothed using Bézier curves or cycloid curves.

9. The method according to claim 1, characterized in that, Controlling the vehicle to travel according to the parking path includes: When the vehicle reaches a key point in the parking path, obtain the boundary line information of the target parking space; Based on the boundary line information of the target parking space and the current fused pose information of the vehicle, update the path from the key point to the target parking space in the parking path; Control the vehicle to travel according to the updated parking path.

10. An automatic parking device, characterized in that, The device includes: The first acquisition unit is used to acquire the visual pose information of the vehicle, wherein the visual pose information refers to the position information and attitude information generated based on the environmental image of the vehicle. The second acquisition unit is used to acquire the mileage and pose information of the vehicle, which is generated by the wheel odometer. A fusion unit is configured to: calculate the visual pose change between the target environment image at the current moment and the historical environment image at a historical moment based on the visual pose information; calculate the mileage pose change between the target mileage pose at the current moment and the historical mileage pose at a historical moment based on the mileage pose information; determine fusion parameters based on the visual pose change and the mileage pose change; and fuse the visual pose change and the mileage pose change using the fusion parameters in a loosely coupled manner to obtain fused pose information. The step of determining the fusion parameters based on the visual pose change and the mileage pose change includes: when the difference between the visual pose change and the mileage pose change is greater than a first difference threshold, obtaining the number of inlier sets in the target environment image; when the number of inlier sets is greater than a number threshold, using a first parameter as the fusion parameter; the first parameter is 0.5; when the number of inlier sets is less than or equal to the number threshold, using a second parameter as the fusion parameter. The second parameter is determined based on the number of inlier sets and the feature point threshold. When the number of inlier sets is greater than or equal to the feature point threshold, the second parameter is 0.5 times the feature point threshold. When the number of inlier sets is greater than 15 and less than the feature point threshold, the second parameter is 0.25 times the number of inlier sets. When the number of inlier sets is less than or equal to 15, the second parameter is zero. When the difference between the visual pose change and the mileage pose change is less than the first difference threshold, the third parameter is used as the fusion parameter. The third parameter is determined based on the number of inlier sets and the feature point threshold. Wherein, when the number of inlier sets is greater than the feature point threshold, the third parameter is 0.

1. When the number of inlier sets is greater than 15 and less than the feature point threshold, the third parameter is 0.1 times the number of inlier sets. When the number of inlier sets is less than or equal to 15, the third parameter is zero. The feature point threshold is greater than 15. The third acquisition unit is used to acquire the parking space location information of the target parking space; The generation unit is used to generate a parking path based on the fused pose information and the parking space location information; The control unit is used to control the vehicle to travel according to the parking path.

11. An automatic parking device, characterized in that, include: Processor, memory, system bus; The processor and the memory are connected via the system bus; The memory is used to store one or more programs, the one or more programs including instructions that, when executed by the processor, cause the processor to perform the automatic parking method according to any one of claims 1-9.

12. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores instructions that, when executed on a terminal device, cause the terminal device to perform the automatic parking method according to any one of claims 1-9.

Citation Information

Patent Citations

  • Indoor movable robot real-time navigation method based on visual information correction

    CN101576384A

  • Method and system for assisting in parking

    CN103950409A

  • Method for extracting and encoding motion characteristics of digital retina of mobile camera

    CN110009739A

  • Binocular vision indoor positioning and mapping method and device

    CN110044354A

  • Vehicle positioning method based on visual SLAM,equipment and cloud server

    CN113009533A