CN111260929B - Vehicle tracking abnormity detection method and device - Google Patents

Vehicle tracking abnormity detection method and device Download PDF

Info

Publication number
CN111260929B
CN111260929B CN201811457872.5A CN201811457872A CN111260929B CN 111260929 B CN111260929 B CN 111260929B CN 201811457872 A CN201811457872 A CN 201811457872A CN 111260929 B CN111260929 B CN 111260929B
Authority
CN
China
Prior art keywords
image frame
vehicle
tracking
time
time data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201811457872.5A
Other languages
Chinese (zh)
Other versions
CN111260929A (en
Inventor
雷红涛
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Xi'an Yu Vision Mdt Infotech Ltd
Original Assignee
Xi'an Yu Vision Mdt Infotech Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Xi'an Yu Vision Mdt Infotech Ltd filed Critical Xi'an Yu Vision Mdt Infotech Ltd
Priority to CN201811457872.5A priority Critical patent/CN111260929B/en
Publication of CN111260929A publication Critical patent/CN111260929A/en
Application granted granted Critical
Publication of CN111260929B publication Critical patent/CN111260929B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G08SIGNALLING
    • G08GTRAFFIC CONTROL SYSTEMS
    • G08G1/00Traffic control systems for road vehicles
    • G08G1/01Detecting movement of traffic to be counted or controlled
    • G08G1/017Detecting movement of traffic to be counted or controlled identifying vehicles
    • G08G1/0175Detecting movement of traffic to be counted or controlled identifying vehicles by photographing vehicles, e.g. when violating traffic rules
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/50Context or environment of the image
    • G06V20/56Context or environment of the image exterior to a vehicle by using sensors mounted on the vehicle
    • G06V20/58Recognition of moving objects or obstacles, e.g. vehicles or pedestrians; Recognition of traffic objects, e.g. traffic signs, traffic lights or roads
    • G06V20/584Recognition of moving objects or obstacles, e.g. vehicles or pedestrians; Recognition of traffic objects, e.g. traffic signs, traffic lights or roads of vehicle lights or traffic lights

Abstract

The embodiment of the application provides a vehicle tracking abnormity detection method and device, and relates to the technical field of vehicle monitoring. The method and the device process a first image frame corresponding to a tracked vehicle entering a tracking area and a second image frame corresponding to the tracked vehicle leaving the tracking area to obtain the time of the tracked vehicle passing the tracking area, then compare the time with a time threshold value obtained in advance to judge whether the time of the tracked vehicle passing the tracking area is normal, if not, further extract characteristic information of the tracked vehicle in the first image frame and the second image frame to compare to judge whether the tracked vehicle in the first image frame and the second image frame is the same, and if not, judge that the tracked vehicle is abnormal. By the method and the device for detecting the vehicle tracking abnormity, the illegal vehicle with the tracking abnormity can be filtered, and the illegal misjudgment caused by the abnormal vehicle tracking is avoided.

Description

Vehicle tracking abnormity detection method and device
Technical Field
The application relates to the technical field of vehicle monitoring, in particular to a vehicle tracking abnormity detection method and device.
Background
The electronic police can detect and track the motor vehicle in real time to snapshot the violation behaviors of the vehicle running red light, running without following a guide lane and the like. However, the existing tracking algorithm is easy to fail in tracking under the conditions of illumination change, shading, camera shake and the like, and at the moment, misjudgment about violation often occurs, so that certain trouble is brought to drivers and traffic management departments.
Therefore, how to improve the accuracy of the electronic police violation detection and prevent the violation misjudgment caused by the abnormal vehicle tracking has important research significance for technicians in the field.
Disclosure of Invention
In order to solve the above problems in the prior art, the present application provides a method and a device for detecting vehicle tracking abnormality, so as to detect whether tracking abnormality exists in the process of vehicle tracking by an electronic police.
In order to achieve the above purpose, the preferred embodiment of the present application adopts the following technical solutions:
in a first aspect, an embodiment of the present application provides a vehicle tracking abnormality detection method, where the method includes:
acquiring a first image frame corresponding to a tracking vehicle entering a tracking area and a second image frame corresponding to the tracking vehicle leaving the tracking area;
calculating a time for the tracked vehicle to pass through the tracking area from the first image frame and the second image frame;
comparing the time with a time threshold value obtained in advance;
extracting feature information of a tracked vehicle in the first and second image frames when the time exceeds the time threshold;
comparing the characteristic information of the tracked vehicle in the first image frame and the second image frame;
and if the characteristic information of the tracked vehicle in the first image frame is different from the characteristic information of the tracked vehicle in the second image frame, judging that the tracked vehicle is abnormal.
Optionally, in an embodiment of the present application, the method further includes a step of processing the sample data to obtain a time threshold, where the step includes:
acquiring historical time data of vehicles passing through the tracking area;
and determining a time threshold value of the vehicle passing through the tracking area according to the historical time data.
Optionally, in this embodiment of the present application, the step of determining a time threshold for the vehicle to pass through the tracking area according to the historical time data includes:
and taking the time with the percentile equal to a preset percentile in the historical time data as a time threshold.
Optionally, in an embodiment of the present application, the historical time data includes first historical time data acquired in a current statistical period and second historical time data acquired in a previous statistical period, where the first historical time data and the second historical time data include time samples of a plurality of vehicles passing through the tracking area, and the number of the time samples in the first historical time data and the second historical time data is the same;
the method further comprises the step of updating the time threshold, comprising:
detecting a first number of samples in the first historical time data that is greater than the time threshold and a second number of samples in the second historical time data that is greater than the time threshold;
if the difference value between the first sample quantity and the second sample quantity is smaller than a first preset threshold value, continuing to use the time threshold value;
and if the difference is larger than or equal to the first preset threshold, re-determining the time threshold according to the time when the percentile in the second historical time data is equal to the preset percentile.
Optionally, in an embodiment of the present application, the step of comparing the characteristic information of the tracked vehicle in the first image frame and the second image frame includes:
extracting a first characteristic region corresponding to a tracked vehicle in the first image frame and a second characteristic region corresponding to the tracked vehicle in the second image frame;
converting the first and second feature regions to an HSV color space;
and judging the similarity of the first characteristic region and the second characteristic region according to the hue and brightness of the first characteristic region and the second characteristic region in an HSV color space.
Optionally, in this embodiment of the present application, the step of determining the similarity between the first feature region and the second feature region according to the hue and brightness of the first feature region and the second feature region in an HSV color space includes:
generating a first combined histogram according to the number of pixels corresponding to each tone and brightness in the first feature region, and generating a second combined histogram according to the number of pixels corresponding to each tone and brightness in the second feature region;
and calculating data in the first combined histogram and the second combined histogram through Euclidean distance to obtain the similarity between the first characteristic region and the second characteristic region.
In a second aspect, an embodiment of the present application provides a vehicle tracking abnormality detection apparatus, including:
the tracking system comprises an acquisition module, a tracking module and a tracking module, wherein the acquisition module is used for acquiring a first image frame corresponding to a tracking vehicle entering a tracking area and a second image frame corresponding to the tracking vehicle leaving the tracking area;
the calculation module is used for calculating the time of the tracking vehicle passing through the tracking area according to the frame number corresponding to the first image frame and the frame number corresponding to the second image frame;
the first processing module is used for comparing the time with a time threshold value obtained in advance;
the characteristic extraction module is used for extracting characteristic information of the tracked vehicle in the first image frame and the second image frame when the time exceeds the time threshold;
the second processing module is used for comparing the characteristic information of the tracked vehicle in the first image frame and the second image frame;
and the judging module is used for judging that the tracking of the tracking vehicle is abnormal when the characteristic information of the tracking vehicle in the first image frame and the second image frame is different.
Optionally, in an embodiment of the present application, the apparatus further includes a time threshold determination module, where the time threshold determination module is configured to:
acquiring historical time data of vehicles passing through the tracking area;
and taking the time with the percentile equal to a preset percentile in the historical time data as a time threshold.
Optionally, in an embodiment of the present application, the historical time data includes first historical time data acquired in a current statistical period and second historical time data acquired in a previous statistical period, where the first historical time data and the second historical time data include time samples of a plurality of vehicles passing through the tracking area, and the number of the time samples in the first historical time data and the second historical time data is the same;
the apparatus further comprises a temporal threshold update module to:
detecting a first number of samples in the first historical time data that is greater than the time threshold and a second number of samples in the second historical time data that is greater than the time threshold;
when the difference value between the first sample quantity and the second sample quantity is smaller than a first preset threshold value, continuing to use the time threshold value; and
and when the difference is larger than or equal to the first preset threshold, re-determining the time threshold according to the time when the percentile in the second historical time data is equal to the preset percentile.
Optionally, in this embodiment of the application, the second processing module is specifically configured to:
extracting a first characteristic region corresponding to a tracked vehicle in the first image frame and a second characteristic region corresponding to the tracked vehicle in the second image frame;
converting the first and second feature regions to an HSV color space;
and judging the similarity of the first characteristic region and the second characteristic region according to the hue and brightness of the first characteristic region and the second characteristic region in an HSV color space.
Compared with the prior art, the method has the following beneficial effects:
according to the vehicle tracking abnormity detection method and device provided by the embodiment of the application, the time that the tracking vehicle passes through the tracking area is obtained by processing the first image frame corresponding to the tracking vehicle entering the tracking area and the second image frame corresponding to the tracking vehicle leaving the tracking area, then the time is compared with the time threshold value obtained in advance to judge whether the time that the tracking vehicle passes through the tracking area is normal, if not, the characteristic information of the tracking vehicle in the first image frame and the second image frame is further extracted to be compared to judge whether the tracking vehicles in the first image frame and the second image frame are the same, and if not, the tracking of the tracking vehicle is judged to be abnormal. The method and the device are used for detecting the vehicle tracking abnormity, and the illegal vehicle with the tracking abnormity can be filtered, so that the illegal misjudgment caused by the abnormal vehicle tracking is avoided.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained from the drawings without inventive effort.
Fig. 1 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure;
FIG. 2 is a schematic flowchart illustrating steps of a vehicle tracking abnormality detection method according to an embodiment of the present application;
FIG. 3 is a flowchart illustrating steps of determining a time threshold in a vehicle tracking abnormality detection method according to an embodiment of the present application;
FIG. 4 is a flowchart illustrating steps of updating a time threshold in a vehicle tracking abnormality detection method according to an embodiment of the present application;
FIG. 5 is a flowchart illustrating the sub-steps of step S50 in FIG. 2;
fig. 6 is a schematic block diagram of a vehicle tracking abnormality detection apparatus according to an embodiment of the present application.
Icon: 100-an electronic device; 111-a memory; 112-a memory controller; 113-a processor; 70-vehicle tracking abnormality detection means; 701-an obtaining module; 702-a calculation module; 703-a first processing module; 704-a feature extraction module; 705-a second processing module; 706-a decision module; 707-a time threshold determination module; 708-a time threshold update module.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, 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, and it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments. The components of the embodiments of the present application, generally described and illustrated in the figures herein, can be arranged and designed in a wide variety of different configurations.
Thus, the following detailed description of the embodiments of the present application, presented in the accompanying drawings, is not intended to limit the scope of the claimed application, but is merely representative of selected embodiments of the application. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures.
In the description of the present application, it should be noted that the terms "first", "second", etc. are named only for distinguishing different features of the present application, and the description is simplified, but does not indicate or imply relative importance, and thus, should not be construed as limiting the present application.
Some embodiments of the present application will be described in detail below with reference to the accompanying drawings. The embodiments described below and the features of the embodiments can be combined with each other without conflict.
Referring to fig. 1, an electronic device 100 according to an embodiment of the present disclosure is shown. The electronic device 100 may include a vehicle tracking abnormality detection apparatus 70, a memory 111, a storage controller 112, and a processor 113.
The memory 111, the memory controller 112 and the processor 113 are electrically connected to each other directly or indirectly to realize data transmission or interaction. For example, the components may be electrically connected to each other via one or more communication buses or signal lines. The vehicle tracking abnormality detection device 70 may include at least one software functional module that may be stored in the memory 111 in the form of software or firmware (firmware) or that is fixed in an Operating System (OS) of the electronic apparatus 100. The processor 113 is used for executing executable modules stored in the memory 111, such as software functional modules and computer programs included in the vehicle tracking abnormality detection apparatus 70.
The Memory 111 may be, but is not limited to, a Random Access Memory (RAM), a Read Only Memory (ROM), a Programmable Read-Only Memory (PROM), an Erasable Read-Only Memory (EPROM), an electrically Erasable Read-Only Memory (EEPROM), and the like. The memory 111 is used for storing a program, and the processor 113 executes the program after receiving an execution instruction. Access to the memory 111 by the processor 113 and possibly other components may be under the control of the memory controller 112.
The processor 113 may be an integrated circuit chip having signal processing capabilities; or a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; but also as Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc., that may implement or perform the methods, steps, and logic blocks disclosed in the embodiments of the present application.
It should be understood that the configuration shown in fig. 1 is merely a schematic diagram, and the electronic device 100 may include more or fewer components than shown in fig. 1, or have a different configuration than shown in fig. 1. The components shown in fig. 1 may be implemented in hardware, software, or a combination thereof.
Referring to fig. 2, a schematic flowchart of steps of a vehicle tracking abnormality detection method provided in an embodiment of the present application may be applied to the electronic device 100 shown in fig. 1, and a vehicle tracking abnormality detection function is provided for the electronic device 100.
The following explains in detail the vehicle tracking abnormality detection method provided in the embodiment of the present application with reference to fig. 2, and the method includes:
step S10, a first image frame corresponding to when the tracked vehicle enters the tracking area and a second image frame corresponding to when the tracked vehicle leaves the tracking area are acquired.
In the embodiment of the application, the tracking area refers to a monitoring area for tracking the track of the vehicle by an electronic police camera so as to detect whether the vehicle drives in violation. The tracking area corresponds to a fixed pixel area in a monitoring picture acquired by an electronic police camera, the electronic police camera identifies the driving track of a vehicle in the pixel area through an image identification technology, and then the driving behavior of the vehicle against regulations can be automatically detected by combining the current traffic light condition and the guide mark of the lane where the vehicle is located.
When the electronic police camera detects that the vehicle enters the tracking area, the electronic police camera starts to track the vehicle in real time and generates a corresponding tracking number until the vehicle leaves the tracking area, and then the tracking is finished. If the vehicle is identified to have the driving violations (such as running a red light, running without a guide lane and the like) in the tracking process, the vehicle violations are automatically captured to record the violation information of the vehicle.
Because the electronic police camera can have the condition of vehicle tracking failure under the conditions of illumination change, shading, shaking and the like, in order to avoid violation misjudgment, the vehicle tracking abnormity detection method provided by the embodiment of the application further verifies the vehicle through the corresponding first image frame when the tracking vehicle enters the tracking area and the corresponding second image frame when the tracking vehicle leaves the tracking area after the vehicle is judged to be violated so as to determine whether the vehicle has tracking abnormity in the tracking process.
Specifically, in this embodiment of the application, the first image frame and the second image frame may be obtained by tracking numbers corresponding to tracked vehicles. For example, after detecting that a certain car enters a tracking area, an electronic police camera generates a tracking number 0010 corresponding to the car, and starts to track the car in real time until the car exits the tracking area and finishes tracking, and the whole tracking process of the car corresponds to one tracking number 0010. If the automobile is detected to be violated during the tracking process, extracting a first image frame corresponding to the tracking vehicle with the tracking number of 0010 when entering the tracking area and a second image frame corresponding to the tracking vehicle when leaving the tracking area for verification.
With continued reference to fig. 2, after the step S10, the method further includes:
and step S20, calculating the time of the tracked vehicle passing through the tracking area according to the frame number corresponding to the first image frame and the frame number corresponding to the second image frame.
Step S30, comparing the time with a time threshold obtained in advance.
In the embodiment of the present application, the time when the tracked vehicle passes through the tracking area (i.e. the time taken by the tracked vehicle to leave the tracking area from entering the tracking area) can be obtained by calculating the frame numbers corresponding to the first image frame and the second image frame, and after the time is obtained, the time can be compared with a time threshold value (i.e. an upper limit or a lower limit of the time taken by the tracked vehicle to pass through the tracking area) obtained in advance, so that whether the time taken by the tracked vehicle to pass through the tracking area is normal can be determined.
Specifically, referring to fig. 3, in the embodiment of the present application, the method for determining the time threshold may include the following steps:
step S01, obtaining historical time data of the vehicle passing through the tracking area.
And step S02, determining a time threshold value of the vehicle passing through the tracking area according to the historical time data.
In the embodiment of the application, in order to match the time threshold with the actual situation of passing through the target tracking area, the historical time data of the vehicle passing through the target tracking area is used to determine the normal time range of passing through the target tracking area, and then the time threshold of the vehicle passing through the target tracking area is obtained.
Optionally, in this embodiment of the application, the time threshold may be determined according to a probability distribution condition of the historical time data, and a time meeting a preset probability is taken as the time threshold; the time can also be determined by the percentile corresponding to the historical time data, and the time with the percentile equal to the preset percentile is taken as the time threshold.
Specifically, in an embodiment of the present application, the historical time data is processed by a percentile method, and a time in the historical time data, at which a percentile is equal to a preset percentile, is used as a time threshold. For example, if the historical time data includes time samples of 100 vehicles passing through the tracking area, the 100 time samples are sorted from small to large, and then the time of which the percentile is equal to a preset percentile (e.g., 99%) among the 100 time samples is used as the time threshold of the target tracking area. In other words, the time when the percentile in the historical time data is smaller than the preset percentile is regarded as the normal time when the vehicle passes through the tracking area.
Further, considering that the vehicle has several situations of straight running, left turning and right turning in the tracking area, and there may be a difference in the time when different running situations pass through the tracking area, in this embodiment of the present application, the time threshold corresponding to each running direction may be obtained by processing the historical time data of different running directions respectively, and then whether the time when the tracked vehicle passes through the tracking area is normal is determined according to the running direction of the tracked vehicle and the time threshold corresponding to the running direction. In addition, considering that some traffic intersections can also be provided with a driving area, in the embodiment of the application, whether the lane where the tracking vehicle is located supports the driving area can be judged, if the lane where the tracking vehicle is located supports the driving area, the tracking vehicle directly returns, and the abnormal tracking detection is not carried out on the tracking vehicle.
Optionally, in this embodiment of the application, a lower time limit for the vehicle to pass through the tracking area may be set according to the historical time data, so as to further limit a normal time range for the vehicle to pass through the tracking area.
Further, considering that there is a certain difference in the time when the intersection passes through the tracking area at different time periods or under different road conditions, in this embodiment of the present application, the method further includes a step of updating the time threshold according to historical time data, where the historical time data includes first historical time data acquired in a current statistical period and second historical time data acquired in a previous statistical period, and the first historical time data and the second historical time data are the same in number. Referring to fig. 4, the method for updating the time threshold includes:
step S03, detecting a first number of samples in the first historical time data that is greater than the time threshold, and a second number of samples in the second historical time data that is greater than the time threshold.
Step S04, when the difference between the first sample number and the second sample number is smaller than a first preset threshold, continuing to use the time threshold.
And step S05, when the difference is greater than or equal to the first preset threshold, re-determining a time threshold according to the time when the percentile in the second historical time data is equal to the preset percentile.
In the embodiment of the present application, the purpose of updating the time threshold is to better adapt to the current time period or the current road condition, so as to improve the accuracy of the judgment. If the difference value between the number of the first samples which are greater than the time threshold in the current statistical period and the number of the second samples which are greater than the time threshold in the previous statistical period is greater than a first preset threshold, the fact that the time threshold cannot adapt to the current time period or the current road condition is indicated, therefore, the time threshold can be better adapted to the current time period or the current road condition by re-determining the time threshold by using the second historical time data corresponding to the current statistical period, and the accuracy of vehicle tracking abnormity detection is improved.
With continued reference to fig. 2, after the step S30, the method further includes:
and step S40, when the time exceeds the time threshold, extracting the characteristic information of the tracked vehicle in the first image frame and the second image frame.
In the embodiment of the present application, if the time that the tracked vehicle passes through the tracking area, which is calculated by step S20, is greater than the time threshold, it indicates that there may be an abnormality in the tracking process of the tracked vehicle (for example, an object change in the tracking process), and therefore, it is also necessary to extract the characteristic information of the tracked vehicle in the first image frame and the second image frame to further verify whether the tracked vehicle is the same vehicle.
With continued reference to fig. 2, after the step S40, the method further includes:
and step S50, comparing the characteristic information of the tracked vehicle in the first image frame and the second image frame.
Specifically, referring to fig. 5, in the embodiment of the present application, the step S50 includes the following sub-steps:
and a substep S51 of extracting a first feature region corresponding to the tracked vehicle in the first image frame and a second feature region corresponding to the tracked vehicle in the second image frame.
In one embodiment of the present application, a pixel region corresponding to a tracked vehicle in the first image frame may be used as the first feature region, and a pixel region corresponding to a tracked vehicle in the second image frame may be used as the second feature region by detecting an edge of the tracked vehicle.
Optionally, in another embodiment of the present application, a pixel width of a license plate of a tracked vehicle in an image frame may be identified, and then a pixel coordinate, a pixel width and a scale factor relative to a vehicle body corresponding to the license plate are tracked to perform an extrapolation process to obtain a first feature region corresponding to the tracked vehicle in the first image frame and a second feature region corresponding to the tracked vehicle in the second image frame.
A substep S52 of converting the first and second feature regions into HSV color space.
In the embodiment of the present application, in order to avoid the influence of the lighting condition (brightness) on the comparison result, after the first feature region and the second feature region are extracted, the first feature region and the second feature region need to be converted into HSV color space.
Specifically, the monitoring picture collected by the electronic police camera is usually in YUV format, where Y represents luminance information and U, V represents chrominance information. In order to convert the first feature region and the second feature region from YUV color space to HSV color space, the conversion from YUV color space to RGB color space is first required, and the conversion process can be expressed as:
R=Y+1.4075×(V-128)
G=Y-0.3455×(U-128)-0.7169×(V-128)
B=Y+1.779×(U-128)
where R denotes the red component of the pixel, G denotes the green component of the pixel, B denotes the blue component of the pixel, Y, U, V refers to the above.
Further, after converting to the RGB color space, further converting it to convert the first feature region and the second feature region to the HSV color space, where the conversion process may be represented as:
Figure BDA0001888087370000141
Figure BDA0001888087370000142
V=max(R,G,B)
where H denotes hue, S denotes saturation, V denotes lightness, and R, G, B denotes the same.
And a substep S53, determining similarity between the first feature region and the second feature region according to hue and brightness of the first feature region and the second feature region in HSV color space.
After the first characteristic region and the second characteristic region are converted into an HSV color space, a first combined histogram is generated according to the number of pixels corresponding to each hue and brightness in the first characteristic region, a second combined histogram is generated according to the number of pixels corresponding to each hue and brightness in the second characteristic region, and then data in the first combined histogram and the second combined histogram are calculated through Euclidean distances, so that the similarity between the first characteristic region and the second characteristic region can be obtained. Specifically, the calculation process can be expressed as:
Figure BDA0001888087370000151
wherein D isRepresenting the similarity of the first and second characteristic regions, h1(m, n) represents the number of pixel points with m hue and n brightness in the first characteristic region, h2(m, n) represents the number of pixels having a hue m and a lightness n in the second feature region.
In this embodiment of the application, after the similarity between the first feature region and the second feature region is obtained through the above calculation, the similarity is compared with a preset second preset threshold, so that it can be determined whether the tracked vehicle in the first image frame and the tracked vehicle in the second image frame are the same vehicle. Specifically, if the similarity is greater than or equal to the second preset threshold, it indicates that the tracked vehicle in the first image frame and the tracked vehicle in the second image frame are the same vehicle, and if the similarity is less than the second preset threshold, it indicates that the tracked vehicle in the first image frame and the tracked vehicle in the second image frame are different vehicles.
It should be noted that, in the embodiment of the present application, the preset percentile, the first preset threshold, and the second preset threshold may be set according to actual requirements, and are not specifically limited herein.
With continuing reference to fig. 2, after step S50, the vehicle tracking abnormality detection method according to the embodiment of the present application further includes:
and step S60, when the characteristic information of the tracked vehicle in the first image frame and the second image frame is not the same, judging that the tracking of the tracked vehicle is abnormal.
If the characteristic information of the tracked vehicle in the first image frame and the characteristic information of the tracked vehicle in the second image frame are compared through the steps, and the tracked vehicle in the first image frame and the tracked vehicle in the second image frame are different vehicles, the tracked vehicle is judged to have abnormal tracking in the tracking process, and the violation information related to the tracked vehicle is deleted, so that the effect of filtering invalid violation information is achieved, the misjudgment of violation of regulations by an electronic police is avoided, and further the trouble of misjudgment of violation of regulations to a driver and a traffic management department is avoided.
Referring to fig. 6, the present embodiment also provides a vehicle tracking abnormality detection apparatus 70, including:
the acquisition module 701 is used for acquiring a first image frame corresponding to a tracking vehicle entering a tracking area and a second image frame corresponding to the tracking vehicle leaving the tracking area;
a calculating module 702, configured to calculate, according to a frame number corresponding to the first image frame and a frame number corresponding to the second image frame, a time when the tracked vehicle passes through the tracking area;
a first processing module 703, configured to compare the time with a time threshold obtained in advance;
a feature extraction module 704, configured to extract feature information of the tracked vehicle in the first image frame and the second image frame when the time exceeds the time threshold;
a second processing module 705, configured to compare feature information of the tracked vehicle in the first image frame and the second image frame;
a determining module 706, configured to determine that there is an abnormality in tracking the tracked vehicle when the feature information of the tracked vehicle in the first image frame and the second image frame is not the same.
Optionally, in this embodiment of the present application, the apparatus further includes a time threshold determining module 707, where the time threshold determining module 707 is configured to:
acquiring historical time data of vehicles passing through the tracking area;
and taking the time with the percentile equal to a preset percentile in the historical time data as a time threshold.
Optionally, in an embodiment of the present application, the historical time data includes first historical time data acquired in a current statistical period and second historical time data acquired in a previous statistical period, where the first historical time data and the second historical time data include time samples of a plurality of vehicles passing through the tracking area, and the number of the time samples in the first historical time data and the second historical time data is the same; the apparatus further comprises a temporal threshold update module 708, the temporal threshold update module 708 to:
detecting a first number of samples in the first historical time data that is greater than the time threshold and a second number of samples in the second historical time data that is greater than the time threshold;
when the difference value between the first sample quantity and the second sample quantity is smaller than a first preset threshold value, continuing to use the time threshold value; and
and when the difference is larger than or equal to the first preset threshold, re-determining the time threshold according to the time when the percentile in the second historical time data is equal to the preset percentile.
Further, in this embodiment of the application, the second processing module 705 is specifically configured to:
extracting a first characteristic region corresponding to a tracked vehicle in the first image frame and a second characteristic region corresponding to the tracked vehicle in the second image frame;
converting the first and second feature regions to an HSV color space;
and judging the similarity of the first characteristic region and the second characteristic region according to the hue and brightness of the first characteristic region and the second characteristic region in an HSV color space.
It should be noted that the apparatuses and methods disclosed in the embodiments of the present application can also be implemented in other ways. The apparatus embodiments described above are merely illustrative, and for example, the flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In addition, functional modules in the embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
In summary, the embodiment of the present application provides a method and an apparatus for detecting vehicle tracking abnormality, where the method and the apparatus obtain a time when a tracking vehicle passes through a tracking area by processing a first image frame corresponding to when the tracking vehicle enters the tracking area and a second image frame corresponding to when the tracking vehicle leaves the tracking area, and then compare the time with a time threshold obtained in advance to determine whether the time when the tracking vehicle passes through the tracking area is normal, and if not, further extract characteristic information of the tracking vehicle in the first image frame and the second image frame to compare, to determine whether the tracking vehicle in the first image frame and the second image frame is the same, and if not, determine that there is abnormality in tracking of the tracking vehicle. The method and the device are used for detecting the vehicle tracking abnormity, and the vehicles with tracking abnormity can be filtered, so that misjudgment of violation caused by the vehicle tracking abnormity is avoided.
The above-mentioned embodiments are only specific embodiments of the present application, and are used for illustrating the technical solutions of the present application, but not limiting the same, and the scope of the present application is not limited thereto, and although the present application is described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: any person skilled in the art can modify or easily conceive the technical solutions described in the foregoing embodiments or equivalent substitutes for some technical features within the technical scope disclosed in the present application; such modifications, changes or substitutions do not depart from the spirit and scope of the exemplary embodiments of the present application, and are intended to be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (6)

1. A vehicle tracking abnormality detection method characterized by comprising:
acquiring a first image frame corresponding to a tracking vehicle entering a tracking area and a second image frame corresponding to the tracking vehicle leaving the tracking area;
calculating a time for the tracked vehicle to pass through the tracking area from the first image frame and the second image frame;
comparing the time with a time threshold value obtained in advance;
extracting feature information of a tracked vehicle in the first and second image frames when the time exceeds the time threshold;
comparing the characteristic information of the tracked vehicle in the first image frame and the second image frame;
if the characteristic information of the tracked vehicle in the first image frame is different from the characteristic information of the tracked vehicle in the second image frame, judging that the tracked vehicle is abnormal;
wherein, the method also includes a step of processing the sample data to obtain a time threshold, and then the step includes:
acquiring historical time data of vehicles passing through the tracking area;
determining a time threshold value of a vehicle passing through the tracking area according to the historical time data, wherein the historical time data comprises first historical time data acquired in a current statistical period and second historical time data acquired in a previous statistical period, the first historical time data and the second historical time data comprise a plurality of time samples of the vehicle passing through the tracking area, and the number of the time samples in the first historical time data is the same as that in the second historical time data;
at this time, the method further includes a step of updating the time threshold, and then the step includes:
detecting a first number of samples in the first historical time data that is greater than the time threshold and a second number of samples in the second historical time data that is greater than the time threshold;
if the difference value between the first sample quantity and the second sample quantity is smaller than a first preset threshold value, continuing to use the time threshold value;
and if the difference is larger than or equal to the first preset threshold, re-determining the time threshold according to the time when the percentile in the second historical time data is equal to the preset percentile.
2. The method of claim 1, wherein the step of determining a time threshold for a vehicle to pass through the tracking area based on the historical time data comprises:
and taking the time with the percentile equal to a preset percentile in the historical time data as a time threshold.
3. The method of claim 1, wherein the step of comparing the characteristic information of the tracked vehicle in the first and second image frames comprises:
extracting a first characteristic region corresponding to a tracked vehicle in the first image frame and a second characteristic region corresponding to the tracked vehicle in the second image frame;
converting the first and second feature regions to an HSV color space;
and judging the similarity of the first characteristic region and the second characteristic region according to the hue and brightness of the first characteristic region and the second characteristic region in an HSV color space.
4. The method of claim 3, wherein the step of determining the similarity between the first feature region and the second feature region according to the hue and brightness of the first feature region and the second feature region in HSV color space comprises:
generating a first combined histogram according to the number of pixels corresponding to each tone and brightness in the first feature region, and generating a second combined histogram according to the number of pixels corresponding to each tone and brightness in the second feature region;
and calculating data in the first combined histogram and the second combined histogram through Euclidean distance to obtain the similarity between the first characteristic region and the second characteristic region.
5. A vehicle tracking abnormality detection apparatus, characterized by comprising:
the tracking system comprises an acquisition module, a tracking module and a tracking module, wherein the acquisition module is used for acquiring a first image frame corresponding to a tracking vehicle entering a tracking area and a second image frame corresponding to the tracking vehicle leaving the tracking area;
the calculation module is used for calculating the time of the tracking vehicle passing through the tracking area according to the frame number corresponding to the first image frame and the frame number corresponding to the second image frame;
the first processing module is used for comparing the time with a time threshold value obtained in advance;
the characteristic extraction module is used for extracting characteristic information of the tracked vehicle in the first image frame and the second image frame when the time exceeds the time threshold;
the second processing module is used for comparing the characteristic information of the tracked vehicle in the first image frame and the second image frame;
the judging module is used for judging that the tracking of the tracking vehicle is abnormal when the characteristic information of the tracking vehicle in the first image frame and the second image frame is different;
wherein the apparatus further comprises a time threshold determination module to:
acquiring historical time data of vehicles passing through the tracking area;
taking time with a percentile equal to a preset percentile in the historical time data as a time threshold, wherein the historical time data comprise first historical time data acquired in a current statistical period and second historical time data acquired in a previous statistical period, the first historical time data and the second historical time data comprise time samples of a plurality of vehicles passing through the tracking area, and the number of the time samples in the first historical time data is the same as that in the second historical time data;
at this time, the apparatus further includes a time threshold updating module, configured to:
detecting a first number of samples in the first historical time data that is greater than the time threshold and a second number of samples in the second historical time data that is greater than the time threshold;
when the difference value between the first sample quantity and the second sample quantity is smaller than a first preset threshold value, continuing to use the time threshold value; and
and when the difference is larger than or equal to the first preset threshold, re-determining the time threshold according to the time when the percentile in the second historical time data is equal to the preset percentile.
6. The apparatus of claim 5, wherein the second processing module is specifically configured to:
extracting a first characteristic region corresponding to a tracked vehicle in the first image frame and a second characteristic region corresponding to the tracked vehicle in the second image frame;
converting the first and second feature regions to an HSV color space;
and judging the similarity of the first characteristic region and the second characteristic region according to the hue and brightness of the first characteristic region and the second characteristic region in an HSV color space.
CN201811457872.5A 2018-11-30 2018-11-30 Vehicle tracking abnormity detection method and device Active CN111260929B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811457872.5A CN111260929B (en) 2018-11-30 2018-11-30 Vehicle tracking abnormity detection method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811457872.5A CN111260929B (en) 2018-11-30 2018-11-30 Vehicle tracking abnormity detection method and device

Publications (2)

Publication Number Publication Date
CN111260929A CN111260929A (en) 2020-06-09
CN111260929B true CN111260929B (en) 2022-01-04

Family

ID=70943894

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811457872.5A Active CN111260929B (en) 2018-11-30 2018-11-30 Vehicle tracking abnormity detection method and device

Country Status (1)

Country Link
CN (1) CN111260929B (en)

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4480299B2 (en) * 2001-06-21 2010-06-16 富士通マイクロエレクトロニクス株式会社 Method and apparatus for processing image including moving object
CN102426783B (en) * 2011-08-30 2013-11-13 同济大学 Low flow road traffic incident detection method based on vehicle tracking
CN102289948B (en) * 2011-09-02 2013-06-05 浙江大学 Multi-characteristic fusion multi-vehicle video tracking method under highway scene
CN103136935B (en) * 2013-01-11 2015-04-15 东南大学 Method for tracking sheltered vehicles
CN106097385B (en) * 2016-05-31 2019-03-05 海信集团有限公司 A kind of method and apparatus of target following
CN106128113A (en) * 2016-08-01 2016-11-16 深圳市永兴元科技有限公司 The recognition methods of fake license plate vehicle and device

Also Published As

Publication number Publication date
CN111260929A (en) 2020-06-09

Similar Documents

Publication Publication Date Title
US9082038B2 (en) Dram c adjustment of automatic license plate recognition processing based on vehicle class information
EP2031571B1 (en) Vehicle type determination device, program, and method
US20120128210A1 (en) Method for Traffic Sign Recognition
CN107798688B (en) Moving target identification method, early warning method and automobile rear-end collision prevention early warning device
US20140226349A1 (en) Apparatus for detecting other vehicle lights and light control apparatus for vehicles
CN114387591A (en) License plate recognition method, system, equipment and storage medium
JP7185419B2 (en) Method and device for classifying objects for vehicles
CN112785850A (en) Method and device for identifying vehicle lane change without lighting
JP2016130979A (en) Detection device, detection processing program, and detection system
US11423676B2 (en) Method and apparatus for detecting on-duty state of driver, device, and computer storage medium
CN111260929B (en) Vehicle tracking abnormity detection method and device
US11037266B2 (en) Attached substance detection device and attached substance detection method
US8818093B2 (en) Method and device for analyzing an image of an image recording device for a vehicle
JP2017174380A (en) Recognition device, method for recognizing object, program, and storage medium
EP2919149A2 (en) Image processing apparatus and image processing method
CN116259021A (en) Lane line detection method, storage medium and electronic equipment
CN112784817B (en) Method, device and equipment for detecting lane where vehicle is located and storage medium
CN112085962B (en) Image-based parking detection method and device and electronic equipment
CN113902740A (en) Construction method of image blurring degree evaluation model
CN113870185A (en) Image processing method based on image snapshot, terminal and storage medium
KR101502088B1 (en) Method for detecting the failure of rear combination lamp of vehicle by using camera image and system thereof
US20210264638A1 (en) Image processing device, movable device, method, and program
KR100936442B1 (en) A Car information Reading System and A Car Information Reading Method Thereof
CN115861624B (en) Method, device, equipment and storage medium for detecting occlusion of camera
US20230230344A1 (en) Signal color determination device and signal color determination method

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant