JP2013246009A - Object detection apparatus - Google Patents

Object detection apparatus Download PDF

Info

Publication number
JP2013246009A
JP2013246009A JP2012119050A JP2012119050A JP2013246009A JP 2013246009 A JP2013246009 A JP 2013246009A JP 2012119050 A JP2012119050 A JP 2012119050A JP 2012119050 A JP2012119050 A JP 2012119050A JP 2013246009 A JP2013246009 A JP 2013246009A
Authority
JP
Japan
Prior art keywords
distance
object detection
information
detected
dsh
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.)
Pending
Application number
JP2012119050A
Other languages
Japanese (ja)
Inventor
Mitsutaka Yamaguchi
光隆 山口
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.)
Sanyo Electric Co Ltd
Original Assignee
Sanyo Electric 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 Sanyo Electric Co Ltd filed Critical Sanyo Electric Co Ltd
Priority to JP2012119050A priority Critical patent/JP2013246009A/en
Publication of JP2013246009A publication Critical patent/JP2013246009A/en
Pending legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To provide an object detection apparatus capable of properly recognizing an object shape regardless of the position of a detection target object.SOLUTION: An object detection apparatus 1 comprises an information acquisition device 2 which acquires a distance image Pi corresponding to a distance of each of segment regions set to a reference template, and an object detector 31a which generates a binarized image Mi by binarizing the distance image Pi with a binarization threshold value Dsh corresponding to a distance in a Z-axis direction and detects the shape of an object from the binarized image Mi. The object detector 31a varies the binarization threshold value Dsh in accordance with a change of the distance to the object defined as a detection target. Thus, even when the detection target object is positioned farther than the binarization threshold value Dsh, the shape of the object can be detected properly.

Description

本発明は、3次元距離情報に基づいて目標領域内の物体を検出する物体検出装置に関する。   The present invention relates to an object detection apparatus that detects an object in a target area based on three-dimensional distance information.

従来、光を用いた物体検出装置が種々の分野で開発されている。いわゆる距離画像センサを用いた物体検出装置では、2次元平面上の平面的な画像のみならず、検出対象物体の奥行き方向の形状や動きを検出することができる。かかる物体検出装置では、レーザ光源やLED(Light Emitting Diode)から、予め決められた波長帯域の光が目標領域に投射され、その反射光がCMOSイメージセンサ等の受光素子により受光される。距離画像センサとして、種々のタイプのものが知られている。   Conventionally, object detection devices using light have been developed in various fields. An object detection apparatus using a so-called distance image sensor can detect not only a planar image on a two-dimensional plane but also the shape and movement of the detection target object in the depth direction. In such an object detection apparatus, light in a predetermined wavelength band is projected from a laser light source or an LED (Light Emitting Diode) onto a target area, and the reflected light is received by a light receiving element such as a CMOS image sensor. Various types of distance image sensors are known.

所定のドットパターンを持つレーザ光を目標領域に照射するタイプの距離画像センサでは、ドットパターンを持つレーザ光の目標領域からの反射光が受光素子によって受光される。そして、ドットの受光素子上の受光位置に基づいて、三角測量法を用いて、検出対象物体の各部(検出対象物体上の各ドットの照射位置)までの距離が検出される(たとえば、特許文献1、非特許文献1)。   In a distance image sensor of a type that irradiates a target region with laser light having a predetermined dot pattern, reflected light from the target region of laser light having a dot pattern is received by a light receiving element. Then, based on the light receiving position of the dot on the light receiving element, the distance to each part of the detection target object (irradiation position of each dot on the detection target object) is detected using triangulation (for example, Patent Literature 1, Non-Patent Document 1).

特開2012−32379号公報JP 2012-32379 A

第19回日本ロボット学会学術講演会(2001年9月18−20日)予稿集、P1279−128019th Annual Conference of the Robotics Society of Japan (September 18-20, 2001) Proceedings, P1279-1280

上記物体検出装置において、物体の動きを検出するためには、まず、動きを検出する対象の中心位置を特定する必要がある。この場合、たとえば、上記の距離検出手法によって得られた物体の距離情報から、距離に関する閾値をもとに、所定の距離以下の距離情報のみを抽出することによって、動きの検出対象とする2次元の平面形状が抽出される。そして、抽出した平面形状から物体の中心位置を特定し、所定時間間隔における物体の中心位置を追跡することにより、検出対象物体の動きが検出される。   In the object detection apparatus, in order to detect the movement of an object, first, it is necessary to specify the center position of the object whose movement is to be detected. In this case, for example, by extracting only distance information below a predetermined distance from the distance information of the object obtained by the distance detection method described above based on a threshold related to the distance, The planar shape is extracted. Then, the movement of the detection target object is detected by specifying the center position of the object from the extracted planar shape and tracking the center position of the object at a predetermined time interval.

この場合、検出対象物体が、上記距離に関する閾値よりも遠方に位置付けられると、動きの検出対象とする2次元の平面形状を適正に抽出することができず、物体の動きの検出を行うことができない惧れがある。   In this case, when the detection target object is positioned farther than the threshold value related to the distance, the two-dimensional plane shape as the motion detection target cannot be properly extracted, and the motion of the object can be detected. There is a possibility that it cannot be done.

本発明は、この点に鑑みてなされたものであり、検出対象物体の位置に関らず、適正に物体形状を認識可能な物体検出装置を提供することを目的とする。   The present invention has been made in view of this point, and an object of the present invention is to provide an object detection apparatus that can appropriately recognize an object shape regardless of the position of a detection target object.

本発明の主たる態様は、目標領域から物体を検出する物体検出装置に関する。本態様に係る物体検出装置は、目標領域内に設定された各参照位置までの距離に関する3次元距離情報を取得する情報取得部と、前記3次元距離情報から得られる前記各参照位置までの前記距離と所定の閾値とを比較することによって、前記各参照位置における前記距離を2値
化した2値化情報を生成し、前記2値化情報から物体の形状を検出する物体検出部と、を備える。前記物体検出部は、検出対象とされる物体までの距離の変化に応じて、前記閾値を変化させる。
A main aspect of the present invention relates to an object detection apparatus that detects an object from a target area. The object detection apparatus according to this aspect includes an information acquisition unit that acquires three-dimensional distance information related to a distance to each reference position set in a target region, and the reference positions obtained from the three-dimensional distance information. An object detection unit that generates binarization information obtained by binarizing the distance at each reference position by comparing the distance and a predetermined threshold, and detects the shape of the object from the binarization information; Prepare. The object detection unit changes the threshold according to a change in distance to an object to be detected.

本発明によれば、検出対象物体の位置に関らず、適正に物体形状を認識可能な物体検出装置を提供することができる。   ADVANTAGE OF THE INVENTION According to this invention, the object detection apparatus which can recognize an object shape appropriately irrespective of the position of a detection target object can be provided.

本発明の効果ないし意義は、以下に示す実施の形態の説明により更に明らかとなろう。ただし、以下に示す実施の形態は、あくまでも、本発明を実施化する際の一つの例示であって、本発明は、以下の実施の形態により何ら制限されるものではない。   The effects and significance of the present invention will become more apparent from the following description of embodiments. However, the embodiment described below is merely an example when the present invention is implemented, and the present invention is not limited to the following embodiment.

実施の形態に係る物体検出装置の構成を示す図である。It is a figure which shows the structure of the object detection apparatus which concerns on embodiment. 実施の形態に係る物体検出装置と情報処理装置の構成を示す図である。It is a figure which shows the structure of the object detection apparatus and information processing apparatus which concern on embodiment. 実施の形態に係る目標領域に対するレーザ光の照射状態とイメージセンサ上のレーザ光の受光状態を示す図である。It is a figure which shows the irradiation state of the laser beam with respect to the target area | region which concerns on embodiment, and the light reception state of the laser beam on an image sensor. 実施の形態に係る参照パターンの生成方法を説明する図である。It is a figure explaining the production | generation method of the reference pattern which concerns on embodiment. 実施の形態に係る距離検出手法を説明する図である。It is a figure explaining the distance detection method which concerns on embodiment. 実施の形態に係る物体検出手法を説明する図である。It is a figure explaining the object detection method which concerns on embodiment. 実施の形態に係る物体の形状抽出手法を説明する図である。It is a figure explaining the shape extraction method of the object concerning an embodiment. 実施の形態に係る物体検出にかかるフローチャートである。It is a flowchart concerning the object detection which concerns on embodiment. 実施の形態に係る物体検出にかかるフローチャートである。It is a flowchart concerning the object detection which concerns on embodiment. 実施の形態に係る物体検出にかかる閾値設定の例を示す図である。It is a figure which shows the example of the threshold value setting concerning the object detection which concerns on embodiment. 変更例に係る物体検出装置と情報処理装置の構成を示す図である。It is a figure which shows the structure of the object detection apparatus and information processing apparatus which concern on the example of a change. 変更例に係る物体検出にかかるフローチャートである。It is a flowchart concerning the object detection which concerns on the example of a change. 変更例に係る物体検出にかかる閾値設定の例を示す図である。It is a figure which shows the example of the threshold value setting concerning the object detection which concerns on the example of a change. 変更例に係る物体検出にかかるフローチャート、および物体検出にかかる閾値設定の例を示す図である。It is a figure which shows the example concerning the flowchart concerning the object detection which concerns on the example of a change, and the threshold value setting concerning an object detection.

以下、本発明の実施の形態につき図面を参照して説明する。本実施の形態には、所定のドットパターンを持つレーザ光を目標領域に照射して3次元距離情報を取得するタイプの情報取得装置と、情報取得装置によって取得された3次元距離情報から、2値化画像を生成して、物体の形状、動きを検出するタイプの物体検出装置が例示されている。   Embodiments of the present invention will be described below with reference to the drawings. In this embodiment, an information acquisition device of a type that acquires a three-dimensional distance information by irradiating a target region with a laser beam having a predetermined dot pattern, and two-dimensional distance information acquired by the information acquisition device, 2 A type of object detection device that generates a digitized image and detects the shape and motion of the object is illustrated.

まず、図1に本実施の形態に係る物体検出装置1の概略構成を示す。図示の如く、物体検出装置1は、情報取得装置2と、情報処理装置3とを備えている。テレビ4は、情報処理装置3からの信号によって制御される。   First, FIG. 1 shows a schematic configuration of an object detection apparatus 1 according to the present embodiment. As shown in the figure, the object detection device 1 includes an information acquisition device 2 and an information processing device 3. The television 4 is controlled by a signal from the information processing device 3.

情報取得装置2は、目標領域全体に赤外光を投射し、その反射光をCMOSイメージセンサにて受光することにより、目標領域にある物体各部の距離(以下、「3次元距離情報」という)を取得する。取得された3次元距離情報は、ケーブル5を介して情報処理装置3に送られる。   The information acquisition device 2 projects infrared light over the entire target area, and receives the reflected light with a CMOS image sensor, whereby the distance between each part of the object in the target area (hereinafter referred to as “three-dimensional distance information”). To get. The acquired three-dimensional distance information is sent to the information processing apparatus 3 via the cable 5.

情報処理装置3は、たとえば、テレビ制御用のコントローラやゲーム機、パーソナルコンピュータ等である。情報処理装置3は、情報取得装置2から受信した3次元距離情報に基づき、目標領域における物体を検出し、検出結果に基づきテレビ4を制御する。   The information processing device 3 is, for example, a television control controller, a game machine, a personal computer, or the like. The information processing device 3 detects an object in the target area based on the three-dimensional distance information received from the information acquisition device 2, and controls the television 4 based on the detection result.

たとえば、情報処理装置3は、受信した3次元距離情報に基づき人を検出するとともに
、3次元距離情報の変化から、その人の動きを検出する。たとえば、情報処理装置3がテレビ制御用のコントローラである場合、情報処理装置3には、受信した3次元距離情報からその人のジェスチャを検出するとともに、ジェスチャに応じてテレビ4に制御信号を出力するアプリケーションプログラムがインストールされている。この場合、ユーザは、テレビ4を見ながら所定のジェスチャをすることにより、チャンネル切り替えやボリュームのUp/Down等、所定の機能をテレビ4に実行させることができる。
For example, the information processing device 3 detects a person based on the received three-dimensional distance information and detects the movement of the person from the change in the three-dimensional distance information. For example, when the information processing device 3 is a television control controller, the information processing device 3 detects the person's gesture from the received three-dimensional distance information and outputs a control signal to the television 4 in accordance with the gesture. The application program to be installed is installed. In this case, the user can cause the TV 4 to execute predetermined functions such as channel switching and volume up / down by making a predetermined gesture while watching the TV 4.

また、たとえば、情報処理装置3がゲーム機である場合、情報処理装置3には、受信した3次元距離情報からその人の動きを検出するとともに、検出した動きに応じてテレビ画面上のキャラクタを動作させ、ゲームの対戦状況を変化させるアプリケーションプログラムがインストールされている。この場合、ユーザは、テレビ4を見ながら所定の動きをすることにより、自身がテレビ画面上のキャラクタとしてゲームの対戦を行う臨場感を味わうことができる。   For example, when the information processing device 3 is a game machine, the information processing device 3 detects the person's movement from the received three-dimensional distance information, and displays a character on the television screen according to the detected movement. An application program that operates and changes the game battle situation is installed. In this case, the user can experience a realistic sensation of playing the game as a character on the television screen by making a predetermined movement while watching the television 4.

図2は、情報取得装置2と情報処理装置3の構成を示す図である。   FIG. 2 is a diagram illustrating the configuration of the information acquisition device 2 and the information processing device 3.

情報取得装置2は、光学部の構成として、投射光学系100と受光光学系200とを備えている。投射光学系100と受光光学系200は、X軸方向に並ぶように、情報取得装置2に配置される。   The information acquisition apparatus 2 includes a projection optical system 100 and a light receiving optical system 200 as a configuration of the optical unit. The projection optical system 100 and the light receiving optical system 200 are arranged in the information acquisition device 2 so as to be aligned in the X-axis direction.

投射光学系100は、レーザ光源110と、コリメータレンズ120と、ミラー130と、回折光学素子(DOE:Diffractive Optical Element)140を備えている。また、受光光学系200は、アパーチャ210と、撮像レンズ220と、フィルタ230と、CMOSイメージセンサ240とを備えている。この他、情報取得装置2は、回路部の構成として、CPU(Central Processing Unit)21と、レーザ駆動回路22と、撮像信号処理回路23と、入出力回路24と、メモリ25を備えている。   The projection optical system 100 includes a laser light source 110, a collimator lens 120, a mirror 130, and a diffractive optical element (DOE) 140. The light receiving optical system 200 includes an aperture 210, an imaging lens 220, a filter 230, and a CMOS image sensor 240. In addition, the information acquisition apparatus 2 includes a CPU (Central Processing Unit) 21, a laser driving circuit 22, an imaging signal processing circuit 23, an input / output circuit 24, and a memory 25 as a circuit unit.

レーザ光源110は、受光光学系200から離れる方向(X軸負方向)に波長830nm程度の狭波長帯域のレーザ光を出力する。コリメータレンズ120は、レーザ光源110から出射されたレーザ光を平行光から僅かに広がった光(以下、単に「平行光」という)に変換する。   The laser light source 110 outputs laser light in a narrow wavelength band having a wavelength of about 830 nm in a direction away from the light receiving optical system 200 (X-axis negative direction). The collimator lens 120 converts the laser light emitted from the laser light source 110 into light slightly spread from parallel light (hereinafter simply referred to as “parallel light”).

ミラー130は、コリメータレンズ120側から入射されたレーザ光をDOE140に向かう方向(Z軸方向)に反射する。   The mirror 130 reflects the laser light incident from the collimator lens 120 side in the direction toward the DOE 140 (Z-axis direction).

DOE140は、入射面に回折パターンを有する。この回折パターンによる回折作用により、DOE140に入射したレーザ光は、所定のドットパターンのレーザ光に変換されて、目標領域に照射される。   The DOE 140 has a diffraction pattern on the incident surface. Due to the diffractive action of this diffraction pattern, the laser light incident on the DOE 140 is converted into laser light having a predetermined dot pattern and irradiated onto the target area.

DOE140の回折パターンは、たとえば、ステップ型の回折ホログラムが所定のパターンで形成された構造とされる。回折ホログラムは、コリメータレンズ120により平行光とされたレーザ光をドットパターンのレーザ光に変換するよう、パターンとピッチが調整されている。   The diffraction pattern of the DOE 140 has, for example, a structure in which a step type diffraction hologram is formed in a predetermined pattern. The diffraction hologram is adjusted in pattern and pitch so as to convert the laser light converted into parallel light by the collimator lens 120 into laser light of a dot pattern.

DOE140は、ミラー130から入射されたレーザ光を、放射状に広がるドットパターンのレーザ光として、目標領域に照射する。ドットパターンの各ドットの大きさは、DOE140に入射する際のレーザ光のビームサイズに応じたものとなる。   The DOE 140 irradiates the target region with the laser beam incident from the mirror 130 as a laser beam having a dot pattern that spreads radially. The size of each dot in the dot pattern depends on the beam size of the laser light when entering the DOE 140.

目標領域から反射されたレーザ光は、アパーチャ210を介して撮像レンズ220に入射する。   The laser light reflected from the target area enters the imaging lens 220 via the aperture 210.

アパーチャ210は、撮像レンズ220のFナンバーに合うように、外部からの光に絞りを掛ける。撮像レンズ220は、アパーチャ210を介して入射された光をCMOSイメージセンサ240上に集光する。フィルタ230は、レーザ光源110の出射波長(830nm程度)を含む赤外の波長帯域の光を透過し、可視光の波長帯域をカットするIRフィルタ(Infrared Filter)である。   The aperture 210 stops the light from the outside so as to match the F number of the imaging lens 220. The imaging lens 220 collects the light incident through the aperture 210 on the CMOS image sensor 240. The filter 230 is an IR filter (Infrared Filter) that transmits light in the infrared wavelength band including the emission wavelength (about 830 nm) of the laser light source 110 and cuts the wavelength band of visible light.

CMOSイメージセンサ240は、撮像レンズ220にて集光された光を受光して、画素毎に、受光量に応じた信号(電荷)を撮像信号処理回路23に出力する。ここで、CMOSイメージセンサ240は、各画素における受光から高レスポンスでその画素の信号(電荷)を撮像信号処理回路23に出力できるよう、信号の出力速度が高速化されている。   The CMOS image sensor 240 receives the light collected by the imaging lens 220 and outputs a signal (charge) corresponding to the amount of received light to the imaging signal processing circuit 23 for each pixel. Here, in the CMOS image sensor 240, the output speed of the signal is increased so that the signal (charge) of the pixel can be output to the imaging signal processing circuit 23 with high response from the light reception in each pixel.

CPU21は、メモリ25に格納された制御プログラムに従って各部を制御する。かかる制御プログラムによって、CPU21には、レーザ光源110を制御するためのレーザ制御部21aと、3次元距離情報を生成するための距離取得部21bの機能が付与される。   The CPU 21 controls each unit according to a control program stored in the memory 25. With this control program, the CPU 21 is provided with the functions of a laser control unit 21a for controlling the laser light source 110 and a distance acquisition unit 21b for generating three-dimensional distance information.

レーザ駆動回路22は、CPU21からの制御信号に応じてレーザ光源110を駆動する。   The laser drive circuit 22 drives the laser light source 110 according to a control signal from the CPU 21.

撮像信号処理回路23は、CMOSイメージセンサ240を制御して、CMOSイメージセンサ240で生成された各画素の信号(電荷)をライン毎に順次取り込む。そして、取り込んだ信号を順次CPU21に出力する。CPU21は、撮像信号処理回路23から供給される信号(撮像信号)をもとに、情報取得装置2から検出対象物の各部までの距離を、距離取得部21bによる処理によって算出する。入出力回路24は、情報処理装置3とのデータ通信を制御する。   The imaging signal processing circuit 23 controls the CMOS image sensor 240 and sequentially takes in the signal (charge) of each pixel generated by the CMOS image sensor 240 for each line. Then, the captured signals are sequentially output to the CPU 21. Based on the signal (imaging signal) supplied from the imaging signal processing circuit 23, the CPU 21 calculates the distance from the information acquisition device 2 to each part of the detection target by processing by the distance acquisition unit 21b. The input / output circuit 24 controls data communication with the information processing device 3.

情報処理装置3は、CPU31と、入出力回路32と、メモリ33を備えている。なお、情報処理装置3には、同図に示す構成の他、テレビ4との通信を行うための構成や、CD−ROM等の外部メモリに格納された情報を読み取ってメモリ33にインストールするためのドライブ装置等が配されるが、便宜上、これら周辺回路の構成は図示省略されている。   The information processing apparatus 3 includes a CPU 31, an input / output circuit 32, and a memory 33. In addition to the configuration shown in the figure, the information processing apparatus 3 is configured to communicate with the television 4 and to read information stored in an external memory such as a CD-ROM and install it in the memory 33. However, the configuration of these peripheral circuits is not shown for the sake of convenience.

CPU31は、メモリ33に格納された制御プログラム(アプリケーションプログラム)に従って各部を制御する。かかる制御プログラムによって、CPU31には、画像中の物体を検出するための物体検出部31aと、物体の動きに応じて、テレビ4の機能を制御するための機能制御部31bの機能が付与される。かかる制御プログラムは、たとえば、図示しないドライブ装置によってCD−ROMから読み取られ、メモリ33にインストールされる。   The CPU 31 controls each unit according to a control program (application program) stored in the memory 33. With this control program, the CPU 31 is provided with the functions of an object detection unit 31a for detecting an object in the image and a function control unit 31b for controlling the function of the television 4 according to the movement of the object. . Such a control program is read from a CD-ROM by a drive device (not shown) and installed in the memory 33, for example.

物体検出部31aは、情報取得装置2から供給される3次元距離情報から画像中の物体の形状を抽出し、抽出した物体形状の動きを検出する。ここで、物体検出部31aは、距離に関する閾値を基に、情報取得装置2から供給される3次元距離情報から物体の平面形状のみを抽出するため、2値化画像を生成する。その後、生成した2値化画像と、メモリ33に格納された物体形状を抽出するための物体形状抽出テンプレートとの比較を行い、動きの抽出対象となる物体形状と3次元距離情報中の物体形状の中心位置を特定する。物体検出部31aは、こうして、特定した物体形状の中心位置の距離情報を、所定時間ごとに追跡することによって、物体の動きを検出する。   The object detection unit 31a extracts the shape of the object in the image from the three-dimensional distance information supplied from the information acquisition device 2, and detects the movement of the extracted object shape. Here, the object detection unit 31a generates a binarized image in order to extract only the planar shape of the object from the three-dimensional distance information supplied from the information acquisition device 2 based on the threshold regarding the distance. Thereafter, the generated binarized image is compared with the object shape extraction template for extracting the object shape stored in the memory 33, and the object shape to be extracted from the motion and the object shape in the three-dimensional distance information are compared. Specify the center position of. In this way, the object detection unit 31a detects the movement of the object by tracking the distance information of the center position of the specified object shape every predetermined time.

たとえば、制御プログラムがゲームプログラムである場合、機能制御部31bは、物体
検出部31aによって検出された人の動き(ジェスチャ)に応じてテレビ画面上のキャラクタを動作させるための処理が制御プログラムにより実行される。
For example, when the control program is a game program, the function control unit 31b performs a process for causing the character on the television screen to operate according to the movement (gesture) of the person detected by the object detection unit 31a. Is done.

メモリ33に格納された制御プログラムがテレビ4の機能を制御するためのプログラムである場合、機能制御部31bは、物体検出部31aから人の動き(ジェスチャ)に応じた信号に基づき、テレビ4の機能(チャンネル切り替えやボリューム調整、等)を制御するための処理を実行する。   When the control program stored in the memory 33 is a program for controlling the function of the television 4, the function control unit 31 b uses the signal of the television 4 from the object detection unit 31 a based on a human motion (gesture). Processing for controlling functions (channel switching, volume adjustment, etc.) is executed.

入出力回路32は、情報取得装置2とのデータ通信を制御する。   The input / output circuit 32 controls data communication with the information acquisition device 2.

投射光学系100と受光光学系200は、投射光学系100の投射中心と受光光学系200の撮像中心がX軸に平行な直線上に並ぶように、X軸方向に所定の距離をもって並んで設置される。   The projection optical system 100 and the light receiving optical system 200 are installed side by side with a predetermined distance in the X axis direction so that the projection center of the projection optical system 100 and the imaging center of the light receiving optical system 200 are aligned on a straight line parallel to the X axis. Is done.

投射光学系100と受光光学系200の設置間隔は、情報取得装置2と目標領域の基準面との距離に応じて、設定される。どの程度離れた目標物を検出対象とするかによって、基準面と情報取得装置2との間の距離が変わる。検出対象の目標物までの距離が近くなるほど、投射光学系100と受光光学系200の設置間隔は狭くなる。逆に、検出対象の目標物までの距離が遠くなるほど、投射光学系100と受光光学系200の設置間隔は広くなる。   The installation interval between the projection optical system 100 and the light receiving optical system 200 is set according to the distance between the information acquisition device 2 and the reference plane of the target area. The distance between the reference plane and the information acquisition device 2 varies depending on how far away the target is to be detected. The closer the distance to the target to be detected is, the narrower the installation interval between the projection optical system 100 and the light receiving optical system 200 is. Conversely, as the distance to the target to be detected increases, the installation interval between the projection optical system 100 and the light receiving optical system 200 increases.

まず、情報取得装置2による3次元距離情報の取得方法について説明する。   First, a method for acquiring three-dimensional distance information by the information acquisition device 2 will be described.

図3(a)は、目標領域に対するレーザ光の照射状態を模式的に示す図、図3(b)は、CMOSイメージセンサ240におけるレーザ光の受光状態を模式的に示す図である。なお、図3(b)には、便宜上、目標領域に平坦な面(スクリーン)とスクリーンの前に人物が存在するときの受光状態が示されている。   FIG. 3A is a diagram schematically showing the irradiation state of the laser light on the target region, and FIG. 3B is a diagram schematically showing the light receiving state of the laser light in the CMOS image sensor 240. For convenience, FIG. 3B shows a flat surface (screen) in the target area and a light receiving state when a person is present in front of the screen.

図3(a)に示すように、投射光学系100からは、ドットパターンを持ったレーザ光(以下、このパターンを持つレーザ光の全体を「DP光」という)が、目標領域に照射される。図3(a)には、DP光の光束領域が実線の枠によって示されている。DP光の光束中には、DOE140による回折作用により生成されるドット領域(以下、単に「ドット」という)が、DOE140による回折作用によるドットパターンに従って点在している。   As shown in FIG. 3A, the projection optical system 100 irradiates a target region with laser light having a dot pattern (hereinafter, the entire laser light having this pattern is referred to as “DP light”). . In FIG. 3A, the light flux region of DP light is indicated by a solid line frame. In the light flux of DP light, dot regions (hereinafter simply referred to as “dots”) generated by the diffraction action by the DOE 140 are scattered according to the dot pattern by the diffraction action by the DOE 140.

目標領域に平坦な面(スクリーン)が存在すると、これにより反射されたDP光は、図3(b)のように、CMOSイメージセンサ240上に分布する。   When a flat surface (screen) exists in the target area, DP light reflected thereby is distributed on the CMOS image sensor 240 as shown in FIG.

図3(b)には、CMOSイメージセンサ240上のDP光の全受光領域が破線の枠によって示され、CMOSイメージセンサ240の撮像有効領域に入射するDP光の受光領域が実線の枠によって示されている。CMOSイメージセンサ240の撮像有効領域は、CMOSイメージセンサ240がDP光を受光した領域のうち、センサとして信号を出力する領域であり、たとえば、VGA(横640画素×縦480画素)のサイズである。また、同図(a)に示す目標領域上におけるDt0の光は、CMOSイメージセンサ240上では、同図(b)に示すDt’0の位置に入射する。スクリーンの前の人物の像は、CMOSイメージセンサ240上では、上下左右が反転して撮像される。   In FIG. 3B, the entire DP light receiving area on the CMOS image sensor 240 is indicated by a broken line frame, and the DP light receiving area incident on the imaging effective area of the CMOS image sensor 240 is indicated by a solid line frame. Has been. The effective imaging area of the CMOS image sensor 240 is an area where the CMOS image sensor 240 receives a DP light and outputs a signal as a sensor, and has a size of, for example, VGA (horizontal 640 pixels × vertical 480 pixels). . Further, the light of Dt0 on the target area shown in FIG. 10A enters the position of Dt′0 shown in FIG. An image of a person in front of the screen is taken upside down on the CMOS image sensor 240 in the vertical and horizontal directions.

ここで、図4、図5を参照して、上記距離検出の方法を説明する。   Here, the distance detection method will be described with reference to FIGS.

図4は、上記距離検出手法に用いられる参照パターンの設定方法を説明する図である。   FIG. 4 is a diagram for explaining a reference pattern setting method used in the distance detection method.

図4(a)に示すように、投射光学系100から所定の距離Lsの位置に、Z軸方向に垂直な平坦な反射平面RSが配置される。出射されたDP光は、反射平面RSによって反射され、受光光学系200のCMOSイメージセンサ240に入射する。これにより、CMOSイメージセンサ240から、撮像有効領域内の画素毎の電気信号が出力される。出力された画素毎の電気信号の値(画素値)は、図2のメモリ25上に展開される。   As shown in FIG. 4A, a flat reflection plane RS perpendicular to the Z-axis direction is disposed at a position at a predetermined distance Ls from the projection optical system 100. The emitted DP light is reflected by the reflection plane RS and enters the CMOS image sensor 240 of the light receiving optical system 200. Thereby, an electrical signal for each pixel in the effective imaging area is output from the CMOS image sensor 240. The output electric signal value (pixel value) for each pixel is developed on the memory 25 of FIG.

以下、反射面RSからの反射によって得られた全画素値からなる画像を、「基準画像」、反射面RSを「基準面」と称する。そして、図4(b)に示すように、基準画像上に、「参照パターン領域」が設定される。なお、図4(b)には、CMOSイメージセンサ240の背面側から受光面をZ軸正方向に透視した状態が図示されている。図5以降の図においても同様である。   Hereinafter, an image including all pixel values obtained by reflection from the reflection surface RS is referred to as a “reference image”, and the reflection surface RS is referred to as a “reference surface”. Then, as shown in FIG. 4B, a “reference pattern region” is set on the standard image. FIG. 4B shows a state in which the light receiving surface is seen through in the positive direction of the Z axis from the back side of the CMOS image sensor 240. The same applies to the drawings after FIG.

こうして設定された参照パターン領域に対して、所定の大きさを有する複数のセグメント領域が設定される。セグメント領域の大きさは、得られる距離情報による物体の輪郭抽出精度、CPU21に対する距離検出の演算量の負荷および後述する距離検出手法によるエラー発生率を考慮して決定される。本実施の形態では、セグメント領域の大きさは、横15画素×縦15画素に設定される。   A plurality of segment areas having a predetermined size are set for the reference pattern area set in this way. The size of the segment area is determined in consideration of the contour extraction accuracy of the object based on the obtained distance information, the load of the calculation amount of distance detection for the CPU 21, and the error occurrence rate by the distance detection method described later. In the present embodiment, the size of the segment area is set to 15 horizontal pixels × 15 vertical pixels.

図4(c)を参照して、参照パターン領域に設定されるセグメント領域について説明する。なお、図4(c)には、便宜上、各セグメント領域の大きさが横9画素×縦9画素で示され、各セグメント領域の中央の画素が×印で示されている。   With reference to FIG.4 (c), the segment area | region set to a reference pattern area | region is demonstrated. In FIG. 4C, for the sake of convenience, the size of each segment area is indicated by 9 pixels wide × 9 pixels high, and the center pixel of each segment area is indicated by a cross.

セグメント領域は、図4(c)に示すように、隣り合うセグメント領域が参照パターン領域に対してX軸方向およびY軸方向に1画素間隔で並ぶように設定される。すなわち、あるセグメント領域は、このセグメント領域のX軸方向およびY軸方向に隣り合うセグメント領域に対して1画素ずれた位置に設定される。このとき、各セグメント領域には、固有のパターンでドットが点在する。よって、セグメント領域内の画素値のパターンは、セグメント領域毎に異なっている。隣り合うセグメント領域の間隔が狭いほど、参照パターン領域内に含まれるセグメント領域の数が多くなり、目標領域の面内方向(X−Y平面方向)における距離検出の分解能が高められる。   As shown in FIG. 4C, the segment areas are set such that adjacent segment areas are arranged at intervals of one pixel in the X-axis direction and the Y-axis direction with respect to the reference pattern area. That is, a certain segment area is set at a position shifted by one pixel with respect to a segment area adjacent to the segment area in the X-axis direction and the Y-axis direction. At this time, each segment area is dotted with dots in a unique pattern. Therefore, the pattern of pixel values in the segment area is different for each segment area. The narrower the interval between adjacent segment areas, the greater the number of segment areas included in the reference pattern area, and the resolution of distance detection in the in-plane direction (XY plane direction) of the target area is enhanced.

こうして、CMOSイメージセンサ240上における参照パターン領域の位置に関する情報と、参照パターン領域に含まれる全画素の画素値(参照パターン)と、参照パターン領域に対して設定されるセグメント領域の情報が、図2のメモリ25に記憶される。メモリ25に記憶されるこれらの情報を、以下、「参照テンプレート」と称する。   Thus, information on the position of the reference pattern area on the CMOS image sensor 240, pixel values (reference patterns) of all pixels included in the reference pattern area, and segment area information set for the reference pattern area are shown in FIG. 2 memory 25. These pieces of information stored in the memory 25 are hereinafter referred to as “reference templates”.

図2のCPU21は、投射光学系100から検出対象物体の各部までの距離を算出する際に、参照テンプレートを参照する。CPU21は、距離を算出する際に、参照テンプレートから得られる各セグメント領域内のドットパターンのずれ量に基づいて、物体の各部までの距離を算出する。   The CPU 21 in FIG. 2 refers to the reference template when calculating the distance from the projection optical system 100 to each part of the detection target object. When calculating the distance, the CPU 21 calculates the distance to each part of the object based on the shift amount of the dot pattern in each segment area obtained from the reference template.

たとえば、図4(a)に示すように距離Lsよりも近い位置に物体がある場合、参照パターン上の所定のセグメント領域Snに対応するDP光(DPn)は、物体によって反射され、セグメント領域Snとは異なる領域Sn’に入射する。投射光学系100と受光光学系200はX軸方向に隣り合っているため、セグメント領域Snに対する領域Sn’の変位方向はX軸に平行となる。図4(a)の場合、物体が距離Lsよりも近い位置にあるため、領域Sn’は、セグメント領域Snに対してX軸正方向に変位する。物体が距離Lsよりも遠い位置にあれば、領域Sn’は、セグメント領域Snに対してX軸負方向に変位する。   For example, as shown in FIG. 4A, when an object is present at a position closer than the distance Ls, DP light (DPn) corresponding to a predetermined segment area Sn on the reference pattern is reflected by the object, and the segment area Sn. It is incident on a different region Sn ′. Since the projection optical system 100 and the light receiving optical system 200 are adjacent to each other in the X-axis direction, the displacement direction of the region Sn ′ with respect to the segment region Sn is parallel to the X-axis. In the case of FIG. 4A, since the object is located at a position closer than the distance Ls, the region Sn 'is displaced in the X-axis positive direction with respect to the segment region Sn. If the object is at a position farther than the distance Ls, the region Sn ′ is displaced in the negative X-axis direction with respect to the segment region Sn.

セグメント領域Snに対する領域Sn’の変位方向と変位量をもとに、投射光学系100からDP光(DPn)が照射された物体の部分までの距離Lrが、距離Lsを用いて、三角測量法に基づき算出される。同様にして、他のセグメント領域に対応する物体の部分について、投射光学系100からの距離が算出される。かかる算出手法の詳細は、たとえば、上記非特許文献1(第19回日本ロボット学会学術講演会(2001年9月18−20日)予稿集、P1279−1280)に示されている。   Based on the displacement direction and displacement amount of the region Sn ′ with respect to the segment region Sn, the distance Lr from the projection optical system 100 to the part of the object irradiated with DP light (DPn) is triangulated using the distance Ls. Calculated based on Similarly, the distance from the projection optical system 100 is calculated for the part of the object corresponding to another segment area. The details of this calculation method are described in, for example, Non-Patent Document 1 (The 19th Annual Conference of the Robotics Society of Japan (September 18-20, 2001) Proceedings, P1279-1280).

かかる距離算出では、参照テンプレートのセグメント領域Snが、実測時においてどの位置に変位したかを検出する。この検出は、実測時にCMOSイメージセンサ240上に照射されたDP光から得られたドットパターンと、セグメント領域Snに含まれるドットパターンとを照合することによって行われる。以下、実測時にCMOSイメージセンサ240上の撮像有効領域に照射されたDP光から得られた全画素値からなる画像を、「実測画像」と称する。実測時のCMOSイメージセンサ240の撮像有効領域は、基準画像取得時と同様に、たとえば、VGA(横640画素×縦480画素)のサイズである。   In this distance calculation, it is detected to which position the segment area Sn of the reference template has been displaced during actual measurement. This detection is performed by collating the dot pattern obtained from the DP light irradiated onto the CMOS image sensor 240 at the time of actual measurement with the dot pattern included in the segment region Sn. Hereinafter, an image made up of all the pixel values obtained from the DP light irradiated to the imaging effective area on the CMOS image sensor 240 at the time of actual measurement will be referred to as “measured image”. The effective imaging area of the CMOS image sensor 240 at the time of actual measurement is, for example, the size of VGA (horizontal 640 pixels × vertical 480 pixels), as in the case of acquiring the reference image.

図5(a)〜(e)は、かかる距離検出の手法を説明する図である。図5(a)は、CMOSイメージセンサ240上における基準画像に設定された参照パターン領域を示す図であり、図5(b)は、実測時のCMOSイメージセンサ240上の実測画像を示す図であり、図5(c)〜(e)は、実測画像に含まれるDP光のドットパターンと、参照テンプレートのセグメント領域に含まれるドットパターンとの照合方法を説明する図である。なお、便宜上、図5(a)、(b)には、一部のセグメント領域のみが示されており、図5(c)〜(e)には、各セグメント領域の大きさが、横9画素×縦9画素で示されている。また、図5(b)の実測画像には、便宜上、図4(b)のように、検出対象物体として基準面より前に人物が存在しており、人物の像が写り込んでいることが示されている。   FIGS. 5A to 5E are diagrams for explaining such a distance detection method. FIG. 5A is a diagram showing a reference pattern area set in a standard image on the CMOS image sensor 240, and FIG. 5B is a diagram showing an actually measured image on the CMOS image sensor 240 at the time of actual measurement. FIG. 5C to FIG. 5E are diagrams for explaining a collation method between the DP light dot pattern included in the actual measurement image and the dot pattern included in the segment area of the reference template. For convenience, FIGS. 5 (a) and 5 (b) show only a part of the segment areas, and FIGS. 5 (c) to 5 (e) show the size of each segment area. It is shown by pixel × 9 pixels vertically. 5B, for the sake of convenience, as shown in FIG. 4B, there is a person in front of the reference plane as a detection target object, and an image of the person is reflected. It is shown.

図5(a)のセグメント領域Siの実測時における変位位置を探索する場合、図5(b)に示すように、実測画像上に、セグメント領域Siに対して探索領域Riが設定される。探索領域Riは、X軸方向に所定の幅を持っている。セグメント領域Siが探索領域Riにおいて1画素ずつX軸方向に送られ、各送り位置において、セグメント領域Siのドットパターンと実測画像上のドットパターンとが比較される。以下、実測画像上の各送り位置に対応する領域を、「比較領域」と称する。探索領域Riには、セグメント領域Siと同じサイズの比較領域が複数設定され、X軸方向に隣り合う比較領域は互いに1画素ずれている。   When searching for the displacement position at the time of actual measurement of the segment area Si in FIG. 5A, as shown in FIG. 5B, the search area Ri is set for the segment area Si on the actual measurement image. The search area Ri has a predetermined width in the X-axis direction. The segment area Si is sent one pixel at a time in the search area Ri in the X-axis direction, and the dot pattern of the segment area Si is compared with the dot pattern on the measured image at each feed position. Hereinafter, a region corresponding to each feed position on the actually measured image is referred to as a “comparison region”. A plurality of comparison areas having the same size as the segment area Si are set in the search area Ri, and the comparison areas adjacent in the X-axis direction are shifted by one pixel from each other.

探索領域Riの幅は、検出対象物体が基準面よりも情報取得装置2に対して離れる方向、および近づく方向にどの程度の距離を検出可能な範囲とするかによって決定される。図5中では、基準画像上のセグメント領域Siの画素位置に対応する実測画像上の画素位置(中心画素位置)から、X軸負方向にx画素ずれた位置からX軸正方向にx画素ずれた範囲(以下、「探索範囲L0」という)においてセグメント領域Siが送られるように探索領域Riが設定されている。   The width of the search area Ri is determined by the direction in which the detection target object is away from the information acquisition device 2 with respect to the reference plane and how much distance is in the detectable direction. In FIG. 5, a shift of x pixels in the X-axis positive direction from a position shifted by x pixels in the negative X-axis direction from the pixel position (center pixel position) on the measured image corresponding to the pixel position of the segment region Si on the reference image. The search area Ri is set so that the segment area Si is sent in the specified range (hereinafter referred to as “search range L0”).

本実施の形態では、中心画素位置から−30画素ずれた位置から+30画素ずれた位置までの範囲が探索範囲L0に設定される。   In the present embodiment, the range from the position shifted by −30 pixels from the center pixel position to the position shifted by +30 pixels is set as the search range L0.

距離検出時には、探索領域Riにおいてセグメント領域SiをX軸方向に1画素ずつ送りながら、各送り位置において、参照テンプレートに記憶されているセグメント領域Siのドットパターンと、実測画像のDP光のドットパターンのマッチング度合いが求められる。このようにセグメント領域Siを探索領域Ri内においてX軸方向にのみ送るのは、上記のように、通常、参照テンプレートにより設定されたセグメント領域のドットパター
ンは、実測時において、X軸方向の所定の範囲内でのみ変位するためである。
At the time of distance detection, the segment area Si is fed one pixel at a time in the X-axis direction in the search area Ri, and at each feed position, the dot pattern of the segment area Si stored in the reference template and the dot pattern of the DP light of the measured image The degree of matching is required. As described above, the segment area Si is sent only in the X-axis direction in the search area Ri as described above. Normally, the dot pattern of the segment area set by the reference template is a predetermined value in the X-axis direction at the time of actual measurement. This is because the displacement occurs only within the range.

なお、実測時には、検出対象物体の位置によっては、セグメント領域に対応するドットパターンが実測画像からX軸方向にはみ出すことが起こり得る。たとえば、参照パターン領域のX軸負側のセグメント領域S1に対応するドットパターンが、基準面よりも遠距離の物体に反射された場合、セグメント領域S1に対応するドットパターンは、実測画像よりもX軸負方向に位置づけられる。この場合、セグメント領域に対応するドットパターンは、CMOSイメージセンサ240の撮像有効領域内にないため、このセグメント領域については、適正にマッチングを行うことができない。しかし、このような端のセグメント領域以外については、適正にマッチングを行うことができるため、物体の距離検出への影響は少ない。   At the time of actual measurement, depending on the position of the detection target object, the dot pattern corresponding to the segment area may protrude from the actual measurement image in the X-axis direction. For example, when a dot pattern corresponding to the segment area S1 on the negative X-axis side of the reference pattern area is reflected by an object at a distance farther than the reference plane, the dot pattern corresponding to the segment area S1 is X more than the measured image. Positioned in the negative axis direction. In this case, since the dot pattern corresponding to the segment area is not within the effective imaging area of the CMOS image sensor 240, the segment area cannot be properly matched. However, since it is possible to perform matching appropriately in areas other than the end segment areas, there is little influence on object distance detection.

なお、端の領域についても、適正にマッチングを行う場合には、実測時のCMOSイメージセンサ240の撮像有効領域を、基準画像取得時のCMOSイメージセンサ240の撮像有効領域よりも、大きくすることができるものを用いれば良い。たとえば、基準画像取得時において、VGA(横640画素×縦480画素)のサイズで撮像有効領域が設定された場合、実測時においては、それよりもX軸正方向およびX軸負方向に30画素分大きいサイズで撮像有効領域を設定する。これにより、実測画像が基準画像よりも大きくなるが、端のセグメント領域についても、適正にマッチングを行うことができる。   In addition, when matching is performed appropriately for the end region, the effective imaging region of the CMOS image sensor 240 at the time of actual measurement may be made larger than the effective imaging region of the CMOS image sensor 240 at the time of acquiring the reference image. What can be used should be used. For example, when an effective imaging area is set with a size of VGA (horizontal 640 pixels × vertical 480 pixels) at the time of acquiring a reference image, 30 pixels in the X-axis positive direction and X-axis negative direction than that when actually measured. The effective imaging area is set by a size that is larger. As a result, the actually measured image becomes larger than the reference image, but matching can be appropriately performed for the end segment area.

上記マッチング度合いの検出時には、まず、参照パターン領域の各画素の画素値と実測画像の各セグメント領域の各画素の画素値が2値化されて、メモリ25に保持される。たとえば、基準画像および実測画像の画素値が8ビットの階調の場合、0〜255の画素値のうち、所定の閾値以上の画素が、画素値1に、所定の閾値未満の画素が、画素値0に変換されて、メモリ25に保持される。その後、比較領域とセグメント領域Siとの間の類似度が求められる。すなわち、セグメント領域Siの各画素の画素値と、比較領域の対応する画素の画素値との差分が求められる。そして、求めた差分を比較領域の全ての画素について加算した値Rsadが、類似度を示す値として取得される。   When the matching degree is detected, first, the pixel value of each pixel in the reference pattern area and the pixel value of each pixel in each segment area of the actually measured image are binarized and stored in the memory 25. For example, when the pixel values of the reference image and the actually measured image are 8-bit gradations, among the pixel values of 0 to 255, the pixels that are equal to or greater than the predetermined threshold are the pixel values 1 and the pixels that are less than the predetermined threshold are pixels The value is converted to 0 and held in the memory 25. Thereafter, the similarity between the comparison region and the segment region Si is obtained. That is, the difference between the pixel value of each pixel in the segment area Si and the pixel value of the corresponding pixel in the comparison area is obtained. A value Rsad obtained by adding the obtained difference to all the pixels in the comparison region is acquired as a value indicating the similarity.

たとえば、図5(c)のように、一つのセグメント領域中に、n列×m行の画素が含まれている場合、セグメント領域のi列、j行の画素の画素値T(i,j)と、比較領域のi列、j行の画素の画素値I(i,j)との差分が求められる。そして、セグメント領域の全ての画素について差分が求められ、その差分の総和により、図5(c)に示す式の値Rsadが求められる。値Rsadが小さい程、セグメント領域と比較領域との間の類似度が高い。   For example, as shown in FIG. 5C, when pixels in n columns × m rows are included in one segment area, the pixel values T (i, j) of the pixels in i columns and j rows in the segment area. ) And the pixel value I (i, j) of the pixel in the comparison area i column and j row. Then, the difference is obtained for all the pixels in the segment area, and the value Rsad of the equation shown in FIG. 5C is obtained from the sum of the differences. The smaller the value Rsad, the higher the degree of similarity between the segment area and the comparison area.

こうして、図5(d)に示すように、セグメント領域Siについて、探索領域Riの全ての比較領域に対して値Rsadが求められる。図5(e)は、探索領域Riの各送り位置における値Rsadが模式的に示されたグラフである。セグメント領域Siについて、探索領域Riの全ての比較領域に対して値Rsadが求められると、まず、求めた値Rsadの中から、最小値Bt1が参照される。次に、求めた値Rsadの中から、2番目に小さい値Bt2が参照される。最小値Bt1と2番目に小さい値Bt2の位置が互いに2画素以上離れた位置であり、且つ、その差分値Esが閾値未満であれば、セグメント領域Siの探索はエラーとされる。他方、差分値Esが閾値以上であれば、最小値Bt1に対応する比較領域Ciが、セグメント領域Siの移動領域と判定される。   Thus, as shown in FIG. 5D, the value Rsad is obtained for all the comparison regions of the search region Ri for the segment region Si. FIG. 5E is a graph schematically showing the value Rsad at each feed position in the search area Ri. When the value Rsad is obtained for all the comparison regions of the search region Ri for the segment region Si, first, the minimum value Bt1 is referred to from the obtained value Rsad. Next, the second smallest value Bt2 is referred to from the obtained value Rsad. If the position of the minimum value Bt1 and the second smallest value Bt2 are two pixels or more away from each other and the difference value Es is less than the threshold value, the search for the segment area Si is regarded as an error. On the other hand, if the difference value Es is equal to or greater than the threshold value, the comparison area Ci corresponding to the minimum value Bt1 is determined as the movement area of the segment area Si.

たとえば、図5(d)のように、セグメント領域Siに対応する比較領域Ciは、基準画像上のセグメント領域Siの画素位置と同位置の実測画像上の画素位置Si0よりもX軸正方向にα画素ずれた位置で検出される。これは、基準面よりも近い位置に存在する検出対象物体(人物)によって、実測画像上のDP光のドットパターンが基準画像上のセグ
メント領域Si0よりもX軸正方向に変位したためである。なお、セグメント領域Siの大きさが大きいほど、セグメント領域Siに含まれるドットパターンのユニーク性が増し、上記エラーの発生率が減少する。たとえば、セグメント領域Siの大きさが横15画素×縦15画素に設定されると、通常、距離検出がエラーとなることは少なく、適正にマッチングを行うことができる。
For example, as shown in FIG. 5D, the comparison area Ci corresponding to the segment area Si is in the positive direction of the X axis with respect to the pixel position Si0 on the measured image at the same position as the pixel position of the segment area Si on the reference image. It is detected at a position shifted by α pixels. This is because the dot pattern of the DP light on the measured image is displaced in the X-axis positive direction from the segment area Si0 on the reference image by a detection target object (person) that is present at a position closer to the reference plane. Note that as the size of the segment region Si increases, the uniqueness of the dot pattern included in the segment region Si increases and the error rate decreases. For example, when the size of the segment region Si is set to 15 pixels wide × 15 pixels vertically, the distance detection usually does not cause an error, and matching can be performed appropriately.

こうして、実測時に取得されたDP光のドットパターンから、各セグメント領域の変位位置が探索されると、上記のように、その変位位置に基づいて、三角測量法により、各セグメント領域に対応する検出対象物体の部位までの距離が求められる。   Thus, when the displacement position of each segment region is searched from the dot pattern of DP light acquired at the time of actual measurement, detection corresponding to each segment region is performed by triangulation based on the displacement position as described above. The distance to the part of the target object is obtained.

このようにして、セグメント領域S1〜セグメント領域Snまで全てのセグメント領域について、上記同様のセグメント領域の探索が行われる。   In this manner, the same segment area search is performed for all the segment areas from the segment area S1 to the segment area Sn.

情報取得装置2は、上記のようにして取得された各セグメント領域に対応する検出対象物体までの距離を白から黒の階調で表現された画素値に割り当てた画像として、メモリ25に記憶する。以下、各セグメント領域に対応する距離を画素値で表現した画像を「距離画像」と称する。上記のように、本実施の形態では、セグメント領域は、基準画像の参照パターン領域に対して、1画素刻みで設定されるため、距離画像は、基準画像と略同様のVGAサイズの解像度(略640×略480)を有する。距離画像の画素の階調は、8ビットの階調であり、近距離ほど白(画素値255)に近く、遠距離ほど黒(画素値0)に近い階調が割り当てられる。また、セグメント領域の探索がエラーとなった場合は、黒(画素値0)の階調が割り当てられる。情報取得装置2は、所定の時間おきに、当該距離画像を、検出対象物体の3次元距離情報として、情報処理装置3に出力する。本実施の形態では、情報取得装置2は、1秒間に30個の距離画像を生成して、情報処理装置3に出力する。以下、1個の距離画像を1フレームと称する。   The information acquisition device 2 stores the distance to the detection target object corresponding to each segment area acquired as described above in the memory 25 as an image assigned to pixel values expressed in white to black gradations. . Hereinafter, an image in which a distance corresponding to each segment area is expressed by a pixel value is referred to as a “distance image”. As described above, in the present embodiment, since the segment area is set in increments of one pixel with respect to the reference pattern area of the standard image, the distance image has a resolution (substantially approximately the same VGA size as the standard image). 640 × approximately 480). The gradation of the pixel of the distance image is an 8-bit gradation, and a gradation closer to white (pixel value 255) is assigned to the closer distance, and a gradation closer to black (pixel value 0) is assigned to the longer distance. If the segment area search results in an error, a gray scale of black (pixel value 0) is assigned. The information acquisition device 2 outputs the distance image to the information processing device 3 as the three-dimensional distance information of the detection target object at predetermined time intervals. In the present embodiment, the information acquisition device 2 generates 30 distance images per second and outputs them to the information processing device 3. Hereinafter, one distance image is referred to as one frame.

次に、情報処理装置3の物体検出部31aにおける距離画像からの物体の形状抽出方法、および物体の動きの検出方法について説明する。   Next, a method for extracting the shape of the object from the distance image and a method for detecting the movement of the object in the object detection unit 31a of the information processing device 3 will be described.

図6(a)は、検出対象物体として人物の距離を取得した距離画像の例を示す図である。図6(b)は、所定の閾値で距離画像を2値化した画像の例を示す図である。図6(c)は、2値化した画像からの物体の形状抽出と、重心の抽出方法を説明する図である。図6(d)は、物体の動きの検出方法を説明する図である。ここでは、人物の右手の動きを抽出する方法を例にして、説明する。   FIG. 6A is a diagram illustrating an example of a distance image obtained by acquiring the distance of a person as a detection target object. FIG. 6B is a diagram illustrating an example of an image obtained by binarizing the distance image with a predetermined threshold. FIG. 6C is a diagram for explaining an object shape extraction from a binarized image and a center-of-gravity extraction method. FIG. 6D is a diagram for explaining a method for detecting the movement of an object. Here, a method for extracting the movement of the right hand of a person will be described as an example.

図6(a)を参照して、上述のようにして、情報取得装置2により3次元距離測定が行われ、所定の時間ごとに距離画像Piが生成される。距離画像Piには、人物が手を前方に突き出した状態で距離を取得したときの画像が示されており、手の位置が最も白く、人物のそれ以外の部分がやや黒に近い階調で示されている。また、人物以外の背景では、物体が検出されておらず、略黒の階調で示されている。   With reference to Fig.6 (a), as mentioned above, the information acquisition apparatus 2 performs three-dimensional distance measurement, and the distance image Pi is produced | generated for every predetermined time. The distance image Pi shows an image when the distance is acquired with the person protruding his / her hand forward, and the position of the hand is the whitest and the rest of the person has a gradation close to black. It is shown. In addition, in the background other than the person, no object is detected, and the background is substantially black.

情報取得装置2から出力された距離画像Piから人物の右手の動きを検出するために、物体検出部31aは、動きの中心位置となる右手の重心位置Gi(距離画像の画素位置)を特定する。右手の重心位置Giを検出するために、物体検出部31aは、まず、距離画像Piを図6(b)に示すように、白と黒のみで表現された2値化画像Miを生成し、右手の輪郭Egの形状を抽出する。   In order to detect the movement of the right hand of the person from the distance image Pi output from the information acquisition device 2, the object detection unit 31a specifies the center-of-gravity position Gi (pixel position of the distance image) that is the center position of the movement. . In order to detect the center of gravity position Gi of the right hand, the object detection unit 31a first generates a binarized image Mi in which the distance image Pi is expressed only in white and black as shown in FIG. The shape of the contour Eg of the right hand is extracted.

上述のように、距離画像Piの画素の階調は、情報取得装置2から離れる方向(Z軸方向)の物体の距離に相当する。2値化画像Miを生成するための2値化閾値Dshを、距離画像Piから形状を抽出したい物体の距離よりもやや遠方の距離に相当する値に設定す
ることで、それよりも近い位置の物体の形状のみを抽出することができる。
As described above, the gradation of the pixel of the distance image Pi corresponds to the distance of the object in the direction away from the information acquisition device 2 (Z-axis direction). By setting the binarization threshold Dsh for generating the binarized image Mi to a value corresponding to a distance a little farther than the distance of the object whose shape is to be extracted from the distance image Pi, Only the shape of the object can be extracted.

たとえば、人物の右手を抽出する場合、図6(a)の距離画像Piにおいて、人物の胴体、および肩等に相当するやや黒に近いグレーの画素値よりも大きく、人物の手の部分に相当するやや白に近いグレーの画素値よりもやや小さい値を2値化閾値Dshに設定する。これにより、図6(b)に示すように、人物の手の部分のみが白で表現された2値化画像Miが生成される。   For example, when extracting the right hand of a person, in the distance image Pi of FIG. 6A, the pixel value is slightly larger than a gray pixel value corresponding to a person's torso, shoulders, etc., which is slightly close to black, and corresponds to a part of the person's hand. As a result, a value slightly smaller than the gray pixel value close to white is set as the binarization threshold value Dsh. As a result, as shown in FIG. 6B, a binary image Mi in which only the hand portion of the person is expressed in white is generated.

次に、所定の物体の輪郭を抽出する輪郭抽出エンジンによって、あらかじめ、図2に示すメモリ33に記憶された物体形状抽出テンプレートが参照され、2値化画像Miから動きの検出対象とする物体の形状の輪郭が検出される。なお、物体形状抽出テンプレートには、動きの検出対象とする物体の形状を示す画素情報が含まれている。物体の輪郭抽出エンジンは、所定の検出手法によって、物体形状抽出テンプレートの画素情報と、2値化画像Miの画素情報を比較することにより、マッチングする物体の形状の輪郭を抽出する。ここでは、人の右手の輪郭Egを抽出するための物体形状抽出テンプレートが参照される。   Next, the object shape extraction template stored in the memory 33 shown in FIG. 2 is referred to in advance by the contour extraction engine that extracts the contour of the predetermined object, and the object to be detected from the binarized image Mi. A contour of the shape is detected. It should be noted that the object shape extraction template includes pixel information indicating the shape of the object to be detected for motion. The object contour extraction engine extracts the contour of the shape of the object to be matched by comparing the pixel information of the object shape extraction template with the pixel information of the binarized image Mi by a predetermined detection method. Here, an object shape extraction template for extracting the contour Eg of the human right hand is referred to.

こうして、2値化画像Miにおいて、右手の輪郭Egを検出した後、輪郭Egから、重心位置Giを算出する。これにより、動きの検出対象とされる形状が距離画像Piにおいてどの位置(画素位置)にあるかが検出される。   Thus, after detecting the right hand contour Eg in the binarized image Mi, the center-of-gravity position Gi is calculated from the contour Eg. Thereby, it is detected in which position (pixel position) the shape to be detected for motion is located in the distance image Pi.

そして、図6(c)に示すように、2値化画像Miにて、右手の重心位置Giが検出されると、距離画像Piにおける右手の重心位置Giの画素位置と画素値を参照し、右手の重心の3次元距離情報Ti(tx、ty、tz)を算出する。なお、距離画像Piの重心位置Giと2値化画像Miの重心位置Giは、同位置である。すなわち、距離画像Piにおける重心位置GiのX軸方向の画素位置が3次元距離情報Tiのtxに相当し、距離画像Piにおける重心位置GiのY軸方向の画素位置が3次元距離情報Tiのtyに相当し、距離画像Piにおける重心位置Giの画素値が3次元距離情報Tiのtzに相当する。これにより、距離画像Piが生成されたタイミングにおける右手の3次元距離情報Tiが取得される。   Then, as shown in FIG. 6C, when the right hand centroid position Gi is detected in the binarized image Mi, the pixel position and the pixel value of the right hand centroid position Gi in the distance image Pi are referred to. Three-dimensional distance information Ti (tx, ty, tz) of the center of gravity of the right hand is calculated. Note that the centroid position Gi of the distance image Pi and the centroid position Gi of the binarized image Mi are the same position. That is, the pixel position in the X-axis direction of the centroid position Gi in the distance image Pi corresponds to tx of the three-dimensional distance information Ti, and the pixel position in the Y-axis direction of the centroid position Gi in the distance image Pi is ty of the three-dimensional distance information Ti. The pixel value of the gravity center position Gi in the distance image Pi corresponds to tz of the three-dimensional distance information Ti. Thereby, the three-dimensional distance information Ti of the right hand at the timing when the distance image Pi is generated is acquired.

同様にして、各距離取得タイミングで取得された距離画像Pi+1以降についても、右手の3次元距離情報Ti+1〜を取得する。そして、各距離取得タイミング間における、3次元距離情報の変化をモニタすることにより、図6(d)に示すように、右手の3次元空間での動きを検出することができる。たとえば、図6(d)では、所定の距離取得タイミング間において、3次元距離情報Ti(tx、ty、tz)から、3次元距離情報Ti+1(tx+α、ty+β、tz+γ)に変化しており、手の位置がX軸方向にα、Y軸方向にβ、Z軸方向にγだけ変化したことを検出できる。   Similarly, the right-hand three-dimensional distance information Ti + 1 to 1 is acquired for the distance images Pi + 1 and subsequent acquired at each distance acquisition timing. Then, by monitoring the change in the three-dimensional distance information between the distance acquisition timings, it is possible to detect the movement of the right hand in the three-dimensional space as shown in FIG. For example, in FIG. 6D, the three-dimensional distance information Ti (tx, ty, tz) changes from the three-dimensional distance information Ti + 1 (tx + α, ty + β, tz + γ) between predetermined distance acquisition timings. It can be detected that the position of has changed by α in the X-axis direction, β in the Y-axis direction, and γ in the Z-axis direction.

図7(a)は、投射光学系100と受光光学系200をY軸方向から見た模式図である。図7(b)〜(d)は、人物Hの距離に応じた2値化画像Miの例を示す図である。   FIG. 7A is a schematic view of the projection optical system 100 and the light receiving optical system 200 viewed from the Y-axis direction. 7B to 7D are diagrams illustrating examples of the binarized image Mi corresponding to the distance of the person H. FIG.

図6(a)〜(d)では、図7(a)に示すように、人物Hが受光光学系200からの距離Zbに位置し、2値化閾値Dshは、人物Hの肩Hsよりも前方、且つ、人物Hの手Haよりも後方に位置する場合の物体検出の例を示した。このような場合、図7(b)のように、2値化閾値Dshよりも近距離側にある人物Hの手Haの形状のみが抽出される。   6A to 6D, as shown in FIG. 7A, the person H is located at a distance Zb from the light receiving optical system 200, and the binarization threshold Dsh is larger than the shoulder Hs of the person H. The example of the object detection in the case of being located ahead and behind the hand Ha of the person H is shown. In such a case, as shown in FIG. 7B, only the shape of the hand Ha of the person H that is closer to the binarization threshold Dsh is extracted.

しかし、たとえば、人物Hが距離Zbよりも遠方の距離Zcの位置に位置し、人物Hの全ての部位が2値化閾値Dshに相当する位置よりも遠方にある場合に距離画像Piを取
得して2値化閾値Dshで2値化すると、図7(c)に示すように、人物の手Hの形状、および人物Hの形状を抽出することはできない。したがって、このように、動きの検出対象物体が2値化閾値Dshに相当する位置よりも遠方に位置付けられた場合、適正に物体の動きを追従することができない。
However, for example, the distance image Pi is acquired when the person H is located at a distance Zc far from the distance Zb and all the parts of the person H are far away from the position corresponding to the binarization threshold Dsh. When binarization is performed using the binarization threshold Dsh, the shape of the person's hand H and the shape of the person H cannot be extracted as shown in FIG. Therefore, when the motion detection target object is positioned farther than the position corresponding to the binarization threshold value Dsh, the movement of the object cannot be properly followed.

また、たとえば、人物Hが距離Zbよりも近距離の距離Zaの位置に位置し、人物Hの全ての部位が2値化閾値Dshに相当する位置よりも近距離にある場合に距離画像Piを取得して2値化閾値Dshで2値化すると、図7(d)に示すように、人物の手Hの形状のみならず、人物Hの胴、肩等全ての形状が2値化画像Miに含まれることとなる。この場合において、右手の輪郭Egの形状を抽出しようとすると、図7(b)の場合に比べ、困難となる。たとえば、図7(d)において、手と胴の部分の境界部分は、同じ白の画素情報となっているため、より精度よく輪郭を抽出しないと、適正に手を抽出することができない。   Further, for example, when the person H is located at a position closer to the distance Za than the distance Zb, and all the parts of the person H are closer to the position corresponding to the binarization threshold Dsh, the distance image Pi is displayed. When obtained and binarized with the binarization threshold value Dsh, as shown in FIG. 7D, not only the shape of the person's hand H but also all the shapes such as the torso and shoulders of the person H are binarized images Mi. Will be included. In this case, it is difficult to extract the shape of the contour Eg of the right hand as compared with the case of FIG. For example, in FIG. 7D, the boundary portion between the hand and the torso portion is the same white pixel information. Therefore, the hand cannot be properly extracted unless the contour is extracted more accurately.

このように、2値化閾値Dshが固定値の場合、動きの抽出対象となる物体が前後方向に動くと、適正に物体の形状、および動きを検出できない惧れがある。   Thus, when the binarization threshold value Dsh is a fixed value, there is a possibility that the shape and movement of the object cannot be detected properly if the object to be extracted is moved in the front-rear direction.

そこで、本実施の形態では、検出対象物体が前後に移動しても、適正に物体の形状、動きを検出できるように、物体の前後方向の距離の変化に応じて、適宜、2値化閾値Dshを設定する。また、物体の形状が認識できなくなった場合、2値化閾値Dshの適正な値を探索し、2値化閾値Dshを適正な値に設定する。   Therefore, in the present embodiment, the binarization threshold is appropriately set according to the change in the distance in the front-rear direction of the object so that the shape and movement of the object can be properly detected even if the detection target object moves back and forth. Set Dsh. If the shape of the object cannot be recognized, an appropriate value of the binarization threshold Dsh is searched and the binarization threshold Dsh is set to an appropriate value.

図8、図9は、2値化閾値Dshを変化させつつ、物体検出を行う処理を示すフローチャートである。図8、図9は、情報処理装置3のCPU31の物体検出部31aの機能によって行われる。   8 and 9 are flowcharts showing processing for detecting an object while changing the binarization threshold Dsh. 8 and 9 are performed by the function of the object detection unit 31 a of the CPU 31 of the information processing device 3.

なお、図8、図9に記載の2値化閾値の探索にかかる制御処理は、請求項2、3に記載の処理の一例である。また、図9のS207にかかる処理は、請求項5に記載の処理の一例である。   In addition, the control process concerning the search of the binarization threshold value described in FIGS. 8 and 9 is an example of the process described in claims 2 and 3. Moreover, the process concerning S207 of FIG. 9 is an example of the process of Claim 5.

CPU31は、まず、距離画像のフレーム数を示す変数iに1を、物体検出動作の開始時であるかをチェックするための変数kに0をセットする(S101)。そして、CPU31は、距離画像が生成されて、形状抽出するタイミングであるか否かを判定する(S102)。形状抽出タイミングでない場合(S102:NO)、CPU31は、シャットダウンまで処理を待機する(S103:NO)。   First, the CPU 31 sets 1 to a variable i indicating the number of frames of the distance image and 0 to a variable k for checking whether the object detection operation is started (S101). Then, the CPU 31 determines whether or not it is time to generate a distance image and extract a shape (S102). When it is not the shape extraction timing (S102: NO), the CPU 31 waits for the process until the shutdown (S103: NO).

形状抽出タイミングになると(S102:YES)、CPU31は、変数kが0であるか否かを判定する(S104)。これにより、処理対象の距離画像Piが物体検出動作開始時における初回のフレームであるかが判定される。処理対象の距離画像Piが物体検出動作開始時における初回のフレームの場合(S104:YES)、CPU31は、変数kに1をセットする(S105)。その後、CPU31は、処理を図9のS201に進め、まず、適正な2値化閾値Dshを探索して、2値化閾値Dshを初期設定する。   When the shape extraction timing comes (S102: YES), the CPU 31 determines whether or not the variable k is 0 (S104). Thereby, it is determined whether or not the distance image Pi to be processed is the first frame at the start of the object detection operation. When the distance image Pi to be processed is the first frame at the start of the object detection operation (S104: YES), the CPU 31 sets 1 to the variable k (S105). After that, the CPU 31 advances the processing to S201 in FIG. 9 and first searches for an appropriate binarization threshold Dsh and initializes the binarization threshold Dsh.

2値化閾値Dshの探索時には、CPU31は、まず、2値化閾値Dshを、想定し得る最も近距離の位置に相当する初期値D0に設定する(S201)。そして、CPU31は、設定した2値化閾値Dshで距離画像Piを2値化して、2値化画像Miを生成する(S202)。これにより、初期値D0に相当する距離よりも、近距離に位置する物体のみの形状が抽出される。その後、CPU31は、2値化画像Miから、手の輪郭Egを検出し(S203)、手の輪郭Egが検出できたか否かを判定する(S204)。   When searching for the binarization threshold value Dsh, the CPU 31 first sets the binarization threshold value Dsh to an initial value D0 corresponding to the closest possible position (S201). Then, the CPU 31 binarizes the distance image Pi with the set binarization threshold Dsh to generate a binarized image Mi (S202). As a result, only the shape of the object located at a shorter distance than the distance corresponding to the initial value D0 is extracted. Thereafter, the CPU 31 detects the hand outline Eg from the binarized image Mi (S203), and determines whether the hand outline Eg has been detected (S204).

手の輪郭Egが検出できない場合(S204:NO)、CPU31は、2値化閾値Dshから所定の距離に相当するΔDを減算する(S205)。そして、CPU31は、2値化閾値Dshが所定の遠距離の位置に相当する閾値Dsmを下回っているか否かを判定する(S206)。2値化閾値Dshが閾値Dsmを下回っていない場合(S206:NO)、CPU31は、処理をS202に戻し、手の輪郭Egが検出するか(S204:YES)、あるいは、2値化閾値Dshが閾値Dsmを下回るまで(S206:YES)、2値化閾値Dshを少しずつ、遠距離の位置にずらしつつ、手の輪郭Egの抽出が繰り返される。   When the hand outline Eg cannot be detected (S204: NO), the CPU 31 subtracts ΔD corresponding to a predetermined distance from the binarization threshold Dsh (S205). Then, the CPU 31 determines whether or not the binarization threshold value Dsh is lower than a threshold value Dsm corresponding to a predetermined long distance position (S206). When the binarization threshold value Dsh is not lower than the threshold value Dsm (S206: NO), the CPU 31 returns the process to S202, whether the hand outline Eg is detected (S204: YES), or the binarization threshold value Dsh is Until the threshold value Dsm is lowered (S206: YES), the extraction of the hand outline Eg is repeated while gradually shifting the binarization threshold value Dsh to a far distance position.

図10(a)〜(d)を参照して、2値化閾値Dshの設定状況の例を説明する。   An example of the setting state of the binarization threshold value Dsh will be described with reference to FIGS.

図10(a)を参照して、たとえば、人物Hが距離Zcの位置に位置している場合、2値化閾値Dshは、まず、近距離の位置に相当する初期値D0に設定される。この場合、2値化閾値Dshよりも、前方に人物Hが位置づけられていないため、人物Hの形状を抽出することができない。したがって、この場合、図9のS204にて、NOと判定され、2値化閾値DshがΔDだけ減少される。これにより、2値化閾値Dshに相当する位置がΔDに相当する距離だけ遠方の位置にずらされる。その後、手の輪郭Egが抽出されるまで、2値化閾値Dshに相当する位置が、ΔDに相当する距離ずつ、遠方の位置に徐々にずらされる。そして、図10(b)に示すように、2値化閾値Dshが、人物Hの手Haよりも遠方の位置に相当する値となると、図9のS204にて、YESと判定される。なお、D0〜Dsmの間において、人物Hの手Haが位置づけられておらず、手の輪郭Egが抽出されない場合、図9のS206にて、YESと判定される。   Referring to FIG. 10A, for example, when the person H is located at the position of the distance Zc, the binarization threshold Dsh is first set to the initial value D0 corresponding to the position of the short distance. In this case, since the person H is not positioned ahead of the binarization threshold Dsh, the shape of the person H cannot be extracted. Therefore, in this case, NO is determined in S204 of FIG. 9, and the binarization threshold Dsh is decreased by ΔD. As a result, the position corresponding to the binarization threshold value Dsh is shifted to a distant position by a distance corresponding to ΔD. Thereafter, the position corresponding to the binarization threshold Dsh is gradually shifted to a distant position by a distance corresponding to ΔD until the hand outline Eg is extracted. Then, as shown in FIG. 10B, when the binarization threshold value Dsh becomes a value corresponding to a position far from the hand Ha of the person H, YES is determined in S204 of FIG. If the hand Ha of the person H is not positioned between D0 and Dsm and the hand outline Eg is not extracted, YES is determined in S206 of FIG.

図9に戻り、S206においてYESと判定すると、CPU31は、所定の距離の範囲内において、検出対象物体の形状が検出できなかったとして、処理を図8のS101に戻す。S204においてYESと判定すると、CPU31は、所定の距離の範囲内において、検出対象物体の形状が検出できたとして、2値化閾値Dshから所定の距離に相当するΔDoを減算する(S207)。これにより、2値化閾値Dshは、図10(c)に示すように、人物HのHaを検出した位置よりも、やや遠距離の位置に相当する値に設定される。こうして、2値化閾値Dshは、人物Hの手Haが検出された位置に相当する値よりもやや遠距離の位置に相当する値に設定されるため、人物Hの手Haが遠方(Z軸正方向)に動いても、手Haの距離が、すぐに2値化閾値Dshを超えることはなく、適正に手Haの動きを検出することができる。   Returning to FIG. 9, if YES is determined in S <b> 206, the CPU 31 returns the process to S <b> 101 in FIG. 8, assuming that the shape of the detection target object cannot be detected within a predetermined distance. If YES is determined in S204, the CPU 31 subtracts ΔDo corresponding to the predetermined distance from the binarization threshold Dsh, assuming that the shape of the detection target object can be detected within the predetermined distance (S207). Thereby, the binarization threshold value Dsh is set to a value corresponding to a position a little farther than the position where Ha of the person H is detected, as shown in FIG. Thus, the binarization threshold value Dsh is set to a value corresponding to a position slightly further away than the value corresponding to the position where the hand Ha of the person H is detected. Even if it moves in the positive direction), the distance of the hand Ha does not immediately exceed the binarization threshold value Dsh, and the movement of the hand Ha can be detected appropriately.

このようにして、1フレーム目の2値化閾値Dshの適正な位置に相当する値が探索されて、2値化閾値Dshが設定される。1フレーム目の2値化閾値Dshが設定されると、CPU31は、図8のS106に処理を進める。   In this way, a value corresponding to an appropriate position of the binarization threshold value Dsh of the first frame is searched, and the binarization threshold value Dsh is set. When the binarization threshold Dsh for the first frame is set, the CPU 31 advances the processing to S106 in FIG.

CPU31は、距離画像Piを、上述のようにして設定した2値化閾値Dshで2値化して、2値化画像Miを生成し(S106)、2値化画像Miから手の輪郭Egを検出する(S107)。そして、CPU31は、手の輪郭Egを検出できたか否かを判定する(S108)。手の輪郭Egを検出できなかった場合(S108:NO)、CPU31は、再度、図9のS201〜S207の処理を実行し、適正な2値化閾値Dshを探索する。手の輪郭Egを検出できた場合(S108:YES)、CPU31は、検出した2値化画像Miの輪郭Egから手の重心位置Giを所定の演算処理によって算出する(S109)。そして、CPU31は、距離画像Piから手の重心位置Giの3次元距離情報Ti(tx、ty、tz)を取得する(S110)。これにより、距離画像Piの取得時における、動きを検出するための手の位置が特定される。   The CPU 31 binarizes the distance image Pi with the binarization threshold Dsh set as described above to generate a binarized image Mi (S106), and detects the hand outline Eg from the binarized image Mi. (S107). Then, the CPU 31 determines whether or not the hand outline Eg has been detected (S108). When the hand outline Eg cannot be detected (S108: NO), the CPU 31 executes the processes of S201 to S207 in FIG. 9 again to search for an appropriate binarization threshold value Dsh. When the hand outline Eg can be detected (S108: YES), the CPU 31 calculates the center-of-gravity position Gi of the hand from the detected outline Eg of the binarized image Mi by a predetermined calculation process (S109). Then, the CPU 31 acquires the three-dimensional distance information Ti (tx, ty, tz) of the center of gravity Gi of the hand from the distance image Pi (S110). Thereby, the position of the hand for detecting the movement at the time of acquiring the distance image Pi is specified.

こうして、手の位置を特定すると、CPU31は、変数iが10であるか否かを判定す
る(S111)。これにより、処理対象の距離画像Piのフレームが10フレーム目であるかが判定される。処理対象の距離画像Piのフレームが10フレーム目でない場合(S111:NO)、CPU31は、変数iに1を加算し(S112)、処理をS102に戻す。これにより、次のフレームについて、動きの検出対象の手の形状検出、3次元距離情報Tiの取得が行われる。この場合、2フレーム目以降の処理であるため、S104ではNOと判定され、S106では、そのタイミングで設定されている2値化閾値Dshを用いて2値化画像Miの生成が行われる。そして、2値化画像Miから手の輪郭Egを抽出できなかった場合(S108:NO)、再度、図9の処理が実行されて、2値化閾値Dshが再設定され、S106に戻って、再設定された2値化閾値Dshに基づく処理が行われる。
Thus, when the position of the hand is specified, the CPU 31 determines whether or not the variable i is 10 (S111). Thereby, it is determined whether the frame of the distance image Pi to be processed is the 10th frame. When the frame of the distance image Pi to be processed is not the 10th frame (S111: NO), the CPU 31 adds 1 to the variable i (S112), and returns the process to S102. As a result, for the next frame, detection of the shape of the hand to be motion-detected and acquisition of the three-dimensional distance information Ti are performed. In this case, since the process is for the second and subsequent frames, NO is determined in S104, and in S106, the binarized image Mi is generated using the binarization threshold Dsh set at that timing. If the hand outline Eg cannot be extracted from the binarized image Mi (S108: NO), the process of FIG. 9 is executed again, the binarization threshold Dsh is reset, and the process returns to S106. Processing based on the reset binarization threshold value Dsh is performed.

このようにして取得された各フレームにおける手の重心位置Giの3次元距離情報Tiの変化を追従することによって、手の動きを検出することができる。   The movement of the hand can be detected by following the change in the three-dimensional distance information Ti of the center-of-gravity position Gi of the hand obtained in each frame.

そして、10フレーム目まで、物体の形状検出、3次元距離情報Tiの取得が完了すると、S111でYESと判定され、CPU31は、2値化閾値Dshを1〜10フレーム目の3次元距離情報Ti〜Ti−9のうち、直前に取得された3次元距離情報TiのZ軸の位置情報tzの距離に相当する値Daに設定する(S211)。その後、CPU31は、2値化閾値Dshから所定の距離に相当するΔDoを減算する(S212)。そして、CPU31は、変数iに1をセットし(S213)、処理をS102に戻して、再度10フレーム分の物体検出の処理を実行する。これにより、図10(d)に示すように、人物Hの手Haの位置がΔhだけ変動していたとしても、それに追従して、2値化閾値Dshが直前に取得されたZ軸の距離に相当するDaに設定されるため、人物Hの手Haの位置が変動したとしても、2値化閾値Dshが人物Haの前方の位置に相当する値にならず、物体の形状の検出が失敗しにくくなる。また、上記のS207と同様、2値化閾値Dshが、人物Hの手Haが検出された位置に相当する値よりもやや遠距離の位置に相当する値に設定されるため、人物Hの手Haが遠方(Z軸正方向)に動いても、手Haの距離が、すぐに2値化閾値Dshを超えることはなく、さらに、良好に手Haの動きを追従して検出することができる。   When the object shape detection and the acquisition of the three-dimensional distance information Ti are completed up to the tenth frame, it is determined YES in S111, and the CPU 31 sets the binarization threshold Dsh to the three-dimensional distance information Ti of the first to tenth frames. ˜Ti-9 is set to a value Da corresponding to the distance of the Z-axis position information tz of the three-dimensional distance information Ti acquired immediately before (S211). Thereafter, the CPU 31 subtracts ΔDo corresponding to a predetermined distance from the binarization threshold Dsh (S212). Then, the CPU 31 sets 1 to the variable i (S213), returns the process to S102, and executes the object detection process for 10 frames again. As a result, as shown in FIG. 10D, even if the position of the hand Ha of the person H varies by Δh, the binarization threshold value Dsh is obtained immediately before the binarization threshold Dsh distance. Therefore, even if the position of the hand Ha of the person H fluctuates, the binarization threshold Dsh does not become a value corresponding to the position in front of the person Ha, and the detection of the shape of the object has failed. It becomes difficult to do. Similarly to S207 described above, the binarization threshold value Dsh is set to a value that corresponds to a position that is slightly further away than the value that corresponds to the position where the hand Ha of the person H is detected. Even if Ha moves far away (Z-axis positive direction), the distance of the hand Ha does not immediately exceed the binarization threshold value Dsh, and the movement of the hand Ha can be well tracked and detected. .

以上、本実施の形態によれば、検出対象物体の位置に応じて、2値化閾値Dshが設定されるため、物体の距離が変動しても、適正に物体の形状、動きを検出することができる。   As described above, according to the present embodiment, since the binarization threshold value Dsh is set according to the position of the detection target object, it is possible to properly detect the shape and movement of the object even if the distance of the object fluctuates. Can do.

また、本実施の形態によれば、物体の形状が認識できなくなった場合、2値化閾値Dshの適正な値が再度の探索により再設定されるため、物体の位置が大きく変動したとしても、適正に物体の形状、動きを検出することができる。   Further, according to the present embodiment, when the shape of the object can no longer be recognized, an appropriate value of the binarization threshold Dsh is reset by the search again, so that even if the position of the object fluctuates greatly, The shape and movement of the object can be detected properly.

また、本実施の形態によれば、2値化閾値Dshが10フレームごとに、直前に検出された物体のZ軸方向の距離に相当する値に設定されるため、物体の形状の検出が失敗しにくくなる。   Further, according to the present embodiment, since the binarization threshold Dsh is set to a value corresponding to the distance in the Z-axis direction of the object detected immediately before every 10 frames, detection of the shape of the object has failed. It becomes difficult to do.

さらに、本実施の形態によれば、2値化閾値Dshが、物体の形状が検出された位置に相当する値よりもやや遠距離の位置に相当する値に設定されるため、物体までの距離が、物体が遠方(Z軸正方向)に動いてもすぐに2値化閾値Dshを超えず、良好に物体の動きを検出することができる。   Furthermore, according to the present embodiment, the binarization threshold value Dsh is set to a value that corresponds to a position that is a little farther than the value that corresponds to the position where the shape of the object is detected. However, even if the object moves far away (Z-axis positive direction), the binarization threshold Dsh is not exceeded immediately, and the movement of the object can be detected well.

以上、本発明の実施の形態について説明したが、本発明は、上記実施の形態に何ら制限されるものではなく、また、本発明の実施の形態も上記の他に種々の変更が可能である。   Although the embodiment of the present invention has been described above, the present invention is not limited to the above embodiment, and various modifications can be made to the embodiment of the present invention in addition to the above. .

たとえば、上記実施の形態では、物体検出部31aの機能は、情報処理装置3のCPU31に組み込まれたが、図11に示すように、情報取得装置2のCPU21に物体検出部21cとして、組み込まれても良い。この場合、物体検出部21cは、情報取得部によって取得された距離画像から、物体の形状、動きの検出を行い、物体の動きに応じた信号を情報処理装置3に出力する。情報処理装置3は、物体検出部21cにより出力された物体の動きに応じた信号に基づいて、テレビ、パーソナルコンピュータ等の各種機能を制御する。さらに、情報取得装置2と情報処理装置3が統合されても良い。   For example, in the above embodiment, the function of the object detection unit 31a is incorporated in the CPU 31 of the information processing device 3, but as shown in FIG. 11, it is incorporated in the CPU 21 of the information acquisition device 2 as the object detection unit 21c. May be. In this case, the object detection unit 21c detects the shape and movement of the object from the distance image acquired by the information acquisition unit, and outputs a signal corresponding to the movement of the object to the information processing device 3. The information processing device 3 controls various functions such as a television and a personal computer based on a signal corresponding to the movement of the object output from the object detection unit 21c. Furthermore, the information acquisition device 2 and the information processing device 3 may be integrated.

また、上記実施の形態では、ドットパターンを照射して、3次元距離情報を取得するアクティブステレオ型の情報取得装置2が示されたが、これに限られるものではない。たとえば、二つのカメラの視差から3次元距離情報を取得するパッシブステレオ型の情報取得装置に本発明が適用されても良い。この他、上記実施の形態に示した物体の形状、動きを検出する手法を用いることが可能な3次元距離情報を取得する情報取得装置であれば、どのような装置であっても良い。   In the above embodiment, the active stereo type information acquisition apparatus 2 that acquires the three-dimensional distance information by irradiating the dot pattern is shown, but the present invention is not limited to this. For example, the present invention may be applied to a passive stereo type information acquisition apparatus that acquires three-dimensional distance information from the parallax of two cameras. In addition, any apparatus may be used as long as it is an information acquisition apparatus that acquires three-dimensional distance information that can use the method for detecting the shape and motion of the object described in the above embodiment.

また、上記実施の形態では、人物の手の輪郭Egを検出するための2値化閾値Dshの適正な値を探索するために、2値化閾値Dshを徐々に遠距離に相当する値にずらしつつ、手の輪郭Egが検出できるかを判定したが、まず、比較的検出し易い人物の全体像の輪郭Eg2を検出した後に、人物の肩の輪郭Eg3を検出し、その後、人物の手の輪郭Egを検出することによって、2値化閾値Dshを探索しても良い。   In the above embodiment, in order to search for an appropriate value of the binarization threshold Dsh for detecting the contour Eg of a person's hand, the binarization threshold Dsh is gradually shifted to a value corresponding to a long distance. However, it is determined whether the hand outline Eg can be detected. First, after detecting the outline Eg2 of the whole image of the person that is relatively easy to detect, the person's shoulder outline Eg3 is detected, and then the person's hand is detected. The binarization threshold value Dsh may be searched for by detecting the contour Eg.

図12は、この場合の2値化閾値Dshを探索する処理を示すフローチャートである。図12は、情報処理装置3のCPU31の物体検出部31aの機能によって行われる。図12の処理は、図9の処理の代わりに実行される。なお、2値化閾値Dshの探索にかかる処理は、図9の処理と略同様であり、変更点のみを詳細に説明する。   FIG. 12 is a flowchart showing processing for searching for the binarization threshold value Dsh in this case. FIG. 12 is performed by the function of the object detection unit 31 a of the CPU 31 of the information processing device 3. The process of FIG. 12 is executed instead of the process of FIG. The process related to the search for the binarization threshold value Dsh is substantially the same as the process of FIG. 9, and only the changes will be described in detail.

なお、図12に記載の2値化閾値の探索にかかる制御処理は、請求項4に記載の処理の一例である。また、図12のS315にかかる処理は、請求項5に記載の処理の一例である。   Note that the control processing related to the binarization threshold value search illustrated in FIG. 12 is an example of the processing according to claim 4. Moreover, the process concerning S315 of FIG. 12 is an example of the process of Claim 5.

この場合、CPU31は、まず、S301〜306において、比較的、検出し易い人物全体の輪郭Eg2を検出可能な2値化閾値Dshを探索する。これにより、上記実施の形態と同様に、図13(a)に示すように、近距離から閾値Dsm2まで徐々に遠ざかるように、2値化閾値Dshが探索される。なお、このとき、人物Hは、手Haよりも大きく、輪郭抽出が容易である。したがって、この場合、2値化閾値Dshの探索は、ある程度、精度を低くしても、適正な値を検出し得る。探索の精度を低くする方法としては、たとえば、2値化画像Miと物体形状テンプレートとの画素情報の比較を数画素おきにすること等によって、行われる。これにより、2値化閾値Dshの探索にかかる演算量を低く抑えることができる。   In this case, first, in S301 to S306, the CPU 31 searches for a binarization threshold Dsh that can detect the outline Eg2 of the entire person that is relatively easy to detect. As a result, as in the above embodiment, as shown in FIG. 13A, the binarized threshold value Dsh is searched so as to gradually move away from the short distance to the threshold value Dsm2. At this time, the person H is larger than the hand Ha, and the contour extraction is easy. Therefore, in this case, the search for the binarization threshold value Dsh can detect an appropriate value even if the accuracy is lowered to some extent. As a method of reducing the search accuracy, for example, comparison of pixel information between the binarized image Mi and the object shape template is performed every several pixels. As a result, the amount of computation required for searching for the binarization threshold value Dsh can be kept low.

図12に戻り、このようにして、まず、人物の輪郭Eg2が検出できる2値化閾値Dshが探索されると(S304:YES)、CPU31は、次に、肩の輪郭Eg3を検出する(S307)。そして、CPU31は、肩の輪郭Eg3を検出できたか否かを判定する(S308)。人物の輪郭Eg2は、検出できたものの(S304:YES)、肩の輪郭Eg3が検出できなかった場合(S308:NO)、CPU31は、処理をS305に進め、2値化閾値DshからΔDを減算する(S305)。そして、CPU31は、S302〜S308において、人物の輪郭Eg2および、肩の輪郭Eg3が検出されるよう、2値化閾値Dshを調整する。すなわち、CPU31は、2値化閾値Dshで2値化画像Miを生成し(S302)、生成した2値化画像Miをもとに、人物の輪郭Eg2、および肩の輪郭Eg3を検出できるかを判定し(S304、S308)、人物の輪郭Eg2、ま
たは肩の輪郭Eg3が検出できなければ(S304:NO、またはS308:NO)、人物の輪郭Eg2、および肩の輪郭Eg3が検出されるまで(S304:YES、且つ、S308:YES)、2値化閾値DshをΔDずつ減少させる。
Returning to FIG. 12, when the binarization threshold Dsh that can detect the contour Eg2 of the person is searched in this way (S304: YES), the CPU 31 then detects the contour Eg3 of the shoulder (S307). ). Then, the CPU 31 determines whether or not the shoulder contour Eg3 has been detected (S308). When the contour Eg2 of the person can be detected (S304: YES) but the shoulder contour Eg3 cannot be detected (S308: NO), the CPU 31 advances the process to S305 and subtracts ΔD from the binarization threshold Dsh. (S305). Then, in S302 to S308, the CPU 31 adjusts the binarization threshold value Dsh so that the contour Eg2 of the person and the contour Eg3 of the shoulder are detected. That is, the CPU 31 generates a binarized image Mi with the binarization threshold Dsh (S302), and determines whether the person's contour Eg2 and shoulder contour Eg3 can be detected based on the generated binarized image Mi. If it is determined (S304, S308) and the person's outline Eg2 or shoulder outline Eg3 cannot be detected (S304: NO or S308: NO), the person's outline Eg2 and shoulder outline Eg3 are detected ( (S304: YES and S308: YES) The binarization threshold Dsh is decreased by ΔD.

こうして、人物の輪郭Eg2および肩の輪郭Eg3が検出されると(S304:YES、且つ、S308:YES)、CPU31は、2値化閾値Dshに肩の位置から想定される手の距離ΔDn(たとえば、数10cm)を加算する(S309)。そして、CPU31は、S310〜S314において、手の輪郭Egを検出できるよう、2値化閾値Dshを調整する。すなわち、CPU31は、S309で設定された2値化閾値Dshで2値化画像Miを生成し(S310)、生成した2値化画像Miをもとに手の輪郭Egが検出できるかを判定し(S311、312)、手の輪郭Egが検出できなければ、手の輪郭Egが検出されるまで(S312:YES)、2値化閾値DshをΔDずつ減少させる(S313)。こうして、手の輪郭Egが検出されると(S312:YES)、CPU31は、上記実施の形態同様、2値化閾値DshからΔDoを減算する(S315)。減算後の2値化閾値が、図8のS106における2値化処理に用いられる。   When the contour Eg2 of the person and the contour Eg3 of the shoulder are detected in this way (S304: YES and S308: YES), the CPU 31 determines the distance ΔDn of the hand assumed from the position of the shoulder to the binarization threshold Dsh (for example, , Several tens of centimeters) is added (S309). And CPU31 adjusts the binarization threshold value Dsh so that the outline Eg of a hand can be detected in S310-S314. That is, the CPU 31 generates a binarized image Mi with the binarization threshold Dsh set in S309 (S310), and determines whether the hand outline Eg can be detected based on the generated binarized image Mi. (S311, 312) If the hand outline Eg cannot be detected (S312: YES), the binarization threshold value Dsh is decreased by ΔD until the hand outline Eg is detected (S313). Thus, when the hand outline Eg is detected (S312: YES), the CPU 31 subtracts ΔDo from the binarization threshold Dsh, as in the above embodiment (S315). The binarization threshold value after the subtraction is used for the binarization process in S106 of FIG.

S309以降の処理により、図13(b)に示すように、人物Hの肩Hsから手が動く範囲だけ手前の位置から閾値Dsm3まで徐々に遠ざかるように、2値化閾値Dshが探索される。このように、ある程度の精度が必要な手の輪郭Egを抽出するための2値化閾値Dshの探索を狭い範囲に抑えることができるため、上記実施の形態に比べ、演算量を低く抑えることができる。   By the processing after S309, as shown in FIG. 13B, the binarization threshold value Dsh is searched so as to gradually move away from the position in front of the person H from the shoulder Hs to the threshold value Dsm3. As described above, since the search for the binarization threshold Dsh for extracting the hand contour Eg that requires a certain degree of accuracy can be suppressed to a narrow range, the amount of calculation can be reduced compared to the above embodiment. it can.

また、上記実施の形態では、10フレームごとに、直前に取得されたZ軸の距離に相当する位置に追従するように、2値化閾値Dshが再設定されたが、2値化閾値Dshが再設定は、毎フレームごとに行われても良いし、その他のフレーム数ごとに行われても良い。また、2値化閾値Dshは、直前に取得されたZ軸の距離に相当する値ではなく、10フレームのうち、最も遠距離の位置に相当する値に設定されても良い。こうすると、2値化閾値Dshが、直近で動いた最も遠距離よりも遠方の位置に相当する値に設定されるため、より、2値化閾値Dshが人物よりも前方の位置に相当する値になりにくくなり、適正に物体の形状を検出することができる。さらに、2値化閾値Dshは、上記の他、物体のZ軸方向の距離の平均の位置に相当する値が設定されても良い。   In the above embodiment, the binarization threshold Dsh is reset every 10 frames so as to follow the position corresponding to the Z-axis distance acquired immediately before. The resetting may be performed every frame, or may be performed every other number of frames. Also, the binarization threshold value Dsh may be set to a value corresponding to the farthest position in 10 frames instead of a value corresponding to the Z-axis distance acquired immediately before. In this way, since the binarization threshold Dsh is set to a value corresponding to a position farther than the farthest distance moved most recently, the binarization threshold Dsh is a value corresponding to a position ahead of the person. Therefore, the shape of the object can be detected properly. Furthermore, in addition to the above, the binarization threshold Dsh may be set to a value corresponding to the average position of the distance in the Z-axis direction of the object.

また、上記実施の形態では、D0〜Dsmに相当する距離において、手の輪郭Egが検出できなかった場合、処理を図8のS101に戻し、再度、同じ手の形の輪郭Egの検出が繰り返されたが、手の輪郭Egが検出できなかった場合、他方の手の形の輪郭検出が行われても良い。この場合、情報処理装置3のメモリ33に両方の手の形状の物体形状抽出テンプレートがあらかじめ用意され、随時、テンプレートを切り替えて、検出することにより、種々の手の形状変化に対応可能となる。   In the above embodiment, if the hand outline Eg cannot be detected at a distance corresponding to D0 to Dsm, the process returns to S101 in FIG. 8 and the detection of the same hand-shaped outline Eg is repeated again. However, if the hand contour Eg cannot be detected, the contour detection of the other hand shape may be performed. In this case, an object shape extraction template for both hand shapes is prepared in advance in the memory 33 of the information processing device 3, and it is possible to cope with various hand shape changes by switching between the templates and detecting them as needed.

また、上記実施の形態では、手の輪郭Egが検出できなくなった場合、常にD0〜Dsmに相当する距離の範囲内において、2値化閾値Dshの探索が行われたが、D0〜Dsmは、直前の2値化閾値Dshの値に応じて、可変にしても良い。この場合、図14(a)に示すように、S108において、手の輪郭Egが検出されなかった場合(S108;NO)、図14(b)に示す処理が実行される。   In the above embodiment, when the hand outline Eg cannot be detected, the binarization threshold value Dsh is always searched for within the distance corresponding to D0 to Dsm. You may make it variable according to the value of the immediately preceding binarization threshold value Dsh. In this case, as shown in FIG. 14A, when the hand outline Eg is not detected in S108 (S108; NO), the process shown in FIG. 14B is executed.

なお、図14(a)、(b)に記載の2値化閾値の探索にかかる制御処理は、請求項3に記載の処理の一例である。また、図14のS407にかかる処理は、請求項5に記載の処理の一例である。   In addition, the control process concerning the search of the binarization threshold value described in FIGS. 14A and 14B is an example of the process described in claim 3. Moreover, the process concerning S407 of FIG. 14 is an example of the process of Claim 5.

図14(a)は、図8に示す処理のうち、変更箇所の付近の処理のみが示されたフロー
チャートである。図14(b)は、2値化閾値Dshを、S108でNOと判定された際に用いられた2値化閾値Dsh(以下、この2値化閾値を特に「直前2値化閾値」という)に基づいて、狭い範囲で探索する場合のフローチャートである。図14(a)、(b)の処理は、図8、図9、同様に、情報処理装置3のCPU31の物体検出部31aの機能によって実行される。
FIG. 14A is a flowchart showing only the process near the changed portion in the process shown in FIG. In FIG. 14B, the binarization threshold Dsh is the binarization threshold Dsh used when it is determined NO in S108 (hereinafter, this binarization threshold is particularly referred to as “immediate binarization threshold”). 5 is a flowchart when searching in a narrow range based on the above. 14A and 14B is executed by the function of the object detection unit 31a of the CPU 31 of the information processing apparatus 3 as in FIGS.

図14(b)を参照して、手の輪郭Egが検出されなかった場合(S108:NO)、CPU31は、直前2値化閾値Dshに所定の距離に相当するΔDmを加算する(S401)。そして、CPU31は、S401で設定された2値化閾値Dshで2値化画像Miを生成し(S402)、生成した2値化画像Miをもとに手の輪郭Egが検出できるかを判定し(S403、S404)、手の輪郭Egが検出できなければ、手の輪郭Egが検出されるまで(S404:YES)、2値化閾値DshをΔDずつ減少させる(S405)。手の輪郭Egが検出されない場合(S404:NO)、CPU31は、2値化閾値Dshが閾値Dsm4を下回っているか否かを判定する(S406)。なお、閾値Dsm4は、直前2値化閾値Dshに相当する位置から所定の距離だけ遠方に相当する位置に相当する値が設定される。これにより、図14(c)に示すように、直前2値化閾値Dshから所定の距離の範囲だけ手前の位置から閾値Dsm4まで徐々に遠ざかるように、2値化閾値Dshが探索される。   Referring to FIG. 14B, when the hand outline Eg is not detected (S108: NO), the CPU 31 adds ΔDm corresponding to a predetermined distance to the immediately preceding binarization threshold Dsh (S401). Then, the CPU 31 generates a binarized image Mi using the binarization threshold Dsh set in S401 (S402), and determines whether the hand outline Eg can be detected based on the generated binarized image Mi. If the hand outline Eg cannot be detected (S403, S404), the binarization threshold Dsh is decreased by ΔD until the hand outline Eg is detected (S404: YES) (S405). When the hand outline Eg is not detected (S404: NO), the CPU 31 determines whether or not the binarization threshold Dsh is lower than the threshold Dsm4 (S406). The threshold value Dsm4 is set to a value corresponding to a position corresponding to a distance from the position corresponding to the previous binarization threshold value Dsh by a predetermined distance. Thereby, as shown in FIG. 14C, the binarization threshold value Dsh is searched so as to gradually move away from the previous position to the threshold value Dsm4 by a predetermined distance from the previous binarization threshold value Dsh.

このように、図14(b)の処理では、2値化閾値Dshの探索を狭い範囲に抑えることができるため、上記実施の形態に比べ、演算量を低く抑えることができる。   As described above, in the process of FIG. 14B, the search for the binarization threshold value Dsh can be limited to a narrow range, so that the amount of calculation can be suppressed lower than that in the above embodiment.

この探索により手の輪郭Egが検出されると(S404:YES)、CPU31は、上記実施の形態同様、そのときの2値化閾値DshからΔDoを減算して、輪郭検出に用いる2値化閾値Dshを設定する(S407)。   When the contour Eg of the hand is detected by this search (S404: YES), the CPU 31 subtracts ΔDo from the binarization threshold Dsh at that time and binarization threshold used for contour detection as in the above embodiment. Dsh is set (S407).

2値化閾値Dshが閾値Dsm4に相当する位置までに見つからない場合(S406:YES)、CPU31は、図9のS201に処理を進め、再度、D0〜Dsmに相当する広い範囲で2値化閾値Dshが探索される。したがって、2値化閾値Dshの検出精度を保つことができる。また、通常、物体の距離は、時間の経過に沿って、元の位置から徐々に離れていくように変化するため、D0〜Dsmに相当する広い範囲での探索は行われ難く、2値化閾値Dshの探索にかかる演算量を低く抑えられることが想定される。   When the binarization threshold value Dsh is not found by the position corresponding to the threshold value Dsm4 (S406: YES), the CPU 31 advances the process to S201 in FIG. 9 and again in the wide range corresponding to D0 to Dsm. Dsh is searched. Therefore, the detection accuracy of the binarization threshold value Dsh can be maintained. Also, since the distance of an object usually changes so as to gradually move away from the original position as time elapses, it is difficult to perform a search in a wide range corresponding to D0 to Dsm, and binarization is performed. It is assumed that the amount of calculation required for searching for the threshold value Dsh can be kept low.

また、上記の実施の形態、および変更例では、近距離から遠距離に相当する値にずらしつつ、2値化閾値Dshが探索されたが、遠距離から近距離に相当する値にずらしつつ、2値化閾値Dshが探索されても良い。   In the above embodiment and the modified example, the binarization threshold Dsh is searched while shifting from a short distance to a value corresponding to a long distance, but while shifting from a long distance to a value corresponding to a short distance, The binarized threshold value Dsh may be searched.

また、上記実施の形態では、隣り合うセグメント領域が互いに重なるように、セグメント領域が設定されたが、左右に隣り合うセグメント領域が、互いに重ならないように、セグメント領域が設定されても良く、また、上下に隣り合うセグメント領域が、互いに重ならないように、セグメント領域が設定されても良い。また、上下左右に隣り合うセグメント領域のずれ量は、1画素に限られるものではなく、ずれ量が他の画素数に設定されても良い。また、上記実施の形態では、セグメント領域の大きさが横15画素×縦15画素に設定されたが、検出精度に応じて、任意に設定可能である。さらに、上記実施の形態では、セグメント領域は、正方形状に設定されたが、長方形であっても良い。   In the above embodiment, the segment areas are set so that the adjacent segment areas overlap each other, but the segment areas may be set so that the segment areas adjacent to the left and right do not overlap each other. The segment areas may be set so that the segment areas adjacent in the vertical direction do not overlap each other. Further, the shift amount of the segment areas adjacent in the vertical and horizontal directions is not limited to one pixel, and the shift amount may be set to another number of pixels. Moreover, in the said embodiment, although the magnitude | size of the segment area | region was set to horizontal 15 pixels x vertical 15 pixels, it can set arbitrarily according to detection accuracy. Furthermore, in the said embodiment, although the segment area | region was set to square shape, a rectangle may be sufficient.

また、上記実施の形態では、セグメント領域と比較領域のマッチング率を算出する前に、セグメント領域と比較領域に含まれる画素の画素値を2値化したが、CMOSイメージセンサ240によって得られた画素値をそのまま用いて、マッチングしても良い。また、上記実施の形態では、CMOSイメージセンサ240によって得られた画素値をそのまま
2値化したが、画素値について、所定の画素の重みづけ処理、および背景光の除去処理、等の補正処理を行った後に、2値化、もしくは多値化しても良い。
In the above embodiment, the pixel values of the pixels included in the segment area and the comparison area are binarized before calculating the matching rate between the segment area and the comparison area. Matching may be performed using the values as they are. In the above embodiment, the pixel value obtained by the CMOS image sensor 240 is binarized as it is. However, the pixel value is subjected to correction processing such as predetermined pixel weighting processing and background light removal processing. After performing, it may be binarized or multi-valued.

また、上記実施の形態では、三角測量法を用いて距離情報が求められ、メモリ25に記憶されたが、物体の輪郭抽出を主目的とするような場合は、三角測量法を用いた距離を演算せずに、セグメント領域の変位量(画素ずれ量)が距離情報として取得されても良い。   Further, in the above embodiment, the distance information is obtained using the triangulation method and stored in the memory 25. However, when the object contour extraction is mainly intended, the distance using the triangulation method is calculated. The displacement amount (pixel displacement amount) of the segment area may be acquired as the distance information without calculating.

また、上記実施の形態では、目標領域に照射されるレーザ光の波長帯以外の波長帯の光を除去するためにフィルタ230を配したが、たとえば、目標領域に照射されるレーザ光以外の光の信号成分を、CMOSイメージセンサ240から出力される信号から除去する回路構成が配されるような場合には、フィルタ230を省略することができる。また、アパーチャ210の配置位置は、何れか2つの撮像レンズの間であっても良い。   Further, in the above embodiment, the filter 230 is disposed to remove light in a wavelength band other than the wavelength band of the laser light irradiated to the target region. For example, light other than the laser light irradiated to the target region is used. In the case where a circuit configuration for removing the signal component is removed from the signal output from the CMOS image sensor 240, the filter 230 can be omitted. Further, the arrangement position of the aperture 210 may be between any two imaging lenses.

また、上記実施の形態では、受光素子として、CMOSイメージセンサ240を用いたが、これに替えて、CCDイメージセンサを用いることもできる。さらに、投射光学系100および受光光学系200の構成も、適宜変更可能である。   In the above embodiment, the CMOS image sensor 240 is used as the light receiving element, but a CCD image sensor may be used instead. Furthermore, the configurations of the projection optical system 100 and the light receiving optical system 200 can be changed as appropriate.

本発明の実施の形態は、特許請求の範囲に示された技術的思想の範囲内において、適宜、種々の変更が可能である。   The embodiments of the present invention can be appropriately modified in various ways within the scope of the technical idea shown in the claims.

1 … 物体検出装置
2 … 情報取得装置(情報取得部)
21 … CPU(情報取得部、距離取得部)
21b … 距離取得部(情報取得部)
21c … 物体検出部
23 … 撮像信号処理回路(情報取得部、距離取得部)
25 … メモリ(情報取得部、記憶部)
3 … 情報処理装置(物体検出部)
31 … CPU(物体検出部)
31a … 物体検出部
100 … 投射光学系(情報取得部)
110 … レーザ光源(情報取得部)
200 … 受光光学系(情報取得部)
240 … CMOSイメージセンサ(情報取得部、イメージセンサ)
S1〜Sn … セグメント領域(参照領域)
Dsh … 2値化閾値(閾値)
Mi … 2値化画像(2値化情報)
1 ... Object detection device
2 ... Information acquisition device (information acquisition unit)
21 ... CPU (information acquisition unit, distance acquisition unit)
21b ... Distance acquisition unit (information acquisition unit)
21c ... Object detection unit 23 ... Imaging signal processing circuit (information acquisition unit, distance acquisition unit)
25 ... Memory (information acquisition unit, storage unit)
3 ... Information processing device (object detection unit)
31 ... CPU (object detection unit)
31a ... Object detection unit 100 ... Projection optical system (information acquisition unit)
110 ... Laser light source (information acquisition unit)
200 ... Light receiving optical system (information acquisition unit)
240 ... CMOS image sensor (information acquisition unit, image sensor)
S1 to Sn: Segment area (reference area)
Dsh: Binary threshold (threshold)
Mi ... Binary image (binarization information)

Claims (6)

目標領域から物体を検出する物体検出装置において、
目標領域内に設定された各参照位置までの距離に関する3次元距離情報を取得する情報取得部と、
前記3次元距離情報から得られる前記各参照位置までの前記距離と所定の閾値とを比較することによって、前記各参照位置における前記距離を2値化した2値化情報を生成し、前記2値化情報から物体の形状を検出する物体検出部と、を備え、
前記物体検出部は、検出対象とされる物体までの距離の変化に応じて、前記閾値を変化させる、
ことを特徴とする物体検出装置。
In an object detection device that detects an object from a target area,
An information acquisition unit for acquiring three-dimensional distance information related to the distance to each reference position set in the target area;
By comparing the distance to each reference position obtained from the three-dimensional distance information with a predetermined threshold value, binary information is generated by binarizing the distance at each reference position, and the binary An object detection unit for detecting the shape of the object from the conversion information,
The object detection unit changes the threshold according to a change in distance to an object to be detected.
An object detection apparatus characterized by that.
請求項1に記載の物体検出装置において、
前記物体検出部は、物体検出動作の開始時に、前記閾値を所定の範囲内において変化させながら、前記検出対象とされる物体を検出可能な前記閾値の探索を実行する、
ことを特徴とする物体検出装置。
The object detection apparatus according to claim 1,
The object detection unit executes the search for the threshold that can detect the object to be detected while changing the threshold within a predetermined range at the start of an object detection operation.
An object detection apparatus characterized by that.
請求項1または2に記載の物体検出装置において、
前記物体検出部は、物体検出動作時に、前記検出対象とされる物体を前記2値化情報から検出できない場合、前記閾値を所定の範囲内において変化させながら、前記物体を検出可能な前記閾値の探索を実行する、
ことを特徴とする物体検出装置。
In the object detection device according to claim 1 or 2,
When the object detection unit cannot detect the detection target object from the binarized information during the object detection operation, the object detection unit detects the object while changing the threshold value within a predetermined range. Perform a search,
An object detection apparatus characterized by that.
請求項2または3に記載の物体検出装置において、
前記物体検出部は、前記閾値の探索において、前記検出対象とされる物体に関連する物体を検出可能な第1閾値を探索した後、前記第1閾値から所定の範囲内において、前記検出対象とされる物体を検出可能な第2閾値を探索し、探索した前記第2閾値に基づいて、前記検出対象とされる物体のための前記閾値に設定する、
ことを特徴とする物体検出装置。
In the object detection device according to claim 2 or 3,
In the search for the threshold, the object detection unit searches for a first threshold that can detect an object related to the object to be detected, and then within a predetermined range from the first threshold, Searching for a second threshold capable of detecting the object to be detected, and setting the threshold for the object to be detected based on the searched second threshold;
An object detection apparatus characterized by that.
請求項2ないし4の何れか一項に記載の物体検出装置において、
前記物体検出部は、前記閾値の探索において、前記検出対象とされる物体が検出可能となったときの前記閾値に対応する位置を、所定の距離だけ前記物体検出装置から離れる方向にオフセットさせた位置に対する値を、前記物体を検出するための前記閾値に設定する、
ことを特徴とする物体検出装置。
In the object detection device according to any one of claims 2 to 4,
In the search for the threshold value, the object detection unit offsets the position corresponding to the threshold value when the object to be detected becomes detectable in a direction away from the object detection device by a predetermined distance. Setting a value for a position to the threshold for detecting the object;
An object detection apparatus characterized by that.
請求項1ないし5の何れか一項に記載の物体検出装置において、
前記情報取得部は、
レーザ光源から出射されたレーザ光を所定のドットパターンで目標領域に投射する投射光学系と、
前記投射光学系に対して所定の距離だけ横に離れて並ぶように配置され、前記目標領域をイメージセンサにより撮像する受光光学系と、
基準面に前記レーザ光を照射したときに前記受光光学系により撮像された基準ドットパターンに基づく参照情報を保持する記憶部と、
実測時に前記イメージセンサにより撮像された実測ドットパターンに基づく実測情報と前記参照情報とを参照し、所定の探索範囲において、前記基準ドットパターンに割り当てられた参照領域の、前記実測ドットパターン上における移動位置の探索を実行し、探索された前記移動位置に基づいて、当該参照領域に対する距離情報を取得する距離取得部と、を備える、
ことを特徴とする物体検出装置。
In the object detection device according to any one of claims 1 to 5,
The information acquisition unit
A projection optical system that projects laser light emitted from a laser light source onto a target area with a predetermined dot pattern;
A light receiving optical system that is arranged so as to be laterally separated by a predetermined distance with respect to the projection optical system, and that captures the target area by an image sensor;
A storage unit that holds reference information based on a reference dot pattern imaged by the light receiving optical system when the laser beam is irradiated on a reference surface;
The reference area allocated to the reference dot pattern is moved on the measured dot pattern in a predetermined search range by referring to the measured information based on the measured dot pattern imaged by the image sensor at the time of actual measurement and the reference information. A distance acquisition unit that executes a position search and acquires distance information with respect to the reference region based on the searched movement position.
An object detection apparatus characterized by that.
JP2012119050A 2012-05-24 2012-05-24 Object detection apparatus Pending JP2013246009A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2012119050A JP2013246009A (en) 2012-05-24 2012-05-24 Object detection apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2012119050A JP2013246009A (en) 2012-05-24 2012-05-24 Object detection apparatus

Publications (1)

Publication Number Publication Date
JP2013246009A true JP2013246009A (en) 2013-12-09

Family

ID=49845912

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2012119050A Pending JP2013246009A (en) 2012-05-24 2012-05-24 Object detection apparatus

Country Status (1)

Country Link
JP (1) JP2013246009A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015132504A (en) * 2014-01-10 2015-07-23 富士通セミコンダクター株式会社 Distance measurement method and distance measurement device
JP2018124281A (en) * 2017-02-01 2018-08-09 カール・ツアイス・インダストリーエレ・メステクニク・ゲーエムベーハー Method for determining exposure time of three-dimentional recording
CN112955711A (en) * 2020-02-28 2021-06-11 深圳市大疆创新科技有限公司 Position information determining method, apparatus and storage medium

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015132504A (en) * 2014-01-10 2015-07-23 富士通セミコンダクター株式会社 Distance measurement method and distance measurement device
JP2018124281A (en) * 2017-02-01 2018-08-09 カール・ツアイス・インダストリーエレ・メステクニク・ゲーエムベーハー Method for determining exposure time of three-dimentional recording
JP7077031B2 (en) 2017-02-01 2022-05-30 カール・ツアイス・インダストリーエレ・メステクニク・ゲーエムベーハー How to determine the exposure time for 3D recording
CN112955711A (en) * 2020-02-28 2021-06-11 深圳市大疆创新科技有限公司 Position information determining method, apparatus and storage medium

Similar Documents

Publication Publication Date Title
US20130050710A1 (en) Object detecting device and information acquiring device
JP5214062B1 (en) Information acquisition device and object detection device
JP2014122789A (en) Information acquisition device, projection device, and object detector
JP5138116B2 (en) Information acquisition device and object detection device
JP2014137762A (en) Object detector
WO2014108976A1 (en) Object detecting device
JP5143312B2 (en) Information acquisition device, projection device, and object detection device
JP2012237604A (en) Information acquisition apparatus, projection device and object detection device
WO2013046927A1 (en) Information acquisition device and object detector device
JP2014044113A (en) Information acquisition device and object detector
JP2013246009A (en) Object detection apparatus
WO2012144340A1 (en) Information acquisition device and object detection device
WO2013015146A1 (en) Object detection device and information acquisition device
JP2014025804A (en) Information acquisition device and object detection device
JPWO2013015145A1 (en) Information acquisition device and object detection device
JP2014085257A (en) Information acquisition device and object detection device
JP2014035294A (en) Information acquisition device and object detector
JP6412799B2 (en) Shape recognition apparatus and shape recognition method
JP2013234956A (en) Information acquisition apparatus and object detection system
JP2014021017A (en) Information acquisition device and object detection device
WO2013031447A1 (en) Object detection device and information acquisition device
JP2013246010A (en) Information acquisition device and object detection device
WO2013046928A1 (en) Information acquiring device and object detecting device
JP2013234957A (en) Information acquisition apparatus and object detection system
JP2014085282A (en) Information acquisition device and object detection device