Parking space tracking method and device, and vehicle

By establishing a motion model and calculating the intersection and union ratio, the problem of coordinate conversion error in parking space tracking is solved, the parking space tracking accuracy is improved, and high-precision parking space positioning is achieved.

CN118552872APending Publication Date: 2024-08-27BYD CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310209371.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-02-27
Publication Date
2024-08-27

AI Technical Summary

Technical Problem

Existing parking space tracking methods easily introduce calculation errors during the coordinate conversion process, affecting tracking accuracy.

Method used

By establishing a motion model, the parking space position parameters in the current frame image are predicted based on the corrected position parameters of the parking space in the previous frame image, avoiding coordinate conversion, and using methods such as intersection-union ratio and Kalman filtering to determine whether the parking spaces are the same parking space, and calculate Corrected position parameters.

Benefits of technology

It improves the accuracy of parking space tracking, avoids calculation errors caused by coordinate conversion, and tracks the parking space as a unit target, reducing corner identity transformation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118552872A
    Figure CN118552872A
Patent Text Reader

Abstract

The invention discloses a parking space tracking method and device and a vehicle, and the method comprises the steps: obtaining a corrected position parameter of a first parking space in a previous frame of image, the position parameter comprising an angular point coordinate and a bounding box parameter, and the bounding box parameter comprising a coordinate of a central point of a bounding box and an area of the bounding box; acquiring a current frame image; the corrected position parameter of the first parking space is input to a pre-created motion model, a first position parameter of the first parking space in the current frame image is predicted, and the motion model is used for describing inter-frame displacement of the parking space; detecting a second position parameter of a second parking space in the current frame image; determining whether the first parking space and the second parking space are the same parking space according to a bounding box parameter in the first position parameters and a bounding box parameter in the second position parameters; and under the condition that the first parking space and the second parking space are the same parking space, determining a corrected position parameter of the second parking space in the current frame image according to the first position parameter and the second position parameter.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of vehicle technology, and more specifically, to a parking space tracking method, device, and vehicle. Background Art

[0002] With the development of vehicle technology, automatic parking technology has become more mature. In the process of automatic parking, in order to ensure that the vehicle can park successfully in the parking space, the parking space needs to be tracked in real time. In the existing parking space tracking method, the corner coordinates of the parking space obtained by the camera are converted to the world coordinate system, and the corner points are tracked in combination with the vehicle track information. During the coordinate conversion process, calculation errors will be introduced, affecting the tracking accuracy. Summary of the invention

[0003] An object of the present invention is to provide a new technical solution for parking space tracking.

[0004] According to a first aspect of the present invention, a parking space tracking method is provided, comprising:

[0005] Acquire corrected position parameters of the first parking space in the previous frame image, the position parameters including corner point coordinates and bounding box parameters, the bounding box parameters including coordinates of a center point of the bounding box and an area of ​​the bounding box;

[0006] Get the current frame image;

[0007] Inputting the corrected position parameter of the first parking space into a pre-created motion model to predict a first position parameter of the first parking space in a current frame image, wherein the motion model is used to describe the inter-frame displacement of the parking space;

[0008] Detecting a second position parameter of a second parking space in the current frame image;

[0009] determining whether the first parking space and the second parking space are the same parking space according to the bounding box parameters in the first position parameters and the bounding box parameters in the second position parameters;

[0010] In the case that the first parking space and the second parking space are the same parking space, the corrected position parameter of the second parking space in the current frame image is determined according to the first position parameter and the second position parameter.

[0011] Optionally, determining whether the first parking space and the second parking space are the same parking space according to the bounding box parameters in the first position parameters and the bounding box parameters in the second position parameters includes:

[0012] Calculating an intersection-over-union ratio between a bounding box in the first position parameter and a bounding box in the second position parameter;

[0013] Determine whether the first parking space and the second parking space are the same parking space according to the intersection-and-joint ratio.

[0014] Optionally, the determining whether the first parking space and the second parking space are the same parking space according to the intersection-to-joint ratio includes:

[0015] When the intersection-and-joint ratio is greater than a threshold, determining that the first parking space and the second parking space are the same parking space;

[0016] When the intersection-and-joint ratio is less than or equal to a threshold, it is determined that the first parking space and the second parking space are not the same parking space.

[0017] Optionally, the determining whether the first parking space and the second parking space are the same parking space according to the intersection-to-joint ratio includes:

[0018] Determine whether the first parking space and the second parking space are the same parking space according to the intersection-and-joint ratio by using the Hungarian algorithm.

[0019] Optionally, determining the corrected position parameter of the second parking space in the current frame image according to the first position parameter and the second position parameter includes:

[0020] Calculating the target state variable of the corner point of the second parking space according to the corner point coordinates in the first position parameter and the corner point coordinates in the second position parameter, and calculating the target state variable of the second parking space according to the bounding box parameters in the first position parameter and the bounding box parameters in the second position parameter; wherein the target state variable of the corner point of the second parking space includes the coordinates and speed of the corner point of the second parking space, and the target state variable of the second parking space includes the coordinates of the center point of the bounding box of the second parking space and the corresponding speed, the area of ​​the bounding box of the second parking space and the corresponding speed, and the aspect ratio of the bounding box of the second parking space;

[0021] The corner point coordinates of the second parking space contained in the target state variable of the corner point of the second parking space are determined as the corrected corner point coordinates of the second parking space in the current frame image, and the bounding box corresponding to the bounding box parameters contained in the target state variable of the second parking space are determined as the corrected bounding box parameters of the second parking space in the current frame image.

[0022] Optionally, calculating the target state variable of the second parking space according to the bounding box in the first position parameter and the bounding box in the second position parameter includes:

[0023] The target state variable of the second parking space is calculated according to the following formula:

[0024] y=z-Hx

[0025] K=PH T (HPH T +R)- 1

[0026] x′=x+Ky

[0027] P=(I-KH)P′(I-KH) T +KRK T

[0028]

[0029] Wherein, x is the state variable of the first parking space corresponding to the bounding box parameter in the first position parameter, x′ is the target state variable of the second parking space, u and v are respectively the horizontal coordinate and the vertical coordinate of the center point of the bounding box of the parking space, s is the area of ​​the bounding box of the parking space, and r is the aspect ratio of the bounding box of the parking space. are the speeds corresponding to u, v, and s respectively;

[0030] z is the state variable of the second parking space corresponding to the bounding box parameter in the second position parameter, and y is the error between x and z;

[0031] H is the measurement transformation matrix of the parking space, K is the Kalman gain of the parking space, ' is the noise covariance matrix of the first parking space in the current frame image, R is the measurement noise matrix of the parking space, and I is the unit matrix.

[0032] Optionally, calculating the target state variable of the corner point of the second parking space according to the corner point coordinates in the first position parameter and the corner point coordinates in the second position parameter includes:

[0033] The target state variable of the corner point of the second parking space is calculated according to the following formula:

[0034] y i =z i -H i x i

[0035]

[0036] x′ i =x i +K i y i

[0037]

[0038]

[0039] Among them, x iis the state variable of the i-th corner point of the first parking space corresponding to the corner point coordinates in the first position parameter, x′ i is the target state variable of the i-th corner point of the second parking space, u i and v i are the horizontal and vertical coordinates of the i-th corner point of the parking space, and u i and v i The corresponding speed;

[0040] z i is the state variable of the i-th corner point of the second parking space corresponding to the corner point coordinates in the second position parameter, y i For x i With z i The error between

[0041] H i is the measurement transformation matrix of the i-th corner point of the parking space, K i is the Kalman gain of the i-th corner point of the parking space, P i ′ is the noise covariance matrix of the i-th corner point of the first parking space in the current frame image, i is the measurement noise matrix of the i-th corner point of the parking space, and I is the unit matrix.

[0042] Optionally, the motion model includes a motion model of a parking space and a motion model of a corner point of the parking space, and the predicting of a first position parameter of the first parking space in the current frame image includes:

[0043] The bounding box parameters in the first position parameters are calculated by the following motion model of the parking space:

[0044] x=Fx″+Bμ

[0045] P'=FP"F T +Q

[0046]

[0047] Wherein, x is the state variable of the first parking space corresponding to the bounding box parameter in the first position parameter, ″ is the state variable of the first parking space determined according to the bounding box parameter in the corrected position parameter of the first parking space in the previous frame image, u and v respectively represent the horizontal coordinate and the vertical coordinate of the center point of the bounding box of the parking space, s is the area of ​​the bounding box of the parking space, and r is the aspect ratio of the bounding box of the parking space. are the speeds corresponding to u, v, and s respectively;

[0048] F is the motion transformation matrix of the parking space, is the control matrix of the parking space, μ is the control vector of the parking space, P″ is the noise covariance matrix of the first parking space in the previous frame image, P′ is the noise covariance matrix of the first parking space in the current frame image, and Q is the predicted noise variance matrix of the parking space;

[0049] The coordinates of the center point of the bounding box in the first position parameter are the coordinates of the center point of the bounding box in x, and the area of ​​the bounding box in the first position parameter is the area of ​​the bounding box in x;

[0050] The coordinates of the corner points in the first position parameters are calculated by the following motion model of the corner points of the parking space:

[0051] x i =F i x″ i +B i μ i

[0052]

[0053]

[0054] Among them, x i is the state variable of the i-th corner point of the first parking space corresponding to the corner point coordinates in the first position parameter, x″ i is the state variable of the i-th corner point of the first parking space determined according to the corner point coordinates in the corrected position parameters of the first parking space in the previous frame image, u i and v i are the horizontal and vertical coordinates of the i-th corner point of the parking space, and They are v i and v i The corresponding speed;

[0055] F i is the motion transformation matrix of the i-th corner point of the parking space, i is the control matrix of the i-th corner point of the parking space, μ i is the control vector of the i-th corner point of the parking space, P i ″ is the noise covariance matrix of the i-th corner point of the first parking space in the previous frame image, P i ′ is the noise covariance matrix of the i-th corner point of the first parking space in the current frame image, Q i is the predicted noise variance matrix of the i-th corner point of the parking space;

[0056] The corner point coordinates in the first position parameter are x i The coordinates of the corner points in .

[0057] According to a second aspect of the present invention, there is provided a parking space tracking device, comprising:

[0058] A first acquisition module, used to acquire the corrected position parameters of the first parking space in the previous frame image, the position parameters including corner point coordinates and bounding box parameters, the bounding box parameters including the coordinates of the center point of the bounding box and the area of ​​the bounding box;

[0059] The second acquisition module is used to acquire the current frame image;

[0060] a calculation module, configured to input the corrected position parameter of the first parking space into a pre-created motion model, and predict a first position parameter of the first parking space in a current frame image, wherein the motion model is used to describe the inter-frame displacement of the parking space;

[0061] A detection module, used for detecting a second position parameter of a second parking space in the current frame image;

[0062] A first determination module, configured to determine whether the first parking space and the second parking space are the same parking space according to the bounding box parameters in the first position parameters and the bounding box parameters in the second position parameters;

[0063] The second determining module is used to determine the corrected position parameter of the second parking space in the current frame image according to the first position parameter and the second position parameter when the first parking space and the second parking space are the same parking space.

[0064] According to a third aspect of the present invention, a vehicle is provided, comprising the parking space tracking device according to the second aspect of the present invention.

[0065] According to one embodiment of the present invention, the present invention establishes a motion model, predicts the first position parameters of the first parking space in the current frame image according to the motion model and the corrected position parameters of the first parking space in the previous frame image, determines whether the first parking space and the second parking space are the same parking space according to the first position parameters and the second position parameters of the second parking space detected in the current frame image, and calculates the corrected position parameters of the second parking space in the current frame image according to the first position parameters and the second position parameters when the first parking space and the second parking space are the same parking space. The present invention tracks the parking space in the image pixel coordinate system, does not need to convert the coordinates of the parking space corner points, avoids calculation errors caused by coordinate conversion, and improves the accuracy of parking space tracking.

[0066] Further features and advantages of the present invention will become apparent from the following detailed description of exemplary embodiments of the present invention with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0067] The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate embodiments of the invention and, together with the description, serve to explain the principles of the invention.

[0068] Figure 1 4 is a flow chart of a parking space tracking method according to an embodiment of the present invention.

[0069] Figure 2 It is a flow chart of a parking space tracking method according to another embodiment of the present invention.

[0070] Figure 3 Schematic diagram of a parking space tracking device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0071] Various exemplary embodiments of the present invention will now be described in detail with reference to the accompanying drawings. It should be noted that the relative arrangement of components and steps, numerical expressions and numerical values ​​set forth in these embodiments do not limit the scope of the present invention unless otherwise specifically stated.

[0072] The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the invention, its application, or uses.

[0073] Technologies, methods, and equipment known to ordinary technicians in the relevant art may not be discussed in detail, but where appropriate, the technologies, methods, and equipment should be considered as part of the specification.

[0074] In all examples shown and discussed herein, any specific values ​​should be interpreted as merely exemplary and not limiting. Therefore, other examples of the exemplary embodiments may have different values.

[0075] It should be noted that like reference numerals and letters refer to similar items in the following figures, and therefore, once an item is defined in one figure, it need not be further discussed in subsequent figures.

[0076] like Figure 1 As shown, this embodiment introduces a parking space tracking method, including steps 1100-1600.

[0077] Step 1100: Obtain corrected position parameters of the first parking space in the previous frame image, the position parameters including corner point coordinates and bounding box parameters, the bounding box parameters including coordinates of the center point of the bounding box and the area of ​​the bounding box.

[0078] In the process of tracking the parking space, the parking space image can be collected by the image acquisition module of the vehicle. The image acquisition module continuously collects multiple frames of images at a fixed frequency to track the parking space in real time.

[0079] The corrected position parameters of the first parking space are a set of parameters with high accuracy. The corrected position parameters can be directly sent to other functional modules of the vehicle for use. For example, the automatic parking module of the vehicle plans the automatic parking path according to the corrected position parameters of the parking space. There can be only one parking space or multiple parking spaces in the image, and the first parking space can be any parking space. If there are multiple parking spaces in the image, each parking space has a corresponding corrected position parameter.

[0080] The position parameters include corner point coordinates and bounding box parameters. Usually a parking space includes four corner points, so the corner point coordinates include the coordinates of the four corner points of the parking space. The corner point coordinates are the coordinates of the corner points in the image pixel coordinate system. The positions of the four corner points of the parking space in the image can be detected by the image detection algorithm, and then the corner point coordinates can be obtained.

[0081] Each parking space corresponds to a bounding box, which is used to indicate the location of the parking space in the image. The bounding box is a rectangular box. The four vertices of the bounding box are not the four corners of the parking space. The bounding box is used to indicate the location of the parking space in the image. The coordinates of the center point of the bounding box are the coordinates of the center point of the bounding box in the image pixel coordinate system.

[0082] Step 1200: Acquire the current frame image.

[0083] The current frame image is the next frame image of the previous frame image. After the image acquisition module acquires the previous frame image, the image acquisition module acquires the current frame image.

[0084] Step 1300: input the corrected position parameters of the first parking space into a pre-created motion model to predict the first position parameters of the first parking space in the current frame image, wherein the motion model is used to describe the inter-frame displacement of the parking space.

[0085] During the process of tracking the parking space, the vehicle is in a moving state. The position of the parking space in the image changes as the vehicle moves, and the position of the parking space in each frame is different. The motion model refers to a linear constant velocity model that propagates the target to the next frame image, and a linear constant velocity model that is independent of other objects and camera motion is used to approximate the inter-frame displacement of each object. In the linear constant velocity model, the displacement of the parking space between any two adjacent frames is equal.

[0086] The corrected position parameters of the first parking space are used as inputs of the motion model, and the motion model calculates first position parameters of the first parking space in the current frame image according to the corrected position parameters of the first parking space.

[0087] Step 1400: Detect a second position parameter of a second parking space in the current frame image.

[0088] By detecting the current frame image, the corner point coordinates of each parking space in the current frame image and the boundary box parameters corresponding to each parking space can be detected. The second parking space can be any parking space in the current frame image.

[0089] Step 1500: Determine whether the first parking space and the second parking space are the same parking space according to the bounding box parameters in the first position parameters and the bounding box parameters in the second position parameters.

[0090] The number of parking spaces in the current frame image may be the same as or different from the number of parking spaces in the previous frame image. For example, there are parking spaces 1, 2, and 3 in the previous frame image, and there are parking spaces 4, 5, and 6 in the current frame image. The number of parking spaces in the previous frame image is the same as the number of parking spaces in the current frame image, and the three parking spaces in the previous frame image correspond one-to-one with the three parking spaces in the current frame image. For example, parking space 1 is the same as parking space 4, parking space 2 is the same as parking space 5, and parking space 3 is the same as parking space 6. For another example, there are parking spaces 1, 2, and 3 in the previous frame image, and there are parking spaces 4, 5, 6, and 7 in the current frame image. There is a newly added parking space in the current frame image. In this case, there is also a second parking space in the current frame image that is the same as the first parking space. For another example, in the previous frame image there are parking spaces 1, 2 and 3, and in the current frame image there are parking spaces 4 and 5, and the number of parking spaces in the current frame image has decreased. In this case, there may not be a second parking space in the current frame image that is the same as the first parking space. For example, parking space 1 is the same as parking space 4, and parking space 2 is the same as parking space 5, and there is no parking space in the current frame image that is the same as parking space 3.

[0091] In the case of multiple parking spaces, it is necessary to determine whether the first parking space and the second parking space are the same parking space. If the first parking space and the second parking space are the same parking space, the bounding box in the first position parameter and the bounding box in the second position parameter should overlap or be very close. According to the bounding box parameters in the first position parameter and the bounding box parameters in the second position parameter, the proximity between the bounding box in the first position parameter and the bounding box in the second position parameter is determined. According to the proximity between the bounding box in the first position parameter and the bounding box in the second position parameter, it is determined whether the first parking space and the second parking space are the same parking space.

[0092] Step 1600: When the first parking space and the second parking space are the same parking space, determine the corrected position parameters of the second parking space in the current frame image according to the first position parameters and the second position parameters.

[0093] The first position parameter is obtained by prediction of the motion model, and the second position parameter is obtained by detecting the current frame image. There may be certain errors in the first position parameter and the second position parameter. In the present invention, it is considered that the first position parameter and the second position parameter both obey Gaussian distribution, and the first position parameter and the second position parameter are corrected by the joint Gaussian distribution to obtain the corrected position parameter of the second parking space in the current frame image. Compared with the first position parameter and the second position parameter, the corrected position parameter has higher accuracy. The corrected position parameter can be used to track the parking space in the next frame image of the current frame.

[0094] like Figure 2 As shown, if there is no parking space that is the same as the first parking space in the accumulated multiple frames of images, it means that the first parking space no longer exists in the current scene and it is no longer necessary to track the first parking space. At this time, the relevant information of the first parking space can be deleted.

[0095] The present invention establishes a motion model, predicts the first position parameter of the first parking space in the current frame image according to the motion model and the corrected position parameter of the first parking space in the previous frame image, determines whether the first parking space and the second parking space are the same parking space according to the first position parameter and the second position parameter of the second parking space detected in the current frame image, and calculates the corrected position parameter of the second parking space in the current frame image according to the first position parameter and the second position parameter when the first parking space and the second parking space are the same parking space. The present invention tracks the parking space in the image pixel coordinate system, does not need to convert the coordinates of the corner points of the parking space, avoids the calculation error caused by the coordinate conversion, and improves the accuracy of parking space tracking. At the same time, the present invention tracks the parking space as a unit target, avoids introducing the corner points of adjacent parking spaces into the parking space during the parking space tracking process, avoids the identity transformation of the corner points, and improves the tracking accuracy.

[0096] In one implementation, step 1500 includes steps 1510 - 1520 .

[0097] Step 1510: Calculate the intersection-over-union ratio between the bounding box in the first position parameter and the bounding box in the second position parameter.

[0098] The bounding box in the first position parameter is the first bounding box, and the bounding box in the second position parameter is the second bounding box. The intersection-and-union ratio of the first bounding box to the second bounding box is the ratio of the area of ​​the intersection of the first bounding box and the second bounding box to the total area of ​​the first bounding box and the second bounding box. For example, the intersection of the first bounding box and the second bounding box is the first area, the other areas in the first bounding box except the first area are the second area, and the other areas in the second bounding box except the first area are the third area. The intersection-and-union ratio of the first bounding box to the second bounding box is the ratio of the area of ​​the first area to the sum of the areas of the first area, the second area, and the third area.

[0099] Step 1520: Determine whether the first parking space and the second parking space are the same parking space according to the intersection-to-joint ratio.

[0100] According to the definition of the intersection-and-union ratio, the intersection-and-union ratio is in the range of 0-1. If the intersection-and-union ratio of the first bounding box and the second bounding box is 0, it means that the first bounding box and the second bounding box have no intersecting area. If the intersection-and-union ratio of the first bounding box and the second bounding box is 1, it means that the first bounding box and the second bounding box completely overlap. The larger the intersection-and-union ratio of the first bounding box and the second bounding box, the closer the first bounding box and the second bounding box are. If the first parking space and the second parking space are the same parking space, the intersection-and-union ratio of the first bounding box and the second bounding box should be a relatively large value.

[0101] Whether the first parking space and the second parking space are the same parking space can be determined based on the magnitude relationship between the intersection-and-union ratio of the first bounding box and the second bounding box and a preset threshold. If the intersection-and-union ratio is greater than the threshold, it is determined that the first parking space and the second parking space are the same parking space. If the intersection-and-union ratio is less than the threshold, it is determined that the first parking space and the second parking space are not the same parking space.

[0102] For example, if the threshold is 0.8 and the intersection-and-union ratio of the first bounding box and the second bounding box is 0.9, then it can be considered that the first parking space and the second parking space are the same parking space. If the intersection-and-union ratio of the first bounding box and the second bounding box is 0.2, then it is considered that the first parking space and the second parking space are not the same parking space.

[0103] When there are multiple parking spaces in the image, the Hungarian algorithm is used to determine whether the first parking space and the second parking space are the same parking space according to the intersection-and-union ratio. The method specifically includes steps 101-106.

[0104] Step 101: construct a cost matrix cost1 according to the intersection-union ratio.

[0105] The intersection-and-union ratio of two bounding boxes is in the range of 0-1. If the two bounding boxes do not intersect at all, the intersection-and-union ratio is 0. If the two bounding boxes completely overlap, the intersection-and-union ratio is 1. Calculate the first position parameter of each parking space in the previous frame image in the current frame image, detect the second position parameter of each parking space in the current frame image, and calculate the intersection-and-union ratio between the bounding box in each first position parameter and the bounding box in each second position parameter. The cost matrix is ​​an n*n matrix, where n represents the number of parking spaces in the image. The element value of the cost matrix is ​​1-IOU, where IOU represents the intersection-and-union ratio. For example, if the intersection-and-union ratio of two bounding boxes is 0.7, then the corresponding element value in the cost matrix is ​​0.3.

[0106] For example, there are three parking spaces in the scene, and the first position parameters of the three parking spaces in the current frame image correspond to bounding box 1, bounding box 2, and bounding box 3. The second position parameters of the three parking spaces in the current frame image correspond to bounding box 4, bounding box 5, and bounding box 6. The intersection and union ratios between the three bounding boxes corresponding to the first position parameters of the three parking spaces in the current frame image and the three bounding boxes corresponding to the second position parameters of the three parking spaces in the current frame image are calculated respectively, and 9 intersection and union ratios are obtained. For example, the intersection and union ratio is:

[0107] Bounding Box 4 Bounding Box 5 Bounding Box 6 Bounding Box 1 0.3 0.7 0.8 Bounding Box 2 0.8 0.2 0.9 Bounding Box 3 0.9 0.7 0.4

[0108] According to the above intersection ratio, construct a 3*3 cost matrix cost1:

[0109]

[0110] Step 102: Subtract the minimum element corresponding to the row where each element of the cost matrix cost1 is located from the minimum element to obtain the cost matrix cost2.

[0111] For the cost matrix cost1, the minimum element of the first row is 0.2, the minimum element of the second row is 0.1, and the minimum element of the third row is 0.1.

[0112] Subtract the minimum element 0.2 from each element in the first row of the cost matrix cost1, subtract the minimum element 0.1 from each element in the second row of the cost matrix cost1, and subtract the minimum element 0.1 from each element in the third row of the cost matrix cost1. The cost matrix cost2 is:

[0113]

[0114] Step 103: Subtract the minimum element corresponding to the column where each element of the cost matrix cost2 is located from the minimum element to obtain the cost matrix cost3.

[0115] For the cost matrix cost2, the minimum element of the first column is 0, the minimum element of the second column is 0.1, and the minimum element of the third column is 0.

[0116] Subtract the minimum element 0 of the first column from each element of the first column of the cost matrix cost2, subtract the minimum element 0.1 of the second column from each element of the second column of the cost matrix cost2, and subtract the minimum element 0 of the third column from each element of the third column of the cost matrix cost2. The cost matrix cost3 is obtained as follows:

[0117]

[0118] Step 104: Cover all zero elements in the cost matrix cost3 using the minimum number of horizontal and vertical lines.

[0119] For the above cost matrix cost3, there are zero elements in each row and each column, so 3 horizontal lines or 3 vertical lines are needed to cover all zero elements in the cost matrix.

[0120] Step 105: If the number of horizontal lines and vertical lines is the same as the order of the cost matrix, the matching relationship is determined according to the zero elements in the cost matrix cost3.

[0121] The order of the cost matrix cost3 is 3, and the number of horizontal lines is the same as the order of the cost matrix. The matching relationship is determined based on the zero elements in the cost matrix cost3. In the cost matrix cost3, there is only one zero element in the third row, which is in the first column of the third row of the cost matrix cost3. The third row corresponds to bounding box 3, and the first column corresponds to bounding box 4, so bounding box 3 matches bounding box 4. In the cost matrix cost3, there is only one zero element in the second row. In the second row and third column of the cost matrix cost3, the second row corresponds to bounding box 2, and the third column corresponds to bounding box 6, so bounding box 2 matches bounding box 6. In the first row of the cost matrix cost, the second and third columns are both zero elements. The second row corresponds to bounding box 5, and the third row corresponds to bounding box 6. Since bounding box 6 has already matched bounding box 2, bounding box 1 matches bounding box 5.

[0122] Step 106: If the number of horizontal and vertical lines is less than the order of the cost matrix cost3, then find the smallest element h that is not covered, subtract h from all uncovered elements, add the smallest element h to the elements that are covered twice, and repeat step 106 until the number of horizontal and vertical lines is the same as the order of the cost matrix.

[0123] If both horizontal and vertical lines are used for coverage, the elements at the intersection of the horizontal and vertical lines are covered twice.

[0124] For example, in another example, the cost matrix cost3 is:

[0125]

[0126] For the cost matrix cost3, all zero elements can be covered using one horizontal line and one vertical line. The horizontal line covers the third row and the vertical line covers the third column. The element 0.5 in the third row and third column is covered twice. The number of horizontal and vertical lines is less than the order of the cost matrix. Among the uncovered elements, the smallest element is 0.1. Subtract 0.2 from all uncovered elements and add 0.1 to the elements in the third row and third column, and the cost matrix cost4 is:

[0127]

[0128] At this time, there are zero elements in each row and each column of the cost matrix cost4, so return to step 105 to determine the matching relationship.

[0129] In this embodiment, a cost matrix is ​​constructed according to the intersection-and-union ratio of the bounding boxes of the parking spaces, and the matching relationship of the parking spaces is calculated by the Hungarian algorithm, which has better robustness.

[0130] In one implementation, step 1600 includes steps 1610 - 1620 .

[0131] Step 1610: Calculate the target state variables of the corner points of the second parking space according to the corner point coordinates in the first position parameters and the corner point coordinates in the second position parameters, and calculate the target state variables of the second parking space according to the bounding box parameters in the first position parameters and the bounding box parameters in the second position parameters; wherein the target state variables of the corner points of the second parking space include the coordinates and speed of the corner points of the second parking space, and the target state variables of the second parking space include the coordinates of the center point of the bounding box of the second parking space and the corresponding speed, the area of ​​the bounding box of the second parking space and the corresponding speed, and the aspect ratio of the bounding box of the second parking space.

[0132] The target state variable of the corner point of the second parking space and the target state variable of the second parking space are calculated respectively. The target state variable of the corner point of the second parking space includes the coordinates of the corner point, which can be used to provide to other functional modules of the vehicle. The target state variable of the second parking space includes a bounding box parameter for matching the first parking space with the second parking space.

[0133] The target state variable of the second parking space is calculated according to the following formula:

[0134] y=z-Hx

[0135] K=PH T (HPH T +R) -1

[0136] x′=x+Ky

[0137] P=(I-KH)P'(I-KH) T +KRK T

[0138]

[0139] Among them, x is the state variable of the first parking space corresponding to the bounding box parameter in the first position parameter, x′ is the target state variable of the second parking space, u and v are the horizontal and vertical coordinates of the center point of the bounding box of the parking space, s is the area of ​​the bounding box of the parking space, and r is the aspect ratio of the bounding box of the parking space. are the velocities corresponding to u, v, and s respectively.

[0140] z is the state variable of the second parking space corresponding to the bounding box parameter in the second position parameter, and y is the error between x and z.

[0141] H is the measurement transformation matrix of the parking space, K is the Kalman gain of the parking space, ′ is the noise covariance matrix of the first parking space in the current frame image, R is the measurement noise matrix of the parking space, and I is the unit matrix.

[0142] The target state variable of the corner point of the second parking space is calculated according to the following formula:

[0143] y i =z i -H i x i

[0144]

[0145] x′ i =x i +K i y i

[0146]

[0147]

[0148] Among them, x i is the state variable of the i-th corner point of the first parking space corresponding to the corner point coordinates in the first position parameter, x′ i is the target state variable of the i-th corner point of the second parking space, u i and v i are the horizontal and vertical coordinates of the i-th corner point of the parking space, and u i and v i The corresponding speed.

[0149] z i is the state variable of the i-th corner point of the second parking space corresponding to the corner point coordinates in the second position parameter, y i For x i With z i The error between .

[0150] Hi is the measurement transformation matrix of the i-th corner point of the parking space, K i is the Kalman gain of the i-th corner point of the parking space, P i ′ is the noise covariance matrix of the first parking space at the i-th corner point in the current frame image, R i is the measurement noise matrix of the i-th corner point of the parking space, and I is the unit matrix.

[0151] Usually a parking space has four corner points, so the values ​​of i are 1, 2, 3, and 4.

[0152] Step 1620: Determine the corner point coordinates of the second parking space contained in the target state variable of the corner point of the second parking space as the corrected corner point coordinates of the second parking space in the current frame image, and determine the bounding box corresponding to the bounding box parameters contained in the target state variable of the second parking space as the corrected bounding box parameters of the second parking space in the current frame image.

[0153] After the target state variable of the corner point of the second parking space is calculated, the corner point coordinates included in the target state variable of the corner point of the second parking space are determined as the corrected corner point coordinates of the second parking space in the current frame image.

[0154] In this embodiment, the motion model includes a motion model of a parking space and a motion model of a corner point of the parking space, and the predicting of a first position parameter of the first parking space in the current frame image includes:

[0155] The bounding box parameters in the first position parameters are calculated using the following motion model of the parking space:

[0156] x=Fx″+Bμ

[0157] P'=FP"F T +Q

[0158]

[0159] Wherein, x is the state variable of the first parking space corresponding to the bounding box parameter in the first position parameter, ″ is the state variable of the first parking space determined according to the bounding box parameter in the corrected position parameter of the first parking space in the previous frame image, u and v respectively represent the horizontal coordinate and the vertical coordinate of the center point of the bounding box of the parking space, s is the area of ​​the bounding box of the parking space, and r is the aspect ratio of the bounding box of the parking space. are the velocities corresponding to u, v, and s respectively.

[0160] F is the motion transformation matrix of the parking space, is the control matrix of the parking space, μ is the control vector of the parking space, P″ is the noise covariance matrix of the first parking space in the previous frame image, P′ is the noise covariance matrix of the first parking space in the current frame image, and Q is the predicted noise variance matrix of the parking space;

[0161] The coordinates of the center point of the bounding box in the first position parameter are the coordinates of the center point of the bounding box in x, and the area of ​​the bounding box in the first position parameter is the area of ​​the bounding box in x.

[0162] In this embodiment, the motion model of the parking space is a linear constant velocity model. The motion transformation matrix F of the parking space, the control matrix B of the parking space, the control vector μ of the parking space, and the predicted noise variance matrix Q of the parking space are all preset parameters and remain unchanged during the parking space tracking process.

[0163] The coordinates of the corner points in the first position parameter are calculated by the following motion model of the corner points of the parking space:

[0164] x i =F i x″ i +B i μ i

[0165]

[0166]

[0167] Among them, x i is the state variable of the i-th corner point of the first parking space corresponding to the corner point coordinates in the first position parameter, x″ i is the state variable of the i-th corner point of the first parking space determined according to the corner point coordinates in the corrected position parameters of the first parking space in the previous frame image, u i and v i are the horizontal and vertical coordinates of the i-th corner point of the parking space, and They are v i and v i The corresponding speed.

[0168] F i is the motion transformation matrix of the i-th corner point of the parking space, i is the control matrix of the i-th corner point of the parking space, μ i is the control vector of the i-th corner point of the parking space, P i ″ is the noise covariance matrix of the i-th corner point of the first parking space in the previous frame image, P i ′ is the noise covariance matrix of the i-th corner point of the first parking space in the current frame image, Qi is the predicted noise variance matrix of the i-th corner point of the parking space.

[0169] The corner point coordinates in the first position parameter are x i The coordinates of the corner points in .

[0170] In this embodiment, the motion model of the corner points of the parking space is a linear constant velocity model, and the motion transformation matrix F of the i-th corner point of the parking space is i , the control matrix B of the i-th corner point of the parking space i , the control vector μ of the i-th corner point of the parking space i , the prediction noise variance matrix Q of the i-th corner point of the parking space i These are preset parameters and remain unchanged during the parking space tracking process.

[0171] This embodiment introduces a parking space tracking device 300, including:

[0172] A first acquisition module 301 is used to acquire the corrected position parameters of the first parking space in the previous frame image, wherein the position parameters include corner point coordinates and bounding box parameters, and the bounding box parameters include the coordinates of the center point of the bounding box and the area of ​​the bounding box;

[0173] The second acquisition module 302 is used to acquire the current frame image;

[0174] A calculation module 303 is used to input the corrected position parameter of the first parking space into a pre-created motion model to predict the first position parameter of the first parking space in the current frame image, wherein the motion model is used to describe the inter-frame displacement of the parking space;

[0175] A detection module 304, configured to detect a second position parameter of a second parking space in the current frame image;

[0176] A first determination module 305, configured to determine whether the first parking space and the second parking space are the same parking space according to the bounding box parameters in the first position parameters and the bounding box parameters in the second position parameters;

[0177] The second determining module 306 is configured to determine, when the first parking space and the second parking space are the same parking space, the corrected position parameter of the second parking space in the current frame image according to the first position parameter and the second position parameter.

[0178] The present invention establishes a motion model, predicts the first position parameter of the first parking space in the current frame image according to the motion model and the corrected position parameter of the first parking space in the previous frame image, determines whether the first parking space and the second parking space are the same parking space according to the first position parameter and the second position parameter of the second parking space detected in the current frame image, and calculates the corrected position parameter of the second parking space in the current frame image according to the first position parameter and the second position parameter when the first parking space and the second parking space are the same parking space. The present invention tracks the parking space in the image pixel coordinate system, does not need to convert the coordinates of the corner points of the parking space, avoids the calculation error caused by the coordinate conversion, and improves the accuracy of parking space tracking. At the same time, the present invention tracks the parking space as a unit target, avoids introducing the corner points of adjacent parking spaces into the parking space during the parking space tracking process, avoids the identity transformation of the corner points, and improves the tracking accuracy.

[0179] Optionally, the first determining module is specifically configured to:

[0180] Calculating an intersection-over-union ratio between a bounding box in the first position parameter and a bounding box in the second position parameter;

[0181] Determine whether the first parking space and the second parking space are the same parking space according to the intersection-and-joint ratio.

[0182] Optionally, the first determining module is specifically configured to:

[0183] When the intersection-and-joint ratio is greater than a threshold, determining that the first parking space and the second parking space are the same parking space;

[0184] When the intersection-and-joint ratio is less than or equal to a threshold, it is determined that the first parking space and the second parking space are not the same parking space.

[0185] Optionally, the first determining module is specifically configured to:

[0186] Determine whether the first parking space and the second parking space are the same parking space according to the intersection-and-joint ratio by using the Hungarian algorithm.

[0187] Optionally, the second determining module is specifically configured to:

[0188] Calculating the target state variable of the corner point of the second parking space according to the corner point coordinates in the first position parameter and the corner point coordinates in the second position parameter, and calculating the target state variable of the second parking space according to the bounding box parameters in the first position parameter and the bounding box parameters in the second position parameter; wherein the target state variable of the corner point of the second parking space includes the coordinates and speed of the corner point of the second parking space, and the target state variable of the second parking space includes the coordinates of the center point of the bounding box of the second parking space and the corresponding speed, the area of ​​the bounding box of the second parking space and the corresponding speed, and the aspect ratio of the bounding box of the second parking space;

[0189] The corner point coordinates of the second parking space contained in the target state variable of the corner point of the second parking space are determined as the corrected corner point coordinates of the second parking space in the current frame image, and the bounding box corresponding to the bounding box parameters contained in the target state variable of the second parking space are determined as the corrected bounding box parameters of the second parking space in the current frame image.

[0190] Optionally, the second determining module is specifically configured to:

[0191] The target state variable of the second parking space is calculated according to the following formula:

[0192] y=z-Hx

[0193] K=PH T (HPH T +R) -1

[0194] x′=x+Ky

[0195] P=(I-KH)P′(I-KH) T +KRK T

[0196]

[0197] Wherein, x is the state variable of the first parking space corresponding to the bounding box parameter in the first position parameter, x′ is the target state variable of the second parking space, u and v are respectively the horizontal coordinate and the vertical coordinate of the center point of the bounding box of the parking space, s is the area of ​​the bounding box of the parking space, and r is the aspect ratio of the bounding box of the parking space. are the speeds corresponding to u, v, and s respectively;

[0198] z is the state variable of the second parking space corresponding to the bounding box parameter in the second position parameter, and y is the error between x and z;

[0199] H is the measurement transformation matrix of the parking space, K is the Kalman gain of the parking space, P′ is the noise covariance matrix of the first parking space in the current frame image, R is the measurement noise matrix of the parking space, and I is the unit matrix.

[0200] Optionally, the second determining module is specifically configured to:

[0201] The target state variable of the corner point of the second parking space is calculated according to the following formula:

[0202] y i =z i -H i x i

[0203]

[0204] x′ i =x i +K i y i

[0205]

[0206]

[0207] Among them, x i is the state variable of the i-th corner point of the first parking space corresponding to the corner point coordinates in the first position parameter, x′ i is the target state variable of the i-th corner point of the second parking space, u i and v i are the horizontal and vertical coordinates of the i-th corner point of the parking space, and u i and v i The corresponding speed;

[0208] z i is the state variable of the i-th corner point of the second parking space corresponding to the corner point coordinates in the second position parameter, y i For x i With z i The error between

[0209] H i is the measurement transformation matrix of the i-th corner point of the parking space, K i is the Kalman gain of the i-th corner point of the parking space, P i ′ is the noise covariance matrix of the i-th corner point of the first parking space in the current frame image, i is the measurement noise matrix of the i-th corner point of the parking space, and I is the unit matrix.

[0210] Optionally, the motion model includes a motion model of a parking space and a motion model of a corner point of the parking space, and the calculation module is specifically used to:

[0211] The bounding box parameters in the first position parameters are calculated by the following motion model of the parking space:

[0212] x=Fx″+Bμ

[0213] p'=FP"F T +Q

[0214]

[0215] Wherein, x is the state variable of the first parking space corresponding to the bounding box parameter in the first position parameter, ″ is the state variable of the first parking space determined according to the bounding box parameter in the corrected position parameter of the first parking space in the previous frame image, u and v respectively represent the horizontal coordinate and the vertical coordinate of the center point of the bounding box of the parking space, s is the area of ​​the bounding box of the parking space, and r is the aspect ratio of the bounding box of the parking space. are the speeds corresponding to u, v, and s respectively;

[0216] F is the motion transformation matrix of the parking space, is the control matrix of the parking space, μ is the control vector of the parking space, P″ is the noise covariance matrix of the first parking space in the previous frame image, P′ is the noise covariance matrix of the first parking space in the current frame image, and Q is the predicted noise variance matrix of the parking space;

[0217] The coordinates of the center point of the bounding box in the first position parameter are the coordinates of the center point of the bounding box in x, and the area of ​​the bounding box in the first position parameter is the area of ​​the bounding box in x;

[0218] The coordinates of the corner points in the first position parameters are calculated by the following motion model of the corner points of the parking space:

[0219] x i =F i x″ i +B i μ i

[0220]

[0221]

[0222] Among them, x i is the state variable of the i-th corner point of the first parking space corresponding to the corner point coordinates in the first position parameter, x″ iis the state variable of the i-th corner point of the first parking space determined according to the corner point coordinates in the corrected position parameters of the first parking space in the previous frame image, u i and v i are the horizontal and vertical coordinates of the i-th corner point of the parking space, and u i and v i The corresponding speed;

[0223] F i is the motion transformation matrix of the i-th corner point of the parking space, B i is the control matrix of the i-th corner point of the parking space, μ i is the control vector of the i-th corner point of the parking space, P i ″ is the noise covariance matrix of the i-th corner point of the first parking space in the previous frame image, P i ′ is the noise covariance matrix of the i-th corner point of the first parking space in the current frame image, Q i is the predicted noise variance matrix of the i-th corner point of the parking space;

[0224] The corner point coordinates in the first position parameter are x i The coordinates of the corner points in .

[0225] This embodiment introduces a vehicle, including the parking space tracking device described in any embodiment of the present invention.

[0226] The present invention may be a system, a method and / or a computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for causing a processor to implement various aspects of the present invention.

[0227] A computer-readable storage medium may be a tangible device that can hold and store instructions used by an instruction execution device. A computer-readable storage medium may be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. More specific examples of computer-readable storage media (a non-exhaustive list) include: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a static random access memory (SRAM), a portable compact disk read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanical encoding device, such as a punch card or a raised structure in a groove on which instructions are stored, and any suitable combination of the foregoing. As used herein, a computer-readable storage medium is not to be interpreted as a transient signal per se, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagating through a waveguide or other transmission medium (e.g., a light pulse through a fiber optic cable), or an electrical signal transmitted through a wire.

[0228] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, optical fiber transmissions, wireless transmissions, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in the computer-readable storage medium in each computing / processing device.

[0229] The computer program instructions for performing the operation of the present invention may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages, such as Smalltalk, C++, etc., and conventional procedural programming languages, such as "C" language or similar programming languages. Computer-readable program instructions may be executed entirely on a user's computer, partially on a user's computer, as an independent software package, partially on a user's computer, partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., using an Internet service provider to connect via the Internet). In some embodiments, an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), may be personalized by utilizing the state information of the computer-readable program instructions, and the electronic circuit may execute the computer-readable program instructions, thereby realizing various aspects of the present invention.

[0230] Various aspects of the present invention are described herein with reference to the flow charts and / or block diagrams of the methods, devices (systems) and computer program products according to embodiments of the present invention. It should be understood that each box of the flow chart and / or block diagram and the combination of each box in the flow chart and / or block diagram can be implemented by computer-readable program instructions.

[0231] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, so that when these instructions are executed by the processor of the computer or other programmable data processing device, a device that implements the functions / actions specified in one or more boxes in the flowchart and / or block diagram is generated. These computer-readable program instructions can also be stored in a computer-readable storage medium, and these instructions cause the computer, programmable data processing device, and / or other equipment to work in a specific manner, so that the computer-readable medium storing the instructions includes a manufactured product, which includes instructions for implementing various aspects of the functions / actions specified in one or more boxes in the flowchart and / or block diagram.

[0232] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operating steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to implement the functions / actions specified in one or more boxes in the flowchart and / or block diagram.

[0233] The flow charts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the systems, methods and computer program products according to multiple embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a part of a module, a program segment or an instruction, and a part of the module, a program segment or an instruction contains one or more executable instructions for realizing the specified logical function. In some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flow chart, and the combination of the boxes in the block diagram and / or flow chart can be implemented by a dedicated hardware-based system that performs the specified function or action, or can be implemented by a combination of dedicated hardware and computer instructions. It is well known to those skilled in the art that it is equivalent to implement it by hardware, implement it by software, and implement it by combining software and hardware.

[0234] Embodiments of the present invention have been described above, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The choice of terms used herein is intended to best explain the principles of the embodiments, practical applications, or technical improvements to the technology in the marketplace, or to enable other persons of ordinary skill in the art to understand the embodiments disclosed herein. The scope of the present invention is defined by the appended claims.

Claims

1. A parking space tracking method, It is characterized in that include: Acquire corrected position parameters of the first parking space in the previous frame image, the position parameters including corner point coordinates and bounding box parameters, the bounding box parameters including coordinates of a center point of the bounding box and an area of ​​the bounding box; Get the current frame image; Inputting the corrected position parameter of the first parking space into a pre-created motion model to predict a first position parameter of the first parking space in a current frame image, wherein the motion model is used to describe the inter-frame displacement of the parking space; Detecting a second position parameter of a second parking space in the current frame image; determining whether the first parking space and the second parking space are the same parking space according to the bounding box parameters in the first position parameters and the bounding box parameters in the second position parameters; In the case that the first parking space and the second parking space are the same parking space, the corrected position parameter of the second parking space in the current frame image is determined according to the first position parameter and the second position parameter.

2. The method according to claim 1, It is characterized in that The determining, according to the bounding box parameters in the first position parameters and the bounding box parameters in the second position parameters, whether the first parking space and the second parking space are the same parking space includes: Calculating an intersection-over-union ratio between a bounding box in the first position parameter and a bounding box in the second position parameter; Determine whether the first parking space and the second parking space are the same parking space according to the intersection-and-joint ratio.

3. The method according to claim 2, It is characterized in that The determining, according to the intersection-and-joint ratio, whether the first parking space and the second parking space are the same parking space includes: When the intersection-and-joint ratio is greater than a threshold, determining that the first parking space and the second parking space are the same parking space; When the intersection-and-joint ratio is less than or equal to a threshold, it is determined that the first parking space and the second parking space are not the same parking space.

4. The method according to claim 2, It is characterized in that The determining, according to the intersection-and-joint ratio, whether the first parking space and the second parking space are the same parking space includes: Determine whether the first parking space and the second parking space are the same parking space according to the intersection-and-joint ratio by using the Hungarian algorithm.

5. The method according to claim 1, It is characterized in that The step of determining the corrected position parameter of the second parking space in the current frame image according to the first position parameter and the second position parameter includes: Calculating the target state variable of the corner point of the second parking space according to the corner point coordinates in the first position parameter and the corner point coordinates in the second position parameter, and calculating the target state variable of the second parking space according to the bounding box parameters in the first position parameter and the bounding box parameters in the second position parameter; wherein the target state variable of the corner point of the second parking space includes the coordinates and speed of the corner point of the second parking space, and the target state variable of the second parking space includes the coordinates of the center point of the bounding box of the second parking space and the corresponding speed, the area of ​​the bounding box of the second parking space and the corresponding speed, and the aspect ratio of the bounding box of the second parking space; The corner point coordinates of the second parking space contained in the target state variable of the corner point of the second parking space are determined as the corrected corner point coordinates of the second parking space in the current frame image, and the bounding box corresponding to the bounding box parameters contained in the target state variable of the second parking space are determined as the corrected bounding box parameters of the second parking space in the current frame image.

6. The method according to claim 5, It is characterized in that The calculating the target state variable of the second parking space according to the bounding box in the first position parameter and the bounding box in the second position parameter includes: The target state variable of the second parking space is calculated according to the following formula: y=z-Hx K=PH T (HPH T +) -1 x ′ =+Ky P=(I-KH)P′(I-KH) T +KRK T Wherein, x is the state variable of the first parking space corresponding to the bounding box parameter in the first position parameter, x′ is the target state variable of the second parking space, u and v are respectively the horizontal coordinate and the vertical coordinate of the center point of the bounding box of the parking space, s is the area of ​​the bounding box of the parking space, and r is the aspect ratio of the bounding box of the parking space. are the speeds corresponding to u, v, and s respectively; z is the state variable of the second parking space corresponding to the bounding box parameter in the second position parameter, and y is the error between x and z; H is the measurement transformation matrix of the parking space, K is the Kalman gain of the parking space, P′ is the noise covariance matrix of the first parking space in the current frame image, R is the measurement noise matrix of the parking space, and I is the unit matrix.

7. The method according to claim 5, It is characterized in that The step of calculating the target state variable of the corner point of the second parking space according to the corner point coordinates in the first position parameter and the corner point coordinates in the second position parameter includes: The target state variable of the corner point of the second parking space is calculated according to the following formula: y i =z i -H i x i x′ i =x i +K i y i Among them, x i is the state variable of the i-th corner point of the first parking space corresponding to the corner point coordinates in the first position parameter, x′ i is the target state variable of the i-th corner point of the second parking space, u i and v i are the horizontal and vertical coordinates of the i-th corner point of the parking space, and u i and v i The corresponding speed; z i is the state variable of the i-th corner point of the second parking space corresponding to the corner point coordinates in the second position parameter, y i For x i With z i The error between H i is the measurement transformation matrix of the i-th corner point of the parking space, K i is the Kalman gain of the i-th corner point of the parking space, P i ′ is the noise covariance matrix of the i-th corner point of the first parking space in the current frame image, R i is the measurement noise matrix of the i-th corner point of the parking space, and I is the unit matrix.

8. The method according to claim 1, It is characterized in that The motion model includes a motion model of a parking space and a motion model of a corner point of the parking space, and the predicting of a first position parameter of the first parking space in the current frame image includes: The bounding box parameters in the first position parameters are calculated by the following motion model of the parking space: x=Fx″+Bμ P′=FP″F T +Q Wherein, x is the state variable of the first parking space corresponding to the bounding box parameter in the first position parameter, x″ is the state variable of the first parking space determined according to the bounding box parameter in the corrected position parameter of the first parking space in the previous frame image, u and v respectively represent the horizontal coordinate and the vertical coordinate of the center point of the bounding box of the parking space, s is the area of ​​the bounding box of the parking space, and r is the aspect ratio of the bounding box of the parking space. are the speeds corresponding to u, v, and s respectively; F is the motion transformation matrix of the parking space, is the control matrix of the parking space, μ is the control vector of the parking space, P″ is the noise covariance matrix of the first parking space in the previous frame image, P′ is the noise covariance matrix of the first parking space in the current frame image, and Q is the predicted noise variance matrix of the parking space; The coordinates of the center point of the bounding box in the first position parameter are the coordinates of the center point of the bounding box in x, and the area of ​​the bounding box in the first position parameter is the area of ​​the bounding box in x; The coordinates of the corner points in the first position parameters are calculated by the following motion model of the corner points of the parking space: x i =F i x″ i +B i μ i Among them, x i is the state variable of the i-th corner point of the first parking space corresponding to the corner point coordinates in the first position parameter, x″ i is the state variable of the i-th corner point of the first parking space determined according to the corner point coordinates in the corrected position parameters of the first parking space in the previous frame image, u i and v i are the horizontal and vertical coordinates of the i-th corner point of the parking space, and u i and v i The corresponding speed; F i is the motion transformation matrix of the i-th corner point of the parking space, B i is the control matrix of the i-th corner point of the parking space, μ i is the control vector of the i-th corner point of the parking space, P i ″ is the noise covariance matrix of the i-th corner point of the first parking space in the previous frame image, P i ′ is the noise covariance matrix of the i-th corner point of the first parking space in the current frame image, Q i is the predicted noise variance matrix of the i-th corner point of the parking space; The corner point coordinates in the first position parameter are x i The coordinates of the corner points in .

9. A parking space tracking device, It is characterized in that include: A first acquisition module, used to acquire the corrected position parameters of the first parking space in the previous frame image, the position parameters including corner point coordinates and bounding box parameters, the bounding box parameters including the coordinates of the center point of the bounding box and the area of ​​the bounding box; The second acquisition module is used to acquire the current frame image; a calculation module, configured to input the corrected position parameter of the first parking space into a pre-created motion model, and predict a first position parameter of the first parking space in a current frame image, wherein the motion model is used to describe the inter-frame displacement of the parking space; A detection module, used for detecting a second position parameter of a second parking space in the current frame image; A first determination module, configured to determine whether the first parking space and the second parking space are the same parking space according to the bounding box parameters in the first position parameters and the bounding box parameters in the second position parameters; The second determining module is used to determine the corrected position parameter of the second parking space in the current frame image according to the first position parameter and the second position parameter when the first parking space and the second parking space are the same parking space.

10. A vehicle, It is characterized in that It includes the parking space tracking device described in claim 9.

Citation Information

Patent Citations

  • Speed measuring method, device and system

    CN109765397A

  • Parking space tracking method, device and equipment and storage medium

    CN115042773A