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

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

Info

Publication number
WO2017028010A1
WO2017028010A1 PCT/CN2015/086965 CN2015086965W WO2017028010A1 WO 2017028010 A1 WO2017028010 A1 WO 2017028010A1 CN 2015086965 W CN2015086965 W CN 2015086965W WO 2017028010 A1 WO2017028010 A1 WO 2017028010A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
foreground
background model
pixel
updated
Prior art date
Application number
PCT/CN2015/086965
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/086965 priority Critical patent/WO2017028010A1/zh
Publication of WO2017028010A1 publication Critical patent/WO2017028010A1/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 a "background model.”
  • Embodiments of the present invention provide a method, an apparatus, and an image processing apparatus for extracting a background model. It is possible to reduce ghosting during image detection and to detect objects that move at a relatively small speed or are stationary for a period of time.
  • a method for extracting a background model includes:
  • the background model is updated based on the updated foreground image.
  • an apparatus for extracting a background model the extracting apparatus include:
  • a foreground extraction unit that extracts a foreground image from the current image based on the background model
  • a texture acquiring unit performing gradient detection on the current image to obtain texture information of the current image
  • a foreground update unit that updates the foreground image according to the texture information to obtain an updated foreground image
  • the background update unit updates the background model based on the updated foreground image.
  • 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.
  • An advantageous effect of the embodiment of the present invention is that the foreground image is updated according to the texture information, and the background model is updated based on the updated foreground image.
  • the ghost phenomenon in the image detecting process can be reduced, and an object whose moving speed is relatively small or stationary for a certain period of time can be detected, and the image detecting accuracy is higher and the ability to tolerate noise 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 a schematic diagram of expanding a foreground object region according to Embodiment 1 of the present invention.
  • FIG. 3 is another schematic diagram of a method for extracting a background model 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 image monitoring scene in the traffic field will be taken as an example for description.
  • the background image area is relatively monotonous.
  • the road surface in the background image area is an asphalt road surface or a cement road surface, so that the color or brightness is relatively uniform, or the sky in the background image area is blue, so that the color or brightness is relatively uniform.
  • 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 background model of an embodiment of the present invention
  • a schematic diagram of an extraction method, as shown in FIG. 1, the extraction method includes:
  • Step 101 Extract a foreground image from the current image based on the background model
  • Step 102 Perform gradient detection on the current image to obtain texture information of the current image.
  • Step 103 Update the foreground image according to the texture information to obtain an updated foreground image
  • Step 104 Update the background model based on the updated foreground image.
  • video information of a plurality of frames can be obtained through the camera.
  • the camera may be a camera for performing image monitoring, and the monitoring area is continuously captured, but the present invention is not limited thereto.
  • the background model may be continuously updated.
  • the background model When the background model is initialized, it can be performed according to one frame of image in the video.
  • the initial background model M 0 can be obtained according to the frame at a certain time point, and then the background model is continuously updated to obtain the background models M 1 , M 2 , . . . , Mi.
  • Steps 101 to 104 illustrate the case where the background model is updated once in the embodiment of the present invention, and the background model in step 101 may be M j , where j is 0 or any positive integer; and the background obtained in step 104
  • the model is M j+1 .
  • FIG. 1 illustrates an update as an example, and the background model may be updated multiple times during actual implementation.
  • the current image may be subjected to gradient detection to obtain texture information of the current image.
  • the background image area is relatively monotonous, so the value of the texture information is relatively small; and the foreground image area is rich in color or brightness, so the value of the texture information is relatively large.
  • texture information For details of the texture information, reference may be made to related art. For those skilled in the art, the texture information is a clear concept, and thus the embodiments of the present invention will not be described again.
  • performing gradient detection on the current image to obtain texture information of the current image in step 102 may specifically include: performing gradient detection on the current image to obtain an edge image; and generating the texture information.
  • the binarized image is expanded and the binarized image is expanded.
  • gradient detection may be performed to obtain an edge image of the current image, a binarized image is generated according to the edge image (characteristic information representing the pixel), and then the binarized image is expanded (also referred to as morphological expansion) ).
  • the extended image is represented by edge_map, for example, edge_map[x][y] is used to represent the edge image information of the pixel [x][y], where x and y represent the coordinates of the pixel; using foremap[x][y] Whether the pixel belongs to the foreground image area.
  • edge_map[x][y] When the value of edge_map[x][y] is 0, it means that the difference between the pixel and the nearby pixel is not large, so the pixel may be in the background image area; when the value of edge_map[x][y] is not 0 , indicating the pixel and nearby image The difference between the primes is large, so the pixel may be in the foreground image area.
  • any existing gradient detection algorithm may be used, and the present invention does not limit this.
  • the foreground image can be updated according to the texture information, and the background model is updated based on the updated foreground image.
  • it is able to detect objects that move at a relatively small speed or are stationary for a period of time, and the image detection accuracy is higher and the ability to tolerate noise is stronger.
  • the background model can also be selectively updated based on a partial region of the new foreground image.
  • the foreground image area and the adjacent area in the updated foreground image 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 The foreground extension area is updated into the background model.
  • FIG. 2 is a schematic diagram of expanding a foreground object region according to an embodiment of the present invention.
  • the foreground image region 202 except the background image region 201 may be expanded (also referred to as Morphological expansion).
  • Morphological expansion As shown in FIG. 2, for example, for a certain pixel P on the edge of the foreground image region 202, for example, five pixels near the pixel P are also included in the foreground extended region 203.
  • the foreground image area for example, moving object
  • the adjacent area are not updated into the background model, the occurrence of ghost phenomenon can be reduced, and an object whose moving speed is relatively small or stationary for a period of time can be detected; image detection More accurate and more tolerant of noise.
  • FIG. 3 is another schematic diagram of a method for extracting a background model according to an embodiment of the present invention, schematically showing a process of updating a background model of the present invention.
  • the extraction method includes:
  • Step 301 the background model is initialized
  • Step 302 obtaining a current image
  • Step 303 extracting a foreground image from the current image based on the background model
  • Step 304 Perform gradient detection on the current image to obtain texture information of the current image.
  • the current image is subjected to gradient detection and an edge image is obtained; a binarized image characterizing the texture information is generated and expanded (morphological expansion) according to the edge image.
  • Step 305 determining, for each pixel in the foreground image, whether it is a foreground pixel or a background pixel;
  • the pixel if the pixel belongs to a foreground image area and the value of the pixel in the binarized image is not Zero, then the pixel is determined to be a foreground pixel; if the pixel belongs to a background image region or the value of the pixel in the binarized image is zero, then the pixel is determined to be a background pixel.
  • Step 306 generating an updated foreground image based on all foreground pixels.
  • Step 307 the foreground image area and the adjacent area in the updated foreground image are used as the foreground extended area
  • Step 308 Update the background model according to an area other than the foreground extended area.
  • step 309 it is determined whether to continue the update of the background model and the foreground detection; if yes, step 302 is performed to retrieve the new current image for background model update and foreground detection.
  • the foreground image is updated according to the texture information, and the background model is updated based on the updated foreground image.
  • the ghost phenomenon in the image detection process can be reduced, and an object whose moving speed is relatively small or stationary for a certain period of time can be detected, and the image detection accuracy is higher and the ability to tolerate noise 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 foreground extracting unit 401 extracts a foreground image from the current image based on the background model
  • the texture obtaining unit 402 performs gradient detection on the current image to obtain texture information of the current image.
  • a foreground update unit 403 updating the foreground image according to the texture information to obtain an updated foreground image
  • the background update unit 404 updates the background model based on the updated foreground image.
  • FIG. 5 is another schematic diagram of an apparatus for extracting a background model according to an embodiment of the present invention.
  • the background model extraction apparatus 500 includes: a foreground extraction unit 401, a texture acquisition unit 402, a foreground update unit 403, and a background. Update unit 404, as described above.
  • the extraction device 500 of the background model may further include:
  • the background initializing unit 501 initializes the background model.
  • the texture obtaining unit 402 may be specifically configured to: perform a gradient on the current image. An edge image is detected and obtained; a binarized image characterizing the texture information is generated and expanded according to the edge image.
  • the foreground update unit 403 may include:
  • a pixel determining unit 502 for each pixel in the foreground image, if the pixel belongs to a foreground image region and the value of the pixel in the binarized image is not zero, determining that the pixel is a foreground pixel Determining that the pixel is a background pixel if the pixel belongs to a background image area or the value of the pixel in the binarized image is zero;
  • the foreground generating unit 503 generates the updated foreground image based on the foreground pixels.
  • the background update unit 404 may selectively update the background model according to a partial region of the updated foreground image.
  • the background update unit 404 can include:
  • the foreground expansion unit 504 the foreground image area and the adjacent area in the updated foreground image are used as a foreground extended area;
  • the model generating unit 505 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 foreground image is updated according to the texture information, and the background model is updated based on the updated foreground image.
  • the ghost phenomenon in the image detection process can be reduced, and an object whose moving speed is relatively small or stationary for a certain period of time can be detected, and the image detection accuracy is higher and the ability to tolerate noise 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,基于更新后的前景图像对所述背景模型进行更新。
在本实施例中,可以通摄像头获得多个帧的视频信息。该摄像头可以是用于进行图像监控的摄像头,不间断地对监控区域进行拍摄,但本发明不限于此。
在本实施例中,背景模型可以是不断地被更新的。在进行背景模型初始化时,可以根据视频中的一帧图像进行。例如可以根据某一时间点的帧得到初始背景模型M0,然后不断地对该背景模型进行更新得到背景模型M1,M2,……,Mi。
步骤101至步骤104说明了本发明实施例的对背景模型进行一次更新的情况,在步骤101中的背景模型可以是Mj,其中j为0或任意正整数;而在步骤104中得到的背景模型为Mj+1。图1以进行一次更新为例进行说明,在实际实现时可以进行多次背景模型的更新。
在本实施例中,可以对当前图像进行梯度检测以获得当前图像的纹理(texture)信息。其中,背景图像区域由于比较单调,因而纹理信息的值比较小;而前景图像区域由于颜色或亮度比较丰富,因而纹理信息的值比较大。
关于纹理信息的具体内容,可以参考相关技术。对于本领域技术人员来说,纹理信息是清楚的概念,因而本发明实施例对此不再赘述。
在本实施例中,步骤102中对所述当前图像进行梯度检测以获得所述当前图像的纹理信息,具体可以包括:对所述当前图像进行梯度检测来获得边缘图像;生成表征所述纹理信息的二值化图像并将所述二值化图像进行扩展。
在具体实施时,可以进行梯度检测而获得当前图像的边缘图像,根据边缘图像生成二值化图像(表征该像素的纹理信息),然后将二值化图像进行扩展(也可以称为形态学膨胀)。使用edge_map表示该扩展后的图像,例如采用edge_map[x][y]表示像素[x][y]的边缘图像信息,其中x和y表示该像素的坐标;采用foremap[x][y]表示该像素是否属于前景图像区域。
当edge_map[x][y]的值为0时,表示该像素与附近像素之间的差别不大,因而该像素可能处于背景图像区域;当edge_map[x][y]的值不为0时,表示该像素与附近像 素之间的差别较大,因而该像素可能处于前景图像区域。
因此,例如在edge_map[x][y]!=0&&foremap[x][y]==forground的情况下,将该像素[x][y]确定为真正的前景像素;否则将该像素[x][y]确定为真正的背景像素。然后基于所有的前景像素生成真正的前景图像。
在本实施例中,可以采用现有的任意一种梯度检测算法,本发明不对此进行限制。
由此,可以根据纹理信息对前景图像进行更新,以及基于更新后的前景图像对背景模型进行更新。可以减少鬼影现象的发生。并且能够检测移动速度比较小或者一段时间内静止的物体,图像检测的准确性更高且容忍噪声的能力更强。
在本实施例中,还可以根据新的前景图像的部分区域选择性地更新背景模型。
具体地,可以将更新后的前景图像中的前景图像区域以及相邻区域作为前景扩展区域;根据所述当前图像中的所述前景扩展区域以外的区域更新所述背景模型,以及不将所述前景扩展区域更新到所述背景模型中。
图2是本发明实施例的对前景物体区域进行扩展的一示意图,如图2所示,在获得前景图像200之后,可以将除了背景图像区域201的前景图像区域202进行扩展(也可称为形态学膨胀)。如图2所示,例如对于前景图像区域202的边缘上的某个像素P,将该像素P附近的例如5个像素也包含进前景扩展区域203。
由此,前景图像区域(例如运动物体)以及相邻区域不会被更新到背景模型中,可以减少鬼影现象的发生,并且能够检测移动速度比较小或者一段时间内静止的物体;图像检测的准确性更高且容忍噪声的能力更强。
图3是本发明实施例的的背景模型的提取方法的另一示意图,示意性示出了本发明的背景模型更新的过程。如图3所示,所述提取方法包括:
步骤301,背景模型初始化;
步骤302,获得当前图像;
步骤303,基于背景模型从当前图像中提取出前景图像;
步骤304,对当前图像进行梯度检测以获得当前图像的纹理信息;
其中,对所述当前图像进行梯度检测并获得边缘图像;根据所述边缘图像生成表征所述纹理信息的二值化图像并进行扩展(形态学膨胀)。
步骤305,对于前景图像中的每个像素,确定是前景像素还是背景像素;
其中,若所述像素属于前景图像区域且所述像素在所述二值化图像中的值不为 零,则确定所述像素为前景像素;若所述像素属于背景图像区域或者所述像素在所述二值化图像中的值为零,则确定所述像素为背景像素。
步骤306,基于所有的前景像素生成更新后的前景图像。
步骤307,将更新后的前景图像中的前景图像区域以及相邻区域作为前景扩展区域;
步骤308,根据所述前景扩展区域以外的区域更新所述背景模型;
其中,不将所述前景扩展区域更新到所述背景模型中。
步骤309,确定是否继续进行背景模型的更新以及前景检测;如果是则执行步骤302,重新获得新的当前图像进行背景模型更新以及前景检测。
由上述实施例可知,根据纹理信息对前景图像进行更新,以及基于更新后的前景图像对背景模型进行更新。由此,可以减小图像检测过程中的鬼影现象,并且能够检测移动速度比较小或者一段时间内静止的物体,图像检测的准确性更高且容忍噪声的能力更强。
实施例2
本发明实施例提供一种背景模型的提取装置,与实施例1相同的内容不再赘述。
图4是本发明实施例的背景模型的提取装置的一示意图,如图4所示,所述背景模型的提取装置400包括:
前景提取单元401,基于背景模型从当前图像中提取出前景图像;
纹理获取单元402,对当前图像进行梯度检测以获得所述当前图像的纹理信息;
前景更新单元403,根据所述纹理信息对所述前景图像进行更新以获得更新后的前景图像;以及
背景更新单元404,基于所述更新后的前景图像对所述背景模型进行更新。
图5是本发明实施例的背景模型的提取装置的另一示意图,如图5所示,所述背景模型的提取装置500包括:前景提取单元401、纹理获取单元402、前景更新单元403以及背景更新单元404,如上所述。
如图5所示,所述背景模型的提取装置500还可以包括:
背景初始化单元501,对背景模型进行初始化。
在本实施例中,所述纹理获取单元402具体可以用于:对所述当前图像进行梯度 检测并获得边缘图像;根据所述边缘图像生成表征所述纹理信息的二值化图像并进行扩展。
如图5所示,所述前景更新单元403可以包括:
像素确定单元502,对于所述前景图像中的每个像素,若所述像素属于前景图像区域且所述像素在所述二值化图像中的值不为零,则确定所述像素为前景像素;若所述像素属于背景图像区域或者所述像素在所述二值化图像中的值为零,则确定所述像素为背景像素;
前景生成单元503,基于所述前景像素生成所述更新后的前景图像。
在本实施例中,所述背景更新单元404可以根据所述更新后的前景图像的部分区域选择性地更新所述背景模型。
如图5所示,所述背景更新单元404可以包括:
前景扩展单元504,将所述更新后的前景图像中的前景图像区域以及相邻区域作为前景扩展区域;以及
模型生成单元505,根据所述当前图像中的所述前景扩展区域以外的区域更新所述背景模型,以及不将所述前景扩展区域更新到所述背景模型中。
由上述实施例可知,根据纹理信息对前景图像进行更新,以及基于更新后的前景图像对背景模型进行更新。由此,可以减小图像检测过程中的鬼影现象,并且能够检测移动速度比较小或者一段时间内静止的物体,图像检测的准确性更高且容忍噪声的能力更强。
实施例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. 根据权利要求1所述的提取方法,其中,基于所述更新后的前景图像对所述背景模型进行更新包括:
    根据所述更新后的前景图像的部分区域选择性地更新所述背景模型。
  5. 根据权利要求4所述的提取方法,其中,根据所述更新后的前景图像的部分区域选择性地更新所述背景模型包括:
    将所述更新后的前景图像中的前景图像区域以及相邻区域作为前景扩展区域;以及
    根据所述当前图像中的所述前景扩展区域以外的区域更新所述背景模型,以及不将所述前景扩展区域更新到所述背景模型中。
  6. 根据权利要求1所述的提取方法,其中,所述提取方法还包括:
    对所述背景模型进行初始化。
  7. 一种背景模型的提取装置,所述提取装置包括:
    前景提取单元,基于背景模型从当前图像中提取出前景图像;
    纹理获取单元,对所述当前图像进行梯度检测以获得所述当前图像的纹理信息;
    前景更新单元,根据所述纹理信息对所述前景图像进行更新以获得更新后的前景图像;以及
    背景更新单元,基于所述更新后的前景图像对所述背景模型进行更新。
  8. 根据权利要求7所述的提取装置,其中,所述纹理获取单元具体用于:对所述当前图像进行梯度检测并获得边缘图像;根据所述边缘图像生成表征所述纹理信息的二值化图像并进行扩展。
  9. 根据权利要求8所述的提取装置,其中,所述前景更新单元包括:
    像素确定单元,对于所述前景图像中的每个像素,若所述像素属于前景图像区域且所述像素在所述二值化图像中的值不为零,则确定所述像素为前景像素;若所述像素属于背景图像区域或者所述像素在所述二值化图像中的值为零,则确定所述像素为背景像素;
    前景生成单元,基于所述前景像素生成所述更新后的前景图像。
  10. 根据权利要求7所述的提取装置,其中,所述背景更新单元根据所述更新后的前景图像的部分区域选择性地更新所述背景模型。
  11. 根据权利要求10所述的提取装置,其中,所述背景更新单元包括:
    前景扩展单元,将所述更新后的前景图像中的前景图像区域以及相邻区域作为前景扩展区域;以及
    模型生成单元,根据所述当前图像中的所述前景扩展区域以外的区域更新所述背景模型,以及不将所述前景扩展区域更新到所述背景模型中。
  12. 根据权利要求7所述的提取装置,其中,所述提取装置还包括:
    背景初始化单元,对所述背景模型进行初始化。
  13. 一种图像处理设备,所述图像处理设备包括如权利要求7所述的背景模型的提取装置。
PCT/CN2015/086965 2015-08-14 2015-08-14 背景模型的提取方法、装置以及图像处理设备 WO2017028010A1 (zh)

Priority Applications (1)

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

Applications Claiming Priority (1)

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

Publications (1)

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

Family

ID=58050577

Family Applications (1)

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

Country Status (1)

Country Link
WO (1) WO2017028010A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180122144A1 (en) * 2015-05-13 2018-05-03 Aim Sport Vision Ag Digitally overlaying an image with another image
CN112528794A (zh) * 2020-12-03 2021-03-19 北京百度网讯科技有限公司 信号灯的故障识别方法、装置及路侧设备

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102509101A (zh) * 2011-11-30 2012-06-20 昆山市工业技术研究院有限责任公司 交通视频监控中的背景更新方法和车辆目标提取方法
CN103218916A (zh) * 2013-04-07 2013-07-24 布法罗机器人科技(苏州)有限公司 基于复杂高动态环境建模的闯红灯检测方法及系统
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
CN104077757A (zh) * 2014-06-09 2014-10-01 中山大学 一种融合实时交通状态信息的道路背景提取与更新方法
CN104751484A (zh) * 2015-03-20 2015-07-01 西安理工大学 一种运动目标检测方法及实现运动目标检测方法的检测系统

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102509101A (zh) * 2011-11-30 2012-06-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
CN103218916A (zh) * 2013-04-07 2013-07-24 布法罗机器人科技(苏州)有限公司 基于复杂高动态环境建模的闯红灯检测方法及系统
CN104077757A (zh) * 2014-06-09 2014-10-01 中山大学 一种融合实时交通状态信息的道路背景提取与更新方法
CN104751484A (zh) * 2015-03-20 2015-07-01 西安理工大学 一种运动目标检测方法及实现运动目标检测方法的检测系统

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180122144A1 (en) * 2015-05-13 2018-05-03 Aim Sport Vision Ag Digitally overlaying an image with another image
US10565794B2 (en) * 2015-05-13 2020-02-18 Aim Sport Vision Ag Digitally overlaying an image with another image
CN112528794A (zh) * 2020-12-03 2021-03-19 北京百度网讯科技有限公司 信号灯的故障识别方法、装置及路侧设备

Similar Documents

Publication Publication Date Title
US10803554B2 (en) Image processing method and device
US11138444B2 (en) Methods and devices for processing images of a traffic light
CN106027851B (zh) 用于处理图像的方法和系统
JP6204659B2 (ja) 映像処理装置及び映像処理方法
WO2017084094A1 (zh) 烟雾检测装置、方法以及图像处理设备
US10291931B2 (en) Determining variance of a block of an image based on a motion vector for the block
WO2012074361A1 (en) Method of image segmentation using intensity and depth information
JP6579868B2 (ja) 画像処理装置、撮像装置、画像処理方法およびプログラム
KR20150031241A (ko) 이미지의 색 조화를 위한 장치 및 방법
JP5539343B2 (ja) 映像処理方法
WO2017028047A1 (zh) 背景模型的提取方法、装置以及图像处理设备
WO2017120796A1 (zh) 路面病害的检测方法及其装置、电子设备
WO2018133101A1 (zh) 图像前景检测装置及方法、电子设备
CN111127358B (zh) 图像处理方法、装置及存储介质
CN107274673B (zh) 基于修正局部方差的车辆排队长度测量方法及测量系统
US20220207750A1 (en) Object detection with image background subtracted
WO2017028010A1 (zh) 背景模型的提取方法、装置以及图像处理设备
WO2017028029A1 (zh) 背景模型的提取方法、装置以及图像处理设备
CN109344846B (zh) 图像特征提取方法和装置
JP2019121356A (ja) 干渉領域検出装置と方法及び電子機器
JP2017085570A (ja) 画像補正方法及び画像補正装置
Tuptewar et al. Robust exemplar based image and video inpainting for object removal and region filling
CN112435278A (zh) 一种基于动态目标检测的视觉slam方法及装置
CN108520259B (zh) 一种前景目标的提取方法、装置、设备及存储介质
CN113963000A (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: 15901216

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

Country of ref document: EP

Kind code of ref document: A1