JP2015106252A - Face direction detection device and three-dimensional measurement device - Google Patents

Face direction detection device and three-dimensional measurement device Download PDF

Info

Publication number
JP2015106252A
JP2015106252A JP2013247492A JP2013247492A JP2015106252A JP 2015106252 A JP2015106252 A JP 2015106252A JP 2013247492 A JP2013247492 A JP 2013247492A JP 2013247492 A JP2013247492 A JP 2013247492A JP 2015106252 A JP2015106252 A JP 2015106252A
Authority
JP
Japan
Prior art keywords
face
area
nose
distance
comparison
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
JP2013247492A
Other languages
Japanese (ja)
Inventor
透 花岡
Toru Hanaoka
透 花岡
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.)
Sharp Corp
Original Assignee
Sharp Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Sharp Corp filed Critical Sharp Corp
Priority to JP2013247492A priority Critical patent/JP2015106252A/en
Publication of JP2015106252A publication Critical patent/JP2015106252A/en
Pending legal-status Critical Current

Links

Landscapes

  • Image Processing (AREA)
  • Image Analysis (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide a face direction detection device that enables a direction of a face to be discriminated in high speed and with high accuracy without use of a cumbersome method such as an amount-of-characteristic extraction upon discriminating a direction of a face, and to provide a three-dimensional measurement device that efficiently generates face three-dimensional data using the face direction detection device and enables utilization.SOLUTION: Provided are: a stereo camera (11) that photographs a face and acquires image data including pixel value information and distance information for each pixel; a face area discrimination unit (22a) that uses the pixel value information to discriminate a face area; a nose location detection unit (22b) that uses the distance information to detect a nose location existing in the face area; a comparison area setting unit (22d) that sets a plurality of comparison areas with respect to the nose location in the face area; and an angle calculation unit (22e) that calculates an angle of the face direction with respect to a photograph direction on the basis of each difference information indicating a difference between a plurality of distance information items on the comparison areas with respect to the distance information on the nose location.

Description

本発明は、人等の顔を撮影し、その向きを検出するための顔向き検出装置、及びそれを用いて顔の向きを補正した3次元データを保存し、活用することが可能な3次元計測装置に関するものである。   The present invention captures a face of a person or the like and detects the orientation of the face, and a three-dimensional that can store and utilize three-dimensional data in which the orientation of the face is corrected using the device. The present invention relates to a measuring device.

従来の通常のカメラでは、画素毎の輝度情報及び色情報を2次元画像データ形式で保存できるだけであった。しかし、近年、ステレオカメラ又は3Dセンサ等を搭載して、対象物の3次元データを容易に取得可能な3次元計測装置が開発され、広く普及しつつある。   A conventional ordinary camera can only store luminance information and color information for each pixel in a two-dimensional image data format. However, in recent years, a three-dimensional measuring apparatus equipped with a stereo camera or a 3D sensor and capable of easily acquiring three-dimensional data of an object has been developed and is becoming widespread.

この3次元計測装置では、人又は物等の撮影対象における画素毎の距離データを取得し、これを距離画像データ又は点群データ等の形式で保存することができる。したがって、近年では、3次元計測装置にて取得した3次元データと従来の2次元画像データとを併用することによって、2次元画像だけでは不可能であった様々なアプリケーションを実現することが可能となっている。   In this three-dimensional measurement apparatus, distance data for each pixel in a subject such as a person or an object can be acquired and stored in the form of distance image data or point cloud data. Therefore, in recent years, it is possible to realize various applications that were impossible with only two-dimensional images by using together three-dimensional data acquired by a three-dimensional measuring apparatus and conventional two-dimensional image data. It has become.

例えば、顔の2次元画像と3次元画像とを取得して、人物の認識を行うことができる認識装置が特許文献1に開示されている。   For example, Patent Document 1 discloses a recognition apparatus that can acquire a two-dimensional image and a three-dimensional image of a face and recognize a person.

このように、人の顔の3次元データを活用することにより、2次元画像データからだけでは不可能な高度な処理を行うことが期待されている。   As described above, it is expected that advanced processing that is impossible only from two-dimensional image data is performed by utilizing the three-dimensional data of a human face.

ところで、ステレオカメラ又は3Dセンサを用いて人の顔をカメラで撮影する場合には、撮影位置のずれ又は被撮影者の首振り等の影響により、顔の向きが正面からずれた向きで撮影されることが頻繁に発生する。このため、不特定多数の人の顔の3次元データを収集して活用する場合に、各々の顔の向きがバラバラであれば、データを統一的に扱うことが難しくなる虞がある。   By the way, when a human face is photographed with a camera using a stereo camera or a 3D sensor, the face is deviated from the front due to the influence of the deviation of the photographing position or the swing of the subject. Occur frequently. For this reason, when collecting and utilizing three-dimensional data of an unspecified number of people's faces, if the orientations of the faces are different, it may be difficult to handle the data uniformly.

そこで、従来、撮影した顔の向きを補正する処理がいくつか提案されている。   Therefore, several processes for correcting the orientation of the photographed face have been proposed.

例えば、先に述べた特許文献1の認識装置では、顔の内部の特定部位の特徴量を抽出し、その3次元的な位置の標準的なモデルにおける位置との差異から顔の向きを割り出し、顔の認証時の補正に利用している。   For example, in the recognition apparatus described in Patent Document 1 described above, the feature amount of a specific part inside the face is extracted, and the orientation of the face is determined from the difference from the position in the standard model of the three-dimensional position, It is used for correction during face authentication.

また、例えば特許文献2の顔姿勢検出システムでは、ステレオカメラにて取得したステレオ画像から瞳孔と鼻孔とを検出し、その3次元的な位置関係から顔の向きを検出する処理が開示されている。   Further, for example, in the face posture detection system of Patent Document 2, a process of detecting a pupil and a nostril from a stereo image acquired by a stereo camera and detecting a face direction from the three-dimensional positional relationship is disclosed. .

特開2008−123216号公報(2008年5月29日公開)JP 2008-123216 A (published May 29, 2008) 特開2007−26073号公報(2007年2月1日公開)JP 2007-26073 A (published on February 1, 2007)

しかしながら、上記従来の特許文献1の認識装置では、顔の向きを判別するに際して、顔の特定部位の特徴量を抽出し、それを標準的なモデルと比較する必要がある。このため、予め顔の特徴的な部位に関する情報をプログラムに登録したり学習させたりする必要があり、手間がかかるという問題点を有している。   However, in the conventional recognition apparatus disclosed in Patent Document 1, it is necessary to extract the feature amount of a specific part of the face and compare it with a standard model when determining the face orientation. For this reason, it is necessary to register or learn information related to the characteristic part of the face in advance in the program, which is troublesome.

また、特許文献2の顔姿勢検出システムの処理では、瞳孔又は鼻孔のような特徴量を抽出するために複雑な画像処理を行わなければならず、高速に精度良く検出するのが困難であるという問題がある。   Further, in the processing of the face posture detection system of Patent Document 2, complex image processing must be performed in order to extract a feature amount such as a pupil or nostril, and it is difficult to detect at high speed with high accuracy. There's a problem.

本発明は、上記従来の問題点に鑑みなされたものであって、その目的は、顔の向きを判別するに際して、特徴量抽出等の煩雑な手法を用いずに顔の向きを高速に精度よく判別し得る顔向き検出装置、及びそれを用いて顔の3次元データを効率よく生成し、活用することができる3次元計測装置を提供することにある。   The present invention has been made in view of the above-mentioned conventional problems, and its purpose is to determine the face orientation at high speed and accurately without using a complicated method such as feature extraction. It is an object of the present invention to provide a face orientation detection device that can be discriminated, and a 3D measurement device that can efficiently generate and utilize 3D face data using the face orientation detection device.

本発明の一態様における顔向き検出装置は、上記の課題を解決するために、顔を撮影して、画素毎に画素値情報と距離情報とを含む画像データを取得する画像データ取得手段と、上記画素値情報を用いて顔領域を判別する顔領域判別手段と、上記距離情報を用いて上記顔領域に存在する鼻位置を検出する鼻位置検出手段と、上記顔領域内に上記鼻位置に対する複数の比較領域を設定する比較領域設定手段と、上記鼻位置の距離情報に対する上記複数の各比較領域の距離情報の差分である各差分情報に基づいて撮像方向に対する顔向きの角度を算出する角度算出手段とを備えていることを特徴としている。   In order to solve the above-described problem, the face orientation detection apparatus according to an aspect of the present invention captures a face and acquires image data including pixel value information and distance information for each pixel, Face area discrimination means for discriminating a face area using the pixel value information; nose position detection means for detecting a nose position existing in the face area using the distance information; and for the nose position in the face area. An angle for calculating a face orientation angle with respect to the imaging direction based on comparison area setting means for setting a plurality of comparison areas and each difference information that is a difference between distance information of each of the plurality of comparison areas with respect to the distance information of the nose position And a calculating means.

本発明の一態様における3次元計測装置は、上記の課題を解決するために、上記記載の顔向き検出装置と、上記顔向き検出装置の角度算出手段にて求めた前記顔向きの角度に基づいて、顔の向きを補正した3次元計測データを生成する3次元データ処理装置とを備えていることを特徴としている。   In order to solve the above problems, a three-dimensional measurement apparatus according to one aspect of the present invention is based on the face orientation angle obtained by the face orientation detection device described above and the angle calculation means of the face orientation detection device. And a three-dimensional data processing device for generating three-dimensional measurement data with the face orientation corrected.

本発明の一態様によれば、顔の向きを判別するに際して、特徴量抽出等の煩雑な手法を用いずに顔の向きを高速に精度よく判別し得る顔向き検出装置、及びそれを用いて顔の3次元データを効率よく生成し、活用することができる3次元計測装置を提供するという効果を奏する。   According to one aspect of the present invention, when determining the face direction, a face direction detection device capable of accurately determining the face direction at high speed without using a complicated method such as feature amount extraction, and the like are used. There is an effect of providing a three-dimensional measuring apparatus that can efficiently generate and utilize three-dimensional face data.

本発明の実施形態1における顔向き検出装置及び3次元計測装置の構成を示すブロック図である。It is a block diagram which shows the structure of the face direction detection apparatus and three-dimensional measurement apparatus in Embodiment 1 of this invention. 上記3次元計測装置の動作を示すフローチャートである。It is a flowchart which shows operation | movement of the said three-dimensional measuring apparatus. (a)上記顔向き検出装置におけるステレオカメラの左カメラにて撮影した画像を示す正面図であり、(b)は上記ステレオカメラの右カメラにて撮影した画像を示す正面図であり、(c)は生成された距離画像を示す正面図であり、(d)はプロジェクタにて照射したときのステレオカメラの左カメラにて撮影した画像を示す正面図であり、(e)はプロジェクタにて照射したときのステレオカメラの右カメラにて撮影した画像を示す正面図である。(A) It is a front view which shows the image image | photographed with the left camera of the stereo camera in the said face direction detection apparatus, (b) is a front view which shows the image image | photographed with the right camera of the said stereo camera, (c ) Is a front view showing the generated distance image, (d) is a front view showing an image taken by the left camera of the stereo camera when irradiated by the projector, and (e) is irradiated by the projector. It is a front view which shows the image image | photographed with the right camera of the stereo camera when doing. (a)は顔が正面を向いている場合の顔領域と鼻領域との関係を示す図であり、(b)は顔が少し傾いている場合の顔領域と鼻領域との関係を示す図であり、(c)は顔がさらに傾いている場合の顔領域と鼻領域との関係を示す図であり、(d)は顔が傾き過ぎている場合の顔領域と鼻領域との関係を示す図である。(A) is a figure which shows the relationship between the face area | region and nose area | region in case the face is facing the front, (b) is a figure which shows the relationship between the face area | region and nose area | region in case the face inclines a little. (C) is a diagram showing the relationship between the face region and the nose region when the face is further tilted, and (d) is the relationship between the face region and the nose region when the face is too tilted. FIG. (a)は比較領域設定部にて、2次元画像上の所定距離離れた場所に複数個所の比較領域を設定した一例を示す正面図であり、(b)は比較領域設定部にて、2次元画像上の所定距離離れた場所に複数個所の比較領域を設定した他の例を示す正面図である。(A) is a front view showing an example in which a plurality of comparison regions are set at a predetermined distance away on a two-dimensional image by a comparison region setting unit; It is a front view which shows the other example which set the several comparison area | region in the place where the predetermined distance left | separated on the three-dimensional image. (a)は上記3次元計測装置の顔向き検出装置における顔向き検出プログラムの「ステップI」における画面表示の一例を示す正面図であり、(b)は上記顔向き検出プログラムの「ステップII」における画面表示の一例を示す正面図である。(A) is a front view which shows an example of the screen display in "step I" of the face direction detection program in the face direction detection apparatus of the said three-dimensional measuring apparatus, (b) is "step II" of the said face direction detection program. It is a front view which shows an example of the screen display in. 顔向き検出プログラムの「ステップII」における顔の向きの補正処理の方法を示す顔の平面図である。It is a top view of the face which shows the correction method of the face direction in "Step II" of the face direction detection program. 本発明の実施の形態2における3次元計測装置の構成を示す斜視図である。It is a perspective view which shows the structure of the three-dimensional measuring apparatus in Embodiment 2 of this invention. 本発明の実施の形態3における3次元計測装置の構成を示す斜視図である。It is a perspective view which shows the structure of the three-dimensional measuring apparatus in Embodiment 3 of this invention.

〔実施の形態1〕
本発明の一実施形態について図1〜図7に基づいて説明すれば、以下のとおりである。
[Embodiment 1]
One embodiment of the present invention is described below with reference to FIGS.

本実施の形態の顔向き検出装置、及びそれを用いた3次元計測装置の構成について、図1に基づいて説明する。図1は、顔向き検出装置、及びそれを用いた3次元計測装置の構成を示すブロック図である。   The configuration of the face orientation detection device of this embodiment and a three-dimensional measurement device using the same will be described with reference to FIG. FIG. 1 is a block diagram illustrating a configuration of a face orientation detection device and a three-dimensional measurement device using the face orientation detection device.

本実施の形態の3次元計測装置1Aは、図1に示すように、顔向き検出装置10と3次元データ処理装置30とから構成されている。これら顔向き検出装置10及び3次元データ処理装置30は互いに隣接して設置されており、両者はデータ通信用ケーブル2にて接続されている。   As shown in FIG. 1, the three-dimensional measurement apparatus 1 </ b> A according to the present embodiment includes a face orientation detection apparatus 10 and a three-dimensional data processing apparatus 30. The face orientation detection device 10 and the three-dimensional data processing device 30 are installed adjacent to each other, and both are connected by the data communication cable 2.

顔向き検出装置10は、画像データ取得手段としてのステレオカメラ11、プロジェクタ12、カメラ制御基板13及び顔向き検出用端末20から構成されている。   The face orientation detection device 10 includes a stereo camera 11, a projector 12, a camera control board 13, and a face orientation detection terminal 20 as image data acquisition means.

上記ステレオカメラ11は、顔を撮影して、画素毎に画素値情報と距離情報とを含む3次元画像データを取得する画像データ取得手段としての機能を果たすものである。画素値情報とは、具体的には、例えば輝度値又は色情報である。   The stereo camera 11 functions as an image data acquisition unit that captures a face and acquires three-dimensional image data including pixel value information and distance information for each pixel. Specifically, the pixel value information is, for example, luminance value or color information.

このステレオカメラ11は、左カメラ11L及び右カメラ11Rの2つのカメラからなっている。2つの左カメラ11L及び右カメラ11Rは、それぞれ、小型のCMOS(Complementary Metal Oxide Semiconductor:相補形金属酸化膜半導体)イメージセンサ集光用のレンズ、及び画像信号処理用のDSP(Digital Signal Processor:デジタル・シグナル・プロセッサー)が組み合わされたカメラモジュールであり、互いに所定の距離(基線長)だけ離間して固定されている。本実施の形態のステレオカメラ11では、各カメラモジュールの総画素数は例えば横2592画素×縦1944画素=約500万画素であるが、他の画素数であってもよい。また、本実施の形態のステレオカメラ11は、外部から設定を変更することによって、画素間引きや補間を行い、約500万画素よりも低い画素数で出力することも可能になっている。   The stereo camera 11 includes two cameras, a left camera 11L and a right camera 11R. The two left cameras 11L and right camera 11R are respectively a small CMOS (Complementary Metal Oxide Semiconductor) image sensor condensing lens and an image signal processing DSP (Digital Signal Processor). A camera module in which a signal processor is combined, and they are fixed apart from each other by a predetermined distance (base line length). In the stereo camera 11 of the present embodiment, the total number of pixels of each camera module is, for example, horizontal 2592 pixels × vertical 1944 pixels = about 5 million pixels, but other pixel numbers may be used. In addition, the stereo camera 11 according to the present embodiment can perform pixel thinning and interpolation by changing settings from the outside, and can output with a number of pixels lower than about 5 million pixels.

また、上記カメラモジュールには、「静止画モード」と「動画モード」との2つのモードが存在し、これら2つのモードを外部から切り替え可能となっている。「静止画モード」では、所定のタイミングで1枚だけ画像を撮影し、画像データを出力することが可能になっている。一方、「動画モード」では、所定の周期で連続的に画像を撮影して画像データを出力することが可能になっている。尚、本実施の形態のステレオカメラ11に対しては、予めキャリブレーションと呼ばれる手順により、カメラの焦点距離等のパラメータやレンズの歪みデータ等を含むキャリブレーションデータが取得されている。   Further, the camera module has two modes of “still image mode” and “moving image mode”, and these two modes can be switched from the outside. In the “still image mode”, it is possible to capture only one image at a predetermined timing and output image data. On the other hand, in the “moving image mode”, it is possible to continuously capture images at a predetermined cycle and output image data. For the stereo camera 11 of the present embodiment, calibration data including parameters such as camera focal length, lens distortion data, and the like is acquired in advance by a procedure called calibration.

プロジェクタ12は、顔部の撮影時に使用する照明装置である。また、カメラ制御基板13は、ステレオカメラ11を操作するための制御回路を有している。   The projector 12 is an illuminating device used when photographing the face. The camera control board 13 has a control circuit for operating the stereo camera 11.

上記顔向き検出用端末20には、顔向き検出プログラム21がインストールされている。そして、この顔向き検出プログラム21が実施されることにより、顔向き検出用端末20のCPU22が顔領域判別手段としての顔領域判別部22a、鼻位置検出手段としての鼻位置検出部22b、鼻位置ずれ量判定手段としての鼻位置ずれ量判定部22c、比較領域設定手段としての比較領域設定部22d、及び角度算出手段としての角度算出部22eとしての機能と発揮するようになっている。   A face orientation detection program 21 is installed in the face orientation detection terminal 20. Then, by executing this face orientation detection program 21, the CPU 22 of the face orientation detection terminal 20 has a face area discriminating section 22a as a face area discriminating means, a nose position detecting section 22b as a nose position detecting means, and a nose position. It functions as a nose position deviation amount determination unit 22c as a deviation amount determination unit, a comparison region setting unit 22d as a comparison region setting unit, and an angle calculation unit 22e as an angle calculation unit.

上記顔領域判別部22aは、上記ステレオカメラ11にて取得した3次元画像データにおける画素値情報から該3次元画像データ内の顔領域を求める。   The face area determination unit 22a obtains a face area in the 3D image data from the pixel value information in the 3D image data acquired by the stereo camera 11.

上記鼻位置検出部22bは、上記ステレオカメラ11にて取得した3次元画像データにおける距離情報を用いて、上記3次元画像データ内の顔領域に存在する鼻の位置を検出する。   The nose position detection unit 22b detects the position of the nose present in the face area in the three-dimensional image data using the distance information in the three-dimensional image data acquired by the stereo camera 11.

上記鼻位置ずれ量判定部22cは、顔領域の中央線と鼻位置の中心位置との距離が閾値以上か否かを判定する。   The nose position deviation amount determination unit 22c determines whether the distance between the center line of the face area and the center position of the nose position is equal to or greater than a threshold value.

上記比較領域設定部22dは、上記鼻の位置を基準として、上記3次元画像データ内の上記顔領域に複数の比較領域を設定する。   The comparison area setting unit 22d sets a plurality of comparison areas in the face area in the three-dimensional image data with reference to the position of the nose.

上記角度算出部22eは、上記鼻領域の距離情報と上記複数の比較領域の距離情報との関係から正面向きの顔に対する角度を算出する。   The angle calculation unit 22e calculates an angle with respect to the front face from the relationship between the distance information of the nose region and the distance information of the plurality of comparison regions.

次に、上記3次元データ処理装置30は、3次元データ処理用端末31及び記憶装置32からなり、3次元データ処理用端末31には3次元データ処理プログラム33がインストールされている。   Next, the three-dimensional data processing device 30 includes a three-dimensional data processing terminal 31 and a storage device 32, and a three-dimensional data processing program 33 is installed in the three-dimensional data processing terminal 31.

上記構成の顔向き検出装置10及び3次元データ処理装置30を備えた3次元計測装置1Aの動作について、図2に基づいて説明する。図2は、顔向き検出装置10及び3次元データ処理装置30を備えた3次元計測装置1Aの動作を示すフローチャートである。   The operation of the three-dimensional measuring apparatus 1A including the face orientation detecting apparatus 10 and the three-dimensional data processing apparatus 30 having the above-described configuration will be described with reference to FIG. FIG. 2 is a flowchart showing the operation of the three-dimensional measurement apparatus 1A including the face orientation detection apparatus 10 and the three-dimensional data processing apparatus 30.

尚、以下の説明では、ステレオカメラ11によって撮影される人物を「被撮影者M」と称し、顔向き検出用端末20を操作する人物を「操作者O1」と称し、3次元データ処理用端末31を操作する人物を「操作者O2」とそれぞれ称することとする。   In the following description, a person photographed by the stereo camera 11 is referred to as “photographed person M”, and a person who operates the face orientation detection terminal 20 is referred to as “operator O1”, which is a three-dimensional data processing terminal. The person who operates 31 is referred to as “operator O2”.

ここで、本実施の形態の3次元計測装置1Aは、不特定多数の人物の顔の3次元データを取得することを目的としている。そのため、被撮影者Mは、年齢、性別、容貌や人種等が多岐に亘っており、本実施の形態の3次元計測装置1Aについての知識を必要としない。一方、操作者O1及び操作者O2は、本実施の形態の3次元計測装置1A全体についての知識をある程度有する人物である必要がある。   Here, the three-dimensional measuring apparatus 1A according to the present embodiment is intended to acquire three-dimensional data of the faces of an unspecified number of people. Therefore, the photographed person M has various ages, sexes, appearances, races, and the like, and does not need knowledge about the three-dimensional measuring apparatus 1A of the present embodiment. On the other hand, the operator O1 and the operator O2 need to be persons who have some knowledge about the entire three-dimensional measuring apparatus 1A of the present embodiment.

図2に示すように、顔向き検出プログラム21の処理の流れは、「ステップI」と「ステップII」との2つに大きく分けられる。   As shown in FIG. 2, the flow of processing of the face direction detection program 21 is roughly divided into “step I” and “step II”.

「ステップI」では、比較的低い解像度の画像データを高フレームレートで取得し、顔向き検出の結果をリアルタイム表示することによって、顔の大まかな向きを調整する。一方、「ステップII」では、高い解像度の画像データを取得し、時間をかけて顔の向きを高精度に算出し、顔の3次元データを正確に正面向きに補正してから保存する。   In “Step I”, the rough orientation of the face is adjusted by acquiring image data with a relatively low resolution at a high frame rate and displaying the result of face orientation detection in real time. On the other hand, in “Step II”, high-resolution image data is acquired, the face direction is calculated with high accuracy over time, and the three-dimensional face data is corrected to the front direction and stored.

最初に、顔向き検出プログラム21の「ステップI」の処理フローについて説明する。   First, the processing flow of “Step I” of the face orientation detection program 21 will be described.

「ステップI」においては、まず、図1に示す操作者O1の指示により、被撮影者Mがステレオカメラ11の前方の所定位置に立ち、ステレオカメラ11の方向に顔を向ける。
この状態で、操作者O1が顔向き検出装置10の顔向き検出プログラム21を立ち上げる。顔向き検出プログラム21が起動する際に、顔向き検出プログラム21により、カメラ制御基板13から制御信号が送信され、ステレオカメラ11の初期化が行われる。このとき、ステレオカメラ11は、「動画モード」にて低解像度のカラー画像を取得するよう設定される。
In “Step I”, first, the subject M stands at a predetermined position in front of the stereo camera 11 and turns his face in the direction of the stereo camera 11 in accordance with an instruction from the operator O1 shown in FIG.
In this state, the operator O1 starts up the face orientation detection program 21 of the face orientation detection device 10. When the face orientation detection program 21 is activated, the face orientation detection program 21 transmits a control signal from the camera control board 13 to initialize the stereo camera 11. At this time, the stereo camera 11 is set to acquire a low-resolution color image in the “moving image mode”.

本実施の形態のステレオカメラ11では、低解像度画像は例えば横640画素×縦480画素のVGAサイズである。ただし、必ずしもこのVGAサイズに限定されない。   In the stereo camera 11 of the present embodiment, the low resolution image has a VGA size of, for example, horizontal 640 pixels × vertical 480 pixels. However, it is not necessarily limited to this VGA size.

上記ステレオカメラ11の左カメラ11L及び右カメラ11Rは、予め定められた設定に基づいて前方に存在する被撮影者Mの顔を連続して撮影し、撮影した画像データをカメラ制御基板13に順次送信する(S1)。本実施の形態では、撮影の更新速度は例えば10フレーム/秒である。尚、撮影時には、カメラ制御基板13から左カメラ11L及び右カメラ11Rに同期信号が送信されており、2つの左カメラ11L及び右カメラ11Rは同期信号にしたがって同一のタイミングで撮影を行う。ステレオカメラ11が撮影した画像の一例を、図3の(a)(b)に示す。図3の(a)が左カメラ11Lの画像であり、図3の(b)が右カメラ11Rの画像である。尚、図3の(a)(b)に示す画像では、被撮影者Mの顔の代わりにマネキン頭部を撮影対象とし、画像周辺の不要な領域の一部をトリミングしている。   The left camera 11 </ b> L and the right camera 11 </ b> R of the stereo camera 11 continuously photograph the face of the subject M present ahead based on a predetermined setting, and sequentially capture the captured image data on the camera control board 13. Transmit (S1). In the present embodiment, the imaging update rate is, for example, 10 frames / second. At the time of shooting, a synchronization signal is transmitted from the camera control board 13 to the left camera 11L and the right camera 11R, and the two left cameras 11L and the right camera 11R perform shooting at the same timing according to the synchronization signals. An example of an image photographed by the stereo camera 11 is shown in FIGS. 3A is an image of the left camera 11L, and FIG. 3B is an image of the right camera 11R. In the images shown in FIGS. 3A and 3B, the mannequin head is taken as a subject to be photographed instead of the face of the subject M, and a part of the unnecessary area around the image is trimmed.

ステレオカメラ11が撮影した顔のカラー画像データつまり2次元画像データは、カメラ制御基板13に送られる。カメラ制御基板13では、ステレオ対応点探索と呼ばれる手法により、左カメラ11Lの画像における画素毎に右カメラ11Rの画像における画素から対応する画素を探索する(S2)。そして、対応点同士の画素ずれ量つまり視差値を求める。この動作を左カメラ11Lの全画素について行うことにより、視差値を画素の濃淡(グレースケール)で表した視差画像が得られる。ステレオカメラ11においては、三角測量の原理により奥行き方向の距離と視差の値とは1対1に対応している。このため、基線長(左カメラ11Lと右カメラ11Rとの間の距離)や輻輳角(左カメラ11L及び右カメラ11Rの各光軸のなす角度)等のカメラパラメータが分かっていれば、視差値を距離に変換することができる。   Color image data of the face photographed by the stereo camera 11, that is, two-dimensional image data, is sent to the camera control board 13. The camera control board 13 searches for a corresponding pixel from the pixels in the image of the right camera 11R for each pixel in the image of the left camera 11L by a technique called stereo correspondence point search (S2). Then, a pixel shift amount between corresponding points, that is, a parallax value is obtained. By performing this operation for all the pixels of the left camera 11L, a parallax image in which the parallax value is expressed in shades of pixels (grayscale) is obtained. In the stereo camera 11, the distance in the depth direction and the parallax value have a one-to-one correspondence due to the principle of triangulation. Therefore, if the camera parameters such as the baseline length (distance between the left camera 11L and the right camera 11R) and the convergence angle (angle formed by the optical axes of the left camera 11L and the right camera 11R) are known, the parallax value Can be converted to distance.

このようにして、ステレオカメラ11からの奥行き方向の距離を画素の濃淡(グレースケール)で表した距離画像を得ることができる(S3)。   In this way, it is possible to obtain a distance image in which the distance in the depth direction from the stereo camera 11 is expressed by pixel shading (gray scale) (S3).

本実施の形態では、左カメラ11Lの右カメラ11Rに対する距離を求めているので、後述する図6の(a)に示すように、距離情報としての距離画像PLは左カメラ11L基準となる。   In the present embodiment, since the distance from the left camera 11L to the right camera 11R is obtained, the distance image PL as distance information is a reference for the left camera 11L as shown in FIG.

尚、本実施の形態における距離画像PLは、各画素に対し、その画素に存在する物体のステレオカメラ11から見て奥行き方向(光軸に沿って、被撮影者Mに向かう向き)の距離の値を数値として保持している。3次元再投影と呼ばれる手法により、奥行き方向の距離の値とステレオカメラ11のパラメータとが分かれば、再投影行列を計算し、奥行き方向の距離画像PLから奥行き方向以外の上下左右方向の距離の値を求めることが知られている。すなわち、距離画像PLにおける奥行き方向の距離値と3次元座標とは相互に変換可能であるので、以下では、この距離画像PLを3次元画像、つまり画像上の各点が3次元座標の情報を有している画像に相当するものとして扱う。   Note that the distance image PL in the present embodiment is the distance of each pixel in the depth direction (the direction toward the subject M along the optical axis) as viewed from the stereo camera 11 of the object existing in the pixel. The value is held as a numerical value. If the distance value in the depth direction and the parameters of the stereo camera 11 are known by a method called three-dimensional reprojection, a reprojection matrix is calculated, and the distance in the vertical and horizontal directions other than the depth direction is calculated from the distance image PL in the depth direction. It is known to determine the value. That is, since the distance value in the depth direction and the three-dimensional coordinates in the distance image PL can be converted to each other, the distance image PL will be referred to as a three-dimensional image, that is, each point on the image has three-dimensional coordinate information. Treat as an image that you have.

このような距離画像PL及び3次元画像の生成処理は、上述のように、カメラ制御基板13上のFPGA(Field-Programmable Gate Array:プログラム可能な論理回路デバイス)やASIC(Application Specific Integrated Circuit:特定用途向け集積回路)等のハードウェアで行うことができる。また、パーソナルコンピュータ(PC:Personal Computer)上の画像処理プログラムとしてソフトウェア的に行うこともできる。   As described above, the processing for generating the distance image PL and the three-dimensional image is performed by using an FPGA (Field-Programmable Gate Array) or an ASIC (Application Specific Integrated Circuit) on the camera control board 13. It can be performed by hardware such as an integrated circuit for use). Moreover, it can also carry out by software as an image processing program on a personal computer (PC: Personal Computer).

このようにして、カメラ制御基板13にて距離画像PLが生成される。実際に生成した距離画像PLを図3の(c)に示す。この距離画像PLでは、短距離である程白い画素値で表現され、距離が遠いほど黒い画素値で表現されている。また、本実施の形態では、左カメラ11Lを基準にして右カメラ11Rの画像の左カメラ11Lの画像に対する視差を求めているため、得られる距離画像PLの視野範囲は、図3の(a)に示す左カメラ11Lの2次元画像の視野範囲と同じになる。すなわち、距離画像PL内のある画素に対応する左カメラ11Lの2次元画像の画素は、画像上の同じ位置に存在する。   In this way, the distance image PL is generated by the camera control board 13. The actually generated distance image PL is shown in FIG. In the distance image PL, the shorter the distance, the white pixel value, and the farther the distance, the black pixel value. In the present embodiment, since the parallax of the image of the right camera 11R with respect to the image of the left camera 11L is obtained with reference to the left camera 11L, the visual field range of the obtained distance image PL is (a) in FIG. It becomes the same as the visual field range of the two-dimensional image of the left camera 11L shown in FIG. That is, the pixels of the two-dimensional image of the left camera 11L corresponding to a certain pixel in the distance image PL exist at the same position on the image.

一方、距離画像PLでは、視差探索範囲を制限して対応点の探索を行っているので、視差探索範囲外の領域、つまり顔よりも距離が遠い背景の部分は対応点が見出せず、計測不能画素となっている。また、視差探索範囲内においても、対応点探索に誤りが発生するためノイズとなっている画素が存在する。   On the other hand, in the distance image PL, since the corresponding point search is performed by limiting the parallax search range, the corresponding point cannot be found in the region outside the parallax search range, that is, the background part far away from the face, and measurement is impossible. It is a pixel. Even within the parallax search range, there is a pixel that is noise because an error occurs in the corresponding point search.

尚、顔の表面に濃淡の変化が乏しい場合、上記の単純な対応点探索では左カメラ11L及び右カメラ11Rの画像の対応点が十分に得られない場合がある。その場合、ステレオカメラ11の近傍に配置したプロジェクタ12から適当なテクスチャを被撮影者に向けて投射し、対応点探索の手掛かりとなる濃淡の変化を強制的に付与することができる。投射テクスチャとしてランダムな2次元ドットパターンを付与して撮影した左右画像を図3の(d)(e)に示す。尚、被写体の状況に応じて、プロジェクタ投射あり/なしを切り替えたり、プロジェクタ投射あり/なしにて撮影した画像データを併用して距離画像PLを生成したりすることもできる。また、プロジェクタ12の投射光として赤外光を使用し、可視光と赤外光との波長分離によりプロジェクタ投射あり/なしの画像を同時に取得することも可能である。   Note that, when the change in shading is scarce on the face surface, the corresponding points of the images of the left camera 11L and the right camera 11R may not be sufficiently obtained by the above simple corresponding point search. In that case, an appropriate texture can be projected from the projector 12 arranged in the vicinity of the stereo camera 11 toward the person to be photographed, and a change in shading that is a clue to the corresponding point search can be forcibly given. Left and right images taken with a random two-dimensional dot pattern applied as the projection texture are shown in FIGS. Depending on the state of the subject, it is also possible to switch with / without projector projection, or to generate a distance image PL by using together image data taken with / without projector projection. It is also possible to use infrared light as the projection light of the projector 12 and simultaneously acquire images with / without projector projection by wavelength separation between visible light and infrared light.

距離画像PLは、左カメラ11Lの2次元画像と共に顔向き検出プログラム21に送信される。顔向き検出プログラム21は、顔領域判別部22a、鼻位置検出部22b、鼻位置ずれ量判定部22c、比較領域設定部22d、及び角度算出部22eによって、この2次元画像と距離画像PLつまり3次元画像とを併用して被撮影者Mの顔の向きの検出を行う。   The distance image PL is transmitted to the face direction detection program 21 together with the two-dimensional image of the left camera 11L. The face orientation detection program 21 uses the two-dimensional image and the distance image PL, that is, the three-dimensional image, by the face region determination unit 22a, the nose position detection unit 22b, the nose position deviation determination unit 22c, the comparison region setting unit 22d, and the angle calculation unit 22e. The direction of the face of the person M to be photographed is detected together with the three-dimensional image.

最初に、顔向き検出プログラム21において顔領域判別部22aは、2次元カラー画像において肌の色を手掛かりに顔領域の検出を行う(S4)。具体的には、顔領域判別部22aは、入力された2次元画像に対し、まず画素値をRGB(Red,Green,Blue)値からHSV(Hue:色相,Saturation:彩度,Value:明度)値に変換したHSV2次元画像を生成する。このHSV2次元画像において、H(Hue)値を手がかりにして、H(Hue)値が所定の範囲に入っていれば肌色であると判断し、その画素に対する肌色ビットの値として「1:肌色である」を設定する。肌色でない場合は、対する肌色ビットを「0:肌色でない」に設定する。このようにして、2次元画像の各画素に対して肌色であるかどうかを判別し、その結果を肌色ビットとして付与することができる。これらの肌色ビットは、2次元画像と同じ画像サイズの2値マスク画像として表示することができる。   First, in the face orientation detection program 21, the face area determination unit 22a detects a face area from the skin color in the two-dimensional color image (S4). Specifically, the face area discriminating unit 22a first converts a pixel value from an RGB (Red, Green, Blue) value to HSV (Hue: Hue, Saturation: Saturation, Value: Lightness) for the input two-dimensional image. An HSV two-dimensional image converted into a value is generated. In this HSV two-dimensional image, using the H (Hue) value as a clue, if the H (Hue) value is within a predetermined range, it is determined to be a skin color, and the value of the skin color bit for the pixel is “1: skin color. Set “Yes”. If it is not the skin color, the corresponding skin color bit is set to “0: not skin color”. In this way, it is possible to determine whether each pixel of the two-dimensional image is a skin color and to give the result as a skin color bit. These skin color bits can be displayed as a binary mask image having the same image size as the two-dimensional image.

肌色抽出の閾値は、例えばHSVのH(Hue)値において0〜40までの範囲とすることができる。尚、被撮影者Mの肌の色が明るめであるか又は暗めであるかを予め設定メニューで選択できるようにしておき、それに応じて閾値を変化させることも可能である。それにより、肌色検出の閾値範囲を狭め、より肌色検出の精度を高めることができる。   The threshold value for skin color extraction can be in the range of 0 to 40 in the H (Hue) value of HSV, for example. Note that it is possible to select in advance from the setting menu whether the color of the skin of the subject M is light or dark, and the threshold value can be changed accordingly. Thereby, the threshold range of skin color detection can be narrowed, and the accuracy of skin color detection can be further increased.

実際の2次元画像においては、顔以外に肌色の部分が含まれることがあるので、顔領域の誤検出が発生する虞がある。その場合、例えば所定の大きさより小さい領域はノイズとみなして消去する、画面の中央付近から外れた位置にある領域は顔ではないとみなして除外する等の追加処理を行い、顔領域だけを抽出することもできる。   In an actual two-dimensional image, a skin color part may be included in addition to the face, so that there is a possibility that erroneous detection of the face area may occur. In such a case, for example, an area smaller than a predetermined size is regarded as noise and deleted, and an area outside the center of the screen is excluded as a face, so that only the face area is extracted. You can also

上記のように、本実施の形態の3次元計測装置1Aでは、2次元カラー画像において肌の色を手掛かりに顔領域の検出を行う。これにより、周囲の明るさ等の撮影条件によらず、対象となる顔の領域を正確に抽出することができる。   As described above, the three-dimensional measuring apparatus 1A according to the present embodiment detects a face area using a skin color as a clue in a two-dimensional color image. This makes it possible to accurately extract a target face area regardless of shooting conditions such as ambient brightness.

続いて、顔向き検出プログラム21ムにおいて鼻位置検出部22bは、顔領域を検出した2次元画像と距離画像PLとを用いて、顔領域の内部に存在する鼻の位置を検出する(S5)。   Subsequently, in the face orientation detection program 21, the nose position detection unit 22 b detects the position of the nose existing inside the face area using the two-dimensional image in which the face area is detected and the distance image PL (S 5). .

具体的には、顔領域の中で距離が最も短い画素つまりステレオカメラ11に最も近い画素を探索し、その距離を最少距離Lminとする。次に、その最少距離Lminから所定の距離範囲ΔLの範囲にある画素値を抽出する。ここで、距離範囲ΔLは人の鼻の標準的な高さに基づき決定するパラメータであり、例えば全年齢・性別・人種にわたって平均した鼻の高さの1/2の値とすることができる。   Specifically, the pixel having the shortest distance in the face area, that is, the pixel closest to the stereo camera 11 is searched, and the distance is set as the minimum distance Lmin. Next, pixel values in the range of the predetermined distance range ΔL from the minimum distance Lmin are extracted. Here, the distance range ΔL is a parameter determined based on the standard height of the person's nose, and can be, for example, a value that is 1/2 of the average height of the nose over all ages, sexes, and races. .

通常、人の顔をステレオカメラ11に正対させた場合、鼻の先端がステレオカメラ11から最も近い距離にある。したがって、最少距離Lminから最少距離Lmin+距離範囲ΔLの距離にある画素を抽出することによって、鼻領域を検出することができる。   Normally, when a person's face is directly facing the stereo camera 11, the tip of the nose is at the closest distance from the stereo camera 11. Therefore, the nose region can be detected by extracting pixels located at a distance of the minimum distance Lmin to the minimum distance Lmin + the distance range ΔL.

ただし、距離画像PLには通常ノイズ成分が含まれており、上記のように距離だけで抽出すると、鼻領域に鼻以外の部分の画素が混入することがある。その場合、例えば所定の面積以下の領域はノイズとみなして除外したり、抽出した領域の中で最も大きな面積を持つ閉領域のみを取り出したりする等の追加処理が必要になる。また、顔の向きが正面から大きく傾いている場合、左右いずれかの頬を鼻領域と誤検出することがあるので、距離の勾配に一定の制限を設け、勾配が一定以上の領域のみを鼻領域として抽出するようにしてもよい。   However, the distance image PL usually includes a noise component, and if it is extracted only by the distance as described above, pixels other than the nose may be mixed in the nose region. In that case, for example, an area having a predetermined area or less is regarded as noise and excluded, or only a closed area having the largest area is extracted from the extracted areas. Also, if the face is tilted greatly from the front, either the left or right cheek may be mistakenly detected as a nose area. You may make it extract as an area | region.

鼻位置検出部22bは、上記のようにして抽出した鼻領域が顔領域の中でどのような位置にあるかによって、顔の大まかな向きを判別する。例えば、図4の(a)に示すように、顔がステレオカメラ11に対して正面を向いている場合、鼻候補領域としての鼻領域ANは顔領域AFの左右方向の略中央に存在する。したがって、顔領域AFの中央線CFと鼻領域ANの中心とは、左右軸上で略同じ位置に存在する。ステレオカメラ11に対して左右いずれかの方に傾くと、図4の(b)(c)に示すように、鼻領域ANの位置は顔領域AFの中央線CFから左右いずれかに寄った位置に移動する。したがって、顔領域AFの中央線CFと鼻領域ANの中心とは、左右軸上でオフセットを有することになる。   The nose position detection unit 22b determines the rough direction of the face depending on the position of the nose area extracted as described above in the face area. For example, as shown in FIG. 4A, when the face is facing the front with respect to the stereo camera 11, the nose area AN as the nose candidate area exists at the approximate center in the left-right direction of the face area AF. Therefore, the center line CF of the face area AF and the center of the nose area AN exist at substantially the same position on the left-right axis. When tilted to the left or right with respect to the stereo camera 11, as shown in FIGS. 4B and 4C, the position of the nose area AN is shifted to the left or right from the center line CF of the face area AF. Move to. Therefore, the center line CF of the face area AF and the center of the nose area AN have an offset on the left-right axis.

顔の傾きがさらに大きくなると、図4の(d)に示すように、最早、鼻よりも頬の方がステレオカメラ11に対して近い距離に計測されるので、鼻領域ANが正しく計測されなくなる。そこで、本実施の形態では、鼻位置ずれ量判定部22cが、上記のオフセット量を常にモニタし、オフセット量が一定値である閾値を超えたか否かを判定している。そして、オフセット量が一定値を超えた段階で顔の傾きが大き過ぎることを示す顔向き異常信号を発生する。このオフセット量は、例えば顔領域AF及び鼻領域ANそれぞれの重心位置を計算して、その左右方向の位置の差を取ることにより計算することができる。尚、本実施の形態では、顔の傾きが大き過ぎる場合には、異常信号を発生する。しかし、必ずしもこれに限らず、他の方法で報知する機能があれば足りる。   When the inclination of the face is further increased, as shown in FIG. 4D, the cheek is measured at a distance closer to the stereo camera 11 than the nose, so that the nose area AN is not correctly measured. . Therefore, in the present embodiment, the nose position deviation amount determination unit 22c constantly monitors the offset amount and determines whether or not the offset amount has exceeded a certain threshold value. Then, when the offset amount exceeds a certain value, a face orientation abnormality signal indicating that the face inclination is too large is generated. This offset amount can be calculated, for example, by calculating the position of the center of gravity of each of the face area AF and the nose area AN and taking the difference between the left and right positions. In the present embodiment, an abnormal signal is generated when the inclination of the face is too large. However, the present invention is not necessarily limited to this, and a function for informing by another method is sufficient.

顔向き異常信号が発せられると、以降の顔向き検出処理は一時停止され、顔向き検出プログラム21にて、図6の(a)に示すように、顔向き検出用端末20の画面上に「顔の向きの傾きが大き過ぎる」旨をメッセージとして表示させる。操作者O1は、このメッセージが表示されると、被撮影者Mに対して顔の向きを正面に向けるよう指示を出す。この異常信号の送出は、顔の向きが正面向きに修正され、顔領域AFの中央線CFと鼻領域ANの中心とのオフセット量が一定値以内に入るまで継続される。   When a face orientation abnormality signal is issued, the subsequent face orientation detection process is temporarily stopped, and the face orientation detection program 21 displays “a” on the screen of the face orientation detection terminal 20 as shown in FIG. A message that “the inclination of the face is too large” is displayed. When this message is displayed, the operator O1 instructs the subject M to turn his face toward the front. The transmission of the abnormality signal is continued until the face orientation is corrected to the front direction and the offset amount between the center line CF of the face area AF and the center of the nose area AN falls within a certain value.

このように、被撮影者Mの顔の向きが正面から大きくずれている場合、鼻位置ずれ量判定部22cは、異常信号を発生してその状況を操作者O1に知らせ、以降の処理を適切に行えるようにしている。   As described above, when the orientation of the face of the subject M is greatly deviated from the front, the nose position deviation amount determination unit 22c generates an abnormal signal and notifies the operator O1 of the situation, and performs the subsequent processing appropriately. To be able to.

上述のように、本実施の形態の顔向き検出装置10は、顔の向きが大きくずれており鼻位置を見出せない場合であっても、異常信号を操作者O1に伝えることによって、正しい顔向きの計測を可能にすることができる。   As described above, the face orientation detection device 10 according to the present embodiment transmits the abnormal signal to the operator O1 even when the face orientation is greatly deviated and the nose position cannot be found. Can be measured.

続いて、鼻位置が検出された後、2次元画像及び距離画像PLは顔向き検出プログラム21において比較領域設定部22dに送られる。比較領域設定部22dは、鼻位置を基準にして、2次元画像上の所定距離離れた場所に複数個所の比較領域を設定する(S6)。   Subsequently, after the nose position is detected, the two-dimensional image and the distance image PL are sent to the comparison area setting unit 22d in the face orientation detection program 21. The comparison area setting unit 22d sets a plurality of comparison areas at a predetermined distance on the two-dimensional image with reference to the nose position (S6).

比較領域は、例えば図5の(a)に示すように、上下左右に各1か所、矩形状の比較領域AU・AD・AL・ARとして設けられる。この場合、左右の比較領域AL・ARは顔の左右頬の位置に相当するように設定され、上下の比較領域AU・ADは顔の額及び顎の位置に相当するように設定される。或いは、図5の(b)に示すように、顔の左右に各2か所の矩形状の比較領域ALU・ALD・ARU・ARDを設けることができる。この場合、左右の各2か所の比較領域ALU・ALD・ARU・ARDはそれぞれ左右頬に相当するように設定される。   For example, as shown in FIG. 5A, the comparison area is provided as a rectangular comparison area AU / AD / AL / AR at one place in each of the vertical and horizontal directions. In this case, the left and right comparison areas AL and AR are set to correspond to the positions of the left and right cheeks of the face, and the upper and lower comparison areas AU and AD are set to correspond to the positions of the forehead and chin of the face. Alternatively, as shown in FIG. 5B, two rectangular comparison areas ALU, ALD, ARU, and ARD can be provided on the left and right sides of the face. In this case, the left and right comparison areas ALU, ALD, ARU, and ARD are set to correspond to the left and right cheeks, respectively.

ここで、比較領域AU・AD・AL・ARを設定する際に用いられる鼻位置と比較領域AU・AD・AL・ARの中心との間の鼻比較領域間距離Dは、前述の顔領域AFの大きさに応じて変化させることができる。標準的な顔領域AFの左右幅を標準顔幅WAとし、標準的な鼻領域ANと比較領域AU・AD・AL・ARの中心との間の距離を標準鼻比較領域間距離DAとすると、顔領域AFの左右幅である顔幅Wに対して、鼻位置と比較領域AU・AD・AL・ARの中心との間の距離である鼻比較領域間距離Dは、
D=DA×W/WA
にて算出される。
Here, the nose comparison area distance D between the nose position used when setting the comparison areas AU, AD, AL, and AR and the center of the comparison areas AU, AD, AL, and AR is the face area AF described above. It can be changed according to the size of. If the left and right width of the standard face area AF is the standard face width WA, and the distance between the standard nose area AN and the center of the comparison area AU / AD / AL / AR is the standard nose comparison area distance DA, The distance D between the nose comparison areas, which is the distance between the nose position and the center of the comparison areas AU, AD, AL, and AR, with respect to the face width W that is the lateral width of the face area AF,
D = DA × W / WA
It is calculated by.

すなわち、顔幅Wに対する比が一定となるように、鼻比較領域間距離Dの値を調整する。上下方向についても、同様に鼻位置からの距離の調整を行う。このように、顔の大きさに応じて比較領域AU・AD・AL・AR等のパラメータを変更できるので、大人から子供まで、計測対象となる顔の大きさの変動範囲が大きい場合でも、それぞれの顔の大きさに合わせて適切に顔の向きを検出することができる。   That is, the value of the distance D between the nose comparison regions is adjusted so that the ratio to the face width W is constant. Similarly, the distance from the nose position is adjusted in the vertical direction. In this way, parameters such as comparison areas AU, AD, AL, and AR can be changed according to the size of the face, so even if the range of face size to be measured is large, from adults to children, The direction of the face can be detected appropriately according to the size of the face.

その後、顔向き検出プログラム21において角度算出部22eは、比較領域設定部22dにて設定した比較領域AU・AD・AL・ARに含まれる画素の距離情報を用いて、顔の左右方向及び上下方向の向きを算出する(S7)。   Thereafter, in the face orientation detection program 21, the angle calculation unit 22e uses the pixel distance information included in the comparison areas AU, AD, AL, and AR set by the comparison area setting unit 22d, and the left and right directions and the vertical direction of the face. Is calculated (S7).

具体的には、例えば、図5の(a)に示される矩形状の領域である4か所の比較領域AU・AD・AL・ARが設定されている場合、まず、比較領域ALと比較領域ARとに含まれる画素の距離の平均値である画素距離平均値LAL・LARをそれぞれ求める。   Specifically, for example, when four comparison areas AU, AD, AL, and AR, which are rectangular areas shown in FIG. 5A, are set, first, the comparison area AL and the comparison area Pixel distance average values LAL and LAR, which are average values of the distances of the pixels included in AR, are obtained.

そして、画素距離平均値LALと画素距離平均値LARとが等しい場合、左右の頬が略同じ距離にあることから、顔がステレオカメラ11に対して略正面を向いていることになる。一方、画素距離平均値LALと画素距離平均値LARとの画素距離平均値差ΔLRが大きい程、ステレオカメラ11に対する顔の左右方向の顔傾き角θLRが大きい状態であると考えることができる。   When the pixel distance average value LAL is equal to the pixel distance average value LAR, the left and right cheeks are at substantially the same distance, so that the face is facing substantially front to the stereo camera 11. On the other hand, it can be considered that the larger the pixel distance average value difference ΔLR between the pixel distance average value LAL and the pixel distance average value LAR, the larger the face inclination angle θLR in the horizontal direction of the face with respect to the stereo camera 11.

したがって、画素距離平均値差ΔLR=画素距離平均値LAL−画素距離平均値LAR、及び顔幅Wを用いて、顔左右傾き角θLR=atan(ΔLR/2W)として算出される。上下方向についても、矩形状の比較領域AUと矩形状の比較領域ADとに含まれる画素の画素距離平均値LAU・LADをそれぞれ求めてから、左右方向と同様の演算を行うことによって、上下方向の顔上下傾き角θUDを求めることができる。   Therefore, using the pixel distance average value difference ΔLR = pixel distance average value LAL−pixel distance average value LAR and the face width W, the face left-right inclination angle θLR = atan (ΔLR / 2W) is calculated. Also in the vertical direction, by calculating the pixel distance average values LAU and LAD of the pixels included in the rectangular comparison area AU and the rectangular comparison area AD, respectively, by performing the same calculation as in the horizontal direction, the vertical direction Can be obtained.

角度算出部22eは、以上のような手順で被撮影者Mの顔の向きを算出し、その結果を顔向き検出プログラム21の画面上に表示する(S7)。具体的には、図6の(a)に示す画面が表示される。表示は、正面を0度として、正面からの傾きを左右方向、上下方向それぞれ度単位にて数値で表示することもできるし、傾き角を分かり易く図で表すことも可能である。ここまでの処理、つまり距離画像PL生成から顔領域検出、鼻位置検出、比較領域設定を経て角度算出までの処理はフレーム毎に行われ、顔向き検出プログラム21の画面がリアルタイムで更新される。   The angle calculation unit 22e calculates the face direction of the person M to be photographed by the procedure as described above, and displays the result on the screen of the face direction detection program 21 (S7). Specifically, the screen shown in FIG. 6A is displayed. For the display, the front angle is 0 degree, and the inclination from the front direction can be displayed numerically in units of degrees in the horizontal direction and the vertical direction, and the inclination angle can be expressed in an easy-to-understand manner. Processing up to this point, that is, processing from the generation of the distance image PL to face angle detection, nose position detection, comparison area setting, and angle calculation is performed for each frame, and the screen of the face orientation detection program 21 is updated in real time.

角度算出部22eによる顔の向きの判定結果において、顔の向きが有効範囲内であるか否かを判定する(S8)。   In the determination result of the face orientation by the angle calculator 22e, it is determined whether or not the face orientation is within the effective range (S8).

顔の向きが正面から大きくずれていた場合は、角度算出部22eは顔向き異常信号を発生する。鼻位置検出部22bにおける顔向き異常信号の発生時と同様に、顔向き検出プログラム21は以降の処理を一時停止し、顔向きが正常範囲から逸脱している旨を画面上に表示する。操作者O1は、その表示を参照しながら被撮影者Mに対して顔の向きを正面向きに動かすよう指示を出す。   When the face orientation is greatly deviated from the front, the angle calculator 22e generates a face orientation abnormality signal. Similar to the occurrence of a face orientation abnormality signal in the nose position detection unit 22b, the face orientation detection program 21 pauses the subsequent processing and displays on the screen that the face orientation deviates from the normal range. The operator O1 instructs the subject M to move the face to the front while referring to the display.

顔の向きが左右及び上下とも正面に近い角度範囲に入り、安定した状態になると、顔向き検出プログラム21において「撮影」ボタンが有効になる(S9)。「撮影」ボタンが有効になる角度範囲は、後述する「ステップII」での角度補正可能量から決定することが望ましい。   When the face orientation is in an angle range close to the front both left and right and up and down and becomes stable, the “shoot” button is enabled in the face orientation detection program 21 (S9). It is desirable to determine the angle range in which the “shoot” button is valid from the amount of angle correction that can be performed in “Step II” described later.

操作者O1が「撮影」ボタンを押すと、顔向き検出プログラム21は「ステップI」から「ステップII」に移行する。   When the operator O1 presses the “shoot” button, the face orientation detection program 21 shifts from “Step I” to “Step II”.

「ステップII」に移行すると、図2に示すように、顔向き検出プログラム21はカメラ制御基板13に制御信号を送信し、ステレオカメラ11が「静止画モード」で高解像度のカラー画像を1枚撮影するようにする。本実施の形態のステレオカメラ11では、高解像度画像は横2592画素×縦1944画素である。ただし、必ずしもこのサイズに限定されない。   When the process proceeds to “Step II”, as shown in FIG. 2, the face orientation detection program 21 transmits a control signal to the camera control board 13, and the stereo camera 11 is in “still image mode” to display one high-resolution color image. Try to shoot. In the stereo camera 11 of the present embodiment, the high resolution image is 2592 pixels wide × 1944 pixels long. However, it is not necessarily limited to this size.

ステレオカメラ11の左カメラ11L及び右カメラ11Rは、予め定められた設定に基づいて前方に存在する被撮影者Mの顔を1回だけ撮影し、撮影した画像データをカメラ制御基板13に送信する(S10)。   The left camera 11 </ b> L and the right camera 11 </ b> R of the stereo camera 11 shoot the face of the person M to be photographed only once based on a predetermined setting, and transmit the captured image data to the camera control board 13. (S10).

以降の処理(ステップS11〜S16)は、先に述べた「ステップI」のステップS2〜S7と同様であり、顔領域AFの検出、鼻位置の検出、比較領域AU・AD・AL・ARの設定及び顔向き判定を行う。   The subsequent processing (steps S11 to S16) is the same as steps S2 to S7 of “step I” described above, and the detection of the face area AF, the detection of the nose position, and the comparison areas AU, AD, AL, and AR. Perform setting and face orientation determination.

「ステップII」では「ステップI」と異なり、撮影した2次元画像の解像度が高くて画素数が多いので、結果として算出される顔向きの角度の値の精度も高くなる。ただし、計算に要する時間は非常に長くなるためリアルタイム処理は不可能であり、「撮影」ボタンを押してから顔向き角度の算出が完了するまで、ハードウェアの処理性能にもよるが、通常数秒から数十秒の時間を要する。   In “Step II”, unlike “Step I”, the resolution of the photographed two-dimensional image is high and the number of pixels is large, so the accuracy of the face angle value calculated as a result is also high. However, since the time required for the calculation becomes very long, real-time processing is impossible, and it usually takes from several seconds until the calculation of the face angle is completed after pressing the `` shoot '' button, depending on the processing performance of the hardware. It takes several tens of seconds.

顔向き検出プログラム21では「ステップI」にて顔の向きの大まかな調整を行うので、「撮影」ボタンを押した時点で正面からの大きな角度ずれは解消しているが、それでも若干のずれが残っている。通常、上下左右とも概ね5度以内の角度ずれであれば目視では略正面向きであると感じられる。しかし、例えば多数の顔の3次元データを取得して顔形状の精密なデータベースを作成したり、顔の3次元データに何らかの付加的なデータ処理を加えたりする場合においては、正面からの小さな角度ずれが問題になることがある。そのため、「ステップII」では、可能な限り角度ずれを小さくしたデータを作成するため、顔の向きの補正処理を行う(S17)。   Since the face orientation detection program 21 roughly adjusts the orientation of the face in “Step I”, the large angle deviation from the front is eliminated when the “shoot” button is pressed, but there is still some deviation. Remaining. Usually, if the angle is shifted within 5 degrees in both the upper, lower, left and right directions, it can be visually observed that it is substantially in front. However, a small angle from the front, for example, when three-dimensional data of a large number of faces is acquired to create a precise database of face shapes or when some additional data processing is applied to the three-dimensional data of faces. Misalignment can be a problem. Therefore, in “Step II”, face orientation correction processing is performed in order to create data with the smallest possible angle deviation (S17).

上記「ステップII」における顔の向きの補正処理の方法について、図7に基づいて説明する。図7は、「ステップII」における顔の向きの補正処理の方法を示す顔の平面図である。   A method for correcting the face orientation in the “Step II” will be described with reference to FIG. FIG. 7 is a plan view of a face showing a method of face orientation correction processing in “Step II”.

顔の向きの補正処理は、座標変換によって行う。まず、「ステップII」での顔向き判定によって算出された顔向きの正面からの左右方向のずれ角がθであったとする。   The face orientation correction process is performed by coordinate transformation. First, it is assumed that the deviation angle in the horizontal direction from the front of the face orientation calculated by the face orientation determination in “Step II” is θ.

この場合、図7に示すように、元の座標系XYZをθだけ回転させ、さらに左方向(図7において−X方向)にΔx=L・tanθだけ平行移動させたX’Y’Z’座標系に座標変換する。この座標変換は、3次元点群データの各点を行列表示したものにθの回転行列及びΔxの並進行列を掛けることによって容易に計算することができる。このようにして得たX’Y’Z’座標系での点群データを、顔向き検出プログラム21の画面上に距離画像PLとして表示する。   In this case, as shown in FIG. 7, the original coordinate system XYZ is rotated by θ, and further translated by Δx = L · tan θ in the left direction (−X direction in FIG. 7). Convert coordinates to system. This coordinate transformation can be easily calculated by multiplying each point of the three-dimensional point group data in a matrix by the rotation matrix of θ and the parallel progression of Δx. The point group data in the X′Y′Z ′ coordinate system obtained in this way is displayed on the screen of the face orientation detection program 21 as a distance image PL.

3次元点群データを距離画像PLとして表示する場合は、見る方向を表現する投影行列を点群データに掛け合わせることによって求めることができる。投影行列は、座標空間上の視点(見る位置)と視線ベクトル(見る方向)とを指定すれば一意に算出可能である。この場合、原点O’から+Z方向を見るための投影行列を生成し、これを点群データに掛け合わせると、顔の正面から見た距離画像PLを生成することができる。   When the three-dimensional point cloud data is displayed as the distance image PL, it can be obtained by multiplying the point cloud data by a projection matrix expressing the viewing direction. The projection matrix can be uniquely calculated by designating the viewpoint (viewing position) and the line-of-sight vector (viewing direction) in the coordinate space. In this case, a distance matrix PL viewed from the front of the face can be generated by generating a projection matrix for viewing the + Z direction from the origin O 'and multiplying the projection matrix by the point cloud data.

顔向き検出は、このようにして生成した正面からの視点に変換した距離画像PLを、顔向き検出プログラム21の画面上に表示する(S18)。具体的には、図6の(b)に示す画面が表示される。本実施の形態の顔向き検出プログラム21では、マウス操作又はキーボードからの角度入力により、正面視を含む任意の角度から見た画像を算出し、画面に表示させることができる。   In the face direction detection, the distance image PL converted into the viewpoint from the front generated in this way is displayed on the screen of the face direction detection program 21 (S18). Specifically, the screen shown in FIG. 6B is displayed. In the face orientation detection program 21 of the present embodiment, an image viewed from an arbitrary angle including a front view can be calculated by a mouse operation or an angle input from a keyboard and displayed on the screen.

操作者O1は、表示された正面視の距離画像PLを確認する(S19)。また、必要に応じてマウス操作等によって任意の角度から見た画像を生成して、正面からでは分からないデータの抜けや誤りの有無を確認する等のデータの状態確認を行う。データに問題がなければ画面上の「出力」ボタンを押す。これにより、XYZ座標系での点群データが正面向きの顔の3次元データとして出力される(S20)。仮に、3次元データの一部に異常があるような場合は、保存をキャンセルして再度「ステップI」に戻ってデータ取得からやり直すことができる。   The operator O1 confirms the displayed frontal distance image PL (S19). Further, if necessary, an image viewed from an arbitrary angle is generated by operating a mouse or the like, and data status confirmation such as data missing or error confirmation that cannot be seen from the front is performed. If there is no problem with the data, press the “Output” button on the screen. Thereby, the point cloud data in the XYZ coordinate system is output as the three-dimensional data of the face facing front (S20). If there is an abnormality in part of the three-dimensional data, it is possible to cancel the storage and return to “Step I” to start over from data acquisition.

顔向き検出装置10から出力された顔の3次元データは、図1に示す3次元データ処理装置30に送られる。   The face three-dimensional data output from the face orientation detection device 10 is sent to the three-dimensional data processing device 30 shown in FIG.

3次元データ処理装置30では、受信した3次元データを記憶装置32に蓄える。顔向き検出装置10においては不特定多数の人の顔の3次元データが取得されるので、記憶装置32には多量の顔の3次元データが記憶される。記憶装置32に記憶される時点で、セキュリティ及びプライバシーを配慮して、3次元データの一部又は全部に暗号化処理を施すことができる。   In the three-dimensional data processing device 30, the received three-dimensional data is stored in the storage device 32. Since the face orientation detection device 10 acquires three-dimensional data of an unspecified number of human faces, the storage device 32 stores a large amount of three-dimensional data of faces. When stored in the storage device 32, a part or all of the three-dimensional data can be encrypted in consideration of security and privacy.

3次元データ処理装置30の操作者O2は、3次元データ処理用端末31上の3次元データ処理プログラム33を操作し、顔の3次元データに対する処理を行う。操作者O2は、記憶装置32から特定の人の顔データを指定し、3次元データ処理プログラム33上にロードする。3次元データ処理プログラム33では、ロードした顔の3次元データを、視点変換、拡大縮小又は回転等の操作を加えて任意の表示を行うことができる。   The operator O2 of the three-dimensional data processing device 30 operates the three-dimensional data processing program 33 on the three-dimensional data processing terminal 31 to perform processing on the three-dimensional data of the face. The operator O2 designates the face data of a specific person from the storage device 32 and loads it onto the three-dimensional data processing program 33. In the three-dimensional data processing program 33, the loaded three-dimensional data of the face can be arbitrarily displayed by performing operations such as viewpoint conversion, enlargement / reduction, or rotation.

操作者O2は、例えば顔のある部分から別のある部分までの距離や角度を計測したり、顔データの一部を加工して別の3次元データを生成したりすることができる。また、複数の顔の3次元データをまとめてロードし、それらの平均や標準偏差等の統計量を求めたり、顔同士の差分を求めたりすることもできる。これらの処理の結果は、スポーツ、アート、服飾、医療、介護、ゲーム、アミューズメント、広告、その他これらに限定されない様々な用途に利用することができる。   For example, the operator O2 can measure the distance and angle from one part of the face to another part, or can process another part of the face data to generate another three-dimensional data. It is also possible to load three-dimensional data of a plurality of faces at once and obtain a statistic such as an average or standard deviation thereof, or obtain a difference between faces. The results of these processes can be used for sports, art, clothing, medical care, nursing care, games, amusements, advertisements, and various other uses that are not limited to these.

このように、3次元データ処理装置30では、顔向き検出装置10にて得た顔の3次元データを様々な用途に活用することができる。   As described above, the three-dimensional data processing device 30 can use the three-dimensional data of the face obtained by the face orientation detection device 10 for various purposes.

3次元データ処理装置30において、記憶装置32に保存されている顔の向きにずれがある場合、操作者O2がその都度正しい向きに補正する必要がある。多数の顔データを扱う場合、一つ一つの顔データにその都度向き補正を施すのは手間がかかり、処理の効率を低下させる。これに対し、本実施の形態の3次元データ処理装置30では、顔向き検出装置10にて正確に正面向きに直したデータを保存するので、操作者O2側で追加の顔向き補正を行う必要がなく、効率よくデータ処理を行うことができる。   In the three-dimensional data processing device 30, when there is a deviation in the orientation of the face stored in the storage device 32, it is necessary for the operator O2 to correct it in the correct orientation each time. When dealing with a large number of face data, it is time-consuming to correct the orientation of each face data each time, which reduces the processing efficiency. On the other hand, in the three-dimensional data processing device 30 according to the present embodiment, the face orientation detection device 10 stores the data that has been accurately corrected to the front orientation. Therefore, it is necessary to perform additional face orientation correction on the operator O2 side. Data processing can be performed efficiently.

最初から「ステップII」に相当する高解像度の画像で顔向き検出及び補正を行う場合、データを取得するのに時間がかかる。その上、顔の向きが大きくずれている場合に補正ができないことがある。   When face orientation detection and correction is performed on a high-resolution image corresponding to “Step II” from the beginning, it takes time to acquire data. In addition, correction may not be possible when the face orientation is greatly deviated.

本実施の形態では、最初に「ステップI」にて低解像度でリアルタイム表示することによって顔の向きを大まかに合わせ、その後に「ステップII」にて細かい補正を行うという2段階の処理を行っている。これにより、顔の向きを効率よく補正し、正確に正面を向いた顔の3次元データを得ることができる。   In the present embodiment, first, a two-step process is performed in which the face orientation is roughly adjusted by performing real-time display at a low resolution in “Step I” and then fine correction is performed in “Step II”. Yes. As a result, the orientation of the face can be corrected efficiently, and three-dimensional data of the face facing the front can be obtained accurately.

尚、本実施の形態では、カラー画像及び距離画像PLの取得のためにステレオカメラ11を用いた。ただし、必ずしもこれに限らず、距離画像PLが取得可能なカメラとして、ToF(Time of Flight)方式や構造光(Structured Light)照射方式の3次元カメラを使用することも可能である。   In the present embodiment, the stereo camera 11 is used for acquiring the color image and the distance image PL. However, the present invention is not limited to this, and a ToF (Time of Flight) method or a structured light irradiation method three-dimensional camera may be used as a camera capable of acquiring the distance image PL.

また、本実施の形態では、カラー画像を取得し、色情報から肌色領域を抽出することによって顔領域の検出及び背景除去を行ったが、これ以外の方法で顔領域を検出しても構わない。例えば、被撮影者Mの背後に暗幕を設置することが許されるような場合は、暗幕を背景にした状態で被撮影者Mの顔を撮影し、そのようにして得た2次元画像から輝度が一定値以上の領域を抽出することにより、背景を除去して顔領域を抽出することができる。この場合、カラー画像の代わりにモノクロ画像でも顔領域抽出が可能になるので、構成を簡略化し、演算量を削減することができる。   In the present embodiment, the face area is detected and the background is removed by acquiring a color image and extracting the skin color area from the color information. However, the face area may be detected by other methods. . For example, when it is allowed to install a dark curtain behind the photographed person M, the face of the photographed person M is photographed with the dark curtain in the background, and the brightness is obtained from the two-dimensional image thus obtained. By extracting a region where is equal to or greater than a certain value, it is possible to remove the background and extract the face region. In this case, since the face area can be extracted even with a monochrome image instead of a color image, the configuration can be simplified and the amount of calculation can be reduced.

また、被撮影者Mの顔を固定する補助的な治具の使用が許されるような場合は、ステレオカメラ11から顔までの距離が所定の範囲に入るように顔を固定して撮影し、そのようにして得た距離画像PLから上記所定距離範囲に含まれる領域のみを抽出することによって顔領域を検出するという方法も考えられる。その他、顔領域の抽出方法として、これらに類する任意の手法を適用することができる。   In addition, when the use of an auxiliary jig for fixing the face of the subject M is permitted, the face is fixed so that the distance from the stereo camera 11 to the face falls within a predetermined range, and the image is taken. A method of detecting a face area by extracting only an area included in the predetermined distance range from the distance image PL thus obtained is also conceivable. In addition, any method similar to these can be applied as a method for extracting a face region.

このように、人の顔を撮影し、その3次元データを保存する場合に、顔の向きを正確に正面に合わせるのは困難である。これに対して、本実施の形態の3次元計測装置1Aでは、顔向き検出装置10によって撮影対象の例えば人の顔向きをリアルタイムで簡便に検出し、顔の向きを所望の向きに補正した3次元計測データを生成することができる。取得した顔の3次元データを正面向きのデータに直してから保存することができるため、顔データ同士の互換性を高めることができる。   Thus, when photographing a human face and storing the three-dimensional data, it is difficult to accurately align the face with the front. On the other hand, in the three-dimensional measurement apparatus 1A of the present embodiment, the face orientation detection device 10 simply detects, for example, the face orientation of a person to be imaged in real time, and corrects the face orientation to a desired orientation 3. Dimensional measurement data can be generated. Since the acquired three-dimensional data of the face can be stored after being converted to the front-facing data, the compatibility of the face data can be improved.

これにより、例えば、多数の顔のデータを平均化して年齢や性別毎の平均的な顔の形状データを求めたり、その平均的な顔データと各個人の顔データとの差分を求めたり、又は同一人物の過去の顔データと現在の顔データとを比較したりすることが容易にできるようになる。   Thereby, for example, the average face data for each age and gender is obtained by averaging a large number of face data, the difference between the average face data and the face data of each individual is obtained, or It is possible to easily compare past face data and current face data of the same person.

本実施の形態の3次元計測装置1Aで得た顔の3次元データは、セキュリティ、医療、介護、スポーツ、アート、服飾、ゲーム、アミューズメント、広告、その他これらに限定されない様々な用途に利用することができる。   The three-dimensional face data obtained by the three-dimensional measuring apparatus 1A according to the present embodiment is used for security, medical care, nursing care, sports, art, clothing, games, amusement, advertising, and various other uses not limited to these. Can do.

以上のように、本実施の形態における顔向き検出装置10は、顔を撮影して、画素毎に画素値情報と距離情報とを含む画像データを取得する画像データ取得手段としてのステレオカメラ11と、画像データの画素値情報を用いて顔領域AFを判別する顔領域判別手段としての顔領域判別部22aと、画像データの距離情報としての距離画像PLを用いて顔領域AFに存在する鼻位置としての鼻領域ANを検出する鼻位置検出手段としての鼻位置検出部22bと、顔領域AF内に、鼻領域ANに対する複数の比較領域AU・AD・AL・ARを設定する比較領域設定手段としての比較領域設定部22dと、鼻領域ANの距離情報に対する複数の各比較領域AU・AD・AL・ARの距離情報の差分である各差分情報に基づいて撮像方向に対する顔向きの角度を算出する角度算出手段としての角度算出部22eとを備えている。   As described above, the face orientation detection apparatus 10 according to the present exemplary embodiment captures a face, and the stereo camera 11 as an image data acquisition unit that acquires image data including pixel value information and distance information for each pixel; The face area discriminating unit 22a as a face area discriminating unit that discriminates the face area AF using the pixel value information of the image data, and the nose position existing in the face area AF using the distance image PL as the distance information of the image data As a nose position detecting unit 22b as a nose position detecting means for detecting the nose area AN as a comparison area setting means for setting a plurality of comparison areas AU, AD, AL, AR for the nose area AN in the face area AF The comparison area setting unit 22d, and the imaging direction based on the difference information that is the difference between the distance information of the plurality of comparison areas AU, AD, AL, and AR with respect to the distance information of the nose area AN. And a angle calculator 22e as an angle calculating means for calculating the angular orientation.

上記構成によれば、撮像方向に対する顔向きの角度を算出するために、まず、画像データ取得手段としての例えばステレオカメラ11を用いて、顔を撮影して、画素毎に画素値情報と距離情報とを含む画像データを取得する。すなわち、画像データは、ステレオカメラ11から対象物までの画素値情報と距離情報とを含んでいる。具体的には、人の顔をステレオカメラ11の向きである正面からみたXY座標平面の画素に対応するステレオカメラ11からの画素値情報と距離情報とからなるデータとなる。   According to the above configuration, in order to calculate the angle of the face direction with respect to the imaging direction, first, the face is photographed using, for example, the stereo camera 11 as the image data acquisition unit, and pixel value information and distance information are obtained for each pixel. To obtain image data. That is, the image data includes pixel value information and distance information from the stereo camera 11 to the object. More specifically, the data includes pixel value information and distance information from the stereo camera 11 corresponding to pixels on the XY coordinate plane when the human face is viewed from the front as the direction of the stereo camera 11.

ここで、画素値情報とは、例えば輝度値又は色情報を想定している。尚色情報とは、換言すると、色の三原色である赤(R)・緑(G)・青(B)毎の輝度値情報と同義であり、モノクロの輝度値とは異なる概念である。   Here, the pixel value information is assumed to be, for example, a luminance value or color information. In other words, the color information is synonymous with luminance value information for each of the three primary colors red (R), green (G), and blue (B), and is a concept different from the monochrome luminance value.

次いで、顔領域判別部22aは、2次元画像であるXY座標平面の画素値情報を用いて顔領域AFを判別する。顔領域AFとは、画像領域を背景領域と顔領域AFに区分し、画像中における顔の占める領域や顔の輪郭形状を認識するために用いる領域情報をいう。   Next, the face area determination unit 22a determines the face area AF using pixel value information on the XY coordinate plane that is a two-dimensional image. The face area AF refers to area information used for dividing an image area into a background area and a face area AF and recognizing the area occupied by the face and the contour shape of the face in the image.

顔領域AFを求めるに際して、輝度値又は色情報を基に、予め設定された範囲の領域を顔領域AFと判定する。色情報の場合、赤(R)・緑(G)・青(B)毎の輝度値から肌色領域を判定し、肌色領域を顔領域AFと判定する。   When obtaining the face area AF, an area in a preset range is determined as the face area AF based on the luminance value or the color information. In the case of color information, the skin color area is determined from the luminance values for each of red (R), green (G), and blue (B), and the skin color area is determined as the face area AF.

詳細には、画素値情報として例えば色情報を用いる場合には、顔領域AFは肌色であり、それ以外は黒色の背景領域として示される。したがって、肌色領域が顔領域AFであるとして容易に区別可能であり、顔領域AFを容易に特定することができる。尚、画素値情報として例えば輝度値情報を用いる場合においても、背景領域の輝度値は0であり、顔領域の輝度値は0よりも大きいことから容易に区別可能である。   Specifically, when color information is used as the pixel value information, for example, the face area AF is a skin color, and the others are shown as a black background area. Therefore, the skin color area can be easily distinguished as the face area AF, and the face area AF can be easily specified. For example, even when luminance value information is used as the pixel value information, the luminance value of the background area is 0 and the luminance value of the face area is larger than 0, so that it can be easily distinguished.

次いで、鼻位置検出部22bにて、画像データの距離情報を用いて顔領域AFに存在する鼻位置である鼻領域ANを検出する。具体的には、鼻は基本的には顔領域AFの中で最も高い。したがって、ステレオカメラ11との距離値が最も小さくなるため、顔領域AFの内で距離情報が最もステレオカメラ11に近い部位を鼻領域ANと判定することができる。   Next, the nose position detector 22b detects the nose area AN, which is the nose position existing in the face area AF, using the distance information of the image data. Specifically, the nose is basically the highest in the face area AF. Therefore, since the distance value with respect to the stereo camera 11 is the smallest, a part of the face area AF whose distance information is closest to the stereo camera 11 can be determined as the nose area AN.

次いで、比較領域設定部22dにて、顔領域AF内に鼻領域ANに対する複数の比較領域AU・AD・AL・ARを設定する。また、角度算出部22eは、鼻領域ANの距離情報に対する複数の各比較領域AU・AD・AL・ARの距離情報の差分である各差分情報に基づいて撮像方向に対する顔向きの角度を算出する。   Next, the comparison area setting unit 22d sets a plurality of comparison areas AU, AD, AL, and AR for the nose area AN in the face area AF. Further, the angle calculation unit 22e calculates the angle of the face direction with respect to the imaging direction based on the difference information that is the difference between the distance information of the plurality of comparison areas AU, AD, AL, and AR with respect to the distance information of the nose area AN. .

具体的には、比較領域設定部22dにて、顔領域AFに、上下左右等少なくとも2か所の比較領域AU・AD・AL・ARを設定した後、角度算出部22eにて、鼻領域ANの距離情報と複数の各比較領域AU・AD・AL・ARの距離情報との比較を行い、差分である各差分情報を求め、各差分情報同士の比較を行う。尚、各比較領域AU・AD・AL・ARの距離情報は、例えば、各比較領域AU・AD・AL・AR内に含まれる画素の平均距離を算出することによって求めることができる。   Specifically, the comparison area setting unit 22d sets at least two comparison areas AU, AD, AL, and AR such as up, down, left, and right in the face area AF, and then the angle calculation unit 22e uses the nose area AN. Is compared with the distance information of each of the plurality of comparison areas AU, AD, AL, and AR, the difference information that is a difference is obtained, and the difference information is compared with each other. The distance information of each comparison area AU / AD / AL / AR can be obtained, for example, by calculating an average distance of pixels included in each comparison area AU / AD / AL / AR.

すなわち、右の頬がステレオカメラ11の近くに存在する場合、左右の差分情報を比較すると違いが生じる。このため、左右の差分情報を互いに比較することにより顔の傾きを検出することができる。この結果、角度算出部22eは、撮像方向に対する顔向きの角度を算出することができる。   That is, when the right cheek is present near the stereo camera 11, a difference occurs when the left and right difference information is compared. For this reason, the inclination of the face can be detected by comparing the left and right difference information with each other. As a result, the angle calculation unit 22e can calculate the angle of the face direction with respect to the imaging direction.

例えば、比較領域AL・ARを鼻の左右に等距離に設定した場合、顔が真正面に向いている場合は距離の差分値は等しくなる。一方、例えば、顔がステレオカメラ11に対して左に傾いている場合は、右の頬がステレオカメラ11に近くなるため、距離の差分値を左右で比較すると差分情報に違いが生じる。このため、差分情報同士を比較することにより顔の傾きを検出することができる。この結果、角度算出部22eは、撮像方向に対する顔向きの角度つまり正面向きの顔に対する角度を算出することができる。   For example, when the comparison areas AL and AR are set equidistant to the left and right of the nose, the difference value of the distance is equal when the face is facing directly in front. On the other hand, for example, when the face is tilted to the left with respect to the stereo camera 11, the right cheek is close to the stereo camera 11. For this reason, the inclination of the face can be detected by comparing the difference information. As a result, the angle calculation unit 22e can calculate the angle of the face direction with respect to the imaging direction, that is, the angle with respect to the face facing the front.

ここで、上述した撮像方向に対する顔向きの角度の算出方法では、例えば鼻の特徴量を抽出する方法は用いていない。しかし、撮像方向に対する顔向きの角度を容易に算出することができるので、手間がかからず、高速にしかも精度よく検出することができる。   Here, the method for calculating the angle of the face direction with respect to the imaging direction described above does not use, for example, a method for extracting the feature amount of the nose. However, since the angle of the face direction with respect to the imaging direction can be easily calculated, it is not time-consuming and can be detected at high speed and with high accuracy.

したがって、顔の向きを判別するに際して、特徴量抽出等の煩雑な手法を用いずに顔の向きを高速に精度よく判別し得る顔向き検出装置10を提供することができる。   Therefore, it is possible to provide the face direction detection device 10 that can accurately determine the face direction at high speed without using a complicated method such as feature amount extraction when determining the face direction.

また、本実施の形態の顔向き検出装置10では、鼻位置検出部22bは、顔領域AF内において、ステレオカメラ11との距離値が最も小さい位置を含む領域を鼻領域ANとして検出する。   In the face direction detection device 10 of the present embodiment, the nose position detection unit 22b detects an area including the position having the smallest distance value with the stereo camera 11 as the nose area AN in the face area AF.

すなわち、鼻は基本的には顔領域AFの中で最も高い。したがって、ステレオカメラ11との距離値が最も小さくなるため、顔領域AFの内で距離情報が最もステレオカメラ11に近い部位が鼻領域ANであると容易かつ簡易に判定することができる。   That is, the nose is basically the highest in the face area AF. Therefore, since the distance value with respect to the stereo camera 11 is the smallest, it is possible to easily and easily determine that the portion of the face area AF whose distance information is closest to the stereo camera 11 is the nose area AN.

また、本実施の形態の顔向き検出装置10では、比較領域設定部22dは、設定された条件に基づいて鼻領域ANを基準とした複数の比較領域AU・AD・AL・ARのそれぞれの位置を算出して該鼻領域ANから離れた位置に該複数の比較領域AU・AD・AL・ARを設定する。   Further, in the face direction detection device 10 of the present embodiment, the comparison area setting unit 22d has the respective positions of the plurality of comparison areas AU, AD, AL, and AR based on the nose area AN based on the set conditions. And a plurality of comparison areas AU, AD, AL, and AR are set at positions away from the nose area AN.

さらに、本実施の形態の顔向き検出装置10では、比較領域設定部22dは、鼻領域ANを通りかつ顔領域AFを左右に分割する中央線CFを中心として各比較領域AU・AD・AL・ARの位置関係が左右対称となる位置に複数の比較領域AU・AD・AL・ARを設定する。   Furthermore, in the face direction detection device 10 of the present embodiment, the comparison area setting unit 22d has the comparison areas AU, AD, AL, and center around the center line CF that passes through the nose area AN and divides the face area AF into left and right. A plurality of comparison areas AU, AD, AL, and AR are set at positions where the positional relationship of the AR is symmetrical.

すなわち、ステレオカメラ11と鼻領域ANとの距離値は、距離情報から既知であり、顔が正面を向いていれば、左右の頬は鼻領域ANを中心として左右の対称位置に存在し、かつ左右の頬とステレオカメラ11との距離値は等しい。この結果、鼻領域ANにおける例えば左右の一定距離の位置に比較領域AL・ARを設定すれば、その左右の比較領域AL・ARとステレオカメラ11との距離値は顔が正面を向いていれば互いに等しくなり差分は0となる。これに対して、顔が正面向きに対して傾いていれば差分は0よりも大きい値となる。したがって、撮像方向に対する顔向きの角度を容易に算出することが可能となる。   That is, the distance value between the stereo camera 11 and the nose area AN is known from the distance information, and if the face is facing the front, the left and right cheeks exist at the left and right symmetrical positions around the nose area AN, and The distance values between the left and right cheeks and the stereo camera 11 are equal. As a result, if the comparison areas AL and AR are set, for example, at positions on the left and right fixed distances in the nose area AN, the distance values between the left and right comparison areas AL and AR and the stereo camera 11 are as follows. They are equal to each other and the difference is zero. On the other hand, if the face is inclined with respect to the front direction, the difference is a value greater than zero. Therefore, it is possible to easily calculate the angle of the face direction with respect to the imaging direction.

また、顔の傾きとは、一般的に顔の左右の傾きを示すので、鼻領域ANを通りかつ顔領域AFを左右に分割する中央線CFを中心として各比較領域AL・ARの位置関係が左右対称となる位置に複数の比較領域AL・ARを設定することが好ましい。   In addition, since the face inclination generally indicates the right and left inclination of the face, the positional relationship between the comparison areas AL and AR is centered on a center line CF that passes through the nose area AN and divides the face area AF into left and right. It is preferable to set a plurality of comparison areas AL and AR at positions that are symmetrical.

また、本実施の形態の顔向き検出装置10では、顔領域AFを左右に分割する中央線CFと鼻領域ANの中心位置との距離が閾値以上か否かを判定する鼻位置ずれ量判定手段としての鼻位置ずれ量判定部22cがさらに設けられている。   Further, in the face direction detecting device 10 of the present embodiment, the nose position deviation amount determining means for determining whether or not the distance between the center line CF dividing the face area AF into the left and right and the center position of the nose area AN is equal to or greater than a threshold value. The nose position deviation amount determination unit 22c is further provided.

また、本実施の形態の顔向き検出装置10では、鼻位置ずれ量判定部22cは、顔領域AFの中央線CFと鼻領域ANの中心位置との距離が閾値以上か否かの判定を、角度算出部22eによる顔向きの角度の算出前に行う。   Further, in the face direction detection device 10 of the present embodiment, the nose position deviation determination unit 22c determines whether the distance between the center line CF of the face area AF and the center position of the nose area AN is equal to or greater than a threshold value. This is performed before the angle calculation unit 22e calculates the face angle.

すなわち、顔が正面を向いている場合には、顔領域の中央線と鼻位置の中心位置とは略一致する。これに対して、顔領域の中央線と鼻位置の中心位置との距離が閾値以上つまり一定距離以上離れているということは顔が正面向きに対して傾き過ぎていることを示す。このような場合には、例えば、鼻位置の中心位置を鼻の中心位置と見做すことが好ましくない。   That is, when the face is facing the front, the center line of the face area and the center position of the nose position substantially coincide. On the other hand, that the distance between the center line of the face area and the center position of the nose position is more than a threshold value, that is, more than a certain distance, indicates that the face is inclined too much with respect to the front direction. In such a case, for example, it is not preferable to consider the center position of the nose position as the center position of the nose.

そこで、鼻位置ずれ量判定部22cは、顔領域AFの中央線CFと鼻位置の中心位置との距離が閾値以上か否かを判定をする。そして、この判定は、角度算出部22eによる顔向きの角度の算出前に行われる。   Therefore, the nose position deviation determination unit 22c determines whether or not the distance between the center line CF of the face area AF and the center position of the nose position is equal to or greater than a threshold value. This determination is performed before the face calculation angle is calculated by the angle calculation unit 22e.

これにより、顔向きの角度を算出する前段階で、鼻位置の検出精度が低下する要因を予め排除できる。この結果、角度算出部22eにて算出した顔向きの角度が有効範囲内の値ではないとする判定が最終段階で得られたことによって、再度、顔の向きを変えて撮影する場合に比べて、無駄を省くことができる。したがって、より効率的に顔の向きを精度よく判別することができる。   As a result, it is possible to eliminate in advance a factor that lowers the detection accuracy of the nose position in the previous stage of calculating the face orientation angle. As a result, the determination that the angle of the face direction calculated by the angle calculation unit 22e is not a value within the effective range is obtained at the final stage, so that the face direction is changed again compared to the case of shooting. Can save waste. Therefore, the orientation of the face can be determined more efficiently and accurately.

また、本実施の形態の顔向き検出装置10では、鼻位置ずれ量判定部22cは、顔領域AFの中央線CFと鼻領域ANの中心位置との距離が閾値以上の場合には、その旨を報知する。例えば、異常信号を発生する。   Further, in the face direction detection device 10 of the present embodiment, the nose position deviation amount determination unit 22c, when the distance between the center line CF of the face area AF and the center position of the nose area AN is equal to or greater than the threshold value, Is notified. For example, an abnormal signal is generated.

これにより、再度、顔を正面に向けさせてステレオカメラ11にて顔を撮影し直すことができる。この結果、本実施の形態の顔向き検出装置10を用いて顔の向きを高速に精度よく判別するに際して、鼻領域ANの検出精度が低下する要因を予め排除できるので、より効率的に顔の向きを精度よく判別することができる。   As a result, it is possible to re-shoot the face with the stereo camera 11 with the face again facing the front. As a result, when the face orientation detection device 10 of the present embodiment is used to determine the face orientation at high speed and with high accuracy, it is possible to eliminate in advance the factors that reduce the detection accuracy of the nose area AN. The direction can be accurately determined.

また、本実施の形態の顔向き検出装置10では、鼻位置検出部22b、比較領域設定部22d及び角度算出部22eのうちの少なくとも一つは、顔領域判別部22aにて検出した顔領域AFの大きさに応じて、鼻位置検出部22b、比較領域設定部22d又は角度算出部22eで用いるパラメータを変更するようになっている。   In the face direction detection device 10 according to the present embodiment, at least one of the nose position detection unit 22b, the comparison region setting unit 22d, and the angle calculation unit 22e is the face region AF detected by the face region determination unit 22a. The parameters used in the nose position detection unit 22b, the comparison region setting unit 22d, or the angle calculation unit 22e are changed in accordance with the size of.

例えば、大人と子供とでは顔領域AFの大きさが全く異なり、同一のパラメータを用いたのでは顔向き判定が正確にできない場合がある。その理由は、顔領域AFが小さい人の場合は、鼻の高さ等のスケールが全体として小さくなるためである。   For example, there is a case where the size of the face area AF is completely different between an adult and a child, and the face orientation cannot be accurately determined using the same parameter. The reason is that, for a person with a small face area AF, the scale such as the height of the nose is reduced as a whole.

そこで、本実施の形態では、鼻位置検出部22b、比較領域設定部22d及び角度算出部22eのうちの少なくとも一つは、顔領域AFのスケールの大小に合わせてパラメータを調整する。具体的には、例えば、鼻位置検出部22bが鼻領域ANを判定する場合に、鼻領域ANのパラメータを変更する。詳細には、例えば、顔領域AFが小さい子供の場合は、顔領域AFの中心であって、大人よりも狭い領域を鼻領域ANと判定する。或いは、顔領域AFが小さい子供の場合は、距離情報に基づいて鼻の頂上つまり最近接距離の位置からの周辺への距離が大人よりも近い領域を鼻領域ANと判定する。   Therefore, in the present embodiment, at least one of the nose position detection unit 22b, the comparison region setting unit 22d, and the angle calculation unit 22e adjusts the parameter according to the scale of the face region AF. Specifically, for example, when the nose position detection unit 22b determines the nose area AN, the parameter of the nose area AN is changed. Specifically, for example, in the case of a child with a small face area AF, an area that is the center of the face area AF and is narrower than an adult is determined as the nose area AN. Alternatively, in the case of a child with a small face area AF, an area where the distance from the top of the nose, that is, from the position of the closest distance to the periphery, is closer than the adult based on the distance information is determined as the nose area AN.

また、角度算出部22eにおいては、鼻の位置と比較領域AU・AD・AL・ARとに対する距離の差分値の比較から傾き角度を算出するときのパラメータを変えることも可能である。例えば、顔領域AFが小さい子供の場合は、距離の差分値を比較したときの差が大人と同一であっても傾き角度が大きい。したがって、顔領域AFが小さい場合は、差分値の差が小さい場合であっても傾き角度を大きく算出する。   Further, in the angle calculation unit 22e, it is also possible to change a parameter for calculating an inclination angle from a comparison of difference values of distances with respect to the nose position and the comparison areas AU, AD, AL, and AR. For example, in the case of a child with a small face area AF, the inclination angle is large even if the difference when the difference values of the distance are compared is the same as that of an adult. Therefore, when the face area AF is small, the tilt angle is calculated to be large even if the difference between the difference values is small.

これにより、大人から子供まで、計測対象となる顔領域の大きさの変動範囲が大きい場合でも、それぞれの顔領域AFの大きさに合わせて適切に顔の向きを検出することができる。   Accordingly, even when the range of the size of the face area to be measured is large from adults to children, the face direction can be appropriately detected according to the size of each face area AF.

また、本実施の形態の3次元計測装置1Aは、本実施の形態の顔向き検出装置10と、上記顔向き検出装置10の角度算出部22eにて求めた前記顔向きの角度に基づいて、顔の向きを補正した3次元計測データを生成する3次元データ処理装置30とを備えている。   In addition, the three-dimensional measurement apparatus 1A of the present embodiment is based on the face orientation angle obtained by the face orientation detection device 10 of the present embodiment and the angle calculation unit 22e of the face orientation detection device 10. And a three-dimensional data processing device 30 that generates three-dimensional measurement data with the face orientation corrected.

すなわち、一般的な技術として、3次元画像から一定の角度回転させた回転後の画像データを生成する技術が知られている。本実施の形態でも3次元データ処理装置30がこの処理を行う。   That is, as a general technique, a technique for generating rotated image data obtained by rotating a three-dimensional image by a certain angle is known. Also in this embodiment, the three-dimensional data processing device 30 performs this processing.

この結果、本実施の形態では、顔向きの角度を判定した後に、顔の向きを所望の向きに正確に補正した3次元計測データを生成することができる。   As a result, in the present embodiment, after determining the face orientation angle, it is possible to generate three-dimensional measurement data in which the face orientation is accurately corrected to a desired orientation.

例えば、算出された角度分だけ3次元画像を回転させた画像データを生成する処理を行うことができる。これにより、斜め方向から顔を撮像した3次元画像データであっても、正面から撮像したと同等の画像データを生成することができる。   For example, it is possible to perform processing for generating image data obtained by rotating a three-dimensional image by the calculated angle. Thereby, even if it is the three-dimensional image data which imaged the face from the diagonal direction, the image data equivalent to what was imaged from the front can be generated.

したがって、顔の向きを判別するに際して、特徴量抽出等の煩雑な手法を用いずに顔の向きを高速に精度よく判別し得る顔向き検出装置10を用いて顔の3次元データを効率よく生成し、活用することができる3次元計測装置1Aを提供することができる。   Therefore, when determining the face direction, three-dimensional data of the face is efficiently generated by using the face direction detection device 10 that can quickly and accurately determine the face direction without using a complicated method such as feature amount extraction. Thus, it is possible to provide a three-dimensional measuring apparatus 1A that can be utilized.

また、本実施の形態の顔向き検出装置10では、鼻位置検出部22bは、距離情報を用いて顔領域AFに存在する鼻候補領域としての鼻領域ANを判定した後、鼻領域ANの所定位置を鼻の中心位置として検出する。   In the face direction detection device 10 according to the present embodiment, the nose position detection unit 22b determines a nose area AN as a nose candidate area existing in the face area AF using the distance information, and then determines a predetermined nose area AN. The position is detected as the center position of the nose.

すなわち、本実施の形態では、鼻の中心位置を検出する場合に、距離情報を含む距離画像PLを用いて顔領域AFに存在する鼻領域ANを判定する。これにより、鼻領域ANをある程度絞り込む。そして、鼻領域ANが求まると、鼻領域ANの所定位置である例えば中心位置を鼻の中心位置として検出する。すなわち、鼻位置は顔領域AFにおいて高さが高い位置に存在するので、距離情報を含む距離画像PLを用いて顔領域AFに存在する鼻領域ANを判定することができる。そして、鼻領域ANが求まると、鼻領域ANの例えば中心位置を自動的に鼻の中心位置として見做す。これにより、鼻の中心位置を求めるために、顔領域AF全体で鼻の中心位置を検出するよりも判定処理の負荷が小さく、かつ顔領域AFの鼻以外の突起部等を鼻として誤判定することも少なくなる。したがって、鼻の中心位置の検出精度が向上する。   That is, in the present embodiment, when detecting the center position of the nose, the nose area AN existing in the face area AF is determined using the distance image PL including the distance information. Thereby, the nose area AN is narrowed down to some extent. When the nose area AN is obtained, a center position, for example, a predetermined position of the nose area AN is detected as the center position of the nose. That is, since the nose position exists at a high position in the face area AF, the nose area AN existing in the face area AF can be determined using the distance image PL including the distance information. When the nose area AN is obtained, for example, the center position of the nose area AN is automatically regarded as the center position of the nose. Accordingly, in order to obtain the center position of the nose, the load of the determination process is smaller than when the center position of the nose is detected in the entire face area AF, and a protrusion other than the nose of the face area AF is erroneously determined as the nose. Things will also be less. Therefore, the detection accuracy of the center position of the nose is improved.

また、本実施の形態の顔向き検出装置10では、画素値情報は、色情報であるとすることができる。   Further, in the face direction detection device 10 of the present embodiment, the pixel value information can be color information.

すなわち、顔向き検出装置10が、モノクロではなく、赤(R)・緑(G)・青(B)からなるカラー情報を用いる場合には、画素値情報として色情報を用いることにより、顔領域AFの判定を正確に行うことができる。例えば、モノクロの輝度値では、顔領域AFと背景領域との間で輝度の階調差があまりとれず、精度が確保できない場合がある。これに対して、赤(R)・緑(G)・青(B)の輝度値情報を算出して、肌色領域を顔領域AFと判定することにより、顔領域AFと背景領域の区分を正確に行うことができる。すなわち、肌の色を手がかりに顔領域AFの検出を行うことによって、周囲の明るさ等の撮影条件によらず、対象となる顔領域AFを正確に抽出することができる。   That is, when the face direction detection device 10 uses color information made up of red (R), green (G), and blue (B) instead of monochrome, the face region is obtained by using color information as pixel value information. AF determination can be performed accurately. For example, with a monochrome luminance value, there may be a case where the luminance gradation difference between the face area AF and the background area cannot be taken so much that the accuracy cannot be ensured. On the other hand, the brightness value information of red (R), green (G), and blue (B) is calculated, and the skin color area is determined as the face area AF, thereby accurately classifying the face area AF and the background area. Can be done. In other words, by detecting the face area AF using the skin color as a clue, the target face area AF can be accurately extracted regardless of shooting conditions such as ambient brightness.

〔実施の形態2〕
本発明の他の実施の形態について図8に基づいて説明すれば、以下のとおりである。尚、本実施の形態において説明すること以外の構成は、上記実施の形態1と同じである。また、説明の便宜上、上記の実施の形態1の図面に示した部材と同一の機能を有する部材については、同一の符号を付し、その説明を省略する。
[Embodiment 2]
The following will describe another embodiment of the present invention with reference to FIG. Configurations other than those described in the present embodiment are the same as those in the first embodiment. For convenience of explanation, members having the same functions as those shown in the drawings of the first embodiment are given the same reference numerals, and explanation thereof is omitted.

前記実施の形態1の3次元計測装置1Aでは、顔向き検出装置10及び3次元データ処理装置30が別体に設けられていた。しかし、本実施の形態の3次元計測装置1Bでは、顔向き検出装置10と3次元データ処理装置30とが一体に設けられている点が異なっている。   In the three-dimensional measurement apparatus 1A of the first embodiment, the face orientation detection device 10 and the three-dimensional data processing device 30 are provided separately. However, the three-dimensional measuring apparatus 1B of the present embodiment is different in that the face direction detecting device 10 and the three-dimensional data processing device 30 are provided integrally.

本実施の形態の3次元計測装置1Bの構成について、図8に基づいて説明する。図8は、本実施の形態の3次元計測装置1Bの構成を示す斜視図である。   A configuration of the three-dimensional measurement apparatus 1B according to the present embodiment will be described with reference to FIG. FIG. 8 is a perspective view showing the configuration of the three-dimensional measuring apparatus 1B of the present embodiment.

本実施の形態の3次元計測装置1Bは、図8に示すように、ステレオカメラ11、プロジェクタ12、カメラ制御基板13、顔向き検出用端末20、3次元データ処理用端末31、及び記憶装置32が一体となった統合端末40によって構成されている。   As shown in FIG. 8, the three-dimensional measurement apparatus 1 </ b> B according to the present embodiment includes a stereo camera 11, a projector 12, a camera control board 13, a face orientation detection terminal 20, a three-dimensional data processing terminal 31, and a storage device 32. Are integrated terminal 40.

上記統合端末40には、顔向き検出プログラム21及び3次元データ処理プログラム33がインストールされている。統合端末40には、ステレオカメラ11の下部にディスプレイ41が配置されている。このため、被撮影者Mが自らの顔をステレオカメラ11で撮影しながら、その撮影結果及び処理結果をディスプレイ41にて視認することができるようになっている。   In the integrated terminal 40, a face orientation detection program 21 and a three-dimensional data processing program 33 are installed. In the integrated terminal 40, a display 41 is disposed below the stereo camera 11. For this reason, the subject M can visually recognize the photographing result and the processing result on the display 41 while photographing his / her face with the stereo camera 11.

本実施の形態の3次元計測装置1Bでは、実施の形態1の3次元計測装置1Aとは異なり、「被撮影者M」が自ら統合端末40上のプログラムを操作して3次元計測データを生成・管理する。このため、実施の形態1の3次元計測装置1Aよりもプログラムは直感的に分かりやすい画面構成を有している。また、顔の向きを画面で確認しながら操作を行う場合に、操作を行うために手を動かすことによって顔の向きが変化してしまうことを防止するため、顔の向きを変えずに手元で操作できるようなインターフェースを設けている。   In the three-dimensional measuring apparatus 1B of the present embodiment, unlike the three-dimensional measuring apparatus 1A of the first embodiment, the “photographed person M” himself / herself operates a program on the integrated terminal 40 to generate three-dimensional measurement data. ·to manage. For this reason, the program has a screen configuration that is easier to understand intuitively than the three-dimensional measurement apparatus 1A of the first embodiment. Also, when performing operations while checking the face orientation on the screen, to prevent the face orientation from changing by moving your hand to perform the operation, keep the face orientation unchanged. An interface that can be operated is provided.

以上のように、本実施の形態の3次元計測装置1Bでは、「被撮影者M」が自ら自分の顔を撮影し、その向きを正面向きに補正した上で3次元形状データを容易に保存し、様々な用途に活用することができる。   As described above, in the three-dimensional measurement apparatus 1B of the present embodiment, the “photographed person M” photographs his / her own face, corrects the direction to the front, and easily stores the three-dimensional shape data. It can be used for various purposes.

〔実施の形態3〕
本発明の他の実施の形態について図9に基づいて説明すれば、以下のとおりである。尚、本実施の形態において説明すること以外の構成は、上記実施の形態1と同じである。また、説明の便宜上、上記の実施の形態1の図面に示した部材と同一の機能を有する部材については、同一の符号を付し、その説明を省略する。
[Embodiment 3]
The following will describe another embodiment of the present invention with reference to FIG. Configurations other than those described in the present embodiment are the same as those in the first embodiment. For convenience of explanation, members having the same functions as those shown in the drawings of the first embodiment are given the same reference numerals, and explanation thereof is omitted.

前記実施の形態1の3次元計測装置1Aでは、顔向き検出装置10と3次元データ処理装置30とはデータ通信用ケーブル2にて接続されていた。しかし、本実施の形態の3次元計測装置1Cでは、顔向き検出装置10と3次元データ処理装置30とがネットワークにて接続されており、3次元データ処理装置30がネットワークで接続された遠隔地に配置されている点が異なっている。   In the three-dimensional measuring apparatus 1A of the first embodiment, the face orientation detecting device 10 and the three-dimensional data processing device 30 are connected by the data communication cable 2. However, in the three-dimensional measurement apparatus 1C of the present embodiment, the face orientation detection apparatus 10 and the three-dimensional data processing apparatus 30 are connected via a network, and the remote location where the three-dimensional data processing apparatus 30 is connected via the network. Are different in that they are arranged in

本実施の形態の3次元計測装置1Cの構成について、図9に基づいて説明する。図9は、本実施の形態の3次元計測装置1Cの構成を示す斜視図である。   The configuration of the three-dimensional measurement apparatus 1C according to the present embodiment will be described with reference to FIG. FIG. 9 is a perspective view showing a configuration of the three-dimensional measuring apparatus 1C according to the present embodiment.

本実施の形態の3次元計測装置1Cは、図9に示すように、顔向き検出装置10と3次元データ処理装置30とは物理的に離れた場所に設置されており、両者はネットワーク3により接続されている。ネットワーク3は、遠隔地にある端末同士を接続するのに適したネットワークであり、インターネット、無線LAN又は専用線(VPN)その他任意の方式を用いることができる。   As shown in FIG. 9, the three-dimensional measuring apparatus 1 </ b> C according to the present embodiment is installed in a place physically separated from the face orientation detecting apparatus 10 and the three-dimensional data processing apparatus 30. It is connected. The network 3 is a network suitable for connecting terminals in remote locations, and the Internet, a wireless LAN, a private line (VPN), or any other method can be used.

上記構成の3次元計測装置1Cでは、顔向き検出装置10にて出力された顔の3次元データは、ネットワーク3を経由して3次元データ処理装置30に送信される。送信される時点で、セキュリティ及びプライバシーを配慮し、3次元データの一部又は全部に暗号化処理を施すことができる。   In the three-dimensional measurement apparatus 1 </ b> C having the above-described configuration, the three-dimensional data of the face output from the face orientation detection apparatus 10 is transmitted to the three-dimensional data processing apparatus 30 via the network 3. At the time of transmission, in consideration of security and privacy, part or all of the three-dimensional data can be encrypted.

3次元データ処理装置30は、実施の形態1と同様に、3次元データを保存し、操作者O2によってデータの処理を行う。   The three-dimensional data processing device 30 stores the three-dimensional data and processes the data by the operator O2 as in the first embodiment.

本実施の形態では、顔向き検出装置10と3次元データ処理装置30とは物理的に離れた場所に存在するので、撮影が終了して3次元データを送信した後に不具合が判明しても、その場で顔データを再度撮影する等の対応が困難である。特に、操作者O2側で顔の微妙な向きが問題になるような精密な処理を行う場合、操作者O1側の目視では数degレベルの向きの違いが判別できないため、データ送信後に操作者O2の側で顔の向きが不適切であることが判明することがある。このような場合、撮影終了した被撮影者Mを再度呼び出して撮影を依頼する等、極めて効率の悪い対応が必要になる。   In the present embodiment, since the face orientation detection device 10 and the three-dimensional data processing device 30 are physically separated from each other, even if a problem is found after the photographing is finished and the three-dimensional data is transmitted, It is difficult to cope with re-photographing face data on the spot. In particular, when performing precise processing in which the delicate orientation of the face becomes a problem on the operator O2 side, the difference in the direction of several deg level cannot be determined by visual observation on the operator O1 side. The face may turn out to be inappropriate. In such a case, it is necessary to take an extremely inefficient measure such as calling the photographed person M who has finished photographing and requesting photographing.

これに対して、本実施の形態における3次元データ処理装置30では、実施の形態1において説明したように、顔向き検出装置10にて予め顔の向きを正確に補正してから送信するので、受信後に不具合が発覚する可能性を低減させることができる。これにより、ネットワーク3を介して遠隔地で3次元データを活用する場合でも、信頼性の高いシステムとすることができる。   On the other hand, in the three-dimensional data processing device 30 according to the present embodiment, as described in the first embodiment, the face orientation detection device 10 accurately corrects the orientation of the face in advance and then transmits. It is possible to reduce the possibility that a defect is detected after reception. As a result, even when three-dimensional data is utilized at a remote location via the network 3, a highly reliable system can be obtained.

以上のように、本実施の形態では、顔向き検出装置10により2次元及び3次元の画像データから顔の向きを検出し、所望の向きに補正することができる。また、顔の向きを正確に補正した3次元計測データを生成し、活用することができる。   As described above, according to the present embodiment, the face orientation detection device 10 can detect the face orientation from the two-dimensional and three-dimensional image data and correct it to a desired orientation. In addition, it is possible to generate and utilize three-dimensional measurement data in which the face orientation is accurately corrected.

そして、本実施の形態の3次元計測装置1Cで得た顔の3次元データは、セキュリティ、医療、介護、スポーツ、アート、服飾、ゲーム、アミューズメント、広告、その他これらに限定されない様々な用途に利用することができる。   And the 3D data of the face obtained by the 3D measuring apparatus 1C of the present embodiment is used for various uses not limited to security, medical care, nursing care, sports, art, clothing, games, amusement, advertisements, etc. can do.

尚、以上で説明した実施の形態では人の顔を計測対象としていたが、人以外に、例えば動物の顔や、マネキンや人形、ロボット等人に類するものの顔についても、本発明を適用することが可能である。   In the embodiment described above, a human face is a measurement target. However, in addition to a person, the present invention is also applied to a human face such as an animal face, a mannequin, a doll, or a robot. Is possible.

〔まとめ〕
本発明の態様1における顔向き検出装置10は、顔を撮影して、画素毎に画素値情報と距離情報とを含む画像データを取得する画像データ取得手段(ステレオカメラ11)と、上記画素値情報を用いて顔領域AFを判別する顔領域判別手段(顔領域判別部22a)と、上記距離情報(距離画像PL)を用いて上記顔領域AFに存在する鼻位置(鼻領域AN)を検出する鼻位置検出手段(鼻位置検出部22b)と、上記顔領域AF内に上記鼻位置(鼻領域AN)に対する複数の比較領域AU・AD・AL・ARを設定する比較領域設定手段(比較領域設定部22d)と、上記鼻位置(鼻領域AN)の距離情報に対する上記複数の各比較領域AU・AD・AL・ARの距離情報の差分である各差分情報に基づいて撮像方向に対する顔向きの角度を算出する角度算出手段(角度算出部22e)とを備えていることを特徴としている。
[Summary]
The face orientation detection apparatus 10 according to the first aspect of the present invention captures a face and acquires image data acquisition means (stereo camera 11) that acquires image data including pixel value information and distance information for each pixel, and the pixel value. A face area discriminating unit (face area discriminating unit 22a) that discriminates a face area AF using information and a nose position (nasal area AN) existing in the face area AF using the distance information (distance image PL). Nasal position detecting means (nasal position detecting unit 22b), and comparison area setting means (comparison area) for setting a plurality of comparison areas AU, AD, AL, and AR for the nasal position (nasal area AN) in the face area AF The setting unit 22d) and the face orientation relative to the imaging direction based on the difference information that is the difference between the distance information of the plurality of comparison areas AU, AD, AL, and AR with respect to the distance information of the nose position (nasal area AN). The angle It is characterized by and a left angle calculating means (angle calculation section 22e).

上記発明によれば、撮像方向に対する顔向きの角度を算出するために、まず、ステレオカメラ等の画像データ取得手段にて、顔を撮影して、画素毎に画素値情報と距離情報とを含む画像データを取得する。ここで、画素値情報とは、例えば輝度値又は色情報を想定している。尚色情報とは、換言すると、色の三原色である赤(R)・緑(G)・青(B)毎の輝度値情報と同義であり、モノクロの輝度値とは異なる概念である。   According to the above invention, in order to calculate the angle of the face direction with respect to the imaging direction, first, a face is photographed by an image data acquisition unit such as a stereo camera, and pixel value information and distance information are included for each pixel. Get image data. Here, the pixel value information is assumed to be, for example, a luminance value or color information. In other words, the color information is synonymous with luminance value information for each of the three primary colors red (R), green (G), and blue (B), and is a concept different from the monochrome luminance value.

次いで、顔領域判別手段は、画素値情報を用いて顔領域を判別する。具体的には、画素値情報として例えば色情報を用いる場合には、顔領域は肌色であり、それ以外は黒色の背景領域として示される。したがって、肌色領域が顔領域であるとして容易に区別可能であり、顔領域を容易に特定することができる。   Next, the face area discrimination means discriminates the face area using the pixel value information. Specifically, for example, when color information is used as the pixel value information, the face area is a skin color, and the others are indicated as a black background area. Therefore, it can be easily distinguished that the skin color area is the face area, and the face area can be easily specified.

次いで、鼻位置検出手段は、画像データの距離情報を用いて上記顔領域に存在する鼻位置を検出する。具体的には、鼻は基本的には顔領域の中で最も高い。したがって、ステレオカメラ等の画像データ取得手段との距離値が最も小さくなるため、顔領域の内で距離情報が最も画像データ取得手段に近い部位を鼻位置と判定することができる。   Next, the nose position detecting means detects the nose position existing in the face area using the distance information of the image data. Specifically, the nose is basically the highest in the face area. Therefore, since the distance value with the image data acquisition means such as a stereo camera is the smallest, it is possible to determine the part of the face area whose distance information is closest to the image data acquisition means as the nose position.

次いで、比較領域設定手段は、上記顔領域内に鼻位置に対する複数の比較領域を設定する。また、角度算出手段は、上記鼻位置の距離情報に対する上記複数の各比較領域の距離情報の差分である各差分情報に基づいて撮像方向に対する顔向きの角度を算出する。   Next, the comparison area setting means sets a plurality of comparison areas for the nose position in the face area. In addition, the angle calculation unit calculates an angle of the face direction with respect to the imaging direction based on each difference information that is a difference between the distance information of each of the plurality of comparison regions with respect to the distance information of the nose position.

具体的には、比較領域設定手段にて、顔領域に、上下左右等少なくとも2か所の比較領域を設定した後、角度算出手段にて、鼻位置の距離情報と複数の各比較領域の距離情報との比較を行い、差分である各差分情報を求め、各差分情報同士の比較を行う。例えば、右の頬がステレオカメラ等の画像データ取得手段の近くに存在する場合、左右の差分情報を比較すると違いが生じる。このため、左右の差分情報を互いに比較することにより顔の傾きを検出することができる。この結果、角度算出手段は、撮像方向に対する顔向きの角度を算出することができる。   Specifically, the comparison area setting means sets at least two comparison areas such as up, down, left, and right in the face area, and then the angle calculation means determines the distance information of the nose position and the distances of the plurality of comparison areas. Comparison with information is performed, each difference information which is a difference is obtained, and each difference information is compared. For example, when the right cheek is present in the vicinity of the image data acquisition means such as a stereo camera, a difference occurs when the left and right difference information is compared. For this reason, the inclination of the face can be detected by comparing the left and right difference information with each other. As a result, the angle calculation means can calculate the angle of the face direction with respect to the imaging direction.

ここで、上述した撮像方向に対する顔向きの角度の算出方法では、例えば鼻の特徴量を抽出する方法は用いていない。しかし、撮像方向に対する顔向きの角度を容易に算出することができるので、手間がかからず、高速にしかも精度よく検出することができる。   Here, the method for calculating the angle of the face direction with respect to the imaging direction described above does not use, for example, a method for extracting the feature amount of the nose. However, since the angle of the face direction with respect to the imaging direction can be easily calculated, it is not time-consuming and can be detected at high speed and with high accuracy.

したがって、顔の向きを判別するに際して、特徴量抽出等の煩雑な手法を用いずに顔の向きを高速に精度よく判別し得る顔向き検出装置を提供することができる。   Therefore, it is possible to provide a face orientation detection device that can accurately determine the orientation of a face at high speed without using a complicated method such as feature amount extraction when determining the orientation of the face.

本発明の態様2における顔向き検出装置10は、態様1の顔向き検出装置において、前記鼻位置検出手段(鼻位置検出部22b)は、前記顔領域AF内において、画像データ取得手段(ステレオカメラ11)との距離値が最も小さい位置を含む領域を鼻位置(鼻領域AN)として検出することが好ましい。   The face orientation detection device 10 according to aspect 2 of the present invention is the face orientation detection device according to aspect 1, wherein the nose position detection means (nasal position detection unit 22b) is an image data acquisition means (stereo camera) in the face area AF. It is preferable to detect the region including the position having the smallest distance value to 11) as the nose position (nasal region AN).

すなわち、鼻は基本的には顔領域の中で最も高い。したがって、ステレオカメラ等の画像データ取得手段との距離値が最も小さくなるため、顔領域の内で距離情報が最も画像データ取得手段に近い部位が鼻位置であると容易かつ簡易に判定することができる。   That is, the nose is basically the highest in the face area. Therefore, since the distance value with the image data acquisition means such as a stereo camera is the smallest, it is easy and simple to determine that the part of the face area whose distance information is closest to the image data acquisition means is the nose position. it can.

本発明の態様3における顔向き検出装置10は、態様1又は2の顔向き検出装置において、前記比較領域設定手段(比較領域設定部22d)は、前記鼻位置(鼻領域AN)を基準とした前記複数の比較領域AU・AD・AL・ARのそれぞれの位置を算出して該鼻位置から離れた位置に該複数の比較領域AU・AD・AL・ARを設定することが好ましい。   The face orientation detection device 10 according to aspect 3 of the present invention is the face orientation detection device according to aspect 1 or 2, wherein the comparison region setting means (comparison region setting unit 22d) is based on the nose position (nasal region AN). It is preferable to calculate the respective positions of the plurality of comparison areas AU, AD, AL, and AR and set the plurality of comparison areas AU, AD, AL, and AR at positions away from the nose position.

本発明の態様4における顔向き検出装置10は、態様1,2,又は3の顔向き検出装置において、前記比較領域設定手段(比較領域設定部22d)は、前記鼻位置(鼻領域AN)を通りかつ前記顔領域AFを左右に分割する中央線CFを中心として各比較領域AL・ARの位置関係が左右対称となる位置に前記複数の比較領域AL・ARを設定することが好ましい。   The face orientation detection device 10 according to aspect 4 of the present invention is the face orientation detection device according to aspects 1, 2, or 3, wherein the comparison region setting means (comparison region setting unit 22d) determines the nose position (nasal region AN). It is preferable to set the plurality of comparison areas AL / AR at positions where the positional relationship of the comparison areas AL / AR is symmetrical with respect to the center line CF that divides the face area AF into the left and right.

すなわち、画像データ取得手段と鼻位置との距離値は、距離情報から既知であり、顔が正面を向いていれば、左右の頬は鼻位置を中心として左右の対称位置に存在し、かつ左右の頬と画像データ取得手段との距離値は等しい。この結果、鼻位置における例えば左右の一定距離の位置に比較領域を設定すれば、その左右の比較領域と画像データ取得手段との距離値は顔が正面を向いていれば互いに等しくなり差分は0となる。これに対して、顔が正面向きに対して傾いていれば差分は0よりも大きい値となる。したがって、撮像方向に対する顔向きの角度を容易に算出することが可能となる。   That is, the distance value between the image data acquisition means and the nose position is known from the distance information. If the face is facing the front, the left and right cheeks are present at the left and right symmetrical positions around the nose position, and the left and right The distance value between the cheek and the image data acquisition means is equal. As a result, if the comparison area is set at a certain distance, for example, at the left and right positions in the nose position, the distance values between the left and right comparison areas and the image data acquisition means are equal to each other when the face is facing the front, and the difference is 0. It becomes. On the other hand, if the face is inclined with respect to the front direction, the difference is a value greater than zero. Therefore, it is possible to easily calculate the angle of the face direction with respect to the imaging direction.

また、顔の傾きとは、一般的に顔の左右の傾きを示すので、鼻位置を通りかつ前記顔領域を左右に分割する中央線を中心として各比較領域の位置関係が左右対称となる位置に前記複数の比較領域を設定することが好ましい。   In addition, since the face inclination generally indicates the left-right inclination of the face, the position of each comparison area is symmetrical with respect to the center line that passes through the nose and divides the face area into left and right. It is preferable to set the plurality of comparison areas in

本発明の態様5における顔向き検出装置10は、態様1〜4のいずれか1に記載の顔向き検出装置において、前記顔領域AFを左右に分割する中央線CFと前記鼻位置(鼻領域AN)の中心位置との距離が閾値以上か否かを判定する鼻位置ずれ量判定手段(鼻位置ずれ量判定部22c)がさらに設けられていることが好ましい。   The face orientation detection device 10 according to the fifth aspect of the present invention is the face orientation detection device according to any one of the first to fourth aspects, wherein the center line CF that divides the face area AF into left and right and the nose position (nasal area AN). It is preferable that a nose position deviation amount determination means (nasal position deviation amount determination unit 22c) for determining whether or not the distance from the center position is equal to or greater than a threshold value is further provided.

本発明の態様6における顔向き検出装置10は、態様5の顔向き検出装置において、前記鼻位置ずれ量判定手段(鼻位置ずれ量判定部22c)は、前記顔領域AFの中央線CFと前記鼻位置(鼻領域AN)の中心位置との距離が閾値以上か否かの判定を、前記角度算出手段(角度算出部22e)による顔向きの角度の算出前に行うことが好ましい。   The face orientation detection device 10 according to aspect 6 of the present invention is the face orientation detection device according to aspect 5, wherein the nasal position deviation amount determination means (nasal position deviation amount determination unit 22c) includes the center line CF of the face area AF and the It is preferable to determine whether or not the distance from the center position of the nose position (nose area AN) is equal to or greater than a threshold value before calculating the face-facing angle by the angle calculation means (angle calculation unit 22e).

すなわち、顔が正面を向いている場合には、顔領域の中央線と鼻位置の中心位置とは略一致する。これに対して、顔領域の中央線と鼻位置の中心位置との距離が閾値以上つまり一定距離以上離れているということは顔が正面向きに対して傾き過ぎていることを示す。このような場合には、例えば、鼻位置の中心位置を鼻の中心位置と見做すことが好ましくない。   That is, when the face is facing the front, the center line of the face area and the center position of the nose position substantially coincide. On the other hand, that the distance between the center line of the face area and the center position of the nose position is more than a threshold value, that is, more than a certain distance, indicates that the face is inclined too much with respect to the front direction. In such a case, for example, it is not preferable to consider the center position of the nose position as the center position of the nose.

そこで、鼻位置ずれ量判定手段は、顔領域の中央線と鼻位置の中心位置との距離が閾値以上か否かの判定を判定する。そして、この判定は、角度算出手段による顔向きの角度の算出前に行われる。   Therefore, the nose position deviation amount determination means determines whether or not the distance between the center line of the face region and the center position of the nose position is equal to or greater than a threshold value. This determination is performed before the angle calculation unit calculates the face angle.

これにより、顔向きの角度を算出する前段階で、鼻位置の検出精度が低下する要因を予め排除できる。この結果、角度算出手段にて算出した顔向きの角度が有効範囲内の値ではないとする判定が最終段階で得られたことによって、再度、顔の向きを変えて撮影する場合に比べて、無駄を省くことができる。したがって、より効率的に顔の向きを精度よく判別することができる。   As a result, it is possible to eliminate in advance a factor that lowers the detection accuracy of the nose position in the previous stage of calculating the face orientation angle. As a result, the determination that the angle of the face direction calculated by the angle calculation means is not a value within the effective range has been obtained in the final stage, so that compared to the case where the face direction is changed again and shot, Waste can be saved. Therefore, the orientation of the face can be determined more efficiently and accurately.

本発明の態様7における顔向き検出装置10は、態様1〜6のいずれか1の顔向き検出装置において、前記鼻位置検出手段(鼻位置検出部22b)、比較領域設定手段(比較領域設定部22d)及び角度算出手段(角度算出部22e)のうちの少なくとも一つは、前記顔領域判別手段(顔領域判別部22a)にて検出した顔領域AFの大きさに応じて、鼻位置検出手段(鼻位置検出部22b)、比較領域設定手段(比較領域設定部22d)又は角度算出手段(角度算出部22e)で用いるパラメータを変更するようになっていることが好ましい。   The face direction detection device 10 according to the seventh aspect of the present invention is the face direction detection device according to any one of the first to sixth aspects, wherein the nose position detection unit (the nose position detection unit 22b) and the comparison region setting unit (the comparison region setting unit). 22d) and at least one of the angle calculation means (angle calculation section 22e) is a nose position detection means according to the size of the face area AF detected by the face area determination means (face area determination section 22a). It is preferable that parameters used in the (nasal position detection unit 22b), the comparison region setting unit (comparison region setting unit 22d), or the angle calculation unit (angle calculation unit 22e) are changed.

例えば、大人と子供とでは顔領域の大きさが全く異なり、同一のパラメータを用いたのでは顔向き判定が正確にできない場合がある。その理由は、顔領域が小さい人の場合は、鼻の高さ等のスケールが全体として小さくなるためである。   For example, the size of the face area is completely different between an adult and a child, and the face orientation may not be accurately determined using the same parameter. The reason is that, for a person with a small face area, the scale such as the height of the nose is reduced as a whole.

そこで、本発明では、鼻位置検出手段、比較領域設定手段及び角度算出手段のうちの少なくとも一つは、顔領域のスケールの大小に合わせてパラメータを調整する。具体的には、例えば、鼻位置検出手段が鼻候補領域を判定する場合に、鼻候補領域のパラメータを変更する。詳細には、例えば、顔領域が小さい子供の場合は、顔領域の中心であって、大人よりも狭い領域を鼻候補領域と判定する。或いは、顔領域が小さい子供の場合は、距離情報に基づいて鼻の頂上つまり最近接距離の位置からの周辺への距離が大人よりも近い領域を鼻候補領域と判定する。   Therefore, in the present invention, at least one of the nose position detection means, the comparison area setting means, and the angle calculation means adjusts the parameter according to the scale of the face area. Specifically, for example, when the nose position detection unit determines the nose candidate region, the parameter of the nose candidate region is changed. Specifically, for example, in the case of a child with a small face area, the area that is the center of the face area and is narrower than an adult is determined as a nose candidate area. Alternatively, in the case of a child with a small face area, the nose candidate area is determined based on the distance information as the nose candidate area where the distance from the top of the nose, that is, from the position of the closest distance, to the periphery is closer than the adult.

また、角度算出手段においては、鼻の位置と比較領域とに対する距離の差分値の比較から傾き角度を算出するときのパラメータを変えることも可能である。例えば、顔領域が小さい子供の場合は、距離の差分値を比較したときの差が大人と同一であっても傾き角度が大きい。したがって、顔領域が小さい場合は、差分値の差が小さい場合であっても傾き角度を大きく算出する。   Further, in the angle calculation means, it is also possible to change a parameter when calculating the tilt angle from the comparison of the difference value of the distance between the nose position and the comparison region. For example, in the case of a child with a small face area, the inclination angle is large even if the difference when the difference values of the distance are compared is the same as that of an adult. Therefore, when the face area is small, the tilt angle is calculated to be large even if the difference between the difference values is small.

これにより、大人から子供まで、計測対象となる顔領域の大きさの変動範囲が大きい場合でも、それぞれの顔領域の大きさに合わせて適切に顔の向きを検出することができる。   As a result, even when the range of the size of the face area to be measured is large, from adults to children, the face orientation can be detected appropriately according to the size of each face area.

本発明の態様8における3次元計測装置1A〜1Cは、態様1〜7のいずれか1の顔向き検出装置10と、上記顔向き検出装置10の角度算出手段(角度算出部22e)にて求めた前記顔向きの角度に基づいて、顔の向きを補正した3次元計測データを生成する3次元データ処理装置30とを備えていることを特徴としている。   The three-dimensional measurement devices 1A to 1C according to the aspect 8 of the present invention are obtained by the face direction detection device 10 according to any one of the aspects 1 to 7 and the angle calculation unit (angle calculation unit 22e) of the face direction detection device 10. And a three-dimensional data processing device 30 for generating three-dimensional measurement data with the face orientation corrected based on the face orientation angle.

一般的な技術として、3次元画像から一定の角度回転させた回転後の画像データを生成する技術が知られている。本発明でも3次元データ処理装置がこの処理を行う。   As a general technique, a technique for generating rotated image data obtained by rotating a three-dimensional image by a certain angle is known. In the present invention, the three-dimensional data processing apparatus performs this processing.

この結果、本発明では、顔向きの角度を判定した後に、顔の向きを所望の向きに正確に補正した3次元計測データを生成することができる。   As a result, in the present invention, three-dimensional measurement data in which the face orientation is accurately corrected to a desired orientation can be generated after the face orientation angle is determined.

例えば、算出された角度分だけ3次元画像を回転させた画像データを生成する処理を行うことができる。これにより、斜め方向から顔を撮像した3次元画像データであっても、正面から撮像したと同等の画像データを生成することができる。   For example, it is possible to perform processing for generating image data obtained by rotating a three-dimensional image by the calculated angle. Thereby, even if it is the three-dimensional image data which imaged the face from the diagonal direction, the image data equivalent to what was imaged from the front can be generated.

したがって、顔の向きを判別するに際して、特徴量抽出等の煩雑な手法を用いずに顔の向きを高速に精度よく判別し得る顔向き検出装置を用いて顔の3次元データを効率よく生成し、活用することができる3次元計測装置を提供することができる。   Therefore, when determining the face direction, three-dimensional data of the face is efficiently generated using a face direction detection device that can quickly and accurately determine the face direction without using a complicated method such as feature extraction. It is possible to provide a three-dimensional measuring apparatus that can be utilized.

尚、本発明は、上述した各実施形態に限定されるものではなく、請求項に示した範囲で種々の変更が可能であり、異なる実施形態にそれぞれ開示された技術的手段を適宜組み合わせて得られる実施形態についても本発明の技術的範囲に含まれる。   The present invention is not limited to the above-described embodiments, and various modifications can be made within the scope of the claims, and the technical means disclosed in different embodiments can be appropriately combined. Such embodiments are also included in the technical scope of the present invention.

本発明は、顔向き検出装置により2次元の画像データ及び3次元の画像データから顔の向きを検出し、所望の向きに補正することができる顔向き検出装置に適用することができる。また、顔の向きを正確に補正した3次元計測データを生成し、活用することができる3次元計測装置に適用することができる。   The present invention can be applied to a face orientation detection device that can detect a face orientation from two-dimensional image data and three-dimensional image data using a face orientation detection device and correct the face orientation to a desired orientation. Further, the present invention can be applied to a three-dimensional measurement apparatus that can generate and utilize three-dimensional measurement data in which the orientation of the face is accurately corrected.

さらに、本発明の3次元計測装置で得た顔の3次元データは、セキュリティ、医療、介護、スポーツ、アート、服飾、ゲーム、アミューズメント、広告、その他これらに限定されない様々な用途に利用することができる。また、本発明では、人の顔に限らず、例えば動物の顔や、マネキンや人形、ロボット等人に類するものの顔についても適用することが可能である。   Furthermore, the three-dimensional data of the face obtained by the three-dimensional measuring apparatus of the present invention can be used for security, medical care, nursing care, sports, art, clothing, games, amusement, advertising, and various other uses not limited to these. it can. Further, the present invention can be applied not only to human faces but also to human faces such as animal faces, mannequins, dolls, and robots.

1A 3次元計測装置
1B 3次元計測装置
1C 3次元計測装置
2 データ通信用ケーブル
3 ネットワーク
10 顔向き検出装置
11 ステレオカメラ(画像データ取得手段)
11L 左カメラ
11R 右カメラ
12 プロジェクタ
13 カメラ制御基板
20 顔向き検出用端末
21 顔向き検出プログラム
22 CPU
22a 顔領域判別部(顔領域判別手段)
22b 鼻位置検出部(鼻位置検出手段)
22c 鼻位置ずれ量判定部(鼻位置ずれ量判定手段)
22d 比較領域設定部(比較領域設定手段)
22e 角度算出部(角度算出手段)
30 3次元データ処理装置
31 3次元データ処理用端末
32 記憶装置
33 3次元データ処理プログラム
40 統合端末
41 ディスプレイ
AF 顔領域
AN 鼻領域(鼻位置)
AU 比較領域
AD 比較領域
AL 比較領域
AR 比較領域
CF 中央線
D 鼻比較領域間距離
DA 標準鼻比較領域間距離
LAL 画素距離平均値
LAR 画素距離平均値
M 被撮影者
O1 操作者
O2 操作者
PL 距離画像(距離情報)
1A 3D measurement device 1B 3D measurement device 1C 3D measurement device 2 Data communication cable 3 Network 10 Face orientation detection device 11 Stereo camera (image data acquisition means)
11L Left camera 11R Right camera 12 Projector 13 Camera control board 20 Face orientation detection terminal 21 Face orientation detection program 22 CPU
22a Face area discriminating section (face area discriminating means)
22b Nose position detection unit (nasal position detection means)
22c Nose position deviation amount determination unit (nasal position deviation amount determination means)
22d Comparison area setting section (comparison area setting means)
22e Angle calculation unit (angle calculation means)
30 three-dimensional data processing device 31 three-dimensional data processing terminal 32 storage device 33 three-dimensional data processing program 40 integrated terminal 41 display AF face area AN nose area (nose position)
AU comparison area AD comparison area AL comparison area AR comparison area CF center line D nose comparison area distance DA standard nose comparison area distance LAL pixel distance average value LAR pixel distance average value M subject O1 operator O2 operator PL distance Image (distance information)

Claims (8)

顔を撮影して、画素毎に画素値情報と距離情報とを含む画像データを取得する画像データ取得手段と、
上記画素値情報を用いて顔領域を判別する顔領域判別手段と、
上記距離情報を用いて上記顔領域に存在する鼻位置を検出する鼻位置検出手段と、
上記顔領域内に上記鼻位置に対する複数の比較領域を設定する比較領域設定手段と、
上記鼻位置の距離情報に対する上記複数の各比較領域の距離情報の差分である各差分情報に基づいて撮像方向に対する顔向きの角度を算出する角度算出手段とを備えていることを特徴とする顔向き検出装置。
Image data acquisition means for capturing a face and acquiring image data including pixel value information and distance information for each pixel;
Face area discrimination means for discriminating a face area using the pixel value information;
Nose position detecting means for detecting a nose position existing in the face region using the distance information;
Comparison area setting means for setting a plurality of comparison areas for the nose position in the face area;
An angle calculating unit that calculates an angle of the face direction with respect to the imaging direction based on each difference information that is a difference of distance information of each of the plurality of comparison regions with respect to the distance information of the nose position. Orientation detection device.
前記鼻位置検出手段は、前記顔領域内において、画像データ取得手段との距離値が最も小さい位置を含む領域を鼻位置として検出することを特徴とする請求項1記載の顔向き検出装置。   2. The face orientation detection apparatus according to claim 1, wherein the nose position detection unit detects an area including a position having a smallest distance value with respect to the image data acquisition unit in the face area as a nose position. 前記比較領域設定手段は、前記鼻位置を基準とした前記複数の比較領域のそれぞれの位置を算出して該鼻位置から離れた位置に該複数の比較領域を設定することを特徴とする請求項1又は2記載の顔向き検出装置。   The comparison area setting means calculates the position of each of the plurality of comparison areas based on the nose position, and sets the plurality of comparison areas at positions away from the nose position. The face orientation detection apparatus according to 1 or 2. 前記比較領域設定手段は、前記鼻位置を通りかつ前記顔領域を左右に分割する中央線を中心として各比較領域の位置関係が左右対称となる位置に前記複数の比較領域を設定することを特徴とする請求項1,2,又は3記載の顔向き検出装置。   The comparison area setting means sets the plurality of comparison areas at positions where the positional relationship of the comparison areas is symmetrical with respect to a center line passing through the nose position and dividing the face area into left and right. The face orientation detection device according to claim 1, 2, or 3. 前記顔領域を左右に分割する中央線と前記鼻位置の中心位置との距離が閾値以上か否かを判定する鼻位置ずれ量判定手段がさらに設けられていることを特徴とする請求項1〜4のいずれか1項に記載の顔向き検出装置。   The nasal position deviation amount determination means for determining whether or not a distance between a center line that divides the face region into left and right and a center position of the nose position is equal to or greater than a threshold value. 5. The face orientation detection device according to any one of 4 above. 前記鼻位置ずれ量判定手段は、前記顔領域の中央線と前記鼻位置の中心位置との距離が閾値以上か否かの判定を、前記角度算出手段による顔向きの角度の算出前に行うことを特徴とする請求項5記載の顔向き検出装置。   The nose position deviation amount determining means determines whether the distance between the center line of the face area and the center position of the nose position is equal to or greater than a threshold before calculating the angle of the face direction by the angle calculating means. The face orientation detection device according to claim 5. 前記鼻位置検出手段、比較領域設定手段及び角度算出手段のうちの少なくとも一つは、前記顔領域判別手段にて検出した顔領域の大きさに応じて、鼻位置検出手段、比較領域設定手段又は角度算出手段で用いるパラメータを変更するようになっていることを特徴とする請求項1〜6のいずれか1項に記載の顔向き検出装置。   At least one of the nose position detection unit, the comparison region setting unit, and the angle calculation unit is a nose position detection unit, a comparison region setting unit, or a detection unit according to the size of the face region detected by the face region determination unit. The face orientation detection device according to claim 1, wherein a parameter used in the angle calculation means is changed. 請求項1〜7のいずれか1項に記載の顔向き検出装置と、
上記顔向き検出装置の角度算出手段にて求めた前記顔向きの角度に基づいて、顔の向きを補正した3次元計測データを生成する3次元データ処理装置とを備えていることを特徴とする3次元計測装置。
The face orientation detection device according to any one of claims 1 to 7,
And a three-dimensional data processing device for generating three-dimensional measurement data in which the orientation of the face is corrected based on the angle of the face orientation obtained by the angle calculating means of the face orientation detecting device. Three-dimensional measuring device.
JP2013247492A 2013-11-29 2013-11-29 Face direction detection device and three-dimensional measurement device Pending JP2015106252A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2013247492A JP2015106252A (en) 2013-11-29 2013-11-29 Face direction detection device and three-dimensional measurement device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2013247492A JP2015106252A (en) 2013-11-29 2013-11-29 Face direction detection device and three-dimensional measurement device

Publications (1)

Publication Number Publication Date
JP2015106252A true JP2015106252A (en) 2015-06-08

Family

ID=53436323

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2013247492A Pending JP2015106252A (en) 2013-11-29 2013-11-29 Face direction detection device and three-dimensional measurement device

Country Status (1)

Country Link
JP (1) JP2015106252A (en)

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20180137193A (en) * 2017-06-16 2018-12-27 현대모비스 주식회사 Apparatus for adjusting display position of head up display and method thereof
CN109716378A (en) * 2016-09-27 2019-05-03 索尼公司 Information Collection System, electronic shelf label, electronics POP and character information show equipment
CN110135391A (en) * 2019-05-25 2019-08-16 塞伯睿机器人技术(长沙)有限公司 System is matched using the program and spectacle-frame of computer apolegamy spectacle-frame
CN110309782A (en) * 2019-07-02 2019-10-08 四川大学 It is a kind of based on infrared with visible light biocular systems living body faces detection methods
JP2019179386A (en) * 2018-03-30 2019-10-17 Necソリューションイノベータ株式会社 Face direction detection device, face direction detection method, and program
JP2019220130A (en) * 2018-06-15 2019-12-26 カシオ計算機株式会社 Image processor, image-processing method, and image-processing program
CN111062965A (en) * 2019-12-26 2020-04-24 西华大学 Low-complexity double-threshold multi-resolution mouth detection method based on assembly line
CN111160291A (en) * 2019-12-31 2020-05-15 上海易维视科技有限公司 Human eye detection method based on depth information and CNN
CN114419718A (en) * 2022-03-10 2022-04-29 荣耀终端有限公司 Electronic equipment and face recognition method
CN115331292A (en) * 2022-08-17 2022-11-11 武汉元紫东科技有限公司 Facial image-based emotion recognition method and device and computer storage medium
US11869213B2 (en) 2020-01-17 2024-01-09 Samsung Electronics Co., Ltd. Electronic device for analyzing skin image and method for controlling the same

Cited By (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109716378A (en) * 2016-09-27 2019-05-03 索尼公司 Information Collection System, electronic shelf label, electronics POP and character information show equipment
CN109716378B (en) * 2016-09-27 2023-09-01 索尼公司 Information collection system, electronic shelf label, electronic POP advertisement device and character information display device
KR20180137193A (en) * 2017-06-16 2018-12-27 현대모비스 주식회사 Apparatus for adjusting display position of head up display and method thereof
KR102320511B1 (en) * 2017-06-16 2021-11-02 현대모비스 주식회사 Apparatus for adjusting display position of head up display and method thereof
JP2019179386A (en) * 2018-03-30 2019-10-17 Necソリューションイノベータ株式会社 Face direction detection device, face direction detection method, and program
JP7248266B2 (en) 2018-03-30 2023-03-29 Necソリューションイノベータ株式会社 FACE POSITION DETECTION DEVICE, FACE POSITION DETECTION METHOD, AND PROGRAM
JP7110899B2 (en) 2018-06-15 2022-08-02 カシオ計算機株式会社 Image processing device, image processing method, and image processing program
JP2019220130A (en) * 2018-06-15 2019-12-26 カシオ計算機株式会社 Image processor, image-processing method, and image-processing program
CN110135391A (en) * 2019-05-25 2019-08-16 塞伯睿机器人技术(长沙)有限公司 System is matched using the program and spectacle-frame of computer apolegamy spectacle-frame
CN110309782A (en) * 2019-07-02 2019-10-08 四川大学 It is a kind of based on infrared with visible light biocular systems living body faces detection methods
CN110309782B (en) * 2019-07-02 2022-05-03 四川大学 Living body face detection method based on infrared and visible light binocular system
CN111062965B (en) * 2019-12-26 2023-01-17 西华大学 Low-complexity double-threshold multi-resolution mouth detection method based on assembly line
CN111062965A (en) * 2019-12-26 2020-04-24 西华大学 Low-complexity double-threshold multi-resolution mouth detection method based on assembly line
CN111160291A (en) * 2019-12-31 2020-05-15 上海易维视科技有限公司 Human eye detection method based on depth information and CNN
CN111160291B (en) * 2019-12-31 2023-10-31 上海易维视科技有限公司 Human eye detection method based on depth information and CNN
US11869213B2 (en) 2020-01-17 2024-01-09 Samsung Electronics Co., Ltd. Electronic device for analyzing skin image and method for controlling the same
CN114419718A (en) * 2022-03-10 2022-04-29 荣耀终端有限公司 Electronic equipment and face recognition method
CN114419718B (en) * 2022-03-10 2022-08-02 荣耀终端有限公司 Electronic equipment and face recognition method
CN115331292A (en) * 2022-08-17 2022-11-11 武汉元紫东科技有限公司 Facial image-based emotion recognition method and device and computer storage medium

Similar Documents

Publication Publication Date Title
JP2015106252A (en) Face direction detection device and three-dimensional measurement device
JP6025690B2 (en) Information processing apparatus and information processing method
CN107273846B (en) Human body shape parameter determination method and device
US20160350975A1 (en) Information processing apparatus, information processing method, and storage medium
US9542755B2 (en) Image processor and image processing method
WO2014083721A1 (en) Information processing device and information processing method
JP2015088096A (en) Information processor and information processing method
US20140254939A1 (en) Apparatus and method for outputting information on facial expression
JP2015088095A (en) Information processor and information processing method
EP2870428A1 (en) 3-d scanning and positioning system
JP2015088098A (en) Information processor and information processing method
JP2011254411A (en) Video projection system and video projection program
JP6722878B2 (en) Face recognition device
GB2504711A (en) Pose-dependent generation of 3d subject models
TWI637288B (en) Image processing method and system for eye-gaze correction
WO2017187694A1 (en) Region of interest image generating device
JP4729188B2 (en) Gaze detection device
JP6942566B2 (en) Information processing equipment, information processing methods and computer programs
KR20210027028A (en) Body measuring device and controlling method for the same
KR20180000696A (en) A method and apparatus for creating a pair of stereoscopic images using least one lightfield camera
JP2004062393A (en) Method and device for determining attention
JP6098133B2 (en) Face component extraction device, face component extraction method and program
JP2019027882A (en) Object distance detector
US20210400234A1 (en) Information processing apparatus, information processing method, and program
JP2015156540A (en) Image processing device, image processing method, and image processing program