A vehicle tracking method and apparatus
By receiving and processing radar, positioning, and video data, the target tracking mode is determined and weighted summation is performed to generate control commands, thus solving the problem of poor vehicle tracking accuracy and achieving more accurate vehicle tracking and faster response speed.
Patent Information
- Application Number
- CN202310120368.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-01-18
- Publication Date
- 2025-11-28
- Estimated Expiration
- 2043-01-18
AI Technical Summary
Existing technologies have poor vehicle tracking accuracy, especially when there are many and complex types of monitoring data. It is difficult to achieve targeted tracking of various monitoring data, resulting in inaccurate vehicle tracking.
By receiving radar data, positioning data, and video data within the monitoring area of the PTZ camera, the target tracking mode is determined, and a weighted sum is performed based on the type and weight of the monitoring data to generate control commands to track the target vehicle.
It improves the accuracy of vehicle tracking, reduces motion fluctuations of the PTZ camera during the tracking process, and increases the response speed of the PTZ camera control.
Smart Images

Figure CN116206435B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of automatic tracking, in particular to a vehicle tracking method and device. BACKGROUND
[0002] With the continuous development of China's economy and the continuous improvement of living standards, the number of motor vehicles is increasing, and the number of emergency events in cities is also increasing. In order to ensure that special vehicles such as on-duty and rescue vehicles can reach the destination in time, special service functions are gradually promoted and used.
[0003] During the execution of the special service, not only the corresponding intersection signal control machine needs to be adjusted to ensure the passage of the vehicle, but also the real-time running state of the special service task is generally observed through the video equipment of the corresponding intersection.
[0004] However, during the execution of various special service tasks, the real-time running state of the monitored vehicle often changes and the monitoring data is complex and diverse, so it is difficult to achieve targeted tracking of various monitoring data, thereby causing poor vehicle tracking accuracy. SUMMARY
[0005] The present application provides a vehicle tracking method and device to solve the problem of poor vehicle tracking accuracy.
[0006] In a first aspect, the present application provides a vehicle tracking method applied to a server, comprising:
[0007] Receiving monitoring data of each vehicle in the monitoring area by a ball machine; wherein the monitoring data includes at least one type of data in radar data, positioning data and video data;
[0008] Determining a target tracking mode based on the type of monitoring data; wherein the target tracking mode is a non-video tracking mode or a video tracking mode;
[0009] If the target tracking mode is the non-video tracking mode, determining a target vehicle in the target vehicle group based on the monitoring data and the number of vehicles in the target vehicle group; performing weighted summation on the monitoring data of the target vehicle based on the preset weight of each type of monitoring data, and generating a control instruction based on the weighted summation monitoring data of the target vehicle;
[0010] The control instruction is sent to the ball machine to make the ball machine track the target vehicle.
[0011] Based on the above scheme, the corresponding target tracking mode is determined according to different types of monitoring data, and the weighted summation is performed on different types of monitoring data, so that the monitoring data is more accurate, and the accurate tracking of the target vehicle is facilitated.
[0012] In a possible implementation, if the target tracking mode is the non-video tracking mode, determining a target vehicle in the target vehicle group based on the monitoring data and the number of vehicles in the target vehicle group comprises:
[0013] If the target tracking mode is a radar tracking mode in the non-video tracking mode, matching feature information of a vehicle in the radar data, whose first distance from the ball machine is less than a first preset distance, with pre-stored vehicle feature information; sequentially sorting the vehicles according to the first distance from the ball machine of each vehicle that is successfully matched to obtain a first vehicle sequence, and taking a vehicle at a first preset position in the first vehicle sequence as the target vehicle.
[0014] If the target tracking mode is a positioning tracking mode in the non-video tracking mode, sequentially sorting the vehicles according to the second distance from the ball machine of each vehicle determined based on the positioning data to obtain a second vehicle sequence, and taking a vehicle at a second preset position in the second vehicle sequence as the target vehicle.
[0015] Based on the above scheme, for vehicles in the radar tracking mode, when the minimum distance in the first distance from the ball machine of each vehicle is less than the first preset distance, that is, the vehicle is within the monitoring range of the ball machine, the matching of the feature information of the vehicle is started, and when the vehicle group includes multiple vehicles, the vehicle at the first preset position is determined as the target vehicle according to the distance from the ball machine of the vehicle in this mode, to represent the action trajectory of the entire vehicle group.
[0016] For vehicles in the positioning tracking mode, when the vehicle group includes multiple vehicles, the vehicle at the second preset position is determined as the target vehicle according to the distance from the ball machine of the vehicle in this mode, to represent the action trajectory of the entire vehicle group.
[0017] In a possible implementation, the weighted sum of the monitoring data of the target vehicle based on the weights of each type of monitoring data comprises:
[0018] Based on the feature information of the target vehicle, determining the first distance from the ball machine of the target vehicle and the second distance from the ball machine of the target vehicle;
[0019] Based on the weights of each type of monitoring data, performing a weighted sum of the first distance from the ball machine of the target vehicle and the second distance from the ball machine of the target vehicle to obtain a standard distance from the ball machine of the target vehicle.
[0020] Since the first distance of the target vehicle to the ball machine and the second distance of the target vehicle to the ball machine are not the same due to different calculation methods of the tracking modes, based on this, more accurate distance data can be obtained by performing weighted sum processing on the first distance of the target vehicle to the ball machine and the second distance of the target vehicle to the ball machine, and thus the tracking of the target vehicle is more accurate.
[0021] In a possible implementation, the second distance is determined according to the positioning data by the following method:
[0022] According to the positioning longitude and the positioning latitude of each vehicle in the positioning data at the same time, and the longitude and the latitude of the ball machine, a positioning distance of each vehicle to the ball machine is determined.
[0023] If the number of vehicles whose positioning distances are greater than or equal to the second preset distance is greater than or equal to a preset threshold, the positioning distances of the same vehicle at multiple time points are averaged to obtain the second distance, wherein the time intervals of adjacent time points in the multiple time points are equal.
[0024] Based on the above scheme, the positioning distance of each vehicle to the ball machine can be calculated according to the positioning longitude and the positioning latitude of each vehicle and the longitude and the latitude of the ball machine. When the number of vehicles whose positioning distances are greater than or equal to the second preset distance is greater than or equal to the preset threshold, that is, when a preset number of vehicles enter the monitoring area of the ball machine, the demand for sampling and average calculation can be met, and more accurate distance data can be obtained by averaging the positioning distances of the same vehicle at multiple time points.
[0025] In a possible implementation, the control instruction is generated based on the weighted sum monitoring data of the target vehicle, including:
[0026] If the target tracking mode is the radar tracking mode, the control instruction is generated based on the speed of the target vehicle and the standard distance of the target vehicle to the ball machine in the radar data at the same time.
[0027] If the target tracking mode is the positioning tracking mode and the standard distance is less than the third preset distance, the speed of the target vehicle is determined based on the change amount of the standard distance of the target vehicle to the ball machine within a preset time, and the control instruction is generated based on the speed of the target vehicle and the standard distance of the target vehicle to the ball machine at the same time.
[0028] Based on the above scheme, for vehicles in the radar tracking mode, the ball machine is controlled to monitor the target vehicle based on the speed of the target vehicle and the standard distance of the target vehicle to the ball machine in the radar data at the same time.
[0029] Similarly, for the vehicle in the positioning tracking mode, the speed of the target vehicle can be calculated according to the variation of the standard distance within the preset time, and then the ball machine monitors the target vehicle based on the speed of the target vehicle at the same time and the third distance between the target vehicle and the ball machine.
[0030] In a possible implementation, after determining the target tracking mode based on the type of the monitoring data, the method further includes:
[0031] If the target tracking mode is the video tracking mode, the vehicle feature information of each vehicle is matched with the pre-stored vehicle feature information of the target vehicle to determine the target vehicle.
[0032] The speed of the target vehicle and the third distance between the target vehicle and the ball machine are determined based on the variation of the vehicle image area of the target vehicle and the variation of the distance between the vehicle and the picture boundary in the video data acquired continuously for multiple times, and the control instruction is generated based on the speed of the target vehicle at the same time and the third distance between the target vehicle and the ball machine.
[0033] The control instruction is sent to the ball machine to enable the ball machine to track the target vehicle.
[0034] Based on the above scheme, for the vehicle in the video tracking mode, the target vehicle is determined according to the feature information of the vehicle, such as the vehicle type and the license plate information, the third distance between the target vehicle and the ball machine is calculated based on the variation of the vehicle image area of the target vehicle and the variation of the distance between the vehicle and the picture boundary in the video data acquired continuously for multiple times, and the ball machine monitors the target vehicle.
[0035] In a second aspect, an embodiment of the present application provides a vehicle tracking device applied to a server, and the device includes:
[0036] A receiving module is configured to receive monitoring data of each vehicle in a monitoring area by a ball machine, wherein the monitoring data includes at least one type of data in radar data, positioning data and video data.
[0037] A first determining module is configured to determine a target tracking mode based on the type of the monitoring data, wherein the target tracking mode is a non-video tracking mode or a video tracking mode.
[0038] The first generation module is configured to: if the target tracking mode is the non-video tracking mode, determine a target vehicle in the target vehicle group based on the monitoring data and a number of vehicles in the target vehicle group; perform weighted summation on the monitoring data of the target vehicle based on preset weights of each type of monitoring data, and generate a control instruction based on the weighted summation monitoring data of the target vehicle.
[0039] The first control module is configured to send the control instruction to the ball machine, so that the ball machine tracks the target vehicle.
[0040] In a possible implementation, the first generation module is specifically configured to:
[0041] If the target tracking mode is a radar tracking mode in the non-video tracking mode, match feature information of a vehicle with a first distance less than a first preset distance from the ball machine in the radar data with pre-stored vehicle feature information; sequentially sort the vehicles according to the first distance from the ball machine of each vehicle that is matched successfully to obtain a first vehicle sequence, and take a vehicle at a first preset position in the first vehicle sequence as the target vehicle.
[0042] If the target tracking mode is a positioning tracking mode in the non-video tracking mode, sequentially sort the vehicles according to a second distance from the ball machine of each vehicle determined based on the positioning data to obtain a second vehicle sequence, and take a vehicle at a second preset position in the second vehicle sequence as the target vehicle.
[0043] In a possible implementation, the first generation module is specifically configured to:
[0044] Determine the first distance from the ball machine of the target vehicle and the second distance from the ball machine of the target vehicle based on the feature information of the target vehicle.
[0045] Perform weighted summation on the first distance from the ball machine of the target vehicle and the second distance from the ball machine of the target vehicle based on the weights of each type of monitoring data, to obtain a standard distance from the ball machine of the target vehicle.
[0046] In a possible implementation, the apparatus further includes a second generation module and a second control module, and the second generation module is configured to:
[0047] If the target tracking mode is a video tracking mode, match vehicle feature information of each vehicle with pre-stored vehicle feature information of the target vehicle to determine the target vehicle.
[0048] determine the third distance between the target vehicle and the ball camera based on the vehicle speed of the target vehicle and the third distance between the target vehicle and the ball camera at the same time, and generate the control instruction based on the vehicle speed of the target vehicle and the third distance between the target vehicle and the ball camera.
[0049] The second control module is configured to send the control instruction to the ball camera to make the ball camera track the target vehicle. BRIEF DESCRIPTION OF DRAWINGS
[0050] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed in the embodiments will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.
[0051] Figure 1 A flowchart of a vehicle tracking method provided by the embodiment of the present application is shown in the figure.
[0052] Figure 2 A specific flowchart of a radar tracking mode provided by the embodiment of the present application is shown in the figure.
[0053] Figure 3 A specific flowchart of a positioning tracking mode provided by the embodiment of the present application is shown in the figure.
[0054] Figure 4 A specific flowchart of a video tracking mode provided by the embodiment of the present application is shown in the figure.
[0055] Figure 5 A flowchart of a control instruction generation method provided by the embodiment of the present application is shown in the figure.
[0056] Figure 6 A ball camera monitoring diagram provided by the embodiment of the present application is shown in the figure.
[0057] Figure 7 A structure diagram of a vehicle tracking device provided by the embodiment of the present application is shown in the figure.
[0058] Figure 8 A structure diagram of a vehicle tracking device provided by the embodiment of the present application is shown in the figure. DETAILED DESCRIPTION
[0059] In order to make the objects, technical solutions and advantages of the present application clearer, the following further describes the present application in detail with reference to the accompanying drawings. Obviously, the described embodiments are only a part of, rather than all of, the embodiments of the present application. Based upon the embodiments in the present application, all other embodiments obtained by those ordinarily skilled in the art without creative effort belong to the scope of the present application.
[0060] At present, along with the increasing number of motor vehicles, the emergency events in cities are also increasing. In order to ensure that the special vehicles such as on-duty vehicles and rescue vehicles can reach the destination in time, the special service function is gradually promoted and applied.
[0061] In the process of performing the special service, not only the corresponding intersection signal control machine needs to be adjusted to ensure the passage of the vehicle, but also the real-time running state of the special service task is generally observed through the video equipment of the corresponding intersection. However, due to the different positioning devices equipped in the vehicle and the different ways of obtaining vehicle information by the video equipment, the types of monitoring data are complex, which leads to the fact that a single tracking mode cannot handle diversified data. For example, if the data source comes from the radar configured by the target vehicle itself, when the target vehicle does not configure the millimeter wave radar, the server cannot control and track according to the radar data. Due to the limitations of the vehicle positioning device or the way of obtaining vehicle information by the video equipment, the vehicle in the on-duty task cannot be tracked in a targeted manner.
[0062] In addition, due to the limitations of the monitoring method itself, the monitoring data inevitably have limitations, which leads to the fact that the tracking accuracy of the server is poor in the process of processing data for tracking, and the target is easily lost. For example, when the number of multi-target radar data changes, the time length center point will instantaneously deflect greatly, which leads to sudden fluctuations in the tracking of the ball machine, and thus the ball machine cannot accurately control the tracking of the target vehicle.
[0063] Based on the above problems, the embodiment of the present application provides a vehicle tracking method to solve the problem of poor vehicle tracking accuracy.
[0064] The vehicle tracking method provided by the example embodiments of the present application will be described below with reference to the application scenarios described above and the accompanying drawings. It should be noted that the above application scenarios are only shown to facilitate understanding of the spirit and principles of the present application, and the embodiments of the present application are not limited in this respect.
[0065] As shown in Figure 1 Fig. 1 is a flowchart of a vehicle tracking method provided by an embodiment of the present application. The method is applied to a server and includes the following steps.
[0066] S101, receiving monitoring data of each vehicle in a monitoring area by a ball machine.
[0067] It should be noted that the monitoring data includes at least one type of data in radar data, positioning data and video data.
[0068] In a possible embodiment, the radar data can be radar video data, and the server receives a set of radar video data S1 n = {d i , v i , plate i , type i};
[0069] Wherein S1 n represents the nth set of radar data received by the server, d i represents the straight-line distance between the monitoring vehicle and the ball machine, i.e. the first distance, v i represents the driving speed of the monitoring vehicle at the monitoring time, plate i represents the license plate information of the monitoring vehicle, type i represents the vehicle type of the monitoring vehicle, and i represents the radar data of the monitoring vehicle i.
[0070] In a possible embodiment, the server receives a set of positioning data S2 n = {lon i , lat i};
[0071] Wherein S2 n represents the nth set of positioning data received by the server, lon i is the longitude of the monitoring vehicle, lat i is the latitude of the monitoring vehicle, and i represents the positioning data of the monitoring vehicle i.
[0072] In a possible embodiment, the server receives a set of video data S3 n = {plate i , type i , y t , y b , x l , x r , S};
[0073] Wherein S3 n represents the nth set of video data received by the server, plate i represents the license plate information of the monitoring vehicle, type i represents the vehicle type of the monitoring vehicle, y t represents the distance between the monitoring vehicle and the upper boundary of the picture, y b represents the distance between the monitoring vehicle and the lower boundary of the picture, x l represents the distance between the monitoring vehicle and the left boundary of the picture, and x rS represents the distance between the monitored vehicle and the right edge of the image, and S represents the area of the monitored vehicle's image.
[0074] S102, Determine the target tracking mode based on the type of monitoring data.
[0075] It should be noted that the target tracking mode is either a non-video tracking mode or a video tracking mode. Furthermore, based on radar data, the corresponding target tracking mode can be determined to be the radar tracking mode within the non-video tracking mode; based on positioning data, the corresponding target tracking mode can be determined to be the positioning tracking mode within the non-video tracking mode; and based on video data, the corresponding target tracking mode can be determined to be the video tracking mode.
[0076] S103, if the target tracking mode is non-video tracking mode, then the target vehicle is identified in the target convoy based on the monitoring data and the number of vehicles in the target convoy.
[0077] S104, based on the preset weights of various types of monitoring data, performs weighted summation on the monitoring data of the target vehicle, and generates control commands based on the weighted summation of the monitoring data of the target vehicle.
[0078] S105 sends control commands to the PTZ camera to enable it to track the target vehicle.
[0079] This invention discloses a vehicle tracking method. The method first receives monitoring data from a PTZ camera on various vehicles within a monitoring area. The monitoring data includes at least one type of data: radar data, positioning data, and video data. Then, based on the type of monitoring data, a target tracking mode is determined. This target tracking mode can be either a non-video tracking mode or a video tracking mode. If the target tracking mode is a non-video tracking mode, the target vehicle is determined based on the monitoring data and the number of vehicles in the target convoy. Based on preset weights for each type of monitoring data, the monitoring data of the target vehicle is weighted and summed. A control command is generated based on the weighted summed monitoring data of the target vehicle, and finally, the control command is issued to track the target vehicle. This invention can determine the corresponding tracking mode according to different types of monitoring data, expanding the applicability of tracking. Furthermore, the weighted summation processing of the data makes vehicle tracking more accurate. Based on this, accurate tracking reduces the fluctuation of the PTZ camera's movement during tracking, improving the PTZ camera's control response speed.
[0080] The above vehicle tracking method will be explained in detail below:
[0081] Regarding the aforementioned radar tracking modes, such as Figure 2 The diagram shown illustrates a specific process of a radar tracking mode according to an embodiment of the present invention. The method includes:
[0082] S201 receives monitoring data from the PTZ camera for each vehicle within the monitoring area.
[0083] It should be noted that the monitoring area in this invention refers to the monitoring area of monitoring equipment such as PTZ cameras. For example, in the scenario of performing special operations, monitoring points can be divided according to the route to be monitored, and monitoring equipment such as PTZ cameras can be configured at each monitoring point so that each monitoring area can cover the entire route to be monitored. In addition, after the PTZ cameras in this monitoring area have completed monitoring of the target convoy, the controller can determine the next monitoring area that the target convoy will pass through based on the monitoring data when the target convoy leaves the monitoring area, and can perform parameter initialization processing on the PTZ cameras and other monitoring equipment in the next monitoring area.
[0084] In addition, when a vehicle enters the monitoring area, the monitoring equipment in the adjacent monitoring area can be initialized simultaneously so that monitoring equipment such as PTZ cameras can perform data monitoring.
[0085] S202, Determine the target tracking mode based on the type of monitoring data.
[0086] Based on the content of the radar data, the server determines the target tracking mode to be radar tracking mode.
[0087] S203, determine whether the minimum distance in the first distance between each vehicle and the PTZ camera in the radar data is less than the first preset distance. If yes, execute S204; otherwise, execute S201.
[0088] It should be noted that if the minimum distance between the vehicle and the PTZ camera in the radar data is less than the first preset distance, it is determined that a vehicle has entered the PTZ camera's monitoring range. Then, the feature information of the vehicle that has entered the PTZ camera's monitoring range can be matched. For example, if the first preset distance is 1km, and vehicle A is 800m away from the PTZ camera, then it is determined that vehicle A has entered the PTZ camera's monitoring range.
[0089] S204, match the feature information of vehicles whose first distance is less than the first preset distance with the pre-stored vehicle feature information, sort the vehicles according to the first distance of each successfully matched vehicle from the PTZ camera to obtain the first vehicle sequence, and take the vehicle at the first preset position in the first vehicle sequence as the target vehicle.
[0090] It should be noted that if the target convoy contains only one vehicle, then that vehicle is the target vehicle, and this will not be repeated in the following text.
[0091] In one possible embodiment, the first preset position can be the center position in the first vehicle sequence. For example, if there are n vehicles in the first vehicle sequence, and n is an even number, then the nth vehicle in the first vehicle sequence is determined to be the center position. The or the first The first vehicle in the first vehicle sequence is determined as the target vehicle if n is even, and the target vehicle is determined as the target vehicle if n is odd. The first vehicle in the first vehicle sequence is determined as the target vehicle if n is even, and the target vehicle is determined as the target vehicle if n is odd.
[0092] S205, based on the weights of the preset radar data and positioning data, performing weighted summation on the monitoring data of the target vehicle, and generating a control instruction based on the weighted summation monitoring data of the target vehicle, and issuing the control instruction to the ball machine to make the ball machine track the target vehicle.
[0093] In a possible embodiment, the weighted summation can be performed in the following manner, and repeated parts are not described herein again:
[0094] After determining the target vehicle, based on the characteristic information of the target vehicle, the first distance between the target vehicle and the ball machine and the second distance between the target vehicle and the ball machine are determined.
[0095] In a possible embodiment, the second distance can be determined in the following manner, and repeated parts are not described herein again:
[0096] According to the positioning longitude and the positioning latitude of each vehicle at the same time in the positioning data, and the longitude and the latitude of the ball machine, the positioning distance between each vehicle and the ball machine is determined.
[0097] If the number of vehicles whose positioning distance is greater than or equal to the second preset distance is greater than or equal to a preset threshold, the positioning distances of the same vehicle at multiple time points are averaged to obtain the second distance, wherein the time intervals of adjacent time points in the multiple time points are equal.
[0098] It should be noted that, since the positioning data may be offset during the monitoring process, the data needs to be processed. According to the reporting frequency of the positioning data, a preset sliding window can be used to perform mean filtering calculation on the data in the window, that is, the positioning distances of the same vehicle at multiple time points are averaged to obtain the second distance.
[0099] After determining the first distance between the target vehicle and the ball machine and the second distance between the target vehicle and the ball machine, the first distance between the target vehicle and the ball machine and the second distance between the target vehicle and the ball machine are weighted and summed based on the weights of each type of monitoring data to obtain the standard distance between the target vehicle and the ball machine.
[0100] For example, the server first processes the monitoring data as positioning data, thereby triggering the positioning tracking mode, and meanwhile, the radar equipment is configured in the monitoring area, thereby receiving the radar data after receiving the positioning data. Therefore, the first distance d1 can be calculated according to the radar data, the second distance d2 can be calculated according to the positioning data, and the standard distance of the target vehicle from the ball machine can be set as d = a * d1 + b * d2, wherein a is the weight parameter of the radar data, b is the weight parameter of the positioning data, and the specific values of the weight parameters can be set by the user according to the requirements.
[0101] For the above positioning tracking mode, as shown in Figure 3 , a specific flowchart of a positioning tracking mode provided by the embodiment of the application is shown, and the method comprises the following steps:
[0102] S301, receiving the monitoring data of each vehicle in the monitoring area by the ball machine.
[0103] S302, determining the target tracking mode based on the type of the monitoring data.
[0104] The server determines the target tracking mode as the positioning tracking mode according to the data content of the positioning data.
[0105] S303, sequentially sorting the vehicles based on the second distances of the vehicles from the ball machine determined according to the positioning data to obtain a second vehicle sequence, and taking the vehicle at a second preset position in the second vehicle sequence as the target vehicle.
[0106] In a possible embodiment, the second preset position can be the middle position in the second vehicle sequence. For example, if there are n vehicles in the second vehicle sequence, if n is even, the first or the first vehicle in the second vehicle sequence is determined as the target vehicle; if n is odd, the first vehicle in the second vehicle sequence is determined as the target vehicle.
[0107] S304, performing weighted summation on the monitoring data of the target vehicle based on the preset weights of the radar data and the positioning data, and generating a control instruction based on the weighted summation monitoring data of the target vehicle, and issuing the control instruction to the ball machine to make the ball machine track the target vehicle.
[0108] For the above video tracking mode, as shown in Figure 4 , a specific flowchart of a video tracking mode provided by the embodiment of the application is shown, and the method comprises the following steps:
[0109] S401, receiving the monitoring data of each vehicle in the monitoring area by the ball machine.
[0110] S402, determining the target tracking mode based on the type of the monitoring data.
[0111] The server determines the target tracking mode as the video tracking mode according to the data content of the video data.
[0112] S403, vehicle feature information of each vehicle is matched with pre-stored vehicle feature information of the target vehicle, and the target vehicle is determined.
[0113] S404, based on the change amount of the vehicle image area of the target vehicle in the video data obtained continuously for multiple times and the change amount of the distance between the vehicle and the picture boundary, the speed of the target vehicle and the third distance between the target vehicle and the ball machine are determined.
[0114] In a possible embodiment, the third distance can be determined in the following manner:
[0115] For the same monitored vehicle, video data S31={plate1, type1, y t ,y b ,x l ,x r ,S} at the first time is obtained, then video data S31'={plate1, type1, y t ′,y b ′,x l ′,x r ′,S'} at the second time is obtained, and the third distance is determined according to the change amount of y t ,y b ,x l ,x r at the first time and the second time and the preset conversion ratio.
[0116] S405, based on the speed of the target vehicle at the same time and the third distance between the target vehicle and the ball machine, a control instruction is generated, and the control instruction is issued to the ball machine to make the ball machine track the target vehicle.
[0117] In a possible embodiment, the vehicle speed can be determined in the following manner:
[0118] For the same monitored vehicle, video data S31={plate1, type1, y t ,y b ,x l ,x r ,S} at the first time is obtained, then video data S31'={plate1, type1, y t ′,y b ′,x l ′,x rThe vehicle speed is determined based on the changes in video data at the first and second moments and a pre-set conversion ratio.
[0119] The control command generation process will be explained below, taking into account the vehicle tracking method and monitoring data:
[0120] like Figure 5 The diagram shown is a flowchart illustrating a method for generating control instructions according to an embodiment of the present invention. The method includes:
[0121] S501, obtain the PTZ camera's initial parameters M.
[0122] In one possible embodiment, the initial parameters of the PTZ camera are M = {pan, tile, zoom};
[0123] Where pan represents the starting azimuth angle of the PTZ camera, tile represents the starting pitch angle of the PTZ camera, and zoom represents the starting zoom magnification of the PTZ camera.
[0124] S502 determines the target parameters of the PTZ camera based on the target tracking mode and the received monitoring data.
[0125] For the radar tracking mode described above, the target parameter N1 of the PTZ camera can be determined using the following method:
[0126] In one possible embodiment, the PTZ camera target parameter N1 = {pan′,tile′,zoom′};
[0127] Where pan′ represents the azimuth angle of the PTZ camera target, tile′ represents the pitch angle of the PTZ camera target, and zoom′ represents the zoom magnification of the PTZ camera target. Repeated references will not be repeated below.
[0128] Furthermore, the present invention can identify vehicles by comparing vehicle feature information and determine the target azimuth angle of the PTZ camera.
[0129] Furthermore, the present invention can calculate the target pitch angle of the PTZ camera based on the installation height of the PTZ camera and the coordinates of the monitoring vehicle, for example, as... Figure 6 The diagram shown illustrates a PTZ camera monitoring system according to an embodiment of the present invention. The PTZ camera is installed at a height of h, and the position of the monitored vehicle on the lower x-axis of the PTZ camera's Cartesian coordinate system is l0. The vehicle coordinate value l0 can be derived from the {d} in the radar data of the monitored vehicle. i ,v i The pitch angle is obtained through a second interpolation calculation, therefore the PTZ camera monitors the pitch angle.
[0130] Furthermore, the present invention can be based on v i The changes are used to calculate the zoom ratio of the PTZ camera and the rotation angle of the pan-tilt unit supporting the PTZ camera.
[0131] Further, the application can calculate the zooming multiple change amount and the pan-tilt rotation angle change amount according to the ball machine starting parameters and the ball machine target parameters, and determine the zooming speed and the pan-tilt rotation speed according to the zooming multiple change amount, the pan-tilt rotation angle change amount, and the preset adjustment time. Repetitive parts are not described below.
[0132] Further, when the first distance d i of the target vehicle from the ball machine is less than a set value, i.e., the target vehicle passes through the first monitoring area of the ball machine, the server controls the ball machine to switch to a preset direction, so that the ball machine continues to track the target vehicle. The first monitoring area is a part of the monitoring area of the ball machine. For example, the monitoring radius of the ball machine is 100 m, the first distance d i of the target vehicle from the ball machine is 90 m, which is less than the monitoring radius 100 m of the ball machine. At this time, the server controls the ball machine to automatically switch to the opposite direction, and then observes the target vehicle until it leaves the monitoring area.
[0133] For the above positioning tracking mode, the ball machine target parameters N2 can be determined by the following method:
[0134] In one possible embodiment, the ball machine starting parameters N2 = {pan', tile', zoom'}.
[0135] Further, the application can determine the position a of the target vehicle at the first time, the position b of the target vehicle at the second time, and the position c of the target vehicle at the third time according to the positioning data of the target vehicle at the first time, the positioning data of the target vehicle at the second time, and the positioning data of the target vehicle at the third time, respectively. The first time is earlier than the second time, and the second time is earlier than the third time.
[0136] Further, the application can determine the vehicle speed v of the target vehicle according to the change amount of the standard distance between the target vehicle and the ball machine within a preset time.
[0137] For example, the vehicle speed v of the target vehicle can be calculated according to the positioning data reporting frequency f. Assuming that the positioning data reporting frequency f is twice per second, the time interval between adjacent two data reporting is one second, i.e., the change amount of the standard distance calculated according to the positioning data received by the adjacent two times, and the interval time one second of the positioning data received by the adjacent two times, can be used to determine the vehicle speed v of the target vehicle.
[0138] Further, the application can calculate the zooming multiple and the pan-tilt rotation angle according to the position a of the target vehicle at the first time, the position b of the target vehicle at the second time, the position c of the target vehicle at the third time, and the vehicle speed v of the target vehicle.
[0139] For example, based on the positioning data of the target vehicle at the first time, the positioning data of the target vehicle at the second time and the positioning data of the target vehicle at the third time, the position a of the target vehicle at the first time, the position b of the target vehicle at the second time and the position c of the target vehicle at the third time are determined respectively, the modulus s of the vector , the cosine of the angle of the vector and the vector is calculated, and the speed v of the target vehicle is calculated according to the reporting frequency of the positioning data. According to {s, v}, the zooming multiple of the spherical machine and the rotation angle of the holder are calculated, and then based on the variation of the zooming multiple of the spherical machine, the variation of the rotation angle of the holder and the preset adjustment time, the zooming speed of the spherical machine and the rotation speed of the holder are determined.
[0140] Further, based on the positioning data obtained by the target vehicle for three times in succession, the positions of the target vehicle are determined respectively, the cosine of the angle is calculated according to the positions of the target vehicle, and when the negative calculation result of the cosine of the angle exceeds the preset number of times, it is determined that the target vehicle passes through the first monitoring area of the spherical machine, and the spherical machine is controlled to switch to the preset direction so as to continue tracking the target vehicle.
[0141] For the above-mentioned video tracking mode, the spherical machine target parameter N3 can be determined by the following method:
[0142] In a possible embodiment, the spherical machine target parameter N3 = {pan', tile', zoom'}.
[0143] Further, the present application can determine the target zooming multiple of the spherical machine according to the variation of the video data of the same monitoring vehicle at two different times. For example, the video data S31 of the same monitoring vehicle at the first time = {plate1, type1, y t ,y b ,x l ,x r , S}, and then the video data S31' of the same monitoring vehicle at the second time = {plate1, type1, y t ', y b ', x l ', x r ', S'} is obtained, and the target zooming multiple of the spherical machine is calculated by S ′ -S, that is, the variation of the vehicle image area of the monitoring vehicle. According to the variation trend of the corresponding parameters at adjacent times, the video position where the target vehicle will appear at the next time is determined, and the tracking state of the spherical machine is adjusted according to the actual value feedback at the next time.
[0144] Further, when the zooming multiple of the ball machine has been reduced to the preset zooming value, and the ball machine cannot track the target vehicle at the maximum rotating speed of the holder, it is determined that the target vehicle passes through the first monitoring area of the ball machine, and the ball machine is controlled to switch to the preset direction, so that the ball machine continues to track the target vehicle.
[0145] For example, when the zooming multiple of the ball machine has been reduced to the minimum zooming value, and the ball machine cannot track the target vehicle at the maximum rotating speed of the holder, it is determined that the target vehicle passes through the first monitoring area of the ball machine.
[0146] S503, generating a control instruction based on the starting parameters of the ball machine and the target parameters of the ball machine.
[0147] Based on the same inventive concept, the embodiments of the present application also provide a vehicle tracking device applied to a server, such as Figure 7 As shown in a structural schematic diagram of a vehicle tracking device, the device comprises a receiving module 701, a first determining module 702, a first generating module 703, and a first control module 704:
[0148] The receiving module 701 is configured to receive monitoring data of each vehicle in the monitoring area by the ball machine; wherein the monitoring data comprises at least one type of data in radar data, positioning data, and video data;
[0149] The first determining module 702 is configured to determine a target tracking mode based on the type of the monitoring data; wherein the target tracking mode is a non-video tracking mode or a video tracking mode;
[0150] The first generating module 703 is configured to, if the target tracking mode is the non-video tracking mode, determine a target vehicle in the target vehicle group based on the monitoring data and the number of vehicles in the target vehicle group; perform weighted summation on the monitoring data of the target vehicle based on preset weights of each type of monitoring data, and generate a control instruction based on the weighted summation monitoring data of the target vehicle;
[0151] The first control module 704 is configured to issue the control instruction to the ball machine, so that the ball machine tracks the target vehicle.
[0152] In a possible embodiment, the first generating module 703 is specifically configured to:
[0153] If the target tracking mode is a radar tracking mode in the non-video tracking mode, the characteristic information of the vehicle with a first distance less than a first preset distance from the ball machine in the radar data is matched with the pre-stored vehicle characteristic information; each vehicle with a matching success is sorted according to the first distance from the ball machine to obtain a first vehicle sequence, and the vehicle at the first preset position in the first vehicle sequence is taken as the target vehicle.
[0154] If the target tracking mode is the positioning tracking mode in the non-video tracking mode, the vehicles are sequentially sorted based on the second distances between the vehicles and the ball machine determined according to the positioning data to obtain a second vehicle sequence, and a vehicle at a second preset position in the second vehicle sequence is taken as the target vehicle.
[0155] In a possible embodiment, the first generating module 703 is specifically configured to:
[0156] determine the first distance between the target vehicle and the ball machine and the second distance between the target vehicle and the ball machine based on the feature information of the target vehicle;
[0157] perform weighted summation on the first distance between the target vehicle and the ball machine and the second distance between the target vehicle and the ball machine based on the weights of the types of monitoring data to obtain a standard distance between the target vehicle and the ball machine.
[0158] In a possible embodiment, as shown in Figure 7 the apparatus further includes a second generating module 705 and a second control module 706, the second generating module 705 is configured to:
[0159] If the target tracking mode is the video tracking mode, the vehicle feature information of each vehicle is matched with the pre-stored vehicle feature information of the target vehicle to determine the target vehicle.
[0160] based on the change amount of the vehicle image area of the target vehicle and the change amount of the distance between the vehicle and the picture boundary in the video data acquired for multiple times in succession, determine the speed of the target vehicle and the third distance between the target vehicle and the ball machine, and generate the control instruction based on the speed of the target vehicle and the third distance between the target vehicle and the ball machine at the same time.
[0161] The second control module 706 is configured to issue the control instruction to the ball machine to enable the ball machine to track the target vehicle.
[0162] Based on the same inventive concept, the present application further provides a vehicle tracking device, as shown in Figure 8 a structural schematic diagram of a vehicle tracking device provided by an embodiment of the present application, the device includes a processor 801 and a memory 802, wherein the memory 802 stores program code, the processor 801 can execute the program code stored in the memory 802, and the implementation of the device can refer to the implementation of the vehicle tracking method described above, and details are not repeated.
[0163] The computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart block or blocks. Figure 1 one or more flowcharts and / or blocks Figure 1 means for functionally implementing the steps listed in the flowchart
[0164] The computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart block or blocks. Figure 1 one or more flowcharts and / or blocks Figure 1 means for functionally implementing the steps listed in the flowchart
[0165] The computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart block or blocks. Figure 1 one or more flowcharts and / or blocks Figure 1 means for functionally implementing the steps listed in the flowchart
[0166] Obviously, numerous modifications and variations of the present application are possible in light of the above teachings. It is therefore to be understood that within the scope of the appended claims and their equivalents, the application can be practiced otherwise than as specifically described.
Claims
1. A vehicle tracking method, characterized in that, Applied to a server, the method includes: The system receives monitoring data from a PTZ camera on various vehicles within the monitoring area; wherein the monitoring data includes at least one type of data selected from radar data, positioning data, and video data. Based on the type of the monitoring data, a target tracking mode is determined; wherein the target tracking mode is a non-video tracking mode or a video tracking mode; wherein, based on the radar data, the corresponding target tracking mode is determined to be the radar tracking mode among the non-video tracking modes; based on the positioning data, the corresponding target tracking mode is determined to be the positioning tracking mode among the non-video tracking modes; based on the video data, the corresponding target tracking mode is determined to be the video tracking mode. If the target tracking mode is the non-video tracking mode, then the target vehicle is determined in the target fleet based on the monitoring data and the number of vehicles in the target fleet; Wherein, if the target tracking mode is the radar tracking mode, the feature information of vehicles whose first distance from the PTZ camera is less than a first preset distance in the radar data is matched with the pre-stored vehicle feature information; the vehicles are sorted according to the first distance of each successfully matched vehicle from the PTZ camera to obtain a vehicle sequence, and the vehicle in the middle position of the vehicle sequence is taken as the target vehicle. If the target tracking mode is the positioning tracking mode, then the vehicles are sorted sequentially based on the second distance between each vehicle and the PTZ camera determined according to the positioning data to obtain a vehicle sequence, and the vehicle in the middle position of the vehicle sequence is taken as the target vehicle. Based on the preset weights of various types of monitoring data, the monitoring data of the target vehicle is weighted and summed, and control commands are generated based on the weighted and summed monitoring data of the target vehicle. The control command is sent to the PTZ camera to enable the PTZ camera to track the target vehicle.
2. The method as described in claim 1, characterized in that, The weighted summation of the monitoring data of the target vehicle based on preset weights for each type of monitoring data includes: Based on the feature information of the target vehicle, a first distance between the target vehicle and the PTZ camera and a second distance between the target vehicle and the PTZ camera are determined; Based on the weights of each type of monitoring data, the first distance between the target vehicle and the PTZ camera and the second distance between the target vehicle and the PTZ camera are weighted and summed to obtain the standard distance between the target vehicle and the PTZ camera.
3. The method as described in claim 2, characterized in that, The second distance is determined based on the positioning data using the following method: Based on the positioning longitude and latitude of each vehicle at the same moment in the positioning data, as well as the longitude and latitude of the PTZ camera, the positioning distance between each vehicle and the PTZ camera is determined. If the number of vehicles whose positioning distance is greater than or equal to the second preset distance is greater than or equal to the preset threshold, then the average positioning distance of the same vehicle at multiple times is calculated to obtain the second distance; wherein the time interval between adjacent times in the multiple times is equal.
4. The method as described in claim 2, characterized in that, The generation of control commands based on the weighted summation of the monitoring data of the target vehicle includes: If the target tracking mode is the radar tracking mode, then the control command is generated based on the target vehicle's speed and the standard distance between the target vehicle and the PTZ camera in the radar data at the same time. If the target tracking mode is the positioning tracking mode and the standard distance is less than the third preset distance, then the speed of the target vehicle is determined based on the change in the standard distance between the target vehicle and the PTZ camera within a preset time, and the control command is generated based on the speed of the target vehicle and the standard distance between the target vehicle and the PTZ camera at the same time.
5. The method according to any one of claims 1 to 4, characterized in that, After determining the target tracking mode based on the type of the monitoring data, the method further includes: If the target tracking mode is a video tracking mode, then the vehicle feature information of each vehicle is matched with the pre-stored vehicle feature information of the target vehicle to determine the target vehicle. Based on the changes in the vehicle image area of the target vehicle and the changes in the distance between the vehicle and the edge of the frame in the video data acquired multiple times in succession, the speed of the target vehicle and the third distance between the target vehicle and the PTZ camera are determined, and the control command is generated based on the speed of the target vehicle and the third distance between the target vehicle and the PTZ camera at the same time. The control command is sent to the PTZ camera to enable the PTZ camera to track the target vehicle.
6. A vehicle tracking device, characterized in that, Applied to a server, the device includes: The receiving module is used to receive monitoring data of various vehicles within the monitoring area from the PTZ camera; wherein the monitoring data includes at least one type of data selected from radar data, positioning data, and video data. The first determining module is configured to determine a target tracking mode based on the type of the monitoring data; wherein the target tracking mode is a non-video tracking mode or a video tracking mode; wherein, based on the radar data, the corresponding target tracking mode is determined to be a radar tracking mode among the non-video tracking modes; based on the positioning data, the corresponding target tracking mode is determined to be a positioning tracking mode among the non-video tracking modes; and based on the video data, the corresponding target tracking mode is determined to be the video tracking mode. The first generation module is used to: if the target tracking mode is the non-video tracking mode, determine the target vehicle in the target convoy based on the monitoring data and the number of vehicles in the target convoy; if the target tracking mode is the radar tracking mode, match the feature information of vehicles whose first distance from the PTZ camera is less than a first preset distance in the radar data with pre-stored vehicle feature information; sort the vehicles according to the first distance of each successfully matched vehicle from the PTZ camera to obtain a vehicle sequence, and take the vehicle in the middle position of the vehicle sequence as the target vehicle; If the target tracking mode is the positioning tracking mode, then the vehicles are sorted sequentially based on the second distance between each vehicle and the PTZ camera determined according to the positioning data to obtain a vehicle sequence, and the vehicle in the middle position of the vehicle sequence is taken as the target vehicle; based on the preset weights of each type of monitoring data, the monitoring data of the target vehicle is weighted and summed, and a control command is generated based on the weighted and summed monitoring data of the target vehicle. The first control module is used to issue control commands to the PTZ camera so that the PTZ camera tracks the target vehicle.
7. The apparatus as claimed in claim 6, characterized in that, The first generation module is specifically used for: Based on the feature information of the target vehicle, a first distance between the target vehicle and the PTZ camera and a second distance between the target vehicle and the PTZ camera are determined; Based on the weights of each type of monitoring data, the first distance between the target vehicle and the PTZ camera and the second distance between the target vehicle and the PTZ camera are weighted and summed to obtain the standard distance between the target vehicle and the PTZ camera.
8. The apparatus as described in any one of claims 6-7, characterized in that, The device further includes a second generation module and a second control module, the second generation module being used for: If the target tracking mode is a video tracking mode, then the vehicle feature information of each vehicle is matched with the pre-stored vehicle feature information of the target vehicle to determine the target vehicle. Based on the changes in the vehicle image area of the target vehicle and the changes in the distance between the vehicle and the edge of the frame in the video data acquired multiple times in succession, the speed of the target vehicle and the third distance between the target vehicle and the PTZ camera are determined, and the control command is generated based on the speed of the target vehicle and the third distance between the target vehicle and the PTZ camera at the same time. The second control module is used to issue control commands to the PTZ camera so that the PTZ camera tracks the target vehicle.
Citation Information
Patent Citations
Alarm method, system and device, equipment and storage medium
CN112489338A
PTZ camera, and tracking control method, device and equipment for PTZ camera
CN114268732A
Roadside sensing method integrating millimeter wave radar and camera
CN114280611A
Photoelectric automatic alternating target tracking method
CN114879181A