WO2017028029A1 - Background model extracting method and apparatus and image processing device - Google Patents

Background model extracting method and apparatus and image processing device 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
French (fr)
Chinese (zh)
Inventor
杨兵兵
Original Assignee
富士通株式会社
杨兵兵
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 富士通株式会社, 杨兵兵 filed Critical 富士通株式会社
Priority to PCT/CN2015/087029 priority Critical patent/WO2017028029A1/en
Publication of WO2017028029A1 publication Critical patent/WO2017028029A1/en

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

Disclosed are a background model extracting method and apparatus and an image processing device. The extracting method comprises: acquiring a current image of a monitored area; extracting a foreground image area from the current image on the basis of a background model; calculating a ratio of the number of pixels in the foreground image area to the number of pixels in the monitored area; comparing the ratio with a preset threshold; and initializing the background model when the ratio is smaller than the preset threshold. As a result, the background model can be extracted by use of a relatively appropriate image, a ghost phenomenon occurring during the image detection process can be reduced, and objects having a relatively low moving speed or remaining stationary for a particular period of time can be detected, while at the same time achieving higher image detection accuracy and better noise tolerant capability.

Description

背景模型的提取方法、装置以及图像处理设备Background model extraction method, device and image processing device 技术领域Technical field
本发明涉及一种图形图像技术领域,特别涉及一种背景模型的提取方法、装置以及图像处理设备。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 technique
背景图像的提取被广泛应用在图像监控等领域。例如在检测视频中移动物体时,可以比较当前帧和参考帧的差别,由此检测到运动物体。其中,参考帧可以被称为“背景图像”或者使用“背景模型”进行表示。The extraction of background images is widely used in the field of image monitoring and the like. For example, when detecting an object moving in a video, the difference between the current frame and the reference frame can be compared, thereby detecting a moving object. Among them, the reference frame may be referred to as a "background image" or represented using a "background model."
目前已经有一些方法来进行背景模型的提取,例如帧差别法(Frame differencing),均值过滤法(Mean filter)以及背景混合模型法(Background Mixture Model)。There are already some methods for extracting background models, such as Frame differencing, Mean filter, and Background Mixture Model.
应该注意,上面对技术背景的介绍只是为了方便对本发明的技术方案进行清楚、完整的说明,并方便本领域技术人员的理解而阐述的。不能仅仅因为这些方案在本发明的背景技术部分进行了阐述而认为上述技术方案为本领域技术人员所公知。It should be noted that the above description of the technical background is only for the purpose of facilitating a clear and complete description of the technical solutions of the present invention, and is convenient for understanding by those skilled in the art. The above technical solutions are not considered to be well known to those skilled in the art simply because these aspects are set forth in the background section of the present invention.
发明内容Summary of the invention
但是,发明人发现,采用目前的背景模型提取方法,经常会出现“鬼影(ghost)”现象;并且一般只能检测到移动速度比较快的运动物体。However, the inventors have found that with the current background model extraction method, "ghost" phenomenon often occurs; and generally only moving objects that move faster are detected.
本发明实施例提供一种背景模型的提取方法、装置以及图像处理设备。可以减少图像检测过程中的鬼影现象,并且能够检测移动速度比较小或一定时间内静止的物体。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.
根据本发明实施例的第一个方面,提供一种背景模型的提取方法,所述提取方法包括:According to a first aspect of the embodiments of the present invention, a method for extracting a background model is provided, where the extraction method includes:
获取监控区域的当前图像;Obtain the current image of the monitoring area;
基于背景模型从所述当前图像中提取出前景图像区域;Extracting a foreground image region from the current image based on a background model;
计算所述前景图像区域的像素个数和所述监控区域的像素个数的比值;Calculating a ratio of the number of pixels of the foreground image area to the number of pixels of the monitoring area;
将所述比值与预设阈值进行比较;以及Comparing the ratio to a preset threshold; and
在所述比值小于所述预设阈值的情况下对所述背景模型进行初始化。 The background model is initialized if the ratio is less than the predetermined threshold.
根据本发明实施例的第二个方面,提供一种背景模型的提取装置,所述提取装置包括:According to a second aspect of the embodiments of the present invention, there is provided an apparatus for extracting a background model, the extracting apparatus 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; and
背景初始化单元,在所述比值小于所述预设阈值的情况下对所述背景模型进行初始化。The background initializing unit initializes the background model if the ratio is less than the preset threshold.
根据本发明实施例的第三个方面,提供一种图像处理设备,所述图像处理设备包括如上所述的背景模型的提取装置。According to a third aspect of the embodiments of the present invention, there is provided an image processing apparatus comprising the extraction means of the background model as described above.
根据本发明实施例的又一个方面,提供一种计算机可读程序,其中当在图像处理设备中执行所述程序时,所述程序使得计算机在所述图像处理设备中执行如上所述的背景模型的提取方法。According to still another aspect of an embodiment of the present invention, a computer readable program is provided, 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.
根据本发明实施例的又一个方面,提供一种存储有计算机可读程序的存储介质,其中所述计算机可读程序使得计算机在图像处理设备中执行如上所述的背景模型的提取方法。According to still another aspect of an embodiment of the present invention, 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.
参照后文的说明和附图,详细公开了本发明的特定实施方式,指明了本发明的原理可以被采用的方式。应该理解,本发明的实施方式在范围上并不因而受到限制。在所附权利要求的条款的范围内,本发明的实施方式包括许多改变、修改和等同。Specific embodiments of the present invention are disclosed in detail with reference to the following description and the drawings, in which <RTIgt; It should be understood that the embodiments of the invention are not limited in scope. The embodiments of the present invention include many variations, modifications, and equivalents within the scope of the appended claims.
针对一种实施方式描述和/或示出的特征可以以相同或类似的方式在一个或更多个其它实施方式中使用,与其它实施方式中的特征相组合,或替代其它实施方式中的特征。 Features described and/or illustrated with respect to one embodiment may be used in one or more other embodiments in the same or similar manner, in combination with, or in place of, features in other embodiments. .
应该强调,术语“包括/包含”在本文使用时指特征、整件、步骤或组件的存在,但并不排除一个或更多个其它特征、整件、步骤或组件的存在或附加。It should be emphasized that the term "comprising" or "comprises" or "comprising" or "comprising" or "comprising" or "comprising" or "comprises"
附图说明DRAWINGS
参照以下的附图可以更好地理解本发明的很多方面。附图中的部件不是成比例绘制的,而只是为了示出本发明的原理。为了便于示出和描述本发明的一些部分,附图中对应部分可能被放大或缩小。Many aspects of the invention can be better understood with reference to the following drawings. The components in the figures are not drawn to scale, but only to illustrate the principles of the invention. In order to facilitate the illustration and description of some parts of the invention, the corresponding parts in the figures may be enlarged or reduced.
在本发明的一个附图或一种实施方式中描述的元素和特征可以与一个或更多个其它附图或实施方式中示出的元素和特征相结合。此外,在附图中,类似的标号表示几个附图中对应的部件,并可用于指示多于一种实施方式中使用的对应部件。Elements and features described in one of the figures or one embodiment of the invention may be combined with elements and features illustrated in one or more other figures or embodiments. In the accompanying drawings, like reference numerals refer to the
图1是本发明实施例1的背景模型的提取方法的一示意图;1 is a schematic diagram of a method for extracting a background model according to Embodiment 1 of the present invention;
图2是本发明实施例1的背景模型的提取方法的另一示意图;2 is another schematic diagram of a method for extracting a background model according to Embodiment 1 of the present invention;
图3是本发明实施例1的对前景物体区域进行扩展的一示意图;3 is a schematic diagram of expanding a foreground object region according to Embodiment 1 of the present invention;
图4是本发明实施例2的背景模型的提取装置的一示意图;4 is a schematic diagram of an apparatus for extracting a background model according to Embodiment 2 of the present invention;
图5是本发明实施例2的背景模型的提取装置的另一示意图;Figure 5 is another schematic diagram of an apparatus for extracting a background model according to Embodiment 2 of the present invention;
图6是本发明实施例3的图像处理设备的一构成示意图。Fig. 6 is a block diagram showing the configuration of an image processing apparatus according to a third embodiment of the present invention.
具体实施方式detailed description
参照附图,通过下面的说明书,本发明的前述以及其它特征将变得明显。在说明书和附图中,具体公开了本发明的特定实施方式,其表明了其中可以采用本发明的原则的部分实施方式,应了解的是,本发明不限于所描述的实施方式,相反,本发明包括落入所附权利要求的范围内的全部修改、变型以及等同物。The foregoing and other features of the present invention will be apparent from the The specific embodiments of the present invention are disclosed in the specification and the drawings, which are illustrated in the embodiment of the invention The invention includes all modifications, variations and equivalents falling within the scope of the appended claims.
在图像检测过程中,鬼影现象可能发生在如下场景中:例如,当一个移动物体变成静止物体一段时间(例如等待红绿灯的车辆)之后,该移动物体可能会被认为是静止的而被更新到背景图像或背景模型中,当该物体再次移动时将会留下鬼影。或者,当一个已经被认为是背景图像区域的物体(例如停车场里已经停了几天的汽车)开始移动时,当该物体开始移动时将会出现鬼影现象。During image detection, 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. In the background image or background model, ghosts will be left when the object moves again. Or, when 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) starts moving, ghosting will occur when the object starts moving.
在本实施例中,将以交通领域的图像监控场景为例进行说明。但本发明不限于此,还可以应用到其他的场景中。 In this embodiment, an image monitoring scene in the traffic field will be taken as an example for description. However, the present invention is not limited thereto, and can be applied to other scenarios.
实施例1Example 1
本发明实施例提供一种背景模型的提取方法。图1是本发明实施例的背景模型的提取方法的一示意图,如图1所示,所述提取方法包括: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:
步骤101,获取监控区域的当前图像;Step 101: Acquire a current image of a monitoring area.
步骤102,基于背景模型从所述当前图像中提取出前景图像区域;Step 102: Extract a foreground image region from the current image based on a background model;
步骤103,计算所述前景图像区域的像素个数和所述监控区域的像素个数的比值;Step 103: Calculate a ratio of the number of pixels of the foreground image area to the number of pixels of the monitoring area;
步骤104,将所述比值与预设阈值进行比较;以及 Step 104, comparing the ratio with a preset threshold; and
步骤105,在所述比值小于所述预设阈值的情况下对所述背景模型进行初始化。Step 105: Initialize the background model if the ratio is less than the preset threshold.
在本实施例中,可以通过摄像头获得包括多个帧图像的视频信息。该摄像头可以是用于进行交通图像监控的摄像头,不间断地对监控区域进行拍摄;但本发明不限于此,还可以是其他的图像监控场景。In the present embodiment, 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.
在本实施例中,步骤102中的背景模型可以是采用现有技术而预先生成的,然后该背景模型可以是不断地被更新的。例如可以根据一帧图像得到初始背景模型M0,然后不断地对该背景模型进行更新得到背景模型M1,M2,……,Mi。In this embodiment, the background model in step 102 may be pre-generated using the prior art, and then the background model may be continuously updated. For example, 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.
在本实施例中,通过计算前景图像区域的像素个数和监控区域的像素个数的比值;以及在所述比值小于预设阈值的情况下对背景模型进行重新初始化。由此,可以使用较适合的图像提取背景模型。In this embodiment, 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. Thus, the background model can be extracted using a more suitable image.
例如,预设阈值为0.5。当某一时刻t0的图像中大部分是移动物体时,在确定出前景图像区域的像素个数(例如560个)和监控区域的像素个数(例如800个)的比值(即0.7)大于该预设阈值(0.5)的情况下,可以认为该图像不适合进行背景模型提取。当某一时刻t1,在确定出前景图像区域的像素个数(例如80个)和监控区域的像素个数(例如800个)的比值(即0.1)小于该预设阈值(0.5)的情况下,可以认为该图像适合进行背景模型提取。For example, the preset threshold is 0.5. When most of the images at a certain time t0 are moving objects, 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. In the case of a preset threshold (0.5), the image can be considered to be unsuitable for background model extraction. At a certain time t1, in the case where it is determined that 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) are smaller than the preset threshold (0.5) The image can be considered suitable for background model extraction.
在本实施例中,可以使用多个预设阈值对背景模型进行逐渐更新。其中,所述预设阈值为按降序排列的多个值并且依次被使用。例如为0.5,0.4,0.3,0.2四个值。可以根据这些阈值逐渐逼近来获得比较准确的初始背景模型。In this embodiment, 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.
图2是本发明实施例的背景模型的提取方法的另一示意图,如图2所示,所述提取方法包括: 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:
步骤201,获得背景模型M0 Step 201, obtaining a background model M 0 ;
在本实施例中,可以基于现有技术获得该背景模型M0。可以采用现有技术中获取背景模型的任意一种方法。In the present embodiment, 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.
步骤202,获取监控区域的当前图像;Step 202: Acquire a current image of the monitoring area.
步骤203,基于背景模型Mi从所述当前图像中提取出前景图像区域;Step 203: extract a foreground image region from the current image based on the background model M i ;
其中,i为0或正整数。Where i is 0 or a positive integer.
步骤204,计算所述前景图像区域的像素个数和所述监控区域的像素个数的比值;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为所述前景图像区域的像素个数,N为所述监控区域的像素个数,则比值R=F/N。For example, F is the number of pixels of the foreground image area, and N is the number of pixels of the monitoring area, and the ratio R=F/N.
步骤205,将所述比值与预设阈值进行比较; Step 205, comparing the ratio with a preset threshold;
在本实施例中,预设阈值为T[k],包括按降序排列的多个值。其中,k为0至K的整数。例如,T[0]=0.5,T[1]=0.4,T[2]=0.3,T[3]=0.2;K为3。In this embodiment, the preset threshold is T[k], including a plurality of values arranged in descending order. Where k is an integer from 0 to K. For example, T[0] = 0.5, T[1] = 0.4, T[2] = 0.3, T[3] = 0.2; K is 3.
步骤206,确定所述比值是否小于预设阈值;在所述比值小于所述预设阈值的情况下执行步骤207;在所述比值大于或等于所述预设阈值的情况下执行步骤208。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.
步骤207,使用所述当前图像对所述背景模型进行重新初始化,即使用当前图像对背景模型进行全部更新。可以使用现有任意的背景模型初始化的方法。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.
步骤208,使用所述当前图像对所述背景模型进行选择性更新。然后可以执行步骤202,重新获取所述监控区域的当前图像。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.
在本实施例中,可以使用后述的方法选择性地进行更新,例如将背景模型Mi更新为背景模型Mi+1In the present embodiment, 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 .
在本实施例中,可以在比值小于预设阈值的情况下,进行背景模型的重新初始化,即全部进行更新;在比值大于或等于预设阈值的情况下,使用所述当前图像对所述背景模型进行选择性更新。In this embodiment, 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.
步骤209,将k增加1,即将当前预设阈值变更为下一个值。In step 209, k is incremented by 1, that is, the current preset threshold is changed to the next value.
在本实施例中,预设阈值T[k]被依次使用,k的初始值为0,即T[0]被首先使用,然后T[1]被使用,……。In the present embodiment, 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, ....
步骤210,确定k是否大于K,即确定所述预设阈值是否全部被使用。在所述预设阈值已经被全部使用的情况下执行步骤211;在所述预设阈值没有被全部使用的情况下执行步骤202,重新获取所述监控区域的当前图像。 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.
步骤211,将当前的背景模型作为所述监控区域的初始背景模型。Step 211: The current background model is used as an initial background model of the monitoring area.
例如,若此时的当前背景模型为Mj,则可以将该Mj作为所述监控区域的初始背景模型,由此可以获得比较准确的初始背景模型。此外,还可以对该初始背景模型继续进行更新。For example, if the current background model at this time is M j , the M j can be used as the initial background model of the monitoring area, thereby obtaining a relatively accurate initial background model. In addition, the initial background model can be continuously updated.
以下通过实例对图2的过程进行进一步说明。The process of Figure 2 is further illustrated by way of example below.
例如,预设阈值为T[k],T[0]=0.5,T[1]=0.4,T[2]=0.3,T[3]=0.2。当前背景模型为M0,监控区域的像素个数N为1000个。For example, the preset threshold is T[k], T[0]=0.5, T[1]=0.4, T[2]=0.3, and T[3]=0.2. The current background model is M 0 , and the number of pixels N in the monitoring area is 1000.
在某一时刻t0,获取监控区域的图像I0,基于M0提取前景图像区域后可以获知前景图像区域的像素个数F为480个,则R=0.48;将R与T[0]比较可知此时R<T[0],因此使用图像I0对背景模型进行重新初始化即全部更新。并且当前阈值变更为T[1],此时预设阈值没有被全部使用,则继续进行背景模型更新。At a certain time t0, the image I0 of the monitoring area is acquired, and after extracting the foreground image area based on M 0 , it can be known that the number F of pixels of the foreground image area is 480, then R=0.48; comparing R with T[0] When R<T[0], the background model is reinitialized using image I0, that is, all updates. And the current threshold is changed to T[1]. At this time, the preset threshold is not used all, and the background model update is continued.
在某一时刻t1,获取监控区域的图像I1,提取前景图像区域后可以获知前景图像区域的像素个数F为450个,则R=0.45;将R与T[1]比较可知此时R>T[1],因此使用该图像I1对背景模型进行选择性更新。然后重新获取图像,继续进行R的计算。At a certain time t1, the image I1 of the monitoring area is acquired, and after extracting the foreground image area, it can be known that the number F of pixels of the foreground image area is 450, then R=0.45; comparing R with T[1], it is known that R> T[1], so the background model is selectively updated using this image I1. Then reacquire the image and continue the calculation of R.
在进行多个步骤之后例如当前阈值已经变更为T[3],在某一时刻t6,获取监控区域的图像I6,提取前景图像区域后可以获知前景图像区域的像素个数F为180个,则R=0.18;将R与T[3]比较可知此时R<T[3],因此使用图像I6对背景模型进行重新初始化即全部更新。此时预设阈值已经被全部使用,因此可以结束该过程。此外,还可以将当前背景模型作为监控区域的初始背景模型。After the plurality of steps are performed, for example, the current threshold has been changed to T[3]. At a certain time t6, 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. At this point, the preset threshold has been used all, so the process can be ended. In addition, the current background model can also be used as the initial background model for the monitoring area.
由此,通过计算前景图像区域的像素个数和监控区域的像素个数的比值;以及在所述比值小于预设阈值的情况下对背景模型进行重新初始化;并且预设阈值是按照降序排列并且依次被使用的。因此背景模型以逐渐逼近的方式被更新,可以使用较适合的图像提取背景模型。Thereby, by calculating a ratio of the number of pixels of the foreground image area and the number of pixels of the monitoring area; and re-initializing the background model if the ratio is less than a preset threshold; and the preset threshold is arranged in descending order and Used in turn. Therefore, the background model is updated in a gradual approximation manner, and the background model can be extracted using a more suitable image.
值得注意的是,图1和图2仅示意性示出了本发明的情况,但本发明不限于此。例如,还可以根据实际情况调整各步骤之间的顺序,或者增加或者减少其中的一个步骤或者几个步骤。It is to be noted that FIGS. 1 and 2 only schematically illustrate the case of the present invention, but the present invention is not limited thereto. For example, the order between the steps may be adjusted according to the actual situation, or one step or several steps may be added or subtracted.
在本实施例中,步骤208中可以根据前景图像区域选择性地更新背景模型。In this embodiment, in step 208, the background model can be selectively updated according to the foreground image region.
具体地,可以将前景图像区域以及相邻区域作为前景扩展区域;根据所述当前图像中的所述前景扩展区域以外的区域更新所述背景模型,以及不将所述前景扩展区域 更新到所述背景模型中。Specifically, 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.
图3是本发明实施例的对前景物体区域进行扩展的一示意图,如图3所示,可以将当前图像300中除了背景图像区域301的前景图像区域302进行扩展。如图3所示,例如对于前景图像区域302的边缘上的某个像素P,将该像素P附近的例如5个像素也包含进前景扩展区域303。FIG. 3 is a schematic diagram of expanding a foreground object area according to an embodiment of the present invention. As shown in FIG. 3, the foreground image area 302 of the current image 300 except the background image area 301 may be expanded. As shown in FIG. 3, for example, for a certain pixel P on the edge of the foreground image region 302, for example, five pixels near the pixel P are also included in the foreground extended region 303.
由此,前景图像区域(例如运动物体)以及相邻区域不会被更新到背景模型中,可以减少鬼影现象的发生,并且能够检测移动速度比较小的运行物体;图像检测的准确性更高且容忍噪声的能力更强。Thereby, the foreground image area (for example, a moving object) and 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.
由上述实施例可知,计算前景图像区域的像素个数和监控区域的像素个数的比值;以及在所述比值小于预设阈值的情况下对背景模型进行初始化。由此,可以使用较适合的图像提取背景模型,可以减小图像检测过程中的鬼影现象,并且能够检测移动速度比较小或者一定时间内静止的物体,图像检测的准确性更高且容忍噪声的能力更强。It can be seen from the above embodiment that 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.
实施例2Example 2
本发明实施例提供一种背景模型的提取装置,与实施例1相同的内容不再赘述。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.
图4是本发明实施例的背景模型的提取装置的一示意图,如图4所示,所述背景模型的提取装置400包括:4 is a schematic diagram of a background model extraction apparatus according to an embodiment of the present invention. As shown in FIG. 4, the background model extraction apparatus 400 includes:
图像获取单元401,获取监控区域的当前图像;The image obtaining unit 401 acquires a current image of the monitoring area;
前景提取单元402,基于背景模型从所述当前图像中提取出前景图像区域;The foreground extracting unit 402 extracts a foreground image region from the current image based on the background model;
比值计算单元403,计算所述前景图像区域的像素个数和所述监控区域的像素个数的比值;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;
比较单元404,将所述比值与预设阈值进行比较;以及Comparing unit 404, comparing the ratio to a preset threshold;
背景初始化单元405,在所述比值小于所述预设阈值的情况下对所述背景模型进行初始化。The background initializing unit 405 initializes the background model if the ratio is smaller than the preset threshold.
在本实施例中,图像获取单元401可根据摄像头获得的视频信息获得当前图像。In this embodiment, the image acquisition unit 401 can obtain the current image according to the video information obtained by the camera.
图5是本发明实施例的背景模型的提取装置的另一示意图,如图5所示,所述背景模型的提取装置500包括:图像获取单元401、前景提取单元402、比值计算单元403、比较单元404以及背景初始化单元405,如上所述。 FIG. 5 is another schematic diagram of a background model extraction apparatus according to an embodiment of the present invention. As shown in FIG. 5, 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.
在本实施例中,所述预设阈值为按降序排列的多个值并且依次被使用。In this embodiment, the preset threshold is a plurality of values arranged in descending order and used in sequence.
如图5所示,所述背景模型的提取装置500还可以包括:As shown in FIG. 5, the extraction device 500 of the background model may further include:
阈值确定单元501,确定所述预设阈值是否全部被使用;以及The threshold determining unit 501 determines whether the preset threshold is all used;
背景确定单元502,在所述预设阈值已经被全部使用的情况下,还可以将当前的背景模型作为所述监控区域的初始背景模型。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.
在本实施例中,所述图像获取单元401还可以用于:在所述预设阈值没有被全部使用的情况下,重新获取所述监控区域的当前图像。In this embodiment, 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.
如图5所示,所述背景模型的提取装置500还可以包括:背景更新单元406;所述背景更新单元406具体可以用于:在所述比值大于或等于所述预设阈值的情况下,根据所述当前图像中的前景图像区域选择性地更新所述背景模型。As shown in FIG. 5, 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.
如图5所示,所述背景更新单元406可以包括:As shown in FIG. 5, the background update unit 406 can include:
前景扩展单元503,将所述前景图像区域以及相邻区域作为前景扩展区域;以及a foreground extension unit 503, the foreground image area and the adjacent area as a foreground extended area;
背景生成单元504,根据所述当前图像中的所述前景扩展区域以外的区域更新所述背景模型,以及不将所述前景扩展区域更新到所述背景模型中。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.
由上述实施例可知,计算前景图像区域的像素个数和监控区域的像素个数的比值;以及在所述比值小于预设阈值的情况下对背景模型进行初始化。由此,可以使用较适合的图像提取背景模型,可以减小图像检测过程中的鬼影现象,并且能够检测移动速度比较慢或者一定时间内静止的物体,图像检测的准确性更高且容忍噪声的能力更强。It can be seen from the above embodiment that 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.
实施例3Example 3
本发明实施例提供一种图像处理设备,所述图像处理设备包括:如实施例2所述的背景模型的提取装置。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.
图6是本发明实施例的图像处理设备的一构成示意图。如图6所示,图像处理设备600可以包括:中央处理器(CPU)100和存储器110;存储器110耦合到中央处理器100。其中该存储器110可存储各种数据;此外还存储信息处理的程序,并且在中央处理器100的控制下执行该程序。Fig. 6 is a block diagram showing the configuration of an image processing apparatus according to an embodiment of the present invention. As shown in FIG. 6, 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.
在一个实施方式中,背景模型的提取装置400或500的功能可以被集成到中央处理器100中。其中,中央处理器100可以被配置为实现如实施例1所述的背景模型的 提取方法。In one embodiment, the functionality of the background model's extraction device 400 or 500 can be integrated into the central processor 100. Wherein, the central processing unit 100 can be configured to implement the background model as described in Embodiment 1. Extraction Method.
在另一个实施方式中,背景模型的提取装置400或500可以与中央处理器分开配置,例如可以将背景模型的提取装置400或500配置为与中央处理器100连接的芯片,通过中央处理器的控制来实现背景模型的提取装置400或500的功能。In another embodiment, the extraction device 400 or 500 of the background model may be configured separately from the central processing unit. For example, 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.
此外,如图6所示,图像处理设备600还可以包括:输入输出单元120和显示单元130等;其中,上述部件的功能与现有技术类似,此处不再赘述。值得注意的是,图像处理设备600也并不是必须要包括图6中所示的所有部件;此外,图像处理设备600还可以包括图6中没有示出的部件,可以参考现有技术。In addition, as shown in FIG. 6, 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.
本发明实施例还提供一种计算机可读程序,其中当在图像处理设备中执行所述程序时,所述程序使得计算机在所述图像处理设备中执行如实施例1所述的背景模型的提取方法。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.
本发明实施例还提供一种存储有计算机可读程序的存储介质,其中所述计算机可读程序使得计算机在图像处理设备中执行如实施例1所述的背景模型的提取方法。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.
本发明以上的装置和方法可以由硬件实现,也可以由硬件结合软件实现。本发明涉及这样的计算机可读程序,当该程序被逻辑部件所执行时,能够使该逻辑部件实现上文所述的装置或构成部件,或使该逻辑部件实现上文所述的各种方法或步骤。本发明还涉及用于存储以上程序的存储介质,如硬盘、磁盘、光盘、DVD、flash存储器等。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.
针对附图中描述的功能方框中的一个或多个和/或功能方框的一个或多个组合,可以实现为用于执行本申请所描述功能的通用处理器、数字信号处理器(DSP)、专用集成电路(ASIC)、现场可编程门阵列(FPGA)或者其它可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件或者其任意适当组合。针对附图描述的功能方框中的一个或多个和/或功能方框的一个或多个组合,还可以实现为计算设备的组合,例如,DSP和微处理器的组合、多个微处理器、与DSP通信结合的一个或多个微处理器或者任何其它这种配置。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. An application specific integrated circuit (ASIC), field programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware component, or any suitable combination thereof. 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.
以上结合具体的实施方式对本发明进行了描述,但本领域技术人员应该清楚,这些描述都是示例性的,并不是对本发明保护范围的限制。本领域技术人员可以根据本发明的精神和原理对本发明做出各种变型和修改,这些变型和修改也在本发明的范围内。 The present invention has been described in connection with the specific embodiments thereof, and it should be understood by those skilled in the art that A person skilled in the art can make various modifications and changes to the present invention within the scope of the present invention.

Claims (13)

  1. 一种背景模型的提取方法,所述提取方法包括:A method for extracting a background model, the extraction method comprising:
    获取监控区域的当前图像;Obtain the current image of the monitoring area;
    基于背景模型从所述当前图像中提取出前景图像区域;Extracting a foreground image region from the current image based on a background model;
    计算所述前景图像区域的像素个数和所述监控区域的像素个数的比值;Calculating a ratio of the number of pixels of the foreground image area to the number of pixels of the monitoring area;
    将所述比值与预设阈值进行比较;以及Comparing the ratio to a preset threshold; and
    在所述比值小于所述预设阈值的情况下对所述背景模型进行初始化。The background model is initialized if the ratio is less than the predetermined threshold.
  2. 根据权利要求1所述的提取方法,其中,所述预设阈值为按降序排列的多个值并且依次被使用。The extraction method according to claim 1, wherein the preset threshold is a plurality of values arranged in descending order and used in order.
  3. 根据权利要求2所述的提取方法,其中,所述提取方法还包括:The extraction method according to claim 2, wherein the extraction method further comprises:
    确定所述预设阈值是否全部被使用;Determining whether the preset threshold is all used;
    在所述预设阈值已经被全部使用的情况下,将当前的背景模型作为所述监控区域的初始背景模型。In case the preset threshold has been used all, the current background model is used as the initial background model of the monitoring area.
  4. 根据权利要求3所述的提取方法,其中,在所述预设阈值没有被全部使用的情况下,重新获取所述监控区域的当前图像。The extraction method according to claim 3, wherein the current image of the monitoring area is re-acquired if the preset threshold is not used in its entirety.
  5. 根据权利要求1所述的提取方法,其中,在所述比值大于或等于所述预设阈值的情况下,根据所述当前图像中的前景图像区域选择性地更新所述背景模型。The extraction method according to claim 1, wherein the background model is selectively updated according to a foreground image region in the current image if the ratio is greater than or equal to the preset threshold.
  6. 根据权利要求5所述的提取方法,其中,根据所述当前图像中的前景图像区域选择性地更新所述背景模型包括:The extraction method according to claim 5, wherein selectively updating the background model according to a foreground image region in the current image comprises:
    将所述前景图像区域以及相邻区域作为前景扩展区域;以及Using the foreground image area and the adjacent area as foreground extended areas;
    根据所述当前图像中的所述前景扩展区域以外的区域更新所述背景模型,以及不将所述前景扩展区域更新到所述背景模型中。Updating the background model according to an area other than the foreground extended area in the current image, and not updating the foreground extended area into the background model.
  7. 一种背景模型的提取装置,所述提取装置包括:An extraction device for a background model, the extraction device 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; and
    背景初始化单元,在所述比值小于所述预设阈值的情况下对所述背景模型进行初始化。The background initializing unit initializes the background model if the ratio is less than the preset threshold.
  8. 根据权利要求7所述的提取装置,其中,所述预设阈值为按降序排列的多个值并且依次被使用。The extracting apparatus according to claim 7, wherein said preset threshold is a plurality of values arranged in descending order and is used in order.
  9. 根据权利要求8所述的提取装置,其中,所述提取装置还包括:The extraction device according to claim 8, wherein the extraction device further comprises:
    阈值确定单元,确定所述预设阈值是否全部被使用;以及a threshold determining unit that determines whether the preset threshold is all used;
    背景确定单元,在所述预设阈值已经被全部使用的情况下,将当前的背景模型作为所述监控区域的初始背景模型。The background determining unit uses the current background model as an initial background model of the monitoring area if the preset threshold has been used in its entirety.
  10. 根据权利要求9所述的提取装置,其中,所述图像获取单元还用于:在所述预设阈值没有被全部使用的情况下,重新获取所述监控区域的当前图像。The extraction device according to claim 9, wherein the image acquisition unit is further configured to: re-acquire the current image of the monitoring area if the preset threshold is not used all.
  11. 根据权利要求8所述的提取装置,其中,所述提取装置还包括:The extraction device according to claim 8, wherein the extraction device further comprises:
    背景更新单元,在所述比值大于或等于所述预设阈值的情况下,根据所述当前图像中的前景图像区域选择性地更新所述背景模型。And a background update unit that selectively updates the background model according to the foreground image region in the current image if the ratio is greater than or equal to the preset threshold.
  12. 根据权利要求11所述的提取装置,其中,所述背景更新单元包括:The extraction device according to claim 11, wherein the background update unit comprises:
    前景扩展单元,将所述前景图像区域以及相邻区域作为前景扩展区域;以及a foreground extension unit that uses the foreground image area and the adjacent area as foreground extension areas;
    背景生成单元,根据所述当前图像中的所述前景扩展区域以外的区域更新所述背景模型,以及不将所述前景扩展区域更新到所述背景模型中。And a background generating unit that 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.
  13. 一种图像处理设备,所述图像处理设备包括如权利要求7所述的背景模型的提取装置。 An image processing apparatus comprising the extraction device of the background model according to claim 7.
PCT/CN2015/087029 2015-08-14 2015-08-14 Background model extracting method and apparatus and image processing device WO2017028029A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/CN2015/087029 WO2017028029A1 (en) 2015-08-14 2015-08-14 Background model extracting method and apparatus and image processing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2015/087029 WO2017028029A1 (en) 2015-08-14 2015-08-14 Background model extracting method and apparatus and image processing device

Publications (1)

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

Family

ID=58050621

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2015/087029 WO2017028029A1 (en) 2015-08-14 2015-08-14 Background model extracting method and apparatus and image processing device

Country Status (1)

Country Link
WO (1) WO2017028029A1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108805897A (en) * 2018-05-22 2018-11-13 安徽大学 A kind of improved moving object detection VIBE algorithms
CN109727274A (en) * 2018-11-28 2019-05-07 吉林大学 Method for processing video frequency
CN110033425A (en) * 2018-01-10 2019-07-19 富士通株式会社 Interference region detection device and method, electronic equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101673400A (en) * 2008-09-08 2010-03-17 索尼株式会社 Image processing apparatus, method, and program
CN102821272A (en) * 2012-08-16 2012-12-12 安徽中科智能高技术有限责任公司 Video monitoring system with elevator invalid request signal removing function
CN102982519A (en) * 2012-11-23 2013-03-20 南京邮电大学 Foreground identifying, extracting and splicing method of video images
CN103871082A (en) * 2014-03-31 2014-06-18 百年金海科技有限公司 Method for counting people stream based on security and protection video image
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 (en) * 2008-09-08 2010-03-17 索尼株式会社 Image processing apparatus, method, and program
CN102821272A (en) * 2012-08-16 2012-12-12 安徽中科智能高技术有限责任公司 Video monitoring system with elevator invalid request signal removing function
CN102982519A (en) * 2012-11-23 2013-03-20 南京邮电大学 Foreground identifying, extracting and splicing method of video images
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 (en) * 2014-03-31 2014-06-18 百年金海科技有限公司 Method for counting people stream based on security and protection video image

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110033425A (en) * 2018-01-10 2019-07-19 富士通株式会社 Interference region detection device and method, electronic equipment
CN110033425B (en) * 2018-01-10 2023-03-28 富士通株式会社 Interference area detection device and method and electronic equipment
CN108805897A (en) * 2018-05-22 2018-11-13 安徽大学 A kind of improved moving object detection VIBE algorithms
CN108805897B (en) * 2018-05-22 2022-01-21 安徽大学 Improved moving target detection VIBE method
CN109727274A (en) * 2018-11-28 2019-05-07 吉林大学 Method for processing video frequency

Similar Documents

Publication Publication Date Title
WO2017096949A1 (en) Method, control device, and system for tracking and photographing target
WO2017084094A1 (en) Apparatus, method, and image processing device for smoke detection
US10021381B2 (en) Camera pose estimation
JP2018508875A5 (en)
TW201701187A (en) Method and system of gesture detection and recognition
WO2017028047A1 (en) Background model extracting method and apparatus and image processing device
JP6579868B2 (en) Image processing apparatus, imaging apparatus, image processing method, and program
CN105308618B (en) Face recognition by means of parallel detection and tracking and/or grouped feature motion shift tracking
EP3526767A1 (en) Determining variance of a block of an image based on a motion vector for the block
WO2017028029A1 (en) Background model extracting method and apparatus and image processing device
TWI557691B (en) Monitoring Camera Device and Related Region-based Motion Detection Method
US10540546B2 (en) Image processing apparatus, control method, and storage medium
US10936876B2 (en) Content recognition method, system and storage medium thereof
US20170243328A1 (en) Method and apparatus for image processing
WO2015186347A1 (en) Detection system, detection method, and program storage medium
WO2018133101A1 (en) Image foreground detection apparatus and method, and electronic device
US20220207750A1 (en) Object detection with image background subtracted
US9350916B2 (en) Interleaving image processing and image capture operations
WO2017028010A1 (en) Background model extracting method and apparatus and image processing device
US20230316531A1 (en) Image processing apparatus, image processing method, and storage medium
WO2013152625A1 (en) Adhesive noise cancellation method and system
CN108520259B (en) Foreground target extraction method, device, equipment and storage medium
WO2018142916A1 (en) Image processing device, image processing method, and image processing program
CN110858392A (en) Monitoring target positioning method based on fusion background model
WO2020259185A1 (en) Method and apparatus for implementing visual odometer

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