A multi-target ranging method and device, electronic equipment and storage medium
By combining the pinhole imaging principle with the Kalman filter model, the longitudinal and lateral distances of the target are calculated and the center position of the vehicle is determined, which solves the problem of large ranging errors in the existing technology and achieves higher accuracy ranging results.
Patent Information
- Application Number
- CN202510936231.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-08
- Publication Date
- 2025-12-16
- Estimated Expiration
- 2045-07-08
AI Technical Summary
Existing monocular ranging technology has large errors in determining the lateral distance of vehicles, and the Kalman filter prediction fails to accurately obtain the target speed, resulting in insufficient ranging accuracy.
By combining the pinhole imaging principle with a Kalman filter model, the longitudinal and lateral distances are calculated using camera parameters and target boundary pixel coordinates. The center position of the vehicle's front or rear is determined by combining the target's prior width, and the position and velocity are estimated and updated using a Kalman filter model.
This improves the accuracy of target location and Kalman filtering, thereby enhancing the accuracy of ranging results.
Smart Images

Figure CN120431133B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of automatic driving camera perception, and in particular to a multi-target ranging method and device, electronic equipment and storage medium. BACKGROUND
[0002] In the field of intelligent driving, monocular ranging technology can determine the distance between the vehicle and the front target vehicle, determine the position of the front vehicle, and thus realize intelligent braking and avoidance, and improve driving safety. The existing target ranging method for vehicle driving generally consists of two stages. In the first stage, based on the information of the current frame and the camera parameters, the horizontal and vertical distances of the target are calculated through the optical pinhole imaging principle. The information of the current frame includes the target box position determined by 2D target detection, and the camera parameters include the camera's internal and external parameters, distortion coefficients and other parameter information. In the first stage, since 2D target detection focuses on classifying the entire target into a target box, it cannot specifically distinguish each component and cannot determine the accurate position of the head or tail center point of the vehicle, so the error of the determined horizontal distance is large. Even if the center point of the detection box is used as the position of the head or tail center point of the vehicle, the error will increase as the actual horizontal distance of the vehicle increases. In the second stage, based on Kalman filtering and the state of the vehicle itself, the horizontal and vertical positions of the vehicle in the current frame are first predicted through historical frame information, and then the calculation results in the previous stage are fused with the prediction results in this stage to obtain the final target position in the current frame. When predicting the result of the current frame through Kalman filtering in the second stage, since the speed of the measured target cannot be obtained, only the speed of the ego vehicle is added to the prediction link, which is equivalent to assuming that the target and the ego vehicle are relatively stationary or that the target is a stationary target, thereby reducing the prediction accuracy and causing a large error in the final result. SUMMARY
[0003] The present application aims to at least solve the above-mentioned technical problems in the prior art. To this end, the present application proposes a multi-target ranging method in the first aspect, which comprises:
[0004] real-time image acquisition on the ego vehicle, identifying all targets on the image, and performing target tracking;
[0005] determining the target vertical distance corresponding to each frame of image according to the pixel coordinates of the target boundary corresponding to each frame of image, the pixel coordinates of the camera optical center, the camera focal length, the camera installation height and the camera pitch angle by using the pinhole imaging principle;
[0006] obtaining the target horizontal distance corresponding to each frame of image according to the target vertical distance corresponding to each frame of image, the pixel coordinates of the target boundary, the camera focal length and the pixel coordinates of the camera optical center; the target horizontal distance is the horizontal distance of the leftmost or rightmost side of the target;
[0007] A coordinate system is established with the camera position as the origin, a target first position is determined based on the target lateral distance, the target longitudinal distance and the orientation relationship between the target and the camera optical axis corresponding to each frame of image, and a target second position corresponding to each frame of image is determined according to the target first position and the target prior width; the target second position is the center position of the target head or tail;
[0008] A Kalman filter model is established, the target second position corresponding to the current frame of image is input into the Kalman filter model, estimation update is performed, and an updated target second position corresponding to the current frame of image is obtained.
[0009] Optionally, the determination of the target second position corresponding to each frame of image according to the target first position and the target prior width comprises:
[0010] When the target is located on the left side of the camera optical axis, the target second position is obtained by subtracting half of the target prior width from the lateral position of the target first position;
[0011] When the target is located on the right side of the camera optical axis, the target second position is obtained by adding half of the target prior width to the lateral position of the target first position.
[0012] Optionally, the establishment of the Kalman filter model comprises:
[0013] A state quantity is established based on the target second position and the target speed; the target second position comprises a lateral position and a longitudinal position; and the target speed comprises a lateral speed and a longitudinal speed;
[0014] An observation quantity is constructed based on the target second position corresponding to each frame of image;
[0015] A state transition equation is established.
[0016] Optionally, the method further comprises:
[0017] The target second position corresponding to the current frame of image is input into the Kalman filter model, estimation update is performed, and an updated target speed is obtained.
[0018] Optionally, the identification of all targets on the image and the target tracking comprise:
[0019] Target box coordinates and target types of all targets on the image are obtained based on the YOLOv5 algorithm, and the targets on the continuous frames of image are tracked by the bytetrack algorithm.
[0020] Optionally, after the establishment of the Kalman filter model, the method further comprises:
[0021] If the target in the current frame of image has not been tracked, the Kalman filter model is initialized by using the target second position corresponding to the current frame of image.
[0022] The second aspect of the present application provides a multi-target ranging device, the device comprising:
[0023] An image acquisition module is configured to acquire images in front of the ego vehicle in real time through a camera on the ego vehicle, identify all targets in the images, and perform target tracking;
[0024] A first data processing module is configured to determine a target longitudinal distance corresponding to each frame of image according to pixel coordinates of a target boundary corresponding to each frame of image, pixel coordinates of a camera optical center, a camera focal length, a camera installation height, and a camera pitch angle by using a pinhole imaging principle;
[0025] A second data processing module is configured to obtain a target lateral distance corresponding to each frame of image according to the target longitudinal distance corresponding to each frame of image, pixel coordinates of the target boundary, the camera focal length, and the pixel coordinates of the camera optical center; the target lateral distance is a lateral distance of a leftmost or rightmost side of the target;
[0026] A third data processing module is configured to establish a coordinate system with a camera position as an origin, determine a target first position based on the target lateral distance corresponding to each frame of image, the target longitudinal distance, and a position relationship between the target and a camera optical axis, and determine a target second position corresponding to each frame of image according to the target first position and a target prior width; the target second position is a center position of a target head or tail;
[0027] A model updating module is configured to establish a Kalman filter model, input the target second position corresponding to a current frame of image into the Kalman filter model, perform estimation updating, and obtain an updated target second position corresponding to the current frame of image.
[0028] The third aspect of the present application provides an electronic device, the electronic device comprising a processor and a memory, the memory storing at least one instruction or at least one program, the at least one instruction or at least one program being loaded and executed by the processor to implement the multi-target ranging method as proposed in the first aspect.
[0029] The fourth aspect of the present application provides a computer-readable storage medium, the storage medium storing at least one instruction or at least one program, the at least one instruction or at least one program being loaded and executed by a processor to implement the multi-target ranging method as proposed in the first aspect.
[0030] The multi-target ranging method, device, electronic equipment and storage medium have the beneficial effects that the second position of the target is determined in combination with the prior width of the target, so that the accuracy of the second position of the target is improved; in addition, the Kalman filtering model is used to obtain the target speed in the filtering process through the historical data while updating the second position of the target, so that the accuracy of the Kalman filtering is improved, and the accuracy of the measurement result is improved. BRIEF DESCRIPTION OF DRAWINGS
[0031] Figure 1 A flowchart of a multi-target ranging method provided for an embodiment of the present application is shown in the figure.
[0032] Figure 2 An imaging diagram of a small hole when the pitch angle is assumed to be 0 in an embodiment of the present application is shown in the figure.
[0033] Figure 3 A transverse distance calculation diagram of the leftmost target in an embodiment of the present application is shown in the figure. DETAILED DESCRIPTION
[0034] The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor fall within the scope of protection of the present application.
[0035] Hereinafter, the terms "first" and "second" are only used for description purposes, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined with "first" and "second" can explicitly or implicitly include one or more features. In the description of the embodiments of the present disclosure, unless otherwise specified, the meaning of "multiple" is two or more. In addition, the use of "based on" or "according to" means openness and inclusiveness, because the process, step, calculation or other action "based on" or "according to" one or more stated conditions or values can be based on additional conditions or values beyond the stated values in practice.
[0036] The embodiments of the present application provide a multi-target ranging method, as shown in the figure, which comprises the following steps: Figure 1
[0037] Step 101, real-time image acquisition in front of the ego vehicle through the camera on the ego vehicle, identification of all targets on the image, and target tracking.
[0038] In a possible implementation, the identification of all targets on the image and the target tracking include:
[0039] The target frame coordinates and target type of all targets on the image are obtained based on the YOLOv5 algorithm, and the targets on the continuous frame images are tracked by the bytetrack algorithm.
[0040] After collecting the image in front of the vehicle, the collected image in front of the vehicle is corrected for distortion. The distortion correction in this embodiment includes correcting the distortion of the image and rotating the image according to the external parameters of the camera to ensure that the image is horizontal to the road surface. Specifically, the image is rotated according to the external parameters of the camera, that is, the lateral roll angle is corrected, so that the image is horizontal to the road surface, to reduce the error of subsequent measurement. After completing the image correction, 2D target detection is performed, the target frame coordinates and target type of all targets on the image are obtained by using the YOLOv5 algorithm, and the targets on the continuous frame images are tracked by the bytetrack algorithm to determine the corresponding position of the target in the previous frame image in the current frame image, so that the number of each vehicle in the historical frame image can be obtained, and the number of each target in the current frame image is obtained. Align the target information of the current frame with the target information of the historical frame. The target tracking is performed by using the bytetrack algorithm, which improves the tracking accuracy and reduces the time complexity of the algorithm. The target is a vehicle.
[0041] In step 102, the longitudinal distance of each target corresponding to each frame image is determined according to the pixel coordinates of the target boundary corresponding to each frame image, the pixel coordinates of the camera optical center, the camera focal length, the camera installation height and the camera pitch angle by using the pinhole imaging principle.
[0042] Specifically, the camera pitch angle is obtained by an IMU (Inertial Measurement Unit, inertial measurement device), and the camera pitch angle can also be obtained by other means. In the embodiment of the application, the pixel coordinates of the target bottom edge, that is, the pixel coordinates of the target grounding point, are used to calculate the target longitudinal distance. Figure 2 The pinhole imaging schematic diagram assuming that the pitch angle is 0, the projection position of the grounding point, the camera optical axis and the grounding point of the target are as shown in Figure 2 Referring to Figure 2 For each target in the image, the target longitudinal distance is determined by the following expression:
[0043]
[0044]
[0045] In the formula, is the angle between the target grounding point and the plane on which the camera optical axis lies, the upper left corner of the image is taken as the origin, the horizontal right is the u direction, and the vertical downward is the v direction, is the pixel coordinate of the bottom edge of the target 2D detection frame in the v direction of the image, pixel coordinate of the camera optical center in the image v direction, focal length in the image v direction, L is the target longitudinal distance, H is the camera installation height, and P is the camera pitch angle. It should be noted that in the existing monocular distance measurement, based on the assumption of flat road surface, the camera installation height is the height difference from the camera to the target grounding point.
[0046] Step 103, obtaining the target lateral distance corresponding to each frame of image according to the target longitudinal distance corresponding to each frame of image, the pixel coordinate of the target boundary, the focal length of the camera, and the pixel coordinate of the camera optical center; the target lateral distance is the lateral distance of the leftmost or rightmost target.
[0047] According to the relative position of the target in front of the ego vehicle and the camera optical axis, the corresponding target lateral distance is determined. Specifically, when the target in front is located on the left side of the optical axis, the lateral distance of the leftmost target is calculated, and the pixel position corresponding to the leftmost target is the left side of the target 2D detection frame, Figure 3 is a schematic diagram for calculating the target lateral distance, the left boundary of the target on the left side of the optical axis, the camera optical axis, and the projection position of the left boundary of the target on the left side are as Figure 3 shown, referring to Figure 3 , the target lateral distance is determined by the following expression:
[0048]
[0049] In the formula, is the lateral distance of the leftmost target, L is the target longitudinal distance, is the focal length in the image u direction, is the pixel coordinate of the left side of the target 2D detection frame, is the pixel coordinate of the camera optical center in the image u direction.
[0050] When the target in front is located on the right side of the optical axis, the lateral distance of the rightmost target is calculated according to the target lateral distance calculation method when the target is located on the left side of the optical axis.
[0051] Step 104, establishing a coordinate system with the camera position as the origin, determining the target first position based on the target lateral distance corresponding to each frame of image, the target longitudinal distance, and the azimuth relationship between the target and the camera optical axis, and determining the target second position corresponding to each frame of image according to the target first position and the target prior width; the target second position is the center position of the target head or tail.
[0052] In a possible implementation, the determination of the target second position corresponding to each frame of image according to the target first position and the target prior width comprises:
[0053] When the target is located on the left side of the camera optical axis, the lateral position of the first position of the target is subtracted by half of the prior width of the target to obtain the second position of the target;
[0054] When the target is located on the right side of the camera optical axis, the lateral position of the first position of the target is added by half of the prior width of the target to obtain the second position of the target.
[0055] Specifically, the embodiment of the application uses a BEV coordinate system, takes the camera position as the origin, takes the front of the camera lens as the positive direction of the target longitudinal distance, that is, the x direction, and takes the left side of the camera as the positive direction of the target lateral distance, that is, the y direction to establish the coordinate system, wherein the x direction is perpendicular to the y direction. After establishing the coordinate system with the camera position as the origin, the first position of the target is determined, which is the position of the leftmost or rightmost boundary of the target in the coordinate system, including the lateral position and the longitudinal position. The prior width of the target is determined according to the type of the target. The data of the prior width can be obtained through historical data. For each type of vehicle target, since the vehicle width is not unique but within a vehicle width value range, the median value of the vehicle width value range of each type of vehicle is taken as the prior width of the vehicle of this type in the embodiment of the application.
[0056] When the target is located on the left side of the camera optical axis, the lateral position of the first position of the target is subtracted by half of the prior width of the target, and the longitudinal position remains unchanged to obtain the second position of the target; when the target is located on the right side of the camera optical axis, the lateral position of the first position of the target is added by half of the prior width of the target, and the longitudinal position remains unchanged to obtain the second position of the target. It should be noted that when the target is located on the left side of the camera optical axis, the first position of the target is the position of the leftmost boundary of the target in the coordinate system, and when the target is located on the right side of the camera optical axis, the first position of the target is the position of the rightmost boundary of the target in the coordinate system.
[0057] The embodiment of the application determines the prior width of the target through the target category, guarantees the accuracy of the second position of the target when the target vehicle is not in front of the host vehicle, and meets the measurement requirements of multiple targets in the automatic driving process.
[0058] Step 105, a Kalman filter model is established, the second position of the target corresponding to the current frame image is input into the Kalman filter model, estimation update is performed, and the updated second position of the target corresponding to the current frame image is obtained.
[0059] In a possible implementation, the establishment of the Kalman filter model comprises:
[0060] The state quantity is established based on the second position of the target and the target speed; the second position of the target comprises a lateral position and a longitudinal position; and the target speed comprises a lateral speed and a longitudinal speed;
[0061] An observation is constructed based on the second position of the target corresponding to each frame of the image;
[0062] Establish the state transition equation.
[0063] Specifically, in this embodiment of the invention, the state variables of the Kalman filter model include the lateral position of the target's second position, the longitudinal position of the target's second position, the lateral velocity of the target, and the longitudinal velocity of the target. These four state variables are the parameters that the Kalman filter model in this embodiment of the invention needs to estimate and update. The observation is the target's second position determined by the information in each frame of the image, that is, the target's second position corresponding to each frame of the image. The state transition equation is as follows:
[0064]
[0065]
[0066]
[0067]
[0068] In the formula, Let be the predicted velocity in the x-direction at time t, i.e., the predicted longitudinal velocity of the target at time t. This represents the x-direction velocity output at time t-1, i.e., the target longitudinal velocity updated at time t-1. Let be the predicted velocity in the y-direction at time t, i.e., the predicted lateral velocity of the target at time t. This represents the y-direction velocity output at time t-1, i.e., the target's lateral velocity updated at time t-1. Let x be the predicted x-direction position at time t, i.e., the predicted longitudinal position of the target at time t. Let be the time difference between time t and time t-1. This represents the x-direction position output at time t-1, i.e., the updated longitudinal position of the target at time t-1. Let be the predicted y-direction position at time t, i.e., the predicted lateral position of the target at time t. Let be the y-direction position output at time t-1, which is the updated horizontal position of the target at time t-1. It should be noted that the updated horizontal position of the target at time t-1 refers to the updated horizontal position of the target corresponding to the frame image acquired at time t-1. For the relationship between time and image in the interpretation of other symbols in the state transition equation, please refer to... The relevant statements will not be repeated here in the embodiments of the present invention.
[0069] In one possible implementation, it also includes:
[0070] Input the target second position corresponding to the current frame image into the Kalman filter model to perform estimation update to obtain an updated target speed.
[0071] Specifically, the output of the Kalman filter model further includes the updated target speed. The target second position corresponding to the current frame image is input into the Kalman filter model as an observation to perform state estimation update, and the updated state quantity of the Kalman filter model is the output of the target in the current frame image.
[0072] In a possible implementation, after the Kalman filter model is established, the method further includes:
[0073] If the target in the current frame image is not tracked, the Kalman filter model is initialized by using the target second position corresponding to the current frame image.
[0074] If the target in the current frame image is not tracked, the Kalman filter model is initialized by using the target second position corresponding to the current frame image, that is, the target second position corresponding to the current frame image is directly assigned to the state quantity of the Kalman filter model corresponding to the target, specifically, to the target second position in the state quantity.
[0075] If the target in the current frame image is tracked, the Kalman filter model predicts the target information in the current frame image or at the current time according to the historical information of the target, that is, the target position information and the target speed information in the current frame image or at the current time are predicted by using the output information of the Kalman filter model in the last frame or at the last time through the state transition equation. The predicted information is not the output information of the Kalman filter model, and needs to be updated in combination with the target second position corresponding to the current frame image to finally obtain the output information of the target in the current frame or at the current time, that is, the output information of the Kalman filter model.
[0076] The measurement of all targets in the current frame image can be completed through the above method steps, and the measurement of all targets in each frame image is implemented according to the above method.
[0077] In the embodiment of the application, the target second position is determined in combination with the prior width of the target, so that the accuracy of the target second position is improved. In addition, the Kalman filter model is used, the target speed is obtained in the filtering process through the historical data while the target second position is updated, the accuracy of the Kalman filter is improved, and the accuracy of the measurement result is improved.
[0078] The embodiment of the application further provides a multi-target ranging device, which includes:
[0079] An image acquisition module is configured to acquire images in front of the ego vehicle in real time through a camera on the ego vehicle, identify all targets in the images, and perform target tracking.
[0080] The first data processing module is configured to determine a target longitudinal distance corresponding to each frame of image according to the pixel coordinates of the target boundary corresponding to each frame of image, the pixel coordinates of the camera optical center, the camera focal length, the camera installation height and the camera pitch angle by using the pinhole imaging principle.
[0081] The second data processing module is configured to obtain a target lateral distance corresponding to each frame of image according to the target longitudinal distance corresponding to each frame of image, the pixel coordinates of the target boundary, the camera focal length and the pixel coordinates of the camera optical center; the target lateral distance is the lateral distance of the leftmost or rightmost side of the target.
[0082] The third data processing module is configured to establish a coordinate system with the camera position as the origin, determine a target first position based on the target lateral distance corresponding to each frame of image, the target longitudinal distance and the azimuth relationship between the target and the camera optical axis, and determine a target second position corresponding to each frame of image according to the target first position and a target prior width; the target second position is the center position of the target head or tail.
[0083] The model updating module is configured to establish a Kalman filter model, input the target second position corresponding to the current frame of image into the Kalman filter model, perform estimation updating, and obtain an updated target second position corresponding to the current frame of image.
[0084] In another embodiment provided by the present application, an electronic device is also provided, which includes a processor and a memory, and the memory stores at least one instruction or at least one program, and the at least one instruction or at least one program is loaded and executed by the processor to implement the multi-target ranging method provided in the embodiments of the present application.
[0085] In another embodiment provided by the present application, a computer readable storage medium is also provided, and the storage medium stores at least one instruction or at least one program, and the at least one instruction or at least one program is loaded and executed by a processor to implement the multi-target ranging method provided in the embodiments of the present application.
[0086] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto, any change or replacement within the technical scope disclosed by the present application should be covered in the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
Claims
1. A multi-target ranging method, characterized by, The method comprises the following steps: Real-time image acquisition in front of the ego vehicle through a camera on the ego vehicle, identification of all targets on the image, and target tracking; Determination of the longitudinal distance of each frame of image corresponding to the target according to the pixel coordinates of the target boundary, the pixel coordinates of the camera optical center, the camera focal length, the camera installation height, and the camera pitch angle of each frame of image corresponding to the target according to the principle of pinhole imaging; Obtaining the target lateral distance corresponding to each frame of image according to the target longitudinal distance corresponding to each frame of image, the pixel coordinates of the target boundary, the camera focal length, and the pixel coordinates of the camera optical center; the target lateral distance is the lateral distance of the leftmost or rightmost side of the target; Establishing a coordinate system with the camera position as the origin, determining the target first position based on the target lateral distance corresponding to each frame of image, the target longitudinal distance, and the azimuth relationship between the target and the camera optical axis, and determining the target second position corresponding to each frame of image according to the target first position and the target prior width; The target second position is the center position of the target head or tail; The determination of the target second position corresponding to each frame of image according to the target first position and the target prior width comprises: When the target is located on the left side of the camera optical axis, subtracting half of the target prior width from the lateral position of the target first position to obtain the target second position; When the target is located on the right side of the camera optical axis, adding half of the target prior width to the lateral position of the target first position to obtain the target second position; Establishing a Kalman filter model, inputting the target second position corresponding to the current frame of image into the Kalman filter model, performing estimation update, and obtaining the updated target second position corresponding to the current frame of image.
2. The multi-target ranging method of claim 1, wherein, The establishment of the Kalman filter model comprises: Establishing state quantities based on the target second position and the target speed; the target second position comprises a lateral position and a longitudinal position; the target speed comprises a lateral speed and a longitudinal speed; Constructing an observation quantity based on the target second position corresponding to each frame of image; Establishing a state transition equation.
3. The multi-target ranging method of claim 2, wherein, Further comprising: Inputting the target second position corresponding to the current frame of image into the Kalman filter model, performing estimation update, and obtaining the updated target speed.
4. The multi-target ranging method of claim 1, wherein, The identification of all targets on the image and the target tracking comprise: Obtaining the target box coordinates and target types of all targets on the image based on the YOLOv5 algorithm, and tracking the targets on the continuous frame images through the bytetrack algorithm.
5. The multi-target ranging method of claim 4, wherein, After the establishment of the Kalman filter model, further comprising: If the target in the current frame of image has not been tracked, initializing the Kalman filter model using the target second position corresponding to the current frame of image.
6. A multi-target ranging device, characterized by, The device comprises: An image acquisition module for real-time image acquisition in front of the ego vehicle through a camera on the ego vehicle, identification of all targets on the image, and target tracking; A first data processing module for determining the longitudinal distance of each frame of image corresponding to the target according to the pixel coordinates of the target boundary, the pixel coordinates of the camera optical center, the camera focal length, the camera installation height, and the camera pitch angle of each frame of image corresponding to the target according to the principle of pinhole imaging; The second data processing module is configured to obtain a target horizontal distance corresponding to each frame of image according to the target longitudinal distance corresponding to each frame of image, pixel coordinates of a target boundary, a camera focal length, and pixel coordinates of a camera optical center; the target horizontal distance is a horizontal distance of a leftmost or rightmost side of a target; The third data processing module is configured to establish a coordinate system with a camera position as an origin, determine a target first position based on the target horizontal distance corresponding to each frame of image, the target longitudinal distance, and a position relationship between the target and a camera optical axis, and determine a target second position corresponding to each frame of image according to the target first position and a target prior width; the target second position is a center position of a target head or tail; The target second position corresponding to each frame of image is determined according to the target first position and the target prior width, and includes: When the target is located on a left side of the camera optical axis, the target second position is obtained by subtracting half of the target prior width from a horizontal position of the target first position; When the target is located on a right side of the camera optical axis, the target second position is obtained by adding half of the target prior width to the horizontal position of the target first position; The model updating module is configured to establish a Kalman filtering model, input the target second position corresponding to a current frame of image into the Kalman filtering model, perform estimation updating, and obtain an updated target second position corresponding to the current frame of image.
7. An electronic device, comprising: The electronic device includes a processor and a memory, and the memory stores at least one instruction or at least one program; the at least one instruction or at least one program is loaded and executed by the processor to implement the multi-target ranging method according to any one of claims 1-5.
8. A computer-readable storage medium, characterized in that, The storage medium stores at least one instruction or at least one program; the at least one instruction or at least one program is loaded and executed by the processor to implement the multi-target ranging method according to any one of claims 1-5.
Citation Information
Patent Citations
Vehicle matching method and device, storage medium and electronic device
CN111862624A
Target tracking method based on monocular vision, terminal equipment and storage medium
CN114972427A