JP2020102059A - Image processor - Google Patents

Image processor Download PDF

Info

Publication number
JP2020102059A
JP2020102059A JP2018240480A JP2018240480A JP2020102059A JP 2020102059 A JP2020102059 A JP 2020102059A JP 2018240480 A JP2018240480 A JP 2018240480A JP 2018240480 A JP2018240480 A JP 2018240480A JP 2020102059 A JP2020102059 A JP 2020102059A
Authority
JP
Japan
Prior art keywords
skin color
face
area
detected
color detection
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2018240480A
Other languages
Japanese (ja)
Inventor
寺山 公太
Kimita Terayama
公太 寺山
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Canon Inc
Original Assignee
Canon Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Canon Inc filed Critical Canon Inc
Priority to JP2018240480A priority Critical patent/JP2020102059A/en
Publication of JP2020102059A publication Critical patent/JP2020102059A/en
Pending legal-status Critical Current

Links

Landscapes

  • Image Processing (AREA)
  • Color Television Image Signal Generators (AREA)
  • Processing Of Color Television Signals (AREA)

Abstract

To provide an image processor by which a skin color area is appropriately detected and a skincare effect is obtained even when luminance difference of a face of a subject is large due to slanting light or backlight, etc.SOLUTION: A skin color area correction circuit comprises: a face area detection part which detects a face of a person from an image; and a skin color detection part which detects a skin color part of the person. The skin color area correction circuit calculates a skin color detection condition in the skin color detection part from a face detection area detected by the face area detection part, and re-calculates the skin color detection condition in the skin color detection part so as to cause a ratio of area of the skin color detection area detected by the skin color detection part in the face detection area to exceed a predetermined value, and to cause the face to be detected by imaging the skin color detection area by the skin color detection part and detecting the face by the face area detection part.SELECTED DRAWING: Figure 3

Description

本発明は、画像中の人物の肌を適切に検出し補正する画像処理技術に関する。 The present invention relates to an image processing technique for appropriately detecting and correcting the skin of a person in an image.

近年、画像中の人物について肌を美しく見せる美肌効果が得られる画像処理を備えたアプリケーションソフトやカメラなどの撮像装置が数多く存在する。これらのアプリケーションソフトや撮像装置における画像処理の概略としては、画像から肌色や人物の顔を検出し、肌色領域を平滑化処理や色調の調整によって肌をつるつるでより好ましい肌色に補正するなどの方法により実現されている。 2. Description of the Related Art In recent years, there have been many imaging devices such as application software and cameras equipped with image processing capable of obtaining a skin-beautifying effect that makes a person in an image look beautiful. The outline of the image processing in these application software and the image pickup device is a method of detecting a skin color or a person's face from an image and correcting the skin color area to a more preferable skin color by smoothing the skin and adjusting the color tone. It is realized by.

ところで、カラーチャートなどに並ぶような一般的な肌色を対象として肌色検出を行う場合、例えば斜光や逆光などで被写体顔面上の輝度差が大きい画像においては、陰影部の暗い肌色や白飛び間際の肌色などを検出できずに、顔全体を肌色領域として検出できない問題がある。 By the way, when performing skin color detection for general skin colors such as those arranged in a color chart, for example, in an image in which the brightness difference on the subject's face is large due to oblique light or backlight, dark skin color in the shaded area There is a problem that the whole face cannot be detected as a skin color area because the skin color or the like cannot be detected.

一方で、このような輝度差が大きい画像でも肌色検出できるように単純に肌色として検出する色検出範囲を拡大すると、肌色に似た色の肌ではない背景領域などの被写体も肌色領域として検出され、肌色領域に対する補正処理が誤って行われてしまう問題がある。 On the other hand, if the color detection range that is simply detected as skin color is expanded so that skin color can be detected even in an image with such a large brightness difference, a subject such as a background area that is not skin of a color similar to skin color is also detected as a skin color area. However, there is a problem that the correction process for the skin color region is erroneously performed.

この課題に対し、特許文献1には、肌色に相当する色の範囲に含まれる色を持つ画素の集合を肌色領域として検出し、その肌色領域の大きさを表す評価値を算出し、被写体の大きさを表す基準値に対する評価値の差が所定範囲に含まれる色検出条件の中で、最も狭い色検出範囲を肌色検出条件とする方法が開示されている。 To solve this problem, in Patent Document 1, a set of pixels having a color included in a color range corresponding to a skin color is detected as a skin color area, an evaluation value representing the size of the skin color area is calculated, and A method is disclosed in which the smallest color detection range among the color detection conditions in which the difference between the evaluation value and the reference value indicating the size is included in the predetermined range is the skin color detection condition.

特開2015−184906号公報JP, 2015-184906, A

前記特許文献1では、被写体の大きさを表す基準値が必要なため、肌色と間違う背景被写体などがなく誤検出しない条件で撮影された画像を用意して、肌色を持つ被写体を確実に検出可能な広い色検出範囲である初期検出条件により肌色検出を行って基準値を算出する必要がある。 In Patent Document 1, since a reference value representing the size of the subject is required, it is possible to reliably detect a subject with a skin color by preparing an image taken under the condition that there is no background subject such as a skin color and a false detection It is necessary to perform the skin color detection under the initial detection condition that is a wide color detection range to calculate the reference value.

このため被写体の大きさが変わる場合には、その撮影したいシーンごとに基準値算出用画像の撮影が必要となること、さらに肌色に近い色の背景被写体があるシーンでは、その背景被写体を隠すなどして基準値算出用画像の撮影が必要となり、非常に手間がかかる。 For this reason, when the size of the subject changes, it is necessary to capture a reference value calculation image for each scene to be captured, and in a scene in which there is a background subject having a color close to the skin color, the background subject is hidden. Then, it is necessary to take the image for calculating the reference value, which is very troublesome.

このように、肌色として検出する色検出範囲を適切に設定することが可能であるが、基準画像の事前準備が必要なため、シーン変化に対して弱いという問題がある。 As described above, it is possible to appropriately set the color detection range to be detected as the skin color, but there is a problem that it is weak against a scene change because the reference image needs to be prepared in advance.

そこで本発明の目的は、斜光や逆光などで被写体の顔の輝度差が大きい画像でも、基準画像などの事前準備の必要なしに、検出された顔領域に対して適切な肌色検出条件を設定することでムラなく肌色領域を検出し、検出された肌色領域に対し美肌効果が得られる画像処理を実施する画像処理装置を提供することにある。 Therefore, an object of the present invention is to set an appropriate skin color detection condition for a detected face area without requiring advance preparation such as a reference image even in an image in which the brightness difference of a subject's face due to oblique light or backlight is large. Accordingly, it is an object of the present invention to provide an image processing device that detects a skin color area without unevenness and performs image processing for obtaining a beautiful skin effect on the detected skin color area.

上記の目的を達成するために、本発明に係る画像処理装置は、
画像から人物の顔を検出する顔検出手段と、人物の肌色部を検出する肌色検出手段と、を備え、前記顔検出手段により検出された顔検出領域から前記肌色検出手段における肌色検出条件を算出し、前記顔検出領域内における前記肌色検出手段により検出された肌色検出領域の面積の割合が所定値を超えるように、かつ、前記肌色検出手段による肌色検出領域を画像化し、前記顔検出手段により顔検出を行って顔検出されるように、前記肌色検出手段における前記肌色検出条件を算出し直すことを特徴とする。
In order to achieve the above object, the image processing apparatus according to the present invention,
A face detecting means for detecting a person's face from the image, and a skin color detecting means for detecting a skin color part of the person are provided, and a skin color detecting condition in the skin color detecting means is calculated from the face detecting area detected by the face detecting means. Then, so that the ratio of the area of the skin color detection area detected by the skin color detection means in the face detection area exceeds a predetermined value, and the skin color detection area by the skin color detection means is imaged by the face detection means. It is characterized in that the flesh color detection condition in the flesh color detection means is recalculated so that the face is detected and the face is detected.

本発明に係る画像処理装置によれば、斜光や逆光などで被写体の顔の輝度差が大きい場合でも適切に肌色領域が検出され、美肌効果が得られる画像処理がなされた画像を提供することが可能となる。 According to the image processing device of the present invention, it is possible to provide an image that has been subjected to image processing in which the skin color region is appropriately detected even when the brightness difference of the subject's face due to oblique light or backlight is large, and a beautiful skin effect is obtained. It will be possible.

本実施形態の撮像装置の概略構成を示す図である。It is a figure which shows schematic structure of the imaging device of this embodiment. 本実施形態の撮影装置の撮影動作のフローチャート図である。It is a flowchart figure of the imaging operation of the imaging device of this embodiment. 図2における撮影のサブルーチンのフローチャート図である。FIG. 3 is a flowchart of a shooting subroutine in FIG. 2. 図3における肌色領域検出処理についての補足図である。It is a supplementary diagram about the flesh color area detection process in FIG.

以下、本発明を実施するための実施形態について、図面を参照しながら説明する。 Hereinafter, an embodiment for carrying out the present invention will be described with reference to the drawings.

<実施例>
図1は本発明の実施形態を適用した画像処理装置を備えた撮像装置の概略構成を示す図である。
<Example>
FIG. 1 is a diagram showing a schematic configuration of an image pickup apparatus including an image processing apparatus to which an embodiment of the present invention is applied.

本実施形態の撮像装置は光学系101より入射した光を固体撮像素子上に結像させることで被写体を撮像する。光学系制御部102は、前記光学系101の絞りやメカシャッタ、ズーム、フォーカス、光学式ブレ補正等を制御する。固体撮像素子103は、結像された光学像を光電変換して電気信号に変換する。撮像系制御部104は、前記固体撮像素子103の蓄積動作、読み出し動作、リセット動作を制御するための制御系である。 The image pickup apparatus according to the present embodiment forms an image of a subject by forming an image of light incident from the optical system 101 on the solid-state image pickup element. The optical system controller 102 controls the diaphragm, mechanical shutter, zoom, focus, optical blur correction, etc. of the optical system 101. The solid-state image sensor 103 photoelectrically converts the formed optical image into an electric signal. The image pickup system control unit 104 is a control system for controlling the accumulation operation, read operation, and reset operation of the solid-state image pickup element 103.

アナログ信号処理部105は、前記固体撮像素子103の出力にクランプ、ゲインをかける等の処理を行う。ゲイン制御部106は、前記アナログ信号処理部105において撮像信号に対するゲイン量を指定するなどの制御を行う。アナログ/デジタル(A/D)変換部107はアナログ信号からデジタル信号にA/D変換を行い、デジタル信号処理部108は前記A/D変換されたデジタル画像データの現像処理および画像圧縮処理を行って出力画像データを生成する。 The analog signal processing unit 105 performs processing such as clamping and gaining the output of the solid-state image sensor 103. The gain control unit 106 performs control such as designating a gain amount for the image pickup signal in the analog signal processing unit 105. The analog/digital (A/D) conversion unit 107 performs A/D conversion from an analog signal to a digital signal, and the digital signal processing unit 108 performs development processing and image compression processing of the A/D converted digital image data. To generate output image data.

デジタル信号処理部108は、画像データの現像処理を行う現像処理部、前記現像処理部の出力画像より肌色検出を行う肌色検出部117、前記出力画像の肌補正処理を行う肌補正処理部118、前記出力画像の画像圧縮処理を行う画像圧縮部より構成され、本発明における肌色検出手段、肌補正手段の各手段として機能するとともに、後述する画像処理に関する各種処理を行う。 The digital signal processing unit 108 includes a development processing unit that performs development processing of image data, a skin color detection unit 117 that performs skin color detection from an output image of the development processing unit, a skin correction processing unit 118 that performs skin correction processing of the output image, The image compression unit is configured to perform an image compression process on the output image, functions as each unit of the skin color detection unit and the skin correction unit in the present invention, and performs various processes related to image processing described below.

内部記憶部109は、前記デジタル信号処理部108にて出力画像データを生成する際の画像データや、ライブ画像を表示する電子ビューファインダ(以下EVFと記す)動作用の画像データなどを一時的に格納する。また、前記デジタル信号処理部108における肌色検出領域情報や後述する顔検出部112により検出された顔検出領域情報など、各種演算データの一時記憶用途でも使用される。 The internal storage unit 109 temporarily stores image data when the digital image processing unit 108 generates output image data, image data for electronic viewfinder (hereinafter referred to as EVF) operation for displaying a live image, and the like. Store. It is also used for temporary storage of various calculation data such as skin color detection area information in the digital signal processing unit 108 and face detection area information detected by the face detection unit 112 described later.

インターフェース(I/F)部110は、生成された出力画像データを最終的に保存するための外部記録装置とつながっている。画像表示部111は、EVF動作の表示機能を備え、ライブ画像のほか撮像装置の各種設定情報などを表示する。 The interface (I/F) unit 110 is connected to an external recording device for finally storing the generated output image data. The image display unit 111 has a display function of an EVF operation, and displays various setting information of the image pickup apparatus as well as a live image.

顔検出部112は、前記デジタル信号処理108にて現像処理された出力画像データについて顔検出を行い、撮影画像中の顔が検出された領域情報を出力する。 The face detection unit 112 performs face detection on the output image data developed by the digital signal processing 108, and outputs area information in which a face in the captured image is detected.

システム制御部113は、後述する撮影動作のフローチャートに従って前記光学系制御部102や前記撮像系制御部104、前記ゲイン制御部106を制御し、その制御情報を前記デジタル信号処理部108に提供するなど、システム全体の制御を行う。 The system control unit 113 controls the optical system control unit 102, the image pickup system control unit 104, and the gain control unit 106 according to a flow chart of a photographing operation described later, and provides the control information to the digital signal processing unit 108. , Control the entire system.

114は撮影スタンバイ動作を行うためのスイッチ(以下SW1と記す)、115はSW1の操作後、撮影を行う撮影スイッチ(以下SW2と記す)、116はシステムに電源を投入するためのメインスイッチ(以下メインSWと記す)である。 Reference numeral 114 denotes a switch for performing a shooting standby operation (hereinafter referred to as SW1), 115 denotes a shooting switch for performing shooting after operating the SW1 (hereinafter referred to as SW2), and 116 denotes a main switch for turning on the power supply to the system (hereinafter referred to as SW1). It is referred to as the main SW).

図2は本発明の実施例を適用した撮像装置の撮影動作を表すフローチャート図である。 FIG. 2 is a flowchart showing the shooting operation of the image pickup apparatus to which the embodiment of the present invention is applied.

まず、ステップS201では、システムに電源を投入するメインSWの状態を検出し、ONであればステップS202へ進む。ステップS202ではインターフェース部109を介した外部記録装置の残容量を調べ、残容量が0であればステップS203へ進み、そうでなければステップS204へ進む。 First, in step S201, the state of the main SW that powers on the system is detected, and if it is ON, the process proceeds to step S202. In step S202, the remaining capacity of the external recording device is checked via the interface unit 109. If the remaining capacity is 0, the process proceeds to step S203, and if not, the process proceeds to step S204.

ステップS203では、前記残容量が0であることを警告してステップS201に戻る。警告は画像表示部110に表示するか又は図示しない音声出力部から警告音を出すか、又はその両方を行ってもよい。 In step S203, a warning that the remaining capacity is 0 is issued, and the process returns to step S201. The warning may be displayed on the image display unit 110, a warning sound may be output from an audio output unit (not shown), or both of them may be performed.

ステップS204では、撮像手段から出力されたライブ画像を画像表示部110に表示するEVF動作を開始する。EVF動作においては、適正露出を得るためのAE動作、および適切なフォーカス状態とするためにAF動作を所定周期で行う。AE動作は前記A/D変換部107の出力を積分して所定値と比較するなどして適正露出となっているか調べ、必要に応じて前記光学制御部102の絞り設定や前記撮像系制御部104の蓄積時間(電子シャッタ)設定、あるいは前記ゲイン制御部106における撮像信号のゲイン設定を所定の線図に従って制御する。 In step S204, the EVF operation of displaying the live image output from the image pickup means on the image display unit 110 is started. In the EVF operation, an AE operation for obtaining a proper exposure and an AF operation for achieving an appropriate focus state are performed in a predetermined cycle. In the AE operation, the output of the A/D converter 107 is integrated and compared with a predetermined value to check whether the exposure is appropriate, and if necessary, the aperture setting of the optical controller 102 and the imaging system controller. The accumulation time (electronic shutter) setting of 104 or the gain setting of the image pickup signal in the gain control unit 106 is controlled according to a predetermined diagram.

AE動作によって例えば被写体照度が低い場合であっても、前記ゲイン制御部106によりゲインアップするなどして適正露出の画像データを得ることが可能となる。AF動作は前記デジタル信号処理部108の出力画像データの高周波成分の強弱を前フレームと比較するなどして、前記光学系制御部102にてフォーカスレンズを適切に制御する。また前記顔検出部112により顔検出を行い、例えば前記AE動作において検出された顔に対して露出を最適化するなどの動作を行う。 By the AE operation, for example, even when the illuminance of the subject is low, it is possible to obtain image data of proper exposure by increasing the gain by the gain control unit 106. In the AF operation, the optical system controller 102 appropriately controls the focus lens by comparing the intensity of the high frequency component of the output image data of the digital signal processor 108 with that of the previous frame. Further, the face detection unit 112 performs face detection, and performs an operation such as optimizing the exposure for the face detected in the AE operation.

ステップS205では、スイッチSW1の状態を調べ、ONであればステップS207へ進み、そうでなければステップS206へ進む。ここでSW1の機能は、AFやAEなどの撮影スタンバイ動作を行うことである。 In step S205, the state of the switch SW1 is checked, and if it is ON, the process proceeds to step S207, and if not, the process proceeds to step S206. Here, the function of SW1 is to perform a shooting standby operation such as AF and AE.

ステップS206では、メインSWの状態を調べ、ONであればステップS204へ、そうでなければステップS201へ進む。 In step S206, the state of the main SW is checked. If it is ON, the process proceeds to step S204, and if not, the process proceeds to step S201.

ステップS207では、光学系制御部102を介して露出を制御してAE処理を行い、ステップS208では光学制御系102を介してフォーカスレンズを制御してAF処理を行う。ステップS207のAE処理およびステップS208のAF処理は前記撮影スタンバイ動作であり、EVF動作時よりも良い精度でAEおよびAF制御することを目的としている。 In step S207, the AE process is performed by controlling the exposure via the optical system control unit 102, and in step S208, the focus lens is controlled by the optical control system 102 to perform the AF process. The AE process in step S207 and the AF process in step S208 are the shooting standby operation, and are intended to perform AE and AF control with better accuracy than during the EVF operation.

ステップS209は、SW2のONによる撮影動作スタート前準備状態であり、撮像手段から出力されたライブ画像を画像表示部110に表示して、撮影者のSW2操作を待つ。 In step S209, a preparatory state before the start of the photographing operation by turning on the SW2 is performed, the live image output from the image pickup means is displayed on the image display unit 110, and the photographer's SW2 operation is awaited.

ステップS210では、SW2の状態を調べ、ONであればステップS212へ、そうでなければステップS211へ進む。ここに、SW2の機能はSW1の操作後撮影動作を開始することである。 In step S210, the state of SW2 is checked. If it is ON, the process proceeds to step S212, and if not, the process proceeds to step S211. Here, the function of SW2 is to start the photographing operation after the operation of SW1.

ステップS211では、SW1の状態を調べ、ONであればステップS209へ戻り、そうでなければステップS204へ戻る。 In step S211, the state of SW1 is checked, and if it is ON, the process returns to step S209, and if not, the process returns to step S204.

ステップS212では、後述する図4のフローチャートにしたがって撮影動作を開始する。 In step S212, the photographing operation is started according to the flowchart of FIG. 4 described later.

ステップS213では、インターフェース部110を介した外部記録装置の残容量を調べ、前記残容量が0であればステップS203へ進み、そうでなければステップS214へ進む。 In step S213, the remaining capacity of the external recording device is checked via the interface unit 110. If the remaining capacity is 0, the process proceeds to step S203, and if not, the process proceeds to step S214.

ステップS214では、SW2の状態を調べ、ONでなければステップS211へ進む。 In step S214, the state of SW2 is checked, and if it is not ON, the process proceeds to step S211.

図3は図2のフローチャートにおける撮影のサブルーチンのフローチャート図である。また、図4は図3のステップS306からステップS312の肌色領域検出処理についての補足図である。 FIG. 3 is a flowchart of a shooting subroutine in the flowchart of FIG. Further, FIG. 4 is a supplementary diagram of the flesh color region detection processing of steps S306 to S312 of FIG.

まず、ステップS301では、システム制御部113などの各制御部により撮像素子の駆動切り換えなど撮影の準備を行う。 First, in step S301, each control unit such as the system control unit 113 prepares for shooting such as switching the drive of the image sensor.

ステップS302では、光学系制御部102、撮像系制御部104およびシステム制御部113の制御により撮像素子103への露光を行う。撮像素子面上に結像された像は光電変換されてアナログ信号となり、ステップS303にてA/D変換部107へと送られ、撮像素子103の出力ノイズ除去や非線形処理などの前処理の後にデジタル信号に変換される。 In step S302, the image sensor 103 is exposed by the control of the optical system controller 102, the imaging system controller 104, and the system controller 113. The image formed on the surface of the image sensor is photoelectrically converted into an analog signal, which is sent to the A/D conversion unit 107 in step S303, and after pre-processing such as output noise removal of the image sensor 103 and nonlinear processing. Converted to digital signal.

ステップS304では、デジタル信号処理部108にて現像処理を行って出力画像データを生成する。 In step S304, the digital signal processing unit 108 performs development processing to generate output image data.

ステップS305では、顔検出部112においてステップS304にて生成された画像データについて顔検出を行う。本発明における顔検出は公知の方法を用いれば良いが、目や鼻などの器官検出や輪郭情報を用いて顔検出を行う構成で、色情報を用いずに白黒画像やグレースケール画像から顔検出を行うことが可能な構成とする。また、複数の顔が検出された場合には、その撮影画像内の位置や大きさを評価して、より主要な被写体の顔であるかについての優先順位付けを行う。以下、本発明では最も主要な被写体の顔を主顔、次いで主要な被写体の顔を第2の顔、と表現する。また、顔検出における信頼度を算出する構成であれば、信頼度が高い結果であるほど肌色領域を適切に検出できていると考えられるため、なお良い。 In step S305, the face detection unit 112 performs face detection on the image data generated in step S304. The face detection in the present invention may be performed by using a known method. However, the face detection is performed by detecting the organs such as eyes and nose or using the contour information, and the face detection is performed from the monochrome image or the grayscale image without using the color information. It is configured to be able to perform. In addition, when a plurality of faces are detected, the position and size in the captured image are evaluated to prioritize whether or not the face is the face of a more major subject. Hereinafter, in the present invention, the face of the most main subject is referred to as the main face, and the face of the main subject is referred to as the second face. Further, if the reliability of face detection is calculated, it is considered that the higher the reliability is, the more appropriately the skin color region can be detected, which is more preferable.

ステップS306では、肌色検出部117において、ステップS305で検出された顔検出領域のYUVの平均値を求めHSV表色系に変換した値を、検出する肌色の基準として設定する。図4(1)に示すように、ステップ305において複数の顔が検出された場合には、検出された各顔検出領域のYUVの平均値を求めHSV表色系に変換して検出された顔に対応付けて記憶し、主顔の顔検出領域に対応するYUV平均値をHSV変換した値を検出する肌色の基準とする。ステップS305にて顔が検出されていない場合には、あらかじめ設定された所定値を肌色の基準とする。 In step S306, the skin color detection unit 117 calculates the average value of YUV of the face detection area detected in step S305 and converts it into the HSV color system, and sets it as a reference of the skin color to be detected. As shown in FIG. 4A, when a plurality of faces are detected in step 305, the average value of YUV of each detected face detection area is calculated and converted into the HSV color system to detect the face. Is stored in association with, and the value obtained by HSV converting the YUV average value corresponding to the face detection area of the main face is used as the skin color reference for detection. If no face is detected in step S305, a predetermined value set in advance is used as the skin color reference.

ステップS307では、肌色検出部117において、ステップS306にて求めた検出する肌色の基準からどの程度の色の範囲までを肌色領域として検出するか、前記検出する肌色の基準からのHSV色座標上の許容距離差分であるLimitDeltaの値により、肌色検出色範囲を設定する。図4(2)は円柱モデルで示す色相H、彩度S、明度Vの3つの成分からなるHSV色空間を示す図であり、図4(3)は彩度S−明度V断面にて検出する肌色の基準と前記LimitDeltaの関係を示す図である。図4(1)に示す主顔の顔検出領域から求めた検出する肌色の基準の色座標(黒丸)を中心として半径がLimitDeltaである円の内側を肌色検出色範囲として設定する。ステップS305にて顔が検出されていない場合には、あらかじめ設定された所定のLimitDeltaの値により肌色検出色範囲を設定する。 In step S307, the skin color detection unit 117 detects to what extent the range of colors from the reference of the skin color obtained in step S306 is detected as a skin color region, or on the HSV color coordinates from the reference of the detected skin color. The skin color detection color range is set by the value of LimitDelta, which is the allowable distance difference. FIG. 4(2) is a diagram showing an HSV color space composed of three components of hue H, saturation S, and lightness V shown by a cylindrical model, and FIG. 4(3) is detected in the saturation S-lightness V cross section. It is a figure which shows the reference|standard of the flesh color to perform, and the said LimitDelta. The inside of a circle with a radius of LimitDelta centered on the reference color coordinates (black circles) of the skin color detected from the face detection area of the main face shown in FIG. 4A is set as the skin color detection color range. When the face is not detected in step S305, the skin color detection color range is set by the value of the predetermined LimitDelta set in advance.

ステップS308では、デジタル信号処理部108の肌色検出部117において肌色領域検出を行う。まず肌色検出部117は、図4(3)に示すように、前記肌色検出色範囲として設定された(彩度S−明度V断面においては)円の内側の色座標グリッド(白丸)を256、前記円の外側の色座標グリッドを0に変換出力する3D変換テーブルを作成する。続けてこれをステップS304にて生成された画像データに適用し、図4(4)に示すように、肌色検出色範囲の色を持つ画素の値を256、そうでない画素の値を0に表現される8bitグレースケールの肌色検出領域画像を生成する。 In step S308, the skin color detection section 117 of the digital signal processing section 108 detects the skin color area. First, as shown in FIG. 4C, the flesh color detection unit 117 sets 256 color coordinate grids (white circles) inside the circle set in the flesh color detection color range (in the saturation S-luminance V cross section), A 3D conversion table for converting and outputting the color coordinate grid outside the circle to 0 is created. Subsequently, this is applied to the image data generated in step S304, and as shown in FIG. 4(4), the value of a pixel having a color in the skin color detection color range is expressed as 256, and the value of a pixel other than that is expressed as 0. The 8-bit gray scale skin color detection region image is generated.

ステップS309では、肌色検出部117はステップS305にて顔が検出されたかどうかを調べ、顔が検出されていない場合にはステップS313へ進む。続けて肌色検出部117はステップS305にて検出された顔検出領域内の輝度差を調べ、前記輝度差が所定値以上である場合にはステップS310へ進み、そうでなければステップS313へ進む。つまり、顔が検出されていない場合には、前述のように所定の肌色検出色範囲により肌色領域を検出する。また、顔検出領域内の輝度差が無い場合には、後述するような肌色の検出状況に応じた肌色検出色範囲の設定見直しが必要な可能性は低いため、前述のように顔検出領域のYUVの平均値を求めHSV表色系に変換した値を基準として設定した肌色検出色範囲により肌色領域を検出する。 In step S309, the skin color detecting unit 117 checks whether or not a face is detected in step S305, and if no face is detected, the process proceeds to step S313. Subsequently, the flesh color detecting unit 117 checks the brightness difference in the face detection area detected in step S305. If the brightness difference is equal to or more than a predetermined value, the process proceeds to step S310, and if not, the process proceeds to step S313. That is, when the face is not detected, the skin color area is detected by the predetermined skin color detection color range as described above. Further, when there is no brightness difference in the face detection area, it is unlikely that it is necessary to review the setting of the skin color detection color range according to the skin color detection situation as described below. The average value of YUV is obtained, and the skin color region is detected by the skin color detection color range set with the value converted into the HSV color system as a reference.

ステップS310では、肌色検出部117において、ステップS305にて検出された前記顔検出領域内におけるステップS308にて生成された前記肌色検出領域画像の画素値が所定値以上である面積の割合について所定値と比較して超えているか、あるいは、前記顔検出領域内における前記肌色検出領域画像の画素値の積分値が所定値と比較して超えているか評価を行う。ステップS305にて複数の顔が検出されている場合には、検出された複数の顔検出領域を対象に前記評価を行う。図4(4)は肌色検出領域画像に検出された顔検出領域を重ねて示した図である。顔検出部112による顔検出領域内は目や眉、あるいは眼鏡やピアスなどの装飾品を除けば、基本的に肌色で満たされる領域であるため、前記面積の割合あるいは前記積分値が該顔検出領域の大きさに対する比率を基準として算出される各所定値と比較することで、該顔検出領域における肌色の検出状況を評価することが可能となる。図4(5)は肌色検出色範囲を変更により肌色検出領域画像が変化する様子を示した図である。例えば顔検出領域の輝度差が激しい場合などには、前述のように顔検出領域のYUVの平均値を求めHSV表色系に変換した値を基準として設定した肌色検出色範囲による肌色検出領域では、図4(5)中央や左に示すように、顔検出領域の一部のみしか肌色領域として検出されない場合があり、このような場合の確認が可能となる。 In step S310, the skin color detection unit 117 determines a predetermined value for the proportion of the area in which the pixel value of the skin color detection area image generated in step S308 in the face detection area detected in step S305 is a predetermined value or more. It is evaluated as to whether or not the pixel value of the skin color detection area image in the face detection area exceeds the predetermined value by comparison with the predetermined value. When a plurality of faces are detected in step S305, the evaluation is performed on the detected face detection areas. FIG. 4(4) is a diagram in which the detected face detection area is superimposed on the skin color detection area image. The face detection area by the face detection unit 112 is basically an area that is filled with the skin color except for the eyes, eyebrows, and accessories such as glasses and piercings. Therefore, the area ratio or the integrated value is the face detection area. By comparing with each predetermined value calculated based on the ratio to the size of the area, it is possible to evaluate the skin color detection status in the face detection area. FIG. 4(5) is a diagram showing how the skin color detection area image changes by changing the skin color detection color range. For example, when the brightness difference in the face detection area is large, as described above, in the skin color detection area based on the skin color detection color range set with the value converted into the HSV color system as the average value of YUV of the face detection area as a reference. As shown in the center and the left of FIG. 4(5), only a part of the face detection area may be detected as a skin color area, and such a case can be confirmed.

ステップS311では、ステップS308にて生成された前記肌色検出領域画像について、顔検出部112にて顔検出処理を行う。図4(5)左に示すように、肌色検出領域が顔検出領域の一部に限られる場合には、肌色検出領域画像による顔検出は困難、あるいは顔検出できてもその信頼度は低い結果となる。一方で図4(5)右に示すように、肌色検出領域が適切に設定され、顔検出領域の広い範囲が肌色領域として検出されている場合には、目や鼻などの器官や顔の輪郭が良好に表現されているため、顔検出における信頼度はより高い結果となる。 In step S311, the face detection unit 112 performs face detection processing on the skin color detection area image generated in step S308. As shown on the left side of FIG. 4(5), when the skin color detection area is limited to a part of the face detection area, face detection by the skin color detection area image is difficult, or even if face detection is possible, the reliability is low. Becomes On the other hand, as shown in the right side of FIG. 4(5), when the skin color detection area is appropriately set and a wide range of the face detection area is detected as the skin color area, the contours of the organs such as eyes and nose, and the face. Is better expressed, the reliability in face detection is higher.

ステップS312では、肌色検出部117において、ステップS310での前記顔検出領域内における前記肌色検出領域画像の前記面積の割合あるいは前記積分値が各所定値を超えており、かつ、ステップS311にて前記肌色検出領域画像について顔検出できたか、について調べ、両条件を満たしていればステップS313へ進み、そうでなければステップS307へ進む。 In step S312, the skin color detection unit 117 determines that the ratio of the area of the skin color detection area image in the face detection area in step S310 or the integrated value exceeds each predetermined value, and in step S311 It is checked whether or not the face has been detected in the skin color detection area image. If both conditions are satisfied, the process proceeds to step S313, and if not, the process proceeds to step S307.

ステップS307では、顔検出領域全体がより肌色領域として検出されるようにDeltaLimitの値を肌色検出色範囲を広げる方向に再設定する。ここで単純にDeltaLimitの値をHSV各方向に等しく大きくすると、肌色に似た背景被写体なども肌色領域として誤検出されるおそれがあるが、顔領域以外でも首や手や腕などの人肌の領域との区別は困難であるため、顔検出領域内における肌色検出領域を広げることを重視して再設定を行う。図4(3)に、図4(1)の第2の顔検出領域から求めた肌色の基準の色座標が濃灰丸で示されている。主顔の顔検出領域から求めた肌色の基準の色座標(黒丸)からずれており、第2の顔領域も良好に肌色検出しやすくすることを考えると、そのずれ方向(この場合はV方向)にDeltaLimitを広げるように再設定を行う。本実施例では、図4(3)に示すように主顔の顔検出領域から求めた肌色検出色範囲は半径がLimitDeltaの円の内側であったが、V方向に拡大した破線の楕円の内側に再設定することで、淡灰色の色座標グリッドが新たに肌色検出色範囲に含まれるように拡張される。 In step S307, the value of DeltaLimit is reset in the direction of expanding the skin color detection color range so that the entire face detection area is detected as a more skin color area. Here, if the DeltaLimit value is simply made equal in each HSV direction, a background subject similar to a skin color may be erroneously detected as a skin color region, but the human skin such as the neck, hand, or arm may be detected outside the face region. Since it is difficult to distinguish the area from the area, the resetting is performed with an emphasis on widening the skin color detection area in the face detection area. In FIG. 4C, the reference color coordinates of the skin color obtained from the second face detection area in FIG. 4A are indicated by dark gray circles. Considering that the skin color deviates from the reference color coordinates (black circles) obtained from the face detection area of the main face, and the skin color of the second face area can be favorably detected easily, the deviation direction (in this case, the V direction) ) Is reset so that DeltaLimit is expanded. In the present embodiment, as shown in FIG. 4C, the skin color detection color range obtained from the face detection area of the main face was inside the circle with the radius LimitDelta, but inside the ellipse of the broken line enlarged in the V direction. By resetting to, the light gray color coordinate grid is expanded to be newly included in the skin color detection color range.

このようにして、ステップS307における肌色検出領域の再設定とステップS310およびステップS311による顔検出領域における肌色の検出状況の評価を所定の条件を満たすまで繰り返すことで、顔検出領域の輝度差が激しい場合においても肌色領域をムラなく検出することが可能である。 In this way, by resetting the skin color detection area in step S307 and evaluating the skin color detection status in the face detection area in steps S310 and S311 until a predetermined condition is satisfied, the brightness difference in the face detection area is large. Even in such a case, it is possible to detect the skin color area without unevenness.

ステップS313では、デジタル信号処理部108の肌色補正処理部118において、前記肌色検出領域画像により表現される肌色領域の肌領域補正処理を行う。肌補正処理の内容は、例えば輝度信号の平滑化処理や色信号のコントラスト調整や色調の調整を行う。肌補正処理の実施方法は、ステップS304にて生成された画像データの肌色領域のみを補正する一般的な方法の他に、ステップS304にて通常の現像処理に加え画像全体を肌色補正対象として現像処理した画像を生成し、これらの2つの現像画像を前記肌色検出領域画像の各画素値を合成比率としたαブレンドにより合成する方法でも良い。 In step S313, the skin color correction processing unit 118 of the digital signal processing unit 108 performs the skin area correction processing of the skin color area represented by the skin color detection area image. The contents of the skin correction processing include, for example, smoothing processing of a luminance signal, contrast adjustment of a color signal, and adjustment of a color tone. In addition to the general method of correcting only the skin color area of the image data generated in step S304, the skin correction processing is performed in step S304 in which the entire image is developed as a skin color correction target in addition to the normal development processing. A method may be used in which a processed image is generated and these two developed images are combined by α blending in which each pixel value of the flesh color detection area image is used as a combination ratio.

ステップS314では、デジタル信号処理部108において、前記肌領域補正処理後の出力画像データを画像圧縮処理によりJPEGフォーマット等への画像フォーマット変換を行う。 In step S314, the digital signal processing unit 108 performs image format conversion of the output image data after the skin area correction processing into a JPEG format or the like by image compression processing.

ステップS315では、システム制御部113の制御により、I/F部110を介しカメラに装着されたメモリカードなどの外部記憶媒体へと転送し記録する。 In step S315, under the control of the system control unit 113, the data is transferred to an external storage medium such as a memory card attached to the camera via the I/F unit 110 and recorded.

前述の実施例では、静止画撮影時の肌色検出色範囲の設定を変更していくものであったが、EVF動作中においても同様にして肌色検出色範囲の設定変更することが可能である。EVF動作においては更新レートごとに新たな画像が撮像されるが、AE設定た顔検出結果を直前フレームと比較してシーン変化がないと判断可能であれば、直前フレームで算出した肌色検出色範囲設定を初期値とすることで、直前フレームとの肌色検出状況が急変してしまうような問題を解消することが可能である。 In the above-described embodiment, the setting of the skin color detection color range is changed at the time of shooting a still image, but the setting of the skin color detection color range can be similarly changed even during the EVF operation. In the EVF operation, a new image is captured at each update rate, but if it can be determined that there is no scene change by comparing the AE-set face detection result with the immediately preceding frame, the skin color detection color range calculated in the immediately preceding frame. By setting the setting to the initial value, it is possible to solve the problem that the skin color detection situation with the immediately preceding frame changes abruptly.

以上説明したように本発明を適用した画像処理装置によれば、斜光や逆光などで被写体の顔の輝度差が大きい場合でも適切に肌色領域が検出され、美肌効果が得られる画像処理がなされた画像を提供することが可能となる。 As described above, according to the image processing apparatus to which the present invention is applied, the skin color region is appropriately detected even when the brightness difference of the face of the subject is large due to the oblique light, the backlight, and the like, and the image processing is performed to obtain the skin beautiful effect. It becomes possible to provide an image.

112 顔検出手段、117 肌色検出手段、118 肌補正処理手段 112 face detection means, 117 skin color detection means, 118 skin correction processing means

Claims (5)

画像から人物の顔を検出する顔検出手段(112)と、人物の肌色部を検出する肌色検出手段(117)と、
を備え、
前記顔検出手段により検出された顔検出領域から前記肌色検出手段における肌色検出条件を算出し、
前記顔検出領域内における前記肌色検出手段により検出された肌色検出領域の面積の割合が所定値を超えるように、かつ、前記肌色検出手段による肌色検出領域を画像化し、前記顔検出手段により顔検出を行って顔検出されるように、前記肌色検出手段における前記肌色検出条件を算出し直すことを特徴とする画像処理装置。
A face detecting means (112) for detecting a person's face from the image; a skin color detecting means (117) for detecting a person's skin color portion;
Equipped with
Calculating a skin color detection condition in the skin color detection means from the face detection area detected by the face detection means,
The skin color detection area detected by the skin color detection means within the face detection area exceeds a predetermined value, and the skin color detection area by the skin color detection means is imaged, and the face detection means detects the face. The image processing apparatus, wherein the flesh color detection condition in the flesh color detection means is recalculated so that a face is detected by performing the above.
前記顔検出手段により検出された顔検出領域内の輝度差が所定値以上である場合に、請求項1に記載の前記肌色検出条件の算出方法を実施することを特徴とする画像処理装置。 The image processing apparatus, which executes the method for calculating the skin color detection condition according to claim 1, when the brightness difference in the face detection area detected by the face detection unit is equal to or larger than a predetermined value. 前記顔検出手段により複数の顔が検出された場合には、主要被写体の顔である主顔の顔検出領域から前記肌色検出手段における肌色検出条件を算出し、前記検出された複数の顔検出領域について顔検出領域内の前記肌色検出手段により検出された肌色検出領域の面積の割合が所定値を超えるように、かつ、前記肌色検出手段による肌色検出領域を画像化し、前記顔検出手段により顔検出を行って顔検出されるように、前記肌色検出手段における前記肌色検出条件を算出し直すことを特徴とする請求項1又は請求項2に記載の画像処理装置。 When a plurality of faces are detected by the face detection unit, the skin color detection condition in the skin color detection unit is calculated from the face detection region of the main face which is the face of the main subject, and the detected face detection regions are detected. Regarding the face detection area, the skin color detection area detected by the skin color detection means has an area ratio exceeding a predetermined value, and the skin color detection area is imaged by the skin color detection means, and the face detection means detects the face. The image processing apparatus according to claim 1, wherein the flesh color detection condition in the flesh color detection unit is recalculated so that a face is detected by performing the above. 前記肌色検出手段における前記肌色検出条件を算出し直す際に、前記主顔以外の顔検出領域から前記肌検出手段における肌色検出条件を算出した結果をより含むように前記肌色検出条件を算出し直すことを特徴とする請求項3に記載の画像処理装置。 When recalculating the skin color detection condition in the skin color detection means, the skin color detection condition is recalculated so as to further include the result of calculating the skin color detection condition in the skin detection means from the face detection area other than the main face. The image processing device according to claim 3, wherein 肌色部の画像処理を変更し肌補正処理を行う肌補正処理手段(118)と、を備え、前記検出された肌色検出領域について、前記肌補正処理手段により、肌補正処理を行うことを特徴とする請求項1乃至請求項4の何れか一項に記載の画像処理装置。 A skin correction processing means (118) for changing the image processing of the skin color part and performing the skin correction processing, wherein the skin correction processing means performs the skin correction processing on the detected skin color detection area. The image processing device according to any one of claims 1 to 4.
JP2018240480A 2018-12-25 2018-12-25 Image processor Pending JP2020102059A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2018240480A JP2020102059A (en) 2018-12-25 2018-12-25 Image processor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2018240480A JP2020102059A (en) 2018-12-25 2018-12-25 Image processor

Publications (1)

Publication Number Publication Date
JP2020102059A true JP2020102059A (en) 2020-07-02

Family

ID=71139668

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2018240480A Pending JP2020102059A (en) 2018-12-25 2018-12-25 Image processor

Country Status (1)

Country Link
JP (1) JP2020102059A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113379650A (en) * 2021-07-22 2021-09-10 浙江大华技术股份有限公司 Face image exposure method and device, electronic equipment and storage medium
EP4064230A1 (en) 2021-03-26 2022-09-28 Canon Kabushiki Kaisha Image processing apparatus, image processing method, computer program and storage medium
WO2022201247A1 (en) * 2021-03-22 2022-09-29 楽天グループ株式会社 Information processing device, information processing method, and program

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022201247A1 (en) * 2021-03-22 2022-09-29 楽天グループ株式会社 Information processing device, information processing method, and program
JPWO2022201247A1 (en) * 2021-03-22 2022-09-29
JP2022146948A (en) * 2021-03-22 2022-10-05 楽天グループ株式会社 Information processing apparatus, information processing method, and program
JP7438269B2 (en) 2021-03-22 2024-02-26 楽天グループ株式会社 Information processing device, information processing method and program
EP4064230A1 (en) 2021-03-26 2022-09-28 Canon Kabushiki Kaisha Image processing apparatus, image processing method, computer program and storage medium
CN113379650A (en) * 2021-07-22 2021-09-10 浙江大华技术股份有限公司 Face image exposure method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
JP5089405B2 (en) Image processing apparatus, image processing method, and imaging apparatus
JP5398156B2 (en) WHITE BALANCE CONTROL DEVICE, ITS CONTROL METHOD, AND IMAGING DEVICE
TWI508555B (en) Image processing apparatus and image processing method for performing image synthesis
JP2011041089A (en) Method, device and program for processing image, and imaging device
KR20130031574A (en) Image processing method and image processing apparatus
CN108156369B (en) Image processing method and device
JP2019106045A (en) Image processing device, method, and program
KR20120016476A (en) Image processing method and image processing apparatus
CN111246093B (en) Image processing method, image processing device, storage medium and electronic equipment
KR20120071192A (en) Digital photographing apparatus and control method thereof
JP2020102059A (en) Image processor
JP2004349750A (en) Digital camera and control method therefor
JP2010072619A (en) Exposure operation device and camera
CN110324529B (en) Image processing apparatus and control method thereof
CN111434104B (en) Image processing apparatus, image capturing apparatus, image processing method, and recording medium
JP2010199727A (en) Imager
CN108289170B (en) Photographing apparatus, method and computer readable medium capable of detecting measurement area
JP6937603B2 (en) Image processing equipment and its control methods, programs, and storage media
JP2014179920A (en) Imaging apparatus, control method thereof, program, and storage medium
JP2009200743A (en) Image processor, image processing method, image processing program and imaging apparatus
JP2017152866A (en) Image processing system and image processing method
JP2018182700A (en) Image processing apparatus, control method of the same, program, and storage medium
JP2010011153A (en) Imaging apparatus, imaging method and program
JP2018050149A (en) Image processing apparatus
JP2016046610A (en) Imaging apparatus

Legal Events

Date Code Title Description
RD01 Notification of change of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7421

Effective date: 20191125