WO2018068312A1 - 交通异常事件检测装置及方法 - Google Patents
交通异常事件检测装置及方法 Download PDFInfo
- Publication number
- WO2018068312A1 WO2018068312A1 PCT/CN2016/102157 CN2016102157W WO2018068312A1 WO 2018068312 A1 WO2018068312 A1 WO 2018068312A1 CN 2016102157 W CN2016102157 W CN 2016102157W WO 2018068312 A1 WO2018068312 A1 WO 2018068312A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- legacy
- foreground
- foreground block
- block
- motion
- Prior art date
Links
- 230000002159 abnormal effect Effects 0.000 title claims abstract description 67
- 238000000034 method Methods 0.000 title claims abstract description 61
- 230000033001 locomotion Effects 0.000 claims abstract description 133
- 238000001514 detection method Methods 0.000 claims abstract description 122
- 230000006870 function Effects 0.000 claims abstract description 108
- 238000012545 processing Methods 0.000 claims abstract description 50
- 238000001914 filtration Methods 0.000 claims description 21
- 230000005856 abnormality Effects 0.000 claims description 14
- 230000008569 process Effects 0.000 claims description 9
- 238000000605 extraction Methods 0.000 abstract description 10
- 238000011897 real-time detection Methods 0.000 abstract description 8
- 238000010586 diagram Methods 0.000 description 36
- 238000004364 calculation method Methods 0.000 description 13
- 238000012544 monitoring process Methods 0.000 description 8
- 239000000284 extract Substances 0.000 description 4
- 238000012986 modification Methods 0.000 description 3
- 230000004048 modification Effects 0.000 description 3
- 238000003672 processing method Methods 0.000 description 3
- 238000012706 support-vector machine Methods 0.000 description 2
- 206010039203 Road traffic accident Diseases 0.000 description 1
- 230000003542 behavioural effect Effects 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 238000004590 computer program Methods 0.000 description 1
- 238000007405 data analysis Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000009545 invasion Effects 0.000 description 1
- 239000002245 particle Substances 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G08—SIGNALLING
- G08G—TRAFFIC CONTROL SYSTEMS
- G08G1/00—Traffic control systems for road vehicles
- G08G1/01—Detecting movement of traffic to be counted or controlled
-
- G—PHYSICS
- G08—SIGNALLING
- G08G—TRAFFIC CONTROL SYSTEMS
- G08G1/00—Traffic control systems for road vehicles
- G08G1/01—Detecting movement of traffic to be counted or controlled
- G08G1/017—Detecting movement of traffic to be counted or controlled identifying vehicles
Definitions
- the present invention relates to the field of information technology, and in particular, to a device and method for detecting traffic anomaly events.
- Common traffic anomalies include: lane intrusion, illegal parking, and road anomalies.
- the lane intrusion includes, for example, a non-motor vehicle or a pedestrian invading a motor vehicle lane
- the illegal parking includes, for example, a vehicle parked at an illegal parking position such as a roadway or a bicycle lane
- the road abnormality includes, for example, other objects left on the road that are not vehicles.
- Existing detection methods generally include three steps: foreground detection, target tracking, and event judgment and alarm.
- the foreground detection can be based on motion, background-based model and based on prior knowledge; target tracking can match the current frame and the target of the previous frame after acquiring the foreground target, and establish a space-time continuous relationship.
- the common method is MeanShift. Algorithms, Kalman filtering, particle filtering, etc.; event judgments and alarms are used to determine event types and alarms. Common methods are to use basic data analysis to count target density and target type for judgment, or to extract speed and direction information. The overall behavioral judgment of the target, or by identifying local actions or gestures.
- the above existing motion and background-based foreground detection methods are not suitable for slow or stationary targets, and the foreground detection based on prior knowledge is computationally intensive and non-universal.
- the above existing target tracking method The event judging method has a complicated processing process and high operating cost, and is not suitable for processing a large amount of real-time monitoring data.
- the detection functions of these existing methods are single.
- Embodiments of the present invention provide a traffic abnormal event detecting apparatus and method, which can implement different detecting functions for different areas, provide diverse services, and perform corresponding extraction and processing according to set functions in each area. , can effectively reduce the amount of calculation, so as to meet the needs of real-time detection.
- a traffic abnormal event detecting apparatus comprising: a setting unit for respectively setting a detecting function of at least two predetermined areas in an input image, wherein each predetermined The detection function of the area is set to be different or the same; the extraction unit is configured to respectively extract the motion foreground and/or the legacy foreground in each predetermined area according to the detection function respectively set by each predetermined area; the processing unit is used for The extracted motion foreground and/or legacy foreground are processed in respective predetermined areas, and traffic abnormal event detection results corresponding to the detection functions set by the respective predetermined areas are obtained.
- a traffic abnormal event detecting method comprising: respectively setting a detecting function of at least two predetermined areas in an input image, wherein a detecting function of each predetermined area is set Different or identical; according to the detection function respectively set by each predetermined area, the motion foreground and/or the legacy foreground are respectively extracted in each predetermined area; and the extracted motion foreground and/or the legacy foreground are respectively processed in each predetermined area, A traffic abnormal event detection result corresponding to the detection function set in each predetermined area is obtained.
- the present invention has an advantageous effect of obtaining a detection function of at least two predetermined areas in an input image, and extracting a motion foreground and/or a legacy foreground according to the set detection function in each predetermined area, respectively, for processing.
- a detection function of at least two predetermined areas in an input image and extracting a motion foreground and/or a legacy foreground according to the set detection function in each predetermined area, respectively, for processing.
- Corresponding to the detection result of the set detection function it is possible to realize different detection functions for different areas, provide diverse services, and, due to corresponding extraction and processing according to the set functions in each area, Effectively reduce the amount of calculations to meet the needs of real-time detection.
- FIG. 1 is a schematic diagram of a traffic abnormal event detecting apparatus according to Embodiment 1 of the present invention.
- FIG. 2 is a schematic diagram of an extracting unit 102 according to Embodiment 1 of the present invention.
- FIG. 3 is a schematic diagram of an input image according to Embodiment 1 of the present invention.
- FIG. 4 is a schematic diagram of a foreground of motion in a predetermined area extracted from the input image according to Embodiment 1 of the present invention.
- FIG. 5 is a schematic diagram of a legacy foreground in a predetermined area extracted from the input image according to Embodiment 1 of the present invention.
- FIG. 6 is a schematic diagram of a processing unit 103 according to Embodiment 1 of the present invention.
- FIG. 7 is a schematic diagram of a first filtering unit 604 according to Embodiment 1 of the present invention.
- FIG. 8 is a schematic diagram of a first determining unit 701 according to Embodiment 1 of the present invention.
- Figure 9 is a schematic view showing a legacy mask of Embodiment 1 of the present invention.
- Figure 10 is another schematic diagram of an input image of Embodiment 1 of the present invention.
- FIG. 11 is a schematic diagram of a second determining unit 702 according to Embodiment 1 of the present invention.
- FIG. 12 is a schematic diagram of a third determining unit 703 according to Embodiment 1 of the present invention.
- FIG. 13 is a schematic diagram of a determining unit 606 according to Embodiment 1 of the present invention.
- FIG. 14 is a schematic diagram of an electronic device according to Embodiment 2 of the present invention.
- FIG. 15 is a schematic block diagram showing the system configuration of an electronic device according to Embodiment 2 of the present invention.
- FIG. 16 is a schematic diagram of a method for detecting a traffic abnormal event according to Embodiment 3 of the present invention.
- Figure 17 is a diagram showing a method of detecting a traffic abnormal event according to Embodiment 4 of the present invention.
- the device 100 includes:
- a setting unit 101 configured to respectively set a detection function of at least two predetermined areas in the input image, wherein the detection functions of the respective predetermined areas are set to be different or the same;
- An extracting unit 102 configured to respectively extract a motion foreground and/or a legacy foreground in each predetermined area according to a detection function respectively set in each predetermined area;
- the processing unit 103 is configured to respectively process the extracted motion foreground and/or the legacy foreground in each predetermined area, and obtain a traffic abnormal event detection result corresponding to the detection function set by each predetermined area.
- the detection function of at least two predetermined areas in the input image is respectively set, and the motion foreground and/or the legacy foreground are respectively extracted according to the set detection function in each predetermined area, and processed to obtain a correspondence.
- the detection result of the set detection function enables different detection functions to be realized for different areas, provides diverse services, and can be effectively extracted and processed according to the set functions in each area. Reduce the amount of calculations to meet the needs of real-time detection.
- the input image may be a surveillance image, which may be obtained according to existing methods. For example, it can be obtained by installing a camera above the area to be monitored.
- the input image may include a frame image, and may also include a multi-frame image in the surveillance video.
- the detection can be performed frame by frame.
- the setting unit 101 is configured to respectively set detection functions of at least two predetermined areas in the input image, and the detection functions of the respective predetermined areas are set to be different or the same. That is to say, the detection functions of the respective predetermined areas are independently set, which can be set according to the characteristics and needs of the respective predetermined areas.
- the detection function of detecting the lane intrusion and the road abnormality may be set, and the detection function of the illegal parking may be set for the area of the non-motor vehicle lane in the monitoring image.
- the predetermined area may be set according to actual needs, for example, the predetermined area is a Region of Interest (ROI).
- ROI Region of Interest
- the setting unit 101 can set the detection function of each predetermined area by, for example, the following method:
- Marking is set for each pixel in the input image to indicate the detection function of the pixel opening, for example, marking with an integer corresponding to a three-digit binary number, and the binary digits of the three digits respectively indicate lane intrusion detection and road abnormality. Detection and illegal parking detection, with “0” means that the detection function is not open, and “1” means that the detection function is opened. For example, the mark of a certain pixel is an integer "6", and the corresponding binary number is "110". Thus, the detection function indicating that the pixel is open is lane intrusion detection and road anomaly detection. After each pixel point is marked, an area composed of a plurality of consecutive pixel points having the same detection function is a predetermined area in which the detection function is set.
- the extraction unit 102 is configured to separately extract the motion foreground and/or the legacy foreground in each predetermined area according to the detection functions respectively set in the respective predetermined areas.
- the extraction unit 102 extracts the motion foreground and/or the legacy foreground in a predetermined area using existing methods.
- the structure of the extraction unit 102 of the present embodiment and the method of extracting the motion foreground and/or the legacy foreground are exemplarily described below.
- FIG. 2 is a schematic diagram of an extracting unit 102 according to Embodiment 1 of the present invention. As shown in FIG. 2, the extracting unit 102 includes:
- a first establishing unit 201 configured to establish a background model and a background cache
- a first updating unit 202 configured to update the background model according to a matching result of a current frame of the input image and the background model
- a first extracting unit 203 configured to extract the motion foreground according to the current frame of the input image and the updated background model
- a second updating unit 204 configured to update a pixel value of a corresponding pixel in the background buffer according to a case where each pixel in the current frame of the input image changes to a foreground pixel;
- the second extracting unit 205 is configured to extract the legacy foreground according to the current frame of the input image and the updated background buffer.
- the extraction operation can be performed simultaneously.
- the input image includes three predetermined regions, wherein the first predetermined region and the second predetermined region need to extract a motion foreground, and the third predetermined region needs to extract a motion foreground and a legacy foreground.
- the motion foreground of the three predetermined areas is extracted.
- FIG. 3 is a schematic diagram of an input image according to Embodiment 1 of the present invention
- FIG. 4 is a schematic diagram of a motion foreground in a predetermined area extracted from the input image according to Embodiment 1 of the present invention
- FIG. 5 is a schematic diagram of Embodiment 1 of the present invention.
- the extracted foreground may be a moving object such as a non-motor vehicle or a pedestrian, and the extracted foreground may be an illegally parked vehicle or an object left on the road.
- the processing unit 103 is configured to separately perform the extracted motion foreground and/or the legacy foreground in each predetermined area. Processing, obtaining a traffic abnormal event detection result corresponding to the detection function set in each predetermined area.
- the configuration and processing method of the processing unit 103 of the present embodiment will be exemplarily described below.
- FIG. 6 is a schematic diagram of a processing unit 103 according to Embodiment 1 of the present invention. As shown in FIG. 6, the processing unit 103 includes:
- a first processing unit 601 configured to perform binarization processing on the extracted motion foreground and/or legacy foreground in each predetermined area of the current frame of the input image to obtain a motion mask and/or a legacy mask;
- a clustering unit 602 configured to cluster the motion mask and/or the legacy mask of the current frame to obtain a motion foreground block and/or a legacy foreground block of the current frame;
- the matching unit 603 is configured to match the current foreground frame and the motion foreground block and/or the legacy foreground block in the previous frame of the current frame, and update the motion foreground block and/or the legacy foreground block of the current frame according to the matching result. information;
- a first filtering unit 604 is configured to remove motion foreground blocks of the current frame and/or ghosts in the legacy foreground block.
- the first processing unit 601 may perform binarization processing on the extracted motion foreground and/or legacy foreground using an existing method.
- the clustering unit 602 is configured to cluster the motion mask and/or the legacy mask of the current frame, for example, first detecting the contours of the motion mask and/or the remaining mask, and then applying the contours.
- Clustering is a moving foreground block and/or a legacy foreground block.
- the clustering may use existing methods, for example, clustering according to the distance between each contour center point, and for the legacy foreground block, according to the number of occurrences in the current frame and all previous frames. Perform clustering.
- the matching unit 603 is configured to match the current foreground frame and the motion foreground block and/or the legacy foreground block in the previous frame of the current frame, and update the motion foreground block of the current frame according to the matching result and/or Legacy prospects Block information.
- matching and updating can be performed using existing methods, for example, using distance features to match the current foreground and moving foreground blocks and/or legacy foreground blocks in the previous frame of the current frame, updating the matching motion foreground blocks And/or the information of the legacy foreground block, for the unmatched motion foreground block and/or the legacy foreground block, a new ID and other parameters can be assigned.
- the first filtering unit 604 is configured to remove ghosts in the motion foreground block and/or the legacy foreground block of the current frame.
- the ghost in the motion foreground block and/or the legacy foreground block may include at least one of: a ghost caused by the object leaving, a ghost caused by the movement of the light, and a ghost caused by the reflection of the puddle.
- the structure of the filter unit 604 of the present embodiment and the method of removing ghosts are exemplified below.
- FIG. 7 is a schematic diagram of a first filtering unit 604 according to Embodiment 1 of the present invention. As shown in FIG. 7, the first filtering unit 604 includes:
- a first determining unit 701 configured to determine a ghost in the legacy foreground block caused by the object leaving
- a second determining unit 702 configured to determine a ghost caused by the movement of the light in the moving foreground block
- a third determining unit 703, configured to determine a ghost caused by puddle reflection
- a removal unit 704 is used to remove the determined ghosts.
- the first filtering unit 604 may include at least one of the first determining unit 701, the second determining unit 702, and the third determining unit 703.
- the structure of the first determining unit 701, the second determining unit 702, and the third determining unit 703 and the method of determining ghosts are respectively exemplarily described below.
- FIG. 8 is a schematic diagram of a first determining unit 701 according to Embodiment 1 of the present invention. As shown in FIG. 8, the first determining unit 701 includes:
- a first calculating unit 801 configured to calculate a first average pixel value of a plurality of pixel points on an edge of the circumscribed rectangle of the legacy foreground block;
- a second processing unit 802 configured to binarize an area in the circumscribed rectangle corresponding to the legacy foreground block in the input image according to the first average pixel value, to obtain a first binarized image
- a fourth determining unit 803 configured to: when the area of the overlapping area of the first binarized image and the legacy mask is small At the first threshold, the legacy foreground block is determined to be a ghost caused by the departure of the object.
- Figure 9 is a schematic view showing a remaining mask of Embodiment 1 of the present invention.
- the legacy mask has a legacy foreground block 901 having a circumscribed rectangle 902.
- the first calculating unit 801 is configured to calculate a first average pixel value of a plurality of pixel points on an edge of the circumscribed rectangle of the legacy foreground block. For example, the average pixel value of 12 pixel points on the side of the circumscribed rectangle 902 in FIG. 9 is calculated as the first average pixel value.
- the number of pixel points can be set according to actual needs, and the selected pixel points can be randomly selected.
- the second processing unit 802 is configured to binarize an area in the circumscribed rectangle corresponding to the legacy foreground block in the input image according to the first average pixel value to obtain a first binarized image.
- Figure 10 is another schematic diagram of an input image of Embodiment 1 of the present invention. As shown in FIG. 10, the input image has a region 1001 in the circumscribed rectangle 902 corresponding to the legacy foreground block 901 shown in FIG. 9, and the region 1001 is binarized.
- the fourth determining unit 803 is configured to determine the legacy foreground block as a ghost caused by the object leaving when the area of the overlapping area of the first binarized image and the legacy mask is less than the first threshold.
- the first threshold may be set according to actual needs.
- FIG. 11 is a schematic diagram of a second determining unit 702 according to Embodiment 1 of the present invention. As shown in FIG. 11, the second determining unit 702 includes:
- a second calculating unit 1101 configured to calculate a second average pixel value of the plurality of pixel points on an edge of the circumscribed rectangle of the moving foreground block;
- a third processing unit 1102 configured to binarize an area in the circumscribed rectangle corresponding to the motion foreground block in the input image according to the second average pixel value, to obtain a second binarized image
- the fifth determining unit 1103 is configured to determine the moving foreground block as a ghost caused by the movement of the light when an area of the overlapping area of the second binarized image and the moving mask is smaller than a second threshold.
- the second calculation unit 1101 and the third processing unit 1102 can use the same calculation method and processing method as the first calculation unit 801 and the second processing unit 802, and details are not described herein again.
- the second threshold may be set according to actual needs.
- FIG. 12 is a schematic diagram of a third determining unit 703 according to Embodiment 1 of the present invention. As shown in FIG. 12, the third determining unit 703 includes:
- a third calculating unit 1201 configured to calculate a third average pixel value of the plurality of pixel points on the side of the circumscribed rectangle of the legacy foreground block and/or the moving foreground block;
- a fourth calculating unit 1202 configured to calculate a difference between a brightness average value of the legacy foreground block and/or the motion foreground block and a third average pixel value
- the sixth determining unit 1203 is configured to determine the legacy foreground block and/or the motion foreground block as ghosts caused by puddle reflection when the brightness average value is greater than a third threshold and the difference is greater than a fourth threshold.
- the third calculation unit 1201 can use the same calculation method as the first calculation unit 801, and details are not described herein again.
- the third threshold and the fourth threshold may be set according to actual needs.
- the processing unit 103 may further include:
- a second filtering unit 605 configured to remove ghosts according to the size of the legacy foreground block and/or the moving foreground block and the duration of the legacy foreground block and/or the moving foreground block in the current frame and all previous frames
- the legacy foreground block and/or the moving foreground block are filtered;
- the determining unit 606 is configured to determine, according to the filtered legacy foreground block and/or the motion foreground block, a traffic abnormal event type corresponding to the set detection function, thereby obtaining a traffic abnormal event detection result corresponding to the detection function.
- the second filtering unit 605 is configured to remove according to the size of the legacy foreground block and/or the moving foreground block and the duration of the legacy foreground block and/or the moving foreground block in the current frame and all previous frames.
- the ghost's legacy foreground blocks and/or moving foreground blocks are filtered.
- the second filtering unit 605 removes the legacy foreground block and/or the moving foreground block having a size less than a predetermined threshold and a duration less than a predetermined threshold.
- the filtering by the second filtering unit 605 can remove the detection noise and further improve the accuracy of the detection result.
- the duration corresponds to the number of consecutive occurrences of the legacy foreground block and/or the motion foreground block in all frames before the current frame and the current frame, and the number of consecutive occurrences may be multiplied by the time of each frame. The duration.
- the determining unit 606 is configured to determine a traffic abnormal event type corresponding to the set detection function according to the filtered legacy foreground block and/or the motion foreground block.
- the structure of the determination unit 606 of the present embodiment and the method of determining the type of the traffic abnormal event are exemplarily described below.
- FIG 13 is a diagram showing the decision unit 606 of the first embodiment of the present invention. As shown in Figure 13, the decision unit 606 includes:
- a first determining unit 1301, configured to determine, when the duration of the moving foreground block is greater than a fifth threshold and the size of the moving foreground block is greater than a sixth threshold, determining the moving foreground block as a traffic abnormal event of the lane intrusion;
- a second determining unit 1302 configured to determine, when the duration of the legacy foreground block is greater than a seventh threshold, and the size of the legacy foreground block is greater than an eighth threshold, determining the legacy foreground block as a traffic abnormal event of a road abnormality or illegal parking ;
- a third determining unit 1303, configured to classify the object in the legacy foreground block by using a vehicle classifier, and when the object in the legacy foreground block is a vehicle, determining the legacy foreground block as a traffic abnormal event of illegal parking, When the object in the legacy foreground block is not a vehicle, the legacy foreground block is determined as a traffic abnormal event of the road abnormality.
- the fifth threshold, the sixth threshold, the seventh threshold, and the eighth threshold may be set according to actual needs.
- the vehicle classifier used by the third determining unit 1303 may be an existing classifier, for example, a Support Vector Machine (SVM) classifier, a Bayesian classifier, or the like.
- SVM Support Vector Machine
- the device 100 may further include:
- the alarm unit 104 is configured to perform an alarm when the ratio of the number of frames of the traffic abnormal event detected in the input image to the total number of frames is greater than or equal to the ninth threshold.
- the ninth threshold may be set according to actual needs.
- the ninth threshold may take a value from 0.5 to 0.9.
- the alarm unit 104 may perform multiple alarms. For example, by marking and highlighting the area of the traffic abnormal event on the monitoring screen, the alarm may be sent by sending information or the like.
- the alarm unit 104 is an optional component, indicated by a dashed box in FIG.
- the detection function of at least two predetermined areas in the input image is respectively set, and the motion foreground and/or the legacy foreground are respectively extracted according to the set detection function in each predetermined area, and processed to obtain a correspondence.
- the detection result of the set detection function thereby enabling different detection functions for different areas, providing diverse services, and correspondingly according to the set functions in each area Extraction and processing can effectively reduce the amount of calculation, thus meeting the needs of real-time detection.
- FIG. 14 is a schematic diagram of an electronic device according to Embodiment 2 of the present invention.
- the electronic device 1400 includes a traffic abnormal event detecting device 1401.
- the structure and function of the traffic abnormal event detecting device 1401 are the same as those in the first embodiment, and are not described herein again.
- Figure 15 is a schematic block diagram showing the system configuration of an electronic device according to a second embodiment of the present invention.
- electronic device 1500 can include central processor 1501 and memory 1502; memory 1502 is coupled to central processor 1501.
- 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 1500 may further include: an input unit 1503, a display 1504, and a power source 1505.
- the functions of the traffic anomaly detecting apparatus described in Embodiment 1 may be integrated into the central processing unit 1501.
- the central processing unit 1501 may be configured to respectively set a detection function of at least two predetermined areas in the input image, wherein the detection functions of the respective predetermined areas are set to be different or the same; respectively set according to each predetermined area a detecting function, respectively extracting a moving foreground and/or a legacy foreground in each predetermined area; respectively processing the extracted moving foreground and/or the legacy foreground in each predetermined area, and obtaining traffic corresponding to the detecting function set by each predetermined area Abnormal event detection result.
- the processing of the extracted motion foreground and/or legacy foreground in each of the predetermined regions includes: performing, in each predetermined region of the current frame of the input image, the extracted motion foreground and/or legacy foreground Binarization processing to obtain a motion mask and/or a legacy mask; clustering the motion mask of the current frame and/or the legacy mask to obtain a motion foreground block and/or a legacy foreground block of the current frame Matching the moving foreground block and/or the legacy foreground block in the previous frame of the current frame and the current frame, and updating the moving foreground block of the current frame and/or the legacy foreground according to the result of the matching Block information; removing the moving foreground block of the current frame and/or ghosts in the legacy foreground block.
- the removing the ghost in the moving foreground block and/or the legacy foreground block of the current frame includes at least one of: determining a ghost in the legacy foreground block caused by the object leaving; determining the motion a ghost caused by the movement of the light in the foreground block; determining a ghost caused by the puddle reflection; and said removing the ghost in the moving foreground block and/or the legacy foreground block of the current frame, further comprising : Remove the determined ghosts.
- the determining the ghost caused by the object leaving in the legacy foreground block includes: calculating the legacy And a first average pixel value of the plurality of pixels on the side of the circumscribed rectangle of the foreground block; and the area in the circumscribed rectangle corresponding to the legacy foreground block in the input image is performed according to the first average pixel value And obtaining a first binarized image; when the area of the overlapping area of the first binarized image and the legacy mask is less than a first threshold, determining the legacy foreground block as being caused by the object leaving ghost.
- the determining the ghost caused by the movement of the light in the moving foreground block comprises: calculating a second average pixel value of the plurality of pixels on the side of the circumscribed rectangle of the moving foreground block; a second average pixel value binarizing an area in the circumscribed rectangle corresponding to the moving foreground block in the input image to obtain a second binarized image; when the second binarized image and the motion mask When the area of the overlapping area of the film is less than the second threshold, the moving foreground block is determined to be a ghost caused by the movement of the light.
- the determining a ghost caused by puddle reflection includes: a third calculating unit for calculating a plurality of pixel points on an edge of the circumscribed rectangle of the legacy foreground block and/or the moving foreground block a third average pixel value; a fourth calculating unit configured to calculate a difference between a luminance average value of the legacy foreground block and/or the motion foreground block and the third average pixel value; a sixth determining unit, And configured to determine the legacy foreground block and/or the motion foreground block as a ghost caused by puddle reflection when the brightness average value is greater than a third threshold and the difference is greater than a fourth threshold.
- the processing of the extracted motion foreground and/or legacy foreground in each predetermined area further comprising: according to the size of the legacy foreground block and/or the motion foreground block and the legacy foreground block and/or Or the motion foreground block filters the legacy foreground block and/or the motion foreground block with ghosts removed in the current frame and the duration of all previous frames; and determines according to the filtered legacy foreground block and/or the motion foreground block.
- a traffic abnormal event type corresponding to the set detection function thereby obtaining a traffic abnormal event detection result corresponding to the detection function.
- the determining, according to the filtered legacy foreground block and/or the motion foreground block, the type of traffic abnormal event corresponding to the set detection function includes: when the duration of the motion foreground block is greater than a fifth threshold When the size of the motion foreground block is greater than a sixth threshold, the motion foreground block is determined as a traffic anomaly event of lane intrusion; when the duration of the legacy foreground block is greater than a seventh threshold and the legacy foreground block is When the size is greater than the eighth threshold, the legacy foreground block is determined as a traffic abnormal event of a road abnormality or illegal parking.
- the determining, according to the filtered legacy foreground block and/or the motion foreground block, the type of traffic abnormal event corresponding to the set detection function further comprising: classifying the object in the legacy foreground block by using a vehicle classifier When the object in the legacy foreground block is a vehicle, determining the legacy foreground block as an illegal parking Through the abnormal event, when the object in the legacy foreground block is not a vehicle, the legacy foreground block is determined as a traffic abnormal event of the road abnormality.
- the central processing unit 1501 may be further configured to: when the ratio of the number of frames of the traffic abnormal event detected in the input image to the total number of frames is greater than or equal to the ninth threshold, an alarm is issued.
- the traffic abnormal event detecting device described in Embodiment 1 may be configured separately from the central processing unit 1501.
- the traffic abnormal event detecting device may be configured as a chip connected to the central processing unit 1501 through the central processing unit.
- the control of 1501 implements the function of the traffic abnormal event detecting device.
- the electronic device 1500 also does not have to include all of the components shown in FIG. 15 in this embodiment.
- central processor 1501 also sometimes referred to as a controller or operational control, may include a microprocessor or other processor device and/or logic device, and central processor 1501 receives input and controls various components of electronic device 1500. Operation.
- Memory 1502 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 1501 can execute the program stored by the memory 1502 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 1500 may be implemented by special purpose hardware, firmware, software, or a combination thereof without departing from the scope of the invention.
- the detection function of at least two predetermined areas in the input image is respectively set, and the motion foreground and/or the legacy foreground are respectively extracted according to the set detection function in each predetermined area, and processed to obtain a correspondence.
- the detection result of the set detection function enables different detection functions to be realized for different areas, provides diverse services, and can be effectively extracted and processed according to the set functions in each area. Reduce the amount of calculations to meet the needs of real-time detection.
- the embodiment of the present invention further provides a traffic abnormal event detecting method, which corresponds to the traffic abnormal event detecting device of Embodiment 1.
- Fig. 16 is a view showing a method of detecting a traffic abnormal event according to a third embodiment of the present invention. As shown in FIG. 16, the method includes:
- Step 1601 respectively set detection functions of at least two predetermined areas in the input image, wherein the detection functions of the respective predetermined areas are set to be different or the same;
- Step 1602 Extracting a motion foreground and/or a legacy foreground in each predetermined area according to the detection function respectively set in each predetermined area;
- Step 1603 Processing the extracted motion foreground and/or legacy foreground in each predetermined area, respectively, and obtaining a traffic abnormal event detection result corresponding to the detection function set by each predetermined area.
- the method of setting the detection function, the method of extracting the motion foreground and/or the legacy foreground, and the method of processing the extracted motion foreground and/or legacy foreground are the same as those described in Embodiment 1, and are not Let me repeat.
- the detection function of at least two predetermined areas in the input image is respectively set, and the motion foreground and/or the legacy foreground are respectively extracted according to the set detection function in each predetermined area, and processed to obtain a correspondence.
- the detection result of the set detection function enables different detection functions to be realized for different areas, provides diverse services, and can be effectively extracted and processed according to the set functions in each area. Reduce the amount of calculations to meet the needs of real-time detection.
- the embodiment of the present invention further provides a traffic abnormal event detecting method, which corresponds to the traffic abnormal event detecting device of Embodiment 1.
- Figure 17 is a diagram showing a method of detecting a traffic abnormal event according to Embodiment 4 of the present invention. As shown in FIG. 17, the method processes the current frame of the input image, and the method includes:
- Step 1701 respectively set detection functions of at least two predetermined areas in the current frame, and the detection functions of the respective predetermined areas are set to be different or the same;
- Step 1702 extracting a motion foreground and/or a legacy foreground in each predetermined area according to the detection function respectively set in each predetermined area;
- Step 1703 Perform binarization processing on the extracted motion foreground and/or legacy foreground in each predetermined area of the current frame to obtain a motion mask and/or a legacy mask.
- Step 1704 Perform clustering on the motion mask and/or the legacy mask of the current frame to obtain a motion foreground block and/or a legacy foreground block of the current frame.
- Step 1705 Matching the current foreground frame and the moving foreground block and/or the legacy foreground block in the previous frame of the current frame, and updating the information of the motion foreground block and/or the legacy foreground block of the current frame according to the matching result;
- Step 1706 Remove the motion foreground block of the current frame and/or ghosts in the legacy foreground block
- Step 1707 Filtering the legacy foreground block and/or the motion foreground block from which the ghost is removed according to the size and duration of the legacy foreground block and/or the motion foreground block;
- Step 1708 Determine, for the motion foreground block, whether the condition that the duration of the motion foreground block is greater than the fifth threshold and the size is greater than the sixth threshold, and when the determination result is “Yes”, proceed to step 1709, when determining When the result is "No", the process ends;
- Step 1709 determining the motion foreground block as a traffic anomaly event of the lane invasion
- Step 1710 For the legacy foreground block, determine whether the condition that the duration of the legacy foreground block is greater than the seventh threshold and the size is greater than the eighth threshold. When the determination result is “Yes”, the process proceeds to step 1711, and when the determination result is “No” ", when the process ends;
- Step 1711 classify objects in the legacy foreground block using a vehicle classifier
- Step 1712 According to the classification result, it is determined whether the object in the legacy foreground block is a vehicle, when the determination result is "Yes”, the process proceeds to step 1713, and when the determination result is "No", the process proceeds to step 1714;
- Step 1713 determining the legacy foreground block as a traffic abnormal event of illegal parking
- Step 1714 Determine the legacy foreground block as a traffic abnormal event of the road abnormality.
- the processing method for each frame of the input image is the same as the above method, and the method used in each step is the same as that in the first embodiment, and details are not described herein again.
- the detection function of at least two predetermined areas in the input image is respectively set, and the motion foreground and/or the legacy foreground are respectively extracted according to the set detection function in each predetermined area, and processed to obtain a correspondence.
- the detection result of the set detection function enables different detection functions to be realized for different areas, provides diverse services, and can be effectively extracted and processed according to the set functions in each area. Reduce the amount of calculations to meet the needs of real-time detection.
- the embodiment of the present invention further provides a computer readable program, wherein when the program is executed in a traffic abnormal event detecting device or an electronic device, the program causes the computer to be in the traffic abnormal event detecting device or the electronic device.
- the traffic abnormal event detecting method described in Embodiment 3 is executed.
- 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 traffic abnormal event detecting method described in Embodiment 3 in a traffic abnormal event detecting device or an electronic device.
- the method for performing traffic abnormal event detection in the traffic abnormal event detecting device described in connection with the embodiment of the present invention may be directly embodied as hardware, a software module executed by a processor, or a combination thereof.
- 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. 16, 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.
- DSP digital signal processor
- 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
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Traffic Control Systems (AREA)
- Image Analysis (AREA)
Abstract
一种交通异常事件检测装置及方法。该装置及方法通过分别设定输入图像中至少两个预定区域的检测功能(1601),并在各个预定区域内根据设定的检测功能分别提取运动前景和/或遗留前景(1602),以进行处理而获得对应于设定的检测功能的检测结果(1603),从而,能够针对不同的区域实现不同的检测功能,提供多样化的服务,并且,由于在各个区域内根据设定的功能进行相应的提取和处理,能够有效减少计算量,从而能够满足实时检测的需求。
Description
本发明涉及信息技术领域,尤其涉及一种交通异常事件检测装置及方法。
随着城市化进程的不断推进,视频监控被广泛的应用。智能监控系统相比于传统的人工监控,具有很多优势,例如,能够实现全天连续监视,花费较少且能够保护个人信息。通过智能监控系统检测交通异常事件并通知交通管理人员或车辆驾驶员,能够减少和避免交通事故的发生。
常见的交通异常事件包括:车道入侵、非法停车以及道路异常等。其中,车道入侵例如包括非机动车或行人入侵机动车道,非法停车例如包括车辆停靠在行车道或自行车道等非法停车位置上,道路异常例如包括道路上遗留不是车辆的其他物体。现有的检测方法一般包括三个步骤:前景检测、目标追踪以及事件判断和报警。其中,前景检测可以基于运动、基于背景模型以及基于先验知识;目标追踪可以在获取前景目标后对当前帧和前一帧的目标进行匹配,建立空间-时间的连续关系,常见的方法有MeanShift算法、卡尔曼滤波以及粒子滤波等;事件判断和报警用于判断事件类型并报警,常见的方法有使用基本数据分析来统计目标密度和目标类型从而进行判断,或者通过提取速度和方向信息来进行目标的整体行为判断,或者通过识别局部动作或姿势来判断。
应该注意,上面对技术背景的介绍只是为了方便对本发明的技术方案进行清楚、完整的说明,并方便本领域技术人员的理解而阐述的。不能仅仅因为这些方案在本发明的背景技术部分进行了阐述而认为上述技术方案为本领域技术人员所公知。
发明内容
上述现有的基于运动和基于背景模型的前景检测方法不适用于慢速或静止目标,基于先验知识的前景检测计算量较大且不具有普适性,另外,上述现有的目标追踪方法和事件判断方法处理过程复杂、运营成本高,不适用于处理大量的实时监视数据。
另外,这些现有的方法的检测功能单一。
本发明实施例提供一种交通异常事件检测装置及方法,能够针对不同的区域实现不同的检测功能,提供多样化的服务,并且,由于在各个区域内根据设定的功能进行相应的提取和处理,能够有效减少计算量,从而能够满足实时检测的需求。
根据本发明实施例的第一方面,提供一种交通异常事件检测装置,所述装置包括:设定单元,其用于分别设定输入图像中至少两个预定区域的检测功能,其中,各个预定区域的检测功能被设定为不同或相同;提取单元,其用于根据各个预定区域分别设定的检测功能,在各个预定区域中分别提取运动前景和/或遗留前景;处理单元,其用于在各个预定区域中分别对提取的运动前景和/或遗留前景进行处理,获得与各个预定区域设定的检测功能对应的交通异常事件检测结果。
根据本发明实施例的第二方面,提供一种交通异常事件检测方法,所述方法包括:分别设定输入图像中至少两个预定区域的检测功能,其中,各个预定区域的检测功能被设定为不同或相同;根据各个预定区域分别设定的检测功能,在各个预定区域中分别提取运动前景和/或遗留前景;在各个预定区域中分别对提取的运动前景和/或遗留前景进行处理,获得与各个预定区域设定的检测功能对应的交通异常事件检测结果。
本发明的有益效果在于:通过分别设定输入图像中至少两个预定区域的检测功能,并在各个预定区域内根据设定的检测功能分别提取运动前景和/或遗留前景,以进行处理而获得对应于设定的检测功能的检测结果,从而,能够针对不同的区域实现不同的检测功能,提供多样化的服务,并且,由于在各个区域内根据设定的功能进行相应的提取和处理,能够有效减少计算量,从而能够满足实时检测的需求。
参照后文的说明和附图,详细公开了本发明的特定实施方式,指明了本发明的原理可以被采用的方式。应该理解,本发明的实施方式在范围上并不因而受到限制。在所附权利要求的精神和条款的范围内,本发明的实施方式包括许多改变、修改和等同。
针对一种实施方式描述和/或示出的特征可以以相同或类似的方式在一个或更多个其它实施方式中使用,与其它实施方式中的特征相组合,或替代其它实施方式中的特征。
应该强调,术语“包括/包含”在本文使用时指特征、整件、步骤或组件的存在,但并不排除一个或更多个其它特征、整件、步骤或组件的存在或附加。
所包括的附图用来提供对本发明实施例的进一步的理解,其构成了说明书的一部分,用于例示本发明的实施方式,并与文字描述一起来阐释本发明的原理。显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。在附图中:
图1是本发明实施例1的交通异常事件检测装置的一示意图;
图2是本发明实施例1的提取单元102的一示意图;
图3是本发明实施例1的输入图像的一示意图;
图4是本发明实施例1的从该输入图像提取出的预定区域内运动前景的一示意图;
图5是本发明实施例1的从该输入图像提取出的预定区域内遗留前景的一示意图;
图6是本发明实施例1的处理单元103的一示意图;
图7是本发明实施例1的第一过滤单元604的一示意图;
图8是本发明实施例1的第一确定单元701的一示意图;
图9是本发明实施例1的遗留掩膜的一示意图;
图10是本发明实施例1的输入图像的另一示意图;
图11是本发明实施例1的第二确定单元702的一示意图;
图12是本发明实施例1的第三确定单元703的一示意图;
图13是本发明实施例1的判定单元606的一示意图;
图14是本发明实施例2的电子设备的一示意图;
图15是本发明实施例2的电子设备的系统构成的一示意框图;
图16是本发明实施例3的交通异常事件检测方法的一示意图;
图17是本发明实施例4的交通异常事件检测方法的一示意图。
参照附图,通过下面的说明书,本发明的前述以及其它特征将变得明显。在说明书和附图中,具体公开了本发明的特定实施方式,其表明了其中可以采用本发明的原则的部分实施方式,应了解的是,本发明不限于所描述的实施方式,相反,本发明包
括落入所附权利要求的范围内的全部修改、变型以及等同物。
实施例1
图1是本发明实施例1的交通异常事件检测装置的一示意图。如图1所示,该装置100包括:
设定单元101,其用于分别设定输入图像中至少两个预定区域的检测功能,其中,各个预定区域的检测功能被设定为不同或相同;
提取单元102,其用于根据各个预定区域分别设定的检测功能,在各个预定区域中分别提取运动前景和/或遗留前景;
处理单元103,其用于在各个预定区域中分别对提取的运动前景和/或遗留前景进行处理,获得与各个预定区域设定的检测功能对应的交通异常事件检测结果。
由上述实施例可知,通过分别设定输入图像中至少两个预定区域的检测功能,并在各个预定区域内根据设定的检测功能分别提取运动前景和/或遗留前景,以进行处理而获得对应于设定的检测功能的检测结果,从而,能够针对不同的区域实现不同的检测功能,提供多样化的服务,并且,由于在各个区域内根据设定的功能进行相应的提取和处理,能够有效减少计算量,从而能够满足实时检测的需求。
在本实施例中,该输入图像可以是监控图像,其可以根据现有方法而获得。例如,可以通过安装在需要监测区域上方的摄像头而获得。
在本实施例中,该输入图像可以包括一帧图像,也可以包括监控视频中的多帧图像。当该输入图像包括多帧图像时,可以逐帧进行检测。
在本实施例中,设定单元101用于分别设定输入图像中至少两个预定区域的检测功能,各个预定区域的检测功能被设定为不同或相同。也就是说,各个预定区域的检测功能是独立设定的,其可以根据各个预定区域的特点和需要而设定。
例如,对于监控图像中的机动车道所在区域,可以设定为检测车道入侵以及道路异常的检测功能,对于监控图像中的非机动车道所在区域,可以设定为非法停车的检测功能。
在本实施例中,该预定区域可以根据实际需要而设置,例如,该预定区域是感兴趣区域(Region of Interest,ROI)。
在本实施例中,设定单元101例如可以采用以下的方法设定各个预定区域的检测功能:
对于输入图像中的各个像素点设置标记,以表示该像素点开放的检测功能,例如,以三位的二进制数相对应的整数来进行标记,三位的二进制数分别表示车道入侵检测、道路异常检测和非法停车检测,以“0”表示不开放该检测功能,以“1”表示开放该检测功能,例如,某个像素点的标记为整数“6”,其对应的二进制数为“110”,从而表示该像素点开放的检测功能为车道入侵检测和道路异常检测。在标记了各个像素点之后,开放了相同检测功能的多个连续像素点组成的区域即为设定了该检测功能的预定区域。
在本实施例中,在设定了各个预定区域的检测功能之后,提取单元102用于根据各个预定区域分别设定的检测功能,在各个预定区域中分别提取运动前景和/或遗留前景。
例如,当设定了车道入侵的检测功能时,需要提取运动前景,当设定了道路异常或非法停车的检测功能时,需要提取遗留前景。
在本实施例中,提取单元102在预定区域内提取运动前景和/或遗留前景可使用现有方法。以下对本实施例的提取单元102的结构以及提取运动前景和/或遗留前景的方法进行示例性的说明。
图2是本发明实施例1的提取单元102的一示意图。如图2所示,提取单元102包括:
第一建立单元201,其用于建立背景模型和背景缓存;
第一更新单元202,其用于根据输入图像的当前帧与该背景模型的匹配结果,更新该背景模型;
第一提取单元203,其用于根据输入图像的当前帧与更新后的背景模型,提取该运动前景;
第二更新单元204,其用于根据输入图像的当前帧中各个像素变化为前景像素的情况,更新背景缓存中相应像素的像素值;
第二提取单元205,其用于根据输入图像的当前帧与更新后的背景缓存,提取该遗留前景。
在本实施例中,对于多个预定区域的提取,如果提取的前景类型相同,则可以同时进行提取操作。例如,输入图像包括3个预定区域,其中,第一预定区域和第二预定区域需要提取运动前景,第三预定区域需要提取运动前景和遗留前景,此时,可以
同时提取3个预定区域的运动前景。
图3是本发明实施例1的输入图像的一示意图,图4是本发明实施例1的从该输入图像提取出的预定区域内运动前景的一示意图,图5是本发明实施例1的从该输入图像提取出的预定区域内遗留前景的一示意图。如图3-图5所示,提取出的运动前景可能是非机动车或行人等运动物体,提取出的遗留前景可能是非法停靠的车辆或者遗留在道路上的物体等。
在本实施例中,在各个预定区域内根据设定的检测功能提取出运动前景和/或遗留前景之后,处理单元103用于在各个预定区域中分别对提取的运动前景和/或遗留前景进行处理,获得与各个预定区域设定的检测功能对应的交通异常事件检测结果。
以下对本实施例的处理单元103的结构以及处理方法进行示例性的说明。
图6是本发明实施例1的处理单元103的一示意图。如图6所示,处理单元103包括:
第一处理单元601,其用于在该输入图像的当前帧的各个预定区域中,对提取的运动前景和/或遗留前景进行二值化处理,获得运动掩膜和/或遗留掩膜;
聚类单元602,其用于对当前帧的运动掩膜和/或遗留掩膜进行聚类,获得当前帧的运动前景块和/或遗留前景块;
匹配单元603,其用于对当前帧和当前帧的前一帧中的运动前景块和/或遗留前景块进行匹配,并根据匹配的结果更新当前帧的运动前景块和/或遗留前景块的信息;
第一过滤单元604,其用于去除当前帧的运动前景块和/或遗留前景块中的鬼影。
在本实施例中,第一处理单元601可使用现有方法对提取的运动前景和/或遗留前景进行二值化处理。
在本实施例中,聚类单元602用于对当前帧的运动掩膜和/或遗留掩膜进行聚类,例如,首先检测出运动掩膜和/或遗留掩膜的轮廓,然后将这些轮廓聚类为运动前景块和/或遗留前景块。
在本实施例中,该聚类可以使用现有的方法,例如,根据各个轮廓中心点之间的距离进行聚类,对于遗留前景块,还可以根据在当前帧和之前所有帧中的出现次数进行聚类。
在本实施例中,匹配单元603用于对当前帧和当前帧的前一帧中的运动前景块和/或遗留前景块进行匹配,并根据匹配的结果更新当前帧的运动前景块和/或遗留前景
块的信息。
在本实施例中,可使用现有方法进行匹配和更新,例如,使用距离特征来匹配当前帧和当前帧的前一帧中的运动前景块和/或遗留前景块,更新匹配的运动前景块和/或遗留前景块的信息,对于不匹配的运动前景块和/或遗留前景块,可以赋予新的ID和其他参数。
在本实施例中,在更新当前帧的运动前景块和/或遗留前景块的信息之后,第一过滤单元604用于去除当前帧的运动前景块和/或遗留前景块中的鬼影。其中,运动前景块和/或遗留前景块中的鬼影可以包括以下的至少一个:由物体离开造成的鬼影、由灯光移动造成的鬼影以及由水坑反射造成的鬼影。
这样,通过第一过滤单元604进一步去除由各种原因造成的鬼影,能够避免错误的检测,提高检测结果的准确性。
以下对本实施例的过滤单元604的结构以及去除鬼影的方法进行示例性的说明。
图7是本发明实施例1的第一过滤单元604的一示意图。如图7所示,第一过滤单元604包括:
第一确定单元701,其用于确定该遗留前景块中的由物体离开造成的鬼影;
第二确定单元702,其用于确定该运动前景块中的由灯光移动造成的鬼影;
第三确定单元703,其用于确定由水坑反射造成的鬼影;
去除单元704,其用于去除确定的鬼影。
在本实施例中,第一过滤单元604可以包括第一确定单元701、第二确定单元702以及第三确定单元703中的至少一个。
以下对第一确定单元701、第二确定单元702以及第三确定单元703的结构以及确定鬼影的方法分别进行示例性的说明。
图8是本发明实施例1的第一确定单元701的一示意图。如图8所示,第一确定单元701包括:
第一计算单元801,其用于计算该遗留前景块的外接矩形的边上的多个像素点的第一平均像素值;
第二处理单元802,其用于根据第一平均像素值对输入图像中对应于该遗留前景块的外接矩形内的区域进行二值化,获得第一二值化图像;
第四确定单元803,其用于当第一二值化图像与该遗留掩膜的重叠区域的面积小
于第一阈值时,将该遗留前景块确定为由物体离开造成的鬼影。
图9是本发明实施例1的遗留掩膜的一示意图。如图9所示,该遗留掩膜具有遗留前景块901,其具有外接矩形902。
在本实施例中,第一计算单元801用于计算该遗留前景块的外接矩形的边上的多个像素点的第一平均像素值。例如,计算图9中的外接矩形902的边上的12个像素点的平均像素值,作为第一平均像素值。
在本实施例中,像素点的数量可以根据实际需要而设置,选取的像素点可以随机选取。
在本实施例中,第二处理单元802用于根据第一平均像素值对输入图像中对应于该遗留前景块的外接矩形内的区域进行二值化,获得第一二值化图像。
图10是本发明实施例1的输入图像的另一示意图。如图10所示,该输入图像中具有对应于图9所示的遗留前景块901的外接矩形902内的区域1001,对该区域1001进行二值化处理。
在本实施例中,第四确定单元803用于当第一二值化图像与该遗留掩膜的重叠区域的面积小于第一阈值时,将该遗留前景块确定为由物体离开造成的鬼影。在本实施例中,该第一阈值可以根据实际需要而设置。
图11是本发明实施例1的第二确定单元702的一示意图。如图11所示,第二确定单元702包括:
第二计算单元1101,其用于计算该运动前景块的外接矩形的边上的多个像素点的第二平均像素值;
第三处理单元1102,其用于根据第二平均像素值对输入图像中对应于该运动前景块的外接矩形内的区域进行二值化,获得第二二值化图像;
第五确定单元1103,其用于当第二二值化图像与该运动掩膜的重叠区域的面积小于第二阈值时,将该运动前景块确定为由灯光移动造成的鬼影。
在本实施例中,第二计算单元1101、第三处理单元1102可以与第一计算单元801、第二处理单元802使用相同的计算方法和处理方法,此处不再赘述。
在本实施例中,该第二阈值可根据实际需要而设置。
图12是本发明实施例1的第三确定单元703的一示意图。如图12所示,第三确定单元703包括:
第三计算单元1201,其用于计算遗留前景块和/或运动前景块的外接矩形的边上的多个像素点的第三平均像素值;
第四计算单元1202,其用于计算该遗留前景块和/或运动前景块的亮度平均值与第三平均像素值的差值;
第六确定单元1203,其用于当该亮度平均值大于第三阈值且该差值大于第四阈值时,将该遗留前景块和/或运动前景块确定为由水坑反射造成的鬼影。
在本实施例中,第三计算单元1201可以与第一计算单元801使用相同的计算方法,此处不再赘述。
在本实施例中,该第三阈值和第四阈值可根据实际需要而设置。
在本实施例中,如图6所示,该处理单元103还可以包括:
第二过滤单元605,其用于根据该遗留前景块和/或运动前景块的尺寸以及该遗留前景块和/或运动前景块在当前帧以及之前所有帧的持续时间,对去除了鬼影的遗留前景块和/或运动前景块进行过滤;
判定单元606,其用于根据过滤后的遗留前景块和/或运动前景块,判断与设定的检测功能对应的交通异常事件类型,从而获得与该检测功能对应的交通异常事件检测结果。
在本实施例中,第二过滤单元605用于根据该遗留前景块和/或运动前景块的尺寸以及该遗留前景块和/或运动前景块在当前帧以及之前所有帧的持续时间,对去除了鬼影的遗留前景块和/或运动前景块进行过滤。例如,第二过滤单元605将尺寸小于预定阈值,以及持续时间小于预定阈值的遗留前景块和/或运动前景块去除。
这样,通过第二过滤单元605的过滤,能够去除检测噪声,进一步提高检测结果的准确性。
在本实施例中,该持续时间对应于该遗留前景块和/或运动前景块在当前帧以及当前帧之前的所有帧中连续出现的次数,可以将连续出现的次数乘以每帧的时间得到该持续时间。
在本实施例中,判定单元606用于根据过滤后的遗留前景块和/或运动前景块,判断与设定的检测功能对应的交通异常事件类型。以下对本实施例的判定单元606的结构以及判断交通异常事件类型的方法进行示例性的说明。
图13是本发明实施例1的判定单元606的一示意图。如图13所示,判定单元
606包括:
第一判定单元1301,其用于当该运动前景块的持续时间大于第五阈值且该运动前景块的尺寸大于第六阈值时,将该运动前景块判定为车道入侵的交通异常事件;
第二判定单元1302,其用于当该遗留前景块的持续时间大于第七阈值且该遗留前景块的尺寸大于第八阈值时,将该遗留前景块判断为道路异常或非法停车的交通异常事件;
第三判定单元1303,其用于使用车辆分类器对该遗留前景块中的物体进行分类,当该遗留前景块中的物体为车辆时,将该遗留前景块判定为非法停车的交通异常事件,当该遗留前景块中的物体不是车辆时,将该遗留前景块判定为道路异常的交通异常事件。
这样,能够针对运动前景块和/或遗留前景块进行不同的判定,从而检测出不同类型的交通异常事件。
在本实施例中,该第五阈值、第六阈值、第七阈值和第八阈值可以根据实际需要而设置。
在本实施例中,第三判定单元1303使用的车辆分类器可以是现有的分类器,例如,支持向量机(Support Vector Machine,SVM)分类器,贝叶斯分类器等。
在本实施例中,如图1所示,该装置100还可以包括:
报警单元104,其用于当该输入图像中检测出交通异常事件的帧数与所有帧数的比例大于或等于第九阈值时,进行报警。
在本实施例中,该第九阈值可以根据实际需要而设置,例如,该第九阈值可以取0.5~0.9中的数值。
在本实施例中,报警单元104进行报警的方式可以有多种,例如,通过对监控画面上的交通异常事件所在区域进行标记并突出显示,也可以通过发送信息等方式进行报警。
在本实施例中,报警单元104为可选部件,在图1中用虚线框表示。
由上述实施例可知,通过分别设定输入图像中至少两个预定区域的检测功能,并在各个预定区域内根据设定的检测功能分别提取运动前景和/或遗留前景,以进行处理而获得对应于设定的检测功能的检测结果,从而,能够针对不同的区域实现不同的检测功能,提供多样化的服务,并且,由于在各个区域内根据设定的功能进行相应的
提取和处理,能够有效减少计算量,从而能够满足实时检测的需求。
实施例2
本发明实施例还提供了一种电子设备,图14是本发明实施例2的电子设备的一示意图。如图14所示,电子设备1400包括交通异常事件检测装置1401,其中,交通异常事件检测装置1401的结构和功能与实施例1中的记载相同,此处不再赘述。
图15是本发明实施例2的电子设备的系统构成的一示意框图。如图15所示,电子设备1500可以包括中央处理器1501和存储器1502;存储器1502耦合到中央处理器1501。该图是示例性的;还可以使用其它类型的结构,来补充或代替该结构,以实现电信功能或其它功能。
如图15所示,该电子设备1500还可以包括:输入单元1503、显示器1504、电源1505。
在一个实施方式中,实施例1所述的交通异常事件检测装置的功能可以被集成到中央处理器1501中。其中,中央处理器1501可以被配置为:分别设定输入图像中至少两个预定区域的检测功能,其中,各个预定区域的检测功能被设定为不同或相同;根据各个预定区域分别设定的检测功能,在各个预定区域中分别提取运动前景和/或遗留前景;在各个预定区域中分别对提取的运动前景和/或遗留前景进行处理,获得与各个预定区域设定的检测功能对应的交通异常事件检测结果。
例如,所述在各个预定区域中分别对提取的运动前景和/或遗留前景进行处理,包括:在所述输入图像的当前帧的各个预定区域中,对提取的运动前景和/或遗留前景进行二值化处理,获得运动掩膜和/或遗留掩膜;对当前帧的所述运动掩膜和/或所述遗留掩膜进行聚类,获得当前帧的运动前景块和/或遗留前景块;对当前帧和当前帧的前一帧中的所述运动前景块和/或所述遗留前景块进行匹配,并根据匹配的结果更新当前帧的所述运动前景块和/或所述遗留前景块的信息;去除当前帧的所述运动前景块和/或所述遗留前景块中的鬼影。
例如,所述去除当前帧的所述运动前景块和/或遗留前景块中的鬼影,包括以下的至少一个:确定所述遗留前景块中的由物体离开造成的鬼影;确定所述运动前景块中的由灯光移动造成的鬼影;确定由水坑反射造成的鬼影;并且,所述所述去除当前帧的所述运动前景块和/或遗留前景块中的鬼影,还包括:去除确定的鬼影。
例如,所述确定所述遗留前景块中的由物体离开造成的鬼影,包括:计算所述遗
留前景块的外接矩形的边上的多个像素点的第一平均像素值;根据所述第一平均像素值对所述输入图像中对应于所述遗留前景块的外接矩形内的区域进行二值化,获得第一二值化图像;当所述第一二值化图像与所述遗留掩膜的重叠区域的面积小于第一阈值时,将所述遗留前景块确定为由物体离开造成的鬼影。
例如,所述确定所述运动前景块中的由灯光移动造成的鬼影,包括:计算所述运动前景块的外接矩形的边上的多个像素点的第二平均像素值;根据所述第二平均像素值对所述输入图像中对应于所述运动前景块的外接矩形内的区域进行二值化,获得第二二值化图像;当所述第二二值化图像与所述运动掩膜的重叠区域的面积小于第二阈值时,将所述运动前景块确定为由灯光移动造成的鬼影。
例如,所述确定由水坑反射造成的鬼影,包括:第三计算单元,其用于计算所述遗留前景块和/或所述运动前景块的外接矩形的边上的多个像素点的第三平均像素值;第四计算单元,其用于计算所述遗留前景块和/或所述运动前景块的亮度平均值与所述第三平均像素值的差值;第六确定单元,其用于当所述亮度平均值大于第三阈值且所述差值大于第四阈值时,将所述遗留前景块和/或所述运动前景块确定为由水坑反射造成的鬼影。
例如,所述在各个预定区域中分别对提取的运动前景和/或遗留前景进行处理,还包括:根据所述遗留前景块和/或所述运动前景块的尺寸以及所述遗留前景块和/或所述运动前景块在当前帧以及之前所有帧的持续时间,对去除了鬼影的遗留前景块和/或运动前景块进行过滤;根据过滤后的遗留前景块和/或运动前景块,判断与设定的检测功能对应的交通异常事件类型,从而获得与所述检测功能对应的交通异常事件检测结果。
例如,所述根据过滤后的遗留前景块和/或运动前景块,判断与设定的检测功能对应的交通异常事件类型,包括:当所述运动前景块的所述持续时间大于第五阈值且所述运动前景块的尺寸大于第六阈值时,将所述运动前景块判定为车道入侵的交通异常事件;当所述遗留前景块的所述持续时间大于第七阈值且所述遗留前景块的尺寸大于第八阈值时,将所述遗留前景块判断为道路异常或非法停车的交通异常事件。
例如,所述根据过滤后的遗留前景块和/或运动前景块,判断与设定的检测功能对应的交通异常事件类型,还包括:使用车辆分类器对所述遗留前景块中的物体进行分类,当所述遗留前景块中的物体为车辆时,将所述遗留前景块判定为非法停车的交
通异常事件,当所述遗留前景块中的物体不是车辆时,将所述遗留前景块判定为道路异常的交通异常事件。
中央处理器1501还可以被配置为:当所述输入图像中检测出交通异常事件的帧数与所有帧数的比例大于或等于第九阈值时,进行报警。
在另一个实施方式中,实施例1所述的交通异常事件检测装置可以与中央处理器1501分开配置,例如可以将交通异常事件检测装置配置为与中央处理器1501连接的芯片,通过中央处理器1501的控制来实现交通异常事件检测装置的功能。
在本实施例中电子设备1500也并不是必须要包括图15中所示的所有部件。
如图15所示,中央处理器1501有时也称为控制器或操作控件,可以包括微处理器或其它处理器装置和/或逻辑装置,中央处理器1501接收输入并控制电子设备1500的各个部件的操作。
存储器1502,例如可以是缓存器、闪存、硬驱、可移动介质、易失性存储器、非易失性存储器或其它合适装置中的一种或更多种。并且中央处理器1501可执行该存储器1502存储的该程序,以实现信息存储或处理等。其它部件的功能与现有类似,此处不再赘述。电子设备1500的各部件可以通过专用硬件、固件、软件或其结合来实现,而不偏离本发明的范围。
由上述实施例可知,通过分别设定输入图像中至少两个预定区域的检测功能,并在各个预定区域内根据设定的检测功能分别提取运动前景和/或遗留前景,以进行处理而获得对应于设定的检测功能的检测结果,从而,能够针对不同的区域实现不同的检测功能,提供多样化的服务,并且,由于在各个区域内根据设定的功能进行相应的提取和处理,能够有效减少计算量,从而能够满足实时检测的需求。
实施例3
本发明实施例还提供一种交通异常事件检测方法,其对应于实施例1的交通异常事件检测装置。图16是本发明实施例3的交通异常事件检测方法的一示意图。如图16所示,该方法包括:
步骤1601:分别设定输入图像中至少两个预定区域的检测功能,其中,各个预定区域的检测功能被设定为不同或相同;
步骤1602:根据各个预定区域分别设定的检测功能,在各个预定区域中分别提取运动前景和/或遗留前景;
步骤1603:在各个预定区域中分别对提取的运动前景和/或遗留前景进行处理,获得与各个预定区域设定的检测功能对应的交通异常事件检测结果。
在本实施例中,设定检测功能的方法、提取运动前景和/或遗留前景的方法以及对提取的运动前景和/或遗留前景进行处理的方法与实施例1中的记载相同,此处不再赘述。
由上述实施例可知,通过分别设定输入图像中至少两个预定区域的检测功能,并在各个预定区域内根据设定的检测功能分别提取运动前景和/或遗留前景,以进行处理而获得对应于设定的检测功能的检测结果,从而,能够针对不同的区域实现不同的检测功能,提供多样化的服务,并且,由于在各个区域内根据设定的功能进行相应的提取和处理,能够有效减少计算量,从而能够满足实时检测的需求。
实施例4
本发明实施例还提供一种交通异常事件检测方法,其对应于实施例1的交通异常事件检测装置。图17是本发明实施例4的交通异常事件检测方法的一示意图。如图17所示,该方法针对输入图像的当前帧进行处理,该方法包括:
步骤1701:分别设定当前帧中至少两个预定区域的检测功能,各个预定区域的检测功能被设定为不同或相同;
步骤1702:根据各个预定区域分别设定的检测功能,在各个预定区域中分别提取运动前景和/或遗留前景;
步骤1703:在该当前帧的各个预定区域中,对提取的运动前景和/或遗留前景进行二值化处理,获得运动掩膜和/或遗留掩膜;
步骤1704:对当前帧的运动掩膜和/或遗留掩膜进行聚类,获得当前帧的运动前景块和/或遗留前景块;
步骤1705:对当前帧和当前帧的前一帧中的运动前景块和/或遗留前景块进行匹配,并根据匹配的结果更新当前帧的运动前景块和/或遗留前景块的信息;
步骤1706:去除当前帧的运动前景块和/或遗留前景块中的鬼影;
步骤1707:根据遗留前景块和/或运动前景块的尺寸以及持续时间,对去除了鬼影的遗留前景块和/或运动前景块进行过滤;
步骤1708:对于运动前景块,判断是否满足该运动前景块的持续时间大于第五阈值且尺寸大于第六阈值的条件,当判断结果为“是”时,进入步骤1709,当判断
结果为“否”时,结束进程;
步骤1709:将该运动前景块判定为车道入侵的交通异常事件;
步骤1710:对于遗留前景块,判断是否满足该遗留前景块的持续时间大于第七阈值且尺寸大于第八阈值的条件,当判断结果为“是”时,进入步骤1711,当判断结果为“否”时,结束进程;
步骤1711:使用车辆分类器对该遗留前景块中的物体进行分类;
步骤1712:根据分类结果,判断该遗留前景块中的物体是否为车辆,当判断结果为“是”时,进入步骤1713,当判断结果为“否”时,进入步骤1714;
步骤1713:将该遗留前景块判定为非法停车的交通异常事件;
步骤1714:将该遗留前景块判定为道路异常的交通异常事件。
在本实施例中,针对输入图像的每一帧的处理方法与上述方法相同,并且,上述各个步骤中使用的方法与实施例1中的记载相同,此处不再赘述。
由上述实施例可知,通过分别设定输入图像中至少两个预定区域的检测功能,并在各个预定区域内根据设定的检测功能分别提取运动前景和/或遗留前景,以进行处理而获得对应于设定的检测功能的检测结果,从而,能够针对不同的区域实现不同的检测功能,提供多样化的服务,并且,由于在各个区域内根据设定的功能进行相应的提取和处理,能够有效减少计算量,从而能够满足实时检测的需求。
本发明实施例还提供一种计算机可读程序,其中当在用于交通异常事件检测装置或电子设备中执行所述程序时,所述程序使得计算机在所述交通异常事件检测装置或电子设备中执行实施例3所述的交通异常事件检测方法。
本发明实施例还提供一种存储有计算机可读程序的存储介质,其中所述计算机可读程序使得计算机在交通异常事件检测装置或电子设备中执行实施例3所述的交通异常事件检测方法。
结合本发明实施例描述的在交通异常事件检测装置中进行交通异常事件检测的方法可直接体现为硬件、由处理器执行的软件模块或二者组合。例如,图1中所示的功能框图中的一个或多个和/或功能框图的一个或多个组合,既可以对应于计算机程序流程的各个软件模块,亦可以对应于各个硬件模块。这些软件模块,可以分别对应于图16所示的各个步骤。这些硬件模块例如可利用现场可编程门阵列(FPGA)将这些软件模块固化而实现。
软件模块可以位于RAM存储器、闪存、ROM存储器、EPROM存储器、EEPROM存储器、寄存器、硬盘、移动磁盘、CD-ROM或者本领域已知的任何其它形式的存储介质。可以将一种存储介质耦接至处理器,从而使处理器能够从该存储介质读取信息,且可向该存储介质写入信息;或者该存储介质可以是处理器的组成部分。处理器和存储介质可以位于ASIC中。该软件模块可以存储在移动终端的存储器中,也可以存储在可插入移动终端的存储卡中。例如,若设备(例如移动终端)采用的是较大容量的MEGA-SIM卡或者大容量的闪存装置,则该软件模块可存储在该MEGA-SIM卡或者大容量的闪存装置中。
针对图1描述的功能框图中的一个或多个和/或功能框图的一个或多个组合,可以实现为用于执行本申请所描述功能的通用处理器、数字信号处理器(DSP)、专用集成电路(ASIC)、现场可编程门阵列(FPGA)或其它可编程逻辑器件、分立门或晶体管逻辑器件、分立硬件组件、或者其任意适当组合。针对图1描述的功能框图中的一个或多个和/或功能框图的一个或多个组合,还可以实现为计算设备的组合,例如,DSP和微处理器的组合、多个微处理器、与DSP通信结合的一个或多个微处理器或者任何其它这种配置。
以上结合具体的实施方式对本发明进行了描述,但本领域技术人员应该清楚,这些描述都是示例性的,并不是对本发明保护范围的限制。本领域技术人员可以根据本发明的精神和原理对本发明做出各种变型和修改,这些变型和修改也在本发明的范围内。
Claims (20)
- 一种交通异常事件检测装置,所述装置包括:设定单元,其用于分别设定输入图像中至少两个预定区域的检测功能,其中,各个预定区域的检测功能被设定为不同或相同;提取单元,其用于根据各个预定区域分别设定的检测功能,在各个预定区域中分别提取运动前景和/或遗留前景;处理单元,其用于在各个预定区域中分别对提取的运动前景和/或遗留前景进行处理,获得与各个预定区域设定的检测功能对应的交通异常事件检测结果。
- 根据权利要求1所述的装置,其中,所述处理单元包括:第一处理单元,其用于在所述输入图像的当前帧的各个预定区域中,对提取的运动前景和/或遗留前景进行二值化处理,获得运动掩膜和/或遗留掩膜;聚类单元,其用于对当前帧的所述运动掩膜和/或所述遗留掩膜进行聚类,获得当前帧的运动前景块和/或遗留前景块;匹配单元,其用于对当前帧和当前帧的前一帧中的所述运动前景块和/或所述遗留前景块进行匹配,并根据匹配的结果更新当前帧的所述运动前景块和/或所述遗留前景块的信息;第一过滤单元,其用于去除当前帧的所述运动前景块和/或所述遗留前景块中的鬼影。
- 根据权利要求2所述的装置,其中,所述第一过滤单元包括以下的至少一个:第一确定单元,其用于确定所述遗留前景块中的由物体离开造成的鬼影;第二确定单元,其用于确定所述运动前景块中的由灯光移动造成的鬼影;第三确定单元,其用于确定由水坑反射造成的鬼影;并且,所述第一过滤单元还包括:去除单元,其用于去除确定的鬼影。
- 根据权利要求3所述的装置,其中,所述第一确定单元包括:第一计算单元,其用于计算所述遗留前景块的外接矩形的边上的多个像素点的第一平均像素值;第二处理单元,其用于根据所述第一平均像素值对所述输入图像中对应于所述遗留前景块的外接矩形内的区域进行二值化,获得第一二值化图像;第四确定单元,其用于当所述第一二值化图像与所述遗留掩膜的重叠区域的面积小于第一阈值时,将所述遗留前景块确定为由物体离开造成的鬼影。
- 根据权利要求3所述的装置,其中,所述第二确定单元包括:第二计算单元,其用于计算所述运动前景块的外接矩形的边上的多个像素点的第二平均像素值;第三处理单元,其用于根据所述第二平均像素值对所述输入图像中对应于所述运动前景块的外接矩形内的区域进行二值化,获得第二二值化图像;第五确定单元,其用于当所述第二二值化图像与所述运动掩膜的重叠区域的面积小于第二阈值时,将所述运动前景块确定为由灯光移动造成的鬼影。
- 根据权利要求3所述的装置,其中,所述第三确定单元包括:第三计算单元,其用于计算所述遗留前景块和/或所述运动前景块的外接矩形的边上的多个像素点的第三平均像素值;第四计算单元,其用于计算所述遗留前景块和/或所述运动前景块的亮度平均值与所述第三平均像素值的差值;第六确定单元,其用于当所述亮度平均值大于第三阈值且所述差值大于第四阈值时,将所述遗留前景块和/或所述运动前景块确定为由水坑反射造成的鬼影。
- 根据权利要求2所述的装置,其中,所述处理单元还包括:第二过滤单元,其用于根据所述遗留前景块和/或所述运动前景块的尺寸以及所述遗留前景块和/或所述运动前景块在当前帧以及之前所有帧的持续时间,对去除了鬼影的遗留前景块和/或运动前景块进行过滤;判定单元,其用于根据过滤后的遗留前景块和/或运动前景块,判断与设定的检测功能对应的交通异常事件类型,从而获得与所述检测功能对应的交通异常事件检测结果。
- 根据权利要求7所述的装置,其中,所述判定单元包括:第一判定单元,其用于当所述运动前景块的所述持续时间大于第五阈值且所述运动前景块的尺寸大于第六阈值时,将所述运动前景块判定为车道入侵的交通异常事件;第二判定单元,其用于当所述遗留前景块的所述持续时间大于第七阈值且所述遗留前景块的尺寸大于第八阈值时,将所述遗留前景块判断为道路异常或非法停车的交通异常事件。
- 根据权利要求8所述的装置,其中,所述判定单元还包括:第三判定单元,其用于使用车辆分类器对所述遗留前景块中的物体进行分类,当所述遗留前景块中的物体为车辆时,将所述遗留前景块判定为非法停车的交通异常事件,当所述遗留前景块中的物体不是车辆时,将所述遗留前景块判定为道路异常的交通异常事件。
- 根据权利要求1所述的装置,其中,所述装置还包括:报警单元,其用于当所述输入图像中检测出交通异常事件的帧数与所有帧数的比例大于或等于第九阈值时,进行报警。
- 一种交通异常事件检测方法,所述方法包括:分别设定输入图像中至少两个预定区域的检测功能,其中,各个预定区域的检测功能被设定为不同或相同;根据各个预定区域分别设定的检测功能,在各个预定区域中分别提取运动前景和/或遗留前景;在各个预定区域中分别对提取的运动前景和/或遗留前景进行处理,获得与各个预定区域设定的检测功能对应的交通异常事件检测结果。
- 根据权利要求11所述的方法,其中,所述在各个预定区域中分别对提取的运动前景和/或遗留前景进行处理,包括:在所述输入图像的当前帧的各个预定区域中,对提取的运动前景和/或遗留前景进行二值化处理,获得运动掩膜和/或遗留掩膜;对当前帧的所述运动掩膜和/或所述遗留掩膜进行聚类,获得当前帧的运动前景块和/或遗留前景块;对当前帧和当前帧的前一帧中的所述运动前景块和/或所述遗留前景块进行匹配,并根据匹配的结果更新当前帧的所述运动前景块和/或所述遗留前景块的信息;去除当前帧的所述运动前景块和/或所述遗留前景块中的鬼影。
- 根据权利要求12所述的方法,其中,所述去除当前帧的所述运动前景块和/或遗留前景块中的鬼影,包括以下的至少 一个:确定所述遗留前景块中的由物体离开造成的鬼影;确定所述运动前景块中的由灯光移动造成的鬼影;确定由水坑反射造成的鬼影;并且,所述所述去除当前帧的所述运动前景块和/或遗留前景块中的鬼影,还包括:去除确定的鬼影。
- 根据权利要求13所述的方法,其中,所述确定所述遗留前景块中的由物体离开造成的鬼影,包括:计算所述遗留前景块的外接矩形的边上的多个像素点的第一平均像素值;根据所述第一平均像素值对所述输入图像中对应于所述遗留前景块的外接矩形内的区域进行二值化,获得第一二值化图像;当所述第一二值化图像与所述遗留掩膜的重叠区域的面积小于第一阈值时,将所述遗留前景块确定为由物体离开造成的鬼影。
- 根据权利要求13所述的方法,其中,所述确定所述运动前景块中的由灯光移动造成的鬼影,包括:计算所述运动前景块的外接矩形的边上的多个像素点的第二平均像素值;根据所述第二平均像素值对所述输入图像中对应于所述运动前景块的外接矩形内的区域进行二值化,获得第二二值化图像;当所述第二二值化图像与所述运动掩膜的重叠区域的面积小于第二阈值时,将所述运动前景块确定为由灯光移动造成的鬼影。
- 根据权利要求13所述的方法,其中,所述确定由水坑反射造成的鬼影,包括:第三计算单元,其用于计算所述遗留前景块和/或所述运动前景块的外接矩形的边上的多个像素点的第三平均像素值;第四计算单元,其用于计算所述遗留前景块和/或所述运动前景块的亮度平均值与所述第三平均像素值的差值;第六确定单元,其用于当所述亮度平均值大于第三阈值且所述差值大于第四阈值时,将所述遗留前景块和/或所述运动前景块确定为由水坑反射造成的鬼影。
- 根据权利要求12所述的方法,其中,所述在各个预定区域中分别对提取的 运动前景和/或遗留前景进行处理,还包括:根据所述遗留前景块和/或所述运动前景块的尺寸以及所述遗留前景块和/或所述运动前景块在当前帧以及之前所有帧的持续时间,对去除了鬼影的遗留前景块和/或运动前景块进行过滤;根据过滤后的遗留前景块和/或运动前景块,判断与设定的检测功能对应的交通异常事件类型,从而获得与所述检测功能对应的交通异常事件检测结果。
- 根据权利要求17所述的方法,其中,所述根据过滤后的遗留前景块和/或运动前景块,判断与设定的检测功能对应的交通异常事件类型,包括:当所述运动前景块的所述持续时间大于第五阈值且所述运动前景块的尺寸大于第六阈值时,将所述运动前景块判定为车道入侵的交通异常事件;当所述遗留前景块的所述持续时间大于第七阈值且所述遗留前景块的尺寸大于第八阈值时,将所述遗留前景块判断为道路异常或非法停车的交通异常事件。
- 根据权利要求18所述的方法,其中,所述根据过滤后的遗留前景块和/或运动前景块,判断与设定的检测功能对应的交通异常事件类型,还包括:使用车辆分类器对所述遗留前景块中的物体进行分类,当所述遗留前景块中的物体为车辆时,将所述遗留前景块判定为非法停车的交通异常事件,当所述遗留前景块中的物体不是车辆时,将所述遗留前景块判定为道路异常的交通异常事件。
- 根据权利要求11所述的方法,其中,所述方法还包括:当所述输入图像中检测出交通异常事件的帧数与所有帧数的比例大于或等于第九阈值时,进行报警。
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201680087727.5A CN109643488B (zh) | 2016-10-14 | 2016-10-14 | 交通异常事件检测装置及方法 |
PCT/CN2016/102157 WO2018068312A1 (zh) | 2016-10-14 | 2016-10-14 | 交通异常事件检测装置及方法 |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
PCT/CN2016/102157 WO2018068312A1 (zh) | 2016-10-14 | 2016-10-14 | 交通异常事件检测装置及方法 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2018068312A1 true WO2018068312A1 (zh) | 2018-04-19 |
Family
ID=61906118
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2016/102157 WO2018068312A1 (zh) | 2016-10-14 | 2016-10-14 | 交通异常事件检测装置及方法 |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN109643488B (zh) |
WO (1) | WO2018068312A1 (zh) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111369807A (zh) * | 2020-03-24 | 2020-07-03 | 北京百度网讯科技有限公司 | 一种交通事故的检测方法、装置、设备和介质 |
CN111814668A (zh) * | 2020-07-08 | 2020-10-23 | 北京百度网讯科技有限公司 | 用于检测道路抛洒物的方法和装置 |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111832349A (zh) * | 2019-04-18 | 2020-10-27 | 富士通株式会社 | 遗留物错误检测的识别方法、装置及图像处理设备 |
CN113361299B (zh) * | 2020-03-03 | 2023-08-15 | 浙江宇视科技有限公司 | 一种异常停车的检测方法、装置、存储介质及电子设备 |
CN114338956B (zh) * | 2020-09-30 | 2024-07-23 | 北京小米移动软件有限公司 | 图像处理方法、图像处理装置及存储介质 |
CN112927504B (zh) * | 2021-01-26 | 2022-04-26 | 广东紫云平台数据服务有限公司 | 一种基于大数据的交通违章确认方法及系统 |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101017573A (zh) * | 2007-02-09 | 2007-08-15 | 南京大学 | 一种基于视频监控的运动目标检测与识别方法 |
KR100834550B1 (ko) * | 2007-12-17 | 2008-06-02 | (주)동화이엔지 | 불법 주정차 무인 자동 단속방법 및 그 시스템 |
CN103116985A (zh) * | 2013-01-21 | 2013-05-22 | 信帧电子技术(北京)有限公司 | 一种违章停车检测方法和装置 |
CN103914688A (zh) * | 2014-03-27 | 2014-07-09 | 北京科技大学 | 一种城市道路障碍物识别系统 |
CN104376554A (zh) * | 2014-10-16 | 2015-02-25 | 中海网络科技股份有限公司 | 一种基于图像纹理的违章停车检测方法 |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP3678273B2 (ja) * | 2000-12-21 | 2005-08-03 | 日本電気株式会社 | 画像認識による移動体数量測定システム及び移動体数量測定方法 |
CN100481149C (zh) * | 2006-05-22 | 2009-04-22 | 昆明利普机器视觉工程有限公司 | 交通违章取证的车辆视频数据挖掘系统和方法 |
CN101409014A (zh) * | 2008-11-26 | 2009-04-15 | 战国新 | 一种交通道路机动车辆身份识别系统 |
CN102568206B (zh) * | 2012-01-13 | 2014-09-10 | 大连民族学院 | 一种基于视频监控的违章停车检测方法 |
CN103235933B (zh) * | 2013-04-15 | 2016-08-03 | 东南大学 | 一种基于隐马尔科夫模型的车辆异常行为检测方法 |
-
2016
- 2016-10-14 CN CN201680087727.5A patent/CN109643488B/zh active Active
- 2016-10-14 WO PCT/CN2016/102157 patent/WO2018068312A1/zh active Application Filing
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101017573A (zh) * | 2007-02-09 | 2007-08-15 | 南京大学 | 一种基于视频监控的运动目标检测与识别方法 |
KR100834550B1 (ko) * | 2007-12-17 | 2008-06-02 | (주)동화이엔지 | 불법 주정차 무인 자동 단속방법 및 그 시스템 |
CN103116985A (zh) * | 2013-01-21 | 2013-05-22 | 信帧电子技术(北京)有限公司 | 一种违章停车检测方法和装置 |
CN103914688A (zh) * | 2014-03-27 | 2014-07-09 | 北京科技大学 | 一种城市道路障碍物识别系统 |
CN104376554A (zh) * | 2014-10-16 | 2015-02-25 | 中海网络科技股份有限公司 | 一种基于图像纹理的违章停车检测方法 |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111369807A (zh) * | 2020-03-24 | 2020-07-03 | 北京百度网讯科技有限公司 | 一种交通事故的检测方法、装置、设备和介质 |
CN111369807B (zh) * | 2020-03-24 | 2022-04-12 | 北京百度网讯科技有限公司 | 一种交通事故的检测方法、装置、设备和介质 |
CN111814668A (zh) * | 2020-07-08 | 2020-10-23 | 北京百度网讯科技有限公司 | 用于检测道路抛洒物的方法和装置 |
CN111814668B (zh) * | 2020-07-08 | 2024-05-10 | 北京百度网讯科技有限公司 | 用于检测道路抛洒物的方法和装置 |
Also Published As
Publication number | Publication date |
---|---|
CN109643488B (zh) | 2021-04-20 |
CN109643488A (zh) | 2019-04-16 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2018068312A1 (zh) | 交通异常事件检测装置及方法 | |
CN110136449B (zh) | 基于深度学习的交通视频车辆违停自动识别抓拍的方法 | |
US10212397B2 (en) | Abandoned object detection apparatus and method and system | |
US8798314B2 (en) | Detection of vehicles in images of a night time scene | |
Barcellos et al. | A novel video based system for detecting and counting vehicles at user-defined virtual loops | |
WO2018223955A1 (zh) | 目标监控方法、目标监控装置、摄像机及计算机可读介质 | |
Wu et al. | Lane-mark extraction for automobiles under complex conditions | |
JP5815910B2 (ja) | マルチキュー・オブジェクトの検出および分析のための方法、システム、製品、およびコンピュータ・プログラム(マルチキュー・オブジェクトの検出および分析) | |
KR101935399B1 (ko) | 심층 신경망 알고리즘 기반 광역 다중 객체 감시 시스템 | |
CN112349087B (zh) | 一种基于路口信息全息感知的可视化数据输入方法 | |
CN111079621A (zh) | 检测对象的方法、装置、电子设备和存储介质 | |
Nagaraj et al. | Traffic jam detection using image processing | |
Huang et al. | A real-time and color-based computer vision for traffic monitoring system | |
CN110033425B (zh) | 干扰区域检测装置及方法、电子设备 | |
Xiong et al. | Fast and robust approaches for lane detection using multi‐camera fusion in complex scenes | |
CN110782485A (zh) | 一种车辆变道检测方法及装置 | |
Kryjak et al. | Hardware-software implementation of vehicle detection and counting using virtual detection lines | |
CN115797880A (zh) | 驾驶行为的确定方法、装置、存储介质及电子装置 | |
Ha et al. | A robust algorithm for vehicle detection and classification in intelligent traffic system | |
Panda et al. | Application of Image Processing In Road Traffic Control | |
Wangsiripitak et al. | Traffic light and crosswalk detection and localization using vehicular camera | |
CN112597924A (zh) | 电动自行车轨迹追踪方法、摄像机装置和服务器 | |
CN112686136A (zh) | 一种对象检测方法、装置及系统 | |
Li et al. | A video-based algorithm for moving objects detection at signalized intersection | |
JP7494742B2 (ja) | 交通量計数装置、方法及び電子機器 |
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: 16918959 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 16918959 Country of ref document: EP Kind code of ref document: A1 |