JP6798304B2 - Image processing device, program - Google Patents
Image processing device, program Download PDFInfo
- Publication number
- JP6798304B2 JP6798304B2 JP2016251017A JP2016251017A JP6798304B2 JP 6798304 B2 JP6798304 B2 JP 6798304B2 JP 2016251017 A JP2016251017 A JP 2016251017A JP 2016251017 A JP2016251017 A JP 2016251017A JP 6798304 B2 JP6798304 B2 JP 6798304B2
- Authority
- JP
- Japan
- Prior art keywords
- region
- area
- disturbance
- reduced
- image
- 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
Links
Images
Landscapes
- Image Analysis (AREA)
Description
本発明は画像処理装置と画像処理に用いるプログラムに関する。 The present invention relates to an image processing apparatus and a program used for image processing.
特許文献1には、動画像を形成する2つの画像である第1画像と第2画像を取得し、画素を表す特徴値の増加領域の面積と特徴値の減少領域の面積との偏り度合いを表す偏り度を算出することが開示されている。この偏り度に基づいて、第1画像と第2画像が画像処理に適するか否かを判定する。これによりわずかな面積の外乱であっても外乱を適切に検知することができるので、画像処理に適さない画像の組み合わせを高精度で判定することができる。 In Patent Document 1, the first image and the second image, which are two images forming a moving image, are acquired, and the degree of bias between the area of the feature value increasing region representing the pixel and the area of the feature value decreasing region is determined. It is disclosed to calculate the degree of bias represented. Based on this degree of bias, it is determined whether or not the first image and the second image are suitable for image processing. As a result, even if the disturbance has a small area, the disturbance can be appropriately detected, so that the combination of images that is not suitable for image processing can be determined with high accuracy.
動画像をデジタル計算機で処理し、その動画像に含まれる人を検知する画像処理装置がある。そのような画像処理装置においては、連続して撮影された第1画像と第2画像を比較することで人を検知する。具体的には、第1画像と第2画像を比較して画素値が変化した部分を検出し人を検出する。しかしながら、外乱によって生じた画素値の変化を人として検知すると誤検知となってしまう。外乱を含む画像は人を検出するための画像処理に適さない画像と判定しなければならない。 There is an image processing device that processes a moving image with a digital computer and detects a person included in the moving image. In such an image processing device, a person is detected by comparing the first image and the second image taken continuously. Specifically, the first image and the second image are compared to detect a portion where the pixel value has changed, and a person is detected. However, if a person detects a change in pixel value caused by a disturbance, a false detection will occur. An image containing disturbance must be determined as an image that is not suitable for image processing for detecting a person.
外乱は、例えば、照明が点滅したり、消灯していた照明が点灯したり、カメラ内部の処理で明るさを増幅したり減少させたりした場合に生じる。したがって、外乱は画像の広範囲に画素値の変化を及ぼすことが多い。そこで、画像の広範囲に及ぶ画素値の変化が見出された場合は、その画像は画像処理に適さない画像と判定することが考えられる。 Disturbances occur, for example, when the lights flash, the lights that were off are turned on, or the brightness is amplified or reduced by internal processing of the camera. Therefore, disturbances often cause changes in pixel values over a wide area of the image. Therefore, when a change in the pixel value over a wide range of the image is found, it is conceivable to determine that the image is not suitable for image processing.
しかしながら、例えば部屋全体に人がいる場合には、本来であれば「沢山の人がいる」ことを検知しなければならないが、広範囲に及ぶ画素の変化が生じるので外乱であると誤判断されていた。画素値の変化が広範囲にわたる場合に、その変化が「沢山の人」の存在によるものなのか、外乱によるものなのか、判定する技術が必要となっていた。 However, for example, when there are people in the entire room, it is necessary to detect that "there are many people", but it is misjudged as a disturbance because a wide range of pixel changes occur. It was. When the change in pixel value is widespread, there is a need for a technique for determining whether the change is due to the existence of "many people" or due to disturbance.
本発明は、上述のような課題を解決するためになされたもので、画像の広範囲で画素値の変化が見出された場合にその変化が「沢山の人」の存在によるものなのか、外乱によるものなのか、判定することができる画像処理装置とプログラムを提供することを目的とする。 The present invention has been made to solve the above-mentioned problems, and when a change in pixel value is found in a wide range of an image, it is disturbed whether the change is due to the existence of "many people". It is an object of the present invention to provide an image processing apparatus and a program capable of determining whether or not the image is due to the above.
本願の発明に係る画像処理装置は、第1画像の後に撮影された第2画像を該第1画像と比較して、画素値が増加した領域である増加領域ごとに、該増加領域が外乱により生じた確度である増加領域外乱度を算出し、得られた増加領域外乱度の総和を算出する増加領域外乱度算出部と、該第2画像を該第1画像と比較して、画素値が減少した領域である減少領域ごとに、該減少領域が外乱により生じた確度である減少領域外乱度を算出し、得られた減少領域外乱度の総和を算出する減少領域外乱度算出部と、該増加領域外乱度の総和と、該減少領域外乱度の総和との和が予め定められた値を超えたときに、該第1画像と該第2画像の組み合わせは画像処理に適さないと判定する判定部と、を備える。そして、該増加領域外乱度の総和は、該増加領域の面積の合計である合計増加面積を求め該合計増加面積について算出した増加領域外乱度より小さくなり、該減少領域外乱度の総和は、該減少領域の面積の合計である合計減少面積を求め該合計減少面積について算出した減少領域外乱度より小さくなることを特徴とする。
本願の発明に係るプログラムは、第1画像の後に撮影された第2画像を該第1画像と比較して、画素値が増加した領域である増加領域ごとに、該増加領域が外乱により生じた確度である増加領域外乱度を算出し、得られた増加領域外乱度の総和を、該増加領域外乱度の総和が、該増加領域の面積の合計である合計増加面積を求め該合計増加面積について算出した増加領域外乱度より小さくなるように算出する処理と、該第2画像を該第1画像と比較して、画素値が減少した領域である減少領域ごとに、該減少領域が外乱により生じた確度である減少領域外乱度を算出し、得られた減少領域外乱度の総和を、該減少領域外乱度の総和が、該減少領域の面積の合計である合計減少面積を求め該合計減少面積について算出した減少領域外乱度より小さくなるように算出する処理と、該増加領域外乱度の総和と、該減少領域外乱度の総和との和が予め定められた値を超えたときに、該第1画像と該第2画像の組み合わせは画像処理に適さないと判定する処理と、をコンピュータに実行させる。
In the image processing apparatus according to the present invention, the second image taken after the first image is compared with the first image, and the increased region is caused by disturbance for each increased region where the pixel value is increased. The pixel value is calculated by comparing the second image with the first image and the increasing region disturbance calculation unit that calculates the increased region disturbance that is the generated probability and calculates the total of the obtained increased region disturbance. For each reduction region, which is a reduced region, a reduction region disturbance degree calculation unit that calculates the reduction region disturbance degree, which is the probability that the reduction region is caused by a disturbance, and calculates the total of the obtained reduction region disturbance degree, and the reduction region disturbance degree calculation unit. When the sum of the sum of the disturbance degrees of the increasing region and the sum of the disturbance degrees of the decreasing region exceeds a predetermined value, it is determined that the combination of the first image and the second image is not suitable for image processing. It includes a determination unit. Then, the total sum of the increasing area disturbances is smaller than the increasing area disturbance calculated for the total increased area by obtaining the total increased area which is the total area of the increasing areas, and the total of the decreasing area disturbances is said to be. The total reduced area, which is the total area of the reduced regions, is obtained and is smaller than the reduced region disturbance degree calculated for the total reduced area.
In the program according to the present invention, the second image taken after the first image is compared with the first image, and the increased region is generated by disturbance for each increased region where the pixel value is increased. The increase region disturbance degree, which is the accuracy, is calculated, and the total increase region disturbance degree obtained is obtained, and the total increase area in which the sum total of the increase region disturbance degree is the sum of the areas of the increase region is obtained. The process of calculating so as to be smaller than the calculated increase region disturbance degree, and comparing the second image with the first image, the decrease region is generated by the disturbance for each decrease region which is the region where the pixel value is decreased. The reduced region disturbance degree, which is the certainty, is calculated, and the total of the obtained reduced region disturbance degree is calculated, and the total reduced area, in which the total of the reduced region disturbance degree is the total area of the reduced region, is obtained. When the process of calculating so as to be smaller than the reduced region disturbance degree calculated for, the sum of the increased region disturbance degree and the sum of the reduced region disturbance degree exceeds a predetermined value, the first A computer is made to execute a process of determining that the combination of the first image and the second image is not suitable for image processing.
本発明によれば、画素値が増加した増加領域と画素値が減少した減少領域の面積が小さい場合に増加領域外乱度と減少領域外乱度が低く抑えられ、増加領域と減少領域の面積が大きい場合に増加領域外乱度と減少領域外乱度として高い値が算出される。よって、画素値の増加領域又は画素値の減少領域が広範囲に渡る場合に、それが「沢山の人」によるものか「外乱」によるものか精度よく判断することができる。 According to the present invention, when the area of the increasing region where the pixel value is increased and the area of the decreasing region where the pixel value is decreased are small, the degree of disturbance of the increasing region and the degree of disturbance of the decreasing region are suppressed to be low, and the areas of the increasing region and the decreasing region are large. In this case, high values are calculated as the degree of disturbance in the increasing area and the degree of disturbance in the decreasing area. Therefore, when the pixel value increase region or the pixel value decrease region covers a wide range, it can be accurately determined whether it is due to "a lot of people" or "disturbance".
本発明の実施の形態に係る画像処理装置とプログラムについて図面を参照して説明する。同じ又は対応する構成要素には同じ符号を付し、説明の繰り返しを省略する場合がある。 The image processing apparatus and the program according to the embodiment of the present invention will be described with reference to the drawings. The same or corresponding components may be designated by the same reference numerals and the description may be omitted.
実施の形態.
図1は、実施の形態に係る画像処理装置のブロック図である。画像処理装置は、増加領域外乱度算出部12と、減少領域外乱度算出部14を備えている。増加領域外乱度算出部12と減少領域外乱度算出部14には、動画像を構成する画像が次々に送信される。図1には、第1画像と第2画像が増加領域外乱度算出部12と減少領域外乱度算出部14に送信されたことが示されている。第1画像と第2画像は動画像を構成する連続する2つの画像である。
Embodiment.
FIG. 1 is a block diagram of an image processing device according to an embodiment. The image processing device includes an increase region disturbance
増加領域外乱度算出部12と減少領域外乱度算出部14の出力が判定部20に送信される。判定部20では、増加領域外乱度算出部12と減少領域外乱度算出部14の出力から、第1画像と第2画像の組み合わせが画像処理に適するか否かを判定する。判定結果は、制御部22に送信される。制御部22は、判定部20で第1画像と第2画像の組み合わせが画像処理に適すると判定された場合にはこれらの画像で人の検知を行い、検知結果に応じて照明を制御する。他方、制御部22は、判定部20で第1画像と第2画像の組み合わせが画像処理に適さないと判定された場合にはこれらの画像で人の検知を行わない。
The outputs of the increasing area disturbance
図2は、本発明の実施の形態に係る画像処理装置の動作を示すフローチャートである。このフローチャートに沿って画像処理装置の動作を詳しく説明する。 FIG. 2 is a flowchart showing the operation of the image processing apparatus according to the embodiment of the present invention. The operation of the image processing apparatus will be described in detail with reference to this flowchart.
(画像取得)
まず、ステップS1において、第1画像と第2画像がカメラから増加領域外乱度算出部12と減少領域外乱度算出部14に送信される。第1画像と第2画像は動画像を構成する2枚の画像である。第1画像が先に撮影された画像であり、第2画像は第1画像の後に撮影された画像である。例えば、第1画像と第2画像は、数分の1秒又は数十分の1秒の間隔で取得した2枚の画像である。図3には、第1画像と第2画像の例が示されている。第1画像は、黒い領域R1、領域R1の中の白い領域R2、および領域R1の右側の白い領域R3を備えている。第2画像は、三角形の白い領域R4、領域R4の隣の黒い領域R5、領域R5の中の白い領域R6、および領域R5の隣の白い領域R7を備えている。
(Image acquisition)
First, in step S1, the first image and the second image are transmitted from the camera to the increasing region disturbance
(増加領域と減少領域)
次いで、ステップS2に処理を進める。ステップS2では、増加領域外乱度算出部12が、第2画像を第1画像と比較して、画素値が増加した領域である増加領域を特定する。照明が点滅したり、消灯していた照明が点灯したり、カメラ内部の処理で明るさを増幅したり減少させたりしたことにより外乱がある場合には、少数の大きな増加領域が特定される。それに対し、「沢山の人」が存在しそれらの人が個々に動いた場合には多数の小さな増加領域が特定される。
(Increase area and decrease area)
Then, the process proceeds to step S2. In step S2, the increasing region disturbance
さらにステップS2では、減少領域外乱度算出部14が、第2画像を第1画像と比較して、画素値が減少した領域である減少領域を特定する。照明が点滅したり、点灯していた照明が消灯したり、カメラ内部の処理で明るさを増幅したり減少させたりしたことにより外乱がある場合には、少数の大きな減少領域が特定される。それに対し、「沢山の人」が存在しそれらの人が個々に動いた場合には多数の小さな減少領域が特定される。
Further, in step S2, the reduction region disturbance
図3には、画素値増減マップが示されている。画素値増減マップは増加領域外乱度算出部12と減少領域外乱度算出部14で作成される。画素値増減マップは、第2画像を第1画像と比較して、画素値が増加した部分である増加領域と、画素値が減少した部分である減少領域を特定するマップである。図3には、2つの増加領域I1、I2と、1つの減少領域D1が示されている。
FIG. 3 shows a pixel value increase / decrease map. The pixel value increase / decrease map is created by the increase area disturbance
ステップS2において、画素ごとに増加領域、減少領域、又は増加領域でも減少領域でもない領域を特定すると計算量が多くなり好ましくないことがある。そこで、増加領域外乱度算出部12と減少領域外乱度算出部14は、第1画像と第2画像を予め定められた複数の画素を構成要素とするブロックの集合体に分割し、ブロックごとに増加領域又は減少領域であるか否か判定することとしてもよい。これにより、計算量を少なくすることができる。例えば、横方向に10画素、縦方向に10画素を有する合計100個の画素から構成される領域を1つのブロックとすることができる。
In step S2, specifying an increase region, a decrease region, or a region that is neither an increase region nor a decrease region for each pixel may increase the amount of calculation, which is not preferable. Therefore, the increase region disturbance
ブロックごとに増加領域又は減少領域であるか否か判定する具体的方法として3種類の方法が考えられる。第1の方法は、増加領域外乱度算出部12はブロック内の画素値の平均値が増加した場合にそのブロックを増加領域とし、減少領域外乱度算出部14はブロック内の画素値の平均値が減少した場合にそのブロックを減少領域とするものである。ノイズによってごく少数の画素において画素値が上がったり下がったりする場合がある。ブロック内の画素値の平均値を計算することで、ノイズによる影響を相殺する効果を期待することができる。
Three types of methods can be considered as specific methods for determining whether or not each block is an increase area or a decrease area. In the first method, the increasing region disturbance
第2の方法は、増加領域外乱度算出部12はブロック内で画素値が増加した画素の数が閾値を超えた場合にそのブロックを増加領域とし、減少領域外乱度算出部14はブロック内で画素値が減少した画素の数が閾値を超えた場合にそのブロックを減少領域とするものである。この方法によれば、仮にノイズによりブロック内の1画素で画素値が減少しても、当該ブロック内の複数の画素で画素値が上昇した場合に増加領域であるとの判断ができる。また、ノイズによりブロック内の1画素で画素値が増加した場合でも、当該ブロック内の複数の画素で画素値が減少した場合に減少領域であるとの判断ができる。
In the second method, when the number of pixels whose pixel values have increased in the block exceeds the threshold value, the increasing region disturbance
第3の方法は、増加領域外乱度算出部12はブロック内で画素値が増加した画素の数から画素値が減少した画素の数を減算した値が予め定められた値より大きい場合にそのブロックを増加領域とする。また、減少領域外乱度算出部14は、ブロック内で画素値が減少した画素の数から画素値が増加した画素の数を減算した値が予め定められた値より大きい場合にそのブロックを減少領域とする。この方法も、ノイズによる影響を低減することができるものである。
In the third method, the increasing region disturbance
(増加領域外乱度と減少領域外乱度)
次いで、ステップS3に処理を進める。ステップ3では、増加領域外乱度算出部12が、増加領域ごとに、増加領域外乱度を算出し、得られた増加領域外乱度の総和を算出する。増加領域外乱度は増加領域が外乱により生じた確度を表すものである。上述のとおり、外乱がある場合には少数の大きな増加領域が発生し、「沢山の人」が存在しそれらの人が個々に動いた場合には多数の小さな増加領域が発生するという考えに基づき、増加領域の面積が大きいほど大きい増加領域外乱度を付与する。したがって、大きい増加領域外乱度を付与された増加領域は外乱によって生じた蓋然性が高い。逆に、小さい増加領域外乱度を付与された増加領域は外乱によって生じた蓋然性が低く人の動きによって生じた蓋然性が高い。
(Increased area disturbance and decreased area disturbance)
Then, the process proceeds to step S3. In step 3, the increasing region disturbance
外乱により少数の大きな増加領域が発生した場合の増加領域外乱度の総和は、「沢山の人」が存在しそれらの人が個々に動いたことで多数の小さな増加領域が発生した場合の増加領域外乱度の総和よりも大きくする。例えば、外乱により面積の大きい増加領域が幾つか生じたときの増加領域の面積の総和と、「沢山の人」の動きにより面積の小さい増加領域が多数生じたときの増加領域の面積の総和が等しい場合、前者の増加領域外乱度の総和が後者の増加領域外乱度の総和より大きくなるようにする。言い換えれば、増加領域外乱度の総和は、増加領域の面積の合計である合計増加面積を求め、その合計増加面積について算出した増加領域外乱度より小さくする。増加領域外乱度の総和は、増加領域の数が多いほど、合計増加面積について算出した増加領域外乱度より小さくなることが好ましい。これにより、「沢山の人」が動いて面積の小さい増加領域が多数生じたときの増加領域外乱度の総和を小さくすることができる。 The sum of the increase areas when a small number of large increase areas are generated by the disturbance is the increase area when a large number of small increase areas occur due to the existence of "many people" and their individual movements. Make it larger than the sum of the degree of disturbance. For example, the sum of the areas of the increase area when several large increase areas are generated due to the disturbance and the total area of the increase areas when many small increase areas are generated due to the movement of "many people" If they are equal, the sum of the former increasing area disturbances is made larger than the sum of the latter increasing area disturbances. In other words, the sum of the increased area disturbances is the total increased area, which is the total area of the increased areas, and is smaller than the increased area disturbance calculated for the total increased area. It is preferable that the total sum of the degree of disturbance in the increasing region becomes smaller than the degree of disturbance in the increasing region calculated for the total increased area as the number of increasing regions increases. As a result, it is possible to reduce the sum of the degree of disturbance in the increased area when "a lot of people" move and a large number of increased areas with a small area are generated.
さらに、ステップS3では、減少領域外乱度算出部14が減少領域ごとに減少領域外乱度を算出し得られた減少領域外乱度の総和を算出する。減少領域外乱度は、減少領域が外乱により生じた確度を表す。大きい減少領域外乱度を付与された減少領域は外乱によって生じた蓋然性が高い。逆に小さい減少領域外乱度を付与された減少領域は人の動きによって生じた蓋然性が高い。減少領域外乱度の算出方法は、上述の増加領域外乱度の「増加」を「減少」に読み替えた内容である。すなわち、減少領域外乱度の総和は、減少領域の面積の合計である合計減少面積を求め合計減少面積について算出した減少領域外乱度より小さくする。減少領域外乱度の総和は、減少領域の数が多いほど、合計減少面積について算出した減少領域外乱度より小さくなることが好ましい。
Further, in step S3, the reduction region disturbance
増加領域外乱度と減少領域外乱度の具体的な計算方法は様々考えられるので、幾つか例示する。例えば、増加領域外乱度算出部12は、増加領域の面積が大きくなるほど大きい増加領域外乱度を与えるテーブルを用いて、増加領域ごとに増加領域外乱度を算出してもよい。また、減少領域外乱度算出部14は、減少領域の面積が大きくなるほど大きい減少領域外乱度を与えるテーブルを用いて、減少領域ごとに減少領域外乱度を算出することとしてもよい。例えば、増加領域又は減少領域の面積がA1未満なら外乱度S1を与え、当該面積がA1以上A2未満なら外乱度S1より大きい外乱度S2を与え、当該面積がA2以上なら外乱度S2より大きい外乱度S3を与えることとしてもよい。テーブルを用いることで算出処理を簡素化できる。
Since various specific calculation methods for the degree of disturbance in the increasing region and the degree of disturbance in the decreasing region can be considered, some examples are given. For example, the increasing region disturbance
別の算出方法もある。増加領域外乱度算出部12は、増加領域の面積を複数回掛け合わせた値を増加領域外乱度としてもよい。すなわち、面積を底とし、1より大きい自然数を指数(または冪指数)とした累乗を、増加領域外乱度としてもよい。減少領域外乱度算出部14は、減少領域の面積を複数回掛け合わせた値を減少領域外乱度としてもよい。すなわち、面積を底とし、1より大きい自然数を指数(または冪指数)とした累乗を、減少領域外乱度としてもよい。さらに、前記の累乗計算において、指数は自然数だけでなく実数であってもよい。ただし、指数は1よりおおきくなければならない。これは、増加領域外乱度の総和を、増加領域の面積の合計である合計増加面積を求めその合計増加面積について算出した増加領域外乱度より小さくし、また、減少領域外乱度の総和を、減少領域の面積の合計である合計減少面積を求めその合計減少面積について算出した減少領域外乱度より小さくするためである。
There is another calculation method. The increase region disturbance
いずれにしても、増加領域の面積が大きいほど大きい増加領域外乱度を付与し、減少領域の面積が大きいほど大きい減少領域外乱度を付与する。このことを数式で表すと、以下のとおりである。
増加領域数:n
第i増加領域の面積:Ai(i=1、2、…n)
第i増加領域の外乱度:Si(i=1、2、…n)
任意のi、j、kについて、Ak=Ai+Ajならば、Sk>Si+Sjが成立する。
なお、1を増加領域の面積又は減少領域の面積で除算した値を増加領域外乱度又は減少領域外乱度としたり、増加領域の面積又は減少領域の面積の平方根を増加領域外乱度又は減少領域外乱度としたりすることはない。
In any case, the larger the area of the increasing region is, the larger the increasing region disturbance degree is given, and the larger the area of the decreasing region is, the larger the decreasing region disturbance degree is given. This can be expressed by a mathematical formula as follows.
Number of areas to increase: n
Area of i-th increase region: Ai (i = 1, 2, ... n)
Disturbance degree in the i-th increasing region: Si (i = 1, 2, ... n)
For any i, j, k, if Ak = Ai + Aj, then Sk> Si + Sj holds.
The value obtained by dividing 1 by the area of the increasing region or the area of the decreasing region is used as the degree of disturbance in the increasing region or the degree of disturbance in the decreasing region, and the square root of the area of the increasing region or the area of the decreasing region is the degree of disturbance in the increasing region or the disturbance in the decreasing region. There is no such thing as a degree.
ところで、例えば円形に近い第1増加領域と、第1増加領域と同じ面積であり第1増加領域よりも外周が長い細長い形状の第2増加領域を想定する。この場合、第1増加領域は外乱によって生じた蓋然性が高いが、第2増加領域は人が動いたことで生じた蓋然性が高い。すなわち、同じ面積の2つの増加領域があった場合、それらの外周に応じて増加領域外乱度を増減させることが好ましい。そこで、増加領域外乱度算出部12は増加領域ごとに外周を求め、その外周が小さいほど増加領域外乱度を高めることが好ましい。減少領域についても同じ議論が成立するので、減少領域外乱度算出部14は、減少領域ごとに外周を求め、その外周が小さいほど減少領域外乱度を高めることが好ましい。
By the way, for example, it is assumed that the first increase region is close to a circle and the second increase region has an elongated shape having the same area as the first increase region and a longer outer circumference than the first increase region. In this case, the first increase region is highly probable to be caused by disturbance, while the second increase region is highly probable to be caused by the movement of a person. That is, when there are two increasing regions having the same area, it is preferable to increase or decrease the degree of disturbance of the increasing region according to their outer circumferences. Therefore, it is preferable that the increasing region disturbance
増加領域および減少領域の外周を、増加領域外乱度および減少領域外乱度に反映させる具体的手段は様々考えられるので幾つか例示する。例えば、ある面積を有する増加領域の増加領域外乱度はその増加領域の外周が短いほど大きくし、かつ、その増加領域の面積が大きいほど大きくする。この場合、外周が短く面積が大きい増加領域に対し大きい増加領域外乱度が付与される。例えば、外周の長さと増加領域外乱度を対応させたテーブルを利用して増加領域外乱度を算出することができる。あるいは、1を外周で除算した値を面積から算出した外乱度に加えた値を増加領域外乱度とすることもできる。こうすると、先ほど説明した等しい面積を有する第1増加領域と第2増加領域について、第1増加領域の増加領域外乱度が第2増加領域の増加領域外乱度より大きくなる。 Since various concrete means for reflecting the outer circumference of the increasing region and the decreasing region in the increasing region disturbance degree and the decreasing region disturbance degree can be considered, some examples will be given. For example, the degree of disturbance of the increasing region having a certain area is increased as the outer circumference of the increasing region is shorter, and is increased as the area of the increasing region is larger. In this case, a large increase region disturbance degree is given to the increase region having a short outer circumference and a large area. For example, the increased region disturbance degree can be calculated by using a table in which the length of the outer circumference is associated with the increased region disturbance degree. Alternatively, the value obtained by dividing 1 by the outer circumference and adding it to the disturbance degree calculated from the area can be used as the increase region disturbance degree. In this way, for the first increasing region and the second increasing region having the same area as described above, the increasing region disturbance degree of the first increasing region becomes larger than the increasing region disturbance degree of the second increasing region.
増加領域の外周を増加領域外乱度に反映させる技術を数式で表すと以下のとおりである。
増加領域数:n
第i増加領域の面積:Ai(i=1、2、…n)
第i増加領域の外周:Bi(i=1、2、…n)
第i増加領域の外乱度:Si(i=1、2、…n)
任意のi、jについて、Ai=Aj、Bi<Bjならば、Si>Sjであり、
かつ、Ai>Aj、Bi=BjならばSi>Sjである。
なお、減少領域についても同様に計算することができる。
The technique for reflecting the outer circumference of the increasing region in the degree of disturbance in the increasing region is expressed by a mathematical formula as follows.
Number of areas to increase: n
Area of i-th increase region: Ai (i = 1, 2, ... n)
Outer circumference of the i-th increasing region: Bi (i = 1, 2, ... n)
Disturbance degree in the i-th increasing region: Si (i = 1, 2, ... n)
For any i, j, if Ai = Aj and Bi <Bj, then Si> Sj.
If Ai> Aj and Bi = Bj, then Si> Sj.
The reduction region can be calculated in the same manner.
増加領域の面積に応じて増加領域外乱度を定めるだけでなく、上述のように増加領域の外周も考慮して増加領域外乱度を算出すると外乱度の精度を高めることができる。例えば、増加領域の面積に応じて増加領域外乱度を計算し、増加領域の外周から増加領域外乱度を計算し、これらを足し合わせたり、これらの積を計算したりして、総和を求める前の増加領域外乱度としてもよい。 The accuracy of the disturbance degree can be improved by not only determining the disturbance degree of the increase region according to the area of the increase region but also calculating the disturbance degree of the increase region in consideration of the outer circumference of the increase region as described above. For example, the degree of disturbance of the increasing region is calculated according to the area of the increasing region, the degree of disturbance of the increasing region is calculated from the outer circumference of the increasing region, and these are added together or the product of these is calculated before the sum is calculated. It may be the degree of disturbance in the increasing area of.
(判定部による判定)
ステップS4では、増加領域外乱度算出部12から増加領域外乱度の総和が判定部20に送信され、減少領域外乱度算出部14から減少領域外乱度の総和が判定部20に送信される。そして、判定部20は、増加領域外乱度の総和と、減少領域外乱度の総和との和が予め定められた値を超えたときに、第1画像と第2画像の組み合わせは画像処理に適さないと判定する。この場合、ステップS5に進み、判定部20が第1画像と第2画像の組み合わせは人検知に適さないとの判定結果を制御部22に送信する。これを受けて制御部22は第1画像と第2画像の組み合わせによる人検知を行わない。他方、判定部20は、増加領域外乱度の総和と減少領域外乱度の総和との和が予め定められた値を超えない場合、第1画像と第2画像の組み合わせは画像処理に適するとの判定結果を制御部22に送信する。これを受けて制御部22は第1画像と第2画像の組み合わせによる人検知を行い、検知結果に基づき照明を制御する。
(Judgment by the judgment unit)
In step S4, the increasing region disturbance
このように、本発明の実施の形態に係る画像処理装置によれば、「沢山の人」の存在によって画像の広範囲で画素値の変化が見出された場合には、増加領域外乱度と減少領域外乱度が低く抑えられる。これに対し、外乱によって画像の広範囲で画素値の変化が見出された場合には、増加領域外乱度と減少領域外乱度として高い値が算出される。よって、増加領域又は減少領域が広範囲に渡る場合に、それが「沢山の人」によるものか「外乱」によるものか精度よく判断することができる。本画像処理装置を、動体の在否を判定する装置と組み合わせて使用することで、動体の在否を判定する際の過誤を軽減することができる。 As described above, according to the image processing apparatus according to the embodiment of the present invention, when a change in the pixel value is found in a wide range of the image due to the presence of "many people", the degree of disturbance in the increasing region and the decrease are found. Area disturbance is kept low. On the other hand, when a change in the pixel value is found in a wide range of the image due to the disturbance, a high value is calculated as the degree of disturbance in the increasing region and the degree of disturbance in the decreasing region. Therefore, when the increasing area or the decreasing area covers a wide area, it can be accurately determined whether it is due to "a lot of people" or "disturbance". By using this image processing device in combination with a device for determining the presence or absence of a moving object, it is possible to reduce an error in determining the presence or absence of a moving object.
人を追跡し人がいるところを照明で照らす従来の照明装置では、人が部屋の入り口付近から入ってくると当該入り口付近の人を検知しその人の周辺を照明で照らす。その後、沢山の人が部屋に入ってきて増加領域と減少領域が増加すると外乱であると判断し人検知しなくなる。人検知をしなくなった状況下で、人が部屋の奥に進んだ場合、当然ながら部屋の奥の部分は照明が点灯しない。これに対し、本発明の実施の形態に係る画像処理装置によれば、「沢山の人」が部屋に入ってもそれが外乱ではなく「沢山の人」であると判定できるのでこの問題を解消できる。 In a conventional lighting device that tracks a person and illuminates the place where the person is, when a person enters from the vicinity of the entrance of the room, the person near the entrance is detected and the surroundings of the person are illuminated by the illumination. After that, when a lot of people enter the room and the increasing area and the decreasing area increase, it is judged that it is a disturbance and the person is not detected. If a person goes to the back of the room when the person is no longer detected, the lights will not turn on in the back of the room. On the other hand, according to the image processing apparatus according to the embodiment of the present invention, even if "a lot of people" enter the room, it can be determined that it is not a disturbance but "a lot of people", so that this problem is solved. it can.
(変形例)
本発明の実施の形態に係る画像処理装置はその特徴を失わない範囲で様々な変形が可能である。本発明の実施の形態では、第2画像を第1画像と比較して画素値が増加した領域を増加領域とし、画素値が減少した領域を減少領域とした。「画素値が増加した領域」とは、画素値の平均値など画素値から特定の算出方法によって算出された値が増加した領域を含む広い概念である。「画素値が減少した領域」とは、画素値の平均値など画素値から特定の算出方法によって算出された値が減少した領域を含む広い概念である。
(Modification example)
The image processing apparatus according to the embodiment of the present invention can be variously modified without losing its characteristics. In the embodiment of the present invention, the region where the pixel value is increased as compared with the first image is defined as the increasing region, and the region where the pixel value is decreased is defined as the decreasing region. The "region in which the pixel value has increased" is a broad concept including a region in which the value calculated by a specific calculation method from the pixel value such as the average value of the pixel values has increased. The “region in which the pixel value is reduced” is a broad concept including a region in which the value calculated by a specific calculation method is reduced from the pixel value such as the average value of the pixel values.
単純に画素値が増加した領域を増加領域とし、画素値が減少した領域を減少領域とすると、ノイズによって画素値が増減した画素が増加領域又は減少領域と判定されてしまう。そこで、画素値の増加量が閾値以上となった領域を増加領域とし、画素値の減少量が閾値以上となった領域を減少領域とすると、ノイズによる誤検出を防止できる。例えば画素値が10以上増加した領域を増加領域とし、画素値が10以上減少した領域を減少領域とする。また、上述のとおり、第1画像と第2画像を、複数の画素を包含するブロックに分割しブロックごとに増加領域であるか減少領域であるか判定することもノイズ対策に有効である。 If the region where the pixel value has increased is simply set as the increasing region and the region where the pixel value has decreased is set as the decreasing region, the pixel whose pixel value has increased or decreased due to noise is determined to be the increasing region or the decreasing region. Therefore, if the region where the pixel value increase amount is equal to or greater than the threshold value is defined as the increase region and the region where the pixel value decrease amount is equal to or greater than the threshold value is defined as the decrease region, erroneous detection due to noise can be prevented. For example, a region in which the pixel value is increased by 10 or more is defined as an increasing region, and a region in which the pixel value is decreased by 10 or more is defined as a decreasing region. Further, as described above, it is also effective as a noise countermeasure to divide the first image and the second image into blocks including a plurality of pixels and determine whether each block is an increase region or a decrease region.
図4は、本発明の実施の形態に係る画像処理装置をハードウェアで実現した構成と、ソフトウェアで実現した構成を示す図である。図4の上段にハードウェアで実現された画像処理装置が示され、図4の下段にソフトウェアで実現された画像処理装置が示されている。第1画像と第2画像は受信装置30又は受信装置40によって受信される。増加領域外乱度算出部12、減少領域外乱度算出部14、判定部20及び制御部22の各機能は、処理回路によって実現される。処理回路は専用のハードウェアで構成された処理回路32であっても、メモリ44に格納されたプログラムを実行するCPU42(Central Processing Unit、中央処理装置、処理装置、演算装置、マイクロプロセッサ、マイクロコンピュータ、プロセッサ、DSPともいう)であってもよい。増加領域外乱度算出部12、減少領域外乱度算出部14、判定部20及び制御部22の各機能を実現するプログラムは1つのプログラムであってもよいし複数のプログラムから構成されてもよい。そのようなプログラムは例えばネットワーク経由で配信される。
FIG. 4 is a diagram showing a configuration in which the image processing device according to the embodiment of the present invention is realized by hardware and a configuration realized by software. The upper part of FIG. 4 shows the image processing device realized by hardware, and the lower part of FIG. 4 shows the image processing device realized by software. The first image and the second image are received by the receiving
処理回路が専用のハードウェアである場合、処理回路32は、例えば単一回路、複合回路、プログラム化したプロセッサ、並列プログラム化したプロセッサ、ASIC、FPGA、又はこれらを組み合わせたものが該当する。図1の各部の機能それぞれを処理回路32で実現してもよいし、各部の機能をまとめて処理回路で実現してもよい。
When the processing circuit is dedicated hardware, the
処理回路がCPUの場合、各部の機能はソフトウェア、ファームウェア、またはソフトウェアとファームウェアとの組み合わせにより実現される。ソフトウェアとファームウェアはプログラムとして記述されメモリ44に格納される。処理回路はメモリに記憶されたプログラムを読み出して実行することにより、各部機能を実現する。プログラムは各部の手順又は方法をコンピュータに実行させるものであるともいえる。ここで、メモリとは例えば、RAM、ROM、フラッシュメモリー、EPROM、EEPROM等の、不揮発性又は揮発性の半導体メモリ、磁気ディスク、フレキシブルディスク、光ディスク、コンパクトディスク、ミニディスク、DVD等が該当する。
When the processing circuit is a CPU, the functions of each part are realized by software, firmware, or a combination of software and firmware. The software and firmware are described as programs and stored in the
なお、各部の機能について、一部を専用のハードウェアで実現し、一部をソフトウェアまたはファームウェアで実現するようにしてもよい。このように、処理回路は、ハードウェア、ソフトウェア、又はこれらの組み合わせによって、上述の各機能を実現することができる。 It should be noted that some of the functions of each part may be realized by dedicated hardware and some may be realized by software or firmware. In this way, the processing circuit can realize each of the above-mentioned functions by hardware, software, or a combination thereof.
12 増加領域外乱度算出部、 14 減少領域外乱度算出部、 20 判定部、 22 制御部 12 Increase area disturbance calculation unit, 14 Decrease area disturbance calculation unit, 20 Judgment unit, 22 Control unit
Claims (10)
前記第2画像を前記第1画像と比較して、画素値が減少した領域である減少領域ごとに、前記減少領域が外乱により生じた確度である減少領域外乱度を算出し、得られた減少領域外乱度の総和を算出する減少領域外乱度算出部と、
前記増加領域外乱度の総和と、前記減少領域外乱度の総和との和が予め定められた値を超えたときに、前記第1画像と前記第2画像の組み合わせは画像処理に適さないと判定する判定部と、を備え、
前記増加領域外乱度の総和は、前記増加領域の面積の合計である合計増加面積を求め前記合計増加面積について算出した増加領域外乱度より小さくなり、
前記減少領域外乱度の総和は、前記減少領域の面積の合計である合計減少面積を求め前記合計減少面積について算出した減少領域外乱度より小さくなることを特徴とする画像処理装置。 The second image taken after the first image is compared with the first image, and for each increase region in which the pixel value is increased, the increase region disturbance degree, which is the probability that the increase region is caused by the disturbance, is determined. An increasing area disturbance calculation unit that calculates and calculates the sum of the obtained increasing area disturbances,
The second image is compared with the first image, and the reduction region disturbance degree, which is the probability that the reduction region is caused by the disturbance, is calculated for each reduction region, which is the region where the pixel value is reduced, and the obtained reduction is obtained. A reduced area disturbance calculation unit that calculates the sum of the area disturbances,
When the sum of the total disturbance degree of the increasing region and the total sum of the disturbance degree of the decreasing region exceeds a predetermined value, it is determined that the combination of the first image and the second image is not suitable for image processing. Equipped with a judgment unit to
The total sum of the increased area disturbances is smaller than the increased area disturbance calculated for the total increased area by obtaining the total increased area which is the total area of the increased areas.
An image processing apparatus characterized in that the total sum of the reduced region disturbance degrees is smaller than the reduced region disturbance degree calculated for the total reduced area by obtaining the total reduced area which is the total area of the reduced regions.
前記減少領域外乱度算出部は、前記減少領域の面積が大きくなるほど大きい前記減少領域外乱度を与えるテーブルを用いて、前記減少領域ごとに前記減少領域外乱度を算出することを特徴とする請求項1に記載の画像処理装置。 The increase region disturbance degree calculation unit calculates the increase region disturbance degree for each increase region by using a table that gives the increase region disturbance degree that increases as the area of the increase region increases.
The claim is characterized in that the reduction region disturbance degree calculation unit calculates the reduction region disturbance degree for each reduction region by using a table that gives the reduction region disturbance degree that increases as the area of the reduction region increases. The image processing apparatus according to 1.
前記減少領域外乱度算出部は、前記減少領域の面積を累乗した値を前記減少領域外乱度とすることを特徴とする請求項1に記載の画像処理装置。 The increase region disturbance degree calculation unit uses a value obtained by raising the area of the increase region as the increase region disturbance degree.
The image processing apparatus according to claim 1, wherein the reduced region disturbance degree calculation unit uses a value obtained by raising the area of the reduced region as the reduced region disturbance degree.
前記減少領域外乱度算出部は、前記減少領域の外周が小さいほど前記減少領域外乱度を高めることを特徴とする請求項1〜3のいずれか1項に記載の画像処理装置。 The increasing region disturbance degree calculation unit increases the increasing region disturbance degree as the outer circumference of the increasing region becomes smaller.
The image processing apparatus according to any one of claims 1 to 3, wherein the reduced region disturbance degree calculation unit increases the reduced region disturbance degree as the outer circumference of the reduced region becomes smaller.
前記減少領域外乱度算出部は、画素値の平均値が減少した前記ブロックを減少領域とすることを特徴とする請求項5に記載の画像処理装置。 The increase region disturbance degree calculation unit uses the block in which the average value of the pixel values has increased as the increase region.
The image processing apparatus according to claim 5, wherein the reduced region disturbance degree calculation unit uses the block in which the average value of pixel values is reduced as a reduced region.
前記減少領域外乱度算出部は、画素値が減少した画素の数が閾値を超えた前記ブロックを減少領域とすることを特徴とする請求項5に記載の画像処理装置。 The increase region disturbance degree calculation unit sets the block in which the number of pixels whose pixel value has increased exceeds the threshold value as the increase region.
The image processing apparatus according to claim 5, wherein the reduced region disturbance degree calculation unit uses the block in which the number of pixels whose pixel values have been reduced exceeds a threshold value as the reduced region.
前記減少領域外乱度算出部は、画素値が減少した画素の数から、画素値が増加した画素の数を減算した値が、予め定められた値より大きい前記ブロックを減少領域とすることを特徴とする請求項5に記載の画像処理装置。 The increase region disturbance degree calculation unit sets the block in which the value obtained by subtracting the number of pixels whose pixel value has decreased from the number of pixels whose pixel value has increased is larger than a predetermined value as the increase region.
The reduction region disturbance calculation unit is characterized in that the block in which the value obtained by subtracting the number of pixels whose pixel value has increased from the number of pixels whose pixel value has decreased is larger than a predetermined value is defined as the reduction region. The image processing apparatus according to claim 5.
前記減少領域外乱度の総和は、前記減少領域の数が多いほど、前記減少領域の面積の合計である合計減少面積を求め前記合計減少面積について算出した減少領域外乱度より小さくなることを特徴とする請求項1〜8のいずれか1項に記載の画像処理装置。 As the number of the increased regions increases, the sum of the increased region disturbances becomes smaller than the increased region disturbance calculated for the total increased area by obtaining the total increased area which is the total area of the increased regions.
The total of the reduced region disturbances is characterized in that as the number of the reduced regions increases, the total reduced area, which is the total area of the reduced regions, is calculated and becomes smaller than the reduced region disturbance calculated for the total reduced area. The image processing apparatus according to any one of claims 1 to 8.
前記第2画像を前記第1画像と比較して、画素値が減少した領域である減少領域ごとに、前記減少領域が外乱により生じた確度である減少領域外乱度を算出し、得られた減少領域外乱度の総和を、前記減少領域外乱度の総和が、前記減少領域の面積の合計である合計減少面積を求め前記合計減少面積について算出した減少領域外乱度より小さくなるように算出する処理と、
前記増加領域外乱度の総和と、前記減少領域外乱度の総和との和が予め定められた値を超えたときに、前記第1画像と前記第2画像の組み合わせは画像処理に適さないと判定する処理と、をコンピュータに実行させるプログラム。 The second image taken after the first image is compared with the first image, and for each increased area where the pixel value is increased, the increased area disturbance degree which is the probability that the increased area is caused by the disturbance is calculated. The sum of the increased region disturbances calculated and obtained is smaller than the increased region disturbance calculated for the total increased area by obtaining the total increased area in which the sum of the increased region disturbances is the total area of the increased regions. And the process of calculating so that
The second image is compared with the first image, and the reduction area disturbance degree, which is the probability that the reduction area is caused by the disturbance, is calculated for each reduction area, which is the area where the pixel value is reduced, and the obtained reduction is obtained. The total of the region disturbances is calculated so that the sum of the reduced region disturbances is smaller than the reduced region disturbance calculated for the total reduced area by obtaining the total reduced area which is the total area of the reduced regions. ,
When the sum of the sum of the disturbance degrees of the increasing region and the sum of the disturbance degrees of the decreasing region exceeds a predetermined value, it is determined that the combination of the first image and the second image is not suitable for image processing. A program that lets a computer execute the processing to be performed.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2016251017A JP6798304B2 (en) | 2016-12-26 | 2016-12-26 | Image processing device, program |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2016251017A JP6798304B2 (en) | 2016-12-26 | 2016-12-26 | Image processing device, program |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2018106366A JP2018106366A (en) | 2018-07-05 |
| JP6798304B2 true JP6798304B2 (en) | 2020-12-09 |
Family
ID=62787887
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2016251017A Active JP6798304B2 (en) | 2016-12-26 | 2016-12-26 | Image processing device, program |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP6798304B2 (en) |
Family Cites Families (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP4925942B2 (en) * | 2007-06-27 | 2012-05-09 | セコム株式会社 | Image sensor |
| JP5761954B2 (en) * | 2010-10-13 | 2015-08-12 | セコム株式会社 | Image sensor |
| JP6345335B2 (en) * | 2015-03-02 | 2018-06-20 | 三菱電機株式会社 | Image processing apparatus, image processing method, and program |
-
2016
- 2016-12-26 JP JP2016251017A patent/JP6798304B2/en active Active
Also Published As
| Publication number | Publication date |
|---|---|
| JP2018106366A (en) | 2018-07-05 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN106878668B (en) | Movement detection of an object | |
| EP2869023B1 (en) | Image processing apparatus, image processing method and corresponding computer program | |
| US9473746B2 (en) | Image processing device, image processing method, and program for obstruction detection | |
| CN108270975B (en) | Exposure time determining method for image sensing | |
| JP6525543B2 (en) | IMAGE PROCESSING APPARATUS, IMAGE PROCESSING METHOD, AND PROGRAM | |
| JP2009159496A5 (en) | ||
| JP2013218612A5 (en) | ||
| WO2019085698A1 (en) | White balance processing method and device, electronic device and computer readable storage medium | |
| JP2013142929A5 (en) | Image processing apparatus and image processing method | |
| CN108510964B (en) | Screen brightness adjusting range adjusting method and device, terminal and storage medium | |
| EP4094180A1 (en) | Determination of illumination sections | |
| TW201715472A (en) | Image segmentation determining method, gesture determining method, image sensing system and gesture determining system | |
| KR20180042381A (en) | Illumination acquisition system, illumination control system and program | |
| JP2017152866A5 (en) | ||
| JP6267486B2 (en) | Image processing apparatus and image processing method | |
| JP6798304B2 (en) | Image processing device, program | |
| US11089291B2 (en) | Detection method and detection device, electronic device and computer readable storage medium | |
| US9189706B1 (en) | Apparatus and method for detecting motion | |
| US11481990B2 (en) | Detection device, detection method, and recording medium for detecting an object in an image | |
| CN115580965A (en) | Lamp control method and device, washing equipment and storage medium | |
| JP2000341675A (en) | Combined monitoring device | |
| JP2014157453A (en) | Image processing apparatus, image processing method, and image processing program | |
| TWI478027B (en) | Processing device of optical touch system and operation method thereof | |
| JP2006301740A5 (en) | ||
| JP2014035294A (en) | Information acquisition device and object detector |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20190904 |
|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20201012 |
|
| 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: 20201020 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20201102 |
|
| R150 | Certificate of patent or registration of utility model |
Ref document number: 6798304 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |