Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JP7707004B2 - Image processing device, image processing method, and program - Google Patents
[go: Go Back, main page]

JP7707004B2 - Image processing device, image processing method, and program - Google Patents

Image processing device, image processing method, and program Download PDF

Info

Publication number
JP7707004B2
JP7707004B2 JP2021152320A JP2021152320A JP7707004B2 JP 7707004 B2 JP7707004 B2 JP 7707004B2 JP 2021152320 A JP2021152320 A JP 2021152320A JP 2021152320 A JP2021152320 A JP 2021152320A JP 7707004 B2 JP7707004 B2 JP 7707004B2
Authority
JP
Japan
Prior art keywords
value
skin color
image processing
face
image
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
JP2021152320A
Other languages
Japanese (ja)
Other versions
JP2022151510A5 (en
JP2022151510A (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.)
Canon Inc
Original Assignee
Canon Inc
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 Canon Inc filed Critical Canon Inc
Priority to US17/701,502 priority Critical patent/US12243272B2/en
Priority to EP22163676.4A priority patent/EP4064230A1/en
Priority to KR1020220037215A priority patent/KR102871728B1/en
Priority to CN202210306506.XA priority patent/CN115131696A/en
Publication of JP2022151510A publication Critical patent/JP2022151510A/en
Publication of JP2022151510A5 publication Critical patent/JP2022151510A5/ja
Application granted granted Critical
Publication of JP7707004B2 publication Critical patent/JP7707004B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Facsimile Image Signal Circuits (AREA)
  • Image Analysis (AREA)

Description

本発明は、脈拍の情報を画像から推定する技術に関する。 The present invention relates to a technology for estimating pulse information from an image.

画像から脈拍の情報を取得する手段として、一定の照明環境を想定し、顔の一部の領域を切り出しその領域内での肌の色の変化を求め、変化の周期を計測するものがある。特許文献1は、画像から顔を検出し、検出された顔を含む領域から色ヒストグラムを生成し、そのヒストグラムに基づいてその画像における肌色の範囲(YUV、RGB、HSV等の色空間での値)を特定する。また、特許文献2は、画像に対して肌色の条件を緩和しながら顔検出と肌色領域の検出を繰り返し、顔検出領域と肌色領域の面積の割合が所定値を超え、かつ顔が検出された時点における肌色の範囲を特定する。 One method for acquiring pulse information from an image is to assume a certain lighting environment, cut out a part of the face, find the change in skin color within that area, and measure the period of change. Patent Document 1 detects a face from an image, generates a color histogram from the area including the detected face, and identifies the range of skin color in the image (values in color space such as YUV, RGB, HSV) based on the histogram. Patent Document 2 repeats face detection and skin color area detection while relaxing the skin color conditions for the image, and identifies the range of skin color at the point when the ratio of the area of the face detection area to the skin color area exceeds a predetermined value and a face is detected.

特許第5153660号Patent No. 5153660 特開2020-102059号公報JP 2020-102059 A

しかしながら、特許文献1の方法では、大きな顔検出枠の中で肌色を特定する場合は、頭髪や背景の色が混じり、小さな顔検出枠の中で肌色を特定する場合は、頬の外側や額の色が除外されるため、適切に肌色の範囲を特定できないことがある。また、特許文献2の方法では、画像に対して肌色の条件を緩和しながら顔検出と肌色領域の検出を繰り返すため処理に時間を要する。本発明は上記課題に鑑みてなされたものであり、適切な肌色の範囲を迅速に設定することを目的とする。 However, with the method of Patent Document 1, when identifying skin color within a large face detection frame, the colors of the hair and background are mixed in, and when identifying skin color within a small face detection frame, the colors of the outer cheeks and forehead are excluded, so the range of skin color may not be identified appropriately. Furthermore, with the method of Patent Document 2, face detection and detection of skin color areas are repeated while relaxing the skin color conditions for the image, so processing takes time. The present invention was made in consideration of the above problems, and aims to quickly set an appropriate skin color range.

本発明に係る画像処理装置は、画像から検出された人物の脈拍を推定する画像処理装置であって、画像から特定された顔を含む楕円領域を設定する設定手段と、前記設定された前記楕円領域に含まれる画素の色情報を取得する取得手段と、前記取得された前記色情報が所定の条件を満たすか否かを判定する判定手段と、前記判定手段によって前記取得された前記色情報が前記所定の条件を満たすと判定された場合、前記楕円領域における前記色情報に基づいて、肌色の範囲を示す閾値を決定する決定手段と、を有することを特徴とする。 The image processing device according to the present invention is an image processing device that estimates the pulse rate of a person detected from an image, and is characterized by having a setting means for setting an elliptical region that includes a face identified from an image, an acquisition means for acquiring color information of pixels included in the set elliptical region, a determination means for determining whether the acquired color information satisfies a predetermined condition, and a determination means for determining a threshold value indicating a range of skin color based on the color information in the elliptical region when the determination means determines that the acquired color information satisfies the predetermined condition.

本発明によって、適切な肌色の範囲を迅速に設定できる。 This invention allows you to quickly set the appropriate skin color range.

画像処理装置のハードウェア構成例を示すブロック図である。FIG. 2 is a block diagram illustrating an example of a hardware configuration of the image processing device. 画像処理装置の機能構成例を示すブロック図である。1 is a block diagram showing an example of a functional configuration of an image processing device; 画像処理装置が実行する処理を説明するためのフローチャートである。11 is a flowchart illustrating a process executed by the image processing device. 画像処理装置が実行する処理を説明するためのフローチャートである。11 is a flowchart illustrating a process executed by the image processing device. (A)~(C) 処理対象の画像の一例を示す図である。1A to 1C are diagrams illustrating an example of an image to be processed. 肌色閾値決定テーブルの一例を示す表である。13 is a table illustrating an example of a skin color threshold determination table. 画像処理装置が実行する処理を説明するためのフローチャートである。11 is a flowchart illustrating a process executed by the image processing device. バリエーションの一例を示す図である。FIG. 13 is a diagram showing an example of a variation. 画像処理装置の機能構成例を示すブロック図である。1 is a block diagram showing an example of a functional configuration of an image processing device; 画像処理装置が実行する処理を説明するためのフローチャートである。11 is a flowchart illustrating a process executed by the image processing device. 背景マスクの一例を示す図である。FIG. 13 is a diagram illustrating an example of a background mask. 画像処理装置が実行する処理を説明するためのフローチャートである。11 is a flowchart illustrating a process executed by the image processing device. 画像処理装置が実行する処理を説明するためのフローチャートである。11 is a flowchart illustrating a process executed by the image processing device. (A)~(D) 彩度の閾値修正処理の一例を示す図である。13A to 13D are diagrams illustrating an example of a saturation threshold correction process. 画像処理装置が実行する処理を説明するためのフローチャートである。11 is a flowchart illustrating a process executed by the image processing device. (A)~(F) 閾値修正処理の一例を示す図である。13A to 13F are diagrams illustrating an example of a threshold correction process. (A)~(G) 閾値修正処理の一例を示す図である。13A to 13G are diagrams illustrating an example of a threshold correction process. (A)~(G) 閾値修正処理の一例を示す図である。13A to 13G are diagrams illustrating an example of a threshold correction process.

以下、図面を参照しながら本発明の好適な実施形態について説明する。 Below, a preferred embodiment of the present invention will be described with reference to the drawings.

<実施形態1>
画像から脈拍の情報を取得する手段として、一定の照明環境を想定し、顔の一部の領域を切り出しその領域内での肌の色の変化を求め、変化の周期を計測するものがある。しかし、顔の一部を切り出す場合には照明の方向や顔の向きによる影響を受けやすいため、監視カメラなどで被写体の位置があらかじめ決定できない場合には、肌色の映り方が変動することを考慮しなければならない。また、顔全体の肌の色の条件をあらかじめ固定で設定すると、個人差やカメラの差や照明の色温度などの影響を受け、固定値を逸脱する箇所が現れることがある。この逸脱箇所が時間によりちらつく場合に、対象の色の変化の周期にノイズが入って正しく脈拍を推定できなくなる。これらを踏まえて、撮影条件が一定でない状況においても、画像からの脈拍推定が安定するように、画像における肌色の定義(RGB値の範囲)を動的に決定する手法について説明する。
<Embodiment 1>
As a means for acquiring pulse information from an image, a certain lighting environment is assumed, a part of the face is cut out, the change in skin color within the area is obtained, and the period of change is measured. However, when cutting out a part of the face, it is easily affected by the direction of the lighting and the direction of the face, so if the position of the subject cannot be determined in advance using a surveillance camera, etc., it is necessary to consider that the way the skin color is reflected varies. In addition, if the skin color conditions of the entire face are set in advance as fixed, there may be areas that deviate from the fixed value due to the influence of individual differences, differences in cameras, and the color temperature of the lighting. If the deviating areas flicker over time, noise will be introduced into the period of the change in the color of the target, making it impossible to estimate the pulse correctly. Based on these, a method for dynamically determining the definition of the skin color in an image (the range of RGB values) so that pulse estimation from an image is stable even in a situation where the shooting conditions are not constant will be described.

図1は、本実施形態に係る画像処理装置のハードウェア構成例を示すブロック図である。中央処理ユニット(CPU)11は、RAM13をワークメモリとして、ROM12や記憶装置14に格納されたOSやその他プログラムを読みだして実行し、システムバス19に接続された各構成を制御して、各種処理の演算や論理判断などを行う。CPU11が実行する処理には、実施形態の画像処理が含まれる。記憶装置14は、ハードディスクドライブや外部記憶装置などであり、実施形態の画像処理にかかるプログラムや各種データを記憶する。入力部15は、カメラなどの撮像装置、ユーザ指示を入力するためのボタン、キーボード、タッチパネルなどの入力デバイスである。なお、記憶装置14は例えばSATAなどのインタフェイスを介して、入力部15は例えばUSBなどのシリアルバスを介して、それぞれシステムバス19に接続されるが、それらの詳細は省略する。通信I/F16は無線通信で外部の機器と通信を行う。表示部17はディスプレイである。センサ18は画像センサや距離センサである。なお、画像処理装置はここで説明したハードウェアの一部を有していなくてもよい。例えば、画像処理装置がネットワークカメラである場合は、キーボード等の入力デバイスや表示部17はあってもなくてもよい。 1 is a block diagram showing an example of the hardware configuration of an image processing device according to the present embodiment. The central processing unit (CPU) 11 reads and executes the OS and other programs stored in the ROM 12 and the storage device 14 using the RAM 13 as a work memory, controls each component connected to the system bus 19, and performs calculations and logical judgments for various processes. The processes executed by the CPU 11 include the image processing of the embodiment. The storage device 14 is a hard disk drive or an external storage device, and stores the programs and various data related to the image processing of the embodiment. The input unit 15 is an input device such as an imaging device such as a camera, a button for inputting user instructions, a keyboard, or a touch panel. The storage device 14 is connected to the system bus 19 via an interface such as SATA, and the input unit 15 is connected to the system bus 19 via a serial bus such as USB, but details of these are omitted. The communication I/F 16 communicates with external devices via wireless communication. The display unit 17 is a display. The sensor 18 is an image sensor or a distance sensor. The image processing device may not have some of the hardware described here. For example, if the image processing device is a network camera, it does not matter whether it has an input device such as a keyboard or a display unit 17.

図2は、画像処理装置1の機能構成例を示すブロック図である。画像処理装置1は、画像から検出された人物の脈拍を推定する。画像処理装置1は、画像取得部101、顔検出部102、肌色閾値決定部103、肌色領域検出部104、色相計算部105、色相変化管理部106、脈拍推定部107、脈拍記録部108を有する。なお、外部装置として、画像を取得する撮像装置や、脈拍推定の結果を表示する出力装置等を接続してもよい。 Figure 2 is a block diagram showing an example of the functional configuration of the image processing device 1. The image processing device 1 estimates the pulse rate of a person detected from an image. The image processing device 1 has an image acquisition unit 101, a face detection unit 102, a skin color threshold determination unit 103, a skin color area detection unit 104, a hue calculation unit 105, a hue change management unit 106, a pulse rate estimation unit 107, and a pulse rate recording unit 108. Note that an imaging device that acquires an image, an output device that displays the results of the pulse rate estimation, etc. may be connected as an external device.

画像取得部101は、対象人物が撮像された画像を取得する。例えば、画像処理装置1が有する撮像部によって撮像された画像を取得してもよいし、記憶部に記憶された映像から画像を取得してもよい。 The image acquisition unit 101 acquires an image of a target person. For example, the image may be acquired by an imaging unit included in the image processing device 1, or the image may be acquired from a video stored in a storage unit.

顔検出部102は、取得された画像から、顔を検出する。複数フレームに渡って顔を検出することによって顔を追尾してもよい。顔の検出方法は、既存の画像認識手法を用いる。具体的には、ニューラルネットワークに顔画像を学習させた顔検出器を用いてもよいし、顔画像のテンプレートマッチングによって検出してもよい。もしくは、対象人物が所定の画角に入るように誘導するための画面を生成し、その画面の枠内に人物が映ったときの画像から顔領域を抽出することによって顔画像を取得してもよい。いずれの手法を用いる場合であっても、画像における顔のサイズが一定以上あればよく、顔の向きや照明条件は一定である必要は必ずしもない。なお、顔の向きや照明条件は一定であればより精度よく脈拍推定が可能となるが、本実施形態は顔の向きや照明条件がある程度変動してしまう場合であっても好適に脈拍推定を実行できる。 The face detection unit 102 detects a face from the acquired image. The face may be tracked by detecting the face across multiple frames. The face detection method uses an existing image recognition method. Specifically, a face detector that has trained a neural network with face images may be used, or the face may be detected by template matching of face images. Alternatively, a screen may be generated to guide the target person into a specified angle of view, and the face image may be acquired by extracting a face area from an image when the person is reflected within the frame of the screen. Regardless of which method is used, it is sufficient that the size of the face in the image is equal to or larger than a certain size, and the face direction and lighting conditions do not necessarily need to be constant. Note that if the face direction and lighting conditions are constant, pulse rate estimation can be performed more accurately, but this embodiment can perform pulse rate estimation suitably even if the face direction and lighting conditions vary to a certain extent.

肌色閾値決定部103は、顔領域における色情報に基づいて、入力映像における対象となる色(ここでは肌色)の閾値(肌色として抽出する色情報の条件)を決定する。肌色閾値決定部103は、まず画像から特定された顔を含む楕円領域を設定する。次に設定された楕円領域から色相等の色情報を各画素から取得する。色情報は、色相、彩度、明度を指す。さらに、取得された色情報の統計値に基づいて、色情報が所定の条件を満たすか判定する。色情報の統計値とは、色相、彩度、明度の平均値、標準偏差を指す。設定された楕円領域に含まれる色情報の統計値が条件を満たす場合は、その色情報に基づいて、肌色として抽出すべき色情報の閾値を決定する。詳細は後述する。映像の照明条件あるいは対象人物の肌の色によって、肌色として抽出すべき色情報は異なるので、映像毎に肌色の閾値を特定することで、照明条件や顔の向きや個人の特徴にロバストな脈拍推定が可能になる。 The skin color threshold determination unit 103 determines the threshold value (conditions for color information to be extracted as skin color) of the target color (skin color in this case) in the input video based on the color information in the face area. The skin color threshold determination unit 103 first sets an elliptical area including the face identified from the image. Next, color information such as hue is acquired from each pixel from the set elliptical area. The color information refers to hue, saturation, and brightness. Furthermore, based on the statistical value of the acquired color information, it is determined whether the color information satisfies a predetermined condition. The statistical value of the color information refers to the average value and standard deviation of the hue, saturation, and brightness. If the statistical value of the color information included in the set elliptical area satisfies the condition, the threshold value of the color information to be extracted as skin color is determined based on the color information. Details will be described later. Since the color information to be extracted as skin color differs depending on the lighting conditions of the video or the skin color of the target person, by specifying the skin color threshold value for each video, it becomes possible to perform pulse estimation that is robust to lighting conditions, face orientation, and individual characteristics.

肌色領域決定部104は、決定された対象の色の閾値に基づいて、画像から脈拍推定に用いる部分画像(肌色領域)を取得する。詳細は後述する。色相計算部105は、決定された肌色領域における各画素の色情報に基づいて、色相を算出する。色相変化管理部106は、複数フレームにおいて算出された色相に基づいて、色相の変化(周波数)を算出する。脈拍推定部107は、算出された色相の周波数から対象人物の脈拍を推定する。画像から脈拍を推定することによって、遠方でもその人の健康状態を確認できるといったメリットがある。詳細は後述する。以上が、各機能部の処理の簡単な説明である。 The skin color area determination unit 104 acquires a partial image (skin color area) to be used for pulse rate estimation from the image based on the determined threshold value of the color of the target. Details will be described later. The hue calculation unit 105 calculates the hue based on the color information of each pixel in the determined skin color area. The hue change management unit 106 calculates the change in hue (frequency) based on the hue calculated in multiple frames. The pulse rate estimation unit 107 estimates the pulse rate of the target person from the frequency of the calculated hue. Estimating the pulse rate from an image has the advantage that the person's health condition can be confirmed even from a distance. Details will be described later. This concludes a brief explanation of the processing of each functional unit.

次に、図3のフローチャートを用いて、各機能部が実行する処理を説明する。以下の説明では、各工程(ステップ)について先頭にSを付けて表記することで、工程(ステップ)の表記を省略する。ただし、このフローチャートで説明するすべてのステップを必ずしも行わなくても良い。 Next, the processing executed by each functional unit will be explained using the flowchart in FIG. 3. In the following explanation, each process (step) will be indicated by adding an S to the beginning, and the notation of the process (step) will be omitted. However, it is not necessary to perform all of the steps explained in this flowchart.

S201で、画像取得部101は、撮像装置によって撮像された映像から1フレームずつの画像を取得する。S202で、画像取得部101は、撮像装置による撮像が終了したか判定し、撮像が継続している場合はS203に進み、終了した場合は、脈拍推定処理を終了する。ユーザの指示に基づいて処理の継続を判断してもよい。継続する場合は、S203で、顔検出部102が、取得された画像から顔を検出する。なお、複数フレームの画像を取得するので、それぞれの画像から顔を検出する。複数の顔が含まれる場合は、同一人物の顔を対応付ける。S204は、顔検出部102が、検出された人物毎に、次の処理に出力する画像を決定する。検出したすべての顔に対してS205からS211までの処理を行う。S205では、肌色閾値決定部103が、入力された画像が、対象人物を検出した最初の顔画像であるかの判定を行う。最初の顔画像であるときにS206で肌色閾値を決定し、S207へ進む。S206の処理については、後述する。最初の顔画像でない時は、そのままS207へ進む。なお、ここでの判定は、対象人物について、肌色閾値が決定されているか否かを判定できれば、他の方法でもよい。例えば、顔検出部102において、登録人物との顔認証を実行し、ある登録人物が検出された場合で、その人物に対応する肌色閾値が記憶されていた場合は、S207に進んでもよい。また、ある対象人物について、複数フレームの検出結果が取得されている場合は、任意の画像から肌色閾値を決定するための画像を取得してもよい。ここでは、フレームごとに顔検出を行い、過去に検出されたことのない人物が検出された場合に、S206に進み、過去に検出されたことのある人物が検出された場合は、対応する追尾情報から最初の画像ではないことを判定し、S207に進む。S206の処理は、後述し、先にS207の処理を説明する。 In S201, the image acquisition unit 101 acquires one frame of image from the video captured by the imaging device. In S202, the image acquisition unit 101 determines whether the imaging by the imaging device has ended. If the imaging is continuing, the process proceeds to S203. If the imaging is ended, the pulse estimation process ends. The continuation of the process may be determined based on a user's instruction. If the process is to continue, in S203, the face detection unit 102 detects a face from the acquired image. Note that since images of multiple frames are acquired, faces are detected from each image. If multiple faces are included, the faces of the same person are associated. In S204, the face detection unit 102 determines an image to be output to the next process for each detected person. The processes from S205 to S211 are performed for all detected faces. In S205, the skin color threshold determination unit 103 determines whether the input image is the first face image in which the target person has been detected. If it is the first face image, the skin color threshold is determined in S206, and the process proceeds to S207. The process of S206 will be described later. If it is not the first face image, the process proceeds directly to S207. The determination here may be made by other methods as long as it can determine whether or not a skin color threshold has been determined for the target person. For example, in the face detection unit 102, face authentication with registered persons is performed, and if a registered person is detected and a skin color threshold corresponding to that person is stored, the process may proceed to S207. In addition, if detection results of multiple frames are obtained for a target person, an image for determining the skin color threshold may be obtained from any image. Here, face detection is performed for each frame, and if a person who has not been detected in the past is detected, the process proceeds to S206, and if a person who has been detected in the past is detected, it is determined that the image is not the first image based on the corresponding tracking information, and the process proceeds to S207. The process of S206 will be described later, and the process of S207 will be described first.

S207では、肌色領域抽出部104が、対象人物毎に決定された肌色閾値を用いて、設定された顔領域において肌色の色情報を有する画素を肌色領域として抽出する。このとき顔の肌色領域が検知対象枠にすべて入るように、検出された顔枠(矩形のバウンディングボックス)を例えば1.5倍に拡大し、その枠の中のすべての画素について肌色領域を検出する。 In S207, the skin color region extraction unit 104 uses a skin color threshold determined for each target person to extract pixels having skin color information in the set face region as skin color regions. At this time, the detected face frame (rectangular bounding box) is enlarged, for example, by 1.5 times so that the entire skin color region of the face is included in the detection target frame, and skin color regions are detected for all pixels within the frame.

S208では、色相計算部105が、検出された肌色領域の色相の平均を求めて記録する。S209では、色相変化管理部106が、色相平均値を記録したフレームの数が所定の数を満たすか判定する。所定数を満たす時には、S210に進む。S210では、脈拍推定部107が、色相平均値の変化を用いて脈拍推定を行い、S211では、脈拍季肋部108が、脈拍値を記録する。ある人物についての脈拍推定が完了すると、S204に戻り、次の人物について、再び脈拍推定を実行する。検出したすべての顔追尾について脈拍推定処理が終了した時にS201に進み、次の画像の処理を継続する。 In S208, the hue calculation unit 105 finds and records the average hue of the detected skin color area. In S209, the hue change management unit 106 determines whether the number of frames in which the hue average value is recorded meets a predetermined number. When the predetermined number is met, the process proceeds to S210. In S210, the pulse estimation unit 107 performs pulse estimation using the change in the hue average value, and in S211, the pulse hypochondrium unit 108 records the pulse value. When pulse estimation for a certain person is completed, the process returns to S204, and pulse estimation is performed again for the next person. When pulse estimation processing has been completed for all detected face tracking, the process proceeds to S201, and processing of the next image continues.

なお、脈拍推定の手法については、ピーク間の間隔の移動平均を求めるものや、周波数スペクトル分析を行うもの、主成分分析を行うもの等があり、本発明では脈拍推定の手法については限定しない。 Note that there are various pulse rate estimation methods, such as finding a moving average of the interval between peaks, performing frequency spectrum analysis, and performing principal component analysis, and the present invention does not limit the pulse rate estimation method.

また、この例では肌色閾値の決定を行うのは追尾の最初の顔画像としたが、追尾中の途中の画像でも一定の条件を満たせば、肌色閾値の決定を行うようにしてもよい。例えば、肌色領域の大きさが最大になったときを基準として閾値を決定してもよい。他には、追尾対象が一定距離移動したときや、色相の変化値が一定以上になったときや、顔向きを検出する手段を加えて顔向きが変更した時でもよい。また、この例では顔追尾を行っているが、全身追尾を行い追尾IDが同じものを同一人物とみなすようにしてもよい。顔が映っていない場合でも全身追尾で同じ人物とみなせば、次に顔が映った時に肌色閾値を変更する必要はない。 Although in this example the skin color threshold is determined for the first face image of tracking, the skin color threshold may also be determined for images during tracking if they satisfy certain conditions. For example, the threshold may be determined based on when the size of the skin color area reaches its maximum. Alternatively, it may be when the tracking target moves a certain distance, when the change in hue exceeds a certain value, or when a means for detecting face direction is added and the face direction changes. Also, in this example face tracking is performed, but full body tracking may be performed and images with the same tracking ID may be considered to be the same person. Even if the face is not captured, if it is considered to be the same person using full body tracking, there is no need to change the skin color threshold the next time a face is captured.

図4は、S206のサブフローチャートであり、図5は肌色閾値決定の例を示す図である。 Figure 4 is a sub-flowchart of S206, and Figure 5 shows an example of determining the skin color threshold.

S301で、肌色閾値決定部103は、顔検出部102によって検出された顔に基づいて、入力画像に対して顔領域に対応する枠を設定する。ここでは、顔検出部102によって検出された顔が矩形であるのに対して、顔領域に対応する枠として楕円形の枠を設定する。すなわち、顔枠楕円の初期設定を行う。例えば、図5(A)の401は、画像取得部101によって取得された画像(入力画像)であり、402と403は顔追尾の追尾結果、404と405は顔追尾102によって検出される顔枠(矩形のバウンディングボックス)である。この例では顔検出枠は、顔全体より小さく検出される傾向があり、顔全体を含めるためには拡大する必要がある。図5(B)の406と図5(C)の410のように顔検出枠404,405の1.5倍ほどの枠を設定する。なお、顔検出枠を406のように大きめに検出するように顔検出部102の識別器が学習されている場合は、顔検出枠の拡大・縮小をその検出枠の傾向に合わせて調整するとよい。次に、顔検出枠の中に、所定の比率の楕円を最初に置く。この楕円は顔検出枠より大きく、顔検出枠を内包するように設定する。この例では、拡大顔枠の楕円比率0.85(縦1横0.85)を最初の顔枠楕円として設定する。図5(B)の407と図5(C)の411がその例である。なおこの最初の楕円比率は顔検出の大きさの傾向をあらかじめ調べて置いて決定しておく。 In S301, the skin color threshold determination unit 103 sets a frame corresponding to the face area for the input image based on the face detected by the face detection unit 102. Here, the face detected by the face detection unit 102 is rectangular, whereas an elliptical frame is set as a frame corresponding to the face area. That is, the initial setting of the face frame ellipse is performed. For example, 401 in FIG. 5(A) is an image (input image) acquired by the image acquisition unit 101, 402 and 403 are the tracking results of face tracking, and 404 and 405 are face frames (rectangular bounding boxes) detected by the face tracking 102. In this example, the face detection frame tends to be detected smaller than the entire face, and needs to be enlarged to include the entire face. A frame about 1.5 times larger than the face detection frames 404 and 405 is set, as in 406 in FIG. 5(B) and 410 in FIG. 5(C). If the classifier of the face detection unit 102 has been trained to detect a larger face detection frame like 406, it is advisable to adjust the enlargement/reduction of the face detection frame according to the tendency of that detection frame. Next, an ellipse of a specified ratio is first placed within the face detection frame. This ellipse is set to be larger than the face detection frame and to include the face detection frame. In this example, an ellipse ratio of 0.85 (1 vertical, 0.85 horizontal) of the enlarged face frame is set as the initial face frame ellipse. Examples are 407 in FIG. 5(B) and 411 in FIG. 5(C). Note that this initial ellipse ratio is determined by investigating the tendency of face detection size in advance.

肌色閾値決定部103は、S302で、設定された顔枠楕円内のすべての画素について、RGBの値からHSVの色情報を取得する。RGBからHSVへの変換方法は既知であるので説明は省略する。次にS303で、肌色閾値決定部103は、HSVそれぞれの平均と標準偏差を計算する。 In S302, the skin color threshold determination unit 103 obtains HSV color information from the RGB values for all pixels within the set face frame ellipse. The method of converting from RGB to HSV is known, so a description thereof will be omitted. Next, in S303, the skin color threshold determination unit 103 calculates the average and standard deviation for each of the HSV values.

肌色閾値決定部103は、S304でHの標準偏差が目標値以下であるか判定し、S305では肌色閾値決定部103は、Vの標準偏差が目標値以下であるか判定する。どちらかが目標値より大きいときはS308に進み顔枠楕円を縮小し、S303で縮小した顔枠楕円内の画素のHSVの平均と標準偏差を求める。HSVの値は最初の顔枠楕円内の画素すべてで求められているので、再度計算する必要はない。図5(B)の408、409と図5(C)の412~412が縮小した顔枠楕円の例である。楕円を縮小する時、縦は横の1/2の比率で縮小するようにしてもよい。楕円比率0.85は縦1横0.85、楕円比率0.80は縦0.975横0.80となる。 In S304, the skin color threshold determination unit 103 determines whether the standard deviation of H is equal to or less than the target value, and in S305, the skin color threshold determination unit 103 determines whether the standard deviation of V is equal to or less than the target value. If either is greater than the target value, the process proceeds to S308, where the face frame ellipse is reduced, and the average and standard deviation of the HSV of the pixels in the face frame ellipse reduced in S303 are calculated. Since the HSV values have been calculated for all pixels in the original face frame ellipse, there is no need to calculate them again. 408 and 409 in FIG. 5(B) and 412-412 in FIG. 5(C) are examples of reduced face frame ellipses. When reducing an ellipse, the vertical size may be reduced at a ratio of 1/2 the horizontal size. An ellipse ratio of 0.85 is 1 vertical size and 0.85 horizontal size, and an ellipse ratio of 0.80 is 0.975 vertical size and 0.80 horizontal size.

HとVの両方の標準偏差が目標値以下になれば、S306に進み、肌色閾値決定部103は、HとSの閾値(範囲)を設定する。閾値は平均の値を中心として、標準偏差に所定倍数Aを乗算した値を使い、平均から減算した値を下限の閾値(範囲の最小値)とし、平均から加算した値を上限の閾値(範囲の最大値)とする。なお、Sの閾値決定において、Hの所定倍数Aとは別の、所定倍数A2を設けて範囲を決定するようにしてもよい。 When the standard deviations of both H and V are below the target value, the process proceeds to S306, where the skin color threshold determination unit 103 sets the thresholds (range) for H and S. The thresholds are centered on the average value and use the standard deviation multiplied by a predetermined multiple A, with the value subtracted from the average set as the lower threshold (minimum value of the range) and the value added to the average set as the upper threshold (maximum value of the range). Note that when determining the threshold for S, a predetermined multiple A2 separate from the predetermined multiple A for H may be set to determine the range.

S307では、肌色閾値決定部103は、Vの閾値を決定する。HSと同様の方法で閾値を決定してもよいが、顔画像ではVの標準偏差はHやSより大きくなる傾向があり、HやSと同じ倍数で範囲を決定すると範囲が広くなる。明度Vの平均の値が目標値の下限を示す第一の所定値と、目標値の上限を示す第二の所定値の範囲内では、予め設定した固定値を使用する。平均の値が第一の所定値より小さい場合、統計値に基づいて閾値を決定する。すなわち、所定倍数Bを標準偏差に乗算したものを平均の値から減算して下限の閾値とする。上限の閾値は固定のままである。また、Vの平均の値が第二の所定値より大きい場合、統計値に基づいて閾値を決定する。すなわち、所定倍数Bを標準偏差に乗算したものを平均から減算して下限の閾値とし、所定倍数Cを標準偏差に乗算したものを平均に加算した値を上限の閾値とする。所定倍数A,B,Cは実験的に求めたものを使用する。 In S307, the skin color threshold determination unit 103 determines the threshold value of V. The threshold value may be determined in the same manner as for HS, but in face images, the standard deviation of V tends to be larger than that of H or S, and the range will be wider if the same multiple as H or S is used. When the average value of brightness V is within a range between a first predetermined value indicating the lower limit of the target value and a second predetermined value indicating the upper limit of the target value, a fixed value set in advance is used. If the average value is smaller than the first predetermined value, the threshold value is determined based on a statistical value. That is, the value obtained by multiplying the standard deviation by a predetermined multiple B is subtracted from the average value to determine the lower limit threshold. The upper limit threshold remains fixed. Also, if the average value of V is larger than the second predetermined value, the threshold value is determined based on a statistical value. That is, the value obtained by multiplying the standard deviation by a predetermined multiple B is subtracted from the average to determine the lower limit threshold, and the value obtained by multiplying the standard deviation by a predetermined multiple C is added to the average to determine the upper limit threshold. The predetermined multiples A, B, and C are determined experimentally.

なお、S304でHの標準偏差が目標値以下であるか判定し、S305ではVの標準偏差が目標値以下であるか判定するが、どちらかが先に目標時以下になった場合、その時の平均と標準偏差を保持し、閾値決定では目標値以下になった時の平均と標準偏差を使うようにしてもよい。なお、S304とS305でHとVの標準偏差が目標値以下であるかの判定を行っているが、Sについても個別の目標値を設定し目標値以下であるかの判定を行うようにしてもよい。 Note that in S304 it is determined whether the standard deviation of H is below the target value, and in S305 it is determined whether the standard deviation of V is below the target value, but if either of them falls below the target value first, the average and standard deviation at that time may be retained, and the average and standard deviation at the time when they fell below the target value may be used in determining the threshold. Note that in S304 and S305 it is determined whether the standard deviations of H and V are below the target value, but a separate target value may also be set for S to determine whether it is below the target value.

図6が顔枠楕円の縮小を行っているときの楕円比率とHSVの平均と標準偏差の例である。目標値以下になった時に、各上限と下限の値が求められて追尾毎に閾値が設定される。この例では、所定倍数Aは2.0であり、Bは0.6、Cは2.0である。なお、縮小する楕円比率については、一定間隔で小さくしてもよい。なお、顔枠楕円の縮小率については、所定の割合で大きくしてもよい。また目標値に遠いときには縮小率の変化のさせ方を大きく、目標値に近づけば縮小率の変化を小さくするようにしてもよい。 Figure 6 shows an example of the ellipse ratio and the average and standard deviation of HSV when the face frame ellipse is being reduced. When it falls below the target value, the upper and lower limit values are found and a threshold is set for each tracking. In this example, the predetermined multiple A is 2.0, B is 0.6, and C is 2.0. The ellipse ratio to be reduced may be decreased at regular intervals. The reduction rate of the face frame ellipse may be increased by a predetermined proportion. Also, the reduction rate may be changed more greatly when the target value is far away, and less greatly when the target value is approached.

以上のように、人物毎あるいは撮影環境ごとに肌色の閾値を決定することができるため、撮影条件が一定でない状況においても、画像から精度よく脈拍推定できる。 As described above, the skin color threshold can be determined for each person or shooting environment, so pulse rate can be estimated accurately from images even in situations where shooting conditions are not constant.

<実施形態2>
実施形態1では、S206において、楕円内のすべての画素について平均と標準偏差を求めている。この場合、前髪が顔にかかっていたり、眼鏡やフェイスマスク等の装飾品を装着していたりすると、顔枠楕円内に肌色以外の色が混ざり、各色情報が目標値に達しないことがある。その場合、楕円の形状を置換して、各色情報の平均と標準偏差を求めるようにしてもよい。
<Embodiment 2>
In the first embodiment, in S206, the average and standard deviation are calculated for all pixels within the ellipse. In this case, if the person has bangs covering the face or is wearing accessories such as glasses or a face mask, colors other than skin color may be mixed into the face frame ellipse, and each color information may not reach the target value. In that case, the shape of the ellipse may be replaced to calculate the average and standard deviation of each color information.

図7は、S206における、顔枠楕円の形状を置換する場合に画像処理装置が実行する処理を説明するフローチャートである。S301からS308までの処理は図4の対応する符号の処理と同じなので説明を省略する。 Figure 7 is a flowchart explaining the processing executed by the image processing device when replacing the shape of the face frame ellipse in S206. The processing from S301 to S308 is the same as the processing indicated by the corresponding symbols in Figure 4, so the explanation is omitted.

S601では、肌色閾値決定部103は、楕円比率が所定値以下(縮小率が所定値以上)であるかの判断を行う。所定値以下である場合、S602で楕円形状置換を行う。図7の701~703が置換候補の楕円形状である。灰色の部分の画素については平均と標準偏差を求める対象とはしない。701は前髪がかかっているもの、702がフェイスマスクを装着しているもの、703がサングラスを装着しているものである。なお、この組み合わせを作成してもよい。変更する形状は任意で選択され、その形状で楕円比率が所定値以下になった場合、別の形状の変形領域を楕円領域に設定する。S603で、肌色閾値決定部103は、楕円比率設定を行い初期の楕円比率にもどし、S303へ進み処理を繰り返す。 In S601, the skin color threshold determination unit 103 judges whether the ellipse ratio is equal to or less than a predetermined value (the reduction ratio is equal to or greater than a predetermined value). If it is equal to or less than the predetermined value, ellipse shape replacement is performed in S602. 701 to 703 in FIG. 7 are replacement candidate ellipse shapes. The pixels in the gray area are not included in the calculation of the average and standard deviation. 701 is an image with bangs, 702 is an image with a face mask, and 703 is an image with sunglasses. It is possible to create combinations of these shapes. The shape to be changed is selected arbitrarily, and if the ellipse ratio for that shape falls below the predetermined value, a deformation area of a different shape is set as the ellipse area. In S603, the skin color threshold determination unit 103 sets the ellipse ratio to return to the initial ellipse ratio, and proceeds to S303 to repeat the process.

また、顔検出を補完するものとして装着物を検出する手段を合わせてもよい。その場合最初から対応する楕円形状が選択される。例えば、顔検出部102において、顔の検出と同時に、顔を遮蔽する物体を検出する検出器を用いて装着物(マスク、眼鏡、サングラス等)や前髪といった特定物体を検出する。特定物体が検出された場合は、肌色閾値決定部103は、その特定物体に応じてそれぞれに対応する異なる変形領域を設定する。 Furthermore, a means for detecting attached items may be combined to complement face detection. In that case, a corresponding elliptical shape is selected from the beginning. For example, in the face detection unit 102, a detector that detects objects that obscure the face is used to detect specific objects such as attached items (masks, glasses, sunglasses, etc.) or bangs at the same time as face detection. When a specific object is detected, the skin color threshold determination unit 103 sets a different deformation area that corresponds to each specific object.

以上のように、顔の肌色領域を遮蔽するような装着物がある場合は、設定する顔枠楕円の形状を他の形状に置換する。これによって、肌色以外の色を抑制して肌色領域を設定できるため、肌色の閾値を設定しやすく、脈拍推定の精度が向上する。 As described above, if an object is attached that obscures the skin-colored area of the face, the shape of the face frame ellipse to be set is replaced with another shape. This allows the skin-colored area to be set while suppressing colors other than skin color, making it easier to set the skin color threshold and improving the accuracy of pulse rate estimation.

<実施形態3>
背景の色が肌色に似ており、肌色と定義される色情報の範囲に含まれる場合、決定された閾値で肌色領域を求めると背景までも含めて色相平均値を求めてしまうことがある。その場合は、脈拍推定の精度が低下する可能性がある。そのため、肌色閾値を決定した際に、背景色との混同具合を調べ、混同が起こる場合に背景領域を場外するための背景マスクを作成し、それ以後の肌色領域検出対象から除外するようにしてもよい。
<Embodiment 3>
If the color of the background is similar to skin color and is included in the range of color information defined as skin color, the hue average value may be calculated including the background when the skin color region is determined using the determined threshold. In that case, the accuracy of the pulse estimation may decrease. Therefore, when the skin color threshold is determined, the degree of confusion with the background color may be checked, and if confusion occurs, a background mask may be created to exclude the background region from the target of subsequent skin color region detection.

図9は、背景領域をマスクする処理を実行する画像処理装置1を示すブロック図である。101~108は図1の画像処理装置と同じ構成なので説明は省略する。背景マスク設定部801は、画像における色情報に基づいたヒストグラムを用いて、背景領域に対してマスクを設定する。 Figure 9 is a block diagram showing an image processing device 1 that executes processing to mask a background region. Components 101 to 108 have the same configuration as the image processing device in Figure 1, so a description thereof will be omitted. A background mask setting unit 801 sets a mask for the background region using a histogram based on color information in the image.

図10は、画像処理装置1が実行する処理を説明するためのフローチャートである。S201~S211は図2と同じなので説明は省略する。S901では、肌色領域検出部104が、決定された肌色閾値を用いてS901で肌色領域検出を行う。背景マスク設定部801は、S902で背景マスク設定を行う。背景色と顔の肌の色の混同が起こる場合に背景マスクが設定されるようにしてもよいし、背景と顔の混同がない場合でも背景マスクを設定するようにしてもよい。S902の処理の詳細は後述する。 Figure 10 is a flowchart for explaining the processing executed by the image processing device 1. S201 to S211 are the same as in Figure 2, so their explanation will be omitted. In S901, the skin color area detection unit 104 performs skin color area detection using the determined skin color threshold value. The background mask setting unit 801 sets the background mask in S902. The background mask may be set when there is confusion between the background color and the skin color of the face, or may be set even when there is no confusion between the background and the face. The processing of S902 will be described in detail later.

S903で、肌色領域検出部104は、設定された背景マスクの有無を判定する。背景マスクがある場合にはS904で顔枠内にある画素に対して背景マスクを適用して肌色領域の検出対象から除外し、S208へ進む。つまり、肌色領域検出部104は、前記背景マスクに含まれない領域から、肌色領域を抽出する。背景マスクがない場合には、そのままS208へ進む。 In S903, the skin color region detection unit 104 determines whether or not a background mask has been set. If a background mask is present, in S904 the background mask is applied to the pixels within the face frame to exclude them from the detection of the skin color region, and the process proceeds to S208. In other words, the skin color region detection unit 104 extracts the skin color region from the region not included in the background mask. If no background mask is present, the process proceeds directly to S208.

図11が背景マスクの例を示す図であり、図12が背景マスク設定処理(S902)のフローチャートである。図11の顔画像1001は背景と顔の肌色が似ている例である。 Figure 11 shows an example of a background mask, and Figure 12 is a flowchart of the background mask setting process (S902). A face image 1001 in Figure 11 is an example where the background and the skin color of the face are similar.

図12のS1101で、背景マスク設定部801は、画像の横軸方向における肌色画素数の分布を示すヒストグラムを生成する。図10の1002が生成されたヒストグラムの例である。x軸が画像の横方向の画素の位置、各X座標上に存在する肌色画素の数がy軸となっている。ここで、両端に近い位置でyの値が落ち込んでいる箇所1003と1004が顔の外側のx座標を示すとみなせる。S1102で、背景マスク設定部801は、生成されたヒストグラムに基づいて、背景と顔の色の混同の有無判定を行う。例えば、ヒストグラムの形状で、両側の谷の位置を外側でyの値が大きくなっているものがある場合、背景色と肌色の混同が起こっていると判定する。顔の端点として、画素数が所定の値より低い2点を選択してもよいし、曲線の傾きに基づいて極小になっている端点を探索してもよい。混同の判定は、具体的には、左側の端点よりX座標が小さい範囲における画素数が端点の画素数より所定の量だけ多い場合や、傾きが負の値である場合は、顔の左半分と背景の色が似ている可能性がある。右側の端点も同様で、右側の端点よりX座標が大きい範囲における画素数を比較することや、その範囲における折れ線グラフの傾きが正の値である場合は、右側の端点は顔の端であって背景が同系色として混同していると判断できる。
その他の方法を用いて顔と背景の境界が表れているかを判定してもよい。
In S1101 of FIG. 12, the background mask setting unit 801 generates a histogram showing the distribution of the number of skin-colored pixels in the horizontal direction of the image. 1002 in FIG. 10 is an example of the generated histogram. The x-axis is the position of the pixel in the horizontal direction of the image, and the number of skin-colored pixels present on each X-coordinate is the y-axis. Here, points 1003 and 1004 where the y value drops near both ends can be considered to indicate the x-coordinates outside the face. In S1102, the background mask setting unit 801 judges whether or not there is confusion between the background and the face color based on the generated histogram. For example, if there is a histogram shape where the y value is large outside the positions of the valleys on both sides, it is judged that there is confusion between the background color and the skin color. As the end points of the face, two points where the number of pixels is lower than a predetermined value may be selected, or an end point where the number of pixels is minimal based on the slope of the curve may be searched for. Specifically, when the number of pixels in the range with the X coordinate smaller than the left end point is a specified amount greater than the number of pixels at the end point, or when the slope is a negative value, it is possible that the left half of the face and the background are similar in color. The same is true for the right end point; by comparing the number of pixels in the range with the X coordinate larger than the right end point, or when the slope of the line graph in that range is a positive value, it can be determined that the right end point is the edge of the face and that the background is confused with a similar color.
Other methods may be used to determine whether the boundary between the face and the background is visible.

S1103で背景肌色混同が起こっていると判断した場合、背景マスク設定部801は、S1104で背景マスクを生成する。ここでは、混同が起こっていないと判断した場合にはマスクを生成しないため、S901の処理を終了する。 If it is determined in S1103 that background skin color confusion has occurred, the background mask setting unit 801 generates a background mask in S1104. Here, if it is determined that no confusion has occurred, no mask is generated, and the process of S901 is terminated.

背景マスクは、両端に近い位置でyの値が落ち込んでいる箇所を除外するような楕円領域とする。すなわち、ヒストグラムに基づいて背景マスクの幅を決定する。なお、背景マスクの形状は楕円に限らず図8のような形状であってもよい。図11の1005が作成された背景マスクであり、図11の1006が背景マスクを適用した顔画像であり、図9のS904の背景マスク生成処理で作成するものである。なお、背景マスクの形状は楕円に限らず図11の1007のような両脇を除外するものでもよい。 The background mask is an elliptical region that excludes the points where the y value drops near both ends. In other words, the width of the background mask is determined based on a histogram. Note that the shape of the background mask is not limited to an ellipse, but may be a shape as shown in FIG. 8. 1005 in FIG. 11 is the created background mask, and 1006 in FIG. 11 is the face image to which the background mask has been applied, which is created in the background mask generation process of S904 in FIG. 9. Note that the shape of the background mask is not limited to an ellipse, but may be one that excludes both sides, as shown in 1007 in FIG. 11.

なお、背景にいろいろなものが映り、部分的に顔の肌色との混同が起こる場合は、図11の1010のようなヒストグラムが作成される。両側の谷1008、1009の両側に肌色と判断されるものがある。この場合も背景色と肌色の混同が起こっていると判断する。また、作成する背景マスクの大きさが固定だと顔検出枠の大きさの変動が起こった時に使用できないので、谷の位置を全体の大きさに比率で記録し、その比率の楕円を背景マスクとしてその後の顔の大きさに合わせて作り直して適用してもよい。 When various objects are captured in the background and are partially confused with the skin color of the face, a histogram like 1010 in Figure 11 is created. There are objects that are determined to be skin color on both sides of the valleys 1008 and 1009 on both sides. In this case too, it is determined that the background color and skin color are being confused. Also, since a fixed size background mask cannot be used when the size of the face detection frame changes, the position of the valley can be recorded as a ratio to the overall size, and an ellipse of that ratio can be recreated as the background mask to match the size of the face and then applied.

なお、例えば、人が動き背景が変わる場合には、すべてのフレームで背景マスクの適用判断を行うようにしてもよい。その場合、肌色閾値の設定時だけでなく、脈拍推定のフレームで背景と顔の色混同の判断を毎回行う。具体的には、肌色領域検出後、S1103の混同判定を実施し、背景マスクを生成するか否かを決定する。この処理を行うことで、環境の変動がある場合であっても画像による脈拍推定を可能にする。 For example, if a person moves and the background changes, the decision to apply a background mask may be made for every frame. In that case, the decision on whether to confuse the background and face colors is made every time for the pulse estimation frame, not just when the skin color threshold is set. Specifically, after detecting a skin color area, the confusion decision of S1103 is made to determine whether to generate a background mask. By performing this process, pulse estimation from an image is possible even when the environment is changing.

<実施形態4>
実施形態1では、色相Hと明度Vの標準偏差が目標値以下になるまでの統計値を求めて、平均と標準偏差をもとに肌色の範囲の閾値を決定している。しかし、HとVの標準偏差が目標値となっても、彩度Sの標準偏差が大きいままの場合があり、Sの平均値から標準偏差の一定倍数を求めて閾値を決定するとSのとりうる値の最高値や最低値を超えることがある。これはカメラの種類やオートホワイトバランスや照明色や背景色等々の影響により起こる。
<Embodiment 4>
In the first embodiment, statistical values are obtained until the standard deviations of hue H and lightness V fall below the target values, and the threshold value for the skin color range is determined based on the average and standard deviation. However, even if the standard deviations of H and V reach the target values, the standard deviation of saturation S may remain large, and if a threshold value is determined by obtaining a certain multiple of the standard deviation from the average value of S, it may exceed the maximum or minimum value that S can take. This occurs due to the influence of the type of camera, auto white balance, lighting color, background color, etc.

この時、Sの値の最高値や最低値に限定して閾値を設定してもSの閾値の幅が大きくなりすぎ、背景部分までも肌とみなしてしまうことがある。Sの標準偏差が大きくなりすぎ、閾値の幅が大きくなりすぎる場合には、最高値と最低値にマージンを付与した上限マージン値と下限マージン値に限定するようにしてもよい。 In this case, even if the threshold is set by limiting it to the highest or lowest value of S, the threshold range of S may become too wide, and even the background may be regarded as skin. If the standard deviation of S becomes too large and the threshold range becomes too wide, it is also possible to limit it to an upper margin value and a lower margin value that add a margin to the highest and lowest values.

図13は、画像処理装置1が実行する処理を説明するためのフローチャートである。この処理は、図4のS306のHとSの閾値決定処理の中のSの決定に関するものである。図14(B)から(D)が処理の例を示す図である。 Figure 13 is a flowchart for explaining the process executed by the image processing device 1. This process is related to the determination of S in the process of determining the thresholds for H and S in S306 in Figure 4. Figures 14 (B) to (D) are diagrams showing an example of the process.

S1301では、肌色閾値決定部103が、彩度Sの平均値と標準偏差を用いて閾値を決定する。具体的には、下限の閾値(範囲の最小値)は、彩度Sの標準偏差に所定倍数Aを乗算した値を彩度Sの平均値から減算した値とする。また、上限の閾値(範囲の最大値)は、彩度Sの平均値から彩度Sの標準偏差に所定倍数Aを乗算した値を加算した値をとする。図14(B)の画像から肌色閾値を求めた例が図14(A)である。所定倍数Aを2.0としたときの計算例であり、1401にあるように彩度Sの下限の値は-6となっている。彩度Sの取りうる値の最高値と最低値の設定は計算方法で異なるが、この例では、0から255としており、取りうる値の最低値を超えている。この値のまま、もしくは取りうる値の0から255に限定した値を閾値とした場合に、肌色を白、肌色以外を黒として表した図が図14(C)である。背景部分にも肌色とした白い領域が広がっている。 In S1301, the skin color threshold determination unit 103 determines the threshold using the average value and standard deviation of saturation S. Specifically, the lower threshold (minimum value of the range) is the value obtained by subtracting the value obtained by multiplying the standard deviation of saturation S by a predetermined multiple A from the average value of saturation S. The upper threshold (maximum value of the range) is the value obtained by adding the value obtained by multiplying the standard deviation of saturation S by a predetermined multiple A to the average value of saturation S. FIG. 14(A) shows an example of determining the skin color threshold from the image in FIG. 14(B). This is a calculation example when the predetermined multiple A is set to 2.0, and the lower limit of saturation S is -6 as shown in 1401. The maximum and minimum values that saturation S can take are set differently depending on the calculation method, but in this example, the values are set to 0 to 255, which exceeds the minimum value that can be taken. Fig. 14(C) shows the result when the threshold is set to this value or limited to a value between 0 and 255, with skin tones displayed as white and non-skin tones displayed as black. There are also white areas of skin tones in the background.

S1302では、肌色閾値決定部103が、決定された彩度Sの閾値の上限値が、上限マージン値Uthを超えているかどうか判定する。例えば、彩度Sの取りうる値の上限255と平均値の差分の75%の値を平均値に足したものを上限マージン値Uthとする。彩度Sの閾値の上限値がUthより大きい場合には、S1303で上限マージン値Uthを彩度Sの閾値の上限値とする。小さい場合にはS1301で決定された上限値のままである。 In S1302, the skin color threshold determination unit 103 determines whether the upper limit of the determined threshold value of saturation S exceeds the upper limit margin value Uth. For example, the upper limit margin value Uth is determined by adding 75% of the difference between the upper limit of the possible values of saturation S, 255, and the average value to the average value. If the upper limit of the threshold value of saturation S is greater than Uth, the upper limit margin value Uth is determined as the upper limit of the threshold value of saturation S in S1303. If it is smaller, the upper limit determined in S1301 remains unchanged.

S1304では、肌色閾値決定部103が、S1301で決定された閾値の下限値が、下限マージン値より小さいか判定する。例えば、平均値の25%の値を下限マージン値Lthとする。Lthより小さい場合には、S1303でマージンありの下限値Lthを彩度Sの閾値の下限値とする。大きい場合にはS1301で決定された下限値のままである。彩度Sの閾値を下限マージン値に限定した場合の例が図14(D)である。背景部分には肌色とした白い部分がなくなっている。なお、この例ではマージンは平均値をもとに求めているが、固定値でもよいし、平均値と標準偏差を使って求めてもよい。 In S1304, the skin color threshold determination unit 103 determines whether the lower limit of the threshold determined in S1301 is smaller than the lower limit margin value. For example, a value that is 25% of the average value is set as the lower limit margin value Lth. If it is smaller than Lth, the lower limit value with margin Lth is set as the lower limit of the saturation S threshold in S1303. If it is larger, the lower limit determined in S1301 remains as it is. Figure 14 (D) shows an example in which the threshold of saturation S is limited to the lower limit margin value. There are no white areas in the background that are skin color. Note that in this example, the margin is calculated based on the average value, but it may be a fixed value, or it may be calculated using the average value and standard deviation.

<実施形態5>
実施形態2では、標準偏差が目標値に達しない場合には、眼鏡やフェイスマスク等の装飾品を装着している可能性があるとして、楕円の形状を変更している。しかし、カメラの種類やオートホワイトバランスや照明色や背景色等々の影響により、装着物がなくとも色相Hの標準偏差が目標に達しないときがある。目標に達しない場合の標準偏差を使って閾値を決定すると、肌色とする領域が広くなり、背景に肌色とする部分が現れることがある。
<Embodiment 5>
In the second embodiment, when the standard deviation does not reach the target value, it is assumed that the subject may be wearing accessories such as glasses or a face mask, and the shape of the ellipse is changed. However, due to the influence of the camera type, auto white balance, lighting color, background color, etc., the standard deviation of the hue H may not reach the target even if the subject is not wearing an accessory. If the threshold is determined using the standard deviation when the target is not reached, the area that is determined to be skin color may become wider, and parts that are determined to be skin color may appear in the background.

実施形態3では、背景に肌色とする部分が現れる場合に、背景マスクを適用している。この背景マスクは顔がある部分以外を除外するものであるが、顔の形状を正しくとらえたものではなく、背景部分を含んだり、顔部分を除外したりすることがある。肌と背景の色の区別のつく閾値を求めることができるならば、その方が望ましい。 In the third embodiment, a background mask is applied when skin-colored parts appear in the background. This background mask excludes all areas except the face, but does not accurately capture the shape of the face, and may include background parts or exclude face parts. It would be preferable if a threshold value that can distinguish between skin and background colors could be found.

そこで、肌色閾値決定部103が、仮の閾値を決定し、顔があると想定される楕円の内と外との肌色含有率を調べ、楕円の中と外の肌色含有率を見て肌色の閾値を修正するようにしてもよい。楕円外の含有率が一定値以上ならば、閾値の幅を決定する標準偏差の値を小さくして仮の閾値を変更する。楕円内の肌色含有率が小さくなりすぎた場合には、仮の閾値を前のものに戻す。 Therefore, the skin color threshold determination unit 103 may determine a provisional threshold, check the skin color content inside and outside an ellipse in which a face is assumed to be, and modify the skin color threshold based on the skin color content inside and outside the ellipse. If the skin color content outside the ellipse is equal to or greater than a certain value, the standard deviation value that determines the width of the threshold is reduced to change the provisional threshold. If the skin color content inside the ellipse becomes too small, the provisional threshold is returned to the previous value.

図15は、画像処理装置1が実行する処理を説明するためのフローチャートである。閾値修正処理は、図4のフローチャートのS307の処理の後、閾値を決定した後の後処理として行ってもよいし、図7のS601の後の標準偏差が目標値に達しないときの処理として行ってもよい。S601の後に置く場合には閾値修正処理を行って終了となる。 Figure 15 is a flowchart for explaining the processing executed by the image processing device 1. The threshold correction processing may be performed as a post-processing step after the processing of S307 in the flowchart of Figure 4, after the threshold is determined, or may be performed as a processing step after S601 in Figure 7, when the standard deviation does not reach the target value. If placed after S601, the threshold correction processing is performed and then the process ends.

図16の(A)から(F)が処理の一例を示す図である。 Figure 16 (A) to (F) show an example of the process.

S1501では、肌色閾値決定部103が、肌色の閾値を仮決めする。仮決めの方法は図4のフローチャートの肌色閾値決定の方法と同じである。図16(B)の画像を使って決定される閾値の例が図16(A)である。1601が色相Hの標準偏差で目標値より大きい。1602が彩度Sの標準偏差でやや大きめである。なお、この例では色相Hの目標値は12、彩度Sの目標値は20とする。 In S1501, the skin color threshold determination unit 103 provisionally determines a skin color threshold. The provisional determination method is the same as the skin color threshold determination method in the flowchart of FIG. 4. FIG. 16(A) shows an example of thresholds determined using the image of FIG. 16(B). 1601 is the standard deviation of hue H, which is larger than the target value. 1602 is the standard deviation of saturation S, which is slightly larger. In this example, the target value of hue H is 12, and the target value of saturation S is 20.

S1502では、肌色領域検出部104が、決定された閾値を使って顔を示す楕円の内と外の肌色含有率を求める。図16(C)が肌色とした部分を白、肌色以外とした部分を黒で示した図である。図16(D)が内と外を分ける楕円1608を置いた図である。この時の楕円は、閾値決定の最初に使われる楕円であり、閾値を決定するために絞り込んで小さくなっている楕円ではない。 In S1502, the skin color area detection unit 104 uses the determined threshold value to determine the skin color content inside and outside the ellipse that indicates the face. FIG. 16(C) is a diagram in which the parts determined to be skin color are shown in white, and the parts that are not skin color are shown in black. FIG. 16(D) is a diagram in which an ellipse 1608 is placed to separate the inside and outside. The ellipse in this case is the ellipse used initially to determine the threshold value, and is not the ellipse that has been narrowed down and made smaller in order to determine the threshold value.

S1503では、肌色領域検出部104が、楕円外の肌色含有率が一定値Othを超えているか判定する。この例では、Othを10%とする。超えていない場合は、S1504へ進み、仮の閾値を肌色閾値として設定する。 In S1503, the skin color area detection unit 104 determines whether the skin color content rate outside the ellipse exceeds a certain value Oth. In this example, Oth is set to 10%. If it does not exceed the value, the process proceeds to S1504, where the provisional threshold value is set as the skin color threshold value.

図16(A)の楕円外の肌色含有率1603は40%であり、一定値Othを超えている。超えている場合は、S1505へ進み、肌色閾値決定部103が、閾値の幅を決定する標準偏差の値が縮小可能であるか判断する。本実施形態では、閾値の幅を決定するために色相Hの標準偏差の値を使用している。この値を縮小した段階で統計値の意味をなさなくなるが、便宜的に標準偏差という言葉を使う。また、この例では、縮小可能な値は目標値の1.2倍以上とし、縮小は1回のみで目標値の1.2倍より小さくできないとしている。縮小が可能な場合には、S1507へ進み、楕円内の肌色含有率が一定値Ithより大きいか判断する。この例ではIthは50%とする。図16(A)の色相Hの標準偏差の値は縮小可能でありかつ楕円内の肌色含有率1604が64%で一定値Ithより大きい。S1509で標準偏差の値を縮小し、S1501に戻り処理を繰り返す。図16(A)の1605と1606は縮小された値である。なお、縮小はもっと大きな倍数から初めて、何度も繰り返すようにしてよい。 The skin color content rate 1603 outside the ellipse in FIG. 16(A) is 40%, which exceeds the fixed value Oth. If it exceeds, the process proceeds to S1505, where the skin color threshold determination unit 103 determines whether the value of the standard deviation that determines the width of the threshold can be reduced. In this embodiment, the value of the standard deviation of the hue H is used to determine the width of the threshold. When this value is reduced, the statistical value becomes meaningless, but for convenience, the term standard deviation is used. In this example, the value that can be reduced is set to 1.2 times or more of the target value, and reduction is limited to one time and cannot be made smaller than 1.2 times the target value. If reduction is possible, the process proceeds to S1507, where it is determined whether the skin color content rate within the ellipse is greater than a fixed value Ith. In this example, Ith is 50%. The value of the standard deviation of the hue H in FIG. 16(A) can be reduced, and the skin color content rate 1604 within the ellipse is 64%, which is greater than the fixed value Ith. In S1509, the value of the standard deviation is reduced, and the process returns to S1501 and is repeated. In FIG. 16(A), 1605 and 1606 are the reduced values. Note that the reduction can be repeated multiple times starting from a larger multiple.

縮小した標準偏差を使って肌色閾値を求め、S1502で再度肌色含有率を調べた例が図16(E)と(F)である。1609の楕円外の肌色含有率1607は6%と一定値Othより小さいので、S1504で肌色閾値決定部103が閾値を設定して終了する。 Figures 16 (E) and (F) show examples in which the skin color threshold is calculated using the reduced standard deviation, and the skin color content is checked again in S1502. Since the skin color content 1607 outside the ellipse 1609 is 6%, which is smaller than the constant value Oth, the skin color threshold determination unit 103 sets a threshold in S1504 and ends the process.

図17が、縮小可能な範囲内で、背景と肌色の区別がつかなかった例である図17(A)は、図17(B)の画像を使って決定される閾値の例である。図17(A)の1701と1702はともに大きな値である。図17(C)と(D)が肌色とした部分を白、肌色以外とした部分を黒で示した図である。1707の楕円の内と外の肌色含有率を求めると楕円外の肌色含有率1703は50%である。1704と1705のように標準偏差を縮小し、閾値を修正した結果の肌とする部分の分布を示したのが図17(E)と(F)である。図17(F)の楕円1708の内と外との肌色含有率を求めると楕円外の肌色含有率1706は32%で、一定値Othを超えている。S1504で縮小可能か調べるが、目標値の1.2倍への縮小が終わっており、それ以上の縮小は不可である。S1506へ進み、楕円の外側を脈拍推定の範囲外とする背景マスクを設定し、S1504へ進み、仮の閾値を肌色閾値として設定する。 Figure 17 shows an example where the background and skin color cannot be distinguished within the range that can be reduced. Figure 17(A) shows an example of a threshold value determined using the image in Figure 17(B). 1701 and 1702 in Figure 17(A) are both large values. Figures 17(C) and (D) show the skin color parts in white and the non-skin color parts in black. When the skin color content rate inside and outside the ellipse in 1707 is calculated, the skin color content rate outside the ellipse 1703 is 50%. Figures 17(E) and (F) show the distribution of the skin parts as a result of reducing the standard deviation as in 1704 and 1705 and correcting the threshold value. When the skin color content rate inside and outside the ellipse 1708 in Figure 17(F) is calculated, the skin color content rate outside the ellipse 1706 is 32%, which exceeds the fixed value Oth. S1504 checks whether the image can be reduced, but the image has already been reduced to 1.2 times the target value, and further reduction is not possible. Proceed to S1506, set a background mask that excludes the area outside the ellipse from the range of pulse rate estimation, and proceed to S1504, where the provisional threshold is set as the skin color threshold.

図17(G)の1709が背景マスクの例である。 1709 in Figure 17(G) is an example of a background mask.

図18の(A)から(G)が、標準偏差の縮小で肌色の幅が狭くなりすぎ、顔の中に肌色でないとする領域が増えるのを防ぐ例である。図18(B)の画像から肌色閾値を求める。図18(A)の1801、1802の値は、やや大きい。図18(C)と(D)が肌色とした部分を白、肌色以外とした部分を黒で示した図である。図18(C)にあるように背景に肌色とする領域が少しある。図18(D)の楕円1809の楕円外の肌色含有率1803は12%で、一定値Othよりやや大きい。標準偏差を1807、1808に縮小して、肌色を求める。閾値を修正した結果の肌とする部分の分布を示したのが図18(E)と(F)である。図18(E)のように、背景を肌色とする領域は減っているが、顔の中に肌色でない領域が増えている。図18(F)の楕円1810の楕円内の肌色含有率1806は47%となり、一定値Ithより小さくなっている。 Figures 18A to 18G show an example of preventing the skin color range from becoming too narrow due to the reduction in standard deviation, resulting in an increase in areas of the face that are not skin colored. The skin color threshold is calculated from the image in Figure 18B. The values of 1801 and 1802 in Figure 18A are somewhat large. Figures 18C and 18D show the areas that are skin colored in white and the areas that are not skin colored in black. As shown in Figure 18C, there are some areas in the background that are skin colored. The skin color content 1803 outside the ellipse 1809 in Figure 18D is 12%, which is somewhat larger than the constant value Oth. The standard deviation is reduced to 1807 and 1808 to calculate the skin color. Figures 18E and 18F show the distribution of areas that are skin colored as a result of correcting the threshold. As shown in Figure 18E, the areas that are skin colored in the background have decreased, but the areas that are not skin colored in the face have increased. The skin color content 1806 within the ellipse 1810 in Figure 18 (F) is 47%, which is smaller than the constant value Ith.

S1507では、肌色閾値決定部103が、楕円内の肌色含有率が、一定値Ithより小さいと判定した場合、S1508へ進み、仮の閾値をもとの値に戻す。図18(A)の1807、1808は、1801、1802と同じ値になっている。次にS1506へ進み楕円の外側を脈拍推定の範囲外とする背景マスクを設定する。図18(G)の1811がその背景マスクである。次にS1504で仮の閾値を肌色閾値として設定する。なお、標準偏差を縮小する過程を経ずに、S1508に来た場合には、肌色閾値決定部103は仮の閾値は変更しない。 In S1507, if the skin color threshold determination unit 103 determines that the skin color content rate within the ellipse is smaller than a certain value Ith, the process proceeds to S1508, where the provisional threshold is restored to its original value. 1807 and 1808 in FIG. 18(A) have the same values as 1801 and 1802. Next, the process proceeds to S1506, where a background mask is set to exclude the area outside the ellipse from the range of pulse estimation. 1811 in FIG. 18(G) is this background mask. Next, in S1504, the provisional threshold is set as the skin color threshold. Note that if S1508 is reached without going through the process of reducing the standard deviation, the skin color threshold determination unit 103 does not change the provisional threshold.

なお、顔と背景部分の肌色含有率を調べるため楕円を使用しているが、楕円の下部に首の位置に該当する四角形の領域を加え、その領域も楕円内として計測するようにしてもよい。 Note that an ellipse is used to check the skin color content of the face and background, but a rectangular area corresponding to the neck position can also be added to the bottom of the ellipse and this area can also be measured within the ellipse.

(その他の実施形態)
本発明は、以下の処理を実行することによっても実現される。即ち、上述した実施形態の機能を実現するソフトウェア(プログラム)を、データ通信用のネットワーク又は各種記憶媒体を介してシステム或いは装置に供給する。そして、そのシステム或いは装置のコンピュータ(またはCPUやMPU等)がプログラムを読み出して実行する処理である。また、そのプログラムをコンピュータが読み取り可能な記録媒体に記録して提供してもよい。
Other Embodiments
The present invention can also be realized by executing the following process. That is, software (programs) that realize the functions of the above-described embodiments are supplied to a system or device via a data communication network or various storage media. Then, a computer (or a CPU, MPU, etc.) of the system or device reads and executes the program. The program may also be provided by recording it on a computer-readable recording medium.

なお、上述した各処理部のうち、顔検出部102等については、その代わりとして、機械学習された学習済みモデルを代わりに用いて処理しても良い。その場合には、例えば、その処理部への入力データと出力データとの組合せを学習データとして複数個準備し、それらから機械学習によって知識を獲得し、獲得した知識に基づいて入力データに対する出力データを結果として出力する学習済みモデルを生成する。学習済みモデルは、例えばニューラルネットワークモデルで構成可能である。そして、その学習済みモデルは、前記処理部と同等の処理をするためのプログラムとして、CPUあるいはGPUなどと協働で動作することにより、前記処理部の処理を行う。なお、上記学習済みモデルは、必要に応じて一定の処理後に更新しても良い。 In addition, among the above-mentioned processing units, the face detection unit 102 and the like may instead use a trained model that has been machine-learned for processing. In that case, for example, multiple combinations of input data and output data for the processing unit are prepared as training data, knowledge is acquired from them by machine learning, and a trained model is generated that outputs output data for the input data based on the acquired knowledge. The trained model can be configured, for example, as a neural network model. Then, the trained model performs the processing of the processing unit by operating in cooperation with a CPU or GPU as a program for performing processing equivalent to that of the processing unit. In addition, the trained model may be updated after a certain amount of processing as necessary.

1 画像処理装置
101 画像取得部
102 顔検出部
103 肌色閾値決定部
104 肌色領域検出部
105 色相計算部
106 色相変化管理部
107 脈拍推定部
108 脈拍記録部
REFERENCE SIGNS LIST 1 Image processing device 101 Image acquisition unit 102 Face detection unit 103 Skin color threshold determination unit 104 Skin color area detection unit 105 Hue calculation unit 106 Hue change management unit 107 Pulse estimation unit 108 Pulse recording unit

Claims (21)

画像から検出された人物の脈拍を推定する画像処理装置であって、
画像から特定された顔を含む領域を設定する設定手段と、
前記設定された前記領域に含まれる画素の色情報を取得する取得手段と、
前記取得された前記色情報の各成分が所定の条件を満たすか否かを判定する判定手段と、
前記判定手段によって前記取得された前記色情報が前記所定の条件を満たすと判定された場合、前記領域における前記色情報に基づいて、肌色の範囲を示す閾値を決定する決定手段と、を有し、
前記判定手段によって前記色情報が前記所定の条件を満たさないと判定された場合、前記設定手段は、前記各成分の少なくとも1つの成分に応じて、前記成分が前記所定の条件を満たすまで前記領域のサイズを縮小することを特徴とする画像処理装置。
An image processing device that estimates a pulse rate of a person detected from an image,
A setting means for setting an area including a face identified from an image;
an acquisition means for acquiring color information of pixels included in the set area;
a determination means for determining whether each component of the acquired color information satisfies a predetermined condition;
a determination means for determining a threshold value indicating a skin color range based on the color information in the region when the determination means determines that the acquired color information satisfies the predetermined condition ,
An image processing device characterized in that, when the judgment means judges that the color information does not satisfy the specified condition, the setting means reduces the size of the region depending on at least one of the components until the component satisfies the specified condition .
前記色情報は、色相、彩度、明度を含み、
前記取得手段は、前記領域に含まれる画素について、色相と明度の統計値を取得することを特徴とする請求項1に記載の画像処理装置。
The color information includes hue, saturation, and brightness.
2 . The image processing apparatus according to claim 1 , wherein the acquiring means acquires statistical values of hue and brightness for pixels included in the region.
前記判定手段は、前記所定の条件として、前記領域に含まれる画素における色相と明度の前記統計値が目標値を満たすか否かを判定し、
前記決定手段は、前記領域に含まれる画素における色相と明度の前記統計値が前記目標値を満たす場合に、前記領域における前記色情報から前記閾値を決定することを特徴とする請求項2に記載の画像処理装置。
the determining means determines, as the predetermined condition, whether or not the statistical values of hue and brightness of the pixels included in the region satisfy a target value;
3. The image processing apparatus according to claim 2, wherein the determining means determines the threshold value from the color information in the region when the statistical values of the hue and brightness of the pixels included in the region satisfy the target value.
前記決定手段は、前記閾値を、色相と彩度の前記統計値または、予め設定された固定値に基づいて決定することを特徴とする請求項3に記載の画像処理装置。 The image processing device according to claim 3, characterized in that the determination means determines the threshold value based on the statistical values of hue and saturation or a preset fixed value. 前記統計値は、各色情報の標準偏差及び平均値であって、
前記決定手段は、色相と彩度の標準偏差に基づいて前記閾値を決定する請求項4に記載の画像処理装置。
The statistical values are a standard deviation and an average value of each color information,
The image processing apparatus according to claim 4 , wherein the determining means determines the threshold value based on standard deviations of hue and saturation.
前記決定手段は、前記決定された肌色の閾値のうち彩度の閾値を、前記彩度の平均値から所定の値を加算または減算した値に決定することを特徴とする請求項5に記載の画像処理装置。 The image processing device according to claim 5, characterized in that the determining means determines the saturation threshold value among the determined skin color threshold values to be a value obtained by adding or subtracting a predetermined value from the average saturation value. 前記決定手段は、明度の平均値が、前記目標値の下限を示す第一の所定値と、前記目標値の上限を示す第二の所定値の範囲内であれば、予め設定した固定値に決定し、
明度の平均値が前記第一の所定値より小さい場合または前記第二の所定値よりも大きい場合は、前記統計値に基づいて前記閾値に決定することを特徴とする請求項5または6に記載の画像処理装置。
the determining means determines the average brightness value to be a preset fixed value if the average brightness value is within a range between a first predetermined value indicating a lower limit of the target value and a second predetermined value indicating an upper limit of the target value;
7. The image processing apparatus according to claim 5, wherein when the average brightness value is smaller than the first predetermined value or larger than the second predetermined value, the threshold value is determined based on the statistical value.
前記設定手段は、前記判定手段によって前記色情報が前記所定の条件を満たさないと判定された場合に、前記領域に所定の形状を示す変形領域を設定することを特徴とする請求項1乃至のいずれか1項に記載の画像処理装置。 8. The image processing device according to claim 1, wherein the setting means sets a deformation area showing a predetermined shape in the area when the determination means determines that the color information does not satisfy the predetermined condition. 前記設定手段は、前記領域の大きさが所定値以下になった場合に、前記領域に前記変形領域を設定することを特徴とする請求項に記載の画像処理装置。 9. The image processing apparatus according to claim 8 , wherein said setting means sets said modification area in said area when the size of said area becomes equal to or smaller than a predetermined value. 前記画像から検出された顔を遮蔽する物体を検知する検知手段を更に有し、
前記設定手段は、前記検知された物体に応じて異なる前記変形領域を設定することを特徴とする請求項またはに記載の画像処理装置。
a detection means for detecting an object that is occluding the face detected from the image;
10. The image processing apparatus according to claim 8 , wherein the setting means sets the deformation area differently depending on the detected object.
前記検知手段は、前髪、眼鏡、マスクを検知することを特徴とする請求項10に記載の画像処理装置。 11. The image processing apparatus according to claim 10 , wherein the detection means detects front hair, glasses, and a mask. 前記決定された肌色の前記閾値に基づいて、前記顔を含む入力画像から肌色領域を抽出する抽出手段と、
前記抽出された肌色領域に基づいて、人物の脈拍を推定する推定手段と、を更に有することを特徴とする請求項1乃至11のいずれか1項に記載の画像処理装置。
an extraction means for extracting a skin color area from an input image including the face based on the determined skin color threshold;
12. The image processing apparatus according to claim 1 , further comprising: an estimation unit for estimating a pulse rate of a person based on the extracted skin-tone area.
前記顔の追尾を行う追尾手段を更に有し、
前記推定手段は、前記追尾された顔について脈拍を推定することを特徴とする請求項12に記載の画像処理装置。
The face tracking device further includes a tracking means for tracking the face,
The image processing device according to claim 12 , wherein the estimation means estimates a pulse rate for the tracked face.
前記入力画像に対して背景マスクを生成する生成手段を更に有し、
前記抽出手段は、前記背景マスクに含まれない領域から、前記肌色領域を抽出することを特徴とする請求項12または13に記載の画像処理装置。
A generating means for generating a background mask for the input image,
14. The image processing apparatus according to claim 12 , wherein the extraction means extracts the skin color area from an area not included in the background mask.
前記決定された肌色の閾値を用いて算出された、前記領域における肌色の含有率とまたは前記領域外における肌色の含有率に応じて、前記決定された肌色の閾値を更新する更新手段を更に有することを特徴とする請求項14に記載の画像処理装置。 15. The image processing device according to claim 14, further comprising an update means for updating the determined skin color threshold value in accordance with a skin color content rate in the region or a skin color content rate outside the region , calculated using the determined skin color threshold value. 前記更新手段は、前記領域外における肌色の含有率が所定値より大きく、かつ、前記領域における肌色の含有率が所定値より大きいと判定した場合に、前記決定された肌色の閾値を小さくすること、を特徴とする請求項15に記載の画像処理装置。 16. The image processing device according to claim 15, wherein the updating means reduces the determined skin color threshold value when it is determined that the skin color content rate outside the region is greater than a predetermined value and that the skin color content rate in the region is greater than a predetermined value. 前記更新手段は、前記領域外における肌色の含有率が所定値より大きく、かつ、前記領域における肌色の含有率が所定値より小さいと判定した場合に、前記決定された肌色の閾値を更新しないことを特徴とする請求項15または16に記載の画像処理装置。 17. The image processing device according to claim 15, wherein the updating means does not update the determined skin color threshold value when it determines that the skin color content rate outside the region is greater than a predetermined value and that the skin color content rate in the region is smaller than a predetermined value. 前記生成手段は、前記更新手段によって前記領域外における肌色の含有率が所定値より大きいと判断された場合に、前記入力画像に対して背景マスクを生成することを特徴とする請求項15乃至17のいずれか1項に記載の画像処理装置。 18. The image processing device according to claim 15 , wherein the generating means generates a background mask for the input image when the updating means determines that the content rate of skin color outside the region is greater than a predetermined value. 前記生成手段は、前記領域に含まれる画素の色情報に基づいて、前記決定された閾値に含まれる画素の数を示すヒストグラムを生成し、前記ヒストグラムに基づいて前記背景マスクを生成することを特徴とする請求項14乃至18のいずれか1項に記載の画像処理装置。 19. The image processing device according to claim 14, wherein the generating means generates a histogram indicating the number of pixels included in the determined threshold based on color information of pixels included in the region, and generates the background mask based on the histogram. 画像から検出された人物の脈拍を推定する画像処理方法であって、
画像から特定された顔を含む領域を設定する設定工程と、
前記設定された前記領域に含まれる画素の色情報を取得する取得工程と、
前記取得された前記色情報の各成分が所定の条件を満たすか否かを判定する判定工程と、
前記取得された前記色情報が前記所定の条件を満たすと判定された場合、前記領域における前記色情報に基づいて、肌色の範囲を示す閾値を決定する決定工程と、を有し、
前記判定工程において前記色情報が前記所定の条件を満たさないと判定された場合、前記設定工程において、前記各成分の少なくとも1つの成分に応じて、前記成分が前記所定の条件を満たすまで前記領域のサイズを縮小することを特徴とする画像処理方法。
1. An image processing method for estimating a pulse rate of a person detected from an image, comprising:
A setting step of setting an area including a face identified from the image;
acquiring color information of pixels included in the set area;
a determination step of determining whether each component of the acquired color information satisfies a predetermined condition;
a determination step of determining a threshold value indicating a skin color range based on the color information in the region when the acquired color information is determined to satisfy the predetermined condition ,
An image processing method characterized in that, if it is determined in the judgment process that the color information does not satisfy the specified condition, in the setting process, a size of the region is reduced depending on at least one of the components until the component satisfies the specified condition .
コンピュータを、請求項1乃至19のいずれか1項に記載の画像処理装置が有する各手段として機能させるためのプログラム。 A program for causing a computer to function as each of the means included in the image processing apparatus according to any one of claims 1 to 19 .
JP2021152320A 2021-03-26 2021-09-17 Image processing device, image processing method, and program Active JP7707004B2 (en)

Priority Applications (4)

Application Number Priority Date Filing Date Title
US17/701,502 US12243272B2 (en) 2021-03-26 2022-03-22 Image processing apparatus, image processing method, and storage medium
EP22163676.4A EP4064230A1 (en) 2021-03-26 2022-03-22 Image processing apparatus, image processing method, computer program and storage medium
KR1020220037215A KR102871728B1 (en) 2021-03-26 2022-03-25 Image processing apparatus, image processing method, and storage medium
CN202210306506.XA CN115131696A (en) 2021-03-26 2022-03-25 Image processing apparatus, image processing method, and storage medium

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2021053208 2021-03-26
JP2021053208 2021-03-26

Publications (3)

Publication Number Publication Date
JP2022151510A JP2022151510A (en) 2022-10-07
JP2022151510A5 JP2022151510A5 (en) 2024-09-19
JP7707004B2 true JP7707004B2 (en) 2025-07-14

Family

ID=83465534

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2021152320A Active JP7707004B2 (en) 2021-03-26 2021-09-17 Image processing device, image processing method, and program

Country Status (1)

Country Link
JP (1) JP7707004B2 (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004152144A (en) 2002-10-31 2004-05-27 Toyota Motor Corp Image processing method and image processing apparatus
CN105147274A (en) 2015-08-04 2015-12-16 河北工业大学 Method for extracting heart rate from visible spectrum section face video signal
WO2016159150A1 (en) 2015-03-31 2016-10-06 株式会社エクォス・リサーチ Pulse wave detection device and pulse wave detection program

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004152144A (en) 2002-10-31 2004-05-27 Toyota Motor Corp Image processing method and image processing apparatus
WO2016159150A1 (en) 2015-03-31 2016-10-06 株式会社エクォス・リサーチ Pulse wave detection device and pulse wave detection program
CN105147274A (en) 2015-08-04 2015-12-16 河北工业大学 Method for extracting heart rate from visible spectrum section face video signal

Also Published As

Publication number Publication date
JP2022151510A (en) 2022-10-07

Similar Documents

Publication Publication Date Title
JP7151814B2 (en) Information processing device, information processing method and program
JP4307496B2 (en) Facial part detection device and program
US9111132B2 (en) Image processing device, image processing method, and control program
US6885760B2 (en) Method for detecting a human face and an apparatus of the same
US7321668B2 (en) Object detection apparatus, object detection method and computer program product
KR102871728B1 (en) Image processing apparatus, image processing method, and storage medium
KR102458615B1 (en) Skin condition measuring apparatus, skin condition measring system and method thereof
CN110211021B (en) Image processing apparatus, image processing method, and storage medium
JP6784261B2 (en) Information processing equipment, image processing system, image processing method and program
US9323981B2 (en) Face component extraction apparatus, face component extraction method and recording medium in which program for face component extraction method is stored
JP4739870B2 (en) Sunglasses detection device and face center position detection device
JP2016001467A (en) Image processing apparatus, image processing method, and image processing program
JP7707004B2 (en) Image processing device, image processing method, and program
JP2015154886A (en) Perceived moistness evaluation device, perceived moistness evaluation method, and perceived moistness evaluation program
JP5822739B2 (en) Image processing apparatus, method, and program
KR100696725B1 (en) How to remove shadows using object symmetry and distance vectors
JP6351550B2 (en) Harness feeling evaluation apparatus, firmness evaluation method, and firmness evaluation program
TWI695326B (en) Object attribute analyzing method and related object attribute analyzing device
JP2013171511A (en) Image processing device, image processing program and storage medium
KR100910754B1 (en) Skin region detection method using grid based approach in real time input image including human body
KR101895390B1 (en) Apparatus and method for evaluating contrast of image
JP2004030006A (en) Eye detection apparatus, eye detection program, recording medium for recording the program, and eye detection method
JP5093540B2 (en) Eye position detection method and detection system
JP2013258513A (en) Measuring device, measurement method, and program
JP5874440B2 (en) Image processing apparatus and image processing program

Legal Events

Date Code Title Description
RD01 Notification of change of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7421

Effective date: 20231213

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20240910

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20240910

TRDD Decision of grant or rejection written
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20250528

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20250603

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20250702

R150 Certificate of patent or registration of utility model

Ref document number: 7707004

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150