Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JP5227226B2 - Image processing apparatus and image processing program - Google Patents
[go: Go Back, main page]

JP5227226B2 - Image processing apparatus and image processing program - Google Patents

Image processing apparatus and image processing program Download PDF

Info

Publication number
JP5227226B2
JP5227226B2 JP2009061528A JP2009061528A JP5227226B2 JP 5227226 B2 JP5227226 B2 JP 5227226B2 JP 2009061528 A JP2009061528 A JP 2009061528A JP 2009061528 A JP2009061528 A JP 2009061528A JP 5227226 B2 JP5227226 B2 JP 5227226B2
Authority
JP
Japan
Prior art keywords
image
background
background image
input
key
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2009061528A
Other languages
Japanese (ja)
Other versions
JP2010219665A (en
Inventor
俊枝 三須
真人 藤井
正啓 柴田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Japan Broadcasting Corp
Original Assignee
Japan Broadcasting Corp
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 Japan Broadcasting Corp filed Critical Japan Broadcasting Corp
Priority to JP2009061528A priority Critical patent/JP5227226B2/en
Publication of JP2010219665A publication Critical patent/JP2010219665A/en
Application granted granted Critical
Publication of JP5227226B2 publication Critical patent/JP5227226B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Studio Circuits (AREA)
  • Image Processing (AREA)

Description

本発明は、入力画像の背景と前景とを区別したキー画像を生成する画像処理技術に関し、特に、入力画像と背景画像との間の差異に基づいてキー画像を生成する装置及びプログラムに関する。   The present invention relates to an image processing technique for generating a key image in which a background and a foreground of an input image are distinguished, and more particularly to an apparatus and a program for generating a key image based on a difference between an input image and a background image.

従来、動画像(入力画像)から動物体のみを検出する手法の研究開発が進められており、その手法として、例えば、クロマキー法、赤外光を用いた手法、背景差分法が知られている。クロマキー法は、ブルーバック等の特定の色を背景とするスタジオ等において被写体(動物体)を撮像し、撮像により得られた画像(入力画像)から、特定の色を判別して背景画像を生成し、背景画像以外を動物体であるとして、入力画像から動物体を検出するものである。赤外光を用いた手法は、被写体に赤外光を照射して距離画像を生成し、この距離画像を用いて入力画像から動物体を検出するものである。背景差分法は、入力画像には背景画像及び動物体の画像が含まれているとして、入力画像から背景画像を生成し、入力画像と背景画像との間の差異を求めることにより、入力画像から動物体を検出するものである。   Conventionally, research and development of a method for detecting only a moving object from a moving image (input image) has been progressed, and for example, a chroma key method, a method using infrared light, and a background subtraction method are known. . In the chroma key method, a subject (animal body) is imaged in a studio or the like with a specific background such as a blue back, and a background image is generated by discriminating a specific color from the image (input image) obtained by the imaging. Then, the moving object is detected from the input image assuming that the moving object other than the background image is an moving object. In the technique using infrared light, a distance image is generated by irradiating a subject with infrared light, and a moving object is detected from an input image using the distance image. The background subtraction method assumes that an input image includes a background image and an image of a moving object, generates a background image from the input image, and obtains a difference between the input image and the background image. It detects an animal body.

クロマキー法を用いた例として、背景色の色の範囲を指定し、その指定した背景色に属するか否かを入力画像中において画素毎に判定することにより、キー画像を生成するクロマキー装置が知られている(特許文献1、特許文献2を参照)。   As an example using the chroma key method, a chroma key device that generates a key image by specifying a background color range and determining whether or not it belongs to the specified background color for each pixel in the input image is known. (See Patent Document 1 and Patent Document 2).

また、赤外光を用いた手法の例として、被写体に赤外光を照射することにより赤外光の往復遅延時間を算出し、往復遅延時間に基づいて画素毎の距離情報を抽出し、距離情報に基づいてキー画像を生成する装置が知られている(特許文献3を参照)。   As an example of a technique using infrared light, the infrared light round trip time is calculated by irradiating the subject with infrared light, and distance information for each pixel is extracted based on the round trip delay time. An apparatus that generates a key image based on information is known (see Patent Document 3).

さらに、背景差分法を用いた例として、過去の入力画像から背景画像を生成し、背景画像と入力画像との間の差分に基づいて、画素値変化が閾値未満の領域を背景とみなすことにより、キー画像を生成する背景差分装置(ディファレンスキー装置)が知られている(特許文献4、特許文献5、特許文献6を参照)。   Furthermore, as an example using the background difference method, a background image is generated from a past input image, and based on the difference between the background image and the input image, an area whose pixel value change is less than a threshold is regarded as the background. Background difference devices (difference key devices) that generate key images are known (see Patent Literature 4, Patent Literature 5, and Patent Literature 6).

ここで、キー画像とは、入力画像の背景と前景とを区別した画像をいい、例えば、背景と前景とを2値により区別した画像、または多値により区別した画像をいう。入力画像を分析してキー画像を生成する画像処理装置においては、入力画像の背景と前景とを正しく判別することが可能な精度の高いキー画像を生成することが重要視されている。   Here, the key image refers to an image in which the background and the foreground of the input image are distinguished from each other, for example, an image in which the background and the foreground are distinguished by binary values, or an image in which multiple values are distinguished. In an image processing apparatus that generates a key image by analyzing an input image, it is important to generate a highly accurate key image that can correctly determine the background and foreground of the input image.

特許第4004863号公報Japanese Patent No. 4004863 特開2007−142726号公報JP 2007-142726 A 特許第4031306号公報Japanese Patent No. 4031306 特許第3228638号公報Japanese Patent No. 3228638 特許第3123587号公報Japanese Patent No. 3123587 特許第2828380号公報Japanese Patent No. 28828380

前述した特許文献1,2のクロマキー装置では、クロマキーバックまたはクロマキースクリーン等と呼ばれる緑色または青色等の一様な色を有する布、板、壁等を背景として使用するか、または、芝生等の一様な自然物または人工物を背景として使用する必要があった。このため、予め設定された色を有する背景を用いる必要があり、画像処理を行うには制約を受けるという問題があった。   In the chroma key devices of Patent Documents 1 and 2 described above, a cloth, board, wall or the like having a uniform color such as green or blue called a chroma key back or chroma key screen is used as a background, or a lawn or the like. It was necessary to use various natural or artificial objects as the background. For this reason, it is necessary to use a background having a preset color, and there is a problem that image processing is restricted.

また、前述した特許文献3の、赤外光による往復遅延時間を用いた装置では、投射した赤外光が被写体に届く場合、すなわち、赤外光を照射可能な被写体を前景として扱う場合に、本手法を適用することができる。しかしながら、遠方に被写体が存在するため、投射した赤外光が被写体に届かない場合、すなわち、遠方の被写体を前景として扱いたい場合には、本手法の適用が難しいという問題があった。   Further, in the device using the round trip delay time by infrared light described in Patent Document 3 described above, when the projected infrared light reaches the subject, that is, when a subject that can be irradiated with infrared light is treated as a foreground, This method can be applied. However, since the subject exists in the distance, there is a problem that it is difficult to apply this method when the projected infrared light does not reach the subject, that is, when it is desired to treat the far subject as the foreground.

さらに、前述した特許文献4,5の背景差分装置では、入力画像の空間的に局所的な特徴に基づいて背景画像の更新を制御し、キー画像を生成する。しかしながら、生成されるキー画像には、意図しないパターンが現れる恐れがあり、入力画像の背景と前景とを正しく判別することが可能な精度の高いキー画像が生成されないという問題があった。これは、例えば、照明変動等の環境光変動が起こり、入力画像の画素値が変化した場合であっても、一旦キー画像が生成されてしまい、その後に、変化した画素値に対応して背景画像が更新されるからである。つまり、変化した画素値によって意図しないパターンがキー画像に現れ、その後に、その意図しないパターンをキー画像から排除するための背景画像が生成されるからである。   Furthermore, in the background difference device described in Patent Documents 4 and 5 described above, the update of the background image is controlled based on the spatially local feature of the input image to generate a key image. However, there is a possibility that an unintended pattern may appear in the generated key image, and there is a problem that a highly accurate key image that can correctly determine the background and the foreground of the input image is not generated. This is because, for example, even when ambient light fluctuations such as illumination fluctuations occur and the pixel value of the input image changes, a key image is once generated, and then a background corresponding to the changed pixel value. This is because the image is updated. That is, an unintended pattern appears in the key image due to the changed pixel value, and then a background image for excluding the unintended pattern from the key image is generated.

また、前述した特許文献6の背景差分装置では、キー画像に含まれる意図しないノイズを除去するためのフィルタを用いている。しかしながら、このフィルタは、生成されたキー画像に対して処理を行い、キー画像のノイズを軽減するものである。したがって、このフィルタは、背景差分法を実行した後に使用されるものであり、その過程において使用されるものではない。すなわち、背景差分法のために用いるフィルタではない。   Further, the background difference device of Patent Document 6 described above uses a filter for removing unintended noise included in the key image. However, this filter performs processing on the generated key image to reduce noise in the key image. Therefore, this filter is used after executing the background subtraction method, and is not used in the process. That is, it is not a filter used for the background subtraction method.

そこで、本発明は前記課題を解決するためになされたものであり、その目的は、背景差分法を用いてキー画像を生成する際に、照明変動等の環境光変動が起こった場合であっても、その変動がキー画像に現れることのない画像処理装置及び画像処理プログラムを提供することにある。   Therefore, the present invention has been made to solve the above-described problems, and the object thereof is a case where an ambient light fluctuation such as an illumination fluctuation occurs when generating a key image using the background subtraction method. Another object of the present invention is to provide an image processing apparatus and an image processing program in which the variation does not appear in the key image.

本発明では前記課題を解決するために、以下の構成に係るものとした。   In order to solve the above-described problems, the present invention has the following configuration.

請求項1に記載の画像処理装置は、入力画像の背景と前景とを区別したキー画像を、前記入力画像から背景画像を差し引く背景差分処理により生成する画像処理装置において、過去の複数時点の前記入力画像から背景画像を生成する背景画像生成手段と、前記背景画像生成手段により生成された背景画像を記憶する背景画像記憶手段と、前記入力画像と前記背景画像記憶手段により記憶された背景画像とを第1の閾値に基づいて比較し、その比較結果に基づいて、前記背景画像生成手段により背景画像が生成されるタイミングを制御する背景更新制御手段と、前記入力画像と前記背景画像記憶手段により記憶された背景画像とを第2の閾値に基づいて比較し、前記キー画像を生成するキー画像生成手段と、を備える構成とした。   The image processing device according to claim 1, wherein a key image that distinguishes a background and a foreground of an input image is generated by background difference processing that subtracts a background image from the input image, and the image processing device at a plurality of past points in time is generated. A background image generating means for generating a background image from the input image, a background image storing means for storing the background image generated by the background image generating means, a background image stored by the input image and the background image storing means, Based on the first threshold, and based on the comparison result, background update control means for controlling the timing at which the background image is generated by the background image generation means, the input image and the background image storage means The stored background image is compared based on the second threshold value, and the key image generating means for generating the key image is provided.

かかる構成によれば、画像処理装置は、背景画像生成手段において、過去の入力画像から動物体を含む前景の映っていない背景のみの画像を合成し、背景画像記憶手段に記憶する。また、画像処理装置は、キー画像生成手段において、背景画像記憶手段に記憶された背景画像と入力画像とを比較して、キー画像を生成する。さらに、画像処理装置は、背景更新制御手段において、背景画像記憶手段に記憶された背景画像と入力画像とを比較して、背景画像生成手段が背景画像を生成するタイミングを制御する。   According to such a configuration, the image processing apparatus synthesizes an image of only the background that does not include the foreground including the moving object from the past input image in the background image generation unit, and stores it in the background image storage unit. Further, the image processing apparatus generates a key image by comparing the background image stored in the background image storage unit with the input image in the key image generation unit. Further, the image processing apparatus compares the background image stored in the background image storage unit with the input image in the background update control unit, and controls the timing at which the background image generation unit generates the background image.

請求項2に記載の画像処理装置は、請求項1に記載の画像処理装置において、前記背景画像生成手段が、過去の複数時点の前記入力画像を記憶する過去画像記憶手段と、前記過去画像記憶手段により記憶された入力画像の各画素位置に関して時間方向のフィルタ処理を行い、背景画像を生成する時間フィルタ手段と、前記背景更新制御手段による比較結果に基づいて、前記時間フィルタ手段によりフィルタ処理が行われて背景画像が生成されるタイミングを制御する制御手段と、を備える構成とした。   The image processing apparatus according to claim 2 is the image processing apparatus according to claim 1, wherein the background image generation unit stores the input image at a plurality of past time points, and the past image storage. Filter processing in the time direction for each pixel position of the input image stored by the means, and based on the comparison result by the time filter means for generating a background image and the background update control means, the time filter means performs the filtering process. And a control means for controlling the timing at which the background image is generated.

かかる構成によれば、画像処理装置は、時間フィルタ手段において、制御手段によるタイミング制御に従って、過去画像記憶手段に記憶された過去の入力画像の各画素について時間方向のフィルタ処理を行って該画素の代表値を求めることにより背景画像を生成する。   According to this configuration, the image processing apparatus performs the time-direction filtering process on each pixel of the past input image stored in the past image storage unit according to the timing control by the control unit in the time filter unit. A background image is generated by obtaining a representative value.

請求項3に記載の画像処理装置は、請求項2に記載の画像処理装置において、前記背景画像生成手段の制御手段が、前記背景更新制御手段による比較結果に基づいて、前記過去画像記憶手段により入力画像が記憶されるタイミング、及び、前記時間フィルタ手段によりフィルタ処理が行われて背景画像が生成されるタイミングを制御するように構成した。   The image processing apparatus according to claim 3 is the image processing apparatus according to claim 2, wherein the control unit of the background image generation unit uses the past image storage unit based on the comparison result by the background update control unit. The timing at which the input image is stored and the timing at which the background image is generated by performing the filtering process by the time filter means are controlled.

かかる構成によれば、画像処理装置は、過去画像記憶手段において、制御手段によるタイミング制御に従って、過去の複数時点の入力画像を順次記憶する。また、画像処理装置は、時間フィルタ手段において、制御手段によるタイミング制御に従って、過去画像記憶手段に記憶された過去の入力画像の各画素について時間方向のフィルタ処理を行って該画素の代表値を求めることにより背景画像を生成する。   According to this configuration, the image processing apparatus sequentially stores input images at a plurality of past points in the past image storage unit according to the timing control by the control unit. The image processing apparatus obtains a representative value of the pixel by performing time-direction filtering on each pixel of the past input image stored in the past image storage unit in the time filter unit according to the timing control by the control unit. As a result, a background image is generated.

請求項4に記載の画像処理装置は、請求項1から請求項3までのいずれか一項に記載の画像処理装置において、前記第1の閾値及び前記第2の閾値を設定するための閾値設定手段を備える構成とした。   The image processing device according to claim 4 is the image processing device according to any one of claims 1 to 3, wherein a threshold value is set for setting the first threshold value and the second threshold value. It was set as the structure provided with a means.

かかる構成によれば、画像処理装置は、閾値設定手段において、背景更新制御手段にて使用される第1の閾値と、キー画像生成手段にて使用される第2の閾値とを、使用者の操作に従って設定及び変更する。   According to such a configuration, the image processing apparatus uses the threshold value setting unit to set the first threshold value used by the background update control unit and the second threshold value used by the key image generation unit. Set and change according to operation.

本発明を画像処理装置として説明したが、本発明はこれらに実質的に相当するプログラムとしても実現し得るものであり、本発明には、画像処理プログラムも包含される。すなわち、請求項5に記載の画像処理プログラムは、入力画像の背景と前景とを区別したキー画像を、前記入力画像から背景画像を差し引く背景差分処理により生成する画像処理プログラムであって、コンピュータに、過去の複数時点の前記入力画像から背景画像を生成するステップと、前記生成した背景画像を記憶するステップと、前記入力画像と前記記憶した背景画像とを第1の閾値に基づいて比較し、その比較結果に基づいて、前記背景画像を生成するタイミングを制御するステップと、前記入力画像と前記記憶した背景画像とを第2の閾値に基づいて比較し、前記キー画像を生成するステップと、を実行させる構成とした。   Although the present invention has been described as an image processing apparatus, the present invention can be realized as a program substantially corresponding to these, and the present invention includes an image processing program. That is, the image processing program according to claim 5 is an image processing program for generating a key image that distinguishes a background and a foreground of an input image by a background difference process that subtracts the background image from the input image. A step of generating a background image from the input images at a plurality of past points, a step of storing the generated background image, and comparing the input image and the stored background image based on a first threshold, Controlling the timing for generating the background image based on the comparison result, comparing the input image with the stored background image based on a second threshold, and generating the key image; Is configured to be executed.

以上のように、本発明によれば、照明変動等の環境光変動が起こって背景が変わった場合であっても、その変動がキー画像に反映される前に、背景画像を更新して、その変動が反映された背景画像を生成するようにした。したがって、キー画像は、その変動が反映された背景画像に基づいて生成されるから、その変動がキー画像に現れることがない。したがって、入力画像の背景と前景とを精度高く判別することが可能なキー画像を生成することが可能となる。   As described above, according to the present invention, even when ambient light fluctuation such as illumination fluctuation occurs and the background changes, the background image is updated before the fluctuation is reflected in the key image, A background image reflecting the change was generated. Therefore, since the key image is generated based on the background image in which the variation is reflected, the variation does not appear in the key image. Therefore, it is possible to generate a key image that can accurately determine the background and foreground of the input image.

本発明の実施形態による背景差分装置の構成を示すブロック図である。It is a block diagram which shows the structure of the background difference apparatus by embodiment of this invention. 背景画像生成手段の構成を示すブロック図である。It is a block diagram which shows the structure of a background image generation means. 背景差分装置における動作の概略を説明するフロー図である。It is a flowchart explaining the outline of operation | movement in a background difference apparatus.

以下、本発明の実施形態について図面を参照して詳細に説明する。
〔背景差分装置の構成〕
まず、背景差分装置の構成について説明する。図1は、本発明の実施形態による背景差分装置の構成を示すブロック図である。この背景差分装置(画像処理装置)1は、背景画像生成手段10、背景画像記憶手段20、背景更新制御手段30、キー画像生成手段40及び閾値設定手段50を備えている。
Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings.
[Configuration of background difference device]
First, the configuration of the background difference device will be described. FIG. 1 is a block diagram showing a configuration of a background difference device according to an embodiment of the present invention. The background difference device (image processing device) 1 includes a background image generation unit 10, a background image storage unit 20, a background update control unit 30, a key image generation unit 40, and a threshold setting unit 50.

閾値設定手段50は、マンマシンインタフェースであり、第1の閾値θ及び第2の閾値θを設定する。閾値設定手段50により設定された第1の閾値θは背景更新制御手段30に出力され、第2の閾値θはキー画像生成手段40に出力される。例えば、回転式のつまみまたは並進式のスライダを操作する使用者(オペレータ)が第1の閾値θ及び第2の閾値θを増減することにより、閾値設定手段50は、第1の閾値θ及び第2の閾値θを設定する。尚、使用者のキー操作による閾値の増減または数値指定によって、設定するようにしてもよい。ここで、第1の閾値θを使用する背景更新制御手段30が、第2の閾値θを使用するキー画像生成手段40よりも、入力画像の変動に対して敏感に動作するように、θ<θに設定される。 The threshold setting means 50 is a man-machine interface, and sets a first threshold θ 1 and a second threshold θ 2 . The first threshold value θ 1 set by the threshold value setting means 50 is output to the background update control means 30, and the second threshold value θ 2 is output to the key image generation means 40. For example, when the user (operator) who operates the rotary knob or the translational slider increases or decreases the first threshold value θ 1 and the second threshold value θ 2 , the threshold value setting means 50 is configured to change the first threshold value θ 1. First and second threshold values θ 2 are set. The threshold value may be set by increasing / decreasing a threshold value or specifying a numerical value by a user's key operation. Here, the background update control means 30 using the first threshold value θ 1 operates more sensitively to variations in the input image than the key image generation means 40 using the second threshold value θ 2 . θ 12 is set.

背景更新制御手段30は、入力画像を入力すると共に、背景画像記憶手段20から背景画像を読み出して入力し、閾値設定手段50から第1の閾値θを入力する。そして、背景更新制御手段30は、現在の入力画像の画素値I(t,x,y)、背景画像の画素値B(x,y)及び閾値θに基づいて、判定結果fを生成する。背景更新制御手段30により生成された判定結果fは、背景画像生成手段10に出力される。ここで、時刻t、画素位置(x,y)(xは水平座標、yは垂直座標)における入力画像の画素値をI(t,x,y)とし、背景画像の画素値をB(x,y)とする。 The background update control means 30 inputs the input image, reads out and inputs the background image from the background image storage means 20, and inputs the first threshold θ 1 from the threshold setting means 50. Then, the background update control unit 30 generates the determination result f based on the pixel value I (t, x, y) of the current input image, the pixel value B (x, y) of the background image, and the threshold value θ 1. . The determination result f generated by the background update control unit 30 is output to the background image generation unit 10. Here, the pixel value of the input image at time t and the pixel position (x, y) (x is the horizontal coordinate, y is the vertical coordinate) is I (t, x, y), and the pixel value of the background image is B (x , Y).

具体的には、背景更新制御手段30は、第1の閾値θを画像全体に対する閾値として扱い、入力画像の画素値I(t,x,y)と背景画像の画素値B(x,y)との間で差分値の絶対値を画素毎に算出し、全ての画素における絶対値の和が第1の閾値θを超えたか否かを判定し、判定結果fを求める。以下の式により、絶対値の和が第1の閾値θを超えたと判定した場合はf=1に設定し、超えていないと判定した場合はf=0に設定する。

Figure 0005227226
Specifically, the background update control means 30 treats the first threshold value θ 1 as a threshold value for the entire image, and the pixel value I (t, x, y) of the input image and the pixel value B (x, y) of the background image. ) Is calculated for each pixel, and it is determined whether or not the sum of the absolute values of all the pixels exceeds the first threshold θ1, and the determination result f is obtained. According to the following formula, when it is determined that the sum of absolute values exceeds the first threshold value θ 1 , f = 1 is set, and when it is determined that the sum does not exceed the first threshold θ 1 , f = 0 is set.
Figure 0005227226

尚、背景更新制御手段30は、第1の閾値θを1つの画素に対する閾値として扱い、入力画像の画素値I(t,x,y)と背景画像の画素値B(x,y)との間で差分値の絶対値を画素毎に算出し、画素毎の絶対値が第1の閾値θを越えたか否かを判定し、第1の閾値θを越えた画素の数を算出する。そして、その数が一定の割合φを超えたか否かを判定し、判定結果fを求めるようにしてもよい。以下の式により、その数が一定の割合φを越えたと判定した場合はf=1に設定し、越えていないと判定した場合はf=0に設定する。

Figure 0005227226
The background update control means 30 treats the first threshold θ 1 as a threshold for one pixel, and the pixel value I (t, x, y) of the input image and the pixel value B (x, y) of the background image the absolute value of the difference value calculated for each pixel between, it is determined whether the absolute value of each pixel exceeds a first threshold value theta 1, calculates the number of pixels that exceeds the first threshold value theta 1 To do. Then, it may be determined whether or not the number exceeds a certain ratio φ, and the determination result f may be obtained. According to the following equation, when it is determined that the number exceeds a certain ratio φ, f = 1 is set, and when it is determined that the number does not exceed, the setting is set to f = 0.
Figure 0005227226

また、背景更新制御手段30は、第1の閾値θを画像全体に対する閾値として扱い、入力画像の画素値I(t,x,y)と背景画像の画素値B(x,y)との間で差分値の絶対値を画素毎に算出し、全ての画素における絶対値の和を第1の閾値θで除算し、その除算結果を判定結果fとして求めるようにしてもよい。以下の式により判定結果fが求められる。

Figure 0005227226
The background update control means 30 treats the first threshold value θ 1 as a threshold value for the entire image, and calculates the pixel value I (t, x, y) of the input image and the pixel value B (x, y) of the background image. Alternatively, the absolute value of the difference value may be calculated for each pixel, and the sum of the absolute values of all the pixels may be divided by the first threshold θ 1 and the division result may be obtained as the determination result f. The determination result f is obtained by the following equation.
Figure 0005227226

このように、背景更新制御手段30により生成される判定結果fは、入力画像と背景画像との間の差異の程度を表した数値であり、その差異が大きいほど大きな値が設定される。また、判定結果fは、第2の閾値θよりも小さい値の第1の閾値θに基づいて生成されるから、背景に変動があった場合には、その背景の変動は、キー画像生成手段40において第2の閾値θに基づいて生成されるキー画像よりも、判定結果fの方に時間的に速く反映される。 As described above, the determination result f generated by the background update control unit 30 is a numerical value indicating the degree of difference between the input image and the background image, and a larger value is set as the difference is larger. Further, since the determination result f is generated based on the first threshold value θ 1 having a value smaller than the second threshold value θ 2 , if there is a change in the background, the change in the background is the key image. The determination result f is reflected faster in time than the key image generated based on the second threshold value θ 2 in the generation means 40.

背景画像生成手段10は、入力画像を入力すると共に、背景更新制御手段30から判定結果fを入力し、判定結果fに基づいて、入力画像を所定の時間間隔Sでメモリに記憶する。また、判定結果fに基づいて、メモリから所定量の入力画像(過去画像)を読み出し、過去の入力画像群に対して時間的なフィルタ処理を行い、背景画像を生成する。背景画像生成手段10により生成された背景画像は、背景画像記憶手段20に出力され記憶される。   The background image generation means 10 inputs an input image, receives a determination result f from the background update control means 30, and stores the input image in a memory at a predetermined time interval S based on the determination result f. Further, based on the determination result f, a predetermined amount of input images (past images) are read from the memory, and temporal filter processing is performed on the past input image groups to generate a background image. The background image generated by the background image generation unit 10 is output to and stored in the background image storage unit 20.

入力画像の画素値I(t,x,y)は、モノクロームのカメラ(赤外カメラ等を含む)においては輝度情報を表わすスカラー量であり、カラーまたは多波長のカメラにおいては色(または波長、分光特性)毎の輝度情報を表わすベクトル量である。   The pixel value I (t, x, y) of the input image is a scalar quantity representing luminance information in a monochrome camera (including an infrared camera), and a color (or wavelength, in a color or multi-wavelength camera). This is a vector quantity representing luminance information for each (spectral characteristic).

一方、背景画像の画素値B(x,y)は、入力画像の画素値I(t,x,y)と同様の次元のスカラー量またはベクトル量を表すものであってもよいし、カラー画像をモノクローム化したスカラー量であってもよい。また、画素毎の分散値を記憶するための、より高次元のベクトル量またはテンソル量であってもよい。以下、背景画像の画素値B(x,y)は、入力画像の画素値I(t,x,y)と同様の次元を有するスカラー量またはベクトル量であるとして説明する。   On the other hand, the pixel value B (x, y) of the background image may represent a scalar quantity or vector quantity of the same dimension as the pixel value I (t, x, y) of the input image, or a color image May be a scalar quantity obtained by converting the color to monochrome. Further, it may be a higher-dimensional vector amount or tensor amount for storing the dispersion value for each pixel. Hereinafter, the pixel value B (x, y) of the background image will be described as a scalar quantity or a vector quantity having the same dimension as the pixel value I (t, x, y) of the input image.

図2は、図1に示した背景画像生成手段10の構成を示すブロック図である。この背景画像生成手段10は、過去画像記憶手段11、時間フィルタ手段12及び制御手段13を備えている。   FIG. 2 is a block diagram showing a configuration of the background image generating means 10 shown in FIG. The background image generation unit 10 includes a past image storage unit 11, a time filter unit 12, and a control unit 13.

制御手段13は、背景更新制御手段30から判定結果fを入力し、判定結果fに基づいて時間間隔Sを設定し、その時間間隔S毎に記憶タイミング信号を生成する。制御手段13により生成された記憶タイミング信号は、過去画像記憶手段11に出力される。これにより、過去画像記憶手段11は、入力画像を時間間隔Sで、画像メモリに記憶することになる。詳細については後述する。時間間隔Sは、前回入力画像を過去画像記憶手段11に記憶させたタイミングと、今回入力画像を過去画像記憶手段11に記憶させるタイミングとの間の時刻差である。   The control unit 13 receives the determination result f from the background update control unit 30, sets a time interval S based on the determination result f, and generates a storage timing signal for each time interval S. The storage timing signal generated by the control unit 13 is output to the past image storage unit 11. Thus, the past image storage unit 11 stores the input image in the image memory at the time interval S. Details will be described later. The time interval S is a time difference between the timing when the previous input image is stored in the past image storage unit 11 and the timing when the current input image is stored in the past image storage unit 11.

具体的には、制御手段13は、判定結果fの値が小さい場合は時間間隔Sが長くなり、判定結果fの値が大きい場合は時間間隔Sが短くなるように、時間間隔Sを設定する。また、背景更新制御手段30は、以下の式により、値域が0を超える減少関数g(f)を用いて、時間間隔Sを設定するようにしてもよい。

Figure 0005227226
例えば、減少関数g(f)として、以下のステップ関数を用いるようにしてもよい。
Figure 0005227226
ここで、S>S>0とする。また、以下の折れ線関数を用いるようにしてもよい。
Figure 0005227226
Specifically, the control means 13 sets the time interval S so that the time interval S becomes longer when the value of the determination result f is small, and the time interval S becomes shorter when the value of the determination result f is large. . Further, the background update control means 30 may set the time interval S using a decreasing function g (f) whose value range exceeds 0 by the following equation.
Figure 0005227226
For example, the following step function may be used as the decrease function g (f).
Figure 0005227226
Here, S 0 > S 1 > 0. Further, the following line function may be used.
Figure 0005227226

また、制御手段13は、前述した時間間隔Sの設定及び記憶タイミング信号の生成に加え、判定結果fに基づいて、動作信号または非動作信号を生成する。制御手段13により生成された動作信号または非動作信号は、時間フィルタ手段12に出力される。これにより、時間フィルタ手段12は、動作信号を入力すると、過去画像記憶手段11から所定量の入力画像群を読み出し、時間方向のフィルタ処理を行い、背景画像を生成する。詳細については後述する。   The control means 13 generates an operation signal or a non-operation signal based on the determination result f in addition to the setting of the time interval S and the generation of the storage timing signal described above. The operation signal or non-operation signal generated by the control unit 13 is output to the time filter unit 12. As a result, when the operation signal is input, the time filter unit 12 reads a predetermined amount of input image group from the past image storage unit 11, performs a filtering process in the time direction, and generates a background image. Details will be described later.

具体的には、制御手段13は、判定結果fの値と予め設定された一定値とを比較し、判定結果fの値が一定値を超えたとき(例えば、f>0.5のとき)に、時間フィルタ手段12を動作させるための動作信号を生成し、時間フィルタ手段12に出力する。また、制御手段13は、判定結果fの値が一定値を超えないとき(例えば、f≦0.5のとき)に、時間フィルタ手段12を動作させないための非動作信号を生成し、時間フィルタ手段12に出力する。   Specifically, the control unit 13 compares the value of the determination result f with a predetermined constant value, and when the value of the determination result f exceeds the predetermined value (for example, when f> 0.5). In addition, an operation signal for operating the time filter unit 12 is generated and output to the time filter unit 12. Further, the control means 13 generates a non-operation signal for not operating the time filter means 12 when the value of the determination result f does not exceed a certain value (for example, when f ≦ 0.5). Output to means 12.

過去画像記憶手段11は、画像メモリを有しており、入力画像を入力すると共に、制御手段13から時間間隔S毎の記憶タイミング信号を入力し、記憶タイミング信号を入力したタイミングで、入力画像を画像メモリに記憶する。過去画像記憶手段11の画像メモリには、過去の入力画像の画素値I(t’,x,y)(但し、t’<現在の時刻t)がN時点分(Nは2以上の整数)記憶される。以下、過去画像記憶手段11に記憶される過去の入力画像の時刻を、t,t,・・・,t(但し、t>t>t>・・・>t)とする。過去画像記憶手段11は、すでにN時点分の入力画像を記憶している場合、記憶タイミング信号を入力したタイミングで新たな入力画像を画像メモリに記憶するには、記憶しているN時点分の入力画像(N枚の過去の入力画像)のうち、最も過去の入力画像に上書きする。この場合、新たな入力画像は、入力画像の画素値I(t,x,y)として記憶される。これにより、過去画像記憶手段11は、常に、N時点分における過去の入力画像の画素値(t’,x,y)を画像メモリに記憶することができる。尚、過去画像記憶手段11は、現在の入力画像の画素値も記憶するようにしてもよい。 The past image storage unit 11 has an image memory, inputs an input image, inputs a storage timing signal for each time interval S from the control unit 13, and inputs the input image at a timing when the storage timing signal is input. Store in image memory. In the image memory of the past image storage means 11, pixel values I (t ′, x, y) (where t ′ <current time t) of past input images are for N time points (N is an integer of 2 or more). Remembered. Hereinafter, the time of the past input image stored in the past image storage unit 11, t 1, t 2, ···, t N ( where, t> t 1> t 2 >···> t N) and To do. In the case where the past image storage means 11 has already stored the input images for N times, in order to store a new input image in the image memory at the timing when the storage timing signal is input, the past image storage means 11 stores Of the input images (N past input images), the oldest input image is overwritten. In this case, the new input image is stored as the pixel value I (t 1 , x, y) of the input image. Thereby, the past image storage unit 11 can always store the pixel values (t ′, x, y) of the past input image for the N time points in the image memory. The past image storage unit 11 may also store the pixel value of the current input image.

時間フィルタ手段12は、制御手段13から動作信号または非動作信号を入力し、動作信号を入力したタイミングで、過去画像記憶手段11から最大N枚の過去の入力画像群を過去画像として読み出す。そして、時間フィルタ手段12は、これらの入力画像群である過去画像に基づいて、時間方向のフィルタ処理を行って背景画像を生成する。時間フィルタ手段12により生成された背景画像は、背景画像記憶手段20の画像メモリに記憶される。   The time filter unit 12 receives an operation signal or a non-operation signal from the control unit 13, and reads a maximum of N past input image groups from the past image storage unit 11 as past images at the timing when the operation signal is input. Then, the time filter unit 12 performs a filtering process in the time direction based on the past images as the input image group to generate a background image. The background image generated by the time filter unit 12 is stored in the image memory of the background image storage unit 20.

時間フィルタ手段12は、制御手段13から非動作信号を入力しているときには、入力画像の読み出し処理、フィルタ処理等を行わず、動作信号を入力したタイミングで、過去画像記憶手段11から入力画像群を読み出してフィルタ処理を行い、背景画像を生成して背景画像記憶手段20に書き込む。   When the non-operation signal is input from the control unit 13, the time filter unit 12 does not perform input image read processing, filter processing, or the like, and at the timing when the operation signal is input, the input image group from the past image storage unit 11. Is filtered and a background image is generated and written into the background image storage means 20.

尚、時間フィルタ手段12は、過去画像記憶手段11から読み出した最大N枚の過去の入力画像群の全てを用いて処理を行うようにしてもよいし、一部を用いて処理を行うようにしてもよい。過去画像記憶手段11から読み出した過去の入力画像群の時刻のうち、時間フィルタ手段12がフィルタ処理を行う入力画像の時刻の集合をTとすると、典型的には、以下の式で表される。

Figure 0005227226
The time filter unit 12 may perform processing using all of the maximum N past input image groups read from the past image storage unit 11 or may perform processing using a part thereof. May be. Of the time of the past input image group read from the past image storage unit 11, when the set of times of the input image on which the time filter unit 12 performs the filtering process is represented by T, typically, it is expressed by the following expression. .
Figure 0005227226

時間フィルタ手段12は、フィルタ処理において、例えば、過去画像記憶手段11から読み出した過去の入力画像群に対し、画素位置毎に時間方向の順序統計を行い、生成する背景画像B(x,y)における画素位置の画素値を決定する。具体的には、時間フィルタ手段12は、順序統計フィルタとして機能し、順序統計として以下の式によって中央値(メディアン)演算を行い、背景画像の画素値B(x,y)を生成する。medは中央値演算を表す。

Figure 0005227226
尚、入力画像がカラー画像の場合、時間フィルタ手段12は、色成分毎に中央値演算処理を行ってもよいし、入力画像をモノクローム画像に変換してから中央値演算処理を行い、モノクロームにおける背景画像の画素値B(x,y)を生成するようにしてもよい。 In the filtering process, the time filter unit 12 performs order statistics in the time direction for each pixel position on the past input image group read from the past image storage unit 11, for example, and generates a background image B (x, y) The pixel value at the pixel position in is determined. Specifically, the time filter unit 12 functions as an order statistical filter, and performs a median operation by the following formula as order statistics to generate a pixel value B (x, y) of the background image. med represents the median calculation.
Figure 0005227226
When the input image is a color image, the time filter unit 12 may perform median calculation processing for each color component, or convert the input image to a monochrome image and then perform median calculation processing. The pixel value B (x, y) of the background image may be generated.

このように、背景画像生成手段10の制御手段13によれば、判定結果fに基づいて、入力画像を記憶する時間間隔Sを設定するようにした。これにより、入力画像において背景の変動が速い場合には、入力画像と背景画像との間の差異の程度を表す判定結果fは大きな値になり、時間間隔Sが短くなるから、過去画像記憶手段11には細かく刻んだ時刻毎の入力画像が記憶される。これに対し、背景の変動がほとんどない場合には、判定結果fは小さな値になり、時間間隔Sが長くなるから、過去画像記憶手段11にはさほど細かく刻まれない時刻毎の入力画像が記憶される。したがって、背景の変動速度が反映された時間長の入力画像群によって、時間フィルタ手段12によりフィルタ処理が行われるから、背景の変動速度が反映された背景画像が生成され、それによってキー画像が生成される。つまり、その変動がキー画像に現れることがなく、入力画像の背景と前景とを精度高く判別することが可能なキー画像を生成することが可能となる。   Thus, according to the control means 13 of the background image generation means 10, the time interval S for storing the input image is set based on the determination result f. As a result, when the background changes rapidly in the input image, the determination result f indicating the degree of difference between the input image and the background image is a large value, and the time interval S is shortened. 11 stores an input image for each finely chopped time. On the other hand, when there is almost no background fluctuation, the determination result f becomes a small value and the time interval S becomes long. Therefore, the past image storage means 11 stores an input image for each time that is not so finely engraved. Is done. Accordingly, the filtering process is performed by the time filter means 12 based on the input image group of the time length reflecting the background fluctuation speed, so that a background image reflecting the background fluctuation speed is generated, thereby generating a key image. Is done. That is, the change does not appear in the key image, and it is possible to generate a key image that can accurately determine the background and the foreground of the input image.

尚、背景画像生成手段10の制御手段13は、予め設定された固定の時間間隔S(例えば、100フレーム間隔の時間長)によって記憶タイミング信号を生成し、過去画像記憶手段11は、その固定の時間間隔Sで入力画像を記憶するようにしてもよい。   The control means 13 of the background image generation means 10 generates a storage timing signal at a preset fixed time interval S (for example, a time length of 100 frame intervals), and the past image storage means 11 The input image may be stored at the time interval S.

また、背景画像生成手段10の制御手段13によれば、判定結果fに基づいて、時間フィルタ手段12を動作させるための動作信号、または動作させないための非動作信号を生成し、時間フィルタ手段12に出力するようにした。これにより、入力画像において背景の変動が速い場合には、入力画像と背景画像との間の差異の程度を表す判定結果fは大きな値になり、一定値を超えると動作信号が生成されるから、時間フィルタ手段12が動作して、背景の変動が反映された背景画像が生成される。したがって、背景の変動が反映された背景画像によってキー画像が生成される。つまり、その変動がキー画像に現れることがなく、入力画像の背景と前景とを精度高く判別することが可能なキー画像を生成することが可能となる。これに対し、背景に変動がほとんどない場合には、判定結果fは小さな値になり、非動作信号が生成されるから、時間フィルタ手段12は動作せず、すでに記憶されている背景画像によってキー画像が生成される。この場合、背景の変動がほとんどないから、生成されるキー画像の精度が低下することはない。また、キー画像の精度に影響を及ぼすことがないときには、時間フィルタ手段12を動作させないようにしたから、無駄な動作がなくなり、効率的な処理を実現することができる。   Further, the control means 13 of the background image generation means 10 generates an operation signal for operating the time filter means 12 or a non-operation signal for not operating based on the determination result f, and the time filter means 12. Output to. As a result, when the background changes rapidly in the input image, the determination result f indicating the degree of difference between the input image and the background image becomes a large value, and an operation signal is generated when the value exceeds a certain value. Then, the time filter unit 12 operates to generate a background image reflecting the background fluctuation. Therefore, a key image is generated from the background image reflecting the background variation. That is, the change does not appear in the key image, and it is possible to generate a key image that can accurately determine the background and the foreground of the input image. On the other hand, when there is almost no change in the background, the determination result f becomes a small value and a non-operation signal is generated. Therefore, the time filter means 12 does not operate, and the key is determined by the already stored background image. An image is generated. In this case, since the background hardly changes, the accuracy of the generated key image does not decrease. Further, when the accuracy of the key image is not affected, the time filter unit 12 is not operated, so that unnecessary operation is eliminated and efficient processing can be realized.

尚、背景画像生成手段10は制御手段13を備えるようにしたが、背景更新制御手段30が制御手段13を備えるようにしてもよい。この場合、背景画像生成手段10は、過去画像記憶手段11及び時間フィルタ手段12を備え、背景更新制御手段30の制御手段13は、記憶タイミング信号を背景画像生成手段10の過去画像記憶手段11に出力し、動作信号または非動作信号を背景画像生成手段10の時間フィルタ手段12に出力する。   Although the background image generation unit 10 includes the control unit 13, the background update control unit 30 may include the control unit 13. In this case, the background image generation means 10 includes the past image storage means 11 and the time filter means 12, and the control means 13 of the background update control means 30 sends the storage timing signal to the past image storage means 11 of the background image generation means 10. The operation signal or the non-operation signal is output to the time filter unit 12 of the background image generation unit 10.

図1に戻って、背景画像記憶手段20は、画像メモリを有しており、背景画像生成手段10により生成された背景画像B(x,y)を入力し、画像メモリに記憶する。   Returning to FIG. 1, the background image storage means 20 has an image memory, inputs the background image B (x, y) generated by the background image generation means 10 and stores it in the image memory.

キー画像生成手段40は、入力画像を入力すると共に、背景画像記憶手段20から背景画像を読み出して入力し、閾値設定手段50から第2の閾値θを入力する。そして、キー画像生成手段40は、現在の入力画像の画素値I(t,x,y)、背景画像の画素値B(x,y)及び閾値θに基づいて、キー画像K(t,x,y)を生成して出力する。 The key image generation unit 40 inputs the input image, reads out and inputs the background image from the background image storage unit 20, and inputs the second threshold θ 2 from the threshold setting unit 50. Then, the key image generation unit 40 generates the key image K (t, t, y) based on the pixel value I (t, x, y) of the current input image, the pixel value B (x, y) of the background image, and the threshold value θ 2 . x, y) is generated and output.

キー画像K(t,x,y)は2値であってもよいし、多値であってもよい。2値の場合は、例えば、キー画像K(t,x,y)=1のときに、その入力画像I(t,x,y)の画素位置(x,y)における画像は前景にあり、キー画像K(t,x,y)=0のときに、その入力画像I(t,x,y)の画素位置(x,y)における画像は背景にあるものとして定義される。多値の場合は、例えば、キー画像K(t,x,y)∈[0,1]とし、キー画像K(t,x,y)の値が大きいほどその画素位置(x,y)における画像は前景にある可能性が高く、その値が小さいほど背景にある可能性が高いものとして定義される。   The key image K (t, x, y) may be binary or multi-valued. In the case of binary, for example, when the key image K (t, x, y) = 1, the image at the pixel position (x, y) of the input image I (t, x, y) is in the foreground, When the key image K (t, x, y) = 0, the image at the pixel position (x, y) of the input image I (t, x, y) is defined as being in the background. In the case of multivalue, for example, the key image K (t, x, y) ∈ [0, 1] is set, and the larger the value of the key image K (t, x, y), the larger the value at the pixel position (x, y). An image is defined as having a high possibility of being in the foreground, and a smaller value indicating a higher possibility of being in the background.

具体的には、キー画像生成手段40は、以下の式により、2値のキー画像K(t,x,y)を生成する。

Figure 0005227226
Specifically, the key image generation means 40 generates a binary key image K (t, x, y) by the following formula.
Figure 0005227226

また、キー画像生成手段40は、以下の式により、多値のキー画像K(t,x,y)を生成する。

Figure 0005227226
ここで、第2の閾値θは、下側閾値θ2a及び上側閾値θ2bであるものとする。尚、θ2a<θ2bである。 Further, the key image generation means 40 generates a multi-value key image K (t, x, y) by the following equation.
Figure 0005227226
Here, the second threshold θ 2 is assumed to be the lower threshold θ 2a and the upper threshold θ 2b . Note that θ 2a2b .

このようにして、キー画像生成手段40は、現在の入力画像の画素値I(t,x,y)、背景画像の画素値B(x,y)及び閾値θに基づいて、キー画像K(t,x,y)を生成して出力する。キー画像K(t,x,y)は第2の閾値θに基づいて生成されるから、入力画像において背景に変動があった場合には、その背景の変動は、先に、背景更新制御手段30において第1の閾値θに基づいて生成される判定結果f、及び、背景画像生成手段10においてその判定結果fに基づいて生成される背景画像に反映される。そして、キー画像生成手段40は、背景の変動が反映された背景画像に基づいてキー画像K(t,x,y)を生成するから、背景の変動は、キー画像K(t,x,y)に現れることがない。したがって、入力画像の背景と前景とを精度高く判別することが可能なキー画像K(t,x,y)を生成することが可能となる。尚、入力画像の背景に変動があった場合に、まずその変動が背景画像に反映され、その後に、その背景画像に基づいてキー画像K(t,x,y)が生成されるように、閾値設定手段50において、第1の閾値θ及び第2の閾値θが設定される。また、制御手段13において、時間フィルタ手段12を動作させて背景画像を生成させるための動作信号の生成条件である一定値が設定される。 In this way, the key image generation unit 40 determines the key image K based on the pixel value I (t, x, y) of the current input image, the pixel value B (x, y) of the background image, and the threshold value θ 2. (T, x, y) is generated and output. Since the key image K (t, x, y) is generated based on the second threshold θ 2 , if there is a change in the background in the input image, the change in the background is first controlled by the background update control. The determination result f generated based on the first threshold value θ 1 in the means 30 and the background image generated based on the determination result f in the background image generation means 10 are reflected. Since the key image generation unit 40 generates the key image K (t, x, y) based on the background image reflecting the background change, the background change is generated by the key image K (t, x, y). ) Will not appear. Therefore, it is possible to generate a key image K (t, x, y) that can accurately determine the background and foreground of the input image. In addition, when there is a change in the background of the input image, the change is first reflected in the background image, and then the key image K (t, x, y) is generated based on the background image. In the threshold setting means 50, the first threshold θ 1 and the second threshold θ 2 are set. Further, the control means 13 sets a constant value which is an operation signal generation condition for operating the time filter means 12 to generate a background image.

〔動作〕
次に、図1に示した背景差分装置1の動作について説明する。図3は、背景差分装置1における動作の概略を説明するフロー図である。まず、背景差分装置1の閾値設定手段50は、第1の閾値θ及び第2の閾値θを設定する(ステップS301)。ここで設定される第1の閾値θ及び第2の閾値θは、θ<θである。これは、入力画像の背景が変動した場合に、その変動がキー画像に反映される前に、変動が反映された背景画像を生成し、変動がキー画像に影響を与えないようにするためである。すなわち、第2の閾値θを用いてキー画像を生成するキー画像生成手段40よりも先に、第1の閾値θを用いる背景更新制御手段30が、背景画像生成手段10に背景画像を生成させるためである。
[Operation]
Next, the operation of the background difference device 1 shown in FIG. 1 will be described. FIG. 3 is a flowchart for explaining the outline of the operation in the background difference device 1. First, the threshold setting unit 50 of the background difference device 1 sets the first threshold value theta 1 and the second threshold value theta 2 (step S301). The first threshold value θ 1 and the second threshold value θ 2 set here are θ 12 . This is because when the background of the input image changes, before the change is reflected in the key image, a background image that reflects the change is generated so that the change does not affect the key image. is there. That is, the background update control means 30 using the first threshold value θ 1 uses the second threshold value θ 2 to generate a key image before the key image generation means 40 generates the key image. It is for generating.

背景画像生成手段10の制御手段13は、入力画像、背景画像及び第1の閾値θに基づいて、判定結果fを生成する(ステップS302)。ここで生成される判定結果fには、入力画像の背景が変動した場合、後述するステップS305において生成されるキー画像よりも先に、その変動が反映される。 The control unit 13 of the background image generation unit 10 generates the determination result f based on the input image, the background image, and the first threshold value θ 1 (step S302). In the determination result f generated here, when the background of the input image changes, the change is reflected before the key image generated in step S305 described later.

背景画像生成手段10の過去画像記憶手段11は、制御手段13において生成された判定結果fによる記憶タイミング信号に従って、入力画像を記憶する(ステップS303)。また、背景画像生成手段10の時間フィルタ手段12は、制御手段13において生成された判定結果fによる動作信号に従って、過去画像記憶手段11から入力画像群を過去画像として読み出し、時間方向のフィルタ処理を施して背景画像を生成する(ステップS304)。ここで生成される背景画像には、判定結果fと同様に、入力画像の背景が変動した場合、後述するステップS305において生成されるキー画像よりも先に、その変動が反映される。   The past image storage unit 11 of the background image generation unit 10 stores the input image according to the storage timing signal based on the determination result f generated by the control unit 13 (step S303). Further, the time filter unit 12 of the background image generation unit 10 reads the input image group as a past image from the past image storage unit 11 in accordance with the operation signal based on the determination result f generated by the control unit 13, and performs time direction filter processing. To generate a background image (step S304). Similar to the determination result f, when the background of the input image changes, the background image generated here reflects the change prior to the key image generated in step S305 described later.

キー画像生成手段40は、入力画像、背景画像及び第2の閾値θ(第1の閾値θよりも大きい値)に基づいて、キー画像を生成する(ステップS305)。 The key image generation means 40 generates a key image based on the input image, the background image, and the second threshold value θ 2 (a value larger than the first threshold value θ 1 ) (step S305).

以上のように、本発明の実施形態による背景差分装置1によれば、照明変動等の環境光変動が起こって入力画像の背景が変動した場合、まず、背景更新制御手段30が背景画像生成手段10に、その変動が反映された背景画像を生成させるようにした。そして、その後に、キー画像生成手段40が、変動が反映された背景画像を用いて、キー画像を生成するようにした。これにより、入力画像の変動は背景画像に吸収されるから、キー画像に影響を及ぼすことがない。したがって、入力画像の背景の変動に起因して、キー画像にノイズが発生することがなく、そのノイズの発生を未然に防ぐことができる。すなわち、入力画像の背景と前景とを精度高く判別するキー画像を生成することができる。   As described above, according to the background difference device 1 according to the embodiment of the present invention, when the background of the input image changes due to a change in ambient light such as a change in illumination, first, the background update control unit 30 performs the background image generation unit. 10, a background image reflecting the fluctuation is generated. After that, the key image generation means 40 generates a key image using the background image reflecting the fluctuation. As a result, the fluctuation of the input image is absorbed by the background image, so that the key image is not affected. Therefore, no noise is generated in the key image due to the fluctuation of the background of the input image, and the generation of the noise can be prevented in advance. That is, it is possible to generate a key image that accurately discriminates the background and foreground of the input image.

また、本発明の実施形態による背景差分装置1によれば、背景画像生成手段10の過去画像記憶手段11が、過去の入力画像を所定時点分記憶するようにした。これにより、過去の入力画像群を用いて背景画像を生成するために、フィルタとして時間フィルタを用いることができる。   Further, according to the background difference device 1 according to the embodiment of the present invention, the past image storage unit 11 of the background image generation unit 10 stores past input images for a predetermined time. Thereby, in order to generate a background image using a past input image group, a time filter can be used as a filter.

また、本発明の実施形態による背景差分装置1によれば、閾値設定手段50が、背景更新制御手段30により使用される第1の閾値θ、及び、キー画像生成手段40により使用される第2の閾値θを、θ<θになるよう設定するようにした。これにより、背景更新制御手段30が背景画像生成手段10に、入力画像の変動が反映された背景画像を生成させた後に、キー画像生成手段40が、その変動が反映された背景画像を用いて、キー画像を生成することができる。したがって、入力画像の背景の変動に起因して、キー画像にノイズが発生することがなく、そのノイズの発生を未然に防ぐことができる。すなわち、入力画像の背景と前景とを精度高く判別するキー画像を生成することができる。また、第1の閾値θ及び第2の閾値θを調整することにより、所望のキー画像を生成することができる。 Further, according to the background difference device 1 according to the embodiment of the present invention, the threshold setting unit 50 includes the first threshold θ 1 used by the background update control unit 30 and the first threshold used by the key image generation unit 40. The threshold value θ 2 of 2 is set so as to satisfy θ 12 . Thus, after the background update control unit 30 causes the background image generation unit 10 to generate a background image in which the variation of the input image is reflected, the key image generation unit 40 uses the background image in which the variation is reflected. A key image can be generated. Therefore, no noise is generated in the key image due to the fluctuation of the background of the input image, and the generation of the noise can be prevented in advance. That is, it is possible to generate a key image that accurately discriminates the background and foreground of the input image. Further, a desired key image can be generated by adjusting the first threshold value θ 1 and the second threshold value θ 2 .

尚、背景差分装置1は、CPU、RAM等の揮発性の記憶媒体、ROM等の不揮発性の記憶媒体、及びインターフェース等を備えたコンピュータによって構成される。背景差分装置1に備えた背景画像生成手段10、背景画像記憶手段20、背景更新制御手段30、キー画像生成手段40及び閾値設定手段50の各機能は、これらの機能を記述したプログラムをCPUに実行させることによりそれぞれ実現される。また、これらのプログラムは、磁気ディスク(フロッピー(登録商標)ディスク、ハードディスク等)、光ディスク(CD−ROM、DVD等)、半導体メモリ等の記憶媒体に格納して頒布することもできる。   The background difference device 1 is configured by a computer including a volatile storage medium such as a CPU and a RAM, a non-volatile storage medium such as a ROM, an interface, and the like. The functions of the background image generation means 10, background image storage means 20, background update control means 30, key image generation means 40, and threshold value setting means 50 provided in the background difference device 1 are stored in the CPU with a program describing these functions. Each is realized by executing. These programs can also be stored and distributed in a storage medium such as a magnetic disk (floppy (registered trademark) disk, hard disk, etc.), optical disk (CD-ROM, DVD, etc.), semiconductor memory, or the like.

1 背景差分装置
10 背景画像生成手段
11 過去画像記憶手段
12 時間フィルタ手段
13 制御手段
20 背景画像記憶手段
30 背景更新制御手段
40 キー画像生成手段
50 閾値設定手段
DESCRIPTION OF SYMBOLS 1 Background difference apparatus 10 Background image generation means 11 Past image storage means 12 Time filter means 13 Control means 20 Background image storage means 30 Background update control means 40 Key image generation means 50 Threshold setting means

Claims (5)

入力画像の背景と前景とを区別したキー画像を、前記入力画像から背景画像を差し引く背景差分処理により生成する画像処理装置において、
過去の複数時点の前記入力画像から背景画像を生成する背景画像生成手段と、
前記背景画像生成手段により生成された背景画像を記憶する背景画像記憶手段と、
前記入力画像と前記背景画像記憶手段により記憶された背景画像とを第1の閾値に基づいて比較し、その比較結果に基づいて、前記背景画像生成手段により背景画像が生成されるタイミングを制御する背景更新制御手段と、
前記入力画像と前記背景画像記憶手段により記憶された背景画像とを第2の閾値に基づいて比較し、前記キー画像を生成するキー画像生成手段と、を備えることを特徴とする画像処理装置。
In an image processing apparatus that generates a key image that distinguishes the background and foreground of an input image by background difference processing that subtracts the background image from the input image,
Background image generation means for generating a background image from the input images of a plurality of past points;
Background image storage means for storing the background image generated by the background image generation means;
The input image and the background image stored by the background image storage unit are compared based on a first threshold value, and the timing at which the background image generation unit generates the background image is controlled based on the comparison result. Background update control means;
An image processing apparatus comprising: a key image generation unit configured to compare the input image with a background image stored by the background image storage unit based on a second threshold value and generate the key image.
前記背景画像生成手段は、
過去の複数時点の前記入力画像を記憶する過去画像記憶手段と、
前記過去画像記憶手段により記憶された入力画像の各画素位置に関して時間方向のフィルタ処理を行い、背景画像を生成する時間フィルタ手段と、
前記背景更新制御手段による比較結果に基づいて、前記時間フィルタ手段によりフィルタ処理が行われて背景画像が生成されるタイミングを制御する制御手段と、を備えることを特徴とする請求項1に記載の画像処理装置。
The background image generating means
Past image storage means for storing the input images of a plurality of past points;
Time filter means for performing a filtering process in the time direction for each pixel position of the input image stored by the past image storage means, and generating a background image;
The control unit according to claim 1, further comprising: a control unit configured to control a timing at which a background image is generated by performing a filtering process by the time filter unit based on a comparison result by the background update control unit. Image processing device.
前記背景画像生成手段の制御手段は、
前記背景更新制御手段による比較結果に基づいて、前記過去画像記憶手段により入力画像が記憶されるタイミング、及び、前記時間フィルタ手段によりフィルタ処理が行われて背景画像が生成されるタイミングを制御することを特徴とする請求項2に記載の画像処理装置。
The control means of the background image generation means is
Controlling the timing at which the input image is stored by the past image storage unit and the timing at which the background image is generated by performing the filtering process by the time filter unit, based on the comparison result by the background update control unit. The image processing apparatus according to claim 2.
前記第1の閾値及び前記第2の閾値を設定するための閾値設定手段、を備えることを特徴とする請求項1から請求項3までのいずれか一項に記載の画像処理装置。   The image processing apparatus according to any one of claims 1 to 3, further comprising a threshold setting unit configured to set the first threshold and the second threshold. 入力画像の背景と前景とを区別したキー画像を、前記入力画像から背景画像を差し引く背景差分処理により生成する画像処理プログラムであって、コンピュータに、
過去の複数時点の前記入力画像から背景画像を生成するステップと、
前記生成した背景画像を記憶するステップと、
前記入力画像と前記記憶した背景画像とを第1の閾値に基づいて比較し、その比較結果に基づいて、前記背景画像を生成するタイミングを制御するステップと、
前記入力画像と前記記憶した背景画像とを第2の閾値に基づいて比較し、前記キー画像を生成するステップと、を実行させることを特徴とする画像処理プログラム。
An image processing program for generating a key image that distinguishes a background and a foreground of an input image by background difference processing that subtracts a background image from the input image, and
Generating a background image from the input images of a plurality of past points;
Storing the generated background image;
Comparing the input image and the stored background image based on a first threshold, and controlling the timing of generating the background image based on the comparison result;
A step of comparing the input image with the stored background image based on a second threshold value and generating the key image.
JP2009061528A 2009-03-13 2009-03-13 Image processing apparatus and image processing program Active JP5227226B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2009061528A JP5227226B2 (en) 2009-03-13 2009-03-13 Image processing apparatus and image processing program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2009061528A JP5227226B2 (en) 2009-03-13 2009-03-13 Image processing apparatus and image processing program

Publications (2)

Publication Number Publication Date
JP2010219665A JP2010219665A (en) 2010-09-30
JP5227226B2 true JP5227226B2 (en) 2013-07-03

Family

ID=42978063

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2009061528A Active JP5227226B2 (en) 2009-03-13 2009-03-13 Image processing apparatus and image processing program

Country Status (1)

Country Link
JP (1) JP5227226B2 (en)

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04220885A (en) * 1990-12-21 1992-08-11 Nippon Telegr & Teleph Corp <Ntt> Background elimination method and its execution device
JP3047658B2 (en) * 1993-01-22 2000-05-29 松下電器産業株式会社 Method for determining binarization threshold in moving object detection
JPH10111944A (en) * 1996-10-04 1998-04-28 Nippon Telegr & Teleph Corp <Ntt> Background image updating method and apparatus
JP2006155463A (en) * 2004-12-01 2006-06-15 Canon Inc Background image creation method

Also Published As

Publication number Publication date
JP2010219665A (en) 2010-09-30

Similar Documents

Publication Publication Date Title
JP5908174B2 (en) Image processing apparatus and image processing method
CN110246089B (en) Bayer domain image noise reduction system and method based on non-local mean filtering
JP4416795B2 (en) Correction method
CN110661983B (en) Image acquisition method, device, equipment and storage medium
JP6320115B2 (en) Image processing apparatus, image processing method, and program
CN108229526A (en) Network training, image processing method, device, storage medium and electronic equipment
JP2007323572A (en) Object detection apparatus, object detection method, and object detection program
WO2014083721A1 (en) Information processing device and information processing method
JP2012042332A (en) Three-dimensional measurement device and three-dimensional measurement method
KR101437626B1 (en) System and method for region-of-interest-based artifact reduction in image sequences
KR101651889B1 (en) Video quality enhancement device and method for extremely low-light video
JP7316867B2 (en) Semiconductor image processing device
JP2018124441A (en) System, information processing apparatus, information processing method, and program
JP2020135653A (en) Video image correction device and program
CN120236302B (en) Image-driven tick detection comb fused with deep learning model
JP5227226B2 (en) Image processing apparatus and image processing program
US11575841B2 (en) Information processing apparatus, imaging apparatus, method, and storage medium
JP2012104872A (en) Image processing unit, and image processing program
JPWO2011086594A1 (en) Image processing apparatus and method
JP7408973B2 (en) Learning model generation device, image correction device, learning model generation program, and image correction program
JP7246029B2 (en) Imaging control device, imaging control method, and program
JP2015076676A (en) Image processing apparatus, image processing method, and program
JP2019086969A (en) IMAGE PROCESSING APPARATUS, IMAGE PROCESSING METHOD, AND PROGRAM
JP5873415B2 (en) Foreground detection device, foreground detection method, and computer program
JP2017033448A (en) Image processing unit, program and image processing method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20110317

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20130214

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20130220

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20130315

R150 Certificate of patent or registration of utility model

Ref document number: 5227226

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20160322

Year of fee payment: 3

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250