CN103971382A - Target detection method avoiding light influences - Google Patents

Target detection method avoiding light influences Download PDF

Info

Publication number
CN103971382A
CN103971382A CN201410214426.7A CN201410214426A CN103971382A CN 103971382 A CN103971382 A CN 103971382A CN 201410214426 A CN201410214426 A CN 201410214426A CN 103971382 A CN103971382 A CN 103971382A
Authority
CN
China
Prior art keywords
gradient
pixel
image
current frame
background image
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
CN201410214426.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.)
State Grid Corp of China SGCC
State Grid Tianjin Electric Power Co Ltd
Original Assignee
State Grid Corp of China SGCC
State Grid Tianjin Electric Power 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 State Grid Corp of China SGCC, State Grid Tianjin Electric Power Co Ltd filed Critical State Grid Corp of China SGCC
Priority to CN201410214426.7A priority Critical patent/CN103971382A/en
Publication of CN103971382A publication Critical patent/CN103971382A/en
Pending legal-status Critical Current

Links

Landscapes

  • Image Processing (AREA)
  • Image Analysis (AREA)

Abstract

A target detection method avoiding light influences includes the following sequentially executed steps that first, a background image is established with a statistic method; second, the gradient of an image of the current frame and the gradient of the background image are calculated and output, and the gradient comprises horizontal direction gradient and vertical direction gradient; third, the direction and the amplitude of the gradient of the image of current frame are compared with the direction and the amplitude of the gradient of the background image, and the foreground contour is extracted and output on the basis; fourth, the extracted foreground contour is filled to acquire foreground blocks, and noise is filtered out to output a target. With the target detection method avoiding light influences, the target avoiding light influences can be accurately detected, and the problems that the target cannot be detected accurately or reliably due to light influences in the target detection process are effectively solved.

Description

A kind of object detection method of avoiding illumination effect
Technical field
The invention belongs to image processing, technical field of video monitoring, particularly relate to a kind of object detection method of avoiding illumination effect.
Background technology
Moving object detection is the basis of Intelligent Video Surveillance Technology, its testing result will directly affect the alert rate of mistake and the false alarm rate that later stage event (such as: invasion, article leave over, article are stolen, vehicle driving in reverse etc.) detects, and has therefore obtained paying close attention to widely.But in the time of practical application, often there will be the situation of illumination variation, this has just affected accuracy and the reliability of moving object detection greatly.Therefore, need research to avoid the object detection method of illumination effect.
The object detection method of avoiding illumination effect of research mainly contains two classes at present.Wherein, class methods are the methods based on pixel.In general illumination variation only can be brought the variation of pixel intensity and color does not have too large variation, and these class methods are identified illumination variation in HSI space to pixel value analysis based on this principle.But a lot of situations do not meet this supposed premise in true environment the inside, and be that background or target all do not have colouring information in most outdoor scene the inside, these class methods are unsatisfactory at the effect of actual environment the inside like this.Another kind of method is the method based on region.If all there is certain contrast at illumination variation front and back scene, the variation of illumination can not bring the variation of image texture edge feature so, method based on region is utilized this principle just, if the edge of prospect and background matches, this foreground area is exactly the false foreground area that illumination variation causes.But the hypothesis of " illumination variation front and back scene all has certain contrast " is false in night, these class methods lost efficacy.In addition, in illumination variation region, there is real goal to enter also can to cause these class methods that it fails to match simultaneously.
In sum, at present in the urgent need to proposing simply a kind of and effectively avoiding the object detection method of illumination effect.
Summary of the invention
In order to address the above problem, the object of the present invention is to provide a kind of object detection method of avoiding illumination effect.
In order to achieve the above object, the object detection method of avoiding illumination effect provided by the invention comprises the following step of carrying out in order:
Step 101: adopt statistical method to set up background image;
Step 102: calculate and export the gradient of current frame image and the gradient of described background image, described gradient comprises horizontal direction gradient and vertical gradient;
Step 103: direction and the amplitude of the gradient of more described current frame image and the gradient of described background image, and extract accordingly and export prospect profile;
Step 104: the prospect profile extracting is filled to obtain prospect agglomerate, and filtering noise is with export target.
In step 102, the horizontal direction gradient of described current frame image, vertical gradient, and horizontal direction gradient, the vertical gradient of described background image are to adopt gradient operator to calculate respectively.
In step 103, the described gradient of comparison current frame image and direction and the amplitude of the gradient of background image, and the method for extracting accordingly and export prospect profile comprises the following steps:
Step 1031: the horizontal direction gradient of the described current frame image of exporting according to step 102 and the horizontal direction gradient of vertical gradient and described background image and vertical gradient are calculated gradient magnitude A2 and the gradient direction θ 2 of each pixel in the gradient magnitude A1 of each pixel in described current frame image and gradient direction θ 1 and described background image;
Step 1032: if the gradient magnitude A2 of this pixel (x, y) in gradient magnitude A1 and the described background image of the pixel (x, y) in described current frame image all >=first threshold T1, proceed to step 1033; If gradient magnitude A1 and A2 all≤Second Threshold T2, think that this pixel (x, y) be noise spot, otherwise calculating | A1-A2|; If | A1-A2| >=three threshold value T3, thinks that this pixel (x, y) belongs to foreground point;
Step 1033: calculate this pixel (x in described current frame image, y) this pixel (x in gradient direction θ 1 and described background image, y) absolute difference of gradient direction θ 2 | θ 1-θ 2|, if | θ 1-θ 2| >=four threshold value T4, think that this pixel (x, y) belongs to foreground point;
Step 1034: extract all pixels that belong to foreground point, thereby obtain prospect profile.
Described first threshold T1 ∈ [8,12], Second Threshold T2 ∈ [3,5], the 3rd threshold value T3 ∈ [4,6], the 4th threshold value T4 ∈ [18 °, 22 °].
In step 104, the described prospect profile to extracting fills to obtain prospect agglomerate, and filtering noise comprises the following steps with export target:
Step 1041: the prospect profile that step 103 is exported fills to obtain prospect agglomerate;
Step 1042: calculate the error image of current frame image and background image, adopt thresholding method to carry out Threshold segmentation to this error image, to obtain the Prospects For Changes in error image;
Step 1043: described prospect agglomerate and described Prospects For Changes are carried out to AND-operation, using the pixel that belongs to described prospect agglomerate and described Prospects For Changes as impact point simultaneously to obtain and export target.
Compared with prior art, the object detection method of avoiding illumination effect provided by the invention can detect the target of avoiding illumination effect exactly, has effectively solved the inaccurate and unreliable problem of the detection target producing due to illumination effect in target detection.
Brief description of the drawings
Fig. 1 is the object detection method process flow diagram of avoiding illumination effect provided by the invention;
Fig. 2 is the process flow diagram of step 103 in object detection method provided by the invention;
Fig. 3 is the process flow diagram of step 104 in object detection method provided by the invention;
Embodiment
For making auditor can further understand structure provided by the invention, feature and other objects, be now described in detail as follows in conjunction with appended preferred embodiment, illustrated preferred embodiment is only for technical scheme provided by the invention is described, and non-limiting the present invention.
Fig. 1 is the object detection method process flow diagram of avoiding illumination effect provided by the invention; As shown in Figure 1, the object detection method of avoiding illumination effect provided by the invention comprises the following step of carrying out in order:
Step 101: adopt statistical method to set up background image;
Step 102: calculate and export the gradient of current frame image and the gradient of described background image, described gradient comprises horizontal direction gradient and vertical gradient;
Step 103: direction and the amplitude of the gradient of more described current frame image and the gradient of described background image, and extract accordingly and export prospect profile;
Step 104: the prospect profile extracting is filled to obtain prospect agglomerate, and filtering noise is with export target.
Wherein, the background image that step 101 is set up can be start frame image or specific still image.But in order to ensure stability and the accuracy of background image, in step 101, preferably adopt statistical method to set up background image.This statistical method is implemented by following steps: to the pixel (x in the image gathering in certain section of time t, y) carrying out statistical study (is exactly to pixel (x, y) it is cumulative that gray-scale value carries out simple number statistics), select this pixel (x in this period, y) stable gray-scale value is (with pixel (x, what gray-scale value occurrence number y) was maximum elects stable gray-scale value as) as a setting in image to should pixel (x, y) gray-scale value, by adding up the stable gray-scale value that gathers each pixel in image in this section of time t, thereby background extraction image.
In step 102, can adopt gradient operator to calculate respectively horizontal direction gradient, the vertical gradient of current frame image, and horizontal direction gradient, the vertical gradient of background image.Wherein, this gradient operator is preferably Robert operator or Sobel operator.For example, can adopt 3 × 3Robert operator to calculate respectively horizontal direction gradient, the vertical gradient of current frame image, and calculate horizontal direction gradient, the vertical gradient of background image.
The horizontal direction gradient of 3 × 3Robert operator computed image, vertical gradient are utilized the horizontal difference of the corresponding level of pixel, vertical formwork in 3 × 3Robert operator horizontal direction template, vertical direction formwork calculation image, vertical difference exactly.For example, can select 3 × 3Robert operator horizontal direction template to be: - 1 - 2 - 1 0 C 0 1 2 1 , Vertical direction template is: - 1 0 1 - 2 C 2 - 1 0 1 , The horizontal direction gradient S of pixel (x, y) h(x, y), vertical gradient S v(x, y) is respectively:
S H(x,y)=(f x+1,y-1+2f x+1,y+f x+1,y+1)-(f x-1,y-1+2f x-1,y+f x-1,y+1)
S V(x,y)=(f x-1,y+1+2f x,y+1+f x+1,y+1)-(f x-1,y-1+2f x,y-1+f x+1,y-1)
F x,yrepresent the gray-scale value of pixel (x, y).
Fig. 2 is the process flow diagram of the step 103 of object detection method provided by the invention.As shown in Figure 2, in object detection method provided by the invention, step 103 comprises the following steps:
Step 1031: the horizontal direction gradient of the current frame image of exporting according to step 102 and the horizontal direction gradient of vertical gradient and background image and vertical gradient are calculated gradient magnitude A2 and the gradient direction θ 2 of each pixel in the gradient magnitude A1 of each pixel in current frame image and gradient direction θ 1 and background image.
In image, gradient magnitude, the gradient direction computing formula of pixel (x, y) are as follows:
A ( x , y ) = S H 2 ( x , y ) + S V 2 ( x , y )
θ ( x , y ) = arctg S V ( x , y ) S H ( x , y )
Step 1032: if the pixel (x in current frame image, y) this pixel (x in gradient magnitude A1 and background image, y) gradient magnitude A2 is all more than or equal to first threshold T1, proceed to step 1033, if gradient magnitude A1 and A2 are all less than or equal to Second Threshold T2, think this pixel (x, y) be noise spot, otherwise calculate | A1-A2|, if | A1-A2| is more than or equal to the 3rd threshold value T3, think that this pixel (x, y) belongs to foreground point.Preferably, first threshold T1 ∈ [8,12], Second Threshold T2 ∈ [3,5], the 3rd threshold value T3 ∈ [4,6].
Step 1033: calculate this pixel (x in current frame image, y) this pixel (x in gradient direction θ 1 and background image, y) absolute difference of gradient direction θ 2 | θ 1-θ 2|, if | θ 1-θ 2| is more than or equal to the 4th threshold value T4, think that this pixel (x, y) belongs to foreground point.Preferably, the 4th threshold value T4 ∈ [18 °, 22 °].
Step 1034: extract all pixels that belong to foreground point, thereby obtain prospect profile.
Fig. 3 is the process flow diagram of the step 104 of object detection method provided by the invention.As shown in Figure 3, in object detection method provided by the invention, step 104 comprises the following steps:
Step 1041: the prospect profile that step 103 is exported fills to obtain prospect agglomerate; The method that profile is filled is a lot, for example can adopt horizontal direction scanning method, step can be as follows: taking the rectangular area of each prospect profile as object, start scanning from the first row of rectangular area, by order from left to right, scan first point (being leftmost profile) and last point (being the point on limit, left and right), the pixel between these two point is all made as foreground point, continue until this line scanning finishes, start to scan next line, until last column; The agglomerate of all point after having scanned and foreground point composition is prospect agglomerate.
Step 1042: calculate the error image of current frame image and background image, adopt thresholding method to carry out Threshold segmentation to obtain the Prospects For Changes in error image to this error image.
Thresholding method is the method for pixel in image being cut apart according to threshold value.The choosing method of described threshold value is a lot, has one dimension threshold value, Two Dimensional Thresholding.Below taking the simple one dimension fixed threshold of an example as example: if the gray-scale value of interior certain point of this error image is greater than the threshold value of setting, be designated as " 1 " to be expressed as foreground point; Otherwise be designated as " 0 " to be expressed as background dot, obtain thus the bianry image of prospect.
Step 1043: described prospect agglomerate and described Prospects For Changes are carried out to AND-operation, using the pixel that belongs to described prospect agglomerate and described Prospects For Changes as impact point simultaneously to obtain and export target.
AND-operation is general a kind of computer operation, if interior certain pixel of image belongs to prospect agglomerate and Prospects For Changes particularly simultaneously, thinks that this pixel is that impact point is to obtain and to export.
Need statement, foregoing invention content and embodiment are intended to prove the practical application of technical scheme provided by the present invention, should not be construed as limiting the scope of the present invention.Those skilled in the art are in spirit provided by the invention and principle, when doing various amendments, be equal to and replace or improve.Protection domain provided by the invention is as the criterion with appended claims.

Claims (5)

1. an object detection method of avoiding illumination effect, is characterized in that, described object detection method comprises the following step of carrying out in order:
Step 101: adopt statistical method to set up background image;
Step 102: calculate and export the gradient of current frame image and the gradient of described background image, described gradient comprises horizontal direction gradient and vertical gradient;
Step 103: direction and the amplitude of the gradient of more described current frame image and the gradient of described background image, and extract accordingly and export prospect profile;
Step 104: the prospect profile extracting is filled to obtain prospect agglomerate, and filtering noise is with export target.
2. object detection method according to claim 1, it is characterized in that, in step 102, the horizontal direction gradient of described current frame image, vertical gradient, and horizontal direction gradient, the vertical gradient of described background image are to adopt gradient operator to calculate respectively.
3. object detection method according to claim 1, is characterized in that, in step 103, and the described gradient of comparison current frame image and direction and the amplitude of the gradient of background image, and the method for extracting accordingly and export prospect profile comprises the following steps:
Step 1031: the horizontal direction gradient of the described current frame image of exporting according to step 102 and the horizontal direction gradient of vertical gradient and described background image and vertical gradient are calculated gradient magnitude A2 and the gradient direction θ 2 of each pixel in the gradient magnitude A1 of each pixel in described current frame image and gradient direction θ 1 and described background image;
Step 1032: if the gradient magnitude A2 of this pixel (x, y) in gradient magnitude A1 and the described background image of the pixel (x, y) in described current frame image all >=first threshold T1, proceed to step 1033; If gradient magnitude A1 and A2 all≤Second Threshold T2, think that this pixel (x, y) be noise spot, otherwise calculating | A1-A2|; If | A1-A2| >=three threshold value T3, thinks that this pixel (x, y) belongs to foreground point;
Step 1033: calculate this pixel (x in described current frame image, y) this pixel (x in gradient direction θ 1 and described background image, y) absolute difference of gradient direction θ 2 | θ 1-θ 2|, if | θ 1-θ 2| >=four threshold value T4, think that this pixel (x, y) belongs to foreground point;
Step 1034: extract all pixels that belong to foreground point, thereby obtain prospect profile.
4. object detection method according to claim 3, is characterized in that, described first threshold T1 ∈ [8,12], Second Threshold T2 ∈ [3,5], the 3rd threshold value T3 ∈ [4,6], the 4th threshold value T4 ∈ [18 °, 22 °].
5. object detection method according to claim 1, is characterized in that, in step 104, the described prospect profile to extracting fills to obtain prospect agglomerate, and filtering noise comprises the following steps with export target:
Step 1041: the prospect profile that step 103 is exported fills to obtain prospect agglomerate;
Step 1042: calculate the error image of current frame image and background image, adopt thresholding method to carry out Threshold segmentation to this error image, to obtain the Prospects For Changes in error image;
Step 1043: described prospect agglomerate and described Prospects For Changes are carried out to AND-operation, using the pixel that belongs to described prospect agglomerate and described Prospects For Changes as impact point simultaneously to obtain and export target.
CN201410214426.7A 2014-05-21 2014-05-21 Target detection method avoiding light influences Pending CN103971382A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410214426.7A CN103971382A (en) 2014-05-21 2014-05-21 Target detection method avoiding light influences

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410214426.7A CN103971382A (en) 2014-05-21 2014-05-21 Target detection method avoiding light influences

Publications (1)

Publication Number Publication Date
CN103971382A true CN103971382A (en) 2014-08-06

Family

ID=51240831

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410214426.7A Pending CN103971382A (en) 2014-05-21 2014-05-21 Target detection method avoiding light influences

Country Status (1)

Country Link
CN (1) CN103971382A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104463253A (en) * 2015-01-06 2015-03-25 电子科技大学 Fire fighting access safety detection method based on self-adaptation background study
CN107122714A (en) * 2017-03-28 2017-09-01 天棣网络科技(上海)有限公司 A kind of real-time pedestrian detection method based on edge constraint

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090136146A1 (en) * 2005-09-09 2009-05-28 Sony Corporation Image processing device and method, program, and recording medium
CN101950352B (en) * 2010-05-31 2012-08-22 北京智安邦科技有限公司 Target detection method capable of removing illumination influence and device thereof

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090136146A1 (en) * 2005-09-09 2009-05-28 Sony Corporation Image processing device and method, program, and recording medium
CN101950352B (en) * 2010-05-31 2012-08-22 北京智安邦科技有限公司 Target detection method capable of removing illumination influence and device thereof

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104463253A (en) * 2015-01-06 2015-03-25 电子科技大学 Fire fighting access safety detection method based on self-adaptation background study
CN104463253B (en) * 2015-01-06 2018-02-02 电子科技大学 Passageway for fire apparatus safety detection method based on adaptive background study
CN107122714A (en) * 2017-03-28 2017-09-01 天棣网络科技(上海)有限公司 A kind of real-time pedestrian detection method based on edge constraint
CN107122714B (en) * 2017-03-28 2020-05-26 天棣网络科技(上海)有限公司 Real-time pedestrian detection method based on edge constraint

Similar Documents

Publication Publication Date Title
US10068343B2 (en) Method and apparatus for recognizing moving target
CN103927526B (en) Vehicle detecting method based on Gauss difference multi-scale edge fusion
CN104504388B (en) A kind of pavement crack identification and feature extraction algorithm and system
CN103150549B (en) A kind of road tunnel fire detection method based on the early stage motion feature of smog
CN103324913B (en) A kind of pedestrian event detection method of Shape-based interpolation characteristic sum trajectory analysis
CN105260749B (en) Real-time target detection method based on direction gradient binary pattern and soft cascade SVM
CN104616275A (en) Defect detecting method and defect detecting device
CN102880863B (en) Method for positioning license number and face of driver on basis of deformable part model
CN104599511B (en) Traffic flow detection method based on background modeling
CN101950352B (en) Target detection method capable of removing illumination influence and device thereof
EP2813973A1 (en) Method and system for processing video image
CN104537688A (en) Moving object detecting method based on background subtraction and HOG features
WO2023138163A1 (en) Indoor mobile robot glass detection and map updating method based on depth image restoration
CN109460787A (en) IDS Framework method for building up, device and data processing equipment
CN104463138A (en) Text positioning method and system based on visual structure attribute
Lian et al. A novel method on moving-objects detection based on background subtraction and three frames differencing
Li et al. A lane marking detection and tracking algorithm based on sub-regions
CN102663778B (en) A kind of method for tracking target based on multi-view point video and system
CN103914829B (en) Method for detecting edge of noisy image
CN103077380A (en) Method and device for carrying out statistics on number of people on basis of video
CN107247967B (en) Vehicle window annual inspection mark detection method based on R-CNN
CN103793921A (en) Moving object extraction method and moving object extraction device
CN103413138A (en) Method for detecting point target in infrared image sequence
CN103927523B (en) Fog level detection method based on longitudinal gray features
CN104168462A (en) Camera scene change detecting method based on image angular point set characteristic

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
WD01 Invention patent application deemed withdrawn after publication
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20140806