JP3576654B2 - Exposure determination method, figure extraction method, and face area determination method - Google Patents

Exposure determination method, figure extraction method, and face area determination method Download PDF

Info

Publication number
JP3576654B2
JP3576654B2 JP25897795A JP25897795A JP3576654B2 JP 3576654 B2 JP3576654 B2 JP 3576654B2 JP 25897795 A JP25897795 A JP 25897795A JP 25897795 A JP25897795 A JP 25897795A JP 3576654 B2 JP3576654 B2 JP 3576654B2
Authority
JP
Japan
Prior art keywords
person
area
face
image
shape pattern
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.)
Expired - Fee Related
Application number
JP25897795A
Other languages
Japanese (ja)
Other versions
JPH08184925A (en
Inventor
金城  直人
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujifilm Holdings Corp
Original Assignee
Fuji Photo Film 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 Fuji Photo Film Co Ltd filed Critical Fuji Photo Film Co Ltd
Priority to JP25897795A priority Critical patent/JP3576654B2/en
Priority to US08/549,181 priority patent/US5629752A/en
Publication of JPH08184925A publication Critical patent/JPH08184925A/en
Application granted granted Critical
Publication of JP3576654B2 publication Critical patent/JP3576654B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Control Of Exposure In Printing And Copying (AREA)

Description

【0001】
【発明の属する技術分野】
本発明は露光量決定方法図形抽出方法及び顔領域判断方法に係り、特に、原画像中に存在する人物の顔に相当する領域を判断する顔領域判断方法、原画像中に存在する人物の顔に相当する領域を判断し、判断した領域が適正な色に焼付けされるように露光量を決定する露光量決定方法、及び画像から抽出対象図形が存在する領域を抽出する図形抽出方法に関する。
【0002】
【従来の技術及び発明が解決しようとする課題】
人物写真を観賞するときに最も注目される部位は人物の顔であり、例えばフィルム等に記録された原画像を印画紙等の複写材料に焼付ける場合には、人物の顔の色が適正な色に焼付けされるように露光量を決定する必要がある。
【0003】
このため本出願人は、人物写真では人物が画像の略中央部に位置している確率が高いとの経験則に基づいて、フィルム画像を予め固定的に定められた複数の領域に分割すると共に、画像の略中央部に位置している領域の重みが重くなるように各領域を重み付けし、各領域の3色の濃度の加重平均値を求め、該加重平均値に基づいて露光量を決定する方法を既に提案している(特開昭63−80242号公報参照)。しかし、上記では人物が実際に画像の略中央部付近に位置していれば、該人物が適正な色で焼付される露光量を得ることができるが、人物が画像の中央部から大きく外れた位置に位置している場合には適正な露光量を得ることができない、という問題があった。
【0004】
また本出願人は、カラー原画像を多数画素に分割し各画素毎にR、G、Bの3色に分解して測光し、測光データに基づいて色相値(及び彩度値)についてのヒストグラムを求め、求めたヒストグラムを山毎に分割し、各画素が分割した山の何れに属するかを判断して各画素を分割した山に対応する群に分け、各群毎にカラー原画像を複数の領域に分割し(所謂クラスタリング)、該複数の領域のうち人物の顔に相当する領域を推定し、推定した領域の測光データに基づいて露光量を決定することを提案している(特開平4−346332号公報参照)。
【0005】
また、特開平6−160993号公報には、人物の顔に相当する領域を抽出する確度を向上させるために、画像の外縁に接している領域を背景領域と判断して除去したり、抽出した領域を線図形化し、抽出した領域の周辺に位置している近傍領域の形状及び抽出した領域の形状に基づいて、抽出した領域が人物の顔に相当する領域であるか否かを判断することも記載されている。
【0006】
しかしながら、上記では、原画像に例えば地面や木の幹等の肌色領域が存在しており、該肌色領域の色相及び彩度が原画像中の人物の顔に相当する領域の色相及び彩度と近似していた場合、この領域を人物の顔に相当する領域と誤判定する可能性がある。また、この肌色領域が人物の顔に相当する領域と隣接していた場合、肌色領域と人物の顔に相当する領域とを分離できず、原画像を適正な範囲の領域に分割できないことがあった。上記従来技術では、分割した領域の何れかが人物の顔に相当する領域であることを前提として処理を行っているため、原画像を適正な範囲の領域に分割できなかった場合には、人物の顔に相当する領域を誤判定し、人物の顔が適正に焼付けできる露光量を得ることができない、という問題があった。
【0007】
また上述の、原画像を適正な範囲の領域に分割できなかった場合には抽出すべき領域を誤判定する、という問題は、人物の顔に相当する領域の抽出に限らず、画像から特定の図形が存在する領域を抽出する場合にも共通する問題である。すなわち、抽出すべき特定図形の色等が予め判明していたとしても、画像中に前記特定図形の色相や彩度が近似している領域が存在していたり、該領域が前記特定図形に相当する領域に隣接していた等の場合には、特定図形が存在する領域を適正に抽出することができない、という問題があった。
【0008】
本発明は上記事実を考慮して成されたもので、原画像中の人物の顔に相当する領域及びその周辺の領域の色の影響を受けることなく人物の顔に相当する領域のみを抽出し、前記領域を適正に焼付けできるように露光量を決定できる露光量決定方法を得ることが目的である。
【0009】
また本発明は、画像中に存在する抽出対象図形を、抽出対象図形が存在する領域、及びその周辺の領域の色の影響を受けることなく適正に抽出することができる図形抽出方法を得ることが目的である。
また本発明は、原画像中の人物の顔に相当する領域及びその周辺の領域の色の影響を受けることなく、人物の顔に相当する領域の抽出精度を向上させることができる顔領域判断方法を得ることが目的である。
【0010】
【課題を解決するための手段】
上記目的を達成するために請求項1記載の発明に係る露光量決定方法は、原画像中に存在する人物の所定の部分に特有の形状パターンを探索し、検出した形状パターンの大きさ、向き及び人物の顔と前記所定の部分との位置関係に応じて人物の顔に相当すると推定される領域を設定し、設定した領域に重み係数を付与することを、人物の各部分に特有の複数種類の形状パターンを探索対象として各々行い、人物の顔に相当すると推定される領域として設定した複数の領域の各々の範囲、及び前記複数の領域に各々付与した重み係数に基づいて、原画像中の人物の顔に相当する確度が最も高い領域を判断し、判断した領域の色又は濃度の少なくとも一方に基づいて複写材料への露光量を決定する。
【0011】
請求項2記載の発明は、請求項1記載の発明において、人物の各部に特有の形状パターンが、人物の頭部の輪郭を表す形状パターン、人物の顔の輪郭を表す形状パターン、人物の顔の内部構造を表す形状パターン、及び人物の胴体の輪郭を表す形状パターンを含むことを特徴としている。
【0012】
請求項3記載の発明は、請求項1記載の発明において、形状パターンの探索を、原画像を濃度又は色が同一又は近似している複数の画素で構成される複数の領域に分割し、該複数の領域の各々の輪郭を用いて行うことを特徴としている。
【0013】
請求項4記載の発明は、請求項1記載の発明において、形状パターンの探索を、原画像中に存在するエッジを検出し、検出したエッジの中心線を求め、求めた中心線を用いて行うことを特徴としている。
【0014】
請求項5記載の発明は、請求項1記載の発明において、設定した人物の顔に相当すると推定される領域には符号が正の重み係数を付与すると共に、原画像中の人物の顔に相当する確度の低い領域を判定し、判定した領域には符号が負の重み係数を付与することを特徴としている。
【0015】
請求項6記載の発明に係る図形抽出方法は、抽出対象図形を構成する特徴的な複数の部分形状に基づいて複数の部分形状パターンを予め定めておき、画像中に存在する部分形状パターンを探索し、検出した部分形状パターンの大きさ、方向、及び前記抽出対象図形における前記部分形状パターンが表す部分形状の位置に応じて画像中の抽出対象図形の特定部分又は全体が存在すると推定される候補領域を設定することを、前記複数の部分形状パターンの各々について行い、設定した各候補領域毎に、前記検出した各部分形状パターンとの関係に基づいて抽出対象図形の特定部分又は全体が存在する領域としての整合度を求め、各候補領域毎に求めた整合度に基づいて、抽出対象図形の特定部分又は全体が存在している確度が高い候補領域を判断し、抽出対象図形の特定部分又は全体が存在している確度が高いと判断した候補領域を抽出する。
【0016】
請求項7記載の発明は、請求項6の発明において、画像上での前記抽出対象図形の状態を複数の状態に予め分類しておくと共に、前記複数の部分形状パターンの各々に対し、部分形状パターンを探索する際の探索条件を規定するパラメータとして、前記分類した複数の状態に応じて複数種類のパラメータを予め定めておき、画像中に存在する部分形状パターンを探索し、前記候補領域を設定することを前記複数の部分形状パターンの各々について行い、設定した候補領域毎に整合度を求め、抽出対象図形の特定部分又は全体が存在している確度が高い候補領域を判断して抽出する処理を、前記複数の状態に対応する複数種類のパラメータの各々を用いて行うか、又は、前記複数の状態のうちの所定の状態に対応するパラメータを用いて前記処理を行った結果、抽出対象図形の特定部分又は全体が存在している確度が高いと判断した候補領域が無かった場合は、前記所定の状態と異なる状態に対応するパラメータを用いて前記処理を行うことを繰り返し、抽出対象図形の特定部分又は全体が存在している確度が高いと判断した候補領域が有った場合に前記処理を終了することを特徴としている。
【0017】
請求項8記載の発明は、請求項7の発明において、画像上での抽出対象図形の状態は、画像上での抽出対象図形の大きさ、及び画像上での抽出対象図形の向き、及び抽出対象図形が表す物体の向きの少なくとも何れかを含むことを特徴としている。
請求項9記載の発明に係る顔領域判断方法は、原画像中に存在する人物の所定の部分に特有の形状パターンを探索し、検出した形状パターンの大きさ、向き及び人物の顔と前記所定の部分との位置関係に応じて人物の顔に相当すると推定される領域を設定し、設定した領域に重み係数を付与することを、人物の各部分に特有の複数種類の形状パターンを探索対象として各々行い、人物の顔に相当すると推定される領域として設定した複数の領域の各々の範囲、及び前記複数の領域に各々付与した重み係数に基づいて、原画像中の人物の顔に相当する確度が最も高い領域を判断する。
【0018】
請求項1記載の発明では、原画像中に存在する人物の各部に特有の形状パターンを探索し、検出した形状パターンの大きさ、向き及び検出した形状パターンとの位置関係に応じて人物の顔に相当すると推定される領域を設定する。なお、人物の各部に特有の形状パターンとしては、例えば請求項2にも記載したように、人物の頭部の輪郭を表す形状パターン、人物の顔の輪郭を表す形状パターン、人物の顔の内部構造を表す形状パターン、及び人物の胴体の輪郭を表す形状パターン等を用いることができる。
【0019】
例えば人物の頭部(頭髪部)に対応する原画像上の領域は、その輪郭に、人物の頭頂部に相当する所定の円曲度の凸部と、該凸部の下方に人物の頭部と顔との境界に相当する所定の円曲度の凹部と、が含まれていることが一般的である。このため、人物の頭部に対しては、頭部の輪郭を表す特有の形状パターンとして、例えば所定の円曲度の凸部と所定の円曲度の凹部とを用いることができる。そして、原画像中に前述の形状パターンが検出された場合には、人物の顔に相当すると推定される領域を、例えば以下のようにして設定することができる。
【0020】
すなわち、人物の顔は、頭部に対し下方側(前記形状パターンの凹部側)に隣接した位置に存在し、かつその大きさが頭部の大きさに略比例し、更に向きが頭部の向きに一致する。また、人物の顔の輪郭は略楕円形状であることが一般的である。従って、原画像中に前述した頭部の輪郭を表す形状パターンが検出された場合には、検出された形状パターンの大きさ、向きに応じた大きさ、向きで、かつ人物の頭部と顔との位置関係に応じた位置に楕円形状の領域を設定し、該領域を人物の顔に相当すると推定される領域とすることができる。
【0021】
このように、請求項1の発明では、原画像から検出した人物の各部に特有の形状パターンの大きさ、向き、及び検出した形状パターンとの位置関係に応じて人物の顔に相当すると推定される領域を設定するので、人物の顔に相当する領域及びその周辺の領域の色等の影響を受けることなく、人物の顔に相当すると推定される領域を適正に設定することができる。また、逆に原画像に人物の顔に相当する領域でないものの、顔領域に似た輪郭の肌色領域が含まれていたとしても、これを人物の顔に相当する領域と誤判定することを防止できる。
【0022】
また、請求項1記載の発明では、人物の各部に特有の複数種類の形状パターンの各々を探索対象とし、検出した各形状パターンに基づいて設定した人物の顔に相当すると推定される領域に重み係数を付与し、人物の顔に相当すると推定される領域として設定した複数の領域の各々の範囲、及び前記複数の領域に各々付与した重み係数に基づいて、原画像中の人物の顔に相当する確度が最も高い領域を判断する。このように人物の各部に特有の複数の形状パターンを各々探索対象として処理を複数回行うことにより、原画像中の非人物領域で所定の形状パターンが偶然検出されたとしても、偶然検出された形状パターンに基づいて設定した領域を、人物の顔に相当する確度が最も高い領域として判断することはない。このようにして判断した領域の色又は濃度の少なくとも一方に基づいて複写材料への露光量を決定するので、人物の顔に相当する領域を適正に焼付けできるように露光量を決定することができる。
【0023】
なお形状パターンの探索は、例えば請求項3に記載したように、原画像を濃度又は色が同一又は近似している複数の画素で構成される複数の領域に分割し、該複数の領域の各々の輪郭を用いて行うことができる。画像を上記のように複数の領域に分割すると、例えば人物と背景との境界等のように人物の各部に特有の形状パターンが輪郭等に含まれている確率の高い複数の領域が得られる。従って、この複数の領域の輪郭から人物の各部に特有の形状パターンを効率良く検出することができる。
【0024】
原画像の分割は、例えば特開平4−346332号のように、原画像の各画素毎の3色の測光データに基づいて色相値についての1次元ヒストグラム、又は色相値及び彩度値についての2次元ヒストグラムを求め、求めたヒストグラムを山毎に分割し、各画素が分割した山の何れに属するかを判断して各画素を分割した山に対応する群に分け、各群毎に原画像を複数の領域に分割することができる。また、原画像を構成する各画素のうち隣接する画素との濃度差或いは色差の大きな画素を領域の境界とすることにより原画像を複数の領域に分割するようにしてもよい。また、2値化を行うことにより原画像を複数の領域に分割したり、該2値化を各々値の異なる複数のしきい値を用いて複数回行って分割するようにしてもよく、更に上記の組み合わせにより複数の領域に分割するようにしてもよい。
【0025】
本発明では、上記のようにして分割した領域を人物の各部に特有の複数の形状パターンを検出するために用い、人物の顔に相当すると推定される領域の設定は、先にも説明したように原画像から検出した形状パターンの大きさ、向き及び検出した形状パターンとの位置関係に応じて行う。従って、複数の領域の輪郭から複数の形状パターンのうちの一部を検出できなかったとしても、人物の顔に相当すると推定される領域を設定できると共に、従来のように、分割した複数の領域の何れかが人物の顔に相当する領域と一致している必要はない。
【0026】
また、形状パターンの探索は、請求項4に記載したように、原画像中に存在するエッジを予め検出し、検出したエッジの中心線を求め、求めた中心線を用いて行うようにしてもよい。なお、エッジの検出は、例えば各画素に対し濃度又は色について微分等を行うことにより検出することができ、エッジの中心線は、例えば周知の細線化や尾根検出等の処理により求めることができる。画像中に存在するエッジについても、人物の各部に特有の形状パターンが含まれている確率が高いので、請求項3の発明と同様に、人物の各部に特有の形状パターンを効率良く検出することができる。
【0027】
ところで、画像中には人物に相当する領域である確率が低いと判断できる特徴を備えた領域が存在していることがある。例えば、輪郭に含まれる直線部分の比率が所定値以上の領域については、人工物を表している領域である確率が高い。また人体は、人体の左右を分割する仮想線に関して略線対称であるが、線対称度が所定値以下の領域は人物に相当する領域である確率は低い。また、凹凸数が所定値以上の領域についても人物に相当する領域である確率は低いと判断できる。また、人物は一般に画像の略中央部に位置している確率が高いことから、画像外縁との接触率が所定値以上の領域についても、画像の周縁部に位置していると判断でき、人物に相当する領域である確率は低い。
【0028】
また、領域内の濃度のコントラストが所定値以下の場合には、表面が平滑、或いは凹凸の少ない物体を表している領域である可能性が高く、人物の顔に相当する領域である確率は低い。更に、領域内の濃度が所定のパターンで変化していたり、領域内の濃度が所定の変化パターンを繰り返している場合にも、人物に相当する領域である確率は低いと判断できる。従って、請求項5にも記載したように、設定した人物の顔に相当すると推定される領域には符号が正の重み係数を付与すると共に、原画像中の人物の顔に相当する確度の低い領域を判定し、判定した領域には符号が負の重み係数を付与すれば、人物の顔に相当する確度が最も高い領域として人物の顔に相当する領域が抽出される確率が更に向上する。
【0029】
請求項6記載の発明では、画像中に存在する抽出対象図形を構成する特徴的な複数の部分形状に基づいて複数の部分形状パターンを予め定める。なお、抽出対象図形は人物を表す図形に限定されるものではなく、人物でない物体、例えば人工物を表す図形等であってもよいが、抽出対象図形として人物を表す図形を適用した場合には、前記部分形状パターンとしては、請求項2と同様に、人物の頭部の輪郭を表す形状パターン、人物の顔の輪郭を表す形状パターン、人物の顔の内部構造を表す形状パターン、人物の胴体の輪郭を表す形状パターン等を用いることができる。
【0030】
請求項6の発明では、次に、画像中に存在する部分形状パターンを探索し、検出した部分形状パターンの大きさ、方向、及び抽出対象図形における前記部分形状パターンが表す部分形状の位置に応じて画像中の抽出対象図形の特定部分又は全体が存在すると推定される候補領域を設定することを、複数の部分形状パターンの各々について行う。これにより、請求項1と同様に、抽出対象図形の特定部分又は全体が存在する領域及びその周辺の領域の色等の影響を受けることなく、抽出対象図形の特定部分又は全体が存在すると推定される候補領域を適正に設定することができる。なお、抽出対象図形の特定部分としては、例えば抽出対象図形として人物を表す図形を適用した場合は、人物の顔に相当する部分を適用することができる。
【0031】
また請求項6の発明では、次に、設定した各候補領域毎に、検出した各部分形状パターンとの関係(例えば双方の大きさ、方向、位置関係等)に基づいて抽出対象図形の特定部分又は全体が存在する領域としての整合度を求め、各候補領域毎に求めた整合度に基づいて、抽出対象図形の特定部分又は全体が存在している確度が高い候補領域を判断し、抽出対象図形の特定部分又は全体が存在している確度が高いと判断した候補領域を抽出する。
【0032】
このように、各候補領域毎に抽出対象図形の特定部分又は全体が存在する領域としての整合度を求めて、抽出対象図形の特定部分又は全体が存在している確度が高い候補領域を判断するので、或る部分形状パターンの検出結果に基づいて設定した候補領域が抽出対象図形の存在していない領域であったとしても、この領域を抽出対象図形の特定部分又は全体が存在している確度が高い領域として抽出することはなく、画像中に存在する抽出対象図形を、抽出対象図形が存在する領域、及びその周辺の領域の色の影響を受けることなく適正に抽出することができる。
【0033】
ところで、画像上での抽出対象図形の部分形状は、画像上での抽出対象図形の状態(例えば、画像上での抽出対象図形の大きさや抽出対象図形が表す物体の向き等)によって変化する。このため、画像上での抽出対象図形の状態が不定の場合は、各種状態の抽出対象図形の部分形状が部分形状パターンとして検出されるように、部分形状パターンを探索する際の探索条件を設定する必要がある。しかし、部分形状パターンとして検出すべき部分形状の範囲を広げると、部分形状パターンとして多数のパターンが検出されると共に、実際には抽出対象図形の部分形状ではないにも拘わらず部分形状パターンとして誤検出されるパターンの数も急増し、処理時間が大幅に増加するという問題がある。
【0034】
このため、請求項7に記載の発明では、画像上での抽出対象図形の状態を複数の状態に予め分類しておくと共に、複数の部分形状パターンの各々に対し、部分形状パターンを探索する際の探索条件を規定するパラメータとして、前記分類した複数の状態に応じて複数種類のパラメータを予め定めておく。なお、画像上での抽出対象図形の状態としては、請求項8に記載したように、画像上での抽出対象図形の大きさ、及び画像上での抽出対象図形の向き、及び抽出対象図形が表す物体の向き等が挙げられる。上記では、画像上での抽出対象図形の種類毎に探索条件(を規定するパラメータ)を定めているので、個々の探索条件において部分形状パターンとして検出すべき部分形状の範囲が狭くなり、個々の探索条件を用いて探索を行ったとすると特定の状態の抽出対象図形の部分形状パターンが非常に短い時間で探索されることになる。
【0035】
そして複数種類のパラメータを定めた後は、例えば、部分形状パターンの探索、候補領域の設定を複数の部分形状パターンの各々について行い、設定した候補領域毎に整合度を求め、抽出対象図形の特定部分又は全体が存在している確度が高い候補領域を判断して抽出する処理を行う処理部を複数設けた等の場合には、各処理部において、各状態に対応する複数種類のパラメータの何れかを用いて前記処理を並列で行わせることにより、全体として、前記複数種類のパラメータの各々を用いて前記処理を行うようにすることができる。これにより、画像上での抽出対象図形の状態に拘わらず、抽出対象図形の特定部分又は全体が存在している確度が高い候補領域を非常に短い時間で抽出することができる。
【0036】
また、複数の状態のうちの所定の状態に対応するパラメータを用いて前記処理を行った結果、抽出対象図形の特定部分又は全体が存在している確度が高いと判断した候補領域が無かった場合は、前記所定の状態と異なる状態に対応するパラメータを用いて前記処理を行うことを繰り返し、抽出対象図形の特定部分又は全体が存在している確度が高いと判断した候補領域が有った場合に前記処理を終了するようにしてもよい。この場合、各状態に対応する処理が直列に行われることになるが、各状態に対応する全ての処理を行う前に抽出対象図形の特定部分又は全体が存在している確度が高い候補領域を抽出できる可能性は高い。従って、画像上での抽出対象図形の状態に応じて探索条件のパラメータを複数種類定めることを行わなかった場合と比較して、抽出対象図形を短時間で抽出することができる。
また上記において、画像上での抽出対象図形の出現頻度に応じて、出現頻度の高い状態に対応するパラメータより順に用いて探索を行うようにすれば、抽出対象図形を抽出する迄の時間を更に短縮することができる。
【0037】
請求項9記載の発明では、請求項1記載の発明と同様に、原画像中に存在する人物の所定の部分に特有の形状パターンを探索し、検出した形状パターンの大きさ、向き及び人物の顔と前記所定の部分との位置関係に応じて人物の顔に相当すると推定される領域を設定し、設定した領域に重み係数を付与することを、人物の各部分に特有の複数種類の形状パターンを探索対象として各々行い、人物の顔に相当すると推定される領域として設定した複数の領域の各々の範囲、及び前記複数の領域に各々付与した重み係数に基づいて、原画像中の人物の顔に相当する確度が最も高い領域を判断するので、原画像中の人物の顔に相当する領域及びその周辺の領域の色の影響を受けることなく、人物の顔に相当する領域の抽出精度を向上させることができる。
【0038】
【発明の実施の形態】
以下、図面を参照して本発明の実施形態の一例を詳細に説明する。
【0039】
〔第1実施形態〕
図1には本発明を適用可能な写真焼付装置10が示されている。写真焼付装置10はネガフィルム12を搬送する搬送ローラ14を備えている。ネガフィルム12の搬送路の下方には、光源16、調光フィルタ等の色補正フィルタ18、拡散ボックス20が順に配列されている。また、ネガフィルム12の搬送路の上方には、ネガフィルム12を透過した光を2方向に分配する分配用プリズム22が配置されている。
【0040】
分配用プリズム22によって2方向に分配された光の一方の光路上には、投影光学系24、ブラックシャッタ26、及び複写材料としてのカラーペーパ(印画紙)28が順に配置されており、他方の光路上には投影光学系30、CCDイメージセンサ32が順に配置されている。CCDイメージセンサ32はネガフィルム12に記録された画像(1コマ)全体を多数の画素(例えば256×256画素)に分割し、各画素をR(赤)、G(緑)、B(青)の3色に分解して測光する。
【0041】
CCDイメージセンサ32の信号出力端には、CCDイメージセンサ32から出力された信号を増幅する増幅器34、アナログ−デジタル(A/D)変換器36、CCDイメージセンサ32の感度補正用の3×3マトリクス回路38が順に接続されている。3×3マトリクス回路38は、マイクロプロセッシングユニット(MPU)で構成され、ROMに後述する顔領域抽出処理を実現するプログラムが予め記憶された顔領域抽出部40、及び画像全体の平均濃度を演算する平均濃度演算部42に各々接続されている。また、顔領域抽出部40及び平均濃度演算部42は露光量演算部44に接続されている。露光量演算部44は、色補正フィルタ18を駆動するドライバ46を介して色補正フィルタ18に接続されている。
【0042】
次に本第1実施形態の作用を説明する。光源16から照射された光は、色補正フィルタ18、拡散ボックス20及びネガフィルム12を透過し、分配用プリズム22によって分配され、投影光学系30を介してCCDイメージセンサ32に入射される。なお、このときブラックシャッタ26は閉じられている。CCDイメージセンサ32では、入射された光により、1画面全体を多数の画素に分割し各画素をR、G、Bの3色に分解して測光し、測光データ信号を出力する。測光データ信号は増幅器34で増幅され、A/D変換器36でデジタル信号に変換された後に、更に3×3マトリクス回路38でCCDイメージセンサ32の感度補正が行われて、顔領域抽出部40及び平均濃度演算部42に画像データとして各々入力される。
【0043】
平均濃度演算部42では、1画面全体の平均濃度を演算する。顔領域抽出部40では、後に詳述するようにして1画面中の人物の顔に相当する部分を推定し、該部分のR、G、B3色の測光データを出力する。露光量演算部44は人物領域演算部40から出力された3色の測光データと、平均濃度演算部42から出力された平均濃度とを用いて露光量を演算し、演算した露光量でネガフィルム12の画像がカラーペーパ28に焼付けされるように、ドライバ46を介して色補正フィルタ18を移動させると共に、ブラックシャッタ26を開閉して画像の焼付けを行う。
【0044】
なお、平均濃度演算部42で演算される画面全体の平均濃度は、露光量演算部44による露光量演算において必須の情報ではなく、平均濃度演算部42を省略し、露光量演算部44では顔領域抽出部40から出力された3色の測光データのみを用いて露光量を演算するようにしてもよい。
【0045】
次に図2のフローチャートを参照し、顔領域抽出部40の図示しないCPUで実行される顔領域抽出処理を説明する。ステップ100では3×3マトリクス回路38からの画像データの取込みを行う。
【0046】
ステップ102では、原画像を複数の領域に分割する方法の一例として、画像データを所定のしきい値で2値化する。以下、ポジ画像の例で説明する。この2値化により、原画像は、しきい値よりも高い濃度の画素で各々構成される領域(以下、この領域を「黒領域」と称する)と、しきい値以下の濃度の画素で各々構成される領域(以下、この領域を「白領域」と称する)とに分割される。これにより、一例として図8(A)に示す原画像では、図8(B)に示すように原画像中の人物の頭髪部に相当する黒領域50を含む多数の黒領域が抽出されることになる。更にステップ102では、分割された複数の黒領域及び白領域の各々を識別するために、各領域に対してナンバリングを行う。
【0047】
次のステップ104では頭部抽出による顔候補領域設定処理を行う。この処理について、図3のフローチャートを参照して説明する。ステップ172では先に説明した2値化によって抽出された複数の黒領域のうちの1つを取り出し、ステップ174では取り出した黒領域の輪郭をトレースし、輪郭の曲率を演算する。例えば図8(A)に示す原画像に対して2値化を行うことによって黒領域が多数抽出され、このうち図8(B)に示すような黒領域50を取り出したとすると、輪郭のトレースは図8(B)に示すように時計回りに行うことができる。また曲率の演算は、図8(C)に示すように、所定長さで前記トレース方向に略沿った向きでかつ始点及び終点が黒領域の輪郭に接しているベクトルを順に設定し(図8(C)ではベクトルP1P0とベクトルP0P2)、隣合うベクトルの内積により、曲率としてのθを演算することができる。また、θの向き(符号の正負)はベクトルの外積より求めることができる。
【0048】
このとき、トレースの進行方向に対し、黒領域の輪郭が右にカーブしているときには負の値、左にカーブしているときには正の値となるように、角度演算式を設定するものとする。例えば図8(C)には黒領域の輪郭のうち、トレースの進行方向に対して右にカーブしている部分を示しており、θは負の値となる。
【0049】
なお、ベクトルの長さは固定としてもよいし、黒領域の輪郭の周囲長に応じて変更するようにしてもよい。また、曲率の演算を複数回行うと共に、各回において長さを段階的に変更するようにしてもよい。
【0050】
次のステップ176では、上記で演算された黒領域の輪郭の曲率に基づいて、人物の頭部の輪郭を表す形状パターン(請求項6に記載の部分形状パターン、但しこの場合の抽出対象図形は人物を表す図形である)として、輪郭に、人物の頭部と顔との境界に相当すると推定される凹部、及び人物の頭頂部に相当すると推定される凸部を備えた黒領域を抽出する。この凹部及び凸部は、トレース方向と先に求めたθの向き(符号の正負)に基づいて判断することができる。すなわち、θの符号が反転している箇所が凹部と凸部との境界であり、時計回りにトレースしたときにθの符号が正であれば凹部、負であれば凸部であると判断できる。これにより、一例として図8(D)に示すように、黒領域の輪郭における凹部及び凸部を抽出できる。
【0051】
ステップ178では上記で抽出した凹部及び凸部に対し、各々の特徴量を演算する。本実施形態では凹部及び凸部の特徴量として、以下のように演算した円曲度を用いる。すなわち、図9(A)に示すように、凹部又は凸部を構成する曲線の長さをL、凹部又は凸部の両端点Q1、Q2間の距離をM、両端点Q1、Q2を結ぶ直線に対する凹部又は凸部の高さをhとし、円曲度としてL÷M及びh÷Mを演算する。また、凹部及び凸部の開いた方向へ向かうベクトルとして、方向ベクトルVを求める。
【0052】
ステップ180では上記で演算した特徴量を用いて、黒領域を人物の頭部(頭髪部)と判断できるか、すなわち人物の頭部である確度が高いか否か判定する。この判定は、黒領域の輪郭から各々所定範囲内の円曲度をもつ凹部及び凸部が各々抽出され、黒領域の輪郭の周囲長に対する凹部及び凸部の長さの比率が各々所定範囲内にあり、更に位置及び方向より人物の頭部として整合性評価が高い場合に肯定される。この整合性評価は、一例として次のように行うことができる。まず凹部、凸部の単位での整合性を以下の手順で評価する。
【0053】
▲1▼ 凹部又は凸部の曲線上の任意の3点(例えば両端点と曲線の中央の点、但し同一直線上にない3点)を選択し、選択した3点を各々通る円を仮定し、該円の中心点を求める。
【0054】
▲2▼ 凹部又は凸部の曲線を構成する全画素と、前記円の中心点と、の距離を各々求め、距離のばらつきが所定値以下の曲線を整合性があると評価する。なお、ばらつきが所定値よりも大きい場合には評価対象から除外するか、曲率が大きくなっている部分で前記曲線を更に分割して再度処理を行う。
【0055】
次に凹部と凸部とを含めての整合性を以下のように評価する。
▲1▼ 凹部及び凸部の各曲線毎に求めた前記円の中心点の重心を用い、総合的な中心点及び総合的な中心エリア(各曲線の長さの平均に応じて定めた半径の円形のエリア、図9(B)に破線で示すエリア)を設定する。そして各曲線毎に求めた前記中心点が総合的な中心エリア内に収まっているか、又は各曲線の中心軸(方向ベクトルV又はその延長線)が前記中心エリア内に収束している場合に、人物の頭部としての整合性が高いと評価する。
【0056】
また、上記▲1▼の評価に代えて、先の▲2▼と同様にして、凹部及び凸部の曲線を構成する全画素と、前記円の中心点と、の距離のばらつきが各々所定値以下の場合に、人物の頭部としての整合性が高いと評価する。
【0057】
そして、ステップ180の判定が肯定された場合には、人物の頭髪部と顔との境界部分では、頭髪部が凹の形状となっている人物が殆どであることから、黒領域の輪郭の凹部の大きさ、及びその中心位置を基準とし、凹部に内接する楕円形状の領域を顔候補領域(人物の顔に相当すると推定される領域、請求項6に記載の抽出対象図形の特定部分(人物の顔)が存在すると推定される候補領域)として設定する。ステップ184では、上記で設定した顔候補領域に対し符号が正の重み係数を付与する。この重み係数は、先に説明した黒領域に対する人物の頭部としての評価結果に応じて、評価が高くなるに従って重みが重くなるように値を設定することができる。
【0058】
ステップ184を実行した後はステップ186に移行する。また、ステップ180の判定が否定された場合には、何ら処理を行うことなくステップ186へ移行する。ステップ186では、2値化によって抽出された全ての黒領域について上記処理を行ったか否か判定する。ステップ186の判定が否定された場合にはステップ172に戻り、ステップ172〜186を繰り返す。ステップ186の判定が肯定されると頭部抽出による顔候補領域設定処理を終了し、図2のフローチャートのステップ106に移行する。
【0059】
ステップ106では顔輪郭による顔候補領域設定処理を行う。この処理について図4のフローチャートを参照して説明する。ステップ189では、図2のフローチャートのステップ102において2値化により原画像を分割することによって得られた複数の黒領域及び白領域の各々に対し、先に説明した図3のフローチャートのステップ174、176と同様にして、各々の領域の輪郭をトレースし、輪郭の曲率を演算して凹部及び凸部を抽出する。これにより、一例として図10(A)に示す原画像について、図10(B)に示すような凹部及び凸部が抽出される。
【0060】
また凹部及び凸部を抽出した後に、凹部又は凸部として抽出した曲線のうち長さの長い曲線に優先的に着目し、曲率(角度θ)が所定範囲内に収まるように、或いは円曲度が所定値以下となるように、或いは曲線の法線方向の角度の大まかな分類により、前記曲線を更に分割するようにしてもよい。例えば図10(B)において曲線▲2▼と曲線▲3▼とが連続した曲線として抽出された場合、これらの円曲度が大であることから2本の曲線に分割する。図10(B)では曲線▲1▼も分割の対象となる。なお、以下では上記のようにして抽出された各領域の輪郭を分割して得られた曲線を総称して「ライン」という。
【0061】
ステップ190では、人物の顔の輪郭を表す形状パターン(請求項6に記載の部分形状パターン)として、人物の顔の側部に対応すると推定されるラインの対を抽出する。具体的には、上記で抽出されたラインのうち、互いの方向ベクトルVが向きあっており、互いの方向ベクトルV(又はその延長線)の交差角度の大きさが所定値以内であり、かつ長さ及び円曲度の類似度が所定値以上のラインの対を、顔輪郭の候補となり得るラインの対として全て抽出する。例えば、図10(B)に示す▲1▼〜▲7▼のラインが抽出された場合には、顔輪郭の候補となり得るライン対として、ライン▲2▼とライン▲4▼の対、及びライン▲5▼とライン▲7▼の対が抽出される。なお、V2、V4、V5、V7は各ラインの方向ベクトルである。
【0062】
次のステップ192では、上記で抽出したライン対の中から特定のライン対を取り出す。ステップ194では図10(D)に示すようにライン対の間に線対称軸を設定し、次のステップ196でライン対の線対称性類似度を判定する。この線対称性類似度の判定は、まず図10(D)に示すように、線対称軸に平行な方向に沿った両ラインの長さをv、線対称軸に直交する方向に沿った両ラインの間隔をhとし、縦横比v/hが人物の顔の縦横比に対応する所定範囲内の値であるか判定する。次に図11(A)に示すように、各ラインにマッチング用拡張エリアを設定し(ラインを中心に膨張させる処理等)、ライン対の一方に対し、線対称軸に関して対称な曲線エリアパターンを求め(図ではライン▲2▼と対称なライン▲2▼’)、求めた曲線エリアパターンと他方のライン拡張エリアパターンとの類似度を判定する。
【0063】
類似度の判定方法としては、例えば、マッチングを行うエリアパターン同士の対応する位置に存在する画素データ間の差分絶対値又は差分2乗値の累積値を演算し、この累積値が小であるほどエリア間類似度を大と判定することができる。また各画素のデータとしては、画像データそのもの、2値化データ、画像データを微分することにより得られたデータ等を用いることができる。
【0064】
ステップ198では、前記ライン対を人物の顔の両側部に対応するラインであると仮定したときに、頭部との境界に対応する位置に、方向ベクトルが垂直に近いラインが存在しているか探索する。例えば先に説明したライン▲2▼とライン▲4▼の対に対しては、頭部との境界に対応する位置として図11(B)に示す範囲52Aを探索し、この範囲52A内に存在する方向ベクトルが垂直に近いラインとしてライン▲3▼が抽出されることになる。また、ライン▲5▼と▲7▼の対に対しては、頭部との境界に対応する位置として図11(B)に示す範囲52Bを探索するので、頭部との境界に対応するラインは抽出されない。
【0065】
次のステップ200では前述の線対称性類似度の判定結果に基づいて、ステップ192で取り出したライン対を顔輪郭に対応するライン対と判断できるか否か判定する。ステップ200の判定が肯定された場合には、ライン対を人物の顔の両側部に対応するラインであるとみなし、図11(C)にも示すように、ライン対によって挟まれた領域に、ラインの長さv、両ラインの間隔hに応じた大きさの楕円形状の顔候補領域(請求項6に記載の抽出対象図形の特定部分が存在すると推定される候補領域)を設定する。
【0066】
ステップ202では上記で設定した顔候補領域に対し符号が正の重み係数を付与する。この重み係数は、線対称性類似度が高くなるに従って値が高くなり、頭部との境界に対応するラインが抽出された場合に値が高くなるように設定することができる。ステップ202の処理を実行するとステップ206に移行する。また、ステップ200の判定が否定された場合には、何ら処理を行うことなくステップ206に移行する。
【0067】
ステップ206では、ステップ190で抽出した全てのライン対に対して上記処理を行ったか否か判定する。ステップ206の判定が否定された場合にはステップ192に戻り、ステップ192〜206を繰り返す。ステップ206の判定が肯定されると、顔輪郭による顔候補領域設定処理を終了し、図2のフローチャートのステップ108に移行する。
【0068】
ステップ108では顔内部構造による顔候補領域設定処理を行う。この処理について図5のフローチャートを参照して説明する。なお、本実施形態では、人物の顔の内部構造を表す形状パターン(請求項6に記載の部分形状パターン)として、顔の眼部対に対応すると推定される黒領域の対を抽出する。すなわち、ステップ210では先に説明した2値化によって得られた黒領域のうち、眼部対候補となり得る黒領域対を抽出する。この黒領域対の抽出は、まず各黒領域の中から、図12(A)に示すように、長手方向(長軸方向)と幅方向(短軸方向)の寸法比(長軸短軸比)が所定範囲内の楕円形状の黒領域を複数探索する。次に探索した黒領域の各々の1次慣性モーメントに基づいて長軸方向の角度を求め、長軸方向の角度の差異が所定範囲内の黒領域の対を、眼部対の候補となり得る黒領域対として抽出する。
【0069】
ステップ212では上記で抽出した黒領域対の中から特定の黒領域対を取り出し、次のステップ214では、図12(B)に示すように、双方の黒領域の重心を結ぶ線に垂直な線対称軸を設定し、各黒領域を中心にマッチング用拡張エリアを設定し、ステップ216で黒領域対の線対称性類似度を判定する。次のステップ218では、上記で判定した黒領域対の線対称性類似度の判定結果に基づいて、ステップ212で取り出した黒領域対を眼部対と判断できるか否か判定する。
【0070】
ステップ218の判定が肯定された場合にはステップ220へ移行し、黒領域の位置、各々の大きさ及び線対称軸の方向に基づいて、図12(C)に示すように楕円形状の顔候補領域(請求項6に記載の抽出対象図形の特定部分が存在すると推定される候補領域)を設定する。次のステップ222では、上記で設定した顔候補領域に対し符号が正の重み係数を付与する。この重み係数は、線対称性類似度が高くなるに従って値が大きくなるように設定することができる。ステップ222の処理を実行するとステップ224に移行する。またステップ218の判定が否定された場合には、何ら処理を行うことなくステップ224に移行する。
【0071】
ステップ224では、ステップ210で抽出した全ての黒領域対に対して上記処理を行ったか否か判定する。ステップ224の判定が否定された場合にはステップ212に戻り、ステップ212〜224を繰り返す。ステップ224の判定が肯定されると、顔内部構造による顔候補領域設定処理を終了し、図2のフローチャートのステップ110へ移行する。
【0072】
ステップ110では胴体輪郭による顔候補領域設定処理を行う。この処理について図6のフローチャートを参照して説明する。なお、本実施形態では、胴体の輪郭を表す形状パターン(請求項6に記載の部分形状パターン)として、人物の首から肩、肩から腕部分又は胴体下部にかけて連続する輪郭に相当すると推定されるラインの対を抽出する。すなわち、ステップ230では先に説明した顔輪郭による顔候補領域設定処理によって抽出されたラインから、胴体輪郭の片側候補となり得るラインの組を抽出する。具体的には、双方のラインの端点の距離が近く、かつ双方のラインの交差する角度が所定範囲内のラインの対を、胴体輪郭の片側候補となり得るラインの組として抽出することができる。例えば図13(A)に示すようなラインが抽出されていた場合、図13(B)に示すように、交差する角度が各々所定範囲内(θ1及びθ2)のライン▲5▼と▲7▼の組、ライン▲6▼と▲8▼の組が各々抽出されることになる。
【0073】
次のステップ232では、上記で抽出されたラインの組の各々に対して双方のラインを延長して連結し、胴体輪郭の片側候補を生成する。更にステップ234では、上記で生成した胴体輪郭の片側候補に対し、胴体輪郭の候補となり得る全ての胴体輪郭の片側候補の対(例えば双方の胴体輪郭の片側候補の凹部が互いに向き合っている対)を抽出する。
【0074】
ステップ236では上記で抽出した胴体輪郭の片側候補の対の中から特定の対を取り出し、ステップ238では取り出した胴体輪郭の片側候補の対に対し、図13(B)に示すように線対称軸を設定し、次のステップ240で胴体輪郭の片側候補の対の線対称性類似度を判定する。また、人物の首から肩にかけての輪郭に相当すると推定されるライン(例えば図13(B)のライン▲5▼、▲6▼)について、線対称軸となす角度(例えば図13(B)のライン▲5▼の場合のψ1)が所定範囲内か否か判定する。ステップ242では上記で判定した線対称性類似度に基づいて、胴体輪郭の片側候補の対を胴体輪郭と判断できるか否か判定する。
【0075】
ステップ242の判定が肯定された場合には、ステップ244で胴体輪郭候補を構成する双方の片側候補の位置、大きさ、間隔及び線対称軸の方向に基づいて、図13(C)に示すように楕円形状の顔候補領域(請求項6に記載の抽出対象図形の特定部分が存在すると推定される候補領域)を設定する。また、ステップ250では上記で設定した顔候補領域に符号が正の重み係数を付与する。この重み係数は、ステップ240で判定した線対称性類似度が高くなるに従って値が大きくなるように設定することができる。ステップ240の処理が終了するとステップ248へ移行する。またステップ242の判定が否定された場合には、何ら処理を行うことなくステップ248に移行する。
【0076】
ステップ248では、ステップ234で抽出した全ての胴体輪郭の片側候補の対に対して上記処理を行ったか否か判定する。ステップ248の判定が否定された場合にはステップ236に戻り、ステップ236〜248を繰り返す。ステップ248の判定が肯定されると胴体輪郭による顔候補領域設定処理を終了し、図2のフローチャートのステップ112へ移行する。
【0077】
図2のフローチャートのステップ112では非人物領域判定処理を行う。この非人物領域判定処理について図7のフローチャートを参照して説明する。ステップ130では、図2のフローチャートのステップ102で分割された各領域に対し、輪郭の直線部分を各々検出し、ステップ132では、輪郭に占める直線部分の比率を各領域毎に演算する。ステップ134では前記比率が所定値以上の領域が有るか否か判定する。輪郭に占める直線部分の比率が所定値以上の領域は、人工物を表している領域である確率が高く、人物に相当する領域である確率は低いと判断できる。このため、ステップ134の判定が肯定された場合には、ステップ136で直線部分の比率が所定値以上の領域に対して符号が負の重み係数を付与し、ステップ138へ移行する。
【0078】
ステップ138では、各領域に対し、各領域における画像左右方向中心部付近に、画像の上下方向に沿って延びる線対称軸を設定し、ステップ140では上記で設定した線対称軸に関する線対称度を各領域毎に演算する。ステップ142では線対称度が所定値以下の領域が有るか否か判定する。一般に人体は、人体の左右を分割する仮想線に関して略線対称であり、線対称度が所定値以下の領域は人物に相当する領域である確率は低いと判断できる。このため、ステップ142の判定が肯定された場合には、ステップ144で線対称度が所定値以下の領域に対して符号が負の重み係数を付与し、ステップ146へ移行する。
【0079】
ステップ146では輪郭に占める画像外縁との接触率を各領域毎に演算し、ステップ148では接触率が所定値以上の領域が有るか否か判定する。前記接触率が所定値以上の領域は画像の周縁部に位置していると判断できるが、一般に人物は画像の略中央部に位置している確率が高いので、接触率が所定値以上の領域が人物に相当する領域である確率は低いと判断できる。このため、ステップ148の判定が肯定された場合には、ステップ150で画像外縁との接触率が所定値以上の領域に対して符号が負の重み係数を付与し、ステップ152へ移行する。
【0080】
ステップ152では各領域の内部の濃度のコントラスト(最大濃度値と最小濃度値との差)を演算し、ステップ154で濃度コントラストが所定値以下の領域が有るか否か判定する。領域内の濃度のコントラストが所定値以下の場合には、表面が平滑、或いは凹凸の少ない物体を表している領域である可能性が高く、人物に相当する領域である確率は低い。このため、ステップ154の判定が肯定された場合には、ステップ156で内部の濃度コントラストが所定値以下の領域に対して符号が負の重み係数を付与し、ステップ158へ移行する。
【0081】
ステップ158では、各領域の各画素毎の濃度値を各々異なる複数の方向(例えば画像の左右方向、上下方向、及び左右方向に対して±45°傾斜した方向)に沿って微分し、ステップ160で複数の方向に沿った微分値の少なくとも何れかが規則的に変化している領域が有るか否か判定する。上記判定は、濃度が所定のパターンで変化している領域や、濃度が所定の変化パターンを繰り返している領域に対して肯定される。このような領域は人物に相当する領域である確率は低いと判断できるので、ステップ160の判定が肯定された場合には、ステップ162で微分値が規則的に変化している領域に対し符号が負の重み係数を付与する。以上で非人物領域判定処理を終了し、図2のフローチャートのステップ118へ移行する。
【0082】
ステップ118では顔領域の総合判定を行う。すなわち、ステップ104〜110で各々顔候補領域として設定された範囲、各顔候補領域に対して付与された正の重み係数を用い、更にステップ112で負の重み係数が付与された領域があれば、該領域の範囲と付与された負の重み係数に基づいて、画像中の各部分の総合的な重み係数を演算する。詳しくは、画像中に複数の処理で重み係数が付与された部分があれば、該部分範囲及び総合的な重み係数(各処理で付与された重み係数を加算或いは乗算することにより求める、この総合的な重み係数は請求項6に記載の整合度に対応している)を求め、画像を総合的な重み係数が同一の領域毎に分割する。そして、総合的な重み係数が最も高い領域を、人物の顔領域に相当する領域である確度が最も高い領域として判定する。
【0083】
次のステップ120では、ステップ102〜118の処理を所定回実行したか否か判定する。ステップ120の判定が否定された場合には、ステップ122において、ステップ102の画像分割の粗密度を変更するために各種制御パラメータを更新し、或いはステップ102における2値化用のしきい値を更新し、ステップ102以降の処理を再度実行する。ステップ102〜118を所定回実行するとステップ120の判定が肯定され、ステップ124へ移行する。
【0084】
なお、上述したように画像分割の粗密度を変更して処理を繰り返す理由は、原画像中に存在する人物の顔に相当する領域の面積の大小(原画像中に存在する1人の人物に相当する領域の面積の大小)により、原画像を複数の領域に分割する際の各領域の適正な大きさが異なるためである。
【0085】
すなわち、原画像中に存在する人物の顔に相当する領域の面積が大きい場合には、原画像を密に分割(各領域の大きさを小さく)すると、本来の顔に相当する領域が細かく分割され過ぎ、人物の各部に対応する領域も細かく分割され過ぎるので、人物の各部に対応する領域が全体的に適正に分離されないが、原画像を粗く分割(各領域の大きさを大きく)すると、前記顔に相当する領域に対して一致度の高い分割領域を得ることができ、人物の各部に対応する領域を適正に分離することができる。
【0086】
一方、原画像中に存在する人物の顔に相当する領域の面積が小さい場合には、原画像を粗く分割すると、本来の顔に相当する領域が背景に相当する領域に紛れてしまい、人物の顔や各部に相当する領域を各々適正に分離することができないが、原画像を密に分割すると、人物の顔や各部に相当する領域を各々適正に分離できる。従って、画像分割の粗密度を段階的に変更しながら顔領域の抽出処理を複数回繰り返すことにより、原画像中に存在する人物の顔に相当する領域の大きさに拘わらず、人物の顔に相当する領域を高い確度で抽出することができる。
【0087】
なお、画像分割制御パラメータの変更は、例えば原画像の分割を、1次元又は2次元のヒストグラムを用いたクラスタリングにより行う場合は、ヒストグラム作成時にデータを量子化する際のしきい値のステップ幅を粗く(大きく)すると該ヒストグラムを用いて原画像を分割した結果も粗く(分割された領域の大きさが大きく)なり、前記しきい値のステップ幅を細かく(小さく)すると該ヒストグラムを用いて原画像を分割した結果も細かく(分割された領域の大きさが小さく)なることから、画像分割制御パラメータとして量子化する際のしきい値のステップ幅を用い、該しきい値のステップ幅を変更することで画像分割の粗密度を変更することができる。
【0088】
また、原画像の分割を、原画像を構成する各画素のうち隣接する画素との濃度差或いは色差の大きな画素を領域の境界とすることにより行う場合には、濃度差或いは色差が大きいと判定するためのしきい値を大きくすると原画像を分割した結果が粗く(分割領域の大きさが大きく)なり、前記しきい値を小さくすると原画像を分割した結果が細かく(分割領域の大きさが小さく)なることから、画像分割制御パラメータとして前記しきい値を用いることができる。
【0089】
また、原画像の分割では、その分割のしかたに拘わらず、原画像の解像度を粗くすれば原画像を分割した結果が粗くなり、解像度を細かくすれば原画像を分割した結果が粗くなることから、画像分割制御パラメータとして画像解像度を用いてもよい。画像解像度の変更の一例として、画像解像度を低下させる場合には、各々m×n個の画素から成る画素のブロック毎に、各ブロックを構成する全画素の各々の濃度又は色の平均を各ブロックの代表値とすることができる。なお、上記のように画像解像度を変更することにより画像分割の粗密度を変更する方式では、特に画像解像度を低下させると処理対象データの数が少なくなるため、処理時間を短縮できるというメリットもある。また、画像解像度の変更に代えて平滑化処理を行っても同様の効果が得られる。平滑化処理では、平滑化の程度を大きくするほど周辺画素との濃度、色の平均化が進み、解像度を低下させた場合と同様に原画像を分割した結果が粗くなる。
【0090】
ところで、ステップ124では所定回の処理で各々判定された顔領域及びそれらに各々付与されている重み係数に基づいて、最終的に人物の顔領域に相当する領域である確度が最も高い領域を先のステップ118と同様にして最終的に判定する。そして次のステップ126で判定結果として、最終的に判定した領域のR、G、Bの測光データを露光量演算部44へ出力し、顔領域抽出処理を終了する。
【0091】
上述した顔領域抽出処理では、人物の顔に相当すると推定される顔候補領域を、該領域の濃度や色に基づいて判断するものではない。従って、ネガフィルム12のフィルム種、光源の種類や逆光か否かの撮影条件等に応じて前記領域の色バランスが変化したとしても、顔領域抽出処理の結果がこの影響を受けて変化することはない。また、上述した顔領域抽出処理は原画像がモノクロ画像であっても適用可能である。更に、上述した顔領域抽出処理のうち、人物の各部に特有の形状パターンに基づいて顔候補領域を設定する処理(図2のフローチャートのステップ104〜110)は、基本的には各々凹部及び凸部の抽出と、線対称性類似度の判定と、で構成される。従って、これを利用してソフトウエア、ハードウエアの共通化を図れば、ソフトウエアの簡素化、ハードウエア構成の簡素化を実現することも可能となる。
【0092】
一方、露光量演算部44では、顔領域抽出部40で上記のようにして抽出されたR、G、Bの測光データと、平均濃度演算部42で演算された1コマの画面平均濃度D(i=R、G、Bの何れか)と、を用いて以下の式に従って適正露光量Eを演算し、ドライバ46に出力する。ドライバ46は適正露光量Eに基づいて、適正露光量に対応する位置に色補正フィルタ18を移動させる。
【0093】

Figure 0003576654
但し、各記号の意味は次の通りである。
【0094】
LM:倍率スロープ係数。ネガフィルムの種類とプリントサイズとで定まる引き伸ばし倍率に応じて予め設定されている。
【0095】
CS:カラースロープ係数。ネガフィルムの種類毎に用意されており、アンダ露光用とオーバ露光用とがある。プリントすべき画像コマの平均濃度が標準ネガ濃度値に対してアンダかオーバかを判定してアンダ露光用とオーバ露光用の何れかを選択する。
【0096】
DN:標準ネガ濃度値。
D :プリントすべき画像コマの濃度値。
【0097】
PB:標準カラーペーパに対する補正バランス値。カラーペーパの種類に応じて決定される。
【0098】
LB:標準焼付レンズに対する補正バランス値。焼付けに用いるレンズの種類に応じて決定される。
【0099】
MB:光源光量の変動やペーパ現像性能の変化に対する補正値(マスタバランス値)。
【0100】
NB:ネガフィルムの特性によって定まるネガバランス(カラーバランス)値。
【0101】
:カラー補正量。
:以下の式で表される濃度補正量。
【0102】
【数1】
Figure 0003576654
【0103】
ここで、Ka、Kbは定数であり、FDは顔領域平均濃度である。
また、上記(8)式の濃度補正量Kをフィルム検定装置によって求められた補正値とし、カラー補正量Kを次のように顔領域平均濃度を用いて表してもよい。
【0104】
【数2】
Figure 0003576654
【0105】
但し、Kcは定数である。
更に、上記(1)式の濃度補正量K、カラー補正量Kをフィルム検定装置によって求められた補正量とし、(1)式のプリントコマの平均濃度Dを顔領域の平均濃度FDに置き換えて露光量を求めてもよい。
【0106】
また、顔領域抽出処理において顔領域と判定された領域の各画素毎の濃度(又は色)に対し前記重み係数に応じて重み付けを行って加重平均値を求め、該加重平均値を用いて露光量Eを演算することにより、顔領域と判定された領域に対して付与された重み係数を露光量Eに反映させるようにしてもよい。
【0107】
なお、上記では原画像の記録媒体としてネガフィルム12を例に説明したが、ポジフィルム等の他のフィルムや、紙等の各種記録媒体に記録された画像を原画像として用いることが可能である。また、複写材料としてカラーペーパを例に説明したが、紙等の他の材料を適用してもよい。
【0108】
また、上記では頭部抽出による顔候補領域設定処理において、人物の頭部に特有の形状パターンとして、人物の頭頂部に対応する凸部及び人物の頭部と顔との境界に対応する凹部を用いていたが、これに限定されるものではない。例えば、頭髪のない頭部、頭髪の濃度の低い頭部を抽出するためには、2値化以外の方法による領域分割、或いは画像のエッジの検出を行い、頭部に特有の形状パターンとして凸部のみを用いて頭部を抽出するようにしてもよい。
【0109】
更に、上記では画像を複数の領域に分割する方法の一例として2値化を例に説明したが、これに限定されるものではなく、特開平4−346332号公報に記載されているようにヒストグラムを用いて分割してもよい。また、画像の各画素毎の濃度値を各々異なる複数の方向(例えば図14(A)に示すように、画像の左右方向(0°)、上下方向(90°)、及び左右方向に対して±45°傾斜した方向)に沿って微分することにより画像のエッジを検出し、上記実施形態で説明したラインに代えて、このエッジに対して周知の細線化処理を行って得られたエッジの中心線を用いて処理を行うようにしてもよい。
【0110】
なお、上記各方向に沿った微分は、図14(B)に示す4種類の微分フィルタを各々用いることで実現でき、画像のエッジの検出は、微分フィルタ出力の大きさが所定のしきい値よりも大きいときに、着目画素をエッジであるとみなすことができる。また、エッジ判定用のしきい値を段階的に変更しながらエッジ抽出処理を繰り返し実施するようにしてもよい。
【0111】
また、上記では顔の内部構造を表す形状パターンとして眼部対を用いた場合を例に説明したが、これに限定されるものではなく、鼻、口、眉毛の対等を用いたり、これらを組み合わせて総合的に顔候補領域を設定するようにしてもよい。
【0112】
更に、上記では胴体輪郭を表す形状パターンとして、人物の首から肩、肩から腕部分又は胴体下部にかけて連続する輪郭に相当するラインの対を抽出する例を説明したが、これに限定されるものではなく、人物の首から肩にかけての輪郭に相当するラインの対、及び人物の肩から腕部分にかけての輪郭に相当するラインの対を各々別個に検出するようにしてもよい。
【0113】
また、上記では人物の各部に特有の形状パターンに基づく顔候補領域の設定処理及び非人物領域判定処理(図2のフローチャートのステップ104〜112)を順次実行するようにしていたが、これらの処理は、各々他の処理による処理結果の影響を受けないので、上記各処理を行う処理部を別個に設け、前処理として複数領域への画像の分割又は画像のエッジの検出と、凹部、凸部の抽出と、を行った後に、各処理部で並列に処理するようにしてもよい。これにより、処理時間を大幅に短縮することができる。
【0114】
〔第2実施形態〕
次に本発明の第2実施形態について説明する。なお、本第2実施形態は第1実施形態と同一の構成であるので、各部分に同一の符号を付して構成の説明を省略し、以下では第2実施形態の作用について説明する。
【0115】
本第2実施形態では、画像上での人物を表す図形(請求項6の抽出対象図形に相当)の状態を複数の状態に予め分類している。なお、人物を表す図形の状態としては、例えば画像上での前記図形の大きさ(又は面積)、画像上での前記図形の向き(画像上において前記図形が表す人物の上下方向が何れの方向を向いているがか)、撮影時の視軸に対する被写体としての人物の角度(前記図形が表す人物が該人物の左右方向に沿って何れの方向を向いているか:この方向に応じて人物の顔の向きが正面、斜め、横と変化する)等が挙げられる。
【0116】
そして、例えば人物を表す図形の状態を、画像上での前記図形の大きさL又は面積Sに応じて分類する場合には、大きさLが大(L〜L)又は中(L〜L)又は小(L〜L)で分類するか、画像上での面積Sが大(S〜S)又は中(S〜S)又は小(S〜S)で分類することができる。また、画像上での前記図形の向きに応じて分類する場合は、例えば前記向きを90°単位又は45°単位で分類することができる。また、前記図形が表す人物の撮影時の視軸に対する角度に応じて分類する場合は、前記角度が正面か斜めか横かで分類することができる。更に、上記の人物を表す図形の大きさ、向き、前記図形が表す人物の撮影時の視軸に対する角度を組み合わせて分類するようにしてもよい。これにより、画像上での人物を表す図形の状態が、複数の状態に分類されることになる。
【0117】
また本第2実施形態では、人物の頭部の輪郭、顔の輪郭、顔の内部構造、胴体の輪郭等の人物を表す図形を構成する形状パターン(請求項6の部分形状パターンに対応)の各々に対し、各形状パターンを探索するための探索条件を規定する探索パラメータを、前記分類した複数の状態に応じて複数種類定めている。
【0118】
例として、画像上での人物を表す図形の状態を前記図形の大きさ又は面積に応じて分類した場合に、前記大きさ又は面積に応じて変更する探索パラメータとしては、画像解像度(又は画像分割の粗密度)、頭部輪郭を表す形状パターンを探索する際に黒領域の輪郭の曲率を演算するためのベクトルの長さ(図8(C)に示したベクトルP1P0、ベクトルP0P2の長さ)、頭部輪郭や顔輪郭や胴体輪郭として探索すべき輪郭の長さの許容範囲、線対称性類似度の演算時に演算対象とする候補対間の距離の許容範囲等が挙げられる。
【0119】
画像解像度については、先にも述べたように、人物を表す図形の大きさ又は面積が小さい場合には解像度を高くし、前記大きさ又は面積が大きい場合には解像度を低く(粗く)すればよい。またベクトルの長さについては、前記大きさ又は面積が小さい場合には短くし、前記大きさ又は面積が大きい場合には長くすればよく、また輪郭長の許容範囲及び線対称性類似度の演算対象とする候補対間距離の許容範囲についても、前記大きさ又は面積が小さい場合には短くし、前記大きさ又は面積が大きい場合には長くすればよい。
【0120】
また、画像上での人物を表す図形の状態を前記図形の向きに応じて分類した場合に、前記向きに応じて変更する探索パラメータとしては、顔輪郭を表す形状パターンの探索の際の線対象軸の方向(図10(D)参照)、顔内部構造としての眼部対を表す形状パターンの探索の際の線対象軸の方向(図12(B)参照)、胴体輪郭を表す形状パターンの探索の際の線対象軸の方向(図13(B)参照)等が挙げられる。前記向きに応じて上記パラメータを変更することにより、線対称性類似度の演算対象としての候補対の組み合わせ数が絞り込まれる。
【0121】
また、画像上での人物を表す図形の状態を前記図形が表す人物の撮影時の視軸に対する角度に応じて分類した場合に、前記角度に応じて変更する探索パラメータとしては、眼部対を表す形状パターンの探索の際の眼部候補領域間の距離(図12(B)参照)等が挙げられる。
【0122】
次に図15のフローチャートを参照し、本第2実施形態に係る顔領域抽出処理について、図2のフローチャートと異なる部分のみ説明する。
【0123】
本第2実施形態では、ステップ100で画像データの取込みを行った後に、ステップ101では前記分類した複数の状態のうち所定の状態に対応する探索パラメータを取り込む。なお、この所定の状態は、分類した複数の状態のうち、ネガフィルム12に記録された画像における出現頻度の最も高い状態(例えば、人物を表す図形の大きさ:中、前記図形の向き:人物の上下方向が画像の長手方向と一致する方向、前記図形が表す撮影時の視軸に対する人物の角度:正面)とされている。
【0124】
次のステップ102〜112では、ステップ101で取り込んだ探索パラメータに基づいて、第1実施形態と同様にして顔候補領域の設定を行う。前述のように、このステップ102〜112の処理で用いる探索パラメータは、先に分類した複数の状態のうち所定の状態に対応する探索パラメータであるので、探索対象としての形状パターンの範囲が絞り込まれており、第1実施形態と比較して短時間で処理が終了する。ステップ118では、第1実施形態と同様にして人物の顔領域に相当する領域である確度が高い領域の判定を行う。なお、ステップ118の処理は、請求項6に記載の、各候補領域毎に整合度を求め、抽出対象図形の特定部分としての人物の顔が存在している確度が高い候補領域を判断することに対応している。
【0125】
次のステップ119では、上記処理により、人物の顔に相当する領域である確度が非常に高い領域が抽出されたか否か判定する。この判定は、ステップ118の顔領域総合判定により演算された総合的な重み係数(請求項6の整合度)が所定値以上の顔候補領域があったか否かに基づいて判断することができる。上記判定が肯定された場合にはステップ124へ移行し、抽出された人物の顔に相当する領域である確度が非常に高い領域を顔領域と判定し、ステップ126で判定結果を出力して処理を終了する。
【0126】
一方、ステップ119の判定が否定された場合にはステップ121へ移行し、各状態に対応する全ての探索パラメータを用いて処理を行ったか否か判定する。判定が否定された場合にはステップ123へ移行し、処理未実行でかつ出現頻度の高い状態に対応する探索パラメータを取込み、ステップ102へ戻る。これにより、新たに取り込んだ探索パラメータに従ってステップ102以降の処理が繰り返される。
【0127】
このように、出現頻度の高い状態に対応する探索パラメータを順に用いて処理を繰り返すので、ステップ121の判定が肯定される前にステップ191の判定が肯定される、すなわち分類した各状態に対応する全ての探索パラメータが用いられる前に人物の顔に相当する領域である確度が非常に高い領域が抽出される可能性が高く、顔領域抽出処理の平均処理時間が短縮される。そしてステップ119又はステップ121の判定が肯定されると、第1実施形態と同様にステップ124で顔領域総合判定を行い、ステップ126で判定結果を出力して処理を終了する。
【0128】
なお、上記では撮影時の視軸に対する人物の角度に応じて変更する探索パラメータの一例として眼部候補領域間の距離を用いていたが、予め設定した顔候補領域に対し、眼部対に対応すると推定される領域を探索し、人物の顔としての整合性を判断する場合には、前記角度に応じて変更する探索パラメータとして、顔候補領域内における眼部候補領域の位置又は線対称軸の位置の偏倚度合い、眼部候補領域対間距離の顔候補領域の幅に対する比率等を適用し、前記角度に応じて前記各探索パラメータの許容範囲を変更するようにしてもよい。
【0129】
また、上記では複数種類の探索パラメータを順に用いて処理を行っていたが、これに限定されるものではなく、顔領域抽出部40に、図15のフローチャートにおけるステップ102〜118の処理を各々行う処理部を複数設け(図16参照)、各処理部において、各状態に対応する複数種類の探索パラメータのうちの何れかを各々用いて処理を並列に行わせるようにしてもよい。図16の例では、人物を表す図形の状態が状態1〜状態nのn個に分類され、これに応じてn個の処理部60〜60を設けており、図15のフローチャートにおけるステップ124の顔領域総合判定及びステップ126の判定結果出力は顔領域総合判定部62で行われる。上記のように構成した場合、各処理部60〜60による処理が非常に短い時間で完了するので、人物を表す図形の画像上での状態に拘わらず、顔領域抽出処理の処理時間を大幅に短縮することができる。
【0130】
更に、上記では抽出対象図形の特定部分として人物の顔に相当する領域を抽出する例を説明したが、本発明はこれに限定されるものではなく、抽出対象図形全体(上記の例では人物に相当する領域全体)を抽出するようにしてもよい。
【0131】
また、上記では、抽出対象図形として人物を表す図形を適用していたが、これに限定されるものではなく、例えば抽出対象図形として人工物を表す図形を適用してもよい。写真フィルムに記録される画像中に存在している人工物は、一般に形状等が未知であるが、人工物を表す図形の部分形状は、非人物領域判定処理(図7)でも説明したように、直線や一定曲率の円弧等で構成されていることが多いことが経験的に知られている。このため、これらを部分形状パターンとして用いれば、抽出対象図形としての人工物を表す図形を抽出することができる。そして、写真フィルムに記録された画像を複写材料に焼付ける場合には、例えば人工物を表す図形が存在している確度が高いと判断した領域の重みが小さくなるようにして複写材料への露光量を決定することができる。
【0132】
また、本発明を適用して図形を抽出する対象としての画像は、写真フィルムに記録された画像に限定されるものではない。一例として、部品や製品等の大量生産において、生産された部品や製品等が順に搬送されている状況を撮像すると共に、前記搬送されている状況を表す画像を撮像信号から所定のタイミングで抽出し、抽出した画像から、抽出対象図形としての前記部品や製品等を表す図形を抽出することも可能である。この場合、部品や製品等の形状は予め判明しているので、部分形状パターンは容易に定めることができる。また、本発明により抽出した抽出対象図形が存在する領域は、例えば生産した部品や製品等を自動的に検査するために用いることができる。
【0133】
以上本発明の実施形態について説明したが、上記実施形態は特許請求の範囲に記載した技術的事項以外に、以下に記載するような技術的事項の実施態様を含んでいる。
【0134】
(1)人物の頭部の輪郭を表す形状パターンを探索対象とする場合には、請求項3記載の発明により分割された領域の輪郭、又は請求項4記載の発明により求められたエッジの中心線より凹部と凸部を検出し、検出した1つ以上の凹部又は凸部の各々の特徴量(円曲度、位置、大きさ、方向)に基づいて、前記凹部又は凸部が人物の頭部の輪郭に対応しているか否かを判断することで、前記形状パターンを探索することを特徴とする露光量決定方法。
【0135】
(2)人物の顔の輪郭を表す形状パターンを探索対象とする場合には、請求項3記載の発明により分割された領域の輪郭、又は請求項4記載の発明により求められたエッジの中心線より凹部と凸部を検出し、検出した2つ以上の凹部又は凸部の各々の特徴量(円曲度、位置、大きさ、方向)の関係に基づいて、線対称の度合いにより前記2つ以上の凹部又は凸部が人物の顔の輪郭に対応しているか否かを判断することで、前記形状パターンを探索することを特徴とする露光量決定方法。
【0136】
(3)人物の顔構造を表す形状パターンのうち眼部対を表す形状パターンを探索対象とする場合には、請求項3記載の発明により分割された領域、又は請求項4記載の発明により求められたエッジの中心線により分割される領域のうち楕円形状の領域を抽出し、抽出された複数の楕円領域の各々の特徴量(形状、濃度)を用いたマッチング処理により所定値以上の類似度の楕円領域の対を検出し、検出した楕円領域の対の線対称の度合いにより前記楕円領域の対が人物の顔の眼部対に対応しているか否かを判断することで、前記形状パターンを探索することを特徴とする露光量決定方法。
【0137】
(4)人物の胴体の輪郭を表す形状パターンを探索対象とする場合には、請求項3記載の発明により分割された領域の輪郭、又は請求項4記載の発明により求められたエッジの中心線より凹部と凸部を検出し、検出した2つ以上の凹部又は凸部の各々の特徴量(円曲度、位置、大きさ、方向)の関係に基づいて、人物の首から肩にかけての輪郭、及び肩から腕部分又は胴体下部にかけての輪郭に相当する凹部又は凸部の組を複数検出し、更にその組同士の線対称の度合いにより人物の胴体の輪郭に対応しているかを判断することで、前記形状パターンを探索することを特徴とする露光量決定方法。
【0138】
(5)原画像中の人物の顔に相当する確度の低い領域として、請求項3記載の発明により分割された領域、又は請求項4記載の発明により求められたエッジの中心線により分割される領域のうち、領域の輪郭に含まれる直線部分の比率が所定値以上の領域、又は線対称度が所定値以下の領域、又は凹凸数が所定値以上の領域、又は画像外縁との接触率が所定値以上の領域、又は内部の濃度のコントラストが所定値以下の領域、又は内部の濃度が所定のパターンで変化している、或いは所定の変化パターンを繰り返している領域を判定することを特徴とする露光量決定方法。
【0139】
【発明の効果】
以上説明したように請求項1記載の発明は、原画像中に存在する人物の所定の部分に特有の形状パターンを探索し、検出した形状パターンの大きさ、向き及び検出した形状パターンとの位置関係に応じて人物の顔に相当すると推定される領域を設定し、設定した領域に重み係数を付与することを、人物の各部に特有の形状パターンの各々を探索対象として各々行い、人物の顔に相当すると推定される領域として設定した複数の領域の各々の範囲、及び複数の領域に各々付与した重み係数に基づいて原画像中の人物の顔に相当する確度が最も高い領域を判断し、判断した領域の色又は濃度の少なくとも一方に基づいて露光量を決定するので、原画像中の人物の顔に相当する領域及びその周辺の領域の色の影響を受けることなく人物の顔に相当する領域のみを抽出し、該領域を適正に焼付けできるように露光量を決定できる、という優れた効果を有する。
【0140】
請求項3記載の発明は、原画像を濃度又は色が同一又は近似している複数の画素で構成される複数の領域に分割し、該複数の領域の各々の輪郭を用いて形状パターンを探索するので、人物の各部に特有の形状パターンを効率良く検出できる、という効果を有する。
【0141】
請求項4記載の発明は、原画像中に存在するエッジを検出し、検出したエッジの中心線を求め、求めた中心線を用いて形状パターンを探索するので、人物の各部に特有の形状パターンを効率良く検出できる、という効果を有する。
【0142】
請求項5記載の発明は、人物の顔に相当すると推定される領域に符号が正の重み係数を付与すると共に、原画像中の人物の顔に相当する確度の低い領域を判定し、判定した領域に符号が負の重み係数を付与するようにしたので、人物の顔に相当する確度が最も高い領域として人物の顔に相当する領域が抽出される確率が更に向上する、という効果を有する。
【0143】
請求項6記載の発明は、抽出対象図形を構成する特徴的な複数の部分形状に基づいて複数の部分形状パターンを予め定めておき、部分形状パターンを探索し、検出した部分形状パターンの大きさ、方向、及び抽出対象図形における前記部分形状パターンが表す部分形状の位置に応じて画像中の抽出対象図形の特定部分又は全体が存在すると推定される候補領域を設定することを、複数の部分形状パターンの各々について行い、各候補領域毎に求めた整合度に基づいて抽出対象図形の特定部分又は全体が存在している確度が高い候補領域を判断するようにしたので、画像中に存在する抽出対象図形を、抽出対象図形が存在する領域、及びその周辺の領域の色の影響を受けることなく適正に抽出することができる、という優れた効果を有する。
【0144】
請求項7記載の発明は、複数の部分形状パターンの各々に対し探索条件を規定するパラメータとして、画像上での抽出対象図形の状態に応じて複数種類のパラメータを予め定めておき、部分形状パターンを探索し、候補領域を設定することを複数の部分形状パターンの各々について行い、抽出対象図形が存在している確度が高い候補領域を整合度に基づいて判断して抽出する処理を、複数の状態に対応する複数種類のパラメータの各々を用いて行うか、又は、所定の状態に対応するパラメータを用いて前記処理を行った結果、抽出対象図形が存在している確度が高いと判断した候補領域が無かった場合は、所定の状態と異なる状態に対応するパラメータを用いて前記処理を行うことを繰り返し、抽出対象図形が存在している確度が高いと判断した候補領域が有った場合に前記処理を終了するようにしたので、上記効果に加え、処理時間を短縮することができる、という効果を有する。
請求項9記載の発明は、原画像中に存在する人物の所定の部分に特有の形状パターンを探索し、検出した形状パターンの大きさ、向き及び人物の顔と前記所定の部分との位置関係に応じて人物の顔に相当すると推定される領域を設定し、設定した領域に重み係数を付与することを、人物の各部分に特有の複数種類の形状パターンを探索対象として各々行い、人物の顔に相当すると推定される領域として設定した複数の領域の各々の範囲、及び前記複数の領域に各々付与した重み係数に基づいて、原画像中の人物の顔に相当する確度が最も高い領域を判断するので、原画像中の人物の顔に相当する領域及びその周辺の領域の色の影響を受けることなく、人物の顔に相当する領域の抽出精度を向上させることができる、という優れた効果を有する。
【図面の簡単な説明】
【図1】本実施形態に係る写真焼付装置の概略構成図である。
【図2】第1実施形態に係る顔領域抽出部で実行される顔領域抽出処理のメインルーチンを説明するフローチャートである。
【図3】頭部抽出による顔候補領域設定処理を説明するフローチャートである。
【図4】顔輪郭による顔候補領域設定処理を説明するフローチャートである。
【図5】顔内部構造による顔候補領域設定処理を説明するフローチャートである。
【図6】胴体輪郭による顔候補領域設定処理を説明するフローチャートである。
【図7】非人物領域判定処理を説明するフローチャートである。
【図8】頭部抽出による顔候補領域設定処理の詳細として、(A)は原画像、(B)は2値化により抽出された黒領域の輪郭のトレース、(C)は輪郭の曲率の演算、(D)は凹部及び凸部の抽出を各々説明するためのイメージ図である。
【図9】頭部抽出による顔候補領域設定処理の詳細として、(A)は凹部及び凸部の特徴量の演算、(B)は頭部の判定、(C)は顔候補領域の設定を各々説明するためのイメージ図である。
【図10】顔輪郭による顔候補領域設定処理の詳細として、(A)は原画像、(B)は凹部及び凸部の抽出・分割、(C)は顔輪郭の候補となり得る対の抽出、(D)は線対称性類似度の判定を各々説明するためのイメージ図である。
【図11】顔輪郭による顔候補領域設定処理の詳細として、(A)は線対称性類似度の判定、(B)は頭部との境界の探索、(C)は顔候補領域の設定を各々説明するためのイメージ図である。
【図12】顔構造による顔候補領域設定処理の詳細として、(A)は眼部の候補となり得る黒領域の抽出、(B)は黒領域対の線対称類似度の判定、(C)は顔候補領域の設定を各々説明するためのイメージ図である。
【図13】胴体輪郭による顔候補領域設定処理の詳細として、(A)は前処理で抽出されたライン、(B)は線対称性類似度の判定、(C)は顔候補領域の設定を各々説明するためのイメージ図である。
【図14】(A)はエッジ検出における微分方向の一例を示す概念図、(B)は各方向への微分を行うための微分フィルタの一例を示す概念図である。
【図15】第2実施形態に係る顔領域抽出処理を説明するフローチャートである。
【図16】顔領域抽出処理を並列に実行するための顔領域抽出部の構成の一例を示す概略ブロック図である。
【符号の説明】
10 写真焼付装置
12 ネガフィルム
18 色補正フィルタ
28 カラーペーパ
32 CCDイメージセンサ
40 顔領域抽出部
44 露光量演算部[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention provides a method for determining an exposure amount,Figure extraction methodAnd face area judgment methodIn particular,A face area determining method for determining an area corresponding to the face of a person present in the original image,An exposure determining method for determining an area corresponding to a person's face existing in an original image and determining an exposure so that the determined area is printed in an appropriate color, and an area in which a graphic to be extracted exists from the image To extract a figure.
[0002]
Problems to be solved by the prior art and the invention
The most noticeable part when viewing a portrait is the face of a person.For example, when printing an original image recorded on a film or the like on a copy material such as photographic paper, the color of the face of the person is appropriate. It is necessary to determine the exposure amount so that the image is printed.
[0003]
For this reason, the present applicant divides the film image into a plurality of predetermined fixed regions based on an empirical rule that in a portrait photograph, the probability that the person is located substantially at the center of the image is high. , Weighting each area so that the weight of the area located substantially at the center of the image becomes heavier, obtaining a weighted average value of the densities of the three colors in each area, and determining the exposure amount based on the weighted average value (See Japanese Patent Application Laid-Open No. 63-80242). However, in the above, if the person is actually located in the vicinity of the approximate center of the image, it is possible to obtain an exposure amount at which the person is printed with an appropriate color, but the person greatly deviates from the center of the image. There is a problem that an appropriate amount of exposure cannot be obtained when it is located at the position.
[0004]
In addition, the present applicant divides a color original image into a large number of pixels, decomposes each pixel into three colors of R, G, and B, performs photometry, and obtains a histogram of hue values (and saturation values) based on photometric data. Is obtained, the obtained histogram is divided for each mountain, it is determined to which of the divided mountains each pixel belongs, and each pixel is divided into a group corresponding to the divided mountain, and a plurality of color original images are provided for each group. (So-called clustering), an area corresponding to a person's face among the plurality of areas is estimated, and an exposure amount is determined based on photometric data of the estimated area (JP-A-Hei. 4-346332).
[0005]
Japanese Patent Application Laid-Open No. Hei 6-160993 discloses that in order to improve the accuracy of extracting a region corresponding to a person's face, a region in contact with the outer edge of an image is determined as a background region and removed or extracted. Converting the area into a line figure and determining whether or not the extracted area is an area corresponding to a person's face based on the shape of a nearby area located around the extracted area and the shape of the extracted area Are also described.
[0006]
However, in the above, a flesh color region such as the ground or a tree trunk is present in the original image, and the hue and saturation of the flesh color region are the same as those of the region corresponding to the face of the person in the original image. If they are similar, there is a possibility that this region is erroneously determined as a region corresponding to a human face. Also, if this skin color area is adjacent to the area corresponding to the face of the person, the skin color area cannot be separated from the area corresponding to the face of the person, and the original image may not be divided into areas within an appropriate range. Was. In the above prior art, the processing is performed on the assumption that any of the divided regions is a region corresponding to the face of a person. Therefore, if the original image cannot be divided into regions in an appropriate range, There is a problem that an area corresponding to the face of the person is erroneously determined, and it is not possible to obtain an exposure amount that can properly print the face of the person.
[0007]
In addition, the problem of erroneously determining a region to be extracted when the original image cannot be divided into regions within an appropriate range is not limited to the extraction of a region corresponding to a person's face, but a specific region from an image. This is a common problem when extracting a region where a figure exists. That is, even if the color or the like of the specific graphic to be extracted is known in advance, there is an area where the hue and saturation of the specific graphic are similar in the image, or the area corresponds to the specific graphic. In such a case, for example, there is a problem that an area where a specific graphic exists cannot be properly extracted.
[0008]
The present invention has been made in consideration of the above fact, and extracts only an area corresponding to a person's face without being affected by the color of an area corresponding to the person's face in the original image and the surrounding areas. It is an object of the present invention to provide an exposure amount determining method capable of determining an exposure amount so that the region can be properly printed.
[0009]
Further, according to the present invention, it is possible to obtain a graphic extraction method capable of properly extracting an extraction target graphic existing in an image without being affected by the colors of the area where the extraction target graphic exists and the surrounding area. Is the purpose.
Also, the present invention provides a face area determining method capable of improving the extraction accuracy of an area corresponding to a person's face without being affected by colors of an area corresponding to a person's face in an original image and surrounding areas. The purpose is to obtain
[0010]
[Means for Solving the Problems]
In order to achieve the above object, an exposure amount determining method according to the invention described in claim 1 searches for a shape pattern specific to a predetermined portion of a person present in an original image, and detects the size and orientation of the detected shape pattern. And setting an area estimated to correspond to a person's face according to the positional relationship between the person's face and the predetermined part, and assigning a weighting coefficient to the set area, a plurality of parts specific to each part of the person. Each type of shape pattern is performed as a search target, and based on the respective ranges of the plurality of regions set as the regions estimated to correspond to the face of a person and the weighting factors assigned to the plurality of regions, the original image The area corresponding to the face of the person having the highest accuracy is determined, and the exposure amount to the copy material is determined based on at least one of the color and the density of the determined area.
[0011]
According to a second aspect of the present invention, in the first aspect of the invention, the shape pattern peculiar to each part of the person is a shape pattern representing a contour of a person's head, a shape pattern representing a contour of a person's face, or a person's face. And a shape pattern representing the outline of the body of the person.
[0012]
According to a third aspect of the present invention, in the first aspect of the present invention, the search for the shape pattern is performed by dividing the original image into a plurality of regions each including a plurality of pixels having the same or similar density or color. It is characterized in that the process is performed using the outline of each of the plurality of regions.
[0013]
According to a fourth aspect of the present invention, in the first aspect, the search for the shape pattern is performed by detecting an edge present in the original image, obtaining a center line of the detected edge, and using the obtained center line. It is characterized by:
[0014]
According to a fifth aspect of the present invention, in the first aspect of the invention, a positive weighting coefficient is assigned to a region estimated to correspond to the set face of the person, and the area corresponds to the face of the person in the original image. It is characterized in that a region having a low degree of accuracy is determined, and a negative weighting coefficient is assigned to the determined region.
[0015]
According to the graphic extracting method of the present invention, a plurality of partial shape patterns are determined in advance based on a plurality of characteristic partial shapes constituting an extraction target graphic, and a partial shape pattern existing in an image is searched for. A candidate for which it is presumed that a specific portion or the whole of the extraction target graphic in the image exists according to the size and direction of the detected partial shape pattern and the position of the partial shape represented by the partial shape pattern in the extraction target graphic Setting an area is performed for each of the plurality of partial shape patterns, and for each set candidate area, a specific portion or the entirety of the extraction target graphic exists based on the relationship with the detected each partial shape pattern. The degree of matching as a region is determined, and based on the degree of matching determined for each candidate region, a candidate region having a high probability that a specific portion or the entirety of the extraction target graphic exists is determined. And the accuracy of a particular part or all are present in the extracted target figure to extract candidate regions judged to be high.
[0016]
According to a seventh aspect of the present invention, in the invention of the sixth aspect, the states of the extraction target graphic on the image are classified into a plurality of states in advance, and a partial shape A plurality of types of parameters are determined in advance in accordance with the plurality of classified states as parameters that define search conditions when searching for a pattern, a partial shape pattern present in an image is searched, and the candidate area is set. Processing for each of the plurality of partial shape patterns, obtaining a degree of consistency for each set candidate area, and determining and extracting a candidate area having a high probability that a specific portion or the entirety of the extraction target graphic exists is extracted. Is performed using each of a plurality of types of parameters corresponding to the plurality of states, or the processing is performed using a parameter corresponding to a predetermined state among the plurality of states. As a result, if there is no candidate area determined to have a high probability that the specific portion or the whole of the extraction target graphic exists, the process is performed using parameters corresponding to a state different from the predetermined state. This process is repeated, and when there is a candidate area determined to have a high probability that the specific part or the whole of the extraction target graphic exists, the processing is terminated.
[0017]
In the invention according to claim 8, in the invention according to claim 7, the state of the extraction target graphic on the image includes the size of the extraction target graphic on the image, the orientation of the extraction target graphic on the image, and the extraction. It is characterized by including at least one of the directions of the object represented by the target graphic.
According to a ninth aspect of the present invention, there is provided a face area determination method, wherein a shape pattern specific to a predetermined portion of a person existing in an original image is searched for, and the size, direction, and face of the detected shape pattern and the face of the person are detected. A region that is presumed to correspond to the face of a person is set according to the positional relationship with the portion, and a weighting factor is assigned to the set region, and a plurality of types of shape patterns unique to each portion of the person are searched. Based on the respective ranges of the plurality of regions set as the regions estimated to correspond to the person's face, and the weights assigned to the plurality of regions, respectively, and correspond to the person's face in the original image. Determine the region with the highest accuracy.
[0018]
According to the first aspect of the present invention, a shape pattern specific to each part of the person existing in the original image is searched, and the face of the person is determined according to the size and direction of the detected shape pattern and the positional relationship with the detected shape pattern. Is set to be equivalent to. The shape pattern specific to each part of the person includes, for example, a shape pattern representing the contour of the head of the person, a shape pattern representing the contour of the face of the person, and the inside of the face of the person. A shape pattern representing the structure, a shape pattern representing the contour of the body of the person, or the like can be used.
[0019]
For example, a region on the original image corresponding to the head (hair portion) of a person has, on its contour, a convex portion having a predetermined curvature corresponding to the top of the person, and a human head below the convex portion. And a concave portion having a predetermined curvature corresponding to the boundary between the face and the face. Therefore, for the head of a person, for example, a convex portion having a predetermined curvature and a concave portion having a predetermined curvature can be used as a specific shape pattern representing the contour of the head. Then, when the above-mentioned shape pattern is detected in the original image, an area estimated to correspond to the face of a person can be set as follows, for example.
[0020]
That is, the face of the person exists at a position adjacent to the lower side of the head (the concave side of the shape pattern), and its size is substantially proportional to the size of the head, and the direction of the head is further Match the orientation. In general, the contour of the face of a person is substantially elliptical. Therefore, when a shape pattern representing the contour of the head described above is detected in the original image, the size and the direction according to the size and the direction of the detected shape pattern and the head and the face of the person are detected. , An elliptical area may be set at a position corresponding to the positional relationship with, and the area may be an area estimated to correspond to a human face.
[0021]
As described above, according to the first aspect of the present invention, it is estimated that the shape corresponds to the face of a person according to the size and direction of the shape pattern specific to each part of the person detected from the original image and the positional relationship with the detected shape pattern. Since an area corresponding to a person's face is set, it is possible to appropriately set an area estimated to correspond to a person's face without being affected by the color of an area corresponding to the person's face and surrounding areas. Conversely, even if the original image does not have an area corresponding to the face of a person but includes a skin color area having a contour similar to the face area, it is possible to prevent erroneous determination of the area corresponding to the face of the person. it can.
[0022]
According to the first aspect of the present invention, each of a plurality of types of shape patterns specific to each part of a person is set as a search target, and a region estimated to correspond to a person's face set based on each detected shape pattern is weighted. Coefficients are assigned to each of a plurality of regions set as regions estimated to correspond to a person's face, and a weight coefficient assigned to each of the plurality of regions corresponds to a person's face in the original image. The area with the highest accuracy is determined. As described above, by performing the processing a plurality of times with each of the plurality of shape patterns unique to each part of the person as a search target, even if the predetermined shape pattern is accidentally detected in the non-human area in the original image, it is detected by accident. An area set based on the shape pattern is not determined as an area having the highest accuracy corresponding to a human face. Since the amount of exposure to the copy material is determined based on at least one of the color and the density of the region determined in this manner, the amount of exposure can be determined so that the region corresponding to the face of a person can be properly printed. .
[0023]
In the search for the shape pattern, for example, as described in claim 3, the original image is divided into a plurality of regions composed of a plurality of pixels having the same or similar density or color, and each of the plurality of regions is Can be performed using the contour of When an image is divided into a plurality of regions as described above, a plurality of regions having a high probability that a shape pattern specific to each part of a person is included in a contour or the like, such as a boundary between a person and a background, is obtained. Therefore, a shape pattern specific to each part of the person can be efficiently detected from the outlines of the plurality of regions.
[0024]
The original image is divided into one-dimensional histograms of hue values or two-dimensional histograms of hue values and saturation values based on photometric data of three colors for each pixel of the original image, for example, as disclosed in JP-A-4-346332. A dimensional histogram is obtained, the obtained histogram is divided for each mountain, it is determined to which of the divided mountains each pixel belongs, each pixel is divided into groups corresponding to the divided mountain, and the original image is divided for each group. It can be divided into multiple areas. Alternatively, the original image may be divided into a plurality of regions by setting a pixel having a large density difference or color difference between adjacent pixels among the pixels constituting the original image as a region boundary. Further, the original image may be divided into a plurality of regions by performing binarization, or the binarization may be performed a plurality of times using a plurality of thresholds having different values, and may be further divided. It may be divided into a plurality of areas by the above combination.
[0025]
In the present invention, the area divided as described above is used to detect a plurality of shape patterns specific to each part of the person, and the setting of the area estimated to correspond to the face of the person is set as described above. This is performed according to the size and orientation of the shape pattern detected from the original image and the positional relationship with the detected shape pattern. Therefore, even if a part of the plurality of shape patterns cannot be detected from the outlines of the plurality of regions, it is possible to set the region estimated to correspond to the face of the person, and, as in the related art, to the plurality of divided regions. Does not need to match the area corresponding to the face of the person.
[0026]
Further, the search for the shape pattern may be performed by previously detecting an edge present in the original image, determining a center line of the detected edge, and using the determined center line. Good. The edge can be detected by, for example, performing differentiation or the like on the density or color of each pixel, and the center line of the edge can be obtained by, for example, a known process such as thinning or ridge detection. . Since there is a high probability that an edge present in an image includes a specific shape pattern in each part of the person, it is possible to efficiently detect a shape pattern specific to each part of the person as in the invention of claim 3. Can be.
[0027]
By the way, an image may include an area having a feature that can be determined to be low in the area corresponding to a person. For example, a region where the ratio of the straight line portions included in the contour is equal to or more than a predetermined value has a high probability of being a region representing an artifact. Further, the human body is substantially line-symmetric with respect to a virtual line dividing the left and right of the human body, but a region where the degree of line symmetry is equal to or less than a predetermined value has a low probability of being a region corresponding to a person. Also, it can be determined that the probability that the region having the number of irregularities is equal to or more than the predetermined value is a region corresponding to a person is low. In addition, since a person is generally more likely to be located substantially at the center of an image, it can be determined that a region having a contact ratio with the outer edge of the image that is equal to or greater than a predetermined value is also located at the periphery of the image. Is low.
[0028]
Further, when the contrast of the density in the region is equal to or less than a predetermined value, it is highly likely that the region is a region representing an object having a smooth or less uneven surface, and the probability of being a region corresponding to a human face is low. . Furthermore, even when the density in the area changes in a predetermined pattern or when the density in the area repeats a predetermined change pattern, it can be determined that the probability that the area corresponds to a person is low. Therefore, as described in claim 5, a sign is assigned a positive weighting coefficient to an area estimated to correspond to the set face of the person, and the probability of the area corresponding to the face of the person in the original image is low. If the area is determined and a negative weighting coefficient is assigned to the determined area, the probability that the area corresponding to the person's face is extracted as the area having the highest accuracy corresponding to the person's face is further improved.
[0029]
In the invention according to claim 6, a plurality of partial shape patterns are determined in advance based on a plurality of characteristic partial shapes constituting the extraction target graphic existing in the image. Note that the extraction target graphic is not limited to a figure representing a person, and may be an object other than a person, for example, a figure representing an artificial object, but when a figure representing a person is applied as the extraction target figure, As the partial shape pattern, similarly to claim 2, a shape pattern representing a contour of a person's head, a shape pattern representing a contour of a person's face, a shape pattern representing an internal structure of a person's face, a body of a person Can be used.
[0030]
According to the invention of claim 6, next, a partial shape pattern existing in the image is searched, and the size and direction of the detected partial shape pattern and the position of the partial shape represented by the partial shape pattern in the extraction target graphic are determined. Setting a candidate area in which a specific portion or the entirety of the extraction target graphic in the image is assumed to exist is performed for each of the plurality of partial shape patterns. As a result, similarly to the first aspect, it is presumed that the specific portion or the entirety of the extraction target graphic exists without being affected by the color of the region where the specific portion or the entirety of the extraction target graphic exists and the surrounding area. Can be set appropriately. As a specific part of the extraction target graphic, for example, when a figure representing a person is applied as the extraction target graphic, a part corresponding to the face of the person can be applied.
[0031]
According to the invention of claim 6, next, for each of the set candidate regions, a specific portion of the extraction target graphic is determined based on the relationship (for example, both size, direction, positional relationship, etc.) with each detected partial shape pattern. Alternatively, the degree of consistency as a region where the entirety exists is determined, and based on the degree of consistency determined for each candidate region, a candidate region having a high probability that a specific portion or the entirety of the extraction target graphic exists is determined, and the extraction target is determined. A candidate area determined to have a high probability that a specific part or the whole of the figure exists is extracted.
[0032]
As described above, the matching degree as a region where the specific portion or the whole of the extraction target graphic exists is obtained for each candidate region, and the candidate region having a high probability that the specific portion or the whole of the extraction target graphic exists is determined. Therefore, even if the candidate region set based on the detection result of a certain partial shape pattern is a region where the extraction target graphic does not exist, it is determined that the specific region or the entirety of the extraction target graphic exists. The extraction target graphic existing in the image can be properly extracted without being affected by the colors of the area where the extraction target graphic exists and the surrounding area.
[0033]
Incidentally, the partial shape of the extraction target graphic on the image changes depending on the state of the extraction target graphic on the image (for example, the size of the extraction target graphic on the image, the orientation of the object represented by the extraction target graphic, and the like). For this reason, when the state of the extraction target graphic on the image is indefinite, the search conditions for searching the partial shape pattern are set so that the partial shape of the extraction target graphic in various states is detected as the partial shape pattern. There is a need to. However, when the range of the partial shape to be detected as the partial shape pattern is expanded, a large number of patterns are detected as the partial shape pattern, and the partial shape pattern is erroneously determined as the partial shape pattern even though it is not actually the partial shape of the extraction target graphic. There is a problem that the number of detected patterns also increases rapidly, and the processing time significantly increases.
[0034]
For this reason, in the invention according to claim 7, the state of the extraction target graphic on the image is classified into a plurality of states in advance, and when searching for a partial shape pattern for each of the plurality of partial shape patterns, A plurality of types of parameters are determined in advance according to the plurality of classified states as parameters defining the search condition. The state of the extraction target graphic on the image includes the size of the extraction target graphic on the image, the orientation of the extraction target graphic on the image, and the extraction target graphic as described in claim 8. The orientation of the object to be represented, and the like. In the above description, the search conditions (parameters for defining) are determined for each type of the graphic to be extracted on the image. Therefore, the range of the partial shape to be detected as the partial shape pattern in each search condition is narrowed, If the search is performed using the search condition, the partial shape pattern of the extraction target graphic in a specific state is searched in a very short time.
[0035]
After defining a plurality of types of parameters, for example, a search for a partial shape pattern and setting of a candidate area are performed for each of the plurality of partial shape patterns, a matching degree is obtained for each of the set candidate areas, and a target pattern to be extracted is specified. In the case where a plurality of processing units for performing a process of judging and extracting a candidate region having a high probability of the existence of a part or the whole are provided, in each processing unit, any one of a plurality of types of parameters corresponding to each state is used. By performing the processing in parallel by using, the processing can be performed using each of the plurality of types of parameters as a whole. Thus, regardless of the state of the extraction target graphic on the image, it is possible to extract a candidate region having a high probability that the specific part or the whole of the extraction target graphic exists, in a very short time.
[0036]
In addition, as a result of performing the above-described processing using the parameter corresponding to the predetermined state among the plurality of states, there is no candidate area determined to have a high probability that the specific part or the whole of the extraction target graphic exists. Repeats the above process using parameters corresponding to a state different from the predetermined state, and there is a candidate area determined to have a high probability that the specific part or the whole of the extraction target graphic exists. The above process may be terminated at this time. In this case, the processing corresponding to each state is performed in series, but before performing all the processing corresponding to each state, a candidate area having a high probability that a specific part or the whole of the extraction target graphic exists is determined. The possibility of extraction is high. Therefore, the extraction target graphic can be extracted in a shorter time than when a plurality of types of search condition parameters are not determined according to the state of the extraction target graphic on the image.
Further, in the above, if the search is performed by using the parameter corresponding to the state of high appearance frequency in order according to the appearance frequency of the extraction target graphic on the image, the time until the extraction target graphic is extracted is further reduced. Can be shortened.
[0037]
According to the ninth aspect of the present invention, similarly to the first aspect of the present invention, a shape pattern specific to a predetermined portion of a person existing in the original image is searched for, and the size, direction, and size of the detected shape pattern are determined. Setting an area estimated to correspond to the face of a person according to the positional relationship between the face and the predetermined part, and assigning a weighting factor to the set area, a plurality of types of shapes specific to each part of the person Each of the patterns is performed as a search target, and based on the respective ranges of the plurality of regions set as the regions estimated to correspond to the face of the person, and the weighting factors assigned to the plurality of regions, respectively, Since the area having the highest accuracy corresponding to the face is determined, the extraction accuracy of the area corresponding to the person's face in the original image is not affected by the colors of the area corresponding to the person's face and the surrounding areas. Can be improved That.
[0038]
BEST MODE FOR CARRYING OUT THE INVENTION
Hereinafter, an example of an embodiment of the present invention will be described in detail with reference to the drawings.
[0039]
[First Embodiment]
FIG. 1 shows a photographic printing apparatus 10 to which the present invention can be applied. The photographic printing apparatus 10 includes a transport roller 14 that transports the negative film 12. A light source 16, a color correction filter 18 such as a dimming filter, and a diffusion box 20 are sequentially arranged below the transport path of the negative film 12. A distribution prism 22 for distributing the light transmitted through the negative film 12 in two directions is disposed above the transport path of the negative film 12.
[0040]
On one optical path of the light split in two directions by the splitting prism 22, a projection optical system 24, a black shutter 26, and a color paper (printing paper) 28 as a copy material are arranged in order. On the optical path, a projection optical system 30 and a CCD image sensor 32 are sequentially arranged. The CCD image sensor 32 divides the entire image (one frame) recorded on the negative film 12 into a number of pixels (for example, 256 × 256 pixels), and divides each pixel into R (red), G (green), and B (blue). The light is divided into three colors and measured.
[0041]
The signal output terminal of the CCD image sensor 32 includes an amplifier 34 for amplifying a signal output from the CCD image sensor 32, an analog-digital (A / D) converter 36, and a 3 × 3 for correcting the sensitivity of the CCD image sensor 32. The matrix circuits 38 are connected in order. The 3 × 3 matrix circuit 38 is configured by a microprocessing unit (MPU), and calculates a face area extraction unit 40 in which a program for realizing a face area extraction process described later is stored in a ROM in advance, and an average density of the entire image. Each is connected to the average density calculation unit 42. Further, the face area extracting section 40 and the average density calculating section 42 are connected to the exposure amount calculating section 44. The exposure calculation section 44 is connected to the color correction filter 18 via a driver 46 for driving the color correction filter 18.
[0042]
Next, the operation of the first embodiment will be described. The light emitted from the light source 16 passes through the color correction filter 18, the diffusion box 20, and the negative film 12, is distributed by the distribution prism 22, and is incident on the CCD image sensor 32 via the projection optical system 30. At this time, the black shutter 26 is closed. The CCD image sensor 32 divides the entire screen into a large number of pixels by the incident light, separates each pixel into three colors of R, G, and B, performs photometry, and outputs a photometric data signal. The photometric data signal is amplified by an amplifier 34 and converted into a digital signal by an A / D converter 36, and then the sensitivity of the CCD image sensor 32 is further corrected by a 3 × 3 matrix circuit 38, and a face area extracting unit 40 And the image data is input to the average density calculation unit 42.
[0043]
The average density calculator 42 calculates the average density of the entire screen. The face region extraction unit 40 estimates a portion corresponding to a person's face in one screen as described later in detail, and outputs R, G, and B colorimetric data of the portion. The exposure calculator 44 calculates an exposure using the photometric data of the three colors output from the person area calculator 40 and the average density output from the average density calculator 42, and calculates a negative film using the calculated exposure. The color correction filter 18 is moved via the driver 46 so that the image 12 is printed on the color paper 28, and the black shutter 26 is opened and closed to print the image.
[0044]
The average density of the entire screen calculated by the average density calculation unit 42 is not essential information in the exposure calculation by the exposure calculation unit 44, and the average density calculation unit 42 is omitted. The exposure amount may be calculated using only the photometric data of the three colors output from the region extracting unit 40.
[0045]
Next, with reference to the flowchart of FIG. 2, the face area extraction processing executed by the CPU (not shown) of the face area extraction unit 40 will be described. In step 100, image data is taken in from the 3 × 3 matrix circuit 38.
[0046]
In step 102, the image data is binarized with a predetermined threshold as an example of a method of dividing the original image into a plurality of regions. Hereinafter, an example of a positive image will be described. By this binarization, the original image is divided into a region composed of pixels having a density higher than the threshold (hereinafter, this region is referred to as a “black region”) and a pixel having a density lower than the threshold. The area is divided into a configured area (hereinafter, this area is referred to as a “white area”). As a result, for example, in the original image shown in FIG. 8A, a large number of black regions including the black region 50 corresponding to the head of a person in the original image are extracted as shown in FIG. 8B. become. Further, in step 102, numbering is performed on each of the plurality of divided black regions and white regions in order to identify each of the regions.
[0047]
In the next step 104, face candidate area setting processing by head extraction is performed. This processing will be described with reference to the flowchart in FIG. In step 172, one of the plurality of black regions extracted by the above-described binarization is extracted, and in step 174, the contour of the extracted black region is traced, and the curvature of the outline is calculated. For example, if a large number of black areas are extracted by binarizing the original image shown in FIG. 8A, and a black area 50 as shown in FIG. This can be done clockwise as shown in FIG. In the calculation of the curvature, as shown in FIG. 8 (C), vectors having a predetermined length in a direction substantially along the trace direction and whose start point and end point are in contact with the contour of the black area are sequentially set (FIG. In (C), θ as the curvature can be calculated by the inner product of the vectors P1P0 and P0P2) and the adjacent vectors. Further, the direction of θ (positive or negative sign) can be obtained from the cross product of vectors.
[0048]
At this time, the angle calculation formula is set so that the contour of the black area has a negative value when the contour of the black area is curved rightward and a positive value when the contour of the black area is curved leftward with respect to the traveling direction of the trace. . For example, FIG. 8C shows a portion of the outline of the black region that curves to the right with respect to the traveling direction of the trace, and θ has a negative value.
[0049]
Note that the length of the vector may be fixed, or may be changed according to the perimeter of the outline of the black area. Further, the curvature may be calculated a plurality of times, and the length may be changed stepwise each time.
[0050]
In the next step 176, based on the curvature of the outline of the black region calculated above, a shape pattern representing the outline of the head of the person (the partial shape pattern according to claim 6, where the extraction target graphic is As a figure representing a person, a black region having a concave portion estimated to correspond to the boundary between the head and the face of the person and a convex portion estimated to correspond to the top of the person is extracted in the outline. . The concave portion and the convex portion can be determined based on the trace direction and the direction of θ (positive or negative sign) obtained earlier. That is, the portion where the sign of θ is inverted is the boundary between the concave portion and the convex portion, and when traced clockwise, the sign of θ is positive, and if negative, it can be determined that the portion is a convex portion. . Thereby, as an example, as shown in FIG. 8D, a concave portion and a convex portion in the outline of the black region can be extracted.
[0051]
In step 178, the feature amount of each of the concave and convex portions extracted as described above is calculated. In the present embodiment, the curvature calculated as follows is used as the feature amount of the concave portion and the convex portion. That is, as shown in FIG. 9A, the length of a curve forming the concave or convex portion is L, the distance between both end points Q1 and Q2 of the concave or convex portion is M, and a straight line connecting both end points Q1 and Q2. The height of the concave portion or the convex portion with respect to is set to h, and L ÷ M and h ÷ M are calculated as the degree of curvature. Further, a direction vector V is obtained as a vector heading in the direction in which the concave portion and the convex portion open.
[0052]
In step 180, it is determined whether or not the black area can be determined to be the head (hair portion) of the person, that is, whether or not the probability of the head of the person is high, using the feature amounts calculated as described above. In this determination, the concave portion and the convex portion each having a curvature within a predetermined range are respectively extracted from the outline of the black region, and the ratio of the length of the concave portion and the convex portion to the peripheral length of the outline of the black region is within the predetermined range. And when the consistency evaluation is higher as the head of the person than the position and the direction, the result is affirmative. This consistency evaluation can be performed as follows as an example. First, the consistency in the unit of the concave portion and the convex portion is evaluated by the following procedure.
[0053]
{Circle around (1)} Select any three points on the curve of the concave or convex part (for example, both end points and the center point of the curve, but three points not on the same straight line), and assume a circle passing through each of the selected three points. , The center point of the circle is determined.
[0054]
{Circle around (2)} The distances between all the pixels constituting the curved line of the concave portion or the convex portion and the center point of the circle are obtained, and a curve having a variation in distance of not more than a predetermined value is evaluated as having consistency. If the variation is larger than a predetermined value, the curve is excluded from the evaluation target, or the curve is further divided at a portion where the curvature is large, and the process is performed again.
[0055]
Next, the consistency including the concave portions and the convex portions is evaluated as follows.
{Circle around (1)} Using the center of gravity of the center point of the circle obtained for each curve of the concave portion and the convex portion, a total center point and a total center area (of a radius determined according to the average of the length of each curve) A circular area (an area indicated by a broken line in FIG. 9B) is set. When the center point obtained for each curve falls within the overall center area, or when the center axis of each curve (direction vector V or an extension thereof) converges within the center area, It is evaluated that the consistency as the head of the person is high.
[0056]
Further, instead of the evaluation of the above (1), in the same manner as in the above (2), the dispersion of the distances between all the pixels constituting the curves of the concave and convex portions and the center point of the circle is a predetermined value. In the following cases, it is evaluated that the consistency as the head of the person is high.
[0057]
If the determination in step 180 is affirmative, most of the persons have a concave hair shape at the boundary between the human hair and the face. An elliptical area inscribed in the concave portion is defined as a face candidate area (an area estimated to correspond to the face of a person, a specific portion of the extraction target graphic (person) Is set as a candidate area) where it is estimated that the face exists. In step 184, a positive weighting coefficient is assigned to the face candidate area set above. This weighting coefficient can be set to a value such that the higher the evaluation, the heavier the weight, in accordance with the evaluation result of the above-described black region as the head of the person.
[0058]
After executing step 184, the process moves to step 186. If the determination in step 180 is negative, the process proceeds to step 186 without performing any processing. In step 186, it is determined whether or not the above processing has been performed on all the black regions extracted by the binarization. If the determination in step 186 is negative, the process returns to step 172, and steps 172 to 186 are repeated. If the determination in step 186 is affirmative, the face candidate area setting processing by head extraction is terminated, and the routine goes to step 106 in the flowchart of FIG.
[0059]
In step 106, a face candidate area setting process based on the face contour is performed. This processing will be described with reference to the flowchart in FIG. In step 189, for each of the plurality of black regions and white regions obtained by dividing the original image by binarization in step 102 of the flowchart of FIG. 2, steps 174 and 174 of the flowchart of FIG. In the same manner as in 176, the contour of each area is traced, and the curvature of the contour is calculated to extract the concave and convex portions. Thereby, as an example, a concave portion and a convex portion as shown in FIG. 10B are extracted from the original image shown in FIG.
[0060]
After extracting the concave portions and the convex portions, attention is paid to the longer one of the curves extracted as the concave portions or the convex portions so that the curvature (angle θ) falls within a predetermined range or the circular curvature. May be further divided so that is less than or equal to a predetermined value, or by roughly classifying the angle in the normal direction of the curve. For example, when the curve (2) and the curve (3) are extracted as a continuous curve in FIG. 10 (B), they are divided into two curves because of their large curvature. In FIG. 10B, the curve (1) is also an object of division. In the following, curves obtained by dividing the outline of each region extracted as described above are collectively referred to as “lines”.
[0061]
In step 190, a pair of lines estimated to correspond to the sides of the face of the person is extracted as a shape pattern (partial shape pattern according to claim 6) representing the contour of the face of the person. Specifically, among the lines extracted above, the respective directional vectors V face each other, the magnitude of the intersection angle of the respective directional vectors V (or an extension thereof) is within a predetermined value, and All pairs of lines whose similarity between the length and the degree of curvature are equal to or larger than a predetermined value are extracted as pairs of lines that can be candidates for the face contour. For example, when lines (1) to (7) shown in FIG. 10B are extracted, a pair of a line (2) and a line (4), and a line The pair of (5) and line (7) is extracted. V2, V4, V5, and V7 are directional vectors of each line.
[0062]
In the next step 192, a specific line pair is extracted from the line pairs extracted above. In step 194, a line symmetry axis is set between the line pairs as shown in FIG. 10D, and in the next step 196, the line symmetry similarity of the line pair is determined. First, as shown in FIG. 10 (D), the line symmetry similarity is determined by determining the length of both lines along the direction parallel to the line symmetry axis by v, and the length of both lines along the direction orthogonal to the line symmetry axis. Assuming that the line interval is h, it is determined whether the aspect ratio v / h is a value within a predetermined range corresponding to the aspect ratio of the face of the person. Next, as shown in FIG. 11A, an extended area for matching is set for each line (such as a process of expanding around the line), and a curved area pattern symmetric with respect to the line symmetry axis with respect to one of the line pairs. Then, the similarity between the obtained curve area pattern and the other line expansion area pattern is determined.
[0063]
As a method of determining the degree of similarity, for example, a cumulative value of a difference absolute value or a difference square value between pixel data existing at corresponding positions of the area patterns to be matched is calculated. The similarity between areas can be determined to be large. As the data of each pixel, image data itself, binarized data, data obtained by differentiating the image data, and the like can be used.
[0064]
In step 198, assuming that the line pair is a line corresponding to both sides of the face of the person, a search is performed to determine whether a line whose direction vector is nearly vertical exists at a position corresponding to the boundary with the head. I do. For example, for the pair of the line (2) and the line (4) described above, a range 52A shown in FIG. 11B is searched as a position corresponding to the boundary with the head, and the range exists within the range 52A. The line (3) is extracted as a line whose direction vector is nearly vertical. In addition, for the pair of the lines (5) and (7), the range 52B shown in FIG. 11B is searched as a position corresponding to the boundary with the head, so that the line corresponding to the boundary with the head is searched. Is not extracted.
[0065]
In the next step 200, it is determined whether or not the line pair extracted in step 192 can be determined as a line pair corresponding to the face contour based on the above-described determination result of the line symmetry similarity. If the determination in step 200 is affirmative, the line pair is regarded as a line corresponding to both sides of the face of the person, and as shown in FIG. An elliptical face candidate area (a candidate area in which a specific portion of the extraction target graphic is presumed to be present) having a size corresponding to the line length v and the interval h between the two lines is set.
[0066]
In step 202, a positive weighting coefficient is assigned to the face candidate area set above. This weighting factor can be set so that the value increases as the line symmetry similarity increases, and increases when a line corresponding to the boundary with the head is extracted. After the process of step 202 is performed, the process proceeds to step 206. If the determination in step 200 is negative, the process proceeds to step 206 without performing any processing.
[0067]
In step 206, it is determined whether or not the above processing has been performed on all the line pairs extracted in step 190. If the determination in step 206 is negative, the process returns to step 192, and steps 192 to 206 are repeated. If the determination in step 206 is affirmative, the face candidate area setting process based on the face contour is terminated, and the process proceeds to step 108 in the flowchart of FIG.
[0068]
In step 108, face candidate area setting processing based on the face internal structure is performed. This processing will be described with reference to the flowchart of FIG. In the present embodiment, a pair of black regions estimated to correspond to a pair of eyes of a face is extracted as a shape pattern (a partial shape pattern according to claim 6) representing the internal structure of a person's face. That is, in step 210, a black region pair that can be an eye pair candidate is extracted from the black regions obtained by the above-described binarization. As shown in FIG. 12A, a pair of black regions is first extracted from each black region, as shown in FIG. 12A, in the dimensional ratio (long-short axis ratio) in the longitudinal direction (long-axis direction) and width direction (short-axis direction). ) Searches for a plurality of elliptical black regions within a predetermined range. Next, the angle in the long axis direction is obtained based on the primary moment of inertia of each of the searched black areas, and a pair of black areas in which the difference in the angle in the long axis direction is within a predetermined range is determined as a black that can be a candidate for an eye pair. Extract as a region pair.
[0069]
In step 212, a specific black region pair is extracted from the black region pair extracted above, and in the next step 214, as shown in FIG. 12B, a line perpendicular to the line connecting the centers of gravity of both black regions. An axis of symmetry is set, an extended area for matching is set around each black area, and the line symmetry similarity of the black area pair is determined in step 216. In the next step 218, it is determined whether or not the black region pair extracted in step 212 can be determined as an eye pair based on the determination result of the line symmetry similarity of the black region pair determined above.
[0070]
If the determination in step 218 is affirmative, the process proceeds to step 220, and based on the position of the black area, the size of each of the black areas, and the direction of the axis of symmetry, as shown in FIG. An area (a candidate area in which a specific portion of the extraction target graphic according to claim 6 is presumed) is set. In the next step 222, a positive weighting coefficient is assigned to the face candidate area set above. The weight coefficient can be set so that the value increases as the line symmetry similarity increases. After the process of step 222 is performed, the process proceeds to step 224. If the determination in step 218 is negative, the process proceeds to step 224 without performing any processing.
[0071]
In step 224, it is determined whether or not the above processing has been performed on all the black region pairs extracted in step 210. If the determination in step 224 is negative, the process returns to step 212, and steps 212 to 224 are repeated. If the determination in step 224 is affirmative, the face candidate area setting process based on the face internal structure ends, and the process proceeds to step 110 in the flowchart of FIG.
[0072]
In step 110, a face candidate area setting process based on the body contour is performed. This processing will be described with reference to the flowchart in FIG. In the present embodiment, it is estimated that the shape pattern (partial shape pattern according to claim 6) representing the contour of the body corresponds to a contour that is continuous from the neck to the shoulder of the person, from the shoulder to the arm, or to the lower part of the body. Extract pairs of lines. That is, in step 230, a set of lines that can be one side candidate of the body contour is extracted from the lines extracted by the face candidate area setting processing based on the face contour described above. Specifically, a pair of lines in which the distance between the end points of both lines is short and the angle at which both lines intersect within a predetermined range can be extracted as a set of lines that can be a candidate for one side of the body contour. For example, when a line as shown in FIG. 13A is extracted, as shown in FIG. 13B, lines (5) and (7) whose crossing angles are within a predetermined range (θ1 and θ2), respectively. , And the sets of lines (6) and (8) are extracted.
[0073]
In the next step 232, both lines are extended and connected to each of the set of lines extracted above, thereby generating a one-sided candidate of the body contour. Further, in step 234, for each of the one-sided candidates for the torso contour generated above, a pair of one-sided candidates for the torso contour that can be candidates for the torso contour (for example, a pair in which the concave portions of the one-sided candidates for both torso contours face each other). Is extracted.
[0074]
In step 236, a specific pair is extracted from the pair of one-sided candidates for the torso contour extracted above. In step 238, the pair of one-sided candidates for the torso contour is extracted with respect to the line symmetry axis as shown in FIG. Is set, and in the next step 240, the line symmetry similarity of the pair of one side candidates of the body contour is determined. In addition, for the lines (for example, lines (5) and (6) in FIG. 13B) estimated to correspond to the contour from the neck to the shoulder of the person, the angle (for example, in FIG. It is determined whether or not (1) in the case of the line (5) is within a predetermined range. In step 242, based on the line symmetry similarity determined above, it is determined whether a pair of one-sided candidates for the body contour can be determined as the body contour.
[0075]
If the determination in step 242 is affirmative, then in step 244, based on the position, size, interval, and direction of the line symmetry axis of both one-side candidates constituting the torso contour candidate, as shown in FIG. , An elliptical face candidate area (a candidate area in which it is estimated that the specific part of the extraction target graphic according to claim 6 is present) is set. In step 250, a positive weighting coefficient is assigned to the face candidate area set above. This weighting factor can be set so that the value increases as the line symmetry similarity determined in step 240 increases. When the process of step 240 ends, the process moves to step 248. If the determination in step 242 is negative, the process proceeds to step 248 without performing any processing.
[0076]
In step 248, it is determined whether or not the above processing has been performed on all pairs of one-sided candidates of the body contour extracted in step 234. If the determination in step 248 is negative, the process returns to step 236, and steps 236 to 248 are repeated. If the determination in step 248 is affirmative, the face candidate area setting process based on the body contour is terminated, and the process proceeds to step 112 in the flowchart of FIG.
[0077]
In step 112 of the flowchart in FIG. 2, a non-person area determination process is performed. This non-person area determination processing will be described with reference to the flowchart in FIG. In step 130, a straight line portion of the contour is detected for each of the regions divided in step 102 of the flowchart of FIG. 2, and in step 132, the ratio of the straight line portion in the contour is calculated for each region. In step 134, it is determined whether or not there is an area where the ratio is equal to or more than a predetermined value. It can be determined that a region where the ratio of the straight line portion occupying the contour is equal to or more than a predetermined value has a high probability of being a region representing an artificial object, and has a low probability of being a region corresponding to a person. Therefore, if the determination in step 134 is affirmative, in step 136 a negative weighting coefficient is assigned to a region in which the ratio of the linear portions is equal to or greater than a predetermined value, and the process proceeds to step 138.
[0078]
In step 138, a line symmetry axis extending along the vertical direction of the image is set near the center of the image in the left and right direction in each region. In step 140, the degree of line symmetry with respect to the line symmetry axis set above is set. The calculation is performed for each area. In step 142, it is determined whether or not there is an area where the degree of line symmetry is equal to or less than a predetermined value. In general, the human body is substantially line-symmetric with respect to a virtual line dividing the left and right of the human body, and it can be determined that a region where the degree of line symmetry is equal to or less than a predetermined value has a low probability of being a region corresponding to a person. Therefore, if the determination in step 142 is affirmative, a weighting coefficient with a negative sign is assigned to an area where the degree of line symmetry is equal to or less than a predetermined value in step 144, and the process proceeds to step 146.
[0079]
In step 146, the contact ratio with the outer edge of the image occupying the contour is calculated for each region. It can be determined that the area where the contact rate is equal to or more than a predetermined value is located at the periphery of the image. However, in general, the probability that a person is located substantially at the center of the image is high, Can be determined to have a low probability of being a region corresponding to a person. Therefore, if the determination in step 148 is affirmative, a weighting coefficient with a negative sign is assigned to an area where the contact ratio with the outer edge of the image is equal to or more than a predetermined value in step 150, and the process proceeds to step 152.
[0080]
In step 152, the contrast of the density inside each area (the difference between the maximum density value and the minimum density value) is calculated, and in step 154, it is determined whether or not there is an area where the density contrast is equal to or less than a predetermined value. If the contrast of the density in the area is equal to or less than a predetermined value, it is highly likely that the area is an area representing an object having a smooth or less uneven surface, and the probability of being an area corresponding to a person is low. Therefore, if the determination in step 154 is affirmative, in step 156 a negative weighting coefficient is assigned to a region where the internal density contrast is equal to or less than a predetermined value, and the process proceeds to step 158.
[0081]
In step 158, the density value of each pixel in each region is differentiated along a plurality of different directions (for example, a direction inclined ± 45 ° with respect to the horizontal direction, the vertical direction, and the horizontal direction of the image), and step 160 It is determined whether there is a region where at least one of the differential values along a plurality of directions changes regularly. The above determination is affirmed for a region where the density changes in a predetermined pattern or a region where the density repeats a predetermined change pattern. Since such a region can be determined to have a low probability of being a region corresponding to a person, if the determination in step 160 is affirmed, in step 162, the sign of the region in which the differential value changes regularly is added. Give a negative weighting factor. Thus, the non-person area determination processing ends, and the flow shifts to step 118 in the flowchart of FIG.
[0082]
In step 118, comprehensive determination of the face area is performed. That is, if the ranges set as the face candidate regions in steps 104 to 110 and the positive weighting factors assigned to each face candidate region are used, and if there is a region to which a negative weighting factor is added in step 112, , Based on the range of the area and the assigned negative weighting coefficient, a total weighting coefficient of each portion in the image is calculated. More specifically, if there is a portion in the image to which a weighting factor has been assigned by a plurality of processes, the partial range and the overall weighting factor (determined by adding or multiplying the weighting factor assigned in each process. The weighting factor corresponds to the degree of matching described in claim 6), and the image is divided into regions having the same overall weighting factor. Then, the area having the highest overall weighting coefficient is determined as the area corresponding to the face area of the person and having the highest certainty.
[0083]
In the next step 120, it is determined whether or not the processing of steps 102 to 118 has been executed a predetermined number of times. If the determination in step 120 is negative, in step 122, various control parameters are updated to change the coarse density of the image division in step 102, or the threshold for binarization in step 102 is updated. Then, the processing after step 102 is executed again. After executing Steps 102 to 118 a predetermined number of times, the determination at Step 120 is affirmed, and the routine proceeds to Step 124.
[0084]
As described above, the reason why the processing is repeated by changing the coarse density of the image division is that the area of the area corresponding to the face of the person existing in the original image is large or small (one person existing in the original image is This is because the appropriate size of each region when the original image is divided into a plurality of regions differs depending on the size of the corresponding region).
[0085]
In other words, if the area of the region corresponding to the face of a person existing in the original image is large, the original image is divided densely (the size of each region is reduced), and the region corresponding to the original face is divided finely. Since the area corresponding to each part of the person is too finely divided, the area corresponding to each part of the person is not properly separated as a whole, but if the original image is roughly divided (the size of each area is large), A divided region having a high degree of coincidence with the region corresponding to the face can be obtained, and the region corresponding to each part of the person can be appropriately separated.
[0086]
On the other hand, if the area of the area corresponding to the face of the person present in the original image is small, when the original image is roughly divided, the area corresponding to the original face is hidden by the area corresponding to the background, and Although it is not possible to properly separate the face and the area corresponding to each part, if the original image is divided densely, the area corresponding to the person's face and each part can be properly separated. Therefore, by repeatedly performing the face region extraction process a plurality of times while changing the coarse density of the image division stepwise, regardless of the size of the region corresponding to the person's face present in the original image, The corresponding area can be extracted with high accuracy.
[0087]
In addition, when changing the image division control parameter, for example, when dividing an original image by clustering using a one-dimensional or two-dimensional histogram, the step width of a threshold value when quantizing data at the time of creating a histogram is changed. When the histogram is made coarse (large), the result of dividing the original image using the histogram also becomes coarse (the size of the divided region becomes large), and when the step width of the threshold is made fine (small), the original image is formed using the histogram. Since the result of dividing the image becomes finer (the size of the divided region becomes smaller), the step width of the threshold value when quantizing is used as the image division control parameter, and the step width of the threshold value is changed. By doing so, the coarse density of image division can be changed.
[0088]
When the original image is divided by using a pixel having a large density difference or a color difference from an adjacent pixel among the pixels constituting the original image as a region boundary, it is determined that the density difference or the color difference is large. If the threshold value for the division is increased, the result of dividing the original image becomes coarse (the size of the divided region becomes large), and if the threshold value is decreased, the result of dividing the original image becomes fine (the size of the divided region becomes small). Therefore, the threshold value can be used as an image division control parameter.
[0089]
Also, in the division of the original image, regardless of how the division is made, if the resolution of the original image is made coarse, the result of dividing the original image becomes coarse, and if the resolution is made fine, the result of dividing the original image becomes coarse. Alternatively, the image resolution may be used as the image division control parameter. As an example of changing the image resolution, when reducing the image resolution, for each pixel block composed of m × n pixels, the average of the density or color of all the pixels constituting each block is calculated for each block. Can be taken as the representative value of In the method of changing the coarse density of the image division by changing the image resolution as described above, there is also an advantage that the processing time can be reduced because the number of data to be processed is reduced particularly when the image resolution is reduced. . Similar effects can be obtained by performing a smoothing process instead of changing the image resolution. In the smoothing process, as the degree of smoothing increases, the averaging of the density and the color with the surrounding pixels progresses, and the result of dividing the original image becomes coarse as in the case where the resolution is reduced.
[0090]
In step 124, based on the face regions determined in the predetermined number of processes and the weighting factors assigned to them, the region with the highest accuracy, which is finally the region corresponding to the human face region, is first determined. The determination is finally made in the same manner as in step 118. Then, as the determination result in the next step 126, the R, G, and B photometric data of the finally determined area are output to the exposure calculator 44, and the face area extraction processing ends.
[0091]
In the above-described face area extraction processing, a face candidate area estimated to correspond to a person's face is not determined based on the density or color of the area. Therefore, even if the color balance of the area changes according to the film type of the negative film 12, the type of light source, and the shooting conditions such as backlight, the result of the face area extraction processing is changed by this influence. There is no. Further, the above-described face area extraction processing is applicable even when the original image is a monochrome image. Further, in the above-described face area extraction processing, the processing of setting a face candidate area based on a shape pattern specific to each part of a person (steps 104 to 110 in the flowchart of FIG. 2) is basically performed by using a concave part and a convex part, respectively. It consists of extracting a part and determining the line symmetry similarity. Therefore, if the software and the hardware are shared by using this, the simplification of the software and the simplification of the hardware configuration can be realized.
[0092]
On the other hand, in the exposure amount calculating section 44, the R, G, and B photometric data extracted by the face area extracting section 40 as described above, and the screen average density D of one frame calculated by the average density calculating section 42.i(I = R, G, or B) and the appropriate exposure amount E according to the following equation:iAnd outputs the result to the driver 46. The driver 46 sets the proper exposure Ei, The color correction filter 18 is moved to a position corresponding to the appropriate exposure amount.
[0093]
Figure 0003576654
However, the meaning of each symbol is as follows.
[0094]
LM: Magnification slope coefficient. It is set in advance according to the enlargement magnification determined by the type of the negative film and the print size.
[0095]
CS: color slope coefficient. It is prepared for each type of negative film, and is available for underexposure and overexposure. It is determined whether the average density of the image frame to be printed is under or over the standard negative density value, and either under exposure or over exposure is selected.
[0096]
DN: standard negative density value.
D: Density value of an image frame to be printed.
[0097]
PB: Correction balance value for standard color paper. It is determined according to the type of color paper.
[0098]
LB: Correction balance value for a standard printing lens. It is determined according to the type of lens used for printing.
[0099]
MB: Correction value (master balance value) for a change in light source light amount and a change in paper development performance.
[0100]
NB: Negative balance (color balance) value determined by the characteristics of the negative film.
[0101]
K2: Color correction amount.
K1: A density correction amount represented by the following equation.
[0102]
(Equation 1)
Figure 0003576654
[0103]
Here, Ka and Kb are constants, and FD is a face area average density.
Further, the density correction amount K in the above equation (8)1Is the correction value obtained by the film verification device, and the color correction amount K2May be expressed using the face area average density as follows.
[0104]
(Equation 2)
Figure 0003576654
[0105]
Here, Kc is a constant.
Further, the density correction amount K in the above equation (1)1, Color correction amount K2Is the correction amount obtained by the film verification apparatus, and the average density D of the print frame of the equation (1) isiIs the average density FD of the face area.iAnd the exposure amount may be obtained.
[0106]
In addition, the density (or color) of each pixel of the area determined as the face area in the face area extraction processing is weighted according to the weight coefficient to obtain a weighted average value, and the exposure is performed using the weighted average value. Quantity EiIs calculated, the weighting coefficient given to the area determined to be the face area is calculated as the exposure amount E.iMay be reflected.
[0107]
In the above description, the negative film 12 has been described as an example of a recording medium for an original image. However, an image recorded on another film such as a positive film or various recording media such as paper can be used as the original image. . Also, color paper has been described as an example of a copying material, but other materials such as paper may be applied.
[0108]
In the above, in the face candidate area setting processing by head extraction, as a shape pattern specific to the head of a person, a convex part corresponding to the top of the person and a concave part corresponding to the boundary between the head and the face of the person are used. Although it was used, it is not limited to this. For example, in order to extract a head without hair or a head with low hair density, area division by a method other than binarization or edge detection of an image is performed, and a convex pattern is formed as a shape pattern unique to the head. The head may be extracted using only the part.
[0109]
Further, in the above description, binarization has been described as an example of a method of dividing an image into a plurality of regions. However, the present invention is not limited to this, and a histogram as described in JP-A-4-346332 is not limited thereto. May be used for division. In addition, the density value of each pixel of the image is set in a plurality of different directions (for example, as shown in FIG. 14A, in the horizontal direction (0 °), the vertical direction (90 °), and the horizontal direction of the image). The edge of the image is detected by differentiating along the (± 45 ° tilt direction), and instead of the line described in the above embodiment, the edge of the edge obtained by performing a well-known thinning process on this edge. The processing may be performed using the center line.
[0110]
The differentiation along each direction can be realized by using each of the four types of differential filters shown in FIG. 14B, and the edge of the image is detected when the magnitude of the differential filter output is a predetermined threshold value. When it is larger than the target pixel, the target pixel can be regarded as an edge. Further, the edge extraction processing may be repeatedly performed while changing the threshold value for edge determination stepwise.
[0111]
Further, in the above description, the case where the pair of eyes is used as the shape pattern representing the internal structure of the face has been described as an example. However, the present invention is not limited to this. Alternatively, the face candidate area may be set comprehensively.
[0112]
Furthermore, in the above description, as an example of a shape pattern representing a body contour, an example of extracting a pair of lines corresponding to a continuous contour from a person's neck to a shoulder, a shoulder to an arm part, or a lower body is described. Instead, a pair of lines corresponding to the contour from the neck to the shoulder of the person and a pair of lines corresponding to the contour from the shoulder to the arm of the person may be separately detected.
[0113]
In the above description, the face candidate area setting processing based on the shape pattern specific to each part of the person and the non-person area determination processing (steps 104 to 112 in the flowchart of FIG. 2) are sequentially executed. Is not affected by the processing results of the other processes, so a processing unit for performing each of the above processes is separately provided, and as preprocessing, image division into a plurality of regions or image edge detection, concave portions, convex portions May be performed in parallel by each processing unit after the extraction of As a result, the processing time can be significantly reduced.
[0114]
[Second embodiment]
Next, a second embodiment of the present invention will be described. Since the second embodiment has the same configuration as the first embodiment, the same reference numerals are given to the respective portions, and the description of the configuration is omitted, and the operation of the second embodiment will be described below.
[0115]
In the second embodiment, the state of the figure representing the person on the image (corresponding to the extraction target figure in claim 6) is classified in advance into a plurality of states. The state of the figure representing a person may be, for example, the size (or area) of the figure on an image, the orientation of the figure on an image (the vertical direction of the person represented by the figure on the image may be any direction). ), The angle of the person as the subject with respect to the visual axis at the time of photographing (in which direction the person represented by the figure is oriented along the left and right direction of the person: (The direction of the face changes from front to front, oblique, and sideways).
[0116]
For example, when classifying the state of a figure representing a person according to the size L or the area S of the figure on the image, the size L is large (L1~ L2) Or medium (L2~ L3) Or small (L3~ L4) Or the area S on the image is large (S1~ S2) Or medium (S2~ S3) Or small (S3~ S4). When the classification is performed according to the orientation of the figure on the image, the orientation can be classified, for example, in units of 90 ° or 45 °. Further, in the case of classifying according to the angle of the person represented by the figure with respect to the visual axis at the time of shooting, the classification can be made according to whether the angle is front, diagonal or horizontal. Further, the size and orientation of the figure representing the person and the angle of the person represented by the figure with respect to the visual axis at the time of photographing may be combined for classification. As a result, the state of the figure representing the person on the image is classified into a plurality of states.
[0117]
Further, in the second embodiment, the shape pattern (corresponding to the partial shape pattern of claim 6) that forms a figure representing a person, such as the outline of the head of the person, the outline of the face, the internal structure of the face, and the outline of the body, is described. For each of them, a plurality of types of search parameters that define search conditions for searching for each shape pattern are determined according to the plurality of classified states.
[0118]
As an example, when the state of a figure representing a person on an image is classified according to the size or area of the figure, a search parameter to be changed according to the size or area is image resolution (or image division). ), And the length of the vector for calculating the curvature of the contour of the black area when searching for the shape pattern representing the head contour (the length of the vector P1P0 and the vector P0P2 shown in FIG. 8C) And the allowable range of the length of the contour to be searched for as the head outline, the face outline or the torso outline, and the allowable range of the distance between candidate pairs to be calculated when calculating the line symmetry similarity.
[0119]
As described above, if the size or area of a figure representing a person is small, the resolution is increased, and if the size or area is large, the resolution is reduced (coarse). Good. Further, the length of the vector may be shortened when the size or area is small, and may be increased when the size or area is large, and the calculation of the allowable range of the contour length and the line symmetry similarity may be performed. The permissible range of the target candidate pair distance may be shortened when the size or the area is small, and increased when the size or the area is large.
[0120]
Further, when the state of a figure representing a person on an image is classified according to the direction of the figure, a search parameter to be changed according to the direction includes a line object when searching for a shape pattern representing a face contour. The direction of the axis (see FIG. 10D), the direction of the line target axis when searching for the shape pattern representing the eye pair as the internal structure of the face (see FIG. 12B), and the shape pattern representing the body contour The direction of the line target axis at the time of the search (see FIG. 13B) is exemplified. By changing the parameters according to the orientation, the number of combinations of candidate pairs as a calculation target of the line symmetry similarity is narrowed down.
[0121]
Further, when the state of the figure representing a person on the image is classified according to the angle of the person represented by the figure with respect to the visual axis at the time of shooting, as the search parameter to be changed according to the angle, the eye pair is The distance between the eye candidate regions in the search for the shape pattern to be represented (see FIG. 12B) and the like.
[0122]
Next, with reference to the flowchart of FIG. 15, a description will be given of the face area extraction processing according to the second embodiment, only the parts different from the flowchart of FIG.
[0123]
In the second embodiment, after capturing image data in step 100, in step 101, a search parameter corresponding to a predetermined state among the plurality of classified states is captured. The predetermined state is a state having the highest frequency of appearance in an image recorded on the negative film 12 (for example, the size of a figure representing a person: medium, the orientation of the figure: person Is the direction in which the vertical direction of the image coincides with the longitudinal direction of the image, and the angle of the person with respect to the visual axis at the time of photographing represented by the figure: front.
[0124]
In the next steps 102 to 112, a face candidate area is set in the same manner as in the first embodiment based on the search parameters fetched in step 101. As described above, since the search parameters used in the processing of steps 102 to 112 are search parameters corresponding to a predetermined state among a plurality of states classified in advance, the range of the shape pattern as a search target is narrowed down. Thus, the process is completed in a shorter time than in the first embodiment. In step 118, a region having a high degree of certainty, which is a region corresponding to a person's face region, is determined in the same manner as in the first embodiment. In the processing of step 118, the degree of matching is determined for each candidate area according to claim 6, and a candidate area having a high probability that a human face as a specific part of the extraction target graphic is present is determined. It corresponds to.
[0125]
In the next step 119, it is determined whether or not a region having a very high degree of certainty, which is a region corresponding to the face of a person, has been extracted by the above processing. This determination can be made based on whether or not there is a face candidate area whose overall weight coefficient (the degree of matching of claim 6) calculated by the face area comprehensive determination in step 118 is equal to or greater than a predetermined value. If the above determination is affirmed, the process proceeds to step 124, where an area corresponding to the extracted person's face and having a very high degree of certainty is determined as a face area, and a determination result is output and processed in step 126. To end.
[0126]
On the other hand, if the determination in step 119 is negative, the process proceeds to step 121, and it is determined whether the process has been performed using all search parameters corresponding to each state. If the determination is negative, the process proceeds to step 123, in which search parameters corresponding to a state where processing has not been executed and the frequency of appearance is high are fetched, and the process returns to step 102. Thereby, the processing from step 102 onward is repeated according to the newly acquired search parameters.
[0127]
As described above, since the processing is repeated using the search parameters corresponding to the states having a high frequency of appearance in order, the determination in step 191 is affirmed before the determination in step 121 is affirmed, that is, the state corresponds to each of the classified states. Before all search parameters are used, there is a high possibility that a region having a very high degree of certainty, which is a region corresponding to a human face, is extracted, and the average processing time of the face region extraction processing is reduced. If the determination in step 119 or step 121 is affirmative, the face area comprehensive determination is performed in step 124 as in the first embodiment, the determination result is output in step 126, and the process ends.
[0128]
In the above description, the distance between the eye candidate regions is used as an example of a search parameter that is changed according to the angle of the person with respect to the visual axis at the time of shooting. Then, when searching the estimated area and determining the consistency as a human face, as a search parameter to be changed according to the angle, the position of the eye candidate area in the face candidate area or the line symmetric axis The degree of positional deviation, the ratio of the distance between the pair of eye candidate regions to the width of the face candidate region, and the like may be applied, and the allowable range of each search parameter may be changed according to the angle.
[0129]
Further, in the above description, the processing is performed using a plurality of types of search parameters in order, but the present invention is not limited to this, and the processing of steps 102 to 118 in the flowchart of FIG. A plurality of processing units may be provided (see FIG. 16), and each processing unit may perform processing in parallel using each of the plurality of types of search parameters corresponding to each state. In the example of FIG. 16, the states of the figure representing the person are classified into n states 1 to n, and n processing units 601~ 60nIn the flowchart of FIG. 15, the face area comprehensive determination in step 124 and the determination result output in step 126 are performed by the face area overall determination unit 62. When configured as described above, each processing unit 601~ 60nCan be completed in a very short time, so that the processing time of the face region extraction processing can be significantly reduced regardless of the state of the figure representing the person on the image.
[0130]
Further, in the above description, an example in which a region corresponding to a person's face is extracted as a specific part of the extraction target graphic has been described. However, the present invention is not limited to this. (The entire corresponding area) may be extracted.
[0131]
In the above description, a figure representing a person is applied as the extraction target graphic. However, the present invention is not limited to this. For example, a figure representing an artificial object may be applied as the extraction target graphic. Artifacts existing in an image recorded on a photographic film generally have unknown shapes and the like, but the partial shape of the figure representing the artifact is determined by the non-human area determination processing (FIG. 7) as described above. It is empirically known that it is often composed of straight lines, circular arcs having a constant curvature, and the like. Therefore, if these are used as the partial shape patterns, it is possible to extract a graphic representing an artificial object as the graphic to be extracted. When an image recorded on a photographic film is printed on a copy material, for example, exposure to the copy material is performed by reducing the weight of an area determined to have a high probability that a figure representing an artifact exists. The amount can be determined.
[0132]
The image from which a graphic is extracted by applying the present invention is not limited to an image recorded on a photographic film. As an example, in mass production of parts, products, and the like, while imaging the situation in which the produced parts, products, and the like are being sequentially conveyed, an image representing the conveyed situation is extracted at a predetermined timing from the imaging signal. It is also possible to extract, from the extracted image, a graphic representing the part or product as the graphic to be extracted. In this case, since the shapes of components, products, and the like are known in advance, the partial shape pattern can be easily determined. The region where the extraction target graphic extracted according to the present invention exists can be used, for example, for automatically inspecting a produced part or product.
[0133]
Although the embodiments of the present invention have been described above, the above-described embodiments include, in addition to the technical matters described in the claims, embodiments of the following technical matters.
[0134]
(1) When the shape pattern representing the contour of the head of the person is to be searched, the contour of the area divided by the invention of claim 3 or the center of the edge obtained by the invention of claim 4 A concave portion and a convex portion are detected from the line, and the concave portion or the convex portion is formed on the head of the person based on the characteristic amount (curvature, position, size, direction) of one or more detected concave portions or convex portions. A method for determining an exposure amount, wherein the shape pattern is searched for by determining whether or not the shape pattern corresponds to the contour of the part.
[0135]
(2) When a shape pattern representing the contour of a person's face is to be searched, the contour of the region divided by the invention of claim 3 or the center line of the edge obtained by the invention of claim 4 The concave and convex portions are further detected, and the two or more concave and convex portions are detected based on the relationship between the characteristic amounts (curvature, position, size, direction) of the two or more concave portions or convex portions, and the two are determined by the degree of line symmetry. A method for determining the amount of exposure, wherein the shape pattern is searched by determining whether or not the concave portion or the convex portion corresponds to the contour of a person's face.
[0136]
(3) When a shape pattern representing an eye pair among shape patterns representing a person's face structure is to be searched, the area divided by the invention described in claim 3 or the area obtained by the invention described in claim 4 is obtained. An elliptical area is extracted from the area divided by the center line of the extracted edge, and a similarity degree equal to or greater than a predetermined value is obtained by a matching process using the feature amounts (shape and density) of each of the plurality of extracted elliptical areas. The pair of elliptical regions is detected, and it is determined whether or not the pair of elliptical regions corresponds to the pair of eyes of a person's face based on the degree of line symmetry of the detected pair of elliptical regions. A method for determining the amount of exposure, wherein
[0137]
(4) When the shape pattern representing the contour of the body of the person is to be searched, the contour of the area divided by the invention of claim 3 or the center line of the edge obtained by the invention of claim 4 The contour from the neck to the shoulder of the person is detected based on the relationship between the feature amounts (curvature, position, size, direction) of the two or more detected recesses or protrusions. , And detecting a plurality of sets of concave or convex portions corresponding to the contour from the shoulder to the arm portion or the lower part of the torso, and further determining whether or not the set corresponds to the contour of the torso of the person based on the degree of line symmetry between the sets. A search for the shape pattern.
[0138]
(5) An area divided by the invention according to the third aspect, or divided by the center line of the edge obtained by the invention according to the fourth aspect, as a low-probability area corresponding to the face of a person in the original image. Among the regions, the ratio of the straight line portion included in the outline of the region is a predetermined value or more, or the line symmetry is a predetermined value or less, or the number of irregularities is a predetermined value or more, or the contact ratio with the image outer edge is It is characterized by determining a region equal to or more than a predetermined value, a region where the contrast of the internal density is equal to or less than a predetermined value, or a region where the internal density changes in a predetermined pattern or where a predetermined change pattern is repeated. Exposure amount determination method.
[0139]
【The invention's effect】
As described above, the invention according to claim 1 searches for a shape pattern specific to a predetermined portion of a person existing in an original image, and detects the size and direction of the detected shape pattern and the position of the detected shape pattern. An area estimated to correspond to the face of a person is set according to the relationship, and a weighting factor is assigned to the set area, with each of the shape patterns unique to each part of the person being searched, and the face of the person is set. The range of each of the plurality of regions set as the region estimated to correspond to, and the region having the highest degree of certainty corresponding to the face of the person in the original image is determined based on the weighting factors assigned to the plurality of regions, Since the exposure amount is determined based on at least one of the color and the density of the determined area, the area corresponding to the person's face in the original image and the area corresponding to the person's face are not affected by the colors of the surrounding areas. Extracting only an area, the exposure amount can be determined so properly baked region, has an excellent effect that.
[0140]
According to a third aspect of the present invention, the original image is divided into a plurality of regions composed of a plurality of pixels having the same or similar density or color, and a shape pattern is searched using the outline of each of the plurality of regions. Therefore, there is an effect that a shape pattern specific to each part of the person can be efficiently detected.
[0141]
According to the fourth aspect of the present invention, an edge present in the original image is detected, a center line of the detected edge is obtained, and a shape pattern is searched using the obtained center line. Can be detected efficiently.
[0142]
The invention according to claim 5 assigns a positive weighting coefficient to an area estimated to correspond to a person's face, and determines and determines an area with low accuracy corresponding to the person's face in the original image. Since the area is given a negative weighting factor with a sign, the probability that a region corresponding to a person's face is extracted as a region having the highest accuracy corresponding to a person's face is further improved.
[0143]
In the invention according to claim 6, a plurality of partial shape patterns are determined in advance based on a plurality of characteristic partial shapes constituting the extraction target graphic, the partial shape patterns are searched, and the size of the detected partial shape pattern is determined. Setting a candidate region in which it is assumed that a specific portion or the whole of the extraction target graphic in the image is present according to the position of the partial shape represented by the partial shape pattern in the extraction target graphic. This is performed for each of the patterns, and based on the matching degree obtained for each of the candidate regions, a candidate region having a high probability that the specific portion or the entirety of the extraction target graphic exists is determined. This has an excellent effect that the target graphic can be properly extracted without being affected by the colors of the region where the extraction target graphic exists and the surrounding region.
[0144]
According to a seventh aspect of the present invention, a plurality of types of parameters are determined in advance as parameters defining search conditions for each of the plurality of partial shape patterns in accordance with the state of the extraction target graphic on the image. Is performed for each of the plurality of partial shape patterns, and a process of determining and extracting a candidate region having a high probability of the existence of the extraction target graphic based on the degree of matching is performed by a plurality of processes. A candidate that is determined to have a high degree of certainty that the extraction target graphic exists, as a result of performing each of the plurality of types of parameters corresponding to the state, or performing the processing using the parameters corresponding to the predetermined state. If there is no area, the above processing is repeated using parameters corresponding to a state different from the predetermined state, and it is determined that the probability that the extraction target graphic exists is high. Since it was to terminate the process if the candidate region there, in addition to the above effects, it is possible to shorten the processing time, an effect that.
According to the ninth aspect of the present invention, a shape pattern specific to a predetermined portion of a person existing in an original image is searched for, and the size and direction of the detected shape pattern and the positional relationship between the face of the person and the predetermined portion are detected. A region that is estimated to correspond to the face of a person is set according to the above, and a weighting coefficient is assigned to the set region, as a search target for a plurality of types of shape patterns specific to each part of the person. Based on the respective ranges of the plurality of regions set as the regions estimated to correspond to the face and the weight coefficient assigned to each of the plurality of regions, the region having the highest likelihood corresponding to the face of the person in the original image is determined. Since the determination is made, an excellent effect that the extraction accuracy of the region corresponding to the person's face can be improved without being affected by the colors of the region corresponding to the person's face in the original image and the surrounding regions. Having
[Brief description of the drawings]
FIG. 1 is a schematic configuration diagram of a photographic printing apparatus according to an embodiment.
FIG. 2 is a flowchart illustrating a main routine of a face area extraction process executed by a face area extraction unit according to the first embodiment.
FIG. 3 is a flowchart illustrating a face candidate area setting process based on head extraction.
FIG. 4 is a flowchart illustrating a face candidate area setting process based on a face contour.
FIG. 5 is a flowchart illustrating a face candidate area setting process based on a face internal structure.
FIG. 6 is a flowchart illustrating a face candidate area setting process based on a body contour.
FIG. 7 is a flowchart illustrating a non-person area determination process.
8A and 8B show details of face candidate area setting processing by head extraction, wherein FIG. 8A shows an original image, FIG. 8B shows a trace of a contour of a black area extracted by binarization, and FIG. (D) is an image diagram for explaining extraction of a concave portion and a convex portion.
FIG. 9 shows details of face candidate area setting processing by head extraction, in which (A) calculates the feature amounts of the concave and convex parts, (B) determines the head, and (C) sets the face candidate area. It is an image figure for each explaining.
10A and 10B show details of a face candidate area setting process based on a face contour; FIG. 10A shows an original image, FIG. 10B shows extraction and division of a concave part and a convex part, and FIG. (D) is an image diagram for explaining each determination of the line symmetry similarity.
FIGS. 11A and 11B show details of face candidate area setting processing based on face contours, in which (A) shows determination of line symmetry similarity, (B) shows a search for a boundary with the head, and (C) shows setting of a face candidate area. It is an image figure for each explaining.
FIGS. 12A and 12B show details of face candidate region setting processing based on a face structure, in which (A) extracts a black region that can be a candidate for an eye, (B) determines the line-symmetric similarity of a black region pair, and (C) shows It is an image figure for each explaining setting of a face candidate field.
FIGS. 13A and 13B show details of face candidate region setting processing based on a torso contour, wherein FIG. 13A shows a line extracted in the pre-processing, FIG. 13B shows determination of line symmetry similarity, and FIG. It is an image figure for each explaining.
FIG. 14A is a conceptual diagram illustrating an example of a differential direction in edge detection, and FIG. 14B is a conceptual diagram illustrating an example of a differential filter for performing differentiation in each direction.
FIG. 15 is a flowchart illustrating a face area extraction process according to the second embodiment.
FIG. 16 is a schematic block diagram illustrating an example of a configuration of a face area extraction unit for executing face area extraction processing in parallel.
[Explanation of symbols]
10. Photo printing equipment
12 Negative film
18. Color correction filter
28 color paper
32 CCD image sensor
40 face area extraction unit
44 Exposure calculator

Claims (9)

原画像中に存在する人物の所定の部分に特有の形状パターンを探索し、検出した形状パターンの大きさ、向き及び人物の顔と前記所定の部分との位置関係に応じて人物の顔に相当すると推定される領域を設定し、設定した領域に重み係数を付与することを、人物の各部分に特有の複数種類の形状パターンを探索対象として各々行い、
人物の顔に相当すると推定される領域として設定した複数の領域の各々の範囲、及び前記複数の領域に各々付与した重み係数に基づいて、原画像中の人物の顔に相当する確度が最も高い領域を判断し、
判断した領域の色又は濃度の少なくとも一方に基づいて複写材料への露光量を決定する、
露光量決定方法。
A shape pattern specific to a predetermined portion of the person present in the original image is searched, and the size and orientation of the detected shape pattern and the position of the person and the predetermined position correspond to the face of the person according to the positional relationship between the predetermined portion. Then, an area to be estimated is set, and a weighting coefficient is given to the set area, and a plurality of types of shape patterns unique to each part of the person are respectively performed as search targets,
Based on the respective ranges of the plurality of regions set as the regions estimated to correspond to the person's face, and the weighting factor assigned to each of the plurality of regions, the likelihood corresponding to the person's face in the original image is the highest. Determine the area,
Determine the amount of exposure to the copy material based on at least one of the color or density of the determined area,
Exposure determination method.
前記人物の各部に特有の形状パターンは、
人物の頭部の輪郭を表す形状パターン、人物の顔の輪郭を表す形状パターン、人物の顔の内部構造を表す形状パターン、及び人物の胴体の輪郭を表す形状パターンを含む、
ことを特徴とする請求項1記載の露光量決定方法。
The shape pattern unique to each part of the person,
Including a shape pattern representing a contour of a person's head, a shape pattern representing a contour of a person's face, a shape pattern representing an internal structure of a person's face, and a shape pattern representing a contour of a person's torso,
2. The method according to claim 1, wherein the exposure amount is determined.
前記形状パターンの探索は、原画像を濃度又は色が同一又は近似している複数の画素で構成される複数の領域に分割し、該複数の領域の各々の輪郭を用いて行う、
ことを特徴とする請求項1記載の露光量決定方法。
The search for the shape pattern is performed by dividing the original image into a plurality of regions composed of a plurality of pixels having the same or similar density or color, and using the outline of each of the plurality of regions.
2. The method according to claim 1, wherein the exposure amount is determined.
前記形状パターンの探索は、原画像中に存在するエッジを検出し、検出したエッジの中心線を求め、求めた中心線を用いて行う、
ことを特徴とする請求項1記載の露光量決定方法。
The search for the shape pattern is performed by detecting an edge present in the original image, obtaining a center line of the detected edge, and using the obtained center line.
2. The method according to claim 1, wherein the exposure amount is determined.
前記設定した人物の顔に相当すると推定される領域には符号が正の重み係数を付与すると共に、
原画像中の人物の顔に相当する確度の低い領域を判定し、判定した領域には符号が負の重み係数を付与する、
ことを特徴とする請求項1記載の露光量決定方法。
A sign is assigned a positive weighting coefficient to an area estimated to correspond to the set human face,
A region having a low degree of accuracy corresponding to the face of a person in the original image is determined, and a negative weighting coefficient is assigned to the determined region,
2. The method according to claim 1, wherein the exposure amount is determined.
抽出対象図形を構成する特徴的な複数の部分形状に基づいて複数の部分形状パターンを予め定めておき、
画像中に存在する部分形状パターンを探索し、検出した部分形状パターンの大きさ、方向、及び前記抽出対象図形における前記部分形状パターンが表す部分形状の位置に応じて画像中の抽出対象図形の特定部分又は全体が存在すると推定される候補領域を設定することを、前記複数の部分形状パターンの各々について行い、
設定した各候補領域毎に、前記検出した各部分形状パターンとの関係に基づいて抽出対象図形の特定部分又は全体が存在する領域としての整合度を求め、
各候補領域毎に求めた整合度に基づいて、抽出対象図形の特定部分又は全体が存在している確度が高い候補領域を判断し、
抽出対象図形の特定部分又は全体が存在している確度が高いと判断した候補領域を抽出する
図形抽出方法。
Predetermining a plurality of partial shape patterns based on a plurality of characteristic partial shapes constituting the extraction target graphic,
A partial shape pattern existing in the image is searched for, and the size and direction of the detected partial shape pattern and the extraction target graphic in the image are specified according to the position of the partial shape represented by the partial shape pattern in the extraction target graphic. By setting a candidate region that is estimated to exist part or whole, for each of the plurality of partial shape patterns,
For each set candidate area, determine the degree of consistency as a region where a specific portion or the entirety of the extraction target graphic exists based on the relationship with the detected each partial shape pattern,
Based on the matching degree obtained for each candidate area, determine a candidate area having a high probability that a specific portion or the whole of the extraction target graphic exists,
A graphic extraction method for extracting a candidate area determined to have a high probability that a specific part or the whole of an extraction target graphic exists.
画像上での前記抽出対象図形の状態を複数の状態に予め分類しておくと共に、
前記複数の部分形状パターンの各々に対し、部分形状パターンを探索する際の探索条件を規定するパラメータとして、前記分類した複数の状態に応じて複数種類のパラメータを予め定めておき、
画像中に存在する部分形状パターンを探索し、前記候補領域を設定することを前記複数の部分形状パターンの各々について行い、設定した候補領域毎に整合度を求め、抽出対象図形の特定部分又は全体が存在している確度が高い候補領域を判断して抽出する処理を、前記複数の状態に対応する複数種類のパラメータの各々を用いて行うか、
又は、前記複数の状態のうちの所定の状態に対応するパラメータを用いて前記処理を行った結果、抽出対象図形の特定部分又は全体が存在している確度が高いと判断した候補領域が無かった場合は、前記所定の状態と異なる状態に対応するパラメータを用いて前記処理を行うことを繰り返し、抽出対象図形の特定部分又は全体が存在している確度が高いと判断した候補領域が有った場合に前記処理を終了する
ことを特徴とする請求項6記載の図形抽出方法。
While preliminarily classifying the state of the extraction target graphic on the image into a plurality of states,
For each of the plurality of partial shape patterns, as a parameter that defines a search condition when searching for a partial shape pattern, a plurality of types of parameters are determined in advance according to the plurality of classified states,
Searching for a partial shape pattern present in an image, setting the candidate area is performed for each of the plurality of partial shape patterns, obtaining a degree of matching for each of the set candidate areas, and specifying a specific portion or the entirety of the extraction target graphic. The process of determining and extracting a candidate region having a high probability of existence is performed using each of a plurality of types of parameters corresponding to the plurality of states,
Alternatively, as a result of performing the processing using a parameter corresponding to a predetermined state among the plurality of states, there is no candidate area determined to have a high probability that the specific part or the whole of the extraction target graphic exists. In such a case, there was a candidate area that was determined to have a high probability that the specific part or the whole of the extraction target graphic was present with high repetition of performing the processing using parameters corresponding to a state different from the predetermined state. 7. The graphic extraction method according to claim 6, wherein said processing is terminated in said case.
前記画像上での抽出対象図形の状態は、
画像上での抽出対象図形の大きさ、及び画像上での抽出対象図形の向き、及び抽出対象図形が表す物体の向きの少なくとも何れかを含む
ことを特徴とする請求項7記載の図形抽出方法。
The state of the extraction target graphic on the image is
8. The method according to claim 7, further comprising at least one of a size of the extraction target graphic on the image, an orientation of the extraction target graphic on the image, and an orientation of an object represented by the extraction target graphic. .
原画像中に存在する人物の所定の部分に特有の形状パターンを探索し、検出した形状パターンの大きさ、向き及び人物の顔と前記所定の部分との位置関係に応じて人物の顔に相当すると推定される領域を設定し、設定した領域に重み係数を付与することを、人物の各部分に特有の複数種類の形状パターンを探索対象として各々行い、A shape pattern specific to a predetermined part of the person present in the original image is searched for, and corresponds to a person's face according to the size and orientation of the detected shape pattern and the positional relationship between the person's face and the predetermined part. Then, an area to be estimated is set, and a weighting coefficient is given to the set area, and a plurality of types of shape patterns specific to each part of the person are performed as search targets, respectively.
人物の顔に相当すると推定される領域として設定した複数の領域の各々の範囲、及び前記複数の領域に各々付与した重み係数に基づいて、原画像中の人物の顔に相当する確度が最も高い領域を判断するBased on the respective ranges of the plurality of regions set as the regions estimated to correspond to the person's face and the weighting factors respectively assigned to the plurality of regions, the probability that the person's face in the original image corresponds to the highest is highest. Judge the area
顔領域判断方法。Face area determination method.
JP25897795A 1994-10-28 1995-10-05 Exposure determination method, figure extraction method, and face area determination method Expired - Fee Related JP3576654B2 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP25897795A JP3576654B2 (en) 1994-10-31 1995-10-05 Exposure determination method, figure extraction method, and face area determination method
US08/549,181 US5629752A (en) 1994-10-28 1995-10-27 Method of determining an exposure amount using optical recognition of facial features

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
JP6-266598 1994-10-31
JP26659894 1994-10-31
JP25897795A JP3576654B2 (en) 1994-10-31 1995-10-05 Exposure determination method, figure extraction method, and face area determination method

Publications (2)

Publication Number Publication Date
JPH08184925A JPH08184925A (en) 1996-07-16
JP3576654B2 true JP3576654B2 (en) 2004-10-13

Family

ID=26543910

Family Applications (1)

Application Number Title Priority Date Filing Date
JP25897795A Expired - Fee Related JP3576654B2 (en) 1994-10-28 1995-10-05 Exposure determination method, figure extraction method, and face area determination method

Country Status (1)

Country Link
JP (1) JP3576654B2 (en)

Families Citing this family (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3645384B2 (en) * 1996-12-26 2005-05-11 富士写真フイルム株式会社 Copying apparatus and copying condition determining method
US6529630B1 (en) 1998-03-02 2003-03-04 Fuji Photo Film Co., Ltd. Method and device for extracting principal image subjects
JP3657769B2 (en) 1998-03-19 2005-06-08 富士写真フイルム株式会社 Image processing method and image processing apparatus
US6445819B1 (en) 1998-09-10 2002-09-03 Fuji Photo Film Co., Ltd. Image processing method, image processing device, and recording medium
US7092569B1 (en) 1999-07-29 2006-08-15 Fuji Photo Film Co., Ltd. Method and device for extracting specified image subjects
US6834127B1 (en) 1999-11-18 2004-12-21 Fuji Photo Film Co., Ltd. Method of adjusting output image areas
US7106887B2 (en) 2000-04-13 2006-09-12 Fuji Photo Film Co., Ltd. Image processing method using conditions corresponding to an identified person
EP1467549B1 (en) 2000-10-20 2011-03-23 FUJIFILM Corporation Image processing system associating information with identified subject persons of image
JP4320272B2 (en) 2004-03-31 2009-08-26 富士フイルム株式会社 Specific area detection method, specific area detection apparatus, and program
JP4180027B2 (en) 2004-08-27 2008-11-12 株式会社豊田中央研究所 Facial part position detection apparatus and method, and program
JP5077809B2 (en) * 2007-07-17 2012-11-21 富士ゼロックス株式会社 Image processing apparatus, image processing system, and image processing program
JP5012477B2 (en) * 2007-12-12 2012-08-29 株式会社ニコン Partial image extraction method and partial image extraction apparatus

Also Published As

Publication number Publication date
JPH08184925A (en) 1996-07-16

Similar Documents

Publication Publication Date Title
US5629752A (en) Method of determining an exposure amount using optical recognition of facial features
JP3557659B2 (en) Face extraction method
US7171044B2 (en) Red-eye detection based on red region detection with eye confirmation
JPH09138471A (en) Specified shape area extracting method, specified area extracting method and copy condition deciding method
US8861845B2 (en) Detecting and correcting redeye in an image
US8254644B2 (en) Method, apparatus, and program for detecting facial characteristic points
US8131013B2 (en) Method and detecting system for positions of facial parts
JP2008004123A (en) Specific shape region extraction device and method, specific region extraction device and method, and copy condition decision device and method
JP3499305B2 (en) Face area extraction method and exposure amount determination method
JP3576654B2 (en) Exposure determination method, figure extraction method, and face area determination method
CN110348307B (en) Path edge identification method and system for crane metal structure climbing robot
JP2001274990A (en) Image processing method and image processor
JP3516786B2 (en) Face area extraction method and copy condition determination method
JP2004265431A (en) Face extraction method
KR101151739B1 (en) System for color clustering based on tensor voting and method therefor
JP3636783B2 (en) Face area determination method, copy method, and exposure amount determination method
JP2638701B2 (en) Feature image data extraction method
JP2004234689A (en) Face extracting method
JPH05210736A (en) Method for extracting contour of image
JPH05342412A (en) Extracting system for gradient vector and feature extracting system for character recognition
JP3449836B2 (en) Image clipping method and apparatus
JP2004206738A (en) Face extraction method
JP2004234688A (en) Face extracting method
JPH11232463A (en) Picture recognizing device and method therefor
JPH08315155A (en) Graphic preprocessing unit

Legal Events

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20040706

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20040708

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20080716

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20080716

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20090716

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20090716

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20100716

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20110716

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20110716

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20120716

Year of fee payment: 8

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

Free format text: PAYMENT UNTIL: 20120716

Year of fee payment: 8

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

Free format text: PAYMENT UNTIL: 20130716

Year of fee payment: 9

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

LAPS Cancellation because of no payment of annual fees