JP6463153B2 - Image processing apparatus, imaging apparatus, image processing method, and program - Google Patents
Image processing apparatus, imaging apparatus, image processing method, and program Download PDFInfo
- Publication number
- JP6463153B2 JP6463153B2 JP2015014891A JP2015014891A JP6463153B2 JP 6463153 B2 JP6463153 B2 JP 6463153B2 JP 2015014891 A JP2015014891 A JP 2015014891A JP 2015014891 A JP2015014891 A JP 2015014891A JP 6463153 B2 JP6463153 B2 JP 6463153B2
- Authority
- JP
- Japan
- Prior art keywords
- input
- pixel
- image
- difference
- value
- 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.)
- Expired - Fee Related
Links
- 238000003384 imaging method Methods 0.000 title claims description 121
- 238000012545 processing Methods 0.000 title claims description 64
- 238000003672 processing method Methods 0.000 title claims description 6
- 230000008859 change Effects 0.000 claims description 178
- 238000000034 method Methods 0.000 claims description 57
- 238000001514 detection method Methods 0.000 claims description 43
- 235000019557 luminance Nutrition 0.000 description 94
- 238000010586 diagram Methods 0.000 description 42
- 230000008569 process Effects 0.000 description 29
- 238000012986 modification Methods 0.000 description 18
- 230000004048 modification Effects 0.000 description 18
- 238000005286 illumination Methods 0.000 description 16
- 238000005516 engineering process Methods 0.000 description 13
- 230000000694 effects Effects 0.000 description 12
- 238000004364 calculation method Methods 0.000 description 10
- 230000000052 comparative effect Effects 0.000 description 4
- 239000012141 concentrate Substances 0.000 description 3
- 230000009471 action Effects 0.000 description 2
- 238000012544 monitoring process Methods 0.000 description 2
- 238000002310 reflectometry Methods 0.000 description 2
- 238000011410 subtraction method Methods 0.000 description 2
- 241000282412 Homo Species 0.000 description 1
- 230000000295 complement effect Effects 0.000 description 1
- 239000004020 conductor Substances 0.000 description 1
- 238000012937 correction Methods 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 238000005259 measurement Methods 0.000 description 1
- 229910044991 metal oxide Inorganic materials 0.000 description 1
- 150000004706 metal oxides Chemical class 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 230000002265 prevention Effects 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 238000000926 separation method Methods 0.000 description 1
Images
Landscapes
- Closed-Circuit Television Systems (AREA)
- Studio Devices (AREA)
- Image Analysis (AREA)
Description
本技術は、画像処理装置、撮像装置、画像処理方法および当該方法をコンピュータに実行させるためのプログラムに関する。詳しくは、動体を検出する画像処理装置、撮像装置、画像処理方法および当該方法をコンピュータに実行させるためのプログラムに関する。 The present technology relates to an image processing device, an imaging device, an image processing method, and a program for causing a computer to execute the method. Specifically, the present invention relates to an image processing apparatus, an imaging apparatus, an image processing method, and a program for causing a computer to execute the method.
従来より、監視カメラにより撮像された画像に対して画像処理を行うことによって物体や人間などの動体を検出する監視システムが、防犯や計測の分野で広く用いられている。この動体の検出において、背景差分法を用いる画像処理装置が提案されている(例えば、特許文献1参照。)。この背景差分法においては、検出対象の入力画像と、静止物のみを含む背景画像との差分画像において、差分が閾値以上の領域が動体として検出される。 Conventionally, monitoring systems that detect moving objects such as objects and humans by performing image processing on images captured by a monitoring camera have been widely used in the field of crime prevention and measurement. An image processing apparatus using a background subtraction method has been proposed for detection of this moving object (see, for example, Patent Document 1). In this background subtraction method, in a difference image between an input image to be detected and a background image including only a stationary object, an area having a difference equal to or greater than a threshold is detected as a moving object.
しかしながら、上述の画像処理装置では、照明の点灯や消灯によって背景画像に対する入力画像の明るさが変化すると、その変化により差分が閾値以上となった静止物の領域が動体として誤って検出されるおそれがある。そのため、動体を高い精度で検出することが困難になるという問題がある。 However, in the above-described image processing device, when the brightness of the input image with respect to the background image changes due to lighting on or off, a stationary object region in which the difference exceeds a threshold due to the change may be erroneously detected as a moving object. There is. Therefore, there is a problem that it is difficult to detect a moving object with high accuracy.
本技術はこのような状況に鑑みて生み出されたものであり、照明の変化に左右されることなく、動体の検出精度を向上させることを目的とする。 The present technology has been created in view of such a situation, and an object thereof is to improve the detection accuracy of a moving object without being influenced by a change in illumination.
本技術は、上述の問題点を解消するためになされたものであり、その第1の側面は、入力画素が配列された入力画像が入力されるたびに当該入力画像と基準画素が配列された基準画像とにおいて上記基準画素と当該基準画素に対応する上記入力画素とのそれぞれの画素値の相違度を上記入力画素ごとに取得する相違度取得部と、上記基準画像および上記入力画像のそれぞれを撮像した際の所定変化量を超える照度変化の有無を上記入力画素ごとの上記相違度の分布の状態に基づいて判定する判定部とを具備する画像処理装置、および、画像処理方法ならびに当該方法をコンピュータに実行させるためのプログラムである。これにより、相違度の分布の状態に基づいて照度変化があったと判定されるという作用をもたらす。 The present technology has been made to solve the above-described problems. The first aspect of the present technology is that each time an input image in which input pixels are arranged is input, the input image and reference pixels are arranged. A reference image and a difference degree acquisition unit for acquiring a difference value of each pixel value between the reference pixel and the input pixel corresponding to the reference pixel for each input pixel, and each of the reference image and the input image An image processing apparatus comprising: a determination unit that determines whether or not there is a change in illuminance exceeding a predetermined change amount at the time of imaging based on the distribution state of the difference for each of the input pixels; and an image processing method and the method A program for causing a computer to execute. This brings about the effect that it is determined that there is a change in illuminance based on the distribution state of the dissimilarity.
また、この第1の側面において、上記入力画像について動体の検出を行う動体検出部をさらに具備してもよい。これにより、動体が検出されるという作用をもたらす。 Further, in the first aspect, a moving object detection unit that detects a moving object for the input image may be further included. This brings about the effect | action that a moving body is detected.
また、この第1の側面において、上記判定部は、上記照度変化があった場合には上記動体の検出を停止させてもよい。これにより、照度変化があった場合に導体の検出が停止するという作用をもたらす。 In the first aspect, the determination unit may stop the detection of the moving object when the illuminance change occurs. This brings about the effect that the detection of the conductor stops when there is a change in illuminance.
また、この第1の側面において、上記動体検出部は、上記入力画像および上記基準画像の差分画像を生成して当該差分画像において差分が所定の差分閾値より大きい領域を上記動体として検出してもよい。これにより、差分が所定の差分閾値より大きい領域が動体として検出されるという作用をもたらす。 In the first aspect, the moving object detection unit may generate a difference image between the input image and the reference image and detect a region where the difference is larger than a predetermined difference threshold in the difference image as the moving object. Good. This brings about the effect | action that the area | region where a difference is larger than a predetermined difference threshold value is detected as a moving body.
また、この第1の側面において、上記分布において上記相違度の最頻値を求める最頻値取得部をさらに具備し、上記判定部は、上記最頻値が所定範囲内にあるか否かにより上記照度変化の有無を判定してもよい。これにより、相違度の最頻値が所定範囲内にあるか否かにより照度変化の有無が判定されるという作用をもたらす。 The first aspect may further include a mode value obtaining unit that obtains the mode value of the degree of difference in the distribution, and the determination unit may determine whether the mode value is within a predetermined range. The presence or absence of the illuminance change may be determined. This brings about the effect that the presence or absence of a change in illuminance is determined depending on whether or not the mode value of the degree of difference is within a predetermined range.
また、この第1の側面において、上記基準画素と当該基準画素に対応する上記入力画素とのそれぞれの画素値からなる組の集合から外れ値を含む組を除去する外れ値除去部をさらに具備し、上記相違度取得部は、上記外れ値を含む組が除去された上記集合において上記相違度を取得してもよい。これにより、外れ値を含む組が除去された集合において相違度が取得されるという作用をもたらす。 The first aspect further includes an outlier removal unit that removes a set including an outlier from a set of pixel values of the reference pixel and the input pixel corresponding to the reference pixel. The difference degree acquisition unit may acquire the difference degree in the set from which the set including the outlier is removed. This brings about the effect that the dissimilarity is acquired in the set from which the set including outliers is removed.
また、この第1の側面において、上記相違度取得部は、上記基準画素の画素値の対数と上記入力画素の画素値の対数との差分を上記相違度として取得してもよい。これにより、基準画素の画素値の対数と入力画素の画素値の対数との差分が相違度として取得されるという作用をもたらす。 In the first aspect, the difference degree acquisition unit may acquire a difference between a logarithm of the pixel value of the reference pixel and a logarithm of the pixel value of the input pixel as the difference degree. Thereby, the difference between the logarithm of the pixel value of the reference pixel and the logarithm of the pixel value of the input pixel is obtained as the difference.
また、本技術の第2の側面は、入力画素が配列された入力画像を時系列順に撮像する撮像部と、上記入力画像が入力されるたびに当該入力画像と基準画素が配列された基準画像とにおいて上記基準画素と当該基準画素に対応する上記入力画素とのそれぞれの画素値の相違度を上記入力画素ごとに取得する相違度取得部と、上記基準画像および上記入力画像のそれぞれを撮像した際の所定変化量を超える照度変化の有無を上記入力画素ごとの上記相違度の分布の状態に基づいて判定する判定部とを具備する撮像装置である。これにより、相違度の分布の状態に基づいて照度変化があったと判定されるという作用をもたらす。 In addition, according to a second aspect of the present technology, an imaging unit that captures an input image in which input pixels are arranged in time series order, and a reference image in which the input image and the reference pixel are arranged each time the input image is input The difference degree acquisition unit for acquiring the difference in pixel value between the reference pixel and the input pixel corresponding to the reference pixel for each input pixel, and each of the reference image and the input image A determination unit that determines whether or not there is an illuminance change exceeding a predetermined change amount based on a distribution state of the difference for each input pixel. This brings about the effect that it is determined that there is a change in illuminance based on the distribution state of the dissimilarity.
また、この第2の側面において、上記照度変化が無い場合には上記撮像部の露光量を所定量に制御する露光制御部をさらに具備してもよい。これにより、照度変化が無い場合には撮像部の露光量が所定量に制御されるという作用をもたらす。 In addition, in the second aspect, when there is no change in illuminance, an exposure control unit that controls the exposure amount of the imaging unit to a predetermined amount may be further provided. Thereby, when there is no illuminance change, the exposure amount of the imaging unit is controlled to a predetermined amount.
本技術によれば、動体の検出精度を向上させることができるという優れた効果を奏し得る。なお、ここに記載された効果は必ずしも限定されるものではなく、本開示中に記載されたいずれかの効果であってもよい。 According to the present technology, it is possible to achieve an excellent effect that the detection accuracy of a moving object can be improved. Note that the effects described here are not necessarily limited, and may be any of the effects described in the present disclosure.
以下、本技術を実施するための形態(以下、実施の形態と称する)について説明する。説明は以下の順序により行う。
1.第1の実施の形態(相違度の分布から照度変化の有無を判定する例)
2.第2の実施の形態(外れ値を除去して求めた相違度の分布から照度変化の有無を判定する例)
3.第3の実施の形態(相違度の分布から最頻値を求めて照度変化の有無を判定する例)
Hereinafter, modes for carrying out the present technology (hereinafter referred to as embodiments) will be described. The description will be made in the following order.
1. 1st Embodiment (example which determines the presence or absence of illumination intensity change from distribution of difference degree)
2. Second Embodiment (Example of determining presence or absence of illuminance change from distribution of difference obtained by removing outliers)
3. Third embodiment (example in which the mode value is obtained from the distribution of dissimilarities to determine the presence or absence of illuminance change)
<1.第1の実施の形態>
[撮像装置の構成例]
図1は、第1の実施の形態における撮像装置100の一構成例を示すブロック図である。この撮像装置100は、撮像部110、画像処理部120、露光制御部130、背景画像記憶部140、動画記録部150および照度変化判定部200を備える。
<1. First Embodiment>
[Configuration example of imaging device]
FIG. 1 is a block diagram illustrating a configuration example of the
撮像部110は、露光制御部130から供給された露出パラメータの設定値に従って複数の入力画像を時系列順に撮像するものである。ここで、露出パラメータは、露出量(露光量)を制御するためのパラメータであり、絞り値や露光時間(すなわち、シャッタースピード)などが想定される。また、撮像部110は、撮像レンズおよび絞り等の光学系や撮像素子により構成される。この撮像素子として、例えば、CCD(Charge Coupled Device)センサーやCMOS(Complementary Metal Oxide Semiconductor)センサーが用いられる。撮像部110は、撮像した入力画像のそれぞれを信号線119を介して画像処理部120および照度変化判定部200に供給する。
The
背景画像記憶部140は、動体の検出において基準とされる背景画像を記憶するものである。この背景画像として、例えば、動体を検出すべき撮像場所を、動体が存在しない状況で予め撮像した画像が用いられる。なお、背景画像は、特許請求の範囲における基準画像の一例である。
The background
ここで、入力画像および背景画像のそれぞれは、二次元格子状に配列された複数の画素を含む。以下、入力画像における画素を「入力画素」と称し、背景画像における画素を「背景画素」と称する。また、入力画像および背景画像のそれぞれの画素数およびアスペクト比は同一であるものとする。なお、入力画像および背景画像のそれぞれの画素数やアスペクト比が異なる構成であってもよい。例えば、入力画像よりサイズの大きな背景画像を記憶しておく構成であってもよい。この場合には、撮像部110は、背景画像が撮像された撮像領域の一部を撮像して入力画像を生成する。
Here, each of the input image and the background image includes a plurality of pixels arranged in a two-dimensional lattice pattern. Hereinafter, the pixels in the input image are referred to as “input pixels”, and the pixels in the background image are referred to as “background pixels”. Further, it is assumed that the number of pixels and the aspect ratio of the input image and the background image are the same. The input image and the background image may have different pixel numbers and aspect ratios. For example, a configuration in which a background image larger than the input image is stored may be used. In this case, the
照度変化判定部200は、背景画像および入力画像のそれぞれを撮像した際に、所定の変化量dLを超える照度変化があったか否かを判定するものである。照度変化判定部200は、照度変化の有無を判定した結果を、照度変化判定結果として信号線209を介して露光制御部130および画像処理部120に供給する。
The illuminance
画像処理部120は、入力画像のそれぞれについて、動体の検出処理、ホワイトバランス処理やデモザイク処理などの所定の画像処理を行うものである。この動体の検出処理においては、背景画像と入力画像の差分画像が生成され、その差分画像内において差分値が所定の差分閾値を超える領域が動体として検出される。ただし、画像処理部120は、照度変化があった場合に動体の検出処理を停止する。画像処理部120は、画像処理後の入力画像を動体の検出結果とともに動画記録部150に信号線129を介して供給する。動画記録部150は、入力画像と動体の検出結果とを含む動画を記録するものである。
The
露光制御部130は、撮像部110の露光量を制御するものである。この露光制御部130は、照度変化があった場合に露光量を制御し、照度変化が無い場合には露光量の制御を行わない。露光量の制御において露光制御部130は、周辺光量を測光する光検出器(不図示)などから測光値を取得し、その測光値と、所定の目標値との差が許容値を超えるか否かを判定する。そして、露光制御部130は、その差が所定の許容値を超える場合に、測光値が所定の目標値になるように露出パラメータ(絞り値やシャッタースピード)を設定し、その設定値を撮像部110に供給する。
The
なお、露光制御部130は、絞り値やシャッタースピードを制御しているが、絞り値等の代わりに画素値に対するゲインを制御してもよいし、絞り値やシャッタースピードとゲインとの両方を制御してもよい。
The
また、撮像装置100は、表示部をさらに備え、その表示部に画像や動画を表示してもよい。また、撮像装置100は、インターフェースをさらに備え、そのインターフェースを介して、画像や動画を外部の装置に出力してもよい。
Moreover, the
また、撮像部110、画像処理部120、露光制御部130、背景画像記憶部140、動画記録部150および照度変化判定部200を同一の装置内に設ける構成としているが、これらを別々の装置に設ける構成としてもよい。例えば、撮像部110や露光制御部130を撮像装置100に設け、画像処理部120や照度変化判定部200を画像処理装置等に設ける構成としてもよい。
In addition, the
[照度変化判定部の構成例]
図2は、第1の実施の形態における照度変化判定部200の一構成例を示すブロック図である。この照度変化判定部200は、距離算出部211、距離比較部212、計数部213および計数値比較部214を備える。
[Example of configuration of illumination change determination unit]
FIG. 2 is a block diagram illustrating a configuration example of the illuminance
距離算出部211は、入力画素と、その入力画素に対応する背景画素とのそれぞれの画素値(例えば、輝度値)の相違度を距離として、入力画素ごとに算出するものである。相違度の算出方法の詳細については後述する。距離算出部211は、算出した距離のそれぞれを距離比較部212に供給する。なお、距離算出部211は、特許請求の範囲に記載の相違度取得部の一例である。
The
距離比較部212は、算出された距離(すなわち、相違度)のそれぞれについて、その距離と所定の距離閾値とを比較して距離が距離閾値より大きいか否かを判定するものである。距離比較部212は、距離ごとの判定結果を計数部213に供給する。
The
計数部213は、距離比較部212からの判定結果に基づいて、距離閾値より大きい距離の個数を計数するものである。計数部213は、計数値CNTを計数値比較部214に供給する。
The
計数値比較部214は、計数値CNTと所定の計数値判定閾値とを比較して計数値CNTが計数値判定閾値より多いか否かを判定するものである。計数値比較部214は、その判定結果を照度変化判定結果として露光制御部130および画像処理部120に供給する。なお、計数値比較部214は、特許請求の範囲に記載の判定部の一例である。
The count
図3は、第1の実施の形態における照度変化の有無の判定方法を説明するための図である。同図におけるaは、背景画像500の一例であり、同図におけるbは、入力画像501の一例である。同図におけるaおよびbに例示するように、入力画像501は、背景画像500と比較して、全体的に輝度が低下している。このように全体的な明るさが変化する原因としては、光源の照度の変化などが想定される。
FIG. 3 is a diagram for explaining a method for determining whether or not there is an illuminance change in the first embodiment. In the figure, a is an example of the
図3におけるcは、背景画像500の輝度分布の一例であり、同図におけるdは、入力画像501の輝度分布の一例である。同図におけるcおよびdの横軸は画素の座標であり、縦軸は、その座標の画素の輝度値である。同図におけるcおよびdに例示するように、照度変化により、入力画像の輝度は背景画像に対して全体的に低下している。例えば、座標P1の入力画素の輝度値I1は、その座標の背景画素の輝度値B1より低い。また、座標P2の入力画素の輝度値I2も、その座標の背景画素の輝度値B2より低い。
C in FIG. 3 is an example of the luminance distribution of the
図3におけるeは、入力画素および背景画素のそれぞれの輝度値の関係を示す分布図である。同図のeにおいて、縦軸は入力画素の輝度値であり、横軸は背景画素の輝度値である。また、同図のeにおいて、白丸は、座標P1の背景画素および入力画素のそれぞれの輝度値を表すプロットであり、黒丸は、座標P2の背景画素および入力画素のそれぞれの輝度値を表すプロットである。実線は、座標P1およびP2のそれぞれに対応するプロットを通る直線である。また、一点鎖線は、傾き「1」で切片が「0」の直線である。座標P1およびP2以外の各座標について、それらの座標に対応するプロットを追加すると、実線の直線付近に、それらのプロットが集中する。この実線の直線の傾きは、「1」よりも小さい。 E in FIG. 3 is a distribution diagram showing the relationship between the luminance values of the input pixel and the background pixel. In FIG. 5e, the vertical axis represents the luminance value of the input pixel, and the horizontal axis represents the luminance value of the background pixel. Further, in e of the figure, a white circle is a plot representing the luminance values of the background pixel and the input pixel at the coordinate P1, and a black circle is a plot representing the luminance value of the background pixel and the input pixel at the coordinate P2. is there. The solid line is a straight line passing through a plot corresponding to each of the coordinates P1 and P2. The alternate long and short dash line is a straight line having an inclination of “1” and an intercept of “0”. When plots corresponding to the coordinates other than the coordinates P1 and P2 are added, the plots are concentrated near the solid line. The slope of this solid line is smaller than “1”.
ここで、輝度、照度および被写体の反射率の間には、輝度に対するゲインを一定とすると、次式に示す関係が成立する。
(輝度)=(照度)×(反射率)
Here, if the gain with respect to the luminance is constant among the luminance, the illuminance, and the reflectance of the subject, the relationship shown in the following equation is established.
(Luminance) = (illuminance) x (reflectance)
上式より、入力画像側の輝度、照度および反射率を入力輝度、入力照度および入力反射率とし、背景画像側の輝度、照度および反射率を入力輝度、入力照度および入力反射率とすると、次式が成立する。
(入力輝度)=(入力照度)×(入力反射率) ・・・式1
(背景輝度)=(背景照度)×(背景反射率) ・・・式2
From the above equation, if the luminance, illuminance, and reflectance on the input image side are input luminance, illuminance, and input reflectance, and the luminance, illuminance, and reflectance on the background image side are input luminance, illuminance, and input reflectance, The formula holds.
(Input luminance) = (Input illuminance) × (Input reflectivity)
(Background luminance) = (Background illuminance) × (Background reflectivity)
入力画像および背景画像の被写体が同一である場合には、入力反射率および背景反射率は同一である。この場合、式1および式2から次式が得られる。
(入力輝度)=(入力照度)/(背景照度)×(背景輝度) ・・・式3
When the subjects of the input image and the background image are the same, the input reflectance and the background reflectance are the same. In this case, the following equation is obtained from
(Input luminance) = (Input illuminance) / (Background illuminance) × (Background luminance) Equation 3
式3より、照度の変化が無い場合には、入力輝度は背景輝度と同じ値になり、照度の変化があった場合には、背景輝度に対する入力輝度の比率は、照度の変化率に応じた値となる。したがって、光源の照度変化が無い場合には、各座標に対応するプロットは、傾き「1」の直線付近に集中する。一方、照度変化がある場合には、各座標に対応するプロットは、照度の変化率(入力照度/背景照度)に該当する傾きの直線付近に集中する。 From Equation 3, when there is no change in illuminance, the input luminance is the same value as the background luminance. When there is a change in illuminance, the ratio of the input luminance to the background luminance depends on the rate of change in illuminance. Value. Therefore, when there is no change in the illuminance of the light source, the plots corresponding to the respective coordinates are concentrated in the vicinity of the straight line having the inclination “1”. On the other hand, when there is a change in illuminance, the plot corresponding to each coordinate is concentrated near a straight line with a slope corresponding to the change rate of illuminance (input illuminance / background illuminance).
撮像装置100は、座標ごとに、その座標に対応するプロットと、傾き「1」の直線との間の距離Dを求める。ここで、xy平面において、ax+by+c=0(a、bおよびcは実数)の直線と、座標(x0、y0)の点との間の距離Dは、次式により求められる。
D=abs(ax0+by0+c)/(a2+b2)1/2 ・・・式4
The
D = abs (ax 0 + by 0 + c) / (a 2 + b 2 ) 1/2 Formula 4
上式において、abs()は、絶対値を返す関数である。直線の傾きが1で、切片が0の場合、a=1、b=−1、c=0である。これらを上式に代入すると、次式が得られる。
D=abs(x0−y0)/21/2 ・・・式5
In the above formula, abs () is a function that returns an absolute value. When the slope of the straight line is 1 and the intercept is 0, a = 1, b = −1, and c = 0. Substituting these into the above equation yields:
D = abs (x 0 −y 0 ) / 2 1/2 Formula 5
したがって、x軸を背景輝度、y軸を入力輝度とすると、式5において背景画素の輝度をx0に代入し、その背景画素に対応する入力画素の輝度をy0に代入することにより、距離Dが算出される。この距離Dは、対応する入力画素および背景画素のそれぞれの画素値の相違度を示す。照度の変化が少ない場合には、この距離D(相違度)が小さいプロットが多くなり、照度の変化が大きい場合には、距離D(相違度)が大きいプロットが多くなる。このため、距離閾値より小さい距離Dのプロット数(すなわち、計数値CNT)から、撮像装置100は、所定の変化量dLを超える照度変化の有無を判定することができる。
Therefore, if the x-axis is the background luminance and the y-axis is the input luminance, the distance of the background pixel is substituted for x 0 in equation 5 and the luminance of the input pixel corresponding to the background pixel is substituted for y 0. D is calculated. This distance D indicates the degree of difference between the pixel values of the corresponding input pixel and background pixel. When the change in illuminance is small, there are many plots with a small distance D (difference), and when the change in illuminance is large, there are many plots with a large distance D (difference). For this reason, the
なお、式5により得られた値を相違度としているが、画素値の違いの度合いを示す値であれば、他の式により得られた値を相違度としてもよい。例えば、撮像装置100は、入力画素および背景画素のそれぞれの画素値の比率を相違度として求めてもよい。
Although the value obtained by Expression 5 is used as the degree of difference, the value obtained by another expression may be used as the degree of difference as long as the value indicates the degree of difference in pixel value. For example, the
また、図3におけるc、dおよびeは、説明の便宜上、記載したものであり、これらの図は、撮像装置100において実際には生成されない。実際に生成されるデータは、同図におけるfに示すものである。
Further, c, d, and e in FIG. 3 are described for convenience of explanation, and these drawings are not actually generated in the
図3におけるfは、座標ごとの距離Dの分布を示す図である。同図におけるfの縦軸は、距離Dであり、横軸は座標である。撮像装置100は、同図におけるfに例示するように、座標ごとに距離Dを算出し、その分布の状態から照度変化の有無を判定する。例えば、撮像装置100は、距離閾値より小さい距離Dの個数を計数し、その計数値が計数値閾値より大きい場合に照度変化が無いと判定し、そうでない場合に照度変化があったと判定する。距離閾値には、照度に関する閾値である変化量dLが大きいほど大きな値が設定される。また、計数値判定閾値には、入力画像の画素数が多いほど、大きな値が設定される。
In FIG. 3, f is a diagram showing the distribution of the distance D for each coordinate. The vertical axis of f in the figure is the distance D, and the horizontal axis is the coordinate. The
[画像処理部の構成例]
図4は、第1の実施の形態における画像処理部120の一構成例を示すブロック図である。この画像処理部120は、ホワイトバランス処理部121、デモザイク処理部122および動体検出部123を備える。
[Configuration example of image processing unit]
FIG. 4 is a block diagram illustrating a configuration example of the
ホワイトバランス処理部121は、入力画像に対してホワイトバランスを調整する処理を行うものである。このホワイトバランス処理部121は、処理後の入力画像をデモザイク処理部122に供給する。
The white
デモザイク処理部122は、入力画像に対して、画素ごとに足りない色データを補間するデモザイク処理を行うものである。このデモザイク処理部122は、処理後の入力画像を動画記録部150に供給する。
The
動体検出部123は、入力画像において動体を検出するものである。ただし、照度変化があった場合に動体検出部123は、動体の検出処理を停止する。照度変化が無い場合に動体検出部123は、入力画像および背景画像の差分画像を生成し、その差分画像において差分値が所定の差分閾値を超える領域を動体として検出する。そして、動体検出部123は、動体の有無を示すフラグや、動体の領域を示す情報を含む動体検出結果を動画記録部150に供給する。なお、動体検出部123は、デモザイク前の入力画像について、動体を検出しているが、デモザイク後の入力画像において動体を検出してもよい。この場合には、背景画像としてデモザイク後の画像が用いられる。また、照度変化判定部200もデモザイク後の入力画像および背景画像から照度の変化の有無を判定する。
The moving
なお、画像処理部120は、ホワイトバランス処理やデモザイク処理以外の画像処理、例えば、ガンマ補正処理やノイズ除去処理などをさらに行ってもよい。また、画像処理部120は、ホワイトバランス処理およびデモザイク処理の少なくとも一方を行わずに入力画像を出力してもよい。
Note that the
図5は、第1の実施の形態における背景画像、入力画像および差分画像の一例を示す図である。同図におけるaは、背景画像505の一例であり、同図におけるbは、入力画像506の一例である。同図におけるaおよびbに例示するように、背景画像505および入力画像506の照度に変化はなく、背景画像505に写っていない人間507が、入力画像506に写っている。
FIG. 5 is a diagram illustrating an example of a background image, an input image, and a difference image according to the first embodiment. In the figure, a is an example of the
図5におけるcは、背景画像505および入力画像506の差分画像508の一例である。この差分画像508において、白色の領域509は、差分値が差分閾値を超える領域を示し、黒色の領域は、差分値が差分閾値以下の領域を示す。同図におけるcに例示するように、入力画像506内の人間507に対応する領域509が差分画像508において白色になっている。この領域509に対応する入力画像506内の領域が動体として検出される。このように、入力画像および背景画像の差分画像から動体を検出する手法は、背景差分法と呼ばれる。
C in FIG. 5 is an example of a
[撮像装置の動作例]
図6は、第1の実施の形態における撮像装置100の動作の一例を示すフローチャートである。このフローチャートの示す処理は、入力画像が撮像されるたびに実行される。撮像装置100は、照度変化の有無を判定するための照度変化判定処理を実行する(ステップS910)。そして、撮像装置100は、その照度変化判定処理で照度変化があったと判定されたか否かを判断する(ステップS901)。
[Operation example of imaging device]
FIG. 6 is a flowchart illustrating an example of the operation of the
照度変化が無い場合に(ステップS901:No)、撮像装置100は、背景差分法を使用して入力画像において動体を検出する(ステップS902)。一方、照度変化があった場合に(ステップS901:Yes)、撮像装置100は、露光量を制御するための露光制御処理を実行する(ステップS950)。ステップS902またはS950の後、撮像装置100は、動作を終了する。
When there is no change in illuminance (step S901: No), the
図7は、第1の実施の形態における照度変化判定処理を示すフローチャートである。撮像装置100は、計数値CNTを初期値(例えば、「0」)に初期化する(ステップS911)。
FIG. 7 is a flowchart showing the illuminance change determination process in the first embodiment. The
ここで、入力画像および背景画像における画素の水平座標は0乃至W−1であり、垂直座標は0乃至H−1であるものとする。撮像装置100は、座標(0,0)の画素から座標(W−1,H−1)までの画素に順に着目して、着目した画素について、次のステップS913乃至S915を実行する(ステップS912)。
Here, the horizontal coordinates of the pixels in the input image and the background image are 0 to W-1, and the vertical coordinates are 0 to H-1. The
まず、撮像装置100は、着目した画素の座標に対応するプロットと、傾き「1」の直線との間の距離Dを式5により算出する(ステップS913)。撮像装置100は、算出した距離Dが距離閾値以下であるか否かを判断する(ステップS914)。距離Dが距離閾値以下である場合に(ステップS914:Yes)、撮像装置100は、計数値CNTをインクリメントする(ステップS915)。
First, the
全ての座標についてステップS913乃至S915を実行した後に、撮像装置100は、計数値CNTが計数値判定閾値より大きいか否かを判定する(ステップS916)。計数値CNTが計数値判定閾値より大きい場合に(ステップS916:Yes)、撮像装置100は、照度変化が無いと判定して、照度変化判定フラグに「0」を設定する(ステップS917)。一方、計数値CNTが計数値判定閾値以下の場合に(ステップS916:No)、撮像装置100は、照度変化があったと判定して、照度変化判定フラグに「1」を設定する(ステップS918)。ステップS917またはS918の後、撮像装置100は、照度変化判定処理を終了する。
After performing steps S913 to S915 for all coordinates, the
図8は、第1の実施の形態における露光制御処理を示すフローチャートである。撮像装置100は、測光値を取得し(ステップS951)、目標値と測光値との間の差が許容値以内であるか否かを判断する(ステップS952)。差が許容値以内でない場合に(ステップS952:No)、撮像装置100は、測光値が目標値より小さいか否かを判断する(ステップS953)。
FIG. 8 is a flowchart showing the exposure control process in the first embodiment. The
測光値が目標値より小さい場合に(ステップS953:Yes)、撮像装置100は、画像が明るくなる値に、露出パラメータを設定する(ステップS954)。測光値が目標値以上の場合に(ステップS953:No)、撮像装置100は、画像が暗くなる値に、露出パラメータを設定する(ステップS955)。ステップS954またはS955の後に撮像装置100は、露出パラメータの設定値に従って絞りやシャッタースピードを制御する(ステップS956)。目標値と測光値との間の差が許容値以内の場合(ステップS952:Yes)、または、ステップS956の後、撮像装置100は、露光制御処理を終了する。
When the photometric value is smaller than the target value (step S953: Yes), the
なお、撮像装置100は、絞り値等の代わりに画素値に対するゲインを制御してもよいし、絞り値やシャッタースピードとゲインとの両方を制御してもよい。
Note that the
図9は、第1の実施の形態における撮像装置100の動作を説明するための図である。同図におけるaは、背景画像510の一例であり、同図におけるbは、入力画像511の一例である。同図におけるaおよびbに例示するように、背景画像510に対して入力画像511には照度変化がほとんどなく、動体も写っていない。
FIG. 9 is a diagram for explaining the operation of the
図9におけるcは、入力画像511内の入力画素と、背景画像510内の背景画素とのそれぞれの輝度値の関係を示す分布図である。照度変化がほとんど無いため、各座標において、入力画素および背景画素のそれぞれの輝度値は同程度となり、各プロットは、傾き「1」の直線付近に集中する。このため、各座標の距離Dは「0」に近い値となり、距離閾値以下の距離Dの個数は、計数値判定閾値よりも多くなる。この場合に撮像装置100は、照度変化が無いと判定し、動体検出を行う。
FIG. 9C is a distribution diagram showing the relationship between the luminance values of the input pixels in the
図9におけるdは、入力画像511および背景画像510の差分画像512の一例を示す図である。この差分画像512には、差分値が差分閾値を超える領域はないため、動体が無いと判断される。
9 is a diagram illustrating an example of a
図9におけるeは、入力画像513の一例である。同図におけるaおよびeに例示するように、背景画像510に対して入力画像513には照度変化が生じており、動体は写っていない。
E in FIG. 9 is an example of the
図9におけるfは、入力画像513内の入力画素と、背景画像510内の背景画素とのそれぞれの輝度値の関係を示す分布図である。照度変化があったため、各座標において、入力画素および背景画素のそれぞれの輝度値は異なる値となり、座標に対応するプロットは、照度の変化率に応じた傾きの直線付近に集中する。このため、各座標の距離Dは「0」より大きな値となることが多くなり、距離閾値以下の距離Dの個数は、計数値判定閾値よりも少なくなる。この場合に撮像装置100は、照度変化があったと判定し、動体検出を停止し、露光制御を行う。
In FIG. 9, f is a distribution diagram showing the relationship between the luminance values of the input pixels in the
図9におけるgは、露光制御後の入力画像514の一例を示す図である。露光制御により、入力画像514の明るさは、背景画像510と同程度になっている。
9 is a diagram illustrating an example of the
図9におけるhは、入力画像515の一例である。同図におけるaおよびhに例示するように、背景画像510に対して入力画像515には照度変化が無く、人間516が写っている。
In FIG. 9, h is an example of the
図9におけるiは、入力画像515内の入力画素と、背景画像510内の背景画素とのそれぞれの輝度値の関係を示す分布図である。照度変化が無いため、各座標において、入力画素および背景画素のそれぞれの輝度値は同程度となり、各プロットは、傾き「1」の直線付近に集中する。このため、各座標の距離Dは「0」に近い値となり、距離閾値以下の距離Dの個数は、計数値判定閾値よりも多くなる。この場合に撮像装置100は、照度変化が無いと判定し、動体検出を行う。
I in FIG. 9 is a distribution diagram showing the relationship between the luminance values of the input pixels in the
図9におけるjは、入力画像515および背景画像510の差分画像517の一例を示す図である。この差分画像517には、差分値が差分閾値を超える領域518が存在し、この領域に対応する領域が入力画像515において動体として検出される。
9 is a diagram illustrating an example of a
このように、各画素の距離D(相違度)が「0」付近に集中しているか否かにより、撮像装置100は、照度変化の有無を正確に判定することができる。なお、入力画像の輝度の平均値と、背景画像の輝度の平均値とを比較することによっても撮像装置100は照度変化の有無を判定することができるが、この方法では、照度変化の有無を誤って判定するおそれがある。例えば、入力画像515では、照度変化が無いものの、動体516の存在により、輝度の平均値が入力画像510と異なる値になる。このため、照度変化があったと誤って判定されるおそれがある。これに対して、距離Dが「0」付近に集中する否かという分布の状態は、動体が写った入力画像515においても、あまり変化しない。このため、撮像装置100は、その分布の状態を示す計数値CNTから、照度変化の有無を正確に判定することができる。
As described above, the
なお、図9では、照度変化が生じていないことと、動体が写っていないこととの少なくとも一方を満たす入力画像(入力画像511、入力画像513および入力画像515)に対する処理について説明している。しかし、照度変化があり、かつ、動体が写った入力画像が撮像されることも想定される。その場合には、入力画像513と同様に露光制御のみが行われ、動体検出が行われない。この露光制御により、次に撮像される入力画像では、照度変化が無いと判定されるため、動体検出が行われる。したがって、この場合であっても、動体が正確に検出される。
Note that FIG. 9 illustrates processing for an input image (an
図10は、比較例における背景画像、入力画像および差分画像の一例を示す図である。この比較例では、照度変化の有無にかかわらず、入力画像の撮像のたびに撮像装置100が動体検出を行うものとする。同図におけるaは背景画像520の一例であり、同図におけるbは入力画像521の一例である。同図におけるaおよびbに例示するように、背景画像520に対して入力画像521には照度変化が生じており、動体は写っていない。
FIG. 10 is a diagram illustrating an example of the background image, the input image, and the difference image in the comparative example. In this comparative example, it is assumed that the
図10におけるcは、背景画像520および入力画像521の差分画像522の一例である。この差分画像522においては、照度変化により、輝度の差分が閾値以上となる領域523および524が生じている。この比較例においては、これらの領域が動体として誤って検出されてしまう。これに対して、撮像装置100は、照度変化があった場合に、動体の検出を行わないため、そのような誤検出を防止することができる。
C in FIG. 10 is an example of the
このように、本技術の第1の実施の形態によれば、撮像装置100は、画素値の相違度の分布の状態から照度変化の有無を判定し、照度変化があれば動体の検出を停止するため、照度変化時の動体の誤検出を防止することができる。これにより、照明の変化に左右されることなく、動体の検出精度を向上させることができる。
As described above, according to the first embodiment of the present technology, the
[第1の変形例]
上述の第1の実施の形態では、式5より輝度値の差分を距離D(相違度)として検出していたが、照度の変化率が一定の場合、式4および式5より入力輝度が低いほど距離Dが小さくなり、距離閾値以下になるおそれが高くなる。このため、入力画像が比較的暗い場合には、照度変化があるにも関わらず、照度変化が無いと誤って判定されるおそれが高くなる。輝度の対数の差分を相違度として求めれば、照度変化があった場合に、入力輝度が低くても距離Dが十分に大きくなり、そのような誤判定を防止することができる。この第1の変形例の撮像装置100は、入力画素および背景画素の画素値の対数の差分を相違度として求める点において、第1の実施の形態と異なる。
[First Modification]
In the first embodiment described above, the difference in luminance value is detected as the distance D (difference) from Equation 5, but when the change rate of illuminance is constant, the input luminance is lower than Equation 4 and Equation 5. The closer the distance D is, the higher the risk that it will be below the distance threshold. For this reason, when the input image is relatively dark, there is a high possibility that it is erroneously determined that there is no illuminance change despite the illuminance change. If the logarithmic difference in luminance is obtained as the degree of difference, the distance D becomes sufficiently large even if the input luminance is low when there is a change in illuminance, and such erroneous determination can be prevented. The
変形例の撮像装置100は、式5の代わりに次式により距離Dを求める。
D=abs{(log(x0)−log(y0)}/21/2 ・・・式6
The
D = abs {(log (x 0 ) −log (y 0 )} / 2 1/2 Formula 6
図11は、第1の実施の形態の第1の変形例における照度変化判定処理の一例を示すフローチャートである。変形例の照度変化判定処理は、ステップS913の代わりにステップS919を実行する点において第1の実施の形態と異なる。 FIG. 11 is a flowchart illustrating an example of illuminance change determination processing according to the first modification of the first embodiment. The illumination intensity change determination process of the modification is different from the first embodiment in that step S919 is executed instead of step S913.
ステップS919において、撮像装置100は、座標(m,n)に対応するプロットと、傾き「1」の直線との間の距離Dを式6により、ログスケールで算出する。
In step S <b> 919, the
図12は、第1の実施の形態の第1の変形例における距離Dの算出方法を説明するための図である。同図におけるaは、照度変化があった場合の入力画素および背景画素のそれぞれの輝度値の関係を示す図である。同図におけるaの縦軸は入力画素の輝度値であり、横軸は背景画素の輝度値である。照度変化があった場合、照度の変化率に応じた傾きの直線付近に、プロット531およびプロット532などのプロットが集中する。プロット532は、入力輝度が比較的高く、そのために式5より距離Dが比較的大きくなる。このため、距離Dは距離閾値より大きくなる。一方、プロット531は、入力輝度が比較的低く、そのために式5より距離Dが比較的小さくなる。このため、距離Dが距離閾値以下になるおそれがある。
FIG. 12 is a diagram for explaining a calculation method of the distance D in the first modification example of the first embodiment. A in the same figure is a figure which shows the relationship between the luminance value of each of an input pixel and a background pixel at the time of illuminance change. In the figure, the vertical axis of a is the luminance value of the input pixel, and the horizontal axis is the luminance value of the background pixel. When there is a change in illuminance, plots such as the
このように、式5では入力輝度が低いほど距離Dが小さくなるため、入力画像が比較的暗い場合には、照度変化があるにも関わらず、照度変化が無いと誤って判定されるおそれが高くなる。 Thus, since the distance D becomes smaller as the input luminance is lower in Equation 5, when the input image is relatively dark, there is a possibility that it is erroneously determined that there is no illuminance change despite the illuminance change. Get higher.
一方、図12におけるbは、照度変化があった場合の入力画素および背景画素のそれぞれの輝度値の対数の関係を示す図である。同図におけるbの縦軸は入力画素の輝度値の対数であり、横軸は背景画素の輝度値の対数である。照度変化があった場合、照度の変化率に応じた傾きの直線付近に、プロット533およびプロット534などのプロットが集中する。プロット533および534は、輝度が異なるがいずれの場合も、距離Dは式6より同程度になる。
On the other hand, b in FIG. 12 is a diagram illustrating a logarithmic relationship between the luminance values of the input pixel and the background pixel when the illuminance changes. In the figure, the vertical axis of b is the logarithm of the luminance value of the input pixel, and the horizontal axis is the logarithm of the luminance value of the background pixel. When there is a change in illuminance, plots such as
このように、対数の差分を求める式6では、入力輝度が低くても距離Dが変わらないため、入力画像が比較的暗い場合であっても照度変化の有無を正確に判定することができる。 As described above, in Expression 6 for calculating the logarithmic difference, the distance D does not change even when the input luminance is low. Therefore, even when the input image is relatively dark, it is possible to accurately determine whether or not the illuminance has changed.
図13は、第1の実施の形態の第1の変形例における分布図の一例である。同図におけるaは、画像内の一部の照度が変化した場合の入力画素および背景画素のそれぞれの輝度値の関係を示す図である。同図におけるaの縦軸は入力画素の輝度値であり、横軸は背景画素の輝度値である。また、点線で囲った領域内のプロットは、照度が変化した領域に対応するプロットである。これらのプロットの距離Dは、入力輝度が低いほど小さくなるため、距離閾値による切り分けが困難となる。 FIG. 13 is an example of a distribution diagram in the first modification of the first embodiment. A in the same figure is a figure which shows the relationship between each luminance value of an input pixel and a background pixel when the illumination intensity of a part in an image changes. In the figure, the vertical axis of a is the luminance value of the input pixel, and the horizontal axis is the luminance value of the background pixel. Moreover, the plot in the area | region enclosed with the dotted line is a plot corresponding to the area | region where illumination intensity changed. Since the distance D of these plots becomes smaller as the input luminance is lower, it becomes difficult to perform separation based on the distance threshold.
図13におけるbは、画像内の一部の照度が変化した場合の入力画素および背景画素のそれぞれの輝度値の対数の関係を示す図である。同図におけるbの縦軸は入力画素の輝度値の対数であり、横軸は背景画素の輝度値の対数である。また、点線で囲った領域内のプロットは、照度が変化した領域に対応するプロットである。これらのプロットの距離Dは、入力輝度が低くてもあまり変化しないため、距離閾値によって容易に分離することができる。 B in FIG. 13 is a diagram illustrating a logarithmic relationship between the luminance values of the input pixels and the background pixels when the illuminance of a part of the image changes. In the figure, the vertical axis of b is the logarithm of the luminance value of the input pixel, and the horizontal axis is the logarithm of the luminance value of the background pixel. Moreover, the plot in the area | region enclosed with the dotted line is a plot corresponding to the area | region where illumination intensity changed. Since the distance D of these plots does not change much even when the input luminance is low, it can be easily separated by the distance threshold.
このように、第1の実施の形態における第1の変形例によれば、撮像装置100は、画素値の対数の差分の分布の状態から照度変化の有無を判定するため、入力画像が比較的暗い場合における照度変化の誤判定を抑制することができる。
As described above, according to the first modification example of the first embodiment, the
[第2の変形例]
上述の第1の実施の形態では、照度変化があれば動体の検出を停止していたが、照度変化の有無にかかわらず、動体の検出を行ってもよい。例えば、ゆっくりとした照度変化が生じる場合には、動体検出を停止させる必要はない。第1の実施の形態における第2の変形例の撮像装置100は、照度変化の有無にかかわらず、動体を検出する点において第1の実施の形態と異なる。
[Second Modification]
In the first embodiment described above, detection of a moving object is stopped if there is a change in illuminance, but detection of a moving object may be performed regardless of whether or not there is a change in illuminance. For example, when a slow illuminance change occurs, it is not necessary to stop the moving object detection. The
図14は、第1の実施の形態の第2の変形例における撮像装置100の動作の一例を示すフローチャートである。第2の変形例の撮像装置100は、照度変化があった場合に(ステップS901:Yes)、露光制御処理を行う(ステップS950)。また、照度変化が無かった場合(ステップS901:No)、または、ステップS950の後に、動体の検出を行う(ステップS902)。この第2の変形例では、照度変化の有無の検出結果に基づいて露光量が適切な値に制御されるため、動体の検出精度が向上する。
FIG. 14 is a flowchart illustrating an example of the operation of the
このように、第1の実施の形態における第2の変形例によれば、撮像装置100は、照度変化の有無にかかわらず、動体を検出するため、照度変化が生じた場合であっても動体を検出することができる。
As described above, according to the second modification example of the first embodiment, the
<2.第2の実施の形態>
上述の第1の実施の形態では、輝度値の相違度の全てを用いて、照度変化の有無を判定していたが、必ずしも相違度の全てを用いる必要はない。入力画像に動体が写った場合には、その動体内のプロットは、他の値から大きく外れた値になることが多い。このような外れ値が多いと、距離Dが「0」付近に集中しているか否かを正確に判定することが困難となり、撮像装置100が照度変化の有無を誤って判定するおそれがある。したがって、外れ値を除去してから、距離Dを求めることが望ましい。第2の実施の形態の撮像装置100は、外れ値を除去してから、距離Dを求める点において第1の実施の形態と異なる。
<2. Second Embodiment>
In the first embodiment described above, the presence / absence of a change in illuminance is determined using all the differences in luminance values. However, it is not necessary to use all the differences. When a moving object appears in the input image, the plot in the moving object often has a value greatly deviating from other values. If there are many such outliers, it is difficult to accurately determine whether or not the distance D is concentrated in the vicinity of “0”, and the
図15は、第2の実施の形態における照度変化判定部200の一構成例を示すブロック図である。第2の実施の形態の照度変化判定部200は、外れ値除去部221をさらに備える点において第1の実施の形態と異なる。
FIG. 15 is a block diagram illustrating a configuration example of the illuminance
外れ値除去部221は、対応する入力画素および背景画素のそれぞれの画素値からなるプロットの集合の中から、外れ値を含むプロットを除去するものである。外れ値の除去においては、例えば、RANSAC(RANdom SAmple Consensus)アルゴリズムが用いられる。RANSACアルゴリズムの詳細については後述する。外れ値除去部221は、外れ値を除去した残りのプロットを距離算出部211に供給する。
The
図16は、第2の実施の形態における照度変化判定処理を示すフローチャートである。第2の実施の形態の照度変化判定処理は、計数値CNTの初期化前に、外れ値を除去するための外れ値除去処理(ステップS920)を実行する点において第1の実施の形態と異なる。 FIG. 16 is a flowchart illustrating an illuminance change determination process according to the second embodiment. The illuminance change determination process of the second embodiment is different from the first embodiment in that an outlier removal process (step S920) for removing an outlier is performed before the count value CNT is initialized. .
なお、第2の実施の形態においても変形例と同様に、撮像装置100は、輝度値の対数の差分を相違度として取得してもよい。
Also in the second embodiment, as in the modification example, the
図17は、第2の実施の形態の外れ値除去処理の一例を示すフローチャートである。この処理では、RANSACアルゴリズムが用いられる。撮像装置100は、ステップS922乃至S925を一定のループ回数(例えば、30)、繰り返す。
FIG. 17 is a flowchart illustrating an example of outlier removal processing according to the second embodiment. In this process, the RANSAC algorithm is used. The
撮像装置100は、2つのプロットをランダムに選択し(ステップS922)、それらのプロットを通る直線LNを取得する(ステップS923)。ここで、添え字のNは、例えば、0乃至29の整数である。撮像装置100は、プロットごとに、直線LNからの距離を式4により算出する(ステップS924)。そして、撮像装置100は、距離が一定値以下のプロットの個数PNを計数する(ステップS925)。
The
ステップS922乃至S925を一定回数、繰り返した後、撮像装置100は、PNが最も多い直線LNを選択する(ステップS926)。そして、撮像装置100は、選択したLNからの距離を式4により求め、その距離が一定値を超えるプロットを外れ値のプロットとして除去する(ステップS927)。
Step S922 to certain number of times to S925, after repeating, the
なお、撮像装置100は、ステップS924およびS927において、式4から距離を算出しているが、式4の代わりに、次式により距離を差出してもよい。
D=abs(a×log(x0)+b×log(yo)+c)/(a2+b2)1/2 ・・・式7
Note that the
D = abs (a × log ( x 0) + b × log (y o) + c) / (a 2 + b 2) 1/2 ··· Equation 7
また、撮像装置100は、外れ値の除去にRANSACアルゴリズムを用いているが、最小二乗法やM推定法におけるアルゴリズムなど、RANSACアルゴリズム以外のアルゴリズムを用いてもよい。最小二乗法やM推定法を用いる場合、撮像装置100は、それらを用いて、プロットの分布に最もフィッティングする直線ax+by=0を求め、その直線からの距離が一定値を超えるプロットを外れ値として除去すればよい。
In addition, the
図18は、第2の実施の形態におけるプロット選択前後の分布図の一例である。同図におけるaは、プロット選択前の分布図の一例であり、同図におけるbは、プロット選択後の分布図の一例である。同図におけるaおよびbの縦軸は入力画素の輝度値であり、横軸は背景画素の輝度値である。また、同図におけるbの2つの黒丸は、ランダムに選択されたプロットである。撮像装置100は、これらの2つのプロットを通る直線LNを取得する。
FIG. 18 is an example of a distribution diagram before and after selecting a plot in the second embodiment. In the figure, a is an example of a distribution chart before plot selection, and b in the figure is an example of a distribution chart after plot selection. The vertical axis of a and b in the figure is the luminance value of the input pixel, and the horizontal axis is the luminance value of the background pixel. In addition, two black circles b in FIG. 6 are randomly selected plots. The
図19は、第2の実施の形態における外れ値除去処理で計数されたプロットを示す分布図の一例である。同図における縦軸は入力画素の輝度値であり、横軸は背景画素の輝度値である。また、黒丸は、選択され、かつ、計数されるプロットである。白丸は計数されるプロットであり、斜線の丸は、計数されないプロットである。同図に例示するように、撮像装置100は、直線LNからの距離が一定値以内のプロットの個数PNを計数する。
FIG. 19 is an example of a distribution diagram showing plots counted in the outlier removal processing in the second embodiment. In the figure, the vertical axis represents the luminance value of the input pixel, and the horizontal axis represents the luminance value of the background pixel. A black circle is a plot that is selected and counted. Open circles are counted plots, and hatched circles are uncounted plots. As illustrated in the figure, the
上述の図18および図19を用いて説明した手順が、一定回数行われる。そして、撮像装置100は、PNが最も多い直線LNを選択し、その選択したLNからの距離が一定値を超えるプロットを外れ値のプロットとして除去する。
The procedure described with reference to FIGS. 18 and 19 is performed a predetermined number of times. The
図20は、第2の実施の形態における入力画像および外れ値除去前後の分布図の一例である。同図におけるaは、入力画像551の一例を示す図である。この入力画像551には動体は写っておらず、照度変化が生じている。同図におけるbは、外れ値除去前の入力画像551の入力画素および背景画素のそれぞれの輝度値の対数の関係を示す分布図である。同図におけるcは、外れ値除去後の入力画像551の入力画素および背景画素のそれぞれの輝度値の対数の関係を示す分布図である。同図におけるbおよびcの縦軸は、入力画素の輝度値の対数であり、横軸は、背景画素の輝度値の対数である。同図におけるbおよびcに例示するように、照度変化の影響による外れ値が十分に除去されている。このため、撮像装置100は、それぞれのプロットの距離Dが「0」付近に集中しているか否かを正確に判断することができる。
FIG. 20 is an example of an input image and a distribution diagram before and after outlier removal in the second embodiment. In the figure, a is a diagram showing an example of the
同図におけるdは、入力画像552の一例を示す図である。この入力画像552には動体は写っており、照度変化はない。同図におけるeは、外れ値除去前の入力画像552の入力画素および背景画素のそれぞれの輝度値の対数の関係を示す分布図である。同図におけるfは、外れ値除去後の入力画像552の入力画素および背景画素のそれぞれの輝度値の対数の関係を示す分布図である。同図におけるeおよびfの縦軸は、入力画素の輝度値の対数であり、横軸は、背景画素の輝度値の対数である。同図におけるeおよびfに例示するように、動体の影響による外れ値が十分に除去されている。このため、撮像装置100は、それぞれのプロットの距離Dが「0」付近に集中しているか否かを正確に判断することができる。
In the figure, d is a diagram showing an example of the
このように、本技術の第2の実施の形態によれば、撮像装置100は、外れ値のプロットを除去してから距離D(相違度)を算出するため、各プロットの距離Dが「0」付近に集中しているか否かを正確に判定することができる。これにより、動体を正確に検出することができる。
Thus, according to the second embodiment of the present technology, since the
<3.第3の実施の形態>
上述の第1の実施の形態では、撮像装置100は、「0」付近の距離閾値以下の距離Dの個数を計数し、その計数値CNTと計数値判定閾値との比較結果に基づいて距離Dが「0」付近に集中して分布しているか否かを判定していた。しかし、撮像装置100は、距離Dの最頻値を求め、その最頻値と所定の最頻値判定閾値との比較結果から、距離Dの分布の状態を求めることもできる。計数値CNTを求める構成では画像の画素数が多いほど計数値CNTが多くなるため、画素数に応じて計数値判定閾値を変更する必要がある。一方、距離Dの最頻値は画素数に依存しないため、最頻値を求める方法では画素数に応じて最頻値判定閾値を変更する必要はない。この第3の実施の形態の撮像装置100は、距離Dの最頻値を求め、その最頻値から、距離Dの分布の状態を求める点において第1の実施の形態と異なる。
<3. Third Embodiment>
In the first embodiment described above, the
図21は、第3の実施の形態における照度変化判定部200の一構成例を示すブロック図である。第3の実施の形態の照度変化判定部200は、距離比較部212、計数部213および計数値比較部214の代わりに、ヒストグラム生成部231、最頻値取得部232および最頻値比較部233を備える点において第1の実施の形態と異なる。
FIG. 21 is a block diagram illustrating a configuration example of the illuminance
第3の実施の形態の距離算出部211は、式5の代わりに次式により距離を算出してヒストグラム生成部231に供給する。
D={log(x0)−log(y0)}/21/2 ・・・式8
The
D = {log (x 0 ) −log (y 0 )} / 2 1/2 Formula 8
なお、距離算出部211は、式8の代わりに次式により距離Dを算出してもよい。
D=(x0−y0)/21/2 ・・・式9
The
D = (x 0 −y 0 ) / 2 1/2 Formula 9
ヒストグラム生成部231は、距離Dごとに、その距離が算出された回数を度数として示すヒストグラムを生成するものである。
For each distance D, the
最頻値取得部232は、ヒストグラムにおいて度数が最も大きい距離を最頻値として取得するものである。
The mode
最頻値比較部233は、最頻値の絶対値と所定の最頻値判定閾値とを比較して、最頻値が最頻値判定閾値よりも大きいか否かを判定するものである。最頻値判定閾値には、変化量dLが大きいほど大きな所定の実数が設定される。この最頻値比較部233は、その比較結果を照度変化判定結果として出力する。
The mode
図22は、第3の実施の形態における分布図およびヒストグラムの一例である。同図におけるaは、照度変化があった場合の入力画素および背景画素のそれぞれの輝度値の関係を示す分布図の一例である。同図におけるaの縦軸は、入力画素の輝度値であり、横軸は背景画素の輝度値である。 FIG. 22 is an example of a distribution diagram and a histogram in the third embodiment. In the figure, a is an example of a distribution diagram showing the relationship between the luminance values of the input pixel and the background pixel when there is a change in illuminance. In the figure, the vertical axis a represents the luminance value of the input pixel, and the horizontal axis represents the luminance value of the background pixel.
また、図22におけるbは、照度変化があった場合の入力画素および背景画素のそれぞれの輝度値の対数の関係を示す分布図の一例である。同図におけるbの縦軸は、入力画素の輝度値の対数であり、横軸は背景画素の輝度値の対数である。同図におけるaおよびbに例示するように、照度変化があった場合には、傾きが「1」と異なる直線付近にプロットが集中する。それらのプロットを、傾き「−1」、切片「0」の直線上に投影すると、距離Dごとの度数を示すヒストグラムが得られる。 Further, b in FIG. 22 is an example of a distribution diagram showing a logarithmic relationship between the luminance values of the input pixel and the background pixel when there is a change in illuminance. The vertical axis of b in the figure is the logarithm of the luminance value of the input pixel, and the horizontal axis is the logarithm of the luminance value of the background pixel. As illustrated in a and b in the figure, when there is a change in illuminance, the plot concentrates in the vicinity of a straight line having a slope different from “1”. When these plots are projected on a straight line having a slope “−1” and an intercept “0”, a histogram indicating the frequency for each distance D is obtained.
図22におけるcは、照度変化があった場合の距離Dごとの度数を示すヒストグラムの一例である。同図におけるcの縦軸は、度数であり、横軸は距離Dである。このヒストグラムにおいて、撮像装置100は、度数が最も高い距離Dを最頻値として求める。照度変化があった場合には、距離Dが「0」付近に集中しないため、距離Dの最頻値は、0から離れた値となる。
C in FIG. 22 is an example of a histogram indicating the frequency for each distance D when there is a change in illuminance. The vertical axis of c in the figure is the frequency, and the horizontal axis is the distance D. In this histogram, the
図23は、第3の実施の形態における照度変化判定処理を示すフローチャートである。撮像装置100は、全てのプロットについて、座標(m,n)に対応するプロットと、傾き「1」の直線との間の距離Dを式8により、ログスケールで算出する(ステップS919)。
FIG. 23 is a flowchart illustrating an illuminance change determination process according to the third embodiment. The
そして、撮像装置100は、距離Dごとの度数を示すヒストグラムを生成し(ステップS930)、そのヒストグラムにおいて、度数が最も多い距離Dを最頻値として求める(ステップS931)。
The
撮像装置100は、最頻値が最頻値判定閾値以下であるか否かを判定する(ステップS932)。最頻値が最頻値判定閾値以下である場合に(ステップS932:Yes)、撮像装置100は、照度変化判定フラグに「0」を設定する(ステップS917)。一方、最頻値が最頻値判定閾値より大きい場合に(ステップS932:No)、撮像装置100は、照度変化判定フラグに「1」を設定する(ステップS918)。ステップS917またはS918の後、撮像装置100は、照度変化判定処理を終了する。
The
図24は、第3の実施の形態における撮像装置100の動作を説明するための図である。同図におけるaは、照度変化がなく、動体が写っていない入力画像561の一例である。同図におけるbは、入力画像561の入力画素および背景画素のそれぞれの輝度値の対数の関係を示す分布図の一例である。同図におけるbの縦軸は、入力画素の輝度値の対数であり、横軸は背景画素の輝度値の対数である。同図におけるbに例示するように、照度変化がないため、距離Dは、「0」付近に集中する。
FIG. 24 is a diagram for explaining the operation of the
図24におけるcは、入力画像561および背景画像から生成されたヒストグラムの一例である。同図におけるcの縦軸は度数であり、横軸は距離Dである。同図におけるcでは、度数が最も高い距離D(最頻値)は「0」である。最頻値が最頻値判定閾値以下であるため、入力画像561において動体検出が行われる。同図におけるdは、入力画像561および背景画像の差分画像562の一例である。この差分画像562では、差分が閾値以上の領域がなく、動体が検出されない。
C in FIG. 24 is an example of a histogram generated from the
図24におけるeは、照度変化があり、動体が写っていない入力画像563の一例である。同図におけるfは、入力画像563の入力画素および背景画素のそれぞれの輝度値の対数の関係を示す分布図の一例である。同図におけるfの縦軸は、入力画素の輝度値の対数であり、横軸は背景画素の輝度値の対数である。同図におけるfに例示するように、照度変化があったため、距離Dは、「0」付近に集中しない。
E in FIG. 24 is an example of an
図24におけるgは、入力画像563および背景画像から生成されたヒストグラムの一例である。同図におけるgの縦軸は度数であり、横軸は距離Dである。同図におけるgでは、度数が最も高い距離D(最頻値)は「0」より大きく、最頻値判定閾値を超える。最頻値が最頻値判定閾値より大きいため、入力画像563において動体検出は行われず、露光制御が行われる。同図におけるhは、露光制御後の入力画像564の一例である。
24 is an example of a histogram generated from the
図24におけるiは、照度変化がなく、人間566が写った入力画像565の一例である。同図におけるjは、入力画像565の入力画素および背景画素のそれぞれの輝度値の対数の関係を示す分布図の一例である。同図におけるjの縦軸は、入力画素の輝度値の対数であり、横軸は背景画素の輝度値の対数である。同図におけるjに例示するように、照度変化がないため、距離Dは、「0」付近に集中する。
In FIG. 24, i is an example of an
図24におけるkは、入力画像565および背景画像から生成されたヒストグラムの一例である。同図におけるkの縦軸は度数であり、横軸は距離Dである。同図におけるkでは、度数が最も高い距離D(最頻値)は「0」である。最頻値が最頻値判定閾値以下であるため、入力画像565において動体検出が行われる。同図におけるhは、入力画像565および背景画像の差分画像567の一例である。この差分画像567においては、人間566に対応する領域568が、動体として検出される。
24 is an example of a histogram generated from the
このように、本技術の第3の実施の形態によれば、撮像装置100は、距離Dの最頻値が閾値以下であるか否かにより照度変化の有無を判定するため、様々な画素数の入力画像において、動体を正確に検出することができる。
As described above, according to the third embodiment of the present technology, the
なお、上述の実施の形態は本技術を具現化するための一例を示したものであり、実施の形態における事項と、特許請求の範囲における発明特定事項とはそれぞれ対応関係を有する。同様に、特許請求の範囲における発明特定事項と、これと同一名称を付した本技術の実施の形態における事項とはそれぞれ対応関係を有する。ただし、本技術は実施の形態に限定されるものではなく、その要旨を逸脱しない範囲において実施の形態に種々の変形を施すことにより具現化することができる。 The above-described embodiment shows an example for embodying the present technology, and the matters in the embodiment and the invention-specific matters in the claims have a corresponding relationship. Similarly, the invention specific matter in the claims and the matter in the embodiment of the present technology having the same name as this have a corresponding relationship. However, the present technology is not limited to the embodiment, and can be embodied by making various modifications to the embodiment without departing from the gist thereof.
また、上述の実施の形態において説明した処理手順は、これら一連の手順を有する方法として捉えてもよく、また、これら一連の手順をコンピュータに実行させるためのプログラム乃至そのプログラムを記憶する記録媒体として捉えてもよい。この記録媒体として、例えば、CD(Compact Disc)、MD(MiniDisc)、DVD(Digital Versatile Disc)、メモリカード、ブルーレイディスク(Blu-ray(登録商標)Disc)等を用いることができる。 Further, the processing procedure described in the above embodiment may be regarded as a method having a series of these procedures, and a program for causing a computer to execute these series of procedures or a recording medium storing the program. You may catch it. As this recording medium, for example, a CD (Compact Disc), an MD (MiniDisc), a DVD (Digital Versatile Disc), a memory card, a Blu-ray disc (Blu-ray (registered trademark) Disc), or the like can be used.
なお、ここに記載された効果は必ずしも限定されるものではなく、本開示中に記載されたいずれかの効果であってもよい。 Note that the effects described here are not necessarily limited, and may be any of the effects described in the present disclosure.
なお、本技術は以下のような構成もとることができる。
(1)入力画素が配列された入力画像が入力されるたびに当該入力画像と基準画素が配列された基準画像とにおいて前記基準画素と当該基準画素に対応する前記入力画素とのそれぞれの画素値の相違度を前記入力画素ごとに取得する相違度取得部と、
前記基準画像および前記入力画像のそれぞれを撮像した際の所定変化量を超える照度変化の有無を前記入力画素ごとの前記相違度の分布の状態に基づいて判定する判定部と
を具備する画像処理装置。
(2)前記入力画像について動体の検出を行う動体検出部をさらに具備する
前記(1)記載の画像処理装置。
(3)前記判定部は、前記照度変化があった場合には前記動体の検出を停止させる
前記(2)記載の画像処理装置。
(4)前記動体検出部は、前記入力画像および前記基準画像の差分画像を生成して当該差分画像において差分が所定の差分閾値より大きい領域を前記動体として検出する前記(2)または(3)記載の画像処理装置。
(5)前記分布において所定範囲内の値の前記相違度の個数を計数して計数値を出力する計数部をさらに具備し、
前記判定部は、前記計数値が所定の計数値判定閾値を超えるか否かにより前記照度変化の有無を判定する前記(1)から(4)のいずれかに記載の画像処理装置。
(6)前記分布において前記相違度の最頻値を求める最頻値取得部をさらに具備し、
前記判定部は、前記最頻値が所定範囲内にあるか否かにより前記照度変化の有無を判定する前記(1)から(5)のいずれかに記載の画像処理装置。
(7)前記基準画素と当該基準画素に対応する前記入力画素とのそれぞれの画素値からなる組の集合から外れ値を含む組を除去する外れ値除去部をさらに具備し、
前記相違度取得部は、前記外れ値を含む組が除去された前記集合において前記相違度を取得する前記(1)から(6)のいずれかに記載の画像処理装置。
(8)前記相違度取得部は、前記基準画素の画素値の対数と前記入力画素の画素値の対数との差分を前記相違度として取得する前記(1)から(7)のいずれかに記載の画像処理装置。
(9)入力画素が配列された入力画像を時系列順に撮像する撮像部と、
前記入力画像が入力されるたびに当該入力画像と基準画素が配列された基準画像とにおいて前記基準画素と当該基準画素に対応する前記入力画素とのそれぞれの画素値の相違度を前記入力画素ごとに取得する相違度取得部と、
前記基準画像および前記入力画像のそれぞれを撮像した際の所定変化量を超える照度変化の有無を前記入力画素ごとの前記相違度の分布の状態に基づいて判定する判定部と
を具備する撮像装置。
(10)前記照度変化が無い場合には前記撮像部の露光量を所定量に制御する露光制御部をさらに具備する前記(9)記載の撮像装置。
(11)相違度取得部が、入力画素が配列された入力画像が入力されるたびに当該入力画像と基準画素が配列された基準画像とにおいて前記基準画素と当該基準画素に対応する前記入力画素とのそれぞれの画素値の相違度を前記入力画素ごとに取得する相違度取得手順と、
判定部が、前記基準画像および前記入力画像のそれぞれを撮像した際の所定変化量を超える照度変化の有無を前記入力画素ごとの前記相違度の分布の状態に基づいて判定する判定手順と
を具備する画像処理方法。
(12) 相違度取得部が、入力画素が配列された入力画像が入力されるたびに当該入力画像と基準画素が配列された基準画像とにおいて前記基準画素と当該基準画素に対応する前記入力画素とのそれぞれの画素値の相違度を前記入力画素ごとに取得する相違度取得手順と、
判定部が、前記基準画像および前記入力画像のそれぞれを撮像した際の所定変化量を超える照度変化の有無を前記入力画素ごとの前記相違度の分布の状態に基づいて判定する判定手順と
をコンピュータに実行させるためのプログラム。
In addition, this technique can also take the following structures.
(1) Each time an input image in which input pixels are arranged is input, each pixel value of the reference pixel and the input pixel corresponding to the reference pixel in the input image and the reference image in which the reference pixels are arranged A difference degree acquisition unit for acquiring the difference degree for each input pixel;
An image processing apparatus comprising: a determination unit that determines whether or not there is an illuminance change exceeding a predetermined change amount when each of the reference image and the input image is captured based on a distribution state of the difference for each input pixel; .
(2) The image processing apparatus according to (1), further including a moving object detection unit that detects a moving object for the input image.
(3) The image processing apparatus according to (2), wherein the determination unit stops the detection of the moving object when the illuminance changes.
(4) The moving object detection unit generates a difference image between the input image and the reference image, and detects, as the moving object, a region having a difference larger than a predetermined difference threshold in the difference image. The image processing apparatus described.
(5) further comprising a counting unit that counts the number of the dissimilarities of values within a predetermined range in the distribution and outputs a count value;
The image processing apparatus according to any one of (1) to (4), wherein the determination unit determines the presence or absence of the illuminance change based on whether or not the count value exceeds a predetermined count value determination threshold.
(6) A mode value obtaining unit for obtaining a mode value of the dissimilarity in the distribution is further provided,
The image processing apparatus according to any one of (1) to (5), wherein the determination unit determines the presence or absence of the illuminance change based on whether or not the mode value is within a predetermined range.
(7) further comprising an outlier removal unit that removes a set including an outlier from a set of sets of pixel values of the reference pixel and the input pixel corresponding to the reference pixel;
The image processing apparatus according to any one of (1) to (6), wherein the dissimilarity acquisition unit acquires the dissimilarity in the set from which the set including the outlier is removed.
(8) The difference degree acquisition unit acquires the difference between the logarithm of the pixel value of the reference pixel and the logarithm of the pixel value of the input pixel as the difference degree, according to any one of (1) to (7). Image processing apparatus.
(9) an imaging unit that captures an input image in which input pixels are arranged in time-series order;
Each time the input image is input, the difference between the pixel values of the reference pixel and the input pixel corresponding to the reference pixel in the input image and the reference image in which the reference pixels are arranged is determined for each input pixel. A difference degree acquisition unit to be acquired
An imaging apparatus comprising: a determination unit that determines whether or not there is an illuminance change that exceeds a predetermined change amount when each of the reference image and the input image is captured based on a distribution state of the difference for each input pixel.
(10) The imaging apparatus according to (9), further including an exposure control unit that controls an exposure amount of the imaging unit to a predetermined amount when there is no change in the illuminance.
(11) Each time the input image in which the input pixels are arranged is input, the difference degree acquisition unit includes the reference pixel and the input pixel corresponding to the reference pixel in the reference image in which the reference pixel is arranged. A difference degree acquisition procedure for acquiring a difference degree of each pixel value for each of the input pixels;
A determination procedure for determining whether or not there is an illuminance change exceeding a predetermined change amount when each of the reference image and the input image is captured based on the distribution state of the difference for each of the input pixels. Image processing method.
(12) Each time the input image in which the input pixels are arranged is input, the difference degree acquisition unit includes the reference pixels and the input pixels corresponding to the reference pixels in the reference image in which the reference pixels are arranged. A difference degree acquisition procedure for acquiring a difference degree of each pixel value for each of the input pixels;
A determination procedure in which the determination unit determines whether or not there is an illuminance change exceeding a predetermined change amount when each of the reference image and the input image is captured based on the distribution state of the difference for each input pixel. A program to make it run.
100 撮像装置
110 撮像部
120 画像処理部
121 ホワイトバランス処理部
122 デモザイク処理部
123 動体検出部
130 露光制御部
140 背景画像記憶部
150 動画記録部
200 照度変化判定部
211 距離算出部
212 距離比較部
213 計数部
214 計数値比較部
221 外れ値除去部
231 ヒストグラム生成部
232 最頻値取得部
233 最頻値比較部
DESCRIPTION OF
Claims (11)
前記基準画像および前記入力画像のそれぞれを撮像した際の所定変化量を超える照度変化の有無を前記入力画素ごとの前記相違度の分布の状態に基づいて判定する判定部と
を具備し、
前記相違度取得部は、前記基準画素の画素値の対数と前記入力画素の画素値の対数との差分を前記相違度として取得する
画像処理装置。 Each time an input image in which input pixels are arranged is input, the difference in pixel value between the reference pixel and the input pixel corresponding to the reference pixel in the input image and the reference image in which the reference pixels are arranged For each input pixel,
A determination unit that determines whether or not there is an illuminance change exceeding a predetermined change amount when each of the reference image and the input image is captured based on a state of distribution of the difference for each input pixel ;
The image processing apparatus acquires the difference between the logarithm of the pixel value of the reference pixel and the logarithm of the pixel value of the input pixel as the dissimilarity .
請求項1記載の画像処理装置。 The image processing apparatus according to claim 1, further comprising a moving object detection unit configured to detect a moving object for the input image.
請求項2記載の画像処理装置。 The image processing apparatus according to claim 2, wherein the determination unit stops the detection of the moving object when the illuminance change occurs.
前記判定部は、前記計数値が所定の計数値判定閾値を超えるか否かにより前記照度変化の有無を判定する請求項1記載の画像処理装置。 A counter that counts the number of the dissimilarities of values within a predetermined range in the distribution and outputs a count value;
The image processing apparatus according to claim 1, wherein the determination unit determines the presence or absence of the illuminance change based on whether or not the count value exceeds a predetermined count value determination threshold.
前記判定部は、前記最頻値が所定範囲内にあるか否かにより前記照度変化の有無を判定する請求項1記載の画像処理装置。 A mode value obtaining unit for obtaining a mode value of the dissimilarity in the distribution;
The image processing apparatus according to claim 1, wherein the determination unit determines the presence or absence of the illuminance change based on whether or not the mode value is within a predetermined range.
前記相違度取得部は、前記外れ値を含む組が除去された前記集合において前記相違度を取得する請求項1記載の画像処理装置。 An outlier removal unit that removes a set including an outlier from a set of pixel values of the reference pixel and the input pixel corresponding to the reference pixel;
The image processing apparatus according to claim 1, wherein the dissimilarity acquisition unit acquires the dissimilarity in the set from which the set including the outlier is removed.
前記入力画像が入力されるたびに当該入力画像と基準画素が配列された基準画像とにおいて前記基準画素と当該基準画素に対応する前記入力画素とのそれぞれの画素値の相違度を前記入力画素ごとに取得する相違度取得部と、
前記基準画像および前記入力画像のそれぞれを撮像した際の所定変化量を超える照度変化の有無を前記入力画素ごとの前記相違度の分布の状態に基づいて判定する判定部と
を具備し、
前記相違度取得部は、前記基準画素の画素値の対数と前記入力画素の画素値の対数との差分を前記相違度として取得する
撮像装置。 An imaging unit for imaging an input image in which input pixels are arranged in time-series order;
Each time the input image is input, the difference between the pixel values of the reference pixel and the input pixel corresponding to the reference pixel in the input image and the reference image in which the reference pixels are arranged is determined for each input pixel. A difference degree acquisition unit to be acquired
A determination unit that determines whether or not there is an illuminance change exceeding a predetermined change amount when each of the reference image and the input image is captured based on a state of distribution of the difference for each input pixel ;
The imaging device is an imaging device that acquires a difference between a logarithm of a pixel value of the reference pixel and a logarithm of a pixel value of the input pixel as the difference .
判定部が、前記基準画像および前記入力画像のそれぞれを撮像した際の所定変化量を超える照度変化の有無を前記入力画素ごとの前記相違度の分布の状態に基づいて判定する判定手順と
を具備し、
前記相違度取得部は、前記基準画素の画素値の対数と前記入力画素の画素値の対数との差分を前記相違度として取得する
画像処理方法。 Each time the input image in which the input pixels are arranged is input, the difference degree acquisition unit includes the reference pixel and the input pixel corresponding to the reference pixel in the reference image in which the reference pixel is arranged. A degree-of-difference acquisition procedure for acquiring the degree of difference in pixel values for each of the input pixels;
A determination procedure for determining whether or not there is an illuminance change exceeding a predetermined change amount when each of the reference image and the input image is captured based on the distribution state of the difference for each of the input pixels. And
The image processing method, wherein the difference acquisition unit acquires a difference between a logarithm of a pixel value of the reference pixel and a logarithm of a pixel value of the input pixel as the difference .
判定部が、前記基準画像および前記入力画像のそれぞれを撮像した際の所定変化量を超える照度変化の有無を前記入力画素ごとの前記相違度の分布の状態に基づいて判定する判定手順と
をコンピュータに実行させるためのプログラムであって、
前記相違度取得部は、前記基準画素の画素値の対数と前記入力画素の画素値の対数との差分を前記相違度として取得する
プログラム。 Each time the input image in which the input pixels are arranged is input, the difference degree acquisition unit includes the reference pixel and the input pixel corresponding to the reference pixel in the reference image in which the reference pixel is arranged. A degree-of-difference acquisition procedure for acquiring the degree of difference in pixel values for each of the input pixels;
A determination procedure in which the determination unit determines whether or not there is an illuminance change exceeding a predetermined change amount when each of the reference image and the input image is captured based on the distribution state of the difference for each input pixel. a program to be executed by a,
The difference acquisition unit acquires a difference between a logarithm of a pixel value of the reference pixel and a logarithm of a pixel value of the input pixel as the difference.
program.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2015014891A JP6463153B2 (en) | 2015-01-29 | 2015-01-29 | Image processing apparatus, imaging apparatus, image processing method, and program |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2015014891A JP6463153B2 (en) | 2015-01-29 | 2015-01-29 | Image processing apparatus, imaging apparatus, image processing method, and program |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2016140000A JP2016140000A (en) | 2016-08-04 |
| JP6463153B2 true JP6463153B2 (en) | 2019-01-30 |
Family
ID=56560528
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2015014891A Expired - Fee Related JP6463153B2 (en) | 2015-01-29 | 2015-01-29 | Image processing apparatus, imaging apparatus, image processing method, and program |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP6463153B2 (en) |
Family Cites Families (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2002290959A (en) * | 2001-03-23 | 2002-10-04 | Fujitsu General Ltd | Intruder detection method and device |
| JP2009169717A (en) * | 2008-01-17 | 2009-07-30 | Meidensha Corp | Intruder detecting apparatus by image processing |
| JP5710230B2 (en) * | 2010-12-07 | 2015-04-30 | 株式会社日立国際電気 | Monitoring system and monitoring method |
-
2015
- 2015-01-29 JP JP2015014891A patent/JP6463153B2/en not_active Expired - Fee Related
Also Published As
| Publication number | Publication date |
|---|---|
| JP2016140000A (en) | 2016-08-04 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US9607240B2 (en) | Image processing apparatus, image capturing apparatus, image processing method, image capturing method, and non-transitory computer-readable medium for focus bracketing | |
| US9609355B2 (en) | Image processing apparatus to which moving vector search technique is applicable, control method therefor, and storage medium storing control program therefor | |
| JP5979553B2 (en) | Image processing apparatus, imaging apparatus, and image processing method | |
| US10063779B2 (en) | Image processing apparatus, image capturing apparatus, image processing method, and storage medium | |
| JP6570296B2 (en) | Image processing apparatus, image processing method, and program | |
| US9582868B2 (en) | Image processing apparatus that appropriately performs tone correction in low-illuminance environment, image processing method therefor, and storage medium | |
| CN110008795B (en) | Image target tracking method and system and computer readable recording medium | |
| JP2015035658A (en) | Image processing apparatus, image processing method, and imaging apparatus | |
| US9438832B2 (en) | Image processing apparatus and image processing method | |
| US9836847B2 (en) | Depth estimation apparatus, imaging device, and depth estimation method | |
| JPWO2012137621A1 (en) | Image processing method and apparatus | |
| CN109819206B (en) | Object tracking method based on image, system thereof and computer readable storage medium | |
| JP2012034024A (en) | Image processor, image processing method, and program | |
| JP5968379B2 (en) | Image processing apparatus and control method thereof | |
| US9536169B2 (en) | Detection apparatus, detection method, and storage medium | |
| JP6395429B2 (en) | Image processing apparatus, control method thereof, and storage medium | |
| JP6305232B2 (en) | Information processing apparatus, imaging apparatus, imaging system, information processing method, and program. | |
| JP5610106B1 (en) | Foreign matter information detection device and foreign matter information detection method for imaging apparatus | |
| JP6091172B2 (en) | Feature point detection apparatus and program | |
| EP2775422A2 (en) | Object detection apparatus, program, and integrated circuit | |
| US20180150966A1 (en) | System and method for estimating object size | |
| JP6463153B2 (en) | Image processing apparatus, imaging apparatus, image processing method, and program | |
| US10965877B2 (en) | Image generating method and electronic apparatus | |
| US10467730B2 (en) | Image-processing apparatus to reduce staircase artifacts from an image signal | |
| JP2016114785A (en) | Imaging device, imaging method and imaging program |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A711 | Notification of change in applicant |
Free format text: JAPANESE INTERMEDIATE CODE: A712 Effective date: 20160720 |
|
| RD03 | Notification of appointment of power of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7423 Effective date: 20160721 |
|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20180109 |
|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20180925 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20181002 |
|
| A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20181115 |
|
| 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: 20181204 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20181228 |
|
| R150 | Certificate of patent or registration of utility model |
Ref document number: 6463153 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
| LAPS | Cancellation because of no payment of annual fees |