JP2007087123A - Image correction method, device and program - Google Patents

Image correction method, device and program Download PDF

Info

Publication number
JP2007087123A
JP2007087123A JP2005275310A JP2005275310A JP2007087123A JP 2007087123 A JP2007087123 A JP 2007087123A JP 2005275310 A JP2005275310 A JP 2005275310A JP 2005275310 A JP2005275310 A JP 2005275310A JP 2007087123 A JP2007087123 A JP 2007087123A
Authority
JP
Japan
Prior art keywords
hair
region
area
image
color
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.)
Withdrawn
Application number
JP2005275310A
Other languages
Japanese (ja)
Inventor
Akihito Okubo
彰人 大久保
Yoshibumi Dounomae
義文 堂之前
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.)
Fujifilm Corp
Original Assignee
Fujifilm Corp
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 Fujifilm Corp filed Critical Fujifilm Corp
Priority to JP2005275310A priority Critical patent/JP2007087123A/en
Publication of JP2007087123A publication Critical patent/JP2007087123A/en
Withdrawn legal-status Critical Current

Links

Abstract

<P>PROBLEM TO BE SOLVED: To appropriately and efficiently correct the brightness and color of a face in a natural manner by surely extracting the head hair in a general digital picture even for head hair of a color other than black, and correcting the colors of the face and the head hair. <P>SOLUTION: An area designation part 31 designates an area on a personal image In designated by an operator as a designation area Ru containing the face and head hair to be corrected of a single person, a head hair color kind information acquisition part 33 acquires head hair color kind information Vh showing the kind of color of the head hair based on color information of the designation area Ru or the like. A head hair area extraction part 34 extracts the head hair area by a predetermined algorithm according to the kind shown by the information Vh. Correction means 36, 40 and 50 correct the color of a correction target area consisting of a skin area containing the face extracted based on color information of the designation area Ru by a skin area extraction part 32 and the head hair area extracted by the head hair area extraction part 34. <P>COPYRIGHT: (C)2007,JPO&INPIT

Description

本発明は、デジタル画像における人物の顔や肌等の部分的な領域について明度や色を補正する画像補正方法および装置並びにそのためのプログラムに関するものである。   The present invention relates to an image correction method and apparatus for correcting brightness and color of a partial area such as a human face and skin in a digital image, and a program for the same.

デジタルカメラを用いて撮影したり、紙媒体等に出力された写真をスキャナで読み込んだりして得られるデジタル写真画像の中には、撮影条件や被写体の特性によってその明度や色が適正な態様もしくは所望の態様で表現されていないものがあり、その明度や色を補正したい場合があるが、画像全体に一定の補正処理を施すことが適当でない場合がある。   Some digital photographic images obtained by taking a photograph using a digital camera or reading a photograph output on a paper medium with a scanner have a mode in which the brightness and color are appropriate depending on the photographing conditions and the characteristics of the subject. Some of them are not expressed in a desired form, and there are cases where it is desired to correct the brightness and color, but it may not be appropriate to apply a certain correction process to the entire image.

例えば、アンダー露光や逆光で撮影された人物を被写体とする写真画像では、その人物の顔が暗くなるので、その人物の顔を適正な明度に補正したい場合があるが、顔の明度を適正にするような階調変換処理を画像全体に施してしまうと背景が白とびしてしまうことがある。また、スタジオで撮影された集合写真において後列の隅の人物に照明が届かずその人物だけ暗く写ってしまった写真画像や、二人の人物が撮影された写真において一方の人物が極端に日焼けしている写真画像等では、一人の人物の顔が暗くなるので、その人物の顔の明るさを他の人物の顔の明るさに合わせる補正をしたい場合があるが、その一人の人物の顔を明るくするような階調変換処理を画像全体に施してしまうと他の人物の顔が適正な範囲を超えて明るくなりすぎてしまうことがある。   For example, in a photographic image where a person is photographed with underexposure or backlighting, the person's face becomes dark.Therefore, the person's face may be corrected to an appropriate brightness. If such gradation conversion processing is applied to the entire image, the background may be overexposed. Also, in a group photo taken in a studio, one person is extremely tanned in a photo image in which the person in the back row corner is not illuminated and only that person appears dark, or in a picture in which two people are taken In the case of a photographic image, etc., the face of one person becomes dark.Therefore, you may want to adjust the brightness of that person's face to match the brightness of the face of another person. If the entire image is subjected to gradation conversion processing that makes it brighter, the face of another person may become too bright beyond the proper range.

このような問題を回避するため、画像全体ではなく人物の顔や肌のみ等、部分的な補正が望まれる場合があり、画像の部分的な補正に関してこれまでに種々の手法が提案されている。   In order to avoid such a problem, there are cases where partial correction is desired, such as only the face and skin of a person, not the entire image, and various methods have been proposed so far for partial correction of the image. .

例えば、特許文献1には、人物のみに対して画像処理を施す証明写真システムが記載されており、ここでは、画像を人物の領域と人物以外の背景領域とに自動分離して、人物については肌色を自動調整し、背景については別に用意された背景と置き換えて、自動調整後の人物とその別背景とを合成する手法が提案されている。   For example, Patent Document 1 describes an ID photo system that performs image processing only on a person. Here, an image is automatically separated into a person area and a background area other than the person, A method has been proposed in which the skin color is automatically adjusted, the background is replaced with a separately prepared background, and the person after the automatic adjustment is synthesized with the other background.

また、特許文献2には、顔の自動覆い焼き技術が記載されており、ここでは、顔領域を抽出して、顔領域については肌領域に好ましい処理を施して顔領域以外と合成する手法が提案されている。   Patent Document 2 describes an automatic face dodging technique, and here, a method of extracting a face area, applying a preferable process to the skin area for the face area, and synthesizing the face area other than the face area. Proposed.

また、特許文献3には、顔抽出方法が記載されており、ここでは、指定された領域内で肌色部分の画素を基準とした色を顔として抽出すると誤抽出する場合があるので、写真画像の横にワイヤーフレーム等で構成された顔テンプレートを表示して、画像中の顔とその顔テンプレートとの位置合せを行って、その結果を基に顔を抽出する手法が提案されている。   Further, Patent Document 3 describes a face extraction method. In this case, if a color based on a skin color part pixel is extracted as a face in a specified region, there is a case where a photo image is erroneously extracted. A method has been proposed in which a face template composed of a wire frame or the like is displayed next to the face, the face in the image is aligned with the face template, and the face is extracted based on the result.

なお、顔領域の抽出や顔の補正に関する技術ではないが、特許文献4において、オペレータが予め赤目領域を簡単に指定することで、自動赤目補正の効率を向上させる手法が提案されており、部分的な領域を指定してからその領域中の特定の領域を抽出する方法について開示がなされている。   Although it is not a technique related to face area extraction or face correction, Patent Document 4 proposes a technique for improving the efficiency of automatic red-eye correction by simply specifying a red-eye area in advance by an operator. A method for extracting a specific area in a specific area after specifying the specific area has been disclosed.

しかしながら、上記の特許文献1から4の各手法には、それぞれ下記に述べるような問題点がある。   However, each of the methods disclosed in Patent Documents 1 to 4 has problems as described below.

特許文献1の証明写真システムは、背景が単純である証明写真を対象としているので、人物と背景との自動分離が比較的容易であるが(髪や衣服も抽出可能)、一般写真は背景が複雑であることが多いため、このシステムを一般写真に単純に適用することができない。また、実際には、肌色を自動調整しても適正な補正がなされない場合があり、マニュアルで補正する手段が必要である。   Since the ID photo system of Patent Document 1 is intended for ID photos with a simple background, it is relatively easy to automatically separate a person and a background (it can also extract hair and clothes), but a general photo has a background. Due to the complexity of the system, this system cannot simply be applied to general photography. In practice, even if the skin color is automatically adjusted, proper correction may not be performed, and means for manually correcting the skin color is necessary.

特許文献2の顔の自動覆い焼き方法は、補正処理済の顔と背景とを単純に合成しており、顔領域の抽出精度によっては顔の輪郭に歪み等が現れ、不自然な合成結果となる場合がある。また、顔の肌領域のみを考慮した覆い焼きの結果となるので、顔と髪の色との組合せが不自然になる場合もある。さらに、一般画像は背景が複雑であることが多いため、顔の自動抽出に失敗する確率も高い。   The automatic face dodging method of Patent Document 2 simply synthesizes the corrected face and the background, and depending on the extraction accuracy of the face area, distortion or the like appears in the face outline, There is a case. In addition, since the dodging is performed considering only the skin area of the face, the combination of the face and the hair color may become unnatural. Furthermore, since a general image often has a complicated background, the probability of failure in automatic face extraction is high.

特許文献3の顔抽出方法では、顔テンプレートの位置合せをする作業が煩雑であり、効率が悪い。   In the face extraction method of Patent Document 3, the work of aligning face templates is complicated and inefficient.

特許文献4の領域指定方法は、手動で指定した領域から特定の領域を抽出する手法について開示しているだけで、顔や肌の補正についての効率的な手法を提案するものではない。   The area specifying method of Patent Document 4 only discloses a technique for extracting a specific area from a manually specified area, and does not propose an efficient technique for face and skin correction.

なお、上記手法のほか、例えばPhotoshop(登録商標)等の市販の画像処理ソフトを用いて手作業で部分的な画像処理を施す手法も考えられるが、作業が煩雑であり、効率が悪い。   In addition to the above method, a method of manually performing partial image processing using commercially available image processing software such as Photoshop (registered trademark) is also possible, but the operation is complicated and inefficient.

そこで、次のような画像補正方法が本出願人により提案されている。すなわち、デジタル画像上で顔を含む部分的な領域をユーザが指定し、この指定領域の中から、指定領域またはその近傍の画像の色情報等に基づいて顔領域と頭髪領域を抽出し、顔領域と頭髪領域からなる領域を補正対象領域として定め、この補正対象領域の色を補正する。   Therefore, the following image correction method has been proposed by the present applicant. That is, the user designates a partial area including the face on the digital image, and extracts the face area and the hair area from the designated area based on the color information of the image of the designated area or its vicinity, etc. A region composed of a region and a hair region is defined as a correction target region, and the color of the correction target region is corrected.

この画像補正方法によれば、ユーザが指定した領域またはその周辺から顔領域と頭髪領域を抽出し、その抽出された顔領域と頭髪領域を合わせた領域を補正対象領域としているので、顔を含む領域を指定するというユーザからの簡単な操作により、顔の位置が略特定され、顔を精度よく抽出することができ、さらに、補正対象領域を顔だけでなく顔と頭髪からなる領域としているので、補正後の顔と頭髪との色のアンバランスを解消することができ、一般自然画写真でも顔を確実に抽出し、その顔の色を不自然とならない態様で適正にかつ効率的に補正することが可能となる。
特開2001−186323号公報 特開平10−126184号公報 特開2001−209802号公報 特開2001−148780号公報
According to this image correction method, the face area and the hair area are extracted from the area designated by the user or the periphery thereof, and the area including the extracted face area and the hair area is set as the correction target area. By a simple operation from the user to specify the area, the position of the face can be roughly specified, the face can be extracted accurately, and the correction target area is not only the face but also the area consisting of the face and hair. The color imbalance between the face and hair after correction can be eliminated, the face can be reliably extracted even in general natural paintings, and the color of the face can be corrected appropriately and efficiently in a manner that does not become unnatural. It becomes possible to do.
JP 2001-186323 A JP-A-10-126184 JP 2001-209802 A JP 2001-148780 A

しかしながら、本出願人により提案されている上記の画像補正方法は、補正対象となる頭髪の色の種別が黒髪であることを前提としており、黒髪以外の場合には頭髪領域の抽出の精度が悪くなるという問題がある。   However, the above image correction method proposed by the present applicant is based on the premise that the type of hair color to be corrected is black hair, and the accuracy of hair region extraction is poor in cases other than black hair. There is a problem of becoming.

例えば、若年者に多く見られるカラーリングによって染められた栗毛髪、茶髪、金髪、高齢者に多く見られる白髪、西洋人に多く見られる地毛としてのブロンド髪やシルバー髪など、頭髪の種別によって頭髪の明度や色相がそれぞれ異なるため、黒髪用の抽出アルゴリズムだけでは対応しきれない。   For example, chestnut hair, brown hair, blonde hair, white hair often seen in elderly people, blonde hair or silver hair often seen in Westerners, etc. Since the lightness and hue of the hair are different, it cannot be handled by the black hair extraction algorithm alone.

本発明は、上記事情に鑑み、デジタル画像上で指定された顔を含む領域またはその近傍から顔領域と頭髪領域を抽出し、顔領域と頭髪領域からなる補正対象領域の色を補正する画像補正処理において、黒髪だけでなく他の種別の頭髪に対しても精度よく頭髪領域を抽出し、補正対象領域を正確に抽出して適正な色補正をすることが可能な画像補正方法および装置並びにそのためのプログラムを提供することを目的とするものである。   In view of the above circumstances, the present invention extracts a face area and a hair area from an area including a face designated on a digital image or its vicinity, and corrects the color of a correction target area composed of the face area and the hair area. In the processing, an image correction method and apparatus capable of accurately extracting a hair region not only for black hair but also for other types of hair, accurately extracting a correction target region and performing appropriate color correction, and therefore The purpose is to provide a program.

本発明の画像補正方法は、人物を被写体とする人物画像において単一人物の顔を含む領域を操作者からの入力に応じて指定する領域指定ステップと、前記指定領域の色の情報に基づいて、前記単一人物の顔を含む肌領域を抽出する肌領域抽出ステップと、前記単一人物の頭髪の色の種別を表す頭髪色種別情報を取得する頭髪色種別情報取得ステップと、前記頭髪色種別情報が表す頭髪の色の種別に応じた所定のアルゴリズムにしたがって、前記単一人物の頭髪領域を抽出する頭髪領域抽出ステップと、前記肌領域と前記頭髪領域とからなる領域を補正対象領域として設定する補正対象領域設定ステップと、該補正対象領域における色相、彩度および明度のうち少なくともいずれかを補正する補正ステップとを有することを特徴とする方法である。   The image correction method of the present invention is based on an area designating step of designating an area including a single person's face in a human image with a person as a subject according to an input from an operator, and color information of the designated area. A skin region extracting step for extracting a skin region including the face of the single person, a hair color type information acquiring step for acquiring hair color type information representing a type of hair color of the single person, and the hair color According to a predetermined algorithm corresponding to the type of hair color represented by the type information, a hair region extraction step for extracting the hair region of the single person, and a region composed of the skin region and the hair region as a correction target region A correction target region setting step to be set; and a correction step of correcting at least one of hue, saturation and lightness in the correction target region. .

本発明の画像補正方法において、前記頭髪色種別情報取得ステップは、前記操作者から入力された頭髪の色の種別を表す情報を、前記髪色種別情報として取得するステップであってもよい。   In the image correction method of the present invention, the hair color type information acquisition step may be a step of acquiring information representing the color type of the hair input from the operator as the hair color type information.

また、本発明の画像補正方法において、前記髪色種別情報取得ステップは、前記単一人物の頭髪上の部分領域を操作者からの入力に応じて指定し、前記部分領域の色の情報に基づいて前記単一人物の頭髪の色の種別を判定し、該判定された種別を表す情報を前記頭髪色種別情報として生成するステップであってもよい。   In the image correction method of the present invention, the hair color type information acquisition step specifies a partial region on the hair of the single person according to an input from an operator, and is based on color information of the partial region. A step of determining a hair color type of the single person and generating information indicating the determined type as the hair color type information.

また、本発明の画像補正方法において、前記指定領域は、前記単一人物の顔および頭髪に略外接する矩形を輪郭とする領域であり、前記頭髪色種別情報取得ステップは、前記指定領域の輪郭位置情報に基づいて、前記単一人物の頭髪領域の上部輪郭を前記指定領域の輪郭に内接する楕円状の弧に近似して抽出し、前記指定領域から、前記肌領域と、前記指定領域の輪郭および前記頭髪領域の上部輪郭によって囲まれる領域とを除いた領域のうち、前記指定領域の上寄り1/2から1/4の矩形領域内の領域を頭髪暫定領域として抽出し、前記頭髪暫定領域の色の情報に基づいて前記単一人物の頭髪の色の種別を判定し、該判定された種別を表す情報を前記頭髪色種別情報として生成するステップであってもよい。   In the image correction method of the present invention, the designated area is an area having a outline that is substantially circumscribed on the face and hair of the single person, and the hair color type information acquisition step includes an outline of the designated area. Based on the position information, the upper contour of the hair region of the single person is extracted by approximating an elliptical arc inscribed in the contour of the designated region, and the skin region and the designated region are extracted from the designated region. Out of the region excluding the contour and the region surrounded by the upper contour of the hair region, a region within the rectangular region that is 1/2 to 1/4 above the specified region is extracted as a temporary hair region, and the temporary hair region It may be a step of determining the hair color type of the single person based on the color information of the region, and generating information representing the determined type as the hair color type information.

本発明の画像補正方法において、前記頭髪領域抽出ステップは、前記頭髪色種別情報が表す種別が黒髪であるときに、前記指定領域の画像を構成する画素の明度値のヒストグラムを求め、明度値が所定の閾値より小さい前記ヒストグラム上の領域に相当する画素からなる画像領域を前記頭髪領域として抽出するステップであってもよい。   In the image correction method of the present invention, the hair region extraction step obtains a histogram of lightness values of pixels constituting the image of the designated region when the type represented by the hair color type information is black hair, and the lightness value is It may be a step of extracting an image area composed of pixels corresponding to an area on the histogram smaller than a predetermined threshold as the hair area.

また、本発明の画像補正方法において、前記頭髪領域抽出ステップは、前記頭髪色種別情報が表す種別が白髪であるときに、前記指定領域の画像を構成する画素の明度値のヒストグラムを求め、明度値が所定の閾値より大きい前記ヒストグラム上の領域に相当する画素からなる画像領域を前記頭髪領域として抽出するステップであってもよい。   In the image correction method of the present invention, the hair region extraction step obtains a histogram of lightness values of pixels constituting the image of the designated region when the type represented by the hair color type information is gray hair, It may be a step of extracting an image area composed of pixels corresponding to an area on the histogram having a value larger than a predetermined threshold value as the hair area.

また、本発明の画像補正方法において、前記頭髪領域抽出ステップは、前記頭髪色種別情報が表す種別が金髪または茶髪のいずれか所定の種別であるときに、前記指定領域の画像を構成する画素の色相値のヒストグラムを求め、色相値が前記所定の種別の頭髪の平均的な色相値を含む所定の範囲内である前記ヒストグラム上の山のうち面積が最大のものに相当する画素からなる画像領域を前記頭髪領域として抽出するステップであってもよい。   Further, in the image correction method of the present invention, the hair region extraction step includes the step of extracting pixels constituting the image of the designated region when the type represented by the hair color type information is a predetermined type of either blond or brown hair. A hue value histogram is obtained, and an image region comprising pixels corresponding to the largest area among the peaks on the histogram whose hue value is within a predetermined range including the average hue value of the predetermined type of hair It may be a step of extracting as a hair region.

本発明の画像補正装置は、人物を被写体とする人物画像において単一人物の顔を含む領域を操作者からの入力に応じて指定する領域指定手段と、前記指定領域の色の情報に基づいて、前記単一人物の顔を含む肌領域を抽出する肌領域抽出手段と、前記単一人物の頭髪の色の種別を表す頭髪色種別情報を取得する頭髪色種別情報取得手段と、前記頭髪色種別情報が表す頭髪の色の種別に応じた所定のアルゴリズムにしたがって、前記単一人物の頭髪領域を抽出する頭髪領域抽出手段と、前記肌領域と前記頭髪領域とからなる領域を補正対象領域として設定する補正対象領域設定手段と、該補正対象領域における色相、彩度および明度のうち少なくともいずれかを補正する補正手段とを備えたことを特徴とするものである。   The image correction apparatus according to the present invention is based on area designation means for designating an area including a single person's face in a human image of a person as a subject in response to an input from an operator, and color information of the designated area. Skin area extracting means for extracting a skin area including the face of the single person, hair color type information acquiring means for acquiring hair color type information representing a type of hair color of the single person, and the hair color According to a predetermined algorithm corresponding to the type of hair color represented by the type information, a hair region extraction means for extracting the hair region of the single person, and a region composed of the skin region and the hair region as a correction target region It is characterized by comprising correction target area setting means for setting and correction means for correcting at least one of hue, saturation and lightness in the correction target area.

本発明の画像補正装置において、前記頭髪色種別情報取得手段は、前記操作者から入力された頭髪の色の種別を表す情報を、前記髪色種別情報として取得するものであってもよい。   In the image correction apparatus of the present invention, the hair color type information acquisition unit may acquire information representing the type of hair color input from the operator as the hair color type information.

また、本発明の画像補正装置において、前記髪色種別情報取得手段は、前記単一人物の頭髪上の部分領域を操作者からの入力に応じて指定し、前記部分領域の色の情報に基づいて前記単一人物の頭髪の色の種別を判定し、該判定された種別を表す情報を前記頭髪色種別情報として生成するものであってもよい。   In the image correction apparatus of the present invention, the hair color type information acquisition unit specifies a partial area on the hair of the single person according to an input from an operator, and is based on color information of the partial area. In this case, the hair color type of the single person may be determined, and information representing the determined type may be generated as the hair color type information.

また、本発明の画像補正装置において、前記指定領域は、前記単一人物の顔および頭髪に略外接する矩形を輪郭とする領域であり、前記頭髪色種別情報取得手段は、前記指定領域の輪郭位置情報に基づいて、前記単一人物の頭髪領域の上部輪郭を前記指定領域の輪郭に内接する楕円状の弧に近似して抽出し、前記指定領域から、前記肌領域と、前記指定領域の輪郭および前記頭髪領域の上部輪郭によって囲まれる領域とを除いた領域のうち、前記指定領域の上寄り1/2から1/4の矩形領域内の領域を頭髪暫定領域として抽出し、前記頭髪暫定領域の色の情報に基づいて前記単一人物の頭髪の色の種別を判定し、該判定された種別を表す情報を前記頭髪色種別情報として生成するものであってもよい。   Further, in the image correction apparatus of the present invention, the designated area is an area having a outline that is substantially circumscribed on the face and hair of the single person, and the hair color type information acquisition unit is configured to obtain an outline of the designated area. Based on the position information, the upper contour of the hair region of the single person is extracted by approximating an elliptical arc inscribed in the contour of the designated region, and the skin region and the designated region are extracted from the designated region. Out of the region excluding the contour and the region surrounded by the upper contour of the hair region, a region within the rectangular region that is 1/2 to 1/4 above the specified region is extracted as a temporary hair region, and the temporary hair region The type of hair color of the single person may be determined based on the color information of the area, and information representing the determined type may be generated as the hair color type information.

本発明の画像補正装置において、前記頭髪領域抽出手段は、前記頭髪色種別情報が表す種別が黒髪であるときに、前記指定領域の画像を構成する画素の明度値のヒストグラムを求め、明度値が所定の閾値より小さい前記ヒストグラム上の領域に相当する画素からなる画像領域を前記頭髪領域として抽出するものであってもよい。   In the image correction apparatus of the present invention, the hair region extracting means obtains a histogram of lightness values of pixels constituting the image of the designated region when the type represented by the hair color type information is black hair, and the lightness value is An image area composed of pixels corresponding to the area on the histogram smaller than a predetermined threshold may be extracted as the hair area.

また、本発明の画像補正装置において、前記頭髪領域抽出手段は、前記頭髪色種別情報が表す種別が白髪であるときに、前記指定領域の画像を構成する画素の明度値のヒストグラムを求め、明度値が所定の閾値より大きい前記ヒストグラム上の領域に相当する画素からなる画像領域を前記頭髪領域として抽出するものであってもよい。   In the image correction apparatus of the present invention, the hair region extracting means obtains a histogram of lightness values of pixels constituting the image of the designated region when the type represented by the hair color type information is gray hair, An image region composed of pixels corresponding to regions on the histogram whose value is larger than a predetermined threshold may be extracted as the hair region.

また、本発明の画像補正装置において、前記頭髪領域抽出手段は、前記頭髪色種別情報が表す種別が金髪または茶髪のいずれか所定の種別であるときに、前記指定領域の画像を構成する画素の色相値のヒストグラムを求め、色相値が前記所定の種別の頭髪の平均的な色相値を含む所定の範囲内である前記ヒストグラム上の山のうち面積が最大のものに相当する画素からなる画像領域を前記頭髪領域として抽出するものであってもよい。   In the image correction apparatus of the present invention, the hair region extracting means may be configured to detect pixels of the designated region when the type represented by the hair color type information is a predetermined type of either blond or brown hair. A hue value histogram is obtained, and an image region comprising pixels corresponding to the largest area among the peaks on the histogram whose hue value is within a predetermined range including the average hue value of the predetermined type of hair It may be extracted as a hair region.

本発明のプログラムは、コンピュータを、人物を被写体とする人物画像において単一人物の顔を含む領域を操作者からの入力に応じて指定する領域指定手段と、前記指定領域の色の情報に基づいて、前記単一人物の顔を含む肌領域を抽出する肌領域抽出手段と、前記単一人物の頭髪の色の種別を表す頭髪色種別情報を取得する頭髪色種別情報取得手段と、前記頭髪色種別情報が表す頭髪の色の種別に応じた所定のアルゴリズムにしたがって、前記単一人物の頭髪領域を抽出する頭髪領域抽出手段と、前記肌領域と前記頭髪領域とからなる領域を補正対象領域として設定する補正対象領域設定手段と、該補正対象領域における色相、彩度および明度のうち少なくともいずれかを補正する補正手段として機能させるためのプログラムである。   The program according to the present invention is based on area designation means for designating an area including a single person's face in a human image of a person as a subject in response to an input from an operator, and color information of the designated area. A skin region extracting means for extracting a skin region including the face of the single person, a hair color type information acquiring means for acquiring hair color type information representing a hair color type of the single person, and the hair According to a predetermined algorithm corresponding to the type of hair color represented by the color type information, a hair region extracting means for extracting the hair region of the single person, and a region composed of the skin region and the hair region is a correction target region And a correction target area setting unit that is set as a correction unit and a correction unit that corrects at least one of hue, saturation, and brightness in the correction target area.

本発明のプログラムにおいて、前記頭髪色種別情報取得手段は、前記操作者から入力された頭髪の色の種別を表す情報を、前記髪色種別情報として取得するものであってもよい。   In the program according to the present invention, the hair color type information acquisition unit may acquire information indicating the color type of the hair input from the operator as the hair color type information.

また、本発明のプログラムにおいて、前記髪色種別情報取得手段は、前記単一人物の頭髪上の部分領域を操作者からの入力に応じて指定し、前記部分領域の色の情報に基づいて前記単一人物の頭髪の色の種別を判定し、該判定された種別を表す情報を前記頭髪色種別情報として生成するものであってもよい。   Further, in the program of the present invention, the hair color type information acquisition unit specifies a partial region on the hair of the single person according to an input from an operator, and based on the color information of the partial region A hair color type of a single person may be determined, and information representing the determined type may be generated as the hair color type information.

また、本発明のプログラムにおいて、前記指定領域は、前記単一人物の顔および頭髪に略外接する矩形を輪郭とする領域であり、前記頭髪色種別情報取得手段は、前記指定領域の輪郭位置情報に基づいて、前記単一人物の頭髪領域の上部輪郭を前記指定領域の輪郭に内接する楕円状の弧に近似して抽出し、前記指定領域から、前記肌領域と、前記指定領域の輪郭および前記頭髪領域の上部輪郭によって囲まれる領域とを除いた領域のうち、前記指定領域の上寄り1/2から1/4の矩形領域内の領域を頭髪暫定領域として抽出し、前記頭髪暫定領域の色の情報に基づいて前記単一人物の頭髪の色の種別を判定し、該判定された種別を表す情報を前記頭髪色種別情報として生成するものであってもよい。   Further, in the program of the present invention, the designated area is an area having a outline that is substantially circumscribed on the face and hair of the single person, and the hair color type information acquisition means includes contour position information on the designated area. Based on the above, the upper contour of the hair region of the single person is extracted by approximating an elliptical arc inscribed in the contour of the designated region, and from the designated region, the skin region, the contour of the designated region, and Out of the region excluding the region surrounded by the upper outline of the hair region, the region in the rectangular region that is 1/2 to 1/4 of the designated region is extracted as a temporary hair region, and the temporary hair region The hair color type of the single person may be determined based on the color information, and information representing the determined type may be generated as the hair color type information.

本発明のプログラムにおいて、前記頭髪領域抽出手段は、前記頭髪色種別情報が表す種別が黒髪であるときに、前記指定領域の画像を構成する画素の明度値のヒストグラムを求め、明度値が所定の閾値より小さい前記ヒストグラム上の領域に相当する画素からなる画像領域を前記頭髪領域として抽出するものであってもよい。   In the program of the present invention, the hair region extraction means obtains a histogram of lightness values of pixels constituting the image of the designated region when the type represented by the hair color type information is black hair, and the lightness value is a predetermined value. An image area composed of pixels corresponding to an area on the histogram smaller than a threshold value may be extracted as the hair area.

また、本発明のプログラムにおいて、前記頭髪領域抽出手段は、前記頭髪色種別情報が表す種別が白髪であるときに、前記指定領域の画像を構成する画素の明度値のヒストグラムを求め、明度値が所定の閾値より大きい前記ヒストグラム上の領域に相当する画素からなる画像領域を前記頭髪領域として抽出するものであってもよい。   In the program of the present invention, the hair region extracting means obtains a histogram of lightness values of pixels constituting the image of the designated region when the type represented by the hair color type information is white hair, and the lightness value is An image area composed of pixels corresponding to an area on the histogram that is larger than a predetermined threshold may be extracted as the hair area.

また、本発明のプログラムにおいて、前記頭髪領域抽出手段は、前記頭髪色種別情報が表す種別が金髪または茶髪のいずれか所定の種別であるときに、前記指定領域の画像を構成する画素の色相値のヒストグラムを求め、色相値が前記所定の種別の頭髪の平均的な色相値を含む所定の範囲内である前記ヒストグラム上の山のうち面積が最大のものに相当する画素からなる画像領域を前記頭髪領域として抽出するものであってもよい。   Further, in the program of the present invention, the hair region extracting means, when the type represented by the hair color type information is a predetermined type of either blond or brown hair, the hue value of the pixels constituting the image of the designated region And an image region composed of pixels corresponding to the largest area among the peaks on the histogram whose hue value is within a predetermined range including an average hue value of the predetermined type of hair. It may be extracted as

本発明の画像補正方法および装置並びにそのためのプログラムによれば、抽出対象となる頭髪の色の種別を所定の手段によって予め求めておき、操作者によって指定された領域またはその近傍の色の情報に基づいて、その指定領域またはその近傍から人物の顔領域を抽出するとともに、その予め求めた頭髪の色の種別に応じた所定のアルゴリズムにしたがって頭髪領域を抽出し、顔領域と頭髪領域からなる補正対象領域の色の補正を行うので、黒髪だけでなく他の種別の頭髪に対しても精度よく頭髪領域を抽出することができ、一般自然画写真において、人物の頭髪が黒髪以外の種別であっても顔領域と頭髪領域からなる補正対象領域を確実に抽出し、その顔の色を不自然とならない態様で適正にかつ効率的に補正することが可能となる。   According to the image correction method and apparatus and the program therefor according to the present invention, the type of hair color to be extracted is obtained in advance by a predetermined means, and the color information in the region designated by the operator or the color in the vicinity thereof is obtained. Based on the specified region or the vicinity thereof, the person's face region is extracted, and the hair region is extracted according to a predetermined algorithm corresponding to the previously determined hair color type, and the correction is made up of the face region and the hair region. Since the color of the target area is corrected, it is possible to accurately extract the hair area not only for black hair but also for other types of hair. However, it is possible to reliably extract the correction target area including the face area and the hair area, and to appropriately and efficiently correct the face color in a manner that does not become unnatural.

以下、図面を参照して本発明の実施の形態について説明する。   Embodiments of the present invention will be described below with reference to the drawings.

図1は、本発明の画像補正装置の第1の実施形態の構成を示すブロック図である。本画像補正装置は、アナログ写真技術におけるいわゆる覆い焼きと同じ効果をデジタル画像上で得るための装置であり、画像上で暗く表現されている顔やその周辺の肌のみを部分的に明るく補正するものである。   FIG. 1 is a block diagram showing the configuration of the first embodiment of the image correction apparatus of the present invention. This image correction device is a device for obtaining the same effect on a digital image as that of so-called dodging in analog photographic technology, and corrects only the face darkly expressed on the image and the surrounding skin partially brightly. Is.

図1に示すように、画像補正装置1は、複数の画像データを保存する画像データ保存部10、画像データ保存部10に保存されている画像データの中から補正の対象となる人物の画像データを選択する画像選択部20、画像選択部20により選択された人物の画像データが表す人物画像In上で単一人物の顔を含む部分的な領域を操作者の入力に応じて指定する領域指定部31、領域指定部31により指定された指定領域Ruの色の情報に基づいてその単一人物の顔を含む肌領域Rsを抽出する肌領域抽出部32、その単一人物の頭髪の色の種別を表す頭髪色種別情報Vhを取得する頭髪色種別情報取得部33、頭髪色種別情報Vhが表す頭髪の色の種別に応じた所定のアルゴリズムにしたがって、その単一人物の頭髪領域Rhを抽出する頭髪領域抽出部34、抽出された肌領域Rsと頭髪領域Rhとからなる領域を補正対象領域Rmとして設定する補正対象領域設定部35、補正対象領域Rm内の各画素において施される補正の重みを定めるマスク画像Maskを作成するマスク作成部36、人物画像Inの画像全体における色相、彩度および明度のうち少なくともいずれかを補正して全体補正画像Modを得る画像補正部40、人物画像In、マスク画像Maskおよび全体補正画像Modを合成して補正対象領域Rmのみが部分的に補正された補正済画像In′を得る画像合成部50、画像データ保存部10に保存されているそれぞれの画像データが表す画像のほか、人物画像In、マスク画像Mask、補正済画像In′等を操作者からの入力に応じてまたは自動で、所定のレイアウトで後述の画像表示部70の画面に表示する制御を行う表示制御部60、表示制御部60の制御を受けて種々の画像を画面に表示する画像表示部70、画像選択部20による画像の選択や画像表示部70に表示させる画像の選択等、種々の要求を示す情報を各部に入力する入力操作部80を備えた構成である。   As shown in FIG. 1, the image correction apparatus 1 includes an image data storage unit 10 that stores a plurality of image data, and image data of a person to be corrected from image data stored in the image data storage unit 10. An image selection unit 20 for selecting a region, and a region designation for designating a partial region including the face of a single person on the person image In represented by the image data of the person selected by the image selection unit 20 in response to an input from the operator Unit 31, a skin region extraction unit 32 that extracts a skin region Rs including the face of the single person based on the color information of the designated region Ru designated by the region designation unit 31, and the color of the hair of the single person The hair color type information acquisition unit 33 that acquires the hair color type information Vh representing the type, and extracts the hair region Rh of the single person according to a predetermined algorithm according to the type of hair color represented by the hair color type information Vh. Hair area to do The extraction unit 34, a correction target region setting unit 35 that sets a region composed of the extracted skin region Rs and the hair region Rh as the correction target region Rm, and determines the weight of correction performed on each pixel in the correction target region Rm. A mask creating unit 36 that creates a mask image Mask, an image correcting unit 40 that obtains an overall corrected image Mod by correcting at least one of hue, saturation, and brightness in the entire image of the person image In, a person image In, and a mask image Each of the image data stored in the image composition unit 50 and the image data storage unit 10 represents the corrected image In ′ in which only the correction target region Rm is partially corrected by combining the Mask and the entire correction image Mod. In addition to images, a person image In, a mask image Mask, a corrected image In ′, etc., are laid out in a predetermined layout in response to an input from the operator or automatically. A display control unit 60 that performs control to display on the screen of the image display unit 70 described later, an image display unit 70 that displays various images on the screen under the control of the display control unit 60, image selection by the image selection unit 20, The configuration includes an input operation unit 80 for inputting information indicating various requests such as selection of an image to be displayed on the image display unit 70 to each unit.

なお、本実施形態におけるマスク作成部33、画像補正部40および画像合成部50が本発明の画像補正装置における補正手段として機能するものである。   Note that the mask creation unit 33, the image correction unit 40, and the image composition unit 50 in this embodiment function as correction means in the image correction apparatus of the present invention.

画像データ保存部10は、複数の画像データを保存するものであり、デジタルカメラによる撮影によって取得された画像データやスキャナによる読取りによって取得された画像データ等を格納しておくハードディスクなどの磁気記録装置から構成されている。   The image data storage unit 10 stores a plurality of image data, and stores a magnetic recording device such as a hard disk for storing image data acquired by photographing with a digital camera, image data acquired by reading with a scanner, and the like. It is composed of

画像選択部20は、操作者によって入力操作部80を通じて入力された補正対象となる画像データを特定する情報に基づいて、画像データ保存部10に保存されている画像データの中から補正の対象となる人物画像の画像データを選択するものである。例えば、画像表示部70の画面には、表示制御部60の制御を受けて、画像データ保存部10に保存されている画像データが表す画像の一覧がサムネイル画像として表示されており、操作者は、その画面を見ながら補正対象とする所望の画像をGUI(グラフィカル・ユーザ・インターフェース)によって選択する。   The image selection unit 20 selects a correction target from among the image data stored in the image data storage unit 10 based on information specifying image data to be corrected input by the operator through the input operation unit 80. The image data of the person image to be selected is selected. For example, on the screen of the image display unit 70, a list of images represented by the image data stored in the image data storage unit 10 is displayed as thumbnail images under the control of the display control unit 60. A desired image to be corrected is selected by a GUI (graphical user interface) while viewing the screen.

領域指定部31は、画像選択部20により選択された人物の画像データが表す人物画像In上で単一人物の顔を含む部分的な領域を操作者の入力に応じて指定するものである。例えば、操作者が、入力操作部80を構成するマウスやキーボード等を用いて、画像表示部70の画面に表示された人物画像In上において、所定の2点をポインタで指定すると、領域指定部31は、その2点を結んだ直線を対角線とする矩形領域を指定する。   The area designating unit 31 designates a partial area including the face of a single person on the person image In represented by the image data of the person selected by the image selecting unit 20 in response to an operator input. For example, when the operator designates two predetermined points with a pointer on the person image In displayed on the screen of the image display unit 70 using a mouse, a keyboard, or the like that constitutes the input operation unit 80, the region designation unit 31 designates a rectangular area whose diagonal is a straight line connecting the two points.

肌領域抽出部32は、領域指定部31により指定された領域(以下、指定領域という)Ruの色の情報に基づいて、その単一人物の顔を含む肌領域Rsを抽出するものである。この肌領域Rsを抽出する方法の詳細については後述する。   The skin region extraction unit 32 extracts the skin region Rs including the face of the single person based on the color information of the region Ru (hereinafter referred to as the “designated region”) designated by the region designation unit 31. Details of the method for extracting the skin region Rs will be described later.

頭髪色種別情報取得部33は、その単一人物の頭髪の色の種別を表す頭髪色種別情報Vhを取得するものである。この第1の実施形態においては、頭髪色種別情報取得部33は、操作者から入力された頭髪の色の種別を表す情報を、頭髪色種別情報Vhとして取得する。すなわち、操作者が画像表示部70の画面に表示された人物画像Inを見て、その単一人物の頭髪の色の種別を判断し、予め用意された複数の選択肢の中からいずれかを選択する形式により、その頭髪の色の種別を表す情報を入力するものとする。   The hair color type information acquisition unit 33 acquires hair color type information Vh representing the type of hair color of the single person. In the first embodiment, the hair color type information acquisition unit 33 acquires information representing the type of hair color input by the operator as the hair color type information Vh. That is, the operator looks at the person image In displayed on the screen of the image display unit 70, determines the hair color type of the single person, and selects one of a plurality of options prepared in advance. It is assumed that information indicating the color type of the hair is input according to the format to be performed.

なお、頭髪の色の種別としては、髪の毛のメラニン色素の種類、量、分布により、“黒褐色系”(黒髪)、“黄赤色系”(金髪)、これらの中間に位置する“栗色系”(茶髪,栗毛)、そして、色素の抜けた“白髪系”があると言われている。そこで、本実施形態においては、これらの種別を考慮して、上記の選択肢を、黒髪、白髪、金髪・茶髪、その他(金髪・茶髪以外のカラー色)とする。   Depending on the type, amount, and distribution of the melanin pigment in the hair, the type of hair color may be “blackish brown” (black hair), “yellowish red” (blonde), or “maroon” located between them ( (Brown hair, chestnut hair) and the “white hair system” from which pigments are missing. Therefore, in the present embodiment, considering these types, the above options are black hair, white hair, blonde / brown hair, and others (color colors other than blonde / brown hair).

頭髪領域抽出部34は、頭髪色種別情報Vhが表す頭髪の種別に応じた所定のアルゴリズムにしたがって、その単一人物の頭髪領域Rhを抽出するものである。頭髪領域Rhは特殊な場合を除き、略同じ色でまとまって存在していることが多いという特徴を有する。そのため、頭髪領域Rhは、抽出対象領域における色の情報を用いて抽出されるのが一般的である。しかし、頭髪の色が異なると、その色の情報の特徴、すなわち、明度、色相および彩度の特徴が異なるため、予め決められた1つのアルゴリズムで様々な色の頭髪を抽出することは容易ではない。そこで、頭髪を色別におおまかな種別に分類し、各種別毎に用意された所定のアルゴリズムにしたがって頭髪領域Rhを抽出することにより、より精度の高い頭髪領域Rhの抽出が可能になる。   The hair region extracting unit 34 extracts the hair region Rh of the single person according to a predetermined algorithm corresponding to the type of hair represented by the hair color type information Vh. The hair region Rh has a feature that it is often present in almost the same color except in special cases. Therefore, the hair region Rh is generally extracted using color information in the extraction target region. However, if the color of the hair is different, the characteristics of the information of the color, that is, the characteristics of lightness, hue, and saturation are different, so it is not easy to extract various colors of hair with a predetermined algorithm. Absent. Therefore, by classifying the hair into rough types according to color and extracting the hair region Rh according to a predetermined algorithm prepared for each type, it is possible to extract the hair region Rh with higher accuracy.

補正対象領域設定部35は、肌領域抽出部32によって抽出された肌領域Rsと頭髪領域抽出部34によって抽出された頭髪領域Rhとからなる領域を補正対象領域Rmとして設定するものである。   The correction target region setting unit 35 sets a region composed of the skin region Rs extracted by the skin region extraction unit 32 and the hair region Rh extracted by the hair region extraction unit 34 as the correction target region Rm.

マスク作成部36は、補正対象領域Rm内の各画素において施される補正の重み(補正度)を定めるマスク画像Maskを作成するものであり、人物画像Inの画像全体が補正された後述の全体補正画像Modと掛け合わせたときに、補正対象領域Rmのみにその補正が施された画像が得られるようなマスク画像Maskを作成する。   The mask creating unit 36 creates a mask image Mask that determines the weight (correction degree) of correction performed on each pixel in the correction target region Rm. The mask creating unit 36 corrects the entire image of the person image In, which will be described later. A mask image Mask is generated so that when the correction image Mod is multiplied, an image in which the correction is applied only to the correction target region Rm is obtained.

マスク画像Maskは、人物画像Inと同じ画像サイズ(解像度)を有し、その各画素は、その画素に対して施される補正度に応じて0〜1(補正度が0%のときに0、補正度が100%のときに1とする)の重みに相当する画素値を有するものである。また、マスク画像Maskは、補正対象領域Rmの各位置に対して施される補正度を、補正対象領域Rmの境界近傍においてこの領域の内側から外側に向かって低くなるように設定される。なお、この補正度は、補正対象領域Rmの内外の明度差が小さいほど補正対象領域Rmの境界近傍においてより緩やかに変化するように設定する。   The mask image Mask has the same image size (resolution) as the person image In, and each pixel thereof is 0 to 1 (0 when the correction degree is 0%) according to the correction degree applied to the pixel. And a pixel value corresponding to a weight of 1) when the correction degree is 100%. The mask image Mask is set so that the degree of correction applied to each position of the correction target region Rm decreases from the inside to the outside of the correction target region Rm in the vicinity of the boundary. The degree of correction is set so as to change more gently in the vicinity of the boundary of the correction target region Rm as the brightness difference between the inside and outside of the correction target region Rm is smaller.

画像補正部40は、補正対象領域Rmの補正後の目標となる所定の明度と補正対象領域Rmにおける明度の平均値もしくは中間値との差分に基づいて、補正対象領域Rmを補正する際の補正量として適正と思われる補正量(画像上の所定の成分毎の補正の程度)を算出し、これを初期値として用いて人物画像Inの画像全体を補正するものである。その後補正された画像は、表示制御部60の制御を受けて、画像表示部70の画面に表示されるが、操作者がその画面を見ながらさらに補正量を微調整できるように、画像補正部40は、操作者によって入力された補正量を微調整する情報に基づいてその補正量を変更する機能を有する。そして、調整された補正量で再び画像が補正され、その補正された画像が画像表示部70の画面に表示されることとなる。なお、補正できる画像上の成分は、特に限定しなくてもよいが、ここでは、補正に係る操作性をよくするため、色相、彩度および明度のうち少なくともいずれかに係る数種類の成分として予め決められており、操作者は、それらの中からいずれかの成分を選択してその成分を増減することができる。例えば、補正可能な画像上の成分を、シアンC、マゼンタM、エイローYの3色の強度と明度Dの4種類に定め、画像表示部70の画面には、表示制御部60の制御を受けて、これらの成分の項目が表示されるとともに、それぞれの成分の項目の横にその成分の補正レベルを段階的に表示するカウンタと、その補正レベルを1段階ずつ増減できる増減ボタンが表示され、操作者は、これら各成分の補正レベルをGUIによって調整する。   The image correction unit 40 corrects the correction target region Rm based on the difference between the predetermined target brightness after correction of the correction target region Rm and the average value or intermediate value of the lightness in the correction target region Rm. A correction amount (a degree of correction for each predetermined component on the image) that is considered to be appropriate is calculated, and this is used as an initial value to correct the entire image of the person image In. Thereafter, the corrected image is displayed on the screen of the image display unit 70 under the control of the display control unit 60. The image correction unit can be further finely adjusted while the operator looks at the screen. 40 has a function of changing the correction amount based on information for finely adjusting the correction amount input by the operator. Then, the image is corrected again with the adjusted correction amount, and the corrected image is displayed on the screen of the image display unit 70. Note that the components on the image that can be corrected are not particularly limited, but here, in order to improve the operability related to the correction, as components of at least one of hue, saturation, and lightness, several components are previously stored. The operator can select one of the components and increase or decrease the component. For example, the components on the image that can be corrected are defined as four types of intensity of the three colors of cyan C, magenta M, and aero Y and brightness D, and the screen of the image display unit 70 is controlled by the display control unit 60. In addition to displaying these component items, next to each component item are a counter that displays the correction level of the component step by step, and an increase / decrease button that can increase or decrease the correction level one step at a time, The operator adjusts the correction level of each of these components using the GUI.

画像合成部50は、全体補正画像Modともとの人物画像Inとを対応する各画素毎にマスク画像Maskが表す所定の重みで合成することによって、補正対象領域Rmのみが部分的に補正された補正済画像In′を得るものである。すなわち、下記の式(1)にしたがってこれらの画像を合成して、補正済画像In′を得るものである。
The image composition unit 50 composes the entire correction image Mod and the original person image In with a predetermined weight represented by the mask image Mask for each corresponding pixel, whereby only the correction target region Rm is partially corrected. A corrected image In ′ is obtained. That is, these images are synthesized according to the following equation (1) to obtain a corrected image In ′.

ここで、x,yは、それぞれの画像におけるx座標とy座標を表し、Mask(x,y)の取り得る値は、1≧Mask(x,y)≧0である。 Here, x and y represent the x coordinate and the y coordinate in each image, and the possible values of Mask (x, y) are 1 ≧ Mask (x, y) ≧ 0.

表示制御部60は、入力操作部80を通じて操作者によって入力された、各種の要求を指示する情報に基づいて、画像表示部70の画面に表示する画像やそのレイアウトを制御するものである。   The display control unit 60 controls an image displayed on the screen of the image display unit 70 and its layout based on information indicating various requests input by the operator through the input operation unit 80.

画像表示部70は、表示制御部60の制御を受けて、画面に各種の画像を表示するCRTモニタや液晶パネル等で構成されている。   The image display unit 70 is configured by a CRT monitor, a liquid crystal panel, or the like that displays various images on the screen under the control of the display control unit 60.

入力操作部80は、GUIを実現するためのインターフェースで接続されたキーボード、マウス等で構成されている。   The input operation unit 80 is configured by a keyboard, a mouse, and the like connected by an interface for realizing a GUI.

次に、本実施形態の画像補正装置1における処理の流れについて説明する。図2は、画像補正装置1における処理の流れを示したフローチャートである。   Next, the flow of processing in the image correction apparatus 1 of this embodiment will be described. FIG. 2 is a flowchart showing the flow of processing in the image correction apparatus 1.

はじめに、画像表示部60の画面には、操作者からの要求に応じてまたは自動で、表示制御部60の制御により、画像データ保存部10により保存されているそれぞれの画像データが表す画像の一覧がサムネイル画像として表示される。ここで、操作者が、それらの画像の中からある人物画像を特定する情報をGUIによって入力すると、画像選択部20はその情報に基づいてその人物画像を補正の対象となる人物画像Inとして選択する(ステップS1)。図3(1)は、このようにして選択された人物画像Inの一例を示す図である。図3(1)に示す人物画像Inは、男女二人が撮影された写真画像であり、男性が女性に比べてかなり日焼けしている状態を表している。   First, the screen of the image display unit 60 displays a list of images represented by the respective image data stored by the image data storage unit 10 under the control of the display control unit 60 in response to a request from an operator or automatically. Is displayed as a thumbnail image. Here, when the operator inputs information specifying a person image from the images through the GUI, the image selection unit 20 selects the person image as a person image In to be corrected based on the information. (Step S1). FIG. 3A shows an example of the person image In selected in this way. A person image In shown in FIG. 3A is a photographic image in which two men and women are photographed, and represents a state in which a man is considerably tanned compared to a woman.

補正の対象となる人物画像Inが選択されると、画像表示部60の画面には、図4に示すように、もとの人物画像Inもしくは補正の効果が反映された場合の人物画像(補正済画像)In′のいずれかを大きく表示するエリアAR1、マスク画像Maskと人物画像Inにおける補正対象領域Rmの画像とを位置的に重ねて表示するエリアAR2、人物画像In上で補正対象となる単一人物の頭髪の色の種別の候補を選択ボタンとして表示するAR3、人物画像Inの補正対象領域Rmに対して上述のC、M、Y、Dの各成分のレベルとそれら各成分の増減ボタンを表示するエリアAR4から構成されたウィンドウWinが表示される。なお、この段階では、エリアAR1に人物画像Inが表示されており、エリアAR2には何も表示されていない。   When the person image In to be corrected is selected, as shown in FIG. 4, the original image In or the person image (correction) when the correction effect is reflected is displayed on the screen of the image display unit 60. Area AR1 in which any one of In ′ images is displayed large, area AR2 in which the mask image Mask and the image of the correction target region Rm in the person image In are displayed in a superimposed position, and the correction target on the person image In. AR3 that displays a candidate for the hair color type of a single person as a selection button, the level of each of the above-described C, M, Y, and D components and the increase / decrease of each of these components with respect to the correction target region Rm of the person image In A window Win composed of an area AR4 for displaying buttons is displayed. At this stage, the person image In is displayed in the area AR1, and nothing is displayed in the area AR2.

ここで、操作者が、その表示された人物画像In上で、補正したい顔や肌を有する単一人物の顔および頭髪を含む矩形領域を特定する情報をGUIによって入力すると、領域指定部31はその情報に基づいてその矩形領域を指定領域Ruとする(ステップS2)。   Here, when the operator inputs information specifying a rectangular area including the face and hair of a single person having a face or skin to be corrected on the displayed person image In, the area designating unit 31 Based on the information, the rectangular area is designated as a designated area Ru (step S2).

また、操作者が、エリアAR3に表示された頭髪の種別の選択ボタンの中から、その単一人物の頭髪の色の種別として最も近いと考える種別のボタンを押すと、頭髪色種別情報取得部33は、その選択された種別を表す情報を頭髪色種別情報Vhとして生成し取得する(ステップS3)。   Further, when the operator presses a button of a type that is considered to be the closest to the hair color type of the single person from among the hair type selection buttons displayed in the area AR3, the hair color type information acquisition unit 33 generates and acquires information representing the selected type as hair color type information Vh (step S3).

次に、肌領域抽出部32は、指定領域Ruの色の情報に基づいて、指定領域Ruの中から上記の単一人物の顔を含む肌領域Rsを抽出する(ステップS4)。一方、頭髪領域抽出部34は、頭髪色種別情報Vhが表す頭髪の色の種別に応じた所定のアルゴリズムにしたがって、指定領域Ruの中からその単一人物の頭髪領域Rhを抽出する(ステップS5)。そして、補正対象領域設定部35が、抽出されたこれら肌領域Rsと頭髪領域Rhとを囲む領域を補正対象領域Rmとして設定する(ステップS6)。なお、肌領域Rsを抽出する処理と頭髪領域Rhを抽出する処理(以下、これら両処理を合わせた処理を補正対象領域Rmを抽出する処理と称する場合がある)の詳細については後述する。   Next, the skin region extraction unit 32 extracts the skin region Rs including the face of the single person from the designated region Ru based on the color information of the designated region Ru (step S4). On the other hand, the hair region extracting unit 34 extracts the hair region Rh of the single person from the designated region Ru according to a predetermined algorithm corresponding to the type of hair color represented by the hair color type information Vh (step S5). ). Then, the correction target region setting unit 35 sets a region surrounding the extracted skin region Rs and the hair region Rh as the correction target region Rm (step S6). The details of the process of extracting the skin region Rs and the process of extracting the hair region Rh (hereinafter, the process combining both processes may be referred to as a process of extracting the correction target region Rm) will be described later.

マスク作成部36は、抽出された補正対象領域Rmに対する補正度が上述の条件となるようなマスク画像Maskを作成する(ステップS7)。なお、このマスク画像Maskを作成する処理の詳細については後述する。図3(3)は、このようにして作成されたマスク画像Maskの一例を示す図である。図3(3)に示すマスク画像Maskは、被写体である男性の顔を含む肌と頭髪を囲む領域が補正対象領域Rmとして抽出されたときのマスク画像であり、その領域の境界がぼかされている。ここで、画像表示部70の画面に表示されたウィンドウWin内のエリアAR2には、マスク画像Maskと人物画像Inにおける補正対象領域Rmの画像とが位置的に重ねられて表示される。操作者はこの画像を見ることにより、抽出された補正対象領域Rmが所望の領域であるか否かを確認することができる。   The mask creating unit 36 creates a mask image Mask such that the degree of correction with respect to the extracted correction target region Rm satisfies the above-described condition (step S7). Details of the process for creating the mask image Mask will be described later. FIG. 3 (3) is a diagram showing an example of the mask image Mask created in this way. The mask image Mask shown in FIG. 3 (3) is a mask image when a region surrounding the skin and hair including the male face as the subject is extracted as the correction target region Rm, and the boundary of the region is blurred. ing. Here, in the area AR2 in the window Win displayed on the screen of the image display unit 70, the mask image Mask and the image of the correction target region Rm in the person image In are displayed in a superimposed manner. By viewing this image, the operator can confirm whether or not the extracted correction target region Rm is a desired region.

画像補正部40は、まず、抽出された補正対象領域Rmの中から肌色領域を検出して、その肌色領域の明度が適正な明度となるような補正量を算出する。すなわち、補正対象領域Rmにおける各画素の彩度を求め、補正対象領域Rmのうちこの彩度が所定の閾値を下回る画素を除いた他の領域を抽出する。これにより、補正対象領域Rm中の頭髪、眉、黒目、影を除いた肌色領域が抽出される。そして、この肌色領域における各画素の明度を求め、その明度の平均値Daveもしくは中間値Dmidを算出する。それから、写真画像における人物の肌の明度として好ましいとされる明度、すなわち、補正後の目標とする明度Didealから上記のDaveもしくはDmidを減算して、明度の補正量Dmodを求める(Dmod=Dideal−(Dave or Dmid))。そして、明度の補正量Dmodの値に基づいて、画像上の各成分の補正量の初期値が設定される。例えば、C,M,Y(R,G,Bでもよい)の各成分毎に補正する補正量が補正量レベルとして定義され、各画素の色成分毎の信号値は、この補正量レベルにそれぞれ対応する変換曲線(例えば、1次元ルックアップテーブル)によって変換される。   First, the image correction unit 40 detects a skin color area from the extracted correction target area Rm, and calculates a correction amount such that the brightness of the skin color area becomes an appropriate brightness. That is, the saturation of each pixel in the correction target region Rm is obtained, and other regions are extracted from the correction target region Rm excluding pixels whose saturation is below a predetermined threshold. As a result, the skin color area excluding the hair, eyebrows, black eyes, and shadows in the correction target area Rm is extracted. Then, the brightness of each pixel in this skin color region is obtained, and the average value Dave or intermediate value Dmid of the brightness is calculated. Then, the lightness correction amount Dmod is obtained by subtracting the above-mentioned Dave or Dmid from the lightness that is preferable as the lightness of the skin of the person in the photographic image, that is, the target lightness value after correction (Dmod = Dideal− (Dave or Dmid)). Then, based on the value of the brightness correction amount Dmod, an initial value of the correction amount of each component on the image is set. For example, a correction amount to be corrected for each component of C, M, and Y (may be R, G, and B) is defined as a correction amount level, and a signal value for each color component of each pixel is set to this correction amount level. Conversion is performed by a corresponding conversion curve (for example, a one-dimensional lookup table).

画像補正部40は、この補正量の初期値を用いて人物画像Inの画像全体を補正し、補正された全体画像は、表示制御部60の制御を受けて、画像表示部70の画面に表示される。操作者はその画面を見ながら、さらに補正量を適正にすべく、GUIによって画像表示部70の画面に表示されたウィンドウWin内のエリアAR3に表示されたC、M、Y、Dの各成分の補正量の増減ボタンを押して各成分の補正量を微調整する。   The image correction unit 40 corrects the entire image of the person image In using the initial value of the correction amount, and the corrected whole image is displayed on the screen of the image display unit 70 under the control of the display control unit 60. Is done. While viewing the screen, the operator can further correct the correction amount by using the GUI to display each component of C, M, Y, and D displayed in the area AR3 in the window Win displayed on the screen of the image display unit 70. Press the correction amount increase / decrease buttons to finely adjust the correction amount of each component.

画像補正部40は、その調整された補正量の設定にしたがって、再び人物画像Inの画像全体に補正を施し、全体補正画像Modを得(ステップS8)、その補正済みの全体画像が画面に表示される。図3(2)は、このようにして得られた全体補正画像Modの一例を示す図である。図3(2)に示す全体補正画像Modは、被写体である男性の顔を含む肌の領域が補正前の人物画像Inにおける女性の肌と同程度の明るさになるように、人物画像Inの画像全体の明度が高い方に補正された状態の画像である。   The image correction unit 40 corrects the entire image of the person image In again according to the adjusted correction amount setting to obtain an overall correction image Mod (step S8), and the corrected overall image is displayed on the screen. Is done. FIG. 3B is a diagram illustrating an example of the overall correction image Mod obtained in this way. The overall correction image Mod shown in FIG. 3B is an image of the person image In so that the skin area including the male face, which is the subject, is as bright as the skin of the woman in the person image In before correction. It is an image in a state where the brightness of the entire image is corrected to a higher one.

画像合成部50は、上記の式(1)にしたがってこれらの画像を合成し、補正対象領域Rmのみに所望の補正が施され、かつ、補正対象領域Rmの境界付近においてその補正の効果がぼかされたような人物画像が得られる(ステップS9)。表示制御部60は、この画像を画像表示部70の画面上のエリアAR1に更新する形で表示させる制御を行う。   The image synthesis unit 50 synthesizes these images in accordance with the above equation (1), performs a desired correction only on the correction target region Rm, and the effect of the correction is reduced near the boundary of the correction target region Rm. A person image such as that shown is obtained (step S9). The display control unit 60 performs control to display this image in an updated form in the area AR1 on the screen of the image display unit 70.

そして、ステップS8とステップS9が必要に応じて繰り返され、最終的に、人物画像Inに所望の補正が施された補正済画像In′が得られる(ステップS10)。図3(4)は、このようにして得られた補正済画像In′の一例を示す図である。図3(4)に示す補正済画像In′は、男性の肌領域と女性の肌領域とが同程度の明るさとなるように、男性の肌領域が明るく補正された図である。   Then, Step S8 and Step S9 are repeated as necessary, and finally a corrected image In ′ obtained by applying a desired correction to the person image In is obtained (Step S10). FIG. 3 (4) is a diagram showing an example of the corrected image In ′ obtained in this way. The corrected image In ′ shown in FIG. 3 (4) is a diagram in which the male skin area is brightly corrected so that the male skin area and the female skin area have the same brightness.

次に、上記の、補正対象領域Rmを抽出する処理とマスク画像Maskを作成する処理について詳細に説明する。ここでは、まずこれらの処理の流れを概略的に説明し、その後、より具体的な処理について説明することにする。   Next, the process for extracting the correction target region Rm and the process for creating the mask image Mask will be described in detail. Here, first, the flow of these processes will be schematically described, and then more specific processes will be described.

図5は、補正対象領域Rmの抽出およびマスク画像Maskの作成における基本的な処理の流れを示したフローチャートである。この基本的な処理のアルゴリズムは大きく分けて、肌の種(たね)の抽出、肌の種の成長、頭髪の検出、マスクの作成、の4つの部に分けることができる。なお、「肌の種」とは肌領域に属するものとして高い信頼度で抽出された一かたまりの画素群のことをいう。   FIG. 5 is a flowchart showing a basic processing flow in extraction of the correction target region Rm and creation of the mask image Mask. This basic processing algorithm can be broadly divided into four parts: skin seed extraction, skin seed growth, hair detection, and mask creation. Note that “skin seed” refers to a group of pixels extracted with high reliability as belonging to the skin region.

「肌の種の抽出」の部では、操作者によって指定された矩形の指定領域Ruにおける色相、彩度および明度のヒストグラムを用いて信頼度の高い肌の画素(以下、高信頼肌画素という)を抽出する(ステップS11)。肌の種として充分な数の画素が得られたかどうかを判定し(ステップS12)、充分でない場合には、その高信頼肌画素の抽出において、色相、彩度および明度に基づく閾値判定による分離の条件を緩めて、再度、指定領域Ru内で高信頼肌画素を抽出する(ステップS13)。高信頼肌画素の抽出の後、モフォロジフィルタのクロージング処理を用いてその高信頼肌画素間の隙間を埋め、指定領域Ruにおいて幾つかの不連続な肌領域を得る(ステップS14)。得られた複数の肌領域のうちの幾つかは背景に属することがあるので、これらのうち最も面積が大きい肌領域をその領域を拡げて成長させるもととなる肌の種として選択する。   In the “skin seed extraction” section, a highly reliable skin pixel (hereinafter referred to as a highly reliable skin pixel) using a histogram of hue, saturation, and lightness in a rectangular designated region Ru designated by the operator. Is extracted (step S11). It is determined whether or not a sufficient number of pixels are obtained as skin seeds (step S12). If not enough, in the extraction of the highly reliable skin pixel, separation by threshold determination based on hue, saturation, and lightness is performed. The condition is relaxed, and highly reliable skin pixels are extracted again within the designated region Ru (step S13). After extraction of the highly reliable skin pixels, the gap between the highly reliable skin pixels is filled using the closing process of the morphology filter to obtain several discontinuous skin regions in the designated region Ru (step S14). Since some of the obtained plurality of skin regions may belong to the background, the skin region having the largest area among them is selected as the skin seed from which the region is expanded.

「肌の種の成長」の部では、上記の肌の種の領域の輪郭を抽出し、この輪郭上の画素を所定の間隔でサンプリングし、サンプリングされた各画素を、肌の種を成長させるもととなる種画素とする。そして、それぞれの種画素について、種画素に隣接する所定領域の色相、彩度および明度を調べ、所定の条件を満たす領域を肌領域として加え、肌領域を成長させる。すべての種画素に対して肌領域の成長を行うと、より面積の大きい肌領域が得られる。そして、この成長した肌領域について、さらに、輪郭の抽出、種画素の設定、肌領域の成長といった上記と同様の処理を行うことにより、より面積の大きい肌領域が得られる。このような処理を、成長させるべき近隣の画素がなくなるか、もしくはこの処理の繰返し回数が所定数に達するまで繰り返す(ステップS15,S16)。   In the “skin seed growth” section, the contour of the above-mentioned skin seed region is extracted, pixels on this contour are sampled at a predetermined interval, and each sampled pixel is grown into a skin seed. The seed pixel is the original seed pixel. Then, for each seed pixel, the hue, saturation, and brightness of a predetermined area adjacent to the seed pixel are examined, and an area that satisfies the predetermined condition is added as a skin area to grow the skin area. When the skin region is grown for all seed pixels, a skin region having a larger area can be obtained. Further, a skin area having a larger area can be obtained by performing the same processes as those described above on the grown skin area, such as contour extraction, seed pixel setting, and skin area growth. Such a process is repeated until there is no neighboring pixel to be grown or the number of repetitions of this process reaches a predetermined number (steps S15 and S16).

「頭髪の検出」の部では、抽出しようとする頭髪の色の種別に応じた所定のアルゴリズムにしたがい、人物画像Inの肌領域に属さない領域における画素の明度または色相のヒストグラムを求め、そのヒストグラム上で所定の条件を満たす領域に相当する画素群を、頭髪領域Rhとして抽出する(ステップS17)。このようにして抽出された顔を含む肌領域Rsと頭髪領域Rhとを囲む領域を、補正対象領域Rmとして抽出する。   In the “detection of hair” section, according to a predetermined algorithm corresponding to the type of color of the hair to be extracted, a histogram of pixel brightness or hue in a region not belonging to the skin region of the human image In is obtained. The pixel group corresponding to the region that satisfies the predetermined condition is extracted as the hair region Rh (step S17). A region surrounding the skin region Rs including the face extracted in this way and the hair region Rh is extracted as a correction target region Rm.

マスクの作成の部では、人物画像Inと同じ画像サイズで、抽出された補正対象領域以外の領域を切り取ったマスク画像Maskを作成するが、この際、補正対象領域Rmの内外の明度差(コントラスト)に応じて、補正対象領域Rmの境界をぼかす処理を施す(ステップS18)。   The mask creation unit creates a mask image Mask having the same image size as that of the person image In and cuts out an area other than the extracted correction target area. At this time, the brightness difference (contrast) inside and outside the correction target area Rm is created. ) To blur the boundary of the correction target region Rm (step S18).

これより、上記の各部における細かい処理について説明する。   From here, detailed processing in each of the above-described units will be described.

(肌の種の抽出)
この部では、操作者によって指定された矩形の局所領域Ruにおいて最も肌らしい画素群を、肌領域を成長させるもととなる肌の種として抽出する。肌領域は、色相成分の分布図において幅の狭い所定の範囲に現れるということが、本出願人の経験から明らかとなっている。図6は、階調を0〜255としたときの、肌領域における色相、彩度、明度のそれぞれの分布を表した図である。図6の分布図によると、肌領域の色相は、235〜255と0〜30の限られた比較的狭い範囲に見られるが、彩度と明度はより広く、0〜255の全範囲に見られる。これらの色相、彩度および明度の分布図から、肌領域の抽出においては、色相の分布が他の2つの成分の分布に比してより当てにできると言える。
(Extraction of skin seeds)
In this part, a pixel group that is most likely to be skin in the rectangular local region Ru designated by the operator is extracted as a skin seed from which the skin region is grown. It is clear from the applicant's experience that the skin region appears in a narrow predetermined range in the hue component distribution diagram. FIG. 6 is a diagram showing the distribution of hue, saturation, and lightness in the skin area when the gradation is 0 to 255. According to the distribution diagram of FIG. 6, the hue of the skin region can be seen in a relatively narrow range of 235 to 255 and 0 to 30, but the saturation and lightness are wider, and the hue is seen in the entire range of 0 to 255. It is done. From these distribution maps of hue, saturation and lightness, it can be said that in the extraction of the skin region, the distribution of hue can be made more reliable than the distribution of the other two components.

まず、図7に示すように、操作者によって指定された指定領域Ru内で、信頼度の高い矩形の信頼領域Rtを選択する。信頼領域Rtは、指定領域Ruの縦幅の画素数をH、横幅の画素数をWとしたときに、中心を指定領域Ruの中心から下方にH/10画素分ずらした点とし、縦幅を100画素または21×H/40画素のいずれか小さい方とし、横幅を100画素または2×W/3画素のいずれか小さい方とする矩形領域である。操作者が指定する指定領域の中心は、肌領域である場合もあるが、目や眉である場合もある。後者の場合、その中心の近隣は肌領域として採用することができない。また、指定領域Ruには、肌に類似した背景部分が含まれることがあるが、指定領域Ruの中心は、ほとんどの場合、顔に属するため、その中心に近くて小さい領域は略全体が肌領域となる場合が多い。このような理由から、上記のように規定される信頼領域Rtを選択し、この領域における画像の情報を取得するようにしている。   First, as shown in FIG. 7, a rectangular trust region Rt with high reliability is selected within a designated region Ru designated by the operator. The trust region Rt is a point in which the center is shifted by H / 10 pixels downward from the center of the designated region Ru, where H is the number of pixels in the designated region Ru and W is the number of pixels in the width. Is a rectangular region in which 100 pixels or 21 × H / 40 pixels, whichever is smaller, and the horizontal width is 100 pixels or 2 × W / 3 pixels, whichever is smaller. The center of the designated area designated by the operator may be the skin area, but may be the eyes or eyebrows. In the latter case, the vicinity of the center cannot be adopted as the skin region. The designated area Ru may include a background portion similar to the skin, but since the center of the designated area Ru belongs to the face in most cases, the small area close to the center is almost entirely skin. It is often an area. For this reason, the trust region Rt defined as described above is selected, and image information in this region is acquired.

信頼領域Rtの選択の後、その信頼領域Rt内で色相が250〜255および0〜20の範囲にある画素を、最も肌らしい画素として選択する。そして、これらの画素の色相のヒストグラムを求める。図8に示すように、色相のヒストグラムにおいて所定の幅(例えば20)で画素数が最大となる区域[Hcl,Hch]を抽出する。同様に、彩度と明度のヒストグラムにおいても所定の幅(例えば、彩度に対しては30、明度に対しては40)で画素数が最大となる区域[Scl,Sch],[Icl,Ich]を抽出する。そして、これらの区域を用いて肌の分離閾値を設定する。まず、信頼領域Rtにおいて画素を抽出した場合と同様の方法により、指定領域Ruにおいて色相が上記250〜255および0〜20の区域(この区域を[Hl,Hh]とする)にある画素を抽出する。指定領域Ruにおいて色相が[Hl,Hh]の区域にある画素について彩度と明度のヒストグラムを求める。彩度のヒストグラムにおいて[(Scl+Sch)/2−30,(Scl+Sch)/2+30]の区域の外側のビンを0(ゼロ)にセットし、明度のヒストグラムにおいて[(Icl+Ich)/2−40,(Icl+Ich)/2+40]の区域の外側のビンを0(ゼロ)にセットする。このように両端を切り落としたヒストグラムにおいて所定の幅(例えば、彩度に対しては30、明度に対しては40)で画素値が最大となる区域[Sl,Sh],[Il,Ih]を抽出する。図9は、彩度のヒストグラムにおける区域抽出の例を示した図である。   After the selection of the trust region Rt, a pixel whose hue is in the range of 250 to 255 and 0 to 20 within the trust region Rt is selected as the pixel most likely to be skin. Then, a hue histogram of these pixels is obtained. As shown in FIG. 8, an area [Hcl, Hch] in which the number of pixels is maximum with a predetermined width (for example, 20) is extracted from the hue histogram. Similarly, in the saturation and lightness histograms, areas [Scl, Sch], [Icl, Ich] in which the number of pixels is maximum within a predetermined width (for example, 30 for saturation and 40 for lightness). ] Is extracted. Then, a skin separation threshold is set using these areas. First, pixels having hues in the 250 to 255 and 0 to 20 areas (referred to as [Hl, Hh]) in the designated area Ru are extracted in the same manner as when pixels are extracted in the trust area Rt. To do. A saturation and lightness histogram is obtained for pixels in the area of hue [Hl, Hh] in the designated region Ru. In the saturation histogram, the bin outside the area of [(Scl + Sch) / 2-30, (Scl + Sch) / 2 + 30] is set to 0 (zero), and in the brightness histogram, [(Icl + Ich) / 2-40, (Icl + Ich) ) / 2 + 40] set the bin outside the area to 0 (zero). Thus, in the histogram with both ends cut off, areas [Sl, Sh], [Il, Ih] where the pixel value is maximum within a predetermined width (for example, 30 for saturation and 40 for lightness) are shown. Extract. FIG. 9 is a diagram showing an example of area extraction in the saturation histogram.

最後に、指定領域Ruにおいて、色相が区域[Hl,Hh]にあり、彩度が区域[Sl,Sh]にあり、明度が区域[Il,Ih]にある画素を、最も肌らしい画素として抽出する。これらの画素は、閾値判定による分離によって得られるので、これらの画素の間には多数の小さな隙間が存在し、幾つかの不連続な領域を構成している。そこで、モフォロジフィルタのクロージング処理を用いてこれらの隙間を埋め、面積が最大となる領域を肌の種Rskin1として選択する。   Finally, in the designated area Ru, pixels whose hue is in the area [Hl, Hh], saturation is in the area [Sl, Sh], and lightness is in the area [Il, Ih] are extracted as the most skinlike pixels. To do. Since these pixels are obtained by separation based on threshold determination, there are many small gaps between these pixels, forming several discontinuous regions. Therefore, these gaps are filled by using a closing process of the morphology filter, and the region having the maximum area is selected as the skin seed Rskin1.

上記のアルゴリズムによって抽出された肌の種が、充分な画素数(例えば、1000画素またはH×W/8)を有さない場合は、肌の種の抽出の条件を緩める。すなわち、信頼領域Rtにおいて色相が上記の所定の範囲にある画素を抽出し、これらの画素をそのまま最も肌らしい画素として設定する。そして、モフォロジフィルタのクロージング処理を用いてこれらの画素の間にある隙間を埋め、面積が最大となる領域を肌の種Rskin1として選択する。   If the skin seed extracted by the above algorithm does not have a sufficient number of pixels (for example, 1000 pixels or H × W / 8), the conditions for skin seed extraction are relaxed. That is, pixels whose hue is in the predetermined range in the trust region Rt are extracted, and these pixels are set as the most likely pixels as they are. Then, the gap between these pixels is filled using the closing process of the morphology filter, and the region having the maximum area is selected as the skin seed Rskin1.

(肌の種の成長)
肌の種領域が得られたら、適応性領域成長手法により、その肌の種領域を成長させる。まず、肌の種領域Rskin1の輪郭CR1を抽出し、その輪郭上において所定の間隔で点[P1,P2,・・・,Pn]をサンプリングする(例えば、計32個の点をとる)。そして、図10(1)に示すように、この各点Piに対して領域成長手法を同時に適用する。肌の種領域は連続した領域であり、肌の種の成長時には、種の内部は輪郭上の種点と同等である。その輪郭上には多数の画素があり、それほど離れていない2点の画素間では色の情報が類似している。そこで、種を成長させる処理の回数を少なく抑えるため、このように所定の間隔をおいて種点を設定するようにしている。種の領域を成長させるには、まず成長の条件を設定する必要があるが、ここでは、次のように設定する。
(Skin seed growth)
Once the skin seed region is obtained, the skin seed region is grown by an adaptive region growth technique. First, the contour CR1 of the skin seed region Rskin1 is extracted, and points [P1, P2,..., Pn] are sampled at predetermined intervals on the contour (for example, a total of 32 points are taken). Then, as shown in FIG. 10A, the region growing method is simultaneously applied to each point Pi. The skin seed region is a continuous region, and when the skin seed grows, the inside of the seed is equivalent to the seed point on the contour. There are many pixels on the outline, and color information is similar between two pixels that are not so far apart. Therefore, in order to reduce the number of times of seed growth, the seed points are set at predetermined intervals in this way. In order to grow the seed region, it is first necessary to set the growth conditions. Here, the following conditions are set.

図10(2)に示すように、種点Piに対して点Piを中心に半径30画素の円を描き、この円内において既に肌領域として抽出されている内側領域Rinとまだ抽出されていない外側領域Routの2つの領域を得る。内側領域Rinにおいて、色相、彩度、明度のそれぞれのヒストグラムHisthin,HistsinおよびHistiinを求める。外側領域Routにおいても同様に、ヒストグラムHisthout,HistsoutおよびHistioutを求める。まず、Histhin,HistsinおよびHistiinを用いて、最初の色相、彩度および明度の各区域[Hpi0l,Hpi0h],[Spi0l,Spi0h]および[Ipi0l,Ipi0h]を選択する。これらの区域はそれぞれ、図11に示すように、色相のヒストグラムにおいてビンが10画素を超える区域、彩度のヒストグラムにおいてその面積が彩度の上下10%を除いた場合の残り80%の画素が含まれる区域、明度のヒストグラムにおいてその面積が明度の上下10%を除いた残り80%の画素が含まれる区域である。また、領域RinとRoutにおいて、色相、彩度、明度のそれぞれについての極大範囲を求める。極大範囲は、所定の間隔(例えば、色相に対しては10、彩度に対しては15、明度に対しては20)において画素値が最大となる区域である。ここで、これらの極大範囲は、Rinにおいては[Hinpeakl,Hinpeakh],[Sinpeakl,Sinpeakh]および[Iinpeakl,Iinpeakh]とし、Routにおいては[Houtpeakl,Houtpeakh],[Soutpeakl,Soutpeakh]および[Ioutpeakl,Ioutpeakh]と表す。そして、Rinにおける区域とRoutにおける区域とを比較し、この2つの区域が充分に近い場合には、その区域の幅を拡張する。区域の拡張の詳細は次の通りである。
As shown in FIG. 10 (2), a circle with a radius of 30 pixels is drawn around the point Pi with respect to the seed point Pi, and the inner region Rin that has already been extracted as a skin region within this circle has not yet been extracted. Two regions of the outer region Rout are obtained. In the inner region Rin, the histograms Histin, Histsin and Histin for the hue, saturation and lightness are obtained. Similarly, histograms Histhout, Histsout and Histiout are obtained in the outer region Rout. First, the first hue, saturation, and brightness areas [Hpi0l, Hpi0h], [Spi0l, Spi0h] and [Ipi0l, Ipi0h] are selected using Histhin, Histsin, and Histiin. As shown in FIG. 11, each of these areas has an area where bins exceed 10 pixels in the hue histogram, and the remaining 80% pixels when the area excludes 10% above and below the saturation in the saturation histogram. In the included area and brightness histogram, the area is an area including the remaining 80% of pixels excluding the upper and lower 10% of the brightness. In addition, in the regions Rin and Rout, maximum ranges are obtained for each of hue, saturation, and lightness. The maximum range is an area where the pixel value is maximum at a predetermined interval (for example, 10 for hue, 15 for saturation, and 20 for lightness). Here, these maximum ranges are [Hinpeakl, Hinpeakh], [Sinpeakl, Sinpeakh] and [Iinpeakl, Iinpeakh] in Rin, and [Houtpeakl, Houtpeakh], [Soutpeakl, Soutpeakh] and [Ioutpeakl, Ioutpeakh] in Rout. ]. Then, the area in Rin and the area in Rout are compared, and if the two areas are close enough, the width of the area is expanded. Details of the expansion of the area are as follows.

すなわち、区域[Hinpeakl,Hinpeakh]の中間値と区域[Houtpeakl,Houtpeakh]の中間値との差分が15より小さいときは、区域[Hpi0l,Hpi0h]を区域[min(Houtpeakl,Hpi0l),max(Houtpeakh,Hpi0h)]に拡げる。また、区域[Sinpeakl,Sinpeakh]の中間値と区域[Soutpeakl,Soutpeakh]の中間値との差分が30より小さいときは、区域[Spi0l,Spi0h]を区域[min(Soutpeakl,Spi0l),max(Soutpeakh,Spi0h)]に拡げる。また、区域[Iinpeakl,Iinpeakh]の中間値と区域[Ioutpeakl,Ioutpeakh]の中間値との差分が15より小さいときは、区域[Ipi0l,Ipi0h]を区域[min(Ioutpeakl,Ipi0l),max(Ioutpeakh,Ipi0h)]に拡げる。ここで、min(α,β)はαとβのいずれか小さい方、max(α,β)はαとβのいずれか大きい方とをとる関数である。   That is, when the difference between the intermediate value of the area [Hinpeakl, Hinpeakh] and the intermediate value of the area [Houtpeakl, Houtpeakh] is less than 15, the area [Hpi0l, Hpi0h] is changed to the area [min (Houtpeakl, Hpi0l), max (Houtpeakh). , Hpi0h)]. When the difference between the intermediate value of the area [Sinpeakl, Sinpeakh] and the intermediate value of the area [Soutpeakl, Soutpeakh] is smaller than 30, the area [Spi0l, Spi0h] is changed to the area [min (Soutpeakl, Spi0l), max (Soutpeakh). , Spi0h)]. When the difference between the intermediate value of the area [Iinpeakl, Iinpeakh] and the intermediate value of the area [Ioutpeakl, Ioutpeakh] is smaller than 15, the area [Ipi0l, Ipi0h] is changed to the area [min (Ioutpeakl, Ipi0l), max (Ioutpeakh). , Ipi0h)]. Here, min (α, β) is a function that takes the smaller of α and β, and max (α, β) is a function that takes the larger of α and β.

そして、顔が明るい肌および暗い肌である場合にも適用できるように、さらに区域を拡張する。経験則から、明るい肌や暗い肌では、明度や彩度は非常に幅広い値をとるが、色相はほとんど変わらないことが明らかとなっている。そこで、色相の区域は固定したまま、明度と彩度の区域をより拡げるようにする。   Then, the area is further expanded so that it can be applied even when the face has light skin and dark skin. As a rule of thumb, it is clear that for light and dark skin, lightness and saturation have a very wide range of values, but the hue remains almost unchanged. Therefore, the lightness and saturation areas are further expanded while the hue area is fixed.

このようにして、領域の成長における基準となる区域、すなわち、肌領域として含めるべき色相、彩度、明度のそれぞれに対する区域を得ることができる。そして、領域成長過程においては、成長させるべき近隣の画素がなくなるまで、近隣の画素がこれらの区域内にある場合に、それらの画素を肌領域に含めるようにする。この領域成長を各種点に対して実施し、すべての種点について成長し終わると、より大きな肌領域Rskin2が得られる。そして、さらに、この肌領域Rskin2に対して、上記と同様の領域成長手法を適用してゆく。このような処理を例えば5回程度繰り返すようにする。   In this way, it is possible to obtain a reference area for the growth of the area, that is, an area for each of hue, saturation, and brightness to be included as a skin area. In the region growing process, if there are neighboring pixels in these areas until there are no neighboring pixels to be grown, those pixels are included in the skin region. When this region growth is performed on various points and the growth is completed for all the seed points, a larger skin region Rskin2 is obtained. Further, the same region growth method as described above is applied to the skin region Rskin2. Such a process is repeated about 5 times, for example.

ただし、肌領域に類似した背景から肌領域Rsを分離するのは難しく、背景が肌色に近い色相である場合には、この肌色の背景も肌領域Rsとして抽出されてしまうことが考えられる。このような場合には、図13に示すように、操作者によって人物画像Inにおける単一人物の顔および頭髪に略外接する矩形を輪郭とする領域が指定領域Ruとして指定されることを前提として、その指定領域Ruの輪郭に内接する楕円状の弧を描き、顔領域の下部輪郭をその楕円状の弧に近似して抽出するようにする。   However, it is difficult to separate the skin region Rs from the background similar to the skin region, and if the background has a hue close to the skin color, the skin color background may be extracted as the skin region Rs. In such a case, as shown in FIG. 13, it is assumed that a region having a contour that is substantially circumscribed on the face and hair of a single person in the person image In is designated as the designated region Ru by the operator. Then, an elliptical arc inscribed in the contour of the designated region Ru is drawn, and the lower contour of the face region is extracted by approximating the elliptical arc.

なお、本処理において、肌領域Rsとして抽出する色相、彩度、明度それぞれの区域を決定するために、既に肌領域Rsとして抽出された領域の内部とその外部のそれぞれの色の情報を用いているが、この理由について説明する。領域の成長は、類似した画素を選択してゆく作業であるため、本出願人はその経験から、当初、その領域の成長に用いる情報は肌領域Rsの内部の情報だけで充分であると考えていた。しかし、実際には、顔や肌の一部のみしか抽出できなかった。その理由は、肌は、彩度や明度において広い範囲に属する傾向があり、たとえ同じ色相を有する領域であっても、肌領域Rs内部の種にはその近隣の外部の画素の情報が含まれないためである。故に、本処理では、近隣の外部の画素の情報を考慮するようにしている。   In this process, in order to determine the respective areas of hue, saturation, and lightness to be extracted as the skin region Rs, information on the colors inside and outside the region already extracted as the skin region Rs is used. I will explain why. Since the growth of the region is an operation of selecting similar pixels, the applicant of the experience thinks that the information used for the growth of the region is initially sufficient only for the information inside the skin region Rs. It was. However, in practice, only a part of the face and skin could be extracted. The reason is that the skin tends to belong to a wide range in saturation and lightness, and even if the region has the same hue, the seeds in the skin region Rs include information on the neighboring external pixels. This is because there is not. Therefore, in this processing, information on neighboring external pixels is considered.

(頭髪の検出)
肌領域Rsが抽出されると、残る領域は頭髪領域Rhと背景領域に属することとなる。したがって、頭髪領域Rhを抽出するには、指定領域Ruから肌領域を除いた領域において、頭髪領域Rhと背景領域を分離する形で頭髪領域Rhを抽出すればよい。ここでは、既に取得された頭髪色種別情報Vhが表す頭髪の色の種別に応じて、次のようなアルゴリズムを用いることにより頭髪領域Rhを抽出する。
(Detection of hair)
When the skin region Rs is extracted, the remaining region belongs to the hair region Rh and the background region. Therefore, in order to extract the hair region Rh, it is only necessary to extract the hair region Rh by separating the hair region Rh and the background region in the region excluding the skin region from the designated region Ru. Here, the hair region Rh is extracted by using the following algorithm in accordance with the hair color type represented by the hair color type information Vh already acquired.

まず、頭髪色種別情報Vhが表す種別が黒髪である場合、指定領域Ruの画像を構成する画素の明度値のヒストグラムを求め、明度値が所定の閾値より小さいこのヒストグラム上の領域に相当する画素からなる画像領域を頭髪領域Rhとして抽出する。頭髪が黒髪の場合、頭髪領域Rhの色相と彩度は非常にばらつく傾向があるので、頭髪領域の抽出においては、これら色相や彩度の成分は使い辛い。しかしながら、明度の分布は、ほとんどの場合、狭い区域に納まり、その明度も低い。そこで、本処理では、背景領域と頭髪領域Rhとを区別するため2値化分離手法を用いる。図12は、この2値化分離手法であるOotu(大津氏)の手法を表したものであるが、頭髪領域Rhを精度よく検出することができる。この手法では、所定のルールにしたがって明度値のヒストグラムにおいて閾値Tiを選択し(例えば、明度値の累積ヒストグラムの変化率が最も低くなる画素値を閾値Tiとする)、明度値がその閾値Tiより小さい画素を、頭髪らしい画素とする。この手法により、多数の頭髪らしき領域が検出される。これらの領域のうち最も面積の大きい領域を頭髪領域Rhとして選択する。なお、明度値のヒストグラムにおいて2つ以上の極大点が現れることもあるが、このような場合には、Ootuの手法では頭髪領域Rhをうまく検出することができない。基本的な考え方としては、信頼度の低い極大点を除外して信頼できる極大点を2つだけ残し、Ootuの手法を適用すればよいのだが、そのヒストグラム上で多数の極大点の存在をどのように知ればよいか、また、信頼度の低い極大点をどのように見つければよいかという問題がある。この問題を解決するため、下記の手法を適用することを考える。既に述べたように、頭髪領域Rhのほとんどの画素の明度値は小さいことが明らかである。そこで、ある値(例えば、128)より大きいビンを0(ゼロ)にセットした後、Ootuの手法を適用する。この手法であれば、所定の値(ここでは、128)より大きい明度値のビンによる影響を避けることができ、上記の問題を解決することができる。実際、実験においても、この手法により頭髪領域Rhをうまく検出することができた。   First, when the type represented by the hair color type information Vh is black hair, a histogram of brightness values of pixels constituting the image of the designated area Ru is obtained, and pixels corresponding to areas on this histogram whose brightness values are smaller than a predetermined threshold value. Is extracted as a hair region Rh. When the hair is black hair, the hue and saturation of the hair region Rh tend to vary greatly. Therefore, these components of hue and saturation are difficult to use in extracting the hair region. However, the lightness distribution almost always falls within a narrow area and the lightness is low. Therefore, in this process, a binarization separation method is used to distinguish the background region and the hair region Rh. FIG. 12 shows the method of Ootu (Mr. Otsu), which is this binarization separation method, and the hair region Rh can be detected with high accuracy. In this method, a threshold value Ti is selected in a histogram of brightness values according to a predetermined rule (for example, a pixel value at which the rate of change of the cumulative histogram of brightness values is the lowest is set as the threshold value Ti). Let the small pixel be a pixel like hair. By this method, a large number of hair-like regions are detected. Of these regions, the region having the largest area is selected as the hair region Rh. Two or more local maximum points may appear in the brightness value histogram. In such a case, the hair region Rh cannot be detected well by the Ootu method. The basic idea is to exclude the local maxima with low reliability and leave only two reliable maxima, and apply Ootu's method. What is the existence of many maxima on the histogram? There is a problem of how to find out, and how to find a local maximum point with low reliability. To solve this problem, consider applying the following method. As already mentioned, it is clear that the brightness values of most pixels in the hair region Rh are small. Therefore, after setting a bin larger than a certain value (for example, 128) to 0 (zero), the Ootu method is applied. With this method, it is possible to avoid the influence of a bin having a brightness value larger than a predetermined value (here, 128), and the above problem can be solved. In fact, even in experiments, the hair region Rh was successfully detected by this method.

次に、頭髪色種別情報Vhが表す種別が白髪である場合、指定領域Ruの画像を構成する画素の明度値のヒストグラムを求め、明度値が所定の閾値Tiより大きいこのヒストグラム上の領域に相当する画素からなる画像領域を頭髪領域として抽出する。なお、この明度値のヒストグラムにおいて極大値が3つ以上ある場合には、より明るい側の極大点を残すため、明度値が所定の値(例えば、128)より小さいビンを0(ゼロ)にセットするなどの工夫をする。   Next, when the type represented by the hair color type information Vh is gray hair, a histogram of brightness values of pixels constituting the image of the designated area Ru is obtained, and the brightness value corresponds to an area on the histogram that is greater than a predetermined threshold value Ti. An image region composed of pixels to be extracted is extracted as a hair region. When there are three or more maximum values in the histogram of brightness values, a bin whose brightness value is smaller than a predetermined value (for example, 128) is set to 0 (zero) in order to leave a brightest local maximum point. Devise such as doing.

また、頭髪色種別情報Vhが表す種別が金髪・茶髪である場合には、指定領域Ruの画像を構成する画素の色相値のヒストグラムを求め、色相値が金髪・茶髪の平均的な色相値を含む所定の範囲内(色相値をH、金髪・茶髪に対応する色相値の下限値をHlim0、上限値をHlim1として、Hlim0<H<Hlim1となる範囲内)であるこのヒストグラム上の山のうち面積が最大のものに相当する画素からなる画像領域を頭髪領域Rhとして抽出する。   In addition, when the type represented by the hair color type information Vh is blonde hair or brown hair, a histogram of hue values of pixels constituting the image of the designated area Ru is obtained, and the hue value is an average hue value of blonde hair or brown hair. The area of the mountain on this histogram that is within the specified range (within the range Hlim0 <H <Hlim1 where the hue value is H, the lower limit value of the hue value corresponding to blonde and brown hair is Hlim0, and the upper limit value is Hlim1) An image region composed of pixels corresponding to the largest one is extracted as a hair region Rh.

そして、頭髪色種別情報Vhが表す種別が黒髪、白髪、金髪・茶髪以外の他の色の種別である場合には、指定領域Ruの輪郭が補正対象である単一人物の顔および頭髪に略外接するものであることを前提として、まず、指定領域Ruの中で頭髪領域Rh内である確率が高い位置、例えば、指定領域Ruの中心から上方に指定領域Ruの垂直方向の幅の1/3の距離だけ移動した場所にある所定の大きさの部分領域における色相情報を求める。次に、指定領域Ruの画像を構成する画素の色相値のヒストグラムを求め、色相値が上記部分領域の平均色相値を含む所定の範囲内(色相値をH、平均色相値をH0、所定の幅をHwとして、H0−Hw<H<H0+Hw)であるこのヒストグラム上の山のうち面積が最大のものに相当する画素からなる画像領域を頭髪領域として抽出する。   When the type represented by the hair color type information Vh is a type of color other than black hair, white hair, blond hair, or brown hair, the outline of the designated area Ru is abbreviated to the face and hair of a single person to be corrected. Assuming that it is circumscribed, first, within the designated region Ru, a position having a high probability of being in the hair region Rh, for example, 1 / of the vertical width of the designated region Ru upward from the center of the designated region Ru. Hue information in a partial area of a predetermined size at a location moved by a distance of 3 is obtained. Next, a histogram of hue values of pixels constituting the image of the designated area Ru is obtained, and the hue value is within a predetermined range including the average hue value of the partial area (the hue value is H, the average hue value is H0, An image region composed of pixels corresponding to the largest area among the peaks on the histogram, where Hw is Hw and H0−Hw <H <H0 + Hw), is extracted as a hair region.

なお、上記の所定の閾値や所定の範囲は、目的の種別の頭髪が最も効果的に抽出される値または範囲を経験則から求めるようにする。   The predetermined threshold value and the predetermined range are obtained from an empirical rule for a value or range in which the target type of hair is most effectively extracted.

このように、頭髪の色の種別に応じて、アルゴリズムを切り替えることにより、頭髪領域Rhを精度よく抽出することができる。ただし、背景が頭髪の色に類似している場合には背景領域と頭髪領域Rhとを精度よく分離することは難しく、背景領域と頭髪領域Rhとの境界が不正確となることがある。このような場合には、図13に示すように、操作者によって人物画像Inにおける単一人物の顔および頭髪に略外接する矩形を輪郭とする領域が指定領域Ruとして指定されることを前提として、その指定領域Ruの輪郭に内接する楕円状の弧を描き、頭髪領域Rhの上部輪郭をその楕円状の弧に近似して抽出するようにする。背景領域と頭髪領域Rhの色が類似しているか否かは、例えば、指定領域Ruの輪郭位置を基準として、頭髪領域Rh内である確率が高い所定の位置にある画素または画素群の色相と背景領域内である確率が高い所定の位置にある画素または画素群の色相とを比較し、その差分がある閾値以内であるか否かにより判定するようにすればよい。   In this way, the hair region Rh can be extracted with high accuracy by switching the algorithm according to the color type of the hair. However, when the background is similar to the color of the hair, it is difficult to accurately separate the background region and the hair region Rh, and the boundary between the background region and the hair region Rh may be inaccurate. In such a case, as shown in FIG. 13, it is assumed that a region having a contour that is substantially circumscribed on the face and hair of a single person in the person image In is designated as the designated region Ru by the operator. Then, an elliptical arc inscribed in the contour of the designated region Ru is drawn, and the upper contour of the hair region Rh is extracted by approximating the elliptical arc. Whether the color of the background region and the hair region Rh is similar is determined by, for example, the hue of a pixel or a pixel group at a predetermined position having a high probability of being in the hair region Rh with reference to the contour position of the designated region Ru. What is necessary is to compare with the hue of a pixel or a pixel group at a predetermined position where the probability of being in the background region is high, and determine whether or not the difference is within a certain threshold.

このようにして、肌領域Rsおよび頭髪領域Rhが抽出されたら、これらを囲む領域を補正対象領域Rmとして設定する。   When the skin region Rs and the hair region Rh are extracted in this way, the region surrounding them is set as the correction target region Rm.

(マスクの作成)
補正対象領域Rmが抽出されたら、人物画像Inの画像全体が補正された全体補正画像Modともとの人物画像Inとを対応する画素毎に所定の重み付けで足し合わせて合成したときに、補正対象領域Rmのみにその補正が施された画像が得られるような上記重みを表すマスク画像Maskを作成する。
(Create mask)
When the correction target region Rm is extracted, the correction target area Rm is corrected when the entire corrected image Mod in which the entire image of the human image In is corrected and the original human image In are added together with a predetermined weight for each corresponding pixel. A mask image Mask representing the weight is generated so that an image in which only the region Rm is corrected is obtained.

マスク画像Maskは、人物画像Inと同じ画像サイズ(解像度)を有し、その各画素は、その画素に対して施される補正の程度に応じて0〜1(補正の程度が0%のときに0、100%のときに1となる)の重みに相当する画素値を有するものである。なお、本実施例では、重み0〜1に相当する画素値として、0〜255をとるものとする。   The mask image Mask has the same image size (resolution) as the person image In, and each pixel has 0 to 1 (when the degree of correction is 0%) depending on the degree of correction applied to the pixel. And a pixel value corresponding to a weight of 1 when 0 or 100%. In this embodiment, the pixel values corresponding to the weights 0 to 1 are assumed to be 0 to 255.

ここで、人物画像In、全体補正画像Modおよびマスク画像Maskを合成して最終的に得られる、部分的に補正がなされた補正済画像In′が不自然とならないように、マスクをぼかす処理を施す。すなわち、マスク画像Maskにおける補正対象領域Rmの境界近傍において、その補正度が補正対象領域Rmの内側から外側に向かって低くなるようにマスク画像Maskの画素値を設定する。ここでは、マスクをぼかすために、このマスク画像Maskにガウスぼかし処理を適用する。マスクの頭部側では、そのぼかす幅は、選択された矩形の指定領域Ruとの関係に基づいて規定する(例えば、水平方向の幅をW/4、垂直方向の幅をH/4とする)。その他の肌側では、まずマスクにおける肌の境界を抽出し、そのぼかす幅は、その境界の位置の水平方向の幅および垂直方向の幅との関係に基づいて規定する(水平方向の幅をW/4、垂直方向の幅をH/4とする)。   Here, the process of blurring the mask is performed so that the corrected image In ′ partially corrected, which is finally obtained by combining the person image In, the whole correction image Mod, and the mask image Mask, is not unnatural. Apply. That is, the pixel value of the mask image Mask is set so that the degree of correction decreases from the inside to the outside of the correction target region Rm in the vicinity of the boundary of the correction target region Rm in the mask image Mask. Here, in order to blur the mask, Gaussian blur processing is applied to the mask image Mask. On the head side of the mask, the width to be blurred is defined based on the relationship with the selected rectangular designated area Ru (for example, the horizontal width is W / 4 and the vertical width is H / 4). ). On the other skin side, first, the boundary of the skin in the mask is extracted, and the width to blur is defined based on the relationship between the horizontal width and the vertical width of the position of the boundary (the horizontal width is W / 4, and the vertical width is H / 4).

背景が暗い場合におけるその悪影響をより抑えるため、頭髪領域Rhの輪郭においては、マスクにおける値をゆっくり変化させる。すなわち、マスクにおける値が、0か255の2値ではなく、0〜255と変化するようにする。なお、指定領域Ruの輪郭に内接する楕円状の弧が頭髪領域の上部輪郭Lhuとして近似して選択された場合には、図14に示すように、マスクが外側から内側へ向かって0〜255の値をとるように変化させる。   In order to further suppress the adverse effect when the background is dark, the value in the mask is slowly changed in the outline of the hair region Rh. That is, the value in the mask is changed from 0 to 255 instead of the binary value of 0 or 255. When an elliptical arc inscribed in the contour of the designated region Ru is selected as an approximation of the upper contour Lhu of the hair region, as shown in FIG. 14, the mask is 0 to 255 from the outside to the inside. Change to take the value of.

なお、マスクについての検討段階においては、選択された領域の色情報を変えることのみを考え、他の領域へ影響を与えることは考えていながったが、マスクの境界の内外の色相関(ここで色相関とは、比較対象となる画像における色成分や明度の相関を表すものであり、例えば、明度差、赤(R)成分の差分と緑(G)成分の差分と青(B)成分の差分の和、色相の差分と彩度の差分と明度の差分の和などが考えられる)が大きい場合には、同一のぼかし具合では、補正による改善を望まない領域に対しても影響が出てしまい、不自然な描写となる傾向にあった。そこで、適応性のぼかし処理、すなわち、マスクの境界の内外の色相関に応じてぼかしの程度を変える処理を施すようにした。すなわち、補正度を、補正対象領域Rmの内外の色相関が小さいほど補正対象領域Rmの境界近傍においてより緩やかに変化するように設定する(例えば、ガウシアン関数の半径を広げる)。   It should be noted that at the stage of studying the mask, only changing the color information of the selected area was considered, but it was not considered to affect other areas, but the color correlation (inside and outside of the mask boundary ( Here, the color correlation represents a correlation between color components and lightness in an image to be compared. For example, lightness difference, red (R) component difference, green (G) component difference, and blue (B) If the sum of the component differences, the difference in hue, the difference in saturation, and the sum of the brightness differences are large), the same blurring condition may affect the areas where improvement by correction is not desired. It tended to be an unnatural description. Therefore, adaptive blurring processing, that is, processing for changing the degree of blurring according to the color correlation inside and outside the mask boundary, is performed. That is, the degree of correction is set so as to change more gently in the vicinity of the boundary of the correction target region Rm as the color correlation inside and outside the correction target region Rm decreases (for example, the radius of the Gaussian function is increased).

このように、色相関が小さいほど、補正対象領域Rmの境界近傍における補正度をより緩やかに変化するように設定する理由は、以下のような事実に基づいている。一般的に、補正対象領域Rmの内外の明度差が大きいときは、補正した補正対象領域Rmとその外側との間でグラデーションが目立ちやすくなるため(いかにも補正したといった表現になる)、補正対象領域の境界近傍においては、補正度は急峻に変化することが好ましく、また、補正対象領域Rmの内外の明度差が小さいときは、補正対象領域Rmの境界の抽出精度が悪い可能性があり、その抽出の悪さが目立ちやすくなるため(境界がずれていたり、でこぼこになったりする)、補正対象領域Rmの境界近傍においては、補正度を緩やかに変化させることが好ましい。しかし、明度差が小さいときであっても、色相がまったく異なる場合などは、上記のルールに従って補正度の変化を緩やかにしてしまうと、かえって色のグラデーションが目立つ結果となる場合があるので、このような場合には、各色の成分の差分の和も利用し、色相が近いかどうかも考慮するようにするとよい。すなわち、補正対象領域の内外の色相が近い場合には、補正対象領域の境界近傍においては、補正度は緩やかに変化することが好ましく、また、その色相が離れている場合には、補正対象領域の近傍において、補正度は急峻に変化することが好ましい。   As described above, the reason why the correction degree in the vicinity of the boundary of the correction target region Rm is set to change more gradually as the color correlation is smaller is based on the following facts. In general, when the brightness difference between the inside and outside of the correction target region Rm is large, gradation is easily noticeable between the corrected correction target region Rm and the outside thereof (the expression is corrected), so the correction target region In the vicinity of the boundary, it is preferable that the correction degree changes steeply, and when the brightness difference between the inside and outside of the correction target region Rm is small, the extraction accuracy of the boundary of the correction target region Rm may be poor. It is preferable that the degree of correction is gradually changed in the vicinity of the boundary of the correction target region Rm because bad extraction is likely to be noticeable (the boundary is shifted or uneven). However, even if the lightness difference is small, if the hue is completely different, etc., if the change in the correction degree is moderated according to the above rules, the color gradation may be noticeable. In such a case, it is preferable to consider whether the hues are close by using the sum of the differences between the components of the respective colors. That is, when the hues inside and outside the correction target area are close, it is preferable that the correction degree gradually changes in the vicinity of the boundary of the correction target area, and when the hue is far away, It is preferable that the correction degree changes steeply in the vicinity of.

なお、上記の同一のぼかし具合によるぼかし処理では、マスクの境界を滑らかにならすのに、ガウシアン・カーネルを用いる。ここで、マスクはMask(i,j)、1次元のガウシアン・カーネルは、n画素を半径として、G=[g-n,g-(n-1),・・・,gn-1,gn]である。マスクのぼかしは、水平方向と垂直方向のそれぞれに適用可能である。1次元のぼかしは、次式のように表すことができる。
In the blurring process with the same blurring condition, a Gaussian kernel is used to smooth the boundary of the mask. Here, the mask is Mask (i, j), and the one-dimensional Gaussian kernel is G = [g−n, g− (n−1),..., Gn−1, gn, with n pixels as the radius. ]. Mask blurring can be applied in both the horizontal and vertical directions. One-dimensional blurring can be expressed as:

一方、適応性のぼかし処理では、ぼかしの重みを導入し、ぼかし処理の式は、例えば、以下のように書き換えることができる。
On the other hand, in the adaptive blur processing, blur weights are introduced, and the formula of the blur processing can be rewritten as follows, for example.

ここで、thは調整用のパラメータであり、thが大きいほど、明度差:abs(I(i,j)−I(i−k,j))またはabs(I(i,j)−I(i,j−k))がぼかしの影響を弱くする。なお、このthの値としては、例えば、80とすることができる。 Here, th is a parameter for adjustment. The greater the th, the lightness difference: abs (I (i, j) -I (ik) j) or abs (I (i, j) -I ( i, j−k)) weakens the effect of blurring. The value of th can be set to 80, for example.

このような第1の実施形態による画像補正装置によれば、抽出対象となる頭髪の色の種別を所定の手段によって予め求めておき、操作者によって指定された領域またはその近傍の色の情報に基づいて、その指定領域またはその近傍から人物の顔領域を抽出するとともに、その予め求めた頭髪の色の種別に応じた所定のアルゴリズムにしたがって頭髪領域を抽出し、顔を含む肌領域Rsと頭髪領域Rhからなる補正対象領域Rmの色の補正を行うので、黒髪だけでなく他の種別の頭髪に対しても精度よく頭髪領域Rhを抽出することができ、一般自然画写真において、人物の頭髪が黒髪以外の種別であっても肌領域Rsと頭髪領域Rhからなる補正対象領域Rmを確実に抽出し、その顔の色を不自然とならない態様で適正にかつ効率的に補正することが可能となる。   According to the image correction apparatus according to the first embodiment as described above, the type of hair color to be extracted is obtained in advance by a predetermined means, and the color information in the region designated by the operator or in the vicinity thereof is obtained. And extracting a human face area from the designated area or the vicinity thereof, and extracting a hair area according to a predetermined algorithm corresponding to the type of hair color obtained in advance, and the skin area Rs including the face and the hair Since the color of the correction target region Rm composed of the region Rh is corrected, the hair region Rh can be accurately extracted not only for black hair but also for other types of hair. Even if the type is other than black hair, it is possible to reliably extract the correction target region Rm composed of the skin region Rs and the hair region Rh and correct the face color appropriately and efficiently without causing unnaturalness. It becomes ability.

次に、本発明の画像補正装置の第2の実施形態について説明する。この第2の実施形態による画像補正装置の構成および各部の機能は、頭髪色種別情報取得部33の機能を除き、第1の実施形態と同じである。   Next, a second embodiment of the image correction apparatus of the present invention will be described. The configuration of the image correction apparatus according to the second embodiment and the function of each unit are the same as those of the first embodiment except for the function of the hair color type information acquisition unit 33.

第1の実施形態においては、頭髪種別情報取得部33は、操作者からの入力に応じて頭髪色種別情報Vhを取得するものである。すなわち、操作者が画面に表示された人物画像Inを見て、補正対象である単一人物の頭髪の色の種別を自ら判断し、その種別を指定する。頭髪色種別情報取得部33は、その指定された種別を表す情報を頭髪色種別情報Vhとして取得している。   In the first embodiment, the hair type information acquisition unit 33 acquires the hair color type information Vh according to the input from the operator. That is, the operator looks at the person image In displayed on the screen, determines the hair color type of a single person to be corrected, and designates the type. The hair color type information acquisition unit 33 acquires information representing the specified type as the hair color type information Vh.

一方、第2の実施形態においては、頭髪色種別情報取得部33は、補正対象である単一人物の頭髪上の部分領域Rbを操作者からの入力に応じて指定し、その部分領域Rbの色の情報に基づいてその単一人物の頭髪の色の種別を判定し、この判定された種別を表す情報を頭髪色種別情報Vhとして生成するものである。すなわち、操作者は、図15に示すように、その単一人物の頭髪が存在する領域だけを指定し、その頭髪の色の種別は、操作者によって指定された領域の色の情報に基づいて画像補正装置側が判定することとなる。   On the other hand, in the second embodiment, the hair color type information acquisition unit 33 specifies a partial region Rb on the hair of a single person to be corrected in accordance with an input from the operator, and the partial region Rb The type of hair color of the single person is determined based on the color information, and information representing the determined type is generated as the hair color type information Vh. That is, as shown in FIG. 15, the operator designates only the region where the hair of the single person exists, and the color type of the hair is based on the color information of the region designated by the operator. The image correction apparatus side makes the determination.

なお、この頭髪の色の種別の判定は、例えば、下記のような処理によって行うことができる。   The determination of the type of hair color can be performed, for example, by the following process.

図16は、この頭髪の色の種別を判定する処理の流れを示したフローチャートである。まず、人物画像Inにおける補正対象である単一人物の頭髪上の部分領域Rbについて、この領域の画像を構成する画素の明度値の平均値I0、色相値の平均値H0、彩度値の平均値S0をそれぞれ算出する(ステップS21)。そして、彩度値の平均値S0が所定の閾値S_lim_bkwhtより小さいか否かを判定する(ステップS22)。すなわち、その単一人物の頭髪が、彩度の高い、金髪・茶髪系、カラーリングされた髪系に属するか、彩度の低い、黒髪系、白髪系に属するか判別する。ここで、彩度値の平均値S0が閾値S_lim_bkwhtより小さいと判定された場合には、その単一人物の頭髪が、彩度の低い、黒髪系または白髪系であると判別し、さらに、明度値の平均値I0が所定の閾値I_lim_whtより小さいか否かを判定する(ステップS23)。一方、ステップS22において、彩度値の平均値S0が閾値S_lim_bkwht以上であると判定された場合には、その単一人物の頭髪が、彩度の高い、金髪・茶髪系またはカラーリングされた髪系であると判別し、さらに、色相値の平均値H0が金髪や茶髪等の色相に相当するHlim0からHlim1までの所定の範囲内であるか否かを判定する(ステップS24)。ステップS23において、明度値の平均値I0が閾値I_lim_whtより小さいと判定された場合には、その頭髪は、明度の低い、黒髪系と判別され(ステップS25)、明度値の平均値I0が閾値I_lim_wht以上であると判定された場合には、その頭髪は、明度の高い、白髪系と判別される(ステップS26)。また、ステップS24において、色相値の平均値H0がこの所定の範囲内であると判定された場合には、その頭髪は、金髪・茶髪系と判別され(ステップS27)、色相値の平均値H0がこの所定の範囲外であると判定された場合には、その頭髪は、その他のカラーリングされた髪系と判別される(ステップS28)。   FIG. 16 is a flowchart showing the flow of processing for determining the type of hair color. First, regarding the partial region Rb on the hair of a single person to be corrected in the person image In, the average value I0, the average value H0 of the hue value, and the average of the saturation values of the pixels constituting the image of this region Each value S0 is calculated (step S21). Then, it is determined whether or not the average value S0 of the saturation values is smaller than a predetermined threshold value S_lim_bkwht (step S22). That is, it is determined whether the hair of the single person belongs to a highly saturated, blonde / brown hair system, a colored hair system, a low saturation system, a black hair system, or a white hair system. Here, if it is determined that the average value S0 of the saturation values is smaller than the threshold value S_lim_bkwht, it is determined that the hair of the single person has a low saturation, black-haired or gray-haired system, and further, brightness It is determined whether or not the average value I0 is smaller than a predetermined threshold value I_lim_wht (step S23). On the other hand, if it is determined in step S22 that the average value S0 of the saturation values is equal to or greater than the threshold value S_lim_bkwht, the hair of the single person has high saturation, blonde / brown hair or colored hair. Further, it is determined that the system is a system, and it is further determined whether or not the average value H0 of the hue values is within a predetermined range from Hlim0 to Hlim1 corresponding to a hue of blonde hair or brown hair (step S24). If it is determined in step S23 that the average value I0 of the lightness value is smaller than the threshold value I_lim_wht, the hair is determined to be a black hair system with low lightness (step S25), and the average value I0 of the lightness value is the threshold value I_lim_wht. If it is determined that the above is true, the hair is determined to be a white hair system with high brightness (step S26). If it is determined in step S24 that the average hue value H0 is within this predetermined range, the hair is determined to be blond / brown (step S27), and the average hue value H0 is determined. Is determined to be outside this predetermined range, the hair is determined to be another colored hair system (step S28).

頭髪色種別情報取得部33により、頭髪の色の種別が判定され、その頭髪の色の種別を表す頭髪色種別情報Vhが取得された後は、第1の実施形態と同様に、頭髪領域抽出部34により、その頭髪の色の種別に応じた所定のアルゴリズムにしたがって、頭髪領域Rhが抽出され、肌領域抽出部32により抽出された肌領域Rsとその頭髪領域Rhとを囲む補正対象領域Rmの色や明度が補正される。   After the hair color type information acquisition unit 33 determines the type of the hair color and acquires the hair color type information Vh representing the type of the hair color, the hair region extraction is performed as in the first embodiment. The hair region Rh is extracted by the unit 34 in accordance with a predetermined algorithm corresponding to the type of color of the hair, and the correction target region Rm surrounding the skin region Rs extracted by the skin region extracting unit 32 and the hair region Rh. The color and brightness are corrected.

このような第2の実施形態による画像補正装置によれば、第1の実施形態において説明した効果のほか、下記のような効果も認められる。すなわち、この画像補正装置によれば、操作者により指定された、人物画像In上の補正対象となる単一人物の頭髪上の部分領域Rbの色情報に基づいて、その頭髪の色の種別を判定するようにしているので、上記の部分領域Rbを指定するという操作者による単純な操作だけで、頭髪の色の情報を確実に取得して精度のよい頭髪の色の種別の判定を行い、頭髪領域Rhを精度よく抽出し、結果的に、補正対象領域Rmを精度よく抽出することができ、操作者への負担が軽いにもかかわらず、色の異なる多種の頭髪に対応した自然な補正が可能となる。   According to such an image correction apparatus according to the second embodiment, the following effects can be recognized in addition to the effects described in the first embodiment. That is, according to this image correction apparatus, the color type of the hair is specified based on the color information of the partial region Rb on the hair of a single person to be corrected on the person image In specified by the operator. Since the determination is made, only by a simple operation by the operator of designating the partial region Rb, the hair color information can be surely obtained and the hair color type can be accurately determined, The hair region Rh can be extracted with high accuracy, and as a result, the correction target region Rm can be extracted with high accuracy, and the natural correction corresponding to various hairs with different colors even though the burden on the operator is light. Is possible.

次に、本発明の画像補正装置の第3の実施形態について説明する。この第3の実施形態による画像補正装置の構成および各部の機能は、頭髪色種別情報取得部33の機能を除き、第1の実施形態と同じである。   Next, a third embodiment of the image correction apparatus of the present invention will be described. The configuration of the image correction apparatus according to the third embodiment and the function of each unit are the same as those of the first embodiment except for the function of the hair color type information acquisition unit 33.

第1の実施形態においては、頭髪種別情報取得部33は、操作者からの入力に応じて頭髪色種別情報Vhを取得するものである。すなわち、操作者が画面に表示された人物画像Inを見て、補正対象である単一人物の頭髪の色の種別を自ら判断し、その種別を指定する。頭髪色種別情報取得部33は、その指定された種別を表す情報を頭髪色種別情報Vhとして取得している。   In the first embodiment, the hair type information acquisition unit 33 acquires the hair color type information Vh according to the input from the operator. That is, the operator looks at the person image In displayed on the screen, determines the hair color type of a single person to be corrected, and designates the type. The hair color type information acquisition unit 33 acquires information representing the specified type as the hair color type information Vh.

一方、第3の実施形態においては、領域指定部31により指定された指定領域Ruが単一人物の顔および頭髪に略外接する矩形を輪郭とする領域であることを前提として、頭髪色種別情報取得部33は、図17に示すように、指定領域Ruの輪郭位置情報に基づいて、その単一人物の頭髪領域の上部輪郭Lhuを指定領域Ruの輪郭に内接する楕円状の弧に近似して抽出し、指定領域Ruから、肌領域抽出部31により抽出された肌領域Rsと、指定領域Ruの輪郭および上記の頭髪領域の上部輪郭Lhuによって囲まれる領域とを除いた領域のうち、指定領域Ruの上寄り1/3の矩形領域内の領域を頭髪暫定領域Rhtとして抽出し、頭髪暫定領域Rhtの色の情報に基づいてその単一人物の頭髪の色の種別を判定し、判定された種別を表す情報を頭髪色種別情報Vhとして生成するものである。すなわち、操作者は、人物画像In上で補正対象となる単一人物の顔および頭髪に略外接する領域を指定するだけであり、その頭髪の色の種別は、指定領域Ruの色の情報と輪郭位置情報に基づいて画像補正装置側がすべて自動で判定することとなる。   On the other hand, in the third embodiment, the hair color type information is assumed on the assumption that the designated region Ru designated by the region designating unit 31 is a region whose outline is a rectangle that substantially circumscribes the face and hair of a single person. As shown in FIG. 17, the acquisition unit 33 approximates the upper contour Lhu of the hair region of the single person to an elliptical arc inscribed in the contour of the designated region Ru, based on the contour position information of the designated region Ru. Of the region excluding the skin region Rs extracted by the skin region extraction unit 31 from the designated region Ru and the region surrounded by the contour of the designated region Ru and the upper contour Lhu of the hair region. The region in the rectangular region that is the upper third of the region Ru is extracted as the temporary hair region Rht, and the type of hair color of the single person is determined based on the color information of the temporary hair region Rht. Information indicating the type of hair color And generates a broadcast Vh. That is, the operator only designates an area that substantially circumscribes the face and hair of a single person to be corrected on the person image In, and the type of color of the hair is the color information of the designated area Ru. Based on the contour position information, all of the image correction apparatus side automatically determines.

なお、この頭髪の色の種別の判定は、基本的に、第2の実施形態における頭髪の色の種別の判定と略同じ判定処理を用いることができる。この場合、上記の頭髪上の部分領域Rbを上記の頭髪暫定領域Rhtに置き換えて考えるようにすればよい。   The determination of the type of hair color can basically use substantially the same determination process as the determination of the type of hair color in the second embodiment. In this case, the partial region Rb on the hair may be replaced with the temporary hair region Rht.

また、頭髪暫定領域Rhtは、上記のような手順により抽出するほか、単純に指定領域Ruの上側1/3の領域において、最も多い色を基礎にしてその単一人物の頭髪の色の種別を判定するようにしてもよい。   In addition to extracting the temporary hair region Rht by the above-described procedure, the type of hair color of the single person is simply determined based on the most colors in the upper third region of the designated region Ru. You may make it determine.

このような第3の実施形態による画像補正装置によれば、第1の実施形態において説明した効果のほか、下記のような効果も認められる。すなわち、この画像補正装置によれば、操作者により指定された、人物画像In上の補正対象となる単一人物の顔および頭髪に略外接する矩形領域を指定領域Ruとし、その指定領域Ruの色の情報と輪郭位置情報とに基づいて、頭髪領域に相当すると思われる領域を頭髪暫定領域Rhtとして抽出し、その頭髪暫定領域Rhtの色の情報に基づいてその頭髪の色の種別を判定するようにしているので、指定領域Ruを指定するという操作者による基本的な操作だけで、頭髪の色の情報を的確に取得して精度のよい頭髪の色の種別の判定を行い、頭髪領域Rhを精度よく抽出し、結果的に、補正対象領域Rmを精度よく抽出することができ、操作者への負担がほとんどないにもかかわらず、色の異なる多種の頭髪に対応した自然な補正が可能となる。   According to the image correction apparatus according to the third embodiment, in addition to the effects described in the first embodiment, the following effects are also recognized. That is, according to this image correction apparatus, a rectangular region that is substantially circumscribed by the face and hair of a single person to be corrected on the human image In, designated by the operator, is set as the designated region Ru. Based on the color information and the contour position information, an area that is considered to correspond to the hair area is extracted as the temporary hair area Rht, and the type of the hair color is determined based on the color information of the temporary hair area Rht. Therefore, only by a basic operation by the operator of designating the designated region Ru, the hair color information is accurately obtained to accurately determine the type of the hair color, and the hair region Rh. As a result, the correction target area Rm can be extracted with high accuracy, and natural correction corresponding to various hairs with different colors is possible despite almost no burden on the operator. It becomes.

なお、上記第1から第3の実施形態による画像補正装置では、以下のような効果も認められる。すなわち、操作者によって指定された領域内において人物の顔領域を含む補正対象領域Rmを自動で抽出する、いわゆるセミオートマティック(半自動)な補正対象領域Rmの抽出を行い、補正の程度を補正対象領域Rmの境界付近でなだらかにして補正しているので、背景が複雑で自動では検出しにくい人物画像であっても、人物の顔領域を含む補正対象領域Rmを的確にかつ効率的に抽出することができ、また、補正対象領域Rmとその他の領域との境界をぼかしながら補正することができ、一般自然画写真でも顔を確実に抽出し、その顔の明度や色を不自然とならない態様で適正にかつ効率的に補正することが可能となる。   Note that the image correction apparatus according to the first to third embodiments has the following effects. That is, a so-called semi-automatic (semi-automatic) correction target region Rm is automatically extracted from the region specified by the operator, including the human face region, so that the degree of correction is determined. Since the correction is performed gently in the vicinity of the boundary of Rm, the correction target area Rm including the face area of the person can be accurately and efficiently extracted even for a human image whose background is complicated and difficult to detect automatically. In addition, it is possible to perform correction while blurring the boundary between the correction target region Rm and other regions, and to extract a face reliably even in a general natural picture, so that the brightness and color of the face are not unnatural. It becomes possible to correct appropriately and efficiently.

また、顔を含む肌領域Rsだけでなく頭髪領域Rhも補正対象領域Rmに含めることで、補正後の画像において、頭髪の描写と顔の描写との不自然な明度差や色相の差が現れ難くなり、より自然な補正が可能となる。   Also, by including not only the skin region Rs including the face but also the hair region Rh in the correction target region Rm, an unnatural brightness difference or hue difference between the hair description and the face description appears in the corrected image. It becomes difficult and more natural correction is possible.

また、画像補正部および画像合成部で構成される補正手段が、色相、彩度および明度のうち少なくともいずれかに係る予め設定された種類の成分について、はじめに、補正対象領域の補正後の目標となる明度と実際の明度の平均値もしくは中間値との差分に基づいて補正量を決め、その後、操作者からの入力に応じて微調整することにより補正を行うようにしているので、補正における操作性がよく、操作者は単純な操作で所望の補正結果を得ることができ、多数の画像を効率よく補正することが可能となる。   In addition, the correction unit configured by the image correction unit and the image synthesis unit is configured to first correct the target after correction of the correction target region for a preset type of component related to at least one of hue, saturation, and brightness. The amount of correction is determined based on the difference between the average brightness and the average value or the intermediate value of the actual brightness, and then the correction is performed by fine adjustment according to the input from the operator. The operator can obtain a desired correction result with a simple operation, and can efficiently correct a large number of images.

なお、これらの実施形態においては、1つの人物画像Inに対して補正対象領域Rmを1つのみ抽出し、その補正対象領域に対して補正を施しているが、特にこのように限定される必要はなく、1つの人物画像Inに対して複数の補正対象領域Rm1,Rm2,・・・を抽出し、それぞれの補正対象領域に対応する複数マスク画像Mask1,Mask2,・・・と、複数の全体補正画像Mod1,Mod2,・・・を作成し、各補正対象領域に対して別々の補正を施すようにしてもよい。   In these embodiments, only one correction target region Rm is extracted from one person image In and correction is performed on the correction target region. Rather, a plurality of correction target areas Rm1, Rm2,... Are extracted from one person image In, and a plurality of mask images Mask1, Mask2,. It is also possible to create correction images Mod1, Mod2,... And perform different corrections on each correction target area.

また、これらの実施形態においては、補正対象領域Rmを、顔を含む肌領域Rsと頭髪領域Rhとを囲む領域として抽出しているが、特にこのように限定される必要はなく、頭髪領域Rhを含まない顔を含む肌領域Rsのみを補正対象領域Rmとして抽出するようにしてもよい。   In these embodiments, the correction target region Rm is extracted as a region surrounding the skin region Rs including the face and the hair region Rh. However, the hair region Rh is not particularly limited to this. Only the skin region Rs including the face not including the face may be extracted as the correction target region Rm.

以上、本発明の実施形態に係る画像補正方法および装置について説明したが、上記画像補正装置における各処理をコンピュータに実行させるためのプログラムも、本発明の実施形態の1つである。また、そのようなプログラムを記録したコンピュータ読取可能な記録媒体も、本発明の実施形態の1つである。   The image correction method and apparatus according to the embodiment of the present invention have been described above, but a program for causing a computer to execute each process in the image correction apparatus is also an embodiment of the present invention. A computer-readable recording medium that records such a program is also one embodiment of the present invention.

画像補正装置1の構成を示すブロック図The block diagram which shows the structure of the image correction apparatus 1 画像補正装置1において行われる処理の流れを示すフローチャートThe flowchart which shows the flow of the process performed in the image correction apparatus 1. 補正前後の画像および補正に用いる画像の一例を示す図The figure which shows an example of the image before and after correction | amendment, and the image used for correction | amendment 画像表示部70の画面に表示される画像のレイアウトの一例を示す図The figure which shows an example of the layout of the image displayed on the screen of the image display part 70 補正対象領域Rmの抽出およびマスク画像の作成における処理の流れを示すフローチャートA flowchart showing a flow of processing in extraction of a correction target region Rm and creation of a mask image 肌領域における色相、彩度および明度の分布を示す図Diagram showing the distribution of hue, saturation and lightness in the skin area 指定領域Ruと信頼領域Rtとの関係を示す図A diagram showing the relationship between the designated region Ru and the trust region Rt 肌領域の抽出に用いる色相ヒストグラム上の所定の区域を説明するための図The figure for demonstrating the predetermined area on the hue histogram used for extraction of a skin area | region 肌領域の抽出に用いる彩度ヒストグラム上の所定の各種の区域を説明するための図The figure for demonstrating the predetermined various area on the saturation histogram used for extraction of a skin area | region 肌の種の成長処理を説明するための図Illustration for explaining the growth process of skin seeds 肌の種の成長処理に用いるヒストグラム上の所定の区域を説明するための図The figure for demonstrating the predetermined area on the histogram used for the growth process of a skin seed 頭髪領域および背景領域と明度ヒストグラムとの関係を示す図The figure which shows the relationship between the hair region and the background region and the brightness histogram 顔領域の下部輪郭及び頭髪領域の上部輪郭の抽出手法を説明するための図The figure for demonstrating the extraction method of the lower outline of a face area | region, and the upper outline of a hair area | region 頭髪部分の境界近傍がぼかされたマスクを示す図The figure which shows the mask where the vicinity of the boundary of the hair part is blurred 補正対象である単一人物の頭髪上の部分領域を指定する様子を示す図The figure which shows a mode that the partial area | region on the hair of the single person who is correction object is specified 補正対象である単一人物の頭髪の色の種別を判定する処理のフローチャートFlowchart of processing for determining the type of hair color of a single person to be corrected 暫定頭髪領域を抽出する様子を示す図The figure which shows a mode that a temporary hair area | region is extracted

符号の説明Explanation of symbols

1 画像補正装置
10 画像データ保存部
20 画像選択部
31 領域指定部
32 肌領域抽出部
33 頭髪色種別情報取得部
34 頭髪領域抽出部
35 補正対象領域設定部
36 マスク作成部
40 画像補正部
50 画像合成部
60 表示制御部
70 画像表示部
80 入力操作部
DESCRIPTION OF SYMBOLS 1 Image correction apparatus 10 Image data storage part 20 Image selection part 31 Area designation part 32 Skin area extraction part 33 Hair color classification information acquisition part 34 Hair area extraction part 35 Correction target area setting part 36 Mask creation part 40 Image correction part 50 Image Composition unit 60 Display control unit 70 Image display unit 80 Input operation unit

Claims (21)

人物を被写体とする人物画像において単一人物の顔を含む領域を操作者からの入力に応じて指定する領域指定ステップと、
前記指定領域の色の情報に基づいて、前記単一人物の顔を含む肌領域を抽出する肌領域抽出ステップと、
前記単一人物の頭髪の色の種別を表す頭髪色種別情報を取得する頭髪色種別情報取得ステップと、
前記頭髪色種別情報が表す頭髪の色の種別に応じた所定のアルゴリズムにしたがって、前記単一人物の頭髪領域を抽出する頭髪領域抽出ステップと、
前記肌領域と前記頭髪領域とからなる領域を補正対象領域として設定する補正対象領域設定ステップと、
該補正対象領域における色相、彩度および明度のうち少なくともいずれかを補正する補正ステップとを有することを特徴とする画像補正方法。
An area designating step for designating an area including a face of a single person in a human image with a person as a subject in response to an input from an operator;
A skin region extraction step for extracting a skin region including the face of the single person based on color information of the designated region;
A hair color type information acquisition step of acquiring hair color type information representing the type of hair color of the single person;
A hair region extracting step of extracting the hair region of the single person according to a predetermined algorithm according to the type of hair color represented by the hair color type information;
A correction target region setting step for setting a region consisting of the skin region and the hair region as a correction target region;
And a correction step of correcting at least one of hue, saturation, and brightness in the correction target region.
前記頭髪色種別情報取得ステップが、前記操作者から入力された頭髪の色の種別を表す情報を、前記髪色種別情報として取得するステップであることを特徴とする請求項1記載の画像補正方法。   The image correction method according to claim 1, wherein the hair color type information acquisition step is a step of acquiring, as the hair color type information, information representing a type of hair color input from the operator. . 前記髪色種別情報取得ステップが、
前記単一人物の頭髪上の部分領域を操作者からの入力に応じて指定し、
前記部分領域の色の情報に基づいて前記単一人物の頭髪の色の種別を判定し、
該判定された種別を表す情報を前記頭髪色種別情報として生成するステップであることを特徴とする請求項1記載の画像補正方法。
The hair color type information acquisition step includes
Specify the partial area on the hair of the single person according to the input from the operator,
Determining the type of hair color of the single person based on the color information of the partial area;
The image correction method according to claim 1, wherein information representing the determined type is generated as the hair color type information.
前記指定領域が、前記単一人物の顔および頭髪に略外接する矩形を輪郭とする領域であり、
前記頭髪色種別情報取得ステップが、
前記指定領域の輪郭位置情報に基づいて、前記単一人物の頭髪領域の上部輪郭を前記指定領域の輪郭に内接する楕円状の弧に近似して抽出し、
前記指定領域から、前記肌領域と、前記指定領域の輪郭および前記頭髪領域の上部輪郭によって囲まれる領域とを除いた領域のうち、前記指定領域の上寄り1/2から1/4の矩形領域内の領域を頭髪暫定領域として抽出し、
前記頭髪暫定領域の色の情報に基づいて前記単一人物の頭髪の色の種別を判定し、
該判定された種別を表す情報を前記頭髪色種別情報として生成するステップであることを特徴とする請求項1記載の画像補正方法。
The designated area is an area having a contour that is substantially circumscribed by the face and hair of the single person,
The hair color type information acquisition step includes
Based on the contour position information of the designated area, the upper outline of the hair area of the single person is extracted by approximating an elliptical arc inscribed in the outline of the designated area,
Of the area excluding the skin area and the area surrounded by the outline of the designated area and the upper outline of the hair area from the designated area, a rectangular area that is 1/2 to 1/4 above the designated area The area inside is extracted as a temporary hair area,
Determining the type of hair color of the single person based on the color information of the provisional hair region;
The image correction method according to claim 1, wherein information representing the determined type is generated as the hair color type information.
前記頭髪領域抽出ステップが、前記頭髪色種別情報が表す種別が黒髪であるときに、前記指定領域の画像を構成する画素の明度値のヒストグラムを求め、明度値が所定の閾値より小さい前記ヒストグラム上の領域に相当する画素からなる画像領域を前記頭髪領域として抽出するステップであることを特徴とする請求項1から4いずれか記載の画像補正方法。   In the hair region extraction step, when the type represented by the hair color type information is black hair, a histogram of brightness values of pixels constituting the image of the specified region is obtained, and the brightness value is smaller than a predetermined threshold value on the histogram. 5. The image correction method according to claim 1, wherein an image region including pixels corresponding to the region is extracted as the hair region. 6. 前記頭髪領域抽出ステップが、前記頭髪色種別情報が表す種別が白髪であるときに、前記指定領域の画像を構成する画素の明度値のヒストグラムを求め、明度値が所定の閾値より大きい前記ヒストグラム上の領域に相当する画素からなる画像領域を前記頭髪領域として抽出するステップであることを特徴とする請求項1から4いずれか記載の画像補正方法。   In the hair region extraction step, when the type represented by the hair color type information is gray hair, a histogram of lightness values of pixels constituting the image of the specified region is obtained, and the lightness value is larger than a predetermined threshold value on the histogram. 5. The image correction method according to claim 1, wherein an image region including pixels corresponding to the region is extracted as the hair region. 6. 前記頭髪領域抽出ステップが、前記頭髪色種別情報が表す種別が金髪または茶髪のいずれか所定の種別であるときに、前記指定領域の画像を構成する画素の色相値のヒストグラムを求め、色相値が前記所定の種別の頭髪の平均的な色相値を含む所定の範囲内である前記ヒストグラム上の山のうち面積が最大のものに相当する画素からなる画像領域を前記頭髪領域として抽出するステップであることを特徴とする請求項1から4いずれか記載の画像補正方法。   The hair region extracting step obtains a histogram of hue values of pixels constituting the image of the designated region when the type represented by the hair color type information is a predetermined type of blond or brown hair, and the hue value is The step of extracting, as the hair region, an image region composed of pixels corresponding to the largest area among the peaks on the histogram that are within a predetermined range including an average hue value of the predetermined type of hair. 5. An image correction method according to claim 1, wherein 人物を被写体とする人物画像において単一人物の顔を含む領域を操作者からの入力に応じて指定する領域指定手段と、
前記指定領域の色の情報に基づいて、前記単一人物の顔を含む肌領域を抽出する肌領域抽出手段と、
前記単一人物の頭髪の色の種別を表す頭髪色種別情報を取得する頭髪色種別情報取得手段と、
前記頭髪色種別情報が表す頭髪の色の種別に応じた所定のアルゴリズムにしたがって、前記単一人物の頭髪領域を抽出する頭髪領域抽出手段と、
前記肌領域と前記頭髪領域とからなる領域を補正対象領域として設定する補正対象領域設定手段と、
該補正対象領域における色相、彩度および明度のうち少なくともいずれかを補正する補正手段とを備えたことを特徴とする画像補正装置。
An area designating unit for designating an area including a face of a single person in a human image having a person as a subject in response to an input from an operator;
A skin area extracting means for extracting a skin area including the face of the single person based on color information of the designated area;
Hair color type information acquisition means for acquiring hair color type information representing the type of hair color of the single person;
Hair region extracting means for extracting the hair region of the single person according to a predetermined algorithm corresponding to the type of hair color represented by the hair color type information;
Correction target region setting means for setting a region consisting of the skin region and the hair region as a correction target region;
An image correction apparatus comprising: correction means for correcting at least one of hue, saturation, and brightness in the correction target region.
前記頭髪色種別情報取得手段が、前記操作者から入力された頭髪の色の種別を表す情報を、前記髪色種別情報として取得するものであることを特徴とする請求項8記載の画像補正装置。   9. The image correction apparatus according to claim 8, wherein the hair color type information acquisition unit acquires information indicating the color type of the hair input from the operator as the hair color type information. . 前記髪色種別情報取得手段が、
前記単一人物の頭髪上の部分領域を操作者からの入力に応じて指定し、
前記部分領域の色の情報に基づいて前記単一人物の頭髪の色の種別を判定し、
該判定された種別を表す情報を前記頭髪色種別情報として生成するものであることを特徴とする請求項8記載の画像補正装置。
The hair color type information acquisition means
Specify the partial area on the hair of the single person according to the input from the operator,
Determining the type of hair color of the single person based on the color information of the partial area;
9. The image correction apparatus according to claim 8, wherein information representing the determined type is generated as the hair color type information.
前記指定領域が、前記単一人物の顔および頭髪に略外接する矩形を輪郭とする領域であり、
前記頭髪色種別情報取得手段が、
前記指定領域の輪郭位置情報に基づいて、前記単一人物の頭髪領域の上部輪郭を前記指定領域の輪郭に内接する楕円状の弧に近似して抽出し、
前記指定領域から、前記肌領域と、前記指定領域の輪郭および前記頭髪領域の上部輪郭によって囲まれる領域とを除いた領域のうち、前記指定領域の上寄り1/2から1/4の矩形領域内の領域を頭髪暫定領域として抽出し、
前記頭髪暫定領域の色の情報に基づいて前記単一人物の頭髪の色の種別を判定し、
該判定された種別を表す情報を前記頭髪色種別情報として生成するものであることを特徴とする請求項8記載の画像補正装置。
The designated area is an area having a contour that is substantially circumscribed by the face and hair of the single person,
The hair color type information acquisition means
Based on the contour position information of the designated area, the upper outline of the hair area of the single person is extracted by approximating an elliptical arc inscribed in the outline of the designated area,
Of the area excluding the skin area and the area surrounded by the outline of the designated area and the upper outline of the hair area from the designated area, a rectangular area that is 1/2 to 1/4 above the designated area The area inside is extracted as a temporary hair area,
Determining the type of hair color of the single person based on the color information of the provisional hair region;
9. The image correction apparatus according to claim 8, wherein information representing the determined type is generated as the hair color type information.
前記頭髪領域抽出手段が、前記頭髪色種別情報が表す種別が黒髪であるときに、前記指定領域の画像を構成する画素の明度値のヒストグラムを求め、明度値が所定の閾値より小さい前記ヒストグラム上の領域に相当する画素からなる画像領域を前記頭髪領域として抽出するものであることを特徴とする請求項8から11いずれか記載の画像補正装置。   The hair region extraction means obtains a histogram of lightness values of pixels constituting the image of the designated region when the type represented by the hair color type information is black hair, and the lightness value is smaller than a predetermined threshold value on the histogram The image correction apparatus according to claim 8, wherein an image region including pixels corresponding to the region is extracted as the hair region. 前記頭髪領域抽出手段が、前記頭髪色種別情報が表す種別が白髪であるときに、前記指定領域の画像を構成する画素の明度値のヒストグラムを求め、明度値が所定の閾値より大きい前記ヒストグラム上の領域に相当する画素からなる画像領域を前記頭髪領域として抽出するものであることを特徴とする請求項8から11いずれか記載の画像補正装置。   The hair region extraction means obtains a histogram of lightness values of pixels constituting the image of the designated region when the type represented by the hair color type information is white hair, and the lightness value is larger than a predetermined threshold value on the histogram The image correction apparatus according to claim 8, wherein an image region including pixels corresponding to the region is extracted as the hair region. 前記頭髪領域抽出手段が、前記頭髪色種別情報が表す種別が金髪または茶髪のいずれか所定の種別であるときに、前記指定領域の画像を構成する画素の色相値のヒストグラムを求め、色相値が前記所定の種別の頭髪の平均的な色相値を含む所定の範囲内である前記ヒストグラム上の山のうち面積が最大のものに相当する画素からなる画像領域を前記頭髪領域として抽出するものであることを特徴とする請求項8から11いずれか記載の画像補正装置。   The hair region extracting means obtains a histogram of hue values of pixels constituting the image of the designated region when the type represented by the hair color type information is a predetermined type of blond or brown hair, and the hue value is An image region composed of pixels corresponding to the largest area among the peaks on the histogram within a predetermined range including an average hue value of the predetermined type of hair is extracted as the hair region. The image correction apparatus according to claim 8, wherein the image correction apparatus is an image correction apparatus. コンピュータを、
人物を被写体とする人物画像において単一人物の顔を含む領域を操作者からの入力に応じて指定する領域指定手段と、
前記指定領域の色の情報に基づいて、前記単一人物の顔を含む肌領域を抽出する肌領域抽出手段と、
前記単一人物の頭髪の色の種別を表す頭髪色種別情報を取得する頭髪色種別情報取得手段と、
前記頭髪色種別情報が表す頭髪の色の種別に応じた所定のアルゴリズムにしたがって、前記単一人物の頭髪領域を抽出する頭髪領域抽出手段と、
前記肌領域と前記頭髪領域とからなる領域を補正対象領域として設定する補正対象領域設定手段と、
該補正対象領域における色相、彩度および明度のうち少なくともいずれかを補正する補正手段として機能させるためのプログラム。
Computer
An area designating unit for designating an area including a face of a single person in a human image having a person as a subject in response to an input from an operator;
A skin area extracting means for extracting a skin area including the face of the single person based on color information of the designated area;
Hair color type information acquisition means for acquiring hair color type information representing the type of hair color of the single person;
Hair region extracting means for extracting the hair region of the single person according to a predetermined algorithm corresponding to the type of hair color represented by the hair color type information;
Correction target region setting means for setting a region consisting of the skin region and the hair region as a correction target region;
A program for functioning as correction means for correcting at least one of hue, saturation, and brightness in the correction target area.
前記頭髪色種別情報取得手段が、前記操作者から入力された頭髪の色の種別を表す情報を、前記髪色種別情報として取得するものであることを特徴とする請求項15記載のプログラム。   The program according to claim 15, wherein the hair color type information acquisition unit acquires information representing a color type of the hair input from the operator as the hair color type information. 前記髪色種別情報取得手段が、
前記単一人物の頭髪上の部分領域を操作者からの入力に応じて指定し、
前記部分領域の色の情報に基づいて前記単一人物の頭髪の色の種別を判定し、
該判定された種別を表す情報を前記頭髪色種別情報として生成するものであることを特徴とする請求項15記載のプログラム。
The hair color type information acquisition means
Specify the partial area on the hair of the single person according to the input from the operator,
Determining the type of hair color of the single person based on the color information of the partial area;
16. The program according to claim 15, wherein information representing the determined type is generated as the hair color type information.
前記指定領域が、前記単一人物の顔および頭髪に略外接する矩形を輪郭とする領域であり、
前記頭髪色種別情報取得手段が、
前記指定領域の輪郭位置情報に基づいて、前記単一人物の頭髪領域の上部輪郭を前記指定領域の輪郭に内接する楕円状の弧に近似して抽出し、
前記指定領域から、前記肌領域と、前記指定領域の輪郭および前記頭髪領域の上部輪郭によって囲まれる領域とを除いた領域のうち、前記指定領域の上寄り1/2から1/4の矩形領域内の領域を頭髪暫定領域として抽出し、
前記頭髪暫定領域の色の情報に基づいて前記単一人物の頭髪の色の種別を判定し、
該判定された種別を表す情報を前記頭髪色種別情報として生成するものであることを特徴とする請求項15記載のプログラム。
The designated area is an area having a contour that is substantially circumscribed by the face and hair of the single person,
The hair color type information acquisition means
Based on the contour position information of the designated area, the upper outline of the hair area of the single person is extracted by approximating an elliptical arc inscribed in the outline of the designated area,
Of the area excluding the skin area and the area surrounded by the outline of the designated area and the upper outline of the hair area from the designated area, a rectangular area that is 1/2 to 1/4 above the designated area The area inside is extracted as a temporary hair area,
Determining the type of hair color of the single person based on the color information of the provisional hair region;
16. The program according to claim 15, wherein information representing the determined type is generated as the hair color type information.
前記頭髪領域抽出手段が、前記頭髪色種別情報が表す種別が黒髪であるときに、前記指定領域の画像を構成する画素の明度値のヒストグラムを求め、明度値が所定の閾値より小さい前記ヒストグラム上の領域に相当する画素からなる画像領域を前記頭髪領域として抽出するものであることを特徴とする請求項15から18いずれか記載のプログラム。   The hair region extraction means obtains a histogram of lightness values of pixels constituting the image of the designated region when the type represented by the hair color type information is black hair, and the lightness value is smaller than a predetermined threshold value on the histogram The program according to any one of claims 15 to 18, wherein an image area including pixels corresponding to the area is extracted as the hair area. 前記頭髪領域抽出手段が、前記頭髪色種別情報が表す種別が白髪であるときに、前記指定領域の画像を構成する画素の明度値のヒストグラムを求め、明度値が所定の閾値より大きい前記ヒストグラム上の領域に相当する画素からなる画像領域を前記頭髪領域として抽出するものであることを特徴とする請求項15から18いずれか記載のプログラム。   The hair region extraction means obtains a histogram of lightness values of pixels constituting the image of the designated region when the type represented by the hair color type information is white hair, and the lightness value is larger than a predetermined threshold value on the histogram The program according to any one of claims 15 to 18, wherein an image area including pixels corresponding to the area is extracted as the hair area. 前記頭髪領域抽出手段が、前記頭髪色種別情報が表す種別が金髪または茶髪のいずれか所定の種別であるときに、前記指定領域の画像を構成する画素の色相値のヒストグラムを求め、色相値が前記所定の種別の頭髪の平均的な色相値を含む所定の範囲内である前記ヒストグラム上の山のうち面積が最大のものに相当する画素からなる画像領域を前記頭髪領域として抽出するものであることを特徴とする請求項15から18いずれか記載のプログラム。   The hair region extracting means obtains a histogram of hue values of pixels constituting the image of the designated region when the type represented by the hair color type information is a predetermined type of blond or brown hair, and the hue value is An image region composed of pixels corresponding to the largest area among the peaks on the histogram within a predetermined range including an average hue value of the predetermined type of hair is extracted as the hair region. The program according to any one of claims 15 to 18, wherein said program is characterized in that:
JP2005275310A 2005-09-22 2005-09-22 Image correction method, device and program Withdrawn JP2007087123A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2005275310A JP2007087123A (en) 2005-09-22 2005-09-22 Image correction method, device and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2005275310A JP2007087123A (en) 2005-09-22 2005-09-22 Image correction method, device and program

Publications (1)

Publication Number Publication Date
JP2007087123A true JP2007087123A (en) 2007-04-05

Family

ID=37974039

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2005275310A Withdrawn JP2007087123A (en) 2005-09-22 2005-09-22 Image correction method, device and program

Country Status (1)

Country Link
JP (1) JP2007087123A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010041664A (en) * 2008-08-08 2010-02-18 Canon Inc Image composition method and image composition apparatus
CN101964874A (en) * 2009-07-23 2011-02-02 卡西欧计算机株式会社 Image processing apparatus and image processing method
JP2011055185A (en) * 2009-09-01 2011-03-17 Canon Inc Image processing apparatus and method
JP2011061386A (en) * 2009-09-08 2011-03-24 Make Softwear:Kk Image output device, method for outputting image, and computer program
JP2011141622A (en) * 2010-01-05 2011-07-21 Canon Inc Detection apparatus and method
JP2013061697A (en) * 2011-09-12 2013-04-04 Dainippon Printing Co Ltd Individual identification device, individual identification method and program
CN113450431A (en) * 2020-03-27 2021-09-28 北京达佳互联信息技术有限公司 Virtual hair dyeing method and device, electronic equipment and storage medium

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010041664A (en) * 2008-08-08 2010-02-18 Canon Inc Image composition method and image composition apparatus
CN101964874A (en) * 2009-07-23 2011-02-02 卡西欧计算机株式会社 Image processing apparatus and image processing method
JP2011044132A (en) * 2009-07-23 2011-03-03 Casio Computer Co Ltd Image processing apparatus, image processing method and image processing program
KR101204724B1 (en) 2009-07-23 2012-11-26 가시오게산키 가부시키가이샤 Image processing apparatus, image processing method, and storage medium thereof
US8446485B2 (en) 2009-07-23 2013-05-21 Casio Computer Co., Ltd. Image processing apparatus, image processing method, and storage medium thereof
JP2011055185A (en) * 2009-09-01 2011-03-17 Canon Inc Image processing apparatus and method
JP2011061386A (en) * 2009-09-08 2011-03-24 Make Softwear:Kk Image output device, method for outputting image, and computer program
JP2011141622A (en) * 2010-01-05 2011-07-21 Canon Inc Detection apparatus and method
JP2013061697A (en) * 2011-09-12 2013-04-04 Dainippon Printing Co Ltd Individual identification device, individual identification method and program
CN113450431A (en) * 2020-03-27 2021-09-28 北京达佳互联信息技术有限公司 Virtual hair dyeing method and device, electronic equipment and storage medium
CN113450431B (en) * 2020-03-27 2023-07-07 北京达佳互联信息技术有限公司 Virtual hair dyeing method, device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
JP2006338377A (en) Image correction method, apparatus, and program
US9852499B2 (en) Automatic selection of optimum algorithms for high dynamic range image processing based on scene classification
JP2008234342A (en) Image processor and image processing method
EP1372109A2 (en) Method and system for enhancing portrait images
US7251054B2 (en) Method, apparatus and recording medium for image processing
US20020061142A1 (en) Image correction apparatus
US6262778B1 (en) Image processing system
JP2004265406A (en) Method and system for improving portrait image processed in batch mode
JP2007087123A (en) Image correction method, device and program
JP2000261650A (en) Image processing unit
JP2007094623A (en) Image correcting method and device, and program
JP2001251531A (en) Method and device for image processing and recording medium
JP6432399B2 (en) Image processing apparatus and image processing method
JP2008243059A (en) Image processing device and method
US7212674B1 (en) Method, apparatus and recording medium for face extraction
US6996270B1 (en) Method, apparatus, and recording medium for facial area adjustment of an image
US9092889B2 (en) Image processing apparatus, image processing method, and program storage medium
JP2004240622A (en) Image processing method, image processor and image processing program
JPH1091761A (en) Picture processor
JPH09261580A (en) Image processing method
JP2010224775A (en) Eye-catch synthesizing device and method
JP2007088831A (en) Image correction method and device, as well as program
JP2013171511A (en) Image processing device, image processing program and storage medium
JP2004242068A (en) Method, apparatus, and program for image processing
JP2001125944A (en) Method and device for simulating fitting

Legal Events

Date Code Title Description
A300 Application deemed to be withdrawn because no request for examination was validly filed

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20081202