JP2001209796A - Image processor, area extracting method and recording medium - Google Patents

Image processor, area extracting method and recording medium

Info

Publication number
JP2001209796A
JP2001209796A JP2000017003A JP2000017003A JP2001209796A JP 2001209796 A JP2001209796 A JP 2001209796A JP 2000017003 A JP2000017003 A JP 2000017003A JP 2000017003 A JP2000017003 A JP 2000017003A JP 2001209796 A JP2001209796 A JP 2001209796A
Authority
JP
Japan
Prior art keywords
area
image
processing
region
skin
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
JP2000017003A
Other languages
Japanese (ja)
Inventor
Shinichi Ban
慎一 伴
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.)
Minolta Co Ltd
Original Assignee
Minolta Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Minolta Co Ltd filed Critical Minolta Co Ltd
Priority to JP2000017003A priority Critical patent/JP2001209796A/en
Publication of JP2001209796A publication Critical patent/JP2001209796A/en
Pending legal-status Critical Current

Links

Landscapes

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

Abstract

PROBLEM TO BE SOLVED: To appropriately extract a skin area from the two-dimensional color picture of a human head part. SOLUTION: A sampling area DB1 definitely included in the skin area of the color image DC1 is beforehand extracted on the basis of a distance image DS showing the three-dimensional shape of the human bead part in the color image DC1. A typical skin color is calculated from the pixel value of the area DB1, and a temporary skin area DB2 is calculated from the image DC1 by using the skin color. Further, an illumination state is estimated from the shape shown by the distance image DS and the pixel value in the area DB2 of the image DC1. Then, the pixel value of a pixel having corresponding distance data in the image DC1 is corrected into a pixel value that is not affected by the change of the illumination state due to the shape of the head part. An appropriate skin area DB3 is subsequently extracted by using the corrected color image DC2 and extracting a skin area again.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】この発明は、2次元画像から
領域抽出を行う技術に関する。
The present invention relates to a technique for extracting a region from a two-dimensional image.

【0002】[0002]

【従来の技術】従来より、対象物の2次元のカラー画像
から所定の領域を抽出する研究がなされている。その一
つの手法として、抽出したい領域の代表的な色を予め求
めておき、この代表的な色に近い色を有する領域を抽出
するという手法がある。
2. Description of the Related Art Hitherto, studies have been made on extracting a predetermined area from a two-dimensional color image of an object. As one of the methods, there is a method in which a representative color of a region to be extracted is obtained in advance, and a region having a color close to the representative color is extracted.

【0003】[0003]

【発明が解決しようとする課題】ところが、対象物上の
同一の色を有する領域であっても対象物の3次元的な形
状により照明による陰影の状態が異なるため、カラー画
像には様々な色や明るさとして現れる。その結果、カラ
ー画像の適切な領域分割が困難となる。
However, even in an area having the same color on the object, the state of the shadow caused by the illumination is different depending on the three-dimensional shape of the object. And appear as brightness. As a result, it becomes difficult to appropriately divide a color image into regions.

【0004】例えば、人物の頭部のカラー画像から肌の
領域を抽出する場合において、代表的な肌の色に近い色
を有する領域を肌の領域として抽出するのみでは、照明
状態によっては適切に肌の領域を抽出できない場合があ
る。対象物(すなわち、頭部)上の肌の領域の各部分は
カメラから見て様々な方向を向いており、肌という同質
の領域であっても照明による陰影の影響により様々な色
や明るさを呈するからである。特に顎の下部では肌とし
て認識されないという影響が顕著に現れる。その結果、
単純に所定の肌の色に近い色を有する領域を肌の領域と
して抽出したとしても実際の肌の領域の一部しか抽出さ
れないという現象が生じる。
For example, in extracting a skin region from a color image of a person's head, if only a region having a color close to a representative skin color is extracted as a skin region, it may not be appropriate depending on lighting conditions. There are cases where skin regions cannot be extracted. Each part of the skin area on the object (that is, the head) is oriented in various directions when viewed from the camera. Even in the same area of the skin, various colors and brightness are affected by the shadows caused by lighting. This is because In particular, the effect that the skin is not recognized as the skin in the lower part of the chin appears remarkably. as a result,
Even if a region having a color close to a predetermined skin color is simply extracted as a skin region, a phenomenon occurs in which only a part of the actual skin region is extracted.

【0005】この発明は上記課題に鑑みなされたもので
あり、対象物の形状を考慮することにより2次元画像か
らの領域抽出を適切に行うことを目的としている。
The present invention has been made in view of the above problems, and has as its object to appropriately perform region extraction from a two-dimensional image by considering the shape of an object.

【0006】[0006]

【課題を解決するための手段】請求項1の発明は、互い
に対応付け可能な2次元画像および3次元画像を用いて
前記2次元画像から領域抽出を行う画像処理装置であっ
て、前記3次元画像が示す対象物の形状に基づいて前記
2次元画像中の処理領域の画素値を補正する手段と、補
正された前記処理領域から領域抽出を行う手段とを備え
る。
According to a first aspect of the present invention, there is provided an image processing apparatus for extracting a region from a two-dimensional image by using a two-dimensional image and a three-dimensional image which can be associated with each other. The image processing apparatus includes means for correcting a pixel value of a processing area in the two-dimensional image based on a shape of an object indicated by the image, and means for extracting an area from the corrected processing area.

【0007】請求項2の発明は、請求項1に記載の画像
処理装置であって、前記画素値を補正する手段が、前記
対象物への照明状態を推定する手段と、推定された前記
照明状態に基づいて前記処理領域の画素値を前記対象物
の形状から独立した画素値へと補正する手段とを有す
る。
According to a second aspect of the present invention, in the image processing apparatus according to the first aspect, the means for correcting the pixel value includes a means for estimating an illumination state of the object, and the estimated illumination. Means for correcting the pixel value of the processing area to a pixel value independent of the shape of the object based on the state.

【0008】請求項3の発明は、請求項2に記載の画像
処理装置であって、前記2次元画像が取得された際の視
線方向に対してほぼ垂直となる前記対象物上の領域に基
づいて前記2次元画像中の参照領域を決定する手段と、
前記参照領域の画素値から基準画素値を求める手段と、
前記基準画素値に基づいて前記2次元画像から仮領域を
抽出する手段とをさらに備え、前記照明状態を推定する
手段が、前記2次元画像の前記仮領域内の画素値および
当該仮領域に対応する前記対象物上の領域の形状に基づ
いて前記照明状態を推定する。
According to a third aspect of the present invention, there is provided the image processing apparatus according to the second aspect, wherein the image processing apparatus is based on an area on the object that is substantially perpendicular to a line of sight when the two-dimensional image is acquired. Means for determining a reference area in the two-dimensional image by
Means for determining a reference pixel value from the pixel value of the reference area,
Means for extracting a temporary area from the two-dimensional image based on the reference pixel value, wherein the means for estimating the illumination state corresponds to the pixel value in the temporary area of the two-dimensional image and the temporary area. The illumination state is estimated based on the shape of the region on the object to be processed.

【0009】請求項4の発明は、請求項1ないし3のい
ずれかに記載の画像処理装置であって、前記対象物が人
物の頭部を含み、前記領域抽出を行う手段が前記頭部の
肌領域を抽出する。
According to a fourth aspect of the present invention, in the image processing apparatus according to any one of the first to third aspects, the object includes a head of a person, and the means for extracting the area includes a head of the head. Extract skin area.

【0010】請求項5の発明は、互いに対応付け可能な
2次元画像および3次元画像を用いて前記2次元画像か
ら領域抽出を行う領域抽出方法であって、前記3次元画
像が示す対象物の形状に基づいて前記2次元画像中の処
理領域の画素値を補正する工程と、補正された前記処理
領域から領域抽出を行う工程とを有する。
A fifth aspect of the present invention is an area extracting method for extracting an area from the two-dimensional image using a two-dimensional image and a three-dimensional image which can be associated with each other, wherein the method comprises the steps of: The method includes a step of correcting a pixel value of a processing area in the two-dimensional image based on a shape, and a step of extracting an area from the corrected processing area.

【0011】請求項6の発明は、互いに対応付け可能な
2次元画像および3次元画像を用いて前記2次元画像か
らの領域抽出をコンピュータに行わせるプログラムを記
録したコンピュータ読み取り可能な記録媒体であって、
前記プログラムは前記コンピュータに、前記3次元画像
が示す対象物の形状に基づいて前記2次元画像中の処理
領域の画素値を補正する工程と、補正された前記処理領
域から領域抽出を行う工程とを実行させる。
According to a sixth aspect of the present invention, there is provided a computer-readable recording medium storing a program for causing a computer to extract a region from a two-dimensional image using a two-dimensional image and a three-dimensional image which can be associated with each other. hand,
A step of correcting the computer to correct a pixel value of a processing area in the two-dimensional image based on a shape of an object indicated by the three-dimensional image; and a step of extracting an area from the corrected processing area. Is executed.

【0012】[0012]

【発明の実施の形態】<1.第1の実施の形態> <1−1.立体模型作成システムの構成>図1は立体模
型作成システム1の構成を示すブロック図である。立体
模型作成システム1は、人物の頭部形状を計測し、得ら
れたデータを処理してワークを切削加工するために必要
な加工用データを生成するモデリングシステム10と、
ワークを加工するために設けられた複数の加工機21〜
24とから構成されている。
DESCRIPTION OF THE PREFERRED EMBODIMENTS <1. First Embodiment><1-1. Configuration of Solid Model Creation System> FIG. 1 is a block diagram showing the configuration of a solid model creation system 1. A three-dimensional model creation system 1 that measures the shape of the head of a person, processes the obtained data, and generates machining data necessary for cutting the workpiece;
A plurality of processing machines 21 to 21 provided for processing a work
24.

【0013】モデリングシステム10は、撮影システム
30、データ処理装置40、CRTや液晶ディスプレイ
等の表示装置16、半導体メモリや磁気ディスク等の記
憶装置43、および、キーボードやマウス等の操作入力
装置44を備えて構成される。
The modeling system 10 includes a photographing system 30, a data processing device 40, a display device 16 such as a CRT or a liquid crystal display, a storage device 43 such as a semiconductor memory or a magnetic disk, and an operation input device 44 such as a keyboard and a mouse. It is configured with.

【0014】また、データ処理装置40はコンピュータ
としての機能を有するとともに読取装置45を介してC
D−ROMやメモリカード等の記録媒体9からプログラ
ムがデータ処理装置40へと読み出されるようになって
いる。そして、読み出されたプログラムに従ってデータ
処理装置40内のCPUが演算処理を行うことにより、
データ処理装置40によるデータ処理が実行される。な
お、データ処理装置40の全部または一部が専用の電気
的回路として構築されていてもよい。
The data processing device 40 has a function as a computer, and receives
The program is read from the recording medium 9 such as a D-ROM or a memory card to the data processing device 40. Then, the CPU in the data processing device 40 performs arithmetic processing according to the read program,
Data processing by the data processing device 40 is executed. Note that all or a part of the data processing device 40 may be configured as a dedicated electric circuit.

【0015】撮影システム30は、オリジナル物体であ
る利用客の外観(特に顔部分を含む頭部形状)を計測し
て、デジタルデータに変換(すなわち、データ化)する
機能を有しており、スリット光投影法で形状情報をデー
タ化して、いわゆる3次元形状データである3次元の距
離画像DSを出力する3次元計測装置34と、色情報を
データ化して平面的な2次元のカラー画像DCを出力す
る2次元撮影装置36と、コントローラ38とを備えて
いる。なお、3次元計測法として、スリット光投影法に
代えて他の手法を用いてもよい。
The photographing system 30 has a function of measuring the appearance (particularly, the shape of the head including the face) of a user who is an original object, and converting it into digital data (that is, converting it into data). A three-dimensional measuring device 34 that converts the shape information into data by the light projection method and outputs a three-dimensional distance image DS that is so-called three-dimensional shape data, and a two-dimensional color image DC that converts the color information into data. A two-dimensional photographing device 36 for outputting and a controller 38 are provided. As a three-dimensional measurement method, another method may be used instead of the slit light projection method.

【0016】ここで、3次元の距離画像DSはXYZの
直交座標系における座標値として与えられる画像データ
であり、3次元計測装置34内の計測基準点から対象物
(人物の頭部)の当該計測点までの距離情報を与えるも
のである。3次元計測装置34は、対象物に照明光を照
射し、その反射光を受光することによって、計測点まで
の距離情報を求める装置であるが、反射光が受光できな
い場合には計測データが得られない。このため、距離画
像DSには計測データが得られたか否かを示す有効フラ
グの情報も含まれる。
Here, the three-dimensional distance image DS is image data given as coordinate values in an XYZ rectangular coordinate system, and is obtained from a measurement reference point in the three-dimensional measuring device 34 to a target object (person's head). It gives the distance information to the measurement point. The three-dimensional measuring device 34 is a device that irradiates an object with illumination light and receives the reflected light to obtain information on the distance to the measurement point. However, when the reflected light cannot be received, measurement data is obtained. I can't. For this reason, the distance image DS also includes information of a valid flag indicating whether measurement data has been obtained.

【0017】他方、2次元のカラー画像DCの各画素の
画素値は3原色データ、すなわち、R(レッド)、G
(グリーン)、B(ブルー)の値により構成される。例
えば、撮影システム30を特開平9−145319号公
報に開示されている3次元カメラを用いて構成するとき
には、3次元計測と2次元撮影とを同一視点から行うこ
とができるため、距離画像DSとカラー画像DCとの対
応付けを極めて容易に行うことができる。
On the other hand, the pixel value of each pixel of the two-dimensional color image DC is three primary color data, that is, R (red), G
(Green) and B (blue). For example, when the imaging system 30 is configured using the three-dimensional camera disclosed in Japanese Patent Application Laid-Open No. 9-145319, since the three-dimensional measurement and the two-dimensional imaging can be performed from the same viewpoint, the distance image DS The association with the color image DC can be performed very easily.

【0018】この実施の形態では、2次元のカラー画像
DCと3次元の距離画像DSとは、同じ画素数の画素デ
ータから構成されており、同じ指数(座標値)を示す画
素が互いに対応付けされているものとする。このため、
一方の画像において領域または画素が特定されると、他
方の画像においてそれに対応する領域または画素を特定
することが可能になっている。
In this embodiment, the two-dimensional color image DC and the three-dimensional distance image DS are composed of pixel data of the same number of pixels, and pixels having the same index (coordinate value) are associated with each other. It is assumed that For this reason,
When an area or a pixel is specified in one image, it is possible to specify a corresponding area or pixel in the other image.

【0019】また、3次元計測と2次元撮影とをそれぞ
れ異なる視点で行った場合でも、距離画像DSおよびカ
ラー画像DCにはそれぞれ視点情報が付加されており、
かつ、3次元計測結果と2次元撮影結果との座標の相対
関係は既知であるため、距離画像DSおよびカラー画像
DCとの対応付けを支障なく行うことができる。このよ
うな距離画像DSおよびカラー画像DCは、画像データ
としてデータ処理装置40に入力される。
Even when the three-dimensional measurement and the two-dimensional imaging are performed from different viewpoints, the viewpoint information is added to the distance image DS and the color image DC, respectively.
In addition, since the relative relationship between the coordinates of the three-dimensional measurement result and the coordinates of the two-dimensional imaging result is known, the correspondence between the distance image DS and the color image DC can be performed without any trouble. Such a distance image DS and a color image DC are input to the data processing device 40 as image data.

【0020】なお、以下の説明における画像に対する処
理は、モデリングシステム10(特に、データ処理装置
40)において画像データに対して演算処理が行われる
ことにより実現される処理である。
The processing for an image in the following description is a processing realized by performing an arithmetic processing on image data in the modeling system 10 (particularly, the data processing device 40).

【0021】データ処理装置40は、距離画像DSおよ
びカラー画像DCを取り込んで画像処理等の種々のデー
タ処理を行うことにより、各加工機21〜24において
ワークを加工する際に必要となる加工用データを生成し
て記憶装置43内に所定のファイル名を付して記憶して
おくように構成されている。
The data processing device 40 captures the distance image DS and the color image DC and performs various data processing such as image processing, so that each of the processing machines 21 to 24 performs processing required for processing a workpiece. The data is generated and stored in the storage device 43 with a predetermined file name.

【0022】また、データ処理装置40の内部にはコン
トローラ42が設けられている。コントローラ42は、
撮影システム30内のコントローラ38に接続され、撮
影システム30におけるカラー画像の撮影や3次元形状
の計測のための制御信号が与えられる。また、コントロ
ーラ42は、操作入力装置44および表示装置16に接
続され、操作入力装置44からの入力に応じた動作を行
い、また、表示装置16における表示内容を変更する。
A controller 42 is provided inside the data processing device 40. The controller 42
It is connected to a controller 38 in the photographing system 30, and receives control signals for photographing a color image and measuring a three-dimensional shape in the photographing system 30. Further, the controller 42 is connected to the operation input device 44 and the display device 16, performs an operation according to the input from the operation input device 44, and changes the display content on the display device 16.

【0023】さらに、コントローラ42は、複数の加工
機21〜24と通信可能なように接続されており、各加
工機21〜24に対してコマンドを送出することによっ
て各加工機21〜24における加工動作を指示するとと
もに、各加工機21〜24の状態を監視するように構成
されている。すなわち、データ処理装置40のコントロ
ーラ42は、立体模型作成システム1の全体的な制御お
よび管理を行うように構成されている。
Further, the controller 42 is communicably connected to the plurality of processing machines 21 to 24, and sends commands to the processing machines 21 to 24 to execute processing in each of the processing machines 21 to 24. The operation is instructed, and the state of each of the processing machines 21 to 24 is monitored. That is, the controller 42 of the data processing device 40 is configured to perform overall control and management of the three-dimensional model creation system 1.

【0024】また、各加工機21〜24は、当該加工機
の特性データを記憶しておくための記憶装置171、樹
脂や金属等の材料で形成されたブロック形状やコイン形
状等のワークを切削加工する加工装置172、当該加工
機で加工中の加工データに対応するカラー画像や当該加
工機の状態を表示するための表示装置173、ワーク取
付け位置から加工位置へのワークの供給と加工品の取出
口への搬送を行う材料供給装置174、モデリングシス
テム10のコントローラ42からのコマンドに応じて当
該加工機内部の各装置を制御したり、モデリングシステ
ム10のコントローラ42へのステータスの返信を行う
コントローラ176、および、外部出力端子177を備
えている。
Each of the processing machines 21 to 24 has a storage device 171 for storing characteristic data of the processing machine, and cuts a block-shaped or coin-shaped workpiece formed of a material such as resin or metal. A processing device 172 for processing, a display device 173 for displaying a color image corresponding to the processing data being processed by the processing machine and a state of the processing machine, supply of the work from the work mounting position to the processing position, and processing of the processed product. A material supply device 174 that conveys to the outlet, a controller that controls each device inside the processing machine in response to a command from the controller 42 of the modeling system 10, and returns a status to the controller 42 of the modeling system 10. 176 and an external output terminal 177.

【0025】なお、加工装置172には、ワークを切削
加工する際に用いるエンドミル等の工具、工具の原点位
置等を検出するためのセンサ、ワークを切削加工する際
に発生する切粉(ゴミ)を蓄積するための切粉容器等が
設けられているが、これらについては図示を省略してい
る。
The processing device 172 includes a tool such as an end mill used for cutting the work, a sensor for detecting the origin position of the tool, etc., and chips (dust) generated when the work is cut. There is provided a swarf container or the like for accumulating, but these are not shown.

【0026】以上のように、立体模型作成システム1は
1台のモデリングシステム10に複数の加工機21〜2
4を接続した構成となっており、モデリングシステム1
0は各加工機21〜24に対してコマンドの送信と、ス
テータスの受信による各加工機21〜24の状態管理を
行うのみであり、各加工機21〜24においてワークを
加工する際の動作制御は各加工機内のコントローラ17
6に一任するようになっている。
As described above, the three-dimensional model creation system 1 includes a plurality of processing machines 21 to 2 in one modeling system 10.
4 are connected, and the modeling system 1
0 is only for transmitting a command to each of the processing machines 21 to 24 and managing the state of each of the processing machines 21 to 24 by receiving a status. Is the controller 17 in each processing machine.
6 is up to you.

【0027】すなわち、立体模型作成システム1におけ
る対象物の計測・加工用データの生成・ワークの加工と
いった一連の動作のうち、対象物の計測および加工用デ
ータの生成をモデリングシステム10が担当し、ワーク
の加工を複数の加工機21〜24が担当する。これによ
り、ワークの加工と、次の計測動作やデータ処理とを並
列的に行うことができ、パイプライン処理を行うことが
可能になる。その結果、スループットの向上が図られ
る。
That is, in a series of operations such as measurement of an object, generation of processing data, and processing of a workpiece in the three-dimensional model creation system 1, the modeling system 10 is responsible for measurement of the object and generation of processing data. A plurality of processing machines 21 to 24 are in charge of processing the work. Thus, the processing of the work and the next measurement operation and data processing can be performed in parallel, and the pipeline processing can be performed. As a result, the throughput is improved.

【0028】なお、図1では、複数の加工機21〜24
がモデリングシステム10に接続されている構成例につ
いて示しているが、加工機の台数が1台であってもモデ
リングシステム10における計測処理やデータ処理と加
工機における加工とを並列的に行うことができるので、
並列処理を行わない場合に比べてスループットを向上さ
せることができることは勿論である。
In FIG. 1, a plurality of processing machines 21 to 24 are shown.
Shows a configuration example connected to the modeling system 10. However, even when the number of processing machines is one, measurement processing and data processing in the modeling system 10 and processing in the processing machines can be performed in parallel. So you can
Needless to say, the throughput can be improved as compared with the case where the parallel processing is not performed.

【0029】また、加工機21〜24においては、外部
出力端子177が設けられており、記憶装置43から取
得する加工用データに定義されている動作シーケンスに
基づいて、外部出力端子177をON/OFF制御する
ことができるように構成されている。例えば、外部出力
端子177にランプを接続しておくと、加工用データに
定義されている動作シーケンスに基づいて、ランプを点
灯させたり消灯させたりすることができる。
In each of the processing machines 21 to 24, an external output terminal 177 is provided. The external output terminal 177 is turned ON / OFF based on an operation sequence defined in the processing data acquired from the storage device 43. It is configured so that it can be turned off. For example, if a lamp is connected to the external output terminal 177, the lamp can be turned on and off based on the operation sequence defined in the processing data.

【0030】したがって、加工用データに定義される動
作シーケンスに外部出力をON/OFFするような制御
コードを付加しておくことで、利用客等に加工動作を開
始する加工機を特定させることができる。この結果、利
用客等は、複数の加工機21〜24のうちのどの加工機
に対してワークを取り付ければよいのかを容易に特定す
ることが可能になる。
Therefore, by adding a control code for turning on / off the external output to the operation sequence defined in the processing data, it is possible to make a user or the like specify a processing machine to start the processing operation. it can. As a result, the user or the like can easily specify which of the plurality of processing machines 21 to 24 the work should be attached to.

【0031】<1−2.モデリングシステムの動作>次
に、モデリングシステム10の全体動作について説明す
る。図2は、モデリングシステム10の動作を示すフロ
ーチャートである。
<1-2. Operation of Modeling System> Next, the overall operation of the modeling system 10 will be described. FIG. 2 is a flowchart showing the operation of the modeling system 10.

【0032】まず、図2に示すように、立体模型作成シ
ステム1に電源が投入されると、ステップS1に進み、
モデリングシステム10のコントローラ42は、各加工
機21〜24を適切に動作させるために必要な準備を行
う。具体的には、コントローラ42は、加工装置172
および材料供給装置174の原点復帰動作等の初期動作
を行わせるためのコマンドを各加工機21〜24に対し
て順番に送出し、各加工機21〜24に対して動作準備
を行わせる。
First, as shown in FIG. 2, when the power is turned on to the three-dimensional model creation system 1, the process proceeds to step S1.
The controller 42 of the modeling system 10 performs necessary preparations for appropriately operating each of the processing machines 21 to 24. Specifically, the controller 42 includes the processing device 172
In addition, a command for performing an initial operation such as a home return operation of the material supply device 174 is sequentially transmitted to each of the processing machines 21 to 24, and each of the processing machines 21 to 24 is prepared for operation.

【0033】そして、コントローラ42は、正常に準備
動作が終了しなかったステータスを受信すると、その加
工機の識別名称やエラーの生じた動作名等を表示装置1
6に表示して、利用客等にその内容を報知する。また、
コントローラ42は、正常に準備動作が終了しなかった
加工機を加工動作開始のためのコマンドを送出する対象
から排除する。これにより、正常に準備動作が終了しな
かった加工機が存在する場合であっても、立体模型作成
システム1を動作可能な状態にすることができる。
When the controller 42 receives the status indicating that the preparatory operation has not been completed normally, the controller 42 displays the identification name of the processing machine, the operation name in which an error has occurred, and the like.
6 to notify the user or the like of the contents. Also,
The controller 42 excludes the processing machine for which the preparatory operation has not been completed normally from a target to which a command for starting the processing operation is transmitted. Thereby, even if there is a processing machine for which the preparation operation has not been completed normally, the three-dimensional model creation system 1 can be made operable.

【0034】続いてステップS2に進み、モデリングシ
ステム10のコントローラ42は、接続されている各加
工機21〜24の状態を診断する。この診断は、モデリ
ングシステム10による監視動作の一種であり、各加工
機21〜24の記憶装置171に格納されている特性デ
ータを取得し、その内容を解析することによって行われ
る。特性データには、工具消耗用データ、切粉容量用デ
ータ、加工機消耗用データ、および、加工機機種・識別
名称データの4種類のデータが含まれている。
Subsequently, proceeding to step S2, the controller 42 of the modeling system 10 diagnoses the state of each of the connected processing machines 21 to 24. This diagnosis is a kind of monitoring operation by the modeling system 10, and is performed by acquiring characteristic data stored in the storage device 171 of each of the processing machines 21 to 24 and analyzing the contents. The characteristic data includes four types of data: tool consumption data, chip volume data, processing machine consumption data, and processing machine model / identification name data.

【0035】次に、ステップS3に進み、モデリングシ
ステム10は人物の頭部の計測を行い、複数の加工機2
1〜24のうちの1台に対して加工用コマンドを送信す
るための入出力処理が行われる。この入出力処理では、
メイン処理S31と通信制御S32と状態表示制御S3
3との3つの処理が行われ、これら3つの処理が互いに
タスクの要求を行っていくことで入出力処理(ステップ
S3)が進められる。
Next, proceeding to step S3, the modeling system 10 measures the head of the person, and
Input / output processing for transmitting a processing command to one of the devices 1 to 24 is performed. In this input / output processing,
Main processing S31, communication control S32, and state display control S3
3 are performed, and the input / output processing (step S3) proceeds by the three processings mutually requesting a task.

【0036】メイン処理S31では、頭部の計測、すな
わちデータの入力から加工用データの作成およびその加
工用データに基づいてワークの加工を行わせる加工機の
選択を行う。なお、このメイン処理S31は、立体模型
作成システム1が定常的に稼働する間は繰り返し行われ
る処理であり、所定の終了操作が行われない限りはこの
メイン処理S31が終了することはない。したがって、
例えば、ワークの連続的な加工を行う際には、このメイ
ン処理S31は繰り返し行われる。このメイン処理S3
1の詳細については後述する。
In the main process S31, the measurement of the head, that is, the creation of processing data from the input of data and the selection of a processing machine for processing the work based on the processing data are performed. Note that the main process S31 is a process that is repeatedly performed while the three-dimensional model creation system 1 is constantly operating, and the main process S31 does not end unless a predetermined end operation is performed. Therefore,
For example, when performing continuous processing of a workpiece, the main process S31 is repeatedly performed. This main processing S3
Details of 1 will be described later.

【0037】通信制御S32では、複数の加工機21〜
24との間でコマンドの送出およびステータスの受信と
いった通信が行われる。
In the communication control S32, a plurality of processing machines 21 to 21
Communication with the H.24, such as sending a command and receiving a status, is performed.

【0038】状態表示制御S33では、モデリングシス
テム10の表示装置16における、各加工機21〜24
が加工中であるか待機中であるかの表示の更新が行われ
る。
In the state display control S33, each of the processing machines 21 to 24 on the display device 16 of the modeling system 10 is controlled.
The display indicating whether the is being processed or is on standby is updated.

【0039】繰り返し行われるメイン処理(S31)の
終了が指示されると、入出力処理を抜けてステップS4
に進む。
When the end of the repeated main processing (S31) is instructed, the processing exits the input / output processing and proceeds to step S4.
Proceed to.

【0040】ステップS4では、再び各加工機21〜2
4の診断が行われる。このステップS4で行われる処理
は、ステップS2に示した診断処理と同様である。そし
て、診断の結果、異常があるときには、モデリングシス
テム10の表示装置16にその内容を表示して、メンテ
ナンスを促す。
In step S4, each processing machine 21-2
The diagnosis of No. 4 is performed. The processing performed in step S4 is the same as the diagnosis processing shown in step S2. If there is an abnormality as a result of the diagnosis, the content is displayed on the display device 16 of the modeling system 10 to prompt maintenance.

【0041】その後、ステップS5に進み、終了処理と
して、データ処理装置40における電源遮断のための準
備を行った後に、電源の切断が行われる。
Thereafter, the process proceeds to step S5, and as a termination process, after preparing for power-off in the data processing device 40, power-off is performed.

【0042】<1−3.メイン処理の詳細>次に、メイ
ン処理S31の詳細について説明する。図3はモデリン
グシステム10におけるメイン処理の動作を示すフロー
チャートである。
<1-3. Details of Main Processing> Next, details of the main processing S31 will be described. FIG. 3 is a flowchart showing the operation of the main processing in the modeling system 10.

【0043】図3に示すようにメイン処理S31では、
まず、2次元画像の表示が行われる(ステップS10
1)。ここでは、人物の頭部の位置決めを行うため、リ
アルタイム2次元キャプチャー画像の表示が行われる。
リアルタイム2次元キャプチャー画像は、顔等の頭部形
状のうち切削加工されるワークの形状のみが見えるよう
に画像枠が重ねられて表示される。図4は、このときの
表示画面を例示する図である。図4に示すように、表示
装置16の画面におけるメイン表示領域RAの画像枠表
示欄RA1には、ワークの外形に対応する画像枠231
が表示され、円形窓の内側には2次元キャプチャー画像
(図4では横顔の画像)が表示される。
As shown in FIG. 3, in the main process S31,
First, a two-dimensional image is displayed (step S10).
1). Here, a real-time two-dimensional captured image is displayed to position the head of the person.
The real-time two-dimensional capture image is displayed with an image frame superimposed so that only the shape of the workpiece to be cut out of the head shape such as a face is visible. FIG. 4 is a diagram illustrating a display screen at this time. As shown in FIG. 4, an image frame 231 corresponding to the outer shape of the work is displayed in the image frame display field RA1 of the main display area RA on the screen of the display device 16.
Is displayed, and a two-dimensional captured image (a profile image in FIG. 4) is displayed inside the circular window.

【0044】そして、ステップS102に進み、撮影操
作が行われたか否かを判断し、撮影操作が行われた場合
には、2次元撮影装置36による2次元のカラー画像D
Cの撮影が行われる(ステップS103)。この結果得
られるカラー画像DCはモデリングシステム10の撮影
システム30からデータ処理装置40の内部メモリに転
送される。また、このとき、図4に示す画像枠表示欄R
A1に表示される画像枠231内の画像はリアルタイム
2次元キャプチャー画像ではなくなり、撮影動作によっ
て得られたカラー画像DCが画像枠231内に表示され
る。
The flow advances to step S102 to determine whether or not a shooting operation has been performed. If the shooting operation has been performed, the two-dimensional color image D
Photographing of C is performed (step S103). The resulting color image DC is transferred from the imaging system 30 of the modeling system 10 to the internal memory of the data processing device 40. At this time, the image frame display field R shown in FIG.
The image in the image frame 231 displayed in A1 is not a real-time two-dimensional captured image, and the color image DC obtained by the shooting operation is displayed in the image frame 231.

【0045】次に、3次元計測装置34による3次元の
距離画像DSの計測が行われる(ステップS104)。
この結果得られる距離画像DSについてもカラー画像D
Cの場合と同様にデータ処理装置40の内部メモリに転
送される。
Next, the three-dimensional distance image DS is measured by the three-dimensional measuring device 34 (step S104).
The resulting distance image DS is also a color image D
The data is transferred to the internal memory of the data processing device 40 as in the case of C.

【0046】その後、ステップS105に進み、画像枠
位置調整、画像枠サイズ調整、背景領域の編集、肌領域
の編集等の各種の編集処理が行われる。図5はこの編集
処理の詳細を示すフローチャートである。
Thereafter, the flow advances to step S105 to perform various editing processes such as image frame position adjustment, image frame size adjustment, background region editing, and skin region editing. FIG. 5 is a flowchart showing details of the editing process.

【0047】図5に示すように、編集処理(ステップS
105)では、まず、確認画像の表示が行われる(ステ
ップS201)。この確認画像の表示では、例えば、距
離画像DSの3次元計測が正常に行われた画素を「白」
とし、正常に行われなかった画素を「黒」とした2次元
の2値画像を作成し、これを表示装置16に表示する。
As shown in FIG. 5, the editing process (step S
In 105), first, a confirmation image is displayed (step S201). In the display of the confirmation image, for example, the pixel for which the three-dimensional measurement of the distance image DS has been normally performed is set to “white”.
Then, a two-dimensional binary image in which the pixels that have not been normally performed are set to “black” is created and displayed on the display device 16.

【0048】図6は、このときの表示画面を示す図であ
る。図6に示すように、表示装置16の画面におけるガ
イダンス表示欄RA2に3次元計測が正常に行われたか
否かを示す確認用画像251が表示され、また、ガイダ
ンス表示欄RA2の右下位置には、再撮影および再計測
を行うための再撮影ボタンが252が表示される。
FIG. 6 shows a display screen at this time. As shown in FIG. 6, a confirmation image 251 indicating whether or not the three-dimensional measurement has been normally performed is displayed in the guidance display field RA2 on the screen of the display device 16, and is displayed at the lower right position of the guidance display field RA2. , A re-photographing button 252 for performing re-photographing and re-measurement is displayed.

【0049】利用客等は、確認用画像251を参照する
ことにより、ワークを加工する際に必要な部分が正常に
3次元計測できているか否かを判断することができる。
そして、正常に3次元計測できていないと判断したとき
には、マウス等の操作入力装置44を操作して再撮影ボ
タン252を押すことで、図3に示す2次元画像の表示
(ステップS101)まで処理を戻すことができる。
By referring to the confirmation image 251, a customer or the like can determine whether or not a part necessary for processing a workpiece can be normally measured three-dimensionally.
When it is determined that the three-dimensional measurement has not been performed normally, the operation input device 44 such as a mouse is operated and the re-photographing button 252 is pressed to display the two-dimensional image shown in FIG. 3 (step S101). Can be returned.

【0050】また、この確認画像の表示(ステップS2
01)を行うときに、撮影および計測の対象物である利
用客等が撮影時に動いたか否かを示すようにしてもよ
い。3次元計測装置34で距離画像DSを得る際には、
光のスキャニング等のために対象物が一定時間(例え
ば、0.6秒程度)静止している必要がある。この間に
対象物が移動すると、正確な3次元形状の計測ができて
いないことになるからである。
The confirmation image is displayed (step S2).
When performing 01), it may be possible to indicate whether or not a user or the like, which is an object of photography and measurement, has moved during photography. When obtaining the distance image DS with the three-dimensional measuring device 34,
The object needs to be stationary for a certain period of time (for example, about 0.6 seconds) for light scanning or the like. This is because if the target moves during this time, accurate three-dimensional shape measurement cannot be performed.

【0051】次に、ステップS202に進み、輪郭切取
り操作が行われる。輪郭切取り操作では、利用客等が表
示装置16に表示される画像枠表示欄RA1の画像枠2
31の位置調整と画像枠231のサイズ調整が行われ
る。
Next, the process proceeds to step S202, where an outline cutting operation is performed. In the contour cutting operation, the user and the like are displayed in the image frame 2 in the image frame display field RA1 displayed on the display device 16.
31 and the size of the image frame 231 are adjusted.

【0052】その後、ステップS203に進み、背景領
域の表示が行われる。背景領域は、2次元のカラー画像
を入力する際に人物頭部の背景側に設けられた背景幕
(ブルーバック)の色成分を予め測定しておくことによ
り特定できる。つまり、予め測定されたブルーバックの
色成分(RGB値)とカラー画像DCの各画素ごとの色
成分(RGB値)とを比較することにより、カラー画像
DC中から背景領域を推定することができる。
Thereafter, the flow advances to step S203 to display a background area. The background area can be specified by measuring in advance the color components of a background curtain (blue back) provided on the background side of the human head when a two-dimensional color image is input. That is, the background area can be estimated from the color image DC by comparing the previously measured color component (RGB value) of the blue background with the color component (RGB value) of each pixel of the color image DC. .

【0053】なお、予め背景幕であると保証されている
領域(例えば、カラー画像DCの左右の上隅の領域)の
色から、背景領域と判断すべき領域の色を求めるように
なっていてもよい。
It should be noted that the color of the area to be determined as the background area is obtained from the color of the area which is guaranteed to be the background curtain (for example, the area at the upper left and right corners of the color image DC). Is also good.

【0054】そして、推定された背景領域を利用客等に
視認させるために、推定された背景領域に対して特殊処
理が施された2次元のカラー画像が画像枠231内に表
示される。特殊処理としては、例えば、撮影システム3
0から得られた2次元カラー画像において背景領域であ
ると推定された画素のRGB値に対して所定のオフセッ
ト用RGB値を加減することが行われる。このような特
殊処理を施すのは、モデリングシステム10が背景領域
を正確に認識しているか否かを利用客等に示すためであ
る。これにより、カラー画像のうち背景領域と認識され
た領域が、例えば、赤味を帯びたように(赤いフィルタ
をかぶせたように)表示され、利用客が抽出された背景
領域を容易に認識することが可能となる。
Then, a two-dimensional color image obtained by performing special processing on the estimated background region is displayed in the image frame 231 in order to make the estimated background region visible to the user or the like. As the special processing, for example, the photographing system 3
In the two-dimensional color image obtained from 0, a predetermined offset RGB value is added to or subtracted from the RGB value of a pixel estimated to be a background area. Such special processing is performed to indicate to the user or the like whether or not the modeling system 10 accurately recognizes the background area. As a result, the area of the color image that is recognized as the background area is displayed, for example, in a reddish color (covered with a red filter), and the user can easily recognize the extracted background area. It becomes possible.

【0055】このモデリングシステム10では、オフセ
ット用RGB値の加算、減算のいずれか一方を行うこと
ができ、表示装置16の画面上に加算/減算を択一的に
選択可能とするラジオボタンを表示させ、利用客等にい
ずれか一方を指定させる。ただし、オフセット用RGB
値を複数種類用意し、それぞれにラジオボタンを設定し
て択一的にオフセット用RGB値を選択させるように構
成してもよいし、また、利用客等にオフセット用RGB
値を直接入力させるように構成してもよい。
The modeling system 10 can perform either addition or subtraction of the offset RGB values, and displays a radio button on the screen of the display device 16 so that the addition / subtraction can be selected alternatively. And let the customer specify one of them. However, offset RGB
A plurality of types of values may be prepared, and a radio button may be set for each of the values to allow the user to select an offset RGB value, or a user or the like may select an offset RGB value.
You may be comprised so that a value may be directly input.

【0056】このように特殊処理として、複数種類の処
理を用意するのは、対象物(人物の頭部等)がどのよう
な色分布をしているかが人物に応じて異なるためであ
る。すなわち、対象物の色分布が不定であるため、オフ
セット用RGB値が1つだけの設定では、対象物の色分
布によっては、背景領域と推定した領域とその他の領域
との区別が難しい場合があるからである。しかし、複数
種類の特殊処理が可能なように構成しておけば、背景領
域と推定した領域とその他の領域との区別が難しい場合
には、特殊処理の態様を他のものに変更することによっ
て区別することが可能になるというメリットがある。
The reason why a plurality of types of processing are prepared as special processing is that the color distribution of an object (such as the head of a person) varies depending on the person. That is, since the color distribution of the object is indefinite, it may be difficult to distinguish between the area estimated as the background area and other areas depending on the color distribution of the object if only one offset RGB value is set. Because there is. However, if it is configured so that a plurality of types of special processing can be performed, when it is difficult to distinguish the area estimated as the background area from the other areas, the mode of the special processing is changed to another one. There is an advantage that it is possible to distinguish.

【0057】以上のようにして表示装置16に背景領域
の表示が行われると、次にステップS204に進む。
When the background area is displayed on the display device 16 as described above, the process proceeds to step S204.

【0058】ステップS204では、背景領域の編集操
作が行われる。図7は、このときの表示装置16の表示
画面を示す図である。図7に示すように、ステップS2
03の背景領域の表示処置が終了した時点で、画像枠2
31の内側に背景領域に特殊処理が施されたカラー画像
が表示される。この背景領域は利用客等のマウス操作等
によってさらに追加したり、背景領域から他の領域に変
更したりすることができる。
In step S204, a background region editing operation is performed. FIG. 7 is a diagram showing a display screen of the display device 16 at this time. As shown in FIG. 7, step S2
When the display processing of the background area 03 ends, the image frame 2
Inside 31, a color image with a special process applied to the background area is displayed. This background area can be further added by a mouse operation of a user or the like, or can be changed from the background area to another area.

【0059】具体的には、マウスポインタ233を画像
枠231中の背景領域以外の位置に合わせ、所定のクリ
ック操作およびドラッグ操作を行うことによってマウス
ポインタ233の移動軌跡内の画素が新たに背景領域と
して指定される。また、マウスポインタ233を画像枠
231中の背景領域内の位置に合わせ、所定のクリック
操作およびドラッグ操作を行うことによってマウスポイ
ンタ233の移動軌跡内の画素が背景領域以外として指
定される。このとき、編集対象となる領域は、画像枠2
31の円形窓の内部に表示された2次元カラー画像のみ
であり、画像枠231自体については編集対象とならな
い。
More specifically, the mouse pointer 233 is positioned at a position other than the background area in the image frame 231 and a predetermined click operation and a drag operation are performed to newly add a pixel in the movement locus of the mouse pointer 233 to the background area. Is specified as In addition, by positioning the mouse pointer 233 at a position in the background area in the image frame 231 and performing a predetermined click operation and drag operation, a pixel in the movement locus of the mouse pointer 233 is designated as a part other than the background area. At this time, the area to be edited is image frame 2
There are only two-dimensional color images displayed inside the 31 circular windows, and the image frame 231 itself is not to be edited.

【0060】なお、ガイダンス表示欄RA2には、マウ
スポインタ233のサイズを変更するための変更ボタン
253が設けられており、変更ボタン253のうちのい
ずれか一つのサイズを選択することによって画像枠23
1内に表示されるマウスポインタ233のサイズが変更
される。
The guidance display field RA2 is provided with a change button 253 for changing the size of the mouse pointer 233, and by selecting one of the change buttons 253, the image frame 23 is displayed.
The size of the mouse pointer 233 displayed in 1 is changed.

【0061】また、この背景領域の編集の作業を行う際
に、奥行き方向に対して顔から大きく離れた首や肩等の
部分を加工対象外とするために、これらの部分が背景領
域として指定される。
In performing the editing operation of the background area, the parts such as the neck and the shoulder which are far away from the face in the depth direction are excluded from the processing target. Therefore, these parts are designated as the background area. Is done.

【0062】そして、背景領域の編集処理が終了する
と、カラー画像DCにおいて、画像枠領域、背景領域、
および、これら以外の領域の3つの領域が区別され、そ
れぞれの領域に対して所定の識別データを付した状態で
データ処理装置40内の内部メモリに記憶される。
When the editing process of the background area is completed, the image frame area, the background area,
In addition, three areas other than these areas are distinguished, and are stored in an internal memory in the data processing device 40 with predetermined identification data attached to each area.

【0063】次に、ステップS205に進み、肌領域の
表示が行われる。モデリングシステム10では、肌領域
の抽出が自動的に行われるようになっており、その詳細
については後述する。なお、既に背景領域として確定し
ている部分については肌領域を抽出する対象から外され
る。
Next, the process proceeds to step S205, where a skin region is displayed. In the modeling system 10, extraction of a skin region is automatically performed, and details thereof will be described later. Note that the portion that has already been determined as the background region is excluded from the target for extracting the skin region.

【0064】そして、ステップS203の場合と同様
に、画像枠231内に表示されているカラー画像の肌領
域と推定された部分に、所定のオフセット用RGB値を
加減することにより、肌領域の表示を行う。この表示に
より、カラー画像中のどの部分が肌領域として認識され
ているかを容易に把握することができる。
Then, as in the case of step S203, a predetermined offset RGB value is added to or subtracted from a portion of the color image displayed in the image frame 231 which is estimated as a skin region, thereby displaying the skin region. I do. With this display, it is possible to easily grasp which part in the color image is recognized as the skin area.

【0065】次に、ステップS206に進み、肌領域の
編集操作が行われる。ここで行われる操作は、ステップ
S204で説明した背景領域の編集操作と同様である。
つまり、所定のマウス操作を行うことにより、肌領域以
外の領域を肌領域として指定したり、また、肌領域と推
定されている部分を肌領域以外の領域として指定するの
である。ただし、既に背景領域として確定している領域
ついては、編集の対象とはならない。
Next, the process proceeds to step S206, where an editing operation of the skin region is performed. The operation performed here is the same as the editing operation of the background area described in step S204.
That is, by performing a predetermined mouse operation, an area other than the skin area is specified as a skin area, and a portion estimated as the skin area is specified as an area other than the skin area. However, an area already determined as a background area is not to be edited.

【0066】なお、後述するようにモデリングシステム
10のデータ処理装置40には肌領域を適切に抽出する
ための工夫がなされているが、想定外の対象物に対して
も最終的に適切な肌領域を得るためにステップS206
が設けられている。
As described later, the data processing device 40 of the modeling system 10 is devised to appropriately extract a skin region. Step S206 to obtain an area
Is provided.

【0067】肌領域の編集処理が終了すると、カラー画
像DCにおいて、画像枠領域、背景領域、肌領域、およ
び、これら以外の領域の4つの領域が区別され、それぞ
れの領域に対して所定の識別データを付した状態でデー
タ処理装置40内の内部メモリに記憶される。
When the editing process of the skin area is completed, four areas of the color image DC, namely, the image frame area, the background area, the skin area, and the other areas are distinguished, and a predetermined identification is performed on each area. The data is stored in an internal memory in the data processing device 40 with the data attached.

【0068】次に、ステップS207に進み、その他の
領域の表示が行われる。例えば、利用客等が所定のマウ
ス操作を行うことによって画像枠231内のカラー画像
中から髪飾り等の部分を指定する。このとき、既に背景
領域、肌領域として確定している部分については指定対
象から外される。
Next, the process proceeds to step S207, where other areas are displayed. For example, a user or the like performs a predetermined mouse operation to designate a part such as a hair ornament from a color image in the image frame 231. At this time, a part that has already been determined as a background area and a skin area is excluded from the designation target.

【0069】モデリングシステム10は、この指定され
た髪飾り等の部分の色成分を分析し、その色成分に類似
する画素を全て抽出することにより、髪飾り等の領域を
推定することができる。このとき、既に背景領域、肌領
域として確定している部分についてはその他の領域の推
定対象から外される。
The modeling system 10 can estimate the area of the hair ornament and the like by analyzing the color components of the designated hair ornament and the like and extracting all the pixels similar to the color component. At this time, a portion that has already been determined as a background region or a skin region is excluded from estimation targets of other regions.

【0070】そして、ステップS203の場合と同様
に、画像枠231内に表示されているカラー画像の髪飾
り等の領域と推定された部分に、所定のオフセット用R
GB値を加減することにより、髪飾り等の領域の表示を
行う。この表示により、カラー画像中のどの部分が髪飾
り等の領域として認識されているかを容易に把握するこ
とができる。
As in the case of step S203, a predetermined offset R is added to a portion of the color image displayed in the image frame 231 which is estimated to be a region such as a hair ornament.
By adjusting the GB value, an area such as a hair ornament is displayed. With this display, it is possible to easily grasp which part in the color image is recognized as an area such as a hair ornament.

【0071】次に、ステップS208に進み、髪飾り等
のその他の領域の編集操作が行われる。ここで行われる
操作は、ステップS204で説明した背景領域の編集操
作と同様である。つまり、所定のマウス操作を行うこと
により、髪飾り等の領域以外の領域を髪飾り等の領域と
して新たに指定したり、また、髪飾り等の領域と推定さ
れている部分を髪飾り等の領域以外の領域として指定す
るのである。ただし、既に背景領域、肌領域として確定
している領域ついては、編集の対象とはならない。この
髪飾り等のその他の領域の編集処理が終了すると、カラ
ー画像DCにおいて、画像枠領域、背景領域、肌領域、
髪飾り等の領域、および、これら以外の領域の5つの領
域が区別され、それぞれの領域に対して所定の識別デー
タを付した状態でデータ処理装置40内の内部メモリに
記憶される。
Next, the process proceeds to step S208, where editing operations for other areas such as hair decorations are performed. The operation performed here is the same as the editing operation of the background area described in step S204. In other words, by performing a predetermined mouse operation, an area other than the area such as the hair ornament can be newly designated as the area such as the hair ornament, or a portion estimated as the area such as the hair ornament can be designated as the hair ornament or the like. It is specified as an area other than the area. However, an area that has already been determined as a background area or a skin area is not to be edited. When the editing processing of the other areas such as the hair ornament is completed, in the color image DC, the image frame area, the background area, the skin area,
The five areas of the area such as the hair ornament and the other areas are distinguished, and are stored in the internal memory in the data processing device 40 in a state where predetermined identification data is attached to each area.

【0072】ここまでの処理が終了すると、編集処理
(ステップS105)が終了することとなり、図3に示
すステップS106に進む。
When the above processing is completed, the editing processing (step S105) is completed, and the process proceeds to step S106 shown in FIG.

【0073】ステップS106では、2次元頭髪データ
の抽出を行う。上記の編集処理(ステップS105)に
より、2次元のカラー画像DCは、画像枠領域、背景領
域、肌領域、髪飾り等の領域、および、これら以外の領
域の5つの領域に区別されている。したがって、これら
以外の領域として認識されている領域は頭髪領域と等価
であると考えることができる。そこで、この2次元頭髪
データの抽出では、2次元カラー画像を構成する画素か
ら頭髪領域に含まれる画素を抽出し、頭髪の流れ形状等
を再現するために、所定の周波数領域でのフィルタリン
グ処理や正規化処理を行い、頭髪領域の2次元グレイ画
像を生成するのである。
In step S106, two-dimensional hair data is extracted. By the above-described editing process (step S105), the two-dimensional color image DC is divided into five regions: a region such as an image frame region, a background region, a skin region, a hair ornament, and other regions. Therefore, the area recognized as an area other than these can be considered to be equivalent to the hair area. Therefore, in the extraction of the two-dimensional hair data, the pixels included in the hair region are extracted from the pixels constituting the two-dimensional color image, and a filtering process in a predetermined frequency region is performed in order to reproduce the flow shape of the hair. The normalization process is performed to generate a two-dimensional gray image of the hair region.

【0074】次に、ステップS107に進み、3次元頭
部形状の生成を行う。3次元頭部形状は、2次元のカラ
ー画像において背景領域を除いた肌領域と頭髪領域と髪
飾り等の領域とに分けられる。
Next, the flow advances to step S107 to generate a three-dimensional head shape. The three-dimensional head shape is divided into a skin region, a hair region, and a region such as a hair ornament excluding a background region in a two-dimensional color image.

【0075】肌領域や髪飾り領域はその大部分が距離画
像DSに有効な計測データとして含まれていると考えら
れるが、有効な計測データとして含まれていない場合に
は、他の部分の有効な計測データの部分を使って形状補
間を行う。
It is considered that most of the skin area and the hair ornament area are included as effective measurement data in the distance image DS, but if they are not included as effective measurement data, the effective area of other parts is not included. Shape interpolation is performed using the part of the measurement data.

【0076】一方、頭髪領域はその大部分が距離画像D
Sに有効な計測データとして含まれていないと考えられ
るため、演算による頭髪領域の形状データの復元が行わ
れる。すなわち、肌領域の距離画像DSから、肌領域に
滑らかに接続する3次元頭髪形状を生成し、肌領域に対
して頭髪部分の盛り上がりを反映させるために所定のオ
フセットを3次元頭髪形状に与える。
On the other hand, most of the hair region is the distance image D
Since it is considered that S is not included as valid measurement data, the shape data of the hair region is restored by calculation. That is, a three-dimensional hair shape that smoothly connects to the skin region is generated from the skin region distance image DS, and a predetermined offset is given to the three-dimensional hair shape in order to reflect the swelling of the hair portion in the skin region.

【0077】一方、頭髪領域の2次元グレイ画像のグレ
イ成分を高さ方向成分(奥行き方向の成分)に変換す
る。そして、2次元グレイ画像から得られる高さ方向成
分を3次元頭髪形状に重ね合わせることにより頭髪模様
を形成し、頭髪領域の3次元形状データが得られる。こ
の3次元形状データを距離画像DSの頭髪領域に適用す
ることにより、完全な3次元形状モデルが得られる。
On the other hand, the gray component of the two-dimensional gray image of the hair region is converted into a component in the height direction (a component in the depth direction). Then, a hair pattern is formed by superimposing the height direction component obtained from the two-dimensional gray image on the three-dimensional hair shape, and three-dimensional shape data of the hair region is obtained. By applying this three-dimensional shape data to the hair region of the distance image DS, a complete three-dimensional shape model can be obtained.

【0078】次に、ステップS108に進み、スケーリ
ング処理が行われる。3次元頭髪形状の生成処理(ステ
ップS107)で生成された3次元形状モデルは頭部と
同一のサイズとなっている。そこで、このスケーリング
処理(ステップS108)では、3次元形状モデルをワ
ークのサイズに適合するようにスケーリング(拡大/縮
小)を行うのである。
Next, the process proceeds to step S108, where a scaling process is performed. The three-dimensional shape model generated in the three-dimensional hair shape generation process (step S107) has the same size as the head. Therefore, in the scaling process (step S108), the three-dimensional shape model is scaled (enlarged / reduced) so as to be adapted to the size of the work.

【0079】まず、平面的な拡大縮小について説明す
る。上述の画像枠231は加工対象となるワークのサイ
ズに対応するとともに、ワークのサイズが既知であるこ
とから、3次元形状モデルのサイズと画像枠231内に
表示された2次元カラー画像とのサイズとから拡大縮小
率が決定できる。そして、その決定された拡大縮小率に
基づいて3次元形状モデルをスケーリングすれば、ワー
クのサイズに適合したモデルを生成することができる。
First, planar enlargement / reduction will be described. The above-mentioned image frame 231 corresponds to the size of the work to be processed, and since the size of the work is known, the size of the three-dimensional shape model and the size of the two-dimensional color image displayed in the image frame 231. From this, the enlargement / reduction ratio can be determined. Then, by scaling the three-dimensional shape model based on the determined enlargement / reduction ratio, a model suitable for the size of the work can be generated.

【0080】一方、奥行き方向については、まず、平面
的な拡大縮小率と同一倍率の拡大縮小率を設定する。そ
して、その後は、3次元形状モデルの全ての画素を対象
に、一定のワークの切削深さ(奥行き寸法)に圧縮/拡
大する方法や、3次元形状モデルを設定された深さ(奥
行き寸法)で足切りした後に一定のワークの切削深さに
圧縮/拡大する方法の2通りの方法を選択することがで
きる。
On the other hand, in the depth direction, first, the same enlargement / reduction ratio as the planar enlargement / reduction ratio is set. Then, thereafter, a method of compressing / enlarging to a certain work cutting depth (depth dimension) for all the pixels of the three-dimensional shape model, and a set depth (depth dimension) of the three-dimensional shape model And two methods of compressing / expanding to a certain cutting depth of the work after cutting by the cutting can be selected.

【0081】このようにして、3次元形状モデルがワー
クのサイズに適合するようにスケーリングが行われる
と、ステップS109に進み、スケーリングされた3次
元形状モデルから加工用データを生成する。加工用デー
タが生成されると、ファイル名を付して記憶装置43に
格納しておく。
When the scaling is performed so that the three-dimensional shape model conforms to the size of the work, the process proceeds to step S109, and processing data is generated from the scaled three-dimensional shape model. When the processing data is generated, the processing data is given a file name and stored in the storage device 43.

【0082】次に、ステップS110に進み、加工機の
選択が行われる。このステップS110では、図2に示
したようにメイン処理S31と通信制御S32と状態表
示制御S33とが機能し、メイン処理S31は加工可能
な加工機の情報を取得し、それを表示装置16に表示さ
せ、利用客等に加工機を選択することを促す。加工機の
選択が行われると、選択された加工機に対して加工用コ
マンドを送出するように通信制御S32が行われる。
Next, the process proceeds to step S110, where a processing machine is selected. In this step S110, as shown in FIG. 2, the main process S31, the communication control S32, and the state display control S33 function, and the main process S31 obtains information of a processing machine that can be processed, and displays it on the display device 16. A message is displayed and the user is prompted to select a processing machine. When a processing machine is selected, communication control S32 is performed so as to send a processing command to the selected processing machine.

【0083】これにより、選択された加工機において加
工が開始され、図7に示す加工状態表示領域RBの加工
中の加工機に対応する領域に加工状態や加工対象の人物
を示すカラー画像が表示される。
Thus, processing is started in the selected processing machine, and a color image indicating the processing state and the person to be processed is displayed in the processing state display area RB shown in FIG. 7 corresponding to the processing machine being processed. Is done.

【0084】ここまでの処理が終了すると、メイン処理
S31は操作入力装置44から終了指示があったか否か
を判断し(ステップS111)、終了指示がない場合に
は、上記ステップS101からの処理を繰り返し行うこ
とで、次の人物の頭部の計測処理を開始する。したがっ
て、この場合には、モデリングシステム10は、加工機
21〜24におけるワークの加工が終了する前に次の処
理を開始することができ、モデリングシステム10と複
数の加工機21〜24との並列的処理が実現される。
When the processing up to this point is completed, the main processing S31 determines whether or not there is a termination instruction from the operation input device 44 (step S111). If there is no termination instruction, the processing from step S101 is repeated. By doing so, measurement processing of the head of the next person is started. Therefore, in this case, the modeling system 10 can start the next processing before the processing of the workpieces in the processing machines 21 to 24 is completed, and the modeling system 10 and the plurality of processing machines 21 to 24 can operate in parallel. Processing is realized.

【0085】一方、ステップS111において終了指示
があった場合には、メイン処理S31は終了し、図2に
示したステップS4に進む。
On the other hand, if there is an end instruction in step S111, the main process S31 ends and the process proceeds to step S4 shown in FIG.

【0086】<1−4.肌領域の表示の詳細>次に、図
5中に示す肌領域の表示(ステップS205)における
モデリングシステム10の動作について図8および図9
を参照しながら説明する。
<1-4. Details of Display of Skin Area> Next, the operation of the modeling system 10 in the display of the skin area (step S205) shown in FIG. 5 will be described with reference to FIGS.
This will be described with reference to FIG.

【0087】図8は肌領域の表示におけるモデリングシ
ステム10の全体の動作の流れを示すフローチャートで
あり、図9は図8中のステップS302〜S306の処
理を行うデータ処理装置40の機能構成をデータの流れ
とともに示すブロック図である。なお、図9に示す機能
構成は、既述のように記録媒体9から読み込まれたプロ
グラムに基づいてデータ処理装置40内のCPUが演算
処理を行うことにより実現される機能であるが、これら
の機能の全てまたは一部が専用の電気的回路として構築
されていてもよい。以下の機能ブロック図においても同
様である。
FIG. 8 is a flowchart showing the flow of the entire operation of the modeling system 10 in displaying the skin area. FIG. 9 shows the functional configuration of the data processing device 40 for performing the processing of steps S302 to S306 in FIG. It is a block diagram shown with the flow of. Note that the functional configuration shown in FIG. 9 is a function realized by the CPU in the data processing device 40 performing arithmetic processing based on the program read from the recording medium 9 as described above. All or some of the functions may be configured as a dedicated electric circuit. The same applies to the following functional block diagrams.

【0088】また、以下の説明では人物の横顔の画像か
ら肌領域を抽出する例について説明を行うが、横顔以外
であっても利用可能である。
In the following description, an example of extracting a skin area from an image of a person's profile will be described.

【0089】肌領域の表示(ステップS205)では、
まず、2次元のカラー画像DCの全領域からステップS
204にて最終的に決定された背景領域が削除され、人
物領域のみのカラー画像DC1が生成される(ステップ
S301)。人物領域のみのカラー画像(すなわち、人
物領域が有効とされたカラー画像)DC1はどのような
形式で生成されてもよく、例えば、背景領域の画素値が
特殊な値とされてもよく、元のカラー画像DCに人物領
域を示す2値画像を関連付けた形式となっていてもよ
い。
In the display of the skin area (step S205),
First, step S is performed from the entire area of the two-dimensional color image DC.
The background area finally determined in 204 is deleted, and a color image DC1 of only the person area is generated (step S301). The color image DC1 of only the person region (that is, the color image in which the person region is valid) DC1 may be generated in any format. For example, the pixel value of the background region may be a special value. A color image DC may be associated with a binary image indicating a person area.

【0090】人物領域を示す2次元のカラー画像DC1
(以下、単に「カラー画像DC1」という。)が求めら
れると、次に、サンプリング領域抽出部401が3次元
の距離画像DSに基づいて色のサンプリングを行うため
のサンプリング領域DB1(正確には、サンプリング領
域DB1を示す2値画像)が求められる(ステップS3
02)。なお、以下の説明においても所定の領域を求め
る処理とは、領域を示す2値画像を求める処理を指す。
A two-dimensional color image DC1 showing a person area
When (hereinafter, simply referred to as “color image DC1”) is obtained, next, the sampling region extracting unit 401 performs sampling of the color based on the three-dimensional distance image DS (specifically, sampling region DB1). A binary image showing the sampling area DB1 is obtained (step S3).
02). In the following description, the process of obtaining a predetermined region also refers to a process of obtaining a binary image indicating a region.

【0091】その後、サンプリング領域DB1内のカラ
ー画像DC1の画素値(すなわち、色)を用いて肌領域
抽出部402が仮の肌領域DB2を求める(ステップS
303)。さらに、補正部403により、カラー画像D
C1、距離画像DSおよび仮の肌領域DB2を用いて、
カラー画像DC1の画素のうち距離画像DSに対応する
計測データ(以下、「距離データ」という。)が存在す
る領域の画素値が補正される(ステップS304)。
Thereafter, the skin area extraction unit 402 obtains a temporary skin area DB2 using the pixel values (that is, colors) of the color image DC1 in the sampling area DB1 (step S).
303). Further, the color image D
Using C1, distance image DS and temporary skin area DB2,
The pixel value of an area where the measurement data (hereinafter, referred to as “distance data”) corresponding to the distance image DS among the pixels of the color image DC1 is corrected (step S304).

【0092】補正後のカラー画像DC2は再び肌領域抽
出部402へと送られ、補正後のカラー画像DC2のサ
ンプリング領域DB1内の画素値を用いて肌領域抽出部
402が肌領域DB3を求める(ステップS305)。
これにより、仮の肌領域DB2よりも適正な肌領域DB
3が抽出される。
The corrected color image DC2 is sent again to the skin region extraction unit 402, and the skin region extraction unit 402 obtains a skin region DB3 using the pixel values in the sampling region DB1 of the corrected color image DC2 ( Step S305).
Thereby, a more appropriate skin region DB than the temporary skin region DB2
3 is extracted.

【0093】求められた肌領域DB3は整形部404に
て整形され(ステップS306)、元のカラー画像DC
および整形後の肌領域DB4を示す2値画像に基づいて
表示装置16にて肌領域の表示が行われる(ステップS
307)。すなわち、元のカラー画像DCの肌領域DB
4の画素の値からオフセット用RGB値を加算または減
算し、肌領域DB4の色に特徴を持たせて表示を行う。
例えば、カラー画像DCの肌領域DB4の画素の値のR
成分に一律に所定の値を加算し、肌領域DB4のみに赤
味を帯びさせて表示する。
The obtained skin region DB3 is shaped by the shaping unit 404 (step S306), and the original color image DC is obtained.
The display of the skin region is performed on the display device 16 based on the binary image indicating the skin region DB4 after shaping (step S).
307). That is, the skin area DB of the original color image DC
The RGB value for offset is added or subtracted from the value of the pixel No. 4 to display the color of the skin region DB4 with characteristics.
For example, the R of the pixel value of the skin region DB4 of the color image DC
A predetermined value is uniformly added to the component, and only the skin region DB4 is displayed with a red tint.

【0094】次に、図8におけるステップS302〜S
306の各処理について詳説する。図10はサンプリン
グ領域の抽出(ステップS302)におけるデータ処理
装置40の動作を示すフローチャートである。サンプリ
ング領域抽出部401がサンプリング領域DB1を抽出
する際には、まず、距離画像DSの各画素と周囲の画素
との距離データの差(すなわち、微分値)を求め、微分
画像を得る。そして、微分画像において微分値が予め準
備された微分値の棄却基準値TH1よりも小さな値とな
る領域を示す2値画像を求める(ステップS321)。
これにより、距離画像DSにおいて視点から距離画像D
Sに向かう方向に対してほぼ垂直となる領域が抽出され
る。
Next, steps S302 to S in FIG.
Each process of 306 will be described in detail. FIG. 10 is a flowchart showing the operation of the data processing device 40 in extracting a sampling area (step S302). When the sampling area extraction unit 401 extracts the sampling area DB1, first, a difference (that is, a differential value) between the distance data between each pixel of the distance image DS and surrounding pixels is obtained to obtain a differential image. Then, a binary image showing an area in which the differential value is smaller than the prepared differential value rejection reference value TH1 in the differential image is obtained (step S321).
As a result, the distance image D
A region substantially perpendicular to the direction toward S is extracted.

【0095】図11はステップS321の処理の様子を
例示する概念図である。図11では距離画像DSの様子
(なお、頭髪領域では距離データが取得されない部分が
あるが、図11では髪の様子も図示している。)と抽出
される領域(符号R21またはR22を付す領域)とを
重ねて示している。このような処理を人物の横顔に対し
て行うことにより、頬の部分を中心におよそ肌の領域が
抽出される。
FIG. 11 is a conceptual diagram illustrating the state of the processing in step S321. In FIG. 11, the state of the distance image DS (there is a part where the distance data is not acquired in the hair region, but the state of the hair is also shown in FIG. 11) and the region to be extracted (the region denoted by reference symbol R21 or R22) ) Are superimposed. By performing such processing on the profile of a person, a skin region is extracted about the cheek portion.

【0096】続いて、サンプリング領域抽出部401で
は、抽出領域R21,R22を示す2値画像に対してモ
ルフォロジーフィルタを作用させて抽出領域R21,R
22を収縮させる(ステップS322)。
Subsequently, the sampling region extracting section 401 applies a morphological filter to the binary image indicating the extracted regions R21 and R22 to apply the extracted regions R21 and R22.
22 is contracted (step S322).

【0097】視線方向に対してほぼ垂直な領域が抽出さ
れると、2値画像をクラスタリング(ラベリングともい
う。)して各クラスタを識別可能な状態とする。その
後、面積が最大のクラスタのみを示す2値画像を得る
(ステップS323)。これにより、図11に示す例で
は、符号R21に示す領域が面積最大のクラスタ(以
下、単に、「クラスタR21」という。)として抽出さ
れ、頬の一部の領域の抽出が実現される。
When an area substantially perpendicular to the line of sight is extracted, the binary image is clustered (also called labeling) to make each cluster identifiable. Then, a binary image showing only the cluster having the largest area is obtained (step S323). As a result, in the example shown in FIG. 11, the region indicated by reference numeral R21 is extracted as a cluster having the largest area (hereinafter, simply referred to as "cluster R21"), and the extraction of a part of the cheek region is realized.

【0098】その後、データ処理装置40では図12に
示すように、クラスタR21を囲う最小の矩形R23を
求め(ステップS324)、この矩形R23を中心の位
置を維持したまま半分の大きさに縮小し、矩形R24を
求める(ステップS325)。この処理により、人物の
実際の肌の領域に必ず含まれる矩形領域が求められる。
そして、この矩形R24内で対応する距離データが存在
する領域がサンプリング領域DB1として求められる
(ステップS326)。
Then, as shown in FIG. 12, the data processing device 40 obtains a minimum rectangle R23 surrounding the cluster R21 (step S324), and reduces this rectangle R23 to half while maintaining the center position. , A rectangle R24 is obtained (step S325). By this processing, a rectangular area which is always included in the actual skin area of the person is obtained.
Then, an area where the corresponding distance data exists in the rectangle R24 is obtained as the sampling area DB1 (step S326).

【0099】図13はサンプリング領域DB1を参照し
ながら2次元のカラー画像から肌の領域を抽出する際の
データ処理装置40の動作(ステップS303,S30
5)を示すフローチャートであり、図14は図9に示す
肌領域抽出部402の機能構成を示すブロック図であ
る。なお、ステップS303ではカラー画像DC1に対
して処理が行われるのに対し、ステップS305では補
正後のカラー画像DC2に対して処理が行われるという
点を除いて両ステップにおける処理の内容はほぼ同様で
ある。以下の説明では、まず、仮の肌領域DB2を求め
る処理について説明し、続いて、より適切な肌領域DB
3を求める処理について言及する。
FIG. 13 shows the operation (steps S303 and S30) of the data processor 40 when extracting a skin region from a two-dimensional color image with reference to the sampling region DB1.
FIG. 14 is a flowchart showing 5), and FIG. 14 is a block diagram showing a functional configuration of the skin region extracting unit 402 shown in FIG. In step S303, the processing is performed on the color image DC1, whereas in step S305, the processing is performed on the corrected color image DC2, except that the processing in both steps is substantially the same. is there. In the following description, first, a process of obtaining the temporary skin region DB2 will be described, and then, a more appropriate skin region DB2 will be described.
3 will be described.

【0100】仮の肌領域DB2の抽出の際には(ステッ
プS303)、まず、カラー画像DC1およびサンプリ
ング領域DB1を用いて肌色算出部421が、サンプリ
ング領域DB1内の全画素のRGBそれぞれの画素値に
対してRGB色空間における3次元統計処理を行う(ス
テップS331)。これにより、サンプリング領域DB
1における色の平均値と色の共分散行列とが求められ
る。さらに、色の共分散行列の逆行列が求められ(ステ
ップS332)、色の平均値および共分散行列の逆行列
が色の統計データとして領域抽出部422に渡される。
At the time of extracting the temporary skin area DB2 (step S303), first, using the color image DC1 and the sampling area DB1, the skin color calculation unit 421 performs the pixel values of RGB of all the pixels in the sampling area DB1. , A three-dimensional statistical process in the RGB color space is performed (step S331). Thereby, the sampling area DB
The average value of the color at 1 and the color covariance matrix are determined. Further, an inverse matrix of the color covariance matrix is obtained (step S332), and the average value of the color and the inverse matrix of the covariance matrix are passed to the region extraction unit 422 as color statistical data.

【0101】領域抽出部422では、色の統計データを
用いてカラー画像DC1(の有効領域)においてマハラ
ノビス距離が3を超える色を有する領域を除外し、新た
な領域(以下、「中間抽出領域」という。)を得る(ス
テップS333)。この中間抽出領域を示す2値画像は
肌色算出部421へと戻され、中間抽出領域内の全画素
のRGBそれぞれの画素値に対してRGB色空間におけ
る3次元統計処理を行う(ステップS334)。これに
より、中間抽出領域における色の平均値と色の共分散行
列とが求められる。さらに、色の共分散行列の逆行列が
求められ(ステップS335)、色の平均値および共分
散行列の逆行列がノイズの影響が除かれた色の統計デー
タとして領域抽出部422に渡される。
The area extracting unit 422 excludes an area having a color whose Mahalanobis distance exceeds 3 in the (effective area of) the color image DC1 by using the color statistical data, and adds a new area (hereinafter referred to as an “intermediate extraction area”). Is obtained (step S333). The binary image indicating the intermediate extraction region is returned to the skin color calculation unit 421, and three-dimensional statistical processing in the RGB color space is performed on the RGB pixel values of all the pixels in the intermediate extraction region (step S334). Thus, the average value of the colors and the covariance matrix of the colors in the intermediate extraction area are obtained. Further, an inverse matrix of the color covariance matrix is obtained (step S335), and the average value of the color and the inverse matrix of the covariance matrix are passed to the region extracting unit 422 as color statistical data from which the influence of noise has been removed.

【0102】領域抽出部422には予め仮の肌領域DB
2を求めるためのマハラノビス距離がしきい値TH2と
して準備されており、領域抽出部422では再度求めら
れた色の統計データを用いてカラー画像DC1において
マハラノビス距離がしきい値TH2以下の色を有する領
域を仮の肌領域DB2として抽出する(ステップS33
6)。すなわち、しきい値TH2以下のマハラノビス距
離を有する画素の画素値を1とし、しきい値TH2を超
えるマハラノビス距離を有する画素の画素値を0とする
2値画像を求める。
The area extracting section 422 stores a temporary skin area DB in advance.
The Mahalanobis distance for obtaining 2 is prepared as a threshold value TH2, and the region extraction unit 422 uses the color statistical data obtained again to have a color whose Mahalanobis distance is equal to or smaller than the threshold value TH2 in the color image DC1. The region is extracted as a temporary skin region DB2 (step S33)
6). That is, a binary image is obtained in which the pixel value of a pixel having a Mahalanobis distance equal to or less than the threshold value TH2 is 1 and the pixel value of a pixel having a Mahalanobis distance exceeding the threshold value TH2 is 0.

【0103】抽出された仮の肌領域DB2は既述のよう
に補正が行われ(図8:ステップS304)(詳細につ
いては後述)、補正後のカラー画像DC2が肌領域抽出
部402へと戻され、上記ステップS331〜S336
と同様の処理が行われる。これにより、仮の肌領域DB
2よりも適切に肌の領域を示す肌領域DB3が求められ
る(ステップS305)。
The extracted temporary skin area DB2 is corrected as described above (FIG. 8: step S304) (details will be described later), and the corrected color image DC2 is returned to the skin area extraction unit 402. And the above steps S331 to S336
Is performed. Thereby, the temporary skin region DB
A skin region DB3 that indicates a skin region more appropriately than 2 is obtained (step S305).

【0104】すなわち、肌色算出部421が補正後のカ
ラー画像DC2のサンプリング領域DB1内の画素につ
いて色の統計データを求め(ステップS331,S33
2)、領域抽出部がマハラノビス距離が3以下の色を有
する中間抽出領域を求め(ステップS333)、肌色算
出部421が中間抽出領域にて再び色の統計データを求
める(ステップS334,S335)。
That is, the skin color calculating section 421 obtains color statistical data for the pixels in the sampling area DB1 of the corrected color image DC2 (steps S331 and S33).
2), the region extraction unit obtains an intermediate extraction region having a color with a Mahalanobis distance of 3 or less (step S333), and the skin color calculation unit 421 obtains color statistical data again in the intermediate extraction region (steps S334 and S335).

【0105】領域抽出部422には予め肌領域DB3を
求めるためのマハラノビス距離がしきい値TH3として
準備されており、領域抽出部422では色の統計データ
を用いて補正後のカラー画像DC2においてマハラノビ
ス距離がしきい値TH3以下の色を有する領域を肌領域
DB2として抽出する(ステップS336)。
A Mahalanobis distance for obtaining the skin area DB3 is prepared in advance as a threshold value TH3 in the area extracting unit 422. The Mahalanobis distance is corrected in the color image DC2 using the color statistical data in the area extracting unit 422. An area having a color whose distance is equal to or less than the threshold value TH3 is extracted as the skin area DB2 (step S336).

【0106】次に、ステップS305にて適切な肌領域
DB3を求めるために行われるカラー画像DCの補正に
ついて説明する。図15はステップS302にて求めら
れる仮の肌領域DB2を例示する図である。
Next, the correction of the color image DC performed in order to obtain an appropriate skin area DB3 in step S305 will be described. FIG. 15 is a diagram illustrating a temporary skin region DB2 obtained in step S302.

【0107】図15に示すように、仮の肌領域DB2は
実際の肌の領域よりも小さな領域として取得される。こ
れは、サンプリング領域DB1が視線にほぼ垂直な領域
に基づいて求められるため、この領域の色に近い領域の
みが仮の肌領域DB2として抽出されるからである。
As shown in FIG. 15, the temporary skin area DB2 is obtained as an area smaller than the actual skin area. This is because the sampling area DB1 is obtained based on an area substantially perpendicular to the line of sight, and only an area close to the color of this area is extracted as the temporary skin area DB2.

【0108】すなわち、実際の肌の領域の周縁部や凹凸
の大きな部位は、表面の傾斜により(換言すれば、表面
の法線の方向が視線方向と大きく異なることにより)肌
の明るさや色合いがサンプリング領域DB1と大きく異
なる。その結果、実際の肌の領域の周縁部や凹凸の大き
な部位が仮の肌領域DB2として抽出されなくなる。そ
こで、補正部403ではランベルト(Lambert)照明モデ
ルを用いて実際の肌領域の形状や照明状態を考慮したカ
ラー画像DC1の色(すなわち、画素値)の補正を行う
ようになっている。
That is, the peripheral edge of the actual skin region or a portion having large irregularities has a different brightness or color tone of the skin due to the inclination of the surface (in other words, the direction of the normal to the surface is greatly different from the direction of the line of sight). Significantly different from sampling area DB1. As a result, the peripheral portion of the actual skin region or a portion having large irregularities is not extracted as the temporary skin region DB2. Therefore, the correction unit 403 corrects the color (that is, the pixel value) of the color image DC1 in consideration of the actual shape of the skin region and the illumination state using the Lambert illumination model.

【0109】ランベルト余弦則による拡散反射光の輝度
(すなわち、表面の輝度)Idは、数1にて示される。
なお、数1において、kdは拡散反射係数、Ipは入射光
の輝度、θは入射角、Nは反射面の単位法線ベクトル、
Lは入射光の方向を示す単位ベクトルであり、Nx
y,NzはベクトルNのX,Y,Z成分、Lx,Ly,L
zはベクトルLのX,Y,Z成分である。
[0109] luminance of the diffuse reflection light by the Lambert cosine law (i.e., brightness of the surface) I d is indicated by the number 1.
In Equation 1, k d is the diffuse reflection coefficient, I p is the luminance of the incident light, θ is the incident angle, N is the unit normal vector of the reflecting surface,
L is a unit vector indicating the direction of the incident light, and N x ,
N y and N z are the X, Y and Z components of the vector N, L x , L y and L
z is an X, Y, Z component of the vector L.

【0110】[0110]

【数1】 (Equation 1)

【0111】ここで、実際の照明状態では、反射面の周
囲の全方向からほぼ均等に入射する光(以下、「環境
光」という。)が存在すると仮定すると、表面の輝度は
数2にて示される。なお、数2において、Iadは環境光
による表面の輝度、Iaは環境光の輝度である。
Here, in an actual illumination state, assuming that light (hereinafter, referred to as “environmental light”) incident almost uniformly from all directions around the reflecting surface exists, the brightness of the surface is expressed by the following equation (2). Is shown. In Equation 2, I ad is the luminance of the surface due to the ambient light, and Ia is the luminance of the ambient light.

【0112】[0112]

【数2】 (Equation 2)

【0113】数2において、様々なベクトルNに対する
表面の輝度(Id+Iad)を得ることができる場合、複
数の方程式を重回帰分析して数2におけるパラメータk
dpx,kdpy,kdpz,kdaの近似値(す
なわち、最小二乗法による解)を求めることができる。
In the case where the surface brightness (I d + I ad ) for various vectors N can be obtained in the equation (2), a plurality of equations are subjected to multiple regression analysis to obtain the parameter k in the equation (2).
d I p L x, k d I p L y, k d I p L z, the approximate value of k d I a (i.e., the solution by least squares method) can be obtained.

【0114】補正部403では上記理論に基づき、仮の
肌領域DB2の色が一定であるとみなして上記パラメー
タを求めた上で、距離画像DSを用いてカラー画像DC
1の色を補正するようになっている。
Based on the above theory, the correction unit 403 determines that the color of the temporary skin area DB2 is constant, calculates the above parameters, and then uses the distance image DS to obtain the color image DC.
One color is corrected.

【0115】なお、このような補正はカラー画像DC1
中の画素のうち対応する距離データが存在する領域に限
定されるが、予め肌領域DB3として抽出されるべき領
域が距離データを有する領域に含まれるように調整され
ているものとする。すなわち、肌領域の表示(ステップ
S205)に移行する前に、距離画像DSに基づいて背
景領域の輪郭が適宜調整されているものとする。
It should be noted that such correction is performed for the color image DC1.
Although it is limited to the region where the corresponding distance data exists among the pixels in the middle, it is assumed that the region to be extracted as the skin region DB3 has been adjusted in advance so as to be included in the region having the distance data. That is, it is assumed that the outline of the background area has been appropriately adjusted based on the distance image DS before shifting to the display of the skin area (step S205).

【0116】図16は、カラー画像の補正(ステップS
304)におけるデータ処理装置40の動作を示す流れ
図であり、図17はカラー画像の補正の際のデータ処理
装置40の機能構成を示すブロック図である。
FIG. 16 shows the correction of the color image (step S
FIG. 17 is a flowchart showing the operation of the data processing device 40 in 304), and FIG. 17 is a block diagram showing the functional configuration of the data processing device 40 when correcting a color image.

【0117】カラー画像の補正の際には、まず、補正部
403の照明状態算出部431により距離画像DSが示
す形状の表面の単位法線ベクトルNが複数求められる
(ステップS341)。すなわち、仮の肌領域DB2の
各画素に対応する実際の肌の微小領域に垂直な単位ベク
トルが求められる。
When correcting a color image, first, a plurality of unit normal vectors N of the surface having the shape indicated by the distance image DS are obtained by the illumination state calculation unit 431 of the correction unit 403 (step S341). That is, a unit vector perpendicular to the actual skin minute area corresponding to each pixel of the temporary skin area DB2 is obtained.

【0118】続いて、仮の肌領域DB2が実際の肌領域
に必ず含まれるものと仮定して、照明状態算出部431
によりカラー画像DC1の仮の肌領域DB2内の各画素
のR成分の値について数2にて示す方程式を複数求め
る。これら複数の方程式を重回帰分析による近似計算に
より解き、R成分に関する照明状態を示すパラメータk
dpx,kdpy,kdpz,kdaを求める(ス
テップS342)。G,B成分に関しても同様にしてパ
ラメータが求められる。以下、RGBに関するパラメー
タをパラメータLPと総称する。
Subsequently, the provisional skin area DB2 is replaced with the actual skin area DB2.
Is assumed to be included in the lighting condition calculation unit 431
Each pixel in the temporary skin area DB2 of the color image DC1
Equations 2 are calculated for the value of the R component of
You. Apply these multiple equations to approximate calculation by multiple regression analysis
A parameter k that indicates the lighting state for the R component
dIpLx, KdIpLy, KdIpLz, KdIaAsk for
Step S342). The same applies to the G and B components.
Parameters are required. Below, the parameters related to RGB
Are collectively referred to as a parameter LP.

【0119】次に、画素値算出部432にてカラー画像
DC1のうち、対応する距離データを有する領域(以
下、「処理領域」という。)内の全画素について単位法
線ベクトルNが求められ、処理領域内の全画素について
ベクトルNおよびパラメータLPを用いて数1による演
算が行われる。これにより、処理領域の各画素のRGB
成分のそれぞれについて拡散反射光の輝度Idが求めら
れる。
Next, the pixel value calculation unit 432 calculates the unit normal vector N for all the pixels in the area having the corresponding distance data (hereinafter, referred to as “processing area”) in the color image DC1. The operation according to Equation 1 is performed on all the pixels in the processing area using the vector N and the parameter LP. Thereby, RGB of each pixel in the processing area is obtained.
Brightness I d of the diffuse reflection light is determined for each component.

【0120】さらに、カラー画像DC1における処理領
域の各画素のRGBそれぞれについて、画素値((Ip
+Iad)に相当する。)から拡散反射光の輝度Idが減
算され、環境光のみから生じる表面の輝度IadがRGB
各成分について求められる。これにより、求められた輝
度を画素値として有する補正後のカラー画像DC2が取
得される(ステップS343)。
Further, for each of the RGB of each pixel in the processing area in the color image DC1, the pixel value ((I p
+ I ad ). ) Is subtracted from the luminance I d of the diffuse reflection light, and the luminance I ad of the surface generated only from the ambient light is calculated as RGB.
Required for each component. Thus, a corrected color image DC2 having the obtained luminance as a pixel value is obtained (step S343).

【0121】既述のように、環境光は照明光のうち反射
面に対して全方向から均一に入射する成分であり、環境
光により照明された反射面は視線方向に対して任意の向
きであっても取得される画像中にて明るさや色が一定と
なる。したがって、人物の頭部が環境光のみにて照明さ
れる場合、照明光の入射方向の相違による実際の肌の領
域の明るさや色の変化の影響を回避することができる。
補正後のカラー画像DC2はこのような仮想的な照明状
態において取得される画像であり、対象物の形状から独
立した(すなわち、対象物の形状による照明状態の変化
の影響を受けない)画素値を有する画像となる。
As described above, the ambient light is a component of the illumination light that is uniformly incident on the reflecting surface from all directions, and the reflecting surface illuminated by the environmental light is in any direction with respect to the line of sight. Even if there is, brightness and color are constant in the acquired image. Therefore, when the head of the person is illuminated only with the ambient light, it is possible to avoid the influence of the change in the brightness or color of the actual skin region due to the difference in the incident direction of the illumination light.
The corrected color image DC2 is an image acquired in such a virtual illumination state, and has pixel values independent of the shape of the object (ie, not affected by changes in the illumination state due to the shape of the object). Is obtained.

【0122】これにより、補正後のカラー画像DC2
は、実際の肌の領域の周縁部や凹凸を有する肌の部位で
あっても適切な肌の色を表す画像となる。その結果、補
正後のカラー画像DC2が肌領域抽出部402に入力さ
れることにより、仮の肌領域DB2よりも適切に肌の領
域を示す肌領域DB3を求めることが可能となる。
Thus, the corrected color image DC2
Is an image that represents an appropriate skin color even in a peripheral portion of an actual skin region or a skin portion having irregularities. As a result, by inputting the corrected color image DC2 to the skin region extraction unit 402, it becomes possible to obtain a skin region DB3 that indicates a skin region more appropriately than the temporary skin region DB2.

【0123】図18は肌領域DB3が求められた後に行
われる肌領域の整形(ステップS306)の際のデータ
処理装置40の動作を示すフローチャートである。肌領
域の整形では、まず、肌領域DB3に存在する微小な穴
領域を埋める処理を行う(ステップS361)。これに
より、距離画像DSが有する雑音により、カラー画像D
C1の補正が正常に行われずに穴となってしまった領域
を除去することができる。なお、距離画像DSが有する
雑音の影響を除去するために、カラー画像DC1の補正
の前に予め距離画像DSにメディアンフィルタを作用さ
せてノイズが除去されてもよい。
FIG. 18 is a flowchart showing the operation of the data processing device 40 in shaping the skin area (step S306) performed after the skin area DB3 is obtained. In the shaping of the skin region, first, a process of filling a minute hole region existing in the skin region DB3 is performed (step S361). As a result, the color image D
It is possible to remove a region where a hole has been formed due to incorrect correction of C1. In addition, in order to remove the influence of noise included in the distance image DS, a noise may be removed by applying a median filter to the distance image DS in advance before correcting the color image DC1.

【0124】次に、モルフォロジーフィルタClosingを
適用して(すなわち、膨張および収縮処理を繰り返し
て)肌領域DB3の境界の不要な凹凸を削除する(ステ
ップS362)。これにより、ステップS305で抽出
された肌領域DB3が整形され、最終的な肌領域DB4
が求められる。
Next, the morphological filter Closing is applied (that is, the expansion and contraction processing is repeated), and unnecessary unevenness at the boundary of the skin region DB3 is deleted (step S362). Thereby, the skin region DB3 extracted in step S305 is shaped, and the final skin region DB4
Is required.

【0125】以上、肌領域の抽出について詳細に説明し
てきたが、データ処理装置40では、まず、サンプリン
グ領域DB1を距離画像DSが示す形状のうち視線にほ
ぼ垂直な領域(すなわち、カラー画像DC1中で像が明
瞭に映し出される領域)を基準に求めるため、サンプリ
ング領域DB1を確実に肌の領域に含めることが可能で
あると共に、典型的な肌の色を表す領域とすることがで
きる。
Although the extraction of the skin area has been described in detail above, the data processing device 40 first sets the sampling area DB1 to an area substantially perpendicular to the line of sight among the shapes indicated by the distance image DS (that is, the color image DC1). Therefore, the sampling area DB1 can be reliably included in the skin area, and can be set as an area representing a typical skin color.

【0126】そして、サンプリング領域DB1の画素値
に基づいて仮の肌領域DB2を求め、仮の肌領域DB2
から照明状態を推定するので、適切に照明状態を推定す
ることができる。その結果、カラー画像DC1の補正が
適切に行われ、肌領域DB3の抽出が良好に行われる。
Then, a temporary skin area DB2 is obtained based on the pixel values of the sampling area DB1, and the temporary skin area DB2 is determined.
Since the lighting state is estimated from, the lighting state can be appropriately estimated. As a result, the correction of the color image DC1 is appropriately performed, and the extraction of the skin region DB3 is properly performed.

【0127】<2.第2の実施の形態>第1の実施の形
態における肌領域の抽出は、対象物である頭部が黒髪を
有することを前提としている。すなわち、髪が黒い場合
には3次元計測装置34では頭髪領域の距離データを取
得することができないため、距離画像DSの大部分が肌
に対応しているという前提の下で処理を行っている。
<2. Second Embodiment> The extraction of the skin region in the first embodiment is based on the premise that the head, which is the target, has black hair. That is, when the hair is black, the three-dimensional measuring device 34 cannot acquire the distance data of the hair region, so that the processing is performed on the assumption that most of the distance image DS corresponds to the skin. .

【0128】しかしながら、白髪や金髪、あるいは、髪
を染めている場合には3次元計測装置34により頭髪領
域の距離データも取得される。そこで、第1の実施の形
態におけるサンプリング領域の抽出(ステップS30
2)を変更することにより、黒髪でない場合であっても
適切に肌領域を抽出することができる手法を第2の実施
の形態として以下に説明する。なお、第2の実施の形態
に係る立体模型作成システム1の構成は第1の実施の形
態と同様であり、動作についてもサンプリング領域の抽
出以外は同様である。以下の説明では、適宜、第1の実
施の形態にて用いた符号を付して説明を行う。
However, in the case of gray hair, blonde hair, or dyed hair, the three-dimensional measuring device 34 also acquires the distance data of the hair region. Therefore, extraction of the sampling area in the first embodiment (step S30)
A method of appropriately extracting a skin area even when the hair is not black by changing 2) will be described below as a second embodiment. The configuration of the three-dimensional model creation system 1 according to the second embodiment is the same as that of the first embodiment, and the operation is the same except for the extraction of the sampling area. In the following description, the description will be given with reference numerals used in the first embodiment as appropriate.

【0129】図19および図20は、第2の実施の形態
におけるサンプリング領域の抽出(ステップS302)
におけるの処理を示すフローチャートである。
FIGS. 19 and 20 show extraction of a sampling area in the second embodiment (step S302).
6 is a flowchart showing a process in.

【0130】まず、人物領域のみを示すカラー画像DC
1をグレー化し、グレー画像を判別分析法により2値化
する(ステップS411)。すなわち、グレー画像のヒ
ストグラムを求め、画素値の分布から2値化のためのし
きい値を求める。人物が黒髪でない場合、ヒストグラム
では髪の色と肌の色に相当する画素値が多く存在するた
め、2値化によりおよそ頭髪の領域と肌の領域とを異な
る画素値で示す2値画像が得られる。
First, a color image DC showing only the person area
1 is grayed, and the gray image is binarized by a discriminant analysis method (step S411). That is, a histogram of a gray image is obtained, and a threshold value for binarization is obtained from the distribution of pixel values. If the person does not have black hair, there are many pixel values corresponding to the hair color and the skin color in the histogram, so that binarization yields a binary image that roughly shows the hair region and the skin region with different pixel values. Can be

【0131】続いて、2値画像において画素値が0の領
域のクラスタリングを行い、面積が最大のクラスタのみ
を示す2値画像を求める(ステップS412)。これに
より、頭髪または肌のいずれかを示す最大のクラスタ
(以下、「第1クラスタ」という。)を得る。
Subsequently, clustering is performed on the area where the pixel value is 0 in the binary image, and a binary image showing only the cluster having the largest area is obtained (step S412). Thereby, the largest cluster indicating either the hair or the skin (hereinafter, referred to as “first cluster”) is obtained.

【0132】得られた第1クラスタには、穴埋め処理
(ステップS413)、並びに、モルフォロジーフィル
タによる膨張および収縮が施され(ステップS41
4)、ノイズの除去および整形が行われる。
The obtained first cluster is subjected to a filling process (step S413), and expansion and contraction by a morphological filter (step S41).
4), noise removal and shaping are performed.

【0133】その後、第1クラスタの面積と第1のクラ
スタ内で対応する距離データが存在する領域の面積との
割合が求められ、保存される(ステップS415)。
After that, the ratio between the area of the first cluster and the area of the area where the corresponding distance data exists in the first cluster is obtained and stored (step S415).

【0134】一方、グレー画像から求められた2値画像
の画素値が1の領域に対してもステップS412〜S4
15と同様の処理が行われる。すなわち、画素値が1の
領域をクラスタリングし、面積が最大のクラスタ(以
下、「第2クラスタ」という。)のみを示す2値画像を
求め(ステップS416)、第2クラスタに穴埋め処
理、並びに、膨張および収縮を施す(ステップS42
1,S422)。これにより、第1クラスタが頭髪に対
応するクラスタの場合、第2クラスタは肌に対応するク
ラスタとして求められ、第1クラスタが肌に対応するク
ラスタの場合、第2クラスタは頭髪に対応するクラスタ
として求められる。
On the other hand, even if the pixel value of the binary image obtained from the gray image is one, steps S412 to S4 are performed.
The same processing as 15 is performed. In other words, the region where the pixel value is 1 is clustered, and a binary image indicating only the cluster having the largest area (hereinafter, referred to as “second cluster”) is obtained (step S416), the second cluster is filled in, and Perform expansion and contraction (step S42)
1, S422). Accordingly, when the first cluster is a cluster corresponding to the hair, the second cluster is obtained as a cluster corresponding to the skin, and when the first cluster is a cluster corresponding to the skin, the second cluster is determined as a cluster corresponding to the hair. Desired.

【0135】その後、第2クラスタ内にて距離データが
存在する割合が求められる(ステップS423)。
Thereafter, the ratio of the existence of the distance data in the second cluster is obtained (step S423).

【0136】次に、第1および第2クラスタのうち、距
離データが存在する領域の割合が大きい方を暫定領域と
して決定する(ステップS424)。一般的に、頭髪を
示すクラスタの最大のものは肌を示すクラスタの最大の
ものよりも大きくなるため、ステップS424により、
肌に相当する領域に含まれるクラスタが暫定領域として
取得される。
Next, of the first and second clusters, the one in which the ratio of the area where the distance data exists is larger is determined as the temporary area (step S424). In general, the largest cluster representing the head hair is larger than the largest cluster representing the skin, and therefore, according to step S424,
The cluster included in the area corresponding to the skin is obtained as a temporary area.

【0137】暫定領域が求められると、暫定領域に対応
する距離画像DS中の領域が第1の実施の形態のステッ
プS321と同様に微分され、微分値が所定のしきい値
よりも小さな領域を示す2値画像が求められる(ステッ
プS425)。これにより、第1の実施の形態と同様
に、視線方向に対しておよそ垂直な肌の領域の一部が確
実に抽出される。
When the provisional area is obtained, the area in the distance image DS corresponding to the provisional area is differentiated in the same manner as in step S321 of the first embodiment, and the area whose differential value is smaller than a predetermined threshold value is determined. A binary image shown is obtained (step S425). Thus, as in the first embodiment, a part of the skin region approximately perpendicular to the line of sight is reliably extracted.

【0138】その後、第1の実施の形態におけるステッ
プS322〜S326と同様の処理が行われ、適切なサ
ンプリング領域DB1が求められる。
Thereafter, the same processing as in steps S322 to S326 in the first embodiment is performed, and an appropriate sampling area DB1 is obtained.

【0139】以上説明したように、第2の実施の形態で
は、頭髪に対応する距離データが存在する場合であって
も適切に実際の肌の領域に含まれるサンプリング領域D
B1を求めることができ、対象となる人物が黒髪でない
場合であっても適切に肌領域DB3を抽出することがで
きる。
As described above, in the second embodiment, even when distance data corresponding to the hair exists, the sampling area D included in the actual skin area is appropriately included.
B1 can be obtained, and the skin region DB3 can be appropriately extracted even when the target person is not black hair.

【0140】<3.変形例>以上、この発明に係るデー
タ処理装置40を有する立体模型作成システム1の構成
および動作について説明してきたが、この発明は上記実
施の形態に限定されるものではなく、様々な変形が可能
である。
<3. Modifications> Although the configuration and operation of the three-dimensional model creation system 1 having the data processing device 40 according to the present invention have been described above, the present invention is not limited to the above embodiment, and various modifications are possible. It is.

【0141】例えば、上記実施の形態ではカラー画像D
Cから背景領域を削除して予め人物領域を求めるように
しているが、肌領域を抽出するためには背景領域の削除
は必ずしも必要ではない。カラー画像DCにおける画素
値の補正は距離データが存在する領域のみに行われるた
め、予め距離データが存在する領域が補正の対象となる
処理領域として決定されるようになっていてもよい。
For example, in the above embodiment, the color image D
Although the background area is deleted from C and the person area is obtained in advance, it is not always necessary to delete the background area in order to extract the skin area. Since the correction of the pixel value in the color image DC is performed only in the area where the distance data exists, the area where the distance data exists may be determined in advance as the processing area to be corrected.

【0142】すなわち、カラー画像DCのうち距離デー
タが存在する領域を3次元画像である距離画像DSと互
いに対応付け可能な2次元画像として捉えることによ
り、このような互いに対応付け可能な2次元画像と3次
元画像とを用いて色補正を伴う領域抽出を実現すること
ができる。
That is, the region where the distance data exists in the color image DC is regarded as a two-dimensional image which can be associated with the distance image DS which is a three-dimensional image. Region extraction involving color correction can be realized using the image and the three-dimensional image.

【0143】一方、距離データが存在する2次元のカラ
ー画像DC中の領域の全てが補正の対象である処理領域
とされる必要もない。例えば、服や頭髪の一部の領域を
予め知ることができるのであれば、このような領域は補
正の対象から外されてよい。
On the other hand, it is not necessary that all the regions in the two-dimensional color image DC in which the distance data exist are set as the processing regions to be corrected. For example, if a partial area of clothes or hair can be known in advance, such an area may be excluded from the correction target.

【0144】また、上記実施の形態ではカラー画像DC
から領域抽出を行うようになっているが、RGBのいず
れかに対する処理をモノクロ画像に適用することによ
り、モノクロ画像に対して画素値の補正を伴う領域抽出
が可能となる。
In the above embodiment, the color image DC
However, by applying a process for any of RGB to a monochrome image, it is possible to extract a region with a pixel value correction from the monochrome image.

【0145】また、上記実施の形態では対象物への照明
状態のパラメータを求めることで照明状態を推定し、カ
ラー画像DC1の画素値を適切に補正するようにしてい
るが、環境光以外の照明状態のパラメータが既知、ある
いは、他の手法により予め求められて準備される場合に
は、これらのパラメータを数1に適用することで、環境
光のみの照明下にて取得されるであろう補正後のカラー
画像DC2を求めることができる。すなわち、照明状態
が既知であるならば照明状態を推定することなくカラー
画像DC1を適切に補正することができる。
In the above embodiment, the illumination state is estimated by obtaining the parameter of the illumination state of the object, and the pixel value of the color image DC1 is appropriately corrected. If the parameters of the state are known or are pre-determined and prepared by other techniques, applying these parameters to Equation 1 will result in a correction that would be obtained under ambient light only illumination A subsequent color image DC2 can be obtained. That is, if the illumination state is known, the color image DC1 can be appropriately corrected without estimating the illumination state.

【0146】また、上記実施の形態では、人物の頭部を
対象としているが、対象物は人物の頭部に限定されるも
のではなく、様々な他の物体が用いられてもよい。
In the above embodiment, the head of a person is targeted, but the object is not limited to the head of a person, and various other objects may be used.

【0147】また、上記実施の形態では、仮の肌領域D
B2がおよそ一定の色を有するものとしてRGBそれぞ
れについて1組の照明状態のパラメータを求めるように
しているが、仮の肌領域DB2を分割した上で、それぞ
れの分割領域に対して照明状態のパラメータの算出が行
われてもよい。この場合、補正すべき処理領域の各部分
が最も近い分割領域に係るパラメータを用いて補正され
ることにより、さらに適正な補正が実現される。
In the above embodiment, the temporary skin area D
A set of illumination state parameters is determined for each of RGB, assuming that B2 has a substantially constant color. However, after dividing the temporary skin area DB2, the illumination state parameters are determined for each of the divided areas. May be calculated. In this case, each portion of the processing region to be corrected is corrected using the parameter related to the closest divided region, so that more appropriate correction is realized.

【0148】さらに、上記実施の形態では、立体模型作
成システム1について説明したが、この発明に係る領域
抽出は、他の装置、あるいは、単独の装置に利用されて
もよい。例えば、互いに対応付け可能な2次元画像およ
び3次元画像を用いてモデリングを行うコンピュータグ
ラフィックスに応用されてもよい。
Further, in the above-described embodiment, the three-dimensional model creation system 1 has been described, but the region extraction according to the present invention may be used for another device or a single device. For example, the present invention may be applied to computer graphics that performs modeling using a two-dimensional image and a three-dimensional image that can be associated with each other.

【0149】[0149]

【発明の効果】請求項1ないし6に記載の発明では、対
象物の形状に基づいて2次元画像中の処理領域を補正す
るため、適切な領域抽出を行うことができる。
According to the first to sixth aspects of the present invention, a processing area in a two-dimensional image is corrected based on the shape of the object, so that appropriate area extraction can be performed.

【0150】また、請求項2に記載の発明では、照明状
態を推定することにより適切な領域抽出を行うことがで
きる。
According to the second aspect of the present invention, an appropriate region can be extracted by estimating an illumination state.

【0151】また、請求項3に記載の発明では、参照領
域の画素値から仮領域を抽出し、仮領域から照明状態を
推定するので、適切に照明状態を推定することができ
る。
According to the third aspect of the present invention, since the temporary area is extracted from the pixel values of the reference area and the illumination state is estimated from the temporary area, the illumination state can be appropriately estimated.

【0152】また、請求項4に記載の発明では、2次元
画像から人物の頭部の肌領域を適切に抽出することがで
きる。
According to the fourth aspect of the present invention, it is possible to appropriately extract the skin area of the head of a person from a two-dimensional image.

【図面の簡単な説明】[Brief description of the drawings]

【図1】この発明に係るデータ処理装置を有する立体模
型作成システム1の構成を示すブロック図である。
FIG. 1 is a block diagram showing a configuration of a three-dimensional model creation system 1 having a data processing device according to the present invention.

【図2】立体模型作成システムの動作を示すフローチャ
ートである。
FIG. 2 is a flowchart showing the operation of the three-dimensional model creation system.

【図3】図2中のメイン処理におけるモデリングシステ
ムの動作を示すフローチャートである。
FIG. 3 is a flowchart showing an operation of the modeling system in a main process in FIG. 2;

【図4】モデリングシステムの表示装置の表示例を示す
図である。
FIG. 4 is a diagram illustrating a display example of a display device of the modeling system.

【図5】図3中の編集におけるモデリングシステムの動
作を示すフローチャートである。
FIG. 5 is a flowchart showing an operation of the modeling system in editing in FIG. 3;

【図6】撮影および計測後の表示装置の表示例を示す図
である。
FIG. 6 is a diagram showing a display example of the display device after photographing and measurement.

【図7】編集中の表示装置の表示例を示す図である。FIG. 7 is a diagram illustrating a display example of the display device during editing.

【図8】図5中の肌領域の表示におけるデータ処理装置
の動作を主として示すフローチャートである。
FIG. 8 is a flowchart mainly showing an operation of the data processing apparatus in displaying a skin area in FIG. 5;

【図9】肌領域の表示に係る動作が行われる際のデータ
処理装置の機能構成を示すブロック図である。
FIG. 9 is a block diagram illustrating a functional configuration of the data processing device when an operation related to display of a skin region is performed.

【図10】図8中のサンプリング領域の抽出におけるデ
ータ処理装置の動作を示すフローチャートである。
FIG. 10 is a flowchart showing an operation of the data processing device in extracting a sampling area in FIG. 8;

【図11】サンプリング領域の抽出方法を説明するため
の図である。
FIG. 11 is a diagram for explaining a sampling area extraction method.

【図12】サンプリング領域の抽出方法を説明するため
の図である。
FIG. 12 is a diagram for explaining a sampling area extraction method.

【図13】図8中の肌領域の抽出におけるデータ処理装
置の動作を示すフローチャートである。
FIG. 13 is a flowchart showing an operation of the data processing device in extracting a skin region in FIG. 8;

【図14】図9中の肌領域抽出部の機能構成を示すブロ
ック図である。
FIG. 14 is a block diagram illustrating a functional configuration of a skin region extraction unit in FIG. 9;

【図15】仮の肌領域を例示する図である。FIG. 15 is a diagram illustrating a temporary skin region.

【図16】図8中のカラー画像の補正におけるデータ処
理装置の動作を示すフローチャートである。
FIG. 16 is a flowchart illustrating an operation of the data processing device in correcting a color image in FIG. 8;

【図17】図9中の補正部の機能構成を示すブロック図
である。
17 is a block diagram illustrating a functional configuration of a correction unit in FIG.

【図18】図8中の肌領域の整形におけるデータ処理装
置の動作を示すフローチャートである。
FIG. 18 is a flowchart showing an operation of the data processing device in shaping the skin region in FIG. 8;

【図19】第2の実施の形態に係るサンプリング領域の
抽出におけるデータ処理装置の動作を示すフローチャー
トである。
FIG. 19 is a flowchart showing an operation of the data processing device in extracting a sampling area according to the second embodiment.

【図20】第2の実施の形態に係るサンプリング領域の
抽出におけるデータ処理装置の動作を示すフローチャー
トである。
FIG. 20 is a flowchart showing an operation of the data processing device in extracting a sampling area according to the second embodiment.

【符号の説明】[Explanation of symbols]

9 記録媒体 40 データ処理装置 401 サンプリング領域抽出部 402 肌領域抽出部 403 補正部 421 肌色算出部 422 領域抽出部 431 照明状態算出部 432 画素値算出部 DB1 サンプリング領域 DB2 仮の肌領域 DC1 カラー画像 DS 距離画像 S304,S305 ステップ Reference Signs List 9 recording medium 40 data processing device 401 sampling region extraction unit 402 skin region extraction unit 403 correction unit 421 skin color calculation unit 422 region extraction unit 431 lighting state calculation unit 432 pixel value calculation unit DB1 sampling region DB2 temporary skin region DC1 color image DS Distance image S304, S305 Step

Claims (6)

【特許請求の範囲】[Claims] 【請求項1】 互いに対応付け可能な2次元画像および
3次元画像を用いて前記2次元画像から領域抽出を行う
画像処理装置であって、 前記3次元画像が示す対象物の形状に基づいて前記2次
元画像中の処理領域の画素値を補正する手段と、 補正された前記処理領域から領域抽出を行う手段と、を
備えることを特徴とする画像処理装置。
1. An image processing apparatus for extracting a region from a two-dimensional image by using a two-dimensional image and a three-dimensional image that can be associated with each other, wherein the image processing device performs a region extraction based on a shape of an object indicated by the three-dimensional image. An image processing apparatus comprising: means for correcting a pixel value of a processing area in a two-dimensional image; and means for extracting an area from the corrected processing area.
【請求項2】 請求項1に記載の画像処理装置であっ
て、 前記画素値を補正する手段が、 前記対象物への照明状態を推定する手段と、 推定された前記照明状態に基づいて前記処理領域の画素
値を前記対象物の形状から独立した画素値へと補正する
手段と、を有することを特徴とする画像処理装置。
2. The image processing apparatus according to claim 1, wherein the means for correcting the pixel value includes: means for estimating an illumination state on the object; and Means for correcting the pixel value of the processing area to a pixel value independent of the shape of the object.
【請求項3】 請求項2に記載の画像処理装置であっ
て、 前記2次元画像が取得された際の視線方向に対してほぼ
垂直となる前記対象物上の領域に基づいて前記2次元画
像中の参照領域を決定する手段と、 前記参照領域の画素値から基準画素値を求める手段と、 前記基準画素値に基づいて前記2次元画像から仮領域を
抽出する手段と、をさらに備え、 前記照明状態を推定する手段が、前記2次元画像の前記
仮領域内の画素値および当該仮領域に対応する前記対象
物上の領域の形状に基づいて前記照明状態を推定するこ
とを特徴とする画像処理装置。
3. The image processing apparatus according to claim 2, wherein the two-dimensional image is based on an area on the object that is substantially perpendicular to a line of sight when the two-dimensional image is acquired. Means for determining a reference area within, means for determining a reference pixel value from the pixel value of the reference area, and means for extracting a temporary area from the two-dimensional image based on the reference pixel value, further comprising: An image for estimating an illumination state based on a pixel value in the temporary area of the two-dimensional image and a shape of an area on the object corresponding to the temporary area. Processing equipment.
【請求項4】 請求項1ないし3のいずれかに記載の画
像処理装置であって、 前記対象物が人物の頭部を含み、前記領域抽出を行う手
段が前記頭部の肌領域を抽出することを特徴とする画像
処理装置。
4. The image processing apparatus according to claim 1, wherein the object includes a human head, and the area extracting unit extracts a skin area of the head. An image processing apparatus characterized by the above-mentioned.
【請求項5】 互いに対応付け可能な2次元画像および
3次元画像を用いて前記2次元画像から領域抽出を行う
領域抽出方法であって、 前記3次元画像が示す対象物の形状に基づいて前記2次
元画像中の処理領域の画素値を補正する工程と、 補正された前記処理領域から領域抽出を行う工程と、を
有することを特徴とする領域抽出方法。
5. An area extraction method for extracting an area from a two-dimensional image using a two-dimensional image and a three-dimensional image which can be associated with each other, wherein the method is based on a shape of an object indicated by the three-dimensional image. A region extracting method, comprising: correcting a pixel value of a processing region in a two-dimensional image; and extracting a region from the corrected processing region.
【請求項6】 互いに対応付け可能な2次元画像および
3次元画像を用いて前記2次元画像からの領域抽出をコ
ンピュータに行わせるプログラムを記録したコンピュー
タ読み取り可能な記録媒体であって、 前記プログラムは前記コンピュータに、 前記3次元画像が示す対象物の形状に基づいて前記2次
元画像中の処理領域の画素値を補正する工程と、 補正された前記処理領域から領域抽出を行う工程と、を
実行させることを特徴とする記録媒体。
6. A computer-readable recording medium in which a program for causing a computer to extract a region from a two-dimensional image using a two-dimensional image and a three-dimensional image that can be associated with each other is recorded, wherein the program is The computer executes a step of correcting a pixel value of a processing area in the two-dimensional image based on a shape of an object indicated by the three-dimensional image, and a step of extracting an area from the corrected processing area. A recording medium characterized by causing a recording medium to be read.
JP2000017003A 2000-01-26 2000-01-26 Image processor, area extracting method and recording medium Pending JP2001209796A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2000017003A JP2001209796A (en) 2000-01-26 2000-01-26 Image processor, area extracting method and recording medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2000017003A JP2001209796A (en) 2000-01-26 2000-01-26 Image processor, area extracting method and recording medium

Publications (1)

Publication Number Publication Date
JP2001209796A true JP2001209796A (en) 2001-08-03

Family

ID=18544054

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2000017003A Pending JP2001209796A (en) 2000-01-26 2000-01-26 Image processor, area extracting method and recording medium

Country Status (1)

Country Link
JP (1) JP2001209796A (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2008099938A1 (en) * 2007-02-16 2008-08-21 Kao Corporation Hair image display method and display device
JP2008198156A (en) * 2007-02-16 2008-08-28 Kao Corp Hair image display method and display device
JP2008194402A (en) * 2007-02-16 2008-08-28 Kao Corp Hair image forming method and display device
JP2009252243A (en) * 2008-04-04 2009-10-29 Nhn Corp Adult object determination method and system
US7719569B2 (en) 2008-05-28 2010-05-18 Kabushiki Kaisha Toshiba Image processing apparatus and image processing method
JP2014142836A (en) * 2013-01-24 2014-08-07 Ricoh Co Ltd Processing apparatus, processing system, processing method, and program
CN109030490A (en) * 2018-07-18 2018-12-18 芜湖固高自动化技术有限公司 A kind of defeated and dispersed method of anti-stacking of shipping laser scanning
JP2020098422A (en) * 2018-12-17 2020-06-25 株式会社東芝 Image processing apparatus, method and program
JP2021032660A (en) * 2019-08-22 2021-03-01 トヨタ自動車株式会社 Object recognizing device

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4586995B2 (en) * 2007-02-16 2010-11-24 花王株式会社 Hair image display method and display device
JP2008198156A (en) * 2007-02-16 2008-08-28 Kao Corp Hair image display method and display device
JP2008194402A (en) * 2007-02-16 2008-08-28 Kao Corp Hair image forming method and display device
WO2008099938A1 (en) * 2007-02-16 2008-08-21 Kao Corporation Hair image display method and display device
US8428382B2 (en) 2007-02-16 2013-04-23 Kao Corporation Hair image display method and display apparatus
JP4586996B2 (en) * 2007-02-16 2010-11-24 花王株式会社 Hair image forming method and display device
JP2009252243A (en) * 2008-04-04 2009-10-29 Nhn Corp Adult object determination method and system
US8013890B2 (en) 2008-05-28 2011-09-06 Kabushiki Kaisha Toshiba Image processing apparatus and image processing method for recognizing an object with color
US7719569B2 (en) 2008-05-28 2010-05-18 Kabushiki Kaisha Toshiba Image processing apparatus and image processing method
JP2014142836A (en) * 2013-01-24 2014-08-07 Ricoh Co Ltd Processing apparatus, processing system, processing method, and program
CN109030490A (en) * 2018-07-18 2018-12-18 芜湖固高自动化技术有限公司 A kind of defeated and dispersed method of anti-stacking of shipping laser scanning
CN109030490B (en) * 2018-07-18 2020-12-11 芜湖固高自动化技术有限公司 Laser scanning method for preventing stacking collapse for freight transportation
JP2020098422A (en) * 2018-12-17 2020-06-25 株式会社東芝 Image processing apparatus, method and program
JP2021032660A (en) * 2019-08-22 2021-03-01 トヨタ自動車株式会社 Object recognizing device
JP7120181B2 (en) 2019-08-22 2022-08-17 トヨタ自動車株式会社 Object recognition device

Similar Documents

Publication Publication Date Title
CN107852533B (en) Three-dimensional content generation device and three-dimensional content generation method thereof
JP4537104B2 (en) Marker detection method, marker detection device, position and orientation estimation method, and mixed reality space presentation method
CN107169475B (en) A kind of face three-dimensional point cloud optimized treatment method based on kinect camera
Wang et al. Estimation of multiple directional light sources for synthesis of augmented reality images
JP3639475B2 (en) 3D model generation apparatus, 3D model generation method, and recording medium on which 3D model generation program is recorded
EP1969559B1 (en) Contour finding in segmentation of video sequences
WO2016123977A1 (en) Image colour identification method and device, terminal and storage medium
JP4136420B2 (en) Information processing method and apparatus
US20210012550A1 (en) Additional Developments to the Automatic Rig Creation Process
US8451322B2 (en) Imaging system and method
US20090010546A1 (en) Edge-Guided Morphological Closing in Segmentation of Video Sequences
US20090154807A1 (en) Edge Comparison in Segmentation of Video Sequences
JPH11108633A (en) Three-dimensional shape measuring device and three-dimensional engraving device using the same
JP2004030007A (en) Makeup simulation apparatus, makeup simulation method, makeup simulation program and recording medium with program recorded thereon
JP2001209796A (en) Image processor, area extracting method and recording medium
JP4203279B2 (en) Attention determination device
JP5059503B2 (en) Image composition apparatus, image composition method, and image composition program
JP2004280776A (en) Method for determining shape of object in image
CN111767756A (en) Method for automatically detecting facial flaws
TWI462027B (en) Image processing device and image processing method thereof
JP2000185060A (en) Method for extracting margin line of tooth
JP2000339498A (en) Three-dimensional shape data processor
KR20240044495A (en) Inspection support system, inspection support method, and inspection support program
JP2015154886A (en) Perceived moistness evaluation device, perceived moistness evaluation method, and perceived moistness evaluation program
CN111031848B (en) Method and system for generating 3D digital model for use in wig manufacture

Legal Events

Date Code Title Description
A711 Notification of change in applicant

Free format text: JAPANESE INTERMEDIATE CODE: A712

Effective date: 20050613