Parking space determination method, device and equipment
By acquiring multi-frame images through on-board equipment and using preset processing models and multiple prediction algorithms, the accuracy problem of parking space position determination in the prior art is solved, and higher positioning accuracy and stability are achieved.
Patent Information
- Application Number
- CN202311093171.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-28
- Publication Date
- 2025-02-28
AI Technical Summary
When determining the location of the parking space, problems such as light changes, rapid vehicle movement, similar background interference, parking space obstruction and parking space out of view are poor, resulting in poor accuracy of the parking space location.
Multi-frame images are obtained through the vehicle's on-board equipment, and the images are processed using a preset processing model to obtain the initial parking space information. Then, based on the initial parking space information of the first frame image, two prediction algorithms (coordinate conversion tracking algorithm and Kalman filtering algorithm) are used to predict the second frame image to obtain the first prediction information and the second prediction information. Finally, by matching and updating the initial parking space information, the first prediction information and the second prediction information, the target parking space information is obtained to determine the parking space location.
Through the combination of multi-frame image processing and multiple prediction algorithms, the accuracy of parking space location is improved and the positioning stability under complex conditions such as light changes and vehicle movement is enhanced.
Smart Images

Figure CN119541249A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of intelligent driving technology, and in particular to a method, device and equipment for determining a parking space. Background Art
[0002] In recent years, large indoor and outdoor parking lots in shopping districts and office buildings have gradually increased, providing more parking spaces for consumers, but also bringing new problems. Finding an empty parking space in the parking lot is like finding a maze, which is time-consuming and laborious. Determining the location of the parking space is one of the important applications of automatic parking in intelligent driving.
[0003] However, when determining the location of a parking space, the existing technology may have poor accuracy due to problems such as changes in lighting, rapid movement of vehicles, similar background interference, parking space obstruction and parking space out of view, parking space being blocked, and inaccurate vehicle track calculation results. Summary of the invention
[0004] The present application provides a parking space determination method, device and equipment, which can improve the accuracy of determining the parking space position.
[0005] In a first aspect, an embodiment of the present application provides a method for determining a parking space, the method comprising:
[0006] Acquire multiple frames of images through an on-board device of the vehicle;
[0007] Processing multiple frames of images using a preset processing model to obtain initial parking space information corresponding to each of the multiple frames of images;
[0008] Based on the initial parking space information corresponding to the first frame image, a preset first prediction algorithm is used to perform prediction to obtain first prediction information corresponding to the second frame image, where the first frame image is any one of the multiple frames, and the second frame image is the next frame image of the first frame image;
[0009] Based on the initial parking space information corresponding to the first frame image, a preset second prediction algorithm is used to perform prediction to obtain second prediction information corresponding to the second frame image;
[0010] The initial parking space information, the first prediction information, and the second prediction information corresponding to the second frame image are matched and updated to obtain target parking space information, and the target parking space information is used to determine the position of the target parking space.
[0011] In a second aspect, the present application provides a parking space determination device, the device comprising:
[0012] An acquisition module, used for acquiring multiple frames of images through an on-board device of a vehicle;
[0013] A processing module, used to process the multiple frames of images using a preset processing model to obtain initial parking space information corresponding to each of the multiple frames of images;
[0014] A first prediction module is used to predict, based on the initial parking space information corresponding to the first frame image, using a preset first prediction algorithm to obtain first prediction information corresponding to the second frame image, where the first frame image is any one of the multiple frames of images, and the second frame image is the next frame image of the first frame image;
[0015] A second prediction module is used to perform prediction based on the initial parking space information corresponding to the first frame image using a preset second prediction algorithm to obtain second prediction information corresponding to the second frame image;
[0016] The matching module is used to match and update the initial parking space information, the first prediction information and the second prediction information corresponding to the second frame image to obtain the target parking space information, and the target parking space information is used to determine the position of the target parking space.
[0017] In a third aspect, an embodiment of the present application provides an electronic device, the electronic device comprising: a processor and a memory storing computer program instructions;
[0018] When the processor executes the computer program instructions, the automatic parking method as in any one of the embodiments of the first aspect is implemented.
[0019] In a fourth aspect, an embodiment of the present application provides a computer storage medium having computer program instructions stored thereon, and when the computer program instructions are executed by a processor, an automatic parking method as in any one of the embodiments in the first aspect is implemented.
[0020] In a fifth aspect, an embodiment of the present application provides a computer program product. When the instructions in the computer program product are executed by a processor of an electronic device, the electronic device executes an automatic parking method as in any one of the embodiments in the first aspect above.
[0021] In a parking space determination method, device and equipment provided in an embodiment of the present application, multiple frames of images are acquired through an on-board device of a vehicle; the multiple frames of images are processed using a preset processing model to obtain initial parking space information corresponding to each of the multiple frames of images; based on the initial parking space information corresponding to the first frame of image, a preset first prediction algorithm is used to perform prediction to obtain first prediction information corresponding to the second frame of image, where the first frame of image is any one of the multiple frames of image, and the second frame of image is the next frame of image of the first frame; based on the initial parking space information corresponding to the first frame of image, a preset second prediction algorithm is used to perform prediction to obtain second prediction information corresponding to the second frame of image; the initial parking space information, the first prediction information and the second prediction information corresponding to the second frame of image are matched and updated to obtain target parking space information, and the target parking space information is used to determine the position of the target parking space. Through the above method, when determining the position of the target parking space, two prediction algorithms are used to predict the second frame image to obtain the first prediction information and the second prediction information, and the initial parking space information corresponding to the second frame image obtained by the initial detection is combined to update and match the parking space information of the target parking space to obtain the position of the target parking space. By predicting through multiple prediction algorithms and combining the initial parking space information, it is possible to achieve accurate positioning of the parking space and improve the accuracy of determining the parking space position. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] In order to more clearly illustrate the technical solution of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0023] Figure 1 is a flow chart of a parking space determination method provided by an embodiment of the present application;
[0024] Figure 2 This is a schematic diagram of the positions of the corner points and wheel blocks in a parking space provided by an embodiment of the present application;
[0025] Figure 3 is a schematic diagram of a vehicle coordinate system provided by an embodiment of the present application;
[0026] Figure 4 This is a schematic diagram of a parking space scenario provided by an embodiment of the present application;
[0027] Figure 5 is a structural schematic diagram of a parking space determination device provided in an embodiment of the present application;
[0028] Figure 6 It is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0029] In order to more clearly understand the above-mentioned objectives, features and advantages of the present disclosure, the scheme of the present disclosure will be further described below. It should be noted that the embodiments of the present disclosure and the features in the embodiments can be combined with each other without conflict.
[0030] In the following description, many specific details are set forth to facilitate a full understanding of the present disclosure, but the present disclosure may also be implemented in other ways different from those described herein; it is obvious that the embodiments in the specification are only part of the embodiments of the present disclosure, rather than all of the embodiments.
[0031] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the term "comprising" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprising a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0032] In order to solve the problems in the prior art, the embodiments of the present application provide a parking space determination method, device and apparatus. The parking space determination method provided by the embodiments of the present application is first introduced below.
[0033] Figure 1 FIG. 1 is a flow chart of a method for determining a parking space provided by an embodiment of the present application. Figure 1 As shown, the method may specifically include the following steps:
[0034] S100, acquiring multiple frames of images through an onboard device of a vehicle.
[0035] Optionally, in an embodiment of the present application, the vehicle-mounted device may be equipped with an image acquisition device such as a camera, by which multiple pictures can be taken to obtain multiple frames of images. Specifically, the vehicle-mounted system may integrate multiple cameras to obtain images of different angles and fields of view. These cameras may be fixedly mounted on the vehicle, or they may be rotatable and adjustable. The acquired images may be stored in the built-in memory of the vehicle-mounted device or transferred to an external memory. Alternatively, a laser radar or millimeter-wave radar is used to scan and obtain environmental information around the vehicle, thereby obtaining multiple frames of images.
[0036] S200, using a preset processing model to process multiple frames of images to obtain initial parking space information corresponding to each of the multiple frames of images.
[0037] Optionally, in a possible implementation of the present application, several consecutive frames of images can be obtained for parking space tracking, and then the obtained multiple frames of images are input into a model trained by a neural network, and the detection results inferred by the model are post-processed and decoded to obtain the decoded results (i.e., initial parking space information), wherein the initial parking space information may include the coordinates of the corner points of the parking space and the coordinates of the wheel block (the corner points and the wheel block are as follows: Figure 2 As shown in the figure, as well as whether the parking space is available, whether the parking space is horizontal, vertical or inclined, the probability of determining this parking space as a parking space, the angle information of the parking space line and other characteristic information. Specifically, post-processing decoding is to parse a series of numbers in the detection results obtained by model inference to determine which numbers are parking space corner point information, which numbers are parking space line angle information, which are wheel block information, etc. It should be noted that the specific implementation of post-processing decoding will vary depending on the specific algorithm and model. Usually, appropriate adjustments and optimizations are required according to the actual situation to obtain the best detection results.
[0038] Optionally, in the embodiment of the present application, the acquired image may generally be preprocessed, including denoising, adjusting image size and orientation, converting color space, and the like, to facilitate subsequent algorithm processing.
[0039] S300, based on the initial parking space information corresponding to the first frame image, a preset first prediction algorithm is used to perform prediction to obtain first prediction information corresponding to the second frame image, where the first frame image is any one of the multiple frames of images, and the second frame image is the next frame image of the first frame image.
[0040] Optionally, in an embodiment of the present application, the first prediction algorithm may be a coordinate conversion tracking algorithm, wherein obtaining the first prediction information may specifically be as follows: first, the corresponding initial parking space information is obtained from the first frame image, including the parking space position, size, direction, etc. Then, the coordinate conversion tracking algorithm is used to convert the parking space position information in the first frame image into coordinate values in the vehicle coordinate system. Based on the timestamp of the first frame image and the information on the vehicle's driving status, the vehicle position corresponding to the second frame image is predicted. The coordinate conversion tracking algorithm is used to convert the parking space position information in the second frame image into coordinate values in the vehicle coordinate system to obtain the first prediction information corresponding to the second frame image. Wherein, as Figure 3 As shown in FIG. 1 , the vehicle coordinate system is a coordinate system with the center of the rear axle of the vehicle as the origin. It should be noted that in actual operation, the parameters of the prediction algorithm may be adjusted to improve the prediction accuracy.
[0041] Optionally, in a possible implementation of the present application, the initial corner point coordinates of the parking space can be first obtained from the initial parking space information corresponding to the first frame image and the second frame image, and the initial corner point coordinates corresponding to the two frames of image are converted to the same coordinate system. Then, the coordinate transformation (such as translation, rotation, etc.) from the first frame image to the second frame image is calculated using the initial corner point coordinates corresponding to the first frame image and the initial corner point coordinates corresponding to the second frame image. The coordinates of the four corner points of the bounding box of the parking space in the first frame image are calculated to obtain their coordinates in the second frame image, thereby obtaining the first prediction information corresponding to the second frame image, that is, the position and size of the target parking space predicted by the coordinate conversion algorithm.
[0042] S400, based on the initial parking space information corresponding to the first frame image, a preset second prediction algorithm is used to perform prediction to obtain second prediction information corresponding to the second frame image.
[0043] Optionally, in an embodiment of the present application, the second prediction algorithm may be a Kalman filter algorithm. Specifically, the present application performs prediction by calling the Kalman filter algorithm interface in the open source computer vision library (Open Source Computer Vision Library, OpenCV) to obtain second prediction information corresponding to the second frame image.
[0044] Optionally, the Kalman filter prediction algorithm used in the embodiment of the present application is a commonly used state estimation algorithm for estimating the system state that changes over time. In a possible implementation, in parking space tracking, Kalman filtering can be used to predict the state information such as the position and speed of the target in the next frame image. Specifically, in parking space tracking, the state such as the position and speed of the target parking space can be regarded as the state of the system. The Kalman filter prediction algorithm can predict the state of the target parking space according to the parking space information corresponding to the previous frame image, and output the second prediction information. Specifically, the state vector of the target parking space can be first defined, such as position and speed. Then, according to the dynamic model of the system, the state transfer matrix is defined to describe the change of the state vector over time; and the observation matrix is defined to describe the relationship between the state vector and the observation vector, and the covariance matrix of the system noise and the observation noise is defined to describe the statistical characteristics of the noise. Then, according to the parking space information corresponding to the previous frame image, the state prediction is performed to obtain the predicted state vector. And according to the predicted state vector and the noise model, the prediction error covariance matrix is calculated to describe the uncertainty of the predicted state vector. Then, according to the initial parking space information corresponding to the current frame image, the update amount of the state vector is calculated to obtain the updated state vector; and according to the prediction error covariance and the observation noise covariance, the updated error covariance matrix is calculated to describe the uncertainty of the updated state vector. Finally, according to the predicted state vector and the error covariance matrix, the second prediction information is output to describe the state information such as the position and speed of the target parking space in the next frame image.
[0045] S500, matching and updating the initial parking space information, the first prediction information and the second prediction information corresponding to the second frame image to obtain target parking space information, where the target parking space information is used to determine the position of the target parking space.
[0046] Optionally, a variety of methods can be used to match and update the initial parking space information, the first prediction information, and the second prediction information corresponding to the second frame image to obtain the target parking space information. In a possible implementation of the present application, first, the Euclidean distance between the corner point coordinates in the first prediction information and the corner point coordinates in the initial parking space information, and the Euclidean distance between the corner point coordinates in the second prediction information and the corner point coordinates in the initial parking space information can be calculated respectively, and by setting a reasonable distance threshold, it is determined whether the corresponding parking space in the first prediction information and the second prediction information matches the parking space corresponding to the initial parking space information, and the parking space index of the matched parking space and the parking space index of the unmatched parking space are recorded at the same time, wherein the parking space index is a unique identifier of the parking space, and the parking space corresponding to the parking space index can be found through the parking space index. Subsequently, the corner point coordinates of the target parking space are determined according to the corner point coordinates in the first prediction information, the corner point coordinates in the second prediction information, and the corresponding corner point coordinates in the initial parking space information, thereby determining the position of the target parking space.
[0047] In a parking space determination method provided in an embodiment of the present application, multiple frames of images are acquired through an on-board device of a vehicle; the multiple frames of images are processed using a preset processing model to obtain initial parking space information corresponding to each of the multiple frames of images; based on the initial parking space information corresponding to the first frame of image, a preset first prediction algorithm is used to perform prediction to obtain first prediction information corresponding to the second frame of image, where the first frame of image is any one of the multiple frames of image, and the second frame of image is the next frame of image of the first frame; based on the initial parking space information corresponding to the first frame of image, a preset second prediction algorithm is used to perform prediction to obtain second prediction information corresponding to the second frame of image; the initial parking space information, the first prediction information, and the second prediction information corresponding to the second frame of image are matched and updated to obtain target parking space information, and the target parking space information is used to determine the position of the target parking space. Through the above method, when determining the position of the target parking space, two prediction algorithms are used to predict the second frame image to obtain the first prediction information and the second prediction information, and the initial parking space information corresponding to the second frame image obtained by the initial detection is combined to update and match the parking space information of the target parking space to obtain the position of the target parking space. By predicting through multiple prediction algorithms and combining the initial parking space information, it is possible to achieve accurate positioning of the parking space and improve the accuracy of determining the parking space position.
[0048] In one embodiment, the initial parking space information includes the initial corner point coordinates of the parking space. The above step 300 may specifically perform the following steps:
[0049] S310, obtaining first position information of a vehicle corresponding to a first frame image and second position information of a vehicle corresponding to a second frame image.
[0050] Optionally, in a possible implementation of the present application, the built-in global positioning system (GPS) or inertial navigation system of the vehicle-mounted equipment can be directly used to measure the vehicle's position and heading angle and other information, and also provide driving information such as the vehicle's position and speed. In addition, the position information of characteristic objects such as signs and road signs on the road can also be captured by a camera, and combined with the vehicle's motion state, to determine the vehicle's position information.
[0051] In these optional embodiments, obtaining the vehicle position information corresponding to the first frame image and the vehicle position information corresponding to the second frame image can be used to track the movement trajectory of the vehicle between adjacent frames, thereby more accurately predicting the possible position of the vehicle in the next frame.
[0052] S320, performing matrix transformation on the first position information and the second position information to obtain a transformation matrix, wherein the first prediction algorithm includes the transformation matrix.
[0053] Optionally, in a possible implementation of the present application, the position coordinates of the vehicle corresponding to the first frame image can be rotated and translated by a matrix to obtain a quaternion matrix corresponding to the first frame image; and the position coordinates of the vehicle corresponding to the second frame image can be rotated and translated by a matrix to obtain a quaternion matrix corresponding to the second frame image; finally, these two quaternion matrices are subjected to matrix operations to obtain a transformation matrix.
[0054] S330, multiplying the conversion matrix by the initial corner point coordinates of the initial parking space information corresponding to the first frame image to obtain first predicted corner point coordinates corresponding to the second frame image, where the first predicted information includes the first predicted corner point coordinates.
[0055] Optionally, in an embodiment of the present application, after obtaining the conversion matrix, the conversion matrix can be directly multiplied by the parking space corner point coordinates corresponding to the first frame image to obtain the predicted corner point coordinates corresponding to the second frame image.
[0056] In these optional embodiments, the transformation matrix is multiplied by the initial corner point coordinates of the initial parking space information corresponding to the first frame image to obtain the first predicted corner point coordinates corresponding to the second frame image. The position of the parking space in the second frame image can be predicted based on the parking space position information in the first frame image, and used as the result of the first detection, thereby reducing the false detection rate and the missed detection rate; and parking space tracking can be achieved to improve the accuracy and stability of parking space determination.
[0057] In one embodiment, the first position information includes a first vehicle coordinate and a first heading angle of the vehicle, and the second position information includes a second vehicle coordinate and a second heading angle of the vehicle; the above step 320 may specifically perform the following steps:
[0058] S321, rotating and translating the first heading angle to obtain a first rotation matrix corresponding to the first frame image;
[0059] S322, combining the first rotation matrix and the first vehicle coordinates to obtain a first quaternion matrix corresponding to the first frame image;
[0060] S323, rotating and translating the second heading angle to determine a second rotation matrix corresponding to the second frame image;
[0061] S324, combining the second rotation matrix and the second vehicle coordinates to obtain a second quaternion matrix corresponding to the second frame image;
[0062] S325, multiply the inverse of the second quaternion matrix by the first quaternion matrix to obtain a transformation matrix.
[0063] Optionally, in the embodiment of the present application, the first vehicle coordinates (x, y, z) and the first heading angle information (θ x ,θy ,θ z ) is rotated and translated to obtain the first quaternion matrix T1 corresponding to the first frame car image.
[0064] Then calculate the first rotation matrix R, the three-dimensional matrix rotation formula:
[0065]
[0066]
[0067]
[0068] R=R z *(R y *R x ) (4)
[0069] Then calculate the first quaternion matrix T1:
[0070]
[0071] The first three columns represent the rotation matrix R, and the last column (a 14 ,a 24 ,a 34 ) represent (x, y, z) respectively.
[0072] Then, the second vehicle coordinates and the second heading angle of the second frame image are calculated in the same way as the first quaternion matrix, and the second quaternion matrix T2 corresponding to the second frame image is obtained. Finally, the inverse of quaternion T2 is multiplied by T1 to obtain the transformation matrix T. Then, the initial corner point coordinates corresponding to the first frame image are converted into a 4*1 matrix, and the first predicted corner point coordinates are obtained using the matrix converted from the transformation matrix T and the initial corner point coordinates of the first frame image.
[0073] In one embodiment, the initial parking space information includes a plurality of initial corner point coordinates of the parking space, the first prediction information includes a first predicted corner point coordinate corresponding to each initial corner point coordinate, and the second prediction information includes a second predicted corner point coordinate corresponding to each initial corner point coordinate; the above step 500 may specifically perform the following steps:
[0074] S510, calculating the Euclidean distance between each of the multiple initial corner point coordinates and the corresponding first predicted corner point coordinates to obtain multiple first Euclidean distances;
[0075] S520, calculating the Euclidean distance between each of the multiple initial corner point coordinates and the corresponding second predicted corner point coordinates to obtain multiple second Euclidean distances.
[0076] Optionally, in an embodiment of the present application, the Euclidean distance is used to calculate the Euclidean distances between the initial corner point coordinates and the first predicted corner point coordinates and the second predicted corner point coordinates, respectively, to obtain a first Euclidean distance L1 and a second Euclidean distance L2.
[0077]
[0078]
[0079] Where D ptx1 , D ptx2 represents the corner points 1 and 2 in the initial corner point coordinates, P ptx1 , P ptx2 represents corner points 1 and 2 in the first predicted corner point coordinates or corner points 1 and 2 in the second predicted corner point coordinates, and L represents L1 or L2. The first minimum Euclidean distance or the second Euclidean distance is the minimum value of Formula 6 and Formula 7.
[0080] In these optional embodiments, the Euclidean distance between the initial corner point coordinates and the corresponding predicted corner point coordinates can be calculated to determine which predicted corner point coordinate is closest to which initial corner point coordinate, thereby providing a basis for subsequent matching results.
[0081] S530, based on the size relationship between the first minimum Euclidean distance and the second minimum Euclidean distance and the first preset threshold respectively, weight calculation is performed on the initial corner point coordinates, the first predicted corner point coordinates and the second predicted corner point coordinates to obtain the target corner point coordinates of the target parking space, the parking space information of the target parking space includes the target corner point coordinates of the target parking space, the first minimum Euclidean distance is the minimum value of the multiple first Euclidean distances, and the second minimum Euclidean distance is the minimum value of the multiple second Euclidean distances.
[0082] Optionally, in the embodiment of the present application, the Euclidean distance information between the multiple initial corner point coordinates and the corresponding predicted corner point coordinates is fully utilized, and the weight distribution scheme is dynamically selected by comparing the relationship between the minimum distance and the preset threshold. This adaptive weight calculation can more accurately reflect the contribution of the initial corner point coordinates, the first predicted corner point coordinates, and the second predicted corner point coordinates in the prediction, thereby improving the accuracy of the prediction.
[0083] In these optional embodiments, by weighing multiple prediction results, not limited to a single prediction, and comprehensively considering the weight allocation in multiple situations, it can be more stable when the prediction uncertainty is large, thereby reducing the risk of prediction deviation, making the parking space tracking algorithm more adaptable to different scenarios and conditions, and improving the robustness and generalization ability of the parking space tracking algorithm. And by dynamically adjusting the weights, it can effectively respond to changes in parking space position, lighting, occlusion, etc., so that the parking space tracking algorithm is more reliable, providing a more reliable and accurate solution for parking space identification and tracking tasks in actual application scenarios.
[0084] In one embodiment, the above step 530 may specifically perform the following steps:
[0085] Based on the magnitude relationship between the first minimum Euclidean distance and the second minimum Euclidean distance and the first preset threshold, respectively, determining a matching result between the first prediction information and the second prediction information corresponding to the second frame image and the initial parking space information corresponding to the second frame image, respectively;
[0086] S531, based on the matching result, record a first identifier that matches the parking space corresponding to the initial parking space information corresponding to the first frame image or a second identifier that does not match the parking space corresponding to the initial parking space information corresponding to the first frame image in the parking space corresponding to the first prediction information and the parking space corresponding to the second prediction information.
[0087] Optionally, in an embodiment of the present application, if both the first minimum Euclidean distance and the second minimum Euclidean distance are less than a set distance threshold, it can be determined that the parking space corresponding to the first frame image and the parking space predicted by the prediction algorithm match, and the parking space index (i.e., parking space identification) of the parking space corresponding to the initial parking space information corresponding to the matched first frame image, and the parking space index of the parking space corresponding to the first prediction information and the second prediction information are recorded at the same time. Optionally, in an embodiment of the present application, if either the first minimum Euclidean distance or the second minimum Euclidean distance is not less than the above threshold, it can be determined that the parking space corresponding to the first frame image and the parking space predicted by the prediction algorithm do not match, and the parking space index of the parking space corresponding to the initial parking space information corresponding to the first frame image that cannot be matched, and the parking space index of the parking space corresponding to the first prediction information and the second prediction information are recorded at the same time.
[0088] In these optional embodiments, the matching relationship between the predicted information and the initial parking space information can be determined by comparing the first minimum Euclidean distance and the second minimum Euclidean distance with a preset threshold, thereby providing a calculation basis for subsequent target corner point coordinate calculation.
[0089] S532: Based on the matching relationship between the first identifier and the second identifier and the preset parking space identifier of the target parking space, weight calculation is performed on the initial corner point coordinates, the first predicted corner point coordinates and the second predicted corner point coordinates to obtain the target corner point coordinates of the target parking space.
[0090] Optionally, in an embodiment of the present application, after obtaining the matching relationship between the parking space corresponding to the first frame image and the parking space predicted by the prediction algorithm, the corner point coordinates of the target parking space can be updated and calculated to obtain the target corner point coordinates of the target parking space.
[0091] In these optional embodiments, the target corner point coordinates of the target parking space can be obtained by weighting the initial corner point coordinates, the first predicted corner point coordinates, and the second predicted corner point coordinates, thereby determining the parking space information of the target parking space, and then providing the positioning information of the target parking space, thereby improving the accuracy of determining the position of the target parking space.
[0092] In one embodiment, the first prediction information includes a first stable value for parking space prediction, and the second prediction information includes a second stable value for parking space prediction; the above step 532 may specifically perform the following steps:
[0093] S5321, when the first identifier exists and the predicted stability value does not reach the preset stability threshold, determine the target corner point coordinates of the target parking space according to the initial corner point coordinates of the initial parking space information corresponding to the second frame image, the first predicted corner point coordinates, and the second predicted corner point coordinates, respectively.
[0094] S5322: When the first identifier exists and the predicted stability value reaches a preset stability threshold, the target corner point coordinates of the target parking space are determined according to the weight values of the first predicted corner point coordinates and the second predicted corner point coordinates.
[0095] Optionally, in the embodiment of the present application, it is determined that the parking space corresponding to the first frame image matches the parking space predicted by the prediction algorithm, and the tracking matching information can be updated. Specifically, the following situations may be included:
[0096] ① If the predicted stable value does not reach the predicted stable value:
[0097] If the first mark and the preset parking space mark are the same, the target corner point coordinates are calculated using the following formula (8):
[0098] S new =S D *0.6+S P1 *0.2+S P2 *0.2 (8)
[0099] Where S new , S D , S P1, S P2 They are respectively the target corner point coordinates, the initial corner point coordinates, the first predicted corner point coordinates, and the second predicted corner point coordinates.
[0100] If the first mark and the preset parking space mark are different, the target corner point coordinates are calculated using the following formula (9):
[0101] S new =S D *0.9+S P1 *0.1 (9)
[0102] ② If the predicted stable value has reached the predicted stable value, only the first predicted corner point coordinates and the second predicted corner point coordinates are used to calculate the target corner point coordinates, as shown in the following formula (10).
[0103] S new =S P1 *0.5+S P2 *0.5 (10)
[0104] In these optional embodiments, the target corner coordinates are determined according to the weight values, so that the algorithm can more accurately determine the position and size of the target parking space. The target parking space can be identified more stably, improving the robustness of the algorithm. The importance of the coordinates of different corner points in the image is considered according to the weight values, improving the accuracy and stability of the algorithm.
[0105] In one embodiment, the above step 532 may further specifically perform the following steps:
[0106] S5323, when there is a second identifier, if the predicted stability value does not reach the preset stability threshold, then the matching parameters in the initial parking space information corresponding to the first frame image are added to obtain a first parameter, and the predicted stability value is added to obtain a second parameter, where the matching parameter is used to characterize the matching condition of the parking space corresponding to the first frame image;
[0107] S5324, when the first parameter is less than or equal to the preset parameter threshold, if the second parameter reaches the preset stability threshold, determine the target corner point coordinates of the target parking space according to the weight values of the first predicted corner point coordinates and the second predicted corner point coordinates;
[0108] S5325: In the case where the second identifier exists, if the predicted stability value reaches the preset stability threshold, the target corner point coordinates of the target parking space are determined according to the weight values of the first predicted corner point coordinates and the second predicted corner point coordinates.
[0109] Optionally, in the embodiment of the present application, it is determined that the parking space corresponding to the first frame image does not match the parking space predicted by the prediction algorithm. Then the calculation of the target corner point coordinates may specifically include the following situations:
[0110] If the predicted stable value does not reach the predicted stable value, the age and stable parameters of the parking space are increased by 1. Then the target corner coordinates are calculated using formula (10), where Age refers to the existence time of the unmatched parking space and stable is used to characterize the predicted stable value.
[0111] In one embodiment, if I set the stability threshold to 3, if the predicted stability value does not reach the predicted stability value, then stable+1, but if there is no match in the next frame, it may be that the parking space is not detected in the initial parking space information. At this time, age and stable are both +1. When stable is greater than 3, it means that the parking space has reached a stable state. When age is greater than the set threshold, the parking space is deleted.
[0112] If the predicted stable value reaches the predicted stable value, the target corner point coordinates are directly calculated using Formula 10.
[0113] In these optional embodiments, the position and corner point coordinates of the target parking space are more accurately determined using information such as matching parameters and predicted stability values, thereby improving the accuracy and stability of positioning.
[0114] In one embodiment, the initial parking space information includes a plurality of initial corner point coordinates of the parking space; the above step 200 may specifically perform the following steps:
[0115] S210, using a preset processing model to process multiple frames of images to obtain second corner point coordinates corresponding to the multiple frames of images, where the coordinate system of the second corner point coordinates is the image coordinate system.
[0116] Optionally, in a possible implementation of the present application, the parking area in multiple frames of images can be first obtained, and the features of the parking area can be extracted; the extracted parking features can be processed using a preset processing model to obtain the coordinates of the second corner point of the parking area; and the coordinates of the second corner point are converted from the output coordinate system of the preset processing model to the image coordinate system. The specific implementation can be designed based on the specific preset processing model and the feature extraction method of the parking area. For example, a deep learning model is used to extract and process the features of the parking area, such as using a convolutional neural network to extract the features of the parking area, and then a regression model is used to predict the coordinates of the second corner point. In addition, computer vision methods can also be used to extract and process the features of the parking area, such as using a feature extraction method and a support vector machine classifier to process the parking area.
[0117] S220, mapping the second corner point coordinates to the vehicle coordinate system to obtain the initial corner point coordinates.
[0118] Optionally, in the embodiment of the present application, the second corner point coordinates can be converted from the image coordinate system to the camera coordinate system using camera calibration parameters and coordinate conversion formulas, and then the corner point coordinates in the camera coordinate system are converted to the vehicle coordinate system, so that the initial corner point coordinates can be obtained.
[0119] In these optional embodiments, it is helpful to complete the automatic driving and automatic parking functions of the vehicle. By processing multiple frames of images, the location information of the parking space can be accurately obtained, the accuracy of the target parking space position can be improved, and the second corner point coordinates can be mapped to the vehicle coordinate system. The parking space position information in the image coordinate system can be converted into the position information in the vehicle coordinate system, so that the vehicle can perform automatic parking and automatic driving according to this information. These steps can improve the safety and efficiency of the vehicle and reduce the risk of human operation errors and accidents.
[0120] S230: If the corresponding parking spaces in the multiple frames of images are not in the preset parking space library, the parking space information of the parking spaces that are not in the preset parking space library is added to the preset parking space library.
[0121] Optionally, in an embodiment of the present application, when new parking space information is detected in multiple frames of images, and the parking space is not recorded in the preset parking space library at this time, the new parking space information is added to the preset parking space library.
[0122] In these optional embodiments, it is helpful to add new parking space information to the preset parking space library, thereby increasing the accuracy and reliability of parking space identification. As time goes by, the parking space information in the preset parking space library can be gradually updated to maintain consistency with the actual scene.
[0123] S240: If the first corner point coordinate is greater than a first preset coordinate threshold or the first corner point coordinate is less than a second preset coordinate threshold, the first corner point coordinate is deleted, where the first corner point coordinate is any one of the multiple initial corner point coordinates.
[0124] Optionally, in the embodiment of the present application, Figure 4 As shown, the parking space corner coordinates can be converted, that is, from the origin coordinates of O1 to the origin coordinates of O2. At this time, if the parking space corner coordinates are greater than H or W is less than 0, the parking space information is deleted. Among them, H and W are the set thresholds. When the camera cannot detect the parking space, the parking space information will still exist in the memory. When the parking space corner coordinates of a vehicle coordinate system are greater than H or W or less than 0, the parking space is deleted.
[0125] In these optional embodiments, it is helpful to remove inaccurate or useless corner point coordinates, thereby improving the accuracy and stability of parking space recognition. By deleting corner point coordinates that do not meet the threshold requirements, the influence of misidentification and interference factors on the parking space recognition results can be avoided.
[0126] Optionally, in the embodiment of the present application, Kalman filtering is currently widely used in tracking algorithms, using the acquired vehicle motion parameters to predict the position where the current target should be, thereby achieving the purpose of tracking. However, Kalman filtering has very large limitations. It can only accurately estimate linear process models and measurement models, and cannot achieve the optimal estimation effect in nonlinear scenarios. For this reason, the present application designs a parking space determination method, and improves the tracking algorithm in combination with the existing Kalman filter. Improve the accuracy of determining the parking space position.
[0127] Figure 5 A schematic structural diagram of a parking space determination device provided in another embodiment of the present application is shown. For ease of explanation, only the parts related to the embodiment of the present application are shown.
[0128] Reference Figure 5 , the parking space determining device may include:
[0129] An acquisition module 501 is used to acquire multiple frames of images through an onboard device of a vehicle;
[0130] The processing module 502 is used to process the multiple frames of images using a preset processing model to obtain initial parking space information corresponding to each of the multiple frames of images;
[0131] A first prediction module 503 is used to predict, based on the initial parking space information corresponding to the first frame image, using a preset first prediction algorithm to obtain first prediction information corresponding to the second frame image, where the first frame image is any one of the multiple frames of image, and the second frame image is the next frame image of the first frame image;
[0132] The second prediction module 504 is used to perform prediction based on the initial parking space information corresponding to the first frame image using a preset second prediction algorithm to obtain second prediction information corresponding to the second frame image;
[0133] The matching module 505 is used to match and update the initial parking space information, the first prediction information and the second prediction information corresponding to the second frame image to obtain the target parking space information, and the target parking space information is used to determine the position of the target parking space.
[0134] In one embodiment, the initial parking space information includes the initial corner point coordinates of the parking space, and the first prediction module 503 may include:
[0135] A first acquisition submodule is used to acquire first position information of a vehicle corresponding to a first frame image and second position information of a vehicle corresponding to a second frame image;
[0136] A first transformation submodule, used for performing a matrix transformation on the first position information and the second position information to obtain a transformation matrix, wherein the first prediction algorithm includes the transformation matrix;
[0137] The first calculation submodule is used to multiply the conversion matrix with the initial corner point coordinates of the initial parking space information corresponding to the first frame image to obtain the first predicted corner point coordinates corresponding to the second frame image, and the first predicted information includes the first predicted corner point coordinates.
[0138] In one embodiment, the first position information includes a first vehicle coordinate and a first heading angle of the vehicle, and the second position information includes a second vehicle coordinate and a second heading angle of the vehicle; the first transformation submodule may include:
[0139] A first rotation unit is used to rotate and translate the first heading angle to obtain a first rotation matrix corresponding to the first frame image;
[0140] A first combining unit, used for combining the first rotation matrix and the first vehicle coordinates to obtain a first quaternion matrix corresponding to the first frame image;
[0141] A second rotation unit is used to rotate and translate the second heading angle to determine a second rotation matrix corresponding to the second frame image;
[0142] A second combining unit is used to combine the second rotation matrix and the second vehicle coordinates to obtain a second quaternion matrix corresponding to the second frame image;
[0143] The first calculation unit is used to multiply the inverse of the second quaternion matrix and the first quaternion matrix to obtain a transformation matrix.
[0144] In one embodiment, the initial parking space information includes a plurality of initial corner point coordinates of the parking space, the first prediction information includes a first predicted corner point coordinate corresponding to each initial corner point coordinate, and the second prediction information includes a second predicted corner point coordinate corresponding to each initial corner point coordinate; the matching module 505 may include:
[0145] Calculating the Euclidean distance between each of the multiple initial corner point coordinates and the corresponding first predicted corner point coordinate to obtain multiple first Euclidean distances;
[0146] A second calculation submodule is used to calculate the Euclidean distance between each initial corner point coordinate in the plurality of initial corner point coordinates and the corresponding second predicted corner point coordinate to obtain a plurality of second Euclidean distances;
[0147] The first determination submodule is used to perform weight calculation on the initial corner point coordinates, the first predicted corner point coordinates and the second predicted corner point coordinates based on the size relationship between the first minimum Euclidean distance and the second minimum Euclidean distance and the first preset threshold respectively, to obtain the target corner point coordinates of the target parking space, the parking space information of the target parking space includes the target corner point coordinates of the target parking space, the first minimum Euclidean distance is the minimum value of the multiple first Euclidean distances, and the second minimum Euclidean distance is the minimum value of the multiple second Euclidean distances.
[0148] In one embodiment, the first determining submodule may include:
[0149] A first determining unit, used to determine a matching result between the first prediction information and the second prediction information corresponding to the second frame image and the initial parking space information corresponding to the second frame image respectively;
[0150] A recording unit, configured to record, based on the matching result, a first identifier that matches the parking space corresponding to the initial parking space information corresponding to the first frame image or a second identifier that does not match the parking space corresponding to the initial parking space information corresponding to the first frame image, among the parking spaces corresponding to the first prediction information and the parking spaces corresponding to the second prediction information;
[0151] The second calculation unit is used to perform weight calculation on the initial corner point coordinates, the first predicted corner point coordinates and the second predicted corner point coordinates based on the matching relationship between the first identifier and the second identifier and the preset parking space identifier of the target parking space, so as to obtain the target corner point coordinates of the target parking space.
[0152] In one embodiment, the first prediction information includes a first stable value for parking space prediction, and the second prediction information includes a second stable value for parking space prediction; and the second calculation unit may include:
[0153] A first calculation subunit is used to perform matching calculation on the first stable value and the second stable value to obtain a predicted stable value corresponding to the second frame image;
[0154] A first determination subunit is used to determine the target corner point coordinates of the target parking space according to the initial corner point coordinates of the initial parking space information corresponding to the second frame image, the first predicted corner point coordinates, and the weight values of the second predicted corner point coordinates when the first identifier exists and the predicted stability value does not reach the preset stability threshold;
[0155] The second determination subunit is used to determine the target corner point coordinates of the target parking space according to the respective weight values of the first predicted corner point coordinates and the second predicted corner point coordinates when the first identifier exists and the predicted stability value reaches a preset stability threshold.
[0156] In one embodiment, the second computing unit may further include:
[0157] an adding subunit, for, in the presence of the second identifier, if the predicted stability value does not reach a preset stability threshold, adding the matching parameters in the initial parking space information corresponding to the first frame image to obtain a first parameter, and adding the predicted stability value to obtain a second parameter, the matching parameter being used to characterize a matching condition of the parking space corresponding to the first frame image;
[0158] A third determination subunit is used to determine the target corner point coordinates of the target parking space according to the weight values of the first predicted corner point coordinates and the second predicted corner point coordinates when the first parameter is less than or equal to the preset parameter threshold and the second parameter reaches the preset stability threshold;
[0159] The fourth determination unit is used to determine the target corner point coordinates of the target parking space according to the respective weight values of the first predicted corner point coordinates and the second predicted corner point coordinates if the predicted stability value reaches a preset stability threshold when the second identifier exists.
[0160] In one embodiment, the initial parking space information includes a plurality of initial corner point coordinates of the parking space, and the processing module 502 may include:
[0161] A processing submodule, used to process the multiple frames of images using a preset processing model to obtain the coordinates of the second corner points corresponding to the multiple frames of images, wherein the coordinate system of the second corner point coordinates is the image coordinate system;
[0162] The mapping submodule is used to map the coordinates of the second corner point into the vehicle coordinate system to obtain the coordinates of the initial corner point.
[0163] An adding submodule, for adding parking space information of the parking space not in the preset parking space library to the preset parking space library if the corresponding parking space in the multiple frame images is not in the preset parking space library;
[0164] The deletion submodule is used to delete the first corner point coordinates if the first corner point coordinates are greater than the first preset coordinate threshold or the first corner point coordinates are less than the second preset coordinate threshold, wherein the first corner point coordinates are any one of the multiple initial corner point coordinates.
[0165] It should be noted that the information interaction, execution process, etc. between the above-mentioned devices / units are based on the same concept as the method embodiment of the present application, and are devices corresponding to the above-mentioned battery thermal runaway warning method. All implementation methods in the above-mentioned method embodiment are applicable to the embodiments of the device. Its specific functions and technical effects can be found in the method embodiment part, which will not be repeated here.
[0166] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.
[0167] Figure 6 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application is shown.
[0168] The device may include a processor 601 and a memory 602 storing program instructions.
[0169] When the processor 601 executes the program, the steps in any of the above method embodiments are implemented.
[0170] Exemplarily, the program may be divided into one or more modules / units, one or more modules / units are stored in the memory 602 and executed by the processor 601 to complete the present application. One or more modules / units may be a series of program instruction segments capable of completing a specific function, and the instruction segments are used to describe the execution process of the program in the device.
[0171] Specifically, the processor 601 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.
[0172] The memory 602 may include a large capacity memory for data or instructions. By way of example and not limitation, the memory 602 may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive or a combination of two or more of these. In appropriate cases, the memory 602 may include a removable or non-removable (or fixed) medium. In appropriate cases, the memory 602 may be inside or outside the integrated gateway disaster recovery device. In a specific embodiment, the memory 602 is a non-volatile solid-state memory.
[0173] The memory may include read-only memory (ROM), random access memory (RAM), magnetic disk storage media devices, optical storage media devices, flash memory devices, electrical, optical or other physical / tangible memory storage devices. Thus, typically, the memory includes one or more tangible (non-transitory) readable storage media (e.g., memory devices) encoded with software including computer executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the method according to an aspect of the present disclosure.
[0174] The processor 601 implements any one of the methods in the above embodiments by reading and executing program instructions stored in the memory 602 .
[0175] In one example, the electronic device may further include a communication interface 603 and a bus 610. The processor 601, the memory 602, and the communication interface 603 are connected via the bus 610 and communicate with each other.
[0176] The communication interface 603 is mainly used to implement communication between various modules, devices, units and / or equipment in the embodiments of the present application.
[0177] Bus 610 includes hardware, software or both, and the parts of online data flow billing equipment are coupled to each other. For example, but not limitation, bus may include accelerated graphics port (AGP) or other graphics bus, enhanced industrial standard architecture (EISA) bus, front-end bus (FSB), hypertransport (HT) interconnection, industrial standard architecture (ISA) bus, infinite bandwidth interconnection, low pin count (LPC) bus, memory bus, micro channel architecture (MCA) bus, peripheral component interconnection (PCI) bus, PCI-Express (PCI-X) bus, serial advanced technology attachment (SATA) bus, video electronics standard association local (VLB) bus or other suitable bus or two or more of these combinations. In appropriate cases, bus 610 may include one or more buses. Although the present application embodiment describes and shows a specific bus, the present application considers any suitable bus or interconnection.
[0178] In addition, in combination with the method in the above embodiment, the embodiment of the present application can provide a storage medium for implementation. The storage medium stores program instructions; when the program instructions are executed by a processor, any one of the methods in the above embodiment is implemented.
[0179] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface and the processor are coupled, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0180] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.
[0181] An embodiment of the present application provides a computer program product, which is stored in a storage medium. The program product is executed by at least one processor to implement the various processes of the above-mentioned method embodiment and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0182] It should be clear that the present application is not limited to the specific configuration and processing described above and shown in the figures. For the sake of simplicity, a detailed description of the known method is omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present application is not limited to the specific steps described and shown, and those skilled in the art can make various changes, modifications and additions, or change the order between the steps after understanding the spirit of the present application.
[0183] The functional modules shown in the above block diagram can be implemented as hardware, software, firmware or their combination. When implemented in hardware, it can be, for example, an electronic circuit, an application specific integrated circuit (ASIC), suitable firmware, a plug-in, a function card, etc. When implemented in software, the elements of the present application are programs or code segments that are used to perform the required tasks. Programs or code segments can be stored in machine-readable media, or transmitted on a transmission medium or a communication link by a data signal carried in a carrier wave. "Machine-readable media" can include any medium that can store or transmit information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, optical fiber media, radio frequency (RF) links, etc. Code segments can be downloaded via computer grids such as the Internet, intranets, etc.
[0184] It should also be noted that the exemplary embodiments mentioned in this application describe some methods or systems based on a series of steps or devices. However, this application is not limited to the order of the above steps, that is, the steps can be performed in the order mentioned in the embodiment, or in a different order from the embodiment, or several steps can be performed simultaneously.
[0185] Aspects of the present disclosure are described above with reference to the flowchart and / or block diagram of the method, device (system) and program product according to the embodiment of the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer program instructions. These program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer or other programmable data processing device to produce a machine so that these instructions executed by the processor of the computer or other programmable data processing device enable the implementation of the function / action specified in one or more boxes of the flowchart and / or block diagram. Such a processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor or a field programmable logic circuit. It can also be understood that each box in the block diagram and / or flowchart and the combination of boxes in the block diagram and / or flowchart can also be implemented by dedicated hardware that performs a specified function or action, or can be implemented by a combination of dedicated hardware and computer instructions.
[0186] The above are only specific implementation methods of the present application. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working processes of the systems, modules and units described above can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here. It should be understood that the protection scope of the present application is not limited to this. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in this application, and these modifications or replacements should be included in the protection scope of this application.
Claims
1. A parking space determination method, characterized in that: The method comprises: Acquire multiple frames of images through an on-board device of the vehicle; Processing the multiple frames of images using a preset processing model to obtain initial parking space information corresponding to each of the multiple frames of images; Based on the initial parking space information corresponding to the first frame image, a preset first prediction algorithm is used to perform prediction to obtain first prediction information corresponding to the second frame image, where the first frame image is any one of the multiple frames of images, and the second frame image is a frame image next to the first frame image; Based on the initial parking space information corresponding to the first frame image, a preset second prediction algorithm is used to perform prediction to obtain second prediction information corresponding to the second frame image; The initial parking space information corresponding to the second frame image, the first prediction information and the second prediction information are matched and updated to obtain target parking space information, where the target parking space information is used to determine the position of the target parking space.
2. The method according to claim 1, characterized in that The initial parking space information includes the initial corner point coordinates of the parking space; The method of performing prediction based on the initial parking space information corresponding to the first frame image by using a preset first prediction algorithm to obtain first prediction information corresponding to the second frame image includes: Acquire first position information of the vehicle corresponding to the first frame image and second position information of the vehicle corresponding to the second frame image; Performing a matrix transformation on the first position information and the second position information to obtain a conversion matrix, wherein the first prediction algorithm includes the conversion matrix; The conversion matrix is multiplied by the initial corner point coordinates of the initial parking space information corresponding to the first frame image to obtain the first predicted corner point coordinates corresponding to the second frame image, where the first predicted information includes the first predicted corner point coordinates.
3. The method according to claim 2, characterized in that The first position information includes a first vehicle coordinate and a first heading angle of the vehicle, and the second position information includes a second vehicle coordinate and a second heading angle of the vehicle; The performing matrix transformation on the first position information and the second position information to obtain a conversion matrix includes: Rotate and translate the first heading angle to obtain a first rotation matrix corresponding to the first frame image; Combining the first rotation matrix and the first vehicle coordinates to obtain a first quaternion matrix corresponding to the first frame image; Rotate and translate the second heading angle to determine a second rotation matrix corresponding to the second frame image; Combining the second rotation matrix and the second vehicle coordinates to obtain a second quaternion matrix corresponding to the second frame image; The inverse of the second quaternion matrix is multiplied by the first quaternion matrix to obtain the transformation matrix.
4. The method according to claim 1, characterized in that: The initial parking space information includes a plurality of initial corner point coordinates of the parking space, the first prediction information includes a first predicted corner point coordinate corresponding to each initial corner point coordinate, and the second prediction information includes a second predicted corner point coordinate corresponding to each initial corner point coordinate; The matching and updating of the initial parking space information corresponding to the second frame image, the first prediction information, and the second prediction information to obtain the target parking space information includes: Calculating the Euclidean distance between each of the multiple initial corner point coordinates and the corresponding first predicted corner point coordinate to obtain multiple first Euclidean distances; Calculating the Euclidean distance between each of the multiple initial corner point coordinates and the corresponding second predicted corner point coordinates to obtain multiple second Euclidean distances; Based on the size relationship between the first minimum Euclidean distance and the second minimum Euclidean distance and the first preset threshold value respectively, the initial corner point coordinates, the first predicted corner point coordinates and the second predicted corner point coordinates are weighted to obtain the target corner point coordinates of the target parking space, the parking space information of the target parking space includes the target corner point coordinates of the target parking space, the first minimum Euclidean distance is the minimum value of the multiple first Euclidean distances, and the second minimum Euclidean distance is the minimum value of the multiple second Euclidean distances.
5. The method according to claim 4, characterized in that The weighting calculation of the initial corner point coordinates, the first predicted corner point coordinates, and the second predicted corner point coordinates based on the size relationship between the first minimum Euclidean distance and the second minimum Euclidean distance and the first preset threshold, to obtain the target corner point coordinates of the target parking space, includes: Based on the magnitude relationship between the first minimum Euclidean distance and the second minimum Euclidean distance and the first preset threshold, respectively, determining a matching result between the first prediction information corresponding to the second frame image and the second prediction information and the initial parking space information corresponding to the second frame image, respectively; Based on the matching result, recording a first identifier that matches the parking space corresponding to the initial parking space information corresponding to the first frame image, or a second identifier that does not match, among the parking space corresponding to the first prediction information and the parking space corresponding to the second prediction information; Based on the matching relationship between the first identifier and the second identifier and the preset parking space identifier of the target parking space, the initial corner point coordinates, the first predicted corner point coordinates and the second predicted corner point coordinates are weighted to obtain the target corner point coordinates of the target parking space.
6. The method according to claim 5, characterized in that The first prediction information includes a first stable value for parking space prediction, and the second prediction information includes a second stable value for parking space prediction; The weighting calculation of the initial corner point coordinates, the first predicted corner point coordinates, and the second predicted corner point coordinates based on the matching relationship between the first identifier and the second identifier and the preset parking space identifier of the target parking space to obtain the target corner point coordinates of the target parking space includes: Performing matching calculation on the first stable value and the second stable value to obtain a predicted stable value corresponding to the second frame image; In the case where the first identifier exists and the predicted stability value does not reach the preset stability threshold, determining the target corner point coordinates of the target parking space according to the initial corner point coordinates of the initial parking space information corresponding to the second frame image, the first predicted corner point coordinates, and the weight values of the second predicted corner point coordinates; When the first identifier exists and the predicted stability value reaches a preset stability threshold, the target corner point coordinates of the target parking space are determined according to the weight values of the first predicted corner point coordinates and the second predicted corner point coordinates.
7. The method according to claim 6, characterized in that The weighting calculation of the initial corner point coordinates, the first predicted corner point coordinates, and the second predicted corner point coordinates based on the matching relationship between the first identifier and the second identifier and the preset parking space identifier of the target parking space to obtain the target corner point coordinates of the target parking space also includes: In the case where the second identifier exists, if the predicted stability value does not reach the preset stability threshold, the matching parameters in the initial parking space information corresponding to the first frame image are added to obtain a first parameter, and the predicted stability value is added to obtain a second parameter, the matching parameter being used to characterize the matching condition of the parking space corresponding to the first frame image; In the case where the first parameter is less than or equal to the preset parameter threshold, if the second parameter reaches the preset stability threshold, determining the target corner point coordinates of the target parking space according to the weight values of the first predicted corner point coordinates and the second predicted corner point coordinates; In the case where the second identifier exists, if the predicted stability value reaches the preset stability threshold, the target corner point coordinates of the target parking space are determined according to the weight values of the first predicted corner point coordinates and the second predicted corner point coordinates.
8. The method according to claim 1, characterized in that The initial parking space information includes a plurality of initial corner point coordinates of the parking space; The using a preset processing model to process the multiple frames of images to obtain initial parking space information corresponding to the multiple frames of images includes: If the parking spaces corresponding to the plurality of frames of images are not in the preset parking space library, the parking space information of the parking spaces not in the preset parking space library is added to the preset parking space library; If the first corner point coordinate is greater than a first preset coordinate threshold or the first corner point coordinate is less than a second preset coordinate threshold, the first corner point coordinate is deleted, and the first corner point coordinate is any one of the multiple initial corner point coordinates.
9. The method according to claim 1, characterized in that: The initial parking space information includes a plurality of initial corner point coordinates of the parking space; The using a preset processing model to process the multiple frames of images to obtain initial parking space information corresponding to the multiple frames of images includes: Processing the multiple frames of images using a preset processing model to obtain second corner point coordinates corresponding to the multiple frames of images, wherein the coordinate system of the second corner point coordinates is an image coordinate system; The second corner point coordinates are mapped into the vehicle coordinate system to obtain the initial corner point coordinates.
10. A parking space determination device, characterized in that: The device comprises: An acquisition module, used for acquiring multiple frames of images through an on-board device of a vehicle; A processing module, used to process the multiple frames of images using a preset processing model to obtain initial parking space information corresponding to each of the multiple frames of images; A first prediction module is used to predict, based on initial parking space information corresponding to a first frame image, using a preset first prediction algorithm to obtain first prediction information corresponding to a second frame image, wherein the first frame image is any one of the multiple frames of images, and the second frame image is a frame image next to the first frame image; A second prediction module, configured to perform prediction based on the initial parking space information corresponding to the first frame image using a preset second prediction algorithm to obtain second prediction information corresponding to the second frame image; The matching module is used to match and update the initial parking space information corresponding to the second frame image, the first prediction information and the second prediction information to obtain the target parking space information, and the target parking space information is used to determine the position of the target parking space.
Citation Information
Cited By
Camera speed measurement method and related device
CN121878252A