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

Detection device, detection method, and program Download PDF

Info

Publication number
JP2019197579A
JP2019197579A JP2019130422A JP2019130422A JP2019197579A JP 2019197579 A JP2019197579 A JP 2019197579A JP 2019130422 A JP2019130422 A JP 2019130422A JP 2019130422 A JP2019130422 A JP 2019130422A JP 2019197579 A JP2019197579 A JP 2019197579A
Authority
JP
Japan
Prior art keywords
skin color
area
saturation
skin
region
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.)
Granted
Application number
JP2019130422A
Other languages
Japanese (ja)
Other versions
JP6795062B2 (en
Inventor
武志 佐藤
Takeshi Sato
武志 佐藤
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)

Abstract

To appropriately detect a skin color area of a person regardless of situations of a ray of light.SOLUTION: An imaging device 1 includes a skin map creation processing unit 53 and an image composition unit 54. The skin map creation processing unit 53 detects a skin color area included in an image. Also, the skin map creation processing unit 53 detects a saturation area with high brightness and low saturation included in the image. The image composition unit 54 uses the saturation area detected by the skin map creation processing unit 53 to execute a process to correct the skin color area detected by the skin map creation processing unit 53.SELECTED DRAWING: Figure 7

Description

本発明は、検出装置、及び検出方法に関する。   The present invention relates to a detection apparatus and a detection method.

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

特開2011−44132号公報JP 2011-44132 A

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

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

上記目的を達成するため、本発明の一態様の検出装置は
画像に含まれる高明度かつ低彩度である飽和領域を検出する飽和領域検出手段と、
前記飽和領域検出手段により検出した飽和領域に基づき画像に含まれる肌色領域の検出に用いられる所定の重み付けを設定する重み付け設定手段と、
前記重み付け設定手段により設定された所定の重み付けに基づいて、肌色領域を検出する肌色領域検出手段と、を備えることを特徴とする。
また、
画像に含まれる高明度かつ低彩度である飽和領域を検出する飽和領域検出手段と、
前記飽和領域検出手段により検出した飽和領域が所定の条件を満たすか否かを判定する判定手段と、
前記判定手段により前記飽和領域が所定の条件を満たすと判定されれば、画像に含まれる肌色領域の抽出に用いられる第1のマップ値に基づいて肌色領域を検出し、前記判定手段により前記飽和領域が所定の条件を満たさないと判定されれば前記第1のマップ値とは異なる第2のマップ値に基づいて肌色領域を検出する肌色領域検出手段と、
を有することを特徴とする。
In order to achieve the above object, a detection device according to an aspect of the present invention includes a saturation region detection unit that detects a saturation region having high brightness and low saturation included in an image,
Weight setting means for setting a predetermined weight used for detection of a skin color area included in an image based on the saturation area detected by the saturation area detection means;
Skin color area detecting means for detecting a skin color area based on the predetermined weight set by the weight setting means.
Also,
A saturated region detecting means for detecting a saturated region having high brightness and low saturation contained in an image;
Determining means for determining whether the saturated region detected by the saturated region detecting means satisfies a predetermined condition;
If the determination means determines that the saturated area satisfies a predetermined condition, the skin color area is detected based on a first map value used for extraction of the skin color area included in the image, and the saturation means is detected by the determination means. Skin color area detecting means for detecting a skin color area based on a second map value different from the first map value if it is determined that the area does not satisfy a predetermined condition;
It is characterized by having.

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

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

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

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

撮像装置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 imaging 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 imaging. 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 a program recorded in the ROM 12 or a program loaded from the storage unit 19 to the RAM 13.

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

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 a bus 14. An input / output interface 15 is also connected to the bus 14. An imaging 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 imaging unit 16 includes an optical lens unit and an image sensor.

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

イメージセンサは、光電変換素子や、AFE(Analog Front End)等から構成される。
光電変換素子は、例えばCMOS(Complementary Metal Oxide Semiconductor)型の光電変換素子等から構成される。光電変換素子には、光学レンズ部から被写体像が入射される。そこで、光電変換素子は、被写体像を光電変換(撮像)して画像信号を一定時間蓄積し、蓄積した画像信号をアナログ信号としてAFEに順次供給する。
AFEは、このアナログの画像信号に対して、A/D(Analog/Digital)変換処理等の各種信号処理を実行する。各種信号処理によって、YUV色空間のディジタル信号が生成され、撮像部16の出力信号として出力される。
このような撮像部16の出力信号を、以下、「撮像画像のデータ」と呼ぶ。撮像画像のデータは、CPU11や図示しない画像処理部等に適宜供給される。
The image sensor includes 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 photoelectrically converts (captures) the subject image, accumulates the image signal for a predetermined time, and sequentially supplies the accumulated image signal as an analog signal to the AFE.
The AFE performs 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.
Hereinafter, the output signal of the imaging unit 16 is referred to as “captured image data”. Data of the captured image 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 includes various buttons and the like, and inputs various types of information according to user instruction operations.
The output unit 18 includes a display, a speaker, and the like, and outputs images and sounds.
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 performed with other devices (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 attached to the drive 21. The program read from the removable medium 31 by the drive 21 is installed in the storage unit 19 as necessary. The removable medium 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 imaging device 1 configured in this way, for example, the light is in a situation where the brightness is high and the skin color is saturated, a dark shadow is formed, or a plurality of light sources having different color temperatures are mixed. In addition, the skin color area of a person is appropriately detected, and an image obtained by performing skin beautification processing only on the skin color area (hereinafter referred to as “skin skin image”) is generated.

[美肌画像の生成]
ここで、美肌画像の生成について説明する。
図2は、美肌画像の生成について説明するための模式図である。
[Generate skin tone image]
Here, 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, first, a beautiful skin image is generated from a captured image data, an image for background (hereinafter referred to as “standard image”), and an image to be subjected to skin beautification processing (hereinafter referred to as “whole” "Skin-beautification source image"). At this time, the color space between the “standard image” and the “entire skin beautification original image” is the YUV color space.
Then, the whole skin beautification processing image is subjected to skin beautification processing on the entire image to generate a whole skin beautification image. Also, a map (hereinafter referred to as “skin map”) in which the skin color area in the face of the whole skin image is extracted is created.

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

[肌マップの作成]
肌マップの作成について説明する。
図3は、肌マップの作成について説明するための模式図である。
[Create skin map]
The creation of a skin map will be described.
FIG. 3 is a schematic diagram for explaining 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に示すように、白色が最も肌色らしい部分であり、黒色が最も肌色らしくない部分として表示される。
In the skin map, first, an entire beautiful skin image which is a YUV color space is converted into an HSV (Hue: Hue, Saturation: Saturation / Chroma, Lightness: 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, and V are determined from weights determined in advance according to the difference from the average value. The skin color level (Lh, Ls, Lv) indicating the skin color likelihood of the channel is calculated.
Then, the skin map value in each pixel is calculated by multiplying the calculated skin color levels of the H, S, and V channels, and a skin map constituted by the skin map values is created. In the skin map, the part that seems to be skin color and the part that is not so are displayed in stages. In the skin map of this example, as shown in FIG. 2, white is the most likely skin color and black is the least likely skin color.

[種々の光の環境下での影響への対応]
肌マップ生成に際して、顔へ均一に光が当たっている場合は、肌色領域を精度よく抽出することができるが、例えば、濃い影ができたり、色温度の異なる複数の光源が混ざっていたりする種々の光の環境下であるような場合には、適切に肌色領域を抽出することができない。適切に肌色領域を抽出することができないと、肌色領域から外れた領域は、美肌処理の対象とならずに、最終的な画像においてノイズとして残ってしまう。
[Responding to the effects of various light environments]
When the skin map is generated, if the face is uniformly illuminated, the skin color area can be extracted with high accuracy, but for example, a dark shadow can be generated or a plurality of light sources with different color temperatures can be mixed. In the case of the light environment, it is not possible to appropriately extract the skin color region. If the skin color area cannot be extracted properly, the area outside the skin color area is not subjected to the skin beautification process and remains 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 handled as follows.
FIG. 4 is a schematic diagram for explaining the influence of various light environments. Here, the influence on the hue (H) will be described, and the skin color level in FIGS. 4 (a) and 4 (b) corresponds to the skin color level in FIG. 3 (a).
In an image shot in a normal scene, as shown in FIG. 4A, the frequency distribution in the hue (H) falls within the predetermined weighting value (within the calculated skin color level), and is appropriately set as a skin color region. Can be extracted. The alternate long and short dash line indicates a value at which the frequency is approximately zero in the negative direction from the average value.
On the other hand, for example, in an image shot in a scene in which a plurality of light sources having different color temperatures are mixed, there are a plurality of frequency peaks as shown in FIG. The frequency distribution in H) (particularly within the range of the arrow in the more negative direction than the one-dot chain line in FIG. 4A) does not fall within the weighting default value (does not fall within the calculated skin color level). It will come off.

そこで、本実施形態では、色相(H)の計測結果のヒストグラムを作成し、当該ヒストグラムの解析結果から、色相(H)の重み付けの係数を再決定する。ヒストグラムを解析して画像に応じた重み付けとすることで、種々の光の環境下でも適切に肌色領域を抽出することができるようになる。   Therefore, in the present embodiment, a histogram of the hue (H) measurement result is created, and the hue (H) weighting coefficient is re-determined from the analysis result of the histogram. By analyzing the histogram and assigning a weight according to the image, the skin color region can be appropriately extracted 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 hue (H) weighting.
First, the average value of the hue (H) measured in the human face measurement region (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, values (Rangep, Rangem) that are below the threshold value in the positive direction and the negative direction are searched, and the histogram is analyzed.
As a result of the analysis of the histogram, a predetermined weight is readjusted and determined in accordance with the searched rangep and range values. That is, as shown in FIG. 5B, adjustment is performed by expanding the predetermined weighting (conventional setting) to the newly determined 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, an appropriate skin color region can be extracted even in images taken under various light environments. In other words, in the method of calculating the skin color level using the color information of the HSV color space and detecting the skin color area, the weight component of the hue component, which has been fixed in the past, is adjusted according to the distribution of the hue component to thereby adjust the skin color level. By calculating, skin color areas are appropriately extracted even under 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 To be able to respond.

[肌の飽和領域への対応]
また、上述したような肌色領域の抽出の手法では、H,S,Vの各チャンネルで肌色を判定しているために、色相(H)が回転してしまい肌色の色相(H)から外れてしまった領域(以下、「飽和領域」という。)では、肌色領域として抽出されないという問題が生じる。本来肌色であるが飽和していて肌色領域として抽出されなかった飽和領域は、美肌処理の対象とならずに、最終的な画像においてノイズとして残ってしまう。
[Response to skin saturation]
Further, in the skin color region extraction method as described above, since the skin color is determined in each of the H, S, and V channels, the hue (H) rotates and deviates from the skin color hue (H). In the area that has become trapped (hereinafter referred to as “saturated area”), there is a problem that the skin color area is not extracted. A saturated region that is originally skin color but is saturated and not extracted as a skin color region remains as noise in the final image without being subjected to skin beautification processing.

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

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

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

美肌画像生成処理を実行する場合には、図7に示すように、CPU11において、画像取得部51と、画像処理部52と、肌マップ作成処理部53と、画像合成部54と、が機能する。   When executing the beautiful skin image generation processing, 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と、が設定される。   In one area of the storage unit 19, an image storage unit 71, a weighting information storage unit 72, and a face map storage unit 73 are set.

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

重み付け情報記憶部72には、肌色レベルを算出するためのHSVの重み付けの係数、飽和レベルを算出するための高明度(V)の領域及び低彩度(S)の領域の重み付けの係数に関する情報が記憶される。   The weighting information storage unit 72 includes information on HSV weighting coefficients for calculating the skin color level, and weighting coefficients 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 that is an oval mask image that is a mask image for subjecting only a face region to α blending, and substantially matches 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, for example, a standard image used as a background region other than the skin color region at the time of α blending from the captured image data output from the imaging unit 16, and the whole 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 may be acquired image data stored in an external device via the communication unit 20. .

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

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

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

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

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

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

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

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

ステップS14において、画像合成部54は、標準画像と全体美肌画像とを、肌マップを用いてαブレンドする。αブレンドの結果、人の顔の肌のみに美肌処理が施された美肌画像が生成される(図2を参照)。生成した美肌画像は、画像記憶部71に記憶される。
その後、美肌画像生成処理は終了する。
In step S <b> 14, the image composition unit 54 α blends the standard image and the whole beautiful skin image using the skin map. As a result of the α blending, a beautiful skin image in which the skin beautification process is performed only on the skin of the human face is generated (see FIG. 2). The generated beautiful skin image is stored in the image storage unit 71.
Thereafter, the beautiful skin image generation process ends.

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

ステップS31において、肌マップ作成処理部53は、YUV色空間の全体美肌画像をHSV変換し、計測したHVSの平均値からの差分でH,S,Vの各チャンネルのヒストグラムを作成する。   In step S31, the skin map creation processing unit 53 performs HSV conversion on the entire skin-beautified image in the YUV color space, and creates a histogram for each of the H, S, and V channels using a 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 S <b> 32, the skin map creation processing unit 53 determines weights for the H, S, and V histograms. In the S and V channels, the S and V weights stored in the weighting information storage unit 72 are determined as the S and V histogram weights (see FIGS. 3B and 3C). In the H channel, the H histogram is analyzed, and the H weighting range stored in the weighting information storage unit 72 is expanded to a region including H, and the weighting is determined again. This is done by searching for the following values (see FIG. 5A). As a result of the search, the weighting range is expanded to a place where the value is equal to or less than 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 skin color levels Lh, Ls, and Lv for each pixel from the determined weights of S and V and the redetermined weight of H.

ステップS34において、肌マップ作成処理部53は、顔領域において飽和領域が所定の割合以下であるか否かの判定を行う。当該判定を行うことで、飽和領域が狭く影響が出ない程度の所定の割合以下の画像については、飽和領域を考慮して処理を行わずに処理負担を軽減する。
飽和領域が所定の割合よりも多い場合には、ステップS34においてNOと判定されて、処理はステップS36に進む。
飽和領域が所定の割合以下の場合には、ステップS34においてYESと判定されて、処理はステップS35に進む。
In step S <b> 34, the skin map creation processing unit 53 determines whether or not the saturated area is equal to or less than a predetermined ratio in the face area. By performing the determination, the processing load is reduced without performing the processing in consideration of the saturation region for an image having a predetermined ratio or less so that the saturation region is not narrowly affected.
If the saturation region is greater than the predetermined ratio, NO is determined in step S34, and the process proceeds to step S36.
If the saturation region is less than or equal to the 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 creates a skin map by calculating a skin map value for each pixel based only on the calculated skin color level.
The skin map value is calculated by the following equation (1).
Skin map value (MAP) = Lh × Ls × Lv (1)
Note that “Lh” is a skin color level of hue (H), “Ls” is a skin color level of saturation (S), and “Lv” is a lightness (V) skin color level.
Thereafter, the skin map creation process ends.

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

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

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

ステップ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 that excludes areas that were originally detected as skin color areas despite being areas other than the face.
Thereafter, the skin map creation process ends.

以上のように構成される撮像装置1は、肌マップ作成処理部53と、画像合成部54と、を備える。
肌マップ作成処理部53は、画像に含まれる肌色領域を検出する。
また、肌マップ作成処理部53は、画像に含まれる高明度かつ低彩度である飽和領域を検出する。
画像合成部54は、肌マップ作成処理部53により検出した飽和領域を使用して、肌マップ作成処理部53により検出した肌色領域を補正する処理を行う。
これにより、撮像装置1においては、色相成分では検出の難しい肌色が飽和している部分も含め、適切に肌色領域が検出でき、光線の状況によらず人物の肌色領域を適切に検出することができる。
The imaging device 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 a skin color area 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 performs processing for correcting the skin color region detected by the skin map creation processing unit 53 using the saturation region detected by the skin map creation processing unit 53.
Thereby, in the imaging device 1, it is possible to appropriately detect a skin color region including a portion where a skin color that is difficult to detect with the hue component is saturated, and to appropriately detect a human skin color region regardless of the state of light rays. 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 a saturation region based on the color information excluding the hue component in the HSV color space.
Thereby, in the imaging device 1, the detection of a skin color area | region and a saturation area | region can be made compatible by using HSV color space.

肌マップ作成処理部53は、HSV色空間のうちの色相成分を含む色情報に基づき、画像を構成する画素毎に、肌色らしさを示す肌色レベルを算出する。
また、肌マップ作成処理部53は、HSV色空間のうちの色相成分を除く色情報に基づき、画像を構成する画素毎に、高明度かつ低彩度である飽和の度合いを示す飽和レベルを算出する。
また、肌マップ作成処理部53は、算出した肌色レベルが所定の閾値以上の領域を肌色領域として検出する。
また、肌マップ作成処理部53は、算出した飽和レベルが所定の閾値以上の領域を飽和領域として検出する。
これにより、撮像装置1においては、通常の光線の状況では肌色領域の検出に適している色相成分で肌色領域を検出し、かつ色相成分では検出の難しい肌色が飽和している部分も含め、適切に肌色領域を簡単に検出することができる。
The skin map creation processing unit 53 calculates a skin color level indicating the 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 with 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 an area where the calculated skin color level is equal to or higher than a predetermined threshold as a skin color area.
Further, the skin map creation processing unit 53 detects a region where the calculated saturation level is equal to or greater than a predetermined threshold as a saturation region.
As a result, in the imaging apparatus 1, the skin color area is detected with a hue component suitable for the detection of the skin color area in the normal light beam situation, and the skin color that is difficult to detect with the hue component is appropriately included. In addition, the skin color area can be easily detected.

画像合成部54は、肌マップ作成処理部53では検出できなかった一部の肌色領域を、肌マップ作成処理部53により検出した飽和領域を使用して補正する処理を行う。
これにより、撮像装置1においては、検出できなかった一部の肌色領域を、補正することができる。
The image composition unit 54 performs processing for correcting a part of the skin color area that cannot be detected by the skin map creation processing unit 53 by using the saturation region detected by the skin map creation processing unit 53.
Thereby, in the imaging device 1, the one part skin color area | region which was not able to be detected can be correct | amended.

画像合成部54は、検出した肌色領域と検出した飽和領域の論理和となる領域に当該肌色領域を補正する処理を行う。
これにより、撮像装置1においては、簡単な処理で補正の領域を特定することができる。
The image composition 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.
Thereby, in the imaging device 1, it is possible to specify a correction area by a simple process.

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

また、撮像装置1は、画像合成部54により補正した肌色領域に対して美肌処理を行う画像処理部52を、更に備える。
これにより、撮像装置1においては、人の肌を美肌にする美肌処理を施した画像を生成することができる。
The imaging apparatus 1 further includes an image processing unit 52 that performs skin beautification processing on the skin color area corrected by the image synthesis unit 54.
Thereby, in the imaging device 1, the image which performed the skin beautification process which makes a person's skin beautify can be produced | generated.

肌マップ作成処理部53は、画像を構成する画素毎に、肌色らしさを示す肌色レベルを算出する。
また、肌マップ作成処理部53と、画像を構成する画素毎に、高明度かつ低彩度である飽和の度合いを示す飽和レベルを算出する。
また、肌マップ作成処理部53と、算出した肌色レベルと、算出した飽和レベルとから画像に含まれる肌色領域を検出する。
これにより、撮像装置1においては、通常の光線の状況における肌色部分の検出だけでなく、肌色が飽和している部分も含め、適切に肌色領域が検出でき、光線の状況によらず人物の肌色領域を適切に検出することができる。
The skin map creation processing unit 53 calculates a skin color level indicating the skin color likeness for each pixel constituting the image.
The skin map creation processing unit 53 calculates a saturation level indicating the degree of saturation with high brightness and low saturation for each pixel constituting the image.
Also, a skin color area 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, the imaging apparatus 1 can appropriately detect the skin color area including not only the detection of the skin color portion in the normal light beam situation but also the portion where the skin color is saturated. The area can be detected appropriately.

肌マップ作成処理部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 information on the color component including the hue component in the HSV color space.
Further, the skin map creation processing unit 53 calculates a 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 imaging apparatus 1, the skin color area is detected with a hue component suitable for the detection of the skin color area in the normal light beam situation, and the skin color that is difficult to detect with the hue component is appropriately included. In addition, the skin color area can be easily detected.

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

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

肌マップ作成処理部53は、画像を構成する画素毎の色相成分の値の分布に基づき、肌マップ作成処理部53が肌色レベルを算出するための色相成分の重み付けを調整する。
また、肌マップ作成処理部53は、調整した色相成分の重み付けで、HSV色空間のうちの色相成分を含む色成分の情報に基づき、画像を構成する画素毎に、肌色レベルを算出する。
これにより、撮像装置1においては、通常の光線の状況では肌色領域の検出に適している色相成分の値の分布に基づき、肌マップ作成処理部53が肌色レベルを算出するための色相成分の重み付けを調整するために、光線の状況によらず人物の肌色領域を適切に検出することができる。
The skin map creation processing unit 53 adjusts 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 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 on the color component including the hue component in the HSV color space by the weighting of the adjusted hue component.
Thereby, in the imaging apparatus 1, the weight component weighting for the skin map creation processing unit 53 to calculate the skin color level based on the distribution of the hue component value suitable for the detection of the skin color region in the normal light ray situation. Therefore, it is possible to appropriately detect the skin color region of a person regardless of the state of light rays.

また、撮像装置1は、検出した肌色領域に対して美肌処理を行う画像処理部52を、更に備える。
これにより、撮像装置1においては、人の肌を美肌にする美肌処理を施した画像を生成することができる。
In addition, the imaging apparatus 1 further includes an image processing unit 52 that performs a beautifying process on the detected skin color area.
Thereby, in the imaging device 1, the image which performed the skin beautification process which makes a person's skin beautify can be produced | generated.

肌マップ作成処理部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 a saturation state that is high brightness and low saturation included in the image.
Further, the skin map creation processing unit 53 detects a skin color region in the image based on the determined skin color situation and the determined saturation situation.
Thereby, in the imaging device 1, even if the color temperature is different or a plurality of light sources having different color temperatures are mixed, the skin color area can be detected appropriately, regardless of the state of the light beam. A person's skin color region can be detected appropriately.

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

また、撮像装置1は、検出した肌色領域に対して美肌処理を行う画像処理部52を、更に備える。
これにより、撮像装置1においては、人の肌を美肌にする美肌処理を施した画像を生成することができる。
In addition, the imaging apparatus 1 further includes an image processing unit 52 that performs a beautifying process on the detected skin color area.
Thereby, in the imaging device 1, the image which performed the skin beautification process which makes a person's skin beautify can be produced | generated.

なお、本発明は、上述の実施形態に限定されるものではなく、本発明の目的を達成できる範囲での変形、改良等は本発明に含まれるものである。   In addition, this invention is not limited to the above-mentioned embodiment, The deformation | transformation in the range which can achieve the objective of this invention, improvement, etc. are included in this invention.

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

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

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

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

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

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

また、上述の実施形態では、本発明が適用される撮像装置1は、デジタルカメラを例として説明したが、特にこれに限定されない。
例えば、本発明は、美肌画像生成処理機能を有する電子機器一般に適用することができる。具体的には、例えば、本発明は、ノート型のパーソナルコンピュータ、プリンタ、テレビジョン受像機、ビデオカメラ、携帯型ナビゲーション装置、携帯電話機、スマートフォン、ポータブルゲーム機等に適用可能である。
In the above-described embodiment, the imaging apparatus 1 to which the present invention is applied has been described using a digital camera as an example, but is not particularly limited thereto.
For example, the present invention can be applied to general electronic devices having a beautiful skin image generation processing function. Specifically, for example, the present invention can be applied to a notebook personal computer, a printer, a television receiver, a video camera, a portable navigation device, a mobile phone, a smartphone, a portable game machine, 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 can be executed by software.
In other words, the functional configuration of FIG. 7 is merely an example, and is not particularly limited. That is, it is sufficient that the imaging apparatus 1 has a function capable of executing the above-described series of processing as a whole, and what functional blocks are used to realize this function is not particularly limited to the example of FIG.
In addition, one functional block may be constituted by hardware alone, software alone, 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 configured by various processing devices such as a single processor, a multiprocessor, and a multicore processor. In addition to the above, these various processing apparatuses and a combination of processing circuits such as ASIC (Application Specific Integrated Circuit) and FPGA (Field-Programmable Gate Array) are included.

一連の処理をソフトウェアにより実行させる場合には、そのソフトウェアを構成するプログラムが、コンピュータ等にネットワークや記録媒体からインストールされる。
コンピュータは、専用のハードウェアに組み込まれているコンピュータであってもよい。また、コンピュータは、各種のプログラムをインストールすることで、各種の機能を実行することが可能なコンピュータ、例えば汎用のパーソナルコンピュータであってもよい。
When a series of processing is executed by software, a program constituting the software is installed on a computer or the like from a network or a recording medium.
The computer may be a computer incorporated in dedicated hardware. 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 constituted by the removable medium 31 of FIG. 1 distributed separately from the apparatus main body in order to provide the program to the user, but also in a state of being incorporated in the apparatus main body in advance. The recording medium etc. provided in The removable medium 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 disc is composed of, for example, a CD-ROM (Compact Disk-Read Only Memory), a DVD (Digital Versatile Disc), a Blu-ray (registered trademark) Disc (Blu-ray Disc), and the like. The magneto-optical disk is configured by an MD (Mini-Disk) or the like. In addition, the recording medium provided to the user in a state of being preliminarily incorporated in the apparatus main body includes, for example, the ROM 12 in FIG. 1 in which a program is recorded, the hard disk included in the storage unit 19 in FIG.

なお、本明細書において、記録媒体に記録されるプログラムを記述するステップは、その順序に沿って時系列的に行われる処理はもちろん、必ずしも時系列的に処理されなくとも、並列的或いは個別に実行される処理をも含むものである。   In the present specification, the step of describing the program recorded on the recording medium is not limited to the processing performed in time series along the order, but is not necessarily performed in time series, either in parallel or individually. The process to be executed is also included.

以上、本発明のいくつかの実施形態について説明したが、これらの実施形態は、例示に過ぎず、本発明の技術的範囲を限定するものではない。本発明はその他の様々な実施形態を取ることが可能であり、さらに、本発明の要旨を逸脱しない範囲で、省略や置換等種々の変更を行うことができる。これら実施形態やその変形は、本明細書等に記載された発明の範囲や要旨に含まれるとともに、特許請求の範囲に記載された発明とその均等の範囲に含まれる。   As mentioned above, although several embodiment of this invention was described, these embodiment is only an illustration and does not limit the technical scope of this invention. The present invention can take other various embodiments, and various modifications such as omission and replacement 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 this specification and the like, and are included in 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 invention described in the scope of claims at the beginning of the filing of the present application will be appended.
[Appendix 1]
Skin color area detecting means for detecting a skin color area included in the image;
A saturated region detecting means for detecting a saturated region having high brightness and low saturation contained in an image;
Skin color area correction means for performing processing for correcting the skin color area detected by the skin color area detection means using the saturation area detected by the saturation area detection means;
A detection apparatus comprising:
[Appendix 2]
The skin color area detecting means detects the skin color area based on color information including a hue component in the HSV color space,
The saturation region detection means detects the saturation region based on color information excluding a hue component in the HSV color space.
The detection device according to supplementary note 1, wherein:
[Appendix 3]
A skin color level calculating means for calculating a skin color level indicating skin color for each pixel constituting the image, based on color information including a hue component in the HSV color space;
Saturation level calculation means for calculating a saturation level indicating a degree of saturation with high brightness and low saturation for each pixel constituting the image, based on color information excluding a hue component in the HSV color space; ,
The skin color region detection means detects a region where the calculated skin color level is a predetermined threshold value or more as the skin color region,
The saturation region detection means detects a region where the calculated saturation level is a predetermined threshold or more as the saturation region.
The detection device according to appendix 2, wherein
[Appendix 4]
The flesh color area correction means performs a process of correcting a part of the flesh color area that could not be detected by the flesh color area detection means by using the saturation area detected by the saturation area detection means.
The detection device according to any one of appendices 1 to 3, wherein
[Appendix 5]
The skin color area correction means performs a process of correcting the skin color area to an area that is a logical sum of the detected skin color area and the detected saturation area.
The detection device according to supplementary note 4, wherein
[Appendix 6]
The skin color area correction unit performs processing for correcting the corrected skin color area to be a skin color area of a person's face by further using a reference person face area information prepared in advance.
The detection device according to any one of supplementary notes 1 to 5, wherein:
[Appendix 7]
Image processing means for performing a beautifying process on the skin color area corrected by the skin color area correction means,
The detection device according to any one of supplementary notes 1 to 5, wherein:
[Appendix 8]
Skin color level calculating means for calculating a skin color level indicating the color of the skin color for each pixel constituting the image;
Saturation level calculating means for calculating a saturation level indicating a degree of saturation with high brightness and low saturation for each pixel constituting the image;
A skin color area detecting means for detecting a skin color area included in an image from the skin color level calculated by the skin color level calculating means and the saturation level calculated by the saturation level calculating means;
A detection apparatus comprising:
[Appendix 9]
The skin color level calculating means calculates the skin color level for each pixel constituting the image based on information on a color component including a hue component in the HSV color space,
The saturation level calculation means calculates the saturation level for each pixel constituting the image based on information of color components excluding hue components in the HSV color space.
Item 9. The detection device according to appendix 8, wherein
[Appendix 10]
The skin color area detecting means detects, as a skin color area, an area in which at least one of the calculated skin color level and the calculated saturation level is equal to or greater than a predetermined threshold;
The detection apparatus according to appendix 8 or 9, characterized in that.
[Appendix 11]
The skin color area detection means performs processing for detecting a skin color area of a person's face included in an image by further using a reference person face area information prepared in advance.
The detection device according to any one of appendices 8 to 10, characterized in that:
[Appendix 12]
Based on the distribution of hue component values for each pixel constituting the image, the skin color level calculating means further comprises adjusting means for adjusting the weight of the hue component for calculating the skin color level,
The flesh color level calculating means calculates the flesh 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 notes 3, 8 to 11, wherein
[Appendix 13]
Image processing means for performing skin beautification processing on the skin color area detected by the skin color area detection means;
The detection device according to any one of appendices 8 to 12, characterized in that:
[Appendix 14]
Skin color discriminating means for discriminating the status of the skin color included in the image;
Saturation status discrimination means for discriminating the saturation status of high brightness and low saturation contained in the image,
Skin color area detecting means for detecting a skin color area in an image based on the skin color status determined by the skin color determining means and the saturation status determined by the saturation status determining means;
A detection apparatus comprising:
[Appendix 15]
A skin color level calculating means for calculating a skin color level indicating skin color for each pixel constituting the image, based on color information including a hue component in the HSV color space;
Adjusting means for adjusting the weighting of the hue component for the skin color level calculating means to calculate the skin color level based on the distribution of the value of the hue component for each pixel constituting the image;
Skin color area detecting means for detecting a skin color area included in the image based on the skin color level calculated by the skin color level calculating means with the weighting adjusted by the adjusting means;
A detection apparatus comprising:
[Appendix 16]
Image processing means for performing skin beautification processing on the skin color area detected by the skin color area detection means;
The detection apparatus according to appendix 15, wherein
[Appendix 17]
A skin color area detection process for detecting a skin color area included in the image;
Saturation region detection processing for detecting a saturation region having high brightness and low saturation contained in an image,
A skin color area correction process for performing a process of correcting the skin color area detected by the skin color area detection process using the saturation area detected by the saturation area detection process;
A detection method comprising:
[Appendix 18]
For each pixel constituting the image, a skin color level calculation process for calculating a skin color level indicating the color of the skin color;
Saturation level calculation processing for calculating a saturation level indicating a degree of saturation with high brightness and low saturation for each pixel constituting the image,
A skin color area detection process for detecting 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]
A skin color determination process for determining the state of the skin color included in the image;
Saturation situation processing to determine the saturation situation of high brightness and low saturation contained in the image,
A skin color area detection process for detecting a skin color area in an image based on the skin color status determined by the skin color determination process and the saturation status determined by the saturation status process;
A detection method comprising:
[Appendix 20]
A skin color level calculation process for calculating a skin color level indicating skin color for each pixel constituting the image, based on color information including a hue component in the HSV color space;
An adjustment process for adjusting the weighting of the hue component for the skin color level calculating means to calculate 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 for detecting 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・・・顔マップ記憶部   DESCRIPTION OF SYMBOLS 1 ... Imaging device, 11 ... CPU, 12 ... ROM, 13 ... RAM, 14 ... Bus, 15 ... Input-output interface, 16 ... Imaging part, 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 compositing unit 71 71 Image storage unit 72 72 Weight information storage unit 73 Face map storage unit

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

上記目的を達成するため、本発明の一態様の検出装置は、
画像の肌色らしさを示す肌色レベルを取得する肌色要素取得手段と、
前記画像に含まれる飽和領域及び前記画像の飽和の度合いを示す飽和レベルを取得する飽和要素取得手段と、
記飽和領域の前記画像に対する割合、設定された割合よりも低いか否かを判定する判定手段と、
前記判定手段により前記飽和領域の割合前記設定された割合より低いと判定されれば、前記肌色レベルに基づいて、前記画像肌色領域を検出し、前記判定手段により前記飽和領域の割合が前記設定された割合より低くないと判定されれば前記肌色レベル及び前記飽和レベルに基づいて肌色領域を検出する肌色領域検出手段と、
を有することを特徴とする
In order to achieve the above object, a detection apparatus according to one embodiment of the present invention includes:
A skin color element acquisition means for acquiring a skin color level indicating the skin color likeness of the image;
Saturation element acquisition means for acquiring a saturation level indicating a saturation region included in the image and a degree of saturation of the image;
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 saturated area is lower than the set ratio , the skin color area of the image is detected based on the skin color level, and the ratio of the saturated area is determined by the determination means. Skin color area detecting means for detecting 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 a set ratio ;
It is characterized by having .

Claims (12)

画像に含まれる高明度かつ低彩度である飽和領域を検出する飽和領域検出手段と、
前記飽和領域検出手段により検出した飽和領域に基づき画像に含まれる肌色領域の検出に用いられる所定の重み付けを設定する重み付け設定手段と、
前記重み付け設定手段により設定された所定の重み付けに基づいて、肌色領域を検出する肌色領域検出手段と、
を備えることを特徴とする検出装置。
A saturated region detecting means for detecting a saturated region having high brightness and low saturation contained in an image;
Weight setting means for setting a predetermined weight used for detection of a skin color area included in an image based on the saturation area detected by the saturation area detection means;
A skin color area detecting means for detecting a skin color area based on the predetermined weight set by the weight setting means;
A detection apparatus comprising:
前記飽和領域検出手段により検出した飽和領域が所定の条件を満たすか否かを判定する判定手段と、
前記肌色領域検出手段により検出された肌色領域における情報のみに基づいて第1のマップ値を作成する、又は前記肌色領域における情報及び前記飽和領域における情報に基づいて第2のマップ値を作成するマップ値作成手段とを有し、
前記肌色領域検出手段は、前記判定手段により前記飽和領域が所定の条件を満たすと判定されれば、第1のマップ値に基づいて肌色領域を検出し、前記判定手段により前記飽和領域が所定の条件を満たさないと判定されれば第2のマップ値に基づいて肌色領域を検出する
ことを特徴とする請求項1に記載の検出装置。
Determining means for determining whether the saturated region detected by the saturated region detecting means satisfies a predetermined condition;
A map that creates a first map value based only on information in the skin color area detected by the skin color area detection means, or creates a second map value based on information in the skin color area and information in the saturation area A value creating means,
The skin color area detection means detects a skin color area based on a first map value when the determination means determines that the saturation area satisfies a predetermined condition, and the determination means determines the saturation area as a predetermined area. The detection apparatus according to claim 1, wherein if it is determined that the condition is not satisfied, the skin color area is detected based on the second map value.
画像に含まれる高明度かつ低彩度である飽和領域を検出する飽和領域検出手段と、
前記飽和領域検出手段により検出した飽和領域が所定の条件を満たすか否かを判定する判定手段と、
前記判定手段により前記飽和領域が所定の条件を満たすと判定されれば、画像に含まれる肌色領域の抽出に用いられる第1のマップ値に基づいて肌色領域を検出し、前記判定手段により前記飽和領域が所定の条件を満たさないと判定されれば前記第1のマップ値とは異なる第2のマップ値に基づいて肌色領域を検出する肌色領域検出手段と、
を有することを特徴とする検出装置。
A saturated region detecting means for detecting a saturated region having high brightness and low saturation contained in an image;
Determining means for determining whether the saturated region detected by the saturated region detecting means satisfies a predetermined condition;
If the determination means determines that the saturated area satisfies a predetermined condition, the skin color area is detected based on a first map value used for extraction of the skin color area included in the image, and the saturation means is detected by the determination means. Skin color area detecting means for detecting a skin color area based on a second map value different from the first map value if it is determined that the area does not satisfy a predetermined condition;
A detection apparatus comprising:
前記判定手段は、前記飽和領域検出手段により検出した飽和領域が画像の特定領域のうちの所定の割合を越えているか否かを判定し、
前記肌色領域検出手段は、前記判定手段により前記飽和領域が前記所定の割合を越えていると判定されれば前記第1のマップ値に基づいて肌色領域を検出し、前記判定手段により前記飽和領域が前記所定の割合を越えていないと判定されれば前記第2のマップ値に基づいて肌色領域を検出する
ことを特徴とする請求項2又は3に記載の検出装置。
The determination unit determines whether the saturation region detected by the saturation region detection unit exceeds a predetermined ratio of the specific region of the image;
The skin color area detection means detects a skin color area based on the first map value if the determination means determines that the saturation area exceeds the predetermined ratio, and the determination means detects the saturation area. 4. The detection apparatus according to claim 2, wherein if it is determined that the predetermined ratio does not exceed the predetermined ratio, a skin color region is detected based on the second map value. 5.
前記特定領域は顔領域であることを特徴とする請求項4に記載の検出装置。   The detection apparatus according to claim 4, wherein the specific area is a face area. 前記肌色領域検出手段は、前記判定手段により前記飽和領域が所定の条件を満たすと判定されれば前記第1のマップ値に基づいて肌色領域を検出し、前記判定手段により前記飽和領域が所定の条件を満たさないと判定されれば前記第1のマップ値に基づいて算出される前記第2のマップ値に基づいて肌色領域を検出する
ことを特徴とする請求項2乃至5の何れかに記載の検出装置。
The skin color area detection means detects a skin color area based on the first map value if the determination means determines that the saturation area satisfies a predetermined condition, and the determination means determines that the saturation area is a predetermined area. 6. The skin color region is detected based on the second map value calculated based on the first map value if it is determined that the condition is not satisfied. 6. Detection device.
前記肌色領域検出手段は、HSV色空間のうちの色相成分を含む色情報に基づき、前記肌色領域を検出し、
前記飽和領域検出手段は、HSV色空間のうちの色相成分を除く色情報に基づき、前記飽和領域を検出する、
ことを特徴とする請求項1乃至6の何れかに記載の検出装置。
The skin color area detecting means detects the skin color area based on color information including a hue component in the HSV color space,
The saturation region detection means detects the saturation region based on color information excluding a hue component in the HSV color space.
The detection device according to claim 1, wherein
HSV色空間のうちの色相成分を含む色情報に基づき、前記画像に含まれる複数の部分毎に、肌色らしさを示す肌色レベルを算出する肌色レベル算出手段と、
HSV色空間のうちの色相成分を除く色情報に基づき、前記画像に含まれる複数の部分毎に、高明度かつ低彩度である飽和の度合いを示す飽和レベルを算出する飽和レベル算出手段と、を更に備え、
前記肌色領域検出手段は、算出した肌色レベルが所定の閾値以上の領域を前記肌色領域として検出し、
前記飽和領域検出手段は、算出した飽和レベルが所定の閾値以上の領域を前記飽和領域として検出する、
ことを特徴とする請求項7に記載の検出装置。
Skin color level calculating means for calculating a skin color level indicative of skin color for each of a plurality of portions included in the image, based on color information including a hue component in the HSV color space;
Saturation level calculation means for calculating a saturation level indicating a degree of saturation with high brightness and low saturation for each of a plurality of portions included in the image, based on color information excluding a hue component in the HSV color space; Further comprising
The skin color region detection means detects a region where the calculated skin color level is a predetermined threshold value or more as the skin color region,
The saturation region detection means detects a region where the calculated saturation level is a predetermined threshold or more as the saturation region.
The detection device according to claim 7.
予め用意されている基準となる人物の顔領域情報を更に使用して、検出した前記肌色領域が人物の顔の肌色領域となるように補正する処理を行う補正手段を有する、
ことを特徴とする請求項1乃至8の何れか1項に記載の検出装置。
A correction means for performing a process of correcting the detected skin color area to be a skin color area of the person's face by further using the face area information of the reference person prepared in advance;
The detection apparatus according to claim 1, wherein the detection apparatus includes:
前記肌色領域検出手段により検出した前記肌色領域に対して美肌処理を行う画像処理手段を、更に備える、
ことを特徴とする請求項1乃至9の何れか1項に記載の検出装置。
Image processing means for performing skin beautification processing on the skin color area detected by the skin color area detection means;
The detection device according to claim 1, wherein
画像に含まれる高明度かつ低彩度である飽和領域を検出する飽和領域検出処理と、
前記飽和領域検出処理により検出した飽和領域が所定の条件を満たすか否かを判定する判定処理と、
前記判定処理により前記飽和領域が所定の条件を満たすと判定されれば、画像に含まれる肌色領域の抽出に用いられる第1のマップ値に基づいて肌色領域を検出し、前記判定処理により前記飽和領域が所定の条件を満たさないと判定されれば前記第1のマップ値とは異なる第2のマップ値に基づいて肌色領域を検出する肌色領域検出処理と、
を含むことを特徴とする検出方法。
Saturation region detection processing for detecting a saturation region having high brightness and low saturation contained in an image,
A determination process for determining whether or not the saturated area detected by the saturated area detection process satisfies a predetermined condition;
If it is determined by the determination process that the saturated area satisfies a predetermined condition, a skin color area is detected based on a first map value used for extracting a skin color area included in the image, and the saturation process is performed by the determination process. A skin color region detection process for detecting a skin color region based on a second map value different from the first map value if it is determined that the region does not satisfy a predetermined condition;
A detection method comprising:
画像に含まれる高明度かつ低彩度である飽和領域を検出する飽和領域検出処理と、
前記飽和領域検出処理により検出した飽和領域が所定の条件を満たすか否かを判定する判定処理と、
前記判定処理により前記飽和領域が所定の条件を満たすと判定されれば、画像に含まれる肌色領域の抽出に用いられる第1のマップ値に基づいて肌色領域を検出し、前記判定処理により前記飽和領域が所定の条件を満たさないと判定されれば前記第1のマップ値とは異なる第2のマップ値に基づいて肌色領域を検出する肌色領域検出処理と、
を含むことを特徴とする検出方法。
Saturation region detection processing for detecting a saturation region having high brightness and low saturation contained in an image,
A determination process for determining whether or not the saturated area detected by the saturated area detection process satisfies a predetermined condition;
If it is determined by the determination process that the saturated area satisfies a predetermined condition, a skin color area is detected based on a first map value used for extracting a skin color area included in the image, and the saturation process is performed by the determination process. A skin color region detection process for detecting a skin color region based on a second map value different from the first map value if it is determined that the region does not satisfy a predetermined condition;
A detection method comprising:
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 device and detection method

Publications (2)

Publication Number Publication Date
JP2019197579A true JP2019197579A (en) 2019-11-14
JP6795062B2 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)

Cited By (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

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH11191156A (en) * 1997-12-26 1999-07-13 Fuji Photo Film Co Ltd Method and device for correcting image
JPH11196324A (en) * 1997-12-26 1999-07-21 Fuji Photo Film Co Ltd Method and device for outputting image
JP2015094991A (en) * 2013-11-08 2015-05-18 株式会社ニコン Image processing device, imaging device and image processing program

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH11191156A (en) * 1997-12-26 1999-07-13 Fuji Photo Film Co Ltd Method and device for correcting image
JPH11196324A (en) * 1997-12-26 1999-07-21 Fuji Photo Film Co Ltd Method and device for outputting image
JP2015094991A (en) * 2013-11-08 2015-05-18 株式会社ニコン Image processing device, imaging device and image processing program

Cited By (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

Also Published As

Publication number Publication date
JP6795062B2 (en) 2020-12-02

Similar Documents

Publication Publication Date Title
JP2018049564A (en) Detection device and detection method
JP5791336B2 (en) Image processing apparatus and control method thereof
JP5744437B2 (en) TRACKING DEVICE, TRACKING METHOD, AND PROGRAM
CN110022469B (en) Image processing method, image processing device, storage medium and electronic equipment
JP6421794B2 (en) Image processing apparatus, image processing method, and program
JP6720881B2 (en) Image processing apparatus and image processing method
KR20120016476A (en) Image processing method and image processing apparatus
JP2010219573A (en) Image processing apparatus, image capturing apparatus, image processing method, and computer program
CN111526279B (en) Image processing apparatus, image processing method, and recording medium
JP2018049564A5 (en)
US10863103B2 (en) Setting apparatus, setting method, and storage medium
KR102562720B1 (en) Detection apparatus, image processing apparatus, detection method, and image processing method
JP6423668B2 (en) Image processing apparatus, control method therefor, and program
US9392182B2 (en) Raw data processing apparatus, raw data processing method and imaging device
JP6795062B2 (en) Detection device, detection method and program
JP2006180078A (en) Electronic camera, image processor and image processing program
JP5146223B2 (en) Program, camera, image processing apparatus, and image contour extraction method
JP6554009B2 (en) IMAGE PROCESSING APPARATUS, CONTROL METHOD THEREOF, PROGRAM, AND RECORDING MEDIUM
JP7318251B2 (en) Image processing device, image processing method and program
JP7375313B2 (en) Image processing device, image processing method, and image processing program
JP6366432B2 (en) Image processing apparatus, control method therefor, and program
JP2016206728A (en) Image processing apparatus and image processing method
JP2017116606A (en) Focus adjustment device, imaging device and program
JP2016170626A (en) Image processor, image processing method, and image processing program

Legal Events

Date Code Title Description
A521 Request for written amendment filed

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