JP6988406B2 - Hand position detection method, hand position detection device, and hand position detection program - Google Patents

Hand position detection method, hand position detection device, and hand position detection program Download PDF

Info

Publication number
JP6988406B2
JP6988406B2 JP2017226978A JP2017226978A JP6988406B2 JP 6988406 B2 JP6988406 B2 JP 6988406B2 JP 2017226978 A JP2017226978 A JP 2017226978A JP 2017226978 A JP2017226978 A JP 2017226978A JP 6988406 B2 JP6988406 B2 JP 6988406B2
Authority
JP
Japan
Prior art keywords
hand
center
joint
dimensional coordinates
upper limb
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2017226978A
Other languages
Japanese (ja)
Other versions
JP2019096212A (en
Inventor
源太 鈴木
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujitsu Ltd
Original Assignee
Fujitsu 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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP2017226978A priority Critical patent/JP6988406B2/en
Publication of JP2019096212A publication Critical patent/JP2019096212A/en
Application granted granted Critical
Publication of JP6988406B2 publication Critical patent/JP6988406B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Image Analysis (AREA)

Description

本発明は、手位置検出方法、手位置検出装置、及び手位置検出プログラムに関する。 The present invention relates to a hand position detection method, a hand position detection device, and a hand position detection program.

近年、工場等の作業現場では、深度センサ等の距離計測装置を利用して所定の空間内における作業者の上肢の動作を検出し、作業員の作業状況を管理することが検討されている。この種の技術では、例えば、距離計測装置により得られる計測空間内の距離の情報に基づいて、コンピュータが、計測空間における作業員の手のひら及び関節の三次元座標を算出する。この際、コンピュータは、距離の情報に基づいて、作業員の上肢と対応する上肢領域を検出し、該上肢領域から手のひらの位置、手首、肘、肩等の関節の位置を検出した後、それぞれの三次元座標を算出する。 In recent years, at work sites such as factories, it has been studied to detect the movement of the upper limbs of a worker in a predetermined space by using a distance measuring device such as a depth sensor and manage the working condition of the worker. In this type of technique, for example, a computer calculates the three-dimensional coordinates of a worker's palm and joint in the measurement space based on the distance information in the measurement space obtained by the distance measurement device. At this time, the computer detects the upper limb region corresponding to the upper limb of the worker based on the distance information, detects the position of the palm, the position of the joints such as the wrist, elbow, and shoulder from the upper limb region, and then each. Calculate the three-dimensional coordinates of.

ところが、距離計測装置による距離の計測を行う場合、作業員自身の頭部又は胴体部分、或いは作業エリアに設置された棚等により作業員の上肢の一部分が隠れた状態(すなわちオクルージョンが発生した状態)で計測することがある。上肢の一部分が隠れた状態で計測した距離の情報に基づいて検出される上肢領域は、上肢の一部分(例えば手のひら)と対応する領域が欠損している。このような上肢の一部分と対応する領域が欠損した上肢領域を検出した場合、手のひらの位置や各関節の位置を誤検出してしまい、誤った三次元座標を算出してしまうことがある。 However, when measuring the distance with a distance measuring device, a part of the worker's upper limbs is hidden by the worker's own head or body, or a shelf installed in the work area (that is, a state where occlusion has occurred). ) May be measured. The upper limb region detected based on the distance information measured in a state where a part of the upper limb is hidden lacks a region corresponding to a part of the upper limb (for example, the palm). When the upper limb region in which the region corresponding to a part of the upper limb is missing is detected, the position of the palm or the position of each joint may be erroneously detected, and the erroneous three-dimensional coordinates may be calculated.

オクルージョンによる手のひらの位置や各関節の位置の誤検出を防ぐ技術の1つとして、距離の計測結果における第1関節位置までの距離と、該第1関節位置と隣接する第2関節位置までの距離との関係を学習しておく方法がある(例えば、特許文献1を参照)。この種の技術では、オクルージョンにより第2関節位置までの距離が計測結果に含まれない場合でも、計測された第1関節位置までの距離と、学習しておいた関係とに基づいて第2関節位置までの距離を推定することが可能となる。 As one of the techniques to prevent erroneous detection of the position of the palm and the position of each joint by occlusion, the distance to the first joint position in the distance measurement result and the distance to the second joint position adjacent to the first joint position. There is a method of learning the relationship with (see, for example, Patent Document 1). With this type of technique, even if the distance to the 2nd joint position is not included in the measurement result due to occlusion, the 2nd joint is based on the measured distance to the 1st joint position and the learned relationship. It is possible to estimate the distance to the position.

特開2016−212688号公報Japanese Unexamined Patent Publication No. 2016-212688

しかしながら、距離の計測結果における各関節位置までの距離の関係を学習する場合、手のひらや上肢の各関節までの距離が計測される状態で計測した結果(学習データ)を、事前に大量に収集する必要がある。また、関節位置までの距離の関係に基づいて関節位置までの距離を推定する方法では、距離の計測結果に手のひらまでの距離及び各関節までの距離の情報が含まれない場合には、手のひらや各関節の位置を検出することが困難となる。 However, when learning the relationship of the distance to each joint position in the distance measurement result, a large amount of measurement results (learning data) are collected in advance while the distance to each joint of the palm or upper limb is measured. There is a need. In addition, in the method of estimating the distance to the joint position based on the relationship of the distance to the joint position, if the distance measurement result does not include the information on the distance to the palm and the distance to each joint, the palm or It becomes difficult to detect the position of each joint.

1つの側面において、本発明は、手のひらや上肢の各関節が隠れた状態で計測された距離の情報から、手のひらや各関節の位置を正しく検出することを目的とする。 In one aspect, it is an object of the present invention to correctly detect the position of the palm and each joint from the distance information measured in a state where each joint of the palm and the upper limb is hidden.

1つの態様の手位置検出方法では、コンピュータが、下記の5つの処理を行う。第1の処理は、所定の計測範囲内に存在する物体までの距離の情報を含む画像から、対象者の上肢部分と対応する上肢領域を検出する処理である。第2の処理は、画像における上肢領域の形状及び位置に基づいて、該画像内での手中心及び上肢の関節の位置を検出するとともに、検出した手中心及び関節のそれぞれの計測範囲内での三次元座標を算出する処理である。第3の処理は、算出した手中心の三次元座標及び関節の三次元座標のそれぞれが、予め定められた前記対象者の上肢における手中心及び各関節の位置関係と整合しているか否かを判定する処理である。第4の処理は、算出した三次元座標と予め定められた手中心及び各関節の位置関係とが整合していない場合に、画像内での手中心の位置を変更して手中心の三次元座標及び関節の三次元座標を補正する処理である。第5の処理は、算出した三次元座標と予め定められた手中心及び各関節の位置関係とが整合している場合に、現在の手中心の三次元座標及び関節の三次元座標を計測範囲内での三次元座標に決定する処理である。 In one aspect of the hand position detection method, the computer performs the following five processes. The first process is a process of detecting an upper limb region corresponding to a target person's upper limb portion from an image including information on the distance to an object existing within a predetermined measurement range. The second process detects the positions of the center of the hand and the joints of the upper limbs in the image based on the shape and position of the upper limb region in the image, and within the respective measurement ranges of the detected center of the hand and the joints. This is a process for calculating three-dimensional coordinates. The third process determines whether or not each of the calculated three-dimensional coordinates of the hand center and the three-dimensional coordinates of the joint is consistent with the predetermined positional relationship between the hand center and each joint in the upper limb of the subject. It is a judgment process. The fourth process changes the position of the hand center in the image when the calculated three-dimensional coordinates do not match the predetermined hand center and the positional relationship of each joint, and the hand center three-dimensional. It is a process to correct the coordinates and the three-dimensional coordinates of the joint. The fifth process measures the current 3D coordinates of the hand center and the 3D coordinates of the joint when the calculated 3D coordinates match the predetermined hand center and the positional relationship of each joint. It is a process to determine the three-dimensional coordinates within.

上述の態様によれば、手のひらや上肢の各関節が隠れた状態で計測した距離の情報から、手のひらや各関節の位置を正しく検出することが可能となる。 According to the above aspect, it is possible to correctly detect the position of the palm and each joint from the distance information measured in the state where each joint of the palm and the upper limb is hidden.

第1の実施形態に係る手位置検出装置の機能的構成を示す図である。It is a figure which shows the functional structure of the hand position detection apparatus which concerns on 1st Embodiment. 寸法情報の内容を示す図である。It is a figure which shows the content of the dimensional information. 第1の実施形態に係る座標算出処理の内容を説明するフローチャートである。It is a flowchart explaining the content of the coordinate calculation process which concerns on 1st Embodiment. 第1の実施形態における座標補正処理の内容を説明するフローチャートである。It is a flowchart explaining the content of the coordinate correction processing in 1st Embodiment. 第1の実施形態における整合性判別処理の内容を説明するフローチャートである。It is a flowchart explaining the content of the consistency determination processing in 1st Embodiment. 第1の実施形態における座標再計算処理の内容を説明するフローチャートである。It is a flowchart explaining the content of the coordinate recalculation processing in 1st Embodiment. 手位置検出装置の適用例を説明する図である。It is a figure explaining the application example of the hand position detection device. 手領域の距離を示す情報が欠落した深度画像の例を示す図である。It is a figure which shows the example of the depth image which lacked the information which shows the distance of a hand area. 背景差分法による上肢領域の検出方法を説明する図である。It is a figure explaining the detection method of the upper limb region by the background subtraction method. 深度画像における手中心及び各関節の位置の検出方法の一例を説明する図である。It is a figure explaining an example of the detection method of the center of a hand and the position of each joint in a depth image. 空間整合性の判別方法を説明する図である。It is a figure explaining the method of discriminating the spatial consistency. 手中心の位置の変更方法を説明する図である。It is a figure explaining the method of changing the position of a hand center. 三次元座標の算出に用いる深度値の推定方法を説明するグラフ図である。It is a graph which explains the estimation method of the depth value used for the calculation of three-dimensional coordinates. 座標補正処理の変形例を説明するフローチャート(その1)である。It is a flowchart (the 1) explaining the modification of the coordinate correction processing. 座標補正処理の変形例を説明するフローチャート(その2)である。It is a flowchart (the 2) explaining the modification of the coordinate correction processing. 隣接領域判別処理の内容を説明するフローチャートである。It is a flowchart explaining the content of the adjacent area discrimination process. 隣接領域と判別結果との関係を説明する図である。It is a figure explaining the relationship between the adjacent area and the discrimination result. 整合性判別処理の変形例を説明するフローチャート(その1)である。It is a flowchart (the 1) which explains the modification of the consistency determination process. 整合性判別処理の変形例を説明するフローチャート(その2)である。It is a flowchart (the 2) explaining the modification of the consistency determination process. 第2の実施形態に係る手位置検出装置の機能的構成を示す図である。It is a figure which shows the functional structure of the hand position detection apparatus which concerns on 2nd Embodiment. 第2の実施形態に係る座標算出処理の内容を説明するフローチャートである。It is a flowchart explaining the content of the coordinate calculation process which concerns on 2nd Embodiment. 深度画像から体領域を検出する処理の内容を説明するフローチャートである。It is a flowchart explaining the content of the process of detecting a body region from a depth image. 深度画像から上肢領域を検出する処理の内容を説明するフローチャートである。It is a flowchart explaining the content of the process of detecting the upper limb area from a depth image. 手中心及び関節の三次元座標を算出する処理の内容を説明するフローチャートである。It is a flowchart explaining the content of the process of calculating the three-dimensional coordinates of a hand center and a joint. 第2の実施形態における整合性判別処理の内容を説明するフローチャートである。It is a flowchart explaining the content of the consistency determination processing in 2nd Embodiment. 深度画像の撮像範囲を説明する図である。It is a figure explaining the imaging range of a depth image. 深度画像の例を示す図である。It is a figure which shows the example of the depth image. 体領域の検出方法を説明する図(その1)である。It is a figure (the 1) explaining the detection method of a body region. 体領域の検出方法を説明する図(その2)である。It is a figure (the 2) explaining the detection method of a body region. 上肢領域の検出結果の例を示す図である。It is a figure which shows the example of the detection result of the upper limb region. 手中心の位置の検出結果の例を示す図である。It is a figure which shows the example of the detection result of the position of a hand center. 左上肢の関節の位置の決定方法を説明する図である。It is a figure explaining the method of determining the position of the joint of the left upper limb. 決定した手中心及び関節の位置を示す図である。It is a figure which shows the position of the determined hand center and joint. 手中心及び関節の位置の補正方法を説明する図である。It is a figure explaining the correction method of the position of a hand center and a joint. コンピュータのハードウェア構成を示す図である。It is a figure which shows the hardware configuration of a computer.

[第1の実施形態]
図1は、第1の実施形態に係る手位置検出装置の機能的構成を示す図である。
[First Embodiment]
FIG. 1 is a diagram showing a functional configuration of the hand position detection device according to the first embodiment.

図1に示すように、本実施形態の手位置検出装置1は、深度画像取得部110と、関節位置算出部120と、補正部130と、出力部140と、記憶部190とを含む。 As shown in FIG. 1, the hand position detection device 1 of the present embodiment includes a depth image acquisition unit 110, a joint position calculation unit 120, a correction unit 130, an output unit 140, and a storage unit 190.

深度画像取得部110は、手中心の位置を検出する検出領域内に存在する物体の表面までの距離(深度)を示す情報を含む深度画像を深度センサ2から取得する。ここで、手中心の位置は、検出領域内における手(手首から先の部分)の中心部分の三次元位置である。深度画像取得部110は、例えば、深度方向を法線方向とする平面内におけるU×V個の点のそれぞれと対応する深度値を含む深度画像を深度センサ2から取得する。なお、深度画像は、手中心の位置を検出する検出領域内に存在する物体の表面までの距離を示す情報の一例である。すなわち、深度画像取得部110は、手中心の位置を検出する検出領域内に存在する物体の表面までの距離を示す情報を取得する取得部の一例である。以下の説明では、手中心の位置を検出する検出領域のことを、深度画像の撮像範囲ともいう。 The depth image acquisition unit 110 acquires a depth image from the depth sensor 2 including information indicating the distance (depth) to the surface of the object existing in the detection region for detecting the position of the center of the hand. Here, the position of the center of the hand is the three-dimensional position of the central portion of the hand (the portion beyond the wrist) in the detection area. The depth image acquisition unit 110 acquires, for example, a depth image including depth values corresponding to each of U × V points in a plane whose normal direction is the depth direction from the depth sensor 2. The depth image is an example of information showing the distance to the surface of an object existing in the detection area for detecting the position of the center of the hand. That is, the depth image acquisition unit 110 is an example of an acquisition unit that acquires information indicating the distance to the surface of an object existing in the detection region for detecting the position of the center of the hand. In the following description, the detection area that detects the position of the center of the hand is also referred to as the imaging range of the depth image.

関節位置算出部120は、深度画像に基づいて、検出領域内に存在する手中心及び上肢の関節についての検出領域内での位置を示す三次元座標を算出する。本実施形態の手位置検出装置1における関節位置算出部120は、上肢領域検出部121と、画像内位置検出部122と、三次元座標算出部123とを含む。 The joint position calculation unit 120 calculates three-dimensional coordinates indicating the positions of the joints of the center of the hand and the upper limbs existing in the detection area in the detection area based on the depth image. The joint position calculation unit 120 in the hand position detection device 1 of the present embodiment includes an upper limb region detection unit 121, an in-image position detection unit 122, and a three-dimensional coordinate calculation unit 123.

上肢領域検出部121は、手中心の位置を検出する深度画像と、記憶部190に記憶させた背景画像191とに基づいて、深度画像内における人の上肢部分と対応する領域(上肢領域)を検出する。背景画像191は、人の上肢が存在しない状態の検出範囲内を深度センサ2により撮像した深度画像である。上肢領域検出部121は、検出対象となる深度画像を深度画像取得部110から直接取得してもよいし、記憶部190に記憶させた深度画像194を読み出して取得してもよい。 The upper limb region detection unit 121 determines a region (upper limb region) corresponding to the human upper limb portion in the depth image based on the depth image for detecting the position of the center of the hand and the background image 191 stored in the storage unit 190. To detect. The background image 191 is a depth image captured by the depth sensor 2 within the detection range in a state where the upper limbs of a person are not present. The upper limb region detection unit 121 may directly acquire the depth image to be detected from the depth image acquisition unit 110, or may read and acquire the depth image 194 stored in the storage unit 190.

画像内位置検出部122は、深度画像内での上肢領域の位置及び形状に基づいて、深度画像内における手中心の位置及び上肢の関節の位置を検出する。すなわち、画像内位置検出部122は、上肢領域検出部121における上肢領域の検出結果に基づいて、深度画像内における手中心の位置及び関節の位置を検出する。画像内位置検出部122は、上肢の関節の位置として、例えば、手首、肘、及び肩の位置を検出する。画像内位置検出部122は、例えば、深度画像内における上肢領域に基づいて上肢の延伸方向を示す線分群を求めた後、該線分群に基づいて手中心の位置及び各関節の位置を検出する。このとき、画像内位置検出部122は、例えば、手中心の位置を検出した後、該手中心の位置と深度画像の撮像範囲内における人の上肢の寸法とに基づいて、各関節の位置を検出する。 The in-image position detection unit 122 detects the position of the center of the hand and the position of the joint of the upper limb in the depth image based on the position and shape of the upper limb region in the depth image. That is, the position detection unit 122 in the image detects the position of the center of the hand and the position of the joint in the depth image based on the detection result of the upper limb region in the upper limb region detection unit 121. The position detection unit 122 in the image detects, for example, the positions of the wrists, elbows, and shoulders as the positions of the joints of the upper limbs. The in-image position detection unit 122, for example, obtains a line segment group indicating the extension direction of the upper limb based on the upper limb region in the depth image, and then detects the position of the center of the hand and the position of each joint based on the line segment group. .. At this time, the position detection unit 122 in the image detects the position of the center of the hand, and then determines the position of each joint based on the position of the center of the hand and the size of the upper limb of the person within the imaging range of the depth image. To detect.

三次元座標算出部123は、深度画像内における手中心及び各関節の位置と、深度値とに基づいて、検出領域内における手中心の位置を示す三次元座標及び各関節の位置を示す三次元座標を算出する。三次元座標算出部123は、既知の算出方法に従って、手中心の位置を示す三次元座標及び各関節の位置を示す三次元座標を算出する。例えば、三次元座標算出部123は、ピンホールカメラモデルを適用して、手中心の位置を示す三次元座標及び各関節の位置を示す三次元座標を算出する。 The three-dimensional coordinate calculation unit 123 has three-dimensional coordinates indicating the position of the hand center in the detection area and three dimensions indicating the position of each joint based on the positions of the hand center and each joint in the depth image and the depth value. Calculate the coordinates. The three-dimensional coordinate calculation unit 123 calculates the three-dimensional coordinates indicating the position of the center of the hand and the three-dimensional coordinates indicating the position of each joint according to a known calculation method. For example, the three-dimensional coordinate calculation unit 123 applies a pinhole camera model to calculate three-dimensional coordinates indicating the position of the center of the hand and three-dimensional coordinates indicating the position of each joint.

補正部130は、深度画像から算出した手中心及び各関節の三次元座標を補正する。補正部130は、深度画像から算出した手中心及び各関節の三次元座標と、記憶部190に記憶させた寸法情報192及び座標履歴193とに基づいて、三次元座標の補正の要否を判定する。そして、補正が必要であると判定した場合に、補正部130は、深度画像から算出した手中心及び各関節の三次元座標を補正する。寸法情報192は、深度画像の撮像範囲内で上肢を動かす人物(対象者)の上肢における手中心から手首までの寸法と、手首から肘までの寸法とを含む。座標履歴193は、手位置検出装置1における過去の深度画像に対する処理で決定した手中心及び各関節の三次元座標を含む。例えば、座標履歴193には、現在処理対象となっている深度画像の撮像時刻から所定の期間(例えば数秒程度)だけ前となる時刻までの間となる時刻に撮像された深度画像に対する処理で決定した三次元座標が格納されている。本実施形態の手位置検出装置1における補正部130は、整合性判定部131と、再計算部132とを含む。 The correction unit 130 corrects the three-dimensional coordinates of the hand center and each joint calculated from the depth image. The correction unit 130 determines whether or not to correct the three-dimensional coordinates based on the three-dimensional coordinates of the hand center and each joint calculated from the depth image, and the dimensional information 192 and the coordinate history 193 stored in the storage unit 190. do. Then, when it is determined that correction is necessary, the correction unit 130 corrects the three-dimensional coordinates of the hand center and each joint calculated from the depth image. The dimensional information 192 includes a dimension from the center of the hand to the wrist and a dimension from the wrist to the elbow in the upper limb of a person (subject) who moves the upper limb within the imaging range of the depth image. The coordinate history 193 includes the three-dimensional coordinates of the hand center and each joint determined by the processing for the past depth image in the hand position detection device 1. For example, the coordinate history 193 is determined by processing the depth image captured at a time between the time when the depth image currently being processed is captured and the time before a predetermined period (for example, about several seconds). The three-dimensional coordinates are stored. The correction unit 130 in the hand position detection device 1 of the present embodiment includes a consistency determination unit 131 and a recalculation unit 132.

整合性判定部131は、深度画像から算出した手中心及び関節の三次元座標についての空間整合性と時間整合性とに基づいて、三次元座標の補正の要否を判定する。空間整合性は、深度画像から算出した手中心及び関節の三次元座標に基づく対象者の上肢の寸法と、寸法情報192における対象者の上肢の寸法との整合性である。時間整合性は、座標履歴193に基づいて算出される、深度画像から算出した手中心及び関節の三次元座標の時間変化についての整合性である。空間整合性及び時間整合性のいずれかの整合性を示す値が閾値よりも小さい場合、整合性判定部131は、三次元座標を補正する必要があると判定する。三次元座標を補正する必要があると判定した場合、整合性判定部131は、再計算部132に手中心及び関節の三次元座標を再計算させる(補正させる)。一方、三次元座標を補正する必要がないと判定した場合、整合性判定部131(補正部130)は、該判定に用いた手中心及び関節の三次元座標を座標履歴193に格納する。 The consistency determination unit 131 determines whether or not the three-dimensional coordinates need to be corrected based on the spatial consistency and the time consistency of the three-dimensional coordinates of the hand center and the joint calculated from the depth image. Spatial consistency is the consistency between the dimensions of the subject's upper limbs based on the three-dimensional coordinates of the center of the hand and the joint calculated from the depth image, and the dimensions of the subject's upper limbs in the dimensional information 192. The time consistency is the consistency with respect to the time change of the three-dimensional coordinates of the hand center and the joint calculated from the depth image, which is calculated based on the coordinate history 193. When the value indicating consistency of either spatial consistency or time consistency is smaller than the threshold value, the consistency determination unit 131 determines that the three-dimensional coordinates need to be corrected. When it is determined that the three-dimensional coordinates need to be corrected, the consistency determination unit 131 causes the recalculation unit 132 to recalculate (correct) the three-dimensional coordinates of the hand center and the joint. On the other hand, when it is determined that it is not necessary to correct the three-dimensional coordinates, the consistency determination unit 131 (correction unit 130) stores the three-dimensional coordinates of the hand center and the joint used for the determination in the coordinate history 193.

再計算部132は、深度画像における手中心の位置を変更し、変更後の手中心の位置に基づいて、撮像範囲内における手中心の三次元座標及び各関節の三次元座標を算出する(再計算する)。例えば、再計算部132は、まず、深度画像内における肘又は手首を始点とし手中心を終点とするベクトルの方向に、所定の距離(画素数)だけ手中心の位置を移動させる。また、再計算部132は、移動後の手中心の位置に基づいて深度画像内における手首や肘等の関節の位置を算出する。その後、再計算部132は、算出した手中心の位置及び各関節の位置に基づいて、撮像範囲内における手中心の位置を示す三次元座標及び各関節の位置を示す三次元座標を算出する。深度画像内における変更後の手中心の位置が上肢領域内である場合、再計算部132は、手中心の位置の深度値に基づいて手中心の三次元位置を算出する。一方、深度画像内における変更後の手中心の位置が上肢領域外となった場合、再計算部132は、例えば、上肢領域内の深度値を利用して手中心の三次元位置を算出する。 The recalculation unit 132 changes the position of the hand center in the depth image, and calculates the three-dimensional coordinates of the hand center and the three-dimensional coordinates of each joint within the imaging range based on the changed position of the hand center (recalculation). calculate). For example, the recalculation unit 132 first moves the position of the center of the hand by a predetermined distance (number of pixels) in the direction of the vector having the elbow or wrist as the starting point and the center of the hand as the ending point in the depth image. In addition, the recalculation unit 132 calculates the positions of joints such as wrists and elbows in the depth image based on the position of the center of the hand after movement. After that, the recalculation unit 132 calculates the three-dimensional coordinates indicating the position of the hand center and the three-dimensional coordinates indicating the position of each joint within the imaging range based on the calculated position of the hand center and the position of each joint. When the changed position of the hand center in the depth image is in the upper limb region, the recalculation unit 132 calculates the three-dimensional position of the hand center based on the depth value of the position of the hand center. On the other hand, when the changed position of the hand center in the depth image is outside the upper limb region, the recalculation unit 132 calculates the three-dimensional position of the hand center by using, for example, the depth value in the upper limb region.

すなわち、本実施形態の手位置検出装置1における補正部130は、整合性判定部131において整合性を示す値が閾値よりも小さいと判定した場合に、再計算部132において手中心及び各関節の三次元座標を再度算出して補正する。再計算部132において手中心及び各関節の三次元座標を補正した場合、補正部130は、整合性判定部131において補正後の三次元座標と、寸法情報192と、座標履歴193とに基づいて、手中心の三次元座標の再補正の要否を判定する。そして、三次元座標を補正する必要がないと判定した場合、整合性判定部131(補正部130)は、該判定に用いた手中心及び各関節の三次元座標を座標履歴193に格納する。整合性判定部131(補正部130)は、例えば、手中心及び各関節の三次元座標と、処理対象となっている深度画像の撮像時刻を示す情報とを対応付けて座標履歴193に格納する。 That is, when the correction unit 130 in the hand position detection device 1 of the present embodiment determines that the value indicating consistency is smaller than the threshold value in the consistency determination unit 131, the recalculation unit 132 determines that the center of the hand and each joint The three-dimensional coordinates are calculated again and corrected. When the recalculation unit 132 corrects the three-dimensional coordinates of the center of the hand and each joint, the correction unit 130 uses the corrected three-dimensional coordinates, the dimensional information 192, and the coordinate history 193 in the consistency determination unit 131. , Judge the necessity of re-correction of the three-dimensional coordinates of the hand center. When it is determined that it is not necessary to correct the three-dimensional coordinates, the consistency determination unit 131 (correction unit 130) stores the three-dimensional coordinates of the hand center and each joint used for the determination in the coordinate history 193. The consistency determination unit 131 (correction unit 130) stores, for example, the three-dimensional coordinates of the center of the hand and each joint in the coordinate history 193 in association with the information indicating the imaging time of the depth image to be processed. ..

出力部140は、座標履歴193に含まれる手中心及び各関節の三次元座標を含む情報を外部装置3に出力する。外部装置3は、例えば、手中心の三次元座標の時間変化に基づいて、作業員の作業が適切であるか否か等を管理するサーバ装置である。 The output unit 140 outputs information including the three-dimensional coordinates of the center of the hand and each joint included in the coordinate history 193 to the external device 3. The external device 3 is, for example, a server device that manages whether or not the work of the worker is appropriate based on the time change of the three-dimensional coordinates of the center of the hand.

図2は、寸法情報の内容を示す図である。
寸法情報192は、例えば、図2のように、深度センサ2による深度画像の撮像範囲内で上肢を動かす対象者から採寸した、対象者の上肢における3つの寸法L1,L2,及びL3を含む。第1の寸法L1は、手中心から手首までの長さである。第2の寸法L2は、手首から肘までの長さである。第3の寸法L3は、肘から肩までの長さである。第1の寸法L1、第2の寸法L2、及び第3の寸法L3は、それぞれ、対象者の右上肢及び左上肢のいずれか一方で採寸した寸法であってもよいし、右上肢で採寸した寸法と左上肢で採寸した寸法との平均値であってもよい。また、対象者が複数である場合、寸法情報192には、各対象者の第1の寸法L1、第2の寸法L2、及び第3の寸法L3を、対象者毎に識別可能な態様で登録しておく。例えば、対象者の作業者IDが「A」である場合、手位置検出装置1の整合性判定部131は、対象者の上肢の寸法L1,L2,及びL3として、それぞれ、図2の寸法情報192から寸法LA1,LA2,及びLA3を読み出す。
FIG. 2 is a diagram showing the contents of dimensional information.
The dimensional information 192 includes, for example, as shown in FIG. 2, three dimensions L1, L2, and L3 in the upper limb of the subject, which are measured from the subject who moves the upper limb within the imaging range of the depth image by the depth sensor 2. The first dimension L1 is the length from the center of the hand to the wrist. The second dimension L2 is the length from the wrist to the elbow. The third dimension L3 is the length from the elbow to the shoulder. The first dimension L1, the second dimension L2, and the third dimension L3 may be the dimensions measured by either the upper right limb or the upper left limb of the subject, respectively, or may be measured by the upper right limb. It may be the average value of the dimension and the dimension measured by the upper left limb. Further, when there are a plurality of target persons, the first dimension L1, the second dimension L2, and the third dimension L3 of each target person are registered in the dimension information 192 in a mode that can be identified for each target person. I'll keep it. For example, when the worker ID of the subject is "A", the consistency determination unit 131 of the hand position detection device 1 sets the dimensions L1, L2, and L3 of the upper limbs of the subject as the dimensional information of FIG. 2, respectively. The dimensions LA1, LA2, and LA3 are read from 192.

本実施形態の手位置検出装置1は、深度センサ2が所定の時間間隔で撮像する深度画像を順次取得するとともに、取得した複数の深度画像のそれぞれから手中心及び上肢の関節を検出し該手中心及び関節の三次元座標を算出する。本実施形態の手位置検出装置1は、深度画像から手中心及び上肢の関節を検出し三次元座標を算出する処理として、図3のフローチャートに沿った座標算出処理を行う。 The hand position detection device 1 of the present embodiment sequentially acquires depth images captured by the depth sensor 2 at predetermined time intervals, and detects the center of the hand and the joints of the upper limbs from each of the acquired plurality of depth images. Calculate the three-dimensional coordinates of the center and joint. The hand position detection device 1 of the present embodiment performs coordinate calculation processing according to the flowchart of FIG. 3 as a process of detecting the center of the hand and the joints of the upper limbs from the depth image and calculating the three-dimensional coordinates.

図3は、第1の実施形態に係る座標算出処理の内容を説明するフローチャートである。
本実施形態の手位置検出装置1は、図3のように、まず、処理の対象とする深度画像を選択し(ステップS1)、選択した深度画像から上肢領域を検出する(ステップS2)。ステップS1及びS2の処理は、手位置検出装置1における関節位置算出部120の上肢領域検出部121が行う。上肢領域検出部121は、例えば、上肢領域を検出する処理を行っていない深度画像のうちの、撮像時刻が最も早い深度画像を選択する。深度画像を選択した後、上肢領域検出部121は、選択した深度画像における各点(各画素)の深度値と、背景画像191における各点の深度値とに基づいて、深度画像における上肢領域を検出する。
FIG. 3 is a flowchart illustrating the contents of the coordinate calculation process according to the first embodiment.
As shown in FIG. 3, the hand position detection device 1 of the present embodiment first selects a depth image to be processed (step S1), and detects an upper limb region from the selected depth image (step S2). The processing of steps S1 and S2 is performed by the upper limb region detection unit 121 of the joint position calculation unit 120 in the hand position detection device 1. The upper limb region detection unit 121 selects, for example, the depth image having the earliest imaging time among the depth images that have not been processed to detect the upper limb region. After selecting the depth image, the upper limb region detection unit 121 determines the upper limb region in the depth image based on the depth value of each point (each pixel) in the selected depth image and the depth value of each point in the background image 191. To detect.

次に、手位置検出装置1は、深度画像から上肢領域を検出したか否かを判定する(ステップS3)。ステップS3の判定は、上肢領域検出部121が行う。上肢領域が検出されなかった場合(ステップS3;NO)、上肢領域検出部121は、例えば、選択中の深度画像から上肢領域が検出されなかったことを示す情報を座標履歴193に格納し(ステップS11)、該深度画像に対する座標算出処理を終了させる。一方、深度画像から上肢領域を検出した場合(ステップS3;YES)、手位置検出装置1は、ステップS4〜S7の処理を行う。 Next, the hand position detection device 1 determines whether or not the upper limb region has been detected from the depth image (step S3). The determination in step S3 is performed by the upper limb region detection unit 121. When the upper limb region is not detected (step S3; NO), the upper limb region detection unit 121 stores, for example, information indicating that the upper limb region was not detected from the selected depth image in the coordinate history 193 (step). S11), the coordinate calculation process for the depth image is terminated. On the other hand, when the upper limb region is detected from the depth image (step S3; YES), the hand position detection device 1 performs the processes of steps S4 to S7.

深度画像から上肢領域を検出した場合(ステップS3;YES)、手位置検出装置1は、次に、深度画像における上肢領域内の手中心及び関節の位置を検出する(ステップS4)。ステップS4の処理は、手位置検出装置1における関節位置算出部120の画像内位置検出部122が行う。画像内位置検出部122は、例えば、上肢領域の形状及び位置に基づいて深度画像内における上肢の延伸方向を示す線分群を抽出した後、該線分群の線分上で手中心の位置、及び上肢の関節(手首、肘、及び肩)の位置を検出する。画像内位置検出部122は、例えば、深度画像において上肢の延伸方向(関節間を結ぶ線分の方向)となり得る方向に基づいて、上肢領域における上肢の延伸方向と直交した方向の寸法を縮めて、上肢の延伸方向を示す線分群を抽出する。線分群を抽出した後、画像内位置検出部122は、まず、線分群に含まれる線分上の各点のなかから手中心の位置を検出する。画像内位置検出部122は、例えば、深度画像内における手(手のひら)の大きさと対応した領域を示す情報に基づいて、線分上での手中心の位置を検出する。手中心の位置を検出した後、画像内位置検出部122は、例えば、検出した手中心の位置と、深度画像における手中心から手首までの距離(画素数)を示す情報に基づいて、手首の位置を検出する。その後、画像内位置検出部122は、検出した関節の位置と、深度画像における関節間の距離(画素数)を示す情報に基づいて、隣接する関節の位置を順次検出する。なお、関節の位置を検出する際、画像内位置検出部122は、線分群において線分が折れ曲がる位置を関節の候補とし、該折れ曲がる位置で接続する2本の線分がなす角も含めて関節の位置を検出する。 When the upper limb region is detected from the depth image (step S3; YES), the hand position detection device 1 next detects the positions of the hand center and the joint in the upper limb region in the depth image (step S4). The process of step S4 is performed by the position detection unit 122 in the image of the joint position calculation unit 120 in the hand position detection device 1. The position detection unit 122 in the image extracts, for example, a line segment group indicating the extension direction of the upper limb in the depth image based on the shape and position of the upper limb region, and then the position of the center of the hand on the line segment of the line segment group and the position of the center of the hand. Detects the position of upper limb joints (wrist, elbow, and shoulder). The position detection unit 122 in the image reduces the dimension in the direction orthogonal to the extension direction of the upper limb in the upper limb region, based on the direction that can be the extension direction of the upper limb (the direction of the line segment connecting the joints) in the depth image, for example. , Extract a line segment group indicating the extension direction of the upper limb. After extracting the line segment group, the position detection unit 122 in the image first detects the position of the center of the hand from each point on the line segment included in the line segment group. The in-image position detection unit 122 detects the position of the center of the hand on the line segment, for example, based on the information indicating the area corresponding to the size of the hand (palm) in the depth image. After detecting the position of the center of the hand, the position detection unit 122 in the image detects, for example, the position of the detected hand center and the information indicating the distance (number of pixels) from the center of the hand to the wrist in the depth image. Detect the position. After that, the position detection unit 122 in the image sequentially detects the positions of the adjacent joints based on the detected joint positions and the information indicating the distance (number of pixels) between the joints in the depth image. When detecting the position of a joint, the position detection unit 122 in the image sets the position where the line segment bends in the line segment group as a candidate for the joint, and includes the angle formed by the two line segments connected at the bent position. Detects the position of.

次に、手位置検出装置1は、検出した手中心及び関節の三次元座標を算出する(ステップS5)。ステップS5の処理は、手位置検出装置1における関節位置算出部120の三次元座標算出部123が行う。三次元座標算出部123は、ピンホールカメラモデルを適用し、深度画像の撮像範囲と、深度画像の画素数と、深度画像における手中心及び関節の位置と、深度値とに基づいて、手中心及び関節の三次元座標を算出する。なお、ステップS5で算出する三次元座標は、手中心の位置を検出する三次元空間における任意の二点間の距離の実測値と対応する世界座標系での座標とする。 Next, the hand position detection device 1 calculates the three-dimensional coordinates of the detected hand center and joint (step S5). The process of step S5 is performed by the three-dimensional coordinate calculation unit 123 of the joint position calculation unit 120 in the hand position detection device 1. The three-dimensional coordinate calculation unit 123 applies a pinhole camera model, and is based on the imaging range of the depth image, the number of pixels of the depth image, the positions of the hand center and the joint in the depth image, and the depth value. And calculate the three-dimensional coordinates of the joint. The three-dimensional coordinates calculated in step S5 are the coordinates in the world coordinate system corresponding to the measured value of the distance between arbitrary two points in the three-dimensional space for detecting the position of the center of the hand.

次に、手位置検出装置1は、手中心及び関節の三次元座標を補正する座標補正処理(ステップS6)を行う。座標補正処理は、三次元座標の補正の要否を判定する処理と、手中心の位置を補正して手中心及び関節の三次元座標を算出する(再計算する)処理とを含む。座標補正処理は、手位置検出装置1における補正部130が行う。補正部130は、上記のように、空間整合性及び時間整合性に基づいて、三次元座標の補正の要否を判定する。この判定は、補正部130の整合性判定部131が行う。整合性判定部131は、深度画像から算出した手中心及び関節の三次元座標と寸法情報192とに基づいて、空間整合性を示す値を算出する。また、整合性判定部131は、深度画像から算出した手中心及び関節の三次元座標と座標履歴193とに基づいて、時間整合性を示す値を算出する。そして、整合性判定部131は、算出した空間整合性を示す値及び時間整合性を示す値に基づいて三次元座標が空間的又は時間的に整合しないと判定した場合に、再計算部132に三次元座標を再計算させる(補正させる)。 Next, the hand position detection device 1 performs a coordinate correction process (step S6) for correcting the three-dimensional coordinates of the center of the hand and the joint. The coordinate correction process includes a process of determining the necessity of correcting the three-dimensional coordinates and a process of correcting the position of the hand center and calculating (recalculating) the three-dimensional coordinates of the hand center and the joint. The coordinate correction process is performed by the correction unit 130 in the hand position detection device 1. As described above, the correction unit 130 determines whether or not the three-dimensional coordinates need to be corrected based on the spatial consistency and the time consistency. This determination is performed by the consistency determination unit 131 of the correction unit 130. The consistency determination unit 131 calculates a value indicating spatial consistency based on the three-dimensional coordinates of the center of the hand and the joint calculated from the depth image and the dimensional information 192. Further, the consistency determination unit 131 calculates a value indicating time consistency based on the three-dimensional coordinates of the center of the hand and the joint calculated from the depth image and the coordinate history 193. Then, when the consistency determination unit 131 determines that the three-dimensional coordinates do not match spatially or temporally based on the calculated value indicating spatial consistency and the value indicating time consistency, the recalculation unit 132 determines. Recalculate (correct) the 3D coordinates.

整合性判定部131は、手中心及び関節のそれぞれについての空間整合性を示す値として、例えば、三次元座標と深度画像とに基づいて算出される距離値と、深度画像における深度値との差を算出する。また、整合性判定部131は、手中心及び関節のそれぞれについての空間整合性を示す値として、例えば、三次元座標に基づいて算出される上肢の寸法と、寸法情報192における対象者の上肢の寸法との差を算出する。このとき、整合性判定部131は、算出した差が閾値以下である場合に三次元座標が空間的に整合すると判定する。また、整合性判定部131は、手中心及び関節のそれぞれについての時間整合性を示す値として、例えば、移動速度を算出する。このとき、整合性判定部131は、算出した移動速度が閾値以下である場合に三次元座標が時間的に整合すると判定する。 The consistency determination unit 131 is a value indicating spatial consistency for each of the center of the hand and the joint, for example, the difference between the distance value calculated based on the three-dimensional coordinates and the depth image and the depth value in the depth image. Is calculated. Further, the consistency determination unit 131 includes, for example, the dimensions of the upper limbs calculated based on three-dimensional coordinates and the upper limbs of the subject in the dimensional information 192 as values indicating spatial consistency for each of the center of the hand and the joint. Calculate the difference from the dimensions. At this time, the consistency determination unit 131 determines that the three-dimensional coordinates are spatially matched when the calculated difference is equal to or less than the threshold value. Further, the consistency determination unit 131 calculates, for example, the movement speed as a value indicating the time consistency for each of the center of the hand and the joint. At this time, the consistency determination unit 131 determines that the three-dimensional coordinates are time-matched when the calculated movement speed is equal to or less than the threshold value.

再計算部132は、深度画像における手中心の位置を変更して手中心の三次元座標を算出するとともに、算出しなおした手中心の三次元座標に基づいて、関節の三次元座標を算出する。再計算部132において三次元座標を補正した場合、補正部130の整合性判定部131が、補正後の三次元座標に基づいて三次元座標の補正の要否を判定する。以降、補正部130は、整合性判定部131において再補正をしなくてもよいと判定するまで、三次元座標の補正と補正の要否の判定とを繰り返す。なお、座標補正処理は、三次元座標の補正回数に上限が設定されていてもよい。設定した上限の回数だけ三次元座標を補正した場合、補正部130は、整合性の有無によらず、現在の三次元座標を、処理対象となっている深度画像の撮像時刻における手中心及び関節の三次元座標に決定する。 The recalculation unit 132 changes the position of the hand center in the depth image to calculate the three-dimensional coordinates of the hand center, and calculates the three-dimensional coordinates of the joint based on the recalculated three-dimensional coordinates of the hand center. .. When the recalculation unit 132 corrects the three-dimensional coordinates, the consistency determination unit 131 of the correction unit 130 determines whether or not the correction of the three-dimensional coordinates is necessary based on the corrected three-dimensional coordinates. After that, the correction unit 130 repeats the correction of the three-dimensional coordinates and the determination of the necessity of the correction until the consistency determination unit 131 determines that the correction does not need to be performed again. In the coordinate correction process, an upper limit may be set for the number of corrections of the three-dimensional coordinates. When the 3D coordinates are corrected by the set upper limit number of times, the correction unit 130 uses the current 3D coordinates as the center of the hand and the joint at the imaging time of the depth image to be processed, regardless of whether or not they are consistent. Determined to the three-dimensional coordinates of.

座標補正処理を終えると、手位置検出装置1は、座標補正処理により決定した手中心及び関節の三次元座標を含む情報を座標履歴193に格納し(ステップS7)、現在処理対象に選択されている深度画像に対する算出処理を終了する。ステップS7の処理は、補正部130が行う。補正部130は、決定した手中心及び関節の三次元座標と、現在処理対象となっている深度画像の撮像時刻を示す情報とを対応付けて、座標履歴193に格納する。 When the coordinate correction process is completed, the hand position detection device 1 stores information including the three-dimensional coordinates of the hand center and the joint determined by the coordinate correction process in the coordinate history 193 (step S7), and is currently selected as the processing target. The calculation process for the existing depth image is terminated. The processing of step S7 is performed by the correction unit 130. The correction unit 130 stores the determined three-dimensional coordinates of the hand center and the joint in the coordinate history 193 in association with the information indicating the imaging time of the depth image currently being processed.

手位置検出装置1は、処理の対象とする複数の深度画像の全てに対しステップS2以降の処理を行うまで、図3のフローチャートに沿った処理を繰り返す。なお、手位置検出装置1は、複数の深度画像に対するステップS1〜S7,及びS11の処理をパイプライン化して行ってもよい。 The hand position detection device 1 repeats the processing according to the flowchart of FIG. 3 until the processing after step S2 is performed on all of the plurality of depth images to be processed. The hand position detection device 1 may pipeline the processes of steps S1 to S7 and S11 for a plurality of depth images.

このように、本実施形態の手位置検出装置1は、深度画像から検出した手中心及び関節の位置に基づいて手中心及び関節の三次元座標を算出した後、補正部130により座標補正処理(ステップS6)を行って座標履歴193に格納する三次元座標を決定する。座標補正処理として、補正部130は、上記のように、手中心及び関節のそれぞれについての三次元座標のうちの空間的又は時間的に整合しない三次元座標を整合するように補正する処理を行う。補正部130は、座標補正処理として、例えば、図4のフローチャートに沿った処理を行う。 As described above, the hand position detection device 1 of the present embodiment calculates the three-dimensional coordinates of the hand center and the joint based on the positions of the hand center and the joint detected from the depth image, and then performs the coordinate correction process by the correction unit 130 ( Step S6) is performed to determine the three-dimensional coordinates to be stored in the coordinate history 193. As the coordinate correction process, as described above, the correction unit 130 performs a process of correcting the three-dimensional coordinates of the center of the hand and the joint, which are not spatially or temporally matched, so as to be matched. .. The correction unit 130 performs, for example, a process according to the flowchart of FIG. 4 as the coordinate correction process.

図4は、第1の実施形態における座標補正処理の内容を説明するフローチャートである。 FIG. 4 is a flowchart illustrating the contents of the coordinate correction process in the first embodiment.

補正部130は、図4のように、まず、三次元座標の補正回数を示す変数rを「0」にする(ステップS601)。ステップS601の処理は、例えば、整合性判定部131が行う。 As shown in FIG. 4, the correction unit 130 first sets the variable r indicating the number of corrections of the three-dimensional coordinates to “0” (step S601). The process of step S601 is performed by, for example, the consistency determination unit 131.

次に、補正部130は、深度画像から検出した上肢領域の1つを選択し、該上肢領域内から検出した手中心及び各関節についての三次元座標を読み出す(ステップS602)。ステップS602の処理は、補正部130の整合性判定部131が行う。 Next, the correction unit 130 selects one of the upper limb regions detected from the depth image, and reads out the three-dimensional coordinates of the hand center and each joint detected from the upper limb region (step S602). The process of step S602 is performed by the consistency determination unit 131 of the correction unit 130.

次に、補正部130は、ステップS602で読み出した三次元座標、すなわち現在処理対象となっている手中心及び各関節の三次元座標に対する整合性判別処理(ステップS603)を行う。整合性判別処理は、整合性判定部131が行う。整合性判定部131は、手中心及び各関節の三次元座標が空間的に整合し、かつ時間的に整合するか否かを判定する。 Next, the correction unit 130 performs a consistency determination process (step S603) for the three-dimensional coordinates read in step S602, that is, the three-dimensional coordinates of the hand center and each joint currently being processed. The consistency determination process is performed by the consistency determination unit 131. The consistency determination unit 131 determines whether or not the three-dimensional coordinates of the center of the hand and each joint are spatially aligned and temporally aligned.

整合性判定部131は、例えば、手中心及び各関節のそれぞれについて、三次元座標から深度画像内での位置と距離とを算出し、算出した距離と深度画像における深度値との差を算出する。そして、算出した差の絶対値が閾値以上となる場合、整合性判定部131は、三次元座標が空間的に整合していないと判定する。また、整合性判定部131は、例えば、手中心及び各関節のそれぞれについて、三次元座標に基づいて隣接する関節との三次元距離を算出し、算出した三次元距離と寸法情報192における対象者の上肢の寸法との差を算出する。そして、算出した差の絶対値が閾値以上となる場合、整合性判定部は、三次元座標が空間的に整合していないと判定する。 The consistency determination unit 131 calculates, for example, the position and distance in the depth image from the three-dimensional coordinates for each of the center of the hand and each joint, and calculates the difference between the calculated distance and the depth value in the depth image. .. Then, when the absolute value of the calculated difference is equal to or greater than the threshold value, the consistency determination unit 131 determines that the three-dimensional coordinates are not spatially matched. Further, the consistency determination unit 131 calculates, for example, the three-dimensional distance between the center of the hand and each joint with the adjacent joint based on the three-dimensional coordinates, and the calculated three-dimensional distance and the target person in the dimensional information 192. Calculate the difference from the dimensions of the upper limbs. Then, when the absolute value of the calculated difference is equal to or greater than the threshold value, the consistency determination unit determines that the three-dimensional coordinates are not spatially matched.

更に、整合性判定部131は、例えば、手中心及び各関節のそれぞれについて、三次元座標に基づいて移動速度を算出する。そして、算出した移動速度が閾値以上となる場合、整合性判定部131は、三次元座標が時間的に整合していないと判定する。 Further, the consistency determination unit 131 calculates the movement speed based on the three-dimensional coordinates, for example, for the center of the hand and each of the joints. Then, when the calculated movement speed is equal to or higher than the threshold value, the consistency determination unit 131 determines that the three-dimensional coordinates do not match in time.

整合性判別処理を終えると、補正部130は、次に、現在処理対象となっている手中心及び各関節のなかに、時間的又は空間的に整合しない手中心又は関節があるか否かを判定する(ステップS604)。ステップS604の判定は、整合性判定部131が行う。手中心及び各関節の全てが時間的及び空間的に整合している場合(ステップS604;NO)、整合性判定部131(補正部130)は、現在の手中心及び各関節の三次元座標を、履歴情報193に格納する三次元座標に決定する(ステップS608)。 After completing the consistency determination process, the correction unit 130 then determines whether or not there is a hand center or joint that is temporally or spatially inconsistent in the hand center and each joint currently being processed. Determination (step S604). The determination in step S604 is performed by the consistency determination unit 131. When the center of the hand and all of the joints are temporally and spatially aligned (step S604; NO), the consistency determination unit 131 (correction unit 130) determines the current three-dimensional coordinates of the center of the hand and each joint. , The three-dimensional coordinates to be stored in the history information 193 are determined (step S608).

一方、手中心及び各関節のいずれかが、時間的又は空間的に整合していない場合(ステップS604;YES)、整合性判定部131は、次に、変数rが閾値Nよりも小さいか否かを判定する(ステップS605)。閾値Nは、三次元座標を補正する回数の上限値である。r≧Nの場合(ステップS605;NO)、整合性判定部131(補正部130)は、現在の手中心及び各関節の三次元座標を、履歴情報193に格納する三次元座標に決定する(ステップS608)。これに対し、r<Nの場合(ステップS605;YES)、整合性判定部131(補正部130)は、手中心及び各関節の三次元座標を再計算する座標再計算処理(ステップS606)を再計算部132に行わせる。座標再計算処理において、再計算部132は、深度画像における手中心の位置を変更した後、変更後の手中心の位置に基づいて、手中心及び各関節の三次元座標を算出する(再計算する)。手中心及び各関節の三次元座標を算出した後、再計算部132は、算出した三次元座標を整合性判定部131に通知して、座標再計算処理を終了する。 On the other hand, when either the center of the hand or each joint is not consistent in time or space (step S604; YES), the consistency determination unit 131 then determines whether the variable r is smaller than the threshold value N. (Step S605). The threshold value N is an upper limit of the number of times the three-dimensional coordinates are corrected. When r ≧ N (step S605; NO), the consistency determination unit 131 (correction unit 130) determines the current three-dimensional coordinates of the hand center and each joint as the three-dimensional coordinates stored in the history information 193 (step S605; NO). Step S608). On the other hand, in the case of r <N (step S605; YES), the consistency determination unit 131 (correction unit 130) performs a coordinate recalculation process (step S606) for recalculating the three-dimensional coordinates of the hand center and each joint. Let the recalculation unit 132 perform the calculation. In the coordinate recalculation process, the recalculation unit 132 changes the position of the hand center in the depth image, and then calculates the three-dimensional coordinates of the hand center and each joint based on the changed position of the hand center (recalculation). do). After calculating the three-dimensional coordinates of the center of the hand and each joint, the recalculation unit 132 notifies the consistency determination unit 131 of the calculated three-dimensional coordinates, and ends the coordinate recalculation process.

再計算部132が座標再計算処理(ステップS606)を終えると、補正部130は、変数rをr+1に更新し(ステップS607)、整合性判別処理(ステップS603)を行う。ステップS607の処理は、整合性判定部131が行う。整合性判定部131は、再計算部132から三次元座標を受け取ると、変数rを更新して整合性判別処理S603を行う。以降、補正部130は、手中心及び各関節の全てが時間的及び空間的に整合する(ステップS604;NO)か、又はr≧Nとなる(ステップS605;NO)まで、ステップS603〜S607の処理を繰り返す。そして、手中心及び各関節の全てが時間的及び空間的に整合するか、又はr≧Nとなると、整合性判定部131(補正部130)は、現在の三次元座標を座標履歴193に格納する三次元座標に決定する(ステップS608)。 When the recalculation unit 132 finishes the coordinate recalculation process (step S606), the correction unit 130 updates the variable r to r + 1 (step S607) and performs the consistency determination process (step S603). The process of step S607 is performed by the consistency determination unit 131. When the consistency determination unit 131 receives the three-dimensional coordinates from the recalculation unit 132, the consistency determination unit 131 updates the variable r and performs the consistency determination process S603. After that, the correction unit 130 will perform steps S603 to S607 until the center of the hand and all of the joints are temporally and spatially aligned (step S604; NO) or r ≧ N (step S605; NO). Repeat the process. Then, when the center of the hand and all of the joints are temporally and spatially aligned, or when r ≧ N, the consistency determination unit 131 (correction unit 130) stores the current three-dimensional coordinates in the coordinate history 193. Determine the three-dimensional coordinates to be used (step S608).

ステップS608の処理を終えると、補正部130は、次に、処理対象である深度画像から検出された上肢領域のなかに未選択の上肢領域があるか否かを判定する(ステップS609)。ステップS609の判定は、整合性判定部131が行う。未選択の上肢領域がある場合(ステップS609;YES)、整合性判定部131(補正部130)は、未選択の上肢領域に対するステップS601以降の処理を行う。そして、全ての上肢領域に対するステップS601以降の処理を行うと(ステップS609;NO)、整合性判定部131(補正部130)は、処理対象である深度画像に対する座標補正処理を終了する。 After finishing the processing of step S608, the correction unit 130 next determines whether or not there is an unselected upper limb region in the upper limb region detected from the depth image to be processed (step S609). The determination in step S609 is performed by the consistency determination unit 131. When there is an unselected upper limb region (step S609; YES), the consistency determination unit 131 (correction unit 130) performs the processing after step S601 on the unselected upper limb region. Then, when the processing after step S601 is performed on all the upper limb regions (step S609; NO), the consistency determination unit 131 (correction unit 130) ends the coordinate correction processing on the depth image to be processed.

このように、補正部130が行う座標補正処理は、整合性判別処理(ステップS603)と、座標再計算処理(ステップS603)とを含む。そして、補正部130は、整合性判別処理において空間的及び時間的に整合していると判定した場合、又は座標再計算処理を行った回数が所定の回数(N回)以上となった場合に、その時点における三次元座標を座標履歴193に格納する三次元座標に決定する。 As described above, the coordinate correction process performed by the correction unit 130 includes the consistency determination process (step S603) and the coordinate recalculation process (step S603). Then, when the correction unit 130 determines that the coordinates are spatially and temporally consistent in the consistency determination process, or when the number of times the coordinate recalculation process is performed becomes a predetermined number of times (N times) or more. , The three-dimensional coordinates at that time are determined to be the three-dimensional coordinates stored in the coordinate history 193.

図5は、第1の実施形態における整合性判別処理の内容を説明するフローチャートである。 FIG. 5 is a flowchart illustrating the content of the consistency determination process in the first embodiment.

整合性判別処理(ステップS603)は、補正部130の整合性判定部131が行う。本実施形態の手位置検出装置1における整合性判定部131は、図5のように、まず、手中心及び各関節を識別する変数iを「0」にするとともに、整合性パラメータCiを「True」に設定する(ステップS60301)。ここで、変数iは、1個の上肢領域から手中心及び各関節の位置を検出したときに、手中心及び各関節のそれぞれを識別するために付した数値(0,1,2,・・・)である。整合性パラメータCiは、変数iにより指定される手中心又は関節を示す点Piの三次元座標が空間的かつ時間的に整合しているか否かを示す値である。本実施形態では、整合性パラメータCiは、「True」と「False」との2つの値のいずれかの値とする。「True」は、三次元座標が空間的かつ時間的に整合していることを示す値である。「False」は、三次元座標が空間的又は時間的に整合していないことを示す値である。 The consistency determination process (step S603) is performed by the consistency determination unit 131 of the correction unit 130. As shown in FIG. 5, the consistency determination unit 131 in the hand position detection device 1 of the present embodiment first sets the variable i for identifying the hand center and each joint to “0” and sets the consistency parameter Ci to “True”. (Step S60301). Here, the variable i is a numerical value (0, 1, 2, ...) Attached to identify each of the hand center and each joint when the position of the hand center and each joint is detected from one upper limb region.・). The consistency parameter Ci is a value indicating whether or not the three-dimensional coordinates of the point Pi indicating the hand center or joint specified by the variable i are spatially and temporally matched. In the present embodiment, the consistency parameter Ci is set to one of two values, "True" and "False". "True" is a value indicating that the three-dimensional coordinates are spatially and temporally aligned. "False" is a value indicating that the three-dimensional coordinates are not spatially or temporally aligned.

次に、整合性判定部131は、手中心又は関節を示す点Piの三次元座標(Xi,Yi,Zi)から深度画像内での座標(xi,yi)と距離ziとを算出する(ステップS60302)。ステップS60302では、整合性判定部131は、深度画像内での手中心又は関節を示す点Piの位置と対応する三次元座標(Xi,Yi,Zi)を算出する際の算出式に基づく逆算(逆変換)により、深度画像内での座標(xi,yi)と距離ziとを算出する。 Next, the consistency determination unit 131 calculates the coordinates (xi, yi) and the distance zi in the depth image from the three-dimensional coordinates (Xi, Yi, Zi) of the point Pi indicating the center of the hand or the joint (step). S60302). In step S60302, the consistency determination unit 131 performs back calculation based on the calculation formula when calculating the three-dimensional coordinates (Xi, Yi, Zi) corresponding to the position of the point Pi indicating the center of the hand or the joint in the depth image (Xi, Yi, Zi). The coordinates (xi, yi) and the distance zi in the depth image are calculated by the inverse transformation).

次に、整合性判定部131は、深度画像における座標(xi,yi)の深度値zi’を読み出し(ステップS60303)、zi’>zi+Mであるか否かを判定する(ステップS60304)。ここで、Mは、距離ziに対するマージンである。マージンMは、点Piの三次元座標(Xi,Yi,Zi)と、深度画像における座標(xi,yi)及び深度値z’から算出される三次元座標とが整合している(一致している)とみなす範囲に基づいて設定する。言い換えると、マージンMは、例えば、上肢の太さ等に基づいて、深度値zi’がzi’>zi+Mである場合には該深度値zi’が対象者の上肢とは異なる物体までの距離を示す値であると認められる値に設定する。すなわち、整合性判定部131は、zi’>zi+Mである場合には、点Piの三次元座標(Xi,Yi,Zi)と、深度画像における座標(xi,yi)及び深度値zi’から算出される三次元座標とが空間的に整合していないと判定する。従って、zi’>zi+Mである場合(ステップS60304;YES)、整合性判定部131は、整合性パラメータCiを「False」に変更する(ステップS60312)。 Next, the consistency determination unit 131 reads out the depth value zi'of the coordinates (xi, yi) in the depth image (step S60303), and determines whether or not zi'> zi + M (step S60304). Here, M is a margin with respect to the distance zi. The margin M is consistent with the three-dimensional coordinates (Xi, Yi, Zi) of the point Pi, the coordinates (xi, yi) in the depth image, and the three-dimensional coordinates calculated from the depth value z'. Set based on the range considered to be). In other words, the margin M is, for example, the distance to an object whose depth value zi'is different from that of the subject's upper limb when the depth value zi'is zi'> zi + M, based on, for example, the thickness of the upper limb. Set to a value that is recognized as the indicated value. That is, when zi'> zi + M, the consistency determination unit 131 calculates from the three-dimensional coordinates (Xi, Yi, Zi) of the point Pi, the coordinates (xi, yi) in the depth image, and the depth value zi'. It is determined that the three-dimensional coordinates are not spatially consistent. Therefore, when zi'> zi + M (step S60304; YES), the consistency determination unit 131 changes the consistency parameter Ci to "False" (step S60312).

一方、zi’≦zi+Mである場合(ステップS60304;NO)、整合性判定部131は、次に、現在処理対象となっている手中心又は関節を示す点Piと、該手中心又は関節と隣接した関節を示す点Pi+1との三次元距離lenを算出する(ステップS60305)。すなわち、ステップS60305の処理では、整合性判定部131は、現在の変数iで指定される手中心又は関節の三次元座標(Xi,Yi,Zi)と、変数i+1で指定される関節の三次元座標(Xi+1,Yi+1,Zi+1)との距離lenを算出する。 On the other hand, when zi'≤ zi + M (step S60304; NO), the consistency determination unit 131 next has a point Pi indicating the hand center or joint currently being processed and adjacent to the hand center or joint. The three-dimensional distance len with the point Pi + 1 indicating the joint is calculated (step S60305). That is, in the process of step S60305, the consistency determination unit 131 has the three-dimensional coordinates (Xi, Yi, Zi) of the hand center or the joint specified by the current variable i and the three-dimensional coordinates of the joint specified by the variable i + 1. The distance len with the coordinates (Xi + 1, Yi + 1, Zi + 1) is calculated.

次に、整合性判定部131は、寸法情報192を参照し、算出した三次元距離lenと、対象者の上肢における三次元距離lenに対応する寸法との差ΔLを算出する(ステップS60306)。例えば、整合性判定部131は、変数iの値により、点Piが手中心、手首、肘、及び肩のいずれを示す点であるかを認識可能である。点Piが手中心、手首、肘、及び肩のいずれであるかを認識した整合性判定部131は、該認識結果に基づいて、対象者の上肢における三次元距離lenに対応する寸法が寸法情報192における3つの寸法L1,L2,及びL3のいずれであるかを認識する。例えば、点Piが手中心であれば、整合性判定部131は、三次元距離lenと対応する寸法が手中心から手首までの距離を示す第1の寸法L1であると認識し、寸法情報192から対象者の第1の寸法L1を読み出す。点Pi及び点Pi+1の三次元座標は、それぞれ、図3のフローチャートにおけるステップS5の処理で算出した座標である。すなわち、点Pi及び点Pi+1の三次元座標は、それぞれ、手中心の位置を検出する三次元空間における任意の二点間の距離の実測値と対応する世界座標系での座標である。従って、点Piと点Pi+1との三次元距離lenは、長さの次元を持つ。よって、三次元距離lenと対応する寸法を読み出した後、整合性判定部131は、三次元距離lenと読み出した寸法との差ΔLを算出する。 Next, the consistency determination unit 131 refers to the dimension information 192 and calculates the difference ΔL between the calculated three-dimensional distance len and the dimension corresponding to the three-dimensional distance len in the upper limb of the subject (step S60306). For example, the consistency determination unit 131 can recognize whether the point Pi is a point indicating the center of the hand, the wrist, the elbow, or the shoulder by the value of the variable i. The consistency determination unit 131, which recognizes whether the point Pi is the center of the hand, the wrist, the elbow, or the shoulder, determines the dimension corresponding to the three-dimensional distance len in the upper limb of the subject based on the recognition result. Recognize which of the three dimensions L1, L2 and L3 in 192 is. For example, if the point Pi is the center of the hand, the consistency determination unit 131 recognizes that the dimension corresponding to the three-dimensional distance len is the first dimension L1 indicating the distance from the center of the hand to the wrist, and the dimension information 192. The first dimension L1 of the subject is read from. The three-dimensional coordinates of the point Pi and the point Pi + 1 are the coordinates calculated in the process of step S5 in the flowchart of FIG. 3, respectively. That is, the three-dimensional coordinates of the point Pi and the point Pi + 1 are the coordinates in the world coordinate system corresponding to the measured values of the distances between arbitrary two points in the three-dimensional space for detecting the position of the center of the hand, respectively. Therefore, the three-dimensional distance len between the point Pi and the point Pi + 1 has a dimension of length. Therefore, after reading the dimension corresponding to the three-dimensional distance len, the consistency determination unit 131 calculates the difference ΔL between the three-dimensional distance len and the read dimension.

次に、整合性判定部131は、算出した差ΔLの絶対値|ΔL|が閾値THLよりも大きいか否かを判定する(ステップS60307)。例えば、点Pi及び点Pi+1が、それぞれ、対象者の手中心及び手首の位置と正しく対応している場合、ステップS60305で算出した三次元距離lenは、対象者の手中心から手首までの寸法と略一致する。また、点Pi及び点Pi+1が、それぞれ、対象者の手首及び肘の位置と正しく対応している場合、ステップS60305で算出した三次元距離lenは、対象者の手首から肘までの寸法と略一致する。従って、三次元距離lenと、該三次元距離lenと対応する対象者の寸法との差ΔLが所定の範囲内となる場合には、2つの点Pi,Pi+1の位置関係と、対象者の上肢の寸法に基づく位置関係とが空間的に整合しているといえる。すなわち、三次元距離lenと、該三次元距離lenと対応する対象者の寸法との差ΔLの絶対値|ΔL|が閾値THLよりも大きい場合には、2つの点Pi,Pi+1の位置関係と、対象者の上肢の寸法に基づく位置関係とは空間的に整合していないといえる。よって、|ΔL|>THLである場合(ステップS60307;YES)、整合性判定部131は、整合性パラメータCiを「False」に変更する(ステップS60312)。 Next, the consistency determination unit 131 determines whether or not the calculated absolute value | ΔL | of the difference ΔL is larger than the threshold value THL (step S60307). For example, if the point Pi and the point Pi + 1 correctly correspond to the positions of the subject's wrist and wrist, respectively, the three-dimensional distance len calculated in step S60305 is the dimension from the subject's wrist to the wrist. It almost matches. Further, when the points Pi and the points Pi + 1 correctly correspond to the positions of the wrist and elbow of the subject, respectively, the three-dimensional distance len calculated in step S60305 substantially matches the dimension from the wrist to the elbow of the subject. do. Therefore, when the difference ΔL between the three-dimensional distance len and the dimension of the target person corresponding to the three-dimensional distance len is within a predetermined range, the positional relationship between the two points Pi and Pi + 1 and the upper limb of the target person. It can be said that the positional relationship based on the dimensions of is spatially consistent. That is, when the absolute value | ΔL | of the difference ΔL between the three-dimensional distance len and the dimension of the target person corresponding to the three-dimensional distance len is larger than the threshold THL, the positional relationship between the two points Pi and Pi + 1 It can be said that the positional relationship based on the dimensions of the subject's upper limbs is not spatially consistent. Therefore, when | ΔL |> THL (step S60307; YES), the consistency determination unit 131 changes the consistency parameter Ci to “False” (step S60312).

これに対し、|ΔL|≦THLである場合(ステップS60307;NO)、整合性判定部131は、次に、点Piの移動速度Siを算出する(ステップS60308)。ステップS60308の処理では、整合性判定部131は、まず、座標履歴193を参照して点Piについての過去の三次元座標を読み出し、現在の三次元座標と過去の三次元座標との三次元距離Diを算出する。座標履歴193から読み出す三次元座標は、例えば、現在処理対象となっている深度画像の撮像タイミングの1回前となる撮像タイミングで撮像した深度画像に基づいて決定した三次元座標とする。1回前となる撮像タイミングで撮像した深度画像から決定した三次元座標が座標履歴193に存在しない場合、整合性判定部131は、例えば、2回以上前の撮像タイミングで撮像した深度画像から決定した三次元座標を読み出す。三次元座標を読み出した後、整合性判定部131は、2つの三次元座標の三次元距離Diを算出する。三次元距離Diを算出した後、整合性判定部131は、算出した三次元距離Diと、深度画像の撮像時刻の差とに基づいて、移動速度Siを算出する。 On the other hand, when | ΔL | ≦ THL (step S60307; NO), the consistency determination unit 131 next calculates the moving speed Si of the point Pi (step S60308). In the process of step S60308, the consistency determination unit 131 first reads the past three-dimensional coordinates of the point Pi with reference to the coordinate history 193, and the three-dimensional distance between the current three-dimensional coordinates and the past three-dimensional coordinates. Calculate Di. The three-dimensional coordinates read from the coordinate history 193 are, for example, three-dimensional coordinates determined based on the depth image captured at the imaging timing immediately before the imaging timing of the depth image currently being processed. When the three-dimensional coordinates determined from the depth image captured at the previous imaging timing do not exist in the coordinate history 193, the consistency determination unit 131 determines, for example, from the depth image captured at the imaging timing two or more times before. Read out the three-dimensional coordinates. After reading out the three-dimensional coordinates, the consistency determination unit 131 calculates the three-dimensional distance Di of the two three-dimensional coordinates. After calculating the three-dimensional distance Di, the consistency determination unit 131 calculates the moving speed Si based on the calculated three-dimensional distance Di and the difference in the imaging time of the depth image.

次に、整合性判定部131は、算出した移動速度Siが閾値THSよりも大きいか否かを判定する(ステップS60309)。閾値THSは、例えば、人が上肢を動かす際の手中心及び各関節の平均的な移動速度に基づいて設定する。すなわち、整合性判定部131は、算出した移動速度SiがSi>THSである場合には、移動速度Siの算出に用いた2つの三次元座標の位置関係が時間的に整合していないと判定する。よって、Si>THSである場合(ステップS60309;YES)、整合性判定部131は、整合性パラメータCiを「False」に変更する(ステップS60312)。 Next, the consistency determination unit 131 determines whether or not the calculated movement speed Si is larger than the threshold value THS (step S60309). The threshold THS is set based on, for example, the center of the hand when a person moves the upper limbs and the average moving speed of each joint. That is, when the calculated movement speed Si is Si> THS, the consistency determination unit 131 determines that the positional relationship between the two three-dimensional coordinates used for calculating the movement speed Si does not match in time. do. Therefore, when Si> THS (step S60309; YES), the consistency determination unit 131 changes the consistency parameter Ci to “False” (step S60312).

ステップS60312の処理を行った場合、或いはSi≦THSである場合(ステップS60309;NO)、整合性判定部131は、次に、現在処理対象である手中心及び関節を示す点のなかに未判定の点があるか否かを判定する(ステップS60310)。すなわち、ステップS60310の判定を行う時点で、現在処理対象となっている手中心又は関節を示す点Piについての整合性パラメータCiは、「True」及び「False」のいずれかの値に確定する。 When the processing of step S60312 is performed, or when Si ≦ THS (step S60309; NO), the consistency determination unit 131 is then undetermined among the points indicating the center of the hand and the joint currently being processed. It is determined whether or not there is a point (step S60310). That is, at the time of determining in step S60310, the consistency parameter Ci for the point Pi indicating the center of the hand or the joint currently being processed is determined to be either “True” or “False”.

整合性を判定していない点がある場合(ステップS60310;YES)、整合性判定部131は、変数iをi+1に更新し整合性パラメータCiを「True」に設定する(ステップS60311)。その後、整合性判定部131は、ステップS60302以降の処理を行う。そして、全ての手中心及び関節の整合性を判定した場合(ステップS60310;NO)、整合性判定部131は、整合性判別処理を終了する。 When there is a point where the consistency is not determined (step S60310; YES), the consistency determination unit 131 updates the variable i to i + 1 and sets the consistency parameter Ci to “True” (step S60311). After that, the consistency determination unit 131 performs the processes after step S60302. Then, when the consistency of all the hand centers and joints is determined (step S60310; NO), the consistency determination unit 131 ends the consistency determination process.

このように、本実施形態における整合性判別処理では、整合性判定部131は、手中心及び各関節のそれぞれについての整合性パラメータCiを「True」及び「False」のいずれかに決定する。この場合、整合性判別処理(ステップS603)の後に行われるステップS604の判定において、整合性判定部131は、Ci=Falseである手中心又は関節の有無を判定する。そして、全ての手中心又は関節についての整合性パラメータCiが「True」である場合、整合性判定部131は、現在の三次元座標を、深度画像の撮像時刻における三次元座標、すなわち座標履歴193に格納する三次元座標に決定する(ステップS608)。 As described above, in the consistency determination process in the present embodiment, the consistency determination unit 131 determines the consistency parameter Ci for each of the center of the hand and each joint as either “True” or “False”. In this case, in the determination of step S604 performed after the consistency determination process (step S603), the consistency determination unit 131 determines the presence or absence of the center of the hand or the joint where Ci = False. When the consistency parameter Ci for all hand centers or joints is "True", the consistency determination unit 131 uses the current three-dimensional coordinates as the three-dimensional coordinates at the time of capturing the depth image, that is, the coordinate history 193. It is determined to be the three-dimensional coordinates to be stored in (step S608).

また、Ci=Falseである手中心又は関節が存在する場合であっても、座標再計算処理の実行回数rがN回以上となった場合(ステップS605;NO)には、整合性判定部131は、現在の三次元座標を、座標履歴193に格納する三次元座標に決定する。 Further, even when the center of the hand or the joint where Ci = False exists, when the number of executions r of the coordinate recalculation process is N times or more (step S605; NO), the consistency determination unit 131 Determines the current three-dimensional coordinates as the three-dimensional coordinates stored in the coordinate history 193.

そして、Ci=Falseである手中心又は関節が存在し、かつ座標再計算処理の実行回数rがN回未満である場合には、整合性判定部131は、再計算部132に座標再計算処理(ステップS606)を行わせる。再計算部132は、座標再計算処理として、例えば、図6のフローチャートに沿った処理を行う。 When there is a hand center or joint where Ci = False and the number of times the coordinate recalculation process is executed r is less than N times, the consistency determination unit 131 causes the recalculation unit 132 to perform the coordinate recalculation process. (Step S606) is performed. The recalculation unit 132 performs, for example, a process according to the flowchart of FIG. 6 as the coordinate recalculation process.

図6は、第1の実施形態における座標再計算処理の内容を説明するフローチャートである。 FIG. 6 is a flowchart illustrating the content of the coordinate recalculation process in the first embodiment.

再計算部132は、図6のように、まず、Ci=Falseである手中心又は関節を含む上肢領域の1つを選択し(ステップS60601)、深度画像内における手中心の位置を変更する(ステップS60602)。ステップS60602の処理では、再計算部132は、例えば、手首又は肘の位置を始点とし変更前の手中心の位置を終点とするベクトルの方向に、所定の距離(画素数)だけ手中心の位置を移動させる。 As shown in FIG. 6, the recalculation unit 132 first selects one of the upper limb regions including the hand center or joint where Ci = False (step S60601), and changes the position of the hand center in the depth image (step S60601). Step S60602). In the process of step S60602, the recalculation unit 132 is, for example, the position of the center of the hand by a predetermined distance (number of pixels) in the direction of the vector whose starting point is the position of the wrist or elbow and the end point is the position of the center of the hand before the change. To move.

次に、再計算部132は、変更後の手中心の位置に基づいて、深度画像内における各関節の位置を検出する(ステップS60603)。再計算部132は、ステップS60603の処理として、例えば、画像内位置検出部122が行う処理と同様の処理を行い、手首、肘、及び肩の位置を検出する。 Next, the recalculation unit 132 detects the position of each joint in the depth image based on the position of the center of the hand after the change (step S60603). As the process of step S60603, the recalculation unit 132 performs the same process as that performed by the position detection unit 122 in the image, and detects the positions of the wrist, elbow, and shoulder.

次に、再計算部132は、手中心及び関節のうちの1つを選択し(ステップS60604)、選択した手中心又は関節の位置が上肢領域内であるか否かを判定する(ステップS60605)。選択した手中心又は関節の位置が上肢領域内である場合(ステップS60605;YES)、再計算部132は、深度画像における当該位置の深度値を用いて、選択した手中心又は関節の三次元座標を算出する(ステップS60606)。一方、選択した手中心又は関節の位置が上肢領域外である場合(ステップS60605;NO)、再計算部132は、選択した手中心又は関節の深度値を算出し、算出した深度値を用いて三次元座標を算出する(ステップS60607)。ステップS60607の処理では、再計算部132は、例えば、上肢領域内における変更前の手中心又は関節の位置と、隣接する関節の位置とを通る線分上での深度値の変化量に基づいて、変更後の手中心又は関節の位置での深度値を算出する(推定する)。 Next, the recalculation unit 132 selects one of the center of the hand and the joint (step S60604), and determines whether or not the position of the selected center of the hand or the joint is within the upper limb region (step S60605). .. When the position of the selected hand center or joint is within the upper limb region (step S60605; YES), the recalculation unit 132 uses the depth value of the position in the depth image to obtain the three-dimensional coordinates of the selected hand center or joint. Is calculated (step S60606). On the other hand, when the position of the selected hand center or joint is outside the upper limb region (step S60605; NO), the recalculation unit 132 calculates the depth value of the selected hand center or joint and uses the calculated depth value. Calculate the three-dimensional coordinates (step S60607). In the process of step S60607, the recalculation unit 132 is based on, for example, the amount of change in the depth value on the line segment passing between the position of the unchanged hand center or joint in the upper limb region and the position of the adjacent joint. , Calculate (estimate) the depth value at the position of the center of the hand or the joint after the change.

ステップS60606又はS60607により三次元座標を算出した後、再計算部132は、処理対象となっている上肢領域から検出された手中心及び関節のなかに、未選択の手中心又は関節があるか否かを判定する(ステップS60608)。未選択の手中心又は関節がある場合(ステップS60608;YES)、再計算部132は、ステップS60604以降の処理を行う。そして、手中心及び関節の全ての三次元座標を算出すると(ステップS60608;NO)、再計算部132は、次に、Ci=Falseである手中心又は関節を含む上肢領域のなかに未選択の上肢領域があるか否かを判定する(ステップS60609)。 After calculating the three-dimensional coordinates by step S60606 or S60607, the recalculation unit 132 determines whether or not there is an unselected hand center or joint among the hand centers and joints detected from the upper limb region to be processed. (Step S60608). When there is an unselected hand center or joint (step S60608; YES), the recalculation unit 132 performs the processing after step S60604. Then, when all the three-dimensional coordinates of the hand center and the joint are calculated (step S60608; NO), the recalculation unit 132 is then unselected in the upper limb region including the hand center or the joint where Ci = False. It is determined whether or not there is an upper limb region (step S60609).

未選択の上肢領域がある場合(ステップS60609;YES)、再計算部132は、未選択の上肢領域に対するステップS60601以降の処理を行う。そして、対象となる全ての上肢領域に対する三次元座標の再計算を終えると(ステップS60609;NO)、再計算部132は、算出した三次元座標を整合性判定部131に通知し(ステップS60610)、座標再計算処理を終了する。 When there is an unselected upper limb region (step S60609; YES), the recalculation unit 132 performs the processing after step S60601 on the unselected upper limb region. Then, when the recalculation of the three-dimensional coordinates for all the target upper limb regions is completed (step S60609; NO), the recalculation unit 132 notifies the calculated three-dimensional coordinates to the consistency determination unit 131 (step S60610). , Ends the coordinate recalculation process.

再計算部132が座標再計算処理を終了すると、上記のように、整合性判定部131が、座標再計算処理の回数を示す変数rをr+1に更新し(ステップS607)、再計算した手中心及び各関節の三次元座標についての整合性判別処理(ステップS603)を行う。 When the recalculation unit 132 finishes the coordinate recalculation process, the consistency determination unit 131 updates the variable r indicating the number of coordinate recalculation processes to r + 1 (step S607), and the recalculated hand center. And the consistency determination process (step S603) for the three-dimensional coordinates of each joint is performed.

このように、本実施形態の手位置検出装置1は、深度画像に基づいて算出した手中心及び上肢の関節の三次元座標が、対象者の上肢の寸法に基づく手中心及び上肢の関節の位置関係と整合しない場合、手中心の位置を変更して手中心及び関節の三次元座標を補正する。このとき、手位置検出装置1は、手中心の位置を手首又は肘の位置から離間する方向に変更する。このため、本実施形態の手位置検出装置1は、深度画像から検出した上肢領域に手と対応する部分領域が含まれない場合であっても、深度画像から検出した手中心の位置を深度画像の撮像範囲内における対象者の手中心の位置に近づけることが可能となる。従って、本実施形態の手位置検出装置1では、オクルージョン等により対象者の手の部分についての距離の情報が欠落した深度画像からも、対象者の上肢の寸法と対応した手中心及び上肢の関節の適切な三次元座標を算出することが可能となる。 As described above, in the hand position detecting device 1 of the present embodiment, the three-dimensional coordinates of the joints of the hand center and the upper limbs calculated based on the depth image are the positions of the joints of the hand center and the upper limbs based on the dimensions of the upper limbs of the subject. If it does not match the relationship, change the position of the center of the hand to correct the three-dimensional coordinates of the center of the hand and the joint. At this time, the hand position detection device 1 changes the position of the center of the hand in a direction away from the position of the wrist or elbow. Therefore, the hand position detection device 1 of the present embodiment captures the position of the center of the hand detected from the depth image even when the upper limb region detected from the depth image does not include the partial region corresponding to the hand. It is possible to approach the position of the center of the hand of the subject within the imaging range of. Therefore, in the hand position detection device 1 of the present embodiment, the joints of the center of the hand and the upper limbs corresponding to the dimensions of the upper limbs of the subject can be seen from the depth image in which the distance information about the part of the subject's hand is missing due to occlusion or the like. It is possible to calculate the appropriate three-dimensional coordinates of.

図7は、手位置検出装置の適用例を説明する図である。
図7には、本実施形態の手位置検出装置1の適用例として、作業スペース6内で作業を行う作業員7の手中心の位置の時間履歴に基づいて作業状況を管理する管理システム5を示している。該管理システム5は、手位置検出装置1と、深度センサ2と、管理装置3Aとを含む。管理システム5における手位置検出装置1及び深度センサ2は、それぞれ、インターネット等の通信ネットワーク4に接続可能な通信機能を含む。また、管理システム5における管理装置3Aは、図1の外部装置3の一例である。なお、図7に示したx方向、y方向、及びz方向は、それぞれ、作業スペース6における深度センサ2の座標系のx軸方向、y軸方向、及びz軸方向を示している。
FIG. 7 is a diagram illustrating an application example of the hand position detection device.
FIG. 7 shows, as an application example of the hand position detection device 1 of the present embodiment, a management system 5 that manages a work situation based on a time history of a position centered on the hand of a worker 7 who works in the work space 6. Shows. The management system 5 includes a hand position detection device 1, a depth sensor 2, and a management device 3A. The hand position detection device 1 and the depth sensor 2 in the management system 5 each include a communication function that can be connected to a communication network 4 such as the Internet. Further, the management device 3A in the management system 5 is an example of the external device 3 in FIG. The x-direction, y-direction, and z-direction shown in FIG. 7 indicate the x-axis direction, the y-axis direction, and the z-axis direction of the coordinate system of the depth sensor 2 in the work space 6, respectively.

この種の管理システム5では、例えば、管理システム5の管理者或いは作業員7等が、予め、作業員7の上肢の寸法を入力した寸法情報192を作成し、該寸法情報192を手位置検出装置1の記憶部190に記憶させておく。また、この種の管理システム5では、例えば、作業員7が作業を行っていない期間に、作業スペース6の上方に設置した深度センサ2により深度画像を撮像し、該深度画像を背景画像191として記憶部190に記憶させておく。深度センサ2は、作業員7が作業を行う第1の作業台8A及び第2の作業台8Bにおける作業エリアを含む撮像範囲10内のU×V個の点についての深度値(距離の情報)を持つ深度画像を撮像する。 In this type of management system 5, for example, the manager of the management system 5, the worker 7, or the like creates dimensional information 192 in which the dimensions of the upper limbs of the worker 7 are input in advance, and the dimensional information 192 is detected by hand. It is stored in the storage unit 190 of the device 1. Further, in this type of management system 5, for example, a depth image is captured by a depth sensor 2 installed above the work space 6 while the worker 7 is not working, and the depth image is used as a background image 191. It is stored in the storage unit 190. The depth sensor 2 is a depth value (distance information) for U × V points within the imaging range 10 including the work area in the first workbench 8A and the second workbench 8B on which the worker 7 works. Take a depth image with.

管理システム5における手位置検出装置1は、作業員7が作業を行っている期間に、深度センサ2から深度画像を取得して作業員7の手中心及び上肢の関節の三次元位置を算出する処理を行う。深度センサ2は、例えば、撮像範囲内の距離の情報(深度値)を含む深度画像を所定の時間間隔で撮像し、撮像した深度画像を、通信ネットワーク4を介して手位置検出装置1に順次送信する。 The hand position detection device 1 in the management system 5 acquires a depth image from the depth sensor 2 while the worker 7 is working, and calculates the three-dimensional positions of the hand center of the worker 7 and the joints of the upper limbs. Perform processing. For example, the depth sensor 2 captures a depth image including information (depth value) of a distance within the imaging range at predetermined time intervals, and sequentially feeds the captured depth image to the hand position detecting device 1 via the communication network 4. Send.

手位置検出装置1では、画像取得部110が、深度センサ2により撮像された深度画像を順次受信し、記憶部190に記憶する。また、手位置検出装置1では、関節位置算出部120及び補正部130が、深度画像に基づいて作業員7の手中心及び上肢の関節の三次元座標を算出する。関節位置算出部120及び補正部130は、例えば、図3のフローチャートに沿って、手中心及び上肢の関節の三次元座標を算出する。更に、手位置検出装置1では、出力部140が、算出した手中心及び上肢の関節の三次元座標等の情報を管理装置3Aに出力する(送信する)。 In the hand position detection device 1, the image acquisition unit 110 sequentially receives the depth images captured by the depth sensor 2 and stores them in the storage unit 190. Further, in the hand position detection device 1, the joint position calculation unit 120 and the correction unit 130 calculate the three-dimensional coordinates of the hand center of the worker 7 and the joints of the upper limbs based on the depth image. The joint position calculation unit 120 and the correction unit 130 calculate, for example, the three-dimensional coordinates of the joints of the center of the hand and the joints of the upper limbs according to the flowchart of FIG. Further, in the hand position detection device 1, the output unit 140 outputs (transmits) the calculated information such as the three-dimensional coordinates of the center of the hand and the joints of the upper limbs to the management device 3A.

管理装置3Aでは、例えば、手位置検出装置1で算出した手中心及び上肢の関節の三次元座標の時間履歴と、作業員7が行う作業における左上肢710及び右上肢720の動きとに基づいて、作業員7が作業を正しく行っているか否か等の管理をする。 In the management device 3A, for example, based on the time history of the three-dimensional coordinates of the joints of the center of the hand and the upper limbs calculated by the hand position detection device 1, and the movements of the upper left limb 710 and the upper right limb 720 in the work performed by the worker 7. , It manages whether or not the worker 7 is performing the work correctly.

図7の管理システム5における深度センサ2の撮像範囲10は、第1の作業台8A及び第2の作業台8Bの表面における作業領域と対応している。このため、深度センサ2により撮像された撮像画像には、第1の作業台8A及び第2の作業台8Bにおける作業領域に含まれる部分と対応した距離の情報を含む領域が存在する。また、図7のように、第2の作業台8Bのうちの作業領域に含まれる部分に棚9が設置されている場合、深度センサ2により撮像された撮像画像には、棚9の表面(深度センサ2側を向いた面)までの距離の情報を含む領域が存在する。更に、作業員7が作業を行っているときに深度センサ2により撮像された深度画像には、左上肢710及び右上肢720のうちの、撮像範囲10内に存在する部分における各点までの距離を示す情報を含む上肢領域が存在する。作業員7が作業を行っているときに深度センサ2により撮像された深度画像には、例えば、左上肢710の手711及び手首712の部分における各点までの距離を示す情報を含む上肢領域が存在する。また、該深度画像には、例えば、右上肢720の手721、手首721、及び図示しない肘の部分における各点までの距離を示す情報を含む上肢領域が存在する。以下の説明では、左上肢710の手711、手首712、肘713、及び肩714を、それぞれ、左手711、左手首712、左肘713、及び左肩714ともいう。また、以下の説明では、右上肢720の手721、手首722、肘(図示せず)、及び肩724を、それぞれ、右手721、右手首722、右肘、及び右肩724ともいう。 The imaging range 10 of the depth sensor 2 in the management system 5 of FIG. 7 corresponds to a work area on the surface of the first workbench 8A and the second workbench 8B. Therefore, in the captured image captured by the depth sensor 2, there is a region including information on the distance corresponding to the portion included in the working region in the first workbench 8A and the second workbench 8B. Further, as shown in FIG. 7, when the shelf 9 is installed in the portion of the second workbench 8B included in the work area, the captured image captured by the depth sensor 2 includes the surface of the shelf 9 ( There is a region containing information on the distance to the surface facing the depth sensor 2 side). Further, the depth image captured by the depth sensor 2 while the worker 7 is working includes the distance to each point in the portion of the upper left limb 710 and the upper right limb 720 that exists within the imaging range 10. There is an upper limb area that contains information indicating. The depth image captured by the depth sensor 2 while the worker 7 is working includes, for example, an upper limb region containing information indicating the distance to each point in the hand 711 and wrist 712 portions of the upper left limb 710. exist. Further, the depth image includes, for example, an upper limb region containing information indicating the distance to each point in the hand 721, the wrist 721, and the elbow portion (not shown) of the upper right limb 720. In the following description, the hand 711, wrist 712, elbow 713, and shoulder 714 of the left upper limb 710 are also referred to as the left hand 711, left wrist 712, left elbow 713, and left shoulder 714, respectively. Further, in the following description, the hand 721, wrist 722, elbow (not shown), and shoulder 724 of the right upper limb 720 are also referred to as right hand 721, right wrist 722, right elbow, and right shoulder 724, respectively.

なお、図7の作業スペース6において作業員7が作業を行うときには、例えば、工具の出し入れ等を目的として、第2の作業台8Bの表面と棚9との間に右手721を挿入することがある。作業員7が第2の作業台8Bの表面と棚9との間に右手721を挿入した場合、深度センサ2と作業員7の右手721との間には棚9が存在する。このため、作業員7が第2の作業台8Bの表面と棚9との間に右手721を挿入しているときに深度センサ2により撮像された深度画像は、例えば、図8のように作業員7の手領域(右手721)の距離を示す情報が欠落した深度画像となる。 When the worker 7 works in the work space 6 of FIG. 7, for example, the right hand 721 may be inserted between the surface of the second work table 8B and the shelf 9 for the purpose of putting in and taking out tools. be. When the worker 7 inserts the right hand 721 between the surface of the second work table 8B and the shelf 9, the shelf 9 exists between the depth sensor 2 and the right hand 721 of the worker 7. Therefore, the depth image captured by the depth sensor 2 when the worker 7 inserts the right hand 721 between the surface of the second workbench 8B and the shelf 9 is, for example, as shown in FIG. It is a depth image lacking information indicating the distance of the hand area (right hand 721) of the member 7.

図8は、手領域の距離を示す情報が欠落した深度画像の例を示す図である。
図8の深度画像1101は、撮像領域10内におけるU×V個の点のそれぞれについての深度値を含む。図8におけるQ(0,0),Q(U−1,0),Q(0,V−1),及びQ(U−1,V−1)の4個の点は、それぞれ、深度画像1101における四隅の画素(深度値の検出位置)を示している。
FIG. 8 is a diagram showing an example of a depth image in which information indicating the distance of the hand region is missing.
The depth image 1101 of FIG. 8 includes depth values for each of the U × V points in the imaging region 10. The four points Q (0,0), Q (U-1,0), Q (0, V-1), and Q (U-1, V-1) in FIG. 8 are depth images, respectively. The pixels at the four corners (depth value detection positions) in 1101 are shown.

深度画像1101は、第1の作業台8Aを示す領域と、第2の作業台8Bを示す領域と、棚9を示す領域とを含む。図8の深度画像1101では、各領域の深度値を領域内のドットパターンの密度で示しており、ドットパターンの密度が高い領域ほど深度値が小さい(すなわち深度センサ2からの距離が短い)。 The depth image 1101 includes a region showing the first workbench 8A, a region showing the second workbench 8B, and a region showing the shelf 9. In the depth image 1101 of FIG. 8, the depth value of each region is indicated by the density of the dot pattern in the region, and the region having a higher density of the dot pattern has a smaller depth value (that is, the distance from the depth sensor 2 is shorter).

また、図8の深度画像1101は、作業員7の左上肢710と対応する第1の上肢領域と、作業員7の右上肢720と対応する第2の上肢領域とを含む。なお、図8の深度画像は、作業員7が右上肢720を伸ばして右手を第2の作業台8Bと棚9との間に挿入しているときに撮像した深度画像である。このため、第2の上肢領域は、右上肢720における手首722から、肘723と肩(図示せず)との間となる位置までを含む領域となり、手首722から先の手領域(右手)を含まない。一方、第1の上肢領域は、左上肢710における手首712から先の手領域(左手711)を含む。 Further, the depth image 1101 of FIG. 8 includes a first upper limb region corresponding to the upper left limb 710 of the worker 7 and a second upper limb region corresponding to the upper right limb 720 of the worker 7. The depth image of FIG. 8 is a depth image taken when the worker 7 extends the upper right limb 720 and inserts his right hand between the second work table 8B and the shelf 9. Therefore, the second upper limb region is a region including the wrist 722 in the upper right limb 720 to the position between the elbow 723 and the shoulder (not shown), and the hand region (right hand) beyond the wrist 722. Not included. On the other hand, the first upper limb region includes the hand region (left hand 711) beyond the wrist 712 in the left upper limb 710.

本実施形態の手位置検出装置1において図8の深度画像1101から手中心及び各関節の三次元座標を算出する場合、手位置検出装置1は、図3のフローチャートに沿った処理を行う。すなわち、手位置検出装置1は、まず、図8の深度画像1101から第1の上肢領域及び第2の上肢領域を検出する(ステップS2)。手位置検出装置1は、例えば、背景画像191を用いた背景差分法により第1の上肢領域及び第2の上肢領域を検出する。 When the hand position detecting device 1 of the present embodiment calculates the three-dimensional coordinates of the center of the hand and each joint from the depth image 1101 of FIG. 8, the hand position detecting device 1 performs processing according to the flowchart of FIG. That is, the hand position detection device 1 first detects the first upper limb region and the second upper limb region from the depth image 1101 of FIG. 8 (step S2). The hand position detection device 1 detects a first upper limb region and a second upper limb region by, for example, a background subtraction method using a background image 191.

図9は、背景差分法による上肢領域の検出方法を説明する図である。
図9の(a)の背景画像191は、上記のように、作業員7が作業を行っていないときに深度センサ2で撮像した深度画像である。背景画像191は、第1の作業台8Aを示す領域と、第2の作業台を示す領域と、棚9を示す領域とを含む。背景画像191では、各領域の深度値を領域内のドットパターンの密度で示しており、密度が高い領域ほど深度値が小さい(すなわち深度センサ2からの距離が短い)。
FIG. 9 is a diagram illustrating a method of detecting an upper limb region by the background subtraction method.
The background image 191 (a) of FIG. 9 is a depth image captured by the depth sensor 2 when the worker 7 is not performing the work, as described above. The background image 191 includes a region showing the first workbench 8A, a region showing the second workbench, and a region showing the shelf 9. In the background image 191 the depth value of each region is shown by the density of the dot pattern in the region, and the higher the density is, the smaller the depth value is (that is, the distance from the depth sensor 2 is short).

背景差分法により深度画像1101から上肢領域を検出する処理は、手位置検出装置1の上肢領域検出部121が行う。上肢領域検出部121は、例えば、図8の深度画像1101における各位置(各画素)の深度値毎に、背景画像191における同じ位置の深度値との差を算出し、算出した深度値の差と閾値との大小関係に基づいて深度画像1101内の各位置の深度値を二値化する。ここで、閾値は、例えば、三次元空間における実距離に換算すると数mmから数cm程度となる値とする。このようにすると、深度画像1101における上肢領域内の各位置は深度値の差が閾値よりも大きくなり、上肢領域外の各位置は深度値の差が閾値以下となる。例えば、図8の深度画像1101における左上肢710と対応する領域内の各位置の深度値は、第1の作業台8Aの表面の深度値よりも小さな値となり、その差は実距離で数cmから十数cmとなる。同様に、図8の深度画像1101における右上肢720と対応する領域内の各位置の深度値は、第1の作業台8Aの表面の深度値よりも小さな値となり、その差は実距離で数cmから十数cmとなる。これに対し、図8の深度画像1101における第1の作業台8Aの深度値を示す領域内及び第2の作業台8Bの深度値を示す領域内の各位置では、深度画像1101における深度値と背景画像191における深度値との差が0から数mm程度となる。また、図8の深度画像1101における棚9の深度値を示す領域内の各位置では、深度画像1101における深度値と背景画像191における深度値との差が0から数mm程度となる。 The process of detecting the upper limb region from the depth image 1101 by the background subtraction method is performed by the upper limb region detection unit 121 of the hand position detection device 1. The upper limb region detection unit 121 calculates, for example, the difference from the depth value of the same position in the background image 191 for each depth value of each position (each pixel) in the depth image 1101 of FIG. The depth value of each position in the depth image 1101 is binarized based on the magnitude relationship between the image and the threshold value. Here, the threshold value is, for example, a value that is about several mm to several cm when converted into an actual distance in a three-dimensional space. In this way, the difference in depth value becomes larger than the threshold value at each position in the upper limb region in the depth image 1101, and the difference in depth value becomes smaller than the threshold value at each position outside the upper limb region. For example, the depth value of each position in the region corresponding to the upper left limb 710 in the depth image 1101 of FIG. 8 is smaller than the depth value of the surface of the first workbench 8A, and the difference is several cm in the actual distance. It will be a dozen centimeters from. Similarly, the depth value of each position in the region corresponding to the upper right limb 720 in the depth image 1101 of FIG. 8 is smaller than the depth value of the surface of the first workbench 8A, and the difference is a numerical value at the actual distance. It becomes from cm to a dozen cm. On the other hand, at each position in the region showing the depth value of the first workbench 8A and the region showing the depth value of the second workbench 8B in the depth image 1101 of FIG. The difference from the depth value in the background image 191 is about 0 to several mm. Further, at each position in the region showing the depth value of the shelf 9 in the depth image 1101 of FIG. 8, the difference between the depth value in the depth image 1101 and the depth value in the background image 191 is about 0 to several mm.

よって、上肢領域検出部121は、図8の深度画像1101と、図9の(a)の背景画像191とに基づいて、図9の(b)のような二値画像1102を生成する。図9の(b)の二値画像1102では、深度値の差が閾値よりも大きい画素を含む第1の上肢領域1102A及び第2の上肢領域1102Bを白地で示し、深度値の差が閾値以下である画素を含む領域にはドットパターンを付している。 Therefore, the upper limb region detection unit 121 generates a binary image 1102 as shown in FIG. 9B based on the depth image 1101 of FIG. 8 and the background image 191 of FIG. 9A. In the binary image 1102 of FIG. 9B, the first upper limb region 1102A and the second upper limb region 1102B including pixels having a depth value difference larger than the threshold value are shown on a white background, and the depth value difference is equal to or less than the threshold value. A dot pattern is attached to the area including the pixels.

なお、背景差分法により二値画像1102を生成する場合、上肢領域検出部121は、例えば、上肢領域の輪郭(上肢領域内と上肢領域外との境界)が不連続となることを防止ための平滑化処理等を行ってもよい。 When the binary image 1102 is generated by the background subtraction method, the upper limb region detection unit 121 is for preventing, for example, the contour of the upper limb region (the boundary between the inside of the upper limb region and the outside of the upper limb region) from becoming discontinuous. Smoothing processing or the like may be performed.

背景差分法により深度画像1101から上肢領域1102A及び1102Bが検出された場合、手位置検出装置1は、上肢領域1102A及び1102Bのそれぞれから手中心及び各関節の位置を検出する(ステップS4)。ステップS4の処理は、上記のように、手位置検出装置1の画像内位置検出部122が行う。画像内位置検出部122は、例えば、上肢領域の位置及び形状に基づいて深度画像1101(又は二値画像1102)における上肢の延在方向を示す線分を生成した後、該線分と上肢領域の輪郭とに基づいて手中心の位置及び各関節の位置を検出する。 When the upper limb regions 1102A and 1102B are detected from the depth image 1101 by the background subtraction method, the hand position detection device 1 detects the positions of the center of the hand and each joint from the upper limb regions 1102A and 1102B, respectively (step S4). As described above, the process of step S4 is performed by the position detection unit 122 in the image of the hand position detection device 1. The in-image position detection unit 122 generates, for example, a line segment indicating the extending direction of the upper limb in the depth image 1101 (or the binary image 1102) based on the position and shape of the upper limb region, and then the line segment and the upper limb region. The position of the center of the hand and the position of each joint are detected based on the contour of.

図10は、深度画像における手中心及び各関節の位置の検出方法の一例を説明する図である。 FIG. 10 is a diagram illustrating an example of a method of detecting the center of the hand and the position of each joint in a depth image.

画像内位置検出部122は、例えば、上肢領域を検出する際に生成した二値画像1102を利用して、深度画像における手中心及び各関節の位置を検出する。図9の(b)の二値画像1102のように第1の上肢領域1102Aと第2の上肢領域1102Bとが検出された場合、画像内位置検出部122は、例えば、まず、第1の上肢領域1102Aから手中心及び各関節の位置を検出する。 The in-image position detection unit 122 detects the position of the center of the hand and each joint in the depth image by using, for example, the binary image 1102 generated when detecting the upper limb region. When the first upper limb region 1102A and the second upper limb region 1102B are detected as in the binary image 1102 of FIG. 9B, the position detection unit 122 in the image first, for example, first of all, first of all, the first upper limb region. The center of the hand and the position of each joint are detected from the region 1102A.

第1の上肢領域1102Aから手中心及び各関節の位置を検出する場合、画像内位置検出部122は、図10に示すように、第1の上肢領域1102Aにおける上肢の延伸方向を示す線分群FLを生成する。図10の二値画像1102では、画像下方に対象者が存在する。このため、二値画像1102における第1の上肢領域1102Aと対応する左上肢の延在方向は、二値画像1102の下辺から上辺に向かう方向となる。よって、画像内位置検出部122は、例えば、まず、第1の上肢領域1102Aにおける左右方向の端部の距離を縮めてゆき第1の上肢領域1102Aを曲線に変換する。その後、画像内位置検出部122は、変換して得られた第1の上肢領域1102Aと対応する曲線を、該曲線を近似する複数の線分に変換する。これにより、図10の二値画像1102に示したような、左上肢の延在方向を示す複数の線分を含む線分群FLが生成される。 When the position of the center of the hand and each joint is detected from the first upper limb region 1102A, the position detection unit 122 in the image indicates the extension direction of the upper limb in the first upper limb region 1102A, as shown in FIG. To generate. In the binary image 1102 of FIG. 10, the subject is present below the image. Therefore, the extending direction of the upper left limb corresponding to the first upper limb region 1102A in the binary image 1102 is the direction from the lower side to the upper side of the binary image 1102. Therefore, for example, the position detection unit 122 in the image first shortens the distance between the ends in the left-right direction of the first upper limb region 1102A and converts the first upper limb region 1102A into a curve. After that, the position detection unit 122 in the image converts the curve corresponding to the first upper limb region 1102A obtained by the conversion into a plurality of line segments that approximate the curve. As a result, a line segment group FL including a plurality of line segments indicating the extending direction of the upper left limb as shown in the binary image 1102 of FIG. 10 is generated.

左上肢の延在方向を示す線分群FLを生成した後、画像内位置検出部122は、線分群FLと第1の上肢領域1102Aの輪郭とに基づいて、手中心(左手の中心)の位置を決定する。上記のように、作業者7は二値画像1102の下方に存在している。このため、手中心及び各関節が線分群の線分上に存在する場合、線分に沿った二値画像1102の下辺から手中心までの距離は、手首や肘等の関節までの距離よりも長くなる。また、手中心は手のひらの中心であるため、第1の上肢領域1102Aにおける手中心と対応する部分の寸法及び形状は、手のひらの寸法及び形状と略一致する。従って、画像内位置検出部122は、例えば、線分群FLの両端のうちの二値画像1102の下辺から遠いほうの端Q10を始点とし、二値画像1102の下辺と接する端Q13に向かって手中心の位置を検出する処理を行う。このとき、画像内位置検出部122は、例えば、線分群FL上の複数の点のなかから、線分上の点を中心とする所定の半径の円Hが第1の上肢領域1102Aに内接する点を検出する。図10の二値画像1102における第1の上肢領域1102Aでは、線分群FLにおける折れ曲がり点Q11で、円Hが第1の上肢領域1102Aに内接している。このため、画像内位置検出部122は、折れ曲がり点Q11を手中心の位置を示す点P0として検出する。 After generating the line segment group FL indicating the extension direction of the upper left limb, the position detection unit 122 in the image is positioned at the center of the hand (center of the left hand) based on the line segment group FL and the contour of the first upper limb region 1102A. To decide. As described above, the worker 7 is located below the binary image 1102. Therefore, when the center of the hand and each joint are on the line segment of the line segment group, the distance from the lower side of the binary image 1102 along the line segment to the center of the hand is larger than the distance to the joints such as the wrist and elbow. become longer. Further, since the center of the hand is the center of the palm, the size and shape of the portion corresponding to the center of the hand in the first upper limb region 1102A substantially coincides with the size and shape of the palm. Therefore, the position detection unit 122 in the image starts from the end Q10 farther from the lower side of the binary image 1102 at both ends of the line segment group FL, and moves toward the end Q13 in contact with the lower side of the binary image 1102. Performs processing to detect the position of the center. At this time, in the position detection unit 122 in the image, for example, from among a plurality of points on the line segment group FL, a circle H having a predetermined radius centered on the point on the line segment is inscribed in the first upper limb region 1102A. Detect points. In the first upper limb region 1102A in the binary image 1102 of FIG. 10, the circle H is inscribed in the first upper limb region 1102A at the bending point Q11 in the line segment group FL. Therefore, the position detection unit 122 in the image detects the bending point Q11 as the point P0 indicating the position of the center of the hand.

手中心の位置を検出した後、画像内位置検出部122は、手中心の位置と、線分群における折れ曲がり点の位置と、二値画像1102における手中心から手首までの距離の平均値とに基づいて、手首の位置を検出する。手首の位置を検出する際、画像内位置検出部122は、線分群における手中心の位置から手首の位置となる方向に存在する折れ曲がり点を検出し、手首の位置として適切か否かを判定する。画像内位置検出部122は、図10の二値画像1102の線分群FLにおいて手中心の位置Q11から手首の位置となる方向に存在する折れ曲がり点Q12を検出し、該折れ曲がり点Q12が手首の位置として適切か否かを判定する。このとき、画像内位置検出部122は、例えば、手中心の位置Q11から折れ曲がり点Q12までの距離が手中心から手首までの距離と対応しているか否かに基づいて、折れ曲がり点Q12が手首の位置として適切か否かを判定する。また、画像内位置検出部122は、例えば、折れ曲がり点Q12で接続している2本の線分のなす角が、手首の屈曲可能な角度範囲内であるか否かに基づいて、折れ曲がり点Q12が手首の位置として適切か否かを判定する。そして、折れ曲がり点Q12が手首の位置として適切であると判定した場合、画像内位置検出部122は、折れ曲がり点Q12を手首の位置を示す点P2として検出する。 After detecting the position of the center of the hand, the position detection unit 122 in the image is based on the position of the center of the hand, the position of the bending point in the line segment group, and the average value of the distance from the center of the hand to the wrist in the binary image 1102. And detect the position of the wrist. When detecting the position of the wrist, the position detection unit 122 in the image detects a bending point existing in the direction from the position of the center of the hand to the position of the wrist in the line segment group, and determines whether or not the position of the wrist is appropriate. .. The position detection unit 122 in the image detects a bending point Q12 existing in the direction from the position Q11 at the center of the hand to the position of the wrist in the line segment group FL of the binary image 1102 in FIG. 10, and the bending point Q12 is the position of the wrist. It is judged whether it is appropriate or not. At this time, the position detection unit 122 in the image has the bending point Q12 of the wrist, for example, based on whether or not the distance from the position Q11 at the center of the hand to the bending point Q12 corresponds to the distance from the center of the hand to the wrist. Determine if it is appropriate as a position. Further, the position detection unit 122 in the image is, for example, based on whether or not the angle formed by the two line segments connected at the bending point Q12 is within the bendable angle range of the wrist, the bending point Q12. Determines whether is the appropriate wrist position. Then, when it is determined that the bending point Q12 is appropriate as the position of the wrist, the position detection unit 122 in the image detects the bending point Q12 as the point P2 indicating the position of the wrist.

その後、画像内位置検出部122は、続けて、肘の位置を検出する。しかしながら、図10の二値画像1102における第1の上肢領域1102Aは、左肘の部分を含まない。このため、画像内位置検出部122は、第1の上肢領域1102Aから手中心及び各関節の位置を検出する処理を終了し、次に、第2の上肢領域1102Bから手中心及び各関節の位置を検出する処理を行う。 After that, the position detection unit 122 in the image subsequently detects the position of the elbow. However, the first upper limb region 1102A in the binary image 1102 of FIG. 10 does not include the left elbow portion. Therefore, the position detection unit 122 in the image ends the process of detecting the position of the hand center and each joint from the first upper limb region 1102A, and then the position of the hand center and each joint from the second upper limb region 1102B. Is processed to detect.

第2の上肢領域1102Bから手中心及び各関節の位置を検出する場合も、画像内位置検出部122は、まず、第2の上肢領域1102Bと対応する上肢の延伸方向を示す線分群FRを生成する。その後、画像内位置検出部122は、生成した線分群FRにおいて日画像1102の下辺から最も遠い端Q20を始点とし、線分群FRにおける他端Q23に向かって手中心の位置を検出する処理を行う。このとき、画像内位置検出部122は、線分群FRにおける折れ曲がり点Q21を手中心の位置を示す点P0として検出する。 When detecting the center of the hand and the position of each joint from the second upper limb region 1102B, the position detection unit 122 in the image first generates a line segment group FR indicating the extension direction of the upper limb corresponding to the second upper limb region 1102B. do. After that, the position detection unit 122 in the image performs a process of detecting the position of the center of the hand toward the other end Q23 in the line segment group FR, starting from the end Q20 farthest from the lower side of the day image 1102 in the generated line segment group FR. .. At this time, the position detection unit 122 in the image detects the bending point Q21 in the line segment group FR as the point P0 indicating the position of the center of the hand.

第2の上肢領域1102Bにおける手中心の位置を検出した後、画像内位置検出部122は、線分群FR上で手首の位置を検出する。しかしながら、図10の二値画像における線分群FRでは、折れ曲がり点Q21から手首の方向に見たときに最初に現れる折れ曲がり点Q22は、第2の上肢領域1102Bと対応する右上肢の肘の部分に存在する。このため、手中心の位置(折れ曲がり点Q21)から折れ曲がり点Q22までの距離は、手中心から手首までの距離よりも長くなる。すなわち、線分群FRにおける折れ曲がり点Q21を手中心の位置とした場合、線分群FRには手首の位置と対応する折れ曲がり点が存在しない。このように、線分群に手首の位置と対応する折れ曲がり点が存在しない場合、画像内位置検出部122は、例えば、手中心の位置(折れ曲がり点Q21)と折れ曲がり点Q22とを結ぶ線分上の点Q24を、手首の位置を示す点P1として検出する。点Q24は、手中心の位置と折れ曲がり点Q22とを結ぶ線分上の複数の点のうちの、手中心の位置からの距離が深度画像における手中心から手首までの距離となる点である。 After detecting the position of the center of the hand in the second upper limb region 1102B, the position detection unit 122 in the image detects the position of the wrist on the line segment group FR. However, in the line group FR in the binary image of FIG. 10, the bending point Q22 that first appears when viewed from the bending point Q21 in the direction of the wrist is located at the elbow portion of the upper right limb corresponding to the second upper limb region 1102B. exist. Therefore, the distance from the position of the center of the hand (bending point Q21) to the bending point Q22 is longer than the distance from the center of the hand to the wrist. That is, when the bending point Q21 in the line segment group FR is set to the position of the center of the hand, the bending point corresponding to the position of the wrist does not exist in the line segment group FR. In this way, when there is no bending point corresponding to the position of the wrist in the line segment group, the position detection unit 122 in the image is, for example, on the line segment connecting the position of the center of the hand (the bending point Q21) and the bending point Q22. Point Q24 is detected as point P1 indicating the position of the wrist. The point Q24 is a point where the distance from the position of the center of the hand is the distance from the center of the hand to the wrist in the depth image among the plurality of points on the line segment connecting the position of the center of the hand and the bending point Q22.

その後、画像内位置検出部122は、線分群FRにおける折れ曲がり点Q22を肘の位置を示す点P2として検出する。また、肘の位置を検出した後、画像内位置検出部122は、肩の位置を検出する処理を行うが、図10の二値画像1102における第2の上肢領域は、右肩の部分を含まない。このため、画像内位置検出部122は、第1の上肢領域1102Aから手中心及び各関節の位置を検出する処理を終了する。 After that, the position detection unit 122 in the image detects the bending point Q22 in the line segment group FR as the point P2 indicating the position of the elbow. Further, after detecting the position of the elbow, the position detection unit 122 in the image performs a process of detecting the position of the shoulder, but the second upper limb region in the binary image 1102 of FIG. 10 includes the right shoulder portion. No. Therefore, the position detection unit 122 in the image ends the process of detecting the position of the center of the hand and the position of each joint from the first upper limb region 1102A.

二値画像に基づいて上肢領域内の手中心及び各関節の位置を検出した後、手位置検出装置1は、三次元座標算出部123により検出した手中心及び各関節の三次元座標を算出する。三次元座標算出部123は、ピンホールカメラモデルを適用し、深度画像の撮像範囲と、深度画像の画素数と、深度画像における手中心及び関節の位置と、深度値とに基づいて、手中心及び関節の三次元座標を算出する。 After detecting the center of the hand and the position of each joint in the upper limb region based on the binary image, the hand position detecting device 1 calculates the three-dimensional coordinates of the center of the hand and each joint detected by the three-dimensional coordinate calculation unit 123. .. The three-dimensional coordinate calculation unit 123 applies a pinhole camera model, and is based on the imaging range of the depth image, the number of pixels of the depth image, the positions of the hand center and the joint in the depth image, and the depth value. And calculate the three-dimensional coordinates of the joint.

三次元座標算出123は、深度画像1101(二値画像1102)から検出された上肢領域毎に、検出した手中心及び各関節の三次元座標を算出する。例えば、三次元座標算出部123は、まず、図10の第1の上肢領域1102Aから検出した手中心の位置を示す点P0の三次元座標、及び手首の位置を示す点P1の三次元座標を算出する。三次元座標算出部123は、ピンホールカメラモデルを適用し、深度画像1101における手中心の位置Q11と、該位置Q11の深度値と、深度画像1101の撮像範囲と、深度画像1101の画素数とに基づいて、手中心及び手首の三次元座標を算出する。その後、三次元座標算出部123は、図10の第2の上肢領域1102Bから検出した手中心の位置を示す点P0の三次元座標、手首の位置を示す点P1の三次元座標、及び肘の位置を示す点P2の三次元座標を算出する。 The three-dimensional coordinate calculation 123 calculates the three-dimensional coordinates of the detected hand center and each joint for each upper limb region detected from the depth image 1101 (binary image 1102). For example, the three-dimensional coordinate calculation unit 123 first obtains the three-dimensional coordinates of the point P0 indicating the position of the center of the hand detected from the first upper limb region 1102A in FIG. 10 and the three-dimensional coordinates of the point P1 indicating the position of the wrist. calculate. The three-dimensional coordinate calculation unit 123 applies a pinhole camera model to the position Q11 of the center of the hand in the depth image 1101, the depth value of the position Q11, the imaging range of the depth image 1101, and the number of pixels of the depth image 1101. Based on, the three-dimensional coordinates of the center of the hand and the wrist are calculated. After that, the three-dimensional coordinate calculation unit 123 determines the three-dimensional coordinates of the point P0 indicating the position of the center of the hand detected from the second upper limb region 1102B in FIG. 10, the three-dimensional coordinates of the point P1 indicating the position of the wrist, and the elbow. The three-dimensional coordinates of the point P2 indicating the position are calculated.

深度画像1101から検出した手中心及び各関節についての三次元座標を算出した後、手位置検出装置1は、補正部130により三次元座標の補正の有無の判定及び補正を行う。三次元座標の補正の有無の判定は、整合性判定部131が行う。整合性判定部131は、図5のフローチャートに沿った整合性判別処理を行って、三次元座標の補正の有無を判定する。整合性判定部131が行う整合性判別処理は、空間整合性の判別と、時間整合性の判別とを含む。 After calculating the three-dimensional coordinates of the hand center and each joint detected from the depth image 1101, the hand position detection device 1 determines and corrects whether or not the three-dimensional coordinates are corrected by the correction unit 130. The consistency determination unit 131 determines whether or not the three-dimensional coordinates are corrected. The consistency determination unit 131 performs the consistency determination process according to the flowchart of FIG. 5 to determine whether or not the three-dimensional coordinates are corrected. The consistency determination process performed by the consistency determination unit 131 includes determination of spatial consistency and determination of time consistency.

図11は、空間整合性の判別方法を説明する図である。
図11の深度画像1101には、上肢領域1101A及び1101Bと、手中心及び各関節の位置とを示している。
FIG. 11 is a diagram illustrating a method for determining spatial consistency.
The depth image 1101 of FIG. 11 shows the upper limb regions 1101A and 1101B, the center of the hand, and the positions of the joints.

整合性判定部131は、深度画像1101における上肢領域毎に、手中心及び各関節の三次元座標(位置)についての空間整合性及び時間整合性の判別を行う。このとき、本実施形態の手位置検出装置1における整合性判定部131は、図5のフローチャートのように、まず、空間整合性の判別を行う。 The consistency determination unit 131 determines the spatial consistency and the time consistency of the three-dimensional coordinates (positions) of the center of the hand and each joint for each upper limb region in the depth image 1101. At this time, the consistency determination unit 131 in the hand position detection device 1 of the present embodiment first determines the spatial consistency as shown in the flowchart of FIG.

例えば、図11の深度画像1101における第1の上肢領域1101Aには、手中心を示す点P0と手首を示す点P1とが示されている。空間整合性の判別では、整合性判定部131は、手中心と手首との位置関係についての空間的な整合性を判別する。整合性判定部131は、まず、手中心を示す点P0についての整合性パラメータC0を「True」とし(ステップS60301)、点P0の三次元座標(X0,Y0,Z0)から深度画像1101内の座標(x0,y0)と距離z0とを算出する(ステップS60302)。ここで、整合性判定部131は、深度画像1101の座標及び深度値から三次元座標を算出する数式に対する逆算の数式により、三次元座標(X0,Y0,Z0)を深度画像内の座標(x0,y0)と距離z0とに変換する。 For example, in the first upper limb region 1101A in the depth image 1101 of FIG. 11, a point P0 indicating the center of the hand and a point P1 indicating the wrist are shown. In the determination of spatial consistency, the consistency determination unit 131 determines the spatial consistency regarding the positional relationship between the center of the hand and the wrist. First, the consistency determination unit 131 sets the consistency parameter C0 for the point P0 indicating the center of the hand to "True" (step S60301), and sets the three-dimensional coordinates (X0, Y0, Z0) of the point P0 in the depth image 1101. The coordinates (x0, y0) and the distance z0 are calculated (step S60302). Here, the consistency determination unit 131 sets the three-dimensional coordinates (X0, Y0, Z0) into the coordinates (x0) in the depth image by the back calculation formula for the formula for calculating the three-dimensional coordinates from the coordinates and the depth value of the depth image 1101. , Y0) and the distance z0.

次に、整合性判定部131は、点P0についての距離z0と、深度画像1101における座標(x0,y0)の深度値z0’との大小関係がz0’>z0+Mであるか否かを判定する(ステップS60303及びS60304)。深度画像1101における座標(x0,y0)の深度値が深度画像の撮像範囲内に存在する手中心までの距離と対応している場合、距離z0と深度値z0’との大小関係は、上記のようにz0’≦z0+Mとなる。図11の深度画像1101における手中心を示す点P0は第1の上肢領域1101A内に含まれ、かつ手のひらの中央部に存在する。このため、手中心を示す点P0についての距離z0と深度値z0’との大小関係は、z0’≦z0+Mとなる。この場合、整合性判定部131は、次に、手中心の位置と、隣接する関節(手首)の位置との三次元距離lenを算出し、距離lenが対象者の手中心から手首までの寸法と整合するか否かを判定する(ステップS60305〜S60307)。 Next, the consistency determination unit 131 determines whether or not the magnitude relationship between the distance z0 with respect to the point P0 and the depth value z0'of the coordinates (x0, y0) in the depth image 1101 is z0'> z0 + M. (Steps S60303 and S60304). When the depth value of the coordinates (x0, y0) in the depth image 1101 corresponds to the distance to the hand center existing in the imaging range of the depth image, the magnitude relationship between the distance z0 and the depth value z0'is described above. As shown in this case, z0'≦ z0 + M. The point P0 indicating the center of the hand in the depth image 1101 of FIG. 11 is included in the first upper limb region 1101A and is located in the central part of the palm. Therefore, the magnitude relationship between the distance z0 and the depth value z0'with respect to the point P0 indicating the center of the hand is z0'≤ z0 + M. In this case, the consistency determination unit 131 then calculates a three-dimensional distance len between the position of the center of the hand and the position of the adjacent joint (wrist), and the distance len is the dimension from the center of the hand to the wrist of the subject. It is determined whether or not it is consistent with (steps S6035-S60307).

z0’≦z0+Mである場合、整合性判定部131は、次に、手中心を示す点P0の三次元座標(X0,Y0,Z0)と、隣接する手首を示す点P1の三次元座標(X1,Y1,Z1)との三次元距離lenを算出する(ステップS60305)。図11の深度画像1101における点P0と点P1との距離len1’は、三次元距離lenと対応する深度画像内での距離(平面内距離)を示している。三次元距離lenを算出した後、整合性判定部131は、寸法履歴192から対象者の手中心から手首までの寸法(第1の寸法L1)を読み出して差ΔL=len−L1を算出する(ステップS60306)。 When z0'≤ z0 + M, the consistency determination unit 131 then determines the three-dimensional coordinates (X0, Y0, Z0) of the point P0 indicating the center of the hand and the three-dimensional coordinates (X1) of the point P1 indicating the adjacent wrist. , Y1, Z1) and the three-dimensional distance len is calculated (step S60305). The distance len1'between the points P0 and the point P1 in the depth image 1101 of FIG. 11 indicates the distance (in-plane distance) in the depth image corresponding to the three-dimensional distance len. After calculating the three-dimensional distance len, the consistency determination unit 131 reads out the dimension from the center of the subject's hand to the wrist (first dimension L1) from the dimension history 192 and calculates the difference ΔL = len-L1 (1). Step S60306).

三次元距離lenと対象者の寸法との差ΔLを算出した後、整合性判定部131は、算出した差ΔLの絶対値|ΔL|と閾値THLとの関係が|ΔL|>THLであるか否かを判定する(ステップS60307)。 After calculating the difference ΔL between the three-dimensional distance len and the dimension of the subject, the consistency determination unit 131 determines whether the relationship between the absolute value | ΔL | of the calculated difference ΔL and the threshold value THL is | ΔL |> THL. It is determined whether or not (step S60307).

図11の深度画像1101における第1の上肢領域1101A内の点P1の位置は、手首の部分に存在する。このため、深度画像1101における点P1の位置の座標(x1,y1)及び深度値に基づいて算出した点P1の三次元座標は、深度画像の撮像範囲内における手首の位置と対応している。従って、点P0の三次元座標と点P1の三次元座標との三次元距離lenは、手中心と深度画像の撮像範囲内における対象者の手中心から手首までの寸法と略一致する。すなわち、整合性判定部131が算出した差ΔLは非常に小さな値となるため、絶対値|ΔL|と閾値THLとの大小関係は|ΔL|≦THLとなる。この場合、整合性判定部131は、手中心を示す点P0の三次元座標(X0,Y0,Z0)と、深度画像の撮像範囲内における対象者の手中心の位置とが空間的に整合すると判定する。空間的に整合すると判定した場合、整合性判定部131は、次に、手中心を示す点P0の三次元座標(X0,Y0,Z0)が時間的に整合するか否か(時間整合性)を判定する(ステップS60308及びS60309)。 The position of the point P1 in the first upper limb region 1101A in the depth image 1101 of FIG. 11 exists at the wrist portion. Therefore, the coordinates (x1, y1) of the position of the point P1 in the depth image 1101 and the three-dimensional coordinates of the point P1 calculated based on the depth value correspond to the position of the wrist in the imaging range of the depth image. Therefore, the three-dimensional distance len between the three-dimensional coordinates of the point P0 and the three-dimensional coordinates of the point P1 substantially coincides with the dimensions from the center of the hand to the wrist of the subject within the imaging range of the center of the hand and the depth image. That is, since the difference ΔL calculated by the consistency determination unit 131 is a very small value, the magnitude relationship between the absolute value | ΔL | and the threshold value THL is | ΔL | ≦ THL. In this case, the consistency determination unit 131 spatially matches the three-dimensional coordinates (X0, Y0, Z0) of the point P0 indicating the hand center with the position of the subject's hand center within the imaging range of the depth image. judge. When it is determined that the consistency is spatially matched, the consistency determination unit 131 next determines whether or not the three-dimensional coordinates (X0, Y0, Z0) of the point P0 indicating the hand center are temporally matched (time consistency). (Steps S60308 and S60309).

点P0の三次元座標についての時間整合性を判定するため、本実施形態の整合性判定部131は、点P0の移動速度S0を算出する(ステップS60308)。移動速度S0を算出するため、整合性判定部131は、過去の深度画像1101における第1の上肢領域1101Aから検出した手中心を示す点P0の三次元座標(X0’,Y0’,Z0’)を座標履歴193から読み出す。例えば、図11の深度画像1101が時刻tに撮像された深度画像である場合、整合性判定部131は、例えば、時刻t−Δtに撮像された深度画像から検出した点P0の三次元座標を読み出す。ここで、Δtは、例えば、深度センサ2における深度画像の撮像間隔である。 In order to determine the time consistency with respect to the three-dimensional coordinates of the point P0, the consistency determination unit 131 of the present embodiment calculates the moving speed S0 of the point P0 (step S60308). In order to calculate the movement speed S0, the consistency determination unit 131 uses the three-dimensional coordinates (X0', Y0', Z0') of the point P0 indicating the center of the hand detected from the first upper limb region 1101A in the past depth image 1101. Is read from the coordinate history 193. For example, when the depth image 1101 of FIG. 11 is a depth image captured at time t, the consistency determination unit 131 uses, for example, the three-dimensional coordinates of the point P0 detected from the depth image captured at time t−Δt. read out. Here, Δt is, for example, the imaging interval of the depth image in the depth sensor 2.

過去の点P0の三次元座標を読み出した後、整合性判定部131は、現在の点P0の三次元座標(X0,Y0,Z0)と過去の点P0の三次元座標(X0’,Y0’,Z0’)との三次元距離と、深度画像の撮像間隔Δtとに基づいて、移動速度S0を算出する。 After reading the three-dimensional coordinates of the past point P0, the consistency determination unit 131 uses the three-dimensional coordinates of the current point P0 (X0, Y0, Z0) and the three-dimensional coordinates of the past point P0 (X0', Y0'). , Z0'), and the moving speed S0 is calculated based on the three-dimensional distance and the imaging interval Δt of the depth image.

深度画像の撮像範囲10内で作業員7の上肢が動いている場合、作業員7が動かしている手の移動速度には上限がある。このため、現在の点P0の三次元座標(X0,Y0,Z0)と過去の点P0の三次元座標(X0’,Y0’,Z0’)とが、それぞれ、深度画像の撮像範囲内における対象者の左手の手中心と対応している場合には、移動速度S0は、必ず閾値THS以下となる。言い換えると、移動速度S0が閾値THSよりも大きい場合、現在の点P0の三次元座標(X0,Y0,Z0)と対応する対象者の上肢内での位置は、過去の点P0の三次元座標(X0’,Y0’,Z0’)と対応する対象者の上肢内での位置とは異なるといえる。よって、S0≦THSである場合には、整合性判定部131は、手中心を示す点P0の三次元座標(X0,Y0,Z0)と、過去の手中心の三次元座標とが時間的に整合すると判定する。時間的に整合すると判定した場合、整合性判定部131は、手中心を示す点P0に対する整合性パラメータC0を「True」のままとする。一方、S0>THSである場合には、整合性判定部131は、手中心を示す点P0の三次元座標(X0,Y0,Z0)と、過去の手中心の三次元座標とは時間的に整合しないと判定する。時間的に整合しないと判定した場合、整合性判定部131は、手中心を示す点P0に対する整合性パラメータC0を「False」に変更する(ステップS60312)。 When the upper limbs of the worker 7 are moving within the imaging range 10 of the depth image, there is an upper limit to the moving speed of the hand moved by the worker 7. Therefore, the three-dimensional coordinates (X0, Y0, Z0) of the current point P0 and the three-dimensional coordinates (X0', Y0', Z0') of the past point P0 are objects within the imaging range of the depth image, respectively. When corresponding to the center of the left hand of the person, the movement speed S0 is always equal to or less than the threshold value THS. In other words, when the moving speed S0 is larger than the threshold THS, the position in the upper limb of the subject corresponding to the three-dimensional coordinates (X0, Y0, Z0) of the current point P0 is the three-dimensional coordinates of the past point P0. It can be said that the position in the upper limb of the subject corresponding to (X0', Y0', Z0') is different. Therefore, when S0 ≦ THS, the consistency determination unit 131 temporally changes the three-dimensional coordinates (X0, Y0, Z0) of the point P0 indicating the hand center and the three-dimensional coordinates of the past hand center. Judged to be consistent. When it is determined that they are consistent in time, the consistency determination unit 131 keeps the consistency parameter C0 with respect to the point P0 indicating the center of the hand as “True”. On the other hand, when S0> THS, the consistency determination unit 131 temporally determines the three-dimensional coordinates (X0, Y0, Z0) of the point P0 indicating the hand center and the three-dimensional coordinates of the past hand center. Judge as inconsistent. When it is determined that they do not match in time, the consistency determination unit 131 changes the consistency parameter C0 for the point P0 indicating the center of the hand to "False" (step S60312).

整合性判定部131は、第1の上肢領域1101Aから検出した手中心を示す点P0についての整合性の判別を終えると、次に、第1の上肢領域1101Aから検出した手首を示す点P1についての整合性の判別を行う。図11の深度画像1101では、第1の上肢領域1101Aから検出された関節が手首のみである。このため、点P1についての整合性の判別を終えると、整合性判定部131は、第1の上肢領域1101Aから検出された手中心及び関節を処理対象とする整合性判別処理を終了する。 When the consistency determination unit 131 finishes determining the consistency of the point P0 indicating the center of the hand detected from the first upper limb region 1101A, the consistency determination unit 131 next, regarding the point P1 indicating the wrist detected from the first upper limb region 1101A. To determine the consistency of. In the depth image 1101 of FIG. 11, the only joint detected from the first upper limb region 1101A is the wrist. Therefore, when the consistency determination for the point P1 is completed, the consistency determination unit 131 ends the consistency determination process for the center of the hand and the joint detected from the first upper limb region 1101A.

また、整合性判定部131は、図11の深度画像1101における第2の上肢領域1101Bから検出された手中心及び関節を処理対象と整合性判別処理では、以下のような処理を行う。 Further, the consistency determination unit 131 performs the following processing in the consistency determination processing with the hand center and the joint detected from the second upper limb region 1101B in the depth image 1101 of FIG. 11 as the processing target.

整合性判定部131は、まず、第2の上肢領域1101Bから検出された手中心を示す点P0の整合性パラメータC0を「True」に設定し、点P0の三次元座標の空間整合性についての判定を行う。整合性判定部131は、まず、点P0の三次元座標から深度画像内での座標(x0,y0)と距離z0とを算出し、距離z0と深度画像における座標(x0,y0)の深度値z0’との関係がz0’>z0+Mであるか否かを判定する。図11の深度画像1101では、点P0の位置が第2の上肢領域1101B内である。このため、距離z0と深度値z0’との関係は、z0’≦z0+Mとなる。従って、整合性判定部131は、次に、第2の上肢領域1101Bから検出された手中心を示す点P0と手首を示す点P1との三次元距離lenを算出し、該三次元距離lenと対象者の手中心から手首までの寸法との差ΔLを算出する。その後、整合性判定部131は、算出した差ΔLの絶対値|ΔL|と閾値THLとの関係が|ΔL|>THLであるか否かを判定する。 The consistency determination unit 131 first sets the consistency parameter C0 of the point P0 indicating the center of the hand detected from the second upper limb region 1101B to "True", and determines the spatial consistency of the three-dimensional coordinates of the point P0. Make a judgment. The consistency determination unit 131 first calculates the coordinates (x0, y0) in the depth image and the distance z0 from the three-dimensional coordinates of the point P0, and the depth value of the distance z0 and the coordinates (x0, y0) in the depth image. It is determined whether or not the relationship with z0'is z0'> z0 + M. In the depth image 1101 of FIG. 11, the position of the point P0 is within the second upper limb region 1101B. Therefore, the relationship between the distance z0 and the depth value z0'is z0'≤z0 + M. Therefore, the consistency determination unit 131 then calculates a three-dimensional distance len between the point P0 indicating the center of the hand and the point P1 indicating the wrist detected from the second upper limb region 1101B, and the three-dimensional distance len is used. The difference ΔL from the dimension from the center of the subject's hand to the wrist is calculated. After that, the consistency determination unit 131 determines whether or not the relationship between the calculated absolute value | ΔL | of the difference ΔL and the threshold value THL is | ΔL |> THL.

図11の深度画像1101の第2の上肢領域1101Bにおける手首を示す点P1の位置は、例えば、手中心を示す点P0と肘を示す点P2とを結ぶ線分上であって、点P0からの距離が手中心から手首までの寸法となる点である。このため、手中心を示す点P0と手首を示す点P1との三次元距離lenは、対象者の手中心から手首までの寸法と略一致する。よって、絶対値|ΔL|と閾値THLとの大小関係は、|ΔL|≦THLとなる。この場合、整合性判定部131は、手中心を示す点P0の三次元座標(X0,Y0,Z0)と、深度画像の撮像範囲内における対象者の手中心の位置とが空間的に整合すると判定する。空間的に整合すると判定した場合、整合性判定部131は、次に、手中心を示す点P0の三次元座標(X0,Y0,Z0)の移動速度S0を算出し、点P0の三次元座標が時間的に整合するか否か(時間整合性)を判定する。時間的に整合する場合、整合性判定部131は、点P0の整合性パラメータC0を「True」のままとする。一方、時間的に整合しない場合、整合性判定部131は、点P0の整合性パラメータC0を「False」に変更する。その後、整合性判定部131は、第2の上肢領域1101Bから検出された手首を示す点P1の三次元座標の空間整合性についての判定する。 The position of the point P1 indicating the wrist in the second upper limb region 1101B of the depth image 1101 of FIG. 11 is, for example, on a line segment connecting the point P0 indicating the center of the hand and the point P2 indicating the elbow, from the point P0. Is the point where the distance is the dimension from the center of the hand to the wrist. Therefore, the three-dimensional distance len between the point P0 indicating the center of the hand and the point P1 indicating the wrist substantially coincides with the dimension from the center of the hand to the wrist of the subject. Therefore, the magnitude relationship between the absolute value | ΔL | and the threshold value THL is | ΔL | ≦ THL. In this case, the consistency determination unit 131 spatially matches the three-dimensional coordinates (X0, Y0, Z0) of the point P0 indicating the hand center with the position of the subject's hand center within the imaging range of the depth image. judge. When it is determined that they are spatially aligned, the consistency determination unit 131 next calculates the moving speed S0 of the three-dimensional coordinates (X0, Y0, Z0) of the point P0 indicating the center of the hand, and the three-dimensional coordinates of the point P0. Determines whether or not is time-consistent (time-consistent). When matching in time, the consistency determination unit 131 leaves the consistency parameter C0 at the point P0 as “True”. On the other hand, if they do not match in time, the consistency determination unit 131 changes the consistency parameter C0 at the point P0 to "False". After that, the consistency determination unit 131 determines the spatial consistency of the three-dimensional coordinates of the point P1 indicating the wrist detected from the second upper limb region 1101B.

詳細な説明は省略するが、整合性判定部131が点P1の三次元座標から算出した距離z1と、深度画像1101における深度値z1’との関係は、z1’<z1+Mとなる。このため、整合性判定部131は、次に、手首を示す点P1と肘を示す点P2との三次元距離lenが対象者の手首から肘までの寸法と整合するか否かを判定する。図11の深度画像1101における第2の上肢領域1101Bは、上記のように、オクルージョンにより対象者の右上肢における手の部分と対応する領域1101Cが欠落している。第2の上肢領域1101Bが手の部分と対応する領域1101Cを含む場合、第2の上肢領域110Bから検出される手中心及び手首の位置は、それぞれ、図11の深度画像1101における点PC0及び点PC1の位置となる。すなわち、オクルージョンにより対象者の右上肢における手の部分と対応する領域1101Cが欠落している深度画像1101では、手中心を示す点P0及び手首を示す点P1の位置が、それぞれ、実際の位置よりも肘関節側に寄っている。従って、手首を示す点P1と肘を示す点P2との三次元距離lenは、正しい手首の位置を示す点PC1と肘を示す点P2との三次元距離よりも短く、かつ距離の差が略同一であるとは言い難い大きさとなる。図11の深度画像1101における第2の上肢領域1101B内の点P1と点P2との距離len2’は、該2つの点P1及びP2の三次元距離lenと対応する深度画像内での距離(平面内距離)を示している。また、図11の深度画像1101における点PC1と点P2との距離lenc’は、該2つの点PC1及びP2の三次元距離と対応する深度画像内での距離(平面内距離)を示している。 Although detailed description will be omitted, the relationship between the distance z1 calculated by the consistency determination unit 131 from the three-dimensional coordinates of the point P1 and the depth value z1'in the depth image 1101 is z1'<z1 + M. Therefore, the consistency determination unit 131 next determines whether or not the three-dimensional distance len between the point P1 indicating the wrist and the point P2 indicating the elbow matches the dimension from the wrist to the elbow of the subject. As described above, the second upper limb region 1101B in the depth image 1101 of FIG. 11 lacks the region 1101C corresponding to the hand portion in the upper right limb of the subject due to occlusion. When the second upper limb region 1101B includes the region 1101C corresponding to the hand portion, the positions of the hand center and the wrist detected from the second upper limb region 110B are the points PC0 and the points in the depth image 1101 of FIG. 11, respectively. It is the position of PC1. That is, in the depth image 1101 in which the region 1101C corresponding to the hand portion in the upper right limb of the subject is missing due to occlusion, the positions of the point P0 indicating the center of the hand and the point P1 indicating the wrist are respectively from the actual positions. Is also closer to the elbow joint side. Therefore, the three-dimensional distance len between the point P1 indicating the wrist and the point P2 indicating the elbow is shorter than the three-dimensional distance between the point PC1 indicating the correct wrist position and the point P2 indicating the elbow, and the difference in distance is approximately short. The size is hard to say that they are the same. The distance len2'between points P1 and P2 in the second upper limb region 1101B in the depth image 1101 of FIG. 11 is the distance (plane) in the depth image corresponding to the three-dimensional distance len of the two points P1 and P2. Inner distance) is shown. Further, the distance lenc'between the points PC1 and the point P2 in the depth image 1101 of FIG. 11 indicates the distance (in-plane distance) in the depth image corresponding to the three-dimensional distance between the two points PC1 and P2. ..

すなわち、第2の上肢領域1101Bから検出した手首を示す点P1が判定対象である場合、点P1と点P2との三次元距離lenと、対象者の手首から肘までの寸法との差ΔLの絶対値|ΔL|は、|ΔL|>THLとなる。|ΔL|>THLである場合、整合性判定部131は、第2の上肢領域1101Bから検出した手首を示す点P1の三次元座標と、隣接する肘を示す点P2の三次元座標とが空間的に整合しないと判定する。このため、整合性判定部131は、第2の上肢領域1101Bから検出した手首を示す点P1の整合性パラメータC1を「False」に変更する(ステップS60312)。このように、空間的に整合しないと判定した場合、整合性判定部131は、点P1に対する時間整合性についての判定を省略し、次に、点P2の整合性についての判定を行う。図11の深度画像1101では、第2の上肢領域1101Bから検出された関節が手首及び肘のみである。このため、点P2の整合性についての判定を終えると、整合性判定部131は、第2の上肢領域1101Bから検出された手中心及び関節を処理対象とする整合性判別処理を終了する。 That is, when the point P1 indicating the wrist detected from the second upper limb region 1101B is the determination target, the difference ΔL between the three-dimensional distance len between the points P1 and the point P2 and the dimension from the wrist to the elbow of the subject. The absolute value | ΔL | becomes | ΔL |> THL. When | ΔL |> THL, the consistency determination unit 131 has a space in which the three-dimensional coordinates of the point P1 indicating the wrist detected from the second upper limb region 1101B and the three-dimensional coordinates of the point P2 indicating the adjacent elbow are spatial. Judged as inconsistent. Therefore, the consistency determination unit 131 changes the consistency parameter C1 of the point P1 indicating the wrist detected from the second upper limb region 1101B to “False” (step S60312). When it is determined that the points are not spatially consistent in this way, the consistency determination unit 131 omits the determination of the time consistency with respect to the point P1, and then determines the consistency of the point P2. In the depth image 1101 of FIG. 11, the only joints detected from the second upper limb region 1101B are the wrist and the elbow. Therefore, when the determination of the consistency of the point P2 is completed, the consistency determination unit 131 ends the consistency determination process for the center of the hand and the joint detected from the second upper limb region 1101B.

図11の深度画像1101から検出した手中心及び関節に対する整合性判別処理を終えると、整合性判定部131は、上肢領域毎に、整合性パラメータCiが「False」である手中心又は関節が存在するか否かを判定する(ステップS604)。判定の対象となっている上肢領域と対応する手中心及び関節の全ての整合性パラメータが「True」である場合、整合性判定部131(補正部130)は、手中心及び各関節の現在の三次元座標を、座標履歴193に格納する三次元座標に決定する(ステップS608)。 When the consistency determination process for the hand center and the joint detected from the depth image 1101 of FIG. 11 is completed, the consistency determination unit 131 has a hand center or a joint in which the consistency parameter Ci is "False" for each upper limb region. It is determined whether or not to do so (step S604). When all the consistency parameters of the hand center and the joint corresponding to the upper limb region to be determined are "True", the consistency determination unit 131 (correction unit 130) is the current of the hand center and each joint. The three-dimensional coordinates are determined to be the three-dimensional coordinates stored in the coordinate history 193 (step S608).

一方、整合性パラメータが「False」である手中心又は関節が存在する場合、整合性判定部131は、手中心の位置を変更して手中心及び各関節の三次元座標を再計算する座標再計算処理(ステップS606)を再計算部132に行わせる。なお、本実施形態の手位置検出装置1における整合性判定部131は、図4のフローチャートのように、座標再計算処理を行った回数rがN回以下である場合に、再計算部132に座標再計算処理を行わせる。 On the other hand, when there is a hand center or joint whose consistency parameter is "False", the consistency determination unit 131 changes the position of the hand center and recalculates the three-dimensional coordinates of the hand center and each joint. The recalculation unit 132 is made to perform the calculation process (step S606). The consistency determination unit 131 in the hand position detection device 1 of the present embodiment is used in the recalculation unit 132 when the number of times r of the coordinate recalculation processing is performed is N times or less as shown in the flowchart of FIG. Have the coordinates recalculated.

処理の対象となっている深度画像が図11の深度画像1101であり、かつ整合性判別処理の判定対象が第1の上肢領域1101Aである場合、整合性パラメータは全て「True」である。このため、整合性判定部131は、第1の上肢領域1101Aと対応する手中心を示す点P0の現在の三次元座標及び手首を示す点P1の現在の三次元座標を、座標履歴193に格納する三次元座標に決定する。 When the depth image to be processed is the depth image 1101 of FIG. 11 and the determination target of the consistency determination process is the first upper limb region 1101A, all the consistency parameters are "True". Therefore, the consistency determination unit 131 stores the current three-dimensional coordinates of the point P0 indicating the center of the hand corresponding to the first upper limb region 1101A and the current three-dimensional coordinates of the point P1 indicating the wrist in the coordinate history 193. Determine the three-dimensional coordinates to be used.

これに対し、処理の対象となっている深度画像が図11の深度画像1101であり、かつ整合性判別処理の判定対象が第2の上肢領域1101Bである場合、手首を示す点P1の整合性パラメータC1が「False」となっている。このため、整合性判定部131は、第2の上肢領域1101Bと対応する手中心及び各関節の三次元座標を再計算する座標再計算処理を、再計算部132に行わせる。再計算部132は、座標再計算処理として、図6のフローチャートに沿った処理を行う。すなわち、再計算部132は、図11の深度画像1101における第2の上肢領域1101B内の手中心を示す点P0の位置を変更し、変更後の点P0の位置に基づいて、第2の上肢領域1101Bと対応する手中心及び各関節の三次元座標を算出する。 On the other hand, when the depth image to be processed is the depth image 1101 of FIG. 11 and the determination target of the consistency determination processing is the second upper limb region 1101B, the consistency of the point P1 indicating the wrist The parameter C1 is "False". Therefore, the consistency determination unit 131 causes the recalculation unit 132 to perform a coordinate recalculation process for recalculating the three-dimensional coordinates of the hand center and each joint corresponding to the second upper limb region 1101B. The recalculation unit 132 performs a process according to the flowchart of FIG. 6 as a coordinate recalculation process. That is, the recalculation unit 132 changes the position of the point P0 indicating the center of the hand in the second upper limb region 1101B in the depth image 1101 of FIG. 11, and the second upper limb is based on the changed position of the point P0. The three-dimensional coordinates of the center of the hand corresponding to the region 1101B and each joint are calculated.

再計算部132は、まず、深度画像1101における第2の上肢領域110Bと対応する手中心を示す点P0の位置を変更する(ステップS60601)。ステップS60601の処理では、再計算部132は、例えば、手首を示す点P1又は肘を示す点P2を始点とし、手中心を示す点P0を終点とする深度画像1101内のベクトルの方向に、所定の距離(画素数)だけ、点P1の位置を移動させる。 First, the recalculation unit 132 changes the position of the point P0 indicating the center of the hand corresponding to the second upper limb region 110B in the depth image 1101 (step S60601). In the process of step S60601, the recalculation unit 132 determines, for example, in the direction of the vector in the depth image 1101 starting from the point P1 indicating the wrist or the point P2 indicating the elbow and ending at the point P0 indicating the center of the hand. The position of the point P1 is moved by the distance (the number of pixels) of.

図12は、手中心の位置の変更方法を説明する図である。図12には、図11の深度画像1101における第2の上肢領域1101Bと対応する手中心を示す点P0の位置の変更方法の例を示している。 FIG. 12 is a diagram illustrating a method of changing the position of the center of the hand. FIG. 12 shows an example of a method of changing the position of the point P0 indicating the center of the hand corresponding to the second upper limb region 1101B in the depth image 1101 of FIG.

図12の深度画像1101における変更前の点P0の位置は、図10の線分群FRにおける折れ曲がり点Q21の位置である。また、図12の深度画像1101における肘を示す点P2の位置は、図10の線分群FRにおける折れ曲がり点Q22の位置である。また、図12の深度画像1101における手首を示す点P1の位置は、線分群FRにおける点Q21と点Q22とを結ぶ線分上の点Q24の位置である。 The position of the point P0 before the change in the depth image 1101 of FIG. 12 is the position of the bending point Q21 in the line segment group FR of FIG. Further, the position of the point P2 indicating the elbow in the depth image 1101 of FIG. 12 is the position of the bending point Q22 in the line segment group FR of FIG. Further, the position of the point P1 indicating the wrist in the depth image 1101 of FIG. 12 is the position of the point Q24 on the line segment connecting the point Q21 and the point Q22 in the line segment group FR.

手中心を示す点P0の位置を変更する場合、再計算部132は、手首を示す点P1を始点とし、手中心を示す点P0を終点とする深度画像1101内のベクトルの方向に所定の距離(画素数)だけ移動させる。点P0の位置を変更する前の深度画像1101における点P0及び点P1の位置はそれぞれ、位置Q21及びQ24である。図12の深度画像1101が処理の対象である場合、再計算部132は、位置Q24を始点とし、位置Q21を終点とするベクトルの方向に手中心を示す点P0の位置を変更する。すなわち、再計算部132は、深度画像1101における位置Q21及びQ24を通る線分LS1上であって、位置Q24からの距離が位置Q21よりも長くなる方向に、所定の画素数分だけ、手中心の位置P0を変更する。 When changing the position of the point P0 indicating the center of the hand, the recalculation unit 132 starts at the point P1 indicating the wrist and ends at the point P0 indicating the center of the hand as a predetermined distance in the direction of the vector in the depth image 1101. Move by (number of pixels). The positions of the points P0 and P1 in the depth image 1101 before the position of the point P0 is changed are the positions Q21 and Q24, respectively. When the depth image 1101 of FIG. 12 is the target of processing, the recalculation unit 132 changes the position of the point P0 indicating the center of the hand in the direction of the vector starting from the position Q24 and ending at the position Q21. That is, the recalculation unit 132 is centered on the line segment LS1 passing through the positions Q21 and Q24 in the depth image 1101 by a predetermined number of pixels in the direction in which the distance from the position Q24 is longer than the position Q21. The position P0 of is changed.

手中心を示す点P0の位置を変更した後、再計算部132は、変更後の点0の位置に基づいて手首を示す点P1の位置、肘を示す点P2の位置を変更する(ステップS60602)。図12の深度画像1101における点P0の位置が位置Q21から位置Q25に変更された場合、再計算部132は、例えば、点Pの移動量分だけ手首を示す点P1の位置を位置Q24から位置Q21側に移動させる。また、再計算部132は、肘を示す点P2の位置は位置Q22のままとする。 After changing the position of the point P0 indicating the center of the hand, the recalculation unit 132 changes the position of the point P1 indicating the wrist and the position of the point P2 indicating the elbow based on the changed position of the point 0 (step S60602). ). When the position of the point P0 in the depth image 1101 of FIG. 12 is changed from the position Q21 to the position Q25, the recalculation unit 132 positions the position of the point P1 indicating the wrist by the amount of movement of the point P, for example, from the position Q24. Move to the Q21 side. Further, the recalculation unit 132 keeps the position of the point P2 indicating the elbow at the position Q22.

深度画像1101における手中心及び各関節の位置を変更した後、再計算部132は、手中心及び各関節の三次元座標を算出する(ステップS60603〜S60607)。手中心及び各関節の三次元座標を算出する際、再計算部132は、まず、三次元座標を算出する手中心又は関節の深度画像内での位置が上肢領域内であるか否かを判定する(ステップS60604)。手中心又は関節の位置が上肢領域内である場合、再計算部132は、該手中心又は関節の位置の深度値に基づいて三次元座標を算出する(ステップS60605)。一方、手中心又は関節の位置が上肢領域外である場合、再計算部132は、該手中心又は関節の深度値を算出し、該深度値に基づいて三次元座標を算出する(ステップS60606)。 After changing the positions of the hand center and each joint in the depth image 1101, the recalculation unit 132 calculates the three-dimensional coordinates of the hand center and each joint (steps S60603 to S60607). When calculating the three-dimensional coordinates of the hand center and each joint, the recalculation unit 132 first determines whether or not the position of the hand center for calculating the three-dimensional coordinates or the joint in the depth image is within the upper limb region. (Step S60604). When the position of the center of the hand or the joint is within the upper limb region, the recalculation unit 132 calculates the three-dimensional coordinates based on the depth value of the position of the center of the hand or the joint (step S60605). On the other hand, when the position of the center of the hand or the joint is outside the upper limb region, the recalculation unit 132 calculates the depth value of the center of the hand or the joint, and calculates the three-dimensional coordinates based on the depth value (step S60606). ..

例えば、図12の深度画像1101における手中心の三次元座標を算出する場合、再計算部132は、変更後の手中心の位置が上肢領域1101B内であるか否かを判定する。変更後の手中心の位置が上肢領域1101B内(例えば位置Q25)である場合、再計算部132は、深度画像1101における位置Q25の座標、及び位置Q25の深度値を利用して、手中心を示す点P0の三次元座標を算出する。一方、変更後の手中心の位置が上肢領域1101B外(例えば位置Q26)である場合、再計算部132は、位置Q26における手中心の深度値を算出し、該深度値を利用して手中心を示す点P0の三次元座標を算出する。 For example, when calculating the three-dimensional coordinates of the hand center in the depth image 1101 of FIG. 12, the recalculation unit 132 determines whether or not the changed position of the hand center is within the upper limb region 1101B. When the position of the hand center after the change is within the upper limb region 1101B (for example, the position Q25), the recalculation unit 132 uses the coordinates of the position Q25 in the depth image 1101 and the depth value of the position Q25 to determine the hand center. The three-dimensional coordinates of the indicated point P0 are calculated. On the other hand, when the position of the center of the hand after the change is outside the upper limb region 1101B (for example, the position Q26), the recalculation unit 132 calculates the depth value of the center of the hand at the position Q26 and uses the depth value to center the hand. The three-dimensional coordinates of the point P0 indicating the above are calculated.

変更後の手中心の位置が上肢領域1101B外の位置Q26である場合、深度画像1101における位置Q26の深度値は、対象者の手までの距離ではなく、例えば、図8の深度画像1101における棚9までの距離と対応する。このため、深度画像1101における位置Q26の座標、及び位置Q26の深度値を利用して算出した三次元座標は、対象者の手中心の位置ではなく、棚9の位置を示す値となる。よって、変更後の手中心の位置が上肢領域1101B外となる場合、再計算部132は、手中心の三次元座標を正しく算出するために変更後の手中心の位置における手中心の深度値を算出する(推定する)。 When the position of the center of the hand after the change is the position Q26 outside the upper limb region 1101B, the depth value of the position Q26 in the depth image 1101 is not the distance to the subject's hand, for example, the shelf in the depth image 1101 of FIG. Corresponds to the distance to 9. Therefore, the coordinates of the position Q26 in the depth image 1101 and the three-dimensional coordinates calculated by using the depth value of the position Q26 are values indicating the position of the shelf 9 instead of the position of the center of the hand of the target person. Therefore, when the position of the hand center after the change is outside the upper limb region 1101B, the recalculation unit 132 calculates the depth value of the hand center at the position of the hand center after the change in order to correctly calculate the three-dimensional coordinates of the hand center. Calculate (estimate).

手中心の位置が上肢領域外である場合、再計算部132は、上肢領域1101内における手中心と手首とを通る線分上での深度値の分布に基づいて手中心の深度値を算出する。 When the position of the center of the hand is outside the upper limb region, the recalculation unit 132 calculates the depth value of the center of the hand based on the distribution of the depth value on the line segment passing through the center of the hand and the wrist in the upper limb region 1101. ..

図13は、三次元座標の算出に用いる深度値の推定方法を説明するグラフ図である。図13のグラフ図における横軸は、図12の深度画像1101における線分LS1上の位置である。また、図13のグラフ図における縦軸は、深度画像1101における深度(mm)であり、深度センサ2からの距離と対応している。 FIG. 13 is a graph illustrating a method of estimating a depth value used for calculating three-dimensional coordinates. The horizontal axis in the graph of FIG. 13 is the position on the line segment LS1 in the depth image 1101 of FIG. Further, the vertical axis in the graph of FIG. 13 is the depth (mm) in the depth image 1101 and corresponds to the distance from the depth sensor 2.

図13のグラフ図の横軸における位置Q30,Q22,Q21,Q25,Q31,Q26,及びQ32は、それぞれ、図12の深度画像1101における線分LS1上における位置と対応する。すなわち、図13のグラフ図における位置Q30から位置Q31までの区間の太線BZ1は、対象者の上肢における線分LS1上の各位置と対応する深度値を示している。また、図13のグラフ図における位置Q31から位置Q32までの区間の太線BZ2は、深度画像1101における各位置の深度値であり、棚9の表面と対応する深度値を示している。一方、図13のグラフ図における位置Q31から位置Q32までの区間の太い点線BZ3は、太線BZ1の深度値の変化から推定される、対象者の上肢における線分LS1上の各位置と対応する深度値を示している。 The positions Q30, Q22, Q21, Q25, Q31, Q26, and Q32 on the horizontal axis of the graph of FIG. 13 correspond to the positions on the line segment LS1 in the depth image 1101 of FIG. 12, respectively. That is, the thick line BZ1 in the section from the position Q30 to the position Q31 in the graph of FIG. 13 indicates the depth value corresponding to each position on the line segment LS1 in the upper limb of the subject. Further, the thick line BZ2 in the section from the position Q31 to the position Q32 in the graph of FIG. 13 is the depth value of each position in the depth image 1101 and indicates the depth value corresponding to the surface of the shelf 9. On the other hand, the thick dotted line BZ3 in the section from the position Q31 to the position Q32 in the graph of FIG. 13 corresponds to each position on the line segment LS1 in the upper limb of the subject, which is estimated from the change in the depth value of the thick line BZ1. Shows the value.

手中心を示す点P0の変更後の位置が位置Q26のように、上肢領域1101B外となる場合、再計算部132は、上肢領域1101B内の深度値の分布に基づいて、太い点線BZ3の分布を見積もる。再計算部132は、例えば、線分LS1上における、変更前の手中心の位置Q21又は手首の位置Q24から、上肢領域1101Bの外周と交差する位置Q31までの深度値の変化量に基づいて、位置Q31から位置Q32までの上肢の深度値の変化を示す太い点線BZ3を算出する。その後、再計算部132は、算出した太い点線BZ3における位置Q26と対応する点の深度値Z6を算出し、該深度値Z6を手中心の深度値として手中心の三次元座標を算出する。 When the changed position of the point P0 indicating the center of the hand is outside the upper limb region 1101B as in the position Q26, the recalculation unit 132 distributes the thick dotted line BZ3 based on the distribution of the depth value in the upper limb region 1101B. Estimate. The recalculation unit 132, for example, is based on the amount of change in the depth value from the position Q21 of the center of the hand or the position Q24 of the wrist before the change to the position Q31 intersecting the outer circumference of the upper limb region 1101B on the line segment LS1. A thick dotted line BZ3 indicating a change in the depth value of the upper limb from the position Q31 to the position Q32 is calculated. After that, the recalculation unit 132 calculates the depth value Z6 of the point corresponding to the position Q26 on the calculated thick dotted line BZ3, and calculates the three-dimensional coordinates of the hand center using the depth value Z6 as the depth value of the hand center.

このように、手中心を示す点P0の変更後の位置が上肢領域外である場合に手中心の深度値を算出して(推定して)三次元座標を算出することで、オクルージョンにより深度画像に写っていない手中心の三次元座標を正しく算出することが可能となる。 In this way, when the changed position of the point P0 indicating the center of the hand is outside the upper limb region, the depth value of the center of the hand is calculated (estimated) and the three-dimensional coordinates are calculated to obtain the depth image by occlusion. It is possible to correctly calculate the three-dimensional coordinates of the center of the hand that are not shown in.

なお、再計算部132は、例えば、手首を示す点P1の変更後の位置が上肢領域外である場合にも、上肢領域内での深度値の分布に基づいて手首の深度値を算出し(推定して)三次元座標を算出する。 In addition, the recalculation unit 132 calculates the depth value of the wrist based on the distribution of the depth value in the upper limb region even when the position after the change of the point P1 indicating the wrist is outside the upper limb region, for example. (Estimate) Calculate 3D coordinates.

手中心及び各関節の三次元座標の算出を終えると、再計算部132は、算出した三次元座標を整合性判別部131に通知し(ステップS60609)、座標再計算処理を終了する。その後、整合性判定部131は、再計算部132で算出した手中心及び各関節の三次元座標についての空間整合性及び時間整合性を判定する。そして、手中心及び各関節の全てが空間的及び時間的に整合していると判定した場合、整合性判定部131は、現在の手中心及び各関節の三次元座標を座標履歴193に格納する三次元座標に決定する。一方、手中心及び各関節のいずれかが、空間的又は時間的に整合していない場合、整合性判定部131は、手中心及び各関節の三次元座標を補正する処理を再計算部132に行わせる。 When the calculation of the three-dimensional coordinates of the center of the hand and each joint is completed, the recalculation unit 132 notifies the consistency determination unit 131 of the calculated three-dimensional coordinates (step S60609), and ends the coordinate recalculation process. After that, the consistency determination unit 131 determines the spatial consistency and the time consistency of the three-dimensional coordinates of the hand center and each joint calculated by the recalculation unit 132. When it is determined that the center of the hand and all of the joints are spatially and temporally aligned, the consistency determination unit 131 stores the current three-dimensional coordinates of the center of the hand and each joint in the coordinate history 193. Determine to 3D coordinates. On the other hand, when either the center of the hand or each joint is not spatially or temporally aligned, the consistency determination unit 131 performs a process of correcting the three-dimensional coordinates of the center of the hand and each joint to the recalculation unit 132. Let me do it.

以上のように、本実施形態の手位置検出装置1では、深度画像における上肢領域の位置及び形状に基づいて対象者の手中心及び各関節の位置を検出し、深度画像内での位置と深度値とに基づいて、手中心及び各関節の三次元座標を算出する。また、手位置検出装置1は、深度画像から算出した手中心及び各関節の三次元座標と、対象者から採寸した上肢の寸法とが空間的に整合しない場合、深度画像から算出した手中心及び各関節の三次元座標を補正する。手中心及び各関節の三次元座標を補正する際、手位置検出装置1は、深度画像内における手中心及び各関節の位置が、該深度画像における上肢領域の外側の位置となることを許容する。このため、オクルージョンにより深度画像内に手中心までの深度値が含まれない場合でも、本実施形態の手位置検出装置1によれば、手中心の三次元座標を正しく算出することが可能となる。 As described above, the hand position detection device 1 of the present embodiment detects the position of the subject's hand center and each joint based on the position and shape of the upper limb region in the depth image, and the position and depth in the depth image. Based on the value, the three-dimensional coordinates of the center of the hand and each joint are calculated. Further, when the three-dimensional coordinates of the hand center and each joint calculated from the depth image and the dimensions of the upper limbs measured from the subject do not spatially match, the hand position detecting device 1 calculates the hand center and the hand center calculated from the depth image. Correct the 3D coordinates of each joint. When correcting the three-dimensional coordinates of the hand center and each joint, the hand position detection device 1 allows the position of the hand center and each joint in the depth image to be a position outside the upper limb region in the depth image. .. Therefore, even if the depth image does not include the depth value to the center of the hand due to occlusion, the hand position detection device 1 of the present embodiment can correctly calculate the three-dimensional coordinates of the center of the hand. ..

また、本実施形態の手位置検出装置1では、空間的な整合性の判別とは別に、時間的な整合性の判別を行う。すなわち、深度画像から算出した手中心又は関節の三次元座標の移動速度Siが所定の速度閾値THSよりも大きい場合、手位置検出装置1は、手中心及び各関節の三次元座標を補正する。このように空間的及び時間的に整合するか否かを判定することにより、本実施形態の手位置検出装置1では、手中心の三次元位置をより正しく算出することが可能となる。 Further, in the hand position detection device 1 of the present embodiment, the temporal consistency is determined separately from the spatial consistency determination. That is, when the moving speed Si of the three-dimensional coordinates of the center of the hand or the joint calculated from the depth image is larger than the predetermined speed threshold THS, the hand position detecting device 1 corrects the three-dimensional coordinates of the center of the hand and each joint. By determining whether or not the spatial and temporal alignment is consistent in this way, the hand position detection device 1 of the present embodiment can more accurately calculate the three-dimensional position of the hand center.

更に、本実施形態の手位置検出装置1では、再計算部132において手中心及び各関節の三次元座標を算出した(再計算した)後、整合性判定部131において空間的及び時間的に整合するか否かを判定する。そして、整合性判定部131において空間的及び時間的に整合すると判定されるまで、再計算部132における手中心及び各関節の三次元座標の算出(再計算)を複数回行う。このため、深度画像における正しい手中心の位置と、上肢領域に基づいて検出した手中心の位置とのずれが大きい場合でも、手中心の三次元座標を正しく算出することが可能となる。 Further, in the hand position detection device 1 of the present embodiment, after the recalculation unit 132 calculates (recalculates) the three-dimensional coordinates of the hand center and each joint, the consistency determination unit 131 spatially and temporally matches. Determine whether or not to do so. Then, the recalculation unit 132 calculates (recalculates) the three-dimensional coordinates of the hand center and each joint a plurality of times until the consistency determination unit 131 determines that they are spatially and temporally consistent. Therefore, even when the deviation between the correct position of the hand center in the depth image and the position of the hand center detected based on the upper limb region is large, it is possible to correctly calculate the three-dimensional coordinates of the hand center.

なお、本実施形態の手位置検出装置1では、上記のように、再計算部132における三次元座標の算出回数に上限を設けている。三次元座標の算出回数に上限を設けることにより、手位置検出装置1では、再計算部132での三次元座標の再計算の回数の増大による処理負荷の増大及び処理の遅延を防ぐことが可能となる。 In the hand position detection device 1 of the present embodiment, as described above, the upper limit is set for the number of times the three-dimensional coordinates are calculated by the recalculation unit 132. By setting an upper limit on the number of times the three-dimensional coordinates are calculated, the hand position detection device 1 can prevent an increase in the processing load and a delay in processing due to an increase in the number of times the three-dimensional coordinates are recalculated by the recalculation unit 132. It becomes.

また、図4のフローチャートは、本実施形態の手位置検出装置1(補正部130)が行う座標補正処理の一例に過ぎない。本実施形態の手位置検出装置1が行う座標補正処理は、本実施形態の要旨を逸脱しない範囲において適宜変更可能である。本実施形態の手位置検出装置1は、座標補正処理として、例えば、図14A及び図14Bのフローチャートに沿った処理を行ってもよい。 Further, the flowchart of FIG. 4 is only an example of the coordinate correction process performed by the hand position detection device 1 (correction unit 130) of the present embodiment. The coordinate correction process performed by the hand position detection device 1 of the present embodiment can be appropriately changed as long as it does not deviate from the gist of the present embodiment. The hand position detection device 1 of the present embodiment may perform, for example, a process according to the flowcharts of FIGS. 14A and 14B as the coordinate correction process.

図14Aは、座標補正処理の変形例を説明するフローチャート(その1)である。図14Bは、座標補正処理の変形例を説明するフローチャート(その2)である。なお、図14A及び図14Bのフローチャートにおける各処理ステップのうちの、図4のフローチャートにおける処理ステップと処理内容が同じである処理ステップには、図4のフローチャートの処理ステップと同じ符号(例えばS601及びS602等)を付している。 FIG. 14A is a flowchart (No. 1) for explaining a modification of the coordinate correction process. FIG. 14B is a flowchart (No. 2) for explaining a modification of the coordinate correction process. Of the processing steps in the flowcharts of FIGS. 14A and 14B, the processing steps having the same processing contents as the processing steps in the flowchart of FIG. 4 have the same reference numerals as the processing steps of the flowchart of FIG. 4 (for example, S601 and S601 and). S602 etc.) is attached.

図14A及び図14Bのフローチャートに沿った座標補正処理は、手位置検出装置1の補正部130が行う。補正部130は、まず、図14Aのように、再計算部132で三次元座標を再計算した回数を示す変数rを「0」とし(ステップS601)、続けて、上肢領域を1つ選択して手中心及び関節の三次元座標を読み出す(ステップS602)。ステップS601及びS602の処理は、例えば、補正部130の整合性判定部131が行う。 The coordinate correction process according to the flowcharts of FIGS. 14A and 14B is performed by the correction unit 130 of the hand position detection device 1. First, as shown in FIG. 14A, the correction unit 130 sets the variable r indicating the number of times the three-dimensional coordinates have been recalculated by the recalculation unit 132 to “0” (step S601), and subsequently selects one upper limb region. The three-dimensional coordinates of the center of the hand and the joint are read out (step S602). The processing of steps S601 and S602 is performed, for example, by the consistency determination unit 131 of the correction unit 130.

次に、補正部130は、読み出した手中心及び関節の三次元座標の空間整合性及び時間整合性について判別する整合性判別処理(ステップS603)を行い、整合しない手中心又は関節があるか否かを判定する(ステップS604)。ステップS603の整合性判別処理及びステップS604の判定は、整合性判定部131が行う。整合性判定部131は、整合性判別処理(ステップS603)として、例えば、図5のフローチャートに沿った処理を行う。手中心及び関節の三次元座標の全てが空間的及び時間的に整合している場合(ステップS604;NO)、整合性判定部131は、図14Bのように、現在の三次元座標を座標履歴193に格納する三次元座標に決定する(ステップS608)。これに対し、手中心及び関節の三次元座標のいずれかが、空間的又は時間的に整合していない場合(ステップS604;YES)、整合性判定部131は、次に、変数rがr<Nであるか否かを判定する(ステップS605)。r≧Nの場合(ステップS605;NO)、整合性判定部131は、図14Bのように、現在の三次元座標を座標履歴193に格納する三次元座標に決定する(ステップS608)。これに対し、r<Nの場合(ステップS605;YES)、整合性判定部131は、次に、隣接領域判別処理(ステップS611)を行う。 Next, the correction unit 130 performs a consistency discrimination process (step S603) for discriminating the spatial consistency and the time consistency of the three-dimensional coordinates of the read hand center and the joint, and whether or not there is a hand center or the joint that does not match. (Step S604). The consistency determination process of step S603 and the determination of step S604 are performed by the consistency determination unit 131. The consistency determination unit 131 performs, for example, a process according to the flowchart of FIG. 5 as the consistency determination process (step S603). When all the three-dimensional coordinates of the center of the hand and the joint are spatially and temporally aligned (step S604; NO), the consistency determination unit 131 uses the current three-dimensional coordinates as the coordinate history as shown in FIG. 14B. The three-dimensional coordinates to be stored in 193 are determined (step S608). On the other hand, when either the center of the hand or the three-dimensional coordinates of the joint do not match spatially or temporally (step S604; YES), the consistency determination unit 131 then sets the variable r <. It is determined whether or not it is N (step S605). When r ≧ N (step S605; NO), the consistency determination unit 131 determines the current three-dimensional coordinates as the three-dimensional coordinates to be stored in the coordinate history 193 (step S608). On the other hand, when r <N (step S605; YES), the consistency determination unit 131 then performs the adjacent region determination process (step S611).

隣接領域判別処理(ステップS611)は、深度画像において上肢領域と隣接する領域のうちの、手中心の位置を変更する際の移動方向となる隣接領域が、上肢よりも手前(深度センサ2側)に存在する物体の深度値を示す領域であるか否かを判別する処理である。以下の説明では、深度画像における上肢よりも手前(深度センサ2側)に存在する物体の深度値を示す領域を手前領域という。整合性判別部131は、隣接領域判別処理として、例えば、図12の深度画像1101における線分LS1上の各点の深度値に基づいて、位置Q26を含む隣接領域が手前領域であるか否かを判別する。 In the adjacent area determination process (step S611), the adjacent area in the depth image, which is the moving direction when changing the position of the center of the hand, is in front of the upper limb (depth sensor 2 side). It is a process of determining whether or not the area indicates the depth value of the object existing in. In the following description, the region showing the depth value of the object existing in front of the upper limb (depth sensor 2 side) in the depth image is referred to as the front region. The consistency determination unit 131 determines whether or not the adjacent region including the position Q26 is the front region, for example, based on the depth value of each point on the line segment LS1 in the depth image 1101 of FIG. To determine.

隣接領域判別処理の後、整合性判定部131は、上肢領域と隣接する手前領域があるか否かを判定する(ステップS612)。上肢領域と隣接する手前領域がない場合(ステップS612;NO)、整合性判定部131は、図14Bのように、現在の三次元座標を座標履歴193に格納する三次元座標に決定する(ステップS608)。一方、上肢領域と隣接する手前領域がある場合(ステップS612;YES)、整合性判定部131は、座標再計算処理(ステップS606)を再計算部132に行わせる。再計算部132は、座標再計算処理として、例えば、図6のフローチャートに沿った処理を行う。 After the adjacent region determination process, the consistency determination unit 131 determines whether or not there is a front region adjacent to the upper limb region (step S612). When there is no front region adjacent to the upper limb region (step S612; NO), the consistency determination unit 131 determines the current three-dimensional coordinates as the three-dimensional coordinates stored in the coordinate history 193 (step). S608). On the other hand, when there is a front region adjacent to the upper limb region (step S612; YES), the consistency determination unit 131 causes the recalculation unit 132 to perform the coordinate recalculation process (step S606). The recalculation unit 132 performs, for example, a process according to the flowchart of FIG. 6 as the coordinate recalculation process.

再計算部132が座標再計算処理(ステップS606)を終えると、補正部130の整合性判定部131は、再計算した三次元座標に対する整合性判別処理(ステップS603)を行う。その後、ステップS604,S605,及びS612のいずれかにおいて「NO」と判定されるまで、補正部130は、再計算部132による三次元座標の再計算と、整合性判定部131による整合性についての判定とを繰り返す。そして、ステップS604,S605,及びS612のいずれかにおいて「NO」と判定された場合、補正部130(整合性判定部131)は、図14Bのように、現在の三次元座標を座標履歴193に格納する三次元座標に決定する(ステップS608)。 When the recalculation unit 132 finishes the coordinate recalculation process (step S606), the consistency determination unit 131 of the correction unit 130 performs the consistency determination process (step S603) for the recalculated three-dimensional coordinates. After that, until it is determined as "NO" in any of steps S604, S605, and S612, the correction unit 130 recalculates the three-dimensional coordinates by the recalculation unit 132 and the consistency determination unit 131. Repeat the judgment. Then, when it is determined as "NO" in any of steps S604, S605, and S612, the correction unit 130 (consistency determination unit 131) converts the current three-dimensional coordinates into the coordinate history 193 as shown in FIG. 14B. It is determined to be the three-dimensional coordinates to be stored (step S608).

ステップS608の処理を終えると、補正部130(整合性判定部131)は、次に、未選択の上肢領域があるか否かを判定する(ステップS609)。未選択の上肢領域がある場合(ステップS609;YES)、整合性判定部131は、未選択の上肢領域に対するステップS601以降の処理を行う。そして、全ての上肢領域に対してステップS601以降の処理を行うと、補正部130は、座標補正処理を終了する。 After finishing the process of step S608, the correction unit 130 (consistency determination unit 131) next determines whether or not there is an unselected upper limb region (step S609). When there is an unselected upper limb region (step S609; YES), the consistency determination unit 131 performs the processing after step S601 on the unselected upper limb region. Then, when the processing after step S601 is performed on all the upper limb regions, the correction unit 130 ends the coordinate correction processing.

このように座標補正処理の変形例では、手位置検出装置1は、手中心及び関節の三次元座標のいずれかが、空間的又は時間的に整合しない場合、座標再計算処理を行う前に、隣接領域判別処理(ステップS611)を行う。隣接領域判別処理は、上記のように、上肢領域と隣接する手前領域の有無を判別する処理である。隣接領域判別処理は、例えば、手位置検出装置1の補正部130の整合性判定部131が行う。整合性判定部131は、隣接領域判別処理として、例えば、図15のフローチャートに沿った処理を行う。 As described above, in the modified example of the coordinate correction process, the hand position detecting device 1 performs the coordinate recalculation process before performing the coordinate recalculation process when either the center of the hand or the three-dimensional coordinates of the joint do not match spatially or temporally. The adjacent area determination process (step S611) is performed. The adjacent area determination process is a process for determining the presence or absence of a front area adjacent to the upper limb area as described above. The adjacent area determination process is performed, for example, by the consistency determination unit 131 of the correction unit 130 of the hand position detection device 1. The consistency determination unit 131 performs, for example, a process according to the flowchart of FIG. 15 as an adjacent area determination process.

図15は、隣接領域判別処理の内容を説明するフローチャートである。
隣接領域判別処理では、整合性判定部131は、まず、現在選択されている上肢領域における手中心の位置から関節の位置とは反対の方向に延伸した線分上であって、手中心の位置から所定の距離となる位置Paを算出する(ステップS61101)。
FIG. 15 is a flowchart illustrating the contents of the adjacent area discrimination process.
In the adjacent region determination process, the consistency determination unit 131 is first on a line segment extending from the position of the center of the hand in the currently selected upper limb region in the direction opposite to the position of the joint, and is the position of the center of the hand. The position Pa at a predetermined distance is calculated from (step S61101).

次に、整合性判定部131は、上肢領域内の手中心の位置と関節の位置とを通る線分上の各点における深度値に基づいて、位置Paが上肢の一部を示す点である場合の深度値zaを算出する(ステップS61102)。ステップS61102では、整合性判定部131は、例えば、図13のグラフ図における太線BZ1に基づいて太い点線BZ3を推定し、位置Paが上肢の一部を示す点である場合の深度値zaを算出する。 Next, in the consistency determination unit 131, the position Pa indicates a part of the upper limb based on the depth value at each point on the line segment passing through the position of the center of the hand and the position of the joint in the upper limb region. The depth value za of the case is calculated (step S61102). In step S61102, the consistency determination unit 131 estimates the thick dotted line BZ3 based on the thick line BZ1 in the graph of FIG. 13, and calculates the depth value za when the position Pa is a point indicating a part of the upper limb. do.

次に、整合性判定部131は、深度画像における位置Paの座標の深度値za’を読み出し(ステップS61103)、za−Ma>za’であるか否かを判定する(ステップS61104)。ここで、Maは、深度値zaに対するマージンである。マージンMaは、深度画像における位置Paの深度値za’が上肢よりも手前(深度センサ2側)に存在する物体の深度値であるとみなすことが可能な範囲に基づいて設定する。すなわち、マージンMaは、za−Ma>za’である場合には、深度画像における位置Paの深度値za’が上肢よりも手前(深度センサ2側)に存在する物体の深度値であるとみなすことが可能な値とする。従って、za−Ma>za’である場合(ステップS61104;YES)、整合性判定部131は、上肢領域と隣接する手前領域があると判別し(ステップS61105)、隣接領域判別処理を終了する。一方、za−Ma≦za’である場合(ステップS61104;NO)、整合性判定部131は、上肢領域と隣接する手前領域はないと判別し(ステップS61106)、隣接領域判別処理を終了する。 Next, the consistency determination unit 131 reads out the depth value za'of the coordinates of the position Pa in the depth image (step S61103), and determines whether or not za-Ma> za'(step S61104). Here, Ma is a margin with respect to the depth value za. The margin Ma is set based on a range in which the depth value za'of the position Pa in the depth image can be regarded as the depth value of the object existing in front of the upper limb (depth sensor 2 side). That is, when the margin Ma is za-Ma> za', it is considered that the depth value za'of the position Pa in the depth image is the depth value of the object existing in front of the upper limb (depth sensor 2 side). It is a possible value. Therefore, when za-Ma> za'(step S61104; YES), the consistency determination unit 131 determines that there is a front region adjacent to the upper limb region (step S61105), and ends the adjacent region determination process. On the other hand, when za-Ma ≤ za'(step S61104; NO), the consistency determination unit 131 determines that there is no front region adjacent to the upper limb region (step S61106), and ends the adjacent region determination process.

図16は、隣接領域と判別結果との関係を説明する図である。
図16の深度画像1101には、該深度画像1101から検出した第1の上肢領域1101Aと、第2の上肢領域1101Bとを示している。また、図16の深度画像1101には、該深度画像1101における棚9の深度値を示す領域1101Dと、第1の作業台8Aの深度値を示す領域1101Eと、第2の作業台8Bの深度値を示す領域1101Fとを示している。更に、図16の深度画像1101には、棚9と第2の作業台8Bとの間に存在する、対象者の右手部分を示す領域1101Cを二点鎖線で示している。
FIG. 16 is a diagram illustrating the relationship between the adjacent region and the discrimination result.
The depth image 1101 of FIG. 16 shows the first upper limb region 1101A and the second upper limb region 1101B detected from the depth image 1101. Further, in the depth image 1101 of FIG. 16, the area 1101D showing the depth value of the shelf 9 in the depth image 1101, the area 1101E showing the depth value of the first workbench 8A, and the depth of the second workbench 8B are shown. The area 1101F showing the value is shown. Further, in the depth image 1101 of FIG. 16, the region 1101C indicating the right-hand portion of the subject existing between the shelf 9 and the second workbench 8B is shown by a two-dot chain line.

対象者の右手部分が棚9と第2の作業台8Bとの間に存在する場合、深度画像1101から検出される第2の上肢領域1101Bは、対象者の右手部分と対応する領域1101Cを含まない。このため、手位置検出装置1は、第2の上肢領域1101Bに基づいて手中心を示す点P0の位置を検出する際に、第2の上肢領域1101Bのうちの実際には手首と対応する位置よりも肘側となる位置Q21を検出する。よって、図16の深度画像1101が処理の対象である場合、手位置検出装置1の整合性判定部131は、第2の上肢領域1101Bから算出した手中心及び関節の三次元座標のいずれかが空間的に整合しないと判定する。空間的に整合しないと判定した場合、整合性判定部131は、隣接領域判別処理(ステップS611)を行い第2の上肢領域1101Bと隣接する手前領域の有無を判別する。 When the right-hand portion of the subject is between the shelf 9 and the second workbench 8B, the second upper limb region 1101B detected from the depth image 1101 includes the region 1101C corresponding to the right-hand portion of the subject. No. Therefore, when the hand position detecting device 1 detects the position of the point P0 indicating the center of the hand based on the second upper limb region 1101B, the position of the second upper limb region 1101B actually corresponding to the wrist. The position Q21 that is closer to the elbow is detected. Therefore, when the depth image 1101 of FIG. 16 is the target of processing, the consistency determination unit 131 of the hand position detection device 1 has any of the three-dimensional coordinates of the hand center and the joint calculated from the second upper limb region 1101B. Judged as spatially inconsistent. When it is determined that they are not spatially consistent, the consistency determination unit 131 performs an adjacent region determination process (step S611) to determine the presence or absence of a front region adjacent to the second upper limb region 1101B.

第2の上肢領域1101Bが処理の対象である場合、整合性判定部131は、深度画像における位置Q21及びQ24を通る線分LS1上であって、位置Q21から位置Q24とは反対側の方向の距離LLとなる位置Paを算出する(ステップS61101)。 When the second upper limb region 1101B is the target of processing, the consistency determination unit 131 is on the line segment LS1 passing through the positions Q21 and Q24 in the depth image, and is in the direction opposite to the position Q24 from the position Q21. The position Pa at which the distance is LL is calculated (step S61101).

次に、整合性判定部131は、第2の上肢領域1101B内における線分LS1上の深度値の分布に基づいて、位置Paが上肢の一部である場合の深度値zaを算出する(ステップS61102)。ステップS61102では、整合性判定部131は、例えば、図13のグラフ図に基づいて、位置Paが上肢の一部である場合の深度値zaを算出する。図16の深度画像1101における位置Paは、第2の上肢領域1101Bの外側となっている。このため、整合性判定部131は、図13のグラフ図における太い点線BZ3に基づいて深度値zaを算出する。 Next, the consistency determination unit 131 calculates the depth value z when the position Pa is a part of the upper limb based on the distribution of the depth value on the line segment LS1 in the second upper limb region 1101B (step). S61102). In step S61102, the consistency determination unit 131 calculates the depth value za when the position Pa is a part of the upper limb, for example, based on the graph of FIG. The position Pa in the depth image 1101 of FIG. 16 is outside the second upper limb region 1101B. Therefore, the consistency determination unit 131 calculates the depth value za based on the thick dotted line BZ3 in the graph of FIG. 13.

その後、整合性判定部131は、深度画像1101における位置Paの深度値za’を読み出し(ステップS61103)、za−Ma>za’であるか否かを判定する(ステップS61104)。深度画像1101における位置Paは、第2の上肢領域1101Bと隣接する領域1101Dに含まれる。領域1101Dは、第2の作業台1Bの上に設置された棚9の深度値を示す領域であり、対象者の右手部分を示す領域1101Cよりも手前(深度センサ2側)に存在する。このとき、ステップS61102で算出した深度値zaと、深度画像1101Dにおける深度値za’との間には、両者が同一物体の同一部分の深度値を示しているとはいいがたい大きさの差が生じる(例えば図13を参照)。よって、整合性判定部131は、第2の上肢領域1101Bと隣接する手前領域が存在すると判別し(ステップS61105)、隣接領域判別処理を終了する。この場合、整合性判定部131は、座標再計算処理(ステップS606)を再計算部132に行わせる。 After that, the consistency determination unit 131 reads out the depth value za'of the position Pa in the depth image 1101 (step S61103), and determines whether or not za-Ma> za'(step S61104). The position Pa in the depth image 1101 is included in the region 1101D adjacent to the second upper limb region 1101B. The area 1101D is an area indicating the depth value of the shelf 9 installed on the second workbench 1B, and exists in front of the area 1101C indicating the right hand portion of the subject (on the side of the depth sensor 2). At this time, it cannot be said that the depth value za calculated in step S61102 and the depth value za'in the depth image 1101D both indicate the depth value of the same part of the same object. (See, for example, FIG. 13). Therefore, the consistency determination unit 131 determines that the front region adjacent to the second upper limb region 1101B exists (step S61105), and ends the adjacent region determination process. In this case, the consistency determination unit 131 causes the recalculation unit 132 to perform the coordinate recalculation process (step S606).

また、図16の深度画像1101における第1の上肢領域1101Aの手中心を示す点P0又は手首を示す点P1が空間的又は時間的に整合しておらず、かつr<Nであると判定した場合、整合性判定部131は、隣接領域判別処理(ステップS611)を行う。この場合、整合性判定部131は、第1の上肢領域1101Aにおける二点P0及びP1を通る線分LS2上であって、点P0から点P1とは反対の方向の距離LLとなる位置Paを算出する(ステップS61101)。 Further, it was determined that the point P0 indicating the center of the hand or the point P1 indicating the wrist in the first upper limb region 1101A in the depth image 1101 of FIG. 16 is not spatially or temporally aligned and r <N. In this case, the consistency determination unit 131 performs the adjacent area determination process (step S611). In this case, the consistency determination unit 131 sets a position Pa on the line segment LS2 passing through the two points P0 and P1 in the first upper limb region 1101A and having a distance LL from the point P0 in the direction opposite to the point P1. Calculate (step S61101).

次に、整合性判定部131は、第1の上肢領域1101A内における線分LS2上の各点の深度値に基づいて、位置Paが上肢の一部である場合の深度値を算出する(ステップS61102)。 Next, the consistency determination unit 131 calculates the depth value when the position Pa is a part of the upper limb based on the depth value of each point on the line segment LS2 in the first upper limb region 1101A (step). S61102).

その後、整合性判定部131は、深度画像1101における位置Paの深度値za’を読み出し(ステップS61103)、za−Ma>za’であるか否かを判定する(ステップS61104)。深度画像1101における位置Paは、第1の上肢領域1101Aと隣接する領域1101Eに含まれる。領域1101Eは、第1の作業台1Aの深度値を示す領域であり、対象者の左手部分を含む第1の上肢領域1101Aよりも奥方(深度センサ2からみて遠方側)に存在する。このとき、ステップS61102で算出した深度値zaと、深度画像1101Dにおける深度値za’との関係は、za<za’(すなわちza−Ma<za’)となる。よって、整合性判定部131は、第2の上肢領域1101Bと隣接する手前領域は存在しないと判別し(ステップS61106)、隣接領域判別処理を終了する。この場合、整合性判定部131は、座標再計算処理(ステップS606)を省略し、現在の三次元座標を座標履歴193に格納する三次元座標に決定する(ステップS608)。 After that, the consistency determination unit 131 reads out the depth value za'of the position Pa in the depth image 1101 (step S61103), and determines whether or not za-Ma> za'(step S61104). The position Pa in the depth image 1101 is included in the region 1101E adjacent to the first upper limb region 1101A. The region 1101E is a region showing the depth value of the first workbench 1A, and is located behind the first upper limb region 1101A including the left hand portion of the subject (far side from the depth sensor 2). At this time, the relationship between the depth value za calculated in step S61102 and the depth value za'in the depth image 1101D is za <za'(that is, za-Ma <za'). Therefore, the consistency determination unit 131 determines that the front region adjacent to the second upper limb region 1101B does not exist (step S61106), and ends the adjacent region determination process. In this case, the consistency determination unit 131 omits the coordinate recalculation process (step S606) and determines the current three-dimensional coordinates as the three-dimensional coordinates stored in the coordinate history 193 (step S608).

隣接領域判別処理において上肢領域と隣接する手前領域があると判別した場合、深度画像における手中心の移動方向には、棚9等の上肢よりも手前に存在する物体により隠れている対象者の正しい手中心が存在すると考えられる。このため、座標補正処理の変形例では、図14Aのように、上肢領域と隣接する手前領域がある場合には、手中心の位置を移動させて手中心及び関節の三次元座標を再計算する座標再計算処理(ステップS606)を行う。一方、上肢領域と隣接する手前領域がない場合、深度画像における手中心の移動方向には、上肢よりも手前となる位置で上肢の一部を隠している物体が存在しない。このため、移動させた手中心の位置が上肢領域の外側になってしまうと、手中心の三次元座標が誤った座標となってしまう。従って、座標補正処理の変形例では、図14A及び図14Bのように、上肢領域と隣接する手前領域がない場合には、座標再計算処理を行わず、現在の三次元座標を座標履歴193に格納する三次元座標に決定する。これにより、移動後の手中心の位置が上肢領域外となった場合に、再計算部132が誤った深度値により誤った手中心の三次元座標を算出することを防ぐことが可能となる。 When it is determined in the adjacent area discrimination process that there is a front area adjacent to the upper limb area, the subject who is hidden by an object existing in front of the upper limb such as the shelf 9 is correct in the moving direction of the hand center in the depth image. It is thought that there is a hand center. Therefore, in the modified example of the coordinate correction process, when there is a front region adjacent to the upper limb region as shown in FIG. 14A, the position of the hand center is moved and the three-dimensional coordinates of the hand center and the joint are recalculated. The coordinate recalculation process (step S606) is performed. On the other hand, when there is no front region adjacent to the upper limb region, there is no object hiding a part of the upper limb at a position in front of the upper limb in the movement direction of the center of the hand in the depth image. Therefore, if the position of the moved hand center is outside the upper limb region, the three-dimensional coordinates of the hand center become erroneous coordinates. Therefore, in the modified example of the coordinate correction process, when there is no front area adjacent to the upper limb area as in FIGS. 14A and 14B, the coordinate recalculation process is not performed and the current three-dimensional coordinates are converted to the coordinate history 193. Determine the 3D coordinates to be stored. This makes it possible to prevent the recalculation unit 132 from calculating the wrong three-dimensional coordinates of the hand center due to the wrong depth value when the position of the hand center after the movement is outside the upper limb region.

また、図5のフローチャートは、本実施形態の手位置検出装置1(整合性判定部131)が行う整合性判別処理の一例に過ぎない。本実施形態の手位置検出装置1が行う整合性判別処理は、本実施形態の要旨を逸脱しない範囲において適宜変更可能である。本実施形態の手位置検出装置1は、整合性判別処理として、例えば、図17A及び図17Bのフローチャートに沿った処理を行ってもよい。 Further, the flowchart of FIG. 5 is only an example of the consistency determination process performed by the hand position detection device 1 (consistency determination unit 131) of the present embodiment. The consistency determination process performed by the hand position detection device 1 of the present embodiment can be appropriately changed as long as it does not deviate from the gist of the present embodiment. The hand position detection device 1 of the present embodiment may perform, for example, a process according to the flowcharts of FIGS. 17A and 17B as the consistency determination process.

図17Aは、整合性判別処理の変形例を説明するフローチャート(その1)である。図17Bは、整合性判別処理の変形例を説明するフローチャート(その2)である。なお、図17A及び図17Bのフローチャートにおける各処理ステップのうちの、図5のフローチャートにおける処理ステップと処理内容が同じである処理ステップには、図5のフローチャートの処理ステップと同じ符号(例えばS60302等)を付している。 FIG. 17A is a flowchart (No. 1) for explaining a modified example of the consistency determination process. FIG. 17B is a flowchart (No. 2) for explaining a modified example of the consistency determination process. Of the processing steps in the flowcharts of FIGS. 17A and 17B, the processing steps having the same processing contents as the processing steps in the flowchart of FIG. 5 have the same reference numerals as the processing steps of the flowchart of FIG. 5 (for example, S60302 and the like). ) Is attached.

図17A及び図17Bのフローチャートに沿った整合性判別処理は、手位置検出装置1における補正部130の整合性判定部131が行う。整合性判定部131は、まず、図17Aのように、手中心及び各関節を識別する変数iを「0」にするとともに、変数iにより指定される手中心又は関節についての整合性パラメータCiの値を「1.0」とする(ステップS60321)。 The consistency determination process according to the flowcharts of FIGS. 17A and 17B is performed by the consistency determination unit 131 of the correction unit 130 in the hand position detection device 1. First, as shown in FIG. 17A, the consistency determination unit 131 sets the variable i for identifying the hand center and each joint to “0”, and sets the consistency parameter Ci for the hand center or joint specified by the variable i. The value is set to "1.0" (step S60321).

次に、整合性判定部131は、手中心又は関節を示す点Piの三次元座標から、深度画像内での座標(xi,yi)と距離ziとを算出する(ステップS60302)。その後、整合性判定部131は、深度画像から座標座標(xi,yi)の深度値zi’を読み出し(ステップS60303)、zi’>zi+Mであるか否かを判定する(ステップS60304)。zi’>zi+Mである場合(ステップS60304;YES)、整合性判定部131は、整合性パラメータCiの値から0.3を減じる(ステップS60322)。 Next, the consistency determination unit 131 calculates the coordinates (xi, yi) and the distance zi in the depth image from the three-dimensional coordinates of the point Pi indicating the center of the hand or the joint (step S60302). After that, the consistency determination unit 131 reads out the depth value zi'of the coordinate coordinates (xi, yi) from the depth image (step S60303), and determines whether or not zi'> zi + M (step S60304). When zi'> zi + M (step S60304; YES), the consistency determination unit 131 subtracts 0.3 from the value of the consistency parameter Ci (step S60322).

一方、zi’≦zi+Mである場合(ステップS60304;NO)、整合性判定部131は、整合性パラメータCiの値を変更せずに、次に、点Piと点Pi+1との三次元距離lenを算出する(ステップS60305)。その後、整合性判定部131は、三次元距離lenと対象者の寸法との差ΔLを算出し(ステップS60306)、|ΔL|>THLであるか否かを判定する(ステップS60307)。|ΔL|>THLである場合(ステップS60307;YES)、整合性判定部131は、整合性パラメータCiの値から0.3を減じる(ステップS60322)。 On the other hand, when zi'≤ zi + M (step S60304; NO), the consistency determination unit 131 does not change the value of the consistency parameter Ci, and then sets the three-dimensional distance len between the point Pi and the point Pi + 1. Calculate (step S60305). After that, the consistency determination unit 131 calculates the difference ΔL between the three-dimensional distance len and the dimension of the subject (step S60306), and determines whether or not | ΔL |> THL (step S60307). When | ΔL |> THL (step S60307; YES), the consistency determination unit 131 subtracts 0.3 from the value of the consistency parameter Ci (step S60322).

これに対し、|ΔL|≦THLである場合(ステップS60307;NO)、整合性判定部131は、次に、点Piの移動速度Siを算出し(ステップS60308)、Si>THSであるか否かを判定する(ステップS60309)。また、ステップS60322の処理を行った場合も、整合性判定部131は、ステップS60322の処理の次に、点Piの移動速度Siを算出し(ステップS60308)、Si>THSであるか否かを判定する(ステップS60309)。Si>THSである場合(ステップS60309;YES)、整合性判定部131は、整合性パラメータCiの値から0.2を減算し(ステップS60323)、減算後の整合性パラメータCiを点Piの整合性パラメータに決定する。その後、整合性判定部131は、図17Bのように、整合性パラメータCiの値を決定していない手中心又は関節の有無を判定する(ステップS60310)。一方、Si≦THSである場合(ステップS60309;NO)、整合性判定部131は、整合性パラメータCiの値を変更せずに、次にステップS60310の判定を行う。すなわち、Si≦THSである場合、整合性判定部131は、ステップS60309の判定時における整合性パラメータCiを点Piの整合性パラメータに決定する。 On the other hand, when | ΔL | ≦ THL (step S60307; NO), the consistency determination unit 131 next calculates the moving speed Si of the point Pi (step S60308), and whether or not Si> THS. (Step S60309). Further, even when the processing of step S60322 is performed, the consistency determination unit 131 calculates the moving speed Si of the point Pi (step S60308) after the processing of step S60322, and determines whether or not Si> THS. Determination (step S60309). When Si> THS (step S60309; YES), the consistency determination unit 131 subtracts 0.2 from the value of the consistency parameter Ci (step S60323), and the subtracted consistency parameter Ci is matched with the point Pi. Determine the sex parameter. After that, as shown in FIG. 17B, the consistency determination unit 131 determines the presence / absence of a hand center or a joint for which the value of the consistency parameter Ci has not been determined (step S60310). On the other hand, when Si ≦ THS (step S60309; NO), the consistency determination unit 131 next determines in step S60310 without changing the value of the consistency parameter Ci. That is, when Si ≦ THS, the consistency determination unit 131 determines the consistency parameter Ci at the time of determination in step S60309 as the consistency parameter of the point Pi.

整合性パラメータCiを決定していない手中心又は関節がある場合(ステップS60310;YES)、整合性判定部131は、変数iをi+1に更新するとともに整合性パラメータCiを「1.0」とする(ステップS60324)。その後、整合性判定部131は、ステップS60302以降の処理を行う。そして、現在処理の対象となっている手中心及び関節の全ての整合性パラメータCiを決定すると(ステップS60310;NO)、整合性判定部131は、整合性判別処理を終了する。 When there is a hand center or a joint for which the consistency parameter Ci has not been determined (step S60310; YES), the consistency determination unit 131 updates the variable i to i + 1 and sets the consistency parameter Ci to “1.0”. (Step S60324). After that, the consistency determination unit 131 performs the processes after step S60302. Then, when all the consistency parameters Ci of the hand center and the joint currently being processed are determined (step S60310; NO), the consistency determination unit 131 ends the consistency determination process.

図17A及び図17Bのフローチャートに沿って手中心及び各関節の整合性パラメータCiの値を決定した場合、整合性判定部131は、ステップS604において、Ci<1.0であるか否かに基づいて、整合していない手中心又は関節の有無を判定する。図17A及び図17Bのフローチャートでは、空間的に整合していない場合、及び時間的に整合していない場合に、整合性パラメータCiの値を減算する。このため、ステップS604において、整合性判定部131は、判定の対象となっている手中心及び関節の全てがCi=1.0である場合に、手中心及び関節の全てが整合している(ステップS604;NO)と判定する。 When the values of the consistency parameter Ci of the hand center and each joint are determined according to the flowcharts of FIGS. 17A and 17B, the consistency determination unit 131 is based on whether or not Ci <1.0 in step S604. To determine the presence or absence of inconsistent hand centers or joints. In the flowcharts of FIGS. 17A and 17B, the value of the consistency parameter Ci is subtracted when they are not spatially matched and when they are not matched temporally. Therefore, in step S604, when all of the hand centers and joints to be determined are Ci = 1.0, the consistency determination unit 131 matches all of the hand centers and joints ( Step S604; NO) is determined.

このように、手中心及び関節の三次元座標の空間的及び時間的な整合性の判別に用いる整合性パラメータCiは、「True」及び「False」の二値に限らず、数値化してもよい。また、整合性パラメータCiを数値化する場合、ステップS60322及びS60323で減算する値の組み合わせは適宜変更可能である。 As described above, the consistency parameter Ci used for determining the spatial and temporal consistency of the three-dimensional coordinates of the center of the hand and the joint is not limited to the binary values of "True" and "False", and may be quantified. .. Further, when the consistency parameter Ci is quantified, the combination of the values to be subtracted in steps S60322 and S60323 can be appropriately changed.

更に、整合性判定部131が行う整合性判別処理は、手中心及び関節の三次元座標の空間整合性及び時間整合性のいずれか一方の整合性についての判別のみを行ってもよい。また、整合性判定部131は、整合性判別処理において、寸法情報192に登録された対象者の上肢の寸法の代わりに、座標履歴193に格納された手中心及び関節の三次元座標を利用して空間整合性についての判別を行ってもよい。 Further, the consistency determination process performed by the consistency determination unit 131 may only determine the consistency of either the spatial consistency or the time consistency of the three-dimensional coordinates of the hand center and the joint. Further, in the consistency determination process, the consistency determination unit 131 uses the three-dimensional coordinates of the center of the hand and the joint stored in the coordinate history 193 instead of the dimensions of the upper limbs of the subject registered in the dimension information 192. The spatial consistency may be determined.

また、本実施形態の手位置検出装置1において手中心及び各関節の三次元座標を算出する際には、深度センサ2で撮像した深度画像1101と背景画像191とに限らず、他の距離測定装置により測定した距離の情報を利用してもよい。 Further, when calculating the three-dimensional coordinates of the center of the hand and each joint in the hand position detection device 1 of the present embodiment, the depth image 1101 and the background image 191 captured by the depth sensor 2 are not limited to other distance measurements. Information on the distance measured by the device may be used.

[第2の実施形態]
図18は、第2の実施形態に係る手位置検出装置の機能的構成を示す図である。
[Second Embodiment]
FIG. 18 is a diagram showing a functional configuration of the hand position detection device according to the second embodiment.

図18に示すように、本実施形態の手位置検出装置1は、深度画像取得部110と、関節位置算出部120と、補正部130と、出力部140と、記憶部190とを含む。 As shown in FIG. 18, the hand position detection device 1 of the present embodiment includes a depth image acquisition unit 110, a joint position calculation unit 120, a correction unit 130, an output unit 140, and a storage unit 190.

深度画像取得部110は、手中心の位置を検出する検出領域内に存在する物体の表面までの距離(深度)を示す情報を含む深度画像を深度センサ2から取得する。 The depth image acquisition unit 110 acquires a depth image from the depth sensor 2 including information indicating the distance (depth) to the surface of the object existing in the detection region for detecting the position of the center of the hand.

関節位置算出部120は、深度画像に基づいて、検出領域内に存在する手中心及び上肢の関節についての検出領域内での位置を示す三次元座標を算出する。本実施形態の手位置検出装置1における関節位置算出部120は、上肢領域検出部121と、画像内位置検出部122と、三次元座標算出部123とを含む。更に、本実施形態の手位置検出装置1における関節位置算出部120は、体領域検出部124を含む。 The joint position calculation unit 120 calculates three-dimensional coordinates indicating the positions of the joints of the center of the hand and the upper limbs existing in the detection area in the detection area based on the depth image. The joint position calculation unit 120 in the hand position detection device 1 of the present embodiment includes an upper limb region detection unit 121, an in-image position detection unit 122, and a three-dimensional coordinate calculation unit 123. Further, the joint position calculation unit 120 in the hand position detection device 1 of the present embodiment includes the body area detection unit 124.

体領域検出部124は、手中心の位置を検出する深度画像と、記憶部190に記憶させた背景画像191とに基づいて、深度画像内における対象者の胴体部分(体幹部)を示す体領域を検出する。上肢領域検出部121は、手中心の位置を検出する深度画像と、記憶部190に記憶させた背景画像191とに基づいて、深度画像内における人の上肢部分と対応する領域(上肢領域)を検出する。 The body region detection unit 124 is a body region showing the body portion (trunk portion) of the subject in the depth image based on the depth image for detecting the position of the center of the hand and the background image 191 stored in the storage unit 190. Is detected. The upper limb region detection unit 121 determines a region (upper limb region) corresponding to the human upper limb portion in the depth image based on the depth image for detecting the position of the center of the hand and the background image 191 stored in the storage unit 190. To detect.

画像内位置検出部122は、深度画像内における体領域の位置及び形状と、上肢領域の位置及び形状とに基づいて、深度画像内における手中心の位置及び上肢の関節の位置を検出する。画像内位置検出部122は、例えば、体領域の位置及び形状から深度画像内における肩の位置を推定する。また、画像内位置検出部122は、上肢領域内で検出した手中心の位置と、推定した肩の位置とに基づいて、手首、肘、及び肩の位置を検出する。 The in-image position detection unit 122 detects the position of the center of the hand and the position of the joint of the upper limb in the depth image based on the position and shape of the body region in the depth image and the position and shape of the upper limb region. The in-image position detection unit 122 estimates the position of the shoulder in the depth image from, for example, the position and shape of the body region. Further, the position detection unit 122 in the image detects the positions of the wrist, elbow, and shoulder based on the position of the center of the hand detected in the upper limb region and the estimated position of the shoulder.

三次元座標算出部123は、深度画像内における手中心及び各関節の位置と、深度値とに基づいて、検出領域内における手中心の位置を示す三次元座標及び各関節の位置を示す三次元座標を算出する。 The three-dimensional coordinate calculation unit 123 has three-dimensional coordinates indicating the position of the hand center in the detection area and three dimensions indicating the position of each joint based on the positions of the hand center and each joint in the depth image and the depth value. Calculate the coordinates.

補正部130は、深度画像から算出した手中心及び各関節の三次元座標を補正する。本実施形態の手位置検出装置1における補正部130は、第1の実施形態の補正部130と同様、整合性判定部131と、再計算部132とを含む。整合性判定部131は、深度画像から算出した手中心及び各関節の三次元座標と、記憶部190に記憶させた寸法情報192及び座標履歴193とに基づいて、三次元座標の空間整合性及び時間整合性についての判定をする。整合性判定部131は、手中心及び関節のいずれかが、空間的又は時間的に整合していない場合に、三次元座標を補正すると判定し、再計算部132に手中心及び関節の三次元座標を再計算させる。再計算部132は、まず、深度画像における手中心の位置を変更し、変更後の手中心の位置に基づいて深度画像における各関節の位置を算出する。その後、再計算部132は、手中心及び各関節の三次元座標を算出する。 The correction unit 130 corrects the three-dimensional coordinates of the hand center and each joint calculated from the depth image. The correction unit 130 in the hand position detection device 1 of the present embodiment includes the consistency determination unit 131 and the recalculation unit 132, as in the correction unit 130 of the first embodiment. The consistency determination unit 131 provides spatial consistency of the three-dimensional coordinates and three-dimensional coordinates based on the three-dimensional coordinates of the center of the hand and each joint calculated from the depth image, and the dimensional information 192 and the coordinate history 193 stored in the storage unit 190. Make a judgment about time consistency. The consistency determination unit 131 determines that the three-dimensional coordinates are corrected when either the hand center or the joint is not spatially or temporally aligned, and the recalculation unit 132 tells the recalculation unit 132 that the hand center and the joint are three-dimensional. Have the coordinates recalculated. First, the recalculation unit 132 changes the position of the center of the hand in the depth image, and calculates the position of each joint in the depth image based on the changed position of the center of the hand. After that, the recalculation unit 132 calculates the three-dimensional coordinates of the center of the hand and each joint.

出力部140は、座標履歴193に含まれる手中心及び各関節の三次元座標を含む情報を外部装置3に出力する。外部装置3は、例えば、手中心の三次元座標の時間変化に基づいて、作業員の作業が適切であるか否か等を管理するサーバ装置である。 The output unit 140 outputs information including the three-dimensional coordinates of the center of the hand and each joint included in the coordinate history 193 to the external device 3. The external device 3 is, for example, a server device that manages whether or not the work of the worker is appropriate based on the time change of the three-dimensional coordinates of the center of the hand.

本実施形態の手位置検出装置1は、深度センサ2が所定の時間間隔で撮像する深度画像を順次取得するとともに、取得した複数の深度画像のそれぞれから手中心及び上肢の関節を検出し該手中心及び関節の三次元座標を算出する。本実施形態の手位置検出装置1は、深度画像から手中心及び上肢の関節を検出し三次元座標を算出する処理として、図19のフローチャートに沿った座標算出処理を行う。 The hand position detection device 1 of the present embodiment sequentially acquires depth images captured by the depth sensor 2 at predetermined time intervals, and detects the center of the hand and the joints of the upper limbs from each of the acquired plurality of depth images. Calculate the three-dimensional coordinates of the center and joint. The hand position detection device 1 of the present embodiment performs coordinate calculation processing according to the flowchart of FIG. 19 as a process of detecting the center of the hand and the joints of the upper limbs from the depth image and calculating the three-dimensional coordinates.

図19は、第2の実施形態に係る座標算出処理の内容を説明するフローチャートである。なお、図19のフローチャートにおける各処理ステップのうちの、図3のフローチャートにおける処理ステップと処理内容が同じである処理ステップには、図3のフローチャートの処理ステップと同じ符号(例えばS1及びS2等)を付している。 FIG. 19 is a flowchart illustrating the contents of the coordinate calculation process according to the second embodiment. Of the processing steps in the flowchart of FIG. 19, the processing step having the same processing content as the processing step in the flowchart of FIG. 3 has the same reference numeral as the processing step of the flowchart of FIG. 3 (for example, S1 and S2, etc.). Is attached.

本実施形態の手位置検出装置1は、図19のように、まず、処理の対象とする深度画像を選択する(ステップS1)、選択した深度画像から体領域を検出する(ステップS12)。ステップS1及びS12の処理は、例えば、手位置検出装置1における関節位置算出部120の体領域検出部124が行う。体領域検出部124は、例えば、体領域を検出する処理を行っていない深度画像のうちの、撮像時刻が最も早い深度画像を選択する。深度画像を選択した後、体領域検出部124は、選択した深度画像における各点(各画素)の深度値と、背景画像191における各点の深度値とに基づいて、深度画像における体領域を検出する。体領域を検出するステップS12の処理において、体領域検出部124は、例えば、まず、深度画像のうちの体領域検出エリアに対する背景差分法により、該体領域検出エリア内から体領域の候補を検出する。その後、体領域検出部124は、体領域の候補の輪郭部分における深度値の分布に基づいて、体領域の輪郭を補正し、体領域を抽出する。 As shown in FIG. 19, the hand position detection device 1 of the present embodiment first selects a depth image to be processed (step S1), and detects a body region from the selected depth image (step S12). The processing of steps S1 and S12 is performed, for example, by the body region detection unit 124 of the joint position calculation unit 120 in the hand position detection device 1. The body region detection unit 124 selects, for example, the depth image having the earliest imaging time among the depth images that have not been processed to detect the body region. After selecting the depth image, the body region detection unit 124 determines the body region in the depth image based on the depth value of each point (each pixel) in the selected depth image and the depth value of each point in the background image 191. To detect. In the process of step S12 for detecting the body region, the body region detection unit 124 first detects a body region candidate from within the body region detection area by, for example, a background subtraction method for the body region detection area in the depth image. do. After that, the body region detection unit 124 corrects the contour of the body region and extracts the body region based on the distribution of the depth value in the contour portion of the candidate body region.

次に、手位置検出装置1は、選択した深度画像から上肢領域を検出する(ステップS2)。ステップS2の処理は、手位置検出装置1における関節位置算出部120の上肢領域検出部121が行う。上肢領域検出部121は、例えば、深度画像のうちの上肢領域検出エリアに対する背景差分法により、該上肢領域検出エリア内から上肢領域を検出する。このとき、上肢領域検出部121は、例えば、背景画像191における深度値との差が閾値以上となる複数の領域のうちの、深度値が深度センサ2から上肢までの距離と対応する領域を、上肢領域として検出する。 Next, the hand position detection device 1 detects the upper limb region from the selected depth image (step S2). The process of step S2 is performed by the upper limb region detection unit 121 of the joint position calculation unit 120 in the hand position detection device 1. The upper limb region detection unit 121 detects the upper limb region from within the upper limb region detection area by, for example, a background subtraction method for the upper limb region detection area in the depth image. At this time, the upper limb region detection unit 121, for example, among a plurality of regions in which the difference from the depth value in the background image 191 is equal to or greater than the threshold value, the upper limb region detection unit 121 determines a region in which the depth value corresponds to the distance from the depth sensor 2 to the upper limb. Detect as upper limb area.

次に、手位置検出装置1は、深度画像から上肢領域を検出したか否かを判定する(ステップS3)。ステップS3の判定は、上肢領域検出部121が行う。上肢領域が検出されなかった場合(ステップS3;NO)、上肢領域検出部121は、例えば、選択中の深度画像から上肢領域が検出されなかったことを示す情報を座標履歴193に格納し(ステップS11)、該深度画像に対する座標算出処理を終了させる。一方、深度画像から上肢領域を検出した場合(ステップS3;YES)、手位置検出装置1は、ステップS14,S15,S6,及びS7の処理を行う。 Next, the hand position detection device 1 determines whether or not the upper limb region has been detected from the depth image (step S3). The determination in step S3 is performed by the upper limb region detection unit 121. When the upper limb region is not detected (step S3; NO), the upper limb region detection unit 121 stores, for example, information indicating that the upper limb region was not detected from the selected depth image in the coordinate history 193 (step). S11), the coordinate calculation process for the depth image is terminated. On the other hand, when the upper limb region is detected from the depth image (step S3; YES), the hand position detection device 1 performs the processes of steps S14, S15, S6, and S7.

深度画像から上肢領域を検出した場合(ステップS3;YES)、手位置検出装置1は、次に、深度画像における上肢領域内の手中心の位置を検出する(ステップS14)。ステップS14の処理は、手位置検出装置1における関節位置算出部120の画像内位置検出部122が行う。画像内位置検出部122は、例えば、上肢領域の形状及び位置に基づいて深度画像内における上肢領域内で手中心の位置を検出する。画像内位置検出部122は、例えば、深度画像において上肢の延伸方向(関節間を結ぶ線分の方向)となり得る方向に基づいて、上肢領域における上肢の延伸方向と直交した方向の寸法を縮めて、上肢の延伸方向を示す線分を抽出する。線分を抽出した後、画像内位置検出部122は、線分上の各点のなかから手中心の位置を検出する。画像内位置検出部122は、例えば、深度画像内における手(手のひら)の大きさと対応した領域を示す情報に基づいて、線分上での手中心の位置を検出する。 When the upper limb region is detected from the depth image (step S3; YES), the hand position detection device 1 then detects the position of the center of the hand in the upper limb region in the depth image (step S14). The process of step S14 is performed by the position detection unit 122 in the image of the joint position calculation unit 120 in the hand position detection device 1. The in-image position detection unit 122 detects the position of the center of the hand in the upper limb region in the depth image, for example, based on the shape and position of the upper limb region. The position detection unit 122 in the image reduces the dimension in the direction orthogonal to the extension direction of the upper limb in the upper limb region, based on the direction that can be the extension direction of the upper limb (the direction of the line segment connecting the joints) in the depth image, for example. , Extract a line segment indicating the extension direction of the upper limb. After extracting the line segment, the position detection unit 122 in the image detects the position of the center of the hand from each point on the line segment. The in-image position detection unit 122 detects the position of the center of the hand on the line segment, for example, based on the information indicating the area corresponding to the size of the hand (palm) in the depth image.

手中心の位置を検出した後、手位置検出装置1は、手中心及び上肢の関節の三次元座標を算出する(ステップS15)。ステップS15の処理は、手位置検出装置1における関節位置算出部120の三次元座標算出部123が行う。三次元座標算出部123は、ピンホールカメラモデルを適用し、深度画像から検出した上肢領域毎に、手中心及び関節の三次元座標を算出する。1つの上肢領域と対応する手中心及び関節の三次元座標を算出する処理において、三次元座標算出部123は、まず、手中心の三次元座標を算出する。次に、三次元座標算出部123は、深度画像から検出した体領域の形状及び位置に基づいて、上肢領域と対応する肩の位置を推定する。その後、三次元座標算出部123は、手中心の三次元座標と、推定した肩の位置とに基づいて、手首の三次元座標、肘の三次元座標、及び肩の三次元座標を順次算出する。手首、肘、及び肩の三次元座標を算出する際、三次元座標算出部123は、例えば、手中心の位置と、推定した肩の位置とに基づいて、上肢の延伸方向を決定し、決定した該上肢の延伸方向を示す線分上で手首、肘、及び肩の三次元位置を検出し、それぞれの三次元座標を算出する。 After detecting the position of the center of the hand, the hand position detection device 1 calculates the three-dimensional coordinates of the center of the hand and the joints of the upper limbs (step S15). The process of step S15 is performed by the three-dimensional coordinate calculation unit 123 of the joint position calculation unit 120 in the hand position detection device 1. The three-dimensional coordinate calculation unit 123 applies a pinhole camera model and calculates the three-dimensional coordinates of the center of the hand and the joint for each upper limb region detected from the depth image. In the process of calculating the three-dimensional coordinates of the hand center and the joint corresponding to one upper limb region, the three-dimensional coordinate calculation unit 123 first calculates the three-dimensional coordinates of the hand center. Next, the three-dimensional coordinate calculation unit 123 estimates the position of the shoulder corresponding to the upper limb region based on the shape and position of the body region detected from the depth image. After that, the three-dimensional coordinate calculation unit 123 sequentially calculates the three-dimensional coordinates of the wrist, the three-dimensional coordinates of the elbow, and the three-dimensional coordinates of the shoulder based on the three-dimensional coordinates of the center of the hand and the estimated shoulder position. .. When calculating the three-dimensional coordinates of the wrist, elbow, and shoulder, the three-dimensional coordinate calculation unit 123 determines and determines the extension direction of the upper limb based on, for example, the position of the center of the hand and the estimated position of the shoulder. The three-dimensional positions of the wrist, elbow, and shoulder are detected on the line indicating the extension direction of the upper limb, and the three-dimensional coordinates of each are calculated.

手中心及び関節の三次元座標を算出すると、手位置検出装置1は、次に、座標補正処理(ステップS6)を行う。座標補正処理は、手位置検出装置1の補正部130が行う。補正部130は、第1の実施形態で説明したように、まず、上肢領域毎に、手中心及び関節の現在の三次元座標の空間整合性及び時間整合性についての判別を行う。そして、1つの上肢領域と対応する手中心及び関節の全ての三次元座標が空間的及び時間的に整合する場合、補正部130は、該上肢領域と対応する手中心及び関節の三次元座標の補正は不要と判定する。この場合、補正部130は、判定の対象となっている上肢領域と対応する手中心及び関節の現在の三次元座標を座標履歴に格納する三次元座標に決定し、座標補正処理を終了する。一方、手中心及び関節のいずれかの三次元座標が、空間的又は時間的に整合していない場合、補正部130は、手中心及び関節の三次元座標を補正すると判定する。この場合、補正部130は、まず手中心の三次元座標を補正し、補正後の手中心の三次元座標に基づいて手首、肘、及び肩の三次元座標を補正する。また、三次元座標を補正した場合、補正部130は、補正後の三次元座標の整合性についての判定を行う。その後、補正部130は、整合していると判定するか、三次元座標の補正回数が上限値に達するまで、三次元座標の補正を繰り返す。補正後の三次元座標が空間的及び時間的に整合していると判定した場合、又は三次元座標の補正回数が上限値に達した場合、補正部130は、現在の三次元座標を座標履歴193に格納する三次元座標に決定し、座標補正処理を終了する。 After calculating the three-dimensional coordinates of the center of the hand and the joint, the hand position detection device 1 then performs the coordinate correction process (step S6). The coordinate correction process is performed by the correction unit 130 of the hand position detection device 1. As described in the first embodiment, the correction unit 130 first determines the spatial consistency and the time consistency of the current three-dimensional coordinates of the center of the hand and the joint for each upper limb region. Then, when all the three-dimensional coordinates of the hand center and the joint corresponding to one upper limb region are spatially and temporally aligned, the correction unit 130 measures the three-dimensional coordinates of the hand center and the joint corresponding to the upper limb region. It is determined that correction is unnecessary. In this case, the correction unit 130 determines the current three-dimensional coordinates of the center of the hand and the joint corresponding to the upper limb region to be determined as the three-dimensional coordinates to be stored in the coordinate history, and ends the coordinate correction process. On the other hand, when the three-dimensional coordinates of either the center of the hand or the joint do not match spatially or temporally, the correction unit 130 determines that the three-dimensional coordinates of the center of the hand and the joint are corrected. In this case, the correction unit 130 first corrects the three-dimensional coordinates of the center of the hand, and then corrects the three-dimensional coordinates of the wrist, elbow, and shoulder based on the three-dimensional coordinates of the center of the hand after correction. Further, when the three-dimensional coordinates are corrected, the correction unit 130 determines the consistency of the corrected three-dimensional coordinates. After that, the correction unit 130 repeats the correction of the three-dimensional coordinates until it is determined that they match or the number of corrections of the three-dimensional coordinates reaches the upper limit value. When it is determined that the corrected 3D coordinates are spatially and temporally consistent, or when the number of corrections of the 3D coordinates reaches the upper limit, the correction unit 130 uses the current 3D coordinates as the coordinate history. The three-dimensional coordinates to be stored in 193 are determined, and the coordinate correction process is completed.

座標補正処理を終えると、手位置検出装置1は、手中心及び関節の三次元座標を座標履歴193に格納し(ステップS7)、現在処理の対象となっている深度画像に対する座標算出処理を終了する。 When the coordinate correction process is completed, the hand position detection device 1 stores the three-dimensional coordinates of the hand center and the joint in the coordinate history 193 (step S7), and ends the coordinate calculation process for the depth image currently being processed. do.

このように、本実施形態の手位置検出装置1は、深度画像から対象者の胴体部分を示す体領域を検出し、該体領域に基づいて推定した対象者の肩の位置を利用して、対象者の上肢の関節の位置(三次元座標)を算出する。 As described above, the hand position detecting device 1 of the present embodiment detects the body region indicating the body portion of the subject from the depth image, and utilizes the position of the shoulder of the subject estimated based on the body region. Calculate the position (three-dimensional coordinates) of the joints of the upper limbs of the subject.

図20は、深度画像から体領域を検出する処理の内容を説明するフローチャートである。 FIG. 20 is a flowchart illustrating the content of the process of detecting the body region from the depth image.

深度画像から体領域を検出する処理(ステップS12)は、体領域検出部124が行う。体領域検出部124は、図20のように、まず、深度画像と背景画像とに基づいて、深度画像における体領域検出エリアを二値化する(ステップS1201)。ステップS1201の処理では、体領域検出部124は、手中心及び関節を検出する深度画像を上肢領域検出エリアと体領域検出エリアとに分割し、体領域検出エリアに対する背景差分法により、体領域検出エリアを二値化する。ここで、上肢領域検出エリアは、深度画像の撮像範囲内のうちの、対象者の上肢(特に手の部分)が移動する部分領域である。一方、体領域検出エリアは、深度画像の撮像範囲内のうちの、対象者の胴体部分が存在する領域である。深度画像における上肢領域検出エリアと体領域検出エリアとの境界は、例えば、深度画像の撮像範囲と、該撮像範囲内における対象者の立ち位置とに基づいて予め設定しておく。体領域検出部124は、深度画像の体領域検出エリアに含まれる画素毎に、深度画像における深度値と背景画像の対応する画素の深度値との差を算出し、算出した差と閾値との大小関係に基づいて、深度値を二値化する。 The body region detection unit 124 performs the process of detecting the body region from the depth image (step S12). As shown in FIG. 20, the body region detection unit 124 first binarizes the body region detection area in the depth image based on the depth image and the background image (step S1201). In the process of step S1201, the body region detection unit 124 divides the depth image for detecting the center of the hand and the joint into the upper limb region detection area and the body region detection area, and detects the body region by the background subtraction method for the body region detection area. Binarize the area. Here, the upper limb region detection area is a partial region in the imaging range of the depth image in which the upper limb (particularly the hand portion) of the subject moves. On the other hand, the body area detection area is an area in the imaging range of the depth image in which the body portion of the subject exists. The boundary between the upper limb area detection area and the body area detection area in the depth image is set in advance based on, for example, the imaging range of the depth image and the standing position of the subject within the imaging range. The body area detection unit 124 calculates the difference between the depth value in the depth image and the depth value of the corresponding pixel in the background image for each pixel included in the body area detection area of the depth image, and the calculated difference and the threshold value. The depth value is binarized based on the magnitude relationship.

次に、体領域検出部124は、二値化した体領域検出エリアにおける、深度値の差が閾値以上である画素が連続した領域のうちの最大領域を体領域として選択する(ステップS1202)。 Next, the body region detection unit 124 selects, in the binarized body region detection area, the maximum region among the continuous regions where the difference in depth value is equal to or greater than the threshold value as the body region (step S1202).

その後、体領域検出部124は、選択した体領域の輪郭部分における深度値に基づいて体領域を補正し(ステップS1203)、深度画像から体領域を検出する処理を終了する。ステップS1203の処理では、体領域検出部124は、深度画像における体領域の輪郭を境として隣接する体領域内の画素と体領域外の画素との深度値の差に基づいて、体領域の輪郭の位置を補正する。例えば、体領域検出部124は、体領域内の画素と体領域外の画素との深度値の差が所定の範囲内である場合、体領域外の画素が体領域に含まれるよう輪郭を広げる補正をする。このとき、体領域検出部124は、体領域の輪郭が上肢領域検出エリアに張り出すことを許容する。 After that, the body region detection unit 124 corrects the body region based on the depth value in the contour portion of the selected body region (step S1203), and ends the process of detecting the body region from the depth image. In the process of step S1203, the body region detection unit 124 determines the contour of the body region based on the difference in depth value between the pixels in the adjacent body region and the pixels outside the body region with the contour of the body region as the boundary in the depth image. Correct the position of. For example, when the difference in depth value between the pixel inside the body region and the pixel outside the body region is within a predetermined range, the body region detection unit 124 widens the contour so that the pixel outside the body region is included in the body region. Make corrections. At this time, the body region detection unit 124 allows the contour of the body region to project to the upper limb region detection area.

体領域を検出する処理の後、手位置検出装置1は、深度画像から上肢領域を検出する処理(ステップS2)を行う。上肢領域を検出する処理は、手位置検出装置1における関節位置算出部120の上肢領域検出部121が行う。上肢領域検出部121は、深度画像から上肢領域を検出する処理として、例えば、図21のフローチャートに沿った処理を行う。 After the process of detecting the body region, the hand position detection device 1 performs a process of detecting the upper limb region from the depth image (step S2). The process of detecting the upper limb region is performed by the upper limb region detection unit 121 of the joint position calculation unit 120 in the hand position detection device 1. The upper limb area detection unit 121 performs, for example, a process according to the flowchart of FIG. 21 as a process of detecting the upper limb area from the depth image.

図21は、深度画像から上肢領域を検出する処理の内容を説明するフローチャートである。 FIG. 21 is a flowchart illustrating the content of the process of detecting the upper limb region from the depth image.

上肢領域を検出する処理では、上肢領域検出部121は、図21のように、まず、深度画像と背景画像とに基づいて、深度画像における上肢領域検出エリア内の各点(各画素)の深度値の差を算出する(ステップS201)。 In the process of detecting the upper limb region, the upper limb region detection unit 121 first, as shown in FIG. 21, first, based on the depth image and the background image, the depth of each point (each pixel) in the upper limb region detection area in the depth image. The difference between the values is calculated (step S201).

次に、上肢領域検出部121は、算出した深度値の差に基づいて、上肢領域検出エリアを複数の領域に分割する(ステップS202)。ステップS202の処理では、上肢領域検出部121は、例えば、深度値の差を複数の区間に分割し、各画素の深度値の差が複数の区間のいずれの区間に含まれるかに基づいて、上肢領域検出エリアを複数の領域に分割する。このとき、深度値の差は、例えば、背景画像に存在する物体と対象者の上肢との深度値の差と、背景画像に存在する物体と対象者の頭部との深度値の差とが異なる区間になるよう分割する。 Next, the upper limb region detection unit 121 divides the upper limb region detection area into a plurality of regions based on the difference in the calculated depth values (step S202). In the process of step S202, the upper limb region detection unit 121 divides the difference in depth value into a plurality of sections, and based on which section of the plurality of sections the difference in the depth value of each pixel is included. The upper limb area detection area is divided into multiple areas. At this time, the difference in depth value is, for example, the difference in depth value between the object existing in the background image and the upper limb of the subject, and the difference in depth value between the object existing in the background image and the head of the subject. Divide into different sections.

その後、上肢領域検出部121は、深度値の差が所定の範囲内である領域を上肢領域として抽出し(ステップS203)、深度画像から上肢領域を検出する処理を終了する。ステップS203では、上肢領域検出部121は、深度値の差に基づいて分割した上肢領域検出エリア内の複数の領域のうちの、深度値の差が背景画像に存在する物体と対象者の上肢との深度値の差と対応した区間に含まれる領域を、上肢領域として抽出する。 After that, the upper limb region detection unit 121 extracts a region in which the difference in depth value is within a predetermined range as the upper limb region (step S203), and ends the process of detecting the upper limb region from the depth image. In step S203, the upper limb area detection unit 121 has an object having a difference in depth value in the background image and the upper limb of the subject among a plurality of areas in the upper limb area detection area divided based on the difference in depth value. The area included in the section corresponding to the difference in the depth value of is extracted as the upper limb area.

深度画像から上肢領域を検出した後、手位置検出装置1は、上肢領域毎に手中心の位置を検出する(ステップS14)。ステップS14の処理は、画像内位置検出部122が行う。画像内位置検出部122は、第1の実施形態で説明したような方法により、上肢領域毎に手中心の位置を検出する。なお、上肢領域を線分群に変換して手中心の位置を検出することができない場合、画像内位置検出部122は、上肢領域内における任意の一点を手中心の位置として検出する。 After detecting the upper limb region from the depth image, the hand position detection device 1 detects the position of the center of the hand for each upper limb region (step S14). The process of step S14 is performed by the position detection unit 122 in the image. The position detection unit 122 in the image detects the position of the center of the hand for each upper limb region by the method as described in the first embodiment. If the upper limb region cannot be converted into a line segment group to detect the position of the center of the hand, the position detection unit 122 in the image detects an arbitrary point in the upper limb region as the position of the center of the hand.

手中心の位置を検出した後、手位置検出装置1は、上肢領域毎に手中心及び関節の三次元座標を算出する(ステップS15)。ステップS15の処理は、三次元座標算出部122が行う。本実施形態の手位置検出装置1における三次元座標算出部122は、手中心及び関節の三次元座標を算出する処理として、例えば、図21のフローチャートに沿った処理を行う。 After detecting the position of the center of the hand, the hand position detection device 1 calculates the three-dimensional coordinates of the center of the hand and the joint for each upper limb region (step S15). The process of step S15 is performed by the three-dimensional coordinate calculation unit 122. The three-dimensional coordinate calculation unit 122 in the hand position detection device 1 of the present embodiment performs, for example, a process according to the flowchart of FIG. 21 as a process of calculating the three-dimensional coordinates of the center of the hand and the joint.

図22は、手中心及び関節の三次元座標を算出する処理の内容を説明するフローチャートである。 FIG. 22 is a flowchart illustrating the contents of the process of calculating the three-dimensional coordinates of the center of the hand and the joint.

本実施形態に係る三次元座標算出部122は、図22のように、まず、深度画像から検出した体領域に基づいて体重心の三次元座標を算出し(ステップS1501)、深度画像内における肩の位置を推定する(ステップS1502)。ステップS1501の処理では、三次元座標算出部122は、まず、深度画像から検出した体領域における体重心の位置を算出する。その後、三次元座標算出部122は、ピンホールカメラモデルを適用し、深度画像における体重心の位置(座標)と該位置の深度値とに基づいて、深度画像を撮像した三次元空間における体重心の三次元座標を算出する。このとき、三次元座標算出部122は、世界座標系での三次元座標を算出する。 As shown in FIG. 22, the three-dimensional coordinate calculation unit 122 according to the present embodiment first calculates the three-dimensional coordinates of the weight center based on the body region detected from the depth image (step S1501), and the shoulder in the depth image. Estimate the position of (step S1502). In the process of step S1501, the three-dimensional coordinate calculation unit 122 first calculates the position of the body weight center in the body region detected from the depth image. After that, the three-dimensional coordinate calculation unit 122 applies the pinhole camera model, and based on the position (coordinates) of the weight center in the depth image and the depth value of the position, the weight center in the three-dimensional space where the depth image is imaged. Calculate the three-dimensional coordinates of. At this time, the three-dimensional coordinate calculation unit 122 calculates the three-dimensional coordinates in the world coordinate system.

また、ステップS1502の処理では、三次元座標算出部122は、まず、所定の身長値から深度画像を撮像した三次元空間における両肩のおおよその高さと肩幅を算出する。ここで、肩幅は、例えば、ウィトルウィウィス的人体比率に基づいて算出する。その後、三次元座標算出部122は、例えば、深度画像における横方向中心が肩幅の中心となるよう、両肩の位置を算出する。 Further, in the process of step S1502, the three-dimensional coordinate calculation unit 122 first calculates the approximate height and shoulder width of both shoulders in the three-dimensional space in which the depth image is captured from the predetermined height value. Here, the shoulder width is calculated based on, for example, the Witruwiwis-like human body proportions. After that, the three-dimensional coordinate calculation unit 122 calculates the positions of both shoulders so that the lateral center in the depth image becomes the center of the shoulder width, for example.

次に、三次元座標算出部122は、上肢領域を1つ選択し、該上肢領域から検出した手中心の三次元座標を算出する(ステップS1503)。ステップS1503の処理では、三次元座標算出部122は、深度画像から検出した上肢領域のうちの、手中心の三次元座標を算出していない上肢領域を選択する。また、ステップS1503の処理では、三次元座標算出部122は、ピンホールカメラモデルを適用し、深度画像内における手中心を示す点P0の位置(座標)と、該位置の深度値とに基づいて、深度画像を撮像した三次元空間における手中心の三次元座標を算出する。 Next, the three-dimensional coordinate calculation unit 122 selects one upper limb region and calculates the three-dimensional coordinates of the hand center detected from the upper limb region (step S1503). In the process of step S1503, the three-dimensional coordinate calculation unit 122 selects the upper limb region for which the three-dimensional coordinates of the hand center are not calculated, among the upper limb regions detected from the depth image. Further, in the process of step S1503, the three-dimensional coordinate calculation unit 122 applies the pinhole camera model, and is based on the position (coordinates) of the point P0 indicating the center of the hand in the depth image and the depth value of the position. , Calculate the three-dimensional coordinates of the center of the hand in the three-dimensional space where the depth image is captured.

次に、三次元座標算出部122は、深度画像内での手首の位置を検出し、該手首の三次元座標を算出する(ステップS1504)。ステップS1504の処理では、三次元座標算出部122は、例えば、深度画像から抽出した上肢の延伸方向を示す線分群から検出した手中心の位置と、線分の折れ曲がり位置とに基づいて、深度画像における手首の位置を検出する。なお、上肢領域から線分群を抽出できなかった場合等、線分を利用して手首の位置を検出することができない場合、三次元座標算出部122は、例えば、手中心から手首までの寸法の平均値(例えば60mm)に基づいて深度画像における手首の位置を検出する。この場合、三次元座標算出部122は、例えば、深度画像における手中心の位置と肩の推定位置とを結ぶ線分上であって、手中心からの三次元距離が手中心から手首までの寸法の平均値となるような位置を手首の位置として検出する。 Next, the three-dimensional coordinate calculation unit 122 detects the position of the wrist in the depth image and calculates the three-dimensional coordinates of the wrist (step S1504). In the process of step S1504, the three-dimensional coordinate calculation unit 122 uses, for example, the depth image based on the position of the center of the hand detected from the line segment group indicating the extension direction of the upper limb extracted from the depth image and the bending position of the line segment. Detects the position of the wrist in. If the position of the wrist cannot be detected using the line segment, such as when the line segment group cannot be extracted from the upper limb region, the three-dimensional coordinate calculation unit 122 may, for example, measure the dimension from the center of the hand to the wrist. The position of the wrist in the depth image is detected based on the average value (for example, 60 mm). In this case, the three-dimensional coordinate calculation unit 122 is, for example, on a line segment connecting the position of the center of the hand and the estimated position of the shoulder in the depth image, and the three-dimensional distance from the center of the hand is the dimension from the center of the hand to the wrist. The position that becomes the average value of is detected as the position of the wrist.

次に、三次元座標算出部122は、深度画像内での肘の位置を検出し、該肘の三次元座標を算出する(ステップS1505)。ステップS1505の処理では、三次元座標算出部122は、例えば、深度画像から抽出した上肢の延伸方向を示す線分群から検出した手首の位置と、線分の折れ曲がり位置とに基づいて、深度画像における肘の位置を検出する。なお、上肢領域から線分群を抽出できなかった場合等、線分を利用して肘の位置を検出することができない場合、三次元座標算出部122は、例えば、手首から肘までの寸法の平均値(例えば260mm)に基づいて深度画像における肘の位置を検出する。この場合、三次元座標算出部122は、例えば、深度画像における手首の位置と肩の推定位置とを結ぶ線分上であって、手首からの三次元距離が手首から肘までの寸法の平均値となるような位置を肘の位置として検出する。 Next, the three-dimensional coordinate calculation unit 122 detects the position of the elbow in the depth image and calculates the three-dimensional coordinates of the elbow (step S1505). In the process of step S1505, the three-dimensional coordinate calculation unit 122 in the depth image is based on, for example, the position of the wrist detected from the line segment group indicating the extension direction of the upper limb extracted from the depth image and the bending position of the line segment. Detect the position of the elbow. If the position of the elbow cannot be detected using the line segment, such as when the line segment group cannot be extracted from the upper limb region, the three-dimensional coordinate calculation unit 122 may, for example, average the dimensions from the wrist to the elbow. The position of the elbow in the depth image is detected based on the value (eg 260 mm). In this case, the three-dimensional coordinate calculation unit 122 is, for example, on a line segment connecting the position of the wrist and the estimated position of the shoulder in the depth image, and the three-dimensional distance from the wrist is the average value of the dimensions from the wrist to the elbow. The position where becomes is detected as the position of the elbow.

次に、三次元座標算出部122は、深度画像内での肩の位置を検出し、該肩の三次元座標を算出する(ステップS1506)。ステップS1505の処理では、三次元座標算出部122は、例えば、深度画像から抽出した上肢の延伸方向を示す線分群から検出した肘の位置と、線分の終点又は折れ曲がり位置とに基づいて、深度画像における肩の位置を検出する。なお、上肢領域から線分群を抽出できなかった場合等、線分を利用して肩の位置を検出することができない場合、三次元座標算出部122は、例えば、推定した肩の位置と、肘から肩までの寸法の平均値とに基づいて深度画像における肩の位置を検出する。この場合、三次元座標算出部122は、例えば、深度画像における肘の位置と肩の推定位置とを結ぶ線分上であって、手首からの三次元距離が手首から肘までの寸法の平均値となるような位置を肘の位置として検出する。 Next, the three-dimensional coordinate calculation unit 122 detects the position of the shoulder in the depth image and calculates the three-dimensional coordinates of the shoulder (step S1506). In the process of step S1505, the three-dimensional coordinate calculation unit 122 determines the depth based on, for example, the position of the elbow detected from the line segment group indicating the extension direction of the upper limb extracted from the depth image, and the end point or the bending position of the line segment. Detects the position of the shoulder in the image. If the shoulder position cannot be detected using the line segment, such as when the line segment group cannot be extracted from the upper limb region, the three-dimensional coordinate calculation unit 122 may use, for example, the estimated shoulder position and elbow. The position of the shoulder in the depth image is detected based on the average value of the dimensions from to the shoulder. In this case, the three-dimensional coordinate calculation unit 122 is, for example, on a line segment connecting the elbow position and the estimated shoulder position in the depth image, and the three-dimensional distance from the wrist is the average value of the dimensions from the elbow to the elbow. The position where becomes is detected as the position of the elbow.

ステップS1504〜S1506により手首、肘、及び肩の三次元座標を算出した後、三次元座標算出部122は、未選択の上肢領域があるか否かを判定する(ステップS1507)。ステップS1507の判定では、三次元座標算出部122は、手中心及び各関節の三次元座標を算出していない上肢領域がある場合に、未選択の上肢領域があると判定する。未選択の上肢領域がある場合(ステップS1507;YES)、三次元座標算出部122は、ステップS1503以降の処理を繰り返す。そして、全ての上肢領域で手中心及び各関節の三次元座標を算出した場合(ステップS1507;NO)、三次元座標算出部122は、手中心及び関節の三次元座標を算出する処理を終了する。 After calculating the three-dimensional coordinates of the wrist, elbow, and shoulder in steps S1504 to S1506, the three-dimensional coordinate calculation unit 122 determines whether or not there is an unselected upper limb region (step S1507). In the determination of step S1507, the three-dimensional coordinate calculation unit 122 determines that there is an unselected upper limb region when there is an upper limb region for which the three-dimensional coordinates of the center of the hand and each joint have not been calculated. When there is an unselected upper limb region (step S1507; YES), the three-dimensional coordinate calculation unit 122 repeats the processes after step S1503. Then, when the three-dimensional coordinates of the hand center and each joint are calculated in all the upper limb regions (step S1507; NO), the three-dimensional coordinate calculation unit 122 ends the process of calculating the three-dimensional coordinates of the hand center and the joint. ..

手中心及び関節の三次元座標を算出する処理(ステップS15)が終了すると、手位置検出装置1は、次に、座標補正処理(ステップS6)を行う。座標補正処理は、手位置検出装置1の補正部130が行う。本実施形態の手位置検出装置1における補正部130は、座標補正処理として、例えば、図4のフローチャートに沿った処理を行う。なお、本実施形態に係る補正部130は、図4のフローチャートにおける整合性判別処理(ステップS603)として、例えば、図23のフローチャートに沿った処理を行う。 When the process of calculating the three-dimensional coordinates of the center of the hand and the joint (step S15) is completed, the hand position detection device 1 then performs the coordinate correction process (step S6). The coordinate correction process is performed by the correction unit 130 of the hand position detection device 1. The correction unit 130 in the hand position detection device 1 of the present embodiment performs, for example, a process according to the flowchart of FIG. 4 as the coordinate correction process. The correction unit 130 according to the present embodiment performs, for example, a process according to the flowchart of FIG. 23 as the consistency determination process (step S603) in the flowchart of FIG.

図23は、第2の実施形態における整合性判別処理の内容を説明するフローチャートである。 FIG. 23 is a flowchart illustrating the content of the consistency determination process in the second embodiment.

図23の整合性判別処理(ステップS603)は、補正部130の整合性判定部131が行う。本実施形態の手位置検出装置1における整合性判定部131は、図23のように、まず、手中心及び各関節を識別する変数iを「0」にするとともに、整合性パラメータCiを「True」に設定する(ステップS60301)。ここで、変数iは、1個の上肢領域から手中心及び各関節の位置を検出したときに、手中心及び各関節のそれぞれを識別するために付した数値(0,1,2,・・・)である。整合性パラメータCiは、変数iにより指定される手中心又は関節を示す点Piの三次元座標が空間的かつ時間的に整合しているか否かを示す値である。本実施形態では、整合性パラメータCiは、「True」と「False」との2つの値のいずれかの値とする。「True」は、三次元座標が空間的かつ時間的に整合していることを示す値である。「False」は、三次元座標が空間的又は時間的に整合していないことを示す値である。 The consistency determination process (step S603) of FIG. 23 is performed by the consistency determination unit 131 of the correction unit 130. As shown in FIG. 23, the consistency determination unit 131 in the hand position detection device 1 of the present embodiment first sets the variable i for identifying the hand center and each joint to “0” and sets the consistency parameter Ci to “True”. (Step S60301). Here, the variable i is a numerical value (0, 1, 2, ...) Attached to identify each of the hand center and each joint when the position of the hand center and each joint is detected from one upper limb region.・). The consistency parameter Ci is a value indicating whether or not the three-dimensional coordinates of the point Pi indicating the hand center or joint specified by the variable i are spatially and temporally matched. In the present embodiment, the consistency parameter Ci is set to one of two values, "True" and "False". "True" is a value indicating that the three-dimensional coordinates are spatially and temporally aligned. "False" is a value indicating that the three-dimensional coordinates are not spatially or temporally aligned.

次に、整合性判定部131は、手中心又は関節を示す点Piの三次元座標(Xi,Yi,Zi)から深度画像内での座標(xi,yi)と距離ziとを算出する(ステップS60302)。ステップS60302では、整合性判定部131は、深度画像内での手中心又は関節を示す点Piの位置と対応する三次元座標(Xi,Yi,Zi)を算出する際の算出式に基づく逆算(逆変換)により、深度画像内での座標(xi,yi)と距離ziとを算出する。 Next, the consistency determination unit 131 calculates the coordinates (xi, yi) and the distance zi in the depth image from the three-dimensional coordinates (Xi, Yi, Zi) of the point Pi indicating the center of the hand or the joint (step). S60302). In step S60302, the consistency determination unit 131 back-calculates based on the calculation formula when calculating the three-dimensional coordinates (Xi, Yi, Zi) corresponding to the position of the point Pi indicating the center of the hand or the joint in the depth image (Xi, Yi, Zi). The coordinates (xi, yi) and the distance zi in the depth image are calculated by the inverse transformation).

次に、整合性判定部131は、深度画像における座標(xi,yi)の深度値zi’を読み出し(ステップS60303)、zi’>zi+Mであるか否かを判定する(ステップS60304)。zi’>zi+Mである場合(ステップS60304;YES)、整合性判定部131は、整合性パラメータCiを「False」に変更する(ステップS60312)。 Next, the consistency determination unit 131 reads out the depth value zi'of the coordinates (xi, yi) in the depth image (step S60303), and determines whether or not zi'> zi + M (step S60304). When zi'> zi + M (step S60304; YES), the consistency determination unit 131 changes the consistency parameter Ci to "False" (step S60312).

一方、zi’≦zi+Mである場合(ステップS60304;NO)、整合性判定部131は、次に、点Piの移動速度Siを算出する(ステップS60308)。ステップS60308の処理では、整合性判定部131は、まず、座標履歴193を参照して点Piについての過去の三次元座標を読み出し、現在の三次元座標と過去の三次元座標との三次元距離Diを算出する。三次元距離Diを算出した後、整合性判定部131は、算出した三次元距離Diと、深度画像の撮像時刻の差とに基づいて、移動速度Siを算出する。 On the other hand, when zi'≤ zi + M (step S60304; NO), the consistency determination unit 131 next calculates the moving speed Si of the point Pi (step S60308). In the process of step S60308, the consistency determination unit 131 first reads the past three-dimensional coordinates of the point Pi with reference to the coordinate history 193, and the three-dimensional distance between the current three-dimensional coordinates and the past three-dimensional coordinates. Calculate Di. After calculating the three-dimensional distance Di, the consistency determination unit 131 calculates the moving speed Si based on the calculated three-dimensional distance Di and the difference in the imaging time of the depth image.

次に、整合性判定部131は、算出した移動速度Siが閾値THSよりも大きいか否かを判定する(ステップS60309)。閾値THSは、例えば、人が上肢を動かす際の手中心及び各関節の平均的な移動速度に基づいて設定する。すなわち、整合性判定部131は、算出した移動速度SiがSi>THSである場合には、移動速度Siの算出に用いた2つの三次元座標の位置関係が時間的に整合していないと判定する。よって、Si>THSである場合(ステップS60309;YES)、整合性判定部131は、整合性パラメータCiを「False」に変更する(ステップS60312)。 Next, the consistency determination unit 131 determines whether or not the calculated movement speed Si is larger than the threshold value THS (step S60309). The threshold THS is set based on, for example, the center of the hand when a person moves the upper limbs and the average moving speed of each joint. That is, when the calculated movement speed Si is Si> THS, the consistency determination unit 131 determines that the positional relationship between the two three-dimensional coordinates used for calculating the movement speed Si does not match in time. do. Therefore, when Si> THS (step S60309; YES), the consistency determination unit 131 changes the consistency parameter Ci to “False” (step S60312).

ステップS60312の処理を行った場合、或いはSi≦THSである場合(ステップS60309;NO)、整合性判定部131は、次に、現在処理対象である手中心及び関節を示す点のなかに未判定の点があるか否かを判定する(ステップS60310)。すなわち、ステップS60310の判定を行う時点で、現在処理対象となっている手中心又は関節を示す点Piについての整合性パラメータCiは、「True」及び「False」のいずれかの値に確定する。 When the processing of step S60312 is performed, or when Si ≦ THS (step S60309; NO), the consistency determination unit 131 is then undetermined among the points indicating the center of the hand and the joint currently being processed. It is determined whether or not there is a point (step S60310). That is, at the time of determining in step S60310, the consistency parameter Ci for the point Pi indicating the center of the hand or the joint currently being processed is determined to be either “True” or “False”.

整合性を判定していない点がある場合(ステップS60310;YES)、整合性判定部131は、変数iをi+1に更新し整合性パラメータCiを「True」に設定する(ステップS60311)。その後、整合性判定部131は、ステップS60302以降の処理を行う。そして、全ての手中心及び関節の整合性を判定した場合(ステップS60310;NO)、整合性判定部131は、整合性判別処理を終了する。 When there is a point where the consistency is not determined (step S60310; YES), the consistency determination unit 131 updates the variable i to i + 1 and sets the consistency parameter Ci to “True” (step S60311). After that, the consistency determination unit 131 performs the processes after step S60302. Then, when the consistency of all the hand centers and joints is determined (step S60310; NO), the consistency determination unit 131 ends the consistency determination process.

このように、図23の整合性判別処理では、図5の整合性判別処理におけるステップS60305からステップS60307までの処理が省略されている。すなわち、本実施形態の整合性判定部131が行う整合性判別処理では、手中心又は関節を示す点Piの三次元座標から算出した距離ziと、深度画像における深度値zi’とが整合しない場合、点Piの三次元座標は空間的に整合しないと判定する。このため、本実施形態の手位置検出装置1では、三次元距離lenを算出して対象者の寸法との整合性を判定する場合に比べて処理数が低減し、手位置検出装置1の処理負荷を軽減することが可能となる。なお、本実施形態の手位置検出装置1における整合性判別処理として、整合性判定部131が図5のフローチャートに沿った処理を行ってもよいことはもちろんである。また、整合性判定部131は、整合性判別処理として、図17A及び図17Bのフローチャートに沿った処理を行ってもよい。 As described above, in the consistency determination process of FIG. 23, the processes from step S60305 to step S60307 in the consistency determination process of FIG. 5 are omitted. That is, in the consistency determination process performed by the consistency determination unit 131 of the present embodiment, the distance zi calculated from the three-dimensional coordinates of the point Pi indicating the center of the hand or the joint does not match the depth value zi'in the depth image. , It is determined that the three-dimensional coordinates of the point Pi are spatially inconsistent. Therefore, in the hand position detection device 1 of the present embodiment, the number of processes is reduced as compared with the case where the three-dimensional distance len is calculated to determine the consistency with the dimensions of the target person, and the process of the hand position detection device 1 is performed. It is possible to reduce the load. Of course, as the consistency determination process in the hand position detection device 1 of the present embodiment, the consistency determination unit 131 may perform the process according to the flowchart of FIG. Further, the consistency determination unit 131 may perform a process according to the flowcharts of FIGS. 17A and 17B as the consistency determination process.

図24は、深度画像の撮像範囲を説明する図である。
図24には、本実施形態の手位置検出装置1の適用例として、作業スペース6内で作業を行う作業員7の手中心の位置の時間履歴に基づいて作業状況を管理する管理システム5を示している。該管理システム5は、手位置検出装置1と、深度センサ2と、管理装置3Aとを含む。管理システム5における手位置検出装置1及び深度センサ2は、それぞれ、インターネット等の通信ネットワーク4に接続可能な通信機能を含む。また、管理システム5における管理装置3Aは、図1の外部装置3の一例である。なお、図24に示したx方向、y方向、及びz方向は、それぞれ、作業スペース6における深度センサ2の座標系のx軸方向、y軸方向、及びz軸方向を示している。
FIG. 24 is a diagram illustrating an imaging range of a depth image.
In FIG. 24, as an application example of the hand position detection device 1 of the present embodiment, a management system 5 that manages a work situation based on a time history of a position centered on the hand of a worker 7 who works in the work space 6 is shown. Shows. The management system 5 includes a hand position detection device 1, a depth sensor 2, and a management device 3A. The hand position detection device 1 and the depth sensor 2 in the management system 5 each include a communication function that can be connected to a communication network 4 such as the Internet. Further, the management device 3A in the management system 5 is an example of the external device 3 in FIG. The x-direction, y-direction, and z-direction shown in FIG. 24 indicate the x-axis direction, the y-axis direction, and the z-axis direction of the coordinate system of the depth sensor 2 in the work space 6, respectively.

この種の管理システム5では、例えば、管理システム5の管理者或いは作業員7等が、予め、作業員7の上肢の寸法を入力した寸法情報192を作成し、該寸法情報192を手位置検出装置1の記憶部190に記憶させておく。また、この種の管理システム5では、例えば、作業員7が作業を行っていない期間に、作業スペース6の上方に設置した深度センサ2により深度画像を撮像し、該深度画像を背景画像191として記憶部190に記憶させておく。深度センサ2は、作業員7が作業を行う作業台8Aにおける作業エリアを含む撮像範囲10内のU×V個の点についての深度値(距離の情報)を持つ深度画像を撮像する。 In this type of management system 5, for example, the manager of the management system 5, the worker 7, or the like creates dimensional information 192 in which the dimensions of the upper limbs of the worker 7 are input in advance, and the dimensional information 192 is detected by hand. It is stored in the storage unit 190 of the device 1. Further, in this type of management system 5, for example, a depth image is captured by a depth sensor 2 installed above the work space 6 while the worker 7 is not working, and the depth image is used as a background image 191. It is stored in the storage unit 190. The depth sensor 2 captures a depth image having depth values (distance information) for U × V points within the imaging range 10 including the work area on the workbench 8A on which the worker 7 works.

また、本実施形態で例示する管理システム5では、図24のように、深度センサ2の撮像範囲10が作業エリアよりも作業者7側に張り出している。このため、作業者7が作業を行っているときに深度センサ2で撮像した深度画像には、作業者7の頭部750や胴体760についての深度値の情報が含まれる。 Further, in the management system 5 illustrated in the present embodiment, as shown in FIG. 24, the imaging range 10 of the depth sensor 2 projects toward the worker 7 side from the work area. Therefore, the depth image captured by the depth sensor 2 while the worker 7 is working includes information on the depth values of the head 750 and the body 760 of the worker 7.

図25は、深度画像の例を示す図である。
図25の深度画像1101は、図24の作業エリア6内で作業員7が作業を行っているときに深度センサ2で撮像した深度画像である。深度画像1101は、撮像範囲10内のU×V個の点のそれぞれについての深度値の情報を含む。
FIG. 25 is a diagram showing an example of a depth image.
The depth image 1101 of FIG. 25 is a depth image captured by the depth sensor 2 while the worker 7 is working in the work area 6 of FIG. 24. The depth image 1101 contains information on the depth value for each of the U × V points in the imaging range 10.

深度画像1101の撮像範囲10は、作業領域である作業台8Aと隣接する作業員7が立っている領域を含む。このため、深度画像1101は、作業台8Aを示す領域と、作業員7の左上肢710を示す領域と、右上肢720を示す領域との他に、頭部750の深度値を示す領域と、作業員7の胴体部分760の深度値を示す部分とを含む。なお、深度画像1101を撮像する深度センサ2は、作業員7の上方に設置されている。このため、深度画像1101における作業員7の左上肢710を示す領域と、右上肢720を示す領域は、それぞれ、作業員7の頭部750及び胴体部分760により一部分が欠落した状態となることがある。図25の深度画像1101では、作業員7の左上肢710のうちの手711の部分が頭部750に隠れており、肘713の部分が胴体部分760に隠れている。同様に、図25の深度画像1101では、作業員7の右上肢720のうちの手721の部分が頭部750に隠れており、肘713の部分が胴体部分760に隠れている。 The imaging range 10 of the depth image 1101 includes a working area 8A and an area in which an adjacent worker 7 stands. Therefore, the depth image 1101 includes a region showing the workbench 8A, a region showing the upper left limb 710 of the worker 7, a region showing the upper right limb 720, and a region showing the depth value of the head 750. Includes a portion indicating the depth value of the body portion 760 of the worker 7. The depth sensor 2 that captures the depth image 1101 is installed above the worker 7. Therefore, the region showing the upper left limb 710 of the worker 7 and the region showing the upper right limb 720 in the depth image 1101 may be partially missing due to the head 750 and the body portion 760 of the worker 7, respectively. be. In the depth image 1101 of FIG. 25, the portion of the hand 711 of the upper left limb 710 of the worker 7 is hidden in the head portion 750, and the portion of the elbow 713 is hidden in the body portion 760. Similarly, in the depth image 1101 of FIG. 25, the portion of the hand 721 of the upper right limb 720 of the worker 7 is hidden in the head portion 750, and the portion of the elbow 713 is hidden in the body portion 760.

本実施形態の手位置検出装置1は、上記のように、まず、処理対象である深度画像から体領域を検出する処理(ステップS12)と、上肢領域を検出する処理(ステップS2)とを行う。 As described above, the hand position detection device 1 of the present embodiment first performs a process of detecting a body region from a depth image to be processed (step S12) and a process of detecting an upper limb region (step S2). ..

図26Aは、体領域の検出方法を説明する図(その1)である。図26Bは、体領域の検出方法を説明する図(その2)である。 FIG. 26A is a diagram (No. 1) illustrating a method for detecting a body region. FIG. 26B is a diagram (No. 2) illustrating a method for detecting a body region.

図26Aの(a)には、深度画像1101における体領域検出エリア1105と、上肢領域検出エリア1106とを示している。体領域検出エリア1105は、作業台8Aにおける作業領域と隣接する、作業員7が立っている領域である。このため、以下の説明では、背景画像において作業台8Aの下端となる位置を境界Bとし、深度画像1101における境界Bよりも下方側の部分領域を体領域検出エリア1105とする。すなわち、体領域検出部124は、まず、深度画像1101における境界Bよりも下方側である体領域検出エリア1105に含まれる各位置(画素)の深度値に基づいて二値画像を生成する。 FIG. 26A (a) shows the body region detection area 1105 and the upper limb region detection area 1106 in the depth image 1101. The body area detection area 1105 is an area in which the worker 7 stands, which is adjacent to the work area in the work table 8A. Therefore, in the following description, the position at the lower end of the workbench 8A in the background image is defined as the boundary B, and the partial region below the boundary B in the depth image 1101 is defined as the body region detection area 1105. That is, the body region detection unit 124 first generates a binary image based on the depth value of each position (pixel) included in the body region detection area 1105 below the boundary B in the depth image 1101.

体領域検出部124が二値画像を生成する際に用いる背景画像は、図示は省略するが、深度画像1101における境界Bを含む境界Bよりも上方側に作業台8Aの深度値を示す領域のみが存在し、境界Bよりも下方側には床面の深度値を示す領域のみが存在する。このため、体領域検出エリア1105の深度値に基づいて生成される二値画像は、例えば、図26Aの(b)の二値画像1102のようになる。なお、図26Aの(b)の二値画像では、上肢領域検出エリア1106内の各位置(画素)の深度値を、体領域検出エリア1105における体領域1102C外の深度値と一致させている。 Although not shown, the background image used by the body region detection unit 124 to generate the binary image is only the region showing the depth value of the workbench 8A above the boundary B including the boundary B in the depth image 1101. Exists, and there is only a region indicating the depth value of the floor surface below the boundary B. Therefore, the binary image generated based on the depth value of the body region detection area 1105 is, for example, the binary image 1102 of FIG. 26A (b). In the binary image of FIG. 26A (b), the depth value of each position (pixel) in the upper limb region detection area 1106 is matched with the depth value outside the body region 1102C in the body region detection area 1105.

すなわち、体領域検出エリア1105内での深度値の差に基づいて生成される二値画像1102における体領域1102Cは、上肢領域検出エリア1106内に存在する作業員7の胴体部分を含まない。このため、体領域1102Cは、作業員7の胴体部分を正しく示しているとはいえない。よって、体領域検出部124は、次に、体領域1102Cの輪郭部分における深度値に基づいて、体領域1102Cを補正する。 That is, the body region 1102C in the binary image 1102 generated based on the difference in depth values in the body region detection area 1105 does not include the body portion of the worker 7 existing in the upper limb region detection area 1106. Therefore, it cannot be said that the body region 1102C correctly indicates the body portion of the worker 7. Therefore, the body region detection unit 124 next corrects the body region 1102C based on the depth value in the contour portion of the body region 1102C.

図26Aの(a)の深度画像1101と(b)の二値画像1102とを比較すると、体領域1102Cの輪郭のうちの境界Bと重なる部分に、体領域1102C内の深度値と体領域1102C外の深度値との差が略0となる区間が存在する。このため、体領域検出部124は、体領域1102Cの輪郭のうちの、体領域1102C内の深度値と体領域1102C外の深度値との差が略0となる部分を、上肢領域検出エリア1106側に広げる。これにより、体領域検出部124は、例えば、図26Bの二値画像1102のように、深度画像1101における胴体部分760の深度値を示す領域と対応した体領域1102Dを検出する。 Comparing the depth image 1101 of FIG. 26A and the binary image 1102 of FIG. 26A, the depth value in the body region 1102C and the body region 1102C are located in the portion of the contour of the body region 1102C that overlaps the boundary B. There is a section where the difference from the outside depth value is approximately 0. Therefore, the body region detection unit 124 determines the portion of the contour of the body region 1102C where the difference between the depth value inside the body region 1102C and the depth value outside the body region 1102C is substantially 0, in the upper limb region detection area 1106. Spread to the side. As a result, the body region detection unit 124 detects the body region 1102D corresponding to the region showing the depth value of the body portion 760 in the depth image 1101, as in the binary image 1102 of FIG. 26B, for example.

深度画像1101から体領域1102Dを検出した後、手位置検出装置1では、上肢領域検出部121が深度画像1101から上肢領域を検出する。上肢領域検出部121は、背景差分法により、深度画像1101における上肢領域検出エリア1106内から上肢領域を検出する。 After detecting the body region 1102D from the depth image 1101, the upper limb region detection unit 121 detects the upper limb region from the depth image 1101 in the hand position detection device 1. The upper limb region detection unit 121 detects the upper limb region from within the upper limb region detection area 1106 in the depth image 1101 by the background subtraction method.

図27は、上肢領域の検出結果の例を示す図である。
図27の二値画像1102は、図25の深度画像1101と、図示しない背景画像191とに基づいて生成される二値画像を示している。図25の深度画像1101には、背景画像191には存在しない作業者7の頭部750、胴体部分760、左上肢710、及び右上肢720の各部についての深度値を示す領域が含まれる。従って、図25の深度画像1101と、背景画像191とに基づいて生成される二値画像1102では、第1の上肢領域1102A、第2の上肢領域1102B、体領域1102D、及び頭部領域1102Eが、背景から分離される。このため、上肢領域検出部121は、次に、背景から分離された4つの領域1102A,1102B,1102D,及び1102Eから、上肢領域1102A及び1102Bを抽出する。
FIG. 27 is a diagram showing an example of the detection result of the upper limb region.
The binary image 1102 of FIG. 27 shows a binary image generated based on the depth image 1101 of FIG. 25 and the background image 191 (not shown). The depth image 1101 of FIG. 25 includes a region showing depth values for each part of the worker 7's head 750, body portion 760, upper left limb 710, and upper right limb 720, which are not present in the background image 191. Therefore, in the binary image 1102 generated based on the depth image 1101 and the background image 191 of FIG. 25, the first upper limb region 1102A, the second upper limb region 1102B, the body region 1102D, and the head region 1102E are included. , Isolated from the background. Therefore, the upper limb region detection unit 121 next extracts the upper limb regions 1102A and 1102B from the four regions 1102A, 1102B, 1102D, and 1102E separated from the background.

背景から分離された4つの領域1102A,1102B,1102D,及び1102Eのうちの、上肢領域1102A及び1102Bと、体領域1102D及び頭部領域1102Eとでは、二値画像1102を生成する際に算出した深度値の差の大きさが異なる。上肢領域1102A及び1102Bと対応する作業員7の上肢710及び720は、体領域1102Dと対応する胴体部分760及び頭部領域1102Eと対応する頭部750よりも作業台8Aに近い位置に存在する。このため、上肢領域1102A及び1102B内の画素における深度値の差は、体領域1102D及び頭部領域1102E内の画素における深度値の差よりも小さくなる。よって、上肢領域検出部121は、背景から分離された4つの領域1102A,1102B,1102D,及び1102Eのうちの、深度値の差が第1の閾値と第2の閾値との間となる小さい領域1102A及び1102Bを上肢領域として検出する。この場合、上肢領域検出部121は、二値画像1102においては、図27のように、深度値の差が第2の閾値よりも大きくなる領域1102D及び1102Eを背景とみなす。従って、画像内位置検出部122は、深度画像1101内での手中心の位置を検出する際に、図27の二値画像1102における白地の領域(第1の上肢領域1102A及び第2の上肢領域1102B)のそれぞれから、手中心の位置を検出する。 Of the four regions 1102A, 1102B, 1102D, and 1102E separated from the background, the upper limb regions 1102A and 1102B and the body regions 1102D and the head region 1102E have the depth calculated when the binary image 1102 is generated. The magnitude of the difference in values is different. The upper limbs 710 and 720 of the worker 7 corresponding to the upper limb areas 1102A and 1102B are located closer to the workbench 8A than the torso portion 760 corresponding to the body area 1102D and the head 750 corresponding to the head area 1102E. Therefore, the difference in depth value between the pixels in the upper limb region 1102A and 1102B is smaller than the difference in depth value between the pixels in the body region 1102D and the head region 1102E. Therefore, the upper limb region detection unit 121 is a small region among the four regions 1102A, 1102B, 1102D, and 1102E separated from the background, in which the difference in depth value is between the first threshold value and the second threshold value. 1102A and 1102B are detected as the upper limb region. In this case, in the binary image 1102, the upper limb region detection unit 121 considers the regions 1102D and 1102E in which the difference between the depth values is larger than the second threshold value as the background, as shown in FIG. 27. Therefore, when the position detection unit 122 in the image detects the position of the center of the hand in the depth image 1101, the white background region (first upper limb region 1102A and second upper limb region) in the binary image 1102 of FIG. 27 The position of the center of the hand is detected from each of 1102B).

図28は、手中心の位置の検出結果の例を示す図である。
図28の深度画像1101には、図27の二値画像1102に基づいて検出した第1の上肢領域1101A及び第2の上肢領域1101Bと、各上肢領域1101A及び1101Bから検出した手中心を示す点P0の位置を示している。
FIG. 28 is a diagram showing an example of the detection result of the position of the center of the hand.
The depth image 1101 of FIG. 28 shows the first upper limb region 1101A and the second upper limb region 1101B detected based on the binary image 1102 of FIG. 27, and the hand center detected from the respective upper limb regions 1101A and 1101B. The position of P0 is shown.

画像内位置検出部122は、第1の実施形態で説明したように、上肢領域を線分化して上肢の延伸方向を示す線分群に変換し、線分群の線分上で手中心の位置を検出する。このため、画像内位置検出部122は、図28の深度画像1101のように、第1の上肢領域1101A内の手中心を示す点P0の位置として該領域内の位置Q10を検出し、第2の上肢領域1102B内の手中心を示す点P0の位置として該領域内の位置Q20を検出する。 As described in the first embodiment, the position detection unit 122 in the image linearly differentiates the upper limb region and converts it into a line segment group indicating the extension direction of the upper limb, and determines the position of the center of the hand on the line segment of the line segment group. To detect. Therefore, the in-image position detection unit 122 detects the position Q10 in the first upper limb region 1101A as the position of the point P0 indicating the hand center in the first upper limb region 1101A, as shown in the depth image 1101 of FIG. The position Q20 in the upper limb region 1102B is detected as the position of the point P0 indicating the center of the hand.

画像内位置検出部122が手中心を示す点P0の位置を検出した後、本実施形態の手位置検出装置1では、三次元座標算出部123が手中心及び上肢の関節の三次元座標を算出する処理(ステップS15)を行う。 After the position detection unit 122 in the image detects the position of the point P0 indicating the center of the hand, in the hand position detection device 1 of the present embodiment, the three-dimensional coordinate calculation unit 123 calculates the three-dimensional coordinates of the center of the hand and the joints of the upper limbs. Processing (step S15) is performed.

図29は、左上肢の関節の位置の決定方法を説明する図である。図30は、決定した手中心及び関節の位置を示す図である。 FIG. 29 is a diagram illustrating a method of determining the position of the joint of the left upper limb. FIG. 30 is a diagram showing the determined positions of the center of the hand and the joint.

三次元座標算出部123は、深度画像1101(二値画像1102)から検出した上肢領域毎に、関節の位置を決定する。図29の(a)の深度画像1101には、処理の対象が第1の上肢領域1101Aである場合の手首を示す点P1の位置Q11の例を示している。図29の(a)の深度画像1101を撮像した時点では、作業員7の左上肢710における手首から肩までの部分のうちの大部分が胴体部分760に隠れている。このため、深度画像1101における第1の上肢領域1101Aは上肢の延伸方向となり得る方向の寸法が短く、三次元座標算出部123は、上肢領域を線分化した線分群から手首の位置を検出することができない。この場合、三次元座標算出部123は、第1の上肢領域1101Aから検出した手中心を示す点P0の位置Q10と、手中心から手首までの寸法の平均値(例えば60mm)とに基づいて、手首を示す点P1の位置を決定する。このとき、三次元座標算出部123は、例えば、深度画像1101内における手中心の位置Q10と、肩の推定位置QS1とを通る線分LS1上であって、手中心の位置Q10からの距離がL1’となる位置Q11を、手首を示す点P1の位置とする。ここで、手中心の位置Q10と手首の位置Q11との距離L1’は、三次元距離が手中心から手首までの寸法と略一致する距離とする。すなわち、深度画像1101における上肢領域を線分化した線分群から手首の位置を検出することができない場合、三次元座標算出部123は、手首を示す点P1の三次元座標を算出した後、深度画像1101内における点P1の位置を決定する処理を行う。 The three-dimensional coordinate calculation unit 123 determines the position of the joint for each upper limb region detected from the depth image 1101 (binary image 1102). The depth image 1101 of FIG. 29A shows an example of the position Q11 of the point P1 indicating the wrist when the processing target is the first upper limb region 1101A. At the time of imaging the depth image 1101 of FIG. 29 (a), most of the wrist-to-shoulder portion of the upper left limb 710 of the worker 7 is hidden by the body portion 760. Therefore, the first upper limb region 1101A in the depth image 1101 has a short dimension in the direction in which the upper limb can be extended, and the three-dimensional coordinate calculation unit 123 detects the position of the wrist from the line segment group obtained by line-differentiating the upper limb region. I can't. In this case, the three-dimensional coordinate calculation unit 123 is based on the position Q10 of the point P0 indicating the center of the hand detected from the first upper limb region 1101A and the average value (for example, 60 mm) of the dimensions from the center of the hand to the wrist. The position of the point P1 indicating the wrist is determined. At this time, the three-dimensional coordinate calculation unit 123 is, for example, on the line segment LS1 passing through the position Q10 of the hand center in the depth image 1101 and the estimated position QS1 of the shoulder, and the distance from the position Q10 of the hand center is The position Q11 at L1'is the position of the point P1 indicating the wrist. Here, the distance L1'between the position Q10 at the center of the hand and the position Q11 at the wrist is a distance at which the three-dimensional distance substantially coincides with the dimension from the center of the hand to the wrist. That is, when the position of the wrist cannot be detected from the line segment group obtained by line-differentiating the upper limb region in the depth image 1101, the three-dimensional coordinate calculation unit 123 calculates the three-dimensional coordinates of the point P1 indicating the wrist and then the depth image. A process of determining the position of the point P1 in 1101 is performed.

第1の上肢領域1101Aと対応する手首の位置を決定した後、三次元座標算出部123は、決定した手首の位置に基づいて、肘を示す点P2の位置を決定する。三次元座標算出部123は、手中心の位置に基づいて手首の位置を決定するときと同様の方法により、肘を示す点P2の位置を決定する。すなわち、三次元座標算出部123は、図29の(b)の深度画像1101のように、手首の位置Q11を通る線分LS1上であって、該位置Q11からの距離L2’が手首から肘までの寸法と対応する距離となる位置Q12を、肘を示す点P2の位置に決定する。ここで、手首の位置Q11と肘の位置Q12との距離L2’は、三次元距離が手首から肘までの寸法と略一致する距離とする。すなわち、深度画像1101における上肢領域を線分化した線分群から肘の位置を検出することができない場合、三次元座標算出部123は、肘を示す点P2の三次元座標を算出した後、深度画像1101内における点P2の位置を決定する処理を行う。 After determining the position of the wrist corresponding to the first upper limb region 1101A, the three-dimensional coordinate calculation unit 123 determines the position of the point P2 indicating the elbow based on the determined position of the wrist. The three-dimensional coordinate calculation unit 123 determines the position of the point P2 indicating the elbow by the same method as when determining the position of the wrist based on the position of the center of the hand. That is, the three-dimensional coordinate calculation unit 123 is on the line segment LS1 passing through the wrist position Q11 as in the depth image 1101 of FIG. 29 (b), and the distance L2'from the position Q11 is from the wrist to the elbow. The position Q12, which is the distance corresponding to the dimension up to, is determined at the position of the point P2 indicating the elbow. Here, the distance L2'between the wrist position Q11 and the elbow position Q12 is a distance whose three-dimensional distance substantially coincides with the dimension from the wrist to the elbow. That is, when the position of the elbow cannot be detected from the line segment group obtained by line-differentiating the upper limb region in the depth image 1101, the three-dimensional coordinate calculation unit 123 calculates the three-dimensional coordinates of the point P2 indicating the elbow and then the depth image. A process of determining the position of the point P2 in 1101 is performed.

第1の上肢領域1101Aと対応する手首の位置を決定した後、三次元座標算出部123は、決定した肘の位置と、肩の推定位置とに基づいて、左肩を示す点P3の位置を決定する。 After determining the position of the wrist corresponding to the first upper limb region 1101A, the three-dimensional coordinate calculation unit 123 determines the position of the point P3 indicating the left shoulder based on the determined elbow position and the estimated shoulder position. do.

第1の上肢領域1101Aと対応する左上肢の手首、肘、及び肩の位置を決定してそれぞれの三次元座標を算出した後、三次元座標算出部123は、第2の上肢領域1102Bと対応する右上肢の手首、肘、及び肩の位置を決定してそれぞれの三次元座標を算出する。三次元座標算出部123は、例えば、図30の深度画像1101における線分LS2上の位置Q21を第2の上肢領域1101Bと対応する手首を示す点P1の位置に決定して三次元座標を算出する。また、三次元座標算出部123は、例えば、図29の深度画像1101における線分LS2上の位置Q22を第2の上肢領域1101Bと対応する手首を示す点P1の位置に決定して三次元座標を算出する。 After determining the positions of the wrist, elbow, and shoulder of the upper left limb corresponding to the first upper limb region 1101A and calculating the three-dimensional coordinates of each, the three-dimensional coordinate calculation unit 123 corresponds to the second upper limb region 1102B. Determine the positions of the wrists, elbows, and shoulders of the right upper limb and calculate the three-dimensional coordinates of each. For example, the three-dimensional coordinate calculation unit 123 determines the position Q21 on the line segment LS2 in the depth image 1101 of FIG. 30 at the position of the point P1 indicating the wrist corresponding to the second upper limb region 1101B, and calculates the three-dimensional coordinates. do. Further, the three-dimensional coordinate calculation unit 123 determines, for example, the position Q22 on the line segment LS2 in the depth image 1101 of FIG. 29 to the position of the point P1 indicating the wrist corresponding to the second upper limb region 1101B, and the three-dimensional coordinates. Is calculated.

手中心及び関節の三次元座標を算出した後、手位置検出装置1は、座標補正処理(ステップS6)において整合性判別処理(ステップS603)を行い、手中心及び関節の三次元座標の補正の要否を判定する。本実施形態の手位置検出装置1は、整合性判別処理として、図23のフローチャートに沿った処理を行う。すなわち、手中心又は関節を示す点Piの三次元座標から算出した距離値ziと深度画像1101における深度値zi’との関係がzi’>zi+Mである場合、手位置検出装置1は、点Piと対応する手中心又は関節が空間的に整合していないと判定する。図30の深度画像1101における、第1の上肢領域1101Aと対応する手首を示す点P1及び肘を示す点P2は、それぞれ、第1の上肢領域1101Aの外側に存在する。ただし、点P1の位置Q11は体領域1101D内であり、点P2の位置Q12は体領域1101Dの外側である。すなわち、位置Q11の深度値z1は、深度センサ2から胴体部分までの距離を示す値であり、深度センサ2から上肢(手首)までの距離を示す値よりも小さい。これに対し、点P2の深度値は、深度センサ2から床までの距離を示す値であり、深度センサ2から上肢(手首)までの距離を示す値よりも大きい。このため、第1の上肢領域1101Aと対応する手中心及び関節を処理の対象とする整合性判別処理において、手位置検出装置1の整合性判別部131は、肘を示す点P2が空間的に整合していないと判別する。この場合、整合性判定部131は、手中心及び各関節の三次元座標を再計算する処理を再計算部132に行わせる。再計算部132は、第1の実施形態で説明したように、深度画像1101内で手中心を示す点P0の位置を変更し、変更後の点P0の位置に基づいて、手中心及び各関節の三次元座標を算出する(再計算する)。 After calculating the three-dimensional coordinates of the hand center and the joint, the hand position detection device 1 performs the consistency determination process (step S603) in the coordinate correction process (step S6) to correct the three-dimensional coordinates of the hand center and the joint. Judge the necessity. The hand position detection device 1 of the present embodiment performs a process according to the flowchart of FIG. 23 as a consistency determination process. That is, when the relationship between the distance value zi calculated from the three-dimensional coordinates of the point Pi indicating the center of the hand or the joint and the depth value zi'in the depth image 1101 is zi'> zi + M, the hand position detecting device 1 is the point Pi. It is determined that the center of the hand or the joint corresponding to the above is not spatially aligned. In the depth image 1101 of FIG. 30, the point P1 indicating the wrist and the point P2 indicating the elbow corresponding to the first upper limb region 1101A are located outside the first upper limb region 1101A, respectively. However, the position Q11 of the point P1 is inside the body region 1101D, and the position Q12 of the point P2 is outside the body region 1101D. That is, the depth value z1 at the position Q11 is a value indicating the distance from the depth sensor 2 to the body portion, and is smaller than the value indicating the distance from the depth sensor 2 to the upper limbs (wrist). On the other hand, the depth value of the point P2 is a value indicating the distance from the depth sensor 2 to the floor, and is larger than the value indicating the distance from the depth sensor 2 to the upper limb (wrist). Therefore, in the consistency determination process for the center of the hand and the joint corresponding to the first upper limb region 1101A, the consistency determination unit 131 of the hand position detection device 1 spatially has a point P2 indicating the elbow. Determine that they are not consistent. In this case, the consistency determination unit 131 causes the recalculation unit 132 to perform a process of recalculating the three-dimensional coordinates of the hand center and each joint. As described in the first embodiment, the recalculation unit 132 changes the position of the point P0 indicating the hand center in the depth image 1101, and based on the changed position of the point P0, the hand center and each joint. Calculate (recalculate) the three-dimensional coordinates of.

図31は、手中心及び関節の位置の補正方法を説明する図である。
図31の深度画像1101には、第1の上肢領域1101Aと対応する手中心及び肘の位置の補正例を示している。
FIG. 31 is a diagram illustrating a method of correcting the positions of the center of the hand and the joint.
The depth image 1101 of FIG. 31 shows an example of correcting the positions of the center of the hand and the elbow corresponding to the first upper limb region 1101A.

第1の上肢領域1101Aと対応する手首を示す点P1及び肘を示す点P2が空間的に整合していない場合、再計算部132は、まず、深度画像1101内での手中心を示す点P0の位置を変更する。このとき、再計算部132は、例えば、図30のように、手首の位置Q11を始点とし、変更前の手中心の位置Q10を終点とするベクトルの方向であって、手中心の位置Q10から所定の距離となる位置Q10’に、手中心を示す点P0の位置を変更する。言い換えると、再計算部132は、変更前の手中心の位置Q10と手首の位置Q11とを通る線分LS1上であって、手首の位置Q11から離間する(遠ざかる)方向に手中心の位置を変更する。 When the point P1 indicating the wrist and the point P2 indicating the elbow corresponding to the first upper limb region 1101A are not spatially aligned, the recalculation unit 132 first indicates the point P0 indicating the center of the hand in the depth image 1101. Change the position of. At this time, the recalculation unit 132 is in the direction of the vector starting from the wrist position Q11 and ending at the hand center position Q10 before the change, as shown in FIG. 30, from the hand center position Q10. The position of the point P0 indicating the center of the hand is changed to the position Q10'which is a predetermined distance. In other words, the recalculation unit 132 sets the position of the center of the hand on the line segment LS1 passing through the position Q10 of the center of the hand before the change and the position Q11 of the wrist in the direction away from (away from) the position Q11 of the wrist. change.

手中心を示す点P0の位置を位置Q10’に変更した後、再計算部132は、深度画像1101における変更後の位置Q10’(座標)に基づいて、手中心を示す点P0の三次元座標を算出する。この際、再計算部132は、第1の実施形態で説明したように、変更後の位置Q10’が第1の上肢領域1101A内であるか否かに応じて、三次元座標の算出に用いる深度値を切り替える。変更後の位置Q10’が第1の上肢領域1101A内である場合、再計算部132は、位置Q10’の深度値を利用して三次元座標を算出する。一方、変更後の位置Q10’が第1の上肢領域1101A外である場合、再計算部132は、例えば、第1の上肢領域1101A内における線分LS1上での深度値の分布に基づいて、三次元座標の算出に用いる深度値を算出する(推定する)。 After changing the position of the point P0 indicating the center of the hand to the position Q10', the recalculation unit 132 uses the three-dimensional coordinates of the point P0 indicating the center of the hand based on the changed position Q10'(coordinates) in the depth image 1101. Is calculated. At this time, as described in the first embodiment, the recalculation unit 132 is used to calculate the three-dimensional coordinates depending on whether or not the changed position Q10'is within the first upper limb region 1101A. Switch the depth value. When the changed position Q10'is in the first upper limb region 1101A, the recalculation unit 132 calculates the three-dimensional coordinates using the depth value of the position Q10'. On the other hand, when the changed position Q10'is outside the first upper limb region 1101A, the recalculation unit 132 may, for example, based on the distribution of the depth value on the line segment LS1 in the first upper limb region 1101A. Calculate (estimate) the depth value used to calculate the three-dimensional coordinates.

その後、図示は省略するが、再計算部132は、変更後の手中心の位置Q10’に基づいて、手首を示す点P1の位置を変更し、変更後の点P1の三次元座標を算出する。その後更に、再計算部132は、図31のように、肘を示す点P2の位置を、位置Q12から位置Q12’に変更し、変更後の点P2の三次元座標を算出する。ここで、図31のように、肘を示す点P2の変更後の位置Q12が胴体部分と対応する体領域1101Dに含まれるとすると、深度画像1101における位置Q12’の深度値は、深度センサ2から上肢(肘)までの距離を示す値よりも小さくなる。このため、再計算部132が三次元座標を算出した後で整合性判定部131が行う整合性判別処理では、肘を示す点P2の三次元座標から算出した距離z2と、深度画像1101の位置Q12’の深度値z2’との関係がz2’≦z2+Mとなる。よって、整合性判定部131は、肘を示す点P2の三次元座標が空間的に整合すると判定する。従って、肘を示す点P2の移動速度S2と閾値THSとの関係がS2≦THSとなれば、肘を示す点P2の整合性パラメータC2は「True」のままとなる。この場合、整合性判定部131は、肘を示す点P2は空間的及び時間的に整合すると判別する。 After that, although not shown, the recalculation unit 132 changes the position of the point P1 indicating the wrist based on the changed position Q10'of the hand center, and calculates the three-dimensional coordinates of the changed point P1. .. After that, the recalculation unit 132 further changes the position of the point P2 indicating the elbow from the position Q12 to the position Q12'as shown in FIG. 31, and calculates the three-dimensional coordinates of the changed point P2. Here, assuming that the changed position Q12 of the point P2 indicating the elbow is included in the body region 1101D corresponding to the body portion as shown in FIG. 31, the depth value of the position Q12'in the depth image 1101 is the depth sensor 2. It is smaller than the value indicating the distance from the upper limb (elbow). Therefore, in the consistency determination process performed by the consistency determination unit 131 after the recalculation unit 132 calculates the three-dimensional coordinates, the distance z2 calculated from the three-dimensional coordinates of the point P2 indicating the elbow and the position of the depth image 1101. The relationship of Q12'with the depth value z2'is z2'≤z2 + M. Therefore, the consistency determination unit 131 determines that the three-dimensional coordinates of the point P2 indicating the elbow are spatially matched. Therefore, if the relationship between the moving speed S2 of the point P2 indicating the elbow and the threshold value THS is S2 ≦ THS, the consistency parameter C2 of the point P2 indicating the elbow remains “True”. In this case, the consistency determination unit 131 determines that the point P2 indicating the elbow is spatially and temporally aligned.

また、図31の深度画像1101では、第2の上肢領域1101Bと対応する手首を示す点P1の位置Q21が第2の上肢領域1101B内であり、肘を示す点P2の位置Q22が体領域1101D内である。この場合、整合性判定部131は、第2の上肢領域1101Bと対応する手中心及び関節を処理の対象とした整合性判別処理において、点P1及び点P2の三次元座標が空間的に整合していると判定する。このため、点P1及び点P2の三次元座標が時間的にも整合している場合には、整合性判定部131は、第2の上肢領域1101Bと対応する手中心及び各関節の三次元座標を、座標履歴193に格納する三次元座標に決定する。 Further, in the depth image 1101 of FIG. 31, the position Q21 of the point P1 indicating the wrist corresponding to the second upper limb region 1101B is within the second upper limb region 1101B, and the position Q22 of the point P2 indicating the elbow is the body region 1101D. Inside. In this case, the consistency determination unit 131 spatially matches the three-dimensional coordinates of the points P1 and P2 in the consistency determination process targeting the center of the hand and the joint corresponding to the second upper limb region 1101B. It is determined that it is. Therefore, when the three-dimensional coordinates of the points P1 and the points P2 are consistent in time, the consistency determination unit 131 uses the three-dimensional coordinates of the center of the hand and each joint corresponding to the second upper limb region 1101B. Is determined to be the three-dimensional coordinates stored in the coordinate history 193.

このように、本実施形態の手位置検出装置1では、深度画像における上肢領域内から手中心を示す点の位置を検出した後、検出した該手中心の位置に基づいて、手中心及び上肢の関節の三次元座標を算出する。このとき、手位置検出装置1は、深度画像における関節の位置が上肢領域外となることを許容し、手中心及び各関節の三次元空間での位置関係が上肢の寸法と略一致するように各関節の三次元座標の位置(三次元座標)を決定する。その後、手位置検出装置1は、手中心及び各関節の三次元座標から算出される距離と深度画像における深度値とに基づいて三次元座標の空間的な整合性について判別し、空間的に整合していない場合には手中心及び各関節の三次元座標を補正する。本実施形態の手位置検出装置1では、深度画像における深度値が関節の三次元座標から算出した距離よりも大きい場合には、該関節の三次元座標が空間的に整合していないと判別して三次元座標を補正する。よって、本実施形態の手位置検出装置1では、上肢の関節が胴体部分や頭部により隠れている深度画像から、上肢の関節の三次元座標を正しく算出することが可能となる。 As described above, in the hand position detecting device 1 of the present embodiment, after detecting the position of the point indicating the hand center from within the upper limb region in the depth image, the hand center and the upper limb are located based on the detected position of the hand center. Calculate the three-dimensional coordinates of the joint. At this time, the hand position detecting device 1 allows the position of the joint in the depth image to be outside the upper limb region, so that the positional relationship between the center of the hand and each joint in the three-dimensional space substantially matches the dimension of the upper limb. Determine the position of the 3D coordinates of each joint (3D coordinates). After that, the hand position detecting device 1 determines the spatial consistency of the three-dimensional coordinates based on the distance calculated from the three-dimensional coordinates of the center of the hand and each joint and the depth value in the depth image, and spatially matches them. If not, correct the 3D coordinates of the center of the hand and each joint. In the hand position detection device 1 of the present embodiment, when the depth value in the depth image is larger than the distance calculated from the three-dimensional coordinates of the joint, it is determined that the three-dimensional coordinates of the joint are not spatially matched. Correct the 3D coordinates. Therefore, in the hand position detecting device 1 of the present embodiment, it is possible to correctly calculate the three-dimensional coordinates of the joints of the upper limbs from the depth image in which the joints of the upper limbs are hidden by the body portion and the head.

なお、図3のフローチャートは、本実施形態の手位置検出装置1が行う座標算出処理の一例に過ぎない。本実施形態の手位置検出装置1が行う座標算出処理は、本実施形態の要旨を逸脱しない範囲において適宜変更可能である。例えば、座標算出処理は、深度画像から体領域を検出する処理(ステップS12)と深度画像から上肢領域を検出する処理(ステップS2)との処理の順序が逆であってもよいし、該2つの処理が並列に行われるものであってもよい。 The flowchart of FIG. 3 is only an example of the coordinate calculation process performed by the hand position detection device 1 of the present embodiment. The coordinate calculation process performed by the hand position detection device 1 of the present embodiment can be appropriately changed as long as it does not deviate from the gist of the present embodiment. For example, in the coordinate calculation process, the order of the process of detecting the body region from the depth image (step S12) and the process of detecting the upper limb region from the depth image (step S2) may be reversed, or the second. The two processes may be performed in parallel.

また、図20のフローチャートは、深度画像から体領域を検出する処理の一例に過ぎない。同様に、図21のフローチャートは、深度画像から上肢領域を検出する処理の一例に過ぎない。深度画像から体領域を検出する処理、及び上肢領域を検出する処理は、それぞれ、本実施形態の要旨を逸脱しない範囲において適宜変更可能である。また、例えば、深度画像から体領域を検出する処理と上肢領域を検出する処理とは、1つの処理としてもよい。すなわち、手位置検出装置1は、図27の二値画像1102を生成する際に検出される体領域1102Dのように、上肢領域1102A及び1102Bよりも深度値の差が大きく、かつ体領域検出エリアに含まれる領域を体領域として検出してもよい。 Further, the flowchart of FIG. 20 is only an example of a process of detecting a body region from a depth image. Similarly, the flowchart of FIG. 21 is only an example of the process of detecting the upper limb region from the depth image. The process of detecting the body region from the depth image and the process of detecting the upper limb region can be appropriately changed within a range that does not deviate from the gist of the present embodiment. Further, for example, the process of detecting the body region from the depth image and the process of detecting the upper limb region may be one process. That is, the hand position detection device 1 has a larger difference in depth value than the upper limb regions 1102A and 1102B, and the body region detection area, like the body region 1102D detected when the binary image 1102 of FIG. 27 is generated. The region included in may be detected as a body region.

また、図22のフローチャートは、手中心及び関節の三次元座標を算出する処理の一例に過ぎない。本実施形態の手位置検出装置1が行う手中心の位置を検出する処理(ステップS14)と手中心及び関節の三次元座標を算出する処理(ステップS15)とは、本実施形態の要旨を逸脱しない範囲において適宜変更可能である。また、手中心及び関節の三次元座標を算出する処理では、上肢の寸法の平均値(例えば手中心から手首までの寸法の平均値)に限らず、寸法情報192に登録された対象者の寸法を用いて三次元位置を算出してもよい。 Further, the flowchart of FIG. 22 is only an example of the process of calculating the three-dimensional coordinates of the center of the hand and the joint. The process of detecting the position of the center of the hand performed by the hand position detection device 1 of the present embodiment (step S14) and the process of calculating the three-dimensional coordinates of the center of the hand and the joint (step S15) deviate from the gist of the present embodiment. It can be changed as appropriate to the extent that it does not. Further, in the process of calculating the three-dimensional coordinates of the center of the hand and the joint, the dimension of the subject registered in the dimension information 192 is not limited to the average value of the dimensions of the upper limbs (for example, the average value of the dimensions from the center of the wrist to the wrist). May be used to calculate the three-dimensional position.

更に、図22のフローチャートは、整合性判別処理の一例に過ぎない。本実施形態の手位置検出装置1が行う整合性判別処理は、例えば、図5のフローチャートに沿った処理であってもよいし、図17A及び図17Bのフローチャートに沿った処理であってもよい。 Further, the flowchart of FIG. 22 is only an example of the consistency determination process. The consistency determination process performed by the hand position detection device 1 of the present embodiment may be, for example, a process according to the flowchart of FIG. 5 or a process according to the flowcharts of FIGS. 17A and 17B. ..

上記の手位置検出装置1は、コンピュータと、該コンピュータに実行させるプログラムとにより実現可能である。以下、図32を参照して、コンピュータとプログラムとにより実現される距離計測装置1について説明する。 The above-mentioned hand position detection device 1 can be realized by a computer and a program executed by the computer. Hereinafter, the distance measuring device 1 realized by the computer and the program will be described with reference to FIG. 32.

図32は、コンピュータのハードウェア構成を示す図である。
図32に示すように、コンピュータ20は、プロセッサ2001と、主記憶装置2002と、補助記憶装置2003と、入力装置2004と、出力装置2005と、入出力インタフェース2006と、通信制御装置2007と、媒体駆動装置2008と、を備える。コンピュータ20におけるこれらの要素2001〜2008は、バス2010により相互に接続されており、要素間でのデータの受け渡しが可能になっている。
FIG. 32 is a diagram showing a hardware configuration of a computer.
As shown in FIG. 32, the computer 20 includes a processor 2001, a main storage device 2002, an auxiliary storage device 2003, an input device 2004, an output device 2005, an input / output interface 2006, a communication control device 2007, and a medium. The drive device 2008 is provided. These elements 2001-2008 in the computer 20 are connected to each other by a bus 2010, and data can be exchanged between the elements.

プロセッサ2001は、Central Processing Unit(CPU)やMicro Processing Unit(MPU)等である。プロセッサ2001は、オペレーティングシステムを含む各種のプログラムを実行することにより、コンピュータ20の全体の動作を制御する。また、プロセッサ2001は、例えば、図3〜図6のフローチャートにおける各処理を含む手位置検出プログラムを実行することにより、深度画像を撮像した三次元空間における手中心及び上肢の関節の三次元座標を算出する。なお、手位置検出プログラムは、例えば、図19〜図23のフローチャートにおける各処理を含むプログラムであってもよい。また、手位置検出プログラムにおける座標補正処理(ステップS6)は、図4のフローチャートに沿った処理に限らず、例えば、図14A及び図14Bのフローチャートに沿った処理であってもよい。また、手位置検出プログラムにおける整合性判別処理(ステップS603)は、例えば、図17A及び図17Bのフローチャートに沿った処理であってもよい。 The processor 2001 is a Central Processing Unit (CPU), a Micro Processing Unit (MPU), or the like. Processor 2001 controls the overall operation of the computer 20 by executing various programs including the operating system. Further, the processor 2001 obtains the three-dimensional coordinates of the center of the hand and the joints of the upper limbs in the three-dimensional space in which the depth image is captured by executing the hand position detection program including each process in the flowcharts of FIGS. 3 to 6, for example. calculate. The hand position detection program may be, for example, a program including each process in the flowcharts of FIGS. 19 to 23. Further, the coordinate correction process (step S6) in the hand position detection program is not limited to the process according to the flowchart of FIG. 4, and may be, for example, the process according to the flowcharts of FIGS. 14A and 14B. Further, the consistency determination process (step S603) in the hand position detection program may be, for example, a process according to the flowcharts of FIGS. 17A and 17B.

主記憶装置2002は、図示しないRead Only Memory(ROM)及びRandom Access Memory(RAM)を含む。主記憶装置2002のROMには、例えば、コンピュータ20の起動時にプロセッサ2001が読み出す所定の基本制御プログラム等が予め記録されている。また、主記憶装置2002のRAMは、プロセッサ2001が、各種のプログラムを実行する際に必要に応じて作業用記憶領域として使用する。主記憶装置2002のRAMは、例えば、背景画像191、寸法情報192、座標履歴193、及び深度画像194等の記憶に利用可能である。 The main storage device 2002 includes a Read Only Memory (ROM) and a Random Access Memory (RAM) (not shown). In the ROM of the main storage device 2002, for example, a predetermined basic control program read by the processor 2001 when the computer 20 is started is recorded in advance. Further, the RAM of the main storage device 2002 is used as a working storage area by the processor 2001 as necessary when executing various programs. The RAM of the main storage device 2002 can be used for storing, for example, the background image 191 and the dimensional information 192, the coordinate history 193, the depth image 194, and the like.

補助記憶装置2003は、例えば、Hard Disk Drive(HDD)や、フラッシュメモリ等の不揮発性メモリ(Solid State Drive(SSD)を含む)等、主記憶装置2002のRAMと比べて容量の大きい記憶装置である。補助記憶装置2003は、プロセッサ2001によって実行される各種のプログラムや各種のデータ等の記憶に利用可能である。補助記憶装置2003は、例えば、上記の手位置検出プログラムの記憶に利用可能である。また、補助記憶装置2003は、例えば、背景画像191、寸法情報192、座標履歴193、及び深度画像194等の記憶に利用可能である。 The auxiliary storage device 2003 is a storage device having a larger capacity than the RAM of the main storage device 2002, such as a Hard Disk Drive (HDD) or a non-volatile memory (including a Solid State Drive (SSD)) such as a flash memory. be. The auxiliary storage device 2003 can be used to store various programs, various data, and the like executed by the processor 2001. The auxiliary storage device 2003 can be used, for example, for storing the above-mentioned hand position detection program. Further, the auxiliary storage device 2003 can be used for storing, for example, the background image 191 and the dimensional information 192, the coordinate history 193, the depth image 194, and the like.

入力装置2004は、例えば、キーボード装置、マウス装置、及びタッチパネル装置等である。入力装置2004は、例えば、寸法情報192の入力、及び背景画像191の設定に利用可能である。また、入力装置2004は、深度センサ2等の距離計測装置を含んでもよい。 The input device 2004 is, for example, a keyboard device, a mouse device, a touch panel device, and the like. The input device 2004 can be used, for example, for inputting the dimension information 192 and setting the background image 191. Further, the input device 2004 may include a distance measuring device such as a depth sensor 2.

出力装置2005は、例えば、液晶表示装置等の表示装置、及びプリンタ等である。出力装置2005は、例えば、座標履歴193の表示や印刷に利用可能である。 The output device 2005 is, for example, a display device such as a liquid crystal display device, a printer, or the like. The output device 2005 can be used, for example, for displaying or printing the coordinate history 193.

入出力インタフェース2006は、コンピュータ20と、他の電子機器とを接続する。入出力インタフェース2006は、例えば、Universal Serial Bus(USB)規格のコネクタ等を備える。入出力インタフェース2006は、例えば、コンピュータ20と、深度センサ2等の距離計測装置との接続に利用可能である。 The input / output interface 2006 connects the computer 20 to other electronic devices. The input / output interface 2006 includes, for example, a Universal Serial Bus (USB) standard connector or the like. The input / output interface 2006 can be used, for example, to connect the computer 20 to a distance measuring device such as a depth sensor 2.

通信制御装置2007は、コンピュータ20をインターネット等のネットワークに接続し、ネットワークを介したコンピュータ20と他の電子機器との各種通信を制御する装置である。通信制御装置2007は、例えば、ネットワーク4を介した、手位置検出装置1として動作させるコンピュータ20と深度センサ2との通信に利用可能である(図7及び図24を参照)。また、通信制御装置2007は、例えば、ネットワーク4を介した、手位置検出装置1として動作させるコンピュータ20と外部装置3との通信に利用可能である。 The communication control device 2007 is a device that connects the computer 20 to a network such as the Internet and controls various communications between the computer 20 and other electronic devices via the network. The communication control device 2007 can be used, for example, for communication between the computer 20 operated as the hand position detection device 1 and the depth sensor 2 via the network 4 (see FIGS. 7 and 24). Further, the communication control device 2007 can be used for communication between the computer 20 operated as the hand position detection device 1 and the external device 3 via the network 4, for example.

媒体駆動装置2008は、可搬型記録媒体21に記録されているプログラムやデータの読み出し、補助記憶装置2003に記憶されたデータ等の可搬型記録媒体21への書き込みを行う。媒体駆動装置2008には、例えば、1種類以上の規格に対応したメモリカード用リーダ/ライタが利用可能である。媒体駆動装置2008としてメモリカード用リーダ/ライタを用いる場合、可搬型記録媒体21としては、メモリカード用リーダ/ライタが対応している規格、例えば、Secure Digital(SD)規格のメモリカード(フラッシュメモリ)等を利用可能である。また、可搬型記録媒体21としては、例えば、USB規格のコネクタを備えたフラッシュメモリが利用可能である。更に、コンピュータ20が媒体駆動装置2008として利用可能な光ディスクドライブを搭載している場合、当該光ディスクドライブで認識可能な各種の光ディスクを可搬型記録媒体21として利用可能である。可搬型記録媒体21として利用可能な光ディスクには、例えば、Compact Disc(CD)、Digital Versatile Disc(DVD)、Blu-ray Disc(登録商標)等がある。可搬型記録媒体21は、例えば、上記の手位置検出プログラムの記憶に利用可能である。また、可搬型記録媒体21は、例えば、背景画像191、寸法情報192、座標履歴193、深度画像194等の記憶に利用可能である。 The medium drive device 2008 reads out the programs and data recorded in the portable recording medium 21, and writes the data stored in the auxiliary storage device 2003 to the portable recording medium 21. As the medium drive device 2008, for example, a reader / writer for a memory card corresponding to one or more types of standards can be used. When a memory card reader / writer is used as the medium drive device 2008, the portable recording medium 21 is a memory card (flash memory) of a standard supported by the memory card reader / writer, for example, a Secure Digital (SD) standard. ) Etc. can be used. Further, as the portable recording medium 21, for example, a flash memory provided with a USB standard connector can be used. Further, when the computer 20 is equipped with an optical disk drive that can be used as the medium drive device 2008, various optical disks that can be recognized by the optical disk drive can be used as the portable recording medium 21. Optical discs that can be used as the portable recording medium 21 include, for example, Compact Disc (CD), Digital Versatile Disc (DVD), Blu-ray Disc (registered trademark), and the like. The portable recording medium 21 can be used, for example, for storing the above-mentioned hand position detection program. Further, the portable recording medium 21 can be used for storing, for example, a background image 191 and dimensional information 192, a coordinate history 193, and a depth image 194.

コンピュータ20に手中心及び関節の三次元座標を算出する処理の開始命令が入力されると、プロセッサ2001は、補助記憶装置2003等の非一時的な記録媒体に記憶させた手位置検出プログラムを読み出して実行する。手位置検出プログラムを実行している間、プロセッサ2001は、手位置検出装置1における深度画像取得部110、関節位置算出部120、補正部130、及び出力部140として機能する(動作する)。なお、手位置検出装置1における出力部140の機能の一部は、コンピュータ20の入出力インタフェース2006、通信制御装置2007、及び媒体駆動装置2008が担う。また、手位置検出プログラムを実行している間、主記憶装置2002のRAM及び補助記憶装置2003等の記憶装置は、手位置検出装置1の記憶部190として機能する。 When a start command for processing to calculate the three-dimensional coordinates of the center of the hand and the joint is input to the computer 20, the processor 2001 reads out a hand position detection program stored in a non-temporary recording medium such as an auxiliary storage device 2003. And execute. While executing the hand position detection program, the processor 2001 functions (operates) as a depth image acquisition unit 110, a joint position calculation unit 120, a correction unit 130, and an output unit 140 in the hand position detection device 1. A part of the functions of the output unit 140 in the hand position detection device 1 is carried out by the input / output interface 2006 of the computer 20, the communication control device 2007, and the medium drive device 2008. Further, while the hand position detection program is being executed, the RAM of the main storage device 2002 and the storage devices such as the auxiliary storage device 2003 function as the storage unit 190 of the hand position detection device 1.

なお、手位置検出装置1として動作させるコンピュータ20は、図32に示した全ての要素2001〜2008を含む必要はなく、用途や条件に応じて一部の要素を省略することも可能である。例えば、コンピュータ20は、媒体駆動装置2008が省略されたものであってもよい。 The computer 20 operated as the hand position detection device 1 does not need to include all the elements 2001 to 2008 shown in FIG. 32, and some elements may be omitted depending on the application and conditions. For example, the computer 20 may be the one in which the medium driving device 2008 is omitted.

以上記載した各実施形態に関し、更に以下の付記を開示する。
(付記1)
コンピュータが、
所定の計測範囲内に存在する物体までの距離の情報を含む画像から、対象者の上肢部分と対応する上肢領域を検出し、
前記画像における前記上肢領域の形状及び位置に基づいて、該画像内での手中心及び上肢の関節の位置を検出するとともに、検出した前記手中心及び前記関節のそれぞれの前記計測範囲内での三次元座標を算出し、
算出した前記手中心の三次元座標及び前記関節の三次元座標のそれぞれが、予め定められた前記対象者の上肢における手中心及び各関節の位置関係と整合しているか否かを判定し、
算出した前記三次元座標と予め定められた前記手中心及び各関節の位置関係とが整合していない場合には、前記深度画像内での前記手中心の位置を変更して前記手中心の三次元座標及び前記関節の三次元座標を補正し、
算出した前記三次元座標と予め定められた前記手中心及び各関節の位置関係とが整合している場合には、現在の前記手中心の三次元座標及び前記関節の三次元座標を前記計測範囲内での三次元座標に決定する、
処理を実行することを特徴とする手位置検出方法。
(付記2)
前記画像内での手中心及び上肢の関節の位置を検出するとともに、検出した前記手中心及び前記関節のそれぞれの前記計測範囲内での三次元座標を算出する処理では、前記コンピュータは、
前記手中心の位置を検出した後、
検出した前記手中心の位置に基づいて、前記上肢の関節のうちの前記手中心に近い関節から順に該関節の位置を検出する、
ことを特徴とする付記1に記載の手位置検出方法。
(付記3)
前記手中心の位置に基づいて前記上肢の関節の位置を検出する処理では、前記コンピュータは、前記上肢の関節の位置が前記上肢領域外となることを許容する、
ことを特徴とする付記2に記載の手位置検出方法。
(付記4)
前記コンピュータは、前記手中心の三次元座標及び前記関節の三次元座標を補正する処理を行った後、補正後の前記三次元座標と予め定められた前記手中心及び各関節の位置関係とが整合しているか否かを判定する、
ことを特徴とする付記1に記載の手位置検出方法。
(付記5)
前記コンピュータは、前記手中心の三次元座標及び前記関節の三次元座標の補正回数が閾値以上となった場合には、補正後の前記三次元座標と予め定められた前記手中心及び各関節の位置関係とが整合しているかによらず、現在の前記手中心の三次元座標及び前記関節の三次元座標を前記計測範囲内での三次元座標に決定する、
ことを特徴とする付記4に記載の手位置検出方法。
(付記6)
前記手中心の三次元座標及び前記関節の三次元座標を補正する処理では、前記コンピュータは、
変更後の前記手中心の位置が前記上肢領域の外側となる場合には、前記上肢領域の外側であって、変更後の前記手中心の位置を含む隣接領域の距離の情報を読み出し、
前記隣接領域の距離が前記上肢領域の距離よりも短い場合には、変更後の前記手中心の位置に基づいて前記手中心の三次元座標及び前記関節の三次元座標を補正する、
ことを特徴とする付記1に記載の手位置検出方法。
(付記7)
前記手中心の三次元座標及び前記関節の三次元座標を補正する処理では、前記コンピュータは、
変更後の前記手中心の位置が前記上肢領域の外側であり、かつ変更後の前記手中心の位置を含む隣接領域の距離が前記上肢領域の距離よりも短い場合には、前記上肢領域の距離の情報に基づいて変更後の前記手中心の位置における該手中心と対応する距離を算出し、算出した前記距離に基づいて前記手中心の三次元座標を算出する、
ことを特徴とする付記1に記載の手位置検出方法。
(付記8)
前記手中心の三次元座標及び前記関節の三次元座標を補正する処理では、前記コンピュータは、
前記隣接領域の距離と前記上肢領域の距離との差が閾値以上である場合に、前記隣接領域の距離が前記上肢領域の距離よりも短いと判定する、
ことを特徴とする付記6及び7のいずれかに記載の手位置検出方法。
(付記9)
算出した前記三次元座標と予め定められた前記手中心及び各関節の位置関係とが整合しているか否かを判定する処理では、前記コンピュータは、
前記手中心及び前記関節毎に、前記三次元座標に基づいて前記画像内での前記手中心又は前記関節の位置と、距離とを算出し、
算出した前記距離が、前記画像における前記手中心又は前記関節の位置の距離よりも短い場合に、前記三次元座標と予め定められた前記手中心及び各関節の位置関係とが整合していないと判定する、
ことを特徴とする付記1に記載の手位置検出方法。
(付記10)
算出した前記三次元座標と予め定められた前記手中心及び各関節の位置関係とが整合しているか否かを判定する処理では、前記コンピュータは、
1つの前記上肢領域から検出された手中心及び関節の組毎に、隣接する手中心と関節との三次元距離、及び隣接する関節同士の三次元距離を算出し、
算出した三次元距離と、予め定められた前記手中心及び各関節の位置関係に基づいて特定される寸法との差が閾値以上である場合に、前記三次元座標と予め定められた前記手中心及び各関節の位置関係とが整合していないと判定する、
ことを特徴とする付記1に記載の手位置検出方法。
(付記11)
算出した前記三次元座標と予め定められた前記手中心及び各関節の位置関係とが整合しているか否かを判定する処理では、前記コンピュータは、
算出した前記三次元座標と、予め定められた前記手中心及び各関節の位置関係に基づいて特定される三次元座標とから前記手中心及び前記関節の移動速度を算出し、
前記手中心及び前記関節のいずれかの前記移動速度が閾値以上となる場合に、前記三次元座標と予め定められた前記手中心及び各関節の位置関係とが整合していないと判定する、
ことを特徴とする付記1に記載の手位置検出方法。
(付記12)
前記コンピュータが行う処理は、更に、前記画像から、前記対象者の胴体部分と対応する体領域を検出し、該体領域から肩の位置を推定する処理を含み、
前記画像内での手中心及び上肢の関節の位置を検出するとともに、検出した前記手中心及び前記関節のそれぞれの前記計測範囲内での三次元座標を算出する処理では、前記コンピュータは、
前記手中心の位置を検出した後、検出した前記手中心の位置と推定した前記肩の位置とに基づいて、前記上肢の関節の位置を検出する、
ことを特徴とする付記1に記載の手位置検出方法。
(付記13)
予め定められた前記手中心及び各関節の位置関係は、前記対象者から採寸した上肢の寸法を示す情報に基づいて算出された情報である、
ことを特徴とする付記1に記載の手位置検出方法。
(付記14)
予め定められた前記手中心及び各関節の位置関係は、現在処理の対象となっている前記画像の撮像時刻よりも所定の時間だけ前の時刻に撮像された前記画像から算出された前記手中心の三次元座標及び前記関節の三次元座標に基づいて算出される情報である、
ことを特徴とする付記1に記載の手位置検出方法。
(付記15)
所定の計測範囲内に存在する物体までの距離の情報を含む画像から、対象者の上肢部分と対応する上肢領域を検出し、前記画像における前記上肢領域の形状及び位置に基づいて、該画像内での手中心及び上肢の関節の位置を検出するとともに、検出した前記手中心及び前記関節のそれぞれの前記計測範囲内での三次元座標を算出する関節位置算出部と、
算出した前記手中心の三次元座標及び前記関節の三次元座標のそれぞれが、予め定められた前記対象者の上肢における手中心及び各関節の位置関係と整合しているか否かを判定し、算出した前記三次元座標と予め定められた前記手中心及び各関節の位置関係とが整合していない場合には、前記深度画像内での前記手中心の位置を変更して前記手中心の三次元座標及び前記関節の三次元座標を補正し、算出した前記三次元座標と予め定められた前記手中心及び各関節の位置関係とが整合している場合には、現在の前記手中心の三次元座標及び前記関節の三次元座標を前記計測範囲内での三次元座標に決定する補正部と、
を備えることを特徴とする手位置検出装置。
(付記16)
所定の計測範囲内に存在する物体までの距離の情報を含む画像から、対象者の上肢部分と対応する上肢領域を検出し、
前記画像における前記上肢領域の形状及び位置に基づいて、該画像内での手中心及び上肢の関節の位置を検出するとともに、検出した前記手中心及び前記関節のそれぞれの前記計測範囲内での三次元座標を算出し、
算出した前記手中心の三次元座標及び前記関節の三次元座標のそれぞれが、予め定められた前記対象者の上肢における手中心及び各関節の位置関係と整合しているか否かを判定し、
算出した前記三次元座標と予め定められた前記手中心及び各関節の位置関係とが整合していない場合には、前記深度画像内での前記手中心の位置を変更して前記手中心の三次元座標及び前記関節の三次元座標を補正し、
算出した前記三次元座標と予め定められた前記手中心及び各関節の位置関係とが整合している場合には、現在の前記手中心の三次元座標及び前記関節の三次元座標を前記計測範囲内での三次元座標に決定する、
処理をコンピュータに実行させる手位置検出プログラム。
The following additional notes will be further disclosed with respect to each of the above-described embodiments.
(Appendix 1)
The computer
The upper limb area corresponding to the upper limb part of the subject is detected from the image containing the information of the distance to the object existing within the predetermined measurement range.
Based on the shape and position of the upper limb region in the image, the positions of the hand center and the upper limb joint in the image are detected, and the detected tertiary of the hand center and the joint within the measurement range. Calculate the original coordinates,
It is determined whether or not each of the calculated three-dimensional coordinates of the hand center and the three-dimensional coordinates of the joint is consistent with the predetermined positional relationship between the hand center and each joint in the upper limb of the subject.
If the calculated three-dimensional coordinates do not match the predetermined positional relationship between the hand center and each joint, the position of the hand center in the depth image is changed to the tertiary of the hand center. Correct the original coordinates and the three-dimensional coordinates of the joint,
When the calculated three-dimensional coordinates match the predetermined positional relationship between the hand center and each joint, the current three-dimensional coordinates of the hand center and the three-dimensional coordinates of the joint are set in the measurement range. Determine the three-dimensional coordinates within,
A hand position detection method characterized by executing a process.
(Appendix 2)
In the process of detecting the positions of the center of the hand and the joints of the upper limbs in the image and calculating the three-dimensional coordinates of the detected center of the hand and the joints within the measurement range, the computer uses the computer.
After detecting the position of the center of the hand,
Based on the detected position of the center of the hand, the position of the joint is detected in order from the joint of the upper limbs closest to the center of the hand.
The hand position detection method according to Appendix 1, wherein the hand position is detected.
(Appendix 3)
In the process of detecting the position of the joint of the upper limb based on the position of the center of the hand, the computer allows the position of the joint of the upper limb to be outside the region of the upper limb.
The hand position detection method according to Appendix 2, wherein the hand position is detected.
(Appendix 4)
After the computer corrects the three-dimensional coordinates of the hand center and the three-dimensional coordinates of the joint, the corrected three-dimensional coordinates and the predetermined positional relationship between the hand center and each joint are determined. Determine if they are consistent,
The hand position detection method according to Appendix 1, wherein the hand position is detected.
(Appendix 5)
When the number of corrections of the three-dimensional coordinates of the hand center and the three-dimensional coordinates of the joint exceeds the threshold value, the computer uses the corrected three-dimensional coordinates and the predetermined hand center and each joint. Regardless of whether the positional relationship is consistent, the current 3D coordinates of the hand center and the 3D coordinates of the joint are determined to be the 3D coordinates within the measurement range.
The hand position detection method according to Appendix 4, wherein the hand position is detected.
(Appendix 6)
In the process of correcting the three-dimensional coordinates of the center of the hand and the three-dimensional coordinates of the joint, the computer is used.
When the position of the center of the hand after the change is outside the upper limb region, information on the distance of the adjacent region including the position of the center of the hand after the change, which is outside the upper limb region, is read out.
When the distance of the adjacent region is shorter than the distance of the upper limb region, the three-dimensional coordinates of the hand center and the three-dimensional coordinates of the joint are corrected based on the changed position of the hand center.
The hand position detection method according to Appendix 1, wherein the hand position is detected.
(Appendix 7)
In the process of correcting the three-dimensional coordinates of the center of the hand and the three-dimensional coordinates of the joint, the computer is used.
When the position of the center of the hand after the change is outside the upper limb region and the distance of the adjacent region including the position of the center of the hand after the change is shorter than the distance of the upper limb region, the distance of the upper limb region. The distance corresponding to the hand center at the changed position of the hand center is calculated based on the information of the above, and the three-dimensional coordinates of the hand center are calculated based on the calculated distance.
The hand position detection method according to Appendix 1, wherein the hand position is detected.
(Appendix 8)
In the process of correcting the three-dimensional coordinates of the center of the hand and the three-dimensional coordinates of the joint, the computer is used.
When the difference between the distance of the adjacent region and the distance of the upper limb region is equal to or greater than the threshold value, it is determined that the distance of the adjacent region is shorter than the distance of the upper limb region.
The hand position detection method according to any one of Supplementary note 6 and 7, wherein the hand position is detected.
(Appendix 9)
In the process of determining whether or not the calculated three-dimensional coordinates and the predetermined positional relationship between the hand center and each joint are in agreement, the computer uses the computer.
For each of the hand center and the joint, the position and the distance of the hand center or the joint in the image are calculated based on the three-dimensional coordinates.
When the calculated distance is shorter than the distance between the center of the hand or the position of the joint in the image, the three-dimensional coordinates do not match the predetermined positional relationship between the center of the hand and each joint. judge,
The hand position detection method according to Appendix 1, wherein the hand position is detected.
(Appendix 10)
In the process of determining whether or not the calculated three-dimensional coordinates and the predetermined positional relationship between the hand center and each joint are in agreement, the computer uses the computer.
For each pair of hand center and joint detected from the upper limb region, the three-dimensional distance between the adjacent hand center and the joint and the three-dimensional distance between the adjacent joints are calculated.
When the difference between the calculated three-dimensional distance and the dimension specified based on the positional relationship between the predetermined hand center and each joint is equal to or greater than the threshold value, the three-dimensional coordinates and the predetermined hand center And it is judged that the positional relationship of each joint is not consistent.
The hand position detection method according to Appendix 1, wherein the hand position is detected.
(Appendix 11)
In the process of determining whether or not the calculated three-dimensional coordinates and the predetermined positional relationship between the hand center and each joint are in agreement, the computer uses the computer.
The movement speed of the hand center and the joint is calculated from the calculated three-dimensional coordinates and the three-dimensional coordinates specified based on the predetermined positional relationship between the hand center and each joint.
When the moving speed of either the center of the hand or the joint is equal to or higher than the threshold value, it is determined that the three-dimensional coordinates and the predetermined positional relationship between the center of the hand and each joint do not match.
The hand position detection method according to Appendix 1, wherein the hand position is detected.
(Appendix 12)
The process performed by the computer further includes a process of detecting a body region corresponding to the body portion of the subject from the image and estimating the position of the shoulder from the body region.
In the process of detecting the positions of the center of the hand and the joints of the upper limbs in the image and calculating the three-dimensional coordinates of the detected center of the hand and the joints within the measurement range, the computer uses the computer.
After detecting the position of the center of the hand, the position of the joint of the upper limb is detected based on the detected position of the center of the hand and the estimated position of the shoulder.
The hand position detection method according to Appendix 1, wherein the hand position is detected.
(Appendix 13)
The predetermined positional relationship between the center of the hand and each joint is information calculated based on the information indicating the dimensions of the upper limbs measured from the subject.
The hand position detection method according to Appendix 1, wherein the hand position is detected.
(Appendix 14)
The predetermined positional relationship between the hand center and each joint is the hand center calculated from the image captured at a time predetermined time before the imaging time of the image currently being processed. Information calculated based on the three-dimensional coordinates of the joint and the three-dimensional coordinates of the joint.
The hand position detection method according to Appendix 1, wherein the hand position is detected.
(Appendix 15)
The upper limb region corresponding to the upper limb portion of the subject is detected from the image including the information of the distance to the object existing in the predetermined measurement range, and the inside of the image is based on the shape and position of the upper limb region in the image. A joint position calculation unit that detects the positions of the joints of the center of the hand and the joints of the upper limbs and calculates the three-dimensional coordinates of the detected center of the hand and the joints within the measurement range.
It is determined and calculated whether each of the calculated three-dimensional coordinates of the hand center and the three-dimensional coordinates of the joint is consistent with the predetermined positional relationship between the hand center and each joint in the upper limb of the subject. If the three-dimensional coordinates are not aligned with the predetermined positional relationship between the hand center and each joint, the position of the hand center in the depth image is changed to make the three-dimensional center of the hand. If the coordinates and the three-dimensional coordinates of the joint are corrected and the calculated three-dimensional coordinates match the predetermined positional relationship between the hand center and each joint, the current three-dimensional of the hand center. A correction unit that determines the coordinates and the three-dimensional coordinates of the joint to the three-dimensional coordinates within the measurement range, and
A hand position detection device characterized by being provided with.
(Appendix 16)
The upper limb area corresponding to the upper limb part of the subject is detected from the image containing the information of the distance to the object existing within the predetermined measurement range.
Based on the shape and position of the upper limb region in the image, the positions of the hand center and the upper limb joint in the image are detected, and the detected tertiary of the hand center and the joint within the measurement range. Calculate the original coordinates,
It is determined whether or not each of the calculated three-dimensional coordinates of the hand center and the three-dimensional coordinates of the joint is consistent with the predetermined positional relationship between the hand center and each joint in the upper limb of the subject.
If the calculated three-dimensional coordinates do not match the predetermined positional relationship between the hand center and each joint, the position of the hand center in the depth image is changed to the tertiary of the hand center. Correct the original coordinates and the three-dimensional coordinates of the joint,
When the calculated three-dimensional coordinates match the predetermined positional relationship between the hand center and each joint, the current three-dimensional coordinates of the hand center and the three-dimensional coordinates of the joint are set in the measurement range. Determine the three-dimensional coordinates within,
A hand position detection program that causes a computer to perform processing.

1 手位置検出装置
110 深度画像取得部
120 関節位置算出部
121 上肢領域検出部
122 画像内位置検出部
123 三次元座標算出部
124 体領域検出部
130 補正部
131 整合性判定部
132 再計算部
140 出力部
190 記憶部
191 背景画像
192 寸法情報
193 座標履歴
194 深度画像
2 深度センサ
3 外部装置
3A 管理装置
4 ネットワーク
5 管理システム
6 作業空間
7 作業員
710 左上肢
720 右上肢
711,721 手
712,722 手首
713 肘
714,724 肩
750 頭部
760 胴体部分
1101 深度画像
1102 二値画像
1101A,1101B,1102A,1102B 上肢領域
20 コンピュータ
2001 プロセッサ
2002 主記憶装置
2003 補助記憶装置
2004 入力装置
2005 出力装置
2006 入出力インタフェース
2007 通信制御装置
2008 媒体駆動装置
2010 バス
21 可搬型記録媒体
1 Hand position detection device 110 Depth image acquisition unit 120 Joint position calculation unit 121 Upper limb area detection unit 122 In-image position detection unit 123 Three-dimensional coordinate calculation unit 124 Body region detection unit 130 Correction unit 131 Consistency determination unit 132 Recalculation unit 140 Output unit 190 Storage unit 191 Background image 192 Dimensional information 193 Coordinate history 194 Depth image 2 Depth sensor 3 External device 3A Management device 4 Network 5 Management system 6 Workspace 7 Worker 710 Upper left limb 720 Upper right limb 711,721 Hand 712,722 Wrist 713 Elbow 714,724 Shoulder 750 Head 760 Body part 1101 Depth image 1102 Binary image 1101A, 1101B, 1102A, 1102B Upper limb area 20 Computer 2001 Processor 2002 Main memory 2003 Auxiliary storage 2004 Input device 2005 Output device 2006 Input / output Interface 2007 Communication control device 2008 Media drive device 2010 Bus 21 Portable recording medium

Claims (12)

コンピュータが、
所定の計測範囲内に存在する物体までの距離の情報を含む画像から、対象者の上肢部分と対応する上肢領域を検出し、
前記画像における前記上肢領域の形状及び位置に基づいて、該画像内での手中心及び上肢の関節の位置を検出するとともに、検出した前記手中心及び前記関節のそれぞれの前記計測範囲内での三次元座標を算出し、
算出した前記手中心の三次元座標及び前記関節の三次元座標のそれぞれが、予め定められた前記対象者の上肢における手中心及び各関節の位置関係と整合しているか否かを判定し、
算出した前記三次元座標と予め定められた前記手中心及び各関節の位置関係とが整合していない場合には、前記画像内での前記手中心の位置を変更して前記手中心の三次元座標及び前記関節の三次元座標を補正し、
算出した前記三次元座標と予め定められた前記手中心及び各関節の位置関係とが整合している場合には、現在の前記手中心の三次元座標及び前記関節の三次元座標を前記計測範囲内での三次元座標に決定する、
処理を実行することを特徴とする手位置検出方法。
The computer
The upper limb area corresponding to the upper limb part of the subject is detected from the image containing the information of the distance to the object existing within the predetermined measurement range.
Based on the shape and position of the upper limb region in the image, the positions of the hand center and the upper limb joint in the image are detected, and the detected tertiary of the hand center and the joint within the measurement range. Calculate the original coordinates,
It is determined whether or not each of the calculated three-dimensional coordinates of the hand center and the three-dimensional coordinates of the joint is consistent with the predetermined positional relationship between the hand center and each joint in the upper limb of the subject.
If the calculated three-dimensional coordinates do not match the predetermined positional relationship between the hand center and each joint, the position of the hand center in the image is changed to make the three-dimensional center of the hand. Correct the coordinates and the three-dimensional coordinates of the joint,
When the calculated three-dimensional coordinates match the predetermined positional relationship between the hand center and each joint, the current three-dimensional coordinates of the hand center and the three-dimensional coordinates of the joint are set in the measurement range. Determine the three-dimensional coordinates within,
A hand position detection method characterized by executing a process.
前記画像内での手中心及び上肢の関節の位置を検出するとともに、検出した前記手中心及び前記関節のそれぞれの前記計測範囲内での三次元座標を算出する処理では、前記コンピュータは、
前記手中心の位置を検出した後、
検出した前記手中心の位置に基づいて、前記上肢の関節のうちの前記手中心に近い関節から順に該関節の位置を検出する、
ことを特徴とする請求項1に記載の手位置検出方法。
In the process of detecting the positions of the center of the hand and the joints of the upper limbs in the image and calculating the three-dimensional coordinates of the detected center of the hand and the joints within the measurement range, the computer uses the computer.
After detecting the position of the center of the hand,
Based on the detected position of the center of the hand, the position of the joint is detected in order from the joint of the upper limbs closest to the center of the hand.
The hand position detection method according to claim 1, wherein the hand position is detected.
前記手中心の位置に基づいて前記上肢の関節の位置を検出する処理では、前記コンピュータは、前記上肢の関節の位置が前記上肢領域外となることを許容する、
ことを特徴とする請求項2に記載の手位置検出方法。
In the process of detecting the position of the joint of the upper limb based on the position of the center of the hand, the computer allows the position of the joint of the upper limb to be outside the region of the upper limb.
The hand position detection method according to claim 2, wherein the hand position is detected.
前記コンピュータは、前記手中心の三次元座標及び前記関節の三次元座標を補正する処理を行った後、補正後の前記三次元座標と予め定められた前記手中心及び各関節の位置関係とが整合しているか否かを判定する、
ことを特徴とする請求項1に記載の手位置検出方法。
After the computer corrects the three-dimensional coordinates of the hand center and the three-dimensional coordinates of the joint, the corrected three-dimensional coordinates and the predetermined positional relationship between the hand center and each joint are determined. Determine if they are consistent,
The hand position detection method according to claim 1, wherein the hand position is detected.
前記手中心の三次元座標及び前記関節の三次元座標を補正する処理では、前記コンピュータは、
変更後の前記手中心の位置が前記上肢領域の外側となる場合には、前記上肢領域の外側であって、変更後の前記手中心の位置を含む隣接領域の距離の情報を読み出し、
前記隣接領域の距離が前記上肢領域の距離よりも短い場合には、変更後の前記手中心の位置に基づいて前記手中心の三次元座標及び前記関節の三次元座標を補正する、
ことを特徴とする請求項1に記載の手位置検出方法。
In the process of correcting the three-dimensional coordinates of the center of the hand and the three-dimensional coordinates of the joint, the computer is used.
When the position of the center of the hand after the change is outside the upper limb region, information on the distance of the adjacent region including the position of the center of the hand after the change, which is outside the upper limb region, is read out.
When the distance of the adjacent region is shorter than the distance of the upper limb region, the three-dimensional coordinates of the hand center and the three-dimensional coordinates of the joint are corrected based on the changed position of the hand center.
The hand position detection method according to claim 1, wherein the hand position is detected.
前記手中心の三次元座標及び前記関節の三次元座標を補正する処理では、前記コンピュータは、
変更後の前記手中心の位置が前記上肢領域の外側であり、かつ変更後の前記手中心の位置を含む隣接領域の距離が前記上肢領域の距離よりも短い場合には、前記上肢領域の距離の情報に基づいて変更後の前記手中心の位置における該手中心と対応する距離を算出し、算出した前記距離に基づいて前記手中心の三次元座標を算出する、
ことを特徴とする請求項1に記載の手位置検出方法。
In the process of correcting the three-dimensional coordinates of the center of the hand and the three-dimensional coordinates of the joint, the computer is used.
When the position of the center of the hand after the change is outside the upper limb region and the distance of the adjacent region including the position of the center of the hand after the change is shorter than the distance of the upper limb region, the distance of the upper limb region. The distance corresponding to the hand center at the changed position of the hand center is calculated based on the information of the above, and the three-dimensional coordinates of the hand center are calculated based on the calculated distance.
The hand position detection method according to claim 1, wherein the hand position is detected.
算出した前記三次元座標と予め定められた前記手中心及び各関節の位置関係とが整合しているか否かを判定する処理では、前記コンピュータは、
前記手中心及び前記関節毎に、前記三次元座標に基づいて前記画像内での前記手中心又は前記関節の位置と、距離とを算出し、
算出した前記距離が、前記画像における前記手中心又は前記関節の位置の距離よりも短い場合に、前記三次元座標と予め定められた前記手中心及び各関節の位置関係とが整合していないと判定する、
ことを特徴とする請求項1に記載の手位置検出方法。
In the process of determining whether or not the calculated three-dimensional coordinates and the predetermined positional relationship between the hand center and each joint are in agreement, the computer uses the computer.
For each of the hand center and the joint, the position and the distance of the hand center or the joint in the image are calculated based on the three-dimensional coordinates.
When the calculated distance is shorter than the distance between the center of the hand or the position of the joint in the image, the three-dimensional coordinates do not match the predetermined positional relationship between the center of the hand and each joint. judge,
The hand position detection method according to claim 1, wherein the hand position is detected.
算出した前記三次元座標と予め定められた前記手中心及び各関節の位置関係とが整合しているか否かを判定する処理では、前記コンピュータは、
1つの前記上肢領域から検出された手中心及び関節の組毎に、隣接する手中心と関節との三次元距離、及び隣接する関節同士の三次元距離を算出し、
算出した三次元距離と、予め定められた前記手中心及び各関節の位置関係に基づいて特定される寸法との差が閾値以上である場合に、前記三次元座標と予め定められた前記手中心及び各関節の位置関係とが整合していないと判定する、
ことを特徴とする請求項1に記載の手位置検出方法。
In the process of determining whether or not the calculated three-dimensional coordinates and the predetermined positional relationship between the hand center and each joint are in agreement, the computer uses the computer.
For each pair of hand center and joint detected from the upper limb region, the three-dimensional distance between the adjacent hand center and the joint and the three-dimensional distance between the adjacent joints are calculated.
When the difference between the calculated three-dimensional distance and the dimension specified based on the positional relationship between the predetermined hand center and each joint is equal to or greater than the threshold value, the three-dimensional coordinates and the predetermined hand center And it is judged that the positional relationship of each joint is not consistent.
The hand position detection method according to claim 1, wherein the hand position is detected.
算出した前記三次元座標と予め定められた前記手中心及び各関節の位置関係とが整合しているか否かを判定する処理では、前記コンピュータは、
算出した前記三次元座標と、予め定められた前記手中心及び各関節の位置関係に基づいて特定される三次元座標とから前記手中心及び前記関節の移動速度を算出し、
前記手中心及び前記関節のいずれかの前記移動速度が閾値以上となる場合に、前記三次元座標と予め定められた前記手中心及び各関節の位置関係とが整合していないと判定する、
ことを特徴とする請求項1に記載の手位置検出方法。
In the process of determining whether or not the calculated three-dimensional coordinates and the predetermined positional relationship between the hand center and each joint are in agreement, the computer uses the computer.
The movement speed of the hand center and the joint is calculated from the calculated three-dimensional coordinates and the three-dimensional coordinates specified based on the predetermined positional relationship between the hand center and each joint.
When the moving speed of either the center of the hand or the joint is equal to or higher than the threshold value, it is determined that the three-dimensional coordinates and the predetermined positional relationship between the center of the hand and each joint do not match.
The hand position detection method according to claim 1, wherein the hand position is detected.
前記コンピュータが行う処理は、更に、前記画像から、前記対象者の胴体部分と対応する体領域を検出し、該体領域から肩の位置を推定する処理を含み、
前記画像内での手中心及び上肢の関節の位置を検出するとともに、検出した前記手中心及び前記関節のそれぞれの前記計測範囲内での三次元座標を算出する処理では、前記コンピュータは、
前記手中心の位置を検出した後、検出した前記手中心の位置と推定した前記肩の位置とに基づいて、前記上肢の関節の位置を検出する、
ことを特徴とする請求項1に記載の手位置検出方法。
The process performed by the computer further includes a process of detecting a body region corresponding to the body portion of the subject from the image and estimating the position of the shoulder from the body region.
In the process of detecting the positions of the center of the hand and the joints of the upper limbs in the image and calculating the three-dimensional coordinates of the detected center of the hand and the joints within the measurement range, the computer uses the computer.
After detecting the position of the center of the hand, the position of the joint of the upper limb is detected based on the detected position of the center of the hand and the estimated position of the shoulder.
The hand position detection method according to claim 1, wherein the hand position is detected.
所定の計測範囲内に存在する物体までの距離の情報を含む画像から、対象者の上肢部分と対応する上肢領域を検出し、前記画像における前記上肢領域の形状及び位置に基づいて、該画像内での手中心及び上肢の関節の位置を検出するとともに、検出した前記手中心及び前記関節のそれぞれの前記計測範囲内での三次元座標を算出する関節位置算出部と、
算出した前記手中心の三次元座標及び前記関節の三次元座標のそれぞれが、予め定められた前記対象者の上肢における手中心及び各関節の位置関係と整合しているか否かを判定し、算出した前記三次元座標と予め定められた前記手中心及び各関節の位置関係とが整合していない場合には、前記画像内での前記手中心の位置を変更して前記手中心の三次元座標及び前記関節の三次元座標を補正し、算出した前記三次元座標と予め定められた前記手中心及び各関節の位置関係とが整合している場合には、現在の前記手中心の三次元座標及び前記関節の三次元座標を前記計測範囲内での三次元座標に決定する補正部と、
を備えることを特徴とする手位置検出装置。
The upper limb region corresponding to the upper limb portion of the subject is detected from the image including the information of the distance to the object existing in the predetermined measurement range, and the inside of the image is based on the shape and position of the upper limb region in the image. A joint position calculation unit that detects the positions of the joints of the center of the hand and the joints of the upper limbs and calculates the three-dimensional coordinates of the detected center of the hand and the joints within the measurement range.
It is determined and calculated whether each of the calculated three-dimensional coordinates of the hand center and the three-dimensional coordinates of the joint is consistent with the predetermined positional relationship between the hand center and each joint in the upper limb of the subject. If the three-dimensional coordinates obtained do not match the predetermined positional relationship between the hand center and each joint, the position of the hand center in the image is changed and the three-dimensional coordinates of the hand center are changed. And if the calculated 3D coordinates by correcting the 3D coordinates of the joint and the predetermined positional relationship between the hand center and each joint match, the current 3D coordinates of the hand center. And a correction unit that determines the three-dimensional coordinates of the joint to the three-dimensional coordinates within the measurement range.
A hand position detection device characterized by being provided with.
所定の計測範囲内に存在する物体までの距離の情報を含む画像から、対象者の上肢部分と対応する上肢領域を検出し、
前記画像における前記上肢領域の形状及び位置に基づいて、該画像内での手中心及び上肢の関節の位置を検出するとともに、検出した前記手中心及び前記関節のそれぞれの前記計測範囲内での三次元座標を算出し、
算出した前記手中心の三次元座標及び前記関節の三次元座標のそれぞれが、予め定められた前記対象者の上肢における手中心及び各関節の位置関係と整合しているか否かを判定し、
算出した前記三次元座標と予め定められた前記手中心及び各関節の位置関係とが整合していない場合には、前記画像内での前記手中心の位置を変更して前記手中心の三次元座標及び前記関節の三次元座標を補正し、
算出した前記三次元座標と予め定められた前記手中心及び各関節の位置関係とが整合している場合には、現在の前記手中心の三次元座標及び前記関節の三次元座標を前記計測範囲内での三次元座標に決定する、
処理をコンピュータに実行させる手位置検出プログラム。
The upper limb area corresponding to the upper limb part of the subject is detected from the image containing the information of the distance to the object existing within the predetermined measurement range.
Based on the shape and position of the upper limb region in the image, the positions of the hand center and the upper limb joint in the image are detected, and the detected tertiary of the hand center and the joint within the measurement range. Calculate the original coordinates,
It is determined whether or not each of the calculated three-dimensional coordinates of the hand center and the three-dimensional coordinates of the joint is consistent with the predetermined positional relationship between the hand center and each joint in the upper limb of the subject.
If the calculated three-dimensional coordinates do not match the predetermined positional relationship between the hand center and each joint, the position of the hand center in the image is changed to make the three-dimensional center of the hand. Correct the coordinates and the three-dimensional coordinates of the joint,
When the calculated three-dimensional coordinates match the predetermined positional relationship between the hand center and each joint, the current three-dimensional coordinates of the hand center and the three-dimensional coordinates of the joint are set in the measurement range. Determine the three-dimensional coordinates within,
A hand position detection program that causes a computer to perform processing.
JP2017226978A 2017-11-27 2017-11-27 Hand position detection method, hand position detection device, and hand position detection program Active JP6988406B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2017226978A JP6988406B2 (en) 2017-11-27 2017-11-27 Hand position detection method, hand position detection device, and hand position detection program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2017226978A JP6988406B2 (en) 2017-11-27 2017-11-27 Hand position detection method, hand position detection device, and hand position detection program

Publications (2)

Publication Number Publication Date
JP2019096212A JP2019096212A (en) 2019-06-20
JP6988406B2 true JP6988406B2 (en) 2022-01-05

Family

ID=66971726

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2017226978A Active JP6988406B2 (en) 2017-11-27 2017-11-27 Hand position detection method, hand position detection device, and hand position detection program

Country Status (1)

Country Link
JP (1) JP6988406B2 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6749381B2 (en) * 2018-11-12 2020-09-02 裕樹 有光 Program and device for mutually generating measurement value and depth image
CN113610949B (en) * 2021-08-25 2023-06-16 腾讯科技(深圳)有限公司 Method, device, equipment and storage medium for covering virtual arm skeleton
CN114739316B (en) * 2022-03-10 2022-12-20 江苏省肿瘤医院 Hand hygiene disinfection dose release measuring instrument

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5136473B2 (en) * 2009-03-12 2013-02-06 株式会社デンソー Crew attitude estimation device
JP5715833B2 (en) * 2011-01-24 2015-05-13 パナソニック株式会社 Posture state estimation apparatus and posture state estimation method
JP6433149B2 (en) * 2013-07-30 2018-12-05 キヤノン株式会社 Posture estimation apparatus, posture estimation method and program
JP2019179289A (en) * 2018-03-30 2019-10-17 株式会社東海理化電機製作所 Processing device and program

Also Published As

Publication number Publication date
JP2019096212A (en) 2019-06-20

Similar Documents

Publication Publication Date Title
JP6988406B2 (en) Hand position detection method, hand position detection device, and hand position detection program
JP5899944B2 (en) Vehicle type identification device
EP3016071B1 (en) Estimating device and estimation method
GB2556976A (en) Methods circuits assemblies devices systems platforms and fuctionally associated machine executable code for computer vision assisted construction site
JP6405778B2 (en) Object tracking method and object tracking apparatus
JP6723061B2 (en) Information processing apparatus, information processing apparatus control method, and program
US10019811B2 (en) Image processing apparatus and method for estimating an error in registration between images
US10692291B2 (en) Apparatus, method, and medium for generating a 3D model of a finger using captured image
US8170339B2 (en) Image processing apparatus and image processing method
US20140147037A1 (en) Image processing apparatus and method
US20150161435A1 (en) Frontal face detection apparatus and method using facial pose
US10692215B2 (en) Image processing apparatus, image processing method, and storage medium
JP2002024807A (en) Object movement tracking technique and recording medium
US11727637B2 (en) Method for generating 3D skeleton using joint-based calibration acquired from multi-view camera
CN103678836A (en) Virtual fit system and method
JP5248236B2 (en) Image processing apparatus and image processing method
JP6950390B2 (en) Display control programs, devices, and methods
JP5048609B2 (en) Object tracking device and program
EP4023155A1 (en) Body measurement device and control method therefor
JP2017027197A (en) Monitoring program, monitoring device and monitoring method
US20190371001A1 (en) Information processing apparatus, method of controlling information processing apparatus, and non-transitory computer-readable storage medium
JP4836065B2 (en) Edge tracking method and computer program therefor
KR100792172B1 (en) Apparatus and method for estimating fundamental matrix using robust correspondence point
KR101856257B1 (en) Apparatus for compensating disparity image and method thereof
JP5032415B2 (en) Motion estimation apparatus and program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20200807

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20210826

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20211005

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20211019

RD03 Notification of appointment of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7423

Effective date: 20211019

RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20211019

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20211102

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20211115

R150 Certificate of patent or registration of utility model

Ref document number: 6988406

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150