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
JP6795062B2 - Detection device, detection method and program - Google Patents
[go: Go Back, main page]

JP6795062B2 - Detection device, detection method and program - Google Patents

Detection device, detection method and program Download PDF

Info

Publication number
JP6795062B2
JP6795062B2 JP2019130422A JP2019130422A JP6795062B2 JP 6795062 B2 JP6795062 B2 JP 6795062B2 JP 2019130422 A JP2019130422 A JP 2019130422A JP 2019130422 A JP2019130422 A JP 2019130422A JP 6795062 B2 JP6795062 B2 JP 6795062B2
Authority
JP
Japan
Prior art keywords
skin color
skin
region
saturation
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
JP2019130422A
Other languages
Japanese (ja)
Other versions
JP2019197579A (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.)
Casio Computer Co Ltd
Original Assignee
Casio Computer Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Casio Computer Co Ltd filed Critical Casio Computer Co Ltd
Priority to JP2019130422A priority Critical patent/JP6795062B2/en
Publication of JP2019197579A publication Critical patent/JP2019197579A/en
Application granted granted Critical
Publication of JP6795062B2 publication Critical patent/JP6795062B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Image Analysis (AREA)

Description

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

従来より、従来、画像に含まれる人物の顔の肌色領域を、HSV色空間の色情報を使用して検出する技術が開示されている(特許文献1参照)。 Conventionally, a technique for detecting a skin color region of a person's face included in an image by using color information in the HSV color space has been disclosed (see Patent Document 1).

特開2011−44132号公報Japanese Unexamined Patent Publication No. 2011-44132

しかしながら、光線の状況によっては、例えば、輝度が高く肌色が飽和してしまったり、濃い影ができたりするような場合、或いは色温度の異なる複数の光源が混ざっているような場合等、本来肌色である領域が肌色領域とは判定できず、適切に肌色領域が検出されない場合があった。 However, depending on the light conditions, for example, when the brightness is high and the skin color is saturated, dark shadows are formed, or when multiple light sources with different color temperatures are mixed, the skin color is originally skin color. In some cases, the skin color region could not be determined to be the skin color region, and the skin color region was not properly detected.

本発明は、このような状況に鑑みてなされたものであり、光線の状況によらず人物の肌色領域を適切に検出することを目的とする。 The present invention has been made in view of such a situation, and an object of the present invention is to appropriately detect a flesh-colored region of a person regardless of the condition of light rays.

上記目的を達成するため、本発明の一態様の検出装置は、
画像の肌色らしさを示す肌色レベルを取得する肌色要素取得手段と、
前記画像に含まれる飽和領域及び前記画像の飽和の度合いを示す飽和レベルを取得する飽和要素取得手段と、
記飽和領域の前記画像に対する割合、設定された割合よりも低いか否かを判定する判定手段と、
前記判定手段により前記飽和領域の割合前記設定された割合より低いと判定されれば、前記肌色レベルに基づいて、前記画像肌色領域を検出し、前記判定手段により前記飽和領域の割合が前記設定された割合より低くないと判定されれば前記肌色レベル及び前記飽和レベルに基づいて肌色領域を検出する肌色領域検出手段と、
を有することを特徴とする
In order to achieve the above object, the detection device of one aspect of the present invention is
A skin color element acquisition means for acquiring a skin color level indicating the skin color of an image, and
A saturation element acquisition means for acquiring a saturation region included in the image and a saturation level indicating the degree of saturation of the image, and
Ratio with respect to the image before Ki飽sum region, determination means for determining whether or not lower than the rate that has been set,
If the determination means determines that the ratio of the saturation region is lower than the set ratio , the skin color region of the image is detected based on the skin color level, and the determination means determines that the ratio of the saturation region is the said. If it is determined that the ratio is not lower than the set ratio, the skin color region detecting means for detecting the skin color region based on the skin color level and the saturation level , and
It is characterized by having .

本発明によれば、光線の状況によらず人物の肌色領域を適切に検出することができる。 According to the present invention, the skin color region of a person can be appropriately detected regardless of the condition of light rays.

本発明の検出装置の一実施形態に係る撮像装置1のハードウェアの構成を示すブロック図である。It is a block diagram which shows the hardware structure of the image pickup apparatus 1 which concerns on one Embodiment of the detection apparatus of this invention. 美肌画像の生成について説明するための模式図である。It is a schematic diagram for demonstrating the generation of a beautiful skin image. 肌マップの作成について説明するための模式図である。It is a schematic diagram for demonstrating the creation of a skin map. 種々の光の環境下での影響を説明するための模式図である。It is a schematic diagram for demonstrating the influence of various lights under the environment. 色相(H)の重み付けの再決定を説明するための模式図である。It is a schematic diagram for demonstrating the redetermination of the weighting of a hue (H). 肌色の飽和領域の判定について説明するための模式図である。It is a schematic diagram for demonstrating the determination of the saturation region of a skin color. 図1の撮像装置1の機能的構成のうち、美肌画像生成処理を実行するための機能的構成を示す機能ブロック図である。It is a functional block diagram which shows the functional configuration for executing the skin-beautifying image generation processing among the functional configurations of the image pickup apparatus 1 of FIG. 図7の機能的構成を有する図1の撮像装置1が実行する美肌画像生成処理の流れを説明するフローチャートである。It is a flowchart explaining the flow of the skin-beautifying image generation processing executed by the image pickup apparatus 1 of FIG. 1 having the functional configuration of FIG. 美肌画像生成処理のうち、肌マップ作成処理の流れを説明するフローチャートである。It is a flowchart explaining the flow of the skin map creation process in the skin-beautifying image generation process.

以下、本発明の実施形態について、図面を用いて説明する。 Hereinafter, embodiments of the present invention will be described with reference to the drawings.

図1は、本発明の検出装置の一実施形態に係る撮像装置1のハードウェアの構成を示すブロック図である。
撮像装置1は、例えば、デジタルカメラとして構成される。
FIG. 1 is a block diagram showing a hardware configuration of an image pickup apparatus 1 according to an embodiment of the detection apparatus of the present invention.
The image pickup device 1 is configured as, for example, a digital camera.

撮像装置1は、図1に示すように、CPU(Central Processing Unit)11と、ROM(Read Only Memory)12と、RAM(Random Access Memory)13と、バス14と、入出力インターフェース15と、撮像部16と、入力部17と、出力部18と、記憶部19と、通信部20と、ドライブ21と、を備えている。 As shown in FIG. 1, the image pickup apparatus 1 includes a CPU (Central Processing Unit) 11, a ROM (Read Only Memory) 12, a RAM (Random Access Memory) 13, a bus 14, an input / output interface 15, and an image pickup. A unit 16, an input unit 17, an output unit 18, a storage unit 19, a communication unit 20, and a drive 21 are provided.

CPU11は、ROM12に記録されているプログラム、又は、記憶部19からRAM13にロードされたプログラムに従って各種の処理を実行する。 The CPU 11 executes various processes according to the program recorded in the ROM 12 or the program loaded from the storage unit 19 into the RAM 13.

RAM13には、CPU11が各種の処理を実行する上において必要なデータ等も適宜記憶される。 Data and the like necessary for the CPU 11 to execute various processes are also appropriately stored in the RAM 13.

CPU11、ROM12及びRAM13は、バス14を介して相互に接続されている。このバス14にはまた、入出力インターフェース15も接続されている。入出力インターフェース15には、撮像部16、入力部17、出力部18、記憶部19、通信部20及びドライブ21が接続されている。 The CPU 11, ROM 12 and RAM 13 are connected to each other via the bus 14. An input / output interface 15 is also connected to the bus 14. An image pickup unit 16, an input unit 17, an output unit 18, a storage unit 19, a communication unit 20, and a drive 21 are connected to the input / output interface 15.

撮像部16は、図示はしないが、光学レンズ部と、イメージセンサと、を備えている。 Although not shown, the image pickup unit 16 includes an optical lens unit and an image sensor.

光学レンズ部は、被写体を撮影するために、光を集光するレンズ、例えばフォーカスレンズやズームレンズ等で構成される。
フォーカスレンズは、イメージセンサの受光面に被写体像を結像させるレンズである。ズームレンズは、焦点距離を一定の範囲で自在に変化させるレンズである。
光学レンズ部にはまた、必要に応じて、焦点、露出、ホワイトバランス等の設定パラメータを調整する周辺回路が設けられる。
The optical lens unit is composed of a lens that collects light, such as a focus lens or a zoom lens, in order to photograph a subject.
The focus lens is a lens that forms a subject image on the light receiving surface of the image sensor. A zoom lens is a lens that freely changes the focal length within a certain range.
The optical lens unit is also provided with peripheral circuits for adjusting setting parameters such as focus, exposure, and white balance, if necessary.

イメージセンサは、光電変換素子や、AFE(Analog Front End)等から構成される。
光電変換素子は、例えばCMOS(Complementary Metal Oxide Semiconductor)型の光電変換素子等から構成される。光電変換素子には、光学レンズ部から被写体像が入射される。そこで、光電変換素子は、被写体像を光電変換(撮像)して画像信号を一定時間蓄積し、蓄積した画像信号をアナログ信号としてAFEに順次供給する。
AFEは、このアナログの画像信号に対して、A/D(Analog/Digital)変換処理等の各種信号処理を実行する。各種信号処理によって、YUV色空間のディジタル信号が生成され、撮像部16の出力信号として出力される。
このような撮像部16の出力信号を、以下、「撮像画像のデータ」と呼ぶ。撮像画像のデータは、CPU11や図示しない画像処理部等に適宜供給される。
The image sensor is composed of a photoelectric conversion element, AFE (Analog Front End), and the like.
The photoelectric conversion element is composed of, for example, a CMOS (Complementary Metal Oxide Semiconductor) type photoelectric conversion element or the like. A subject image is incident on the photoelectric conversion element from the optical lens unit. Therefore, the photoelectric conversion element performs photoelectric conversion (imaging) of the subject image, accumulates an image signal for a certain period of time, and sequentially supplies the accumulated image signal as an analog signal to AFE.
The AFE executes various signal processing such as A / D (Analog / Digital) conversion processing on the analog image signal. By various signal processing, a digital signal in the YUV color space is generated and output as an output signal of the imaging unit 16.
Such an output signal of the imaging unit 16 is hereinafter referred to as “captured image data”. The captured image data is appropriately supplied to the CPU 11 or an image processing unit (not shown).

入力部17は、各種釦等で構成され、ユーザの指示操作に応じて各種情報を入力する。
出力部18は、ディスプレイやスピーカ等で構成され、画像や音声を出力する。
記憶部19は、ハードディスク或いはDRAM(Dynamic Random Access Memory)等で構成され、各種画像のデータを記憶する。
通信部20は、インターネットを含むネットワークを介して他の装置(図示せず)との間で行う通信を制御する。
The input unit 17 is composed of various buttons and the like, and inputs various information according to a user's instruction operation.
The output unit 18 is composed of a display, a speaker, or the like, and outputs an image or sound.
The storage unit 19 is composed of a hard disk, a DRAM (Dynamic Random Access Memory), or the like, and stores various image data.
The communication unit 20 controls communication with another device (not shown) via a network including the Internet.

ドライブ21には、磁気ディスク、光ディスク、光磁気ディスク、或いは半導体メモリ等よりなる、リムーバブルメディア31が適宜装着される。ドライブ21によってリムーバブルメディア31から読み出されたプログラムは、必要に応じて記憶部19にインストールされる。また、リムーバブルメディア31は、記憶部19に記憶されている画像のデータ等の各種データも、記憶部19と同様に記憶することができる。 A removable medium 31 made of a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is appropriately mounted on the drive 21. The program read from the removable media 31 by the drive 21 is installed in the storage unit 19 as needed. Further, the removable media 31 can also store various data such as image data stored in the storage unit 19 in the same manner as the storage unit 19.

このように構成される撮像装置1では、例えば、輝度が高く肌色が飽和してしまったり、濃い影ができたり、或いは色温度の異なる複数の光源が混ざっている等の光線の状況であっても、人物の肌色領域を適切に検出し、肌色領域のみに美肌処理を施した画像(以下、「美肌画像」という。)を生成することができる機能を有する。 In the image pickup apparatus 1 configured in this way, for example, the brightness is high and the skin color is saturated, dark shadows are formed, or a plurality of light sources having different color temperatures are mixed. Also has a function of appropriately detecting a person's skin color region and generating an image in which only the skin color region is subjected to skin beautification treatment (hereinafter, referred to as "skin beautification image").

[美肌画像の生成]
ここで、美肌画像の生成について説明する。
図2は、美肌画像の生成について説明するための模式図である。
[Generation of beautiful skin image]
Here, the generation of a beautiful skin image will be described.
FIG. 2 is a schematic diagram for explaining the generation of a beautiful skin image.

美肌画像の生成は、図2に示すように、まず、撮像画像のデータから、背景用の画像(以下、「標準画像」という。)と、美肌処理を施す対象となる画像(以下、「全体美肌処理元画像」という。)と、を取得する。この時点で、「標準画像」と「全体美肌処理元画像」との色空間はYUV色空間である。
そして、全体美肌処理元画像に対して、画像全体に美肌処理を施して、全体美肌画像を生成する。また、全体美肌画像の顔における肌色領域を抽出したマップ(以下、「肌マップ」という。)を作成する。
As shown in FIG. 2, the skin-beautifying image is first generated from the captured image data, a background image (hereinafter, referred to as "standard image") and an image to be subjected to skin-beautifying processing (hereinafter, "whole"). "Beautiful skin processing source image") and is acquired. At this point, the color space between the "standard image" and the "overall skin-beautifying source image" is the YUV color space.
Then, the entire image is subjected to the skin-beautifying treatment with respect to the whole skin-beautifying processing original image to generate the entire skin-beautifying image. In addition, a map (hereinafter referred to as "skin map") is created by extracting the skin color area on the face of the entire beautiful skin image.

その後、作成した肌マップを用いて、標準画像と全体美肌画像とをαブレンドする。肌マップを用いて、標準画像と全体美肌画像とをαブレンドした画像は、顔における肌色領域に対して美肌処理を施された画像(以下、「美肌画像」という。)となる。 Then, using the created skin map, the standard image and the overall beautiful skin image are α-blended. An image in which a standard image and an overall skin-beautifying image are α-blended using a skin map is an image in which skin-beautifying treatment is applied to a skin-colored region on the face (hereinafter referred to as “skin-beautifying image”).

[肌マップの作成]
肌マップの作成について説明する。
図3は、肌マップの作成について説明するための模式図である。
[Create skin map]
Explain how to create a skin map.
FIG. 3 is a schematic diagram for explaining the creation of a skin map.

肌マップは、まず、YUV色空間である全体美肌画像を、HSV(色相:Hue,彩度:Saturation・Chroma,明度:Value・Lightness・Brightness)色空間に変換する。HSVに変換した画像からHSVを計測し、各H,S,Vチャンネルの平均値を算出する。
そして、画素におけるH,S,Vのそれぞれについて、図3(a)〜(c)に示すように、平均値からの差分に応じて、予め決定しておいた重み付けから、H,S,Vチャンネルの肌色らしさを示す肌色レベル(Lh,Ls,Lv)を算出する。
その後、算出した各H,S,Vチャンネルの肌色レベルを掛け合わせて、画素における肌マップ値を算出して、肌マップ値により構成される肌マップが作成される。肌マップでは、肌色らしい部分とそうでない部分が段階的に表示される。本例の肌マップでは、図2に示すように、白色が最も肌色らしい部分であり、黒色が最も肌色らしくない部分として表示される。
The skin map first converts the entire skin-beautifying image, which is a YUV color space, into an HSV (hue: Hue, saturation: Saturation / Chroma, brightness: Value / Lightness / Brightness) color space. HSV is measured from the image converted to HSV, and the average value of each H, S, V channel is calculated.
Then, for each of H, S, and V in the pixel, as shown in FIGS. 3A to 3C, H, S, V are obtained from the weighting determined in advance according to the difference from the average value. The skin color level (Lh, Ls, Lv) indicating the skin color of the channel is calculated.
After that, the skin color levels of the calculated H, S, and V channels are multiplied to calculate the skin map value in the pixel, and a skin map composed of the skin map value is created. In the skin map, the parts that look like skin color and the parts that do not look like skin are displayed in stages. In the skin map of this example, as shown in FIG. 2, white is displayed as the most skin-colored part, and black is displayed as the least skin-colored part.

[種々の光の環境下での影響への対応]
肌マップ生成に際して、顔へ均一に光が当たっている場合は、肌色領域を精度よく抽出することができるが、例えば、濃い影ができたり、色温度の異なる複数の光源が混ざっていたりする種々の光の環境下であるような場合には、適切に肌色領域を抽出することができない。適切に肌色領域を抽出することができないと、肌色領域から外れた領域は、美肌処理の対象とならずに、最終的な画像においてノイズとして残ってしまう。
[Response to the effects of various light environments]
When the skin map is generated, if the face is uniformly illuminated, the skin color region can be extracted accurately, but for example, dark shadows are formed or multiple light sources having different color temperatures are mixed. It is not possible to properly extract the skin color region in such a light environment. If the skin color region cannot be properly extracted, the region outside the skin color region will not be the target of the skin beautification treatment and will remain as noise in the final image.

そこで、本実施形態では、以下のように、種々の光の環境への対応を行う。
図4は、種々の光の環境下での影響を説明するための模式図である。ここでは、色相(H)における影響を説明し、図4(a),(b)における肌色レベルは、図3(a)の肌色レベルに対応している。
通常のシーンで撮影された画像では、図4(a)に示すように、色相(H)における頻度の分布が重み付けの既定値内に収まり(算出した肌色レベルに収まり)、適切に肌色領域として抽出することができる。一点鎖線は、平均値より負の方向で頻度が概ね0となる値を示している。
一方、例えば、色温度の異なる複数の光源が混ざっているようなシーンで撮影された画像では、図4(b)に示すように、頻度の山が複数あり、実際の肌色領域でも、色相(H)における頻度の分布(特に、図4(a)の一点鎖線より更に負の方向の矢印の範囲内)が重み付けの既定値内に収まらず(算出した肌色レベルに収まらず)、肌色領域から外れてしまう。
Therefore, in the present embodiment, various light environments are dealt with as follows.
FIG. 4 is a schematic diagram for explaining the influence of various lights under the environment. Here, the influence on the hue (H) will be described, and the skin color levels in FIGS. 4 (a) and 4 (b) correspond to the skin color levels in FIG. 3 (a).
In an image taken in a normal scene, as shown in FIG. 4A, the frequency distribution in hue (H) falls within the default weighting value (fits within the calculated skin color level), and is appropriately used as the skin color region. Can be extracted. The alternate long and short dash line indicates a value in which the frequency is approximately 0 in the negative direction from the average value.
On the other hand, for example, in an image taken in a scene in which a plurality of light sources having different color temperatures are mixed, as shown in FIG. 4 (b), there are a plurality of peaks of frequency, and even in an actual skin color region, the hue ( The frequency distribution in H) (particularly within the range of the arrow in the negative direction from the alternate long and short dash line in FIG. 4A) does not fall within the default weighting value (does not fall within the calculated skin color level), and from the skin color region. It will come off.

そこで、本実施形態では、色相(H)の計測結果のヒストグラムを作成し、当該ヒストグラムの解析結果から、色相(H)の重み付けの係数を再決定する。ヒストグラムを解析して画像に応じた重み付けとすることで、種々の光の環境下でも適切に肌色領域を抽出することができるようになる。 Therefore, in the present embodiment, a histogram of the measurement result of the hue (H) is created, and the weighting coefficient of the hue (H) is redetermined from the analysis result of the histogram. By analyzing the histogram and weighting according to the image, it becomes possible to appropriately extract the skin color region even under various light environments.

図5は、色相(H)の重み付けの再決定を説明するための模式図である。
まず、人の顔の計測領域(本実施形態においては、人の鼻付近)で計測される色相(H)の平均値を算出する。
そして、平均値からの差分に応じて、図5(a)に示すようなヒストグラムを作成する。作成したヒストグラムにおいて正の方向と負の方向に閾値以下になる値(Rangep,Rangem)をサーチして行き、ヒストグラムの解析を行う。
ヒストグラムの解析の結果、サーチされたRangep,Rangemの値に応じて、予め決められていた重み付けを再調整して、決定する。即ち、図5(b)に示すように、Rangep,Rangemの値に応じて、予め決定されていた重み付け(従来設定)の幅を新たに決定した重み付け(新規設定)の幅まで広げることにより調整する。
新たに決定した重み付けに基づいて、色相(H)の肌色領域を抽出することで、種々の光の環境下で撮影された画像でも適切な肌色領域を抽出することができる。即ち、HSV色空間の色情報を使用して肌色レベルを算出し、肌色領域を検出する方法において、従来固定であった色相成分の重み付けを、色相成分の分布に応じて調整して肌色レベルを算出することで、色相成分の分布が広い、濃い影となっている場合や色温度の異なる複数の光源からの光が当たっている場合等の種々の光の環境下でも適切に肌色領域を抽出して対応することができるようになる。
FIG. 5 is a schematic diagram for explaining the redetermination of the weighting of the hue (H).
First, the average value of the hue (H) measured in the measurement area of the human face (in the present embodiment, near the human nose) is calculated.
Then, a histogram as shown in FIG. 5A is created according to the difference from the average value. In the created histogram, the values (Rangep, Rangem) that are below the threshold value are searched in the positive and negative directions, and the histogram is analyzed.
As a result of the analysis of the histogram, the predetermined weighting is readjusted and determined according to the searched Langep and Rangem values. That is, as shown in FIG. 5B, it is adjusted by expanding the width of the predetermined weighting (conventional setting) to the newly determined width of the weighting (new setting) according to the values of Rangep and Rangem. To do.
By extracting the skin color region of hue (H) based on the newly determined weighting, it is possible to extract an appropriate skin color region even in images taken under various light environments. That is, in the method of calculating the skin color level using the color information of the HSV color space and detecting the skin color region, the weighting of the hue component, which has been fixed in the past, is adjusted according to the distribution of the hue component to adjust the skin color level. By calculating, the skin color region can be appropriately extracted even in various light environments such as when the distribution of hue components is wide, dark shadows, or when light from multiple light sources with different color temperatures is shining. You will be able to respond.

[肌の飽和領域への対応]
また、上述したような肌色領域の抽出の手法では、H,S,Vの各チャンネルで肌色を判定しているために、色相(H)が回転してしまい肌色の色相(H)から外れてしまった領域(以下、「飽和領域」という。)では、肌色領域として抽出されないという問題が生じる。本来肌色であるが飽和していて肌色領域として抽出されなかった飽和領域は、美肌処理の対象とならずに、最終的な画像においてノイズとして残ってしまう。
[Correspondence to saturated areas of skin]
Further, in the method of extracting the skin color region as described above, since the skin color is determined in each of the H, S, and V channels, the hue (H) is rotated and deviates from the skin color hue (H). In the closed region (hereinafter referred to as "saturated region"), there arises a problem that it is not extracted as a skin color region. The saturated region, which is originally skin-colored but is saturated and is not extracted as the skin-colored region, is not subject to the skin-beautifying treatment and remains as noise in the final image.

そこで、本実施形態では、肌色領域の抽出に際して、肌色の飽和領域の判定を行う。
図6は、肌色の飽和領域の判定について説明するための模式図である。
肌色の飽和領域は、図6(a)及び図6(b)に示すように、高明度領域と、低彩度領域において、予め設定した重み付けの規定値内に収まっているか否かを判定して行う。画素における明度(V)及び彩度(S)の値における重み付けから飽和レベルが算出される。その後、算出した明度(V)及び彩度(S)の飽和レベルを掛け合わせて、一方で算出した肌色レベルとの比較を行って、値の高い方を肌マップ値として採用して、飽和領域の肌マップを作成する。即ち、従来のHSV色空間の色相成分を使用する肌色領域検出方法では検出されなかった肌色が飽和している部分を、色相成分を除いた明度成分と彩度成分とから算出される飽和レベルを使用して補完する。
Therefore, in the present embodiment, when the skin color region is extracted, the saturated region of the skin color is determined.
FIG. 6 is a schematic diagram for explaining the determination of the saturated region of the skin color.
As shown in FIGS. 6 (a) and 6 (b), it is determined whether or not the saturated skin color region is within the predetermined weighting value in the high brightness region and the low saturation region. To do. The saturation level is calculated from the weighting of the lightness (V) and saturation (S) values in the pixels. After that, the calculated saturation levels of lightness (V) and saturation (S) are multiplied, and on the other hand, the calculated skin color level is compared, and the higher value is adopted as the skin map value to obtain the saturated region. Create a skin map of. That is, the saturation level calculated from the lightness component and the saturation component excluding the hue component is set for the portion where the skin color is saturated, which was not detected by the skin color region detection method using the hue component of the conventional HSV color space. Use to complement.

図7は、図1の撮像装置1の機能的構成のうち、美肌画像生成処理を実行するための機能的構成を示す機能ブロック図である。 FIG. 7 is a functional block diagram showing a functional configuration for executing a skin-beautifying image generation process among the functional configurations of the image pickup apparatus 1 of FIG.

美肌画像生成処理とは、撮像画像のデータから顔の肌色領域にのみ美肌処理を施した美肌画像を生成する一連の処理をいう。
このような美肌画像生成処理は、肌マップ作成処理を含む。
肌マップ作成処理とは、肌色領域を特定するためのマップであり、肌色らしさを示す指標が段階的に表示された肌マップを作成する一連の処理である。肌マップ作成処理で作成される肌マップは、色相(H)において肌色が飽和してしまった領域や、種々の光の環境下で肌色領域から除外されてしまった領域をカバーされたものとなる。
The skin-beautifying image generation process refers to a series of processes for generating a skin-beautifying image in which the skin-beautifying treatment is applied only to the skin color region of the face from the captured image data.
Such a skin-beautifying image generation process includes a skin map creation process.
The skin map creation process is a map for specifying a skin color region, and is a series of processes for creating a skin map in which indicators indicating skin color-likeness are displayed stepwise. The skin map created by the skin map creation process covers the region where the skin color is saturated in the hue (H) and the region excluded from the skin color region under various light environments. ..

美肌画像生成処理を実行する場合には、図7に示すように、CPU11において、画像取得部51と、画像処理部52と、肌マップ作成処理部53と、画像合成部54と、が機能する。 When the skin-beautifying image generation process is executed, as shown in FIG. 7, the image acquisition unit 51, the image processing unit 52, the skin map creation processing unit 53, and the image composition unit 54 function in the CPU 11. ..

また、記憶部19の一領域には、画像記憶部71と、重み付け情報記憶部72と、顔マップ記憶部73と、が設定される。 Further, an image storage unit 71, a weighted information storage unit 72, and a face map storage unit 73 are set in one area of the storage unit 19.

画像記憶部71には、例えば、撮像部16で撮像された撮像画像のデータや、人の顔の肌のみに美肌処理が施された美肌画像等の画像データが記憶される。 The image storage unit 71 stores, for example, data of an captured image captured by the imaging unit 16 and image data such as a skin-beautifying image in which only the skin of a human face is subjected to skin-beautifying treatment.

重み付け情報記憶部72には、肌色レベルを算出するためのHSVの重み付けの係数、飽和レベルを算出するための高明度(V)の領域及び低彩度(S)の領域の重み付けの係数に関する情報が記憶される。 The weighting information storage unit 72 contains information on the HSV weighting coefficient for calculating the skin color level, the weighting coefficient for the high brightness (V) region and the low saturation (S) region for calculating the saturation level. Is memorized.

顔マップ記憶部73には、顔領域のみをαブレンドの対象とするためのマスク画像であり、一般的な顔の形に略一致する楕円形状のマスク画像である顔マップが記憶される。 The face map storage unit 73 stores a face map, which is a mask image for targeting only the face region as an α-blend, and is an elliptical mask image substantially matching a general face shape.

画像取得部51は、処理対象の画像を取得する。具体的には、画像取得部51は、例えば、撮像部16から出力される撮像画像のデータからαブレンド時に肌色領域以外の背景の領域として用いられる標準画像と、顔用の全体美肌処理元画像を取得する。取得先はこれに限らず、画像記憶部71に記憶されている画像のデータから取得してもよいし、通信部20を介して外部装置に記憶されている画像のデータを取得してもよい。 The image acquisition unit 51 acquires an image to be processed. Specifically, the image acquisition unit 51 includes, for example, a standard image used as a background area other than the skin color area at the time of α blending from the image image data output from the image pickup unit 16, and an overall skin beautification processing source image for the face. To get. The acquisition destination is not limited to this, and may be acquired from image data stored in the image storage unit 71, or image data stored in an external device may be acquired via the communication unit 20. ..

画像処理部52は、画像に対して画像処理を施す。具体的には、画像処理部52は、例えば、全体美肌処理元画像の画像全体に対して美肌処理を施して、全体美肌画像を生成する。美肌処理は、例えば、NR(Noise Reduction)フィルタをかけて平滑化するような、種々の人の肌が美肌になる処理であり、公知の美肌処理技術を用いることができる。 The image processing unit 52 performs image processing on the image. Specifically, the image processing unit 52, for example, performs skin-beautifying treatment on the entire image of the whole skin-beautifying processing original image to generate an overall skin-beautifying image. The skin-beautifying treatment is, for example, a treatment for smoothing the skin of various people by applying an NR (Noise Reduction) filter, and a known skin-beautifying treatment technique can be used.

肌マップ作成処理部53は、肌マップ作成処理を実行する。肌マップ作成処理の実行の結果、顔領域における肌色領域で肌色らしさが段階的に特定された肌マップが作成される。 The skin map creation processing unit 53 executes the skin map creation process. As a result of executing the skin map creation process, a skin map in which the skin color-likeness is gradually specified in the skin color area in the face area is created.

肌マップ作成処理部53は、画像の顔の肌に基づいて、多段的に肌色領域を抽出する。
また、肌マップ作成処理部53は、輝度が高く肌色が飽和してしまい、肌色領域として抽出できない領域についても、高輝度領域と、低彩度領域から飽和レベルを算出して、肌マップに肌色領域として抽出することができる。
さらに、肌マップ作成処理部53は、例えば、濃い影が生じた場合や色温度の異なる複数の光源からの光が当たった場合等の種々の光の環境下にも対応するため、色相(H)の重み付けを画像に対応するレンジに調整して、肌色レベルを算出することができる。
これにより、人の顔の肌を基準として肌色領域の他に、通常の手法では抽出できない飽和した肌色領域や種々の光の環境下で抽出できない肌色領域を抽出することができ、人の顔の肌の領域のみに適切に美肌処理が施された美肌画像を生成することができる。
The skin map creation processing unit 53 extracts skin color regions in multiple stages based on the skin of the face in the image.
Further, the skin map creation processing unit 53 calculates the saturation level from the high-luminance region and the low-saturation region even for the region where the brightness is high and the skin color is saturated and cannot be extracted as the skin color region, and the skin color is added to the skin map. It can be extracted as an area.
Further, the skin map creation processing unit 53 can handle various light environments such as when a dark shadow is generated or when light from a plurality of light sources having different color temperatures is applied, so that the hue (H) ) Can be adjusted to the range corresponding to the image to calculate the skin color level.
As a result, in addition to the skin color region based on the skin of the human face, it is possible to extract a saturated skin color region that cannot be extracted by a normal method and a skin color region that cannot be extracted under various light environments. It is possible to generate a skin-beautifying image in which the skin-beautifying treatment is appropriately applied only to the skin area.

画像合成部54は、画像を合成する。具体的には、画像合成部54は、例えば、標準画像と、美肌処理を画像全体に施した全体美肌画像とを肌マップをα値とするマスク画像を使用して、αブレンドする合成を行う。 The image synthesizing unit 54 synthesizes images. Specifically, the image composition unit 54 synthesizes, for example, α-blending a standard image and an overall skin-beautifying image obtained by applying skin-beautifying treatment to the entire image using a mask image having a skin map as an α value. ..

図8は、図7の機能的構成を有する図1の撮像装置1が実行する美肌画像生成処理の流れを説明するフローチャートである。
美肌画像生成処理は、ユーザによる入力部17への美肌画像生成処理開始の操作により開始される。
FIG. 8 is a flowchart illustrating a flow of a skin-beautifying image generation process executed by the image pickup apparatus 1 of FIG. 1 having the functional configuration of FIG. 7.
The skin-beautifying image generation process is started by the user's operation of starting the skin-beautifying image generation process to the input unit 17.

ステップS11において、画像取得部51は、撮像部16から出力される撮像画像のデータから、標準画像と、全体美肌処理元画像との2つの画像を取得する。 In step S11, the image acquisition unit 51 acquires two images, a standard image and an overall skin-beautifying source image, from the captured image data output from the imaging unit 16.

ステップS12において、画像処理部52は、全体美肌処理元画像の画像全体に対して美肌処理を施して、全体美肌画像を生成する。 In step S12, the image processing unit 52 performs skin-beautifying treatment on the entire image of the whole skin-beautifying processing original image to generate an overall skin-beautifying image.

ステップS13において、肌マップ作成処理部53は、肌マップ作成処理を実行する。肌マップ作成処理の実行の結果、αブレンドに用いる肌マップが作成される。肌マップ作成処理の詳細については後述する。 In step S13, the skin map creation processing unit 53 executes the skin map creation process. As a result of executing the skin map creation process, a skin map used for α blending is created. The details of the skin map creation process will be described later.

ステップS14において、画像合成部54は、標準画像と全体美肌画像とを、肌マップを用いてαブレンドする。αブレンドの結果、人の顔の肌のみに美肌処理が施された美肌画像が生成される(図2を参照)。生成した美肌画像は、画像記憶部71に記憶される。
その後、美肌画像生成処理は終了する。
In step S14, the image synthesizing unit 54 α-blends the standard image and the entire skin-beautifying image using the skin map. As a result of the α blend, a skin-beautifying image is generated in which only the skin of the human face is subjected to the skin-beautifying treatment (see FIG. 2). The generated beautiful skin image is stored in the image storage unit 71.
After that, the skin-beautifying image generation process is completed.

図9は、美肌画像生成処理のうち、肌マップ作成処理の流れを説明するフローチャートである。 FIG. 9 is a flowchart illustrating the flow of the skin map creation process in the skin beautification image generation process.

ステップS31において、肌マップ作成処理部53は、YUV色空間の全体美肌画像をHSV変換し、計測したHVSの平均値からの差分でH,S,Vの各チャンネルのヒストグラムを作成する。 In step S31, the skin map creation processing unit 53 performs HSV conversion of the entire skin-beautifying image in the YUV color space, and creates a histogram of each channel of H, S, and V by the difference from the measured average value of HVS.

ステップS32において、肌マップ作成処理部53は、H,S,Vのヒストグラムに対して、重み付けを決定する。S,Vチャンネルでは、重み付け情報記憶部72に記憶されるS,Vの重み付けを、S,Vのヒストグラムの重み付けとして決定する(図3(b),3(c)を参照)。Hのチャンネルでは、Hのヒストグラムを解析して、Hを含む領域まで、重み付け情報記憶部72に記憶されるHの重み付けの幅を広げて、重み付けを再決定する。以下となる値をサーチすることにより行う(図5(a)を参照)。サーチの結果、閾値以下の値の場所まで、重み付けの幅を広げる(図5(b)を参照)。 In step S32, the skin map creation processing unit 53 determines the weighting for the histograms of H, S, and V. In the S and V channels, the weighting of S and V stored in the weighting information storage unit 72 is determined as the weighting of the histograms of S and V (see FIGS. 3B and 3C). In the H channel, the histogram of H is analyzed, the weighting width of H stored in the weighting information storage unit 72 is expanded to the region including H, and the weighting is redetermined. This is done by searching for the following values (see FIG. 5A). As a result of the search, the weighting range is widened to the place where the value is below the threshold value (see FIG. 5B).

ステップS33において、肌マップ作成処理部53は、決定したS,Vの重み付けと、再決定したHの重み付けから、各画素における肌色レベルLh,Ls,Lvを算出する。 In step S33, the skin map creation processing unit 53 calculates the skin color levels Lh, Ls, and Lv in each pixel from the determined weighting of S and V and the weighting of the redetermined H.

ステップS34において、肌マップ作成処理部53は、顔領域において飽和領域が所定の割合以下であるか否かの判定を行う。当該判定を行うことで、飽和領域が狭く影響が出ない程度の所定の割合以下の画像については、飽和領域を考慮して処理を行わずに処理負担を軽減する。
飽和領域が所定の割合よりも多い場合には、ステップS34においてNOと判定されて、処理はステップS36に進む。
飽和領域が所定の割合以下の場合には、ステップS34においてYESと判定されて、処理はステップS35に進む。
In step S34, the skin map creation processing unit 53 determines whether or not the saturation region in the face region is equal to or less than a predetermined ratio. By making this determination, for images with a predetermined ratio or less that the saturation region is narrow and does not have an effect, the processing load is reduced without processing in consideration of the saturation region.
If the saturation region is more than a predetermined ratio, NO is determined in step S34, and the process proceeds to step S36.
If the saturation region is equal to or less than a predetermined ratio, YES is determined in step S34, and the process proceeds to step S35.

ステップS35において、肌マップ作成処理部53は、算出された肌色レベルのみに基づいて画素ごとの肌マップ値を算出して、肌マップを作成する。
肌マップ値は、以下の式(1)により算出される。
肌マップ値(MAP)=Lh×Ls×Lv・・・(1)
なお、「Lh」は色相(H)の肌色レベルであり、「Ls」は彩度(S)の肌色レベルであり、「Lv」は明度(V)肌色レベルである。
その後、肌マップ作成処理は終了する。
In step S35, the skin map creation processing unit 53 calculates the skin map value for each pixel based only on the calculated skin color level, and creates the skin map.
The skin map value is calculated by the following formula (1).
Skin map value (MAP) = Lh x Ls x Lv ... (1)
In addition, "Lh" is the skin color level of hue (H), "Ls" is the skin color level of saturation (S), and "Lv" is the skin color level of lightness (V).
After that, the skin map creation process ends.

ステップS36において、肌マップ作成処理部53は、飽和領域が所定の割合よりも多いため、高明度領域及び低彩度領域のヒストグラムを作成し、重み付け情報記憶部72に記憶される高明度領域及び低彩度領域の重み付けから、高明度領域及び低彩度領域の飽和レベルを算出する(図6(a),(b)を参照)。 In step S36, since the skin map creation processing unit 53 has more saturation regions than a predetermined ratio, the skin map creation processing unit 53 creates histograms of the high brightness region and the low saturation region, and the high brightness region and the high brightness region stored in the weighted information storage unit 72. From the weighting of the low saturation region, the saturation level of the high brightness region and the low saturation region is calculated (see FIGS. 6A and 6B).

ステップS37において、肌マップ作成処理部53は、式(1)により画素ごとの肌マップ値を算出するとともに、以下の式(2)により飽和マップ値を算出する。そして、画素ごとに算出した肌マップ値と飽和マップ値を比較して、値の大きい方を最終的な肌マップ値として採用し(論理和して)、肌マップを作成する。
飽和マップ値は、以下の式(2)により算出される。
飽和マップ値(MAP)=高Lv×低Ls・・・(2)
なお、「高Lv」は高明度領域の肌色レベルであり、「低Ls」は低彩度領域の肌色レベルである。
その結果、本来肌色領域であるが飽和領域であったり、種々の光の環境下で肌色領域として抽出されなかったりした領域を含む肌マップが作成される。
In step S37, the skin map creation processing unit 53 calculates the skin map value for each pixel by the formula (1), and calculates the saturation map value by the following formula (2). Then, the skin map value calculated for each pixel is compared with the saturation map value, and the larger value is adopted (logically ORed) as the final skin map value to create a skin map.
The saturation map value is calculated by the following equation (2).
Saturation map value (MAP) = high Lv x low Ls ... (2)
In addition, "high Lv" is a skin color level in a high lightness region, and "low Ls" is a skin color level in a low saturation region.
As a result, a skin map is created that includes a region that is originally a skin color region but is a saturated region or is not extracted as a skin color region under various light environments.

ステップS38において、肌マップ作成処理部53は、顔マップ記憶部73に記憶される顔マップを、該当画像に含まれる顔の位置と顔の大きさに調整して顔マップを作成する。 In step S38, the skin map creation processing unit 53 adjusts the face map stored in the face map storage unit 73 to the position of the face and the size of the face included in the corresponding image to create the face map.

ステップS39において、肌マップ作成処理部53は、ステップS35又はステップS37で作成した肌マップと、顔マップとをαブレンドする。その結果、本来顔以外の領域であるにもかかわらず肌色領域として検出された領域を除いた肌マップが作成される。
その後、肌マップ作成処理は終了する。
In step S39, the skin map creation processing unit 53 α-blends the skin map created in step S35 or step S37 with the face map. As a result, a skin map is created excluding the region detected as the skin color region even though it is originally a region other than the face.
After that, the skin map creation process ends.

以上のように構成される撮像装置1は、肌マップ作成処理部53と、画像合成部54と、を備える。
肌マップ作成処理部53は、画像に含まれる肌色領域を検出する。
また、肌マップ作成処理部53は、画像に含まれる高明度かつ低彩度である飽和領域を検出する。
画像合成部54は、肌マップ作成処理部53により検出した飽和領域を使用して、肌マップ作成処理部53により検出した肌色領域を補正する処理を行う。
これにより、撮像装置1においては、色相成分では検出の難しい肌色が飽和している部分も含め、適切に肌色領域が検出でき、光線の状況によらず人物の肌色領域を適切に検出することができる。
The image pickup apparatus 1 configured as described above includes a skin map creation processing unit 53 and an image composition unit 54.
The skin map creation processing unit 53 detects the skin color region included in the image.
In addition, the skin map creation processing unit 53 detects a saturated region having high brightness and low saturation included in the image.
The image composition unit 54 uses the saturation region detected by the skin map creation processing unit 53 to perform a process of correcting the skin color region detected by the skin map creation processing unit 53.
As a result, in the image pickup apparatus 1, the skin color region can be appropriately detected including the portion where the skin color is saturated, which is difficult to detect by the hue component, and the skin color region of a person can be appropriately detected regardless of the light condition. it can.

肌マップ作成処理部53は、HSV色空間のうちの色相成分を含む色情報に基づき、肌色領域を検出する。
また、肌マップ作成処理部53は、HSV色空間のうちの色相成分を除く色情報に基づき、飽和領域を検出する。
これにより、撮像装置1においては、HSV色空間を用いることで、肌色領域及び飽和領域の検出を両立することができる。
The skin map creation processing unit 53 detects a skin color region based on color information including a hue component in the HSV color space.
Further, the skin map creation processing unit 53 detects the saturation region based on the color information excluding the hue component in the HSV color space.
As a result, in the image pickup apparatus 1, by using the HSV color space, it is possible to detect both the skin color region and the saturation region at the same time.

肌マップ作成処理部53は、HSV色空間のうちの色相成分を含む色情報に基づき、画像を構成する画素毎に、肌色らしさを示す肌色レベルを算出する。
また、肌マップ作成処理部53は、HSV色空間のうちの色相成分を除く色情報に基づき、画像を構成する画素毎に、高明度かつ低彩度である飽和の度合いを示す飽和レベルを算出する。
また、肌マップ作成処理部53は、算出した肌色レベルが所定の閾値以上の領域を肌色領域として検出する。
また、肌マップ作成処理部53は、算出した飽和レベルが所定の閾値以上の領域を飽和領域として検出する。
これにより、撮像装置1においては、通常の光線の状況では肌色領域の検出に適している色相成分で肌色領域を検出し、かつ色相成分では検出の難しい肌色が飽和している部分も含め、適切に肌色領域を簡単に検出することができる。
The skin map creation processing unit 53 calculates a skin color level indicating skin color-likeness for each pixel constituting the image based on the color information including the hue component in the HSV color space.
Further, the skin map creation processing unit 53 calculates a saturation level indicating the degree of saturation, which is high brightness and low saturation, for each pixel constituting the image based on the color information excluding the hue component in the HSV color space. To do.
Further, the skin map creation processing unit 53 detects a region where the calculated skin color level is equal to or higher than a predetermined threshold value as a skin color region.
Further, the skin map creation processing unit 53 detects a region where the calculated saturation level is equal to or higher than a predetermined threshold value as a saturation region.
As a result, in the image pickup apparatus 1, the skin color region is detected by a hue component suitable for detecting the skin color region under normal light conditions, and the skin color region that is difficult to detect by the hue component is also saturated. The skin color region can be easily detected.

画像合成部54は、肌マップ作成処理部53では検出できなかった一部の肌色領域を、肌マップ作成処理部53により検出した飽和領域を使用して補正する処理を行う。
これにより、撮像装置1においては、検出できなかった一部の肌色領域を、補正することができる。
The image composition unit 54 performs a process of correcting a part of the skin color region that could not be detected by the skin map creation processing unit 53 by using the saturation region detected by the skin map creation processing unit 53.
As a result, it is possible to correct a part of the skin color region that could not be detected by the image pickup apparatus 1.

画像合成部54は、検出した肌色領域と検出した飽和領域の論理和となる領域に当該肌色領域を補正する処理を行う。
これにより、撮像装置1においては、簡単な処理で補正の領域を特定することができる。
The image synthesizing unit 54 performs a process of correcting the skin color region to a region that is a logical sum of the detected skin color region and the detected saturation region.
As a result, in the image pickup apparatus 1, the correction area can be specified by a simple process.

肌マップ作成処理部53は、予め用意されている基準となる人物の顔領域情報を更に使用して、補正した肌色領域が人物の顔の肌色領域となるように補正する処理を行う。
これにより、撮像装置1においては、色情報だけでは難しい人物の顔の肌色領域以外の領域を除く処理を、処理負担が少なく、かつ、簡単に人物の顔の肌色領域に補正する処理によって行うことができる。
The skin map creation processing unit 53 further uses the reference person's face area information prepared in advance to perform correction processing so that the corrected skin color area becomes the skin color area of the person's face.
As a result, in the image pickup apparatus 1, the process of removing the area other than the skin color area of the face of the person, which is difficult only with the color information, is performed by the process of easily correcting the skin color area of the face of the person with less processing load. Can be done.

また、撮像装置1は、画像合成部54により補正した肌色領域に対して美肌処理を行う画像処理部52を、更に備える。
これにより、撮像装置1においては、人の肌を美肌にする美肌処理を施した画像を生成することができる。
In addition, the image pickup apparatus 1 further includes an image processing unit 52 that performs skin beautification processing on the skin color region corrected by the image synthesis unit 54.
As a result, the image pickup apparatus 1 can generate an image that has undergone skin-beautifying treatment to make human skin beautiful.

肌マップ作成処理部53は、画像を構成する画素毎に、肌色らしさを示す肌色レベルを算出する。
また、肌マップ作成処理部53と、画像を構成する画素毎に、高明度かつ低彩度である飽和の度合いを示す飽和レベルを算出する。
また、肌マップ作成処理部53と、算出した肌色レベルと、算出した飽和レベルとから画像に含まれる肌色領域を検出する。
これにより、撮像装置1においては、通常の光線の状況における肌色部分の検出だけでなく、肌色が飽和している部分も含め、適切に肌色領域が検出でき、光線の状況によらず人物の肌色領域を適切に検出することができる。
The skin map creation processing unit 53 calculates a skin color level indicating skin color likeness for each pixel constituting the image.
In addition, the skin map creation processing unit 53 calculates a saturation level indicating the degree of saturation, which is high brightness and low saturation, for each pixel constituting the image.
Further, the skin color region included in the image is detected from the skin map creation processing unit 53, the calculated skin color level, and the calculated saturation level.
As a result, in the image pickup apparatus 1, not only the skin color portion under normal light conditions can be detected, but also the skin color region including the saturated skin color can be appropriately detected, and the skin color of a person can be detected regardless of the light rays. The area can be detected properly.

肌マップ作成処理部53は、HSV色空間のうちの色相成分を含む色成分の情報に基づき、画像を構成する画素毎に、肌色レベルを算出する。
また、肌マップ作成処理部53は、HSV色空間のうちの色相成分を除く色成分の情報に基づき、画像を構成する画素毎に、飽和レベルを算出する。
これにより、撮像装置1においては、通常の光線の状況では肌色領域の検出に適している色相成分で肌色領域を検出し、かつ色相成分では検出の難しい肌色が飽和している部分も含め、適切に肌色領域を簡単に検出することができる。
The skin map creation processing unit 53 calculates the skin color level for each pixel constituting the image based on the information of the color component including the hue component in the HSV color space.
Further, the skin map creation processing unit 53 calculates the saturation level for each pixel constituting the image based on the information of the color component excluding the hue component in the HSV color space.
As a result, in the image pickup apparatus 1, the skin color region is detected by a hue component suitable for detecting the skin color region under normal light conditions, and the skin color region that is difficult to detect by the hue component is also saturated. The skin color region can be easily detected.

肌マップ作成処理部53は、算出した肌色レベルと算出した飽和レベルのうちの少なくともいずれか一方が所定の閾値以上である領域を肌色領域として検出する。
これにより、撮像装置1においては、簡単な処理で検出の難しい肌色が飽和している部分も含め、適切に肌色領域を検出することができる。
The skin map creation processing unit 53 detects a region in which at least one of the calculated skin color level and the calculated saturation level is equal to or higher than a predetermined threshold value as the skin color region.
As a result, the image pickup apparatus 1 can appropriately detect the skin color region including the portion where the skin color is saturated, which is difficult to detect by a simple process.

肌マップ作成処理部53は、予め用意されている基準となる人物の顔領域情報を更に使用して、画像に含まれる人物の顔の肌色領域を検出する処理を行う。
これにより、撮像装置1においては、色情報だけでは難しい人物の顔の肌色領域以外の領域を除く処理を、処理負担が少なく、かつ、簡単に人物の顔の肌色領域に補正する処理によって行うことができる。
The skin map creation processing unit 53 further uses the reference person's face area information prepared in advance to perform a process of detecting the skin color area of the person's face included in the image.
As a result, in the image pickup apparatus 1, the process of removing the area other than the skin color area of the face of the person, which is difficult only with the color information, is performed by the process of easily correcting the skin color area of the face of the person with less processing load. Can be done.

肌マップ作成処理部53は、画像を構成する画素毎の色相成分の値の分布に基づき、肌マップ作成処理部53が肌色レベルを算出するための色相成分の重み付けを調整する。
また、肌マップ作成処理部53は、調整した色相成分の重み付けで、HSV色空間のうちの色相成分を含む色成分の情報に基づき、画像を構成する画素毎に、肌色レベルを算出する。
これにより、撮像装置1においては、通常の光線の状況では肌色領域の検出に適している色相成分の値の分布に基づき、肌マップ作成処理部53が肌色レベルを算出するための色相成分の重み付けを調整するために、光線の状況によらず人物の肌色領域を適切に検出することができる。
The skin map creation processing unit 53 adjusts the weighting of the hue component for calculating the skin color level by the skin map creation processing unit 53 based on the distribution of the values of the hue components for each pixel constituting the image.
Further, the skin map creation processing unit 53 calculates the skin color level for each pixel constituting the image based on the information of the color component including the hue component in the HSV color space by the weighting of the adjusted hue component.
As a result, in the image pickup apparatus 1, the weighting of the hue component for the skin map creation processing unit 53 to calculate the skin color level based on the distribution of the value of the hue component suitable for detecting the skin color region under normal light conditions. In order to adjust, the skin color region of a person can be appropriately detected regardless of the light conditions.

また、撮像装置1は、検出した肌色領域に対して美肌処理を行う画像処理部52を、更に備える。
これにより、撮像装置1においては、人の肌を美肌にする美肌処理を施した画像を生成することができる。
In addition, the image pickup apparatus 1 further includes an image processing unit 52 that performs skin beautification processing on the detected skin color region.
As a result, the image pickup apparatus 1 can generate an image that has undergone skin-beautifying treatment to make human skin beautiful.

肌マップ作成処理部53は、画像に含まれる肌色の状況を判別する。
また、肌マップ作成処理部53は、画像に含まれる高明度かつ低彩度である飽和の状況を判別する。
また、肌マップ作成処理部53は、判別した肌色の状況と、判別した飽和の状況と、に基づき、画像内の肌色領域を検出する。
これにより、撮像装置1においては、色温度が異なったり、異なる色温度の複数の光源が混ざったりしているような場合であっても、適切に肌色領域が検出でき、光線の状況によらず人物の肌色領域を適切に検出することができる。
The skin map creation processing unit 53 determines the state of the skin color included in the image.
In addition, the skin map creation processing unit 53 determines the saturation state of high brightness and low saturation included in the image.
Further, the skin map creation processing unit 53 detects the skin color region in the image based on the determined skin color status and the determined saturation status.
As a result, in the image pickup apparatus 1, the skin color region can be appropriately detected even when the color temperature is different or a plurality of light sources having different color temperatures are mixed, regardless of the light condition. The skin color area of a person can be appropriately detected.

肌マップ作成処理部53は、HSV色空間のうちの色相成分を含む色情報に基づき、画像を構成する画素毎に、肌色らしさを示す肌色レベルを算出する。
また、肌マップ作成処理部53は、画像を構成する画素毎の色相成分の値の分布に基づき、肌マップ作成処理部53が肌色レベルを算出するための色相成分の重み付けを調整する。
また、肌マップ作成処理部53は、調整した重み付けで算出した肌色レベルに基づき、画像に含まれる肌色領域を検出する。
これにより、撮像装置1においては、色相成分の値の分布に基づき、肌マップ作成処理部53が肌色レベルを算出するための色相成分の重み付けを調整するために、光線の状況によらず人物の肌色領域を適切に検出することができる。
The skin map creation processing unit 53 calculates a skin color level indicating skin color-likeness for each pixel constituting the image based on the color information including the hue component in the HSV color space.
Further, the skin map creation processing unit 53 adjusts the weighting of the hue component for calculating the skin color level by the skin map creation processing unit 53 based on the distribution of the values of the hue components for each pixel constituting the image.
Further, the skin map creation processing unit 53 detects the skin color region included in the image based on the skin color level calculated by the adjusted weighting.
As a result, in the image pickup apparatus 1, the skin map creation processing unit 53 adjusts the weighting of the hue component for calculating the skin color level based on the distribution of the values of the hue component, so that the person's weight is adjusted regardless of the light beam condition. The skin color region can be appropriately detected.

また、撮像装置1は、検出した肌色領域に対して美肌処理を行う画像処理部52を、更に備える。
これにより、撮像装置1においては、人の肌を美肌にする美肌処理を施した画像を生成することができる。
In addition, the image pickup apparatus 1 further includes an image processing unit 52 that performs skin beautification processing on the detected skin color region.
As a result, the image pickup apparatus 1 can generate an image that has undergone skin-beautifying treatment to make human skin beautiful.

なお、本発明は、上述の実施形態に限定されるものではなく、本発明の目的を達成できる範囲での変形、改良等は本発明に含まれるものである。 The present invention is not limited to the above-described embodiment, and modifications, improvements, and the like within the range in which the object of the present invention can be achieved are included in the present invention.

上述の実施形態では、飽和した領域でも肌色領域として抽出できたり、例えば、濃い影が生じたり、色温度の異なる複数の光源からの光が当たっていたりする等の種々の光の環境下でも肌色領域が抽出できるようにする処理を併せて行うように構成したが、それぞれ別々に行うように構成したり、いずれか一方のみを実行したりするように構成してもよい。 In the above-described embodiment, even a saturated region can be extracted as a flesh color region, and the flesh color can be obtained even under various light environments such as dark shadows and light from a plurality of light sources having different color temperatures. Although it is configured to perform the processing for extracting the area together, it may be configured to perform each separately, or it may be configured to execute only one of them.

また、上述の実施形態では、ヒストグラムを生成する際の画像を構成する画素は、記録用の画像サイズの画素数でも、間引いたライブビュー表示用の画素でもよい。 Further, in the above-described embodiment, the pixels constituting the image when generating the histogram may be the number of pixels of the image size for recording or the pixels for the thinned-out live view display.

また、上述の実施形態では、色相(H)のヒストグラムに応じて、重み付けの幅を、予め決定された重み付けの幅から広げるように構成したが、狭めるように構成してもよい。また、例えば、画像における顔領域が小さく、美肌を行うことの重みが低い場合には、顔以外への影響を考慮して、重み付けの幅を狭めるように構成してもよい。
さらに、重み付けの傾きは、幅に係らず固定としてもよいが、幅が広い場合には、なだらかにするように可変にしてもよい。
Further, in the above-described embodiment, the weighting width is configured to be widened from the predetermined weighting width according to the histogram of the hue (H), but may be narrowed. Further, for example, when the face region in the image is small and the weight of performing skin beautification is low, the weighting range may be narrowed in consideration of the influence on other than the face.
Further, the slope of the weighting may be fixed regardless of the width, but when the width is wide, it may be variable so as to be gentle.

また、上述した実施形態では、色相(H)のヒストグラムの解析は、平均値を始点として正の方向と負の方向に向かってサーチするように構成したが、例えば、端部から中心に向かってサーチするように構成してもよい。 Further, in the above-described embodiment, the analysis of the hue (H) histogram is configured to search in the positive and negative directions starting from the mean value, but for example, from the end to the center. It may be configured to search.

また、上述した実施形態では、顔マップは、顔領域に略一致する楕円形状のマスク画像としたがこれに限られない。例えば、対称形状の楕円形状であるため、1/4部の形状の顔マップとし、使用時に4等倍して楕円形状を構成するようにしてもよい。記憶容量の削減が可能となる。 Further, in the above-described embodiment, the face map is an elliptical mask image that substantially matches the face region, but the face map is not limited to this. For example, since it is an elliptical shape having a symmetrical shape, a face map having a quarter-shaped shape may be used and multiplied by 4 at the time of use to form an elliptical shape. The storage capacity can be reduced.

また、上述した実施形態では、肌色レベルと、飽和レベルの算出の結果、飽和レベルの値が高い場合に飽和領域として抽出し、当該飽和領域が所定割合以下であった場合には、肌色レベルのみで肌マップを作成するように構成したが、飽和レベルが所定の値であったことをもって飽和領域として、該飽和領域が所定割合以下であった場合には、肌色レベルのみで肌マップを作成するように構成してもよい。 Further, in the above-described embodiment, as a result of calculating the skin color level and the saturation level, when the saturation level value is high, it is extracted as a saturation region, and when the saturation region is less than a predetermined ratio, only the skin color level is obtained. However, when the saturation level is a predetermined value, it is regarded as a saturation region, and when the saturation region is less than a predetermined ratio, a skin map is created only by the skin color level. It may be configured as follows.

また、上述の実施形態では、本発明が適用される撮像装置1は、デジタルカメラを例として説明したが、特にこれに限定されない。
例えば、本発明は、美肌画像生成処理機能を有する電子機器一般に適用することができる。具体的には、例えば、本発明は、ノート型のパーソナルコンピュータ、プリンタ、テレビジョン受像機、ビデオカメラ、携帯型ナビゲーション装置、携帯電話機、スマートフォン、ポータブルゲーム機等に適用可能である。
Further, in the above-described embodiment, the image pickup apparatus 1 to which the present invention is applied has been described by taking a digital camera as an example, but the present invention is not particularly limited thereto.
For example, the present invention can be generally applied to electronic devices having a skin-beautifying image generation processing function. Specifically, for example, the present invention can be applied to notebook personal computers, printers, television receivers, video cameras, portable navigation devices, mobile phones, smartphones, portable game machines, and the like.

上述した一連の処理は、ハードウェアにより実行させることもできるし、ソフトウェアにより実行させることもできる。
換言すると、図7の機能的構成は例示に過ぎず、特に限定されない。即ち、上述した一連の処理を全体として実行できる機能が撮像装置1に備えられていれば足り、この機能を実現するためにどのような機能ブロックを用いるのかは特に図7の例に限定されない。
また、1つの機能ブロックは、ハードウェア単体で構成してもよいし、ソフトウェア単体で構成してもよいし、それらの組み合わせで構成してもよい。
本実施形態における機能的構成は、演算処理を実行するプロセッサによって実現され、本実施形態に用いることが可能なプロセッサには、シングルプロセッサ、マルチプロセッサ及びマルチコアプロセッサ等の各種処理装置単体によって構成されるものの他、これら各種処理装置と、ASIC(Application Specific Integrated Circuit)やFPGA(Field‐Programmable Gate Array)等の処理回路とが組み合わせられたものを含む。
The series of processes described above can be executed by hardware or software.
In other words, the functional configuration of FIG. 7 is merely an example and is not particularly limited. That is, it suffices if the image pickup apparatus 1 is provided with a function capable of executing the above-mentioned series of processes as a whole, and what kind of functional block is used to realize this function is not particularly limited to the example of FIG.
Further, one functional block may be configured by a single piece of hardware, a single piece of software, or a combination thereof.
The functional configuration in the present embodiment is realized by a processor that executes arithmetic processing, and the processor that can be used in the present embodiment is composed of various processing devices such as a single processor, a multi-processor, and a multi-core processor. In addition to the above, the present invention includes a combination of these various processing units and processing circuits such as an ASIC (Application Specific Integrated Circuit) and an FPGA (Field-Programmable Gate Array).

一連の処理をソフトウェアにより実行させる場合には、そのソフトウェアを構成するプログラムが、コンピュータ等にネットワークや記録媒体からインストールされる。
コンピュータは、専用のハードウェアに組み込まれているコンピュータであってもよい。また、コンピュータは、各種のプログラムをインストールすることで、各種の機能を実行することが可能なコンピュータ、例えば汎用のパーソナルコンピュータであってもよい。
When a series of processes are executed by software, the programs constituting the software are installed on a computer or the like from a network or a recording medium.
The computer may be a computer embedded in dedicated hardware. Further, the computer may be a computer capable of executing various functions by installing various programs, for example, a general-purpose personal computer.

このようなプログラムを含む記録媒体は、ユーザにプログラムを提供するために装置本体とは別に配布される図1のリムーバブルメディア31により構成されるだけでなく、装置本体に予め組み込まれた状態でユーザに提供される記録媒体等で構成される。リムーバブルメディア31は、例えば、磁気ディスク(フロッピディスクを含む)、光ディスク、又は光磁気ディスク等により構成される。光ディスクは、例えば、CD−ROM(Compact Disk−Read Only Memory),DVD(Digital Versatile Disk),Blu−ray(登録商標) Disc(ブルーレイディスク)等により構成される。光磁気ディスクは、MD(Mini−Disk)等により構成される。また、装置本体に予め組み込まれた状態でユーザに提供される記録媒体は、例えば、プログラムが記録されている図1のROM12や、図1の記憶部19に含まれるハードディスク等で構成される。 The recording medium including such a program is not only composed of the removable media 31 of FIG. 1 distributed separately from the device main body in order to provide the program to the user, but also is preliminarily incorporated in the device main body. Consists of recording media and the like provided in. The removable media 31 is composed of, for example, a magnetic disk (including a floppy disk), an optical disk, a magneto-optical disk, or the like. The optical disk is composed of, for example, a CD-ROM (Compact Disk-Read Only Memory), a DVD (Digital Versaille Disk), a Blu-ray (registered trademark) Disc (Blu-ray Disc), or the like. The magneto-optical disk is composed of MD (Mini-Disk) or the like. Further, the recording medium provided to the user in a state of being incorporated in the apparatus main body in advance includes, for example, the ROM 12 of FIG. 1 in which the program is recorded, the hard disk included in the storage unit 19 of FIG.

なお、本明細書において、記録媒体に記録されるプログラムを記述するステップは、その順序に沿って時系列的に行われる処理はもちろん、必ずしも時系列的に処理されなくとも、並列的或いは個別に実行される処理をも含むものである。 In the present specification, the steps for describing a program recorded on a recording medium are not necessarily processed in chronological order, but also in parallel or individually, even if they are not necessarily processed in chronological order. It also includes the processing to be executed.

以上、本発明のいくつかの実施形態について説明したが、これらの実施形態は、例示に過ぎず、本発明の技術的範囲を限定するものではない。本発明はその他の様々な実施形態を取ることが可能であり、さらに、本発明の要旨を逸脱しない範囲で、省略や置換等種々の変更を行うことができる。これら実施形態やその変形は、本明細書等に記載された発明の範囲や要旨に含まれるとともに、特許請求の範囲に記載された発明とその均等の範囲に含まれる。 Although some embodiments of the present invention have been described above, these embodiments are merely examples and do not limit the technical scope of the present invention. The present invention can take various other embodiments, and further, various modifications such as omission and substitution can be made without departing from the gist of the present invention. These embodiments and modifications thereof are included in the scope and gist of the invention described in the present specification and the like, and are also included in the scope of the invention described in the claims and the equivalent scope thereof.

以下に、本願の出願当初の特許請求の範囲に記載された発明を付記する。
[付記1]
画像に含まれる肌色領域を検出する肌色領域検出手段と、
画像に含まれる高明度かつ低彩度である飽和領域を検出する飽和領域検出手段と、
前記飽和領域検出手段により検出した飽和領域を使用して、前記肌色領域検出手段により検出した肌色領域を補正する処理を行う肌色領域補正手段と、
を備えることを特徴とする検出装置。
[付記2]
前記肌色領域検出手段は、HSV色空間のうちの色相成分を含む色情報に基づき、前記肌色領域を検出し、
前記飽和領域検出手段は、HSV色空間のうちの色相成分を除く色情報に基づき、前記飽和領域を検出する、
ことを特徴とする付記1に記載の検出装置。
[付記3]
HSV色空間のうちの色相成分を含む色情報に基づき、画像を構成する画素毎に、肌色らしさを示す肌色レベルを算出する肌色レベル算出手段と、
HSV色空間のうちの色相成分を除く色情報に基づき、画像を構成する画素毎に、高明度かつ低彩度である飽和の度合いを示す飽和レベルを算出する飽和レベル算出手段と、を更に備え、
前記肌色領域検出手段は、算出した肌色レベルが所定の閾値以上の領域を前記肌色領域として検出し、
前記飽和領域検出手段は、算出した飽和レベルが所定の閾値以上の領域を前記飽和領域として検出する、
ことを特徴とする付記2に記載の検出装置。
[付記4]
前記肌色領域補正手段は、前記肌色領域検出手段では検出できなかった一部の肌色領域を、前記飽和領域検出手段により検出した前記飽和領域を使用して補正する処理を行う、
ことを特徴とする付記1乃至3の何れか1つに記載の検出装置。
[付記5]
前記肌色領域補正手段は、検出した前記肌色領域と検出した前記飽和領域の論理和となる領域に当該肌色領域を補正する処理を行う、
ことを特徴とする付記4に記載の検出装置。
[付記6]
前記肌色領域補正手段は、予め用意されている基準となる人物の顔領域情報を更に使用して、補正した前記肌色領域が人物の顔の肌色領域となるように補正する処理を行う、
ことを特徴とする付記1乃至5の何れか1つに記載の検出装置。
[付記7]
前記肌色領域補正手段により補正した前記肌色領域に対して美肌処理を行う画像処理手段を、更に備える、
ことを特徴とする付記1乃至5の何れか1つに記載の検出装置。
[付記8]
画像を構成する画素毎に、肌色らしさを示す肌色レベルを算出する肌色レベル算出手段と、
画像を構成する画素毎に、高明度かつ低彩度である飽和の度合いを示す飽和レベルを算出する飽和レベル算出手段と、
前記肌色レベル算出手段により算出した肌色レベルと、前記飽和レベル算出手段により算出した飽和レベルとから画像に含まれる肌色領域を検出する肌色領域検出手段と、
を備えることを特徴とする検出装置。
[付記9]
前記肌色レベル算出手段は、HSV色空間のうちの色相成分を含む色成分の情報に基づき、画像を構成する画素毎に、前記肌色レベルを算出し、
前記飽和レベル算出手段は、HSV色空間のうちの色相成分を除く色成分の情報に基づき、画像を構成する画素毎に、前記飽和レベルを算出する、
ことを特徴とする付記8に記載の検出装置。
[付記10]
前記肌色領域検出手段は、算出した前記肌色レベルと算出した飽和レベルのうちの少なくともいずれか一方が所定の閾値以上である領域を肌色領域として検出する、
ことを特徴とする付記8又は9に記載の検出装置。
[付記11]
前記肌色領域検出手段は、予め用意されている基準となる人物の顔領域情報を更に使用して、画像に含まれる人物の顔の肌色領域を検出する処理を行う、
ことを特徴とする付記8乃至10の何れか1つに記載の検出装置。
[付記12]
画像を構成する画素毎の色相成分の値の分布に基づき、前記肌色レベル算出手段が前記肌色レベルを算出するための色相成分の重み付けを調整する調整手段を、更に備え、
前記肌色レベル算出手段は、調整した色相成分の重み付けで、HSV色空間のうちの色相成分を含む色成分の情報に基づき、画像を構成する画素毎に、前記肌色レベルを算出する、
ことを特徴とする付記3,8乃至11の何れか1つに記載の検出装置。
[付記13]
前記肌色領域検出手段により検出した前記肌色領域に対して美肌処理を行う画像処理手段を、更に備える、
ことを特徴とする付記8乃至12の何れか1つに記載の検出装置。
[付記14]
画像に含まれる肌色の状況を判別する肌色判別手段と、
画像に含まれる高明度かつ低彩度である飽和の状況を判別する飽和状況判別手段と、
前記肌色判別手段により判別した前記肌色の状況と、前記飽和状況判別手段により判別した飽和の状況と、に基づき、画像内の肌色領域を検出する肌色領域検出手段と、
を備えることを特徴とする検出装置。
[付記15]
HSV色空間のうちの色相成分を含む色情報に基づき、画像を構成する画素毎に、肌色らしさを示す肌色レベルを算出する肌色レベル算出手段と、
画像を構成する画素毎の色相成分の値の分布に基づき、肌色レベル算出手段が肌色レベルを算出するための色相成分の重み付けを調整する調整手段と、
前記調整手段により調整した重み付けで、前記肌色レベル算出手段により算出した肌色レベルに基づき、画像に含まれる肌色領域を検出する肌色領域検出手段と、
を備えることを特徴とする検出装置。
[付記16]
前記肌色領域検出手段により検出した前記肌色領域に対して美肌処理を行う画像処理手段を、更に備える、
ことを特徴とする付記15に記載の検出装置。
[付記17]
画像に含まれる肌色領域を検出する肌色領域検出処理と、
画像に含まれる高明度かつ低彩度である飽和領域を検出する飽和領域検出処理と、
前記飽和領域検出処理により検出した飽和領域を使用して、前記肌色領域検出処理により検出した肌色領域を補正する処理を行う肌色領域補正処理と、
を含むことを特徴とする検出方法。
[付記18]
画像を構成する画素毎に、肌色らしさを示す肌色レベルを算出する肌色レベル算出処理と、
画像を構成する画素毎に、高明度かつ低彩度である飽和の度合いを示す飽和レベルを算出する飽和レベル算出処理と、
前記肌色レベル算出処理により算出した肌色レベルと、前記飽和レベル算出処理により算出した飽和レベルとから画像に含まれる肌色領域を検出する肌色領域検出処理と、
を含むことを特徴とする検出方法。
[付記19]
画像に含まれる肌色の状況を判別する肌色判別処理と、
画像に含まれる高明度かつ低彩度である飽和の状況判別する飽和状況処理と、
前記肌色判別処理により判別した前記肌色の状況と、前記飽和状況処理により判別した飽和の状況と、に基づき、画像内の肌色領域を検出する肌色領域検出処理と、
を含むことを特徴とする検出方法。
[付記20]
HSV色空間のうちの色相成分を含む色情報に基づき、画像を構成する画素毎に、肌色らしさを示す肌色レベルを算出する肌色レベル算出処理と、
画像を構成する画素毎の色相成分の値の分布に基づき、肌色レベル算出手段が肌色レベルを算出するための色相成分の重み付けを調整する調整処理と、
前記調整処理により調整した重み付けで、前記肌色レベル算出処理により算出した肌色レベルに基づき、画像に含まれる肌色領域を検出する肌色領域検出処理と、
を含むことを特徴とする検出方法。
The inventions described in the claims at the time of filing the application of the present application are described below.
[Appendix 1]
A skin color area detecting means for detecting a skin color area included in an image,
A saturation region detecting means for detecting a saturated region having high brightness and low saturation contained in an image,
A skin color region correction means that performs a process of correcting a skin color region detected by the skin color region detection means using the saturation region detected by the saturation region detection means.
A detection device comprising.
[Appendix 2]
The skin color region detecting means detects the skin color region based on the color information including the hue component in the HSV color space, and detects the skin color region.
The saturation region detecting means detects the saturation region based on the color information excluding the hue component in the HSV color space.
The detection device according to Appendix 1, wherein the detection device is characterized by the above.
[Appendix 3]
A skin color level calculation means for calculating a skin color level indicating skin color for each pixel constituting an image based on color information including a hue component in the HSV color space.
A saturation level calculation means for calculating a saturation level indicating the degree of saturation, which is high brightness and low saturation, is further provided for each pixel constituting the image based on the color information excluding the hue component in the HSV color space. ,
The skin color region detecting means detects a region where the calculated skin color level is equal to or higher than a predetermined threshold value as the skin color region.
The saturation region detecting means detects a region in which the calculated saturation level is equal to or higher than a predetermined threshold value as the saturation region.
The detection device according to Appendix 2, characterized by the above.
[Appendix 4]
The skin color region correction means performs a process of correcting a part of the skin color region that could not be detected by the skin color region detecting means by using the saturation region detected by the saturation region detecting means.
The detection device according to any one of Supplementary note 1 to 3, wherein the detection device is characterized by the above.
[Appendix 5]
The skin color region correction means performs a process of correcting the skin color region in a region that is a logical sum of the detected skin color region and the detected saturation region.
The detection device according to Appendix 4, wherein the detection device is characterized by the above.
[Appendix 6]
The skin color area correction means further uses the reference person's face area information prepared in advance to perform a process of correcting the corrected skin color area so that it becomes the skin color area of the person's face.
The detection device according to any one of Supplementary note 1 to 5, wherein the detection device is characterized by the above.
[Appendix 7]
An image processing means for performing skin-beautifying treatment on the skin-colored region corrected by the skin-colored region correcting means is further provided.
The detection device according to any one of Supplementary note 1 to 5, wherein the detection device is characterized by the above.
[Appendix 8]
A skin color level calculation means for calculating the skin color level indicating the skin color likeness for each pixel constituting the image, and
A saturation level calculation means for calculating a saturation level indicating the degree of saturation, which is high brightness and low saturation, for each pixel constituting the image.
A skin color region detecting means for detecting a skin color region included in an image from a skin color level calculated by the skin color level calculating means and a saturation level calculated by the saturation level calculating means.
A detection device comprising.
[Appendix 9]
The skin color level calculation means calculates the skin color level for each pixel constituting the image based on the information of the color component including the hue component in the HSV color space.
The saturation level calculation means calculates the saturation level for each pixel constituting the image based on the information of the color component excluding the hue component in the HSV color space.
The detection device according to Appendix 8, wherein the detection device is characterized by the above.
[Appendix 10]
The skin color region detecting means detects as a skin color region a region in which at least one of the calculated skin color level and the calculated saturation level is equal to or higher than a predetermined threshold value.
The detection device according to Appendix 8 or 9, characterized in that.
[Appendix 11]
The skin color region detecting means further uses the reference person's face region information prepared in advance to perform a process of detecting the skin color region of the person's face included in the image.
The detection device according to any one of Supplementary Provisions 8 to 10, characterized in that.
[Appendix 12]
The skin color level calculating means further includes an adjusting means for adjusting the weighting of the hue component for calculating the skin color level based on the distribution of the values of the hue components for each pixel constituting the image.
The skin color level calculation means calculates the skin color level for each pixel constituting the image based on the information of the color component including the hue component in the HSV color space by weighting the adjusted hue component.
The detection device according to any one of Supplementary Provisions 3, 8 to 11, characterized in that.
[Appendix 13]
An image processing means for performing skin-beautifying treatment on the skin-colored region detected by the skin-colored region detecting means is further provided.
The detection device according to any one of Supplementary Provisions 8 to 12, characterized in that.
[Appendix 14]
A skin color discrimination means for discriminating the skin color status included in the image,
Saturation status determination means for determining the saturation status of high brightness and low saturation contained in the image,
A skin color region detecting means for detecting a skin color region in an image based on the skin color status determined by the skin color discriminating means and the saturation status determined by the saturation status discriminating means.
A detection device comprising.
[Appendix 15]
A skin color level calculation means for calculating a skin color level indicating skin color for each pixel constituting an image based on color information including a hue component in the HSV color space.
Based on the distribution of the value of the hue component for each pixel constituting the image, the skin color level calculation means adjusts the weighting of the hue component for calculating the skin color level, and the adjustment means.
A skin color region detecting means for detecting a skin color region included in an image based on the skin color level calculated by the skin color level calculating means by weighting adjusted by the adjusting means.
A detection device comprising.
[Appendix 16]
An image processing means for performing skin-beautifying treatment on the skin-colored region detected by the skin-colored region detecting means is further provided.
The detection device according to Appendix 15, wherein the detection device is characterized by the above.
[Appendix 17]
Skin color area detection processing that detects the skin color area included in the image,
Saturation region detection processing that detects saturated regions with high brightness and low saturation contained in images, and
A skin color region correction process that performs a process of correcting a skin color region detected by the skin color region detection process using the saturation region detected by the saturation region detection process, and a skin color region correction process.
A detection method comprising.
[Appendix 18]
Skin color level calculation processing that calculates the skin color level that indicates the skin color likeness for each pixel that composes the image, and
Saturation level calculation processing that calculates the saturation level that indicates the degree of saturation that is high brightness and low saturation for each pixel that constitutes the image,
A skin color area detection process that detects a skin color area included in an image from the skin color level calculated by the skin color level calculation process and the saturation level calculated by the saturation level calculation process.
A detection method comprising.
[Appendix 19]
Skin color discrimination processing that discriminates the condition of skin color included in the image,
Saturation status processing that determines the saturation status of high brightness and low saturation contained in the image, and
A skin color region detection process for detecting a skin color region in an image based on the skin color status determined by the skin color discrimination process and the saturation status determined by the saturation status process.
A detection method comprising.
[Appendix 20]
Based on the color information including the hue component in the HSV color space, the skin color level calculation process for calculating the skin color level indicating the skin color for each pixel constituting the image, and the skin color level calculation process.
An adjustment process in which the skin color level calculation means adjusts the weighting of the hue component for calculating the skin color level based on the distribution of the value of the hue component for each pixel constituting the image.
A skin color area detection process that detects a skin color area included in an image based on the skin color level calculated by the skin color level calculation process with the weighting adjusted by the adjustment process.
A detection method comprising.

1・・・撮像装置,11・・・CPU,12・・・ROM,13・・・RAM,14・・・バス,15・・・入出力インターフェース,16・・・撮像部,17・・・入力部,18・・・出力部,19・・・記憶部,20・・・通信部,21・・・ドライブ,31・・・リムーバブルメディア,51・・・画像取得部,52・・・画像処理部,53・・・肌マップ作成処理部,54・・・画像合成部,71・・・画像記憶部,72・・・重み付け情報記憶部,73・・・顔マップ記憶部 1 ... Imaging device, 11 ... CPU, 12 ... ROM, 13 ... RAM, 14 ... Bus, 15 ... Input / output interface, 16 ... Imaging unit, 17 ... Input unit, 18 ... Output unit, 19 ... Storage unit, 20 ... Communication unit, 21 ... Drive, 31 ... Removable media, 51 ... Image acquisition unit, 52 ... Image Processing unit, 53 ... Skin map creation processing unit, 54 ... Image composition unit, 71 ... Image storage unit, 72 ... Weighted information storage unit, 73 ... Face map storage unit

Claims (13)

画像の肌色らしさを示す肌色レベルを取得する肌色要素取得手段と、
前記画像に含まれる飽和領域及び前記画像の飽和の度合いを示す飽和レベルを取得する飽和要素取得手段と、
記飽和領域の前記画像に対する割合、設定された割合よりも低いか否かを判定する判定手段と、
前記判定手段により前記飽和領域の割合前記設定された割合より低いと判定されれば、前記肌色レベルに基づいて、前記画像肌色領域を検出し、前記判定手段により前記飽和領域の割合が前記設定された割合より低くないと判定されれば前記肌色レベル及び前記飽和レベルに基づいて肌色領域を検出する肌色領域検出手段と、
を有することを特徴とする検出装置。
A skin color element acquisition means for acquiring a skin color level indicating the skin color of an image, and
A saturation element acquisition means for acquiring a saturation region included in the image and a saturation level indicating the degree of saturation of the image, and
Ratio with respect to the image before Ki飽sum region, determination means for determining whether or not lower than the rate that has been set,
If the determination means determines that the ratio of the saturation region is lower than the set ratio , the skin color region of the image is detected based on the skin color level, and the determination means determines that the ratio of the saturation region is the said. If it is determined that the ratio is not lower than the set ratio, the skin color region detecting means for detecting the skin color region based on the skin color level and the saturation level , and
A detection device characterized by having.
前記判定手段は、前記飽和要素取得手段により検出した飽和領域の前記画像の特定領域に対する割合が、設定された割合よりも低いか否かを判定することを特徴とする請求項記載の検出装置。 Said determination means, the ratio for a specific region of the image of the saturated area detected by the saturation element acquisition unit, detecting device according to claim 1, wherein the determining whether lower than the rate that has been set .. 前記特定領域は顔領域であることを特徴とする請求項に記載の検出装置。 The detection device according to claim 2 , wherein the specific region is a face region. 前記肌色領域検出手段は、前記判定手段により前記飽和領域の割合が前記設定された割合より低いと判定されれば、前記肌色レベルに基づいて肌マップを作成し、前記判定手段により前記飽和領域の割合が前記設定された割合より低くないと判定されれば前記肌色レベル及び前記飽和レベルに基づいて前記肌マップを作成するIf the determination means determines that the ratio of the saturation region is lower than the set ratio, the skin color region detecting means creates a skin map based on the skin color level, and the determination means determines the saturation region. If it is determined that the ratio is not lower than the set ratio, the skin map is created based on the skin color level and the saturation level.
ことを特徴とする請求項1乃至3の何れかに記載の検出装置。The detection device according to any one of claims 1 to 3.
前記肌色領域検出手段は、前記判定手段により前記飽和領域の割合が前記設定された割合より低くないと判定されれば、前記肌色レベルに基づいて算出される肌マップ値と前記飽和レベルに基づいて算出される飽和マップ値とを比較し、前記肌マップ値と前記飽和マップ値とのうちの値の大きい方を採用して得られる情報に基づいて肌色領域を検出する
ことを特徴とする請求項1乃至4の何れかに記載の検出装置。
If the determination means determines that the ratio of the saturation region is not lower than the set ratio, the skin color region detecting means is based on the skin map value calculated based on the skin color level and the saturation level. The skin color region is detected based on the information obtained by comparing the calculated saturation map value and adopting the larger of the skin map value and the saturation map value.
The detection device according to any one of claims 1 to 4.
前記肌色要素取得手段は、HSV色空間のうちの色相成分を含む情報に基づき、前記肌色レベルを取得し
前記飽和要素取得手段は、HSV色空間のうちの色相成分を除く情報に基づき、前記飽和レベルを取得する、
ことを特徴とする請求項1乃至の何れかに記載の検出装置。
The skin color component acquiring unit, based on the hue component of the HSV color space including information, acquires the skin color level,
The saturated element acquisition unit, based on the information excluding the hue component of the HSV color space, obtaining the saturation level,
The detection device according to any one of claims 1 to 5 .
記肌色領域検出手段は、算出した肌色レベルが所定の閾値より高い領域を前記肌色領域として検出することを特徴とする請求項1乃至6の何れかに記載の検出装置 Before Symbol skin color area detecting means, detecting device according calculated flesh color level higher region than a predetermined threshold value and to any one of claims 1 to 6, and detects as the skin color area. 前記飽和要素取得手段は、算出した飽和レベルが所定の閾値より高い領域を前記飽和領域として検出する、The saturation element acquisition means detects a region where the calculated saturation level is higher than a predetermined threshold value as the saturation region.
ことを特徴とする請求項1乃至7の何れかに記載の検出装置。The detection device according to any one of claims 1 to 7.
予め用意されている基準となる人物の顔領域情報を更に使用して、検出した前記肌色領域が人物の顔の肌色領域となるように補正する処理を行う補正手段を有する、
ことを特徴とする請求項1乃至8の何れか1項に記載の検出装置。
It has a correction means for performing a process of correcting the detected skin color area to be the skin color area of the person's face by further using the reference person's face area information prepared in advance.
The detection device according to any one of claims 1 to 8, wherein the detection device is characterized by the above.
前記肌色領域検出手段により検出した前記肌色領域に対して美肌処理を行う画像処理手段を、更に備える、
ことを特徴とする請求項1乃至9の何れか1項に記載の検出装置。
An image processing means for performing skin-beautifying treatment on the skin-colored region detected by the skin-colored region detecting means is further provided.
The detection device according to any one of claims 1 to 9, wherein the detection device is characterized by the above.
前記飽和領域は、画素におけるHSV色空間の明度と彩度とが、予め設定されている重み付けの規定値内に収まっているか否かに基づいて特定することを特徴とする請求項1乃至10の何れかに記載の検出装置。The saturation region according to claim 1 to 10, wherein the saturation region is specified based on whether or not the brightness and saturation of the HSV color space in the pixel are within the predetermined weighting values set in advance. The detection device according to any one. 画像の肌色らしさを示す肌色レベルを取得する肌色要素取得処理と、
前記画像に含まれる飽和領域及び前記画像の飽和の度合いを示す飽和レベルを取得する飽和要素取得処理と、
記飽和領域の前記画像に対する割合、設定された割合よりも低いか否かを判定する判定処理と、
記飽和領域の割合が前記設定された割合よりも低いと判定されれば、前記肌色レベルに基づいて、前記画像肌色領域を検出し、前記飽和領域の割合が前記設定された割合よりも低くないと判定されれば前記肌色レベル及び前記飽和レベルに基づいて肌色領域を検出する肌色領域検出処理と、
を有することを特徴とする検出方法。
The skin color element acquisition process that acquires the skin color level that indicates the skin color of the image, and
A saturation element acquisition process for acquiring a saturation region included in the image and a saturation level indicating the degree of saturation of the image, and
Ratio with respect to the image before Ki飽sum region, a determination process of determining whether lower than the rate that has been set,
If it is determined to be lower than the percentage proportion of the previous SL saturation region is the set, on the basis of the skin color level, detects a skin color region of the image, than the percentage proportion of the previous SL saturation region is the set If it is determined that the skin color is not too low, the skin color area detection process for detecting the skin color area based on the skin color level and the saturation level , and
A detection method characterized by having.
コンピュータを、Computer,
画像の肌色らしさを示す肌色レベルを取得する肌色要素取得機能、A skin color element acquisition function that acquires the skin color level that indicates the skin color of the image,
前記画像に含まれる飽和領域及び前記画像の飽和の度合いを示す飽和レベルを取得する飽和要素取得機能、A saturation element acquisition function that acquires a saturation region included in the image and a saturation level indicating the degree of saturation of the image.
前記飽和領域の前記画像に対する割合が設定された割合よりも低いか否かを判定する判定機能、A determination function for determining whether or not the ratio of the saturated region to the image is lower than the set ratio.
前記判定機能により前記飽和領域の割合が前記設定された割合より低いと判定されれば、前記肌色レベルに基づいて、前記画像の肌色領域を検出し、前記判定機能により前記飽和領域の割合が前記設定された割合より低くないと判定されれば前記肌色レベル及び前記飽和レベルに基づいて肌色領域を検出する肌色領域検出機能、If the determination function determines that the ratio of the saturation region is lower than the set ratio, the skin color region of the image is detected based on the skin color level, and the determination function determines the ratio of the saturation region to be the said. A skin color area detection function that detects a skin color area based on the skin color level and the saturation level if it is determined that the ratio is not lower than the set ratio.
として機能させるプログラム。A program that functions as.
JP2019130422A 2019-07-12 2019-07-12 Detection device, detection method and program Active JP6795062B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2019130422A JP6795062B2 (en) 2019-07-12 2019-07-12 Detection device, detection method and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2019130422A JP6795062B2 (en) 2019-07-12 2019-07-12 Detection device, detection method and program

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP2016186167A Division JP2018049564A (en) 2016-09-23 2016-09-23 Detection apparatus and detection method

Publications (2)

Publication Number Publication Date
JP2019197579A JP2019197579A (en) 2019-11-14
JP6795062B2 true JP6795062B2 (en) 2020-12-02

Family

ID=68537593

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2019130422A Active JP6795062B2 (en) 2019-07-12 2019-07-12 Detection device, detection method and program

Country Status (1)

Country Link
JP (1) JP6795062B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021144970A1 (en) * 2020-01-17 2021-07-22 オリンパス株式会社 Information processing device, information processing method, and program

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH11196324A (en) * 1997-12-26 1999-07-21 Fuji Photo Film Co Ltd Method and device for outputting image
JP3836237B2 (en) * 1997-12-26 2006-10-25 富士写真フイルム株式会社 Image correction method and apparatus
JP2015094991A (en) * 2013-11-08 2015-05-18 株式会社ニコン Image processing device, imaging device and image processing program

Also Published As

Publication number Publication date
JP2019197579A (en) 2019-11-14

Similar Documents

Publication Publication Date Title
CN107871309B (en) Detection method, detection device, and recording medium
JP5744437B2 (en) TRACKING DEVICE, TRACKING METHOD, AND PROGRAM
JP5791336B2 (en) Image processing apparatus and control method thereof
JP6720881B2 (en) Image processing apparatus and image processing method
US10070052B2 (en) Image capturing apparatus, image processing apparatus, and control methods thereof
CN107730456B (en) Image processing method and image processing device
US20150163391A1 (en) Image capturing apparatus, control method of image capturing apparatus, and non-transitory computer readable storage medium
CN107241558B (en) Exposure processing method, device and terminal equipment
KR20130031574A (en) Image processing method and image processing apparatus
KR20120016476A (en) Image processing method and image processing device
CN111526279B (en) Image processing apparatus, image processing method, and recording medium
US20210306543A1 (en) Information processing apparatus, image capturing apparatus, method, and storage medium
JP6897036B2 (en) Image processing equipment, image processing methods and programs
KR102562720B1 (en) Detection apparatus, image processing apparatus, detection method, and image processing method
JP2020071809A (en) Image processing device and image processing method
JP6795062B2 (en) Detection device, detection method and program
JP4534750B2 (en) Image processing apparatus and image processing program
JP7375313B2 (en) Image processing device, image processing method, and image processing program
JP2014131187A (en) Imaging apparatus, control method of the same, and control program
JP5146223B2 (en) Program, camera, image processing apparatus, and image contour extraction method
JP2022184134A (en) Imaging device and its control method
JP7318251B2 (en) Image processing device, image processing method and program
JP6554009B2 (en) IMAGE PROCESSING APPARATUS, CONTROL METHOD THEREOF, PROGRAM, AND RECORDING MEDIUM
JP2020074100A (en) Image processing device, image processing method, and program
JP2016170626A (en) Image processor, image processing method, and image processing program

Legal Events

Date Code Title Description
A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20190830

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20190830

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20200909

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: 20201013

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20201026

R150 Certificate of patent or registration of utility model

Ref document number: 6795062

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150