JP2001069334A - Method and device for processing photograph and recording medium - Google Patents

Method and device for processing photograph and recording medium

Info

Publication number
JP2001069334A
JP2001069334A JP23802999A JP23802999A JP2001069334A JP 2001069334 A JP2001069334 A JP 2001069334A JP 23802999 A JP23802999 A JP 23802999A JP 23802999 A JP23802999 A JP 23802999A JP 2001069334 A JP2001069334 A JP 2001069334A
Authority
JP
Japan
Prior art keywords
pupil
image
candidate
color
correction
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
JP23802999A
Other languages
Japanese (ja)
Inventor
Juichi Kuramoto
寿一 倉本
Minoru Uchida
内田  稔
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.)
TOYO JOHO SYST KK
Noritsu Koki Co Ltd
Original Assignee
TOYO JOHO SYST KK
Noritsu Koki 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 TOYO JOHO SYST KK, Noritsu Koki Co Ltd filed Critical TOYO JOHO SYST KK
Priority to JP23802999A priority Critical patent/JP2001069334A/en
Publication of JP2001069334A publication Critical patent/JP2001069334A/en
Withdrawn legal-status Critical Current

Links

Landscapes

  • Editing Of Facsimile Originals (AREA)
  • Color Image Communication Systems (AREA)

Abstract

PROBLEM TO BE SOLVED: To extract an area of a pupil for automatically correcting the area of the pupil without requiring skill by allowing a correcting process to include a step which executes each extracting processing corresponding to the kind of a color state of the pupil to generate a candidate of a pupil image at the time of designating the area including the pupil and specifies the pupil image form the respective displayed candidates of the pupil image. SOLUTION: A correcting process includes a step which executes each extracting processing corresponding to the kind of a color state of the pupil to generate a candidate of a pupil image at the time of designating an area including the pupil and specifies the pupil image from the respective displayed candidates of the pupil image. In this photograph processing device 1, when the area including the pupil is designated, a candidate preparing means 55 successively executes each extracting processing for extracting the candidate of the pupil corresponding to the color state of the pupil and prepares the candidates of the pupil image to display the respective candidates of the pupil image on an image display part 51. When the area including the pupil is designated and the area to be corrected is decided, a boundary area correction arithmetic means 56 varies the degree of mixing original data from the center of the corrected area to the boundary of the area in the corrected area.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、ディジタル画像の
自動補正ができる写真処理方法、写真処理装置及び記憶
媒体に関する。さらに詳しくは、銀塩写真処理露光機へ
のディジタル画像出力において、瞳を含む画像を、色分
解したディジタル画像の画像データに変換し、該画像デ
ータ中から瞳画像を抽出して特定したのち瞳画像を自然
な感じの色に補正する写真処理方法、写真処理装置及び
記憶媒体に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a photographic processing method, a photographic processing apparatus, and a storage medium capable of automatically correcting a digital image. More specifically, in digital image output to a silver halide photographic processing exposure machine, an image including a pupil is converted into image data of a color-separated digital image, a pupil image is extracted from the image data, and the pupil is identified. The present invention relates to a photographic processing method, a photographic processing device, and a storage medium for correcting an image to a natural color.

【0002】[0002]

【従来の技術】人物をカラー撮影する際、被写体周辺が
暗い場合等にフラッシュ等の閃光光源を用いると瞳孔部
分が赤く撮影されてしまうという、いわゆる赤目現象が
しばしば発生し、撮影した画像が不自然な画像となって
しまうことがある。これを避けるために、撮影レンズの
光軸とフラッシュの光軸とを接近させない撮影方法や、
撮影条件をフィルム等に記録し、該記録を利用して補正
する記録方法等が提案されている。
2. Description of the Related Art When a person is photographed in color, when a flash light source such as a flash is used when the periphery of a subject is dark or the like, the pupil is photographed in red. This may result in a natural image. In order to avoid this, there are shooting methods that do not bring the optical axis of the shooting lens close to the optical axis of the flash,
There has been proposed a recording method or the like in which shooting conditions are recorded on a film or the like and correction is performed using the recording.

【0003】また、撮影された画像をディジタル画像に
変換して色分解し、各色データを使用して補正すべき領
域を抽出して画像処理技術によって補正を行う方法もあ
る。即ち、例えば、いわゆるレタッチソフト等の画像処
理ソフトを用いて、撮影画像を表示画面に表示して赤目
の箇所を1画素ずつマウス等で補正するというものであ
る。
There is also a method in which a captured image is converted into a digital image, color-separated, a region to be corrected is extracted using each color data, and correction is performed by an image processing technique. That is, for example, using a so-called image processing software such as retouching software, a captured image is displayed on a display screen, and red eye portions are corrected pixel by pixel with a mouse or the like.

【0004】このように画像を補正する場合、オペレー
タが手作業で瞳を含む周辺部分をマウスやキーボード操
作によって大まかに指定する必要がある。そして、この
大まかに指定された領域から真の瞳領域を抽出して瞳の
色変換が行われる。
In correcting an image in this way, it is necessary for an operator to manually specify a peripheral portion including a pupil by operating a mouse or a keyboard. Then, a true pupil region is extracted from the roughly designated region, and pupil color conversion is performed.

【0005】この真の瞳領域を抽出する際、ディジタル
画像を自動的に又は機械的にデータ処理して抽出しよう
とすると、撮影時の種々の状況によって瞳領域の形状
や、瞳領域とその周辺領域との色のバランス等が種々多
様であるので、データ処理のアルゴリズムは、本来の瞳
領域を間違って抽出する場合がある。
When extracting the true pupil area by automatically or mechanically processing the data of the digital image and extracting the pupil area, the shape of the pupil area and the pupil area and its surroundings may vary depending on various situations at the time of photographing. Since the color balance with the region is various, the data processing algorithm may erroneously extract the original pupil region.

【0006】即ち、顔の地肌の色等は次のような要素が
互いに関連しているので、案外単純には処理できないの
である。まず、目尻は睫の影響で一般には黒く見える
が、地肌は赤味がかっているので目尻からは赤色を検出
し得る。眉毛は人種や個人差が生じており、黒色や金
色、白色もある。そして、肌の色も人種や個人差が生じ
ており、黒人の場合や陰影の強い場所での撮影の場合で
も肌の色が赤味を呈することがある。
In other words, the background color of the face cannot be simply processed unexpectedly because the following factors are related to each other. First, the outer corner of the eye generally looks black due to the effect of eyelashes, but the ground is reddish, so that red can be detected from the outer corner of the eye. Eyebrows have different races and individuals, and there are also black, gold, and white. The color of the skin also varies depending on the race or individual, and the color of the skin may be reddish even in the case of a black person or in the case of shooting in a place with a strong shadow.

【0007】この場合の赤味はかなり濃度や彩度が高い
ことがある。また、毛髪が目や眉毛にかかっていること
がある。さらに、特に彫りの深い顔立ちの人は目の周辺
の陰影がかなり濃い傾向がある。このように種々の要素
が絡んでいるので、いかに画素値からディジタルデータ
処理によって瞳を抽出するといっても、一様の処理では
さまざまな限界があるという問題があるのである。
[0007] In this case, the red tint sometimes has a considerably high density and saturation. Also, hair may be on eyes and eyebrows. In addition, the shadows around the eyes tend to be quite dark, especially for those with deeply carved features. Since various elements are involved as described above, even if a pupil is extracted from a pixel value by digital data processing, there is a problem that there are various limitations in uniform processing.

【0008】そして、本来の瞳領域を抽出できた場合で
も、抽出した瞳領域と、元の画像との境界にどうしても
ディジタルデータ処理特有の不自然な部分が生じてしま
うという画像処理技術上の問題もある。
[0008] Even when the original pupil region can be extracted, an unnatural part peculiar to digital data processing is inevitably generated at the boundary between the extracted pupil region and the original image. There is also.

【0009】[0009]

【発明が解決しようとする課題】本発明は、前述した問
題点に鑑みてなされたものであり、熟練を要することな
く、表示された画像のうち瞳領域を自動的に補正するた
め瞳領域を抽出する自動抽出の可能な写真処理方法、写
真処理装置及び記憶媒体を提供することを課題とする。
SUMMARY OF THE INVENTION The present invention has been made in view of the above-mentioned problems, and requires no skill to automatically correct a pupil region in a displayed image. An object of the present invention is to provide a photographic processing method, a photographic processing device, and a storage medium that can be automatically extracted.

【0010】[0010]

【課題を解決するための手段】前述した課題を解決すべ
く本発明者らが鋭意試験研究を行った結果、瞳の形状に
着目して瞳を抽出することは、安定した抽出結果を得る
ことが困難であるので、色及び濃度に着目し、それらの
性質が当然同じではないことから、統一的に処理するの
ではなく、各々の場合に対応して色及び濃度を使い分け
て瞳の抽出を行うことにしたものである。
Means for Solving the Problems As a result of the present inventors' earnest tests and researches to solve the above-mentioned problems, extracting the pupil by focusing on the shape of the pupil results in obtaining a stable extraction result. Because it is difficult to focus on colors and densities, and their properties are naturally not the same, instead of processing in a unified manner, pupil extraction is performed by using different colors and densities for each case. That is what we decided to do.

【0011】つまり、瞳の形状に関しては、詳細に分析
するならば、例えば、円形(瞳が瞼にかかっていない)、
半円形(いわゆる上目遣いのように、瞳の上半分等が隠
れている)、トラック型(笑っている顔等、瞳の上下が隠
れている)、扇型(目が左右何れかを見ているときなど、
扇形又は三角形に見える)等、種々の形状を呈するばか
りでなく、顔の表情、姿勢、視線によってまさに千変万
化しているのであり、これらの全ての場合に対して、従
来の単純な識別アルゴリズムでは有効に対処しきれるも
のではないのである。
That is, if the shape of the pupil is analyzed in detail, for example, a circular shape (the pupil does not cover the eyelid),
Semicircular (the upper half of the pupil is hidden, like a so-called upper eye), track type (laughing face, etc. Sometimes,
(It looks like a fan or a triangle.) It is not only presenting various shapes, but also changing completely depending on the facial expression, posture, and line of sight.In all of these cases, the conventional simple identification algorithm is effective. It is not something that can cope with.

【0012】以上の知見から本発明者らが採った手段と
して、本発明の請求項1記載の写真処理方法は、瞳を含
む画像を、色分解したディジタル画像の画像データに変
換し、該画像データ中から瞳画像を特定して瞳画像に対
して色等を補正する補正工程を含む写真処理方法におい
て、瞳を含む領域を指定したとき、瞳の色状態の種別に
対応した各抽出処理を順次行って瞳画像候補を作製し表
示した各瞳画像候補から瞳画像を特定する候補特定段階
を前記補正工程が含むことを特徴とする。
As a means taken by the present inventors based on the above findings, the photographic processing method according to claim 1 of the present invention converts an image including a pupil into image data of a color-separated digital image. In a photographic processing method including a correction step of specifying a pupil image from data and correcting a color or the like with respect to the pupil image, when a region including the pupil is designated, each extraction process corresponding to the type of the pupil color state is performed. The correction step includes a candidate specifying step of sequentially specifying a pupil image from each of the pupil image candidates generated and displayed.

【0013】該方法によれば、瞳の形状によらず、指定
した領域が瞼や白目を含んでいても、又は、地肌や睫等
の影響を有していても瞳部分を検出できる。
According to this method, the pupil portion can be detected regardless of the shape of the pupil, even if the designated area includes the eyelids and white eyes, or has the influence of the skin, eyelashes, and the like.

【0014】また、請求項2記載の写真処理方法は、前
記各抽出処理ごとに、判別分析法により閾値を決定し、
該閾値に従って画像データ中から瞳画像候補を得るの
で、最適な閾値を一義的且つ動的に決定できる。
Further, in the photographic processing method according to the present invention, a threshold value is determined by a discriminant analysis method for each of the extraction processes.
Since the pupil image candidates are obtained from the image data according to the threshold value, the optimal threshold value can be uniquely and dynamically determined.

【0015】請求項3記載の写真処理装置は、ディジタ
ル画像を表示する表示手段51と、ディジタル画像の画像
データと、該画像データを記憶する記憶手段54と、画像
中の任意の範囲を指定する指定手段52と、前記画像デー
タを画像化する変換処理を行う変換手段53とを具備し瞳
画像に対して色等を補正して写真を作製する写真処理装
置において、瞳を含む領域が指定されたとき、瞳の色状
態に対応した瞳画像候補が抽出される各抽出処理が順次
行われて瞳画像候補を作成して各瞳画像候補を表示させ
る候補作成手段55がさらに備えられてなることを特徴と
する。
According to a third aspect of the present invention, in the photographic processing apparatus, a display means 51 for displaying a digital image, image data of the digital image, a storage means 54 for storing the image data, and an arbitrary range in the image are designated. In a photo processing device that includes a designating unit 52 and a converting unit 53 that performs a conversion process for converting the image data into an image, and corrects a color or the like for a pupil image to produce a photograph, an area including a pupil is designated. In addition, candidate extraction means 55 for sequentially performing each extraction process for extracting a pupil image candidate corresponding to the pupil color state to create a pupil image candidate and displaying each pupil image candidate is further provided. It is characterized by.

【0016】該装置によれば、瞳色補正を行う際、複数
の瞳画像候補が容易に客観的に得られ、最適の瞳画像候
補から最適の瞳部分を選択するだけでよい。
According to the apparatus, when performing pupil color correction, a plurality of pupil image candidates can be easily and objectively obtained, and it is only necessary to select an optimum pupil portion from the optimum pupil image candidates.

【0017】請求項4記載の記憶媒体は、コンピュータ
によってディジタル画像の変換、抽出、候補画像作成、
色補正等を行って瞳画像の色補正を行うための制御プロ
グラムを記憶した記憶媒体であって、瞳を含む領域を指
定したとき、瞳の色状態の種別に対応した各抽出処理を
順次行って瞳画像候補を作製し表示した各瞳画像候補か
ら瞳画像を特定する特定段階の手続を含んでなることを
特徴とする。
According to a fourth aspect of the present invention, there is provided a storage medium, wherein a computer converts a digital image, extracts a digital image, creates a candidate image,
A storage medium storing a control program for performing color correction and the like to perform color correction of a pupil image. When a region including the pupil is designated, each extraction process corresponding to the type of the pupil color state is sequentially performed. A pupil image candidate is created and displayed, and a pupil image is identified from each pupil image candidate displayed.

【0018】該記憶媒体によれば、写真処理装置の機種
に適した記憶媒体を利用して特定段階を実行できる。
According to the storage medium, the specific step can be executed by using a storage medium suitable for the model of the photographic processing apparatus.

【0019】[0019]

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

【0020】本実施の形態は、人物の顔画像のうち瞳を
画像処理対象物として扱い、その色や濃度等を補正す
る。尚、人物の目のうち、いわゆる瞳孔及び虹彩を合わ
せて瞳とする。また、本実施の形態は、瞳の色の補正と
して、従来技術の項で説明した赤目の他、青目、金目等
の色等を補正する場合も含む。
In the present embodiment, the pupil of a person's face image is treated as an image processing object, and its color, density, and the like are corrected. Note that, among the eyes of a person, a so-called pupil and an iris are combined to form a pupil. In addition, the present embodiment also includes a case of correcting the color of the pupil, such as the color of the blue eye, the gold eye, and the like, in addition to the red eye described in the section of the related art.

【0021】図1は、本発明に係わる瞳画像を特定し補
正する自動補正システム(以下、「瞳画像自動補正シス
テム」という)を有する写真処理装置の構成を概略的に
示す構成説明図であり、図2は、主として画像データ処
理系統を概念的に示すブロック図である。
FIG. 1 is an explanatory view schematically showing the configuration of a photographic processing apparatus having an automatic correction system for specifying and correcting a pupil image according to the present invention (hereinafter referred to as an "automatic pupil image correction system"). FIG. 2 is a block diagram conceptually showing mainly an image data processing system.

【0022】本発明に係わる写真処理装置は、以下に詳
細に説明する画像処理部50を具備する他は、従来から知
られている銀塩写真方式による写真処理装置と同様に、
現像、定着、水洗及び乾燥等の種々の化学的処理又は物
理的処理を一連の工程で自動的に行う処理装置61や、カ
ラーネガ等のカラー画像の各画素を青(B)、緑(G)及び
赤(R)の3原色に分解測光するという色分解を行い、各
画素ごとに青、緑及び赤の各光強度を色信号として色ご
とに順番に読み出すためのカラースキャナ装置62、露光
データを写真感光材料に走査露光する露光装置部63等を
備えてなる写真処理部60や、電源等(図示せず)に接続
し、写真処理装置全体の操作制御を行う制御部70を具備
している。
The photographic processing apparatus according to the present invention is similar to a conventionally known photographic processing apparatus using a silver halide photographic method except that it has an image processing section 50 described in detail below.
Developing, fixing, rinsing and drying various chemical or physical processes such as drying and the like automatically in a series of steps processing device 61, and each pixel of a color image such as a color negative blue (B), green (G) A color scanner device 62 for performing color separation of three primary colors of red and red (R) and reading out the light intensities of blue, green and red for each pixel as a color signal in order for each color; A photographic processing unit 60 including an exposure device unit 63 for scanning and exposing the photographic photosensitive material to the photographic material, and a control unit 70 connected to a power supply or the like (not shown) for controlling the operation of the entire photographic processing device. I have.

【0023】そして、カラー画像の各画素ごとに色信号
をディジタル信号に変換したのち、後述するように、補
正すべき画像を抽出し、補正する補正工程において種々
の画像処理を行ったうえで、画像処理された画像データ
に基づいて露光データを決定し、この露光データを写真
感光材料40に走査露光する。このとき、写真感光材料40
はマガジン42から引き出され、ローラ43等によって露光
ポイント41まで搬送され、露光装置部51において露光さ
れる。こののち、通常の写真処理を行ってカラープリン
ト等を得る。以上のような写真処理装置1全体としての
操作は操作部70によって制御される。
Then, after converting the color signal into a digital signal for each pixel of the color image, an image to be corrected is extracted and various image processing is performed in a correction step of correcting the image as described later. Exposure data is determined based on the image data subjected to the image processing, and the exposure data is scanned and exposed on the photographic material 40. At this time, the photographic material 40
Is pulled out of the magazine 42, transported to the exposure point 41 by the rollers 43 and the like, and is exposed in the exposure device section 51. Thereafter, normal photographic processing is performed to obtain a color print or the like. The operation of the entire photographic processing apparatus 1 as described above is controlled by the operation unit 70.

【0024】前記処理装置61や、カラースキャナ装置6
2、露光装置部51等は従来知られた写真処理装置と同等
であるので、その説明を省略し、以下、本実施の形態に
係わる瞳画像自動補正システムを有する画像処理部50に
ついて説明する。
The processing device 61 and the color scanner device 6
2. Since the exposure device 51 and the like are equivalent to a conventionally known photographic processing device, a description thereof will be omitted, and the image processing unit 50 having the automatic pupil image correction system according to the present embodiment will be described below.

【0025】当該画像処理部50は、ディジタル画像を表
示する表示手段としての画像表示部51と、表示された画
像中の任意の領域を指定して抽出する指定手段52として
のマウスと、統計的演算処理や画像変換処理等を行うた
めの演算手段である変換手段53と、画像データ等を記憶
する記憶手段54である記憶部と、瞳を含む領域が指定さ
れたとき、瞳の色状態に対応した瞳候補を抽出させる各
抽出処理が順次行われて瞳画像候補を作成して各瞳画像
候補を表示させる候補作成手段55と、瞳を含む領域が指
定され、補正を行う補正領域が決定されたとき、補正領
域において補正領域の中央から補正領域の境界に向けて
元のデータを混合する度合を変える境界領域補正演算手
段56とを備えて構成され、写真処理装置1全体として操
作は制御部70によって制御される。
The image processing unit 50 includes an image display unit 51 as display means for displaying a digital image, a mouse as designating means 52 for designating and extracting an arbitrary area in the displayed image, A conversion unit 53, which is an arithmetic unit for performing an arithmetic process, an image conversion process, and the like; a storage unit, which is a storage unit 54 that stores image data and the like; Each extraction process for extracting a corresponding pupil candidate is sequentially performed to create a pupil image candidate and display each pupil image candidate, and a region including the pupil is designated, and a correction region to be corrected is determined. When the correction is performed, the correction area is provided with boundary area correction calculation means 56 for changing the degree of mixing of the original data from the center of the correction area toward the boundary of the correction area. Controlled by part 70 Is controlled.

【0026】本写真処理装置の特徴は、以下、瞳画像候
補の特定の要領、境界領域補正の要領を説明するなかで
明らかになるが、要約すれば、瞳画像を特定するに際し
て、所要の操作は、眼鏡程度の大きさの領域を指定する
だけで複数の瞳画像候補が容易に客観的(又は機械的に)
に得られ、瞳画像候補から最適の瞳部分を選択するだけ
でよいので、熟練を要することなく、最適の瞳画像候補
を選択するだけで、好適に且つ容易に瞳画像を特定して
補正等を行って写真を作製できる。
The features of the present photographic processing apparatus will be clarified in the following description of the specific procedure of the pupil image candidate and the procedure of the boundary region correction. Is easy to objectively (or mechanically) multiple pupil image candidates simply by specifying an area about the size of glasses
It is only necessary to select the optimum pupil part from the pupil image candidates, so that skill is not required, and only by selecting the optimum pupil image candidate, the pupil image can be suitably and easily specified and corrected. To make a photo.

【0027】また、本写真処理装置によれば、補正した
画像が元の画像と連続的であるという自然な感じの補正
画像を自動処理的に得ることができ、高度な職人技的な
熟練を要する作業を伴うことなく、閾値等のパラメータ
を調整でき、最適の補正画像を好適に且つ極めて容易に
決定してカラー写真を作製できる。
Further, according to the present photographic processing apparatus, a corrected image having a natural feeling that the corrected image is continuous with the original image can be obtained in an automatic processing, and a highly skilled craftsmanship can be obtained. A parameter such as a threshold value can be adjusted without a necessary operation, and an optimal corrected image can be suitably and extremely easily determined to produce a color photograph.

【0028】まず、画像表示部51は、ネガフィルムF等
の写真感光材料等に記録された画像情報をカラースキャ
ナ装置62等によってディジタルデータとして読み取った
画像データを画像表示するものであり、CRT又は液晶
表示装置、プラズマ表示装置等によって構成される。そ
して、画像表示部51に付随して、対象画像に関する統計
的演算処理や画像変換処理に関する追加的の指示や情報
の入出力が可能なインターフェイス57(キーボード等)を
設けている。
First, the image display section 51 displays image data obtained by reading image information recorded on a photographic material such as a negative film F as digital data by a color scanner 62 or the like. It is composed of a liquid crystal display device, a plasma display device and the like. Further, an interface 57 (keyboard or the like) capable of inputting / outputting additional instructions and information related to statistical calculation processing and image conversion processing for the target image is provided in association with the image display unit 51.

【0029】また、指定手段52としてのマウスは、画像
表示部51上の画像の任意の点又は領域を指定する機能を
有し、且つ、後述するように画像表示部51に作用する機
能を有するものである。同様の機能を有するものであれ
ば他の装置でもよく、いわゆるトラックボール等を用い
てもよい。
The mouse as the designating means 52 has a function of designating an arbitrary point or area of the image on the image display unit 51 and a function of acting on the image display unit 51 as described later. Things. Other devices having a similar function may be used, and a so-called trackball or the like may be used.

【0030】また、変換手段53は、種々の閾値やLUT
(luckup table)を発生させるための演算処理や、統計的
演算処理(例えば、判別分析法(後述))、特定された赤目
等に対する色補正等の画像変換処理等を行うための演算
処理の他、一般的に画像に対して行う調色(色、濃度)や
階調、拡大縮小、回転、反転、投影、陰影付与、合成、
分割等種々の画像処理を行うこともでき、種々の論理回
路や演算回路、レジスタ等によって構成される。
The conversion means 53 is provided with various thresholds and LUTs.
(lucky table), statistical processing (e.g., discriminant analysis (described later)), and image processing such as color correction for specified red-eye etc. , Toning (color, density), gradation, scaling, rotation, inversion, projection, shading, synthesis,
Various image processing such as division can be performed, and is constituted by various logic circuits, arithmetic circuits, registers, and the like.

【0031】また、記憶手段54は、本実施の形態に係わ
る閾値やLUTに関する所定のデータや、前記画像デー
タ等の演算処理途中のデータ、後述する候補特定段階及
び境界領域補正段階という瞳色補正に関するアルゴリズ
ムによるコンピュータプログラム等を記憶するものであ
り、RAM及びROM等によって低廉な装置コストで構
成される。このように、記憶手段54に、画像データ等を
記憶するので、通常の記憶手段等を用いて本実施の形態
に係わる瞳色自動補正を、低廉な装置コストで高速の自
動処理によって行うことができる。
The storage means 54 stores predetermined data relating to the threshold value and the LUT according to the present embodiment, data in the middle of the arithmetic processing of the image data and the like, and a pupil color correction called a candidate specifying step and a boundary area correcting step which will be described later. It stores a computer program or the like based on an algorithm related to the present invention, and is configured by a RAM and a ROM at a low device cost. As described above, since the image data and the like are stored in the storage unit 54, the pupil color automatic correction according to the present embodiment can be performed by high-speed automatic processing at low device cost by using a normal storage unit. it can.

【0032】そして、本発明に係わる候補作成手段55
は、瞳を含む領域が指定されたとき、瞳の色状態に対応
した瞳候補を抽出させる各抽出処理を順次行い、瞳画像
候補を作成して各瞳画像候補を画像表示部51に表示させ
るものであり、境界領域補正演算手段56は、瞳を含む領
域が指定され、補正を行う補正領域が決定されたとき、
補正領域において補正領域の中央から補正領域の境界に
向けて元のデータを混合する度合を変えるものである。
両者は何れも、種々の閾値やLUTを発生させるための
演算処理や、統計的演算処理、色補正等の画像変換処理
等を行うための演算処理を行うことができるように種々
の論理回路や演算回路、レジスタ等によって構成され
る。
Then, candidate creating means 55 according to the present invention
Performs an extraction process for sequentially extracting pupil candidates corresponding to the color state of the pupil when a region including the pupil is designated, creates a pupil image candidate, and displays each pupil image candidate on the image display unit 51 When the region including the pupil is specified and the correction region to be corrected is determined,
In the correction area, the degree of mixing the original data from the center of the correction area toward the boundary of the correction area is changed.
Both have various logic circuits and arithmetic circuits for performing arithmetic processing for generating various threshold values and LUTs, statistical arithmetic processing, image conversion processing such as color correction, and the like. It is composed of an arithmetic circuit, a register and the like.

【0033】尚、瞳画像を特定する特定段階での手続
(手順)及び境界領域補正段階での手続をコンピュータに
よって実行可能とした前記コンピュータプログラムはフ
ロッピーディスクやCD−R(compact disc-recordabl
e)、MO(magnet optical disc)等の記憶媒体に記憶さ
せて保管し、記憶手段54に搭載して利用することもで
き、本実施の形態に係わる写真処理装置とは別個に利用
することもできる。
A procedure in a specific stage for specifying a pupil image
(Procedure) and the computer program enabling the procedure in the boundary area correction step to be executed by a computer include a floppy disk and a CD-R (compact disc-recordabl).
e), can be stored and stored in a storage medium such as a MO (magnet optical disc), and can be used mounted on the storage means 54, and can be used separately from the photo processing device according to the present embodiment. it can.

【0034】この場合、写真処理装置の機種に適した記
憶媒体を利用して特定段階及び境界領域補正段階を実行
できる。さらには、該特定段階及び境界領域補正段階を
記憶させた記憶媒体の、他機種等への広汎な適用が可能
となる。
In this case, the specific step and the boundary area correcting step can be executed by using a storage medium suitable for the type of the photographic processing apparatus. Further, the storage medium storing the specific step and the boundary area correction step can be widely applied to other models and the like.

【0035】以下、図3〜図13に示したフローチャー
トを参照しつつ、本実施の形態に係わる画像処理部50に
よって行う瞳色自動補正システムによる補正工程のう
ち、瞳画像候補を特定する特定段階の実施要領について
説明する。この特定段階での手続は、主として、前記候
補作成手段55において演算処理される。
In the following, referring to the flowcharts shown in FIGS. 3 to 13, in the correction step of the automatic pupil color correction system performed by the image processing unit 50 according to the present embodiment, a specifying step of specifying a pupil image candidate The procedure for implementing will be described. The procedure at this specific stage is mainly processed by the candidate creating means 55.

【0036】本発明が対象とする瞳の色状態とは、いわ
ゆる赤目の他、黒目、青目、金目という状態があり、各
々の色彩的な特徴が異なるので、まずその特徴を説明
し、この特徴を反映して設定した抽出方法の原理を説明
する。このうち、赤目や金目は、ストロボ等外界の光を
反射する等、撮影の条件に関わるものであり、瞳孔又は
瞳全体が赤く見えるものを赤目といい、瞳孔又は瞳全体
が金色、輝度の高い白色に見えるものを金目という。ま
た、これらの色に赤、青、緑がかっているものをも含
む。尚、以下の説明では瞳画像(候補)を抽出すること
を、単に、瞳を抽出するという。
The pupil color states targeted by the present invention include so-called red eyes, black eyes, blue eyes, and gold eyes. Since the respective color characteristics are different, the characteristics will be described first. The principle of the extraction method set by reflecting the characteristics will be described. Among them, red eyes and gold eyes are related to shooting conditions, such as reflecting external light such as a strobe, and those in which the entire pupil or pupil looks red are called red eyes, and the entire pupil or pupil is golden and has high brightness. What looks white is called gold. In addition, these colors include those with red, blue, and green tints. In the following description, extracting a pupil image (candidate) is simply referred to as extracting a pupil.

【0037】まず、虹彩の色は人種や個人差により濃度
の濃い黒又は茶色(両者を併せて黒系統の目とし、黒系
統のうち赤目又は金目になっていない目を黒目とす
る)、或いは、濃度の薄い灰色、青色又は青緑色(三者を
併せて青系統の目とし、青系統の目のうち赤目又は金目
になっていない目を青目とする)に大別される。本発明
は、赤目のような撮影条件に関わる調色の問題だけでな
く、虹彩色のような生来的条件に関わる調色の問題の場
合も併せて、これらの瞳色を補正することを対象とす
る。
First, the color of the iris is black or brown with a high density depending on race or individual difference (both are combined as a black eye, and among the black systems, eyes which are not red or gold eyes are black eyes), Alternatively, they are roughly classified into light gray, blue, or blue-green (three are combined as blue eyes, and among the blue eyes, eyes that are not red-eye or gold-eye are blue eyes). The present invention is directed to correcting these pupil colors in addition to the problem of toning related to shooting conditions such as red eye, as well as the problem of toning related to natural conditions such as iris color. And

【0038】以下、各色傾向の目の特徴を各々説明す
る。但し、以下の説明において、キャッチライトは、よ
く知られているように、眼球上の一部に反射光が写って
いるものをいう。この写り方は、輝度、位置、サイズ、
形等の観点において、さまざまなものが認められる。
The features of the eyes of each color tendency will be described below. However, in the following description, as is well known, a catch light refers to a reflected light reflected on a part of the eyeball. This image is reflected in brightness, position, size,
Various things are recognized in terms of shape and the like.

【0039】さて、赤目の特徴は、以下の通りである。
即ち、 (i)瞳は瞳孔の赤色領域、キャッチライト、虹彩の3つ
に分けられることが多い。(ii)赤色領域ではR値は高
く、GB値は低い。 (iii)キャッチライトは無彩色か少し赤味がかってお
り、RGBが全体に高い。 (iv)虹彩は全体に無彩色か少し赤味がかっており、RG
B値は全体に低い。 (v)肌色よりは相対的に彩度が高い傾向にある。但し、
陰影の濃い箇所や黒人の肌は彩度が高い傾向にある。
The characteristics of red eyes are as follows.
That is, (i) the pupil is often divided into three regions: a red region of the pupil, a catchlight, and an iris. (ii) In the red region, the R value is high and the GB value is low. (iii) The catchlight is achromatic or slightly reddish, and has high RGB throughout. (iv) The iris is generally achromatic or slightly reddish, and RG
The B value is low overall. (v) Saturation tends to be relatively higher than flesh color. However,
Dark areas and black skin tend to be more saturated.

【0040】以上の(i)〜(v)の特徴から、赤目はR値と
彩度が高いこととなり、色相が赤で、彩度が高いという
傾向により他の領域と分離を行うことができる。
From the above features (i) to (v), the red eye has a high R value and high saturation, and can be separated from other regions by the tendency that the hue is red and the saturation is high. .

【0041】次に、青目の特徴は、以下の通りである。
即ち、 (i)瞳は瞳孔、キャッチライト、虹彩の3つに分けられ
ることが多い。 (ii)瞳孔のRGB値は全体に低い。 (iii)キャッチライトは無彩色に近くRGB値は全体に
高い。 (iv)虹彩はG値やB値が高く、R値は低い。 (v)青目は白人系なので瞳の周辺は白目や色白の肌(RG
B値が高い)に囲まれる傾向が高い。 以上の(i)〜(v)の特徴から、青目は、キャッチライト以
外は、周辺に比べてR値が全体に低いという傾向から他
の領域と分離できる。
Next, the features of blue eyes are as follows.
That is, (i) the pupil is often divided into three: a pupil, a catchlight, and an iris. (ii) The pupil RGB values are low overall. (iii) The catchlight is nearly achromatic and has high RGB values as a whole. (iv) The iris has a high G value or B value and a low R value. (v) Since the blue eyes are white, the periphery of the eyes is white or fair skin (RG
(The B value is high). From the above features (i) to (v), the blue eye can be separated from other regions except for the catchlight due to the tendency that the R value is generally lower than that of the surroundings.

【0042】次に、黒目の特徴は、以下の通りである。
即ち、 (i)瞳は瞳孔、キャッチライト、虹彩の3つに分かれる
ことが多い。 (ii)瞳孔、虹彩のRGB値は全体に低い。 (iii)キャッチライトは無彩色に近く、RGB値は全体
に高い。 以上の(i)〜(iii)の特徴から、G値が白目や肌とのコン
トラストが高く、画質が安定しており、G値をもって青
目を分離することができる。
Next, the features of the iris are as follows.
That is, (i) the pupil is often divided into the pupil, the catchlight, and the iris. (ii) The RGB values of the pupil and iris are low as a whole. (iii) The catchlight is almost achromatic and the RGB values are high overall. From the above features (i) to (iii), the G value has high contrast with the white eye and skin, the image quality is stable, and the blue eye can be separated using the G value.

【0043】次に、金目の特徴は、以下の通りである。
即ち、 (i)瞳は瞳孔、虹彩の2つに分かれることが多い。 (ii)瞳孔は、金目、白色、赤味、青味、緑味がさした場
合等さまざまな場合があり、RGB値のうちの何れか
は、かなり高い値を示す。 (iii)虹彩のRGB値は瞳孔より低い。 以上の(i)〜(iii)の特徴から、金目はRGB値のうちの
何れかは、高い値を有していることから金目を分離する
ことができる。
Next, the features of the gold eyes are as follows.
That is, (i) the pupil is often divided into a pupil and an iris. (ii) The pupil has various cases such as when the pupil is white, reddish, bluish, or greenish, and any one of the RGB values shows a considerably high value. (iii) The RGB values of the iris are lower than the pupil. From the features (i) to (iii) described above, any of the gold values of the gold values has a high value, so that the gold values can be separated.

【0044】以上説明した赤目や青目等の各々の色状態
に関する知見に基づいて瞳を抽出するため、以下のアル
ゴリズム(1)〜(8)を構成した。尚、このとき、瞳の色
と、顔の地肌の色等との関係によって、ディジタル画像
データ中から赤や青を抽出することは、前述したよう
に、一様には処理できないので、各色状態ごとにフロー
が異なることに注意すべきである。
The following algorithms (1) to (8) are configured to extract a pupil based on the knowledge about each color state such as red eye and blue eye described above. At this time, since red and blue are not uniformly extracted from digital image data depending on the relationship between the color of the pupil and the color of the background of the face, etc. It should be noted that the flow is different for each.

【0045】また、以上説明した各色の目の特徴の他、
一般的には、解像度によっては虹彩の放射状の構造まで
識別できたり、画像が小さい場合には、逆に、瞳孔と虹
彩との識別ができなかったりすることや、ピントがあま
いときには瞳と瞳以外の領域との判別がしにくいことも
考慮に入れてアルゴリズム(1)〜(7)を構成した。
In addition to the above-described eye characteristics of each color,
In general, depending on the resolution, the radial structure of the iris can be identified.If the image is small, on the contrary, the pupil and the iris cannot be identified. The algorithms (1) to (7) were configured taking into account that it is difficult to determine the region.

【0046】さて、本発明に係わる瞳を抽出するアルゴ
リズムにおいて、まず瞳の領域をマウス等により指定す
るが、瞳の領域の指定に関する要件として、サイズ指定
は、瞳に対して眼鏡程度の大きさの円形で指定し領域内
には少なくとも1つの瞳が含まれる(瞳の色は問わない)
ものとし、瞳の大きさは前記円に外接する正方領域の例
えば、4%以上あるものとする。
In the algorithm for extracting a pupil according to the present invention, the pupil region is first designated by a mouse or the like. Specify at least one pupil within the area (regardless of pupil color)
It is assumed that the size of the pupil is, for example, 4% or more of the square area circumscribing the circle.

【0047】以下、本発明に係わる瞳を抽出する全体フ
ローである瞳画像候補を特定する特定段階のアルゴリズ
ム(1)〜(7)を説明する。かかるアルゴリズムは、(1)
画像サイズ調整、(2)RGB分解、(3)R彩度画像によ
る赤目抽出、(4)R画像による青目抽出、(5)G画像に
よる黒目抽出、(6)RGB最大値画像による金目抽出、
(7)画像サイズ調整、の各段階からなる(7)までが全体
フローである。
Hereinafter, algorithms (1) to (7) in a specific stage for specifying a pupil image candidate, which is an overall flow for extracting a pupil according to the present invention, will be described. Such an algorithm is (1)
Image size adjustment, (2) RGB decomposition, (3) Red eye extraction using R saturation image, (4) Blue eye extraction using R image, (5) Black eye extraction using G image, (6) Gold eye extraction using RGB maximum value image ,
(7) Image size adjustment and each step up to (7) are the overall flow.

【0048】そして、この全体フロー(1)〜(7)中で、
各段階に共通に用いられる重要且つ特徴的なデータ処理
手法として、(A)判別分析法による閾値決定、(B)候補
探索、(C)特徴計算、(D)候補探索2、(E)クロージン
グ・オープニングというデータ処理手法が用いられる。
さらに、これらの全体フロー(1)〜(7)及びデータ処理
手法(A)〜(E)は、後述する(a)〜(h)のサブルーチン
を含んでいる。そこで、以下、全体フロー、重要なデー
タ処理手法(以下、処理手法という)、サブルーチンの順
に各々について説明する。
Then, in the overall flows (1) to (7),
Important and characteristic data processing methods commonly used in each stage include (A) threshold determination by discriminant analysis, (B) candidate search, (C) feature calculation, (D) candidate search 2, (E) closing -A data processing method called opening is used.
Further, these overall flows (1) to (7) and the data processing methods (A) to (E) include subroutines (a) to (h) described later. Therefore, the overall flow, important data processing methods (hereinafter, referred to as processing methods), and subroutines will be described in this order.

【0049】まず、図3は全体フローを示しており、全
体フローにおいて、ビット画像で表された候補画像と、
RGBカラー画像とが全体フローに入力されている。以
下、フローチャート中で、候補画像をcnd、RGBカラ
ー画像をrgbのように記載する。以下、特に断らない記
号は、従前の用法によるものとする。
First, FIG. 3 shows the overall flow, in which a candidate image represented by a bit image and
An RGB color image is input to the entire flow. Hereinafter, in the flowchart, the candidate image is described as cnd, and the RGB color image is described as rgb. In the following, symbols that are not otherwise specified are based on conventional usage.

【0050】(1)「画像サイズ調整」段階(段階1000、1
100、図3ではリサイズと表記)は、候補画像cndとRG
Bカラー画像rgbとに関し、指定された画像(ビット画
像)が、既定の閾値(例えば、150)よりも大きい場合に、
線形補間により縮小するものであり、候補画像は縮小さ
れた画像と同じサイズの画像領域を確保することで代用
している。他方、前記既定の閾値以下であれば、指定さ
れた画像がそのまま用いられる。
(1) “Image Size Adjustment” Step (Steps 1000 and 1)
100, denoted as resize in FIG. 3) is the candidate image cnd and RG
With respect to the B color image rgb, when the designated image (bit image) is larger than a predetermined threshold (for example, 150),
The reduction is performed by linear interpolation, and the candidate image is substituted by securing an image area of the same size as the reduced image. On the other hand, if it is equal to or less than the predetermined threshold, the specified image is used as it is.

【0051】(2)「RGB分解」(段階2000)は、前記指
定された画像が、全画素について、R、G、B各色ごと
の画像に分解される。色分解された画像を以下、各々
r、g、bと記載する。
(2) In "RGB separation" (step 2000), the specified image is separated into images for each of R, G, and B colors for all pixels. The color-separated images are shown below.
Described as r, g, b.

【0052】(3)「R彩度画像による赤目抽出」段階
(段階3000、及び図4)では、Rに対して「最大値フィル
タ(後述するサブルーチンの(b))」が、G及びBに対し
て「最小値フィルタ(同サブルーチンの(a))」が施され
る。よく知られているように、最大値フィルタは、明る
い部分を太くする処理であり、最小値フィルタは明るい
部分を細くする処理である。これらの処理で彩度が強調
された画像となり、次式[数1]により、赤の彩度画像
が生成される(赤彩度画像作成)。
(3) "Red eye extraction by R saturation image" stage
In (step 3000 and FIG. 4), the “maximum filter ((b) of the subroutine described later)” for R, and the “minimum filter ((a) of the subroutine)” for G and B Will be applied. As is well known, the maximum value filter is a process for thickening a bright portion, and the minimum value filter is a process for thinning a bright portion. An image in which the saturation is emphasized by these processes is generated, and a red saturation image is generated by the following equation (Formula 1) (red saturation image creation).

【0053】即ち、sを着目画素の彩度値、r、g、b
を着目画素のRGB値、g、bのうち、小さい方の値を
min、大きい方の値をmaxのようにそれぞれ表し、PERM
は、有彩度と判定するR値の閾値であり、例えば、50
を設定している。このとき、ビット演算(論理演算)の論
理和を「&」と書いて、画素ごとにPERMが、(PERM<r)&
&(max<r)に対しては、
That is, s is the saturation value of the pixel of interest, r, g, b
Is the smaller of the RGB values, g, and b of the pixel of interest.
min, the larger value is expressed as max, and PERM
Is a threshold value of the R value to be determined as chromatic, for example, 50
Is set. At this time, the logical sum of the bit operation (logical operation) is written as “&”, and the PERM is (PERM <r) &
For && (max <r),

【数1】s=100×(r−min)/(r+1)、 他の場合に対しては、s=0とする。S = 100 × (r−min) / (r + 1), s = 0 in other cases.

【0054】この赤彩度画像に対して、よく知られた
「判別分析法」により閾値が決定されるとともに、この
閾値を利用して、判定条件1及び判定条件2が設定さ
れ、瞳画像の候補が探索される「候補探索」が行われ
る。図4において、red がR彩度画像、bin1、bin2は2
値画像、min、max、dltはR彩度値の最小値、最大値、
増分をそれぞれ表わす。「候補探索」の詳細フローは図
8に示されている(後述)。
A threshold value is determined for this red saturation image by a well-known “discrimination analysis method”, and judgment conditions 1 and 2 are set using the threshold value, and a pupil image A “candidate search” for searching for a candidate is performed. In FIG. 4, red is an R saturation image, and bin1 and bin2 are 2
Value image, min, max, dlt are the minimum and maximum values of R saturation value,
Each represents an increment. The detailed flow of “candidate search” is shown in FIG. 8 (described later).

【0055】本「R彩度画像による赤目抽出」段階にお
いては、判別分析法を利用することによって、最適な閾
値を一義的且つ動的に決定できるのであり、主観的なパ
ラメータが介在することなく閾値を決定できる利点があ
る。
In the "red eye extraction using R-saturation image" stage, the optimal threshold can be uniquely and dynamically determined by using the discriminant analysis method without any subjective parameter. There is an advantage that the threshold can be determined.

【0056】(4)「R画像による青目抽出」段階(段階4
000、及び図5)では、R画像に対して「最小値フィル
タ」が施され、段階3000と同様、「判別分析法」により
閾値が決定されるとともに前記判定条件1及び判定条件
2により「候補探索」が行われる。
(4) “Blue Eye Extraction by R Image” Step (Step 4
000 and FIG. 5), the R image is subjected to the “minimum value filter”, and the threshold value is determined by the “discrimination analysis method” and the “candidate value” is determined by the determination conditions 1 and 2 as in step 3000. Search "is performed.

【0057】(5)「G画像による黒目抽出」(段階500
0、及び図6)段階では、G画像に対して「最小値フィル
タ」が施され、「判別分析法」により閾値が決定される
とともに前記判定条件1及び判定条件2により「候補探
索」が行われる。ここで、gは、G画像の意味である。
(5) “Eye extraction by G image” (step 500)
0 and FIG. 6), the G image is subjected to the “minimum filter”, the threshold is determined by the “discrimination analysis method”, and the “candidate search” is performed by the determination conditions 1 and 2. Will be Here, g means the G image.

【0058】(6)「RGB最大値画像による金目抽出」
(段階6000、図7)段階では、「RGB最大値フィルタ」
操作により着目画素値をその画素のRGB値の最大値で
置換える処理を行ったのち、「最大値フィルタ」を施
し、判定条件を決定したのち、「候補探索」が行われ、
瞳画像候補が存在していたとき、その瞳画像候補が登録
される。「RGB最大値フィルタ」は、着目画素の値を
RGBの最大値に置き換える。ここで、cthはRGB最
大値画像の意味である。
(6) "Gold extraction by RGB maximum value image"
(Step 6000, Fig. 7) In the step, "RGB maximum value filter"
After performing a process of replacing the pixel value of interest by the maximum value of the RGB value of the pixel by an operation, performing a “maximum value filter” and determining a determination condition, a “candidate search” is performed,
When a candidate pupil image exists, the candidate pupil image is registered. The “RGB maximum value filter” replaces the value of the pixel of interest with the maximum value of RGB. Here, cth means an RGB maximum value image.

【0059】次に、(7)「画像サイズ調整」(段階700
0、7100、図3ではリサイズと表記)が行われる。ここで
は、候補画像が、既定の閾値よりも大きい場合に、線形
補間により縮小するものとし、候補画像は縮小画像と同
じサイズの画像領域を確保することで代用している。他
方、既定の閾値以下であれば、候補画像がそのまま用い
られる。
Next, (7) “Image Size Adjustment” (Step 700)
0, 7100, which is denoted as resize in FIG. 3). Here, when the candidate image is larger than a predetermined threshold, the candidate image is reduced by linear interpolation, and the candidate image is substituted by securing an image area of the same size as the reduced image. On the other hand, if it is not more than the predetermined threshold, the candidate image is used as it is.

【0060】このようにして(1)〜(7)の段階を経て、
瞳画像候補が登録される。次に、重要なデータ処理手法
(A)〜(E)を説明する。
Thus, through the steps (1) to (7),
A pupil image candidate is registered. Next, important data processing methods
(A) to (E) will be described.

【0061】まず、前記段階(3)〜(6)における処理手
法(A)「判別分析法による閾値決定」(例えば段階3250)
を説明する。判別分析法に先立って、各画素の値のヒス
トグラムhistが作成される。このヒストグラムhistに対
して、ある値でヒストグラムを2群に分離するとき、分
離する値をヒストグラム全体にわたって動かしながら
(即ち、動的に)、群間分散と群内分散との比が最大にな
るときの値を閾値thとする。この比が、分離の良さを計
る評価関数であり、この評価関数を最大にするように閾
値thを求めるわけである。このよく知られた統計的手法
が判別分析法である。ここでは、ヒストグラムを物体と
背景とに2分する最適な閾値thを動的に決定する。
First, the processing method (A) "determination of threshold value by discriminant analysis" in the above steps (3) to (6) (for example, step 3250)
Will be described. Prior to the discriminant analysis method, a histogram hist of the value of each pixel is created. For this histogram hist, when separating the histogram into two groups with a certain value, moving the value to be separated over the entire histogram
The value at which the ratio between the inter-group variance and the within-group variance becomes maximum (that is, dynamically) is set as the threshold th. This ratio is an evaluation function for measuring good separation, and the threshold th is determined so as to maximize this evaluation function. This well-known statistical method is a discriminant analysis method. Here, an optimum threshold th for dividing the histogram into two parts, the object and the background, is dynamically determined.

【0062】次に、前記段階(3)〜(6)における処理手
法(B)「候補探索」(段階3400、3500、4400、4500等、
図8)について説明する。「候補探索」では、赤目(又は
金目、本段落の記載においては括弧内は同時に読替)に
対しては、R彩度画像(又はRGB最大値画像)grayを入
力し、thとして彩度の最小値minを代入し、2値化計
算、「ラベリング」及び「特徴計算」を行ったのち、
「候補探索2」を行い、候補画像について、彩度の最大
値(又はRGB最大値の最大値)maxに対し、th≦maxの判
定を行う。
Next, the processing method (B) “candidate search” in the above steps (3) to (6) (steps 3400, 3500, 4400, 4500, etc.
FIG. 8) will be described. In the "candidate search", for red eyes (or gold eyes, the parentheses in this paragraph are replaced at the same time), input an R saturation image (or RGB maximum value image) gray, and set th as the minimum saturation After substituting the value min and performing the binarization calculation, “labeling” and “feature calculation”,
“Candidate search 2” is performed, and for the candidate image, a determination is made of th ≦ max with respect to the maximum value of the saturation (or the maximum value of the RGB maximum values) max.

【0063】ここで、2値化計算は、画素の座標をx、
yで表すと、R彩度画像(又はRGB最大値画像)grayに
対して、gray[x、y]<thのとき、bin[x、y]=0とし、gr
ay[x、y]≧thのとき、bin[x、y]=1とする。尚、フロ
ーチャート中、grayはR彩度画像、RGB最大値画像、
R画像又はG画像を表し、lblはラベリング画像(後述)
を表す。
Here, in the binarization calculation, the coordinates of the pixel are x,
When expressed as y, for the R saturation image (or RGB maximum value image) gray, when gray [x, y] <th, bin [x, y] = 0 and gr
When ay [x, y] ≧ th, bin [x, y] = 1. In the flowchart, gray is an R saturation image, an RGB maximum value image,
Represents an R image or a G image, and lbl is a labeling image (described later)
Represents

【0064】一方、青目(又は黒目、本段落の記載にお
いては括弧内は同時に読替)に対しては、図8のアルゴ
リズムと略同じアルゴリズムを適用する。図8のアルゴ
リズムと異なる点は、R画像(又はG画像)を入力したの
ち、thとして彩度の最大値maxを代入する点、2値化計
算を、gray[x、y]≧thのとき、bin[x、y]=0とし、gra
y[x、y]<thのとき、bin[x、y]=1とする点であり、
「ラベリング」及び「特徴計算」を行ったのち、「候補
探索2」を行う。但し、段階7810において、th≦max の
代わりに、min≦thの判定を行う点も赤目又は金目の場
合と異なる。
On the other hand, for blue eyes (or black eyes, the parentheses in this paragraph are replaced at the same time), substantially the same algorithm as the algorithm in FIG. 8 is applied. The difference from the algorithm of FIG. 8 is that after inputting the R image (or G image), the maximum value max of the saturation is substituted as th, and the binarization calculation is performed when gray [x, y] ≧ th. , Bin [x, y] = 0, and gra
When y [x, y] <th, bin [x, y] = 1.
After performing “labeling” and “feature calculation”, “candidate search 2” is performed. However, it is different from the case of red-eye or gold-eye in that the determination of min ≦ th is performed in step 7810 instead of th ≦ max.

【0065】ここで、「ラベリング」とは、いくつかの
かたまりの領域がある場合に、それらを区別するために
行う処理であり、2値化処理を受けた画像に対して、連
続した領域ごとに番号を付けて分離された対象物の切り
出しを行う。アルゴリズムは、サブルーチンの項におい
て説明する。
Here, the "labeling" is a process for distinguishing a plurality of clusters when there are some clusters. And cut out the separated object. The algorithm is described in the subroutine section.

【0066】次に、前記処理手法(B)「候補探索」にお
ける処理手法(C)「特徴計算」を説明する。「特徴計
算」(例えば、段階7450)では、後述する特徴条件のう
ち、特徴条件を満たすとき、ラベルの外接矩形及び半
径を計算し、特徴条件を満たすときラベルの密度を計
算し、特徴条件を満たすか否かを順に判定する。
Next, the processing method (C) “feature calculation” in the processing method (B) “candidate search” will be described. In the "feature calculation" (for example, step 7450), among the feature conditions described later, when the feature condition is satisfied, the circumscribed rectangle and radius of the label are calculated, and when the feature condition is satisfied, the density of the label is calculated. It is sequentially determined whether or not the condition is satisfied.

【0067】ここで、特徴条件は、ゴミ判定として行
うものであり、Pixel ≦ pixel、特徴条件もゴミ判定
として行うものであり、Smin ≦ cw×ch、特徴条件
は、位置及びサイズの判定として行うものであり、rmin
≦Rmin、且つ rmean≦Rmean、且つ rmax≦Rmax 且つ si
ze≦Smaxである。
Here, the characteristic condition is determined as dust determination, Pixel ≦ pixel, the characteristic condition is also determined as dust determination, Smin ≦ cw × ch, and the characteristic condition is determined as position and size. Stuff and rmin
≤Rmin, and rmean≤Rmean, and rmax≤Rmax and si
ze ≦ Smax.

【0068】但し、cw、chは外接矩形の幅、高さ、rmi
n、rmax、rmeanは、それぞれラベルの中心からの最小
値、最大値、平均距離、Rmin、Rmean、Rmaxは、それぞ
れラベルの最小半径、平均半径、最大半径の閾値、nlab
elはラベル数、densityはラベルの密度、Smin、Smax
は、それぞれラベル外接矩形最小サイズの閾値、ラベル
外接矩形最大サイズの閾値、Pixelはラベル画素数の閾
値、pixelはラベル画素数である。
Where cw and ch are the width, height, and rmi of the circumscribed rectangle.
n, rmax, rmean are the minimum, maximum, and average distances from the center of the label, respectively, Rmin, Rmean, and Rmax are the minimum, average, and maximum radius thresholds of the label, nlab, respectively.
el is the number of labels, density is the density of the label, Smin, Smax
Are the threshold of the label circumscribed rectangle minimum size, the threshold of the label circumscribed rectangle maximum size, Pixel is the threshold of the number of label pixels, and pixel is the number of label pixels.

【0069】次に、前記処理手法(B)「候補探索」にお
ける処理手法(D)「候補探索2」(例えば、段階7470、
図9、図10)では、赤目に対しては、特徴条件、
を満たすか否かを判定したのち、2値化し、穴埋め、構
造要素サイズ計算を行ったのち、「クロージング・オー
プニング」(段階7560、後述)処理し、いわゆるゴミ除去
を行う。そして、再度候補ラベルの特徴を再計算し、特
徴条件を満たすか否かを順に判定する。このうち、特
徴条件を満たすとき候補有りとする。
Next, the processing method (D) “candidate search 2” in the processing method (B) “candidate search” (for example, step 7470,
In FIG. 9 and FIG. 10), the feature condition,
After determining whether or not the above condition is satisfied, binarization, hole filling, and structural element size calculation are performed, and a “closing / opening” (step 7560, described later) process is performed, so-called dust removal is performed. Then, the feature of the candidate label is calculated again, and it is sequentially determined whether or not the feature condition is satisfied. Among these, when the feature condition is satisfied, it is determined that there is a candidate.

【0070】ここで、構造要素サイズσの計算は、cw≦
chのとき、σ=cw/2+1、ch<cwのとき、σ=ch/2
+1と計算するものである。また、特徴再計算は、外接
矩形の縦横比をrateと表し、cw≦chのとき、rate=10
0×cw/ch、ch<cwのとき、rate=100×ch/cwと計
算するものである。
Here, the calculation of the structure element size σ is performed by cw ≦
When ch, σ = cw / 2 + 1, and when ch <cw, σ = ch / 2
+1 is calculated. In the feature recalculation, the aspect ratio of the circumscribed rectangle is expressed as rate, and when cw ≦ ch, rate = 10
When 0 × cw / ch and ch <cw, rate = 100 × ch / cw is calculated.

【0071】そして、特徴条件は、次候補条件に関す
るものであり、「rminが最小の次候補ラベルあり」であ
り、特徴条件は、形状補正前の特徴判定において、rm
ean≦Rmean 且つ Density/5 ≦ densityであり、特徴条
件は、Smin≦cw×ch且つRate<rate 且つ Density≦de
nsityである。但し、Densityはラベル密度の閾値、Rate
はラベル外接矩形縦横比の閾値である。
The feature condition is related to the next candidate condition and is “there is a next candidate label with the smallest rmin”. The feature condition is rm in the feature determination before shape correction.
ean ≦ Rmean and Density / 5 ≦ density, and the feature condition is Smin ≦ cw × ch and Rate <rate and Density ≦ de
nsity. Where Density is the label density threshold, Rate
Is a threshold value of the label circumscribed rectangle aspect ratio.

【0072】赤目以外の目に対しては、赤目に対すると
同様のアルゴリズムを行いつつ、「クロージング・オー
プニング」の代わりに、「オープニング・クロージン
グ」(図10、段階7660)を行う。
For eyes other than the red eye, "opening closing" (FIG. 10, step 7660) is performed instead of "closing opening" while performing the same algorithm as for red eyes.

【0073】処理手法(D)「候補探索2」における前述
した処理手法(E)「クロージング・オープニング」や、
「オープニング・クロージング」は、2値画像に対して
「画像拡張」(後述)を行ったのち、「構造要素を作成」
(後述)したのち行う演算処理である。
Processing method (D) The above-mentioned processing method (E) “closing opening” in “candidate search 2”,
"Opening and Closing" is performed after "Image Expansion" (described later) is performed on the binary image, and then "Create Structural Element"
This is an arithmetic process performed after (described later).

【0074】まず、「クロージング」は、ディレーショ
ン(dilation)とエロージョン(erosion)とをこの順で行
い、「オープニング」は、この逆に、エロージョンとデ
ィレーションとをこの順で行う。そして、「クロージン
グ」や「オープニング」は、1つの画像から、もう1つ
の画像へと滑らかに変換させる画像処理技術手法として
行う演算処理である。
First, "closing" performs dilation and erosion in this order, and "opening" performs erosion and dilation in this order. “Closing” and “opening” are arithmetic processing performed as an image processing technique for smoothly converting one image to another image.

【0075】これらの「クロージング・オープニング」
や、「オープニング・クロージング」という演算は、い
わゆるモルフォロジー(morphology)演算のうち、ミンコ
フスキー(Minkovski)和によって定義される処理がディ
レーションであり、画像処理技術手法としての意味は、
「ずらし重ね(又は膨張)」に相当する。この処理を行う
と、小さな穴や入江状の画像は塞がれ、分離されていた
ものが繋がることがある。
These "closing opening"
Or, the operation called "opening and closing" is a so-called morphology (morphology) operation, the processing defined by the Minkovski sum is a relation, and the meaning as an image processing technique is:
This corresponds to “shifted overlap (or expansion)”. When this process is performed, small holes or cove-shaped images may be closed, and the separated images may be connected.

【0076】他方、ミンコフスキー差によって定義され
る処理が、エロージョンであり、「掻き取り(又は収
縮)」に相当する。この処理を行うと、狭い地峡状の画
像は分離され、細い半島状の画像は削られて失われる。
そして、画像内部に位置する穴形状は拡大したものとな
る。
On the other hand, the process defined by the Minkowski difference is erosion, which corresponds to “scraping (or shrinking)”. When this process is performed, the narrow isthmus-like image is separated, and the thin peninsula-like image is shaved and lost.
Then, the hole shape located inside the image is enlarged.

【0077】次に、前記構造要素は、指定サイズの円領
域を表す2値画像であり、画像拡張とは、この構造要素
を集合演算するに必要なだけ幅及び高さを広げるもので
ある。以上説明したような画像処理が行われたのち、画
像拡張が行われた部分以外の画像を切り出すように抽出
して出力する。
Next, the structuring element is a binary image representing a circular area of a designated size, and the image extension is to widen the width and height necessary for performing a set operation on this structuring element. After the image processing as described above is performed, the image is extracted and output so as to cut out the image other than the image expanded part.

【0078】次に、以下、各サブルーチンについて説明
する。 (a)最小値フィルタ(例えば、図4の段階3150)は、着目
画素の画素値をフィルタ内の最小値で置換えるものであ
り、フィルタサイズは例えば5×5である。最小値フィ
ルタは、着目画素周辺の輝度が低ければ(濃度が高けれ
ば)それに引きずられるように着目画素の輝度を低下さ
せる機能を有する。
Next, each subroutine will be described below. (a) The minimum value filter (for example, step 3150 in FIG. 4) replaces the pixel value of the target pixel with the minimum value in the filter, and the filter size is, for example, 5 × 5. The minimum value filter has a function of lowering the luminance of the target pixel so that the luminance around the target pixel is low (if the density is high) and dragged by the low luminance.

【0079】(b)最大値フィルタ(例えば、図4の段階31
00)は、着目画素の画素値をフィルタ内の最大値で置換
えるものであり、フィルタサイズは例えばRGB最大値
画像のみ5×5を用いており、他は、3×3を用いてい
る。最大値フィルタは、着目画素周辺の輝度が高ければ
(濃度が低ければ)それに引きずられるように着目画素の
輝度を上昇させる機能を有する。
(B) Maximum value filter (for example, step 31 in FIG. 4)
(00) replaces the pixel value of the pixel of interest with the maximum value in the filter. The filter size uses, for example, 5 × 5 only for the RGB maximum value image, and 3 × 3 for the others. The maximum value filter is used when the brightness around the pixel of interest is high.
It has the function of increasing the luminance of the pixel of interest so as to be dragged by it (if the density is low).

【0080】(c)候補登録では、ビットOR演算(論理
演算のOR)で瞳画像候補を追加登録する。そして、瞳
画像候補の全画素に対して変換を行う。
(C) In candidate registration, a pupil image candidate is additionally registered by a bit OR operation (OR of a logical operation). Then, conversion is performed on all pixels of the pupil image candidate.

【0081】(d)ヒストグラム作成は、全画素の座標値
に対してよく知られた計算アルゴリズムによって行う。
(D) The histogram is created by a well-known calculation algorithm for the coordinate values of all pixels.

【0082】(e)ラベリングでは、「8隣接」画素でラ
ベリングする。図11及び図12は、「8隣接」画素で
ラベリングするアルゴリズムのフローチャートを示す。
ここで、ラベリングする画素値は全て所定の上限値SUP
がセットされているものとし、ラベルの最大値はSUPま
で取り得るとする。尚、段階8859では、再帰呼出であっ
た場合、呼出元の段階へと戻るものとする。
(E) In the labeling, labeling is performed with “8 adjacent” pixels. 11 and 12 show flowcharts of an algorithm for labeling with “8 adjacent” pixels.
Here, all the pixel values to be labeled have a predetermined upper limit value SUP
Is set, and the maximum value of the label can take up to SUP. In step 8859, if the call is a recursive call, the process returns to the calling source stage.

【0083】(f)ラベル外接矩形計算は、指定ラベルの
外接矩形の計算を行う。指定ラベルを持つ画素位置のう
ちx、yそれぞれの最小値xmin、ymin、最大値xmax、ym
axを求めて次式で外接矩形の左上位置x0、y0と、幅w、
高さhを算出する。但し、x0=xmin、y0=ymin、w=xma
x−xmin+1、h=ymax−ymin+1である。
(F) In the label circumscribed rectangle calculation, the circumscribed rectangle of the designated label is calculated. The minimum value xmin, ymin and the maximum value xmax, ym of x and y of the pixel position having the designated label
ax is obtained and the upper left position x 0 , y 0 of the circumscribed rectangle and the width w,
Calculate the height h. Where x 0 = xmin, y 0 = ymin, w = xma
x−xmin + 1, h = ymax−ymin + 1.

【0084】(g)ラベル半径計算は、指定ラベルの画像
中心からの最小値rmin、最大値rmax、平均値rmeanを求
める。即ち、最初に画像の中心からの距離画像を作成
し、指定ラベルを持つ画素に対応する距離画像から最小
値、最大値、平均値を算出する。この平均値は距離の総
和を指定ラベルの画素数で除することによって計算す
る。
(G) In calculating the label radius, the minimum value rmin, the maximum value rmax, and the average value rmean of the designated label from the image center are obtained. That is, first, a distance image from the center of the image is created, and the minimum value, the maximum value, and the average value are calculated from the distance image corresponding to the pixel having the designated label. This average value is calculated by dividing the sum of the distances by the number of pixels of the designated label.

【0085】(h)穴埋めは、2値画像に対して、ラベリ
ングを利用して行っている。穴埋めは、図13に示した
アルゴリズムによって行う。段階9010の反転画像は、2
値画像のhighとlowとを反転した画像である。反転画像
の淵はhighにセットすることにより、ラベリングの際に
必ず淵に接する画像は同一ラベルで繋がることになる。
段階9050では、反転画像中から淵と同一ラベルを有する
画素を除去する。そして、段階9060では、反転画像でラ
ベルを有する画素位置と同じ位置にある元画素の値をhi
ghにセットする。尚、w、hを各々画像サイズ(幅、高さ)
とするとき、[0,y][w-1,y][x,0][x,h-1]を満た
す画素を、「画像の淵に接する」という。
(H) Filling is performed on a binary image using labeling. Fill-in-the-blank is performed by the algorithm shown in FIG. The inverted image of step 9010 is 2
This is an image obtained by inverting high and low of the value image. By setting the edge of the inverted image to high, images that are always in contact with the edge during labeling will be connected with the same label.
In step 9050, pixels having the same label as the edge are removed from the inverted image. Then, in step 9060, the value of the original pixel at the same position as the pixel position having the label in the inverted image is hi
Set to gh. In addition, w and h are each image size (width, height)
In this case, a pixel satisfying [0, y] [w-1, y] [x, 0] [x, h-1] is referred to as “touching the edge of the image”.

【0086】尚、以上説明した各段階、該各段階におけ
る各処理手法やサブルーチンにおいて適用する閾値や計
算式は瞳の色状態を好適に反映するために変更すること
ができる。
The thresholds and calculation formulas applied in each stage, each processing method and subroutine in each stage described above can be changed in order to appropriately reflect the color state of the pupil.

【0087】以上説明したように、本発明に係わる瞳色
自動補正システムによれば、瞳の形状によらず、指定し
た領域が瞼や白目を含んでいても、又は、地肌や睫等の
影響を有していても瞳部分を検出でき、高度な職人技的
な熟練を要する作業等を伴うことなく、瞳部分のみを極
めて高い確率で検出して本当に瞳であるか否かを決定で
きる。従って、写真処理の補正工程のうち候補特定工程
を大幅に合理的なものとできる利点がある。
As described above, according to the automatic pupil color correction system according to the present invention, regardless of the shape of the pupil, even if the designated area includes the eyelids and white eyes, or the influence of the background, eyelashes, etc. Pupil portion can be detected, and it is possible to determine whether or not the pupil is really a pupil by detecting only the pupil portion with an extremely high probability without involving any work requiring advanced craftsmanship. Therefore, there is an advantage that the candidate specifying step in the correction step of the photographic processing can be made considerably rational.

【0088】以上のようにして瞳画像候補が抽出され、
表示された瞳画像候補から瞳画像を特定する。このの
ち、この瞳画像候補に対して色補正等を行う。以下、図
14〜図19に示したフローチャートを参照しつつ、本
実施の形態に係わる画像処理部50によって行う瞳色自動
補正システムによる補正工程のうち、瞳画像候補に境界
領域補正を行う境界領域補正段階について説明する。こ
の境界領域補正段階での手続は、主として、前記境界領
域補正演算手段56において演算処理される。
The pupil image candidates are extracted as described above.
A pupil image is specified from the displayed pupil image candidates. Thereafter, color correction and the like are performed on the pupil image candidate. Hereinafter, referring to the flowcharts shown in FIGS. 14 to 19, in the correction process by the automatic pupil color correction system performed by the image processing unit 50 according to the present embodiment, the boundary region for performing the boundary region correction on the pupil image candidate The correction step will be described. The procedure in the boundary area correction stage is mainly processed by the boundary area correction calculation means 56.

【0089】本実施の形態においては、実際の補正を開
始する前に、抽出された瞳候補に対応して、予め設定さ
れた複数の補正形態のうちから何れかを選択できるもの
とする。このとき選択しなかった補正形態は、選択した
補正形態の処理が終了した後に別途選択して処理し、先
に選択した補正形態の処理結果と比較して、より好まし
い方に決定することもできる。
In the present embodiment, it is assumed that one of a plurality of preset correction modes can be selected corresponding to the extracted pupil candidates before the actual correction is started. At this time, the correction mode not selected may be separately selected and processed after the processing of the selected correction mode is completed, and may be determined to be more preferable by comparing with the processing result of the correction mode previously selected. .

【0090】まず、複数の補正形態のうち、境界領域処
理と濃度彩度調整処理とをあわせた処理形態を説明す
る。かかる処理における第1の工程は等高線画像の作
製であるが、これに先立ち、輝度最小値を算出する。輝
度dは、d=(r+g+b)/3により求める。
First, of a plurality of correction modes, a processing mode combining the boundary area processing and the density / saturation adjustment processing will be described. The first step in such processing is the production of a contour image, but prior to this, the minimum luminance value is calculated. The luminance d is obtained by d = (r + g + b) / 3.

【0091】但し、ここで、境界とは、抽出された瞳候
補画像の補正処理を行う領域と、行わない領域との境界
をいうものとし、前記r、g、bは各々、着目画素のR
GB値を用いる。
Here, the boundary means a boundary between an area where the extracted pupil candidate image is subjected to the correction processing and an area where the correction processing is not performed, and r, g, and b are each the R of the pixel of interest.
The GB value is used.

【0092】次に、等高線画像を作製する。本実施の形
態においては、等高線画像は、境界に接する画素には高
度1を割り振り、まだ高度を割り振っていない画素のう
ち、高度1に接するものに高度2を割り振る。以下、全
ての画素に高度を割り振り、抽出領域内の全画素に等高
線が割り当てられるまで計算を繰返すという、いわゆる
8隣接で、等高線画像を作製するものである。図14
は、この等高線画像を得るアルゴリズムを示しており、
このアルゴリズムに従って等高線画像を計算して作製す
る。
Next, a contour image is prepared. In the present embodiment, the contour image assigns an altitude of 1 to pixels in contact with the boundary, and assigns an altitude of 2 to pixels which have not been assigned an altitude yet, which are in contact with the altitude. Hereinafter, a contour image is created with so-called eight neighbors, in which altitudes are assigned to all pixels and the calculation is repeated until contour lines are assigned to all pixels in the extraction area. FIG.
Indicates the algorithm for obtaining this contour image,
A contour image is calculated and produced according to this algorithm.

【0093】図14のフローチャートにおいて、x、y
は座標、cntは等高線画像、cndは候補画像、bitは候補
ビット、&はビット演算を表す。ステップ2において、
w、hを各々画像サイズ(幅、高さ)とするとき、[0,y]
[w-1,y][x,0][x,h-1]を満たす画素を、「画像の
淵に接する」という。
In the flowchart of FIG. 14, x, y
Represents coordinates, cnt represents a contour image, cnd represents a candidate image, bit represents a candidate bit, and & represents a bit operation. In step 2,
When w and h are the image size (width, height) respectively, [0, y]
A pixel that satisfies [w-1, y] [x, 0] [x, h-1] is referred to as “touching the edge of the image”.

【0094】そして、この等高線画像に対して色等を補
正するが、高度が所定の一定値以上では無条件に補正
し、一定値未満であれば高度が小さい程、元のRGB値
に近くなるように混合度合を変えて値を混合して補正す
る。例えば、段階8040ではcnt[x,y]が画像の淵にあると
き、cnt[x,y]=1とし、段階8070ではcnt[x,y]が画像の
淵にあるときcnt[x,y]=levelとして段階8020〜8080を
繰返す。このように等高線高さに対応して、境界に近い
画素ほど元の色、輝度に近くなるように、即ち、領域の
境界で色や濃度が連続的に変化しているように補正す
る。このとき、連続的な変化となるように、等高線の高
さと色、輝度の変化との対応関係は、比例直線的であっ
てもよく、指数関数や高次曲線のような曲線的であって
もよい。
Then, the color and the like are corrected for the contour image. When the altitude is equal to or higher than a predetermined constant value, the correction is unconditionally performed. When the altitude is lower than the predetermined value, the lower the altitude, the closer to the original RGB value. The values are mixed and corrected by changing the degree of mixing as described above. For example, in step 8040, when cnt [x, y] is at the edge of the image, cnt [x, y] = 1, and in step 8070, when cnt [x, y] is at the edge of the image, cnt [x, y] ] = Level and repeat steps 8020 to 8080. In this manner, in accordance with the contour line height, correction is performed so that pixels closer to the boundary are closer to the original color and luminance, that is, the color and density are continuously changing at the boundary of the region. At this time, the correspondence between the height of the contour line and the change in color and luminance may be linear in proportion, and may be a curve such as an exponential function or a higher-order curve so as to be a continuous change. Is also good.

【0095】こののち、等高線変換を行うための変換L
UTを作製する。本実施の形態においては、まず、等高
線の最大値(等高線画像作成関数の返り値)をPECSlope
(境界処理で混合する割合)で除して商levelを算出す
る。但し、levelが[PEMLevel,PECMax]の範囲に収まる
ようにする。従って、PEMLevel< levelのとき、level=
PEMLevelとし、level< PECMaxのとき、level =PECMax
とし、その他のとき、商levelをlevelとする。但し、等
高線の最大値は「PECMax」と表し、PEMLevelは、境界処
理で混合する等高線最小値、PECMaxは、閾値で分割する
幅を表す。
Thereafter, a conversion L for performing the contour conversion is performed.
Create a UT. In the present embodiment, first, the maximum value of the contour line (return value of the contour image creation function) is PECSlope
The quotient level is calculated by dividing by (the ratio of mixing in the boundary processing). However, the level should be within the range of [PEMLevel, PECMax]. Therefore, when PEMLevel <level, level =
PEMLevel, and when level <PECMax, level = PECMax
Otherwise, the quotient level is set to level. However, the maximum value of the contour line is represented as “PECMax”, PEMLevel represents the minimum contour line mixed in the boundary processing, and PECMax represents the width of division by the threshold value.

【0096】そして、次に、level以下は、level:iの
比で、levelよりも大きいときは0:1の比で元の画素
の値を補正値とを混合して変換LUTを作成する。LUT[i]
は変換テーブル、Aは規格化定数である。即ち、i≦le
velのとき、LUT[i]=A×i/levelであり、A<iのと
き、LUT[i]=Aである。
Next, the conversion LUT is created by mixing the original pixel value with the correction value at a ratio of level: i below the level and at a ratio of 0: 1 when the level is larger than the level. LUT [i]
Is a conversion table, and A is a standardization constant. That is, i ≦ le
When vel, LUT [i] = A × i / level, and when A <i, LUT [i] = A.

【0097】このように等高線画像を作成してこの等高
線を利用して色等の補正を行うので、補正領域が元の画
像と、画像として滑らかに連続しつつ色補正等ができる
補正効果を得る。従って、自然な感じの瞳画像に、ディ
ジタルデータ処理として一義的に補正できる利点があ
る。
As described above, since the contour line image is created and the color and the like are corrected by using the contour line, a correction effect that the color correction and the like can be performed while the correction area is smoothly continuous with the original image as the image is obtained. . Accordingly, there is an advantage that a natural-looking pupil image can be uniquely corrected as digital data processing.

【0098】次に、第2の工程として、以下では、元の
瞳画像の色状態に応じて、以下に説明する複数の形態の
何れかにより色等の補正を行う。その第1形態として、
濃度及び彩度の調整を行う形態を説明する。図15は、
濃度及び彩度の調整を示すフローチャートである。
Next, as a second step, correction of color and the like is performed in one of a plurality of modes described below according to the color state of the original pupil image. As the first form,
A mode for adjusting the density and the saturation will be described. FIG.
9 is a flowchart illustrating adjustment of density and saturation.

【0099】以下のフローチャートの説明及び各段階の
アルゴリズムの説明において、cndはビット画像による
候補画像、bitはビット値、rgbはRGBカラー画像、cn
tは等高線画像、 lutは等高線変換LUT、w、hは画像
の幅、高さ、r、g、bはi番目の画素の入力RGB値、
r′g′b′はi番目の画素の出力RGB値、cdはi番目
の画素のcnd値、ctはi番目の画素のcnt値、Dltは彩度
の閾値、Intensityは濃度補正量である。
In the following description of the flowchart and the algorithm at each stage, cnd is a candidate image based on a bit image, bit is a bit value, rgb is an RGB color image, cn
t is a contour image, lut is a contour conversion LUT, w and h are the width and height of the image, r, g, and b are input RGB values of the i-th pixel.
r'g'b 'is the output RGB value of the ith pixel, cd is the cnd value of the ith pixel, ct is the cnt value of the ith pixel, Dlt is the saturation threshold, and Intensity is the density correction amount .

【0100】次に、段階8150の濃度調整について説明す
る。濃度に関しては、青目以外は、一般的に瞳は濃度が
濃いときれいに見えることがわかっているので、濃度を
次式[数2]に従って変換する。
Next, the density adjustment in step 8150 will be described. Regarding the density, it is known that the pupil generally looks fine when the density is high, except for the blue eyes, so the density is converted according to the following equation [Equation 2].

【数2】d′=Intensity×(d−min)/A+min## EQU2 ## d ′ = Intensity × (d−min) / A + min

【0101】但し、d=(r+g+b)/3はその画素の輝
度、minは瞳抽出で抽出された領域の最小値、Intensity
は変換の幅としてのスケールを決めるパラメータであ
り、例えば、Intensity=A/2と設定する。
Here, d = (r + g + b) / 3 is the luminance of the pixel, min is the minimum value of the area extracted by pupil extraction, Intensity
Is a parameter for determining a scale as a conversion width, and is set, for example, to Intensity = A / 2.

【0102】即ち、抽出された領域の輝度の最小値を求
め、この最小値を基準にして輝度をスケールするのであ
る。従って、最小値からの輝度差が元の半分になるよう
にしている。
That is, the minimum value of the luminance of the extracted area is obtained, and the luminance is scaled based on the minimum value. Therefore, the luminance difference from the minimum value is set to half the original value.

【0103】そこで、例えば、各濃度dr、dg、dbは、 F
d(x、r、g、b、dmin)=x+(d−v)、但し、v=Inten
sity ×(d−din)/A+dmin によって表すことにより、
dr=Fd(r、r、g、b、dmin)、dg=Fd(g、r、g、b、dmi
n)、db=Fd(b、r、g、b、dmin)である。
Therefore, for example, each concentration dr, dg, db is
d (x, r, g, b, dmin) = x + (dv), where v = Inten
By expressing by sity × (d−din) / A + dmin,
dr = Fd (r, r, g, b, dmin), dg = Fd (g, r, g, b, dmi)
n), db = Fd (b, r, g, b, dmin).

【0104】また、彩度に関しては、彩度を弱めると赤
目を和らげることができ、自然な目の色の感じに近づく
ことがわかっている。但し、実際の赤目の色バランスは
種々雑多であり、例えば、赤の彩度を引けば自然な仕上
がりになるように思われたが必ずしもそうではなく、特
に、GとBとのバランスが好ましくないときは紫色や黄
色を帯びた不自然な仕上がりになることがあり、一律で
はないのである。
Further, regarding the saturation, it has been found that when the saturation is weakened, the red eye can be alleviated, and the color of the eye approaches the natural eye color. However, the actual red eye color balance is various, and for example, it seems that a natural finish is obtained by subtracting the saturation of red. However, this is not always the case, and particularly, the balance between G and B is not preferable. Sometimes, the result is an unnatural finish with a purple or yellow tinge, which is not uniform.

【0105】そこで、実際の補正は色相に関係なく閾値
を超えないように次式に従って彩度を変換する。このと
き、彩度SはS(C)=100×(C−min)/(c+1) で
あり、cはRGB何れかの値、minはRGBの最小値を
表す。閾値としては、例えば、10を用いるが、適宜変
更できる。
Therefore, in the actual correction, the saturation is converted according to the following equation so as not to exceed the threshold value regardless of the hue. At this time, the saturation S is S (C) = 100 × (C−min) / (c + 1), where “c” is one of RGB values and “min” is the minimum value of RGB. As the threshold value, for example, 10 is used, but can be changed as appropriate.

【0106】実際の補正の例は、 cminはr、g、bの最小
値を表し、Fs(x、cmin)は、Dlt<100×(x −cmin)/(x+
1) を表すとき、Fs(x、cmin)=(100× cmin)/(100- Dl
t)とし、その他のとき、Fs(x、cmin)=x と表すとき、
sr=Fs(r、cmin)、sg=Fs(g、cmin)、sb=Fs(b、cmin) と
なる。
As an example of actual correction, cmin represents the minimum value of r, g, and b, and Fs (x, cmin) is Dlt <100 × (x−cmin) / (x +
1), Fs (x, cmin) = (100 × cmin) / (100−Dl
t) and at other times, when Fs (x, cmin) = x,
sr = Fs (r, cmin), sg = Fs (g, cmin), and sb = Fs (b, cmin).

【0107】そして、閾値<S(C)のとき S(C)=閾値
となるようにRGBの各値を補正する。以上のうち、補
正後の仕上り状況に応じて彩度のみの補正とすることも
できる。彩度のみの補正にする場合は、図15に示した
段階8110及び8150を除いて処理を行う。このように第1
形態のうちで、補正後の仕上り状況に応じた補正を行う
のは、東洋人系の場合、赤目を直してもまだ赤っぽく感
じることがあることによる。
Then, when threshold value <S (C), each value of RGB is corrected so that S (C) = threshold value. Of the above, only the saturation may be corrected according to the finished state after the correction. In the case of correcting only the saturation, the processing is performed excluding steps 8110 and 8150 shown in FIG. Thus the first
Among the modes, the reason for performing the correction according to the finished situation after the correction is that in the case of an Oriental person, even if the red eyes are corrected, they may still feel reddish.

【0108】最後に、段階8170において、境界領域補正
の変換を行う。即ち、rate1=A−rate2、rate2=lut[c
t]、Fb(r、rate1、y、rate2)=(x×rate1+y×rate
2)/Aとするとき、r′=Fb(r、rate1、sr 、rate2)、
g′=Fb(g 、rate1、sg 、rate2)、b′=Fb(b、rate1、
sb、rate2) によって算出する。
Finally, in step 8170, conversion for boundary area correction is performed. That is, rate1 = A-rate2, rate2 = lut [c
t], Fb (r, rate1, y, rate2) = (x × rate1 + y × rate
2) / A, r '= Fb (r, rate1, sr, rate2),
g ′ = Fb (g, rate1, sg, rate2), b ′ = Fb (b, rate1,
sb, rate2).

【0109】次に、第2形態として、境界領域処理とグ
レー変換とを合わせた処理について説明する。図16
は、かかる処理を示すフローチャートである。図16
において、グレー補正は、RGB値を次式によりグレー
に変換するものである。c=(r+g+b)/3
Next, as a second embodiment, a description will be given of processing in which the boundary area processing and the gray conversion are combined. FIG.
Is a flowchart showing such processing. FIG.
In the gray correction, the RGB value is converted to gray by the following equation. c = (r + g + b) / 3

【0110】このとき、補正結果はグレーから黒系統の
色となり、強い赤目の場合には西洋人のような仕上りで
ある。この処理に対しては、補正後の仕上り状況に応じ
て、第1形態において行った濃度調整を行わない場合も
ある。この場合は、段階8210及び8260を除いて処理を行
う。
At this time, the correction result changes from gray to a black system color, and in the case of strong red eyes, the finish is like a Westerner. For this process, the density adjustment performed in the first embodiment may not be performed depending on the finished state after the correction. In this case, processing is performed except for steps 8210 and 8260.

【0111】次に、第3形態として、境界領域処理とブ
ルーへの変換(又はグリーンブルーへの変換、本段落の
記載においては括弧内は同時に読替)とを合わせた処理
(又は)について説明する。この処理(又は)は、
仕上げ自体を西洋人のような目の色に仕上げる補正であ
る。図17は、ブルーへの変換の補正の場合の例、図1
8は、グリーンブルーへの変換の場合の例をそれぞれ示
すフローチャートである。補正は、元の画像が明るい瞳
のとき、ブルー又はグリーンブルーへの変換を行う。
Next, as a third mode, a process combining the boundary area processing and the conversion to blue (or the conversion to green / blue, in the description of this paragraph, the reading in parentheses is simultaneously replaced)
(Or) will be described. This process (or)
It is a correction that finishes the eye itself like a Westerner. FIG. 17 shows an example of correction of conversion to blue, FIG.
8 is a flowchart showing an example of conversion to green-blue, respectively. The correction performs conversion to blue or green-blue when the original image has bright eyes.

【0112】即ち、ブルーへの変換はRG値に比べてB
値が高くなるように、例えば、次式:r=min(g、b)、
g=min(g、b)、b=max(g、b) で変換するのであり、
グリーンブルーへの変換は、例えば、次式で変換する:
b=min(g、b)、g=max(g、b)、b=max(g、b)。境界領
域処理の要領は、処理又はと同じである。
That is, the conversion to blue is smaller than the RG value by B
In order to increase the value, for example, the following equation: r = min (g, b),
g = min (g, b) and b = max (g, b).
The conversion to green-blue is performed, for example, by the following equation:
b = min (g, b), g = max (g, b), b = max (g, b). The outline of the boundary area processing is the same as the processing or.

【0113】このようにして最小値及び最大値をG、B
から選ぶのはRを用いると強い赤目を補正したときR値
が高すぎるため、人の目としては不自然なほど鮮やかな
青又は青緑の目となる。このようなグリーン又はグリー
ンブルーへの変換は、元の値が低かったら補正しないよ
うに、即ち、彩度を青側に寄せるように色相を変えるよ
うにするのである。
In this way, the minimum value and the maximum value are represented by G, B
When R is used, the R value is too high when strong red-eye is corrected, so that the human eyes become unnaturally vivid blue or blue-green eyes. Such conversion to green or green-blue is performed such that no correction is made if the original value is low, that is, the hue is changed so that the saturation approaches the blue side.

【0114】次に、第4形態として、境界領域処理と金
目の補正とを合わせた処理について説明する。金目は
瞳孔が開いている上に瞳孔全体が光っているものである
から、単純な処理では自然な仕上りとならない。
Next, as a fourth embodiment, a description will be given of processing in which the boundary area processing and the correction of the gold are combined. Since the gold eyes have an open pupil and the entire pupil shines, a simple process does not provide a natural finish.

【0115】そこで、金目補正では瞳の中央から端にか
けてV字状に輝度を落とし(端から端へと中央を経て観
るときはW字状に落とす(図20参照)ことになる)、後
に彩度調整及び境界領域補正を行う。即ち、指定されて
いる矩形領域にV字型の輝度分布を有する円領域を設定
したのち、円の中心がmax、境界が0、中心と境界との
中央がminになる輝度を決定する。このことにより、自
然な目に見られる輝度分布に合わせた。図19は、かか
る処理のアルゴリズムを示すフローチャートである。
Therefore, in the gold-eye correction, the luminance is reduced in a V-shape from the center to the end of the pupil (when viewed from the end to the end through the center, the brightness is reduced in a W-shape (see FIG. 20)). Degree adjustment and boundary area correction are performed. That is, after setting a circular region having a V-shaped luminance distribution in the specified rectangular region, the luminance is determined such that the center of the circle is max, the boundary is 0, and the center between the center and the boundary is min. In this way, the luminance distribution was adjusted to the luminance distribution seen by natural eyes. FIG. 19 is a flowchart showing the algorithm of such processing.

【0116】但し、図19において、cthは金目補正画
像、chは画素のcth 値、difは、dif=dmin−dmaxとし、
金目補正は、cmin=dif 、cmax=dif/4によって行っ
た例を示す。彩度調整及び境界領域補正は、処理〜
と同じである。本処理の段階8590〜8595においては、
4隣接平滑化を、3×3の4隣接マスクで平滑化処理を
行う。
However, in FIG. 19, cth is the golden-eye corrected image, ch is the cth value of the pixel, dif is dif = dmin−dmax,
An example in which gold correction is performed by cmin = dif and cmax = dif / 4 is shown. Saturation adjustment and boundary area correction are processing ~
Is the same as In steps 8590 to 8595 of this processing,
Four-neighbor smoothing is performed using a 3 × 3 four-neighbor mask.

【0117】以上のようにそれぞれ補正された瞳画像の
中から最も自然な感じの瞳画像を選定する。このよう
に、本境界領域補正段階を補正工程が含むことにより、
補正領域が元の画像と、画像として滑らかに連続するよ
うに補正でき、瞳の色状態や地肌や睫等の周辺の領域の
影響によらず、自然な感じの瞳画像を種々の補正候補画
像のうちから比較して決定するだけで、簡単に補正でき
るという利点がある。
The pupil image with the most natural feeling is selected from the pupil images corrected as described above. As described above, by including the present boundary region correction step in the correction process,
The correction area can be corrected so as to be smoothly continuous with the original image as an image, and a natural-looking pupil image can be corrected in various correction candidate images regardless of the color state of the pupil or the influence of the surrounding area such as the background or eyelashes. There is an advantage that correction can be easily performed simply by making a comparison among them.

【0118】[0118]

【発明の効果】本発明に係わる写真処理方法は、瞳を含
む領域を指定したとき、瞳の色状態の種別に対応した各
抽出処理を順次行って瞳画像候補を作製し表示した各瞳
画像候補から瞳画像を特定する候補特定段階を前記補正
工程が含むことを特徴としている。
According to the photographic processing method according to the present invention, when a region including the pupil is designated, each pupil image candidate is generated and displayed by sequentially performing each extraction process corresponding to the type of the pupil color state. The correction step includes a candidate specifying step of specifying a pupil image from the candidates.

【0119】該方法によれば、瞳の形状によらず、指定
した領域が瞼や白目を含んでいても、又は、地肌や睫等
の影響を有していても瞳部分を検出できるので、高度な
職人技的な熟練を要する作業等を伴うことなく、瞳部分
のみを極めて高い確率で検出して本当に瞳であるか否か
を決定できる。
According to this method, the pupil portion can be detected regardless of the shape of the pupil, even if the designated area includes eyelids and white eyes, or has an influence of the skin, eyelashes, and the like. It is possible to detect only the pupil portion with extremely high probability and determine whether or not the pupil is really a pupil, without involving any work requiring advanced craftsmanship.

【0120】また、前記各抽出処理ごとに、判別分析法
により閾値を決定し、該閾値に従って画像データ中から
瞳画像候補を得るので、最適な閾値を一義的且つ動的に
決定できる。よって、主観的なパラメータが介在するこ
となく閾値を決定できる。
Further, a threshold value is determined by a discriminant analysis method for each of the extraction processes, and a pupil image candidate is obtained from the image data according to the threshold value. Therefore, the optimum threshold value can be uniquely and dynamically determined. Therefore, the threshold value can be determined without any intervening subjective parameters.

【0121】本発明に係わる写真処理装置は、瞳を含む
領域が指定されたとき、瞳の色状態に対応した瞳画像候
補が抽出される各抽出処理が順次行われて瞳画像候補を
作成して各瞳画像候補を表示させる候補作成手段がさら
に備えられてなることを特徴とする。
In the photographic processing apparatus according to the present invention, when a region including the pupil is specified, each extraction process for extracting a pupil image candidate corresponding to the color state of the pupil is sequentially performed to create a pupil image candidate. And a candidate creating unit for displaying each pupil image candidate.

【0122】該装置によれば、瞳色補正を行う際、複数
の瞳画像候補が容易に客観的に得られ、最適の瞳画像候
補から最適の瞳部分を選択するだけでよいので、閾値等
のパラメータ設定を調整でき、最適の瞳画像候補を好適
に特定して補正等を行って写真を作製できる。
According to this apparatus, when performing pupil color correction, a plurality of pupil image candidates can be easily and objectively obtained, and only the optimum pupil portion is selected from the optimum pupil image candidates. Can be adjusted, the optimal pupil image candidate can be suitably specified, corrected, and the like can be performed to produce a photograph.

【0123】本発明に係わる記憶媒体は、コンピュータ
によってディジタル画像の変換、抽出、候補画像作成、
色補正等を行って瞳画像の色補正を行うための制御プロ
グラムを記憶した記憶媒体であって、瞳を含む領域を指
定したとき、瞳の色状態の種別に対応した各抽出処理を
順次行って瞳画像候補を作製し表示した各瞳画像候補か
ら瞳画像を特定する特定段階の手続を含んでなることを
特徴とする。
The storage medium according to the present invention can convert, extract, create candidate images,
A storage medium storing a control program for performing color correction of a pupil image by performing color correction and the like. When a region including the pupil is designated, each extraction process corresponding to the type of the pupil color state is sequentially performed. A pupil image candidate is created and displayed, and a pupil image is identified from each pupil image candidate displayed.

【0124】該記憶媒体によれば、写真処理装置の機種
に適した記憶媒体を利用して特定段階を実行できるの
で、該特定段階を記憶させた記憶媒体の、他機種等への
広汎な適用が可能となる。
According to the storage medium, the specific step can be executed by using a storage medium suitable for the model of the photographic processing apparatus. Therefore, the storage medium storing the specific step can be widely applied to other models and the like. Becomes possible.

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

【図1】本発明の実施の形態に係わる写真処理装置の構
成を概略的に示すブロック図。
FIG. 1 is a block diagram schematically showing a configuration of a photo processing apparatus according to an embodiment of the present invention.

【図2】本発明の実施の形態に係わる写真処理装置の構
成を概略的に示すブロック図。
FIG. 2 is a block diagram schematically showing a configuration of a photo processing apparatus according to the embodiment of the present invention.

【図3】本発明の実施の形態に係わる補正工程の瞳候補
特定段階を工程順に示したフローチャート。
FIG. 3 is a flowchart showing a pupil candidate identification step of a correction step according to the embodiment of the present invention in the order of steps.

【図4】本発明の実施の形態に係わる補正工程の瞳候補
特定段階を工程順に示したフローチャート。
FIG. 4 is a flowchart showing a pupil candidate identification step of a correction step according to the embodiment of the present invention in the order of steps.

【図5】本発明の実施の形態に係わる補正工程の瞳候補
特定段階を工程順に示したフローチャート。
FIG. 5 is a flowchart showing a pupil candidate identification step of a correction step according to the embodiment of the present invention in the order of steps.

【図6】本発明の実施の形態に係わる補正工程の瞳候補
特定段階を工程順に示したフローチャート。
FIG. 6 is a flowchart showing a pupil candidate identification step of a correction step according to the embodiment of the present invention in the order of steps.

【図7】本発明の実施の形態に係わる補正工程の瞳候補
特定段階を工程順に示したフローチャート。
FIG. 7 is a flowchart showing a pupil candidate identification step of a correction step according to the embodiment of the present invention in the order of steps.

【図8】本発明の実施の形態に係わる補正工程の瞳候補
特定段階を工程順に示したフローチャート。
FIG. 8 is a flowchart showing a pupil candidate identification step of a correction step according to the embodiment of the present invention in the order of steps.

【図9】本発明の実施の形態に係わる補正工程の瞳候補
特定段階を工程順に示したフローチャート。
FIG. 9 is a flowchart showing a pupil candidate identification step of a correction step according to the embodiment of the present invention in the order of steps.

【図10】本発明の実施の形態に係わる補正工程の瞳候
補特定段階を工程順に示したフローチャート。
FIG. 10 is a flowchart showing a pupil candidate identification step of a correction step according to the embodiment of the present invention in the order of steps.

【図11】本発明の実施の形態に係わる補正工程の瞳候
補特定段階を工程順に示したフローチャート。
FIG. 11 is a flowchart showing a pupil candidate identification step of a correction step according to the embodiment of the present invention in the order of steps.

【図12】本発明の実施の形態に係わる補正工程の瞳候
補特定段階を工程順に示したフローチャート。
FIG. 12 is a flowchart showing a pupil candidate identification step of a correction step according to the embodiment of the present invention in the order of steps.

【図13】本発明の実施の形態に係わる補正工程の瞳候
補特定段階を工程順に示したフローチャート。
FIG. 13 is a flowchart showing a pupil candidate identification step of a correction step according to the embodiment of the present invention in the order of steps.

【図14】本発明の実施の形態に係わる補正工程の境界
領域補正段階を工程順に示したフローチャート。
FIG. 14 is a flowchart showing a boundary region correction step of a correction step according to the embodiment of the present invention in the order of steps.

【図15】本発明の実施の形態に係わる補正工程の境界
領域補正段階を工程順に示したフローチャート。
FIG. 15 is a flowchart showing a boundary region correction step of a correction step according to the embodiment of the present invention in the order of steps.

【図16】本発明の実施の形態に係わる補正工程の境界
領域補正段階を工程順に示したフローチャート。
FIG. 16 is a flowchart showing the boundary region correction step of the correction step according to the embodiment of the present invention in the order of steps.

【図17】本発明の実施の形態に係わる補正工程の境界
領域補正段階を工程順に示したフローチャート。
FIG. 17 is a flowchart showing a boundary region correction step of a correction step according to the embodiment of the present invention in the order of steps.

【図18】本発明の実施の形態に係わる補正工程の境界
領域補正段階を工程順に示したフローチャート。
FIG. 18 is a flowchart showing a boundary region correction step of a correction step according to the embodiment of the present invention in the order of steps.

【図19】本発明の実施の形態に係わる補正工程の境界
領域補正段階を工程順に示したフローチャート。
FIG. 19 is a flowchart showing a boundary region correction step of a correction step according to the embodiment of the present invention in the order of steps.

【図20】本発明の実施の形態に係わる金目補正の輝度
分布を示したグラフ。
FIG. 20 is a graph showing a luminance distribution of gold correction according to the embodiment of the present invention.

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

50…画像処理部、51…画像表示部、53…演算処理部、54
…記憶部、55…候補作成手段、56…境界領域補正演算手
50 image processing section, 51 image display section, 53 arithmetic processing section, 54
... storage unit, 55 ... candidate creation means, 56 ... boundary area correction calculation means

───────────────────────────────────────────────────── フロントページの続き (72)発明者 内田 稔 大阪府吹田市江の木町11番30号 株式会社 東洋情報システム内 Fターム(参考) 5C076 AA21 AA22 AA26 BA03 BA07 BB42 CA02 CA10 5C079 HB01 HB06 JA12 LA02 LA10 LA12 LA37 LB12 MA01 MA04 MA11 NA05 NA27 PA08  ────────────────────────────────────────────────── ─── Continued on the front page (72) Inventor Minoru Uchida 11-30 Enomachi, Suita-shi, Osaka F-term in Toyo Information System Co., Ltd. (reference) 5C076 AA21 AA22 AA26 BA03 BA07 BB42 CA02 CA10 5C079 HB01 HB06 JA12 LA02 LA10 LA12 LA37 LB12 MA01 MA04 MA11 NA05 NA27 PA08

Claims (4)

【特許請求の範囲】[Claims] 【請求項1】 瞳を含む画像を、色分解したディジタル
画像の画像データに変換し、該画像データ中から瞳画像
を特定して瞳画像に対して色等を補正する補正工程を含
む写真処理方法において、瞳を含む領域を指定したと
き、瞳の色状態の種別に対応した各抽出処理を順次行っ
て瞳画像候補を作製し表示した各瞳画像候補から瞳画像
を特定する候補特定段階を前記補正工程が含むことを特
徴とする写真処理方法。
1. A photographic process including a correction step of converting an image including a pupil into image data of a color-separated digital image, specifying a pupil image from the image data, and correcting a color or the like of the pupil image. In the method, when a region including the pupil is specified, a candidate specifying step of sequentially performing each extraction process corresponding to the type of the pupil color state to generate a pupil image candidate and specifying a pupil image from each displayed pupil image candidate is performed. A photographic processing method, wherein the correction step includes:
【請求項2】 前記各抽出処理ごとに、判別分析法によ
り閾値を決定し、該閾値に従って画像データ中から瞳画
像候補を得る請求項1記載の写真処理方法。
2. The photographic processing method according to claim 1, wherein a threshold value is determined by a discriminant analysis method for each of the extraction processes, and a pupil image candidate is obtained from image data according to the threshold value.
【請求項3】 ディジタル画像を表示する表示手段(51)
と、ディジタル画像の画像データと、該画像データを記
憶する記憶手段(54)と、画像中の任意の範囲を指定する
指定手段(52)と、前記画像データを画像化する変換処理
を行う変換手段(53)とを具備し瞳画像に対して色等を補
正して写真を作製する写真処理装置において、瞳を含む
領域が指定されたとき、瞳の色状態に対応した瞳画像候
補が抽出される各抽出処理が順次行われて瞳画像候補を
作成して各瞳画像候補を表示させる候補作成手段(55)が
さらに備えられてなることを特徴とする写真処理装置。
3. Display means (51) for displaying a digital image.
Image data of a digital image, storage means (54) for storing the image data, designating means (52) for designating an arbitrary range in the image, and conversion for performing a conversion process for converting the image data into an image. Means (53), wherein a pupil image candidate corresponding to the color state of the pupil is extracted when a region including the pupil is specified in the photo processing apparatus for preparing a photograph by correcting the color and the like with respect to the pupil image. The photographic processing apparatus further comprises a candidate creating means (55) for sequentially performing each extraction process to create a pupil image candidate and displaying each pupil image candidate.
【請求項4】 コンピュータによってディジタル画像の
変換、抽出、候補画像作成、色補正等を行って瞳画像の
色補正を行うための制御プログラムを記憶した記憶媒体
であって、瞳を含む領域を指定したとき、瞳の色状態の
種別に対応した各抽出処理を順次行って瞳画像候補を作
製し表示した各瞳画像候補から瞳画像を特定する特定段
階の手続を含んでなることを特徴とする記憶媒体。
4. A storage medium storing a control program for performing color correction of a pupil image by performing conversion, extraction, candidate image creation, color correction, and the like of a digital image by a computer, and designates an area including a pupil. Then, each extraction process corresponding to the type of the pupil color state is sequentially performed to generate a pupil image candidate, and a pupil image is identified from each displayed pupil image candidate. Storage medium.
JP23802999A 1999-08-25 1999-08-25 Method and device for processing photograph and recording medium Withdrawn JP2001069334A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP23802999A JP2001069334A (en) 1999-08-25 1999-08-25 Method and device for processing photograph and recording medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP23802999A JP2001069334A (en) 1999-08-25 1999-08-25 Method and device for processing photograph and recording medium

Publications (1)

Publication Number Publication Date
JP2001069334A true JP2001069334A (en) 2001-03-16

Family

ID=17024121

Family Applications (1)

Application Number Title Priority Date Filing Date
JP23802999A Withdrawn JP2001069334A (en) 1999-08-25 1999-08-25 Method and device for processing photograph and recording medium

Country Status (1)

Country Link
JP (1) JP2001069334A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005176261A (en) * 2003-12-15 2005-06-30 Nikon Corp Color defective area correction method, color defective area correction processing program, color area specification method, color area specification processing program and image processing apparatus
JP2006350426A (en) * 2005-06-13 2006-12-28 Noritsu Koki Co Ltd Pupil region detection device, pupil correction processor and pupil region detection method
JP2007221836A (en) * 2007-06-01 2007-08-30 Seiko Epson Corp Apparatus, method and program of correcting red-eye
JP2007287166A (en) * 2007-06-01 2007-11-01 Seiko Epson Corp Red-eye correcting device, red-eye correcting method and red-eye correcting program
JP2008518334A (en) * 2004-10-28 2008-05-29 フォトネーション ビジョン リミテッド Method and apparatus for detecting red eye in an acquired digital image

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005176261A (en) * 2003-12-15 2005-06-30 Nikon Corp Color defective area correction method, color defective area correction processing program, color area specification method, color area specification processing program and image processing apparatus
JP2008518334A (en) * 2004-10-28 2008-05-29 フォトネーション ビジョン リミテッド Method and apparatus for detecting red eye in an acquired digital image
JP4856086B2 (en) * 2004-10-28 2012-01-18 デジタルオプティックス・コーポレイション・ヨーロッパ・リミテッド Method and apparatus for detecting red eye in an acquired digital image
JP2006350426A (en) * 2005-06-13 2006-12-28 Noritsu Koki Co Ltd Pupil region detection device, pupil correction processor and pupil region detection method
JP2007221836A (en) * 2007-06-01 2007-08-30 Seiko Epson Corp Apparatus, method and program of correcting red-eye
JP2007287166A (en) * 2007-06-01 2007-11-01 Seiko Epson Corp Red-eye correcting device, red-eye correcting method and red-eye correcting program
JP4492644B2 (en) * 2007-06-01 2010-06-30 セイコーエプソン株式会社 Red-eye correction device, red-eye correction method, and red-eye correction program
JP4492643B2 (en) * 2007-06-01 2010-06-30 セイコーエプソン株式会社 Red-eye correction device, red-eye correction method, and red-eye correction program

Similar Documents

Publication Publication Date Title
US6980691B2 (en) Correction of “red-eye” effects in images
US6873743B2 (en) Method and apparatus for the automatic real-time detection and correction of red-eye defects in batches of digital images or in handheld appliances
US6798903B2 (en) Image processing method, image processing device, recording medium, and transmission medium
US6728401B1 (en) Red-eye removal using color image processing
EP1596573B1 (en) Image correction apparatus
US7082211B2 (en) Method and system for enhancing portrait images
EP1807805B1 (en) Method and apparatus for red-eye detection in an acquired digital image
US7187788B2 (en) Method and system for enhancing portrait images that are processed in a batch mode
JP5547730B2 (en) Automatic facial and skin beautification using face detection
US20040114797A1 (en) Method for automatic determination of color-density correction values for the reproduction of digital image data
JP2002183729A (en) Blond-hair-pixel removing method in image skin-color detection
CN111526279B (en) Image processing apparatus, image processing method, and recording medium
US6996270B1 (en) Method, apparatus, and recording medium for facial area adjustment of an image
JP2001069334A (en) Method and device for processing photograph and recording medium
JP2001069333A (en) Method and device for processing photograph and recording medium
JP2001218020A (en) Picture processing method
Hardeberg Red eye removal using digital color image processing
JP2005128600A (en) Image processing method and object photographing system
JPH11196324A (en) Method and device for outputting image
JP7015009B2 (en) Image processing equipment, image processing methods and programs

Legal Events

Date Code Title Description
RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20040701

A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20061107