JP2002271808A - Program for correcting red-eye in picture, recording medium and red-eye correcting method - Google Patents

Program for correcting red-eye in picture, recording medium and red-eye correcting method

Info

Publication number
JP2002271808A
JP2002271808A JP2001070140A JP2001070140A JP2002271808A JP 2002271808 A JP2002271808 A JP 2002271808A JP 2001070140 A JP2001070140 A JP 2001070140A JP 2001070140 A JP2001070140 A JP 2001070140A JP 2002271808 A JP2002271808 A JP 2002271808A
Authority
JP
Japan
Prior art keywords
red
correction
eye
program
region
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2001070140A
Other languages
Japanese (ja)
Other versions
JP4232345B2 (en
Inventor
Hiroki Yoshida
宏樹 吉田
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.)
Minolta Co Ltd
Original Assignee
Minolta Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Minolta Co Ltd filed Critical Minolta Co Ltd
Priority to JP2001070140A priority Critical patent/JP4232345B2/en
Publication of JP2002271808A publication Critical patent/JP2002271808A/en
Application granted granted Critical
Publication of JP4232345B2 publication Critical patent/JP4232345B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To provide a red-eye correcting method that can properly correct a red-eye in a picture. SOLUTION: A plurality of feature areas needing red-eye correction are extracted from a picture on the basis of the saturation, lightness and hue being the feature quantities, and a histogram as to each feature quantity of the feature areas is generated (step S32). Parameters such as a minimum value, a maximum value, a mode, a variance, and an average value of the feature quantities are introduced from each histogram and a correction curve with respect to the feature quantities is generated on the basis of the parameters (steps S33, S34). The feature quantities are corrected after that according to the correction curve (step S35). Thus, the feature quantity of each feature area can be properly corrected by using the correction curve for each feature quantity depending on the characteristic of the feature area and red-eye caused in various modes can be properly corrected by taking into account the gradation.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、画像中の赤目を補
正する技術に関する。
The present invention relates to a technique for correcting red eyes in an image.

【0002】[0002]

【従来の技術】フラッシュを用いて撮影を行うと画像中
の人物の目が赤色あるいは黄金色に光って写る赤目現象
が生じることがある。従来より、銀塩カメラにて取得さ
れた写真をスキャナにて取り込むことにより、あるい
は、デジタルカメラにて撮影することにより取得された
画像データに対して処理を施し、画像中の赤目を通常の
目へと補正する技術が提案されている。
2. Description of the Related Art When photographing is performed using a flash, a red-eye phenomenon may occur in which a person's eyes in an image appear shining red or golden. 2. Description of the Related Art Conventionally, a photograph obtained by a silver halide camera is captured by a scanner, or image data obtained by photographing with a digital camera is processed, and red eyes in the image are reduced to a normal eye. correction to the techniques have been proposed.

【0003】赤目を補正する一般的な技術としては、画
像中の赤目が存在する領域(以下、「赤目領域」とい
う。)に対して赤色を他の色に置換したり、明度または
彩度を下げるといった処理が知られている。赤目領域に
対してこのような単純な処理を施した場合、目の中の彩
度、明度および色相のグラデーションが失われてしま
い、不自然な目となる。そこで、例えば、特開2000
−76427号公報や特開2000−134486号公
報では、瞳や赤目領域の周辺部から中央部にかけて明度
または彩度を漸次減少させるようにしている。
[0003] As a general technique for correcting red-eye, an area where red-eye exists in an image (hereinafter referred to as a "red-eye area") is replaced with another color of red, or brightness or saturation is changed. The processing of lowering is known. When such simple processing is performed on the red-eye region, the gradation of saturation, lightness, and hue in the eyes is lost, resulting in an unnatural eye. So, for example, JP-2000
In JP-A-76427 and JP-A-2000-134486, the brightness or the saturation is gradually reduced from the periphery to the center of the pupil and the red-eye region.

【0004】[0004]

【発明が解決しようとする課題】ところで、赤目領域に
おける明度や彩度を補正対象となる画素の位置に応じて
修正する場合、補正対象の画素の位置と補正量とが適切
に対応付けられる必要がある。したがって、例えば、瞳
の中心が適切に検出できない場合や赤目領域の中心が瞳
の中心と一致しないにも関わらず赤目領域の中心を瞳の
中心とみなす場合等には、瞳の中心近傍のグラデーショ
ンが不自然なものとなってしまう。
When the lightness or saturation in the red-eye region is corrected in accordance with the position of the pixel to be corrected, the position of the pixel to be corrected and the correction amount need to be appropriately associated. There is. Therefore, for example, when the center of the pupil cannot be detected properly or when the center of the red-eye region is regarded as the center of the pupil even though the center of the red-eye region does not match the center of the pupil, the gradation near the center of the pupil is considered. Becomes unnatural.

【0005】本発明は、上記課題に鑑みなされたもので
あり、様々な態様にて生じる赤目を適切に補正すること
を目的としている。
[0005] The present invention has been made in view of the above problems, and has as its object to appropriately correct red-eye caused in various modes.

【0006】[0006]

【課題を解決するための手段】請求項1に記載の発明
は、画像中の赤目を補正するプログラムであって、前記
プログラムのコンピュータによる実行は、前記コンピュ
ータに、赤目領域に含まれる補正対象領域において特徴
量のヒストグラムを生成する工程と、前記ヒストグラム
から導かれるパラメータに基づいて補正曲線を生成する
工程と、前記補正曲線に従って前記補正対象領域内の特
徴量を補正する工程とを実行させる。
Means for Solving the Problems The invention described in claim 1 is a program for correcting the red eye in the image, execution by a computer of the program, the computer, correction target region included in the red eye area Generating a histogram of the feature amount, generating a correction curve based on parameters derived from the histogram, and correcting the feature amount in the correction target area according to the correction curve.

【0007】請求項2に記載の発明は、請求項1に記載
のプログラムであって、前記プログラムの前記コンピュ
ータによる実行は、前記コンピュータに、特徴量に基づ
いて画像から前記補正対象領域を抽出する工程をさらに
実行させる。
According to a second aspect of the present invention, there is provided the program according to the first aspect, wherein the execution of the program by the computer causes the computer to extract the correction target area from an image based on a feature amount. The process is performed further.

【0008】請求項3に記載の発明は、請求項2に記載
のプログラムであって、前記画像から複数の補正対象領
域が抽出され、前記複数の補正対象領域のそれぞれにつ
いて前記ヒストグラムが生成される。
According to a third aspect of the present invention, there is provided the program according to the second aspect, wherein a plurality of correction target areas are extracted from the image, and the histogram is generated for each of the plurality of correction target areas. .

【0009】請求項4に記載の発明は、請求項1ないし
3のいずれかに記載のプログラムであって、前記パラメ
ータが、前記特徴量の最小値、最大値、最頻値、平均値
および分散のいずれかを含む。
A fourth aspect of the present invention is the program according to any one of the first to third aspects, wherein the parameter is a minimum value, a maximum value, a mode value, an average value, and a variance of the feature amount. Including any of

【0010】請求項5に記載の発明は、請求項4に記載
のプログラムであって、前記特徴量が彩度であり、前記
補正曲線が、彩度の分散が小さいほど彩度の最大値を減
少させる特性を有する。
According to a fifth aspect of the present invention, there is provided the program according to the fourth aspect, wherein the feature amount is a saturation, and the correction curve indicates a maximum value of the saturation as the variance of the saturation is smaller. It has the property of reducing.

【0011】請求項6に記載の発明は、請求項4に記載
のプログラムであって、前記特徴量が明度であり、前記
補正曲線が、明度の最大値を保持しつつ明度の中間値を
減少させる特性を有する。
[0011] The invention described in claim 6 is the program according to claim 4, it said feature amount is the brightness, the correction curve, reducing an intermediate value of brightness while maintaining maximum brightness It has the property to make it.

【0012】請求項7に記載の発明は、請求項4に記載
のプログラムであって、前記特徴量が彩度または明度で
あり、前記補正曲線による前記特徴量の中間値の減少の
度合いが、前記特徴量の最頻値を基準に決定される。
According to a seventh aspect of the present invention, there is provided the program according to the fourth aspect, wherein the characteristic amount is saturation or lightness, and a degree of decrease of the intermediate value of the characteristic amount by the correction curve is: It is determined based on the mode of the feature amount.

【0013】請求項8に記載の発明は、請求項4に記載
のプログラムであって、前記特徴量が色相であり、前記
補正曲線が、色相の最頻値を予め指定された値へと変換
する曲線として求められる。
According to an eighth aspect of the present invention, there is provided the program according to the fourth aspect, wherein the characteristic amount is a hue, and the correction curve converts a mode value of the hue into a predetermined value. It is obtained as a curve.

【0014】請求項9に記載の発明は、請求項1ないし
4のいずれかに記載のプログラムであって、前記ヒスト
グラムが、特徴量である彩度、明度および色相のそれぞ
れについて求められる。
According to a ninth aspect of the present invention, there is provided the program according to any one of the first to fourth aspects, wherein the histogram is obtained for each of the feature amounts of saturation, lightness, and hue.

【0015】請求項10に記載の発明は、画像中の赤目
を補正するプログラムであって、前記プログラムのコン
ピュータによる実行は、前記コンピュータに、特徴量に
基づいて画像から赤目領域として抽出された複数の特徴
領域に対して赤目補正を行う工程と、前記赤目補正を行
う工程の前または後に、前記複数の特徴領域のそれぞれ
に対して処理対象となる特徴領域に応じた平滑化を行う
工程とを実行させる。
[0015] The invention of claim 10 is a program for correcting the red eye in the image, execution by a computer of the program, a plurality extracted to the computer, as red-eye region from the image based on the feature quantity Performing a red-eye correction on the characteristic region, and, before or after the step of performing the red-eye correction, performing a smoothing process on each of the plurality of characteristic regions in accordance with a characteristic region to be processed. Let it run.

【0016】請求項11に記載の発明は、請求項10に
記載のプログラムであって、前記プログラムの前記コン
ピュータによる実行は、前記コンピュータに、前記複数
の特徴領域のそれぞれに関する特徴量のヒストグラムを
生成する工程と、前記ヒストグラムから導かれるパラメ
ータに基づいて前記平滑化の度合いを決定する工程とを
さらに実行させる。
[0016] The invention of claim 11 is a program of claim 10, executed by the computer of the program, the computer generates a histogram of feature amount for each of the plurality of characteristic regions And determining the degree of smoothing based on parameters derived from the histogram.

【0017】請求項12に記載の発明は、画像中の赤目
を補正するプログラムであって、前記プログラムのコン
ピュータによる実行は、前記コンピュータに、画像中の
補正対象領域を決定する工程と、前記補正対象領域の大
きさと所定値とを比較する工程と、前記補正対象領域の
大きさが前記所定値よりも小さい場合に、前記補正対象
領域の解像度を増大させる工程と、前記補正対象領域に
対して赤目補正を行う工程とを実行させる。
According to a twelfth aspect of the present invention, there is provided a program for correcting red-eye in an image, wherein the computer executes the program by causing the computer to determine a correction target area in the image; a step of comparing the magnitude of a predetermined value of the object area, when the size of the correction target region is smaller than the predetermined value, the step of increasing the resolution of the correction target region with respect to the correction target region And performing the step of performing red-eye correction.

【0018】請求項13に記載の発明は、コンピュータ
読み取り可能な記録媒体であって、請求項1ないし12
のいずれかに記載のプログラムを記録している。
The invention described in claim 13 is a computer-readable recording medium, claims 1 12
The program described in any of the above is recorded.

【0019】請求項14に記載の発明は、画像中の赤目
を補正する赤目補正方法であって、赤目領域に含まれる
補正対象領域において特徴量のヒストグラムを生成する
工程と、前記ヒストグラムから導かれるパラメータに基
づいて補正曲線を生成する工程と、前記補正曲線に従っ
て前記補正対象領域内の特徴量を補正する工程とを有す
る。
[0019] The invention according to claim 14, a red eye correction method for correcting red-eye in an image, and generating a histogram of feature amount in the correction target region contained in the red-eye region, derived from the histogram and a step of generating a correction curve based on the parameters, and a step of correcting the characteristic of the correction target region in accordance with the correction curve.

【0020】請求項15に記載の発明は、画像中の赤目
を補正する赤目補正方法であって、特徴量に基づいて画
像から赤目領域として抽出された複数の特徴領域に対し
て赤目補正を行う工程と、前記赤目補正を行う工程の前
または後に、前記複数の特徴領域のそれぞれに対して処
理対象となる特徴領域に応じた平滑化を行う工程とを有
する。
[0020] The invention according to claim 15, a red eye correction method for correcting red-eye in an image, perform red-eye correction for a plurality of characteristic regions extracted as red eye area from the image based on the feature quantity A step of performing, before or after the step of performing the red-eye correction, a step of performing smoothing on each of the plurality of characteristic regions in accordance with a characteristic region to be processed.

【0021】請求項16に記載の発明は、画像中の赤目
を補正する赤目補正方法であって、画像中の補正対象領
域を決定する工程と、前記補正対象領域の大きさと所定
値とを比較する工程と、前記補正対象領域の大きさが前
記所定値よりも小さい場合に、前記補正対象領域の解像
度を増大させる工程と、前記補正対象領域に対して赤目
補正を行う工程とを有する。
According to a sixteenth aspect of the present invention, there is provided a red-eye correction method for correcting red-eye in an image, comprising: determining a correction target area in the image; Performing a step of increasing the resolution of the correction target area when the size of the correction target area is smaller than the predetermined value; and performing a red-eye correction on the correction target area.

【0022】[0022]

【発明の実施の形態】図1は、本発明の一の実施の形態
に係る画像処理装置1の外観図である。画像処理装置1
は、プログラムを実行することにより画像中の赤目領域
を特定して補正を行うコンピュータである。画像処理装
置1は、図1に示すように使用者からの入力を受け付け
るキーボード111およびマウス112、並びに、使用
者に対する指示メニューや取得した画像等の表示を行う
ディスプレイ12を備える。
Figure 1 DETAILED DESCRIPTION OF THE INVENTION is an external view of the image processing apparatus 1 according to an embodiment of the present invention. Image processing device 1
Is a computer that performs correction by specifying the red-eye region in the image by executing the program. As shown in FIG. 1, the image processing apparatus 1 includes a keyboard 111 and a mouse 112 for receiving an input from a user, and a display 12 for displaying an instruction menu for the user, an acquired image, and the like.

【0023】画像処理装置1は、内部に画像のデータ等
を記憶する固定ディスク161を有しており、さらに、
プログラムを格納した記録ディスク91や画像データを
格納したメモリカード92が、コンピュータ読み取り可
能な記録媒体としてそれぞれ読取装置162やカードス
ロット163に装填可能となっている。
The image processing apparatus 1 has a fixed disk 161 for storing data such as images inside, further,
A recording disk 91 storing a program and a memory card 92 storing image data can be loaded into a reading device 162 and a card slot 163 as computer-readable recording media, respectively.

【0024】図2は、画像処理装置1の構成を示すブロ
ック図である。画像処理装置1は、CPU13、RAM
14およびROM15をバスラインに接続した一般的な
コンピュータシステムの構成となっている。バスライン
にはさらに、ディスプレイ12、操作者からの入力を受
け付けるキーボード111およびマウス112、データ
やプログラム等を保存する固定ディスク161、記録デ
ィスク91(光ディスク、磁気ディスク、光磁気ディス
ク等)との間で情報の受け渡しを行う読取装置162、
並びに、メモリカード92との間で情報の受け渡しを行
うカードスロット163が、適宜、インターフェイス
(I/F)を介する等して接続される。
FIG. 2 is a block diagram showing the configuration of the image processing apparatus 1. The image processing apparatus 1 includes a CPU 13, a RAM,
14 and a ROM 15 connected to a bus line. The bus line further includes a display 12, a keyboard 111 and a mouse 112 for receiving input from an operator, a fixed disk 161 for storing data and programs, and a recording disk 91 (optical disk, magnetic disk, magneto-optical disk, etc.). in reader 162 for transferring the information,
In addition, a card slot 163 that exchanges information with the memory card 92 is appropriately connected via an interface (I / F) or the like.

【0025】RAM14、固定ディスク161、読取装
置162およびカードスロット163は互いにデータの
受け渡しが可能とされており、CPU13の制御の下、
ディスプレイ12には各種情報やRAM14、固定ディ
スク161、メモリカード92等に記憶されいてる画像
の表示が可能とされる。
The RAM 14, fixed disk 161, reader 162, and card slot 163 can exchange data with each other.
The display 12 can display various information and images stored in the RAM 14, the fixed disk 161, the memory card 92, and the like.

【0026】図2に示すプログラム141は、記録ディ
スク91から読取装置162を介して固定ディスク16
1に記憶され、固定ディスク161からRAM14へと
転送されたものであり、CPU13による実行が可能と
される。
The program 141 shown in FIG. 2, fixed disk 16 via the reading device 162 from the recording disk 91
Stored in 1, has been transferred from the fixed disk 161 to the RAM 14, is it possible to execute by CPU 13.

【0027】図3は、CPU13がRAM14内のプロ
グラム141に従って動作することにより実現される機
能構成を他の構成とともに示す図である。図3に示す構
成のうち、表示制御部201、対象領域決定部202、
サイズ決定部203、特徴領域抽出部204、赤目領域
特定部205および補正部206が、CPU13等によ
り実現される機能を示す。
FIG. 3 is a diagram showing a functional configuration realized by the CPU 13 operating according to the program 141 in the RAM 14 together with other configurations. In the configuration shown in FIG. 3, the display control unit 201, the target area determination unit 202,
The size determining unit 203, the characteristic region extracting unit 204, the red-eye region specifying unit 205, and the correcting unit 206 indicate functions realized by the CPU 13 and the like.

【0028】表示制御部201は、画像データに基づい
てディスプレイ12上による画像の表示を制御する。対
象領域決定部202は、マウス112を介して画像デー
タ301が示す画像中の処理対象となる対象領域の決定
を使用者から受け付ける。サイズ決定部203は、対象
領域について後述する処理を行う単位となる単位領域の
大きさを決定する。
The display controller 201 controls the display of an image on the display 12 based on the image data. The target area determination unit 202 receives from the user via the mouse 112 a determination of a target area to be processed in the image indicated by the image data 301. The size determination unit 203 determines the size of a unit area that is a unit for performing a process described below for the target area.

【0029】特徴領域抽出部204は、対象領域に対し
て単位領域ごとの処理を行い、特徴量に応じて複数種類
の特徴領域を抽出する。なお、特徴量としては彩度、明
度および色相が用いられる。赤目領域特定部205は抽
出された複数の特徴領域のうち赤目領域を構成する特徴
領域を特定する。補正部206は特定された赤目領域に
対して色変換を行い、画像中の赤目を正常な色の目へと
補正する。補正後の画像のデータは補正済画像データ3
02としてRAM14に記憶される。
The characteristic region extracting section 204 performs a process for each unit region on the target region, and extracts a plurality of types of characteristic regions according to the characteristic amount. Note that saturation, lightness, and hue are used as the feature amounts. Eye region identification unit 205 identifies the characteristic region constituting the red region of the plurality of characteristic regions extracted. The correction unit 206 performs color conversion on the specified red-eye region, and corrects the red-eye in the image to a normal color eye. The corrected image data is the corrected image data 3
It is stored in the 02 as RAM14.

【0030】図4は、補正部206の機能構成を示すブ
ロック図である。補正部206は、赤目領域を構成する
特徴領域における特徴量のヒストグラムを生成するヒス
トグラム生成部211、赤目を補正するための補正曲線
を生成する補正曲線生成部212、補正曲線を用いて特
徴量を変換する変換部213、平滑化用のフィルタを生
成するフィルタ生成部214、および、補正後の赤目領
域の平滑化を行う平滑化部215を有する。これらの機
能の詳細については後述する。
FIG. 4 is a block diagram showing a functional configuration of the correction unit 206. The correction unit 206 includes a histogram generation unit 211 that generates a histogram of a feature amount in a feature region forming a red-eye region, a correction curve generation unit 212 that generates a correction curve for correcting red eye, and a feature amount using the correction curve. conversion unit 213 for converting the filter generation unit 214 for generating a filter for smoothing, and a smoothing unit 215 performs smoothing of the red-eye region after correction. Details of these functions will be described later.

【0031】図5ないし図7は、画像処理装置1が赤目
領域を特定して補正する際の動作の流れを示す図であ
る。以下、図3ないし図7を参照して画像処理装置1が
赤目に対する補正(以下、「赤目補正」という。)を行
う動作について説明する。
FIGS. 5 to 7 are diagrams showing the flow of operation when the image processing apparatus 1 specifies and corrects a red-eye area. Hereinafter, the operation of the image processing apparatus 1 for correcting red-eye (hereinafter, referred to as “red-eye correction”) will be described with reference to FIGS. 3 to 7.

【0032】まず、使用者がディスプレイ12を見なが
らキーボード111やマウス112を用いてメモリカー
ド92や固定ディスク161内の画像データのうち所望
のものを選択すると、選択された画像データ301がR
AM14に読み込まれるとともに表示制御部201が画
像データ301に基づいて画像をディスプレイ12に表
示する(ステップS11)。
First, when the user selects desired image data from the memory card 92 and the fixed disk 161 using the keyboard 111 and the mouse 112 while looking at the display 12, the selected image data 301
While being read by the AM 14, the display control unit 201 displays an image on the display 12 based on the image data 301 (step S11).

【0033】使用者は赤目補正が必要な領域をマウス1
12を用いて指定することにより、対象領域決定部20
2が演算対象となる対象領域を決定する(ステップS1
2)。具体的には、図8に示すように使用者が画像40
1中の対象領域402の対角の2点を指定することによ
り、1つの目に対応する赤目領域を含む対象領域402
が決定される。
The user uses the mouse 1 to specify the area where red-eye correction is required.
12, the target area determination unit 20
2 determines a target area to be calculated (step S1
2). Specifically, the user as shown in FIG. 8 is an image 40
By designating two diagonal points of the target area 402 in one, the target area 402 including the red-eye area corresponding to one eye
Is determined.

【0034】対象領域402が決定されると、サイズ決
定部203により、対象領域402の画素数N1とパラ
メータSとに基づいて、数1により単位領域の一辺の画
素数(以下、「単位領域サイズ」という。)n(単位領
域の大きさはn×nとされる。)が求められる(ステッ
プS13)。
When the target area 402 is determined, the size determining unit 203 determines the number of pixels on one side of the unit area (hereinafter referred to as “unit area size”) based on Equation 1 based on the number of pixels N1 and the parameter S of the target area 402. .) N (the size of the unit area is n × n) is obtained (step S13).

【0035】[0035]

【数1】 (Equation 1)

【0036】なお、パラメータSは画像401と対象領
域402との画素数の比を示す値であり、画像401の
画素数をN2とすると数2により定まるパラメータであ
る。
[0036] The parameter S is a value that indicates the ratio of the number of pixels of the image 401 and the target region 402, is the number of pixels of the image 401 are parameters determined by the number 2 When N2.

【0037】[0037]

【数2】 (Equation 2)

【0038】また、関数Fは、パラメータSが小さいほ
ど出力する単位領域サイズnを小さくし、対象領域40
2の画素数N1が大きいほど出力する単位領域サイズn
を大きくする関数であり、例えば数3ないし数5のよう
な入出力関係を有する関数である。
The function F is such that the smaller the parameter S is, the smaller the unit area size n to be output is.
The unit area size n to be output as the number N1 of pixels of pixel 2 is larger.
Is a function having an input / output relationship as shown in Equations 3 to 5, for example.

【0039】[0039]

【数3】 (Equation 3)

【0040】[0040]

【数4】 (Equation 4)

【0041】[0041]

【数5】 (Equation 5)

【0042】このような関数Fを用いて単位領域サイズ
を決定することにより、画像401に対する対象領域4
02の大きさの割合に応じた大きさの単位領域に対象領
域402を分割でき、その後は単位領域を単位として演
算を行うことにより、画素ごとに演算する場合に比べて
高速で、かつノイズの影響を受けにくい精度のよい赤目
領域の特定ができる。なお、nの最小値は1であり、そ
の場合、1つの単位領域は1画素となり、対象領域40
2は画素ごとに処理されることとなる。
[0042] By determining the unit area size by using such function F, the target area 4 to the image 401
02, the target area 402 can be divided into unit areas of a size corresponding to the ratio of the size of the target area 402, and thereafter, the calculation is performed in units of the unit area. A highly accurate red-eye area that is not easily affected can be specified. Note that the minimum value of n is 1, in which case one unit area is one pixel and the target area 40
2 will be processed for each pixel.

【0043】単位領域サイズnが決定されると、特徴領
域抽出部204は、対象領域402の各単位領域のRG
B値(平均のRGB値)をHSL表色系の色空間へと変
換して各単位領域の色相、彩度および明度を特徴量とし
て得る(ステップS14)。
When the unit region size n is determined, the characteristic region extraction unit 204 determines the RG of each unit region of the target region 402.
The B value (average RGB value) is converted into a color space of the HSL color system, and the hue, saturation, and lightness of each unit area are obtained as feature amounts (step S14).

【0044】次に、特徴領域抽出部204により、単位
領域の特徴量に基づいて瞳孔領域、虹彩領域および虹彩
外領域がそれぞれ特徴領域として対象領域402から抽
出される。具体的には、彩度および明度が一定の範囲に
ある領域(彩度、明度ともに低い範囲にある領域)が瞳
孔領域として抽出され、色相および彩度が一定の範囲に
ある領域(色相は赤からやや黄色、彩度は高い範囲にあ
る領域)が虹彩領域として抽出される。さらに、瞳孔領
域と同じ明度範囲であり、虹彩領域と同じ色相範囲の領
域が虹彩外領域として抽出される(ステップS15)。
Next, the pupil region, the iris region, and the extra-iris region are extracted from the target region 402 as characteristic regions by the characteristic region extracting unit 204 based on the characteristic amount of the unit region. Specifically, a region where the saturation and brightness are within a certain range (a region where both saturation and brightness are low) is extracted as a pupil region, and a region where hue and saturation are within a certain range (hue is red). (A region in which the color is slightly yellow and the saturation is in a high range) is extracted as an iris region. Further, a region having the same lightness range as the pupil region and the same hue range as the iris region is extracted as an extra-iris region (step S15).

【0045】なお、特徴量に基づいて補正対象となる特
徴領域を抽出することにより、後述の特徴量に基づく補
正が特徴領域ごとに適切に行うことが実現される。
By extracting a characteristic region to be corrected based on the characteristic amount, it is possible to appropriately perform the correction based on the characteristic amount described later for each characteristic region.

【0046】図9は、特徴領域抽出部204により、対
象領域402から抽出される特徴領域を例示する図であ
る。符号501は瞳孔領域、符号502a,502bは
虹彩領域、符号503は虹彩外領域を示す。赤目の状態
によっては、各種特徴領域は抽出されない場合もあれば
複数抽出される場合もある。
[0046] Figure 9 is a characteristic region extracting unit 204 is a diagram illustrating the characteristic region extracted from the target region 402. Reference numeral 501 denotes the pupil area, codes 502a, 502b are iris region, reference numeral 503 denotes an iris area outside. The state of red-eye, various features region is sometimes plurality extracted Some If not extracted.

【0047】各種特徴領域の抽出に用いられる特徴量の
範囲は、赤目現象の生じていない正常時の特徴量から定
められるものではなく、赤目現象が生じている場合の特
徴量から統計的に定められる。したがって、このような
特徴量に該当する各特徴領域は赤目現象の生じている可
能性がある領域として抽出されていることを意味する。
逆に、いずれの特徴領域としても抽出されなかった領域
は赤目補正が必要でない領域と判定されたこととなる。
The range of the feature value used for extracting various feature regions is not determined from the feature value in the normal state where the red-eye effect does not occur, but is statistically determined from the feature value in the case where the red-eye effect occurs. Can be Therefore, it means that each feature region corresponding to such a feature amount has been extracted as a region where the red-eye effect may occur.
Conversely, a region that is not extracted as any of the characteristic regions is determined to be a region that does not require red-eye correction.

【0048】次に、抽出された特徴領域から赤目補正に
適さない不要な領域が除外される(ステップS16)。
例えば、図9に示す特徴領域のうち、微小な虹彩領域5
02bは、誤って抽出された虹彩領域として補正対象か
ら除外される。また、各特徴領域の包含関係や接触の度
合いに基づいて、各特徴領域が補正対象となる領域とし
て適切か否かが改めて判断される。
Next, unnecessary regions that are not suitable for red-eye correction are excluded from the extracted characteristic regions (step S16).
For example, among the characteristic regions shown in FIG.
02b is excluded from the correction target as an iris region that is erroneously extracted. Further, based on the inclusion relation and the degree of contact of each characteristic region, it is determined again whether each characteristic region is appropriate as a region to be corrected.

【0049】具体例としては、虹彩外領域が虹彩領域の
周囲の大部分に接していない場合には虹彩外領域を補正
すると不自然な目になってしまうことから虹彩外領域が
補正すべきでない領域であると判定される。瞳孔領域と
虹彩領域との間に特徴領域以外の領域が存在する場合は
瞳孔領域周辺が赤目となっていない可能性があり、瞳孔
領域が補正すべきでない領域であると判定される。瞳孔
領域が虹彩領域に完全には含まれていない場合には適切
な補正が困難な状態であることからいずれの特徴領域も
補正すべきでないと判定される(この場合、赤目補正は
実行されない)。
As a specific example, when the extra-iris region does not touch most of the surroundings of the iris region, the extra-iris region should not be corrected since the extra-iris region will give an unnatural eye if corrected. it is determined to be region. If there is a region other than the feature region between the pupil region and the iris region may receive the peripheral pupil region is not a red-eye, it is determined that the region where the pupil region should not be corrected. Appropriate correction is determined not to be correct any of the feature region because it is difficult state when the pupil region is not included fully in the iris region (in this case, red-eye correction is not executed) .

【0050】赤目補正をすべき赤目領域を構成する少な
くとも1つの特徴領域が決定されると、次に、赤目領域
特定部205から特徴領域を示す情報および特徴量が補
正部206に入力され、赤目領域を構成する特徴領域ご
とに順次、赤目補正に係る処理が実行される。なお、以
下の処理は特徴領域の種類に依存することなく実行され
る。
When at least one characteristic region constituting the red-eye region to be subjected to the red-eye correction is determined, information indicating the characteristic region and the characteristic amount are input from the red-eye region specifying unit 205 to the correction unit 206, and the red-eye region is specified. sequentially for each feature region constituting the region, processing is executed according to the red-eye correction. Note that the following processing is executed without depending on the type of the characteristic region.

【0051】まず、補正部206において赤目領域に含
まれる一の特徴領域が処理対象(以下、「注目特徴領
域」という。)として決定される(ステップS21)。
そして、ヒストグラム生成部211(図4参照)が注目
特徴領域を構成する単位領域の数をカウントし、注目特
徴領域の大きさを単位領域のカウント数として求める。
First, the correction unit 206 determines one characteristic region included in the red-eye region as a processing target (hereinafter, referred to as a "target characteristic region") (step S21).
Then, the histogram generation unit 211 (see FIG. 4) counts the number of unit regions constituting the target feature region, and obtains the size of the target feature region as the count number of the unit region.

【0052】注目特徴領域の大きさが所定値以下の場合
には(ステップS22)、ヒストグラム生成部211か
らサイズ決定部203にその旨が伝達され、サイズ決定
部203が単位領域サイズをさらに小さく設定すること
により解像度を増大させ、ステップS14に戻る(ステ
ップS23)。これにより、再度抽出される特徴領域中
の単位領域数が増大され、後述のヒストグラムから得ら
れるパラメータの信頼性を向上することができる。その
結果、赤目補正の精度を向上することができる。
[0052] If the size of the target feature area is equal to or less than the predetermined value (step S22), and this fact is transmitted from the histogram generation unit 211 to the size determination unit 203, even smaller set size determination unit 203 to the unit area size By doing so, the resolution is increased, and the process returns to step S14 (step S23). This will increase the unit region number in the feature region is extracted again, it is possible to improve the reliability of parameters obtained from the histogram to be described later. As a result, the accuracy of red-eye correction can be improved.

【0053】なお、1つの単位領域が1画素である場合
には、サイズ決定部203により解像度を増大する処理
が対象領域402(または、注目特徴領域)に対して施
される。解像度を向上する処理(すなわち、画像を拡大
する処理)としては、直線補間法、キュービックコンボ
リューション補間法、Bスプライン補間法等が用いられ
る。これにより、再度抽出される特徴領域の画素数が増
大される。
When one unit area is one pixel, a process for increasing the resolution is performed on the target area 402 (or the feature area of interest) by the size determining unit 203. As a process for improving the resolution (that is, a process for enlarging an image), a linear interpolation method, a cubic convolution interpolation method, a B-spline interpolation method, or the like is used. As a result, the number of pixels of the feature region to be extracted again is increased.

【0054】次に、ヒストグラム生成部211により注
目特徴領域において処理対象となる特徴量(彩度、明度
および色相のいずれかであり、以下、「注目特徴量」と
いう。)が決定され(図6:ステップS31)、注目特
徴量の補正(ステップS32〜S35)および注目特徴
量に対する平滑化(ステップS42,S43)が実行さ
れる。
Next, the histogram generation unit 211 determines a feature amount to be processed in the feature region of interest (one of saturation, lightness, and hue; hereinafter, referred to as “feature feature amount”) (FIG. 6). : Step S31), correction of the feature amount of interest (Steps S32 to S35), and smoothing of the feature amount of interest (Steps S42 and S43).

【0055】注目特徴量の補正では、ヒストグラム生成
部211により注目特徴領域おける注目特徴量のヒスト
グラムが生成される(ステップS32)。すなわち、注
目特徴量の値とその値を有する単位領域の数との関係を
示すヒストグラムが生成される。
[0055] In the correction of the target feature amount is a histogram of the definitive target feature region noticeable feature quantity is generated by the histogram generation unit 211 (step S32). That is, a histogram showing a relationship between the value of the target feature amount and the number of unit regions having the value is generated.

【0056】単位領域を単位とする注目特徴量のヒスト
グラムが生成されると、補正曲線生成部212によりヒ
ストグラムから導かれる統計学的値であるパラメータが
求められ(ステップS33)、パラメータを用いて各単
位領域の注目特徴量の補正前の値と補正後の値との関係
を示す補正曲線が生成される(ステップS34)。その
後、変換部213により補正曲線を用いて各単位領域の
注目特徴量が変換される(ステップS35)。これによ
り、注目特徴領域における注目特徴量が補正される。
When the histogram of the feature amount of interest in units of unit areas is generated, the correction curve generation unit 212 obtains a parameter that is a statistical value derived from the histogram (step S33), and uses the parameter to obtain each parameter. A correction curve indicating the relationship between the pre-correction value and the post-correction value of the feature amount of interest in the unit area is generated (step S34). Thereafter, the conversion unit 213 converts the feature amount of interest of each unit area using the correction curve (step S35). Thereby, the feature amount of interest in the feature region of interest is corrected.

【0057】補正後の注目特徴量に対する平滑化は、注
目特徴量が彩度または明度の場合のみ実行され(ステッ
プS41)、補正により強調された彩度や明度のばらつ
き(2次元空間におけるばらつき)が平滑化により緩和
される。平滑化では、ヒストグラムから平滑化用の加重
係数が求められ(ステップS42)、単位領域の注目特
徴量が平滑化された値へと修正される(ステップS4
3)。これにより、特徴領域ごとに適切な度合いにて平
滑化が行われる。
The smoothing of the corrected feature amount is executed only when the feature amount is saturation or brightness (step S41), and the saturation or brightness variation emphasized by the correction (variation in a two-dimensional space). Is alleviated by smoothing. In the smoothing, a weighting coefficient for smoothing is obtained from the histogram (step S42), and the feature amount of interest in the unit area is corrected to a smoothed value (step S4).
3). Thereby, smoothing is performed to an appropriate degree for each characteristic region.

【0058】一の注目特徴量について補正および平滑化
が完了すると次の注目特徴量が決定され(ステップS4
4,S31)、再度、補正および平滑化が行われる。な
お、本実施の形態では色相に対する平滑化は省略される
ため、彩度および明度については補正および平滑化が行
われ、色相については補正のみが行われる。ただし、色
相に対して平滑化が行われるようにされてもよい。
[0058] The next noticeable feature quantity when the correction and smoothing is completed for the target feature amount one is determined (step S4
4, S31), correction and smoothing are performed again. Incidentally, since the present embodiment smoothing for hue it is omitted, the saturation and lightness correction and smoothing is performed, only the correction for the hue is conducted. However, the hue may be smoothed.

【0059】また、図6では補正の後に平滑化が行われ
るが、平滑化は補正の前に行われてもよい。この場合、
ステップS41〜S43とステップS34,S35とが
入れ替えられる。平滑化を補正の前に行う場合も補正に
より強調される彩度や明度のばらつきが緩和される。ま
た、補正前に平滑化を行うことにより、補正前に特徴領
域中のノイズを低減することができる。
Although the smoothing is performed after the correction in FIG. 6, the smoothing may be performed before the correction. in this case,
Steps S41 to S43 are replaced with steps S34 and S35. Variations in saturation and lightness to be emphasized is alleviated by the correction may perform smoothing prior to correction. Further, by performing the smoothing before the correction, the noise in the characteristic region can be reduced before the correction.

【0060】次に、補正に用いられる補正曲線および平
滑化についてさらに詳細に説明する。
Next, the correction curve used for correction and the smoothing will be described in more detail.

【0061】図10は彩度に関する補正曲線61を例示
する図である。図10において横軸は補正前の彩度(す
なわち、変換部213の入力)であり、縦軸は補正後の
彩度(すなわち、変換部213の出力)である。値XS
1は注目特徴領域における補正前の彩度の最小値であ
り、値XS3は補正前の彩度の最大値である。値XS2
は彩度の最頻値(最も多くの単位領域が有する彩度)で
ある。これらの値は彩度のヒストグラムから導出され
る。
FIG. 10 is a diagram exemplifying a correction curve 61 relating to saturation. In FIG. 10, the horizontal axis represents the saturation before correction (that is, the input of the conversion unit 213), and the vertical axis represents the saturation after correction (that is, the output of the conversion unit 213). Value XS
1 is the minimum value of the saturation before correction in the target feature area, the value XS3 is the maximum value of the previous saturation correction. Value XS2
Is the mode value of saturation (saturation of the most unit areas). These values are derived from the histogram of saturation.

【0062】図10において補正後の値YS1,YS
2,YS3は、それぞれ値XS1,XS2,XS3に対
応している。最小の彩度である値YS1は値XS1と等
しくされる。これにより、補正後の画像において赤目領
域の彩度が過度に減少してしまうことが防止される。
In FIG. 10, the corrected values YS1, YS
2, YS3 respectively correspond to the values XS1, XS2, XS3. The value YS1, which is the minimum saturation, is made equal to the value XS1. Accordingly, the saturation of the red-eye region will be excessively reduced can be prevented in an image after correction.

【0063】値YS3は数6にて示す関数FS3により
求められる。
The value YS3 is obtained by the function FS3 shown in Expression 6.

【0064】[0064]

【数6】 (Equation 6)

【0065】関数FS3は最大値XS3、および、彩度
のヒストグラムから求められる彩度の分散VSをパラメ
ータとし、分散VSが小さいほど値YS3を小さくする
特性を有する。すなわち、関数FS3は分散VSが小さ
いほど最大値XS3から大きな値ZS3を減算して値Y
S3を求める。
[0065] function FS3 maximum value XS3 and, by the variance VS of the saturation obtained from the histogram of saturation as a parameter has the property to reduce the higher value YS3 dispersion VS is small. That is, the function FS3 is obtained by subtracting the larger value ZS3 from the maximum value XS3 as the variance VS becomes smaller, and obtaining
Find S3.

【0066】赤目補正において彩度の最大値はなるべく
小さく抑えられることが好ましい。一方で、分散VSが
大きい場合に彩度の最大値を小さくしてしまうと注目特
徴領域の雰囲気が変化してしまうという問題が生じる。
そこで、関数FS3により彩度の補正曲線61は彩度の
分散が小さいほど彩度の最大値を減少させる特性を有す
るものとされる。
In the red-eye correction, it is preferable that the maximum value of the saturation is suppressed as small as possible. On the other hand, a problem that the atmosphere of interest, wherein the region and thus to reduce the maximum value of saturation when dispersed VS is greater is changed occurs.
Therefore, the saturation correction curve 61 has a characteristic of decreasing the maximum value of the saturation as the variance of the saturation is smaller by the function FS3.

【0067】なお、値YS3は値YS1以下となること
が許されないため、正確には関数FS3は値YS1(す
なわち、最小値XS1)も補助的なパラメータとして利
用する。
Since the value YS3 is not allowed to be lower than the value YS1, the function FS3 also uses the value YS1 (ie, the minimum value XS1) as an auxiliary parameter.

【0068】一方、値YS2は数7にて示す関数FS2
により求められる。なお、彩度の中間値(彩度の範囲の
およそ中間の値をいう。以下同様)の減少の度合いが最
頻値XS2を基準に決定されるのは、最頻値XS2近傍
にて彩度を大きく減少させることにより、彩度を減少さ
せるという赤目補正の目的を容易かつ的確に実現するこ
とができるからである。
On the other hand, the value YS2 is a function FS2
Required by The reason why the degree of decrease of the intermediate value of the saturation (meaning about the middle of the range of the saturation; the same applies hereinafter) is determined based on the mode XS2 is that the saturation near the mode XS2 is determined. Is greatly reduced, so that the purpose of red-eye correction of reducing the saturation can be easily and accurately realized.

【0069】[0069]

【数7】 (Equation 7)

【0070】関数FS2は最頻値XS2、および、彩度
のヒストグラムにおける最頻値近傍の分散VSMをパラ
メータとし、分散VSMが小さいほど値YS2は小さな
値とされる。すなわち、関数FS2は分散VSMが小さ
いほど最頻値XS2から大きな値ZS2を減算して値Y
S2を求める。なお、値YS2は値YS3と値YS1と
の間の値である必要があるため、関数FS3では値YS
3(または、値YS3を求めるための最大値XS3およ
び分散VS)および値YS1(すなわち、最小値XS
1)が補助的なパラメータとして利用される。
[0070] function FS2 is the mode XS2 and, to the dispersion VSM the mode near the histogram of saturation as a parameter, as the value YS2 dispersion VSM is small is a small value. That is, the function FS2 subtracts a large value ZS2 from the mode XS2 Smaller distributed VSM value Y
Find S2. Since the value YS2 must be a value between the values YS3 value YS1, the function FS3 value YS
3 (or the maximum value XS3 and the variance VS for obtaining the value YS3) and the value YS1 (ie, the minimum value XS
1) is used as an auxiliary parameter.

【0071】最頻値近傍の分散VSMが小さい場合、彩
度のヒストグラムは最頻値XS2近傍に集中したものに
なっている。したがって、分散VSMが小さい場合に値
YS2を小さな値とすることにより、彩度を減少させる
という赤目補正の効果を適切に得ることができる。一
方、分散VSMが大きい場合、彩度のヒストグラムは最
頻値XS2にさほど偏っていないため、値YS2を小さ
な値としても効率よく彩度を下げるという効果が期待で
きない。むしろ、彩度のむらを目立たせてしまうことと
なる。そこで、関数FS2では分散VSMが小さいほど
値XS2から大きな値を減算して値YS2を求めるよう
にしている。
When the variance VSM near the mode is small, the saturation histogram is concentrated around the mode XS2. Therefore, by setting the value YS2 to a small value when the variance VSM is small, it is possible to appropriately obtain the effect of the red-eye correction of reducing the saturation. On the other hand, when the variance VSM is large, the histogram of saturation is not biased so much in the mode XS2, the effect can not be expected that even lowering the efficiency saturation value YS2 as a small value. Rather, the unevenness in saturation will be noticeable. Therefore, in the function FS2, as the variance VSM is smaller, a larger value is subtracted from the value XS2 to obtain a value YS2.

【0072】なお、関数FS2により、最大値XS3と
最頻値XS2との差に基づいて値YS2が調整されても
よい。例えば、最大値XS3と最頻値XS2との差が小
さい場合には補正曲線61が過度に折れ曲がらないよう
に値YS2が若干大きくされてもよい。
The value YS2 may be adjusted by the function FS2 based on the difference between the maximum value XS3 and the mode XS2. For example, when the difference between the maximum value XS3 and the mode XS2 is small, the value YS2 may be slightly increased so that the correction curve 61 is not excessively bent.

【0073】以上のようにして値YS1,YS2,YS
3が決定されると、座標(XS1,YS1)、(XS
2,YS2)、(XS3,YS3)の3つの点を通る2
次曲線が彩度に関する補正曲線61として生成される。
なお、3つの点から他の手法により補正曲線61が求め
られてもよい。
As described above, the values YS1, YS2, YS
When 3 is determined, the coordinates (XS1, YS1), (XS
2, YS2), 2 passing through three points (XS3, YS3)
A next curve is generated as a correction curve 61 relating to saturation.
It may be required correction curve 61 by other methods from the three points.

【0074】図11は明度に関する補正曲線62を例示
する図である。図11において横軸は補正前の明度(す
なわち、変換部213の入力)であり、縦軸は補正後の
明度(すなわち、変換部213の出力)である。値XL
1は補正前の明度の最小値であり、値XL3は補正前の
明度の最大値である。値XL2は明度の最頻値である。
これらの値は明度のヒストグラムから導出される。
FIG. 11 is a diagram illustrating a correction curve 62 relating to lightness. The horizontal axis before correction lightness (i.e., the input of the conversion unit 213) in FIG. 11 is the vertical axis represents the brightness after correction (i.e., the output of the conversion unit 213). Value XL
1 is the minimum value of the brightness before correction, and the value XL3 is the maximum value of the brightness before correction. The value XL2 is the mode of lightness.
These values are derived from the brightness histogram.

【0075】図11においても図10と同様に、補正後
の値YL1,YL2,YL3は、それぞれ値XL1,X
L2,XL3に対応している。補正後の最小の明度であ
る値YL1は値XL1と等しくされ、最大の明度である
値YL3は値XL3と等しくされる。値YL1が値XL
1と等しくされるのは、補正後の画像において赤目領域
が黒くつぶれて不自然な目になってしまうことを防止す
るためであり、値YL3と値XL3とが等しくされるの
は、目の中に存在するいわゆるキャッチライト(照明が
反射されて明るくなっている領域)の消失を防止して補
正後の目を生き生きとしたものとするためである。
In FIG. 11, similarly to FIG. 10, the corrected values YL1, YL2, YL3 are the values XL1, XL, respectively.
It corresponds to the L2, XL3. The value YL1, which is the minimum lightness after correction, is made equal to the value XL1, and the value YL3, which is the maximum lightness, is made equal to the value XL3. Value YL1 value XL
The reason for making the value equal to 1 is to prevent the red-eye region from being blackened in the corrected image and causing unnatural eyes. so-called catch-light in order to to those alive eye corrected to prevent the loss of (illumination area which is bright and is reflected) present in the.

【0076】値YL2は数8にて示す関数FL2により
求められる。なお、明度の中間値の減少の度合いが最頻
値XL2を基準に決定されるのは、彩度の場合と同様
に、最頻値XL2近傍にて明度を大きく減少させること
により、明度を減少させるという赤目補正の目的を容易
かつ的確に実現するためである。
[0076] value YL2 is determined by function FL2 shown by the number 8. The reason why the degree of decrease in the intermediate value of the lightness is determined based on the mode XL2 is that the lightness is greatly reduced in the vicinity of the mode XL2 as in the case of the saturation, so that the lightness is reduced. This is to easily and accurately realize the purpose of red-eye correction.

【0077】[0077]

【数8】 (Equation 8)

【0078】関数FL2は最頻値XL2、および、明度
のヒストグラムの分散VLをパラメータとし、分散VL
が小さいほど値YS2は小さな値とされる。すなわち、
関数FL2は分散VLが小さいほど最頻値XL2から大
きな値ZL2を減算して値YL2を求める。なお、値Y
L2は値YL1以上である必要があるため、関数FL2
は値YL1(すなわち、最小値XL1)も補助的なパラ
メータとして利用する。
The function FL2 uses the mode XL2 and the variance VL of the brightness histogram as parameters, and uses the variance VL
Is smaller, the value YS2 is smaller. That is,
Function FL2 determine the value YL2 by subtracting a larger value ZL2 from the mode XL2 higher variance VL is small. Note that the value Y
Since L2 needs to be equal to or greater than the value YL1, the function FL2
Also uses the value YL1 (ie, the minimum value XL1) as an auxiliary parameter.

【0079】分散VLが大きい場合、注目特徴領域にお
いて様々な明度が存在しており、明度に関する強いグラ
デーションが存在すると想定される。典型例としては、
注目特徴領域に明度の異なる複数の小領域が存在してい
る状態が考えられる。そして、このような場合に値YL
2を小さな値としてしまうと、補正後の注目特徴領域内
において明度の異なる小領域の境界が明瞭になってしま
い、明度のむらが目立つことになる。
[0079] If the variance VL is large, there are various lightness in the current feature region is assumed that there is a strong gradient regarding lightness. A typical example is
It is conceivable that a plurality of small regions having different lightness exist in the feature region of interest. Then, the value YL in such a case
When 2 results in a small value, the boundary of the different small regions of lightness in the current feature region after correction becomes clear, so that the unevenness of brightness is conspicuous.

【0080】そこで、関数FL2は分散VLが小さい場
合にのみ値YL2を小さくする関数とされる。これによ
り、赤目補正により特徴領域内に段差のような模様が生
じることを防止しつつ可能な限り明度を小さくすること
が実現される。
Therefore, the function FL2 is a function that reduces the value YL2 only when the variance VL is small. As a result, it is possible to reduce the brightness as much as possible while preventing the occurrence of a pattern such as a step in the characteristic region due to the red-eye correction.

【0081】なお、関数FL2においても彩度の場合と
同様に、最大値XL3と最頻値XL2との差の大きさに
基づいて値YL2が調整されてもよい。
[0081] As in the case of saturation even function FL2, values YL2 based on the magnitude of the difference between the maximum value XL3 and the mode XL2 may be adjusted.

【0082】以上のようにして値YL1,YL2,YL
3が決定されると、座標(XL1,YL1)、(XL
2,YL2)、(XL3,YL3)の3つの点を通る2
次曲線が明度に関する補正曲線62として生成される。
これにより、明度の最小値および最大値を保持しつつ中
間値を減少させる補正曲線62が得られる。もちろん、
3つの点から他の手法により補正曲線62が求められて
もよい。
As described above, the values YL1, YL2, YL
When 3 is determined, the coordinates (XL1, YL1), (XL
2, YL2), 2 through three points (XL3, YL3)
The following curve is generated as a correction curve 62 relating to lightness.
As a result, a correction curve 62 that reduces the intermediate value while maintaining the minimum value and the maximum value of the brightness is obtained. of course,
The correction curve 62 may be obtained from the three points by another method.

【0083】図12は色相に関する補正曲線63を例示
する図である。図12において横軸は補正前の色相(す
なわち、変換部213の入力)であり、縦軸は補正後の
色相(すなわち、変換部213の出力)である。値XH
2は色相のヒストグラムの最頻値であり、値XH1と値
XH3との間の範囲は値XH2が示す色相と同色とみな
すことができる色相範囲である。ただし、注目特徴領域
内の色相は全て値XH1と値XH3との間の範囲に含ま
れるものとする。図12において補正後の値YH1,Y
H2,YH3はそれぞれ値XH1,XH2,XH3に対
応している。
FIG. 12 is a diagram illustrating a correction curve 63 relating to hue. The horizontal axis before correction hue (i.e., the input of the conversion unit 213) in FIG. 12 is the vertical axis represents the hue after correction (i.e., the output of the conversion unit 213). Value XH
Reference numeral 2 denotes a mode value of the hue histogram, and a range between the value XH1 and the value XH3 is a hue range that can be regarded as the same color as the hue indicated by the value XH2. However, the hue of the current feature within the region intended to be included within the scope between all values XH1 and values XH3. The corrected value in Fig. 12 YH1, Y
H2, YH3 corresponds to each value XH1, XH2, XH3.

【0084】なお、値XH1および値XH3は注目特徴
領域における補正前の色相範囲の一端および他端の値と
して決定されてもよい。
The values XH1 and XH3 may be determined as values at one end and the other end of the hue range before correction in the feature region of interest.

【0085】補正後の値YH1,YH2,YH3は予め
設定されており、茶色の虹彩の場合には茶色の範囲、青
色の虹彩の場合には青色の範囲に対応した値として設定
される。そして、座標(XH1,YH1)、(XH2,
YH2)、(XH3,YH3)の3つの点を通る2次曲
線が色相に関する補正曲線63として生成される。もち
ろん、3つの点から他の手法により補正曲線63が求め
られてもよい。
The corrected values YH1, YH2, and YH3 are set in advance, and are set as values corresponding to a brown range for a brown iris and a blue range for a blue iris. Then, the coordinates (XH1, YH1), (XH2,
YH2), secondary curve passing through three points (XH3, YH3) is generated as a correction curve 63 relating to hue. Of course, the correction curve 63 may be obtained from the three points by another method.

【0086】以上の手法で補正曲線63を生成すること
により、補正前の最頻値XH2を予め指定された値YH
2へと補正しつつ注目特徴領域の色相を適切な色相範囲
内の値へと補正することが実現される。
By generating the correction curve 63 by the above-described method, the mode XH2 before correction is changed to the value YH
It is realized that the hue of the feature region of interest is corrected to a value within an appropriate hue range while being corrected to 2.

【0087】次に、彩度および明度に対して行われる平
滑化用の加重係数の算出および平滑化について説明す
る。平滑化は処理対象となる単位領域の特徴量を周囲の
8個の単位領域の特徴量とともに重み付け平均して得ら
れる値へと変換する処理となっている。例えば、3×3
(=9)個の単位領域のいずれかの特徴量をCp(pは
単位領域の位置を示す。)とし、この単位領域に対する
加重係数をapとした場合、平滑化後の特徴量Cは数9
にて求められる。
Next, describing calculation and smoothing of the weighting coefficients for smoothing performed on the chroma and lightness. Smoothing is a process of converting to a value obtained by weighted average with the feature quantity of eight unit areas around the features of the unit areas to be processed. For example, 3 × 3
If any of the (= 9) unit areas has a feature amount C p (p indicates the position of the unit area) and a weighting coefficient for this unit area is a p , the smoothed feature amount C p number 9
Is required.

【0088】[0088]

【数9】 (Equation 9)

【0089】図13は平滑化の際に用いられるフィルタ
の加重係数を示す図である。図13に示すように処理対
象となる中央の単位領域の加重係数が1とされ、周囲の
単位領域の加重係数は1/Wとされる。ただし、値Wは
1以上の値であり、注目特徴量が彩度の場合には数10
により、明度の場合には数11により求められる。
FIG. 13 is a diagram showing weighting coefficients of a filter used for smoothing. As shown in FIG. 13, the weighting coefficient of the central unit area to be processed is set to 1, and the weighting coefficient of the surrounding unit area is set to 1 / W. However, the value W is a value of 1 or more, and when the feature amount of interest is saturation, the expression W
Thus, in the case of brightness, it is obtained by Expression 11.

【0090】[0090]

【数10】 (Equation 10)

【0091】[0091]

【数11】 [Equation 11]

【0092】彩度用の関数FWSは彩度の最頻値XS2
および分散VSをパラメータとし、これらのパラメータ
は彩度のヒストグラムから求められる。明度用の関数F
WLも明度の最頻値XL2および分散VLをパラメータ
とし、これらのパラメータは明度のヒストグラムから求
められる。
The function FWS for saturation is the mode value XS2 of saturation.
And dispersing VS as a parameter, these parameters are determined from the histogram of saturation. Function F for brightness
WL also the mode XL2 and dispersion VL brightness parameters, these parameters are determined from the histogram of lightness.

【0093】既述のように、特徴量の分散が大きい場
合、注目特徴領域において特徴量の異なる複数の小領域
が存在する可能性が高い。このような場合に赤目補正を
行うと小領域ごとの彩度や明度の相違が大きくなってし
まい、注目特徴領域内にむらが生じてしまう。そこで、
関数FWS,FWLはそれぞれ分散VS,VLが大きい
ほど平滑化の度合いが大きくなるように値Wを決定す
る。なお、値Wが1に近いほど平滑化の度合いは大きく
なる。
[0093] As described above, when the variance of the feature amount is large, it is likely that there are a plurality of small regions having different feature amounts in the current feature region. In such a case, if the red-eye correction is performed, the difference between the saturation and the lightness of each small region becomes large, and unevenness occurs in the feature region of interest. Therefore,
Function FWS, FWL each dispersion VS, the degree of more VL is large smoothing determine the value W to be larger. Incidentally, the degree as the smoothing value W is close to 1 is increased.

【0094】また、注目特徴領域において特徴量の異な
る複数の小領域が存在する場合、彩度や明度の最頻値X
S2,XL2が大きいほど補正後の彩度や明度の偏りが
顕著となることから、関数FWS,FWLはそれぞれ最
頻値XS2,XL2が大きいほど平滑化の度合いが大き
くなるように値Wを決定する。
When there are a plurality of small areas having different feature amounts in the feature area of interest, the mode X or saturation
The larger the S2 and XL2, the more pronounced the deviation of the saturation and lightness after correction. Therefore, the functions FWS and FWL determine the value W such that the larger the mode values XS2 and XL2, the greater the degree of smoothing. I do.

【0095】以上のように、分散および最頻値に基づい
て平滑化の度合いを決定することにより、各特徴領域の
特性に応じた適切な平滑化が実現される。
As described above, by determining the degree of smoothing based on the variance and the mode, appropriate smoothing according to the characteristics of each characteristic region is realized.

【0096】注目特徴領域に対する補正および必要な平
滑化が完了すると、未処理の特徴領域が存在するか否か
が確認され(図7:ステップS51)、未処理の特徴領
域が存在する場合には次の注目特徴領域が決定される
(図5:ステップS21)。その後、注目特徴領域の各
単位領域の彩度および明度に対して補正および平滑化が
行われ、色相に対して補正が行われる。
When the correction and the necessary smoothing for the feature region of interest are completed, it is confirmed whether or not an unprocessed feature region exists (FIG. 7: step S51). The next feature region of interest is determined (FIG. 5: step S21). Thereafter, correction and smoothing are performed on the saturation and brightness of each unit area of the feature region of interest, and correction is performed on the hue.

【0097】全ての特徴量領域に対して補正および平滑
化が行われると、補正後の特徴領域を有する対象領域4
02がHSL色空間からRGB色空間へと戻され、さら
に、画像データ301と合成されて補正済画像データ3
02としてRAM14に保存される(ステップS5
2)。補正済画像データ302は表示制御部201に転
送され、ディスプレイ12に赤目補正が施された画像が
表示される(ステップS53)。
When the correction and smoothing are performed on all the characteristic amount regions, the target region 4 having the corrected characteristic region is obtained.
02 is returned from the HSL color space to the RGB color space, and further combined with the image data 301 to correct the corrected image data 3
It is stored in 02 as RAM 14 (step S5
2). The corrected image data 302 is transferred to the display control unit 201, and an image on which red-eye correction has been performed is displayed on the display 12 (step S53).

【0098】以上、プログラム141に従って赤目補正
を行う画像処理装置1について説明したが、画像処理装
置1では補正対象である特徴領域における特徴量のヒス
トグラムを生成し、特徴量を補正するための補正曲線が
ヒストグラムに基づいて生成される。したがって、特徴
領域に対して特徴領域の特性に応じた補正を行うことが
実現される。また、補正前の特徴領域内の特徴量のグラ
デーションに応じて補正後の特徴領域内にグラデーショ
ンが生じるため、より自然な目へと補正を行うことがで
きる。その結果、様々な態様にて生じる赤目を適切に補
正することが実現される。
The image processing apparatus 1 for performing the red-eye correction according to the program 141 has been described above. The image processing apparatus 1 generates a histogram of the feature amount in the feature area to be corrected and corrects the correction curve for correcting the feature amount. Is generated based on the histogram. Therefore, it is possible to perform correction on the characteristic region according to the characteristics of the characteristic region. In addition, since a gradation occurs in the characteristic region after correction according to the gradation of the feature amount in the characteristic region before correction, correction can be made to a more natural eye. As a result, it is possible to appropriately correct red eyes that occur in various modes.

【0099】なお、特徴量として彩度、明度および色相
を利用することにより、補正曲線を求めるための関数の
設定を人の感性に基づいて容易に行うことができ、より
自然な補正済画像を得ることができる。
[0099] Incidentally, by using saturation, lightness and hue as the feature amount, can be easily performed based on the setting of the function for obtaining a correction curve to sensitive people, the more natural modified image Obtainable.

【0100】また、特徴領域の補正の後(または前)に
処理対象となる特徴領域に応じた平滑化を行うため、赤
目領域全体に適切な平滑化を行うことができる。さら
に、小さな特徴領域に対しては解像度を増大させた上で
補正を行うため、小さな特徴領域に対しても適切に補正
を行うことができる。
Also, after (or before) the correction of the characteristic region, the smoothing according to the characteristic region to be processed is performed, so that the entire red-eye region can be appropriately smoothed. Further, since the correction is performed after increasing the resolution for the small feature region, the correction can be appropriately performed even for the small feature region.

【0101】以上、本発明の一の実施の形態について説
明してきたが、本発明は上記実施の形態に限定されるも
のではなく様々な変形が可能である。
[0102] While there has been described one embodiment of the present invention, the present invention is susceptible to various modifications without being limited to the above embodiment.

【0102】上記実施の形態では特徴領域ごとに補正が
行われるが、例えば、近接する2つの虹彩領域が抽出さ
れた場合にはこれらの虹彩領域が1つの特徴領域として
扱われてもよい。他の種類の特徴領域についても同様で
ある。
[0102] Although in the above embodiment the correction for each feature region is performed, for example, these iris region when two iris region close is extracted may be treated as a feature region. The same applies to other types of characteristic regions.

【0103】また、ヒストグラムからパラメータを導き
出すと説明したが、特徴量の値と頻度との関係を示すヒ
ストグラムという概念はプログラム中に任意の態様にて
表現されてよい。例えば、複数の変数、配列、あるい
は、オブジェクトとしてヒストグラムを表現することが
できる。
[0103] Further, it is described that derive parameters from the histogram, the concept of a histogram showing the relationship between the feature quantity value and frequency may be expressed in any manner in the program. For example, a plurality of variables, arrays, or can be expressed histogram as an object.

【0104】色相については値YH1,YH2,YH3
は予め定められるものとして説明したが、これらの値は
関数を用いて求められてもよい。例えば、値YH1,Y
H2,YH3が、補正前の色相の範囲および最頻値、並
びに、補正後の最頻値等をパラメータとする関数により
求められてもよい。
For the hue, the values YH1, YH2, YH3
Has been described as being predetermined, but these values may be obtained using a function. For example, the values YH1, Y
H2 and YH3 may be obtained by a function using the hue range and mode before correction, the mode after correction, and the like as parameters.

【0105】上記実施の形態では補正曲線や平滑化用の
フィルタの生成に用いられるパラメータとして注目特徴
量の最大値、最頻値および分散が利用され、補助的に最
小値が用いられる例について説明したが、その他のパラ
メータが利用されてもよい。例えば、最頻値に代えて平
均値が利用されてもよく、中央値(メジアン)が利用さ
れてもよい。このように、ヒストグラムから導かれる統
計学的値を利用することにより、補正曲線および平滑化
用のフィルタの生成に必要なパラメータを容易に準備す
ることができる。
In the above-described embodiment, an example will be described in which the maximum value, the mode value, and the variance of the feature amount of interest are used as parameters used for generating a correction curve and a filter for smoothing, and the minimum value is used as an auxiliary. but was, other parameters may be used. For example, an average value may be used instead of the mode value, or a median value (median) may be used. As described above, by using the statistical value derived from the histogram, it is possible to easily prepare parameters necessary for generating a correction curve and a filter for smoothing.

【0106】また、上記実施の形態では特徴量として色
相、彩度および明度が用いられるが、L***、LU
V、XYZ等の表色系(色空間)における値が特徴量と
して利用されてもよく、RGBの値がそのまま特徴量と
されてもよい。なお、特徴量を補正することは最終的に
は画素値を補正することに相当する。
[0106] Further, the hue as the feature quantity in the above embodiment, although the saturation and lightness are used, L * a * b *, LU
A value in a color system (color space) such as V or XYZ may be used as a feature value, or an RGB value may be directly used as a feature value. Incidentally, correcting the characteristic amounts will eventually correspond to correct the pixel values.

【0107】平滑化も上記実施の形態とは異なる他の手
法が用いられてもよい。例えば、フィルタが5×5以上
であってもよく加重平均も4方向の隣接単位領域のみに
対して行われてもよい。
For smoothing, another method different from the above embodiment may be used. For example, the filter may be 5 × 5 or more, and the weighted average may be performed only on the adjacent unit areas in four directions.

【0108】一方、画像処理装置1における画像データ
の取得は、上記実施の形態のようにメモリカード92か
ら読み込まれるのではなく、例えば、ケーブル接続、通
信回線または無線等により画像処理装置1と他の装置と
が信号の送受信を行うことによって取得されてもよい。
画像処理装置1に撮像部を設けて画像のデータが取得さ
れてもよい。
On the other hand, the acquisition of image data in the image processing apparatus 1 is not performed by reading the image data from the memory card 92 as in the above-described embodiment. May be obtained by transmitting and receiving signals to and from the device.
The image processing device 1 may be provided with an imaging unit to acquire image data.

【0109】プログラム141はROM15に予め書き
込まれていてもよい。また、画像処理装置1では、一連
の画像処理が全てCPUによりソフトウェア的処理で実
行されているが、それらの処理の一部または全部を専用
の回路により実現することも可能である。特に、反復演
算をロジック回路にて実行することにより、迅速な画像
処理が実現される。
The program 141 may be written in the ROM 15 in advance. Further, in the image processing apparatus 1, a series of image processing is all executed by software processing by the CPU, but a part or all of the processing can be realized by a dedicated circuit. In particular, rapid image processing is realized by executing the repetitive operation in the logic circuit.

【0110】上記実施の形態では、対象領域402の形
状を長方形としたがこれに限られるものではない。例え
ば、楕円形状や使用者が任意に指定する形状等であって
もよい。さらに、上記の実施の形態では、対象領域40
2は使用者によって指定されたが、画像認識または特徴
量による判定等により自動的に対象領域402が決定さ
れてもよい。
In the above embodiment, the shape of the target area 402 is rectangular, but the present invention is not limited to this. For example, the shape may be an elliptical shape or a shape arbitrarily designated by a user. Further, in the above embodiment, the target area 40
2 is designated by the user, automatically target region 402 by the determination and the like by the image recognition or feature amount may be determined.

【0111】[0111]

【発明の効果】請求項1ないし9、並びに、請求項14
の発明では、補正対象領域に対して補正対象領域の特性
に適した補正を行うことができ、様々な態様にて生じる
赤目を適切に補正することが実現される。
According to the present invention, claims 1 to 9 and claim 14 are provided.
In the invention, the correction target region with respect to the correction suitable for the characteristic of the correction target region can be performed is realized is possible to appropriately correct the red-eye caused by various aspects.

【0112】また、請求項2の発明では、補正に適した
補正対象領域を抽出することができ、請求項3の発明で
は、複数の補正対象領域のそれぞれに適切な補正を行う
ことができる。
According to the second aspect of the present invention, a correction target area suitable for correction can be extracted. According to the third aspect of the present invention, appropriate correction can be performed for each of a plurality of correction target areas.

【0113】また、請求項4の発明では、補正曲線の生
成に用いられるパラメータを容易に準備することができ
る。
According to the fourth aspect of the present invention, parameters used for generating a correction curve can be easily prepared.

【0114】また、請求項5の発明では、彩度の分散に
応じた適切な彩度の補正を行うことができ、請求項6の
発明では、いわゆるキャッチライトを補正後の画像に残
すことができる。
[0114] In the invention of claim 5, it is possible to correct the appropriate saturation in accordance with the dispersion of the saturation, the invention of claim 6, leaving a so-called catch-light to the image after the correction it can.

【0115】また、請求項7の発明では、効率よく彩度
または明度を減少させることができる。
[0115] In the invention of claim 7, it can be reduced efficiently saturation or lightness.

【0116】また、請求項8の発明では、色相を適切に
補正することができる。
According to the eighth aspect of the present invention, the hue can be appropriately corrected.

【0117】また、請求項9の発明では、彩度、明度お
よび色相を基準に補正を行うことができる。
Further, according to the ninth aspect of the present invention, correction can be performed based on saturation, brightness and hue.

【0118】請求項10、11および15の発明では、
特徴領域に応じた平滑化を行うことにより、赤目領域全
体に対して適切な平滑化を行うことができる。
[0118] In the invention of claim 10, 11 and 15,
By performing smoothing corresponding to the feature region, it is possible to perform appropriate smoothing for the entire eye area.

【0119】また、請求項11の発明では、平滑化の度
合いを決定するパラメータを容易に準備することができ
る。
According to the eleventh aspect of the present invention, parameters for determining the degree of smoothing can be easily prepared.

【0120】請求項12および16の発明では、赤目補
正の精度を向上することができる。
According to the twelfth and sixteenth aspects, the accuracy of red-eye correction can be improved.

【図面の簡単な説明】[Brief description of the drawings]

【図1】画像処理装置の外観を示す図である。1 is a diagram showing an appearance of an image processing apparatus.

【図2】画像処理装置の構成を示すブロック図である。FIG. 2 is a block diagram illustrating a configuration of an image processing apparatus.

【図3】画像処理装置の機能構成を示すブロック図であ
る。
FIG. 3 is a block diagram illustrating a functional configuration of the image processing apparatus.

【図4】補正部の機能構成を示すブロック図である。FIG. 4 is a block diagram illustrating a functional configuration of a correction unit.

【図5】画像処理装置の動作の流れを示す図である。FIG. 5 is a diagram illustrating a flow of an operation of the image processing apparatus.

【図6】画像処理装置の動作の流れを示す図である。FIG. 6 is a diagram illustrating a flow of an operation of the image processing apparatus.

【図7】画像処理装置の動作の流れを示す図である。FIG. 7 is a diagram illustrating a flow of an operation of the image processing apparatus.

【図8】対象領域が指定された画像を例示する図であ
る。
FIG. 8 is a diagram exemplifying an image in which a target area is specified;

【図9】特徴領域を例示する図である。FIG. 9 is a diagram illustrating a characteristic region.

【図10】彩度に関する補正曲線を示す図である。FIG. 10 is a diagram showing a correction curve relating to saturation.

【図11】明度に関する補正曲線を示す図である。FIG. 11 is a diagram illustrating a correction curve relating to brightness.

【図12】色相に関する補正曲線を示す図である。12 is a diagram showing a correction curve for hue.

【図13】平滑化用のフィルタの加重係数を示す図であ
る。
FIG. 13 is a diagram illustrating weighting coefficients of a filter for smoothing.

【符号の説明】[Explanation of symbols]

1 画像処理装置 61〜63 補正曲線 91 記録ディスク 141 プログラム 501 瞳孔領域 502a 虹彩領域 503 虹彩外領域 S15,S21〜S23,S32〜S35,S42,S
43 ステップ
First image processing apparatus 61 to 63 correction curve 91 recorded disc 141 Program 501 pupil region 502a iris region 503 an iris area outside S15, S21~S23, S32~S35, S42, S
43 steps

───────────────────────────────────────────────────── フロントページの続き (51)Int.Cl.7 識別記号 FI テーマコート゛(参考) H04N 1/46 H04N 1/46 Z 5L096 Fターム(参考) 5B057 CA01 CA08 CA12 CA16 CB01 CB08 CB12 CB16 CC01 CE17 CH08 5C066 AA01 AA11 BA20 CA17 DD06 EA07 EB02 EC01 ED00 GA02 GA05 GA32 GA33 HA02 JA01 KA12 KC01 KD06 5C076 AA21 BA06 BB25 CB01 5C077 LL19 MP08 PP02 PP37 PP43 PP46 PP68 PQ08 PQ12 PQ18 PQ19 TT09 5C079 HB01 HB06 LA01 LA10 LA14 LA37 LB01 MA11 NA03 NA13 NA29 5L096 AA02 DA01 EA06 FA15 FA35 FA46 ────────────────────────────────────────────────── ─── of the front page continued (51) Int.Cl. 7 identification mark FI theme Court Bu (reference) H04N 1/46 H04N 1/46 Z 5L096 F-term (reference) 5B057 CA01 CA08 CA12 CA16 CB01 CB08 CB12 CB16 CC01 CE17 CH08 5C066 AA01 AA11 BA20 CA17 DD06 EA07 EB02 EC01 ED00 GA02 GA05 GA32 GA33 HA02 JA01 KA12 KC01 KD06 5C076 AA21 BA06 BB25 CB01 5C077 LL19 MP08 PP02 PP37 PP43 PP46 PP68 PQ08 PQ12 PQ18 PQ19 TT09 5C079 HB01 HB06 LA01 LA10 LA14 LA37 LB01 MA11 NA03 NA13 NA29 5L096 AA02 DA01 EA06 FA15 FA35 FA46

Claims (16)

【特許請求の範囲】[Claims] 【請求項1】 画像中の赤目を補正するプログラムであ
って、前記プログラムのコンピュータによる実行は、前
記コンピュータに、 赤目領域に含まれる補正対象領域において特徴量のヒス
トグラムを生成する工程と、 前記ヒストグラムから導かれるパラメータに基づいて補
正曲線を生成する工程と、 前記補正曲線に従って前記補正対象領域内の特徴量を補
正する工程と、を実行させることを特徴とするプログラ
ム。
1. A program for correcting red-eye in an image, wherein the computer-executed program causes the computer to generate a histogram of a feature amount in a correction target area included in a red-eye area; A step of generating a correction curve based on parameters derived from the following, and a step of correcting a feature amount in the correction target area according to the correction curve.
【請求項2】 請求項1に記載のプログラムであって、
前記プログラムの前記コンピュータによる実行は、前記
コンピュータに、 特徴量に基づいて画像から前記補正対象領域を抽出する
工程、をさらに実行させることを特徴とするプログラ
ム。
2. A program according to claim 1,
The program execution by the computer, the computer program characterized by further executing the step of extracting the correction target region from the image based on the feature quantity.
【請求項3】 請求項2に記載のプログラムであって、 前記画像から複数の補正対象領域が抽出され、前記複数
の補正対象領域のそれぞれについて前記ヒストグラムが
生成されることを特徴とするプログラム。
3. The program according to claim 2, wherein a plurality of correction target areas are extracted from the image, and the histogram is generated for each of the plurality of correction target areas.
【請求項4】 請求項1ないし3のいずれかに記載のプ
ログラムであって、 前記パラメータが、前記特徴量の最小値、最大値、最頻
値、平均値および分散のいずれかを含むことを特徴とす
るプログラム。
4. The program according to claim 1, wherein the parameter includes any one of a minimum value, a maximum value, a mode value, an average value, and a variance of the feature amount. program which is characterized.
【請求項5】 請求項4に記載のプログラムであって、 前記特徴量が彩度であり、前記補正曲線が、彩度の分散
が小さいほど彩度の最大値を減少させる特性を有するこ
とを特徴とするプログラム。
5. The program according to claim 4, wherein the feature quantity is saturation, and the correction curve has a characteristic that the maximum value of saturation decreases as the variance of saturation decreases. Features program.
【請求項6】 請求項4に記載のプログラムであって、 前記特徴量が明度であり、前記補正曲線が、明度の最大
値を保持しつつ明度の中間値を減少させる特性を有する
ことを特徴とするプログラム。
6. The program according to claim 4, said feature amount lightness, wherein the correction curve has a characteristic of reducing an intermediate value of brightness while maintaining maximum brightness And the program.
【請求項7】 請求項4に記載のプログラムであって、 前記特徴量が彩度または明度であり、前記補正曲線によ
る前記特徴量の中間値の減少の度合いが、前記特徴量の
最頻値を基準に決定されることを特徴とするプログラ
ム。
7. The program according to claim 4, wherein the feature amount is saturation or lightness, and a degree of decrease of an intermediate value of the feature amount by the correction curve is a mode value of the feature amount. A program characterized by being determined on the basis of:
【請求項8】 請求項4に記載のプログラムであって、 前記特徴量が色相であり、前記補正曲線が、色相の最頻
値を予め指定された値へと変換する曲線として求められ
ることを特徴とするプログラム。
8. The program according to claim 4, wherein the characteristic amount is a hue, and the correction curve is obtained as a curve for converting a mode value of the hue into a predetermined value. Features program.
【請求項9】 請求項1ないし4のいずれかに記載のプ
ログラムであって、 前記ヒストグラムが、特徴量である彩度、明度および色
相のそれぞれについて求められることを特徴とするプロ
グラム。
9. The program according to any one of claims 1 to 4, program the histogram, the saturation is a feature quantity, characterized in that it is determined for each of the brightness and hue.
【請求項10】 画像中の赤目を補正するプログラムで
あって、前記プログラムのコンピュータによる実行は、
前記コンピュータに、 特徴量に基づいて画像から赤目領域として抽出された複
数の特徴領域に対して赤目補正を行う工程と、 前記赤目補正を行う工程の前または後に、前記複数の特
徴領域のそれぞれに対して処理対象となる特徴領域に応
じた平滑化を行う工程と、を実行させることを特徴とす
るプログラム。
10. A program for correcting the red eye in the image, is performed by a computer of the program,
A step of performing red-eye correction on a plurality of feature areas extracted as a red-eye area from an image based on the feature amount; and before or after the step of performing the red-eye correction, And a step of performing smoothing according to the characteristic region to be processed.
【請求項11】 請求項10に記載のプログラムであっ
て、前記プログラムの前記コンピュータによる実行は、
前記コンピュータに、 前記複数の特徴領域のそれぞれに関する特徴量のヒスト
グラムを生成する工程と、 前記ヒストグラムから導かれるパラメータに基づいて前
記平滑化の度合いを決定する工程と、をさらに実行させ
ることを特徴とするプログラム。
11. The program according to claim 10, wherein the execution of the program by the computer is:
The computer further comprising: generating a histogram of a feature amount for each of the plurality of feature regions; and determining the degree of smoothing based on a parameter derived from the histogram. Program to do.
【請求項12】 画像中の赤目を補正するプログラムで
あって、前記プログラムのコンピュータによる実行は、
前記コンピュータに、 画像中の補正対象領域を決定する工程と、 前記補正対象領域の大きさと所定値とを比較する工程
と、 前記補正対象領域の大きさが前記所定値よりも小さい場
合に、前記補正対象領域の解像度を増大させる工程と、 前記補正対象領域に対して赤目補正を行う工程と、を実
行させることを特徴とするプログラム。
12. A program for correcting the red eye in the image, is performed by a computer of the program,
The computer, and determining a correction target region in an image, and comparing the size and the predetermined value of the correction target region, when the size of the correction target region is smaller than the predetermined value, the A program for executing a step of increasing the resolution of a correction target area and a step of performing red-eye correction on the correction target area.
【請求項13】 請求項1ないし12のいずれかに記載
のプログラムを記録したことを特徴とするコンピュータ
読み取り可能な記録媒体。
13. A computer-readable recording medium on which the program according to claim 1 is recorded.
【請求項14】 画像中の赤目を補正する赤目補正方法
であって、 赤目領域に含まれる補正対象領域において特徴量のヒス
トグラムを生成する工程と、 前記ヒストグラムから導かれるパラメータに基づいて補
正曲線を生成する工程と、 前記補正曲線に従って前記補正対象領域内の特徴量を補
正する工程と、を有することを特徴とする赤目補正方
法。
14. A red-eye correction method for correcting red-eye in an image, comprising: generating a histogram of a feature amount in a correction target region included in the red-eye region; and generating a correction curve based on a parameter derived from the histogram. A red-eye correction method, comprising: generating; and correcting a feature amount in the correction target area according to the correction curve.
【請求項15】 画像中の赤目を補正する赤目補正方法
であって、 特徴量に基づいて画像から赤目領域として抽出された複
数の特徴領域に対して赤目補正を行う工程と、 前記赤目補正を行う工程の前または後に、前記複数の特
徴領域のそれぞれに対して処理対象となる特徴領域に応
じた平滑化を行う工程と、を有することを特徴とする赤
目補正方法。
15. A red-eye correction method for correcting red-eye in an image, comprising the steps of: performing red-eye correction on a plurality of feature regions extracted from the image as red-eye regions based on a feature amount; red-eye correction method and performing before or after the step, and a step of performing corresponding smoothed in the characteristic region to be processed for each of said plurality of characteristic regions.
【請求項16】 画像中の赤目を補正する赤目補正方法
であって、 画像中の補正対象領域を決定する工程と、 前記補正対象領域の大きさと所定値とを比較する工程
と、 前記補正対象領域の大きさが前記所定値よりも小さい場
合に、前記補正対象領域の解像度を増大させる工程と、 前記補正対象領域に対して赤目補正を行う工程と、を有
することを特徴とする赤目補正方法。
16. A red-eye correction method for correcting red-eye in an image, comprising the steps of: determining a correction target area in the image; comparing the size of the correction target area with a predetermined value; A step of increasing the resolution of the correction target region when the size of the region is smaller than the predetermined value; and performing a red-eye correction on the correction target region. .
JP2001070140A 2001-03-13 2001-03-13 Program for correcting red eye in image, recording medium, and red eye correction method Expired - Fee Related JP4232345B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2001070140A JP4232345B2 (en) 2001-03-13 2001-03-13 Program for correcting red eye in image, recording medium, and red eye correction method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2001070140A JP4232345B2 (en) 2001-03-13 2001-03-13 Program for correcting red eye in image, recording medium, and red eye correction method

Related Child Applications (1)

Application Number Title Priority Date Filing Date
JP2008274141A Division JP4640490B2 (en) 2008-10-24 2008-10-24 Program for correcting red eye in image, recording medium, and red eye correction method

Publications (2)

Publication Number Publication Date
JP2002271808A true JP2002271808A (en) 2002-09-20
JP4232345B2 JP4232345B2 (en) 2009-03-04

Family

ID=18928062

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2001070140A Expired - Fee Related JP4232345B2 (en) 2001-03-13 2001-03-13 Program for correcting red eye in image, recording medium, and red eye correction method

Country Status (1)

Country Link
JP (1) JP4232345B2 (en)

Cited By (21)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7042505B1 (en) 1997-10-09 2006-05-09 Fotonation Ireland Ltd. Red-eye filter method and apparatus
JP2007074063A (en) * 2005-09-05 2007-03-22 Fuji Xerox Co Ltd Color processing apparatus and method
WO2008007461A1 (en) * 2006-07-10 2008-01-17 Nikon Corporation Image processing device and image processing program
US7352394B1 (en) 1997-10-09 2008-04-01 Fotonation Vision Limited Image modification based on red-eye filter analysis
JP2009017184A (en) * 2007-07-04 2009-01-22 Fujifilm Corp Digital camera, photographing method, and photographing program
JP2009124744A (en) * 2009-01-22 2009-06-04 Hitachi Ltd Video display device
US7580587B2 (en) 2004-06-29 2009-08-25 Canon Kabushiki Kaisha Device and method for correcting image including person area
US7738015B2 (en) 1997-10-09 2010-06-15 Fotonation Vision Limited Red-eye filter method and apparatus
US7852384B2 (en) 1997-10-09 2010-12-14 Fotonation Vision Limited Detecting red eye filter and apparatus using meta-data
US7865036B2 (en) 2005-11-18 2011-01-04 Tessera Technologies Ireland Limited Method and apparatus of correcting hybrid flash artifacts in digital images
US7869628B2 (en) 2005-11-18 2011-01-11 Tessera Technologies Ireland Limited Two stage detection for photographic eye artifacts
US7953252B2 (en) 2005-11-18 2011-05-31 Tessera Technologies Ireland Limited Two stage detection for photographic eye artifacts
US7962629B2 (en) 2005-06-17 2011-06-14 Tessera Technologies Ireland Limited Method for establishing a paired connection between media devices
US7965875B2 (en) 2006-06-12 2011-06-21 Tessera Technologies Ireland Limited Advances in extending the AAM techniques from grayscale to color images
US8055067B2 (en) 2007-01-18 2011-11-08 DigitalOptics Corporation Europe Limited Color segmentation
US8126217B2 (en) 2005-11-18 2012-02-28 DigitalOptics Corporation Europe Limited Two stage detection for photographic eye artifacts
US8126208B2 (en) 2003-06-26 2012-02-28 DigitalOptics Corporation Europe Limited Digital image processing using face detection information
US8233674B2 (en) 2007-03-05 2012-07-31 DigitalOptics Corporation Europe Limited Red eye false positive filtering using face location and orientation
US8265388B2 (en) 2004-10-28 2012-09-11 DigitalOptics Corporation Europe Limited Analyzing partial face regions for red-eye detection in acquired digital images
US8406514B2 (en) 2006-07-10 2013-03-26 Nikon Corporation Image processing device and recording medium storing image processing program
US8520093B2 (en) 2003-08-05 2013-08-27 DigitalOptics Corporation Europe Limited Face tracker and partial face tracker for red-eye filter method and apparatus

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4640490B2 (en) * 2008-10-24 2011-03-02 コニカミノルタビジネステクノロジーズ株式会社 Program for correcting red eye in image, recording medium, and red eye correction method

Cited By (35)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7619665B1 (en) 1997-10-09 2009-11-17 Fotonation Ireland Limited Red eye filter for in-camera digital image processing within a face of an acquired subject
US7042505B1 (en) 1997-10-09 2006-05-09 Fotonation Ireland Ltd. Red-eye filter method and apparatus
US7852384B2 (en) 1997-10-09 2010-12-14 Fotonation Vision Limited Detecting red eye filter and apparatus using meta-data
US7916190B1 (en) 1997-10-09 2011-03-29 Tessera Technologies Ireland Limited Red-eye filter method and apparatus
US7352394B1 (en) 1997-10-09 2008-04-01 Fotonation Vision Limited Image modification based on red-eye filter analysis
US8203621B2 (en) 1997-10-09 2012-06-19 DigitalOptics Corporation Europe Limited Red-eye filter method and apparatus
US7787022B2 (en) 1997-10-09 2010-08-31 Fotonation Vision Limited Red-eye filter method and apparatus
US7738015B2 (en) 1997-10-09 2010-06-15 Fotonation Vision Limited Red-eye filter method and apparatus
US8224108B2 (en) 2003-06-26 2012-07-17 DigitalOptics Corporation Europe Limited Digital image processing using face detection information
US8131016B2 (en) 2003-06-26 2012-03-06 DigitalOptics Corporation Europe Limited Digital image processing using face detection information
US8126208B2 (en) 2003-06-26 2012-02-28 DigitalOptics Corporation Europe Limited Digital image processing using face detection information
US8520093B2 (en) 2003-08-05 2013-08-27 DigitalOptics Corporation Europe Limited Face tracker and partial face tracker for red-eye filter method and apparatus
US7580587B2 (en) 2004-06-29 2009-08-25 Canon Kabushiki Kaisha Device and method for correcting image including person area
US8265388B2 (en) 2004-10-28 2012-09-11 DigitalOptics Corporation Europe Limited Analyzing partial face regions for red-eye detection in acquired digital images
US7962629B2 (en) 2005-06-17 2011-06-14 Tessera Technologies Ireland Limited Method for establishing a paired connection between media devices
JP2007074063A (en) * 2005-09-05 2007-03-22 Fuji Xerox Co Ltd Color processing apparatus and method
US7865036B2 (en) 2005-11-18 2011-01-04 Tessera Technologies Ireland Limited Method and apparatus of correcting hybrid flash artifacts in digital images
US8131021B2 (en) 2005-11-18 2012-03-06 DigitalOptics Corporation Europe Limited Two stage detection for photographic eye artifacts
US7970183B2 (en) 2005-11-18 2011-06-28 Tessera Technologies Ireland Limited Two stage detection for photographic eye artifacts
US7970184B2 (en) 2005-11-18 2011-06-28 Tessera Technologies Ireland Limited Two stage detection for photographic eye artifacts
US7953252B2 (en) 2005-11-18 2011-05-31 Tessera Technologies Ireland Limited Two stage detection for photographic eye artifacts
US8126218B2 (en) 2005-11-18 2012-02-28 DigitalOptics Corporation Europe Limited Two stage detection for photographic eye artifacts
US8180115B2 (en) 2005-11-18 2012-05-15 DigitalOptics Corporation Europe Limited Two stage detection for photographic eye artifacts
US8175342B2 (en) 2005-11-18 2012-05-08 DigitalOptics Corporation Europe Limited Two stage detection for photographic eye artifacts
US8126217B2 (en) 2005-11-18 2012-02-28 DigitalOptics Corporation Europe Limited Two stage detection for photographic eye artifacts
US7869628B2 (en) 2005-11-18 2011-01-11 Tessera Technologies Ireland Limited Two stage detection for photographic eye artifacts
US8160308B2 (en) 2005-11-18 2012-04-17 DigitalOptics Corporation Europe Limited Two stage detection for photographic eye artifacts
US7965875B2 (en) 2006-06-12 2011-06-21 Tessera Technologies Ireland Limited Advances in extending the AAM techniques from grayscale to color images
WO2008007461A1 (en) * 2006-07-10 2008-01-17 Nikon Corporation Image processing device and image processing program
US8406514B2 (en) 2006-07-10 2013-03-26 Nikon Corporation Image processing device and recording medium storing image processing program
JP2008020949A (en) * 2006-07-10 2008-01-31 Sapporo Medical Univ Image processing apparatus and image processing program
US8055067B2 (en) 2007-01-18 2011-11-08 DigitalOptics Corporation Europe Limited Color segmentation
US8233674B2 (en) 2007-03-05 2012-07-31 DigitalOptics Corporation Europe Limited Red eye false positive filtering using face location and orientation
JP2009017184A (en) * 2007-07-04 2009-01-22 Fujifilm Corp Digital camera, photographing method, and photographing program
JP2009124744A (en) * 2009-01-22 2009-06-04 Hitachi Ltd Video display device

Also Published As

Publication number Publication date
JP4232345B2 (en) 2009-03-04

Similar Documents

Publication Publication Date Title
JP4232345B2 (en) Program for correcting red eye in image, recording medium, and red eye correction method
US20220292658A1 (en) Image fusion method and apparatus, storage medium, and electronic device
US6728401B1 (en) Red-eye removal using color image processing
US7683973B2 (en) Image processing method and apparatus performing color adjustment
US6535301B1 (en) Image processing apparatus, image processing method, image processing program recording medium, color adjustment method, color adjustment device, and color adjustment control program recording medium
US9055263B2 (en) Apparatus, method and computer program for correcting an image using lookup tables generated by inputted image analysis
US7889250B2 (en) Image-acquisition apparatus
US20040184671A1 (en) Image processing device, image processing method, storage medium, and program
JP2002158893A (en) Device and method for correcting picture and recording medium
EP1139284B1 (en) Method and apparatus for performing local color correction
JP2003036438A (en) Program for specifying red-eye in image, recording medium, image processor and method for specifying red- eye
JP2001186325A (en) Method and device for processing picture, recording medium and transmitting medium
JP2000134486A (en) Image processing unit, image processing method and storage medium
US8369654B2 (en) Developing apparatus, developing method and computer program for developing processing for an undeveloped image
US20090268051A1 (en) Image processing apparatus, imaging apparatus, image processing method and program recording medium
JP4324044B2 (en) Image processing apparatus and method
JP2002281327A (en) Device, method and program for image processing
JPH118768A (en) Image processor, image processing method and medium recording image processing control program
JP2014168120A (en) Image processing apparatus, image processing program and electronic camera
JP2001045298A (en) Method for processing picture, recording medium recording picture processing program and picture processor
JP4640490B2 (en) Program for correcting red eye in image, recording medium, and red eye correction method
JP4355416B2 (en) Image processing apparatus and method
JPH10340332A (en) Image processor, image processing method and medium recording image processing control program
JP3927979B2 (en) Image processing apparatus and method
JP6403811B2 (en) Image processing apparatus and program

Legal Events

Date Code Title Description
A711 Notification of change in applicant

Free format text: JAPANESE INTERMEDIATE CODE: A712

Effective date: 20050614

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20050920

RD03 Notification of appointment of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7423

Effective date: 20051018

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20080822

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20080826

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20081024

RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20081024

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20081118

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20081201

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20111219

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20111219

Year of fee payment: 3

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20121219

Year of fee payment: 4

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20131219

Year of fee payment: 5

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313111

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

LAPS Cancellation because of no payment of annual fees