JP6416157B2 - Image processing device - Google Patents

Image processing device Download PDF

Info

Publication number
JP6416157B2
JP6416157B2 JP2016140865A JP2016140865A JP6416157B2 JP 6416157 B2 JP6416157 B2 JP 6416157B2 JP 2016140865 A JP2016140865 A JP 2016140865A JP 2016140865 A JP2016140865 A JP 2016140865A JP 6416157 B2 JP6416157 B2 JP 6416157B2
Authority
JP
Japan
Prior art keywords
area
plane
unit
image
divided
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2016140865A
Other languages
Japanese (ja)
Other versions
JP2018010601A (en
Inventor
全史 大津
全史 大津
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Secom Co Ltd
Original Assignee
Secom Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Secom Co Ltd filed Critical Secom Co Ltd
Priority to JP2016140865A priority Critical patent/JP6416157B2/en
Publication of JP2018010601A publication Critical patent/JP2018010601A/en
Application granted granted Critical
Publication of JP6416157B2 publication Critical patent/JP6416157B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Description

本発明は、画像から平面を検出する画像処理装置に関する。   The present invention relates to an image processing apparatus that detects a plane from an image.

一般に、画像により監視空間への人物の侵入を監視する画像処理装置は、監視空間を撮影した複数の撮影画像から、変化のあった変化領域を検出し、変化領域に人物が写っているか否かを判定することにより、監視空間内に侵入する人物を検出する。しかし、監視空間に柱、壁等の平面が存在する場合、その平面を走るネズミ等の小動物、平面に照射された車のヘッドライト光等が人物として誤って検出される可能性がある。このような検出誤りを防止するために、例えば、画像処理装置は、撮影画像内において柱、壁等の平面が写る平面領域を予め設定しておく。これにより、画像処理装置は、変化領域がその平面領域に内包する場合、その変化領域は床面に接していないため、その変化領域には人物でなく小動物又は光が写っていると判定することができる。   In general, an image processing apparatus that monitors an intrusion of a person into a monitoring space by using an image detects a changed area that has changed from a plurality of captured images of the monitoring space, and whether or not a person is captured in the changing area. By detecting this, a person who enters the surveillance space is detected. However, when there are planes such as columns and walls in the surveillance space, there is a possibility that small animals such as mice running on the plane, headlight light of a car irradiated on the plane, etc. may be detected as a person by mistake. In order to prevent such a detection error, for example, the image processing apparatus sets in advance a plane area in which a plane such as a pillar or a wall is captured in the captured image. As a result, when the change area is included in the plane area, the image processing apparatus determines that the change area does not touch the floor and therefore the change area includes a small animal or light. Can do.

しかし、従来、画像処理装置において、平面領域は、監視空間を目視で確認した対処員により、手動で設定されていた。そのため、監視空間において什器等の設置物のレイアウトが変更された際には、対処員が平面領域を再設定する必要があり、対処員の作業負荷及び作業費用が増大していた。また、対処員が平面領域を手動により設定する場合、設定忘れ、設定誤り等が発生する可能性もあった。   However, conventionally, in the image processing apparatus, the plane area has been manually set by a counselor who visually confirms the monitoring space. For this reason, when the layout of an installation such as a fixture is changed in the monitoring space, it is necessary for the coordinator to reset the plane area, which increases the work load and work cost of the coordinator. In addition, when the counselor manually sets the plane area, there is a possibility that setting may be forgotten or a setting error may occur.

二次元画像から三次元形状を検出する技術として、複数の照明、複数のカメラを用いる技術、パターン光、TOF(Time of Flight)による測距センサ等を用いる技術が知られている。しかし、これらの方法により平面領域を検出する場合、複数の照明、複数のカメラ、測距センサ等が必要となるため、システム費用が増大してしまう。   As a technique for detecting a three-dimensional shape from a two-dimensional image, a technique using a plurality of illuminations, a technique using a plurality of cameras, a pattern light, a distance measuring sensor using TOF (Time of Flight), and the like are known. However, when a planar area is detected by these methods, a plurality of illuminations, a plurality of cameras, a distance measuring sensor, and the like are required, which increases the system cost.

一方、上述したような特別な構成を用いずに、単カメラ、単照明という装置構成で二次元画像から平面を検出する技術が特許文献1に記載されている。具体的には、特許文献1には、平面を持ち、その平面の一部に僅かに傾斜した傾斜部がある被検査物に対し、平面と傾斜部との境界である傾斜開始線を検出する処理装置が記載されている。この処理装置は、被検査物の表面を拡散光で照射して撮像し、受光濃度が閾値を越える変化点の位置を傾斜開始位置として検出する。   On the other hand, Patent Document 1 discloses a technique for detecting a plane from a two-dimensional image with a device configuration of a single camera and a single illumination without using the special configuration described above. Specifically, in Patent Document 1, an inclination start line that is a boundary between a plane and an inclined portion is detected with respect to an object to be inspected that has a plane and has an inclined portion that is slightly inclined at a part of the plane. A processing device is described. This processing apparatus irradiates the surface of the object to be inspected with diffused light and picks up an image, and detects the position of the change point at which the received light density exceeds the threshold as the tilt start position.

特開平04−259811号公報Japanese Patent Laid-Open No. 04-259811

しかし、被検査物における受光濃度はカメラの撮影方向、照明の照射方向、カメラ及び照明と被検査物との間の距離等によって変化するため、特許文献1の処理装置のようにして傾斜開始位置を検出するためには、カメラ、照明及び被検査物の位置関係が予め定められている必要がある。したがって、従来、カメラ及び照明及び被検査物の位置関係が予め定められていない場合に、平面を検出することは困難であった。   However, since the light reception density in the inspection object varies depending on the shooting direction of the camera, the irradiation direction of the illumination, the distance between the camera and the illumination and the inspection object, etc., the tilt start position as in the processing apparatus of Patent Document 1. In order to detect this, the positional relationship between the camera, the illumination, and the inspection object needs to be determined in advance. Therefore, conventionally, it has been difficult to detect a plane when the positional relationship between the camera, the illumination, and the object to be inspected is not predetermined.

本発明の目的は、撮影装置と撮影装置により撮影される空間との位置関係が予め定められていない場合でも、撮影装置により撮影された画像から平面が存在する領域を精度良く検出することができる画像処理装置を提供することにある。   An object of the present invention is to accurately detect a region where a plane exists from an image photographed by a photographing device even when the positional relationship between the photographing device and a space photographed by the photographing device is not predetermined. An object is to provide an image processing apparatus.

かかる課題を解決するため本発明は、撮影装置により撮影された所定空間が写っている撮影画像を取得する画像取得部と、撮影画像に含まれる基準画素の輝度値と他の各画素の輝度値の比率に基づいて、基準画素に対応する所定空間内の位置と撮影装置の位置の間の距離と、他の各画素に対応する所定空間内の位置と撮影装置の位置の間の距離の比率を算出する距離比率算出部と、距離比率算出部が算出した比率に応じて、撮影画像に含まれる各画素に対応する三次元空間内の空間座標を算出する空間座標算出部と、撮影画像において互いに近接する画素群のうち、その画素群に含まれる画素に対応する空間座標が略同一平面上に存在する画素群を平面領域として検出する平面領域検出部と、を有することを特徴とした画像処理装置を提供する。これにより本発明は、撮影装置と撮影装置により撮影される空間との位置関係が予め定められていない場合でも、撮影装置により撮影された画像から平面が存在する領域を精度良く検出することができる。   In order to solve such a problem, the present invention provides an image acquisition unit that acquires a captured image in which a predetermined space is captured by an imaging device, a luminance value of a reference pixel included in the captured image, and a luminance value of each other pixel Based on the ratio, the distance between the position in the predetermined space corresponding to the reference pixel and the position of the photographing apparatus, and the ratio of the distance between the position in the predetermined space corresponding to each other pixel and the position of the photographing apparatus In the captured image, a distance ratio calculating unit that calculates a spatial coordinate in the three-dimensional space corresponding to each pixel included in the captured image according to the ratio calculated by the distance ratio calculating unit, An image having a plane area detecting unit that detects, as a plane area, a pixel group in which spatial coordinates corresponding to pixels included in the pixel group are located on substantially the same plane among the adjacent pixel groups. Provide processing equipment . Accordingly, the present invention can accurately detect a region where a plane exists from an image photographed by the photographing device even when the positional relationship between the photographing device and the space photographed by the photographing device is not predetermined. .

撮影画像を複数の分割領域に分割する領域分割部をさらに有し、平面領域検出部は、分割領域のうち、その分割領域に含まれる各画素に対応する空間座標が略同一平面上に存在する分割領域を平面候補領域として検出する平面候補領域検出部と、互いに隣接する二つの分割領域が平面候補領域として検出され、且つ、二つの分割領域に含まれる画素に対応する空間座標が略同一平面上に存在する場合、二つの分割領域を一つの平面候補領域として結合する平面候補領域結合部と、を有し、平面候補領域に基づいて、平面領域を検出することが好適である。これにより、互いに近接する画素群からなる平面領域をより効率良く検出することができる。   The image processing apparatus further includes an area dividing unit that divides the captured image into a plurality of divided areas, and the plane area detecting unit includes spatial coordinates corresponding to each pixel included in the divided area on substantially the same plane. A plane candidate area detecting unit that detects a divided area as a plane candidate area and two adjacent divided areas are detected as plane candidate areas, and the spatial coordinates corresponding to the pixels included in the two divided areas are substantially the same plane. In the case where it exists above, it is preferable to have a plane candidate area combining unit that combines two divided areas as one plane candidate area, and to detect the plane area based on the plane candidate area. As a result, it is possible to more efficiently detect a planar area composed of pixel groups close to each other.

撮影画像を複数の分割領域に分割する領域分割部をさらに有し、平面領域検出部は、分割領域のうち、その分割領域に含まれる各画素に対応する空間座標が略同一平面上に存在する分割領域を平面候補領域として検出する平面候補領域検出部と、互いに隣接する二つの分割領域の内の第1の分割領域が平面候補領域として検出され、第2の分割領域が平面候補領域として検出されない場合において、第2の分割領域に含まれる画素に対応する空間座標が、第1の分割領域に係る平面上に存在するか否かを判定し、その平面上に存在すると判定された第2の分割領域の画素を第1の分割領域に係る平面候補領域に含ませる平面候補領域更新部と、をさらに有し、平面候補領域に基づいて、平面領域を検出することが好適である。これにより、互いに近接する画素群からなる平面領域をより効率良く検出しつつ、分割領域に複数の平面が含まれる場合でも、平面領域をより精度良く検出することができる。   The image processing apparatus further includes an area dividing unit that divides the captured image into a plurality of divided areas, and the plane area detecting unit includes spatial coordinates corresponding to each pixel included in the divided area on substantially the same plane. A plane candidate area detecting unit that detects a divided area as a plane candidate area, a first divided area of two adjacent divided areas is detected as a plane candidate area, and a second divided area is detected as a plane candidate area If not, it is determined whether or not the spatial coordinates corresponding to the pixels included in the second divided region are present on the plane related to the first divided region, and the second determined to be present on the plane. It is preferable to further include a plane candidate area updating unit that includes the pixels of the divided area in the plane candidate area related to the first divided area, and detecting the plane area based on the plane candidate area. Accordingly, it is possible to detect the plane area with higher accuracy even when the divided area includes a plurality of planes while more efficiently detecting the plane area including the pixel groups close to each other.

また、本発明は、光の照射方向が撮影装置の撮影方向と略同一となるように設置された照明装置の配光情報を記憶する記憶部と、照明装置が点灯した状態で撮影装置が所定空間を撮影した点灯入力画像、及び、照明装置が消灯した状態で撮影装置が所定空間を撮影した消灯入力画像を取得し、点灯入力画像及び消灯入力画像に基づいて、外乱光の影響を除去した外乱光除去画像を生成する外乱光除去画像生成部と、外乱光除去画像及び配光情報に基づいて、画像内の各画素の視軸方向に向けて略均一な強度の照明が照射された状態の所定空間が写っている均一照明画像を生成する均一照明画像生成部と、均一照明画像を解析して、所定空間内の平面が写っている平面領域を検出する平面領域検出部と、を有することを特徴とした画像処理装置を提供する。これにより本発明は、平面検出に用いる照明装置自体の配向の不均一さや、平面検出に用いる照明装置以外からの光の影響を受けることなく、撮影装置により撮影された画像から平面が存在する領域を精度良く検出することができる。   In addition, the present invention provides a storage unit that stores light distribution information of a lighting device that is installed so that a light irradiation direction is substantially the same as a shooting direction of the photographing device, and the photographing device is in a predetermined state with the lighting device turned on. The lighting input image obtained by photographing the space and the lighting input image obtained by photographing the predetermined space while the lighting device is turned off are acquired, and the influence of disturbance light is removed based on the lighting input image and the lighting input image. Based on the disturbance light removal image generation unit that generates the disturbance light removal image, the disturbance light removal image, and the light distribution information, a state in which illumination with substantially uniform intensity is irradiated toward the visual axis direction of each pixel in the image A uniform illumination image generation unit that generates a uniform illumination image in which the predetermined space is reflected, and a plane area detection unit that analyzes the uniform illumination image and detects a plane region in which a plane in the predetermined space is reflected Image processing apparatus To provide. As a result, the present invention provides an area in which a plane exists from an image captured by an imaging apparatus without being affected by non-uniform orientation of the illumination apparatus itself used for plane detection or light from other than the illumination apparatus used for plane detection. Can be detected with high accuracy.

本発明に係る画像処理装置は、撮影装置と撮影装置により撮影される空間との位置関係が予め定められていない場合でも、撮影装置により撮影された画像から平面が存在する領域を精度良く検出することができるという効果を奏する。   The image processing apparatus according to the present invention accurately detects a region where a plane exists from an image photographed by the photographing device even when the positional relationship between the photographing device and the space photographed by the photographing device is not predetermined. There is an effect that can be.

本実施形態による監視システムの概略構成図である。It is a schematic block diagram of the monitoring system by this embodiment. (a)〜(e)は各画像について説明するための模式図である。(A)-(e) is a schematic diagram for demonstrating each image. (a)、(b)は分割領域について説明するための模式図である。(A), (b) is a schematic diagram for demonstrating a division area. 平面候補領域の検出について説明するための模式図である。It is a schematic diagram for demonstrating the detection of a plane candidate area | region. 平面候補領域の結合について説明するための模式図である。It is a schematic diagram for demonstrating the coupling | bonding of a plane candidate area | region. 平面候補領域の更新について説明するための模式図である。It is a schematic diagram for demonstrating the update of a plane candidate area | region. (a)、(b)は平面領域と対象の関係を説明するための模式図である。(A), (b) is a schematic diagram for demonstrating the relationship between a plane area | region and object. 平面領域検出処理の動作を示すフローチャートである。It is a flowchart which shows the operation | movement of a plane area | region detection process. 対象検出処理の動作を示すフローチャートである。It is a flowchart which shows operation | movement of a target detection process.

以下、本発明の画像処理装置が適用される監視システムについて図を参照しつつ説明する。   Hereinafter, a monitoring system to which the image processing apparatus of the present invention is applied will be described with reference to the drawings.

図1は、本実施形態による監視システム100の概略構成を示す図である。監視システム100は、画像処理装置1及び撮影ユニット2を有する。   FIG. 1 is a diagram illustrating a schematic configuration of a monitoring system 100 according to the present embodiment. The monitoring system 100 includes an image processing device 1 and a photographing unit 2.

撮影ユニット2は、撮影部10及び照明部20を有する。
撮影部10は、CCD素子またはC−MOS素子など、近赤外光または可視光に感度を有する光電変換素子と、その光電変換素子上に像を結像する結像光学系と、光電変換素子から出力された電気信号を増幅し、アナログ/デジタル(A/D)変換するA/D変換器とを有する。撮影部10は、人物等の検出対象の侵入を監視する監視空間を撮影するように固定設置される。撮影部10は、画像処理装置1と接続され、撮影したRGB各色の画像を各画素が0〜255の範囲の輝度値を有するデジタルの入力画像に変換して画像処理装置1へ出力する。
The photographing unit 2 includes a photographing unit 10 and an illumination unit 20.
The photographing unit 10 includes a photoelectric conversion element having sensitivity to near infrared light or visible light, such as a CCD element or a C-MOS element, an imaging optical system that forms an image on the photoelectric conversion element, and a photoelectric conversion element. And an A / D converter that amplifies the electrical signal output from the A / D converter and performs analog / digital (A / D) conversion. The photographing unit 10 is fixedly installed so as to photograph a monitoring space for monitoring the intrusion of a detection target such as a person. The photographing unit 10 is connected to the image processing apparatus 1, converts the photographed RGB images into digital input images in which each pixel has a luminance value in the range of 0 to 255, and outputs the digital input image to the image processing apparatus 1.

照明部20は、監視空間に光を照射する光源であり、撮影部10の光電変換素子が感度を有する近赤外光領域または可視光領域の波長に十分な輝度を持つ光源(例えば複数のLED等)を有する。照明部20は、撮影部10の設置位置と略同一の位置に、光の照射方向が撮影部10の撮影方向と略同一となるように固定設置される。照明部20は、画像処理装置1と接続され、画像処理装置1による制御に従って監視空間に光を照射する。
なお、撮影ユニット2は、画像処理装置1と接続されるように画像処理装置1の外部に設けられるのでなく、画像処理装置1に含まれるように画像処理装置1の内部に設けられてもよい。
The illumination unit 20 is a light source that irradiates light to the monitoring space, and a light source (for example, a plurality of LEDs) having a luminance sufficient for the wavelength in the near-infrared light region or visible light region where the photoelectric conversion element of the photographing unit 10 is sensitive. Etc.). The illumination unit 20 is fixedly installed at a position substantially the same as the installation position of the imaging unit 10 so that the light irradiation direction is substantially the same as the imaging direction of the imaging unit 10. The illumination unit 20 is connected to the image processing apparatus 1 and irradiates the monitoring space with light according to control by the image processing apparatus 1.
The photographing unit 2 may be provided inside the image processing apparatus 1 so as to be included in the image processing apparatus 1 instead of being provided outside the image processing apparatus 1 so as to be connected to the image processing apparatus 1. .

画像処理装置1は、CPU(Central Processing Unit)、MPU(Micro Processing Unit)、周辺回路、端子、各種メモリ等を有する。画像処理装置1は、撮影ユニット2が撮影した入力画像から、柱、壁、床等の平面領域を検出するとともに、検出した平面領域の情報を利用して人物、小動物等の検出対象を検出し、入力画像から検出対象を抽出した画像を出力する。画像処理装置1は、出力部30、記憶部40及び制御部50等を有する。   The image processing apparatus 1 includes a central processing unit (CPU), a micro processing unit (MPU), peripheral circuits, terminals, various memories, and the like. The image processing apparatus 1 detects a planar area such as a pillar, a wall, or a floor from an input image captured by the imaging unit 2 and detects a detection target such as a person or a small animal using information on the detected planar area. The image obtained by extracting the detection target from the input image is output. The image processing apparatus 1 includes an output unit 30, a storage unit 40, a control unit 50, and the like.

出力部30は、外部装置(不図示)と接続するインタフェース及びその制御回路である。出力部30は、制御部50から、入力画像に検出対象が含まれるか否かの判定結果を含む結果信号を受け取ると、外部装置が受信可能な形式の信号に変換して出力する。なお、判定結果が入力画像に検出対象が含まれていることを示す場合、結果信号には、監視空間を監視する監視員に警報を通知するための情報、入力画像から抽出された検出対象を含む画像等がさらに含まれてもよい。また、出力部30は、制御部50から、入力画像から検出された平面領域の画像、又は入力画像において平面が写っている領域の座標情報及び大きさを示す情報を受け取ると、外部装置が受信可能な形式の信号に変換して出力する。
なお、出力部30は、一般公衆回線、携帯電話回線などの通信回線を介して各情報を監視センタ装置などの外部装置へ出力してもよい。
The output unit 30 is an interface connected to an external device (not shown) and its control circuit. When the output unit 30 receives a result signal including a determination result as to whether or not a detection target is included in the input image from the control unit 50, the output unit 30 converts the signal into a signal in a format receivable by the external device and outputs the signal. In addition, when the determination result indicates that the detection target is included in the input image, the result signal includes information for notifying the monitoring person who monitors the monitoring space, and the detection target extracted from the input image. The image etc. which are included may be further included. Further, when the output unit 30 receives from the control unit 50 an image of a plane area detected from the input image, or information indicating the coordinate information and size of the area in which the plane is reflected in the input image, the output unit 30 receives the information. Convert to a possible format and output.
The output unit 30 may output each information to an external device such as a monitoring center device via a communication line such as a general public line or a mobile phone line.

記憶部40は、ROM(Read Only Memory)、RAM(Random Access Memory)等の半導体メモリ、又は磁気記録媒体及びそのアクセス装置もしくは光記録媒体及びそのアクセス装置等を有する。記憶部40は、画像処理装置1を制御するためのコンピュータプログラム及び各種データを記憶し、制御部50との間でこれらの情報を入出力する。コンピュータプログラムは、CD−ROM(compact disk read only memory)、DVD−ROM(digital versatile disk read only memory)等のコンピュータ読み取り可能な可搬型記録媒体から公知のセットアッププログラム等を用いて記憶部40にインストールされてもよい。
記憶部40には、モード情報41、設置情報42、配光情報43及び背景画像44等が記憶される。モード情報41は、現在設定されている画像処理装置1の動作モードを示す。設置情報42は、監視空間におけるカメラの設置状態を示し、例えば撮影部10の設置高さ、俯角、画角等である。配光情報43は、照明部20の配光を示し、例えば入力画像の各画素の視軸方向への照射強度である。配光情報43は、例えば、撮影部10の撮影方向に一様な色の球面スクリーンを置き、照明部20を点灯しつつ各画素の輝度値が飽和又は黒つぶれしないように輝度値の範囲を調整して取得した画像情報である。即ち、配光情報43は各画素の輝度値が照明部20による照明光強度を表す照明光強度画像である。なお、配光情報43は、画像情報に限らず、データ値として記憶されてもよい。背景画像44は、対象物が存在しない状態の監視空間を撮影した画像であり、公知の更新方法に基づいて、適宜最適になるように更新される。
The storage unit 40 includes a semiconductor memory such as a ROM (Read Only Memory) and a RAM (Random Access Memory), or a magnetic recording medium and its access device or an optical recording medium and its access device. The storage unit 40 stores a computer program and various data for controlling the image processing apparatus 1, and inputs / outputs these pieces of information to / from the control unit 50. The computer program is installed in the storage unit 40 from a computer-readable portable recording medium such as a CD-ROM (compact disk read only memory) or a DVD-ROM (digital versatile disk read only memory) using a known setup program. May be.
The storage unit 40 stores mode information 41, installation information 42, light distribution information 43, a background image 44, and the like. The mode information 41 indicates the currently set operation mode of the image processing apparatus 1. The installation information 42 indicates the installation state of the camera in the monitoring space, and is, for example, the installation height, depression angle, angle of view, etc. of the photographing unit 10. The light distribution information 43 indicates the light distribution of the illumination unit 20 and is, for example, the irradiation intensity in the visual axis direction of each pixel of the input image. The light distribution information 43 includes, for example, a range of luminance values such that a spherical screen of uniform color is placed in the photographing direction of the photographing unit 10 and the luminance value of each pixel is not saturated or blackened while the lighting unit 20 is turned on. Image information obtained by adjustment. That is, the light distribution information 43 is an illumination light intensity image in which the luminance value of each pixel represents the illumination light intensity by the illumination unit 20. The light distribution information 43 is not limited to image information, and may be stored as a data value. The background image 44 is an image of a monitoring space in a state where no object is present, and is updated so as to be optimal as appropriate based on a known update method.

制御部50は、CPU、MPU、周辺回路等を有する。制御部50は、記憶部40を参照しながら入力画像から平面領域を検出するとともに、検出した平面領域の情報を利用して検出対象を検出し、結果信号を出力部30に出力する。制御部50は、モード設定手段51、撮影制御手段52、画像取得手段53、領域分割手段54、距離比率算出手段55、空間座標算出手段56、平面領域検出手段57及び対象検出手段58等を有する。
制御部50の各手段は、マイクロプロセッサ上で動作するソフトウェアにより実現される機能モジュールである。なお、制御部50の各手段は、独立した集積回路、ファームウェア、マイクロプロセッサなどで構成されてもよい。
以下、制御部50の各手段について詳細に説明する。
The control unit 50 includes a CPU, an MPU, a peripheral circuit, and the like. The control unit 50 detects a plane area from the input image while referring to the storage unit 40, detects a detection target using information on the detected plane area, and outputs a result signal to the output unit 30. The control unit 50 includes a mode setting unit 51, an imaging control unit 52, an image acquisition unit 53, an area division unit 54, a distance ratio calculation unit 55, a spatial coordinate calculation unit 56, a plane area detection unit 57, an object detection unit 58, and the like. .
Each means of the control unit 50 is a functional module realized by software operating on a microprocessor. Each unit of the control unit 50 may be configured by an independent integrated circuit, firmware, a microprocessor, or the like.
Hereinafter, each unit of the control unit 50 will be described in detail.

モード設定手段51は、画像処理装置1の動作モードを設定する。画像処理装置1の動作モードには、監視空間を撮影した画像から監視空間に存在する平面を検出する平面検出モードと、監視空間を撮影した画像から監視空間に存在する人物、小動物等の検出対象を検出する対象検出モードが含まれる。モード設定手段51は、入力部(不図示)を介して、対処員が操作する外部装置から制御信号を受信し、受信した制御信号に従って画像処理装置1の動作モードを切り替える。モード設定手段51は、画像処理装置1の動作モードを示すモード情報を記憶部40に記憶する。
なお、モード設定手段51は、動作モードが平面検出モードである場合、平面検出処理が終了したときに動作モードを自動的に対象検出モードに切り替えてもよい。また、画像処理装置1は、スケジュール情報を予め記憶部40に記憶しておき、モード設定手段51は、記憶されたスケジュール情報に従って、動作モードを切り替えてもよい。また、モード設定手段51は、動作モードが対象検出モードである場合、検出対象の検出結果に基づいて、動作モードを切り替えてもよい。例えば、モード設定手段51は、平面検出モードを設定するための制御信号を受信した場合、検出対象の検出結果を参照し、監視空間内に検出対象が存在しない場合に限り動作モードを自動的に平面検出モードに切り替えてもよい。
The mode setting unit 51 sets the operation mode of the image processing apparatus 1. The operation mode of the image processing apparatus 1 includes a plane detection mode for detecting a plane existing in the monitoring space from an image obtained by photographing the monitoring space, and detection targets such as persons and small animals existing in the monitoring space from the image obtained by photographing the monitoring space. The object detection mode for detecting the. The mode setting means 51 receives a control signal from an external device operated by the coping person via an input unit (not shown), and switches the operation mode of the image processing apparatus 1 according to the received control signal. The mode setting unit 51 stores mode information indicating the operation mode of the image processing apparatus 1 in the storage unit 40.
Note that when the operation mode is the plane detection mode, the mode setting unit 51 may automatically switch the operation mode to the object detection mode when the plane detection process is completed. Further, the image processing apparatus 1 may store schedule information in the storage unit 40 in advance, and the mode setting unit 51 may switch the operation mode according to the stored schedule information. Further, when the operation mode is the target detection mode, the mode setting unit 51 may switch the operation mode based on the detection result of the detection target. For example, when the mode setting means 51 receives a control signal for setting the plane detection mode, the mode setting means 51 refers to the detection result of the detection target and automatically sets the operation mode only when the detection target does not exist in the monitoring space. You may switch to plane detection mode.

撮影制御手段52は、撮影部10及び照明部20を制御する。撮影制御手段52は、撮影部10にシャッター速度、ゲイン値等を設定して露光制御を行うとともに、撮影部10による撮影の実行を制御する。また、撮影制御手段52は、照明部20に点灯時間、強度等を設定するとともに、照明部20による点灯及び消灯の実行を制御する。撮影制御手段52は、記憶部40に記憶されたモード情報を参照し、現在設定されている動作モードに応じて撮影部10及び照明部20を制御する。
撮影制御手段52は、動作モードが平面検出モードである場合、照明部20を点灯させた状態で撮影部10に点灯入力画像を撮影させるとともに、照明部20を消灯させた状態で撮影部10に消灯入力画像を撮影させる。
一方、撮影制御手段52は、動作モードが対象検出モードである場合、公知の方法によって監視空間の明るさを検出し、監視空間の明るさに応じて、照明部20の点灯と消灯を切り替えながら撮影部10に撮影を実行させる。例えば、撮影制御手段52は、昼間と夜間で照明部20の消灯と点灯を切り替える。撮影制御手段52は、所定の時間間隔(例えば1/5秒間隔)で、撮影部10に順次撮影を実行させる。
The imaging control unit 52 controls the imaging unit 10 and the illumination unit 20. The imaging control means 52 sets exposure speed by setting a shutter speed, a gain value, and the like in the imaging unit 10 and controls execution of imaging by the imaging unit 10. In addition, the imaging control unit 52 sets the lighting time, intensity, and the like in the illumination unit 20 and controls execution of lighting and extinguishing by the lighting unit 20. The imaging control means 52 refers to the mode information stored in the storage unit 40 and controls the imaging unit 10 and the illumination unit 20 according to the currently set operation mode.
When the operation mode is the plane detection mode, the imaging control unit 52 causes the imaging unit 10 to capture the lighting input image with the illumination unit 20 turned on, and causes the imaging unit 10 to turn off the illumination unit 20. Turn off the input image.
On the other hand, when the operation mode is the target detection mode, the imaging control unit 52 detects the brightness of the monitoring space by a known method, and switches between turning on and off the illumination unit 20 according to the brightness of the monitoring space. The photographing unit 10 is caused to perform photographing. For example, the imaging control unit 52 switches between turning off and turning on the illumination unit 20 between daytime and nighttime. The photographing control unit 52 causes the photographing unit 10 to sequentially perform photographing at a predetermined time interval (for example, 1/5 second interval).

画像取得手段53は、外乱光除去画像生成部及び均一照明画像生成部の一例であり、動作モードが平面検出モードに設定されている場合に、撮影部10から点灯入力画像及び消灯入力画像を取得する。   The image acquisition unit 53 is an example of a disturbance light removal image generation unit and a uniform illumination image generation unit. When the operation mode is set to the plane detection mode, the image acquisition unit 53 acquires a lighting input image and a lighting input image from the photographing unit 10. To do.

図2(a)は、点灯入力画像の一例を示し、図2(b)は、消灯入力画像の一例を示す。図2(a)に示す点灯入力画像200には、監視空間内に配置された柱201、壁202、床203等が写っている。また、点灯入力画像200には、照明部20以外の照明機器により照らされた光204が写っている。一方、図2(b)に示す消灯入力画像210では、照明部20による照明が消灯されているため、柱201、壁202、床203等は写っておらず、照明部20以外の照明機器により照らされた光214のみが写っている。このように、点灯入力画像は、照明部20が点灯した状態で撮影部10が監視空間を撮影した画像であり、消灯入力画像は、照明部20が消灯した状態で撮影部10が監視空間を撮影した画像である。   FIG. 2A shows an example of a lighting input image, and FIG. 2B shows an example of a lighting input image. The lighting input image 200 shown in FIG. 2A shows a pillar 201, a wall 202, a floor 203, and the like arranged in the monitoring space. The lighting input image 200 includes light 204 illuminated by a lighting device other than the lighting unit 20. On the other hand, in the turn-off input image 210 shown in FIG. 2B, since the illumination by the lighting unit 20 is turned off, the pillar 201, the wall 202, the floor 203, etc. are not shown, and the lighting device other than the lighting unit 20 Only the illuminated light 214 is shown. As described above, the lighting input image is an image in which the imaging unit 10 captures the monitoring space with the lighting unit 20 turned on, and the light-off input image is the imaging unit 10 in the monitoring space with the lighting unit 20 off. It is a photographed image.

次に、画像取得手段53は、点灯入力画像及び消灯入力画像に基づいて、各画素が、点灯入力画像内の対応する画素の輝度値から、消灯入力画像内の対応する画素の輝度値を減算した値を有する外乱光除去画像を生成する。   Next, the image acquisition means 53 subtracts the luminance value of the corresponding pixel in the unlit input image from the luminance value of the corresponding pixel in the unlit input image based on the lighting input image and unlit input image. A disturbance light-removed image having the obtained value is generated.

図2(c)は、外乱光除去画像の一例を示す。図2(c)に示す外乱光除去画像220には、監視空間内に配置された柱201、壁202、床203等が写り、照明部20以外の照明機器により照らされた光204は写っていない。このように、外乱光除去画像220は、照明部20による照明光以外の外乱光の影響を除去した画像となる。   FIG. 2C shows an example of the disturbance light removed image. In the disturbance light removal image 220 shown in FIG. 2C, the pillar 201, the wall 202, the floor 203 and the like arranged in the monitoring space are shown, and the light 204 illuminated by a lighting device other than the lighting unit 20 is shown. Absent. As described above, the disturbance light removal image 220 is an image in which the influence of disturbance light other than the illumination light by the illumination unit 20 is removed.

次に、画像取得手段53は、記憶部40から配光情報(照明光強度画像)を取得する。画像取得手段53は、外乱光除去画像及び照明光強度画像に基づいて、各画素が、外乱光除去画像内の対応する画素の輝度値を、照明光強度画像内の対応する画素の輝度値(を正規化した値)で除算した値を有する均一照明画像を生成する。均一照明画像は、撮影部10により撮影された監視空間が写っている撮影画像の一例である。   Next, the image acquisition unit 53 acquires light distribution information (illumination light intensity image) from the storage unit 40. Based on the disturbance light-removed image and the illumination light intensity image, the image acquisition means 53 determines the luminance value of the corresponding pixel in the disturbance light-removed image as the luminance value of the corresponding pixel in the illumination light intensity image ( A uniform illumination image having a value obtained by dividing the value by a normalized value) is generated. The uniform illumination image is an example of a photographed image in which a monitoring space photographed by the photographing unit 10 is shown.

図2(d)は、照明光強度画像の一例を示し、図2(e)は、均一照明画像の一例を示す。本実施形態の監視システム100では、奥行きのある監視空間を撮影可能なように、撮影部10及び照明部20は、所定高さの位置に、撮影部10の撮影方向及び照明部20の光の照射方向が水平方向より下方へ向くように設置されている。また、画像処理装置1の遠方に位置する空間が照明部20による照明光により十分に照らされるように、照明部20内で上側に配置されたLEDの光の強度は、下側に配置されたLEDの光の強度よりも高くなるように設定されている。また、監視空間の中央付近がより確実に照らされるように、照明部20内で左右方向の中央側に配置されたLEDの光の強度は、両端側に配置されたLEDの光の強度よりも高くなるように設定されている。そのため、図2(d)に示す照明光強度画像230において、上側の画素231の輝度値は下側の画素232の輝度値より高く、左右方向の中央側の画素233の輝度値は両端側の画素234、235の輝度値より高い。
図2(e)に示す照明光強度画像240は、図2(b)に示した外乱光除去画像220から図2(c)に示した照明光強度画像230における各画素の輝度値の差の影響を除去するように生成された画像である。照明光強度画像240では、外乱光除去画像220の対応する各画素と比較して、上側の画素241及び左右方向の中央側の画素243の画素の輝度値は変化せず、下側の画素242及び左右方向の両端側の画素244、245の輝度値が高くなっている。このように、照明光強度画像240は、画像内の各画素の視軸方向、即ち撮影部10の撮影方向に向けて略均一な強度の照明が照射された状態の監視空間が写っている画像となる。
FIG. 2D shows an example of an illumination light intensity image, and FIG. 2E shows an example of a uniform illumination image. In the monitoring system 100 of the present embodiment, the imaging unit 10 and the illumination unit 20 are placed at a predetermined height so that the imaging direction of the imaging unit 10 and the light of the illumination unit 20 can be captured so that a monitoring space with a depth can be captured. It is installed so that the irradiation direction is directed downward from the horizontal direction. Further, the intensity of the light of the LED arranged on the upper side in the illumination unit 20 is arranged on the lower side so that the space located far from the image processing apparatus 1 is sufficiently illuminated by the illumination light from the illumination unit 20. It is set to be higher than the light intensity of the LED. Further, the intensity of the light of the LEDs arranged on the center side in the left-right direction in the illumination unit 20 is more than the intensity of the lights of the LEDs arranged on both ends so that the vicinity of the center of the monitoring space is more reliably illuminated. It is set to be high. Therefore, in the illumination light intensity image 230 shown in FIG. 2D, the luminance value of the upper pixel 231 is higher than the luminance value of the lower pixel 232, and the luminance value of the central pixel 233 in the left-right direction is It is higher than the luminance value of the pixels 234 and 235.
The illumination light intensity image 240 shown in FIG. 2 (e) is the difference in luminance value of each pixel in the illumination light intensity image 230 shown in FIG. 2 (c) from the disturbance light removed image 220 shown in FIG. 2 (b). It is an image generated so as to remove the influence. In the illumination light intensity image 240, the luminance values of the upper pixel 241 and the central pixel 243 in the left-right direction are not changed and the lower pixel 242 is not compared with the corresponding pixels of the disturbance light removed image 220. In addition, the luminance values of the pixels 244 and 245 on both ends in the left-right direction are high. As described above, the illumination light intensity image 240 is an image in which a monitoring space in a state in which illumination with substantially uniform intensity is irradiated toward the visual axis direction of each pixel in the image, that is, the photographing direction of the photographing unit 10. It becomes.

なお、監視空間が外乱光によって照らされない場合、画像取得手段53は、消灯入力画像の取得及び外乱光除去画像の生成を省略し、各画素が、点灯入力画像内の対応する各画素の輝度値を、照明光強度画像内の対応する各画素の輝度値で除算した値を有する画像を均一照明画像として生成してもよい。
また、照明部20の配光が各方向に対して略均一な強度で照射されるように設定されている場合、画像取得手段53は、点灯入力画像又は外乱光除去画像を均一照明画像として用いてもよい。
When the monitoring space is not illuminated by disturbance light, the image acquisition unit 53 omits acquisition of the extinguished input image and generation of the disturbance light removal image, and each pixel has a luminance value of each corresponding pixel in the lighting input image. May be generated as a uniform illumination image having a value obtained by dividing the value by the luminance value of each corresponding pixel in the illumination light intensity image.
Further, when the light distribution of the illumination unit 20 is set so as to be irradiated with substantially uniform intensity in each direction, the image acquisition unit 53 uses the lighting input image or the disturbance light removed image as the uniform illumination image. May be.

領域分割手段54は、均一照明画像を複数の分割領域(小領域)に分割する。領域分割手段54は、均一照明画像に含まれる各画素の内、互いに近接する画素群をグループ化し、グループ化された画素群の領域を分割領域として設定する。例えば、領域分割手段54は、SLIC(Simple Linear Iterative Clustering)法等のクラスタリング技術を用いて、輝度値及び/又は画素間の距離が近い画素同士をグループ化し、グループ化された画素群の領域を分割領域として設定する。なお、領域分割手段54は、均一照明画像を固定サイズの領域(例えば20画素×16画素の矩形領域)にメッシュ状に分割してもよい。領域分割手段54が分割する分割領域のサイズは、画像処理装置1が検出すべき平面領域のサイズよりも小さいサイズにすることが好ましい。   The area dividing unit 54 divides the uniform illumination image into a plurality of divided areas (small areas). The area dividing unit 54 groups adjacent pixel groups among the pixels included in the uniform illumination image, and sets the grouped pixel group area as a divided area. For example, the region dividing unit 54 uses a clustering technique such as a SLIC (Simple Linear Iterative Clustering) method to group pixels having similar brightness values and / or distances between pixels, and determines the region of the group of pixel groups. Set as a divided area. The area dividing unit 54 may divide the uniform illumination image into a fixed size area (for example, a rectangular area of 20 pixels × 16 pixels) in a mesh shape. The size of the divided area divided by the area dividing unit 54 is preferably smaller than the size of the planar area to be detected by the image processing apparatus 1.

図3(a)は、SLIC法を用いて設定された分割領域の一例を示し、図3(b)は、メッシュ状に設定された分割領域の一例を示す。図3(a)の画像300に示されるように、SLIC法を用いて設定された各分割領域301は、互いに近接し且つ輝度値が近い画素により構成される。また、図3(b)の画像310に示されるように、メッシュ状に設定された各分割領域311も、互いに近接する画素により構成される。   FIG. 3A shows an example of a divided region set using the SLIC method, and FIG. 3B shows an example of a divided region set in a mesh shape. As shown in an image 300 in FIG. 3A, each divided region 301 set by using the SLIC method is configured by pixels that are close to each other and have a close luminance value. Further, as shown in an image 310 in FIG. 3B, each divided region 311 set in a mesh shape is also composed of pixels that are close to each other.

距離比率算出手段55は、均一照明画像内の分割領域毎に、基準画素を設定する。距離比率算出手段55は、分割領域内の任意の画素、例えば分割領域内の最大輝度値を有する画素、又は重心位置に存在する画素等を基準画素に設定する。距離比率算出手段55は、分割領域毎に、各分割領域に含まれる基準画素の輝度値と他の各画素の輝度値の比率に基づいて、基準画素に対応する監視空間内の位置と撮影部10の位置の間の距離と、他の各画素に対応する監視空間内の位置と撮影部10の位置の間の距離の比率を算出する。   The distance ratio calculation means 55 sets a reference pixel for each divided region in the uniform illumination image. The distance ratio calculation means 55 sets an arbitrary pixel in the divided region, for example, a pixel having the maximum luminance value in the divided region, a pixel existing at the center of gravity position, or the like as the reference pixel. The distance ratio calculation means 55, for each divided area, based on the ratio of the luminance value of the reference pixel and the luminance value of each other pixel included in each divided area, the position in the monitoring space corresponding to the reference pixel and the photographing unit The ratio of the distance between the position of 10 and the distance between the position in the monitoring space corresponding to each other pixel and the position of the imaging unit 10 is calculated.

監視空間内の特定の位置における反射光強度Sは、その位置の方向に向けて照射される照明の強度をL、その位置における反射率をR、その位置と撮影部10の位置の間の距離をDとすると、以下の式(1)のように表される。
撮影部10により撮影される画像は、反射光強度Sを画像化したものであり、画像内の各画素の輝度値は、反射光強度Sと線形な関係を有する。したがって、均一照明画像内のある二つの画素の輝度値I1、I2は、以下の式(2)、(3)のように表される。
ここで、L1、L2は、各画素の視軸方向に向けて照射される照明の強度であり、R1、R2は、各画素に対応する監視空間内の位置における反射率であり、D1、D2は、各画素に対応する監視空間内の位置と撮影部10の位置の間の距離である。
The reflected light intensity S at a specific position in the monitoring space is L for the intensity of illumination irradiated in the direction of the position, R for the reflectance at that position, and the distance between the position and the position of the photographing unit 10. Is represented by the following equation (1).
The image photographed by the photographing unit 10 is obtained by imaging the reflected light intensity S, and the luminance value of each pixel in the image has a linear relationship with the reflected light intensity S. Therefore, the luminance values I 1 and I 2 of two pixels in the uniform illumination image are expressed as the following formulas (2) and (3).
Here, L 1 and L 2 are the intensity of illumination irradiated toward the visual axis direction of each pixel, and R 1 and R 2 are reflectances at positions in the monitoring space corresponding to each pixel. , D 1 , D 2 are distances between the positions in the monitoring space corresponding to the respective pixels and the positions of the imaging unit 10.

式(2)、(3)から、各画素に対応する監視空間内の位置と撮影部10の位置の間の距離の比率は、以下の式(4)のように表される。
ここで、均一照明画像では、各画素の視軸方向に向けて照射される照明の強度は一定であるため、式(4)は、以下の式(5)のように変形することができる。
また、各画素に対応する監視空間内の位置が同一平面上にある場合、各位置における反射率R1、R2は一定であるとみなすことができるため、式(5)はさらに以下の式(6)のように変形することができる。
From the expressions (2) and (3), the ratio of the distance between the position in the monitoring space corresponding to each pixel and the position of the photographing unit 10 is expressed as the following expression (4).
Here, in the uniform illumination image, since the intensity of illumination emitted toward the visual axis direction of each pixel is constant, Equation (4) can be transformed into Equation (5) below.
Further, when the position in the monitoring space corresponding to each pixel is on the same plane, the reflectances R 1 and R 2 at each position can be regarded as being constant. It can be modified as in (6).

したがって、一方の画素に対応する監視空間内の位置と撮影部10の位置の間の距離D2は、他方の画素に対応する監視空間内の位置と撮影部10の位置の間の距離D1を用いて以下の式(7)により算出される。
Therefore, the distance D 2 between the position in the monitoring space corresponding to one pixel and the position of the imaging unit 10 is the distance D 1 between the position in the monitoring space corresponding to the other pixel and the position of the imaging unit 10. Is calculated by the following equation (7).

したがって、基準画素に対応する監視空間内の位置と撮影部10の位置の間の距離Dcと、他の各画素に対応する監視空間内の位置と撮影部10の位置の間の距離Dnの比率は、各分割領域に含まれる基準画素の輝度値Icと他の各画素の輝度値Inの比率を用いて、以下の式(8)により算出される。
距離比率算出手段55は、基準画素に関する距離Dcを特定の値(例えば2m)に仮定し、各画素に関する距離Dnを、以下の式(9)により算出する。
Therefore, the distance D c between the position in the monitoring space corresponding to the reference pixel and the position of the imaging unit 10, and the distance D n between the position in the monitoring space corresponding to each other pixel and the position of the imaging unit 10. ratios, using the ratio of the luminance value I n of the luminance value I c and each of the other pixels of the reference pixels included in the divided region is calculated by the following equation (8).
The distance ratio calculation means 55 assumes the distance D c related to the reference pixel to a specific value (for example, 2 m), and calculates the distance D n related to each pixel by the following equation (9).

空間座標算出手段56は、距離比率算出手段55が算出した比率に応じて、分割領域毎に、均一照明画像に含まれる各画素に対応する三次元空間内の空間座標を算出する。空間座標算出手段56は、撮影部10の位置を原点とし、水平方向をX軸、垂直方向をY軸、奥行方向をZ軸とした三次元空間を設定する。空間座標算出手段56は、記憶部40から撮影部10の設置情報を読み出し、均一照明画像に含まれる各画素について、撮影部10の俯角及び画角に従って、距離比率算出手段55が算出した各画素に関する距離に対応する三次元空間内の空間座標を算出する。   The spatial coordinate calculation unit 56 calculates the spatial coordinates in the three-dimensional space corresponding to each pixel included in the uniform illumination image for each divided region according to the ratio calculated by the distance ratio calculation unit 55. The spatial coordinate calculation means 56 sets a three-dimensional space in which the position of the imaging unit 10 is the origin, the horizontal direction is the X axis, the vertical direction is the Y axis, and the depth direction is the Z axis. The spatial coordinate calculation unit 56 reads the installation information of the imaging unit 10 from the storage unit 40, and for each pixel included in the uniform illumination image, each pixel calculated by the distance ratio calculation unit 55 according to the depression angle and the angle of view of the imaging unit 10. The spatial coordinates in the three-dimensional space corresponding to the distance are calculated.

平面領域検出手段57は、均一照明画像を解析して、監視空間内の平面が写っている平面領域を検出する。具体的には、平面領域検出手段57は、均一照明画像において互いに近接する画素群のうち、その画素群に含まれる画素に対応する三次元空間内の空間座標が略同一平面上に存在する画素群を平面領域として検出する。そのために、平面領域検出手段57は、平面候補領域検出手段571、平面候補領域結合手段572、平面候補領域更新手段573、平面領域判定手段574等を有する。   The plane area detection unit 57 analyzes the uniform illumination image and detects a plane area in which a plane in the monitoring space is reflected. Specifically, the plane area detection unit 57 is a pixel in which spatial coordinates in a three-dimensional space corresponding to pixels included in the pixel group among the adjacent pixel groups in the uniform illumination image are on substantially the same plane. A group is detected as a planar region. For this purpose, the plane area detecting unit 57 includes a plane candidate area detecting unit 571, a plane candidate area combining unit 572, a plane candidate area updating unit 573, a plane area determining unit 574, and the like.

平面候補領域検出手段571は、均一照明画像内の各分割領域の内、対応する三次元空間内の領域が平面らしい分割領域を平面候補領域として検出する。
具体的には、平面候補領域検出手段571は、均一照明画像内の各分割領域のうち、その分割領域に含まれる各画素に対応する三次元空間内の空間座標が略同一平面上に存在する分割領域を平面候補領域として検出する。平面候補領域検出手段571は、分割領域毎に、各分割領域に含まれる各画素に対応する三次元空間内の空間座標群に対して、最小二乗法を用いて平面を算出する。即ち、平面候補領域検出手段571は、各分割領域に含まれる各画素に対応する三次元空間内の各空間座標との距離の二乗の和が最小となるように、各空間座標を近似する平面を算出する。そのために、平面候補領域検出手段571は、分割領域毎に、算出した平面と空間座標との距離が所定値以下となる画素の数が所定数以上であるか否かを判定する。そして、平面候補領域検出手段571は、距離が所定値以下となる画素の数が所定数以上である場合、各空間座標が略同一平面上に存在するとみなして、その分割領域に対応する三次元空間内の領域を平面らしいと判定し、その分割領域を平面候補領域と判定する。例えば、平面候補領域検出手段571は、分割領域内の画素の90%以上において平面との距離が所定値以下となる場合にその分割領域を平面候補領域と判定する。
または、平面候補領域検出手段571は、算出した平面と各空間座標との距離の総和を分割領域の面積(画素数)で除算した除算値(距離の平均値)が所定値以下であるか否かを判定し、算出した除算値が所定値以下である場合に、その分割領域を平面候補領域と判定してもよい。
The plane candidate area detecting unit 571 detects a divided area in which the corresponding area in the three-dimensional space is flat among the divided areas in the uniform illumination image as a plane candidate area.
Specifically, the plane candidate area detection unit 571 has spatial coordinates in a three-dimensional space corresponding to each pixel included in the divided area among the divided areas in the uniform illumination image on substantially the same plane. A divided area is detected as a plane candidate area. The plane candidate area detection unit 571 calculates a plane for each divided area by using the least square method for the spatial coordinate group in the three-dimensional space corresponding to each pixel included in each divided area. That is, the plane candidate area detecting unit 571 approximates each spatial coordinate so that the sum of the squares of the distance to each spatial coordinate in the three-dimensional space corresponding to each pixel included in each divided area is minimized. Is calculated. For this purpose, the plane candidate area detecting unit 571 determines, for each divided area, whether or not the number of pixels whose distance between the calculated plane and the spatial coordinates is equal to or less than a predetermined value is equal to or greater than a predetermined number. Then, the plane candidate area detection unit 571 considers that each spatial coordinate exists on substantially the same plane when the number of pixels whose distance is equal to or smaller than a predetermined value is equal to or greater than the predetermined number, and the three-dimensional corresponding to the divided area. An area in the space is determined to be a plane, and the divided area is determined to be a plane candidate area. For example, the plane candidate area detection unit 571 determines that the divided area is a plane candidate area when the distance from the plane is equal to or less than a predetermined value in 90% or more of the pixels in the divided area.
Alternatively, the plane candidate area detecting unit 571 determines whether a division value (average distance) obtained by dividing the total distance between the calculated plane and each spatial coordinate by the area (number of pixels) of the division area is equal to or less than a predetermined value. If the calculated division value is equal to or less than a predetermined value, the divided area may be determined as a plane candidate area.

図4は、平面候補領域の検出について説明するための模式図である。図4に示す画像400において、図3(a)に示した各分割領域301の内、平面候補領域として検出された分割領域401〜403のみが網掛け表示されている。各分割領域401は監視領域内の床による平面であり、各分割領域402は柱の一面による平面であり、各分割領域403は柱の他面による平面である。なお、平面候補領域検出手段571は、各分割領域について各空間座標を近似する平面を算出しているため、各分割領域(平面候補領域)に対応する平面の傾き(法線方向)を算出することもできる。各分割領域401、402、403の網掛けの濃度は、対応する平面の傾きに応じて異なるように表示されている。図4に示すように、分割領域401に対応する平面のグループ内、分割領域402に対応する平面のグループ内及び分割領域403に対応する平面のグループ内で平面の傾きはそれぞれ略同一であり、各グループ間で平面の傾きは異なっている。   FIG. 4 is a schematic diagram for explaining detection of a plane candidate region. In the image 400 shown in FIG. 4, only the divided areas 401 to 403 detected as plane candidate areas among the divided areas 301 shown in FIG. Each divided area 401 is a plane by the floor in the monitoring area, each divided area 402 is a plane by one surface of the pillar, and each divided area 403 is a plane by the other surface of the pillar. Since the plane candidate area detecting unit 571 calculates a plane that approximates each spatial coordinate for each divided area, the plane candidate area detecting unit 571 calculates the inclination (normal direction) of the plane corresponding to each divided area (plane candidate area). You can also. The shaded densities of the divided areas 401, 402, and 403 are displayed so as to differ depending on the inclination of the corresponding plane. As shown in FIG. 4, the slopes of the planes are substantially the same in the group of planes corresponding to the divided area 401, in the group of planes corresponding to the divided area 402, and in the group of planes corresponding to the divided area 403, respectively. The inclination of the plane is different between each group.

なお、上記した例では、平面候補領域検出手段571は、各画素に対応する監視空間内の位置が同一平面上にある場合、各位置における反射率が一定であるとみなして(反射率一定モデルを利用して)平面候補領域を検出しているが、二色性反射モデルを利用して平面候補領域を検出してもよい。二色性反射モデルでは、反射率Rは以下の式(10)のように表される。
ここで、Kdは拡散反射係数であり、Ksは鏡面反射係数であり、nはハイライト特性であり、それぞれ平面毎に異なる値を有するが、同一平面であれば同一の値を有すると考えられる。また、αは平面の法線と光源からの光の照射方向のなす角度であり、βは光源からの光の正反射方向と視線(撮影方向)のなす角度であり、それぞれ、平面の法線の向き(平面の傾き)が定まれば、均一照明画像内の画素の位置(座標)と撮影部10の設置情報から算出される。
In the above-described example, the plane candidate area detecting unit 571 assumes that the reflectance at each position is constant when the position in the monitoring space corresponding to each pixel is on the same plane (constant reflectance model). The plane candidate area is detected using the dichroic reflection model, but the plane candidate area may be detected using the dichroic reflection model. In the dichroic reflection model, the reflectance R is expressed as the following equation (10).
Here, K d is a diffuse reflection coefficient, K s is a specular reflection coefficient, and n is a highlight characteristic, and each has a different value for each plane. Conceivable. In addition, α is an angle formed between the normal line of the plane and the light irradiation direction from the light source, and β is an angle formed between the specular reflection direction of the light beam from the light source and the line of sight (imaging direction). Is determined from the position (coordinates) of the pixels in the uniform illumination image and the installation information of the photographing unit 10.

したがって、空間座標算出手段56及び平面候補領域検出手段571は、各分割領域に対応する平面の傾き、拡散反射係数、鏡面反射係数、ハイライト特性の各パラメータの最適な値を算出することにより、各分割領域に対応する平面を推定することができる。この場合、距離比率算出手段55は、各画素に関する距離Dnを、上記の式(9)に代えて、式(5)を変形した以下の式(11)により算出する。
ここで、αc、αnはそれぞれ基準画素、他の画素に対応する三次元空間内の空間座標における平面の法線と光源からの光の照射方向のなす角度であり、βc、βnはそれぞれ基準画素、他の画素に対応する三次元空間内の空間座標における光源からの光の正反射方向と視線(撮影方向)のなす角度である。
距離比率算出手段55は、各分割領域毎に、各分割領域に対応する平面の傾きを上下・左右それぞれ−90〜90度の範囲で複数設定し、それぞれの傾きに応じた各角度αc、αn、βc、βnを算出する。また、拡散反射係数Kdと鏡面反射係数Ksは、以下の式(12)の関係を有するので、距離比率算出手段55は、拡散反射係数Kdと鏡面反射係数Ksを、式(12)を満たす範囲内で複数設定する。さらに、距離比率算出手段55は、ハイライト特性nを、0〜∞の範囲内で複数設定する。距離比率算出手段55は、上記のように設定及び算出した各パラメータの各組合せを用いて、式(11)により各画素に関する距離Dnを算出する。
Therefore, the spatial coordinate calculation unit 56 and the plane candidate area detection unit 571 calculate the optimum values of the parameters of the plane inclination, diffuse reflection coefficient, specular reflection coefficient, and highlight characteristic corresponding to each divided area, A plane corresponding to each divided region can be estimated. In this case, the distance ratio calculation means 55 calculates the distance D n regarding each pixel by the following equation (11) obtained by modifying the equation (5) instead of the above equation (9).
Here, α c and α n are angles formed by the normal of the plane in the spatial coordinates in the three-dimensional space corresponding to the reference pixel and the other pixels, and the irradiation direction of light from the light source, and β c and β n Is the angle formed between the specular reflection direction of light from the light source and the line of sight (imaging direction) in the spatial coordinates in the three-dimensional space corresponding to the reference pixel and other pixels, respectively.
The distance ratio calculating means 55 sets a plurality of inclinations of the plane corresponding to each divided region in the range of −90 to 90 degrees for each divided region, and each angle α c according to each inclination, α n , β c and β n are calculated. Further, since the diffuse reflection coefficient K d and the specular reflection coefficient K s have the relationship of the following expression (12), the distance ratio calculating means 55 calculates the diffuse reflection coefficient K d and the specular reflection coefficient K s from the expression (12). Set multiple values within the range that satisfies the above). Further, the distance ratio calculation means 55 sets a plurality of highlight characteristics n within a range of 0 to ∞. Distance ratio calculating means 55, using each combination of parameters set and calculated as mentioned above, to calculate the distance D n for each pixel by Expression (11).

一方、空間座標算出手段56は、各パラメータの組合せ毎に、距離比率算出手段55が算出した各画素に関する各距離に基づいて、均一照明画像に含まれる各画素に対応する三次元空間内の空間座標を算出する。また、平面候補領域検出手段571は、各パラメータの組合せについて、均一照明画像内の分割領域毎に、その分割領域に対応する三次元空間内の空間座標群に対して最小二乗法を用いて平面を算出する。そして、各パラメータについて、分割領域毎に、算出した平面と空間座標との距離が所定値以下である画素の数が所定数以上となるか否かを判定し、所定数以上となるパラメータの組合せが存在する場合、その分割領域を平面候補領域と判定する。なお、平面候補領域検出手段571は、算出した平面と各空間座標との距離が所定値以下である画素の数が所定数以上となる組合せが複数存在する場合、距離が所定値以下である画素の数が最も大きくなる平面をその分割領域に対応する平面と判定する。   On the other hand, for each combination of parameters, the spatial coordinate calculation means 56 is a space in the three-dimensional space corresponding to each pixel included in the uniform illumination image based on each distance related to each pixel calculated by the distance ratio calculation means 55. Calculate the coordinates. Further, the plane candidate area detecting unit 571 uses a least square method for each parameter combination for each divided area in the uniform illumination image using a least square method on a spatial coordinate group in the three-dimensional space corresponding to the divided area. Is calculated. For each parameter, for each divided region, it is determined whether or not the number of pixels whose calculated distance between the plane and the spatial coordinates is equal to or smaller than a predetermined value is equal to or greater than a predetermined number. Is present as a plane candidate area. In addition, the plane candidate area detection unit 571, when there are a plurality of combinations in which the number of pixels whose distance between the calculated plane and each spatial coordinate is equal to or smaller than a predetermined value is equal to or larger than a predetermined number, Is determined as the plane corresponding to the divided area.

平面候補領域結合手段572は、平面候補領域検出手段571が検出した平面候補領域の内、同一平面による平面候補領域同士を結合する。
平面候補領域結合手段572は、互いに隣接する二つの分割領域が平面候補領域として検出され、且つ、その二つの分割領域に含まれる各画素に対応する三次元空間内の空間座標が略同一平面上に存在する場合、その二つの分割領域を一つの平面候補領域として結合する。平面候補領域結合手段572は、平面候補領域として検出された互いに隣接する二つの分割領域に対応する三次元空間内の領域が一つの平面らしいか否かを、距離比率算出手段55、空間座標算出手段56及び平面候補領域検出手段571と同様にして、判定する。
即ち、平面候補領域結合手段572は、平面候補領域として検出された互いに隣接する二つの分割領域を一つの領域とみなして、その領域内に基準画素を設定する。平面候補領域結合手段572は、基準画素の輝度値と他の各画素の輝度値の比率に基づいて、基準画素に対応する監視空間内の位置と撮影部10の位置の間の距離と、その領域内の他の各画素に対応する監視空間内の位置と撮影部10の位置の間の距離の比率を算出する。平面候補領域結合手段572は、算出した比率に基づいて、その領域に含まれる各画素に対応する三次元空間内の空間座標を算出し、算出した空間座標が略同一平面上に存在する場合に、その領域を一つの平面候補領域として結合する。平面候補領域結合手段572は、互いに隣接する二つの平面候補領域の組合せ毎に、上記処理を実行し、結合可能な組合せが存在しなくなるまで上記処理を繰り返す。
The plane candidate area combining unit 572 combines the plane candidate areas on the same plane among the plane candidate areas detected by the plane candidate area detecting unit 571.
The plane candidate area combining means 572 detects two adjacent divided areas as plane candidate areas, and the spatial coordinates in the three-dimensional space corresponding to each pixel included in the two divided areas are substantially on the same plane. If there are two, the two divided regions are combined as one plane candidate region. The plane candidate area combining unit 572 determines whether or not the area in the three-dimensional space corresponding to the two adjacent divided areas detected as the plane candidate area seems to be one plane, the distance ratio calculating unit 55, the spatial coordinate calculation The determination is made in the same manner as the means 56 and the plane candidate area detecting means 571.
That is, the plane candidate area combining unit 572 considers two adjacent divided areas detected as plane candidate areas as one area, and sets a reference pixel in the area. The plane candidate area combining unit 572 determines the distance between the position in the monitoring space corresponding to the reference pixel and the position of the imaging unit 10 based on the ratio between the luminance value of the reference pixel and the luminance value of each other pixel, The ratio of the distance between the position in the monitoring space corresponding to each other pixel in the region and the position of the imaging unit 10 is calculated. The plane candidate area combining unit 572 calculates the spatial coordinates in the three-dimensional space corresponding to each pixel included in the area based on the calculated ratio, and the calculated spatial coordinates exist on substantially the same plane. The regions are combined as one plane candidate region. The plane candidate area combining unit 572 executes the above process for each combination of two plane candidate areas adjacent to each other, and repeats the above process until there is no combination that can be combined.

なお、平面候補領域結合手段572は、互いに隣接する二つの平面候補領域内の全画素について三次元座標を算出せずに、その領域に含まれる少なくとも三つ以上の画素を選択して空間座標を算出し、算出した空間座標が略同一平面上に存在するか否かを判定してもよい。平面候補領域結合手段572は、両方の平面候補領域から少なくとも一つ以上ずつ画素を選択すれば、どのように画素を選択してもよい。
また、平面候補領域結合手段572は、互いに隣接する二つの平面候補領域に対応する平面の法線方向がなす角度が所定値以上である場合、その二つの平面候補領域に対応する三次元空間内の領域は一つの平面でないと判定して、結合処理の対象外としてもよい。
また、平面候補領域結合手段572は、所定サイズ以下の平面候補領域については、結合処理の対象外としてもよい。
また、検出すべき平面の傾きが予め定められている場合(例えば鉛直方向に延伸する平面のみを検出する場合)、平面候補領域結合手段572は、各平面候補領域に対応する平面の法線方向を参照して、その傾き以外の傾きを有する平面については結合処理の対象外としてもよい。
これらにより、平面候補領域の結合処理の処理負荷が軽減し、平面候補領域結合手段572は、結合処理を短時間に実行することが可能となる。
The plane candidate area combining means 572 selects at least three or more pixels included in the area and calculates the spatial coordinates without calculating the three-dimensional coordinates for all the pixels in the two plane candidate areas adjacent to each other. It may be determined whether or not the calculated spatial coordinates are on substantially the same plane. The plane candidate area combining unit 572 may select any pixel as long as at least one pixel is selected from both plane candidate areas.
Further, the plane candidate area combining unit 572, when the angle formed by the normal directions of the planes corresponding to the two plane candidate areas adjacent to each other is a predetermined value or more, in the three-dimensional space corresponding to the two plane candidate areas It may be determined that the region is not a single plane and excluded from the target of the combining process.
Further, the plane candidate area combining unit 572 may exclude a plane candidate area having a predetermined size or less from the target of the combination process.
When the inclination of the plane to be detected is predetermined (for example, when only the plane extending in the vertical direction is detected), the plane candidate area combining unit 572 selects the normal direction of the plane corresponding to each plane candidate area. Referring to FIG. 5, a plane having an inclination other than the inclination may be excluded from the target of the combining process.
As a result, the processing load of the plane candidate area combining process is reduced, and the plane candidate area combining unit 572 can execute the combining process in a short time.

図5は、平面候補領域の結合について説明するための模式図である。図5に示す画像500において、図4に示した床による分割領域401、柱の一面による分割領域402、柱の他面による分割領域403が、それぞれ一つの平面候補領域501、502、503に結合されている。なお、領域504は、各分割領域内にそれぞれ柱の二つの面が含まれてしまっていることにより、平面候補領域として検出されない。このため、領域504内の各分割領域は、他の平面候補領域とも結合されていない。   FIG. 5 is a schematic diagram for explaining the combination of the planar candidate regions. In the image 500 shown in FIG. 5, the divided area 401 by the floor, the divided area 402 by one side of the pillar, and the divided area 403 by the other side of the pillar shown in FIG. 4 are combined into one plane candidate area 501, 502, 503, respectively. Has been. Note that the area 504 is not detected as a plane candidate area because the two areas of the pillars are included in each divided area. For this reason, each divided region in the region 504 is not combined with other plane candidate regions.

平面候補領域更新手段573は、平面候補領域検出手段571が平面候補領域として検出しなかった分割領域内の画素の内、対応する三次元空間内の空間座標が、その分割領域に隣接する平面候補領域に対応する三次元空間内の平面上に存在する画素をその平面候補領域に含ませるように平面候補領域を更新する。
平面候補領域更新手段573は、互いに隣接する二つの分割領域の内の第1の分割領域が平面候補領域として検出され、第2の分割領域が平面候補領域として検出されない場合において、第2の分割領域に含まれる画素に対応する三次元空間内の空間座標が、第1の分割領域に係る平面上に存在するか否かを判定する。平面候補領域更新手段573は、その平面上に存在すると判定された第2の分割領域の画素を第1の分割領域に係る平面候補領域に含ませる。
The plane candidate area updating unit 573 is a plane candidate whose spatial coordinates in the corresponding three-dimensional space are adjacent to the divided area among the pixels in the divided area that the plane candidate area detecting unit 571 did not detect as the plane candidate area. The plane candidate area is updated so that pixels existing on the plane in the three-dimensional space corresponding to the area are included in the plane candidate area.
The plane candidate area updating unit 573 performs the second division when the first divided area of the two adjacent divided areas is detected as the plane candidate area and the second divided area is not detected as the plane candidate area. It is determined whether or not the spatial coordinates in the three-dimensional space corresponding to the pixels included in the region exist on the plane related to the first divided region. The plane candidate area update unit 573 includes the pixels of the second divided area determined to exist on the plane in the plane candidate area related to the first divided area.

そのために、平面候補領域更新手段573は、一方の分割領域(第1の分割領域)が平面候補領域として検出され、他方の分割領域(第2の分割領域)が平面候補領域として検出されなかった互いに隣接する二つの分割領域の組合せを抽出する。平面候補領域更新手段573は、抽出した各組合せについて、距離比率算出手段55と同様にして、上記した式(9)を用いて、第2の分割領域(非平面候補領域)に含まれる各画素に関する距離Dnを算出しなおす。但し、平面候補領域結合手段572は、上記した式(9)において、基準画素に係る輝度値Ic及び距離Dcとして、第1の分割領域(平面候補領域)に対して設定された基準画素に係る輝度値及び距離を用いて、第2の分割領域に含まれる各画素に関する距離Dnを算出する。
平面候補領域更新手段573は、算出した距離Dnに基づいて、第2の分割領域に含まれる各画素に対応する三次元空間内の空間座標を算出する。平面候補領域更新手段573は、算出した空間座標と、平面候補領域検出手段571が第1の分割領域について算出した平面との距離が第2所定値以下であるか否かを判定する。なお、第2所定値は、平面候補領域検出手段571が平面候補領域を検出するために用いる所定値と同じ値でもよい。または、第2所定値は、平面候補領域検出手段571が平面候補領域を検出するために用いた所定値より大きい値又は小さい値でもよい。平面候補領域更新手段573は、距離が第2所定値以下である場合、第2の分割領域に含まれるその画素に対応する三次元空間内の空間座標は、第1の分割領域に対応する三次元空間内の平面と略同一平面上に存在すると判定し、その画素を第1の分割領域に係る平面候補領域に含ませる。
なお、平面候補領域更新手段573は、特定の画素が、複数の平面候補領域に含まれると判定した場合、その特定の画素をそれぞれの平面候補領域に含ませる。または、平面候補領域更新手段573は、その特定の画素を、各平面候補領域の内、対応する平面との距離が最も小さい平面候補領域のみに含ませてもよい。
Therefore, the plane candidate area updating unit 573 detects one divided area (first divided area) as a plane candidate area and does not detect the other divided area (second divided area) as a plane candidate area. A combination of two divided areas adjacent to each other is extracted. The plane candidate area update unit 573 uses the above-described equation (9) for each extracted combination in the same manner as the distance ratio calculation unit 55, and each pixel included in the second divided area (non-plane candidate area). Recalculate the distance D n for. However, the plane candidate area combining unit 572 uses the reference pixel set for the first divided area (plane candidate area) as the luminance value I c and the distance D c related to the reference pixel in the above equation (9). Is used to calculate the distance D n for each pixel included in the second divided region.
The plane candidate area update unit 573 calculates the spatial coordinates in the three-dimensional space corresponding to each pixel included in the second divided area based on the calculated distance D n . The plane candidate area update unit 573 determines whether or not the distance between the calculated spatial coordinates and the plane calculated by the plane candidate area detection unit 571 for the first divided area is equal to or smaller than a second predetermined value. Note that the second predetermined value may be the same value as the predetermined value used by the plane candidate area detecting unit 571 to detect the plane candidate area. Alternatively, the second predetermined value may be a value larger or smaller than the predetermined value used by the plane candidate area detecting unit 571 to detect the plane candidate area. If the distance is equal to or smaller than the second predetermined value, the plane candidate area updating unit 573 determines that the spatial coordinates in the three-dimensional space corresponding to the pixel included in the second divided area are the cubic corresponding to the first divided area. It is determined that the pixel exists on substantially the same plane as the plane in the original space, and the pixel is included in the plane candidate area related to the first divided area.
If the plane candidate area updating unit 573 determines that the specific pixel is included in the plurality of plane candidate areas, the plane candidate area updating unit 573 includes the specific pixel in each plane candidate area. Alternatively, the plane candidate area updating unit 573 may include the specific pixel only in the plane candidate area having the smallest distance from the corresponding plane among the plane candidate areas.

なお、平面候補領域の結合処理と同様に、検出すべき平面の傾きが予め定められている場合、平面候補領域更新手段573は、各平面候補領域に対応する平面の法線方向を参照して、その傾き以外の傾きを有する平面については更新処理の対象外としてもよい。これにより、平面候補領域の更新処理の処理負荷が軽減し、平面候補領域更新手段573は、更新処理を短時間に実行することが可能となる。   Similar to the plane candidate area combining process, when the inclination of the plane to be detected is determined in advance, the plane candidate area update unit 573 refers to the normal direction of the plane corresponding to each plane candidate area. A plane having an inclination other than the inclination may be excluded from the update process. Thereby, the processing load of the update process of the plane candidate area is reduced, and the plane candidate area update unit 573 can execute the update process in a short time.

図6は、平面候補領域の更新について説明するための模式図である。図6に示す画像600の平面候補領域602、603は、それぞれ、図5に示した柱の一面による平面候補領域502、他面による平面候補領域503のそれぞれを、非平面候補領域504内の対応する領域が含まれるように更新した領域である。領域604に含まれる画素は、平面候補領域602、603の両方に含まれると判定された画素であり、領域604は、平面候補領域602、603の両方に含まれる。このように、非平面候補領域には、平面が写っていないのではなく、複数の平面が写っている可能性がある。平面候補領域更新手段573は、平面候補領域を更新することにより、分割領域内に複数の平面が写っている場合でも、適切に平面候補領域を検出することができる。   FIG. 6 is a schematic diagram for explaining the update of the plane candidate region. The plane candidate areas 602 and 603 of the image 600 shown in FIG. 6 correspond to the plane candidate area 502 by one side of the pillar shown in FIG. 5 and the plane candidate area 503 by the other side in the non-plane candidate area 504, respectively. This area is updated so that the area to be included is included. The pixels included in the region 604 are pixels determined to be included in both the plane candidate regions 602 and 603, and the region 604 is included in both the plane candidate regions 602 and 603. As described above, there is a possibility that a plurality of planes are captured in the non-planar candidate region, not a plane. The plane candidate area updating unit 573 can appropriately detect the plane candidate area by updating the plane candidate area even when a plurality of planes are shown in the divided area.

平面領域判定手段574は、検出された平面候補領域に基づいて、平面領域を検出する。
平面領域判定手段574は、平面候補領域検出手段571が検出し、平面候補領域結合手段572が結合し、平面候補領域更新手段573が更新した平面候補領域を、監視空間に存在する平面に対応すると判定し、平面領域として検出する。なお、平面領域判定手段574は、検出された平面候補領域の内、法線方向が予め定められた方向に含まれる平面候補領域のみを平面領域として検出してもよい。例えば、平面領域判定手段574は、法線方向が水平方向である、鉛直方向に延伸する平面候補領域のみを平面領域として検出してもよい。また、平面領域判定手段574は、検出された平面候補領域の内、サイズが所定サイズ(例えば柱とみなされるサイズ)以上の平面候補領域のみを平面領域として検出してもよい。
平面領域判定手段574は、検出した各平面領域の情報を、平面候補領域に対応する平面の法線方向(平面の傾き)の情報と関連付けて記憶部40に記憶する。なお、平面領域判定手段574は、検出した平面領域を、記憶部40を介さずに出力部30に出力してもよい。
The plane area determination unit 574 detects a plane area based on the detected plane candidate area.
The plane area determination unit 574 detects a plane candidate area detected by the plane candidate area detection unit 571, combined with the plane candidate area combination unit 572, and the plane candidate area updated by the plane candidate area update unit 573 corresponds to a plane existing in the monitoring space. It determines and detects as a plane area. The plane area determination unit 574 may detect only the plane candidate area whose normal direction is included in a predetermined direction among the detected plane candidate areas as the plane area. For example, the plane area determination unit 574 may detect only a plane candidate area extending in the vertical direction whose normal direction is the horizontal direction as a plane area. In addition, the plane area determination unit 574 may detect only a plane candidate area having a size equal to or larger than a predetermined size (for example, a size regarded as a pillar) as a plane area among the detected plane candidate areas.
The plane area determination unit 574 stores the information of each detected plane area in the storage unit 40 in association with the information on the normal direction (plane inclination) of the plane corresponding to the plane candidate area. Note that the plane area determination unit 574 may output the detected plane area to the output unit 30 without using the storage unit 40.

また、平面領域判定手段574は、定期的に平面領域を検出し、均一照明画像内における平面領域の位置、サイズ等が変化した場合、監視空間のレイアウトが変更になった可能性がある旨を出力部30を介して通知してもよい。
また、平面領域判定手段574は、予め監視空間内に存在する壁、柱等の位置を記憶部40に記憶しておき、検出した平面領域と記憶部40に記憶された位置が一致しない場合、撮影部10が移動された(画策行為)可能性がある旨を出力部30を介して通知してもよい。
Further, the plane area determination unit 574 periodically detects the plane area, and when the position, size, etc. of the plane area in the uniform illumination image has changed, it indicates that the layout of the monitoring space may have been changed. You may notify via the output part 30. FIG.
In addition, the plane area determination unit 574 stores the positions of walls, pillars, and the like existing in the monitoring space in advance in the storage unit 40, and when the detected plane area and the position stored in the storage unit 40 do not match, You may notify via the output part 30 that there exists a possibility that the imaging | photography part 10 was moved (plan action).

対象検出手段58は、動作モードが対象検出モードである場合に、撮影部10から監視空間を撮影した入力画像を取得し、取得した入力画像から、その監視空間に存在する検出対象を検出する。そのために、対象検出手段58は、変化領域検出手段581及び対象判定手段582等を有する。   When the operation mode is the target detection mode, the target detection unit 58 acquires an input image obtained by shooting the monitoring space from the shooting unit 10, and detects a detection target existing in the monitoring space from the acquired input image. For this purpose, the target detection unit 58 includes a change area detection unit 581, a target determination unit 582, and the like.

変化領域検出手段581は、監視空間を異なるタイミングで撮影した複数の画像から輝度値が変化する変化領域を検出する。
変化領域検出出手段581は、入力画像内の各画素の輝度値と、記憶部40に記憶されている背景画像の対応する各画素の輝度値との差の絶対値を算出し、算出した差の絶対値が所定閾値以上となる画素の領域を差分領域として抽出する。変化領域検出出手段581は、同一物体による差分領域をラベリングによりグループ化し、変化領域として検出する。即ち、変化領域検出出手段581は、一枚のフレームから抽出した差分領域の内、相互に隣接(8連結)する画素をグループ化し、相互に近接する(所定範囲内に位置する)グループを、大きさ又は位置関係に基づいて結合し、結合した領域を変化領域として結合する。
なお、変化領域検出出手段581は、フレーム間差分、背景画像と入力画像の正規化相関、学習識別器等の他の公知の技術を用いて、変化領域を検出してもよい。
The change area detection unit 581 detects a change area in which the luminance value changes from a plurality of images obtained by shooting the monitoring space at different timings.
The change area detection and output unit 581 calculates the absolute value of the difference between the luminance value of each pixel in the input image and the luminance value of each corresponding pixel of the background image stored in the storage unit 40, and calculates the calculated difference. A region of a pixel whose absolute value is equal to or greater than a predetermined threshold is extracted as a difference region. The change area detection and output unit 581 groups difference areas of the same object by labeling and detects them as change areas. That is, the change area detection and output unit 581 groups pixels adjacent to each other (eight connected) in the difference area extracted from one frame, and groups adjacent to each other (located within a predetermined range). Based on the size or positional relationship, the combined area is combined as a change area.
Note that the change area detection and output unit 581 may detect the change area using other known techniques such as inter-frame difference, normalized correlation between the background image and the input image, and a learning discriminator.

対象判定手段582は、変化領域が平面領域と重複する度合いに基づいて、変化領域に検出対象が写っているか否かを判定し、変化領域に検出対象が写っている場合、判定結果を含む結果信号を出力部30を介して外部装置へ出力する。   The object determination means 582 determines whether or not the detection target is shown in the change area based on the degree of overlap of the change area with the plane area. If the detection target is shown in the change area, the result including the determination result The signal is output to an external device via the output unit 30.

対象判定手段582は、まず、変化領域の大きさ、縦横比等の特徴量に基づいて、その変化領域に写っている物体が検出対象らしいか否かを判定する。例えば検出対象が人物である場合、対象判定手段582は、変化領域の大きさが人物の大きさに相当する所定範囲内であり、且つ、変化領域の縦横比が人物の縦横比に相当する所定範囲内であるか否かにより、その変化領域に写っている物体が人物らしいか否かを判定する。なお、各変化領域の大きさは、入力画像内の位置、及び、記憶部40に記憶されている撮影部10の設置情報等を用いて実際の大きさに変換される。
次に、対象判定手段582は、平面領域検出手段57が検出した平面領域の情報を記憶部40から読出し、写っている物体が人物らしいと判定された各変化領域が平面領域と重複する度合いである重複度を算出する。例えば検出対象が人物である場合、対象判定手段582は、記憶部40に記憶されている平面領域の内、鉛直方向に延伸する平面領域の情報を読出し、各変化領域とその平面領域の重複度を算出する。対象判定手段582は、重複度が所定値(例えば98%)以上である場合、その変化領域に人物が写っていないと判定する。一方、対象判定手段582は、重複度が所定値未満である場合、その変化領域に人物が写っていると判定する。
The object determination unit 582 first determines whether or not an object appearing in the change area is likely to be a detection target based on the feature quantity such as the size of the change area and the aspect ratio. For example, when the detection target is a person, the target determination unit 582 has a predetermined range in which the size of the change area is within a predetermined range corresponding to the size of the person, and the aspect ratio of the change area corresponds to the aspect ratio of the person. It is determined whether or not the object shown in the change area is a person depending on whether or not it is within the range. The size of each change area is converted into an actual size using the position in the input image, the installation information of the photographing unit 10 stored in the storage unit 40, and the like.
Next, the target determination unit 582 reads the information of the plane area detected by the plane area detection unit 57 from the storage unit 40, and the degree of overlap of each change area determined that the object shown is likely to be a person is overlapped with the plane area. A certain degree of duplication is calculated. For example, when the detection target is a person, the target determination unit 582 reads information on a plane area extending in the vertical direction from among the plane areas stored in the storage unit 40, and the degree of overlap between each change area and the plane area. Is calculated. The object determination unit 582 determines that a person is not shown in the change area when the degree of overlap is a predetermined value (for example, 98%) or more. On the other hand, if the degree of overlap is less than a predetermined value, the target determination unit 582 determines that a person is shown in the change area.

図7(a)は、平面領域と人物との関係について説明するための模式図であり、図7(b)は、平面領域と小動物又は光との関係について説明するための模式図である。図7(a)の画像700に示すように、人物は、通常、床面等の水平方向に延伸する平面上に立っており、壁、柱等の鉛直方向に延伸する平面上に立つことができない。したがって、人物が写っている変化領域704の少なくとも一部(下部)は、水平方向に延伸する平面領域701に含まれ、人物が写っている変化領域704の全部が、鉛直方向に延伸する平面領域702に内包されることはない。一方、図7(b)の画像710に示すように、変化領域711、713の全部が、鉛直方向に延伸する平面領域702、703に含まれる場合、その変化領域711、713には、小動物、光等が写っている可能性が高い。したがって、対象判定手段582は、変化領域と平面領域の重複度を用いることにより、変化領域に人物が写っているか否かを精度良く判定することが可能となる。
なお、平面領域702、703の内の少なくとも一方が鉛直方向に延伸する平面領域である場合、その平面領域702、703の両方に含まれる領域706は、鉛直方向に延伸するものとみなして対象物体の判定に用いられる。また、用途によっては、平面領域702、703の内の何れか一方が鉛直方向に延伸する平面領域でない(水平方向である)場合、領域706は、鉛直方向でない方向(水平方向)に延伸するものとみなされてもよい。
FIG. 7A is a schematic diagram for explaining the relationship between a planar region and a person, and FIG. 7B is a schematic diagram for explaining the relationship between the planar region and a small animal or light. As shown in an image 700 in FIG. 7A, a person usually stands on a plane extending in a horizontal direction such as a floor surface and stands on a plane extending in a vertical direction such as a wall and a pillar. Can not. Accordingly, at least a part (lower part) of the change area 704 in which the person is shown is included in the plane area 701 extending in the horizontal direction, and the entire change area 704 in which the person is shown is extended in the vertical direction. 702 is not included. On the other hand, as shown in an image 710 in FIG. 7B, when all of the change areas 711 and 713 are included in the plane areas 702 and 703 extending in the vertical direction, the change areas 711 and 713 include small animals, There is a high possibility that light is reflected. Therefore, the object determination unit 582 can accurately determine whether or not a person is shown in the change area by using the overlapping degree between the change area and the plane area.
When at least one of the planar regions 702 and 703 is a planar region extending in the vertical direction, the region 706 included in both the planar regions 702 and 703 is regarded as extending in the vertical direction, and the target object Used to determine In addition, depending on the application, when either one of the planar regions 702 and 703 is not a planar region extending in the vertical direction (in the horizontal direction), the region 706 extends in a direction other than the vertical direction (horizontal direction). May be considered.

なお、対象判定手段582は、先に、変化領域検出手段581が抽出した各変化領域と平面領域の重複度を算出し、重複度が所定値未満である変化領域についてのみ、大きさ、縦横比等の特徴量に基づいて、その変化領域に写っている物体が検出対象らしいか否かを判定してもよい。
また、対象判定手段582は、変化領域が平面領域と重複する位置に基づいて、変化領域に検出対象が写っているか否かを判定してもよい。例えば、対象判定手段582は、変化領域の下端が、鉛直方向に延伸する平面領域と重複している場合、その変化領域に人物が写っていないと判定し、重複していない場合、その変化領域に人物が写っていると判定する。
また、対象判定手段582は、各変化領域と、水平方向に延伸する平面領域の重複度が所定値(例えば10%)以上である場合、その変化領域に人物が写っていると判定し、重複度が所定値未満である場合、その変化領域に人物が写っていないと判定してもよい。
また、対象判定手段582は、変化領域の下端が、水平方向に延伸する平面領域と重複している場合、その変化領域に人物が写っていると判定し、重複していない場合、その変化領域に人物が写っていないと判定してもよい。
これらの場合も、対象判定手段582は、変化領域に人物が写っているか否かを精度良く判定することが可能となる。
Note that the object determination unit 582 calculates the overlap between each change region and the plane region extracted by the change region detection unit 581 first, and only the change region where the overlap is less than a predetermined value has a size and an aspect ratio. It may be determined whether or not the object shown in the change area is likely to be detected based on the feature amount.
Further, the object determination unit 582 may determine whether or not the detection target is shown in the change area based on the position where the change area overlaps the planar area. For example, if the lower end of the change area overlaps with the planar area extending in the vertical direction, the object determination unit 582 determines that no person is shown in the change area, and if not, the change area It is determined that a person is reflected in.
Moreover, the object determination means 582 determines that a person is reflected in the change area when the overlap degree between each change area and the planar area extending in the horizontal direction is equal to or greater than a predetermined value (for example, 10%). If the degree is less than a predetermined value, it may be determined that no person is shown in the change area.
In addition, when the lower end of the change area overlaps the planar area extending in the horizontal direction, the object determination unit 582 determines that a person is reflected in the change area. It may be determined that no person is shown in the image.
Also in these cases, the object determination unit 582 can accurately determine whether or not a person is shown in the change area.

また、検出対象が小動物である場合、対象判定手段582は、変化領域と、鉛直方向に延伸する平面領域の重複度が所定値(例えば90%)以上であるときに、その変化領域に小動物が写っていると判定してもよい。また、対象判定手段582は、鉛直面での変化領域の時間的な変化(移動方向)に基づいて、その変化領域に小動物が写っているか否かを判定してもよい。例えば、対象判定手段582は、変化領域が、鉛直方向に延伸する平面領域内を上方向又は下方向に向かって移動していく場合、その変化領域に小動物が写っていると判定する。   In addition, when the detection target is a small animal, the object determination unit 582 determines that the small animal exists in the change area when the overlap between the change area and the plane area extending in the vertical direction is equal to or greater than a predetermined value (for example, 90%). It may be determined that it is reflected. Moreover, the object determination means 582 may determine whether or not a small animal is shown in the change area based on the temporal change (movement direction) of the change area on the vertical plane. For example, when the change area moves upward or downward in a plane area extending in the vertical direction, the object determination unit 582 determines that a small animal is reflected in the change area.

図8は、画像処理装置1による平面領域検出処理の動作を示すフローチャートである。
以下、図8に示したフローチャートを参照しつつ、本実施形態による平面領域検出処理の動作を説明する。なお、以下に説明する動作のフローは、記憶部40に記憶され、制御部50に読み込まれたプログラムに従って、制御部50により実行される。
最初に、画像取得手段53は、撮影部10から点灯入力画像及び消灯入力画像を取得する(ステップS101)。次に、画像取得手段53は、外乱光除去画像を生成し、均一照明画像を生成する(ステップS102)。次に、領域分割手段54は、均一照明画像を複数の分割領域に分割する(ステップS103)。次に、距離比率算出手段55は、均一照明画像内の分割領域毎に、基準画素に対応する監視空間内の位置と撮影部10の位置の間の距離と、他の各画素に対応する監視空間内の位置と撮影部10の位置の間の距離の比率を算出する(ステップS104)。次に、空間座標算出手段56は、距離比率算出手段55が算出した比率に基づいて、均一照明画像に含まれる各画素に対応する三次元空間内の空間座標を算出する(ステップS105)。
FIG. 8 is a flowchart showing the operation of the planar area detection process performed by the image processing apparatus 1.
The operation of the planar area detection process according to this embodiment will be described below with reference to the flowchart shown in FIG. The operation flow described below is executed by the control unit 50 according to a program stored in the storage unit 40 and read by the control unit 50.
First, the image acquisition unit 53 acquires a lighting input image and a lighting input image from the photographing unit 10 (step S101). Next, the image acquisition unit 53 generates a disturbance light removed image and generates a uniform illumination image (step S102). Next, the area dividing means 54 divides the uniform illumination image into a plurality of divided areas (step S103). Next, the distance ratio calculating means 55 for each divided region in the uniform illumination image, the distance between the position in the monitoring space corresponding to the reference pixel and the position of the photographing unit 10 and the monitoring corresponding to each other pixel. A ratio of the distance between the position in the space and the position of the photographing unit 10 is calculated (step S104). Next, the spatial coordinate calculation means 56 calculates the spatial coordinates in the three-dimensional space corresponding to each pixel included in the uniform illumination image based on the ratio calculated by the distance ratio calculation means 55 (step S105).

次に、平面候補領域検出手段571は、均一照明画像内の各分割領域から平面候補領域を検出する(ステップS106)。次に、平面候補領域結合手段572は、平面候補領域検出手段571が検出した平面候補領域の内、同一平面による平面候補領域同士を結合する(ステップS107)。次に、平面候補領域更新手段573は、平面候補領域検出手段571が平面候補領域として検出しなかった分割領域内の画素の内、対応する三次元空間内の空間座標が、その分割領域に隣接する平面候補領域に対応する三次元空間内の平面上に存在する画素をその平面候補領域に含ませるように平面候補領域を更新する(ステップS108)。次に、平面領域判定手段574は、検出された平面候補領域に基づいて、平面領域を検出し(ステップS109)、一連のステップを終了する。   Next, the plane candidate area detection unit 571 detects a plane candidate area from each divided area in the uniform illumination image (step S106). Next, the plane candidate area combining unit 572 combines the plane candidate areas on the same plane among the plane candidate areas detected by the plane candidate area detecting unit 571 (step S107). Next, the plane candidate area updating unit 573 has the corresponding spatial coordinates in the three-dimensional space adjacent to the divided area among the pixels in the divided area that the plane candidate area detecting unit 571 did not detect as the plane candidate area. The plane candidate area is updated so that pixels existing on the plane in the three-dimensional space corresponding to the plane candidate area to be included are included in the plane candidate area (step S108). Next, the plane area determination unit 574 detects a plane area based on the detected plane candidate area (step S109), and ends a series of steps.

なお、ステップS108の平面候補領域の更新処理をステップS107の平面候補領域の結合処理より前に実行してもよい。また、ステップS107及び/又はS108の処理は省略してもよい。また、本実施形態では、均一照明画像を用いて平面を検出する例を示したが、照明部20が各方向に対して略均一な強度で光を照射する場合は、ステップS102の均一照明画像の生成処理を省略し、外乱光除去画像をそのまま用いて平面を検出しても一定の効果を得ることができる。また、外乱光の影響がない環境である場合、外乱光除去画像を生成せずに、均一照明画像を生成したり、点灯入力画像をそのまま用いて平面を検出してもよい。   Note that the update process of the plane candidate area in step S108 may be executed before the plane candidate area combining process in step S107. Further, the processing of step S107 and / or S108 may be omitted. In the present embodiment, an example in which a plane is detected using a uniform illumination image is shown. However, when the illumination unit 20 emits light with substantially uniform intensity in each direction, the uniform illumination image in step S102. Even if the generation process is omitted and the plane is detected using the disturbance light removed image as it is, a certain effect can be obtained. In an environment where there is no influence of disturbance light, a uniform illumination image may be generated without generating the disturbance light removal image, or the plane may be detected using the lighting input image as it is.

図9は、検出対象が人物である場合の画像処理装置1による対象検出処理の動作を示すフローチャートである。
以下、図9に示したフローチャートを参照しつつ、本実施形態による対象検出処理の動作を説明する。なお、以下に説明する動作のフローは、記憶部40に記憶され、制御部50に読み込まれたプログラムに従って、制御部50により実行される。
最初に、対象検出手段58は、撮影部10から入力画像を取得する(ステップS201)。次に、変化領域検出手段581は、入力画像から変化領域を検出する(ステップS202)。入力画像から変化領域が検出されなかった場合、対象検出手段58は、処理をステップS201へ戻し、再度、撮影部10から入力画像を取得するまで待機する。一方、入力画像から変化領域が検出された場合、変化領域検出手段581は、検出した各変化領域についてステップS204〜S210の処理を実行する。
FIG. 9 is a flowchart showing the operation of target detection processing by the image processing apparatus 1 when the detection target is a person.
Hereinafter, the operation of the object detection process according to the present embodiment will be described with reference to the flowchart shown in FIG. The operation flow described below is executed by the control unit 50 according to a program stored in the storage unit 40 and read by the control unit 50.
First, the target detection unit 58 acquires an input image from the imaging unit 10 (step S201). Next, the change area detection unit 581 detects a change area from the input image (step S202). When the change area is not detected from the input image, the target detection unit 58 returns the process to step S201 and waits until the input image is acquired from the imaging unit 10 again. On the other hand, when a change area is detected from the input image, the change area detection unit 581 executes the processing of steps S204 to S210 for each detected change area.

最初に、対象判定手段582は、検出した変化領域について人物の特徴量を算出する(ステップS204)。次に、対象判定手段582は、算出した特徴量に基づいて、その変化領域に写っている物体が人物らしいか否かを判定する(ステップS205)。変化領域に写っている物体が人物らしくない場合、対象判定手段582は、変化領域に人物が写っていないと判定する(ステップS206)。一方、変化領域に写っている物体が人物らしい場合、対象判定手段582は、変化領域と、鉛直方向に延伸する平面領域の重複度を算出する(ステップS207)。次に、対象判定手段582は、重複度が所定値以上であるか否かを判定する(ステップS208)。重複度が所定値以上である場合、対象判定手段582は、変化領域に人物が写っていないと判定する(ステップS206)。一方、重複度が所定値未満である場合、対象判定手段582は、変化領域に人物が写っていると判定し(ステップS209)、判定結果を含む結果信号を出力部30を介して外部装置へ出力する(ステップS210)。対象判定手段582は、検出した各変化領域についてステップS204〜S210の処理を実行し、全ての変化領域についての処理が完了した場合、処理をステップS201へ戻し、再度、撮影部10から入力画像を取得するまで待機する。   First, the target determination unit 582 calculates a human feature amount for the detected change area (step S204). Next, the target determination unit 582 determines whether or not the object shown in the change area is a person based on the calculated feature amount (step S205). If the object shown in the change area is not like a person, the target determination unit 582 determines that no person is shown in the change area (step S206). On the other hand, if the object in the change area is likely to be a person, the target determination unit 582 calculates the degree of overlap between the change area and the plane area extending in the vertical direction (step S207). Next, the target determination unit 582 determines whether or not the degree of overlap is a predetermined value or more (step S208). If the degree of overlap is greater than or equal to the predetermined value, the target determination unit 582 determines that no person is shown in the change area (step S206). On the other hand, if the degree of overlap is less than the predetermined value, the target determination unit 582 determines that a person is shown in the change area (step S209), and sends a result signal including the determination result to the external device via the output unit 30. Output (step S210). The object determination unit 582 executes the processes of steps S204 to S210 for each detected change area. When the processes for all the change areas are completed, the process returns to step S201, and the input image is again received from the imaging unit 10. Wait until you get it.

以上説明してきたように、本実施形態による画像処理装置は、撮影した画像に含まれる各画素の輝度値の比率に基づいて、各画素に対応する監視空間内の位置と撮影部の位置の間の距離の比率を算出する。そして、画像処理装置は、算出した距離の比率に基づいて、撮影画像に含まれる各画素に対応する三次元空間内の空間座標を算出し、算出した空間座標が略同一平面上に存在するか否かに応じて、撮影した画像から平面領域を検出する。これにより、画像処理装置は、撮影装置と撮影装置により撮影される空間との位置関係が予め定められていない場合でも、撮影装置により撮影された画像から平面領域を精度良く検出することができる。さらに、画像処理装置は、撮影部及び照明部が一つのみしかない場合でも、撮影装置により撮影された画像から平面が存在する領域を精度良く検出することができる。   As described above, the image processing apparatus according to the present embodiment is based on the ratio of the luminance value of each pixel included in the photographed image, between the position in the monitoring space corresponding to each pixel and the position of the photographing unit. The ratio of the distance is calculated. Then, the image processing device calculates the spatial coordinates in the three-dimensional space corresponding to each pixel included in the captured image based on the calculated distance ratio, and whether the calculated spatial coordinates exist on substantially the same plane. Depending on whether or not, a planar area is detected from the captured image. As a result, the image processing apparatus can accurately detect the planar area from the image photographed by the photographing apparatus even when the positional relationship between the photographing apparatus and the space photographed by the photographing apparatus is not predetermined. Furthermore, the image processing apparatus can accurately detect a region where a plane exists from an image photographed by the photographing apparatus even when there is only one photographing unit and illumination unit.

また、本実施形態による画像処理装置は、外乱光の影響を除去した外乱光除去画像から、略均一な強度の照明が照射された状態の監視空間が写っている均一照明画像を生成し、生成した均一照明画像を解析して、監視空間内の平面が写っている平面領域を検出する。これにより、画像処理装置は、平面領域をより精度良く検出することができる。   In addition, the image processing apparatus according to the present embodiment generates a uniform illumination image in which a monitoring space in which illumination with substantially uniform intensity is irradiated is reflected from the disturbance light-removed image from which the influence of disturbance light has been removed. The obtained uniform illumination image is analyzed to detect a plane area in which the plane in the monitoring space is reflected. Thereby, the image processing apparatus can detect a planar area with higher accuracy.

以上のように、当業者は、本発明の範囲内で、実施される形態に合わせて様々な変更を行うことができる。   As described above, those skilled in the art can make various modifications in accordance with the embodiment to be implemented within the scope of the present invention.

1 画像処理装置
10 撮影部
53 画像取得手段
55 距離比率算出手段
56 空間座標算出手段
57 平面領域検出手段
571 平面候補領域検出手段
572 平面候補領域結合手段
573 平面候補領域更新手段
581 変化領域検出手段
582 対象判定手段
DESCRIPTION OF SYMBOLS 1 Image processing apparatus 10 Image pick-up part 53 Image acquisition means 55 Distance ratio calculation means 56 Spatial coordinate calculation means 57 Plane area detection means 571 Plane candidate area detection means 572 Plane candidate area combination means 573 Plane candidate area update means 581 Change area detection means 582 Target judgment means

Claims (4)

撮影装置により撮影された所定空間が写っている撮影画像を取得する画像取得部と、
前記撮影画像に含まれる基準画素の輝度値と他の各画素の輝度値の比率に基づいて、前記基準画素に対応する前記所定空間内の位置と前記撮影装置の位置の間の距離と、前記他の各画素に対応する前記所定空間内の位置と前記撮影装置の位置の間の距離の比率を算出する距離比率算出部と、
前記距離比率算出部が算出した比率に応じて、前記撮影画像に含まれる各画素に対応する三次元空間内の空間座標を算出する空間座標算出部と、
前記撮影画像において互いに近接する画素群のうち、当該画素群に含まれる画素に対応する前記空間座標が略同一平面上に存在する画素群を平面領域として検出する平面領域検出部と、
を有することを特徴とした画像処理装置。
An image acquisition unit that acquires a captured image of a predetermined space captured by the imaging device;
Based on the ratio between the luminance value of the reference pixel included in the captured image and the luminance value of each other pixel, the distance between the position in the predetermined space corresponding to the reference pixel and the position of the imaging device, A distance ratio calculation unit that calculates a ratio of a distance between the position in the predetermined space corresponding to each other pixel and the position of the photographing apparatus;
A spatial coordinate calculation unit that calculates a spatial coordinate in a three-dimensional space corresponding to each pixel included in the captured image according to the ratio calculated by the distance ratio calculation unit;
A plane area detection unit that detects, as a plane area, a pixel group in which the spatial coordinates corresponding to the pixels included in the pixel group among the pixel groups close to each other in the captured image are on the same plane;
An image processing apparatus comprising:
前記撮影画像を複数の分割領域に分割する領域分割部をさらに有し、
前記平面領域検出部は、
前記分割領域のうち、当該分割領域に含まれる各画素に対応する前記空間座標が略同一平面上に存在する分割領域を平面候補領域として検出する平面候補領域検出部と、
互いに隣接する二つの分割領域が前記平面候補領域として検出され、且つ、前記二つの分割領域に含まれる画素に対応する前記空間座標が略同一平面上に存在する場合、前記二つの分割領域を一つの平面候補領域として結合する平面候補領域結合部と、を有し、
前記平面候補領域に基づいて、前記平面領域を検出する、請求項1に記載の画像処理装置。
An area dividing unit that divides the captured image into a plurality of divided areas;
The planar area detection unit
Among the divided areas, a plane candidate area detecting unit that detects a divided area in which the spatial coordinates corresponding to each pixel included in the divided area exist on substantially the same plane as a plane candidate area;
When two divided areas adjacent to each other are detected as the plane candidate areas and the spatial coordinates corresponding to the pixels included in the two divided areas are on substantially the same plane, the two divided areas are identified as one. A plane candidate area combining unit that combines as two plane candidate areas,
The image processing apparatus according to claim 1, wherein the planar area is detected based on the planar candidate area.
前記撮影画像を複数の分割領域に分割する領域分割部をさらに有し、
前記平面領域検出部は、
前記分割領域のうち、当該分割領域に含まれる各画素に対応する前記空間座標が略同一平面上に存在する分割領域を平面候補領域として検出する平面候補領域検出部と、
互いに隣接する二つの分割領域の内の第1の分割領域が前記平面候補領域として検出され、第2の分割領域が前記平面候補領域として検出されない場合において、前記第2の分割領域に含まれる画素に対応する前記空間座標が、前記第1の分割領域に係る前記平面上に存在するか否かを判定し、当該平面上に存在すると判定された前記第2の分割領域の画素を前記第1の分割領域に係る前記平面候補領域に含ませる平面候補領域更新部と、をさらに有し、
前記平面候補領域に基づいて、前記平面領域を検出する、請求項1に記載の画像処理装置。
An area dividing unit that divides the captured image into a plurality of divided areas;
The planar area detection unit
Among the divided areas, a plane candidate area detecting unit that detects a divided area in which the spatial coordinates corresponding to each pixel included in the divided area exist on substantially the same plane as a plane candidate area;
Pixels included in the second divided region when the first divided region of the two divided regions adjacent to each other is detected as the planar candidate region and the second divided region is not detected as the planar candidate region It is determined whether or not the spatial coordinates corresponding to are on the plane related to the first divided area, and the pixels of the second divided area determined to be on the plane are the first A plane candidate area update unit to be included in the plane candidate area related to the divided area,
The image processing apparatus according to claim 1, wherein the planar area is detected based on the planar candidate area.
さらに、光の照射方向が前記撮影装置の撮影方向と略同一となるように設置された照明装置の配光情報を記憶する記憶部を有し
前記画像取得部は、
前記照明装置が点灯した状態で前記撮影装置が前記所定空間を撮影した点灯入力画像、及び、前記照明装置が消灯した状態で前記撮影装置が前記所定空間を撮影した消灯入力画像を取得し、前記点灯入力画像及び前記消灯入力画像に基づいて、外乱光の影響を除去した外乱光除去画像を生成する外乱光除去画像生成手段と、
前記外乱光除去画像及び前記配光情報に基づいて、画像内の各画素の視軸方向に向けて略均一な強度の照明が照射された状態の前記所定空間が写っている均一照明画像を生成する均一照明画像生成手段と、を有し、
前記均一照明画像を前記撮影画像として取得する、請求項1〜3の何れか一項に記載の画像処理装置。
Further, a storage unit for irradiating direction of the light storing light distribution information of the installed lighting device so as to be substantially the same as the photographing direction of the photographing device,
The image acquisition unit
The imaging device is illuminated input image obtained by photographing a predetermined space in a state where the lighting device is turned on, and obtains the off input image in which the lighting device is the imaging device have taken the prescribed space in a state of being turned off, the Disturbance light removal image generation means for generating a disturbance light removal image from which the influence of disturbance light is removed based on the lighting input image and the extinction input image;
Based on the disturbance light-removed image and the light distribution information, a uniform illumination image in which the predetermined space in a state where illumination with substantially uniform intensity is irradiated toward the visual axis direction of each pixel in the image is generated. has a uniform illumination image generation means for, the,
The image processing apparatus according to claim 1, wherein the uniform illumination image is acquired as the captured image .
JP2016140865A 2016-07-15 2016-07-15 Image processing device Active JP6416157B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2016140865A JP6416157B2 (en) 2016-07-15 2016-07-15 Image processing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2016140865A JP6416157B2 (en) 2016-07-15 2016-07-15 Image processing device

Related Child Applications (1)

Application Number Title Priority Date Filing Date
JP2018188576A Division JP6591647B2 (en) 2018-10-03 2018-10-03 Image processing device

Publications (2)

Publication Number Publication Date
JP2018010601A JP2018010601A (en) 2018-01-18
JP6416157B2 true JP6416157B2 (en) 2018-10-31

Family

ID=60993527

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2016140865A Active JP6416157B2 (en) 2016-07-15 2016-07-15 Image processing device

Country Status (1)

Country Link
JP (1) JP6416157B2 (en)

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04259811A (en) * 1991-02-15 1992-09-16 Matsushita Electric Works Ltd Method for detecting inclination in plane
JP2006178696A (en) * 2004-12-22 2006-07-06 Nippon Telegr & Teleph Corp <Ntt> Plane detection apparatus and method, and plane detection program
JP4935769B2 (en) * 2008-06-25 2012-05-23 株式会社豊田中央研究所 Plane region estimation apparatus and program
JP6061616B2 (en) * 2012-10-29 2017-01-18 キヤノン株式会社 Measuring apparatus, control method therefor, and program
JP6386837B2 (en) * 2014-09-02 2018-09-05 任天堂株式会社 Image processing program, information processing system, information processing apparatus, and image processing method

Also Published As

Publication number Publication date
JP2018010601A (en) 2018-01-18

Similar Documents

Publication Publication Date Title
WO2012124730A1 (en) Detection device, input device, projector, and electronic apparatus
JP4985651B2 (en) Light source control device, light source control method, and light source control program
KR101196219B1 (en) Method for measuring height of a measuring target in a three dimensional shape measurment apparatus and three dimensional shape measurment apparatus using the same
JP5300694B2 (en) Detection device
JP2006030127A (en) Camera calibrating system and three-dimensional measuring system
US7900840B2 (en) Methods and apparatus for directing bar code positioning for imaging scanning
JP5432864B2 (en) Inspection apparatus and inspection method
US20140111097A1 (en) Identification device, method and computer program product
US20140015417A1 (en) Lighting control system
US20200241550A1 (en) Robot without detection dead zone
US20190051005A1 (en) Image depth sensing method and image depth sensing apparatus
JP6591647B2 (en) Image processing device
JP2012115505A (en) Visual line detection device and visual line detection method
US10853935B2 (en) Image processing system, computer readable recording medium, and image processing method
TW201419944A (en) System for controlling LED to illuminate and method thereof
JP2006268677A (en) Sensing device
US20130208091A1 (en) Ambient light alert for an image sensor
JP6416157B2 (en) Image processing device
JP2002228417A (en) Crack measuring apparatus
JP6978080B2 (en) Private room watching device
JP2013106238A (en) Marker detection and tracking device
JP6902906B2 (en) Image processing device
JP6183748B2 (en) Motion detection device
JP5179132B2 (en) Human body detection device
JP2010169431A (en) Passage detecting apparatus

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20180611

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20180626

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20180824

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20181003

R150 Certificate of patent or registration of utility model

Ref document number: 6416157

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

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250