CN113011219A - Method for automatically updating background in response to light change in occlusion detection - Google Patents

Method for automatically updating background in response to light change in occlusion detection Download PDF

Info

Publication number
CN113011219A
CN113011219A CN201911319018.7A CN201911319018A CN113011219A CN 113011219 A CN113011219 A CN 113011219A CN 201911319018 A CN201911319018 A CN 201911319018A CN 113011219 A CN113011219 A CN 113011219A
Authority
CN
China
Prior art keywords
image
light
frame difference
light change
counter
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201911319018.7A
Other languages
Chinese (zh)
Inventor
马艳
于康龙
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hefei Ingenic Technology Co ltd
Original Assignee
Hefei Ingenic Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hefei Ingenic Technology Co ltd filed Critical Hefei Ingenic Technology Co ltd
Priority to CN201911319018.7A priority Critical patent/CN113011219A/en
Publication of CN113011219A publication Critical patent/CN113011219A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/50Context or environment of the image
    • G06V20/59Context or environment of the image inside of a vehicle, e.g. relating to seat occupancy, driver state or inner lighting conditions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N7/00Television systems
    • H04N7/18Closed-circuit television [CCTV] systems, i.e. systems in which the video signal is not broadcast

Abstract

The invention provides a method for automatically updating a background in response to light change in occlusion detection, which comprises the following steps: initializing parameters, acquiring the current environmental state through a photosensitive sensor, and judging whether the light in the vehicle changes according to the environmental state fed back by the photosensitive sensor; if the light change is detected, calculating the adjacent frame difference after the light change, judging whether the image after the light change is stable or not according to the adjacent frame difference, and carrying out shielding detection on the image after the light change according to the minimum blocking detail characteristics; and if the requirements of stability and no occlusion are met, automatically updating the current frame into the background. And returning to wait for the next frame of image, and executing the step of obtaining the current environment state through the photosensitive sensor.

Description

Method for automatically updating background in response to light change in occlusion detection
Technical Field
The invention relates to the technical field of intelligent monitoring video processing, in particular to a method for automatically updating a background in response to light change in occlusion detection.
Background
With the continuous development of science and technology, particularly the development of intelligent technology and the wide application of the internet, particularly in recent years, the promises of the internet appointment vehicle provide convenience for the travel of the public, and in order to guarantee the personal safety of personnel in the vehicle, a monitoring camera is additionally arranged in the vehicle, so that lawless persons can be deterred, the on-site information in the vehicle can be effectively saved, and a powerful evidence is provided for the criminal marching.
At present, a method for detecting the occlusion of a video image in a vehicle of a vehicle-mounted monitoring camera is mainly based on a background difference method, and whether the video image is occluded or not is judged by calculating the frame difference between a current image and a background image according to the frame difference. The background difference method has good detection capability on a static background dynamic target, but the static background cannot be basically guaranteed for the running vehicle environment, and particularly, the background is greatly changed under the conditions that a vehicle enters and exits an underground garage or a tunnel, changes day and night and the like. In order to exert the advantages of the background difference method to the maximum extent, the background in the current environment needs to be updated timely and effectively, and the accuracy of the occlusion detection is improved.
Disclosure of Invention
The technical problem to be solved by the invention is as follows: under the conditions that vehicles pass in and out of underground garages or tunnels and change day and night, the monitoring pictures in the vehicles cause larger image difference due to environment change. At this time, if the background is not updated, and the frame difference between the background and the current frame image is calculated according to the background before the environment is changed, the frame difference value is very large, and the equipment can always send out an occlusion alarm after the environment is changed, so that the occlusion detection fails.
In order to solve the technical problems, the invention provides a method for automatically updating a background in response to light change in occlusion detection, which judges whether light in a vehicle changes or not according to an environmental state fed back by a photosensitive sensor; if the light change is detected, calculating the adjacent frame difference after the light change, judging whether the image after the light change is stable or not according to the adjacent frame difference, and carrying out shielding detection on the image after the light change according to the minimum blocking detail characteristics; and if the requirements of stability and no occlusion are met, automatically updating the current frame into the background.
Before the step of judging whether the light in the vehicle changes, the method also comprises
S1, initializing parameters, further comprising:
environmental state: cur _ env ═ 0
The working state is as follows: work _ mode is 0
Ray conversion counter: t1 ═ 0
Adjacent frame difference counter: t2 ═ 0
A characteristic counter: t3 ═ 0;
s2, obtain the current environmental state cur _ env through the photosensitive sensor.
After the step of automatically updating the current frame to the background, the method further comprises the step of returning to wait for the next frame of image and executing the step of obtaining the current environment state through the photosensitive sensor.
The judging whether the light in the vehicle changes further comprises: if the detected environment state is inconsistent with the current working state, the environment light is considered to be changed, and the step of calculating the adjacent frame difference after the light change is executed; otherwise, resetting the light ray conversion counter, executing return, waiting for the next frame of image, and executing to obtain the current environment state through the photosensitive sensor.
The step of calculating the difference between adjacent frames after the light change further comprises:
A. the ray conversion counter counts, namely t1 is t1+ 1;
B. if the image is the first frame image after the change, namely t1 is equal to 0, calculating the frame difference of the same frame image, namely the frame difference is 0; otherwise, calculating the frame difference of the adjacent frame images, namely the frame difference between the current frame image and the temporary background;
C. and saving the current frame image as a temporary background.
The step of judging whether the image after the light change is stable or not through the adjacent frame difference further comprises:
a. if the adjacent frame difference is smaller than the set threshold 1, the adjacent frame difference counter counts, i.e. t2 is t2+ 1; otherwise, resetting the adjacent frame difference counter, i.e. t2 equals 0;
b. if the adjacent frame difference counter is larger than the set threshold value 2, executing a step of judging whether the image after the light change is shielded or not through the minimum blocking detail characteristics; otherwise, returning is carried out, the next frame of image is waited, and the step of obtaining the current environment state through the photosensitive sensor is carried out.
The step of judging whether the image with changed light is shielded or not through the minimum blocking detail features further comprises the following steps:
H. carrying out adaptive threshold binarization on the current frame;
I. equally dividing the whole binary image according to 4x4, and counting the distribution of detail features of blocks, namely counting the number of nonzero pixel points in each block of the binary image;
J. judging whether each block detail feature is larger than a set threshold value 3, if so, counting by a feature counter, namely t3 is t3+ 1; otherwise, resetting the characteristic counter t3, namely t3 is 0, then returning to wait for the next frame of image, and executing the step of obtaining the current environment state through the photosensitive sensor;
K. judging whether the characteristic counter t3 is greater than a set threshold value 4, if so, executing a background updating step; otherwise, returning is carried out, the next frame of image is waited, and the step of obtaining the current environment state through the photosensitive sensor is carried out.
The automatic updating is background and further comprises synchronizing the operation mode with the environment signal.
Thus, the present application has the advantages that: judging whether the light in the vehicle changes according to the environmental state fed back by the photosensitive sensor; if the light change is detected, judging the picture stability according to the adjacent frame difference of continuous multiframes, and carrying out shielding detection on the image after the light change according to the minimum blocking detail characteristics; if the requirements of stability and no occlusion are met, the current frame may be automatically updated to the background. After the background is updated, the shielding detection is carried out through the background difference, so that the problem that the shielding detection fails due to light change can be solved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the principles of the invention.
Fig. 1 is a schematic block diagram of a method to which the present invention relates.
Fig. 2 is a schematic flow chart of an embodiment of the present invention.
Fig. 3 is a block flow diagram of a particular embodiment of the present invention relating to a method.
Detailed Description
In order that the technical contents and advantages of the present invention can be more clearly understood, the present invention will now be described in further detail with reference to the accompanying drawings.
As shown in FIG. 1, the present invention relates to a method for automatically updating background in response to light change in occlusion detection, which determines whether the light in the vehicle changes according to the environmental status fed back by a photosensor; if the light change is detected, calculating the adjacent frame difference after the light change, judging whether the image after the light change is stable or not according to the adjacent frame difference, and carrying out shielding detection on the image after the light change according to the minimum blocking detail characteristics; and if the requirements of stability and no occlusion are met, automatically updating the current frame into the background.
Specifically, as shown in fig. 2, the steps of the method of the present invention can be expressed as follows:
the implementation steps of the invention are as follows:
s1, initializing parameters, including
Environmental state: cur _ env ═ 0
The working state is as follows: work _ mode is 0
Ray conversion counter: t1 ═ 0
Adjacent frame difference counter: t2 ═ 0
A characteristic counter: t3 ═ 0;
s2, obtaining a current environment state cur _ env through a photosensitive sensor;
s3, judging whether the ambient light changes;
if the detected environmental state is inconsistent with the current working state, the environmental light is considered to be changed, and S4 is executed; otherwise, resetting the ray conversion counter and executing S8;
s4, calculating the adjacent frame difference after the light changes;
s5, judging whether the image after the light change is stable or not through the adjacent frame difference;
s6, judging whether the image with the changed light is shielded or not through the minimum blocking detail features;
s7, updating the background and synchronizing the working mode and the environment signal;
and S8, returning to wait for the next frame of image, and executing S2.
Wherein the content of the first and second substances,
s4, calculating the adjacent frame difference after the light changes, comprising the following steps:
s4.1, counting by the ray conversion counter, i.e. t1 equals t1+ 1;
s4.2, if the image is the first frame image after the change (t1 is equal to 0), calculating a frame difference of the same frame image, that is, the frame difference is 0; otherwise, calculating the frame difference of the adjacent frame images, namely the frame difference between the current frame image and the temporary background;
s4.3, saving the current frame image as a temporary background;
s5, judging whether the image after the light change is stable or not through the adjacent frame difference, and the method comprises the following steps:
s5.1, if the adjacent frame difference is smaller than the set threshold 1, the adjacent frame difference counter counts, i.e. t2 is t2+ 1; otherwise, resetting the adjacent frame difference counter, i.e. t2 equals 0;
s5.2 if the adjacent frame difference counter is greater than the set threshold 2, then S6 is performed; otherwise, executing S8;
s6, whether the image with the changed light is shielded or not is judged through the minimum blocking detail characteristics, and the method comprises the following steps:
s6.1, performing adaptive threshold binarization on the current frame;
s6.2, equally dividing the whole binary image according to 4x4, and counting the distribution of detail features of blocks, namely counting the number of nonzero pixel points in each block of the binary image;
s6.3, judging whether each block detail feature is larger than a set threshold value 3, if so, counting by a feature counter, namely t3 is t3+ 1; otherwise, the feature counter t3 is reset, i.e., t3 is 0, and then S8 is performed;
s6.4, judging whether the characteristic counter t3 is larger than a set threshold value 4, if so, executing S7; otherwise, S8 is executed.
The flow of the specific embodiment of the method of the present invention is shown in fig. 3, wherein the main implementation steps of the method are as follows:
step 1, initializing parameters, wherein the specific parameter meanings and initialization values are as follows:
environmental state: cur _ env ═ 0
The working state is as follows: work _ mode is 0
Ray conversion counter: t1 ═ 0
Adjacent frame difference counter: t2 ═ 0
A characteristic counter: t3 ═ 0
Step 2, obtaining the current environment state through a photosensitive sensor
Step 3, judging whether the ambient light changes
If the detected environment state is inconsistent with the current working state, the environment light is considered to be changed, and the step 4 is executed; otherwise, resetting the light ray conversion counter and executing the step 8;
step 4, calculating the adjacent frame difference after the light change
4.1 the ray change counter counts, i.e. t1 ═ t1+ 1;
4.2 if the image is the first frame image after the change (t1 is 0), calculating the frame difference of the same frame image, namely the frame difference is 0; otherwise, calculating the frame difference of the adjacent frame images, namely the frame difference between the current frame image and the temporary background;
4.3 saving the current frame image as a temporary background;
step 5, judging whether the image after the light change is stable or not according to the adjacent frame difference
5.1 if the adjacent frame difference is smaller than the set threshold 1, the adjacent frame difference counter counts, i.e. t2 is t2+ 1; otherwise, resetting the adjacent frame difference counter, i.e. t2 equals 0;
5.2 if the adjacent frame difference counter is larger than the set threshold 2, executing step 6; otherwise, executing step 8;
step 6, judging whether the image with changed light is shielded or not through the minimum blocking detail characteristics
6.1, carrying out adaptive threshold binarization on the current frame;
6.2 equally dividing the whole binary image according to 4x4, and counting the distribution of detail features of the blocks, namely counting the number of nonzero pixel points in each block of the binary image;
6.3, judging whether each block detail feature is larger than a set threshold 3, if so, counting by a feature counter, namely t3 is t3+ 1; otherwise, the feature counter t3 is reset, i.e., t3 is 0, and then step 8 is executed;
6.4, judging whether the characteristic counter t3 is greater than a set threshold value 4, if so, executing a step 7; otherwise, executing step 8;
step 7, updating the background and synchronizing the working mode and the environment signal
And 8, returning to wait for the next frame of image, and executing the step 2.
The above description is only a preferred embodiment of the present invention, and is not intended to limit the present invention, and various modifications and changes may be made to the embodiment of the present invention by those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (8)

1. A method for automatically updating background in response to light change in occlusion detection is characterized in that whether light in a vehicle changes or not is judged according to an environment state fed back by a photosensitive sensor; if the light change is detected, calculating the adjacent frame difference after the light change, judging whether the image after the light change is stable or not according to the adjacent frame difference, and carrying out shielding detection on the image after the light change according to the minimum blocking detail characteristics; and if the requirements of stability and no occlusion are met, automatically updating the current frame into the background.
2. The method for automatically updating the background in response to the light change in occlusion detection as claimed in claim 1, further comprising S1 before the step of determining whether the light in the vehicle has changed, wherein the parameter initialization further comprises:
environmental state: cur _ env ═ 0;
the working state is as follows: word _ mode is 0;
ray conversion counter: t1 ═ 0;
adjacent frame difference counter: t2 ═ 0;
a characteristic counter: t3 ═ 0;
s2, obtain the current environmental state cur _ env through the photosensitive sensor.
3. The method of claim 1, further comprising, after the step of automatically updating the current frame to the background, returning to wait for the next frame of image, and performing the step of obtaining the current environmental status through the photosensitive sensor.
4. The method of claim 1, wherein the determining whether the light in the vehicle has changed further comprises: if the detected environment state is inconsistent with the current working state, the environment light is considered to be changed, and the step of calculating the adjacent frame difference after the light change is executed; otherwise, resetting the light ray conversion counter, executing return, waiting for the next frame of image, and executing to obtain the current environment state through the photosensitive sensor.
5. The method of claim 1, wherein the step of calculating the difference between adjacent frames after the light change further comprises:
A. the ray conversion counter counts, namely t1 is t1+ 1;
B. if the image is the first frame image after the change, namely t1 is equal to 0, calculating the frame difference of the same frame image, namely the frame difference is 0; otherwise, calculating the frame difference of the adjacent frame images, namely the frame difference between the current frame image and the temporary background;
C. and saving the current frame image as a temporary background.
6. The method according to claim 1, wherein the step of determining whether the image after the light change is stable according to the adjacent frame difference further comprises:
a. if the adjacent frame difference is smaller than the set threshold 1, the adjacent frame difference counter counts, i.e. t2 is t2+ 1; otherwise, resetting the adjacent frame difference counter, i.e. t2 equals 0;
b. if the adjacent frame difference counter is larger than the set threshold value 2, executing a step of judging whether the image after the light change is shielded or not through the minimum blocking detail characteristics; otherwise, returning is carried out, the next frame of image is waited, and the step of obtaining the current environment state through the photosensitive sensor is carried out.
7. The method according to claim 1, wherein the step of determining whether the image with changed light is occluded according to the minimum blocking detail features further comprises:
H. carrying out adaptive threshold binarization on the current frame;
I. equally dividing the whole binary image according to 4x4, and counting the distribution of detail features of blocks, namely counting the number of nonzero pixel points in each block of the binary image;
J. judging whether each block detail feature is larger than a set threshold value 3, if so, counting by a feature counter, namely t3 is t3+ 1; otherwise, resetting the characteristic counter t3, namely t3 is 0, then returning to wait for the next frame of image, and executing the step of obtaining the current environment state through the photosensitive sensor;
K. judging whether the characteristic counter t3 is greater than a set threshold value 4, if so, executing a background updating step; otherwise, returning is carried out, the next frame of image is waited, and the step of obtaining the current environment state through the photosensitive sensor is carried out.
8. The method of claim 1, wherein the automatic updating is background, further comprising synchronizing the operation mode with the ambient signal.
CN201911319018.7A 2019-12-19 2019-12-19 Method for automatically updating background in response to light change in occlusion detection Pending CN113011219A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911319018.7A CN113011219A (en) 2019-12-19 2019-12-19 Method for automatically updating background in response to light change in occlusion detection

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911319018.7A CN113011219A (en) 2019-12-19 2019-12-19 Method for automatically updating background in response to light change in occlusion detection

Publications (1)

Publication Number Publication Date
CN113011219A true CN113011219A (en) 2021-06-22

Family

ID=76382213

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911319018.7A Pending CN113011219A (en) 2019-12-19 2019-12-19 Method for automatically updating background in response to light change in occlusion detection

Country Status (1)

Country Link
CN (1) CN113011219A (en)

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050078853A1 (en) * 2003-10-10 2005-04-14 Buehler Christopher J. System and method for searching for changes in surveillance video
CN101715070A (en) * 2009-11-16 2010-05-26 南京邮电大学 Method for automatically updating background in specifically monitored video
WO2011060385A1 (en) * 2009-11-13 2011-05-19 Pixel Velocity, Inc. Method for tracking an object through an environment across multiple cameras
CN103139547A (en) * 2013-02-25 2013-06-05 昆山南邮智能科技有限公司 Method of judging shielding state of pick-up lens based on video image signal
CN104240235A (en) * 2014-08-26 2014-12-24 北京君正集成电路股份有限公司 Method and system for detecting whether camera is covered or not
CN104616290A (en) * 2015-01-14 2015-05-13 合肥工业大学 Target detection algorithm in combination of statistical matrix model and adaptive threshold
CN104865851A (en) * 2015-03-20 2015-08-26 深圳市冠旭电子有限公司 Light variation-based energy saving method and device
CN106485729A (en) * 2016-09-29 2017-03-08 江苏云光智慧信息科技有限公司 A kind of moving target detecting method based on mixed Gauss model
CN107347151A (en) * 2016-05-04 2017-11-14 深圳众思科技有限公司 binocular camera occlusion detection method and device
CN109003291A (en) * 2018-07-11 2018-12-14 上饶师范学院 Method for tracking target and device

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050078853A1 (en) * 2003-10-10 2005-04-14 Buehler Christopher J. System and method for searching for changes in surveillance video
WO2011060385A1 (en) * 2009-11-13 2011-05-19 Pixel Velocity, Inc. Method for tracking an object through an environment across multiple cameras
CN101715070A (en) * 2009-11-16 2010-05-26 南京邮电大学 Method for automatically updating background in specifically monitored video
CN103139547A (en) * 2013-02-25 2013-06-05 昆山南邮智能科技有限公司 Method of judging shielding state of pick-up lens based on video image signal
CN104240235A (en) * 2014-08-26 2014-12-24 北京君正集成电路股份有限公司 Method and system for detecting whether camera is covered or not
CN104616290A (en) * 2015-01-14 2015-05-13 合肥工业大学 Target detection algorithm in combination of statistical matrix model and adaptive threshold
CN104865851A (en) * 2015-03-20 2015-08-26 深圳市冠旭电子有限公司 Light variation-based energy saving method and device
CN107347151A (en) * 2016-05-04 2017-11-14 深圳众思科技有限公司 binocular camera occlusion detection method and device
CN106485729A (en) * 2016-09-29 2017-03-08 江苏云光智慧信息科技有限公司 A kind of moving target detecting method based on mixed Gauss model
CN109003291A (en) * 2018-07-11 2018-12-14 上饶师范学院 Method for tracking target and device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
范舜奕等: "利用巴氏系数判定模型更新的视觉跟踪算法", 《计算机应用研究》, vol. 34, no. 3, pages 915 - 919 *

Similar Documents

Publication Publication Date Title
CN103729858B (en) A kind of video monitoring system is left over the detection method of article
EP3859708B1 (en) Traffic light image processing method and device, and roadside device
US20240071215A1 (en) Detection method and apparatus of abnormal vehicle, device, and storage medium
CN102568242A (en) Signal lamp state detection method and system based on video processing
CN103714325A (en) Left object and lost object real-time detection method based on embedded system
KR20210080459A (en) Lane detection method, apparatus, electronic device and readable storage medium
CN110636281B (en) Real-time monitoring camera shielding detection method based on background model
CN104902265A (en) Background edge model-based video camera anomaly detection method and system
KR101630286B1 (en) Apparatus for separating foreground from background and method thereof
US20160210759A1 (en) System and method of detecting moving objects
JP2010097412A (en) Smoke detecting apparatus
CN104778723A (en) Method for performing motion detection on infrared image with three-frame difference method
CN115171013A (en) Vehicle scheduling system and method based on intelligent traffic accident rescue
CN109886864B (en) Privacy mask processing method and device
JP2001160146A (en) Method and device for recognizing image
CN116403162B (en) Airport scene target behavior recognition method and system and electronic equipment
CN113011219A (en) Method for automatically updating background in response to light change in occlusion detection
CN205378015U (en) Detecting device with two cameras
CN116246416A (en) Intelligent analysis early warning platform and method for security protection
CN111145219B (en) Efficient video moving target detection method based on Codebook principle
CN113096059B (en) Method for eliminating interference shielding detection of night light source by in-vehicle monitoring camera
KR20210158037A (en) Method for tracking multi target in traffic image-monitoring-system
CN113011227B (en) Auxiliary detection method for avoiding false alarm during background updating pre-judgment in shielding detection
CN113011216B (en) Multi-classification threshold self-adaptive shielding detection method
TWI448992B (en) Mothod for video monitoring

Legal Events

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