WO2017028029A1 - 背景模型的提取方法、装置以及图像处理设备 - Google Patents

背景模型的提取方法、装置以及图像处理设备 Download PDF

Info

Publication number
WO2017028029A1
WO2017028029A1 PCT/CN2015/087029 CN2015087029W WO2017028029A1 WO 2017028029 A1 WO2017028029 A1 WO 2017028029A1 CN 2015087029 W CN2015087029 W CN 2015087029W WO 2017028029 A1 WO2017028029 A1 WO 2017028029A1
Authority
WO
WIPO (PCT)
Prior art keywords
background model
image
foreground
preset threshold
area
Prior art date
Application number
PCT/CN2015/087029
Other languages
English (en)
French (fr)
Inventor
杨兵兵
Original Assignee
富士通株式会社
杨兵兵
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 富士通株式会社, 杨兵兵 filed Critical 富士通株式会社
Priority to PCT/CN2015/087029 priority Critical patent/WO2017028029A1/zh
Publication of WO2017028029A1 publication Critical patent/WO2017028029A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis

Definitions

  • the present invention relates to the field of graphic image technology, and in particular, to a method and apparatus for extracting a background model and an image processing apparatus.
  • background images are widely used in the field of image monitoring and the like.
  • the difference between the current frame and the reference frame can be compared, thereby detecting a moving object.
  • the reference frame may be referred to as a "background image” or represented using a "background model.”
  • Embodiments of the present invention provide a method, an apparatus, and an image processing apparatus for extracting a background model. It can reduce the ghosting phenomenon during image detection, and can detect objects that move at a relatively small speed or are stationary for a certain period of time.
  • a method for extracting a background model includes:
  • the background model is initialized if the ratio is less than the predetermined threshold.
  • an apparatus for extracting a background model comprising:
  • An image acquisition unit that acquires a current image of the monitoring area
  • a foreground extraction unit that extracts a foreground image region from the current image based on a background model
  • a ratio calculating unit that calculates a ratio of the number of pixels of the foreground image region to the number of pixels of the monitoring region
  • Comparing units comparing the ratio to a preset threshold
  • the background initializing unit initializes the background model if the ratio is less than the preset threshold.
  • an image processing apparatus comprising the extraction means of the background model as described above.
  • a computer readable program wherein when the program is executed in an image processing apparatus, the program causes a computer to execute a background model as described above in the image processing apparatus Extraction method.
  • a storage medium storing a computer readable program, wherein the computer readable program causes a computer to perform an extraction method of a background model as described above in an image processing device.
  • the beneficial effects of the embodiment of the present invention are: calculating a ratio of the number of pixels of the foreground image area to the number of pixels of the monitoring area; and updating the background model using the current image if the ratio is less than a preset threshold. Therefore, the background model can be extracted using a more suitable image, the ghost phenomenon in the image detection process can be reduced, and an object with a relatively small moving speed or a certain time can be detected, and the image detection accuracy is higher and the noise is tolerated. The ability is stronger.
  • FIG. 1 is a schematic diagram of a method for extracting a background model according to Embodiment 1 of the present invention
  • FIG. 2 is another schematic diagram of a method for extracting a background model according to Embodiment 1 of the present invention.
  • FIG. 3 is a schematic diagram of expanding a foreground object region according to Embodiment 1 of the present invention.
  • FIG. 4 is a schematic diagram of an apparatus for extracting a background model according to Embodiment 2 of the present invention.
  • Figure 5 is another schematic diagram of an apparatus for extracting a background model according to Embodiment 2 of the present invention.
  • Fig. 6 is a block diagram showing the configuration of an image processing apparatus according to a third embodiment of the present invention.
  • ghosting may occur in a scene where, for example, when a moving object becomes a stationary object for a period of time (for example, a vehicle waiting for a traffic light), the moving object may be considered to be stationary and updated.
  • a moving object becomes a stationary object for a period of time (for example, a vehicle waiting for a traffic light)
  • the moving object may be considered to be stationary and updated.
  • ghosts will be left when the object moves again.
  • an object that has been considered to be the background image area for example, a car that has been parked for a few days in the parking lot
  • ghosting will occur when the object starts moving.
  • an image monitoring scene in the traffic field will be taken as an example for description.
  • the present invention is not limited thereto, and can be applied to other scenarios.
  • Embodiments of the present invention provide a method for extracting a background model.
  • 1 is a schematic diagram of a method for extracting a background model according to an embodiment of the present invention. As shown in FIG. 1, the extraction method includes:
  • Step 101 Acquire a current image of a monitoring area.
  • Step 102 Extract a foreground image region from the current image based on a background model
  • Step 103 Calculate a ratio of the number of pixels of the foreground image area to the number of pixels of the monitoring area;
  • Step 104 comparing the ratio with a preset threshold
  • Step 105 Initialize the background model if the ratio is less than the preset threshold.
  • video information including a plurality of frame images can be obtained by the camera.
  • the camera may be a camera for performing traffic image monitoring, and the monitoring area is continuously captured; however, the present invention is not limited thereto, and may be other image monitoring scenes.
  • the background model in step 102 may be pre-generated using the prior art, and then the background model may be continuously updated.
  • the initial background model M 0 can be obtained from one frame of image, and then the background model is continuously updated to obtain background models M 1 , M 2 , . . . , Mi.
  • the ratio of the number of pixels of the foreground image area to the number of pixels of the monitoring area is calculated; and the background model is re-initialized if the ratio is less than a preset threshold.
  • the background model can be extracted using a more suitable image.
  • the preset threshold is 0.5.
  • the ratio (ie, 0.7) of the number of pixels (for example, 560) of the foreground image region and the number of pixels of the monitoring region (for example, 800) is determined to be larger than the ratio.
  • the image can be considered to be unsuitable for background model extraction.
  • the ratio of the number of pixels (for example, 80) of the foreground image region and the number of pixels of the monitoring region (for example, 800) ie, 0.1
  • the image can be considered suitable for background model extraction.
  • the background model may be gradually updated using a plurality of preset thresholds.
  • the preset threshold is a plurality of values arranged in descending order and used in sequence. For example, four values of 0.5, 0.4, 0.3, and 0.2.
  • a relatively accurate initial background model can be obtained by gradually approximating these thresholds.
  • FIG. 2 is another schematic diagram of a method for extracting a background model according to an embodiment of the present invention. As shown in FIG. 2, the extraction method includes:
  • Step 201 obtaining a background model M 0 ;
  • the background model M 0 can be obtained based on the prior art. Any of the methods of obtaining a background model in the prior art can be employed.
  • Step 202 Acquire a current image of the monitoring area.
  • Step 203 extract a foreground image region from the current image based on the background model M i ;
  • i is 0 or a positive integer.
  • Step 204 Calculate a ratio of the number of pixels of the foreground image area to the number of pixels of the monitoring area;
  • F is the number of pixels of the foreground image area
  • N is the number of pixels of the monitoring area
  • R is the ratio of pixels of the monitoring area
  • Step 205 comparing the ratio with a preset threshold
  • the preset threshold is T[k], including a plurality of values arranged in descending order.
  • k is an integer from 0 to K.
  • Step 206 Determine whether the ratio is less than a preset threshold; perform step 207 if the ratio is less than the preset threshold; and perform step 208 if the ratio is greater than or equal to the preset threshold.
  • Step 207 Re-initialize the background model using the current image, that is, perform all updates to the background model using the current image. You can use any method that is initialized by any existing background model.
  • Step 208 Selectively update the background model using the current image. Then, step 202 can be performed to re-acquire the current image of the monitoring area.
  • the update can be selectively performed using a method described later, for example, updating the background model M i to the background model M i+1 .
  • the re-initialization of the background model may be performed if the ratio is less than the preset threshold, that is, all updates are performed; if the ratio is greater than or equal to the preset threshold, the current image is used to the background.
  • the model is selectively updated.
  • step 209 k is incremented by 1, that is, the current preset threshold is changed to the next value.
  • the preset threshold T[k] is used in sequence, and the initial value of k is 0, that is, T[0] is used first, then T[1] is used, ....
  • Step 210 Determine whether k is greater than K, that is, determine whether the preset threshold is all used. Step 211 is performed if the preset threshold has been used all; and step 202 is performed if the preset threshold is not used all, and the current image of the monitoring area is re-acquired.
  • Step 211 The current background model is used as an initial background model of the monitoring area.
  • the M j can be used as the initial background model of the monitoring area, thereby obtaining a relatively accurate initial background model.
  • the initial background model can be continuously updated.
  • the current background model is M 0 , and the number of pixels N in the monitoring area is 1000.
  • the current threshold has been changed to T[3].
  • the image I6 of the monitoring area is acquired, and after the foreground image area is extracted, the number F of pixels of the foreground image area can be known to be 180.
  • R 0.18; comparing R with T[3] shows that R ⁇ T[3] at this time, so the background model is re-initialized using image I6, that is, all updates.
  • the preset threshold has been used all, so the process can be ended.
  • the current background model can also be used as the initial background model for the monitoring area.
  • the background model is updated in a gradual approximation manner, and the background model can be extracted using a more suitable image.
  • FIGS. 1 and 2 only schematically illustrate the case of the present invention, but the present invention is not limited thereto.
  • the order between the steps may be adjusted according to the actual situation, or one step or several steps may be added or subtracted.
  • the background model in step 208, can be selectively updated according to the foreground image region.
  • the foreground image area and the adjacent area may be used as the foreground extended area; the background model is updated according to the area other than the foreground extended area in the current image, and the foreground extended area is not Updated to the background model.
  • FIG. 3 is a schematic diagram of expanding a foreground object area according to an embodiment of the present invention.
  • the foreground image area 302 of the current image 300 except the background image area 301 may be expanded.
  • the foreground image area for example, a moving object
  • the adjacent area are not updated into the background model, the ghost phenomenon can be reduced, and the moving object with a relatively small moving speed can be detected; the image detection accuracy is higher. And the ability to tolerate noise is stronger.
  • the ratio of the number of pixels in the foreground image area to the number of pixels in the monitoring area is calculated; and the background model is initialized if the ratio is less than a preset threshold. Therefore, the background model can be extracted using a more suitable image, the ghost phenomenon in the image detection process can be reduced, and an object with a relatively small moving speed or a certain time can be detected, and the image detection accuracy is higher and the noise is tolerated. The ability is stronger.
  • the embodiment of the present invention provides a device for extracting a background model, and the same content as that of Embodiment 1 will not be described again.
  • the background model extraction apparatus 400 includes:
  • the image obtaining unit 401 acquires a current image of the monitoring area
  • the foreground extracting unit 402 extracts a foreground image region from the current image based on the background model
  • the ratio calculating unit 403 calculates a ratio of the number of pixels of the foreground image region to the number of pixels of the monitoring region;
  • Comparing unit 404 comparing the ratio to a preset threshold
  • the background initializing unit 405 initializes the background model if the ratio is smaller than the preset threshold.
  • the image acquisition unit 401 can obtain the current image according to the video information obtained by the camera.
  • FIG. 5 is another schematic diagram of a background model extraction apparatus according to an embodiment of the present invention.
  • the background model extraction apparatus 500 includes: an image acquisition unit 401, a foreground extraction unit 402, a ratio calculation unit 403, and comparison.
  • Unit 404 and background initialization unit 405 are as described above.
  • the preset threshold is a plurality of values arranged in descending order and used in sequence.
  • the extraction device 500 of the background model may further include:
  • the threshold determining unit 501 determines whether the preset threshold is all used
  • the background determining unit 502 may also use the current background model as an initial background model of the monitoring area if the preset threshold has been used all.
  • the image obtaining unit 401 is further configured to: re-acquire the current image of the monitoring area if the preset threshold is not used.
  • the extraction device 500 of the background model may further include: a background update unit 406; the background update unit 406 may be specifically configured to: if the ratio is greater than or equal to the preset threshold, The background model is selectively updated based on the foreground image region in the current image.
  • the background update unit 406 can include:
  • a foreground extension unit 503 the foreground image area and the adjacent area as a foreground extended area;
  • the background generation unit 504 updates the background model according to an area other than the foreground extended area in the current image, and does not update the foreground extended area into the background model.
  • the ratio of the number of pixels in the foreground image area to the number of pixels in the monitoring area is calculated; and the background model is initialized if the ratio is less than a preset threshold. Therefore, the background model can be extracted using a more suitable image, the ghost phenomenon in the image detection process can be reduced, and the object with a relatively slow moving speed or a certain time can be detected, and the image detection accuracy is higher and the noise is tolerated. The ability is stronger.
  • An embodiment of the present invention provides an image processing apparatus, where the image processing apparatus includes: a background model extraction apparatus according to Embodiment 2.
  • Fig. 6 is a block diagram showing the configuration of an image processing apparatus according to an embodiment of the present invention.
  • the image processing apparatus 600 may include a central processing unit (CPU) 100 and a memory 110; the memory 110 is coupled to the central processing unit 100.
  • the memory 110 can store various data; in addition, a program for information processing is stored, and the program is executed under the control of the central processing unit 100.
  • the functionality of the background model's extraction device 400 or 500 can be integrated into the central processor 100.
  • the central processing unit 100 can be configured to implement the background model as described in Embodiment 1. Extraction Method.
  • the extraction device 400 or 500 of the background model may be configured separately from the central processing unit.
  • the extraction device 400 or 500 of the background model may be configured as a chip connected to the central processing unit 100 through the central processing unit. The functions of the extraction device 400 or 500 that implement the background model are controlled.
  • the image processing apparatus 600 may further include: an input and output unit 120, a display unit 130, and the like; wherein the functions of the above components are similar to those of the prior art, and are not described herein again. It is to be noted that the image processing apparatus 600 does not necessarily have to include all of the components shown in FIG. 6; in addition, the image processing apparatus 600 may further include components not shown in FIG. 6, and reference may be made to the related art.
  • Embodiments of the present invention also provide a computer readable program, wherein when the program is executed in an image processing apparatus, the program causes a computer to perform extraction of a background model as described in Embodiment 1 in the image processing apparatus method.
  • 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 extraction method of the background model as described in Embodiment 1 in the image processing device.
  • the above apparatus and method of the present invention may be implemented by hardware or by hardware in combination with software.
  • the present invention relates to a computer readable program that, when executed by a logic component, enables the logic component to implement the apparatus or components described above, or to cause the logic component to implement the various methods described above Or steps.
  • the present invention also relates to a storage medium for storing the above program, such as a hard disk, a magnetic disk, an optical disk, a DVD, a flash memory, or the like.
  • One or more of the functional blocks described in the figures and/or one or more combinations of functional blocks may be implemented as a general purpose processor, digital signal processor (DSP) for performing the functions described herein.
  • DSP digital signal processor
  • ASIC application specific integrated circuit
  • FPGA field programmable gate array
  • One or more of the functional blocks described with respect to the figures and/or one or more combinations of functional blocks may also be implemented as a combination of computing devices, eg, a combination of a DSP and a microprocessor, multiple microprocessors One or more microprocessors in conjunction with DSP communication or any other such configuration.

Landscapes

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

Abstract

一种背景模型的提取方法、装置以及图像处理设备。所述提取方法包括:获取监控区域的当前图像;基于背景模型从所述当前图像中提取出前景图像区域;计算所述前景图像区域的像素个数和所述监控区域的像素个数的比值;将所述比值与预设阈值进行比较;以及在所述比值小于所述预设阈值的情况下对所述背景模型进行初始化。由此,可以使用较适合的图像提取背景模型,可以减小图像检测过程中的鬼影现象,并且能够检测移动速度比较小或者一定时间内静止的物体,图像检测的准确性更高且容忍噪声的能力更强。

Description

背景模型的提取方法、装置以及图像处理设备 技术领域
本发明涉及一种图形图像技术领域,特别涉及一种背景模型的提取方法、装置以及图像处理设备。
背景技术
背景图像的提取被广泛应用在图像监控等领域。例如在检测视频中移动物体时,可以比较当前帧和参考帧的差别,由此检测到运动物体。其中,参考帧可以被称为“背景图像”或者使用“背景模型”进行表示。
目前已经有一些方法来进行背景模型的提取,例如帧差别法(Frame differencing),均值过滤法(Mean filter)以及背景混合模型法(Background Mixture Model)。
应该注意,上面对技术背景的介绍只是为了方便对本发明的技术方案进行清楚、完整的说明,并方便本领域技术人员的理解而阐述的。不能仅仅因为这些方案在本发明的背景技术部分进行了阐述而认为上述技术方案为本领域技术人员所公知。
发明内容
但是,发明人发现,采用目前的背景模型提取方法,经常会出现“鬼影(ghost)”现象;并且一般只能检测到移动速度比较快的运动物体。
本发明实施例提供一种背景模型的提取方法、装置以及图像处理设备。可以减少图像检测过程中的鬼影现象,并且能够检测移动速度比较小或一定时间内静止的物体。
根据本发明实施例的第一个方面,提供一种背景模型的提取方法,所述提取方法包括:
获取监控区域的当前图像;
基于背景模型从所述当前图像中提取出前景图像区域;
计算所述前景图像区域的像素个数和所述监控区域的像素个数的比值;
将所述比值与预设阈值进行比较;以及
在所述比值小于所述预设阈值的情况下对所述背景模型进行初始化。
根据本发明实施例的第二个方面,提供一种背景模型的提取装置,所述提取装置包括:
图像获取单元,获取监控区域的当前图像;
前景提取单元,基于背景模型从所述当前图像中提取出前景图像区域;
比值计算单元,计算所述前景图像区域的像素个数和所述监控区域的像素个数的比值;
比较单元,将所述比值与预设阈值进行比较;以及
背景初始化单元,在所述比值小于所述预设阈值的情况下对所述背景模型进行初始化。
根据本发明实施例的第三个方面,提供一种图像处理设备,所述图像处理设备包括如上所述的背景模型的提取装置。
根据本发明实施例的又一个方面,提供一种计算机可读程序,其中当在图像处理设备中执行所述程序时,所述程序使得计算机在所述图像处理设备中执行如上所述的背景模型的提取方法。
根据本发明实施例的又一个方面,提供一种存储有计算机可读程序的存储介质,其中所述计算机可读程序使得计算机在图像处理设备中执行如上所述的背景模型的提取方法。
本发明实施例的有益效果在于,计算前景图像区域的像素个数和监控区域的像素个数的比值;以及在所述比值小于预设阈值的情况下,使用当前图像对背景模型进行更新。由此,可以使用较适合的图像提取背景模型,可以减小图像检测过程中的鬼影现象,并且能够检测移动速度比较小或者一定时间内静止的物体,图像检测的准确性更高且容忍噪声的能力更强。
参照后文的说明和附图,详细公开了本发明的特定实施方式,指明了本发明的原理可以被采用的方式。应该理解,本发明的实施方式在范围上并不因而受到限制。在所附权利要求的条款的范围内,本发明的实施方式包括许多改变、修改和等同。
针对一种实施方式描述和/或示出的特征可以以相同或类似的方式在一个或更多个其它实施方式中使用,与其它实施方式中的特征相组合,或替代其它实施方式中的特征。
应该强调,术语“包括/包含”在本文使用时指特征、整件、步骤或组件的存在,但并不排除一个或更多个其它特征、整件、步骤或组件的存在或附加。
附图说明
参照以下的附图可以更好地理解本发明的很多方面。附图中的部件不是成比例绘制的,而只是为了示出本发明的原理。为了便于示出和描述本发明的一些部分,附图中对应部分可能被放大或缩小。
在本发明的一个附图或一种实施方式中描述的元素和特征可以与一个或更多个其它附图或实施方式中示出的元素和特征相结合。此外,在附图中,类似的标号表示几个附图中对应的部件,并可用于指示多于一种实施方式中使用的对应部件。
图1是本发明实施例1的背景模型的提取方法的一示意图;
图2是本发明实施例1的背景模型的提取方法的另一示意图;
图3是本发明实施例1的对前景物体区域进行扩展的一示意图;
图4是本发明实施例2的背景模型的提取装置的一示意图;
图5是本发明实施例2的背景模型的提取装置的另一示意图;
图6是本发明实施例3的图像处理设备的一构成示意图。
具体实施方式
参照附图,通过下面的说明书,本发明的前述以及其它特征将变得明显。在说明书和附图中,具体公开了本发明的特定实施方式,其表明了其中可以采用本发明的原则的部分实施方式,应了解的是,本发明不限于所描述的实施方式,相反,本发明包括落入所附权利要求的范围内的全部修改、变型以及等同物。
在图像检测过程中,鬼影现象可能发生在如下场景中:例如,当一个移动物体变成静止物体一段时间(例如等待红绿灯的车辆)之后,该移动物体可能会被认为是静止的而被更新到背景图像或背景模型中,当该物体再次移动时将会留下鬼影。或者,当一个已经被认为是背景图像区域的物体(例如停车场里已经停了几天的汽车)开始移动时,当该物体开始移动时将会出现鬼影现象。
在本实施例中,将以交通领域的图像监控场景为例进行说明。但本发明不限于此,还可以应用到其他的场景中。
实施例1
本发明实施例提供一种背景模型的提取方法。图1是本发明实施例的背景模型的提取方法的一示意图,如图1所示,所述提取方法包括:
步骤101,获取监控区域的当前图像;
步骤102,基于背景模型从所述当前图像中提取出前景图像区域;
步骤103,计算所述前景图像区域的像素个数和所述监控区域的像素个数的比值;
步骤104,将所述比值与预设阈值进行比较;以及
步骤105,在所述比值小于所述预设阈值的情况下对所述背景模型进行初始化。
在本实施例中,可以通过摄像头获得包括多个帧图像的视频信息。该摄像头可以是用于进行交通图像监控的摄像头,不间断地对监控区域进行拍摄;但本发明不限于此,还可以是其他的图像监控场景。
在本实施例中,步骤102中的背景模型可以是采用现有技术而预先生成的,然后该背景模型可以是不断地被更新的。例如可以根据一帧图像得到初始背景模型M0,然后不断地对该背景模型进行更新得到背景模型M1,M2,……,Mi。
在本实施例中,通过计算前景图像区域的像素个数和监控区域的像素个数的比值;以及在所述比值小于预设阈值的情况下对背景模型进行重新初始化。由此,可以使用较适合的图像提取背景模型。
例如,预设阈值为0.5。当某一时刻t0的图像中大部分是移动物体时,在确定出前景图像区域的像素个数(例如560个)和监控区域的像素个数(例如800个)的比值(即0.7)大于该预设阈值(0.5)的情况下,可以认为该图像不适合进行背景模型提取。当某一时刻t1,在确定出前景图像区域的像素个数(例如80个)和监控区域的像素个数(例如800个)的比值(即0.1)小于该预设阈值(0.5)的情况下,可以认为该图像适合进行背景模型提取。
在本实施例中,可以使用多个预设阈值对背景模型进行逐渐更新。其中,所述预设阈值为按降序排列的多个值并且依次被使用。例如为0.5,0.4,0.3,0.2四个值。可以根据这些阈值逐渐逼近来获得比较准确的初始背景模型。
图2是本发明实施例的背景模型的提取方法的另一示意图,如图2所示,所述提取方法包括:
步骤201,获得背景模型M0
在本实施例中,可以基于现有技术获得该背景模型M0。可以采用现有技术中获取背景模型的任意一种方法。
步骤202,获取监控区域的当前图像;
步骤203,基于背景模型Mi从所述当前图像中提取出前景图像区域;
其中,i为0或正整数。
步骤204,计算所述前景图像区域的像素个数和所述监控区域的像素个数的比值;
例如,F为所述前景图像区域的像素个数,N为所述监控区域的像素个数,则比值R=F/N。
步骤205,将所述比值与预设阈值进行比较;
在本实施例中,预设阈值为T[k],包括按降序排列的多个值。其中,k为0至K的整数。例如,T[0]=0.5,T[1]=0.4,T[2]=0.3,T[3]=0.2;K为3。
步骤206,确定所述比值是否小于预设阈值;在所述比值小于所述预设阈值的情况下执行步骤207;在所述比值大于或等于所述预设阈值的情况下执行步骤208。
步骤207,使用所述当前图像对所述背景模型进行重新初始化,即使用当前图像对背景模型进行全部更新。可以使用现有任意的背景模型初始化的方法。
步骤208,使用所述当前图像对所述背景模型进行选择性更新。然后可以执行步骤202,重新获取所述监控区域的当前图像。
在本实施例中,可以使用后述的方法选择性地进行更新,例如将背景模型Mi更新为背景模型Mi+1
在本实施例中,可以在比值小于预设阈值的情况下,进行背景模型的重新初始化,即全部进行更新;在比值大于或等于预设阈值的情况下,使用所述当前图像对所述背景模型进行选择性更新。
步骤209,将k增加1,即将当前预设阈值变更为下一个值。
在本实施例中,预设阈值T[k]被依次使用,k的初始值为0,即T[0]被首先使用,然后T[1]被使用,……。
步骤210,确定k是否大于K,即确定所述预设阈值是否全部被使用。在所述预设阈值已经被全部使用的情况下执行步骤211;在所述预设阈值没有被全部使用的情况下执行步骤202,重新获取所述监控区域的当前图像。
步骤211,将当前的背景模型作为所述监控区域的初始背景模型。
例如,若此时的当前背景模型为Mj,则可以将该Mj作为所述监控区域的初始背景模型,由此可以获得比较准确的初始背景模型。此外,还可以对该初始背景模型继续进行更新。
以下通过实例对图2的过程进行进一步说明。
例如,预设阈值为T[k],T[0]=0.5,T[1]=0.4,T[2]=0.3,T[3]=0.2。当前背景模型为M0,监控区域的像素个数N为1000个。
在某一时刻t0,获取监控区域的图像I0,基于M0提取前景图像区域后可以获知前景图像区域的像素个数F为480个,则R=0.48;将R与T[0]比较可知此时R<T[0],因此使用图像I0对背景模型进行重新初始化即全部更新。并且当前阈值变更为T[1],此时预设阈值没有被全部使用,则继续进行背景模型更新。
在某一时刻t1,获取监控区域的图像I1,提取前景图像区域后可以获知前景图像区域的像素个数F为450个,则R=0.45;将R与T[1]比较可知此时R>T[1],因此使用该图像I1对背景模型进行选择性更新。然后重新获取图像,继续进行R的计算。
在进行多个步骤之后例如当前阈值已经变更为T[3],在某一时刻t6,获取监控区域的图像I6,提取前景图像区域后可以获知前景图像区域的像素个数F为180个,则R=0.18;将R与T[3]比较可知此时R<T[3],因此使用图像I6对背景模型进行重新初始化即全部更新。此时预设阈值已经被全部使用,因此可以结束该过程。此外,还可以将当前背景模型作为监控区域的初始背景模型。
由此,通过计算前景图像区域的像素个数和监控区域的像素个数的比值;以及在所述比值小于预设阈值的情况下对背景模型进行重新初始化;并且预设阈值是按照降序排列并且依次被使用的。因此背景模型以逐渐逼近的方式被更新,可以使用较适合的图像提取背景模型。
值得注意的是,图1和图2仅示意性示出了本发明的情况,但本发明不限于此。例如,还可以根据实际情况调整各步骤之间的顺序,或者增加或者减少其中的一个步骤或者几个步骤。
在本实施例中,步骤208中可以根据前景图像区域选择性地更新背景模型。
具体地,可以将前景图像区域以及相邻区域作为前景扩展区域;根据所述当前图像中的所述前景扩展区域以外的区域更新所述背景模型,以及不将所述前景扩展区域 更新到所述背景模型中。
图3是本发明实施例的对前景物体区域进行扩展的一示意图,如图3所示,可以将当前图像300中除了背景图像区域301的前景图像区域302进行扩展。如图3所示,例如对于前景图像区域302的边缘上的某个像素P,将该像素P附近的例如5个像素也包含进前景扩展区域303。
由此,前景图像区域(例如运动物体)以及相邻区域不会被更新到背景模型中,可以减少鬼影现象的发生,并且能够检测移动速度比较小的运行物体;图像检测的准确性更高且容忍噪声的能力更强。
由上述实施例可知,计算前景图像区域的像素个数和监控区域的像素个数的比值;以及在所述比值小于预设阈值的情况下对背景模型进行初始化。由此,可以使用较适合的图像提取背景模型,可以减小图像检测过程中的鬼影现象,并且能够检测移动速度比较小或者一定时间内静止的物体,图像检测的准确性更高且容忍噪声的能力更强。
实施例2
本发明实施例提供一种背景模型的提取装置,与实施例1相同的内容不再赘述。
图4是本发明实施例的背景模型的提取装置的一示意图,如图4所示,所述背景模型的提取装置400包括:
图像获取单元401,获取监控区域的当前图像;
前景提取单元402,基于背景模型从所述当前图像中提取出前景图像区域;
比值计算单元403,计算所述前景图像区域的像素个数和所述监控区域的像素个数的比值;
比较单元404,将所述比值与预设阈值进行比较;以及
背景初始化单元405,在所述比值小于所述预设阈值的情况下对所述背景模型进行初始化。
在本实施例中,图像获取单元401可根据摄像头获得的视频信息获得当前图像。
图5是本发明实施例的背景模型的提取装置的另一示意图,如图5所示,所述背景模型的提取装置500包括:图像获取单元401、前景提取单元402、比值计算单元403、比较单元404以及背景初始化单元405,如上所述。
在本实施例中,所述预设阈值为按降序排列的多个值并且依次被使用。
如图5所示,所述背景模型的提取装置500还可以包括:
阈值确定单元501,确定所述预设阈值是否全部被使用;以及
背景确定单元502,在所述预设阈值已经被全部使用的情况下,还可以将当前的背景模型作为所述监控区域的初始背景模型。
在本实施例中,所述图像获取单元401还可以用于:在所述预设阈值没有被全部使用的情况下,重新获取所述监控区域的当前图像。
如图5所示,所述背景模型的提取装置500还可以包括:背景更新单元406;所述背景更新单元406具体可以用于:在所述比值大于或等于所述预设阈值的情况下,根据所述当前图像中的前景图像区域选择性地更新所述背景模型。
如图5所示,所述背景更新单元406可以包括:
前景扩展单元503,将所述前景图像区域以及相邻区域作为前景扩展区域;以及
背景生成单元504,根据所述当前图像中的所述前景扩展区域以外的区域更新所述背景模型,以及不将所述前景扩展区域更新到所述背景模型中。
由上述实施例可知,计算前景图像区域的像素个数和监控区域的像素个数的比值;以及在所述比值小于预设阈值的情况下对背景模型进行初始化。由此,可以使用较适合的图像提取背景模型,可以减小图像检测过程中的鬼影现象,并且能够检测移动速度比较慢或者一定时间内静止的物体,图像检测的准确性更高且容忍噪声的能力更强。
实施例3
本发明实施例提供一种图像处理设备,所述图像处理设备包括:如实施例2所述的背景模型的提取装置。
图6是本发明实施例的图像处理设备的一构成示意图。如图6所示,图像处理设备600可以包括:中央处理器(CPU)100和存储器110;存储器110耦合到中央处理器100。其中该存储器110可存储各种数据;此外还存储信息处理的程序,并且在中央处理器100的控制下执行该程序。
在一个实施方式中,背景模型的提取装置400或500的功能可以被集成到中央处理器100中。其中,中央处理器100可以被配置为实现如实施例1所述的背景模型的 提取方法。
在另一个实施方式中,背景模型的提取装置400或500可以与中央处理器分开配置,例如可以将背景模型的提取装置400或500配置为与中央处理器100连接的芯片,通过中央处理器的控制来实现背景模型的提取装置400或500的功能。
此外,如图6所示,图像处理设备600还可以包括:输入输出单元120和显示单元130等;其中,上述部件的功能与现有技术类似,此处不再赘述。值得注意的是,图像处理设备600也并不是必须要包括图6中所示的所有部件;此外,图像处理设备600还可以包括图6中没有示出的部件,可以参考现有技术。
本发明实施例还提供一种计算机可读程序,其中当在图像处理设备中执行所述程序时,所述程序使得计算机在所述图像处理设备中执行如实施例1所述的背景模型的提取方法。
本发明实施例还提供一种存储有计算机可读程序的存储介质,其中所述计算机可读程序使得计算机在图像处理设备中执行如实施例1所述的背景模型的提取方法。
本发明以上的装置和方法可以由硬件实现,也可以由硬件结合软件实现。本发明涉及这样的计算机可读程序,当该程序被逻辑部件所执行时,能够使该逻辑部件实现上文所述的装置或构成部件,或使该逻辑部件实现上文所述的各种方法或步骤。本发明还涉及用于存储以上程序的存储介质,如硬盘、磁盘、光盘、DVD、flash存储器等。
针对附图中描述的功能方框中的一个或多个和/或功能方框的一个或多个组合,可以实现为用于执行本申请所描述功能的通用处理器、数字信号处理器(DSP)、专用集成电路(ASIC)、现场可编程门阵列(FPGA)或者其它可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件或者其任意适当组合。针对附图描述的功能方框中的一个或多个和/或功能方框的一个或多个组合,还可以实现为计算设备的组合,例如,DSP和微处理器的组合、多个微处理器、与DSP通信结合的一个或多个微处理器或者任何其它这种配置。
以上结合具体的实施方式对本发明进行了描述,但本领域技术人员应该清楚,这些描述都是示例性的,并不是对本发明保护范围的限制。本领域技术人员可以根据本发明的精神和原理对本发明做出各种变型和修改,这些变型和修改也在本发明的范围内。

Claims (13)

  1. 一种背景模型的提取方法,所述提取方法包括:
    获取监控区域的当前图像;
    基于背景模型从所述当前图像中提取出前景图像区域;
    计算所述前景图像区域的像素个数和所述监控区域的像素个数的比值;
    将所述比值与预设阈值进行比较;以及
    在所述比值小于所述预设阈值的情况下对所述背景模型进行初始化。
  2. 根据权利要求1所述的提取方法,其中,所述预设阈值为按降序排列的多个值并且依次被使用。
  3. 根据权利要求2所述的提取方法,其中,所述提取方法还包括:
    确定所述预设阈值是否全部被使用;
    在所述预设阈值已经被全部使用的情况下,将当前的背景模型作为所述监控区域的初始背景模型。
  4. 根据权利要求3所述的提取方法,其中,在所述预设阈值没有被全部使用的情况下,重新获取所述监控区域的当前图像。
  5. 根据权利要求1所述的提取方法,其中,在所述比值大于或等于所述预设阈值的情况下,根据所述当前图像中的前景图像区域选择性地更新所述背景模型。
  6. 根据权利要求5所述的提取方法,其中,根据所述当前图像中的前景图像区域选择性地更新所述背景模型包括:
    将所述前景图像区域以及相邻区域作为前景扩展区域;以及
    根据所述当前图像中的所述前景扩展区域以外的区域更新所述背景模型,以及不将所述前景扩展区域更新到所述背景模型中。
  7. 一种背景模型的提取装置,所述提取装置包括:
    图像获取单元,获取监控区域的当前图像;
    前景提取单元,基于背景模型从所述当前图像中提取出前景图像区域;
    比值计算单元,计算所述前景图像区域的像素个数和所述监控区域的像素个数的比值;
    比较单元,将所述比值与预设阈值进行比较;以及
    背景初始化单元,在所述比值小于所述预设阈值的情况下对所述背景模型进行初始化。
  8. 根据权利要求7所述的提取装置,其中,所述预设阈值为按降序排列的多个值并且依次被使用。
  9. 根据权利要求8所述的提取装置,其中,所述提取装置还包括:
    阈值确定单元,确定所述预设阈值是否全部被使用;以及
    背景确定单元,在所述预设阈值已经被全部使用的情况下,将当前的背景模型作为所述监控区域的初始背景模型。
  10. 根据权利要求9所述的提取装置,其中,所述图像获取单元还用于:在所述预设阈值没有被全部使用的情况下,重新获取所述监控区域的当前图像。
  11. 根据权利要求8所述的提取装置,其中,所述提取装置还包括:
    背景更新单元,在所述比值大于或等于所述预设阈值的情况下,根据所述当前图像中的前景图像区域选择性地更新所述背景模型。
  12. 根据权利要求11所述的提取装置,其中,所述背景更新单元包括:
    前景扩展单元,将所述前景图像区域以及相邻区域作为前景扩展区域;以及
    背景生成单元,根据所述当前图像中的所述前景扩展区域以外的区域更新所述背景模型,以及不将所述前景扩展区域更新到所述背景模型中。
  13. 一种图像处理设备,所述图像处理设备包括如权利要求7所述的背景模型的提取装置。
PCT/CN2015/087029 2015-08-14 2015-08-14 背景模型的提取方法、装置以及图像处理设备 WO2017028029A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/CN2015/087029 WO2017028029A1 (zh) 2015-08-14 2015-08-14 背景模型的提取方法、装置以及图像处理设备

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2015/087029 WO2017028029A1 (zh) 2015-08-14 2015-08-14 背景模型的提取方法、装置以及图像处理设备

Publications (1)

Publication Number Publication Date
WO2017028029A1 true WO2017028029A1 (zh) 2017-02-23

Family

ID=58050621

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2015/087029 WO2017028029A1 (zh) 2015-08-14 2015-08-14 背景模型的提取方法、装置以及图像处理设备

Country Status (1)

Country Link
WO (1) WO2017028029A1 (zh)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108805897A (zh) * 2018-05-22 2018-11-13 安徽大学 一种改进的运动目标检测vibe算法
CN109727274A (zh) * 2018-11-28 2019-05-07 吉林大学 视频处理方法
CN110033425A (zh) * 2018-01-10 2019-07-19 富士通株式会社 干扰区域检测装置及方法、电子设备

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101673400A (zh) * 2008-09-08 2010-03-17 索尼株式会社 图像处理设备、方法和程序
CN102821272A (zh) * 2012-08-16 2012-12-12 安徽中科智能高技术有限责任公司 一种清除电梯无效请求信号的视频监控***
CN102982519A (zh) * 2012-11-23 2013-03-20 南京邮电大学 一种视频图像的前景识别提取和拼接方法
CN103871082A (zh) * 2014-03-31 2014-06-18 百年金海科技有限公司 一种基于安防视频图像的人流量统计方法
US20140254863A1 (en) * 2013-03-05 2014-09-11 Mitsubishi Electric Research Laboratories, Inc. Method for Detecting and Tracking Objects in Image Sequences of Scenes Acquired by a Stationary Camera

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101673400A (zh) * 2008-09-08 2010-03-17 索尼株式会社 图像处理设备、方法和程序
CN102821272A (zh) * 2012-08-16 2012-12-12 安徽中科智能高技术有限责任公司 一种清除电梯无效请求信号的视频监控***
CN102982519A (zh) * 2012-11-23 2013-03-20 南京邮电大学 一种视频图像的前景识别提取和拼接方法
US20140254863A1 (en) * 2013-03-05 2014-09-11 Mitsubishi Electric Research Laboratories, Inc. Method for Detecting and Tracking Objects in Image Sequences of Scenes Acquired by a Stationary Camera
CN103871082A (zh) * 2014-03-31 2014-06-18 百年金海科技有限公司 一种基于安防视频图像的人流量统计方法

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110033425A (zh) * 2018-01-10 2019-07-19 富士通株式会社 干扰区域检测装置及方法、电子设备
CN110033425B (zh) * 2018-01-10 2023-03-28 富士通株式会社 干扰区域检测装置及方法、电子设备
CN108805897A (zh) * 2018-05-22 2018-11-13 安徽大学 一种改进的运动目标检测vibe算法
CN108805897B (zh) * 2018-05-22 2022-01-21 安徽大学 一种改进的运动目标检测vibe方法
CN109727274A (zh) * 2018-11-28 2019-05-07 吉林大学 视频处理方法

Similar Documents

Publication Publication Date Title
WO2017096949A1 (zh) 一种对目标进行跟踪拍摄的方法、控制装置及***
WO2017084094A1 (zh) 烟雾检测装置、方法以及图像处理设备
US10021381B2 (en) Camera pose estimation
JP2018508875A5 (zh)
US20140064615A1 (en) Method and Device for Denoising Videos Based on Non-Local Means
TW201701187A (zh) 手勢檢測識別方法及系統
WO2017028047A1 (zh) 背景模型的提取方法、装置以及图像处理设备
TW201810186A (zh) 用於更新背景模型之方法及裝置
CN105308618B (zh) 借助于并行检测和跟踪和/或分组特征运动移位跟踪的人脸识别
WO2018068129A1 (en) Determining variance of a block of an image based on a motion vector for the block
WO2017028029A1 (zh) 背景模型的提取方法、装置以及图像处理设备
TWI557691B (zh) 監視攝影裝置及其使用的區域式移動偵測方法
US10540546B2 (en) Image processing apparatus, control method, and storage medium
CN112288642A (zh) 鬼影检测方法、图像融合方法及对应装置
US20200099854A1 (en) Image capturing apparatus and image recording method
US20170243328A1 (en) Method and apparatus for image processing
WO2018133101A1 (zh) 图像前景检测装置及方法、电子设备
US20190354768A1 (en) Content recognition method, system and storage medium thereof
JPWO2015186347A1 (ja) 検出システム、検出方法及びプログラム
US20220207750A1 (en) Object detection with image background subtracted
US9350916B2 (en) Interleaving image processing and image capture operations
WO2017028010A1 (zh) 背景模型的提取方法、装置以及图像处理设备
CN112435278A (zh) 一种基于动态目标检测的视觉slam方法及装置
US20230316531A1 (en) Image processing apparatus, image processing method, and storage medium
WO2013152625A1 (zh) 用于去除附着噪声的方法和***

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: 15901234

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: 15901234

Country of ref document: EP

Kind code of ref document: A1