WO2018068317A1 - Vehicle wrong-way detection apparatus and method, and electronic device - Google Patents

Vehicle wrong-way detection apparatus and method, and electronic device Download PDF

Info

Publication number
WO2018068317A1
WO2018068317A1 PCT/CN2016/102168 CN2016102168W WO2018068317A1 WO 2018068317 A1 WO2018068317 A1 WO 2018068317A1 CN 2016102168 W CN2016102168 W CN 2016102168W WO 2018068317 A1 WO2018068317 A1 WO 2018068317A1
Authority
WO
WIPO (PCT)
Prior art keywords
vehicle
frame image
trajectory
retrograde
current frame
Prior art date
Application number
PCT/CN2016/102168
Other languages
French (fr)
Chinese (zh)
Inventor
杨雅文
王琪
Original Assignee
富士通株式会社
杨雅文
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 富士通株式会社, 杨雅文 filed Critical 富士通株式会社
Priority to CN201680088977.0A priority Critical patent/CN109661667A/en
Priority to PCT/CN2016/102168 priority patent/WO2018068317A1/en
Priority to JP2019518295A priority patent/JP2019532431A/en
Publication of WO2018068317A1 publication Critical patent/WO2018068317A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/20Analysis of motion
    • GPHYSICS
    • G08SIGNALLING
    • G08GTRAFFIC CONTROL SYSTEMS
    • G08G1/00Traffic control systems for road vehicles
    • G08G1/01Detecting movement of traffic to be counted or controlled
    • G08G1/056Detecting movement of traffic to be counted or controlled with provision for distinguishing direction of travel

Definitions

  • the present invention relates to the field of information technology, and in particular, to a vehicle retrograde detecting apparatus and method, and an electronic device.
  • intelligent monitoring systems have many advantages, such as continuous monitoring throughout the day, low cost and protection of personal information.
  • the detection of traffic violations by intelligent monitoring systems and notification to traffic managers or warning of vehicle drivers can reduce and avoid traffic accidents.
  • Vehicle retrograde is a common traffic violation, which is harmful and easily causes traffic accidents.
  • Existing vehicle retrograde detection methods generally use a Gaussian background detection algorithm to determine which part of the image is the target vehicle, and then use the mean shift and Harris Corner features to track and determine the direction of travel of the vehicle.
  • Embodiments of the present invention provide a vehicle retrograde detecting apparatus and method, and an electronic device.
  • a vehicle trajectory set and detecting a vehicle trajectory therein By establishing a vehicle trajectory set and detecting a vehicle trajectory therein, the number of times the vehicle is retrograde is detected in each frame image according to each vehicle trajectory, and the detected vehicle is detected.
  • the ratio of the total number of times and the vector direction of the vehicle trajectory determine whether each vehicle trajectory is retrograde, the calculation process is relatively simple, and high detection accuracy can be obtained.
  • a vehicle retrograde detecting apparatus configured to detect each frame image of a surveillance video frame by frame
  • the apparatus comprising: a first detecting unit, configured to detect a current a traveling vehicle in the frame image; an establishing unit for establishing a vehicle track set of the current frame image based on the detected traveling vehicle in the current frame image; a second detecting unit for the vehicle for the current frame image Vehicle trajectories that are not determined to be retrograde in the trajectory set are detected one by one, and the trajectory of the vehicle that satisfies the preset condition is determined as retrograde Vehicle trajectory, wherein the preset condition includes: detecting, in the current frame image and all previous frame images, the number of times the traveling direction of the vehicle is opposite to the normal traveling direction in the vehicle trajectory that is not determined to be retrograde and detecting the The ratio of the total number of times the traveling direction of the vehicle is greater than the first threshold, and the vector direction of the vehicle trajectory that is not determined to be retrograde is
  • an electronic device comprising the apparatus according to the first aspect of the embodiments of the present invention.
  • a vehicle retrograde detection method the method for detecting each frame image of a surveillance video frame by frame, the method comprising: detecting a traveling vehicle in a current frame image; Detecting the traveling vehicle in the current frame image, establishing a vehicle trajectory set of the current frame image; detecting, for the vehicle trajectory of the current frame image, the vehicle trajectory not determined to be retrograde, detecting the vehicle trajectory satisfying the preset condition Determining a vehicle trajectory that is retrograde, wherein the preset condition includes: detecting, in the vehicle trajectory that is not determined to be retrograde, the number of times the traveling direction of the vehicle is opposite to the normal traveling direction in the current frame image and all previous frame images The ratio of the total number of times of detecting the traveling direction of the vehicle is greater than the first threshold, and the vector direction of the vehicle trajectory not determined to be retrograde is opposite to the normal traveling direction.
  • the invention has the beneficial effects of detecting the vehicle trajectory set and detecting the vehicle trajectory therein, detecting the ratio of the number of times the vehicle is retrograde to the total number of detected vehicles and the vector direction of the vehicle trajectory in each frame image according to each vehicle trajectory. To determine whether each vehicle trajectory is retrograde, the calculation process is relatively simple, and high detection accuracy can be obtained.
  • FIG. 1 is a schematic diagram of a vehicle retrograde detecting device according to Embodiment 1 of the present invention.
  • FIG. 2 is a schematic diagram of an establishing unit 102 according to Embodiment 1 of the present invention.
  • Figure 3 is a schematic diagram of a vehicle trajectory according to Embodiment 1 of the present invention.
  • FIG. 4 is a schematic diagram of an electronic device according to Embodiment 2 of the present invention.
  • Figure 5 is a schematic block diagram showing the system configuration of an electronic device according to Embodiment 2 of the present invention.
  • Fig. 6 is a schematic diagram of a vehicle retrograde detecting method according to a third embodiment of the present invention.
  • Embodiments of the present invention provide a vehicle retrograde detection apparatus, which is configured to detect each frame image of a surveillance video frame by frame.
  • BRIEF DESCRIPTION OF THE DRAWINGS Fig. 1 is a view showing a vehicle retrograde detecting device according to a first embodiment of the present invention. As shown in FIG. 1, the device 100 includes:
  • a first detecting unit 101 configured to detect a traveling vehicle in the current frame image
  • An establishing unit 102 configured to establish a vehicle track set of the current frame image according to the detected traveling vehicle in the current frame image
  • a second detecting unit 103 configured to detect the vehicle trajectory that is not determined to be retrograde for the vehicle trajectory set of the current frame image, and determine a vehicle trajectory that meets the preset condition as a retrograde vehicle trajectory, wherein the preset condition
  • the ratio of the number of times that the traveling direction of the vehicle is opposite to the normal traveling direction and the total number of times of detecting the traveling direction of the vehicle in the current frame image and all previous frame images in the vehicle trajectory that is not determined to be retrograde is greater than the first threshold.
  • the vector direction of the vehicle trajectory that is not determined to be retrograde is opposite to the normal traveling direction.
  • each vehicle trajectory detects the ratio of the number of vehicle retrogrades to the total number of detected vehicles and the vector direction of the vehicle trajectory in each frame image, determines whether each vehicle trajectory is retrograde, the calculation process is relatively simple, and high detection accuracy can be obtained.
  • the surveillance video can be obtained according to existing methods. For example, it can be obtained by installing a camera above the area to be monitored.
  • each frame image of the surveillance video may include consecutive multi-frame images in the surveillance video for a period of time, and each frame image is detected frame by frame.
  • the first detecting unit 101 can detect the traveling vehicle in the current frame image using the classifier, and thus, by using the classifier to detect the traveling vehicle, the Gaussian background detection algorithm used in the existing retrograde detecting method is compared.
  • the use of the classifier can effectively improve the vehicle detection rate and prevent the vehicle from being missed.
  • the classifier may be an existing type of classifier, for example, a Support Vector Machine (SVM) classifier, a Bayesian classifier, and the like.
  • SVM Support Vector Machine
  • the entire current frame image may be detected, or a predetermined region in the current frame image may be detected, for example, only a Region of Interest (ROI) in the image is detected.
  • ROI Region of Interest
  • the entire image can be detected. If the current frame image contains two-way or multi-directional lanes, the area where the one-way lane is located can be used as the ROI area and detected.
  • the establishing unit 102 is configured to establish a vehicle track set of the current frame image according to the detected traveling vehicle in the current frame image.
  • the structure of the establishing unit 102 of the present embodiment and the method of establishing a vehicle track set are exemplarily described below.
  • FIG. 2 is a schematic diagram of the establishing unit 102 of Embodiment 1 of the present invention. As shown in FIG. 2, the establishing unit 102 includes:
  • a first updating unit 201 configured to add the traveling vehicle to the vehicle trajectory when the detected traveling vehicle in the current frame image matches any one of the vehicle trajectories of the previous frame image;
  • a new unit 202 configured to: when the detected traveling vehicle in the current frame image does not match any of the vehicle trajectories in the vehicle trajectory of the previous frame image, create a new vehicle trajectory according to the traveling vehicle;
  • a second updating unit 203 configured to determine a current frame image according to an average speed of the vehicle and a normal driving direction when the vehicle in the vehicle trajectory that has been established in the vehicle trajectory set of the previous frame image is not detected in the current frame image The virtual target of the vehicle is added to the vehicle trajectory.
  • a determining unit (not shown) is further configured to determine whether the detected vehicle in the current frame image matches any one of the vehicle trajectories in the vehicle trajectory of the previous frame image, for example, The determination may be made based on whether the detected predicted position of the traveling vehicle and the vehicle trajectory in the current frame image matches. Among them, the predicted position can be obtained according to an existing method.
  • the second updating unit 203 is configured to: when the vehicle in the vehicle trajectory that has been established in the vehicle trajectory set of the previous frame image is not detected in the current frame image, according to the average speed of the vehicle and the normal traveling direction, A virtual target of the vehicle in the current frame image is determined and added to the vehicle trajectory. In this way, when the tracked vehicle is not detected in some frames, by determining the virtual target of the vehicle and adding it to the end of the vehicle trajectory, the continuity of the vehicle trajectory can be ensured, thereby effectively improving the vehicle tracking. Great.
  • the average speed of the vehicle can be obtained by calculating the average speed of movement of the vehicle between frames according to the vehicle trajectory, and since the normal traveling direction of the single lane in the image is known, the normality of the vehicle The direction of travel should be consistent with the normal direction of travel of the lane.
  • the size of the virtual target of the vehicle in the current frame image may be set to be the same as the size of the vehicle detected in the image of the previous frame.
  • the second detecting unit 103 is configured to detect the vehicle trajectory that is not determined to be retrograde for the vehicle trajectory set of the current frame image, and the pre-preparation is satisfied.
  • the conditional vehicle trajectory is determined as a retrograde vehicle trajectory.
  • the preset condition includes: detecting, in the vehicle frame that is not retrograde, the number of times the traveling direction of the vehicle is opposite to the normal traveling direction in the current frame image and all previous frame images, and detecting the driving of the vehicle.
  • the ratio of the total number of directions is greater than the first threshold, and the vector direction of the vehicle trajectory that is not determined to be retrograde is opposite to the normal traveling direction.
  • the vector of the vehicle trajectory that is not determined to be retrograde is the displacement vector of the first vehicle to the last vehicle in the vehicle trajectory.
  • the first vehicle is the first detected vehicle
  • the last vehicle is the last detected vehicle.
  • the second detecting unit 103 arrives at the previous vehicle in the vehicle trajectory that is not determined to be retrograde When the vector direction of the adjacent next vehicle is opposite to the normal traveling direction, the number of times the traveling direction of the vehicle is detected to be opposite to the normal traveling direction is incremented by one.
  • the vector direction is considered to be the same as the normal traveling direction, and when the angle is greater than 90 degrees, the vector is considered as the vector.
  • the direction is opposite to the normal driving direction.
  • the same method can be used to determine whether the vector direction of the vehicle trajectory that is not determined to be retrograde is opposite to the normal traveling direction, and details are not described herein again.
  • the first threshold may be set according to actual needs, for example, the first threshold is a value between 0.3 and 0.8.
  • FIG. 3 is a schematic illustration of a vehicle trajectory in accordance with a first embodiment of the present invention.
  • the vehicle trajectory 301 is a vehicle trajectory in which the vehicle trajectory set of the current frame image is not determined to be retrograde, and the target vehicle 302-1 of the head of the vehicle trajectory 301 is the first time in the current frame and all previous frame images.
  • the detected vehicle, and so on, the target vehicles 302-2 to 302-7 are the same vehicle detected from the 2nd to the 7th, respectively, and the direction D is the normal traveling direction, and the vector of the vehicle trajectory 301 is FIG.
  • the vector A in the middle is the displacement vector of the vehicle from the first vehicle to the last (last detected), and the vector of the previous vehicle to the next vehicle is, for example, the vector B in Fig. 3, which is the target The vector of the vehicle 302-1 to the target vehicle 302-2.
  • the direction of the vector A is opposite to the normal traveling direction D
  • the vector in which the vector direction of the preceding vehicle to the adjacent next vehicle is opposite to the normal traveling direction D includes: the target vehicle 302-1 to the target vehicle 302- Vector of 2, vector of target vehicle 302-2 to target vehicle 302-3, vector of target vehicle 302-4 to target vehicle 302-5, vector of target vehicle 302-6 to target vehicle 302-7, a total of 4 vectors
  • the vector in which the vector direction of the previous vehicle to the adjacent next vehicle is the same as the normal traveling direction D includes: a vector of the target vehicle 302-3 to the target vehicle 302-4 and a target vehicle 302-5 to the target vehicle 302-6.
  • Vector a total of 2 vectors.
  • the vehicle trajectory 301 satisfies the preset condition, thereby being determined as a retrograde vehicle trajectory. .
  • the preset condition may further include: a vector of the vehicle trajectory that is not determined to be retrograde is in the The ratio of the projected length in the normal driving direction to the height of the last vehicle in the vehicle trajectory not determined to be retrograde is greater than the second threshold. That is, the preset condition includes: detecting, in the current frame image and all previous frame images, the number of times the traveling direction of the vehicle is opposite to the normal traveling direction in the vehicle trajectory that is not determined to be retrograde, and detecting the traveling direction of the vehicle.
  • the ratio of the total number of times is greater than the first threshold, and the vector direction of the vehicle trajectory that is not determined to be retrograde is opposite to the normal traveling direction, and the vector of the vehicle trajectory that is not determined to be retrograde in the normal traveling direction is not
  • the ratio of the height of the last vehicle in the vehicle trajectory determined to be retrograde is greater than a second threshold.
  • the second threshold may be set according to actual needs.
  • the second threshold is a value between 1.8 and 2.8.
  • the projection length of the vector A in the direction D is determined to determine whether the ratio is greater than the second. Threshold.
  • FIG. 4 is a schematic diagram of the electronic device according to Embodiment 2 of the present invention.
  • the electronic device 400 includes a vehicle retrograde detecting device 401.
  • the structure and function of the vehicle retrograde detecting device 401 are the same as those in the first embodiment, and are not described herein again.
  • Fig. 5 is a schematic block diagram showing the system configuration of an electronic apparatus according to a second embodiment of the present invention.
  • electronic device 500 can include central processor 501 and memory 502; memory 502 is coupled to central processor 501.
  • the figure is exemplary; other types of structures may be used in addition to or in place of the structure to implement telecommunications functions or other functions.
  • the electronic device 500 may further include an input unit 503, a display 504, and a power source 505.
  • the functions of the vehicle retrograde detecting apparatus described in Embodiment 1 may be integrated into the central processing unit 501.
  • the central processing unit 501 can be configured to: detect a traveling vehicle in the current frame image; establish a vehicle trajectory set of the current frame image according to the detected traveling vehicle in the current frame image; The vehicle trajectory of the previous frame image in which the vehicle trajectory is not determined to be retrograde is detected one by one, and the vehicle trajectory that satisfies the preset condition is determined as a retrograde vehicle trajectory, wherein the preset condition includes: the predetermined condition is not determined as retrograde In the vehicle trajectory, the ratio of the number of times the traveling direction of the vehicle is opposite to the normal traveling direction and the total number of times the traveling direction of the vehicle is detected in the current frame image and all previous frame images is greater than a first threshold, and the said is not determined.
  • the vector direction of the retrograde vehicle trajectory is opposite to the normal driving direction.
  • the preset condition includes: detecting, in the vehicle trajectory that is not determined to be retrograde, the number of times the traveling direction of the vehicle is opposite to the normal traveling direction in the current frame image and all previous frame images, and detecting the traveling direction of the vehicle.
  • the ratio of the total number of times is greater than the first threshold, the vector direction of the vehicle trajectory not determined to be retrograde is opposite to the normal traveling direction, and the vector of the vehicle trajectory not determined to be retrograde is in the normal traveling direction
  • the ratio of the projected length to the height of the last vehicle in the vehicle trajectory that is not determined to be retrograde is greater than a second threshold.
  • the vector of the vehicle trajectory that is not determined to be retrograde is the displacement vector of the first vehicle to the last vehicle in the vehicle trajectory.
  • the vehicle trajectory of the vehicle trajectory set that is not determined to be retrograde for the current frame image is detected one by one, including: when the vehicle trajectory that is not determined to be retrograde, the previous vehicle to the adjacent one of the vehicles When the vector direction is opposite to the normal traveling direction, the number of times the traveling direction of the vehicle is detected to be opposite to the normal traveling direction is incremented by one.
  • the establishing a vehicle trajectory set of the current frame image according to the detected traveling vehicle in the current frame image includes: when detecting the vehicle in the current frame image and the vehicle trajectory of the previous frame image is concentrated in any one of the vehicles When the trajectory is matched, the traveling vehicle is added to the vehicle trajectory; when the detected traveling vehicle in the current frame image does not match any of the vehicle trajectories in the vehicle trajectory of the previous frame image, a new one is created according to the traveling vehicle. Vehicle trajectory.
  • the establishing a vehicle trajectory set of the current frame image according to the detected traveling vehicle in the current frame image further includes: in the vehicle trajectory that has been established in the vehicle trajectory set in which the previous frame image is not detected in the current frame image.
  • the vehicle is determined based on the average speed of the vehicle and the normal traveling direction, and the virtual target of the vehicle in the current frame image is determined and added to the vehicle trajectory.
  • the size of the virtual target of the vehicle in the current frame image is the same as the size of the vehicle detected in the previous frame image.
  • the detecting the traveling vehicle in the current frame image includes: using a classifier to detect the current frame image Driving vehicle in the middle.
  • the vehicle retrograde detecting device described in Embodiment 1 may be configured separately from the central processing unit 501.
  • the vehicle retrograde detecting device may be configured as a chip connected to the central processing unit 501 through the central processing unit 501. Control to realize the function of the vehicle retrograde detecting device.
  • the electronic device 500 it is also not necessary for the electronic device 500 to include all of the components shown in FIG. 5 in this embodiment.
  • central processor 501 can include a microprocessor or other processor device and/or logic device that receives input and controls various components of electronic device 500. Operation.
  • Memory 502 can be one or more of a buffer, a flash memory, a hard drive, a removable medium, a volatile memory, a non-volatile memory, or other suitable device.
  • the central processing unit 501 can execute the program stored in the memory 502 to implement information storage or processing and the like.
  • the functions of other components are similar to those of the existing ones and will not be described here.
  • the various components of electronic device 500 may be implemented by special purpose hardware, firmware, software, or a combination thereof without departing from the scope of the invention.
  • the embodiment of the present invention further provides a vehicle retrograde detection method, which is used for detecting each frame image of a surveillance video frame by frame, which corresponds to the vehicle retrograde detection apparatus of Embodiment 1.
  • Fig. 6 is a schematic diagram of a vehicle retrograde detecting method according to a third embodiment of the present invention. As shown in FIG. 6, the method includes:
  • Step 601 detecting a traveling vehicle in the current frame image
  • Step 602 Establish a vehicle track set of the current frame image according to the detected traveling vehicle in the current frame image.
  • Step 603 The vehicle trajectory of the vehicle trajectory set that is not determined to be retrograde is detected one by one for the current frame image, and the vehicle trajectory that meets the preset condition is determined as a retrograde vehicle trajectory, wherein the preset condition includes: not determined as: The ratio of the number of times the traveling direction of the vehicle is opposite to the normal traveling direction and the total number of times the traveling direction of the vehicle is detected in the current frame image and all previous frame images in the retrograde vehicle trajectory is greater than the first threshold, and the determination is not determined.
  • the vector direction of the retrograde vehicle trajectory is opposite to the normal driving direction.
  • Embodiments of the present invention also provide a computer readable program, wherein the program causes a computer to perform an implementation in the vehicle retrograde detecting device or an electronic device when the program is executed in a vehicle retrograde detecting device or an electronic device
  • the embodiment of the present invention further provides a storage medium storing a computer readable program, wherein the computer readable program causes the computer to execute the vehicle retrograde detection method described in Embodiment 3 in a vehicle retrograde detecting device or an electronic device.
  • the method for performing vehicle retrograde detection in a vehicle retrograde detecting apparatus described in connection with the embodiments of the present invention may be directly embodied as hardware, a software module executed by a processor, or a combination of both.
  • one or more of the functional block diagrams shown in FIG. 1 and/or one or more combinations of functional block diagrams may correspond to various software modules of a computer program flow, or to individual hardware modules.
  • These software modules may correspond to the respective steps shown in FIG. 6, respectively.
  • These hardware modules can be implemented, for example, by curing these software modules using a Field Programmable Gate Array (FPGA).
  • FPGA Field Programmable Gate Array
  • the software module can reside in RAM memory, flash memory, ROM memory, EPROM memory, EEPROM memory, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.
  • a storage medium can be coupled to the processor to enable the processor to read information from, and write information to, the storage medium; or the storage medium can be an integral part of the processor.
  • the processor and the storage medium can be located in an ASIC.
  • the software module can be stored in the memory of the mobile terminal or in a memory card that can be inserted into the mobile terminal.
  • the software module can be stored in the MEGA-SIM card or a large-capacity flash memory device.
  • One or more of the functional blocks described with respect to FIG. 1 and/or one or more combinations of functional blocks may be implemented as a general purpose processor, digital signal processor (DSP), dedicated for performing the functions described herein. Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other programmable logic devices, discrete gates or Transistor logic device, discrete hardware component, or any suitable combination thereof.
  • DSP digital signal processor
  • ASICs Integrated Circuits
  • FPGAs Field Programmable Gate Arrays
  • One or more of the functional block diagrams described with respect to FIG. 1 and/or one or more combinations of functional block diagrams may also be implemented as a combination of computing devices, eg, a combination of a DSP and a microprocessor, a plurality of microprocessors, One or more microprocessors or any other such configuration in conjunction with DSP communication.

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Theoretical Computer Science (AREA)
  • Image Analysis (AREA)
  • Traffic Control Systems (AREA)

Abstract

A vehicle wrong-way detection apparatus (100) and method, and an electronic device. According to the apparatus and method, a vehicle trajectory set is established and a vehicle trajectory therein is detected, and it is determined whether each vehicle trajectory is oriented the wrong way according to a proportion, in each vehicle trajectory, of the number of vehicle wrong-way occurrences detected in each image frame to the total number of times of the vehicle being detected, and according to the vector direction of the vehicle trajectory. In the invention, the calculation process is relatively simple, and higher detection accuracy can be obtained.

Description

车辆逆行检测装置及方法、电子设备Vehicle retrograde detecting device and method, electronic device 技术领域Technical field
本发明涉及信息技术领域,尤其涉及一种车辆逆行检测装置及方法、电子设备。The present invention relates to the field of information technology, and in particular, to a vehicle retrograde detecting apparatus and method, and an electronic device.
背景技术Background technique
随着城市化进程的不断推进,视频监控被广泛的应用。智能监控系统相比于传统的人工监控,具有很多优势,例如,能够实现全天连续监视,花费较少且能够保护个人信息。通过智能监控系统检测交通违法行为并通知交通管理人员或警告车辆驾驶员,能够减少和避免交通事故的发生。With the continuous advancement of urbanization, video surveillance is widely used. Compared with traditional manual monitoring, intelligent monitoring systems have many advantages, such as continuous monitoring throughout the day, low cost and protection of personal information. The detection of traffic violations by intelligent monitoring systems and notification to traffic managers or warning of vehicle drivers can reduce and avoid traffic accidents.
车辆逆行是一种常见的交通违法行为,其危害较大,容易造成交通事故。现有的车辆逆行的检测方法一般使用高斯背景检测算法确定图像中的哪部分是目标车辆,然后利用均值漂移以及哈里斯角点(Harris Corner)特征来追踪并判断车辆的行驶方向。Vehicle retrograde is a common traffic violation, which is harmful and easily causes traffic accidents. Existing vehicle retrograde detection methods generally use a Gaussian background detection algorithm to determine which part of the image is the target vehicle, and then use the mean shift and Harris Corner features to track and determine the direction of travel of the vehicle.
应该注意,上面对技术背景的介绍只是为了方便对本发明的技术方案进行清楚、完整的说明,并方便本领域技术人员的理解而阐述的。不能仅仅因为这些方案在本发明的背景技术部分进行了阐述而认为上述技术方案为本领域技术人员所公知。It should be noted that the above description of the technical background is only for the purpose of facilitating a clear and complete description of the technical solutions of the present invention, and is convenient for understanding by those skilled in the art. The above technical solutions are not considered to be well known to those skilled in the art simply because these aspects are set forth in the background section of the present invention.
发明内容Summary of the invention
上述现有的检测方法的计算过程较为复杂,且检测准确度较低。The calculation process of the above existing detection methods is complicated, and the detection accuracy is low.
本发明实施例提供一种车辆逆行检测装置及方法、电子设备,通过建立车辆轨迹集并对其中的车辆轨迹进行检测,根据各个车辆轨迹在各帧图像中检测到车辆逆行的次数与检测到车辆总次数的比例以及车辆轨迹的矢量方向,确定各个车辆轨迹是否逆行,计算过程较为简单,且能够获得较高的检测准确度。Embodiments of the present invention provide a vehicle retrograde detecting apparatus and method, and an electronic device. By establishing a vehicle trajectory set and detecting a vehicle trajectory therein, the number of times the vehicle is retrograde is detected in each frame image according to each vehicle trajectory, and the detected vehicle is detected. The ratio of the total number of times and the vector direction of the vehicle trajectory determine whether each vehicle trajectory is retrograde, the calculation process is relatively simple, and high detection accuracy can be obtained.
根据本发明实施例的第一方面,提供一种车辆逆行检测装置,所述装置用于对监控视频的各帧图像逐帧进行检测,所述装置包括:第一检测单元,其用于检测当前帧图像中的行驶车辆;建立单元,其用于根据检测到的当前帧图像中的行驶车辆,建立当前帧图像的车辆轨迹集;第二检测单元,其用于针对所述当前帧图像的车辆轨迹集中未被确定为逆行的车辆轨迹逐个进行检测,将满足预设条件的车辆轨迹确定为逆行 的车辆轨迹,其中,所述预设条件包括:所述未被确定为逆行的车辆轨迹中在当前帧图像以及之前所有帧图像中检测到车辆的行驶方向与正常行驶方向相反的次数与检测该车辆的行驶方向的总次数的比例大于第一阈值、且所述未被确定为逆行的车辆轨迹的矢量方向与正常行驶方向相反。According to a first aspect of the present invention, there is provided a vehicle retrograde detecting apparatus, wherein the apparatus is configured to detect each frame image of a surveillance video frame by frame, the apparatus comprising: a first detecting unit, configured to detect a current a traveling vehicle in the frame image; an establishing unit for establishing a vehicle track set of the current frame image based on the detected traveling vehicle in the current frame image; a second detecting unit for the vehicle for the current frame image Vehicle trajectories that are not determined to be retrograde in the trajectory set are detected one by one, and the trajectory of the vehicle that satisfies the preset condition is determined as retrograde Vehicle trajectory, wherein the preset condition includes: detecting, in the current frame image and all previous frame images, the number of times the traveling direction of the vehicle is opposite to the normal traveling direction in the vehicle trajectory that is not determined to be retrograde and detecting the The ratio of the total number of times the traveling direction of the vehicle is greater than the first threshold, and the vector direction of the vehicle trajectory that is not determined to be retrograde is opposite to the normal traveling direction.
根据本发明实施例的第二方面,提供一种电子设备,所述电子设备包括根据本发明实施例的第一方面所述的装置。According to a second aspect of an embodiment of the present invention, there is provided an electronic device comprising the apparatus according to the first aspect of the embodiments of the present invention.
根据本发明实施例的第三方面,提供一种车辆逆行检测方法,所述方法用于对监控视频的各帧图像逐帧进行检测,所述方法包括:检测当前帧图像中的行驶车辆;根据检测到的当前帧图像中的行驶车辆,建立当前帧图像的车辆轨迹集;针对所述当前帧图像的车辆轨迹集中未被确定为逆行的车辆轨迹逐个进行检测,将满足预设条件的车辆轨迹确定为逆行的车辆轨迹,其中,所述预设条件包括:所述未被确定为逆行的车辆轨迹中在当前帧图像以及之前所有帧图像中检测到车辆的行驶方向与正常行驶方向相反的次数与检测该车辆的行驶方向的总次数的比例大于第一阈值、且所述未被确定为逆行的车辆轨迹的矢量方向与正常行驶方向相反。According to a third aspect of the present invention, there is provided a vehicle retrograde detection method, the method for detecting each frame image of a surveillance video frame by frame, the method comprising: detecting a traveling vehicle in a current frame image; Detecting the traveling vehicle in the current frame image, establishing a vehicle trajectory set of the current frame image; detecting, for the vehicle trajectory of the current frame image, the vehicle trajectory not determined to be retrograde, detecting the vehicle trajectory satisfying the preset condition Determining a vehicle trajectory that is retrograde, wherein the preset condition includes: detecting, in the vehicle trajectory that is not determined to be retrograde, the number of times the traveling direction of the vehicle is opposite to the normal traveling direction in the current frame image and all previous frame images The ratio of the total number of times of detecting the traveling direction of the vehicle is greater than the first threshold, and the vector direction of the vehicle trajectory not determined to be retrograde is opposite to the normal traveling direction.
本发明的有益效果在于:通过建立车辆轨迹集并对其中的车辆轨迹进行检测,根据各个车辆轨迹在各帧图像中检测到车辆逆行的次数与检测到车辆总次数的比例以及车辆轨迹的矢量方向,确定各个车辆轨迹是否逆行,计算过程较为简单,且能够获得较高的检测准确度。The invention has the beneficial effects of detecting the vehicle trajectory set and detecting the vehicle trajectory therein, detecting the ratio of the number of times the vehicle is retrograde to the total number of detected vehicles and the vector direction of the vehicle trajectory in each frame image according to each vehicle trajectory. To determine whether each vehicle trajectory is retrograde, the calculation process is relatively simple, and high detection accuracy can be obtained.
参照后文的说明和附图,详细公开了本发明的特定实施方式,指明了本发明的原理可以被采用的方式。应该理解,本发明的实施方式在范围上并不因而受到限制。在所附权利要求的精神和条款的范围内,本发明的实施方式包括许多改变、修改和等同。Specific embodiments of the present invention are disclosed in detail with reference to the following description and the drawings, in which <RTIgt; It should be understood that the embodiments of the invention are not limited in scope. The embodiments of the present invention include many variations, modifications, and equivalents within the scope of the appended claims.
针对一种实施方式描述和/或示出的特征可以以相同或类似的方式在一个或更多个其它实施方式中使用,与其它实施方式中的特征相组合,或替代其它实施方式中的特征。Features described and/or illustrated with respect to one embodiment may be used in one or more other embodiments in the same or similar manner, in combination with, or in place of, features in other embodiments. .
应该强调,术语“包括/包含”在本文使用时指特征、整件、步骤或组件的存在,但并不排除一个或更多个其它特征、整件、步骤或组件的存在或附加。It should be emphasized that the term "comprising" or "comprises" or "comprising" or "comprising" or "comprising" or "comprising" or "comprises"
附图说明DRAWINGS
所包括的附图用来提供对本发明实施例的进一步的理解,其构成了说明书的一部 分,用于例示本发明的实施方式,并与文字描述一起来阐释本发明的原理。显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。在附图中:The drawings are included to provide a further understanding of the embodiments of the invention, which constitute a part of the specification The embodiments are illustrated to illustrate the principles of the invention, together with the written description. Obviously, the drawings in the following description are only some of the embodiments of the present invention, and those skilled in the art can obtain other drawings according to the drawings without any inventive labor. In the drawing:
图1是本发明实施例1的车辆逆行检测装置的一示意图;1 is a schematic diagram of a vehicle retrograde detecting device according to Embodiment 1 of the present invention;
图2是本发明实施例1的建立单元102的一示意图;2 is a schematic diagram of an establishing unit 102 according to Embodiment 1 of the present invention;
图3是本发明实施例1的车辆轨迹的一示意图;Figure 3 is a schematic diagram of a vehicle trajectory according to Embodiment 1 of the present invention;
图4是本发明实施例2的电子设备的一示意图;4 is a schematic diagram of an electronic device according to Embodiment 2 of the present invention;
图5是本发明实施例2的电子设备的系统构成的一示意框图;Figure 5 is a schematic block diagram showing the system configuration of an electronic device according to Embodiment 2 of the present invention;
图6是本发明实施例3的车辆逆行检测方法的一示意图。Fig. 6 is a schematic diagram of a vehicle retrograde detecting method according to a third embodiment of the present invention.
具体实施方式detailed description
参照附图,通过下面的说明书,本发明的前述以及其它特征将变得明显。在说明书和附图中,具体公开了本发明的特定实施方式,其表明了其中可以采用本发明的原则的部分实施方式,应了解的是,本发明不限于所描述的实施方式,相反,本发明包括落入所附权利要求的范围内的全部修改、变型以及等同物。The foregoing and other features of the present invention will be apparent from the The specific embodiments of the present invention are disclosed in the specification and the drawings, which are illustrated in the embodiment of the invention The invention includes all modifications, variations and equivalents falling within the scope of the appended claims.
实施例1Example 1
本发明实施例提供一种车辆逆行检测装置,其用于对监控视频的各帧图像逐帧进行检测。图1是本发明实施例1的车辆逆行检测装置的一示意图。如图1所示,该装置100包括:Embodiments of the present invention provide a vehicle retrograde detection apparatus, which is configured to detect each frame image of a surveillance video frame by frame. BRIEF DESCRIPTION OF THE DRAWINGS Fig. 1 is a view showing a vehicle retrograde detecting device according to a first embodiment of the present invention. As shown in FIG. 1, the device 100 includes:
第一检测单元101,其用于检测当前帧图像中的行驶车辆;a first detecting unit 101, configured to detect a traveling vehicle in the current frame image;
建立单元102,其用于根据检测到的当前帧图像中的行驶车辆,建立当前帧图像的车辆轨迹集;An establishing unit 102, configured to establish a vehicle track set of the current frame image according to the detected traveling vehicle in the current frame image;
第二检测单元103,其用于针对当前帧图像的车辆轨迹集中未被确定为逆行的车辆轨迹逐个进行检测,将满足预设条件的车辆轨迹确定为逆行的车辆轨迹,其中,该预设条件包括:未被确定为逆行的车辆轨迹中在当前帧图像以及之前所有帧图像中检测到车辆的行驶方向与正常行驶方向相反的次数与检测该车辆的行驶方向的总次数的比例大于第一阈值、且未被确定为逆行的车辆轨迹的矢量方向与正常行驶方向相反。a second detecting unit 103, configured to detect the vehicle trajectory that is not determined to be retrograde for the vehicle trajectory set of the current frame image, and determine a vehicle trajectory that meets the preset condition as a retrograde vehicle trajectory, wherein the preset condition The ratio of the number of times that the traveling direction of the vehicle is opposite to the normal traveling direction and the total number of times of detecting the traveling direction of the vehicle in the current frame image and all previous frame images in the vehicle trajectory that is not determined to be retrograde is greater than the first threshold. The vector direction of the vehicle trajectory that is not determined to be retrograde is opposite to the normal traveling direction.
由上述实施例可知,通过建立车辆轨迹集并对其中的车辆轨迹进行检测,根据各 个车辆轨迹在各帧图像中检测到车辆逆行的次数与检测到车辆总次数的比例以及车辆轨迹的矢量方向,确定各个车辆轨迹是否逆行,计算过程较为简单,且能够获得较高的检测准确度。It can be seen from the above embodiment that by establishing a vehicle trajectory set and detecting the vehicle trajectory therein, according to each The vehicle trajectory detects the ratio of the number of vehicle retrogrades to the total number of detected vehicles and the vector direction of the vehicle trajectory in each frame image, determines whether each vehicle trajectory is retrograde, the calculation process is relatively simple, and high detection accuracy can be obtained. .
在本实施例中,该监控视频可以根据现有方法而获得。例如,可以通过安装在需要监测区域上方的摄像头而获得。In this embodiment, the surveillance video can be obtained according to existing methods. For example, it can be obtained by installing a camera above the area to be monitored.
在本实施例中,该监控视频的各帧图像可以包括一段时间的监控视频中连续的多帧图像,对各帧图像逐帧进行检测。In this embodiment, each frame image of the surveillance video may include consecutive multi-frame images in the surveillance video for a period of time, and each frame image is detected frame by frame.
在本实施例中,第一检测单元101可以使用分类器检测当前帧图像中的行驶车辆,这样,通过使用分类器检测行驶车辆,相比于现有的逆行检测方法中使用的高斯背景检测算法,使用分类器能够有效提高车辆检出率,防止车辆的漏检。In the present embodiment, the first detecting unit 101 can detect the traveling vehicle in the current frame image using the classifier, and thus, by using the classifier to detect the traveling vehicle, the Gaussian background detection algorithm used in the existing retrograde detecting method is compared. The use of the classifier can effectively improve the vehicle detection rate and prevent the vehicle from being missed.
在本实施例中,该分类器可以是现有类型的分类器,例如,支持向量机(Support Vector Machine,SVM)分类器,贝叶斯分类器等。In this embodiment, the classifier may be an existing type of classifier, for example, a Support Vector Machine (SVM) classifier, a Bayesian classifier, and the like.
在本实施例中,可以检测整个当前帧图像,也可以检测当前帧图像中的预定区域,例如,仅检测图像中的感兴趣区域(Region of Interest,ROI)。In this embodiment, the entire current frame image may be detected, or a predetermined region in the current frame image may be detected, for example, only a Region of Interest (ROI) in the image is detected.
例如,如果当前帧图像仅包含单向车道,那么可以对整个图像进行检测,如果当前帧图像包含双向或多向车道,可以将单向车道所在区域作为ROI区域并对其进行检测。For example, if the current frame image contains only one-way lanes, the entire image can be detected. If the current frame image contains two-way or multi-directional lanes, the area where the one-way lane is located can be used as the ROI area and detected.
在本实施例中,建立单元102用于根据检测到的当前帧图像中的行驶车辆,建立当前帧图像的车辆轨迹集。以下对本实施的建立单元102的结构以及建立车辆轨迹集的方法进行示例性的说明。In this embodiment, the establishing unit 102 is configured to establish a vehicle track set of the current frame image according to the detected traveling vehicle in the current frame image. The structure of the establishing unit 102 of the present embodiment and the method of establishing a vehicle track set are exemplarily described below.
图2是本发明实施例1的建立单元102的一示意图。如图2所示,建立单元102包括:FIG. 2 is a schematic diagram of the establishing unit 102 of Embodiment 1 of the present invention. As shown in FIG. 2, the establishing unit 102 includes:
第一更新单元201,其用于当检测到的当前帧图像中的行驶车辆与前一帧图像的车辆轨迹集中任一个车辆轨迹匹配时,将该行驶车辆添加到该车辆轨迹中;a first updating unit 201, configured to add the traveling vehicle to the vehicle trajectory when the detected traveling vehicle in the current frame image matches any one of the vehicle trajectories of the previous frame image;
新建单元202,其用于当检测到的当前帧图像中的行驶车辆与前一帧图像的车辆轨迹集中任一个车辆轨迹都不匹配时,根据该行驶车辆新建一车辆轨迹;a new unit 202, configured to: when the detected traveling vehicle in the current frame image does not match any of the vehicle trajectories in the vehicle trajectory of the previous frame image, create a new vehicle trajectory according to the traveling vehicle;
第二更新单元203,其用于在当前帧图像中没有检测到前一帧图像的车辆轨迹集中已经建立的车辆轨迹中的车辆时,根据该车辆的平均速度以及正常行驶方向,确定当前帧图像中该车辆的虚拟目标并将该虚拟目标添加到该车辆轨迹中。 a second updating unit 203, configured to determine a current frame image according to an average speed of the vehicle and a normal driving direction when the vehicle in the vehicle trajectory that has been established in the vehicle trajectory set of the previous frame image is not detected in the current frame image The virtual target of the vehicle is added to the vehicle trajectory.
在本实施例中,还可以包括一判断单元(未图示),其用于判断检测到的当前帧图像中的行驶车辆与前一帧图像的车辆轨迹集中任一个车辆轨迹是否匹配,例如,可根据检测到的行驶车辆与车辆轨迹在当前帧图像中的预测位置是否匹配来进行判断。其中,可根据现有方法获得该预测位置。In this embodiment, a determining unit (not shown) is further configured to determine whether the detected vehicle in the current frame image matches any one of the vehicle trajectories in the vehicle trajectory of the previous frame image, for example, The determination may be made based on whether the detected predicted position of the traveling vehicle and the vehicle trajectory in the current frame image matches. Among them, the predicted position can be obtained according to an existing method.
在本实施例中,第二更新单元203用于在当前帧图像中没有检测到前一帧图像的车辆轨迹集中已经建立的车辆轨迹中的车辆时,根据该车辆的平均速度以及正常行驶方向,确定当前帧图像中该车辆的虚拟目标并将该虚拟目标添加到该车辆轨迹中。这样,当追踪的车辆在某些帧中没有被检测到时,通过确定该车辆的虚拟目标并将其添加到车辆轨迹的末尾,能够保证该车辆轨迹的连续性,从而有效提高车辆追踪的鲁棒性。In this embodiment, the second updating unit 203 is configured to: when the vehicle in the vehicle trajectory that has been established in the vehicle trajectory set of the previous frame image is not detected in the current frame image, according to the average speed of the vehicle and the normal traveling direction, A virtual target of the vehicle in the current frame image is determined and added to the vehicle trajectory. In this way, when the tracked vehicle is not detected in some frames, by determining the virtual target of the vehicle and adding it to the end of the vehicle trajectory, the continuity of the vehicle trajectory can be ensured, thereby effectively improving the vehicle tracking. Great.
在本实施例中,例如,将该车辆的平均速度乘以各帧之间的时间间隔,得到该车辆的平均位移,在前一帧检测到的该车辆沿着正常行驶方向前进的平均位移处,即为该虚拟目标的位置。In the present embodiment, for example, multiplying the average speed of the vehicle by the time interval between frames, the average displacement of the vehicle is obtained, and the average displacement of the vehicle traveling in the normal direction of travel detected in the previous frame is obtained. Is the location of the virtual target.
在本实施例中,该车辆的平均速度可以根据该车辆轨迹计算车辆在各帧之间移动的平均速度而获得,而由于图像中单车道的正常行驶方向是已知的,那么该车辆的正常行驶方向应与车道的正常行驶方向一致。In the present embodiment, the average speed of the vehicle can be obtained by calculating the average speed of movement of the vehicle between frames according to the vehicle trajectory, and since the normal traveling direction of the single lane in the image is known, the normality of the vehicle The direction of travel should be consistent with the normal direction of travel of the lane.
在本实施例中,可以将当前帧图像中该车辆的虚拟目标的尺寸设置为与前一帧图像中检测到的该车辆的尺寸相同。In this embodiment, the size of the virtual target of the vehicle in the current frame image may be set to be the same as the size of the vehicle detected in the image of the previous frame.
在本实施例中,在建立单元102建立当前帧图像的车辆轨迹集之后,第二检测单元103用于针对当前帧图像的车辆轨迹集中未被确定为逆行的车辆轨迹逐个进行检测,将满足预设条件的车辆轨迹确定为逆行的车辆轨迹。In this embodiment, after the establishing unit 102 establishes the vehicle trajectory set of the current frame image, the second detecting unit 103 is configured to detect the vehicle trajectory that is not determined to be retrograde for the vehicle trajectory set of the current frame image, and the pre-preparation is satisfied. The conditional vehicle trajectory is determined as a retrograde vehicle trajectory.
在本实施例中,该预设条件包括:未被确定为逆行的车辆轨迹中在当前帧图像以及之前所有帧图像中检测到车辆的行驶方向与正常行驶方向相反的次数与检测该车辆的行驶方向的总次数的比例大于第一阈值、且未被确定为逆行的车辆轨迹的矢量方向与正常行驶方向相反。In this embodiment, the preset condition includes: detecting, in the vehicle frame that is not retrograde, the number of times the traveling direction of the vehicle is opposite to the normal traveling direction in the current frame image and all previous frame images, and detecting the driving of the vehicle. The ratio of the total number of directions is greater than the first threshold, and the vector direction of the vehicle trajectory that is not determined to be retrograde is opposite to the normal traveling direction.
在本实施例中,未被确定为逆行的车辆轨迹的矢量是该车辆轨迹中第一个车辆到最后一个车辆的位移矢量。其中,第一个车辆是首次检测到的该车辆,最后一个车辆是最后一次检测到的该车辆。In the present embodiment, the vector of the vehicle trajectory that is not determined to be retrograde is the displacement vector of the first vehicle to the last vehicle in the vehicle trajectory. Among them, the first vehicle is the first detected vehicle, and the last vehicle is the last detected vehicle.
在本实施例中,第二检测单元103当未被确定为逆行的车辆轨迹中前一个车辆到 相邻的后一个车辆的矢量方向和正常行驶方向相反时,将检测到车辆的行驶方向与正常行驶方向相反的次数加1。In the present embodiment, the second detecting unit 103 arrives at the previous vehicle in the vehicle trajectory that is not determined to be retrograde When the vector direction of the adjacent next vehicle is opposite to the normal traveling direction, the number of times the traveling direction of the vehicle is detected to be opposite to the normal traveling direction is incremented by one.
例如,当前一个车辆到相邻的后一个车辆的矢量方向与正常行驶方向的夹角小于等于90度时,认为该矢量方向与正常行驶方向相同,当该夹角大于90度时,认为该矢量方向与正常行驶方向相反。在本实施例中,判断未被确定为逆行的车辆轨迹的矢量方向与正常行驶方向是否相反可使用相同的方法,此处不再赘述。For example, when the angle between the vector direction of the current vehicle and the adjacent one of the vehicles and the normal traveling direction is less than or equal to 90 degrees, the vector direction is considered to be the same as the normal traveling direction, and when the angle is greater than 90 degrees, the vector is considered as the vector. The direction is opposite to the normal driving direction. In the present embodiment, the same method can be used to determine whether the vector direction of the vehicle trajectory that is not determined to be retrograde is opposite to the normal traveling direction, and details are not described herein again.
在本实施例中,该第一阈值可根据实际需要而设置,例如,该第一阈值为0.3~0.8之间的数值。In this embodiment, the first threshold may be set according to actual needs, for example, the first threshold is a value between 0.3 and 0.8.
以下对本实施例的判断是否满足该预设条件的方法进行示例性的具体说明。The following is a specific description of the method for determining whether the preset condition is satisfied in the embodiment.
图3是本发明实施例1的车辆轨迹的一示意图。如图3所示,车辆轨迹301是当前帧图像的车辆轨迹集中未被确定为逆行的一条车辆轨迹,该车辆轨迹301头部的目标车辆302-1为在当前帧以及之前所有帧图像中首次检测到的该车辆,以此类推,目标车辆302-2至302-7分别为第2次至第7次检测到的同一车辆,方向D为正常行驶方向,该车辆轨迹301的矢量为图3中的矢量A,即为第一个车辆到最后一个(最后一次检测到)车辆的位移矢量,前一个车辆到相邻的后一个车辆的矢量例如为图3中的矢量B,其为从目标车辆302-1到目标车辆302-2的矢量。Figure 3 is a schematic illustration of a vehicle trajectory in accordance with a first embodiment of the present invention. As shown in FIG. 3, the vehicle trajectory 301 is a vehicle trajectory in which the vehicle trajectory set of the current frame image is not determined to be retrograde, and the target vehicle 302-1 of the head of the vehicle trajectory 301 is the first time in the current frame and all previous frame images. The detected vehicle, and so on, the target vehicles 302-2 to 302-7 are the same vehicle detected from the 2nd to the 7th, respectively, and the direction D is the normal traveling direction, and the vector of the vehicle trajectory 301 is FIG. The vector A in the middle is the displacement vector of the vehicle from the first vehicle to the last (last detected), and the vector of the previous vehicle to the next vehicle is, for example, the vector B in Fig. 3, which is the target The vector of the vehicle 302-1 to the target vehicle 302-2.
如图3所示,矢量A的方向与正常行驶方向D相反,前一个车辆到相邻的后一个车辆的矢量方向与正常行驶方向D相反的矢量包括:目标车辆302-1到目标车辆302-2的矢量、目标车辆302-2到目标车辆302-3的矢量、目标车辆302-4到目标车辆302-5的矢量、目标车辆302-6到目标车辆302-7的矢量,共4个矢量;前一个车辆到相邻的后一个车辆的矢量方向与正常行驶方向D相同的矢量包括:目标车辆302-3到目标车辆302-4的矢量以及目标车辆302-5到目标车辆302-6的矢量,共2个矢量。因此,该车辆轨迹301中在当前帧图像以及之前所有帧图像中检测到车辆的行驶方向与正常行驶方向相反的次数为4次,检测该车辆的行驶方向的总次数为4+2=6次,那么,该车辆轨迹301中在当前帧图像以及之前所有帧图像中检测到车辆的行驶方向与正常行驶方向相反的次数与检测该车辆的行驶方向的总次数的比例为4/6=0.67。例如,将第一阈值设为0.6,那么,由于该比例大于第一阈值,且矢量A的方向与正常行驶方向D相反,该车辆轨迹301满足该预设条件,从而被确定为逆行的车辆轨迹。As shown in FIG. 3, the direction of the vector A is opposite to the normal traveling direction D, and the vector in which the vector direction of the preceding vehicle to the adjacent next vehicle is opposite to the normal traveling direction D includes: the target vehicle 302-1 to the target vehicle 302- Vector of 2, vector of target vehicle 302-2 to target vehicle 302-3, vector of target vehicle 302-4 to target vehicle 302-5, vector of target vehicle 302-6 to target vehicle 302-7, a total of 4 vectors The vector in which the vector direction of the previous vehicle to the adjacent next vehicle is the same as the normal traveling direction D includes: a vector of the target vehicle 302-3 to the target vehicle 302-4 and a target vehicle 302-5 to the target vehicle 302-6. Vector, a total of 2 vectors. Therefore, in the vehicle trajectory 301, the number of times the traveling direction of the vehicle is opposite to the normal traveling direction is detected 4 times in the current frame image and all previous frame images, and the total number of times of detecting the traveling direction of the vehicle is 4+2=6 times. Then, the ratio of the number of times the traveling direction of the vehicle is opposite to the normal traveling direction and the total number of times of detecting the traveling direction of the vehicle in the current frame image and all previous frame images in the vehicle trajectory 301 is 4/6=0.67. For example, if the first threshold is set to 0.6, then, since the ratio is greater than the first threshold, and the direction of the vector A is opposite to the normal traveling direction D, the vehicle trajectory 301 satisfies the preset condition, thereby being determined as a retrograde vehicle trajectory. .
在本实施例中,该预设条件还可以包括:未被确定为逆行的车辆轨迹的矢量在该 正常行驶方向上的投影长度与未被确定为逆行的车辆轨迹中最后一个车辆的高度的比例大于第二阈值。也就是说,该预设条件包括:未被确定为逆行的车辆轨迹中在当前帧图像以及之前所有帧图像中检测到车辆的行驶方向与正常行驶方向相反的次数与检测该车辆的行驶方向的总次数的比例大于第一阈值、且未被确定为逆行的车辆轨迹的矢量方向与正常行驶方向相反、且未被确定为逆行的车辆轨迹的矢量在该正常行驶方向上的投影长度与未被确定为逆行的车辆轨迹中最后一个车辆的高度的比例大于第二阈值。In this embodiment, the preset condition may further include: a vector of the vehicle trajectory that is not determined to be retrograde is in the The ratio of the projected length in the normal driving direction to the height of the last vehicle in the vehicle trajectory not determined to be retrograde is greater than the second threshold. That is, the preset condition includes: detecting, in the current frame image and all previous frame images, the number of times the traveling direction of the vehicle is opposite to the normal traveling direction in the vehicle trajectory that is not determined to be retrograde, and detecting the traveling direction of the vehicle. The ratio of the total number of times is greater than the first threshold, and the vector direction of the vehicle trajectory that is not determined to be retrograde is opposite to the normal traveling direction, and the vector of the vehicle trajectory that is not determined to be retrograde in the normal traveling direction is not The ratio of the height of the last vehicle in the vehicle trajectory determined to be retrograde is greater than a second threshold.
这样,通过设置长度比例的条件,能够进一步提高检测的准确度。Thus, by setting the condition of the length ratio, the accuracy of the detection can be further improved.
在本实施例中,该第二阈值可以根据实际需要而设置,例如,该第二阈值为1.8~2.8之间的数值。In this embodiment, the second threshold may be set according to actual needs. For example, the second threshold is a value between 1.8 and 2.8.
例如,在图3中,计算矢量A在方向D上的投影长度,即在竖直方向上的投影长度与车辆轨迹301中最后一个车辆302-7的高度的比例,判断该比例是否大于第二阈值。For example, in FIG. 3, the projection length of the vector A in the direction D, that is, the ratio of the projection length in the vertical direction to the height of the last vehicle 302-7 in the vehicle trajectory 301, is determined to determine whether the ratio is greater than the second. Threshold.
由上述实施例可知,通过建立车辆轨迹集并对其中的车辆轨迹进行检测,根据各个车辆轨迹在各帧图像中检测到车辆逆行的次数与检测到车辆总次数的比例以及车辆轨迹的矢量方向,确定各个车辆轨迹是否逆行,计算过程较为简单,且能够获得较高的检测准确度。It can be seen from the above embodiment that by establishing the vehicle trajectory set and detecting the vehicle trajectory therein, the ratio of the number of times of vehicle retrograde to the total number of detected vehicles and the vector direction of the vehicle trajectory are detected in each frame image according to each vehicle trajectory. It is determined whether the trajectory of each vehicle is retrograde, the calculation process is relatively simple, and high detection accuracy can be obtained.
实施例2Example 2
本发明实施例还提供了一种电子设备,图4是本发明实施例2的电子设备的一示意图。如图4所示,电子设备400包括车辆逆行检测装置401,其中,车辆逆行检测装置401的结构和功能与实施例1中的记载相同,此处不再赘述。An embodiment of the present invention further provides an electronic device, and FIG. 4 is a schematic diagram of the electronic device according to Embodiment 2 of the present invention. As shown in FIG. 4, the electronic device 400 includes a vehicle retrograde detecting device 401. The structure and function of the vehicle retrograde detecting device 401 are the same as those in the first embodiment, and are not described herein again.
图5是本发明实施例2的电子设备的系统构成的一示意框图。如图5所示,电子设备500可以包括中央处理器501和存储器502;存储器502耦合到中央处理器501。该图是示例性的;还可以使用其它类型的结构,来补充或代替该结构,以实现电信功能或其它功能。Fig. 5 is a schematic block diagram showing the system configuration of an electronic apparatus according to a second embodiment of the present invention. As shown in FIG. 5, electronic device 500 can include central processor 501 and memory 502; memory 502 is coupled to central processor 501. The figure is exemplary; other types of structures may be used in addition to or in place of the structure to implement telecommunications functions or other functions.
如图5所示,该电子设备500还可以包括:输入单元503、显示器504、电源505。As shown in FIG. 5, the electronic device 500 may further include an input unit 503, a display 504, and a power source 505.
在一个实施方式中,实施例1所述的车辆逆行检测装置的功能可以被集成到中央处理器501中。例如,中央处理器501可以被配置为:检测当前帧图像中的行驶车辆;根据检测到的当前帧图像中的行驶车辆,建立当前帧图像的车辆轨迹集;针对所述当 前帧图像的车辆轨迹集中未被确定为逆行的车辆轨迹逐个进行检测,将满足预设条件的车辆轨迹确定为逆行的车辆轨迹,其中,所述预设条件包括:所述未被确定为逆行的车辆轨迹中在当前帧图像以及之前所有帧图像中检测到车辆的行驶方向与正常行驶方向相反的次数与检测该车辆的行驶方向的总次数的比例大于第一阈值、且所述未被确定为逆行的车辆轨迹的矢量方向与正常行驶方向相反。In one embodiment, the functions of the vehicle retrograde detecting apparatus described in Embodiment 1 may be integrated into the central processing unit 501. For example, the central processing unit 501 can be configured to: detect a traveling vehicle in the current frame image; establish a vehicle trajectory set of the current frame image according to the detected traveling vehicle in the current frame image; The vehicle trajectory of the previous frame image in which the vehicle trajectory is not determined to be retrograde is detected one by one, and the vehicle trajectory that satisfies the preset condition is determined as a retrograde vehicle trajectory, wherein the preset condition includes: the predetermined condition is not determined as retrograde In the vehicle trajectory, the ratio of the number of times the traveling direction of the vehicle is opposite to the normal traveling direction and the total number of times the traveling direction of the vehicle is detected in the current frame image and all previous frame images is greater than a first threshold, and the said is not determined. The vector direction of the retrograde vehicle trajectory is opposite to the normal driving direction.
例如,所述预设条件包括:所述未被确定为逆行的车辆轨迹中在当前帧图像以及之前所有帧图像中检测到车辆的行驶方向与正常行驶方向相反的次数与检测该车辆的行驶方向的总次数的比例大于第一阈值、所述未被确定为逆行的车辆轨迹的矢量方向与正常行驶方向相反、且所述未被确定为逆行的车辆轨迹的矢量在所述正常行驶方向上的投影长度与所述未被确定为逆行的车辆轨迹中最后一个车辆的高度的比例大于第二阈值。For example, the preset condition includes: detecting, in the vehicle trajectory that is not determined to be retrograde, the number of times the traveling direction of the vehicle is opposite to the normal traveling direction in the current frame image and all previous frame images, and detecting the traveling direction of the vehicle. The ratio of the total number of times is greater than the first threshold, the vector direction of the vehicle trajectory not determined to be retrograde is opposite to the normal traveling direction, and the vector of the vehicle trajectory not determined to be retrograde is in the normal traveling direction The ratio of the projected length to the height of the last vehicle in the vehicle trajectory that is not determined to be retrograde is greater than a second threshold.
例如,所述未被确定为逆行的车辆轨迹的矢量是该车辆轨迹中第一个车辆到最后一个车辆的位移矢量。For example, the vector of the vehicle trajectory that is not determined to be retrograde is the displacement vector of the first vehicle to the last vehicle in the vehicle trajectory.
例如,所述针对所述当前帧图像的车辆轨迹集中未被确定为逆行的车辆轨迹逐个进行检测,包括:当所述未被确定为逆行的车辆轨迹中前一个车辆到相邻的后一个车辆的矢量方向和正常行驶方向相反时,将检测到车辆的行驶方向与正常行驶方向相反的次数加1。For example, the vehicle trajectory of the vehicle trajectory set that is not determined to be retrograde for the current frame image is detected one by one, including: when the vehicle trajectory that is not determined to be retrograde, the previous vehicle to the adjacent one of the vehicles When the vector direction is opposite to the normal traveling direction, the number of times the traveling direction of the vehicle is detected to be opposite to the normal traveling direction is incremented by one.
例如,所述根据检测到的当前帧图像中的行驶车辆,建立当前帧图像的车辆轨迹集,包括:当检测到的当前帧图像中的行驶车辆与前一帧图像的车辆轨迹集中任一个车辆轨迹匹配时,将该行驶车辆添加到该车辆轨迹中;当检测到的当前帧图像中的行驶车辆与前一帧图像的车辆轨迹集中任一个车辆轨迹都不匹配时,根据该行驶车辆新建一车辆轨迹。For example, the establishing a vehicle trajectory set of the current frame image according to the detected traveling vehicle in the current frame image includes: when detecting the vehicle in the current frame image and the vehicle trajectory of the previous frame image is concentrated in any one of the vehicles When the trajectory is matched, the traveling vehicle is added to the vehicle trajectory; when the detected traveling vehicle in the current frame image does not match any of the vehicle trajectories in the vehicle trajectory of the previous frame image, a new one is created according to the traveling vehicle. Vehicle trajectory.
例如,所述根据检测到的当前帧图像中的行驶车辆,建立当前帧图像的车辆轨迹集,还包括:在当前帧图像中没有检测到前一帧图像的车辆轨迹集中已经建立的车辆轨迹中的车辆时,根据该车辆的平均速度以及正常行驶方向,确定当前帧图像中该车辆的虚拟目标并将该虚拟目标添加到该车辆轨迹中。For example, the establishing a vehicle trajectory set of the current frame image according to the detected traveling vehicle in the current frame image further includes: in the vehicle trajectory that has been established in the vehicle trajectory set in which the previous frame image is not detected in the current frame image. The vehicle is determined based on the average speed of the vehicle and the normal traveling direction, and the virtual target of the vehicle in the current frame image is determined and added to the vehicle trajectory.
例如,当前帧图像中该车辆的虚拟目标的尺寸与前一帧图像中检测到的该车辆的尺寸相同。For example, the size of the virtual target of the vehicle in the current frame image is the same as the size of the vehicle detected in the previous frame image.
例如,所述检测当前帧图像中的行驶车辆,包括:使用分类器来检测当前帧图像 中的行驶车辆。For example, the detecting the traveling vehicle in the current frame image includes: using a classifier to detect the current frame image Driving vehicle in the middle.
在另一个实施方式中,实施例1所述的车辆逆行检测装置可以与中央处理器501分开配置,例如可以将车辆逆行检测装置配置为与中央处理器501连接的芯片,通过中央处理器501的控制来实现车辆逆行检测装置的功能。In another embodiment, the vehicle retrograde detecting device described in Embodiment 1 may be configured separately from the central processing unit 501. For example, the vehicle retrograde detecting device may be configured as a chip connected to the central processing unit 501 through the central processing unit 501. Control to realize the function of the vehicle retrograde detecting device.
在本实施例中电子设备500也并不是必须要包括图5中所示的所有部件。It is also not necessary for the electronic device 500 to include all of the components shown in FIG. 5 in this embodiment.
如图5所示,中央处理器501有时也称为控制器或操作控件,可以包括微处理器或其它处理器装置和/或逻辑装置,中央处理器501接收输入并控制电子设备500的各个部件的操作。As shown in FIG. 5, central processor 501, sometimes referred to as a controller or operational control, can include a microprocessor or other processor device and/or logic device that receives input and controls various components of electronic device 500. Operation.
存储器502,例如可以是缓存器、闪存、硬驱、可移动介质、易失性存储器、非易失性存储器或其它合适装置中的一种或更多种。并且中央处理器501可执行该存储器502存储的该程序,以实现信息存储或处理等。其它部件的功能与现有类似,此处不再赘述。电子设备500的各部件可以通过专用硬件、固件、软件或其结合来实现,而不偏离本发明的范围。 Memory 502, for example, can be one or more of a buffer, a flash memory, a hard drive, a removable medium, a volatile memory, a non-volatile memory, or other suitable device. And the central processing unit 501 can execute the program stored in the memory 502 to implement information storage or processing and the like. The functions of other components are similar to those of the existing ones and will not be described here. The various components of electronic device 500 may be implemented by special purpose hardware, firmware, software, or a combination thereof without departing from the scope of the invention.
由上述实施例可知,通过建立车辆轨迹集并对其中的车辆轨迹进行检测,根据各个车辆轨迹在各帧图像中检测到车辆逆行的次数与检测到车辆总次数的比例以及车辆轨迹的矢量方向,确定各个车辆轨迹是否逆行,计算过程较为简单,且能够获得较高的检测准确度。It can be seen from the above embodiment that by establishing the vehicle trajectory set and detecting the vehicle trajectory therein, the ratio of the number of times of vehicle retrograde to the total number of detected vehicles and the vector direction of the vehicle trajectory are detected in each frame image according to each vehicle trajectory. It is determined whether the trajectory of each vehicle is retrograde, the calculation process is relatively simple, and high detection accuracy can be obtained.
实施例3Example 3
本发明实施例还提供一种车辆逆行检测方法,该方法用于对监控视频的各帧图像逐帧进行检测,其对应于实施例1的车辆逆行检测装置。图6是本发明实施例3的车辆逆行检测方法的一示意图。如图6所示,该方法包括:The embodiment of the present invention further provides a vehicle retrograde detection method, which is used for detecting each frame image of a surveillance video frame by frame, which corresponds to the vehicle retrograde detection apparatus of Embodiment 1. Fig. 6 is a schematic diagram of a vehicle retrograde detecting method according to a third embodiment of the present invention. As shown in FIG. 6, the method includes:
步骤601:检测当前帧图像中的行驶车辆;Step 601: detecting a traveling vehicle in the current frame image;
步骤602:根据检测到的当前帧图像中的行驶车辆,建立当前帧图像的车辆轨迹集;Step 602: Establish a vehicle track set of the current frame image according to the detected traveling vehicle in the current frame image.
步骤603:针对当前帧图像的车辆轨迹集中未被确定为逆行的车辆轨迹逐个进行检测,将满足预设条件的车辆轨迹确定为逆行的车辆轨迹,其中,该预设条件包括:未被确定为逆行的车辆轨迹中在当前帧图像以及之前所有帧图像中检测到车辆的行驶方向与正常行驶方向相反的次数与检测该车辆的行驶方向的总次数的比例大于第一阈值、且该未被确定为逆行的车辆轨迹的矢量方向与正常行驶方向相反。 Step 603: The vehicle trajectory of the vehicle trajectory set that is not determined to be retrograde is detected one by one for the current frame image, and the vehicle trajectory that meets the preset condition is determined as a retrograde vehicle trajectory, wherein the preset condition includes: not determined as: The ratio of the number of times the traveling direction of the vehicle is opposite to the normal traveling direction and the total number of times the traveling direction of the vehicle is detected in the current frame image and all previous frame images in the retrograde vehicle trajectory is greater than the first threshold, and the determination is not determined. The vector direction of the retrograde vehicle trajectory is opposite to the normal driving direction.
在本实施例中,步骤601-603中各个步骤的具体实现方法与实施例1中的记载相同,此处不再赘述。In this embodiment, the specific implementation method of each step in steps 601-603 is the same as that in Embodiment 1, and details are not described herein again.
由上述实施例可知,通过建立车辆轨迹集并对其中的车辆轨迹进行检测,根据各个车辆轨迹在各帧图像中检测到车辆逆行的次数与检测到车辆总次数的比例以及车辆轨迹的矢量方向,确定各个车辆轨迹是否逆行,计算过程较为简单,且能够获得较高的检测准确度。It can be seen from the above embodiment that by establishing the vehicle trajectory set and detecting the vehicle trajectory therein, the ratio of the number of times of vehicle retrograde to the total number of detected vehicles and the vector direction of the vehicle trajectory are detected in each frame image according to each vehicle trajectory. It is determined whether the trajectory of each vehicle is retrograde, the calculation process is relatively simple, and high detection accuracy can be obtained.
本发明实施例还提供一种计算机可读程序,其中当在用于车辆逆行检测装置或电子设备中执行所述程序时,所述程序使得计算机在所述车辆逆行检测装置或电子设备中执行实施例3所述的车辆逆行检测方法。Embodiments of the present invention also provide a computer readable program, wherein the program causes a computer to perform an implementation in the vehicle retrograde detecting device or an electronic device when the program is executed in a vehicle retrograde detecting device or an electronic device The vehicle retrograde detection method described in Example 3.
本发明实施例还提供一种存储有计算机可读程序的存储介质,其中所述计算机可读程序使得计算机在车辆逆行检测装置或电子设备中执行实施例3所述的车辆逆行检测方法。The embodiment of the present invention further provides a storage medium storing a computer readable program, wherein the computer readable program causes the computer to execute the vehicle retrograde detection method described in Embodiment 3 in a vehicle retrograde detecting device or an electronic device.
结合本发明实施例描述的在用于车辆逆行检测装置中进行车辆逆行检测的方法可直接体现为硬件、由处理器执行的软件模块或二者组合。例如,图1中所示的功能框图中的一个或多个和/或功能框图的一个或多个组合,既可以对应于计算机程序流程的各个软件模块,亦可以对应于各个硬件模块。这些软件模块,可以分别对应于图6所示的各个步骤。这些硬件模块例如可利用现场可编程门阵列(FPGA)将这些软件模块固化而实现。The method for performing vehicle retrograde detection in a vehicle retrograde detecting apparatus described in connection with the embodiments of the present invention may be directly embodied as hardware, a software module executed by a processor, or a combination of both. For example, one or more of the functional block diagrams shown in FIG. 1 and/or one or more combinations of functional block diagrams may correspond to various software modules of a computer program flow, or to individual hardware modules. These software modules may correspond to the respective steps shown in FIG. 6, respectively. These hardware modules can be implemented, for example, by curing these software modules using a Field Programmable Gate Array (FPGA).
软件模块可以位于RAM存储器、闪存、ROM存储器、EPROM存储器、EEPROM存储器、寄存器、硬盘、移动磁盘、CD-ROM或者本领域已知的任何其它形式的存储介质。可以将一种存储介质耦接至处理器,从而使处理器能够从该存储介质读取信息,且可向该存储介质写入信息;或者该存储介质可以是处理器的组成部分。处理器和存储介质可以位于ASIC中。该软件模块可以存储在移动终端的存储器中,也可以存储在可插入移动终端的存储卡中。例如,若设备(例如移动终端)采用的是较大容量的MEGA-SIM卡或者大容量的闪存装置,则该软件模块可存储在该MEGA-SIM卡或者大容量的闪存装置中。The software module can reside in RAM memory, flash memory, ROM memory, EPROM memory, EEPROM memory, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art. A storage medium can be coupled to the processor to enable the processor to read information from, and write information to, the storage medium; or the storage medium can be an integral part of the processor. The processor and the storage medium can be located in an ASIC. The software module can be stored in the memory of the mobile terminal or in a memory card that can be inserted into the mobile terminal. For example, if a device (such as a mobile terminal) uses a larger capacity MEGA-SIM card or a large-capacity flash memory device, the software module can be stored in the MEGA-SIM card or a large-capacity flash memory device.
针对图1描述的功能框图中的一个或多个和/或功能框图的一个或多个组合,可以实现为用于执行本申请所描述功能的通用处理器、数字信号处理器(DSP)、专用集成电路(ASIC)、现场可编程门阵列(FPGA)或其它可编程逻辑器件、分立门或 晶体管逻辑器件、分立硬件组件、或者其任意适当组合。针对图1描述的功能框图中的一个或多个和/或功能框图的一个或多个组合,还可以实现为计算设备的组合,例如,DSP和微处理器的组合、多个微处理器、与DSP通信结合的一个或多个微处理器或者任何其它这种配置。One or more of the functional blocks described with respect to FIG. 1 and/or one or more combinations of functional blocks may be implemented as a general purpose processor, digital signal processor (DSP), dedicated for performing the functions described herein. Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other programmable logic devices, discrete gates or Transistor logic device, discrete hardware component, or any suitable combination thereof. One or more of the functional block diagrams described with respect to FIG. 1 and/or one or more combinations of functional block diagrams may also be implemented as a combination of computing devices, eg, a combination of a DSP and a microprocessor, a plurality of microprocessors, One or more microprocessors or any other such configuration in conjunction with DSP communication.
以上结合具体的实施方式对本发明进行了描述,但本领域技术人员应该清楚,这些描述都是示例性的,并不是对本发明保护范围的限制。本领域技术人员可以根据本发明的精神和原理对本发明做出各种变型和修改,这些变型和修改也在本发明的范围内。 The present invention has been described in connection with the specific embodiments thereof, and it should be understood by those skilled in the art that A person skilled in the art can make various modifications and changes to the present invention within the scope of the present invention.

Claims (17)

  1. 一种车辆逆行检测装置,所述装置用于对监控视频的各帧图像逐帧进行检测,所述装置包括:A vehicle retrograde detecting device, wherein the device is configured to detect each frame image of a surveillance video frame by frame, the device comprising:
    第一检测单元,其用于检测当前帧图像中的行驶车辆;a first detecting unit, configured to detect a traveling vehicle in the current frame image;
    建立单元,其用于根据检测到的当前帧图像中的行驶车辆,建立当前帧图像的车辆轨迹集;Establishing a unit for establishing a vehicle track set of the current frame image according to the detected traveling vehicle in the current frame image;
    第二检测单元,其用于针对所述当前帧图像的车辆轨迹集中未被确定为逆行的车辆轨迹逐个进行检测,将满足预设条件的车辆轨迹确定为逆行的车辆轨迹,其中,所述预设条件包括:所述未被确定为逆行的车辆轨迹中在当前帧图像以及之前所有帧图像中检测到车辆的行驶方向与正常行驶方向相反的次数与检测该车辆的行驶方向的总次数的比例大于第一阈值、且所述未被确定为逆行的车辆轨迹的矢量方向与正常行驶方向相反。a second detecting unit, configured to detect, for the vehicle trajectory of the current frame image, a vehicle trajectory that is not determined to be retrograde, and determine a vehicle trajectory that meets a preset condition as a retrograde vehicle trajectory, wherein the pre-predetermined The condition includes: a ratio of the number of times the traveling direction of the vehicle is opposite to the normal traveling direction and the total number of times of detecting the traveling direction of the vehicle in the current frame image and all previous frame images in the vehicle trajectory that is not determined to be retrograde A vector direction that is greater than the first threshold and that is not determined to be retrograde is opposite to the normal direction of travel.
  2. 根据权利要求1所述的装置,其中,The device according to claim 1, wherein
    所述预设条件包括:所述未被确定为逆行的车辆轨迹中在当前帧图像以及之前所有帧图像中检测到车辆的行驶方向与正常行驶方向相反的次数与检测该车辆的行驶方向的总次数的比例大于第一阈值、所述未被确定为逆行的车辆轨迹的矢量方向与正常行驶方向相反、且所述未被确定为逆行的车辆轨迹的矢量在所述正常行驶方向上的投影长度与所述未被确定为逆行的车辆轨迹中最后一个车辆的高度的比例大于第二阈值。The preset condition includes: a total number of times that the traveling direction of the vehicle is opposite to the normal traveling direction and the total traveling direction of the vehicle are detected in the current frame image and all previous frame images in the vehicle trajectory that is not determined to be retrograde The ratio of the number of times is greater than the first threshold, the vector direction of the vehicle trajectory that is not determined to be retrograde is opposite to the normal traveling direction, and the projection length of the vector of the vehicle trajectory that is not determined to be retrograde in the normal traveling direction The ratio of the height of the last vehicle in the vehicle trajectory that is not determined to be retrograde is greater than a second threshold.
  3. 根据权利要求1所述的装置,其中,The device according to claim 1, wherein
    所述未被确定为逆行的车辆轨迹的矢量是该车辆轨迹中第一个车辆到最后一个车辆的位移矢量。The vector of the vehicle trajectory that is not determined to be retrograde is the displacement vector of the first vehicle to the last vehicle in the vehicle trajectory.
  4. 根据权利要求1所述的装置,其中,The device according to claim 1, wherein
    所述第二检测单元用于当所述未被确定为逆行的车辆轨迹中前一个车辆到相邻的后一个车辆的矢量方向和正常行驶方向相反时,将检测到车辆的行驶方向与正常行驶方向相反的次数加1。The second detecting unit is configured to detect the traveling direction of the vehicle and the normal driving when the vector direction of the previous vehicle to the adjacent one of the vehicle trajectories not determined to be retrograde is opposite to the normal traveling direction Add 1 to the opposite direction.
  5. 根据权利要求1所述的装置,其中,所述建立单元包括:The apparatus of claim 1 wherein said establishing unit comprises:
    第一更新单元,其用于当检测到的当前帧图像中的行驶车辆与前一帧图像的车辆 轨迹集中任一个车辆轨迹匹配时,将该行驶车辆添加到该车辆轨迹中;a first updating unit for detecting a vehicle in a current frame image and a vehicle in a previous frame image Adding the traveling vehicle to the vehicle trajectory when any one of the trajectories in the trajectory is matched;
    新建单元,其用于当检测到的当前帧图像中的行驶车辆与前一帧图像的车辆轨迹集中任一个车辆轨迹都不匹配时,根据该行驶车辆新建一车辆轨迹。A new unit is configured to newly create a vehicle trajectory according to the traveling vehicle when the detected traveling vehicle in the current frame image does not match any of the vehicle trajectories in the vehicle trajectory of the previous frame image.
  6. 根据权利要求5所述的装置,其中,所述建立单元还包括:The apparatus of claim 5, wherein the establishing unit further comprises:
    第二更新单元,其用于在当前帧图像中没有检测到前一帧图像的车辆轨迹集中已经建立的车辆轨迹中的车辆时,根据该车辆的平均速度以及正常行驶方向,确定当前帧图像中该车辆的虚拟目标并将该虚拟目标添加到该车辆轨迹中。a second updating unit, configured to determine, in the current frame image, according to an average speed of the vehicle and a normal driving direction, when the vehicle in the vehicle trajectory that has been established in the vehicle trajectory set of the previous frame image is not detected in the current frame image The virtual target of the vehicle adds the virtual target to the vehicle trajectory.
  7. 根据权利要求6所述的装置,其中,当前帧图像中该车辆的虚拟目标的尺寸与前一帧图像中检测到的该车辆的尺寸相同。The apparatus of claim 6, wherein the size of the virtual target of the vehicle in the current frame image is the same as the size of the vehicle detected in the previous frame image.
  8. 根据权利要求1所述的装置,其中,第一检测单元使用分类器来检测当前帧图像中的行驶车辆。The apparatus according to claim 1, wherein the first detecting unit uses the classifier to detect the traveling vehicle in the current frame image.
  9. 一种电子设备,所述电子设备包括根据权利要求1所述的装置。An electronic device comprising the apparatus of claim 1.
  10. 一种车辆逆行检测方法,所述方法用于对监控视频的各帧图像逐帧进行检测,所述方法包括:A vehicle retrograde detection method is used for detecting each frame of a surveillance video frame by frame, the method comprising:
    检测当前帧图像中的行驶车辆;Detecting a traveling vehicle in the current frame image;
    根据检测到的当前帧图像中的行驶车辆,建立当前帧图像的车辆轨迹集;Establishing a vehicle track set of the current frame image according to the detected traveling vehicle in the current frame image;
    针对所述当前帧图像的车辆轨迹集中未被确定为逆行的车辆轨迹逐个进行检测,将满足预设条件的车辆轨迹确定为逆行的车辆轨迹,其中,所述预设条件包括:所述未被确定为逆行的车辆轨迹中在当前帧图像以及之前所有帧图像中检测到车辆的行驶方向与正常行驶方向相反的次数与检测该车辆的行驶方向的总次数的比例大于第一阈值、且所述未被确定为逆行的车辆轨迹的矢量方向与正常行驶方向相反。Determining, for the vehicle trajectory of the current frame image, the vehicle trajectory that is not determined to be retrograde, detecting the vehicle trajectory that meets the preset condition as a retrograde vehicle trajectory, wherein the preset condition includes: The ratio of the number of times the traveling direction of the vehicle is detected to be opposite to the normal traveling direction and the total number of times of detecting the traveling direction of the vehicle in the current frame image and all previous frame images in the vehicle track determined to be retrograde is greater than a first threshold, and The vector direction of the vehicle trajectory that is not determined to be retrograde is opposite to the normal traveling direction.
  11. 根据权利要求10所述的方法,其中,The method of claim 10, wherein
    所述预设条件包括:所述未被确定为逆行的车辆轨迹中在当前帧图像以及之前所有帧图像中检测到车辆的行驶方向与正常行驶方向相反的次数与检测该车辆的行驶方向的总次数的比例大于第一阈值、所述未被确定为逆行的车辆轨迹的矢量方向与正常行驶方向相反、且所述未被确定为逆行的车辆轨迹的矢量在所述正常行驶方向上的投影长度与所述未被确定为逆行的车辆轨迹中最后一个车辆的高度的比例大于第二阈值。The preset condition includes: a total number of times that the traveling direction of the vehicle is opposite to the normal traveling direction and the total traveling direction of the vehicle are detected in the current frame image and all previous frame images in the vehicle trajectory that is not determined to be retrograde The ratio of the number of times is greater than the first threshold, the vector direction of the vehicle trajectory that is not determined to be retrograde is opposite to the normal traveling direction, and the projection length of the vector of the vehicle trajectory that is not determined to be retrograde in the normal traveling direction The ratio of the height of the last vehicle in the vehicle trajectory that is not determined to be retrograde is greater than a second threshold.
  12. 根据权利要求10所述的方法,其中, The method of claim 10, wherein
    所述未被确定为逆行的车辆轨迹的矢量是该车辆轨迹中第一个车辆到最后一个车辆的位移矢量。The vector of the vehicle trajectory that is not determined to be retrograde is the displacement vector of the first vehicle to the last vehicle in the vehicle trajectory.
  13. 根据权利要求10所述的方法,其中,所述针对所述当前帧图像的车辆轨迹集中未被确定为逆行的车辆轨迹逐个进行检测,包括:The method according to claim 10, wherein the vehicle trajectory of the vehicle trajectory set that is not determined to be retrograde for the current frame image is detected one by one, including:
    当所述未被确定为逆行的车辆轨迹中前一个车辆到相邻的后一个车辆的矢量方向和正常行驶方向相反时,将检测到车辆的行驶方向与正常行驶方向相反的次数加1。When the vector direction of the previous vehicle to the adjacent one of the vehicle trajectories not determined to be retrograde is opposite to the normal traveling direction, the number of times the traveling direction of the vehicle is detected to be opposite to the normal traveling direction is incremented by one.
  14. 根据权利要求10所述的方法,其中,所述根据检测到的当前帧图像中的行驶车辆,建立当前帧图像的车辆轨迹集,包括:The method of claim 10, wherein the establishing a vehicle trajectory set of the current frame image based on the detected traveling vehicle in the current frame image comprises:
    当检测到的当前帧图像中的行驶车辆与前一帧图像的车辆轨迹集中任一个车辆轨迹匹配时,将该行驶车辆添加到该车辆轨迹中;Adding the traveling vehicle to the vehicle trajectory when the detected traveling vehicle in the current frame image matches any one of the vehicle trajectories in the vehicle trajectory of the previous frame image;
    当检测到的当前帧图像中的行驶车辆与前一帧图像的车辆轨迹集中任一个车辆轨迹都不匹配时,根据该行驶车辆新建一车辆轨迹。When the detected traveling vehicle in the current frame image does not match any of the vehicle trajectories in the vehicle trajectory of the previous frame image, a new vehicle trajectory is created according to the traveling vehicle.
  15. 根据权利要求14所述的方法,其中,所述根据检测到的当前帧图像中的行驶车辆,建立当前帧图像的车辆轨迹集,还包括:The method of claim 14, wherein the establishing a vehicle trajectory set of the current frame image based on the detected traveling vehicle in the current frame image further comprises:
    在当前帧图像中没有检测到前一帧图像的车辆轨迹集中已经建立的车辆轨迹中的车辆时,根据该车辆的平均速度以及正常行驶方向,确定当前帧图像中该车辆的虚拟目标并将该虚拟目标添加到该车辆轨迹中。When the vehicle in the vehicle trajectory that has been established in the vehicle trajectory set of the previous frame image is not detected in the current frame image, the virtual target of the vehicle in the current frame image is determined according to the average speed of the vehicle and the normal traveling direction, and the A virtual target is added to the vehicle trajectory.
  16. 根据权利要求15所述的方法,其中,当前帧图像中该车辆的虚拟目标的尺寸与前一帧图像中检测到的该车辆的尺寸相同。The method of claim 15, wherein the size of the virtual target of the vehicle in the current frame image is the same as the size of the vehicle detected in the previous frame image.
  17. 根据权利要求10所述的方法,其中,所述检测当前帧图像中的行驶车辆,包括:The method of claim 10 wherein said detecting a traveling vehicle in the current frame image comprises:
    使用分类器来检测当前帧图像中的行驶车辆。 A classifier is used to detect the traveling vehicle in the current frame image.
PCT/CN2016/102168 2016-10-14 2016-10-14 Vehicle wrong-way detection apparatus and method, and electronic device WO2018068317A1 (en)

Priority Applications (3)

Application Number Priority Date Filing Date Title
CN201680088977.0A CN109661667A (en) 2016-10-14 2016-10-14 The retrograde detection device of vehicle and method, electronic equipment
PCT/CN2016/102168 WO2018068317A1 (en) 2016-10-14 2016-10-14 Vehicle wrong-way detection apparatus and method, and electronic device
JP2019518295A JP2019532431A (en) 2016-10-14 2016-10-14 Vehicular retrograde detection device, detection method, and electronic apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2016/102168 WO2018068317A1 (en) 2016-10-14 2016-10-14 Vehicle wrong-way detection apparatus and method, and electronic device

Publications (1)

Publication Number Publication Date
WO2018068317A1 true WO2018068317A1 (en) 2018-04-19

Family

ID=61904923

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/102168 WO2018068317A1 (en) 2016-10-14 2016-10-14 Vehicle wrong-way detection apparatus and method, and electronic device

Country Status (3)

Country Link
JP (1) JP2019532431A (en)
CN (1) CN109661667A (en)
WO (1) WO2018068317A1 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109948417A (en) * 2018-12-31 2019-06-28 上海眼控科技股份有限公司 A kind of vehicle based on deep learning drives in the wrong direction illegal automatic auditing method
CN111611938A (en) * 2020-05-22 2020-09-01 浙江大华技术股份有限公司 Method and device for determining reverse direction
CN112069944A (en) * 2020-08-25 2020-12-11 青岛海信网络科技股份有限公司 Road congestion level determination method
CN115762152A (en) * 2022-11-11 2023-03-07 北京紫光展锐通信技术有限公司 Vehicle retrograde motion detection method, device, system, vehicle and medium

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111126171A (en) * 2019-12-04 2020-05-08 江西洪都航空工业集团有限责任公司 Vehicle reverse running detection method and system
CN111341120A (en) * 2019-12-04 2020-06-26 上海悦骑智能科技有限公司 Vehicle reverse running detection method and system and vehicle
CN111611901B (en) * 2020-05-15 2023-10-03 北京百度网讯科技有限公司 Vehicle reverse running detection method, device, equipment and storage medium
CN113570877B (en) * 2021-06-22 2022-09-23 淮阴工学院 Non-motor vehicle retrograde detection device and detection method
CN113602264B (en) * 2021-08-17 2023-02-28 北京市商汤科技开发有限公司 Vehicle driving behavior detection method, device, equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004234486A (en) * 2003-01-31 2004-08-19 Matsushita Electric Ind Co Ltd Vehicle backward traveling detector
CN103226834A (en) * 2013-03-26 2013-07-31 长安大学 Quick search method for target character points of image motion
CN104464305A (en) * 2014-12-11 2015-03-25 天津艾思科尔科技有限公司 Intelligent vehicle converse driving detecting device and method
CN104809470A (en) * 2015-04-23 2015-07-29 杭州中威电子股份有限公司 Vehicle converse running detection device and method based on SVM
CN105354529A (en) * 2015-08-04 2016-02-24 北京时代云英科技有限公司 Vehicle converse running detection method and apparatus

Family Cites Families (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH08145707A (en) * 1994-11-16 1996-06-07 Sumitomo Electric Ind Ltd Path travel judging device
JPH10269492A (en) * 1997-03-25 1998-10-09 Omron Corp Vehicle monitoring device
JP2001229488A (en) * 2000-02-15 2001-08-24 Hitachi Ltd Vehicle tracking method and traffic state tracking device
US8843244B2 (en) * 2006-10-06 2014-09-23 Irobot Corporation Autonomous behaviors for a remove vehicle
CN102142200B (en) * 2009-12-17 2014-04-30 株式会社电装 Retrograde-motion preventing system for vehicle
JP5597454B2 (en) * 2010-06-17 2014-10-01 東芝テリー株式会社 Abnormal traveling vehicle detection system and road monitoring program
CN102081844A (en) * 2011-01-25 2011-06-01 华中科技大学 Traffic video behavior analyzing and alarming server
CN104239309A (en) * 2013-06-08 2014-12-24 华为技术有限公司 Video analysis retrieval service side, system and method
CN103325255B (en) * 2013-06-29 2016-01-20 佘若凡 The method of region transportation situation detection is carried out based on photogrammetric technology
CN103605362B (en) * 2013-09-11 2016-03-02 天津工业大学 Based on motor pattern study and the method for detecting abnormality of track of vehicle multiple features
WO2015159412A1 (en) * 2014-04-17 2015-10-22 株式会社日立システムズ Moving-body detection method and moving-body detection system
CN103971521B (en) * 2014-05-19 2016-06-29 清华大学 Road traffic anomalous event real-time detection method and device
JP6428066B2 (en) * 2014-09-05 2018-11-28 オムロン株式会社 Scoring device and scoring method
CN104809887B (en) * 2015-04-23 2018-03-16 杭州中威电子股份有限公司 A kind of retrograde detection method of vehicle on expressway and autoalarm
CN204613981U (en) * 2015-04-23 2015-09-02 杭州中威电子股份有限公司 A kind of vehicle based on SVM drives in the wrong direction pick-up unit
CN105629333A (en) * 2015-12-27 2016-06-01 安徽皖通科技股份有限公司 Road weather detection method based on video
CN106022243B (en) * 2016-05-13 2019-02-26 浙江大学 A kind of retrograde recognition methods of the car lane vehicle based on image procossing

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004234486A (en) * 2003-01-31 2004-08-19 Matsushita Electric Ind Co Ltd Vehicle backward traveling detector
CN103226834A (en) * 2013-03-26 2013-07-31 长安大学 Quick search method for target character points of image motion
CN104464305A (en) * 2014-12-11 2015-03-25 天津艾思科尔科技有限公司 Intelligent vehicle converse driving detecting device and method
CN104809470A (en) * 2015-04-23 2015-07-29 杭州中威电子股份有限公司 Vehicle converse running detection device and method based on SVM
CN105354529A (en) * 2015-08-04 2016-02-24 北京时代云英科技有限公司 Vehicle converse running detection method and apparatus

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109948417A (en) * 2018-12-31 2019-06-28 上海眼控科技股份有限公司 A kind of vehicle based on deep learning drives in the wrong direction illegal automatic auditing method
CN111611938A (en) * 2020-05-22 2020-09-01 浙江大华技术股份有限公司 Method and device for determining reverse direction
CN111611938B (en) * 2020-05-22 2023-08-29 浙江大华技术股份有限公司 Retrograde direction determining method and device
CN112069944A (en) * 2020-08-25 2020-12-11 青岛海信网络科技股份有限公司 Road congestion level determination method
CN112069944B (en) * 2020-08-25 2024-04-05 青岛海信网络科技股份有限公司 Road congestion level determining method
CN115762152A (en) * 2022-11-11 2023-03-07 北京紫光展锐通信技术有限公司 Vehicle retrograde motion detection method, device, system, vehicle and medium

Also Published As

Publication number Publication date
JP2019532431A (en) 2019-11-07
CN109661667A (en) 2019-04-19

Similar Documents

Publication Publication Date Title
WO2018068317A1 (en) Vehicle wrong-way detection apparatus and method, and electronic device
US20200097756A1 (en) Object detection device and object detection method
CN110047276B (en) Method and device for determining congestion state of obstacle vehicle and related product
JP2020527263A (en) Visual positioning methods, devices, electronics and systems
CN112509364B (en) Method and device for determining parking state of vehicle, computer equipment and storage medium
US20190281235A1 (en) Camera Device and Method for Capturing a Surrounding Region of a Vehicle in a Situation-Adapted Manner
WO2022227766A1 (en) Traffic anomaly detection method and apparatus
CN105513342A (en) Video-tracking-based vehicle queuing length calculating method
US11037301B2 (en) Target object detection method, readable storage medium, and electronic device
KR20210038852A (en) Method, apparatus, electronic device, computer readable storage medium and computer program for early-warning
CN103886763B (en) One utilizes video tracking technology to realize hypervelocity illegal activities photographic method and system
WO2023019936A1 (en) Vehicle driving behavior detection method and apparatus, and device and storage medium
CN109766867B (en) Vehicle running state determination method and device, computer equipment and storage medium
JP2012003549A (en) Abnormal-driving vehicle detection system and road monitoring program
WO2020048156A1 (en) Method and apparatus for counting vehicle flow, computing device, and computer readable storage medium
CN111951598A (en) Vehicle tracking monitoring method, device and system
US9245342B2 (en) Obstacle detection device
CN113392680B (en) Road identification device and method and electronic equipment
US11021105B2 (en) Bird&#39;s-eye view video generation device, bird&#39;s-eye view video generation method, and non-transitory storage medium
US20200273145A1 (en) Method and apparatus for performing object detection and electronic device
KR102169910B1 (en) A vehicle driving behavior analysis system using images by uav
CN107255470B (en) Obstacle detection device
CN110556003A (en) method, device, equipment and storage medium for monitoring speed of trackless rubber-tyred vehicle
US20220227358A1 (en) Map-based target heading disambiguation
KR20220036240A (en) Traffic information analysis apparatus and method

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 16918960

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2019518295

Country of ref document: JP

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 16918960

Country of ref document: EP

Kind code of ref document: A1