Method for determining coordinates of parking space, vehicle and computer storage medium
By acquiring multiple frames of historical parking spaces during the parking entry stage and optimizing the error of parking space coordinates, the problem of parking space coordinate positioning deviation in the existing technology is solved, and a more stable and accurate parking effect is achieved.
Patent Information
- Application Number
- CN202411779351.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-03
- Publication Date
- 2025-04-18
AI Technical Summary
In the prior art, due to ultrasonic radar detection accuracy problems when parking, there is a deviation in the positioning of the parking space coordinates.
By acquiring multi-frame historical parking space acquisition images during the parking entry stage, the weight value of the current parking space coordinates under the overall historical parking space acquisition image is determined, and the error of the current parking space coordinates is optimized based on the weight value, and the target parking space coordinates that the vehicle refers to when parking at the next moment is determined.
The local error of parking space coordinates is optimized, the stability and accuracy of parking spaces during parking is improved, and the parking effect is enhanced.
Smart Images

Figure CN119840624A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of vehicles, and in particular to a method for determining parking space coordinates, a vehicle and a computer storage medium. Background Art
[0002] In the related art, the update scheme of automatic parking mainly utilizes ultrasonic radar or camera to obtain the boundary conditions of obstacles on the left and right sides of the target parking space, and directly updates the parking space during the parking process. However, this method may cause deviations in the positioning of the parking space coordinates when parking due to problems with detection accuracy. Summary of the invention
[0003] The present invention aims to solve at least one of the technical problems existing in the prior art. To this end, one object of the present invention is to provide a method for determining parking space coordinates, which can optimize the local error of the parking space coordinates and make the parking space more stable and accurate during the parking phase.
[0004] A second object of the present invention is to provide a vehicle.
[0005] A third object of the present invention is to provide a computer storage medium.
[0006] A fourth object of the present invention is to provide a computer program product.
[0007] In order to solve the above problems, an embodiment of the first aspect of the present invention proposes a method for determining parking space coordinates, including: in the parking stage, obtaining multiple frames of historical parking space capture images; determining the weight value of the current parking space coordinates in the overall historical parking space capture images for the current frame parking space capture image based on the multiple frames of historical parking space capture images; and performing error optimization on the current parking space coordinates corresponding to the weight value to determine the target parking space coordinates for reference when the vehicle parks at the next moment.
[0008] According to the method for determining parking space coordinates of an embodiment of the present invention, during the parking stage, the error generated when the current parking space coordinates are generated is considered, thereby affecting the positioning of the parking space. By introducing multiple frames of historical parking space acquisition images, and determining the weight value of the current parking space coordinates under the overall historical parking space acquisition images through the multiple frames of historical parking space acquisition images, the error generated by the current parking space coordinates is optimized based on the weight value, so that the error is minimized in a local range, thereby improving the parking space positioning accuracy and improving the parking effect.
[0009] In some embodiments, determining the weight value of the current parking space coordinates in the overall historical parking space collection image based on multiple frames of historical parking space collection images includes: constructing a Gaussian model based on multiple frames of historical parking space collection images; and determining the weight value of the current parking space coordinates in the overall historical parking space collection image based on the Gaussian model.
[0010] In some embodiments, a Gaussian model is constructed based on multiple frames of historical parking space capture images, including: determining the historical parking space coordinates corresponding to each frame of the historical parking space capture image, and constructing a first Gaussian model based on the historical parking space coordinates; and / or determining the angle value between the longitudinal center line of the handshake parking space and the longitudinal center line of the vehicle in each frame of the historical parking space capture image, and constructing a second Gaussian model based on the angle value.
[0011] In some embodiments, the weight value of the current parking space coordinates in the overall historical parking space collection image is determined according to the Gaussian model, including: determining a first Gaussian probability density corresponding to the current parking space coordinates according to the first Gaussian model; determining a second Gaussian probability density corresponding to the current parking space coordinates according to the second Gaussian model; and using the first Gaussian probability density and / or the second Gaussian probability density as the weight value.
[0012] In some embodiments, constructing a first Gaussian model according to the historical parking space coordinates includes: constructing the first Gaussian model according to the historical parking space coordinates corresponding to the historical parking space collection images using a sliding window method, wherein a preset number of frames of historical parking space collection images are used as the window length.
[0013] In some embodiments, a first Gaussian model is constructed according to historical parking space coordinates corresponding to historical parking space collection images using a sliding window method, including: establishing an initial Gaussian model; using a sliding window method to calculate the coordinate average value according to the historical parking space coordinates corresponding to a preset number of frames of historical parking space collection images; using the coordinate average value calculated each time as the input of the initial Gaussian model to train the Gaussian model to obtain a converged first Gaussian model.
[0014] In some embodiments, the weight value of the current parking space coordinates in the overall historical parking space collection image is determined based on multiple frames of historical parking space collection images, including: determining the collection time of each frame of historical parking space collection image; and determining the weight value of the image collection time corresponding to the current parking space coordinates in the overall historical parking space collection image based on the collection time of each frame of historical parking space collection image.
[0015] In some embodiments, the error of the current parking space coordinates corresponding to the current frame parking space acquisition image is optimized according to the weight value to determine the target parking space coordinates for reference when the vehicle parks at the next moment, including: constructing a nonlinear equation about the coordinate residual; substituting the current parking space coordinates and the weight value into the nonlinear equation to determine the target parking space coordinates corresponding to the minimum residual value.
[0016] In some embodiments, the method also includes: determining the target parking space coordinates corresponding to the previous frame of historical parking space acquisition image; establishing a first Kalman filter equation; performing error optimization on the target parking space coordinates corresponding to the current frame of parking space acquisition image based on the target parking space coordinates corresponding to the previous frame of historical parking space acquisition image and the first Kalman filter equation, wherein the target parking space coordinates corresponding to the previous frame of historical parking space acquisition image are used as predicted values, and the target parking space coordinates corresponding to the current frame of parking space acquisition image are used as observed values.
[0017] In some embodiments, the method further includes: determining the initial coordinates of the handshake parking space before entering the parking phase; establishing a second Kalman filter equation; and performing error optimization on the initial coordinates according to the second Kalman filter equation to obtain updated initial coordinates.
[0018] In some embodiments, the error of the initial coordinates is optimized according to the second Kalman filter equation, including: substituting the initial coordinates and the target parking space coordinates into the second Kalman filter equation to optimize the error of the initial coordinates, wherein the initial coordinates are used as predicted values and the target parking space coordinates are used as observed values.
[0019] In some embodiments, the initial coordinates and the target parking space coordinates are substituted into the second Kalman filter equation to perform error optimization on the initial coordinates, including: determining the coordinate difference between the initial coordinates and the target parking space coordinates; determining the weight value corresponding to the initial coordinates and the weight value corresponding to the target parking space coordinates according to the coordinate difference; substituting the initial coordinates, the weight value corresponding to the initial coordinates, the target parking space coordinates and the weight value corresponding to the target parking space coordinates into the second Kalman filter equation to perform error optimization on the initial coordinates.
[0020] In some embodiments, after determining the target parking space coordinates for reference when the vehicle parks at the next moment, the method further includes: determining the initial coordinates of the handshake parking space before entering the parking stage; determining the coordinate difference between the initial coordinates and the target parking space coordinates; and if it is determined that the coordinate difference is not within the allowable error range, ignoring the target parking space coordinates.
[0021] A second aspect of the present invention provides a vehicle, comprising: a collection device, the collection device is used to collect parking space collection images; a controller, the controller is connected to the collection device, and the controller is used to execute the method for determining the parking space coordinates of the above embodiment.
[0022] According to the vehicle of the embodiment of the present invention, the method for determining the parking space coordinates is executed by the controller, thereby improving the accuracy and robustness of the parking space update of the vehicle during the parking phase, and integrating the coordinates of the parking space during the vehicle search phase, so that the target parking space is more accurate, which is helpful for parking the vehicle.
[0023] In some embodiments, it also includes: a display device, which is connected to the controller and is used to display images based on the parking space captured image and the target parking space coordinates.
[0024] A third aspect of the present invention provides a computer storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the method for determining the coordinates of a parking space of the above embodiment.
[0025] A fourth aspect of the present invention provides a computer program product, including a computer program, which, when executed by a processor, implements the steps of the method for determining the coordinates of a parking space in the above embodiment.
[0026] Additional aspects and advantages of the present invention will be given in part in the following description and in part will be obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] The above and / or additional aspects and advantages of the present invention will become apparent and easily understood from the description of the embodiments in conjunction with the following drawings, in which: Figure 1 is a flow chart of a method for determining parking space coordinates according to one embodiment of the present invention; Figure 2 is a structural block diagram of a vehicle according to an embodiment of the present invention.
[0028] Reference numerals: Vehicle 100; Processor 10; Memory 20. DETAILED DESCRIPTION
[0029] Embodiments of the present invention are described in detail below. The embodiments described with reference to the accompanying drawings are exemplary. Embodiments of the present invention are described in detail below.
[0030] Reference below Figure 1 The method for determining the coordinates of a parking space according to an embodiment of the present invention is described. The method for determining the coordinates of a parking space includes steps S1 to S3. The specific steps are as follows.
[0031] Step S1, during the parking phase, determining multiple frames of historical parking space acquisition images.
[0032] Specifically, when the vehicle is in the parking stage of automatic parking, multiple frames of historical parking space capture images can be determined through the ultrasonic radar or camera installed on the vehicle, where the historical parking space capture images include the surrounding environment and location information of the parking space. The number of frames of the historical parking space capture images can be determined according to actual conditions. For example, 9 frames, 10 frames, or 11 frames of historical parking space capture images can be determined, and no specific restrictions are made here.
[0033] Step S2, determining the weight value of the current parking space coordinates in the overall historical parking space collection image according to multiple frames of historical parking space collection images.
[0034] Step S3, performing error optimization on the current parking space coordinates corresponding to the current frame parking space acquisition image according to the weight value, so as to determine the target parking space coordinates for reference when the vehicle parks at the next moment.
[0035] Specifically, after the vehicle starts the automatic parking function, it will first enter the vehicle-searching stage, that is, the stage of looking for a parking space, and generate the initial coordinates of the parking space after determining a reliable parking space, that is, the parking space where the vehicle is expected to park is the handshake parking space, and then control the vehicle to enter the parking stage based on the initial coordinates. During the parking stage, the vehicle will continue to collect images of the handshake parking space, and park based on the parking space coordinates identified in each frame of the image. During this process, the detection accuracy of the ultrasonic radar will change greatly when the vehicle leaves the target parking space or parks in the target parking space. In this case, updating the parking space will cause a large change in the parking space, which will affect the vehicle's mapping during the parking stage, resulting in deviations in the positioning of the parking space coordinates when parking. Therefore, in order to avoid the ultrasonic radar detection, The measurement accuracy makes the error caused by the current parking space coordinates corresponding to the current frame parking space acquisition image during generation affect the parking positioning problem. The present application no longer directly uses the current parking space coordinates for parking, but introduces multiple frames of historical parking space acquisition images, and determines the weight value of the current parking space coordinates under the overall historical parking space acquisition images through multiple frames of historical parking space acquisition images. The weight value is used to reflect the error size of the current parking space coordinates, and then the error generated by the current parking space coordinates is optimized based on the weight value, so that this error is minimized within a local range, thereby avoiding the problem of error accumulation of the entire parking space due to the introduction of local errors into the overall global, thereby improving the parking space positioning accuracy, improving the parking space update of the vehicle during the parking stage to be more accurate and robust, and improving the parking effect.
[0036] Specifically, the detection accuracy of the vehicle's ultrasonic radar will change greatly when the vehicle leaves or parks in the target parking space. In this case, updating the parking space will cause a large change in the parking space, which will affect the vehicle's mapping during the parking stage and cause deviations in the positioning of the parking space, resulting in the target parking space coordinates referenced by the vehicle during the parking stage being affected. The present application processes multiple frames of historical parking space acquisition images respectively to obtain the parking space coordinates corresponding to the historical parking space acquisition images, and optimizes the error of the current parking space coordinates based on the parking space coordinates corresponding to the historical parking space acquisition images, so as to determine the target parking space coordinates that the vehicle will reference when parking at the next moment. As a result, the parking space of the vehicle during the parking stage is more stable and accurate, which is helpful for parking the vehicle.
[0037] According to the method for determining parking space coordinates of an embodiment of the present invention, during the parking stage, the error generated when the current parking space coordinates are generated is considered, thereby affecting the positioning of the parking space. By introducing multiple frames of historical parking space acquisition images, and determining the weight value of the current parking space coordinates under the overall historical parking space acquisition images through the multiple frames of historical parking space acquisition images, the error generated by the current parking space coordinates is optimized based on the weight value, so that the error is minimized in a local range, thereby improving the parking space positioning accuracy and improving the parking effect.
[0038] In some embodiments, determining the weight value of the current parking space coordinates in the overall historical parking space collection image based on multiple frames of historical parking space collection images includes: constructing a Gaussian model based on multiple frames of historical parking space collection images; and determining the weight value of the current parking space coordinates in the overall historical parking space collection image based on the Gaussian model.
[0039] Specifically, the present application constructs a Gaussian model through historical parking space acquisition images collected through multiple frames in a row, and then uses the Gaussian model to give the weight value of the current parking space coordinates corresponding to the current parking space acquisition image in the overall historical parking space coordinates, and then calculates the target parking space coordinates after the error of the current parking space coordinates is optimized based on the weight value. This can optimize local errors, make the parking space in the parking stage more stable and accurate, and facilitate the parking of vehicles.
[0040] In some embodiments, a Gaussian model is constructed based on multiple frames of historical parking space capture images, including: determining the historical parking space coordinates corresponding to each frame of the historical parking space capture image, and constructing a first Gaussian model based on the historical parking space coordinates; and / or determining the angle value between the longitudinal center line of the handshake parking space and the longitudinal center line of the vehicle in each frame of the historical parking space capture image, and constructing a second Gaussian model based on the angle value.
[0041] In some embodiments, the weight value of the current parking space coordinates in the overall historical parking space collection image is determined according to a Gaussian model, including: determining a first Gaussian probability density corresponding to the current parking space coordinates according to a first Gaussian model; determining a second Gaussian probability density corresponding to the current parking space coordinates according to a second Gaussian model; and using the first Gaussian probability density and / or the second Gaussian probability density as weight values.
[0042] Therefore, the weight values of the accuracy of the current parking space coordinates in two different dimensions can be obtained respectively through the above-mentioned first Gaussian model and / or second Gaussian model, and then the errors of the current parking space coordinates in different dimensions are optimized based on the first Gaussian probability density and / or the second Gaussian probability density, so that the target parking space coordinates are more stable and accurate.
[0043] In some embodiments, constructing a first Gaussian model according to historical parking space coordinates includes: constructing the first Gaussian model according to historical parking space coordinates corresponding to historical parking space capture images using a sliding window method, wherein a preset number of frames of historical parking space capture images are used as the window length.
[0044] Specifically, since the relevant technology does not take into account the different working errors of sensors in different working stages, introducing errors into the overall optimization will lead to an increase in the overall parking space error. In order to solve this problem, the present application calculates the probability density of different stages through a sliding window to achieve the optimization and update of the error model, namely the first Gaussian model. Based on this, the coordinate error is modeled, and a two-dimensional first Gaussian model is established for the parking space coordinates at different stages using statistical methods. Then, the probability density is calculated based on the first Gaussian model to optimize the local error, thereby making the parking space more stable and accurate during the parking stage.
[0045] In some embodiments, a first Gaussian model is constructed according to historical parking space coordinates corresponding to historical parking space collection images using a sliding window method, including: establishing an initial Gaussian model; using a sliding window method to calculate the coordinate average value according to the historical parking space coordinates corresponding to the historical parking space collection images of a preset number of frames; using the coordinate average value calculated each time as the input of the initial Gaussian model to train the Gaussian model to obtain a converged first Gaussian model.
[0046] The preset number of frames may be pre-set based on actual needs, and there is no restriction on this. For example, the preset number of frames may be three frames, four frames or others.
[0047] Exemplarily, at the beginning of the parking phase, no historical parking space collection images have been collected. As time goes by, multiple frames of historical parking space collection images are accumulated and stored. Based on this, after entering the parking phase, the random variable distribution that satisfies the following probability density distribution, i.e., the two-dimensional normal distribution, is the constructed initial Gaussian model. Then, taking the preset number of frames as three frames and the step length of the sliding window as one frame as an example, the first three frames of parking space collection images are first stored and their coordinate average values are taken as the first input of the initial Gaussian model to obtain the first Gaussian probability density; then, the first frame of parking space collection images is removed, and the coordinate average values of the second frame of parking space collection images to the fourth frame of parking space collection images are calculated as the next input of the initial Gaussian model. By analogy, the list of inputs of the initial Gaussian model is updated in real time by means of a sliding window until the convergence condition is met to obtain the converged first Gaussian model. The convergence condition may be that the input of the initial Gaussian model reaches 10.
[0048] Formula (1) Among them, σ1 is the standard deviation of the historical parking space coordinates x, σ2 is the standard deviation of the historical parking space coordinates y, μ1 is the mean of the historical parking space coordinates x, μ2 is the mean of the historical parking space coordinates y, and ρ is the correlation coefficient.
[0049] In addition, the calculation method of the second Gaussian probability density is the same as the calculation method of the first Gaussian probability density, which will not be repeated here.
[0050] In some embodiments, determining the weight value of the current parking space coordinates under the overall historical parking space acquisition images based on multiple frames of historical parking space acquisition images includes: determining the acquisition time of each frame of historical parking space acquisition images; determining the weight value of the image acquisition time corresponding to the current parking space coordinates under the overall historical parking space acquisition images based on the acquisition time of each frame of historical parking space acquisition images. In other words, when optimizing the error of the current parking space coordinates, a time-related weight value is also introduced, thereby making better use of the historical data accuracy to stabilize the error in the overall parking process, making the target parking space more accurate, and facilitating the parking of the vehicle.
[0051] Among them, it can be understood that, for the first Gaussian probability density, the second Gaussian probability density and / or the time-related weight value as the weight value, only any one of the first Gaussian probability density, the second Gaussian probability density and the time-related weight value can be used as a parameter participating in the error optimization of the current parking space coordinates, or, any two of the first Gaussian probability density, the second Gaussian probability density and the time-related weight value can be used as parameters participating in the error optimization of the current parking space coordinates, or, the first Gaussian probability density, the second Gaussian probability density and the time-related weight value can be used as parameters participating in the error optimization of the current parking space coordinates at the same time, and there is no restriction on this.
[0052] In some embodiments, the error of the current parking space coordinates corresponding to the current frame parking space acquisition image is optimized according to the weight value to determine the target parking space coordinates for reference when the vehicle parks at the next moment, including constructing a nonlinear equation about the coordinate residual; substituting the current parking space coordinates and the weight value into the nonlinear equation to determine the target parking space coordinates corresponding to the minimum residual value.
[0053] Specifically, a nonlinear equation about the coordinate residual is constructed, and the error is optimized by nonlinear optimization method to minimize the error in the local range, thereby obtaining the optimized target parking space coordinates, and then the vehicle can use the target parking space coordinates as a reference for parking at the next moment. Thus, the error association in time series is constructed by nonlinear optimization means, so that the historical data accuracy can be better utilized to stabilize the error in the overall parking process, making the target parking space more accurate and facilitating the parking of the vehicle.
[0054] Among them, nonlinear optimization methods can be least squares method, Gauss-Newton, gradient descent algorithm, Levenberg-Marquardt algorithm, etc., and there is no restriction on comparison. It is usually assumed that multiple measurement results are independent and identically distributed, that is, a certain measurement does not affect the results of other measurements. On the other hand, assuming that the designed model can well describe the real physical event, then the error of any measurement should be a random error, which can be considered to satisfy the following Gaussian distribution: Formula (2) The probability of the symmetry axis of the Gaussian distribution is the highest. The symmetry axis of is at the origin, and the desired optimization direction is towards the origin. Based on this, minimizing the residual is equivalent to maximizing the joint probability of all measurements. Since the measurements are independent and identically distributed, we can directly convert the probability of each measurement into Multiplying them together gives formula (3).
[0055] Formula (3) Substitute into formula (1) The definition of can be obtained: Formula (4) Since m and σ are both constants, the sum of squares of the residuals is the best objective function both in theory and in practice. Therefore, the objective function is rewritten as follows: Formula (5) Among them, rj is the jth residual, is the residual function. Under this definition, the first-order and second-order derivatives of the objective function can be expressed by the Jacobian matrix and Hessian matrix of the residual: Formula (6) in, is the Jacobian matrix of the residual, is the Hessian matrix of the residual.
[0056] Each iteration of the Gauss-Newton method requires solving a linear equation: Formula (7) Substituting formula (5) and formula (6) into the linear equation, the second term in formula (6) is a very small amount, and after discarding it, we can get: Formula (8) Then the linear equation is solved using the QR decomposition method or the SVD decomposition method to obtain the result.
[0057] Based on the above principle, after entering the parking stage, the initial Gauss-Newton equation is iteratively updated based on multiple frames of historical parking space acquisition images until the iteration is stopped after the convergence condition is met. The Gauss-Newton equation is thus constructed, and then the current parking space coordinates are substituted into the Gauss-Newton equation for iterative calculation until the target parking space coordinates corresponding to the minimum residual value are obtained after convergence is met.
[0058] In some embodiments, the method also includes determining the target parking space coordinates corresponding to the previous frame of historical parking space acquisition image; establishing a first Kalman filter equation; and performing error optimization on the target parking space coordinates corresponding to the current frame of parking space acquisition image based on the target parking space coordinates corresponding to the previous frame of historical parking space acquisition image and the first Kalman filter equation, wherein the target parking space coordinates corresponding to the previous frame of historical parking space acquisition image are used as predicted values, and the target parking space coordinates corresponding to the current frame of parking space acquisition image are used as observed values.
[0059] Specifically, since the detection accuracy of ultrasonic radar and other sensing equipment will change significantly when the vehicle is leaving or parking in the target parking space, which will cause deviations in the positioning of the parking space, during the parking stage, the present application uses Kalman filtering to optimize the error of the target parking space coordinates before updating the current parking space coordinates to obtain the final target parking space coordinates, thereby further improving the accuracy and stability of the target parking space coordinates.
[0060] In some embodiments, the method further includes determining the initial coordinates of the handshake parking space before entering the parking phase; establishing a second Kalman filter equation; and performing error optimization on the initial coordinates according to the second Kalman filter equation to obtain updated initial coordinates.
[0061] Specifically, due to the different perception and detection models of the vehicle in the parking stage and the vehicle-searching stage of automatic parking, there will be a certain degree of deviation in the positioning of the parking space. If the parking space is updated directly without considering this deviation, the parking space coordinates in the parking stage will be inconsistent with the initial coordinates of the handshake parking space, thereby affecting the selection of the target parking space in the parking stage. Therefore, in the parking stage, this application will again use Kalman filtering to optimize the error of the initial coordinates of the handshake parking space to obtain the final initial parking space coordinates, thereby improving the accuracy and stability of the handshake parking space.
[0062] In some embodiments, the initial coordinates are error optimized according to the second Kalman filter equation, including substituting the initial coordinates and the target parking space coordinates into the second Kalman filter equation to optimize the initial coordinates, wherein the initial coordinates are used as predicted values and the target parking space coordinates are used as observed values.
[0063] Specifically, the initial coordinates are used as predicted values, and the target parking space coordinates in the parking phase are used as observed values and substituted into the Kalman filter equation:
[0064] in, is the state quantity, that is, the coordinates of the four vertices of the parking space, which can be expressed as
[0065] ; F is the unit matrix, B is the unit matrix, and u is the error amount.
[0066] The observation equation is .
[0067] in, , , , .
[0068] By establishing a second Kalman filter equation based on the above Kalman filter equation, the error optimization of the initial coordinates by Kalman filter can be realized, thereby improving the accuracy and stability of the initial input parking space, i.e., the handshake parking space.
[0069] In some embodiments, the initial coordinates and the target parking space coordinates are substituted into the second Kalman filter equation to optimize the error of the initial coordinates, including: determining the coordinate difference between the initial coordinates and the target parking space coordinates; determining the weight value corresponding to the initial coordinates and the weight value corresponding to the target parking space coordinates according to the coordinate difference; substituting the initial coordinates, the weight value corresponding to the initial coordinates, the target parking space coordinates and the weight value corresponding to the target parking space coordinates into the second Kalman filter equation to optimize the error of the initial coordinates.
[0070] Specifically, the distribution of noise weights is determined according to the difference between the coordinates of the parking space in the parking stage, i.e., the target parking space, and the initial coordinates in the mapping stage. The noise of the target parking space coordinates obtained at the beginning of the parking stage is relatively large, and as the number of gaps increases, the noise of the initial coordinates gradually increases. Based on this principle, when the Kalman filter is used to update the initial coordinates, as the parking stage continues, the weight values corresponding to the initial coordinates and the weight values corresponding to the target parking space coordinates are determined based on the coordinate difference, and then the initial coordinates, the weight values corresponding to the initial coordinates, the target parking space coordinates, and the weight values corresponding to the target parking space coordinates are substituted into the second Kalman filter equation to optimize the error of the initial coordinates, thereby further improving the accuracy and stability of the initial input parking space, i.e., the handshake parking space.
[0071] In some embodiments, after determining the target parking space coordinates for reference when the vehicle parks at the next moment, the method also includes determining the initial coordinates of the handshake parking space before entering the parking stage; determining the coordinate difference between the initial coordinates and the target parking space coordinates; determining that the coordinate difference is not within the allowable error range, it means that there is a deviation in the parking space, and the vehicle is parked in the wrong handshake parking space position, so the target parking space coordinates are ignored, that is, the vehicle does not park according to the target parking space coordinates, and will exit this parking control, and re-identify the parking space to park again.
[0072] Specifically, after the vehicle completes the initial map construction, it will obtain the coordinates of the current parking space and the coordinates of the target parking space waiting to be parked in the local coordinate system. In order to construct the translation and rotation relationship of the parking spaces around the target parking space, the coordinates of the two parking spaces closest to the target parking space are calculated by formula (8), where (x1, y1) is the coordinate of point A and (x2, y2) is the coordinate of point B. The initial coordinates of the handshake parking space are thus determined. However, due to the limitations of perception and the complexity of the actual scene, the handshake parking space may not be observed all the time. There may be a situation where the target parking space is too far away from other parking spaces, which will cause inaccurate parking space updates. Therefore, before calculating the translation and rotation between parking spaces, it is necessary to determine whether the coordinate difference exceeds the allowable error range. If the coordinate difference is not within the allowable error range, the target parking space coordinates are ignored, that is, the perception data of this frame is not used to calculate the translation and rotation between parking spaces. The calculation of the translation and rotation between parking spaces can refer to formula (9), formula (10) and formula (11). The parking space formed by the four corner points of the parking space can be considered as a rigid body in space. According to formula (9), the movement of the rigid body can be represented by the rotation matrix R and the translation vector t, where x2 is the point obtained by rotating x1, t0 is the translation along the x-axis, and t1 is the translation along the y-axis.
[0073] Formula (8) Formula (9) Formula (10) Formula (11) A second embodiment of the present invention provides a vehicle 100, such as Figure 2 As shown, the vehicle 100 includes a collection device 10 and a controller 20 .
[0074] The acquisition device 10 is used to acquire parking space images; the controller 20 is connected to the acquisition device 10, and the controller 20 is used to execute the method for determining the parking space coordinates of the above embodiment.
[0075] According to the vehicle 100 of the embodiment of the present invention, the controller 20 executes the above method for determining the parking space coordinates, thereby improving the accuracy and robustness of the parking space update of the vehicle during the parking phase, and integrating the coordinates of the parking space during the vehicle search phase, so that the target parking space is more accurate, which is helpful for parking the vehicle.
[0076] In some embodiments, the vehicle 100 further includes a display device, which is connected to the controller 20 , and is used to display an image based on the captured parking space image and the target parking space coordinates.
[0077] The third embodiment of the present invention provides a computer storage medium on which a computer program is stored. When the computer program is executed by a processor, the method for determining the coordinates of a parking space according to the above embodiment is implemented.
[0078] A fourth aspect of the present invention provides a computer program product, including a computer program, which, when executed by a processor, implements the steps of the method for determining the coordinates of a parking space in the above embodiment.
[0079] In the description of this specification, any process or method description in a flowchart or otherwise described herein may be understood to represent a module, fragment or portion of code including one or more executable instructions for implementing the steps of a custom logical function or process, and the scope of the preferred embodiments of the present invention includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in reverse order depending on the functions involved, which should be understood by technicians in the technical field to which the embodiments of the present invention belong.
[0080] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in combination with these instruction execution systems, devices or apparatuses. For the purposes of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in combination with these instruction execution systems, devices or apparatuses. More specific examples (non-exhaustive list) of computer-readable media include the following: an electrical connection with one or more wires (electronic device), a portable computer disk box (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium and then editing, interpreting or processing in other suitable ways if necessary, and then stored in a computer memory.
[0081] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0082] A person skilled in the art may understand that all or part of the steps in the method for implementing the above-mentioned embodiment may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, which, when executed, includes one or a combination of the steps of the method embodiment.
[0083] In addition, each functional unit in each embodiment of the present invention may be integrated into a processing module, or each unit may exist physically separately, or two or more units may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-readable storage medium.
[0084] The storage medium mentioned above may be a read-only memory, a magnetic disk or an optical disk, etc. Although the embodiments of the present invention have been shown and described above, it can be understood that the above embodiments are exemplary and cannot be understood as limiting the present invention. A person of ordinary skill in the art may change, modify, replace and modify the above embodiments within the scope of the present invention.
[0085] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "illustrative embodiments", "examples", "specific examples", or "some examples" means that the specific features, structures, materials, or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example.
[0086] Although the embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the claims and their equivalents.
Claims
1. A method for determining the coordinates of a parking space, characterized in that: include: During the parking phase, multiple frames of historical parking space acquisition images are obtained; Determine the weight value of the current parking space coordinates under the overall historical parking space collection image according to multiple frames of historical parking space collection images; The error of the current parking space coordinates corresponding to the current frame parking space acquisition image is optimized according to the weight value to determine the target parking space coordinates for reference when the vehicle parks at the next moment.
2. The method for determining parking space coordinates according to claim 1, characterized in that: Determining the weight value of the current parking space coordinates under the overall historical parking space collection image according to multiple frames of historical parking space collection images includes: Construct a Gaussian model based on multiple frames of historical parking space acquisition images; The weight value of the current parking space coordinates under the overall historical parking space acquisition image is determined according to the Gaussian model.
3. The method for determining parking space coordinates according to claim 2, characterized in that: A Gaussian model is constructed based on multiple frames of historical parking space collection images, including: Determine the historical parking space coordinates corresponding to each frame of the historical parking space acquisition image, and construct a first Gaussian model according to the historical parking space coordinates; And / or, determine the angle value between the longitudinal center line of the handshake parking space and the longitudinal center line of the vehicle in each frame of the historical parking space acquisition image, and construct a second Gaussian model based on the angle value.
4. The method for determining parking space coordinates according to claim 3, characterized in that: Determining the weight value of the current parking space coordinate under the overall historical parking space acquisition image according to the Gaussian model includes: Determine a first Gaussian probability density corresponding to the current parking space coordinates according to the first Gaussian model; Determine a second Gaussian probability density corresponding to the current parking space coordinates according to the second Gaussian model; The first Gaussian probability density and / or the second Gaussian probability density is used as the weight value.
5. The method for determining parking space coordinates according to claim 3, characterized in that: Constructing a first Gaussian model according to the historical parking space coordinates, including: A sliding window method is adopted to construct a first Gaussian model according to the historical parking space coordinates corresponding to the historical parking space acquisition images, wherein the historical parking space acquisition images with a preset number of frames are used as the window length.
6. The method for determining parking space coordinates according to claim 5, characterized in that: The first Gaussian model is constructed according to the historical parking space coordinates corresponding to the historical parking space acquisition images using a sliding window method, including: Establish an initial Gaussian model; Using a sliding window method, the coordinate average is calculated based on the historical parking space coordinates corresponding to the historical parking space acquisition images of a preset number of frames; The Gaussian model is trained by taking the average value of the coordinates calculated each time as the input of the initial Gaussian model to obtain a converged first Gaussian model.
7. The method for determining parking space coordinates according to any one of claims 2 to 6, characterized in that: Determining the weight value of the current parking space coordinates under the overall historical parking space collection image according to multiple frames of historical parking space collection images includes: Determine the acquisition time of each frame of historical parking space acquisition image; The weight value of the image acquisition time corresponding to the current parking space coordinate in the overall historical parking space acquisition image is determined according to the acquisition time of each frame of the historical parking space acquisition image.
8. The method for determining parking space coordinates according to claim 1, characterized in that: The error optimization of the current parking space coordinates corresponding to the current frame parking space acquisition image is performed according to the weight value to determine the target parking space coordinates for reference when the vehicle parks at the next moment, including: Construct nonlinearized equations about the coordinate residuals; Substitute the current parking space coordinates and the weight value into the nonlinear equation to determine the target parking space coordinates corresponding to the minimum residual value.
9. The method for determining parking space coordinates according to claim 1, characterized in that: The method further comprises: Determine the target parking space coordinates corresponding to the previous frame of historical parking space acquisition image; Establish the first Kalman filter equation; The error of the target parking space coordinates corresponding to the previous frame of historical parking space acquisition image and the first Kalman filter equation is optimized, wherein the target parking space coordinates corresponding to the previous frame of historical parking space acquisition image are used as predicted values, and the target parking space coordinates corresponding to the current frame of parking space acquisition image are used as observed values.
10. The method for determining parking space coordinates according to claim 1, characterized in that: The method further comprises: Determine the initial coordinates of the handshake parking space before entering the parking phase; Establish the second Kalman filter equation; The initial coordinates are error optimized according to the second Kalman filter equation to obtain updated initial coordinates.
11. The method for determining parking space coordinates according to claim 10, characterized in that: The error optimization of the initial coordinates is performed according to the Kalman filter equation, including: Substitute the initial coordinates and the target parking space coordinates into the second Kalman filter equation to perform error optimization on the initial coordinates, wherein the initial coordinates are used as predicted values and the target parking space coordinates are used as observed values.
12. The method for determining parking space coordinates according to claim 11, characterized in that: Substituting the initial coordinates and the target parking space coordinates into the second Kalman filter equation to perform error optimization on the initial coordinates, including: Determine the coordinate difference between the initial coordinates and the target parking space coordinates; Determine the weight value corresponding to the initial coordinates and the weight value corresponding to the target parking space coordinates according to the coordinate difference; Substitute the initial coordinates, the weight value corresponding to the initial coordinates, the target parking space coordinates and the weight value corresponding to the target parking space coordinates into the second Kalman filter equation to perform error optimization on the initial coordinates.
13. The method for determining parking space coordinates according to any one of claims 10 to 12, characterized in that: After determining the coordinates of the target parking space for reference when the vehicle parks at the next moment, the method further includes: Determine the initial coordinates of the handshake parking space before entering the parking phase; Determine the coordinate difference between the initial coordinate and the target parking space coordinate; If it is determined that the coordinate difference is not within the allowable error range, the target parking space coordinates are ignored.
14. A vehicle, characterized in that: include: A collection device, the collection device is used to collect parking space collection images; A controller, wherein the controller is connected to the acquisition device, and the controller is used to execute the method for determining the coordinates of a parking space according to any one of claims 1 to 13.
15. The vehicle according to claim 14, characterized in that Also includes: A display device is connected to the controller, and is used for displaying images according to the parking space acquisition image and the target parking space coordinates.
16. A computer storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for determining the coordinates of a parking space according to any one of claims 1 to 13 is implemented.
17. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method for determining the coordinates of a parking space as described in any one of claims 1 to 13 are implemented.
Citation Information
Cited By
Parking behavior discrimination method and device, electronic equipment and computer readable storage medium
CN122335959A
Parking behavior judgment method and device, electronic equipment and computer readable storage medium
CN122335959B