JP3760846B2 - Subject extraction device and photographing device - Google Patents

Subject extraction device and photographing device Download PDF

Info

Publication number
JP3760846B2
JP3760846B2 JP2001357984A JP2001357984A JP3760846B2 JP 3760846 B2 JP3760846 B2 JP 3760846B2 JP 2001357984 A JP2001357984 A JP 2001357984A JP 2001357984 A JP2001357984 A JP 2001357984A JP 3760846 B2 JP3760846 B2 JP 3760846B2
Authority
JP
Japan
Prior art keywords
subject
focus
image
processing
focus evaluation
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
JP2001357984A
Other languages
Japanese (ja)
Other versions
JP2003156680A (en
Inventor
直高 岸田
Original Assignee
コニカミノルタフォトイメージング株式会社
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 コニカミノルタフォトイメージング株式会社 filed Critical コニカミノルタフォトイメージング株式会社
Priority to JP2001357984A priority Critical patent/JP3760846B2/en
Publication of JP2003156680A publication Critical patent/JP2003156680A/en
Application granted granted Critical
Publication of JP3760846B2 publication Critical patent/JP3760846B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Focusing (AREA)
  • Automatic Focus Adjustment (AREA)
  • Processing Of Color Television Signals (AREA)
  • Studio Devices (AREA)

Description

【0001】
【発明の属する技術分野】
この発明は、画像から特定被写体を抽出する被写体抽出技術に関する。
【0002】
【従来の技術】
従来のカメラ等において自動合焦制御(オートフォーカス制御)を行う場合、画面のどの領域で焦点検出を行うかは予め決められていた。例えば、画像の中央に設定された合焦評価領域で自動焦点検出を行ったり、複数の合焦評価領域のうちから最も被写体距離の近い領域を特定し、その領域で自動焦点検出を行っている。
【0003】
また、画像処理の技術分野では、画像から人物像を検出する技術が提案されている。かかる技術での人物像抽出処理では、常に高精度に人物像の検出を行うことを主眼としているため、対象となる画像がどのような状態の画像であっても、常に高精度に人物像を検出するための処理が行われる。
【0004】
【発明が解決しようとする課題】
しかしながら、従来の自動合焦制御においては、予め決められた画面中の領域で自動焦点検出を行うだけであるため、その領域中にユーザの意図する主被写体が含まれていない場合には、ユーザの意図とは異なった領域で焦点検出が行われることとなり、その結果ユーザが撮影したかった主被写体がぼけた画像で撮影されるという問題があった。
【0005】
また、画像処理の分野で提案されている人物像検出技術を適用して、画像から人物を検出し、その人物像を主被写体と特定して焦点検出を行うことも考えられるが、どのような画像であっても同様の人物像抽出処理を行うとすると、処理時間が長くなるという問題が発生する。また、その反面、処理効率を重視して粗雑な人物抽出処理を行うと正確な人物検出を行うことが出来なくなるという問題が発生する。
【0006】
特に、電子カメラ等の撮影装置において、主被写体を検出し、その主被写体が適切に合焦状態となった状態で撮影動作を行うように実現する場合、主被写体を抽出する処理を効率化するだけでなく、同時に正確性を向上させることも望まれる。
【0007】
そこで、この発明は、上記課題に鑑みてなされたものであって、処理効率が向上するとともに、正確に主被写体を抽出することの可能な被写体抽出装置を提供することを目的とし、また、そのような被写体抽出技術の適用された撮影装置を提供することをも目的とする。
【0008】
【課題を解決するための手段】
上記目的を達成するために、請求項1に記載の発明は、画像から特定被写体の検出を行う被写体抽出装置であって、前記画像における合焦評価領域の合焦状態を評価する合焦評価手段と、前記合焦評価手段の評価結果に基づいて前記合焦評価領域に含まれる被写体像が合焦状態となるように制御する合焦制御手段と、前記合焦評価領域の評価結果に基づいて前記特定被写体の抽出処理を行う際の処理内容を変更する処理内容変更手段と、前記処理内容に基づいて前記画像のうちから前記特定被写体の抽出処理を行う被写体抽出手段と、を備え、前記被写体抽出手段が、前記特定被写体の抽出処理にあたって、画素間引き処理を行うように構成され、前記処理内容変更手段が、前記合焦制御手段の制御によって前記被写体像が合焦状態に近づくにつれて、前記画素間引き処理における間引き数を減少させていくことを特徴としている
【0009】
請求項2に記載の発明は、画像から特定被写体の検出を行う被写体抽出装置であって前記画像における合焦評価領域の合焦状態を評価する合焦評価手段と、前記合焦評価手段の評価結果に基づいて前記合焦評価領域に含まれる被写体像が合焦状態となるように制御する合焦制御手段と、前記合焦評価領域の評価結果に基づいて前記特定被写体の抽出処理を行う際の処理内容を変更する処理内容変更手段と、前記処理内容に基づいて前記画像のうちから前記特定被写体の抽出処理を行う被写体抽出手段と、を備え、前記被写体抽出手段が、前記特定被写体の抽出処理にあたって、ブロック分割処理を行うように構成され、前記処理内容変更手段が、前記合焦制御手段の制御によって前記被写体像が合焦状態に近づくにつれて、前記ブロック分割処理におけるブロック分割数を増加させていくことを特徴としている。
【0011】
請求項に記載の発明は、画像から特定被写体の検出を行う被写体抽出装置であって、前記画像における合焦評価領域の合焦状態を評価する合焦評価手段と、前記合焦評価手段の評価結果に基づいて前記合焦評価領域に含まれる被写体像が合焦状態となるように制御する合焦制御手段と、前記合焦評価領域の評価結果に基づいて前記特定被写体の抽出処理を行う際の処理内容を変更する処理内容変更手段と、前記処理内容に基づいて前記画像のうちから前記特定被写体の抽出処理を行う被写体抽出手段と、を備え、前記処理内容変更手段が、前記合焦制御手段の制御によって前記被写体像が合焦状態に近づくにつれて、前記特定被写体の抽出処理の実行頻度を増加させることを特徴としている。
【0012】
請求項に記載の発明は、請求項1乃至のいずれかに記載の被写体抽出装置において、前記被写体抽出手段が、色判定処理において、前記画像の肌色判別を行うことによって前記特定被写体を抽出することを特徴としている。
【0013】
請求項に記載の発明は、請求項1乃至のいずれかに記載の被写体抽出装置において、前記被写体抽出手段によって抽出される前記特定被写体の領域と前記合焦評価領域とが一致しない場合に、前記合焦評価領域を前記特定被写体の領域に設定変更する手段、をさらに備えている。
【0014】
請求項に記載の発明は、撮影レンズを介して画像を撮影する撮影装置であって、前記画像における合焦評価領域の合焦状態を評価する合焦評価手段と、前記合焦評価手段の評価結果に基づいて前記撮影レンズを駆動することにより、前記合焦評価領域に含まれる被写体像が合焦状態となるように制御する合焦制御手段と、前記合焦評価領域の評価結果に基づいて特定被写体の抽出処理を行う際の処理内容を変更する処理内容変更手段と、前記処理内容に基づいて前記画像のうちから前記特定被写体の抽出処理を行う被写体抽出手段と、前記被写体抽出手段で抽出される前記特定被写体の領域を前記合焦評価領域として設定する手段と、を備え、前記被写体抽出手段が、前記特定被写体の抽出処理にあたって、画素間引き処理を行うように構成され、前記処理内容変更手段が、前記合焦制御手段の制御によって前記被写体像が合焦状態に近づくにつれて、前記画素間引き処理における間引き数を減少させていくことを特徴としている。
【0015】
請求項に記載の発明は、撮影レンズを介して画像を撮影する撮影装置であって、前記画像における合焦評価領域の合焦状態を評価する合焦評価手段と、前記合焦評価手段の評価結果に基づいて前記撮影レンズを駆動することにより、前記合焦評価領域に含まれる被写体像が合焦状態となるように制御する合焦制御手段と、前記合焦評価領域の評価結果に基づいて特定被写体の抽出処理を行う際の処理内容を変更する処理内容変更手段と、前記処理内容に基づいて前記画像のうちから前記特定被写体の抽出処理を行う被写体抽出手段と、前記被写体抽出手段で抽出される前記特定被写体の領域を前記合焦評価領域として設定する手段と、を備え、前記被写体抽出手段が、前記特定被写体の抽出処理にあたって、ブロック分割処理を行うように構成され、前記処理内容変更手段が、前記合焦制御手段の制御によって前記被写体像が合焦状態に近づくにつれて、前記ブロック分割処理におけるブロック分割数を増加させていくことを特徴としている。
【0017】
請求項に記載の発明は、撮影レンズを介して画像を撮影する撮影装置であって、前記画像における合焦評価領域の合焦状態を評価する合焦評価手段と、前記合焦評価手段の評価結果に基づいて前記撮影レンズを駆動することにより、前記合焦評価領域に含まれる被写体像が合焦状態となるように制御する合焦制御手段と、前記合焦評価領域の評価結果に基づいて特定被写体の抽出処理を行う際の処理内容を変更する処理内容変更手段と、前記処理内容に基づいて前記画像のうちから前記特定被写体の抽出処理を行う被写体抽出手段と、前記被写体抽出手段で抽出される前記特定被写体の領域を前記合焦評価領域として設定する手段と、を備え、前記処理内容変更手段が、前記合焦制御手段の制御によって前記被写体像が合焦状態に近づくにつれて、前記特定被写体の抽出処理の実行頻度を増加させることを特徴としている。
請求項に記載の発明は、請求項乃至のいずれかに記載の撮影装置において、前記被写体抽出手段が前記特定被写体を抽出した際に、前記特定被写体の領域と前記合焦評価領域とが一致する場合に、本撮影を行うための撮影動作を許可する手段、をさらに備えている。
【0018】
【発明の実施の形態】
以下、この発明の実施の形態について図面を参照しつつ詳細に説明する。なお、以下においてはデジタルカメラを例に挙げて説明することとする。
【0019】
<1.第1の実施の形態>
まず、第1の実施の形態について説明する。図1はこの発明にかかる撮影装置の一例としてのデジタルカメラ1を示す斜視図である。図1に示すように、デジタルカメラ1の前面側には、撮影レンズ11とファインダ窓2とが設けられている。撮影レンズ11の内側には撮影レンズ11を介して入射する被写体像を光電変換して画像データ(画素ごとの画素データの配列からなるデータ)を生成するための撮像手段としてCCD撮像素子30が設けられている。
【0020】
撮影レンズ11には光軸方向に沿って移動可能なフォーカシングレンズが含まれており、フォーカシングレンズを駆動することにより、CCD撮像素子30に結像される画像の合焦状態を可変することができるように構成されている。
【0021】
また、デジタルカメラ1の上面側には、シャッタボタン8と、カメラ状態表示器13と、設定キー14とが配置されている。シャッタボタン8は被写体の撮影を行うときにユーザが押し込み操作するボタンであり、半押し状態と全押し状態との2段階を検知することができるように構成される。カメラ状態表示器13は例えばセグメント表示タイプの液晶表示器によって構成され、デジタルカメラ1における現在の設定内容等をユーザに示すために設けられている。また、設定キー14は、被写体に応じた撮影モードの選択設定や、自動合焦制御時にどのような合焦制御を行うかを設定するためのキースイッチである。
【0022】
また、デジタルカメラ1の側面部には画像データを記録するための記録メディア9を装着する装着部15が形成されており、メモリカード等のような交換可能な記録メディア9を装着することができる。
【0023】
なお、図1における図示は省略するが、デジタルカメラ1の背面側には、CCD撮像素子30で撮影された画像等を表示するための液晶表示部が設けられる。
【0024】
図2はデジタルカメラ1の内部構成を示すブロック図である。なお、図2において実線矢印は制御信号の流れを示しており、斜線地矢印は画像信号の流れを示している。
【0025】
図2に示すように、デジタルカメラ1は、被写体を撮影する際の撮影機能を実現する撮影機能部20と、合焦制御時に主被写体(特定被写体)を検出してその主被写体が合焦状態となるような制御を行う主被写体合焦制御部40と、撮影レンズ11に含まれるフォーカシングレンズ12を駆動してCCD撮像素子30に結像される画像の合焦状態を変更するレンズ駆動部50と、上述のシャッタボタン8及び設定キー14を含む操作部16と、操作部16の操作内容に応じて撮影機能部20及び主被写体合焦制御部40を制御する全体制御部18とを備えて構成される。
【0026】
撮影機能部20は、撮影レンズ11、CCD撮像素子30、CCD撮像素子30からの画像データを一時的に格納するための画像メモリ31、画像メモリ31から得られる画像データに対して画像圧縮等の所定の画像処理を行う画像処理部32、画像処理部32において画像表示用の画像処理が施された表示用画像を表示する液晶表示部33、及び、画像処理部32において画像記録用の画像処理が施された撮影画像を記録する記録メディア9を備えて構成される。
【0027】
撮影機能部20は、全体制御部18の制御によって、本撮影前にライブビュー画像を液晶表示部33に表示させるためのライブビュー動作と、シャッタボタン8が全押しされたときに記録メディア9に記録するための画像撮影を行う本撮影動作とを行うように構成される。また、液晶表示部33がオフ状態であったとしても、少なくとも合焦制御時にはCCD撮像素子30による撮影動作が行われる。
【0028】
また、主被写体合焦制御部40は、画像全体における合焦状態を評価するための合焦評価領域を設定する合焦評価領域設定部41、画像メモリ31から画像データを取り込み、合焦評価領域設定部41から指定される合焦評価領域の部分画像データから合焦状態を評価するための評価値を求める合焦評価部42、合焦評価部42で求められる評価値に基づいてレンズ駆動部50に駆動信号を与え、合焦評価領域の被写体像を合焦状態に導く合焦制御部43、合焦評価部42で求められる評価値に基づいて合焦評価領域における被写体像のぼけ量を求め、そのぼけ量に応じて被写体抽出部45における設定状態を変更する処理内容変更部44、及び、画像メモリ31から画像データを取り込み、処理内容変更部44から設定される処理内容に基づいて主被写体(特定被写体)の抽出処理を行う被写体抽出部45、を備えて構成される。
【0029】
全体制御部18は、例えばシャッタボタン8が半押し状態にされたときに主被写体が適切な合焦状態となるように主被写体合焦制御部40を機能させ、全押し状態にされたときに撮影機能部20において本撮影動作を行うように制御する。また、全体制御部18は本撮影前にはライブビュー動作として撮影機能部20において逐次画像撮影を行わせ、逐次更新される画像を液晶表示部33に表示させたり、主被写体合焦制御部40に与えるように制御する。
【0030】
レンズ駆動部50は合焦制御動作時に合焦制御部43から与えられる駆動信号に基づいてフォーカシングレンズ12を遠側から近側に向けて所定ピッチで移動させ、CCD撮像素子30に結像される画像の合焦状態を変化させる。そして、主被写体合焦制御部40において主被写体が合焦状態となるレンズ位置が特定され、合焦制御部43よりそのレンズ位置が指定された場合には、レンズ駆動部50はその指定されたレンズ位置にフォーカシングレンズ12を移動させて主被写体が合焦した状態の画像をCCD撮像素子30に結像させる。
【0031】
図3はデジタルカメラ1に予め設定される合焦評価領域の初期状態を示す図である。図3に示すように、合焦評価領域設定部41には、合焦評価領域の初期状態として、画像メモリ31から取得する画像G1のほぼ中央部分に合焦評価領域FR1が設定されており、主被写体合焦制御部40が機能して最初の合焦評価を行う際には、合焦評価領域設定部41は図3に示す合焦評価領域FR1の位置及びサイズを合焦評価部42に指示する。
【0032】
合焦評価部42は、画像メモリ31から画像G1を取得し、そのうちから合焦評価領域FR1についての画像成分を抽出する。そして、合焦評価領域FR1の画像成分の合焦状態を評価するための評価値を求める。評価値の算出方法には、いくつかの方法がある。例えば、第1の方法として、合焦評価領域FR1に含まれる画像成分をバンドパスフィルタに通し、それによって抽出される画像信号の高周波成分の強度を評価値とする方法があり、また、第2の方法として、合焦評価領域FR1に含まれる画像成分の隣接画素間での輝度値の差分値を求め、その差分値を合焦評価領域FR1内で累積した値を評価値とする方法がある。また、第3の方法として、合焦評価領域FR1に含まれる画像成分に対して微分フィルタ等を用いたエッジ抽出処理を施し、その結果抽出されるエッジの幅(ぼけ幅)を評価値とする方法もある。
【0033】
第1及び第2の方法は、被写体を撮影した場合、画像がぼけている状態では高周波成分のレベルは小さく、また隣接画素間の輝度差の累積値も小さなものとなるのに対し、焦点が合ってくる(合焦状態に近づく)にしたがって高周波成分のレベルは大きく、また隣接画素間の輝度差の累積値も大きなものとなることを検出する方法である。
【0034】
このため、フォーカシングレンズ12を遠側から近側に次第に移動させた場合、第1及び第2の方法で得られる評価値は、図4に示すように変化する。フォーカシングレンズ12を移動させつつ、各レンズ位置で撮影された画像から評価値を求めると、図4に示すように評価値が変化し、レンズ位置PXで評価値が最大値を示す。このため、フォーカシングレンズ12をレンズ位置PXに移動させれば、合焦評価領域FR1に含まれる画像成分が合焦状態になると判明し、合焦制御部43がフォーカシングレンズ12をレンズ位置PXに移動させて合焦状態を実現する。
【0035】
一方、第3の方法は、被写体を撮影した場合、画像がぼけている状態ではエッジ幅は大きくなるのに対し、焦点が合ってくるにしたがってエッジ幅が小さくなることを検出する方法である。このため、フォーカシングレンズ12を遠側から近側に次第に移動させた場合、第3の方法で得られる評価値は、合焦位置で最小値を示すこととなり、合焦制御部43がその最小値を示すレンズ位置にフォーカシングレンズ12を移動させて合焦状態を実現する。
【0036】
なお、合焦評価部42において適用される評価値の算出方法は、上記第1乃至第3の方法のいずれを採用してもよく、またその他の算出方法を採用してもよい。
【0037】
ところで、合焦評価領域FR1が画像G1に対して常に固定された領域に設定されると、上述したようにその合焦評価領域FR1中にユーザの意図する主被写体が含まれていない場合には、ユーザの意図とは異なった領域で焦点検出が行われることとなり、その結果ユーザが撮影したかった主被写体がぼけた画像で撮影される。
【0038】
図5は主被写体となる人物が画像の端に存在する場合であって、固定された合焦評価領域で合焦制御を行った場合の撮影画像を示す図である。図5に示すように、主被写体となる人物が画像の端の部分に存在する場合、画像の中央部分の合焦評価領域で合焦制御を行うと、背景部分が合焦状態となり、主被写体がぼけてしまうという現象が発生する。
【0039】
これに対し、図6は主被写体となる人物が画像の端に存在する場合にユーザが撮影を意図する画像を示す図である。図6に示すように、主被写体となる人物が画像の端に存在する場合であっても、主被写体である人物が合焦状態として撮影が行われることが望まれる。
【0040】
そのため、この実施の形態のデジタルカメラ1では、被写体抽出部45が画像メモリ31から画像を取得してその画像のうちから主被写体を抽出する処理を行う。そして、合焦評価領域設定部41が主被写体であると判断された画像部分に合焦評価領域を変更設定し、合焦評価部42はその主被写体が含まれる合焦評価領域について評価値の算出を行う。すなわち、合焦評価領域が、初期状態の領域から主被写体として認識された画像領域に修正され、その主被写体の被写体像が合焦状態となるように合焦制御が行われる。
【0041】
これにより、本撮影動作が行われると、主被写体が合焦状態となった適切な画像が撮影されることになる。
【0042】
また、被写体抽出部45においては、画像の肌色成分を抽出してその肌色成分が分布する領域を主被写体領域として認識するような被写体抽出処理が行われる。このため、主被写体がぼけた状態の場合は、例えば背景部分の色が人物の顔部分に影響し、正確な被写体抽出処理を行うことは困難である。そこで、この実施の形態では、画像又は主被写体のぼけ量に応じた被写体抽出処理を行うように構成される。つまり、画像又は主被写体がぼけた状態にあるときには比較的粗雑な被写体抽出処理を行って効率的に主被写体を抽出するようにし、主被写体が合焦状態に近づくと緻密な被写体抽出処理を行って高精度な被写体抽出処理を行うのである。
【0043】
合焦評価部42は各レンズ位置で算出する評価値を処理内容変更部44に与え、処理内容変更部44は被写体抽出部45における被写体抽出処理の処理内容を画像又は主被写体のぼけ量に応じて決定する。そして、被写体抽出部45は、ぼけ量に応じて決定された処理内容に基づいて、画像メモリ31から得られる画像から主被写体の抽出処理を行う。
【0044】
これにより、画像又は主被写体がぼけた状態のときは効率的に主被写体を抽出することができ、主被写体が合焦状態に近づくと高精度に主被写体を抽出することができる。
【0045】
以下、この実施の形態におけるデジタルカメラ1の処理手順について説明する。図7乃至図9は、第1の実施の形態におけるデジタルカメラ1の処理手順を示すフローチャートであり、特に図7及び図8はシャッタボタン8が半押し状態とされてから本撮影動作が行われるまでの全体的な処理手順を示しており、また、図9は被写体抽出処理の詳細な処理手順を示している。
【0046】
まず、ユーザによってシャッタボタン8が半押し状態にされると(ステップS101)、全体制御部18が主被写体合焦制御部40と撮影機能部20とを機能させる。このとき、全体制御部18は主被写体合焦制御部40によってフォーカシングレンズ12を最も遠側に移動させるとともに、撮影機能部20を制御してフォーカシングレンズ12が最も遠側に移動した状態で画像撮影を行わせる。
【0047】
そして、合焦評価部42は画像メモリ31に格納された画像を取り込み(ステップS102)、評価値の算出処理を行う(ステップS103)。このとき、合焦評価領域設定部41は、画像G1の中央部分に予め設定された初期状態の合焦評価領域FR1を評価値算出対象の合焦評価領域とすべきことを合焦評価部42に対して指示する。合焦評価部42では、ほぼ画面中央に設定される合焦評価領域FR1(図3参照)に含まれる画像成分に基づいて評価値の算出が行われ、算出された評価値は合焦制御部43及び処理内容変更44に与えられる。
【0048】
そして処理内容変更部44及び被写体抽出部45が機能し、被写体抽出処理が行われる(ステップS104)。
【0049】
図9のフローチャートを参照する。被写体抽出処理(ステップS104)に進むと、まず、処理内容変更部44は評価値から合焦評価領域のぼけ量を算出する(ステップS201)。ぼけ量とは、合焦評価領域の画像成分がぼけた状態のときに大きな値を示し、合焦評価領域の画像成分が合焦状態に近づくにつれて次第に小さな値をとるようになる量である。評価値を算出する際に、上述した第1及び第2の方法を採用する場合には、例えば評価値の逆数をぼけ量として定義してもよいし、その他の値をぼけ量として定義してもよい。また、上述の第3の方法を評価値算出方法として採用する場合には算出された評価値そのものをぼけ量としてもよい。
【0050】
被写体抽出部45は、主被写体を抽出する処理の前処理として画素間引き処理とブロック分割処理とを行い、実際に主被写体を抽出する処理として色判定処理と形状判定処理とを行うように構成されている。そして処理内容変更部44は、画素間引き処理における画素間引き数、ブロック分割処理におけるブロック分割数、及び、形状判定処理における形状判定基準を、合焦評価領域のぼけ量に応じて変更する。
【0051】
まず、処理内容変更部44は、合焦評価領域のぼけ量に応じて画素間引き数を設定する(ステップS202)。図10は、ぼけ量と画素間引き数との関係を示す図である。図10に示すように、ぼけ量と画素間引き数との関係はぼけ量に比例して画素間引き数が増加するように設定されている。つまり、ぼけ量が小さく、合焦評価領域の画像成分が比較的合焦状態に近い場合には、画素間引き数は小さな値に設定され、ぼけ量が大きく、合焦評価領域の画像成分がぼけた状態にある場合には、画素間引き数は大きな値に設定される。
【0052】
そしてステップS202においては、さらに処理内容変更部44で設定される画素間引き数が被写体抽出部45に指示され、その指示された画素間引き数に基づいて、被写体抽出部45が画像メモリ31から得られる画像に対して画素間引き処理を実行する。
【0053】
図11は画素間引き処理の概念を示す図である。図11に示すように、ぼけ量が大きいときには、画素間引き数が大きな値に設定されるので、画像G1から間引かれる画素数が多くなり、画像サイズの小さな画像G2が得られる。これに対し、ぼけ量が小さいとき(すなわち、合焦状態に近い状態にあるとき)には、画素間引き数が小さな値に設定されるので、画像G1から間引かれる画素数が少なくなり、画像サイズの比較的大きな画像G3が得られる。
【0054】
このように被写体抽出部45において、肌色判定処理等の主被写体を抽出する処理を行う前に処理対象となる画像の画像サイズを変更しておくことで、合焦評価領域の画像成分がぼけた状態にあるときには、効率的に主被写体の抽出を行うことが可能になる一方、合焦評価領域の画像成分が合焦状態に近い状態にあるときには、正確に主被写体の抽出を行うことが可能になる。
【0055】
次に、処理内容変更部44は、合焦評価領域のぼけ量に応じてブロック分割数を設定する(ステップS203)。図12は、ぼけ量とブロック分割数との関係を示す図である。図12に示すように、ぼけ量とブロック分割数との関係はぼけ量に比例して画素間引き数が減少するように設定されている。つまり、ぼけ量が小さく、合焦評価領域の画像成分が比較的合焦状態に近い場合には、ブロック分割数は大きな値に設定され、ぼけ量が大きく、合焦評価領域の画像成分がぼけた状態にある場合には、ブロック分割数は小さな値に設定される。
【0056】
そしてステップS203においては、さらに処理内容変更部44で設定されるブロック分割数が被写体抽出部45に指示され、その指示されたブロック分割数に基づいて、被写体抽出部45が画素間引き処理によって画像サイズの変更された画像に対してブロック分割処理を実行する。
【0057】
図13及び図14はブロック分割処理の概念を示す図であり、図13はぼけ量が大きい場合を示しており、図14はぼけ量が小さい場合、すなわち合焦評価領域の画像成分が合焦状態に近い場合を示している。
【0058】
図13及び図14に示すように、ぼけ量が大きいときには、被写体抽出部45において比較的少ない数のブロックが生成されるようにブロック分割処理が行われ、ぼけ量が小さいとき(すなわち、合焦状態に近い状態にあるとき)には、被写体抽出部45において比較的多く数のブロックが生成されるようにブロック分割処理が行われる。
【0059】
このように被写体抽出部45において、肌色判定処理等の主被写体を抽出する処理を行う前に処理対象となる画像をブロック分割しておくことで、後述するグループ化処理(ステップS207)以降の処理においてブロック単位で処理を行うことが可能となり、処理の効率化を図ることができる。特に、合焦評価領域の画像成分がぼけた状態にあるときに、ブロック分割数を少なくすることで効率的に主被写体の抽出を行うことが可能になる一方、合焦評価領域の画像成分が合焦状態に近い状態にあるときにはブロック分割数を増加させて正確に主被写体の抽出を行うことが可能になる。
【0060】
次に、処理内容変更部44は、合焦評価領域のぼけ量に応じて形状判定基準を設定する(ステップS204)。例えば、この実施の形態において被写体抽出部45は、肌色ブロックの集合体が、人物の顔形状に類似した形状を有しているか否かを判断するように構成されている。具体的には、形状判定基準となる基準形状の縦横比を設定し、肌色ブロックの集合体がその縦横比の範囲内に収まっているか否かを判断し、収まっている場合には、その肌色ブロックの集合体を主被写体として特定する。そのため、処理内容変更部44は、合焦評価領域のぼけ量に応じて形状判定基準となる縦横比を設定し、それを被写体抽出部45に指示する。なお、ここでの縦横比とは、肌色ブロックの集合体の横方向の分布長さを1としたときの縦方向の分布長さの比をいう。
【0061】
図15は、ぼけ量と縦横比との関係を示す図である。図15に示すように、ぼけ量と縦横比との関係はぼけ量に比例して縦横比が増加するように設定されている。つまり、ぼけ量が小さく、合焦評価領域の画像成分が比較的合焦状態に近い場合には、ブロックの集合体の横方向の分布長さを1としたときの縦方向の分布長さの比が小さくなるように設定されるのに対し、ぼけ量が大きく、合焦評価領域の画像成分がぼけた状態にある場合には、ブロックの集合体の横方向の分布長さを1としたときの縦方向の分布長さの比が大きくなるように設定される。
【0062】
なお、人物の顔形状を主被写体として特定する場合、縦横比の最小値は、縦:横=1.5:1程度とすることが好ましく、また、その最大値は、縦:横=2:1程度とすることが好ましい。このように設定することで、合焦評価領域の画像成分が比較的ぼけた状態にあるときでも、被写体抽出部45において精度は低いがある程度の顔形状の判定を行うことができるとともに、合焦評価領域の画像成分が合焦状態に近い状態にあるときには、高精度に顔形状の判定を行うことができる。
【0063】
上記のように、ぼけ量に応じて縦横比を変更することは、すなわち顔形状として認識するための基準形状を変更することとなり、縦横比を小さくすることは形状判定基準を厳しくすることに相当する。そして、合焦評価領域の画像成分が合焦状態に近い状態にあるときには、形状判定基準を厳しく設定することにより、高精度に主被写体を特定することができるようになる。
【0064】
次に、ステップS205に進み、被写体抽出部45は画素間引き処理された画像から肌色画素を抽出する肌色画素抽出処理を行う。換言すれば、この肌色画素抽出処理は色判定処理を行うことである。肌色画素抽出処理においては、画素データのRGB値から輝度の影響を受けない色度u’,v’を算出し、色度u’,v’が「CIE 1976 UCS色度図」の特定領域内にあるか否かで肌色画素の抽出が行われる。なお、ある画素のRGB値から色度u’,v’を算出する際には、以下の数1及び数2の式で算出することができる。
【0065】
【数1】

Figure 0003760846
【0066】
【数2】
Figure 0003760846
【0067】
図16は、「CIE 1976 UCS色度図」の簡略図である。図16において領域RHは予め計測等によって設定される肌色領域である。このため、上記数1及び数2の式によって求められる色度u’,v’を次の条件式にあてはめれば各画素が肌色画素であるか否かを判定することができる。
【0068】
【数3】
Figure 0003760846
【0069】
【数4】
Figure 0003760846
【0070】
すなわち、上記数1の式によって算出される色度u’が上記数3の条件式を満たし、かつ、上記数2の式によって算出される色度v’が上記数4の条件式を満たす場合には、当該画素は肌色画素であることが判明する。そしてUCS色度図を利用して肌色画素を特定することにより、輝度値の影響を受けることがなく、正確に肌色画素の特定を行うことが可能になるとともに、RGB値から色度u’,v’への変換が比較的簡単な演算であるため、効率的に演算処理を行うことも可能である。
【0071】
なお、図16においては一例として肌色領域RHが四角形の領域として定義される場合を例示したが、例えばUCS色度図のu’v’空間において台形や段円形の肌色領域を設定するようにしてもよい。
【0072】
そして、この肌色画素抽出処理を画素ごとに行う場合、上述したように合焦評価領域の画像成分がぼけた状態にあるときには、画像サイズが小さく画素数が比較的少ないので、迅速に肌色画素の抽出処理を行うことが可能である。これに対し、合焦評価領域の画像成分が合焦状態に近い状態にあるときには、画像サイズが大きく画素数が比較的多いので、サンプル数が増加し、正確に被写体抽出を行うことが可能になる。
【0073】
次に、ステップS206に進み、被写体抽出部45は肌色ブロック抽出処理を行う。ここではステップS203のブロック分割処理によって分割された個々のブロックごとに肌色画素が所定割合以上含まれているか否かを判断し、所定割合以上肌色画素が含まれている場合に当該ブロックを肌色ブロックとして特定する。これに対し、1個のブロック中に含まれる肌色画素数が所定割合未満である場合には、そのブロックは肌色ブロックとしては抽出されず、主被写体を構成するものでないと判断される。
【0074】
このように肌色ブロックを抽出し、以後の処理をブロック単位で実行していくことにより、画素単位で処理を進めていく場合に比べて処理速度の高速化を図ることができる。特にデジタルカメラ1の場合にはシャッタボタン8が半押し状態とされると、シャッタチャンスを逃さないためにも迅速に主被写体を合焦状態に導くことが求められるため、上記のようなブロック単位ごとの処理とすることは重要な意義を有する。また同時に、所定割合の肌色画素が存在するブロックを肌色ブロックとするため、肌色ブロックの信頼性を高めることにもなる。
【0075】
また、合焦評価領域の画像成分がぼけた状態にあるときには、ブロック分割数は比較的少なく、その結果肌色ブロックとして特定されるブロックも少なくなるので、以後の処理を効率的に行うことが可能である。ただし、その反面、合焦評価領域の画像成分がぼけた状態にある場合には、後の形状判定処理において正確な主被写体の検出処理を行うことが困難になるとともに、被写体倍率が小さい(すなわち、画像中に主被写体が小さく写っている)と、肌色ブロックとして認識されず、主被写体を良好に抽出することができなくなる場合がある。
【0076】
これに対し、合焦評価領域の画像成分が合焦状態に近い状態にあるときには、ブロック分割数は比較的多く、その結果肌色ブロックとして特定されるブロック数も多くなるので、以後の形状判定等の処理においてより正確に主被写体を抽出することが可能になる。また、被写体倍率が小さい(すなわち、画像中に主被写体が小さく写っている)場合でも、ブロック数が多いので、主被写体を複数のブロックがカバーすることとなるので、肌色ブロックを良好に認識することができ、主被写体を正確に抽出することが可能になる。
【0077】
次に、ステップS207に進み、被写体抽出部45は肌色ブロックとして特定されたブロックのグループ化処理を行う。グループ化とは、縦方向又は横方向に連続して分布する肌色ブロックを連結して肌色ブロックの集合体を形成させる処理である。このため、1個の肌色ブロックが他の肌色ブロックに接することなく孤立して存在する場合には、当該肌色ブロックはグループ化処理によって肌色ブロックの集合体形成から排除される。換言すれば、このグループ化処理により、主被写体としてありえないような小さな肌色ブロックは、主被写体を構成しないものとして取り扱われる。
【0078】
また、ここでは、グループ化処理によって形成される肌色ブロックの集合体のグループ情報も生成される。グループ情報とは、肌色ブロックの集合体ごとに生成され、集合体を構成する縦方向及び横方向のブロック数とその集合体の重心位置とを含む情報である。このグループ情報は、後に行われる形状判定処理(ステップS208)及び顔の特定処理(ステップS209)において用いられる。
【0079】
次に、ステップS208に進み、被写体抽出部45はステップS207のグループ化処理によって形成された肌色ブロック集合体の形状判定処理を行う。一般に、画像から肌色グループ集合体を求めると、人物の肌部分だけが抽出される訳ではなく、事実上肌色を示す壁や樹木肌等の人物の肌以外の物体も肌色グループ集合体を形成し得る。また人物の手や足も肌色グループ集合体を形成し得る。そこで、この実施の形態では、被写体抽出部45においてさらに形状判定処理を行うことで、人物の顔形状に近い形状分布をしている肌色グループ集合体を主被写体として認識するように実現されている。
【0080】
ここでの形状判定処理は、ステップS204で設定された縦横比の範囲内に肌色ブロックの集合体が含まれるか否かを判断することにより行われる。具体的には、ステップS207で生成されたグループ情報に含まれる縦方向及び横方向のブロック数を取得し、肌色ブロック集合体の縦方向及び横方向の縦横比(M:1)を求める。そしてステップS204で設定された縦横比がK:1である場合、M≦Kの関係が成立すれば、当該肌色ブロック集合体は人物の顔部分を撮影した画像成分であると判断する。
【0081】
なお、M≦Kの関係だけでは、横方向一列状に分布する肌色ブロック集合体も人物の顔部分であると判断されるので、そのような事態を避けるために、Mの値に下限値Lを設定してもよい。すなわち、L≦M≦Kの関係が成立すれば当該肌色ブロック集合体は人物の顔部分を撮影した画像成分であると判断するようにしてもよい。
【0082】
図17は、形状判定処理(ステップS208)において主被写体であると認識される領域を示す図である。なお、図17では、主被写体であると認識される領域を黒塗りで示している。図17に示すように、被写体抽出部45が形状判定処理を行うことにより、人物の顔部分が含まれるブロックが主被写体の領域であるものとして特定されることになる。
【0083】
次に、ステップS209に進み、被写体抽出部45は形状判定処理によって複数の主被写体が特定された場合に、そのうちから一の主被写体を特定するために顔の特定処理、すなわち主被写体の特定処理を行う。被写体抽出部45には予め画面に対する重み付け係数が設定されており、主被写体として特定された肌色ブロック集合体の重心位置に基づいて当該肌色ブロック集合体についての重み付け係数を特定する。
【0084】
図18は画面に対する重み付け係数の一例を示す図である。図18に示すように画面G5が複数の領域に分割されており、各領域にその領域の重み付け係数が定義されている。なお、画面G5のサイズは、画素間引き数に応じて変化し、画素間引き処理後の画像G1,G2(図11参照)の画像サイズと一致するように調整される。そして、肌色ブロック集合体の重心位置が画面G5のどの位置に位置するかを特定し、その特定結果に基づいて重み付け係数を特定する。例えば、図17において、主被写体として特定された黒塗りの肌色ブロック集合体について考えると、その重心位置は図18において位置P1にあるため、重み付け係数は「10」と特定される。そして、被写体抽出部45は、当該肌色ブロック集合体の面積(例えば、肌色ブロック集合体を構成するブロック数)と、特定された重み付け係数の積を算出し、肌色ブロック集合体の主被写体適合値(主被写体らしさを示す値)とする。そして、複数の肌色ブロック集合体のそれぞれについて主被写体適合値を算出すると、各主被写体適合値を比較し、最大値を示す肌色ブロック集合体を主被写体となる人物の顔部分であると認定する。
【0085】
このように、複数の主被写体が特定された場合には、画面の中央寄りに主被写体がフレーミングされるであろうとの前提にたって、画面上の位置に対する重み付け係数を用いて主被写体適合値を求めることにより、一の主被写体を正確に特定することができる。また、小さく写っている物体よりも大きく写っている物体の方が主被写体である可能性が高いため、重み付け係数を用いた計算を行う際には、肌色ブロック集合体の面積を考慮に入れることにより、正確に主被写体を特定することが可能になる。
【0086】
なお、最大値を示す主被写体適合値から所定範囲内の値を示す複数の主被写体適合値を採用してもよい。この場合、主被写体領域として複数の領域が特定されることになるので、いわゆるマルチエリアの合焦制御を適用することになる。
【0087】
以上のようにして主被写体が特定されると、被写体抽出部45は全体制御部18に対して主被写体領域を指示することにより、主被写体領域が液晶表示部33にも表示されることになる(ステップS210)。これにより、ユーザは、画像のどの部分が主被写体と認識され、合焦制御がなされるかを容易に把握することができる。また、被写体抽出部45は、上記のような処理を行うことによって特定した主被写体領域を合焦評価領域設定部41に指示する。
【0088】
図7のフローチャートに戻り、ステップS104の被写体抽出処理が終了すると、ステップS105に進み、合焦評価領域設定部41は合焦評価部42が評価値を算出するための合焦評価領域を被写体抽出部45によって指示された被写体領域に設定変更する。この結果、合焦評価部42において次回の評価値算出が行われる際には、主被写体の画像成分について評価値算出を行うことが可能になる。
【0089】
次に合焦制御部43によって所定ピッチでのフォーカシングレンズ12のレンズ駆動が行われ(ステップS106)、そのレンズ位置での画像取り込みが行われて(ステップS107)、合焦評価部42による評価値算出処理が行われる(ステップS108)。ステップS108において合焦評価部42は、ステップS105の合焦評価領域の変更設定処理で設定された合焦評価領域の画像成分に基づいて評価値を算出する。
【0090】
以後、評価値が最大値(又は最小値)を示すまでステップS106〜S108の処理を繰り返し、評価値が最大値(又は最小値)を示すレンズ位置を特定することができた場合、すなわちステップS109において合焦評価領域の合焦状態が実現された場合に、図8のフローチャートに進む。
【0091】
そして、合焦評価領域の合焦状態が実現された段階で再度被写体抽出処理を実行する(ステップS110)。ここでの被写体抽出処理(ステップS110)も、図9を参照して説明した上記ステップS104の被写体抽出処理と同様である。
【0092】
ただし、ステップS104の段階では、合焦評価領域の画像成分がぼけた状態で主被写体の抽出処理が行われるため、画素間引き数が大きく、ブロック分割数も少ない状態で被写体抽出処理が行われる。そしてまた、形状判定基準も厳しい状態ではないため、効率的に主被写体であると推定される領域は特定されるが、その精度は低い。そのため、合焦評価領域の画像成分がぼけた状態で主被写体の抽出処理が行われ、それによって特定された主被写体領域が合焦状態と判定されたとしても、その合焦評価領域には実際の主被写体が含まれていない可能性がある。
【0093】
そのため、この実施の形態ではステップS110において再度被写体抽出処理を行うこととしている。そしてステップS110の段階では、合焦評価領域の画像成分が合焦状態であると判断された状態であるため、被写体抽出処理において、画素間引き数が小さく、かつ、ブロック分割数が多い状態で被写体抽出処理が行われる。そしてまた、形状判定基準も厳しい状態となるため、主被写体領域を高精度に特定することが可能である。
【0094】
そして被写体抽出処理(ステップS110)が行われて、信頼性の高い主被写体領域が特定されると、被写体抽出部45は前回同様に合焦評価領域設定部41に対して特定された主被写体領域を指示する。
【0095】
これにより、合焦評価領域設定部41は、ステップS108において採用されていた合焦評価領域と、ステップS110の被写体抽出処理において特定された被写体領域とが一致するか否かを判断する(ステップS111)。つまり、この処理は、ステップS106〜S108の繰り返し処理で評価対象とされていた合焦評価領域が正確な主被写体領域であったのかどうかを確認するための処理である。その結果、合焦評価領域と、特定された主被写体領域とが一致しない場合には、ステップS105(図7)に戻り、合焦評価領域設定部41は合焦評価領域を、ステップS110の被写体抽出処理で特定された主被写体領域に設定変更する。よって、合焦評価部42において次回の評価値算出が行われる際には、信頼性の高い主被写体領域の画像成分について評価値算出を行うことが可能になり、ステップS106以降の処理が行われる。その一方、合焦評価領域と、特定された主被写体領域とが一致する場合には、ステップS112(図8)に進む。
【0096】
合焦評価領域設定部41が、合焦評価領域と、特定された主被写体領域とが一致すると判断した場合には、全体制御部18に対して本撮影動作の許可を行う(ステップS112)。
【0097】
全体制御部18は、本撮影動作の許可が与えられると、まず、ユーザによってシャッタボタン8が全押し状態とされたか否かを判断する。デジタルカメラ1ではシャッタボタン8の全押し状態が本撮影動作の条件となっているため、シャッタボタン8が全押し状態でない場合には、フレーミングが変更された場合に対処するために、ステップS102(図7)に戻ってシャッタボタン8が半押し状態とされた以降の処理を繰り返す。
【0098】
また、シャッタボタン8が全押し状態とされた場合には、全体制御部18が撮影機能部20を制御して本撮影動作を行い(ステップS114)、画像処理部32において所定の画像処理(ステップS115)を行った後、記録メディア9への記録処理(ステップS116)が行われる。
【0099】
以上で、シャッタボタン8が半押し状態とされてから本撮影動作が完了するまでのデジタルカメラ1の処理手順が終了することとなり、本撮影動作においては、主被写体が画像のどの部分に存在する場合であってもその主被写体を合焦状態として撮影することが可能である。
【0100】
そして、この実施の形態のデジタルカメラ1においては、被写体抽出装置としても機能する主被写体合焦制御部40が、合焦評価領域の評価結果に基づいて主被写体(特定被写体)の抽出処理を行う際の処理内容を変更し、その処理内容に基づいて画像のうちから主被写体の抽出処理を行うように構成されているため、合焦評価領域の画像成分がぼけている場合には、処理効率を重視した処理内容を設定することができ、また、合焦評価領域の画像成分が合焦状態に近い状態にある場合には、被写体抽出の信頼性を重視した処理内容を設定することができる。
【0101】
<2.第2の実施の形態>
次に、第2の実施の形態について説明する。なお、この実施の形態においても、装置構成については第1の実施の形態で説明したものと同様である(図2等参照)。
【0102】
上記第1の実施の形態では、合焦制御部43が所定ピッチでフォーカシングレンズ12を段階的に駆動させつつ、合焦評価部42において各レンズ位置での評価値が算出されるが、被写体抽出処理が実行されるのは、フォーカシングレンズ12を段階的に駆動させる前と合焦評価領域が合焦状態に達した後である。そのため、フォーカシングレンズ12を段階的に駆動させる前に実行される被写体抽出処理によって実際には主被写体と全く異なる被写体が主被写体であると特定されていた場合には、その被写体が含まれる合焦評価領域を合焦状態に導くための動作が無駄になる。
【0103】
このため、この実施の形態では、フォーカシングレンズ12を段階的に移動させる最中にも、被写体抽出処理を実行することにより、無駄な動作を省いてさらに効率的に主被写体を正確に合焦状態に導く形態について説明する。
【0104】
図19及び図20は、第2の実施の形態におけるデジタルカメラ1の処理手順を示すフローチャートであり、特にシャッタボタン8が半押し状態とされてから本撮影動作が行われるまでの全体的な処理手順を示している。
【0105】
まず、ユーザによってシャッタボタン8が半押し状態にされると(ステップS301)、全体制御部18が主被写体合焦制御部40と撮影機能部20とを機能させる。
【0106】
そして合焦制御部43がレンズ駆動部50を制御してフォーカシングレンズ12を最も遠側に移動させる(ステップS302)。なお、ステップS302の処理が次回以降実行される場合には、合焦制御部43がフォーカシングレンズ12を近側方向に所定ピッチ分移動させる制御動作を行うことになる。
【0107】
次に、合焦評価領域の設定処理が行われる(ステップS303)。合焦評価領域設定部41は、被写体抽出部45から主被写体領域が指定されている場合はその指定された主被写体領域を合焦評価領域に設定する。ただし、シャッタボタン8が半押し状態にされてから最初にステップS303の処理が行われる際には、未だ被写体抽出処理(ステップS308)は実行されていない。このため、未だ被写体抽出部45から主被写体領域が指定されていない場合、合焦評価領域設定部41は画像の中央部分に予め設定された初期状態の合焦評価領域FR1(図3参照)を評価値算出対象の合焦評価領域として設定する。これに対し、既に被写体抽出処理が何回か実行されている場合には、合焦評価領域設定部41は前回指定された最新の主被写体領域を評価値算出対象の合焦評価領域として設定する。そして、合焦評価領域設定部41は合焦評価領域を合焦評価部42に対して指示する。
【0108】
なお、撮影モードとして例えばスナップモードやポートレートモード等のような人物を撮影するためのモードが選択設定されている場合には、シャッタボタン8が半押し状態とされたときに、被写体抽出処理を1回行っておくようにしてもよい。そのような処理手順とすれば、ステップS303の合焦評価領域の設定処理を行う際には、常に主被写体と推定される領域を合焦評価領域として設定することが可能である。
【0109】
そして、全体制御部18はフォーカシングレンズ12が現在のレンズ位置にあるときに撮影機能部20における撮影動作を行わせる。そして、合焦評価部42は画像メモリ31に格納された画像を取り込み(ステップS304)、評価値の算出処理を行う(ステップS305)。このとき、合焦評価部42は、ステップS303において合焦評価領域設定部41から指定された合焦評価領域の画像成分に基づいて評価値の算出を行い、その結果算出された評価値は合焦制御部43及び処理内容変更44に与えられる。
【0110】
そして処理内容変更部44は、被写体抽出処理を実行するか否かの判定を行う(ステップS306)。この実施の形態では、フォーカシングレンズ12を所定ピッチで段階的に移動させる際に、各レンズ位置で被写体抽出処理を実行することができるように構成されるが、所定ピッチでのレンズ駆動ごとに毎回被写体抽出処理を実行するように構成すると、主被写体を合焦状態に導くまでに長時間を要することになる。そのため、この実施の形態の処理内容変更部44は、被写体抽出部45における処理内容を変更する機能だけでなく、被写体抽出部45にける被写体抽出処理の実行頻度を調整する機能をも備える。
【0111】
処理内容変更部44が被写体抽出処理の実行頻度を調整する方法には、いくつかの方法がある。まず、第1に、所定ピッチでのフォーカシングレンズ12のレンズ駆動が所定回数行われるごとに被写体抽出処理を1回実行する方法がある。これにより、レンズ駆動が行われる度に毎回被写体抽出処理が行われることを回避することができるので、効率的な合焦動作を実現することができる。
【0112】
また、第2に、合焦評価部42で求められる評価値を参酌して合焦評価領域の画像成分が合焦状態に近づくにつれて被写体抽出処理の実行頻度を増加させる方法がある。例えば、評価値が合焦位置で最大値を示す場合には、評価値が第1の閾値未満の場合はレンズ駆動が10回行われるごとに1回被写体抽出処理を実行し、第1の閾値以上第2の閾値未満の場合はレンズ駆動が5回行われるごとに1回被写体抽出処理を実行し、第2の閾値以上の場合はレンズ駆動が2回行われるごとに1回被写体抽出処理を実行するというように、合焦評価部42における評価結果に基づいて被写体抽出処理の実行頻度を調整するのである。このように構成することにより、合焦評価領域の画像成分が合焦状態に近づくにつれて、主被写体を抽出するための処理が増加する。合焦評価領域の画像成分が合焦状態に近い場合には比較的高精度に主被写体の特定が行われるので、この第2の方法は、主被写体を合焦状態に導くためには効果的な方法となる。
【0113】
ただし、処理内容変更部44が被写体抽出処理の実行頻度を調整する方法は、上記第1又は第2の方法に限定されるものではなく、他の方法を採用してもよい。また、主被写体合焦制御部40における処理速度が十分に速い場合には、レンズ駆動後の毎回の画像取り込み時に被写体抽出処理を実行するようにしてもよい。
【0114】
そして、処理内容変更部44がレンズ駆動回数をカウントして被写体抽出処理を実行すると判定した場合には、ステップS308の被写体抽出処理に進む。これに対し、被写体抽出処理を実行しないと判断した場合には、被写体抽出処理(ステップS308)をスキップさせて合焦判定を行う処理、すなわちステップS310(図20のフローチャート)に進むことになる。
【0115】
この実施の形態においても、被写体抽出処理(ステップS308)の詳細は、図9に示すフローチャートと同様である。したがって、合焦評価領域がぼけた状態にあるときは処理効率を重視した被写体抽出処理が行われ、合焦評価領域が合焦状態に近づくにつれて被写体抽出処理によって特定される主被写体の信頼性が向上することになる。
【0116】
そして被写体抽出処理(ステップS308)において主被写体の領域が特定されるとその主被写体領域が被写体抽出部45から合焦評価領域設定部41に伝えられる。
【0117】
ステップS309に進み、合焦評価領域設定部41は、それまでの合焦評価領域と、被写体抽出処理によって特定された主被写体領域とを比較し、両者が一致するか否かを判断する。この処理は、それまで評価対象とされていた合焦評価領域が正確な主被写体領域であったのかどうかを確認するための処理である。そして、一致しない場合には、ステップS303に戻り、合焦評価領域設定部41は以後の合焦評価領域を、ステップS308の被写体抽出処理で特定された主被写体領域に設定変更する。よって、合焦評価部42において次回の評価値算出が行われる際には、前回よりも信頼性の高い主被写体領域の画像成分について評価値算出を行うことが可能になる。その一方、合焦評価領域と、特定された主被写体領域とが一致する場合には、ステップS310(図20)に進む。
【0118】
そして合焦制御部43は、図4に示すような評価値が最大値(又は最小値)を示すレンズ位置PXを特定することができたか否か、すなわち、合焦評価領域の合焦状態が実現されたか否かを判断する。ここで、未だ合焦評価領域の合焦状態が実現されていないと判断された場合には、ステップS302(図19)に戻って所定ピッチでのレンズ駆動、評価値算出処理等を繰り返す。その結果、最終的に合焦評価領域の合焦状態が実現された場合には、ステップS311に進み、全体制御部18に対して本撮影動作の許可を行う。
【0119】
全体制御部18は、本撮影動作の許可が与えられると、まず、ユーザによってシャッタボタン8が全押し状態とされたか否かを判断する(ステップS312)。シャッタボタン8が全押し状態でない場合には、フレーミングが変更された場合に対処するために、ステップS302(図19)に戻ってシャッタボタン8が半押し状態とされた以降の処理を繰り返す。なお、このとき、合焦制御部43は合焦制御を最初から行うことが必要になるので、フォーカシングレンズ12を最も遠側の位置に移動させることになる。
【0120】
これに対し、シャッタボタン8が全押し状態とされた場合には、全体制御部18が撮影機能部20を制御して本撮影動作を行い(ステップS313)、画像処理部32において所定の画像処理(ステップS314)を行った後、記録メディア9への記録処理(ステップS315)が行われる。
【0121】
以上で、第2の実施の形態のデジタルカメラ1において、シャッタボタン8が半押し状態とされてから本撮影動作が完了するまでの処理手順が終了することとなり、本撮影動作においては、主被写体が画像のどの部分に存在する場合であってもその主被写体を合焦状態として撮影することが可能である。
【0122】
そして、この実施の形態のデジタルカメラ1においても、被写体抽出装置としても機能する主被写体合焦制御部40が、合焦評価領域の評価結果に基づいて主被写体(特定被写体)の抽出処理を行う際の処理内容を変更し、その処理内容に基づいて画像のうちから主被写体の抽出処理を行うように構成されているため、合焦評価領域の画像成分がぼけている場合には、処理効率を重視した処理内容を設定することができ、また、合焦評価領域の画像成分が合焦状態に近い状態にある場合には、被写体抽出の信頼性を重視した処理内容を設定することができる。その結果、効率的かつ正確に主被写体を抽出して主被写体の合焦状態を実現することが可能になる。
【0123】
また、この実施の形態のデジタルカメラ1では、合焦動作を行うためのレンズ駆動段階でも被写体抽出処理が実行されるように構成されているので、主被写体でない部分を評価対象として合焦動作を進められることが回避されるので、さらに効率的な合焦動作が実現される。
【0124】
さらに、合焦評価領域の画像成分が合焦状態に近づくにつれて、被写体抽出処理の実行頻度が増加するように構成することで、より正確に主被写体を抽出することができ、その信頼性の高い主被写体を迅速に合焦状態に導くことが可能になる。
【0125】
<3.変形例>
以上、この発明の実施の形態について説明したが、この発明は上記説明した内容のものに限定されるものではない。
【0126】
例えば、上記説明におけるデジタルカメラには、デジタルスチルカメラとデジタルビデオカメラの双方が含まれる。また、撮影装置の一例としてデジタルカメラ1を例示して述べたが、この発明はデジタルカメラ以外の撮影装置に対しても適用することが可能である。
【0127】
また、上記説明においては、いわゆる山登り方式等と呼ばれるような合焦制御を行う場合について述べたが、アクティブ方式や位相差方式等と呼ばれる自動焦点検出方式、さらに複数の測距エリアで測距を行う自動焦点検出方式等の制御方式であっても、この発明を適用することは可能である。
【0128】
また、上記説明においては、合焦動作を開始させるタイミングがシャッタボタン8の半押し後である場合について述べたが、それに限定されるものではなく、例えば、ライブビュー画像の表示を行っている状態においても上述した合焦動作を行うようにしてもよい。
【0129】
また、上記説明においては、画素間引き数、ブロック分割数、及び形状判定基準と、合焦評価領域のぼけ量とは連続的な関係を示すものであったが、ぼけ量の変化に対して、画素間引き数、ブロック分割数、及び形状判定基準のそれぞれが段階的に変化するようにしてもよい。
【0130】
また、上記説明においては、主被写体(すなわち特定被写体)が人物の顔部分である場合について述べた。これは、一般的に写真撮影を行う場合、人物を被写体として撮影することが多いことに鑑みたものであるが、この発明の本質としては、主被写体は人物の顔部分であることに限定されるものではない。このため、主被写体を構成する色成分や形状等に関する情報をユーザが自由に設定入力することができるようにすれば、ユーザが意図する主被写体を適切に特定することが可能になる。また、撮影モードとしてスナップモードやポートレートモード等のような人物を被写体とするモードが選択されている場合に、上述したような人物の顔部分を主被写体として抽出するための処理を行うように構成することも可能である。また逆に、人物の顔部分の抽出によって被写体が風景であることを判別したり、主被写体の肌色ブロック集合体の面積によってスナップやポートレート等であることを判別したりすることができるので、オートシーン判別を行うことが可能である。
【0131】
さらに、上記説明においては、被写体抽出処理が主被写体を合焦状態に導くために行われる場合について説明したが、被写体抽出処理の結果によって画像中から主被写体領域が特定されることに鑑みれば、被写体抽出処理を自動合焦制御のために実行するだけでなく、主被写体領域の画像成分に対して特別な画像処理を施すために実行することも可能である。つまり、上述した被写体抽出技術は、主被写体を合焦状態に導くために適用されるものに限定されるものではない。
【0132】
【発明の効果】
以上説明したように、請求項1に記載の発明によれば、合焦評価領域に含まれる被写体像が合焦状態に近づくにつれて、特定被写体の抽出処理における、画素間引き処理の間引き数を減少させていくように構成されるため、合焦評価領域の画像成分がぼけている場合には、処理効率を重視した処理内容を設定することができ、また、合焦評価領域の画像成分が合焦状態に近い状態にある場合には、特定被写体抽出の信頼性を重視した処理内容を設定することができる。また、合焦評価領域のぼけ量に応じて特定被写体の抽出処理の処理内容が変化させることができる。そして、合焦評価領域が合焦状態に近づけば特定被写体を抽出するためのサンプル数が増加するので、高精度に特定被写体の抽出を行うことができる。逆に、合焦評価領域がぼけている場合はサンプル数が少ないので、迅速に特定被写体の抽出処理を行うことができる。その結果、効率的かつ正確に特定被写体を抽出することが可能になる。
【0133】
請求項2に記載の発明によれば、合焦評価領域に含まれる被写体像が合焦状態に近づくにつれて、特定被写体の抽出処理における、ブロック分割処理のブロック分割数を増加させていくように構成されるため、合焦評価領域の画像成分がぼけている場合には、処理効率を重視した処理内容を設定することができ、また、合焦評価領域の画像成分が合焦状態に近い状態にある場合には、特定被写体抽出の信頼性を重視した処理内容を設定することができる。また、合焦評価領域のぼけ量に応じて特定被写体の抽出処理の処理内容が変化させることができる。そして、合焦評価領域が合焦状態に近づけば特定被写体を抽出するためのブロック数が増加するので、高精度に特定被写体の抽出を行うことができる。逆に、合焦評価領域がぼけている場合はブロック数が少ないので、迅速に特定被写体の抽出処理を行うことができる。その結果、効率的かつ正確に特定被写体を抽出することが可能になる。
【0135】
請求項に記載の発明によれば、合焦評価領域に含まれる被写体像が合焦状態に近づくにつれて、特定被写体の抽出処理の実行頻度を増加させるため、合焦評価領域の画像成分がぼけている場合には、処理効率を重視した処理内容を設定することができ、また、合焦評価領域の画像成分が合焦状態に近い状態にある場合には、特定被写体抽出の信頼性を重視した処理内容を設定することができる。つまり、合焦状態に近づくにつれて、高精度な特定被写体の抽出が可能になる。その結果、効率的かつ正確に特定被写体を抽出することが可能になる。
【0136】
請求項に記載の発明によれば、画像の肌色判別を行うことによって特定被写体を抽出するため、人物が被写体である場合に、その人物像を特定被写体として抽出することが可能である。
【0137】
請求項に記載の発明によれば、特定被写体の抽出処理によって抽出される特定被写体の領域と合焦評価領域とが一致しない場合に、合焦評価領域を特定被写体の領域に設定変更するように構成されるため、特定被写体の合焦状態を適切に評価することが可能である。
【0138】
請求項に記載の発明によれば、合焦評価領域に含まれる被写体像が合焦状態に近づくにつれて、画素間引き処理の間引き数を減少させるように、特定被写体の抽出処理を行う際の処理内容を変更し、その変更された処理内容に基づいて画像のうちから特定被写体の抽出処理を行い、それによって抽出される特定被写体の領域を合焦評価領域として設定するように構成されるため、合焦評価領域の画像成分がぼけている場合には、処理効率を重視した処理内容を設定することができ、また、合焦評価領域の画像成分が合焦状態に近い状態にある場合には、特定被写体抽出の信頼性を重視した処理内容を設定することができる。その結果、効率的かつ正確に特定被写体を特定してその特定被写体を合焦状態に導くことができる。
【0139】
請求項に記載の発明によれば、合焦評価領域に含まれる被写体像が合焦状態に近づくにつれて、ブロック分割処理のブロック分割数を増加させていくように、特定被写体の抽出処理を行う際の処理内容を変更し、その変更された処理内容に基づいて画像のうちから特定被写体の抽出処理を行い、それによって抽出される特定被写体の領域を合焦評価領域として設定するように構成されるため、合焦評価領域の画像成分がぼけている場合には、処理効率を重視した処理内容を設定することができ、また、合焦評価領域の画像成分が合焦状態に近い状態にある場合には、特定被写体抽出の信頼性を重視した処理内容を設定することができる。その結果、効率的かつ正確に特定被写体を特定してその特定被写体を合焦状態に導くことができる。
【0141】
請求項に記載の発明によれば、合焦評価領域に含まれる被写体像が合焦状態に近づくにつれて、特定被写体の抽出処理の実行頻度を増加させていくように、特定被写体の抽出処理を行う際の処理内容を変更し、その変更された処理内容に基づいて画像のうちから特定被写体の抽出処理を行い、それによって抽出される特定被写体の領域を合焦評価領域として設定するように構成されるため、合焦評価領域の画像成分がぼけている場合には、処理効率を重視した処理内容を設定することができ、また、合焦評価領域の画像成分が合焦状態に近い状態にある場合には、特定被写体抽出の信頼性を重視した処理内容を設定することができる。その結果、効率的かつ正確に特定被写体を特定してその特定被写体を合焦状態に導くことができる。
請求項に記載の発明によれば、特定被写体を抽出した際に、特定被写体の領域と合焦評価領域とが一致する場合に、本撮影を行うための撮影動作を許可するため、特定被写体の合焦状態が評価された状態で適切に本撮影動作を行うことが可能になる。
【図面の簡単な説明】
【図1】撮影装置の一例としてのデジタルカメラを示す斜視図である。
【図2】デジタルカメラの内部構成を示すブロック図である。
【図3】デジタルカメラに予め設定される合焦評価領域の初期状態を示す図である。
【図4】レンズ位置に対する評価値変化の一例を示す図である。
【図5】固定された合焦評価領域で合焦制御を行った場合の撮影画像を示す図である。
【図6】ユーザが撮影を意図する画像を示す図である。
【図7】第1の実施の形態におけるデジタルカメラの処理手順を示すフローチャートである。
【図8】第1の実施の形態におけるデジタルカメラの処理手順を示すフローチャートである。
【図9】被写体抽出処理の詳細な処理手順を示すフローチャートである。
【図10】ぼけ量と画素間引き数との関係を示す図である。
【図11】画素間引き処理の概念を示す図である。
【図12】ぼけ量とブロック分割数との関係を示す図である。
【図13】ぼけ量が大きい場合のブロック分割処理の概念を示す図である。
【図14】ぼけ量が小さい場合のブロック分割処理の概念を示す図である。
【図15】ぼけ量と、形状判定基準である縦横比との関係を示す図である。
【図16】CIE 1976 UCS色度図の簡略図である。
【図17】形状判定処理において主被写体であると認識される領域を示す図である。
【図18】画面に対する重み付け係数の一例を示す図である。
【図19】第2の実施の形態におけるデジタルカメラの処理手順を示すフローチャートである。
【図20】第2の実施の形態におけるデジタルカメラの処理手順を示すフローチャートである。
【符号の説明】
1 デジタルカメラ(撮影装置)
8 シャッタボタン
11 撮影レンズ
12 フォーカシングレンズ
18 全体制御部
20 撮影機能部
30 CCD撮像素子
31 画像メモリ
40 主被写体合焦制御部(被写体抽出装置)
41 合焦評価領域設定部
42 合焦評価部
43 合焦制御部
44 処理内容変更部
45 被写体抽出部
50 レンズ駆動部[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a subject extraction technique for extracting a specific subject from an image.
[0002]
[Prior art]
When automatic focusing control (autofocus control) is performed in a conventional camera or the like, in which region of the screen the focus detection is performed is determined in advance. For example, automatic focus detection is performed in the focus evaluation area set in the center of the image, or an area with the closest subject distance is specified from among a plurality of focus evaluation areas, and automatic focus detection is performed in that area. .
[0003]
In the technical field of image processing, a technique for detecting a human image from an image has been proposed. In the human image extraction process using such a technique, since the main object is always to detect human images with high accuracy, no matter what the target image is, the human image is always detected with high accuracy. Processing for detection is performed.
[0004]
[Problems to be solved by the invention]
However, in the conventional automatic focusing control, only automatic focus detection is performed in a predetermined area in the screen. Therefore, when the main subject intended by the user is not included in the area, the user As a result, focus detection is performed in an area different from the intention of the user, and as a result, there is a problem that the main subject that the user wanted to shoot is shot with a blurred image.
[0005]
It is also possible to apply a human image detection technique proposed in the field of image processing to detect a person from an image, specify the human image as a main subject, and perform focus detection. If the same person image extraction process is performed even for an image, there is a problem that the processing time becomes long. On the other hand, if a rough person extraction process is performed with an emphasis on processing efficiency, there is a problem that accurate person detection cannot be performed.
[0006]
In particular, in a photographing apparatus such as an electronic camera, when the main subject is detected and the photographing operation is performed in a state where the main subject is properly focused, the process of extracting the main subject is made efficient. It is also desirable to improve accuracy at the same time.
[0007]
Accordingly, the present invention has been made in view of the above problems, and has an object to provide a subject extraction device capable of improving the processing efficiency and accurately extracting the main subject. Another object of the present invention is to provide a photographing apparatus to which such subject extraction technology is applied.
[0008]
[Means for Solving the Problems]
  In order to achieve the above object, the invention described in claim 1 is a subject extraction device that detects a specific subject from an image, and is a focus evaluation unit that evaluates a focus state of a focus evaluation region in the image. And focusing control means for controlling the subject image included in the focusing evaluation area to be in focus based on the evaluation result of the focusing evaluation means, and based on the evaluation result of the focusing evaluation area. Processing content changing means for changing the processing content when performing the extraction processing of the specific subject; and subject extraction means for extracting the specific subject from the image based on the processing content.The subject extraction unit is configured to perform pixel thinning processing in the extraction process of the specific subject, and the processing content change unit is controlled by the focus control unit as the subject image approaches a focused state. The thinning-out number in the pixel thinning-out process is reduced..
[0009]
  The invention described in claim 2Detect a specific subject from an imageSubject extraction deviceBecause,Focus evaluation means for evaluating the focus state of the focus evaluation area in the image, and control so that the subject image included in the focus evaluation area is in focus based on the evaluation result of the focus evaluation means. A focus control means for performing processing content change means for changing the processing content when performing the extraction processing of the specific subject based on the evaluation result of the focus evaluation area, and the image based on the processing content. Subject extraction means for performing extraction processing of the specific subject, wherein the subject extraction means is configured to perform block division processing in the extraction processing of the specific subject, and the processing content changing means is configured to perform the focusing. As the subject image approaches the in-focus state under the control of the control means, the number of block divisions in the block division processing is increased.It is characterized by that.
[0011]
  Claim3The subject extraction device for detecting a specific subject from an image includes a focus evaluation unit that evaluates a focus state of a focus evaluation region in the image, and an evaluation result of the focus evaluation unit. A focus control means for controlling the subject image included in the focus evaluation area based on a focus state, and a process for performing the extraction process of the specific subject based on the evaluation result of the focus evaluation area Processing content changing means for changing the content; and subject extracting means for extracting the specific subject from the image based on the processing content, wherein the processing content changing means is the focus control means As the subject image approaches the in-focus state by the control, the execution frequency of the specific subject extraction process is increased.
[0012]
  Claim4The invention described in claims 1 to3In the subject extraction device according to any one of the above, the subject extraction unit extracts the specific subject by performing skin color discrimination of the image in color determination processing.
[0013]
  Claim5The invention described in claims 1 to4In the subject extraction device according to any one of the above, if the region of the specific subject extracted by the subject extraction unit and the focus evaluation region do not match, the focus evaluation region is set as the region of the specific subject Means for changing.
[0014]
  Claim6The invention described in (1) is a photographing apparatus for photographing an image through a photographing lens, the focusing evaluation means for evaluating a focusing state of a focusing evaluation area in the image, and the evaluation result of the focusing evaluation means. A focus control means for controlling the subject image included in the focus evaluation area to be in a focused state by driving the photographing lens based on the focus lens, and a specific subject based on the evaluation result of the focus evaluation area The processing content changing means for changing the processing content when performing the extraction processing, the subject extracting means for extracting the specific subject from the image based on the processing content, and the subject extracting means Means for setting the area of the specific subject as the focus evaluation area, and the subject extraction means is configured to perform pixel thinning processing in the extraction processing of the specific subject, Serial processing content changing means, as the object image under the control of the focusing control means approaches the focus state, is characterized by gradually reducing the thinning number in the pixel thinning process.
[0015]
  Claim7The invention described in (1) is a photographing apparatus for photographing an image through a photographing lens, the focusing evaluation means for evaluating a focusing state of a focusing evaluation area in the image, and the evaluation result of the focusing evaluation means. A focus control means for controlling the subject image included in the focus evaluation area to be in a focused state by driving the photographing lens based on the focus lens, and a specific subject based on the evaluation result of the focus evaluation area The processing content changing means for changing the processing content when performing the extraction processing, the subject extracting means for extracting the specific subject from the image based on the processing content, and the subject extracting means Means for setting the area of the specific subject as the focus evaluation area, and the subject extraction means is configured to perform block division processing in the extraction processing of the specific subject. The processing content changing means, as the object image under the control of the focusing control means approaches the focus state, it is characterized by gradually increasing the block division number in the block division processing.
[0017]
  Claim8The invention described in (1) is a photographing apparatus for photographing an image through a photographing lens, the focusing evaluation means for evaluating a focusing state of a focusing evaluation area in the image, and the evaluation result of the focusing evaluation means. A focus control means for controlling the subject image included in the focus evaluation area to be in a focused state by driving the photographing lens based on the focus lens, and a specific subject based on the evaluation result of the focus evaluation area The processing content changing means for changing the processing content when performing the extraction processing, the subject extracting means for extracting the specific subject from the image based on the processing content, and the subject extracting means Means for setting the area of the specific subject as the focus evaluation area, and the processing content changing means, as the subject image approaches a focused state under the control of the focus control means, It is characterized by increasing the frequency of execution of extraction processing of the serial specific object.
  Claim9The invention described in claim6Thru8In the photographing apparatus according to any one of the above, when the subject extraction unit extracts the specific subject, the photographing operation for performing the main photographing when the region of the specific subject matches the focus evaluation region A means for authorizing.
[0018]
DETAILED DESCRIPTION OF THE INVENTION
Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings. Hereinafter, a digital camera will be described as an example.
[0019]
<1. First Embodiment>
First, the first embodiment will be described. FIG. 1 is a perspective view showing a digital camera 1 as an example of a photographing apparatus according to the present invention. As shown in FIG. 1, a photographing lens 11 and a finder window 2 are provided on the front side of the digital camera 1. Inside the photographic lens 11, a CCD imaging device 30 is provided as an imaging means for photoelectrically converting a subject image incident through the photographic lens 11 and generating image data (data composed of an array of pixel data for each pixel). It has been.
[0020]
The photographing lens 11 includes a focusing lens that can move along the optical axis direction. By driving the focusing lens, the in-focus state of the image formed on the CCD image sensor 30 can be varied. It is configured as follows.
[0021]
A shutter button 8, a camera status indicator 13, and a setting key 14 are arranged on the upper surface side of the digital camera 1. The shutter button 8 is a button that is pressed by the user when photographing a subject, and is configured to detect two stages of a half-pressed state and a fully-pressed state. The camera status indicator 13 is composed of, for example, a segment display type liquid crystal display, and is provided for showing the user the current setting contents in the digital camera 1. The setting key 14 is a key switch for selecting and setting the shooting mode according to the subject and what kind of focusing control is performed during the automatic focusing control.
[0022]
Further, a mounting portion 15 for mounting a recording medium 9 for recording image data is formed on the side surface portion of the digital camera 1, and a replaceable recording medium 9 such as a memory card can be mounted. .
[0023]
Although not shown in FIG. 1, a liquid crystal display unit for displaying an image taken by the CCD image sensor 30 is provided on the back side of the digital camera 1.
[0024]
FIG. 2 is a block diagram showing the internal configuration of the digital camera 1. In FIG. 2, solid arrows indicate the flow of control signals, and hatched arrows indicate the flow of image signals.
[0025]
As shown in FIG. 2, the digital camera 1 includes a shooting function unit 20 that realizes a shooting function when shooting a subject, and a main subject (specific subject) is detected during focus control, and the main subject is in focus. A main subject focusing control unit 40 that performs control such that the focusing lens 12 included in the photographing lens 11 is driven to change the focusing state of an image formed on the CCD image pickup device 30. And an operation unit 16 including the shutter button 8 and the setting key 14 described above, and an overall control unit 18 that controls the photographing function unit 20 and the main subject focusing control unit 40 according to the operation content of the operation unit 16. Composed.
[0026]
The imaging function unit 20 includes an imaging lens 11, a CCD imaging device 30, an image memory 31 for temporarily storing image data from the CCD imaging device 30, and image compression obtained from the image data obtained from the image memory 31. An image processing unit 32 that performs predetermined image processing, a liquid crystal display unit 33 that displays a display image subjected to image processing for image display in the image processing unit 32, and image processing for image recording in the image processing unit 32 Is provided with a recording medium 9 for recording a photographed image subjected to.
[0027]
Under the control of the overall control unit 18, the shooting function unit 20 controls the live view operation for displaying the live view image on the liquid crystal display unit 33 before the main shooting, and the recording medium 9 when the shutter button 8 is fully pressed. And a main photographing operation for photographing an image for recording. Even if the liquid crystal display unit 33 is in the off state, the photographing operation by the CCD image pickup device 30 is performed at least during focusing control.
[0028]
Further, the main subject focusing control unit 40 fetches image data from the focusing evaluation region setting unit 41 and the image memory 31 for setting a focusing evaluation region for evaluating the focusing state in the entire image, and the focusing evaluation region. A focus evaluation unit 42 for obtaining an evaluation value for evaluating the in-focus state from the partial image data in the focus evaluation area specified by the setting unit 41, and a lens driving unit based on the evaluation value obtained by the focus evaluation unit 42 50, a driving signal is given to the focus evaluation area 43 to bring the subject image in the focus evaluation area into a focused state, and the blur amount of the subject image in the focus evaluation area is determined based on the evaluation value obtained by the focus evaluation section 42. The processing content change unit 44 that changes the setting state in the subject extraction unit 45 in accordance with the amount of blur obtained, the image data is taken from the image memory 31, and the processing content set from the processing content change unit 44 is set. Subject extracting unit 45 for extracting process in the main subject (specific object) you are, configured with a.
[0029]
For example, when the shutter button 8 is half-pressed, the overall control unit 18 causes the main subject focus control unit 40 to function so that the main subject is in an appropriate focus state, and when the shutter button 8 is fully pressed. The photographing function unit 20 is controlled to perform the main photographing operation. In addition, the overall control unit 18 causes the imaging function unit 20 to sequentially capture images as a live view operation before the actual imaging, and displays the sequentially updated images on the liquid crystal display unit 33, or the main subject focusing control unit 40. Control to give to.
[0030]
The lens driving unit 50 moves the focusing lens 12 at a predetermined pitch from the far side to the near side based on the drive signal given from the focusing control unit 43 during the focusing control operation, and forms an image on the CCD image pickup device 30. Change the in-focus state of the image. When the lens position at which the main subject is in focus is specified by the main subject focusing control unit 40 and the lens position is designated by the focusing control unit 43, the lens driving unit 50 designates the lens position. The focusing lens 12 is moved to the lens position, and an image with the main subject in focus is formed on the CCD image sensor 30.
[0031]
FIG. 3 is a diagram showing an initial state of a focus evaluation area preset in the digital camera 1. As shown in FIG. 3, in the focus evaluation area setting unit 41, as the initial state of the focus evaluation area, a focus evaluation area FR1 is set at a substantially central portion of the image G1 acquired from the image memory 31, When the main subject focus control unit 40 functions to perform the first focus evaluation, the focus evaluation region setting unit 41 sets the position and size of the focus evaluation region FR1 shown in FIG. Instruct.
[0032]
The focus evaluation unit 42 acquires the image G1 from the image memory 31, and extracts an image component for the focus evaluation region FR1 therefrom. Then, an evaluation value for evaluating the focus state of the image component in the focus evaluation area FR1 is obtained. There are several methods for calculating the evaluation value. For example, as a first method, there is a method in which an image component included in the focus evaluation region FR1 is passed through a bandpass filter, and the intensity of a high-frequency component of an image signal extracted thereby is used as an evaluation value. As a method, there is a method in which a difference value of luminance values between adjacent pixels of an image component included in the focus evaluation area FR1 is obtained, and a value obtained by accumulating the difference values in the focus evaluation area FR1 is used as an evaluation value. . Further, as a third method, edge extraction processing using a differential filter or the like is performed on the image component included in the focus evaluation area FR1, and the width of the edge extracted as a result (blur width) is used as the evaluation value. There is also a method.
[0033]
In the first and second methods, when the subject is photographed, the level of the high-frequency component is small when the image is blurred, and the cumulative value of the luminance difference between adjacent pixels is small. This is a method for detecting that the level of the high-frequency component increases as it comes in close (approaching the in-focus state), and the cumulative value of the luminance difference between adjacent pixels also increases.
[0034]
For this reason, when the focusing lens 12 is gradually moved from the far side to the near side, the evaluation values obtained by the first and second methods change as shown in FIG. When the evaluation value is obtained from the image captured at each lens position while moving the focusing lens 12, the evaluation value changes as shown in FIG. 4, and the evaluation value shows the maximum value at the lens position PX. Therefore, if the focusing lens 12 is moved to the lens position PX, it is found that the image component included in the focusing evaluation area FR1 is in a focused state, and the focusing control unit 43 moves the focusing lens 12 to the lens position PX. To achieve the in-focus state.
[0035]
On the other hand, the third method is a method of detecting that when the subject is photographed, the edge width increases when the image is blurred, but the edge width decreases as the focus is achieved. Therefore, when the focusing lens 12 is gradually moved from the far side to the near side, the evaluation value obtained by the third method shows the minimum value at the in-focus position, and the focus control unit 43 sets the minimum value. The focusing lens 12 is moved to a lens position indicating the in-focus state.
[0036]
Note that the calculation method of the evaluation value applied in the focus evaluation unit 42 may employ any of the first to third methods, and may employ other calculation methods.
[0037]
By the way, if the focus evaluation area FR1 is set to an area that is always fixed with respect to the image G1, as described above, the focus evaluation area FR1 does not include the main subject intended by the user. Thus, focus detection is performed in a region different from the user's intention, and as a result, the main subject that the user wanted to photograph is photographed as a blurred image.
[0038]
FIG. 5 is a diagram showing a captured image in the case where the person who is the main subject is present at the edge of the image and the focus control is performed in the fixed focus evaluation area. As shown in FIG. 5, when the person who is the main subject is present at the edge of the image, if the focus control is performed in the focus evaluation area at the center of the image, the background portion is in focus, and the main subject The phenomenon of blurring occurs.
[0039]
On the other hand, FIG. 6 is a diagram showing an image that the user intends to shoot when the person who is the main subject is present at the edge of the image. As shown in FIG. 6, even when a person who is the main subject is present at the end of the image, it is desired that the person who is the main subject be photographed in a focused state.
[0040]
Therefore, in the digital camera 1 according to this embodiment, the subject extraction unit 45 acquires an image from the image memory 31 and performs a process of extracting the main subject from the image. Then, the focus evaluation area setting unit 41 changes and sets the focus evaluation area for the image portion determined to be the main subject, and the focus evaluation section 42 sets the evaluation value for the focus evaluation area including the main subject. Perform the calculation. That is, the focus evaluation area is corrected from the initial state area to the image area recognized as the main subject, and focus control is performed so that the subject image of the main subject is in focus.
[0041]
Thus, when the main photographing operation is performed, an appropriate image in which the main subject is in focus is photographed.
[0042]
The subject extraction unit 45 performs subject extraction processing that extracts the skin color component of the image and recognizes the region in which the skin color component is distributed as the main subject region. For this reason, when the main subject is blurred, for example, the color of the background portion affects the face portion of the person, and it is difficult to perform accurate subject extraction processing. Therefore, this embodiment is configured to perform subject extraction processing according to the amount of blur of the image or main subject. In other words, when the image or main subject is blurred, a relatively coarse subject extraction process is performed to efficiently extract the main subject, and when the main subject approaches the in-focus state, a precise subject extraction process is performed. Thus, highly accurate subject extraction processing is performed.
[0043]
The focus evaluation unit 42 gives an evaluation value calculated at each lens position to the processing content changing unit 44, and the processing content changing unit 44 sets the processing content of the subject extraction processing in the subject extraction unit 45 in accordance with the blur amount of the image or the main subject. To decide. Then, the subject extraction unit 45 performs the main subject extraction process from the image obtained from the image memory 31 based on the processing content determined according to the blur amount.
[0044]
As a result, the main subject can be extracted efficiently when the image or the main subject is blurred, and the main subject can be extracted with high accuracy when the main subject approaches the in-focus state.
[0045]
The processing procedure of the digital camera 1 in this embodiment will be described below. 7 to 9 are flowcharts showing the processing procedure of the digital camera 1 in the first embodiment. In particular, in FIGS. 7 and 8, the main photographing operation is performed after the shutter button 8 is pressed halfway. FIG. 9 shows a detailed processing procedure of the subject extraction processing.
[0046]
First, when the user presses the shutter button 8 halfway (step S101), the overall control unit 18 causes the main subject focusing control unit 40 and the photographing function unit 20 to function. At this time, the overall control unit 18 moves the focusing lens 12 to the farthest side by the main subject focusing control unit 40 and controls the photographing function unit 20 to take an image while the focusing lens 12 has moved to the farthest side. To do.
[0047]
Then, the focus evaluation unit 42 takes in the image stored in the image memory 31 (step S102) and performs an evaluation value calculation process (step S103). At this time, the focus evaluation area setting unit 41 determines that the focus evaluation area FR1 in the initial state set in advance in the center portion of the image G1 should be the focus evaluation area to be evaluated. To instruct. The focus evaluation unit 42 calculates an evaluation value based on an image component included in the focus evaluation region FR1 (see FIG. 3) set almost at the center of the screen, and the calculated evaluation value is the focus control unit. 43 and processing content change 44.
[0048]
Then, the processing content change unit 44 and the subject extraction unit 45 function to perform subject extraction processing (step S104).
[0049]
Reference is made to the flowchart of FIG. When the process proceeds to the subject extraction process (step S104), first, the process content changing unit 44 calculates the amount of blur in the focus evaluation area from the evaluation value (step S201). The blur amount is a value that indicates a large value when the image component in the focus evaluation area is blurred, and gradually decreases as the image component in the focus evaluation area approaches the focus state. When calculating the evaluation value, if the above-described first and second methods are adopted, for example, the reciprocal of the evaluation value may be defined as the blur amount, and other values may be defined as the blur amount. Also good. When the third method described above is adopted as the evaluation value calculation method, the calculated evaluation value itself may be used as the blur amount.
[0050]
The subject extraction unit 45 is configured to perform pixel thinning processing and block division processing as pre-processing of the main subject extraction processing, and to perform color determination processing and shape determination processing as actual main subject extraction processing. ing. Then, the process content changing unit 44 changes the pixel thinning number in the pixel thinning process, the block division number in the block division process, and the shape determination reference in the shape determination process according to the amount of blur in the focus evaluation area.
[0051]
First, the processing content changing unit 44 sets a pixel thinning number according to the amount of blur in the focus evaluation area (step S202). FIG. 10 is a diagram illustrating the relationship between the blur amount and the pixel thinning number. As shown in FIG. 10, the relationship between the blur amount and the pixel thinning number is set so that the pixel thinning number increases in proportion to the blur amount. In other words, when the amount of blur is small and the image component in the focus evaluation area is relatively close to the in-focus state, the pixel thinning number is set to a small value, the blur amount is large, and the image component in the focus evaluation area is blurred. In this state, the pixel thinning number is set to a large value.
[0052]
In step S202, the pixel extraction number set by the processing content changing unit 44 is further instructed to the subject extraction unit 45, and the subject extraction unit 45 is obtained from the image memory 31 based on the instructed pixel thinning number. Pixel thinning processing is performed on the image.
[0053]
FIG. 11 is a diagram illustrating the concept of the pixel thinning process. As shown in FIG. 11, when the amount of blur is large, the pixel thinning-out number is set to a large value, so that the number of pixels thinned out from the image G1 increases and an image G2 having a small image size is obtained. On the other hand, when the amount of blur is small (that is, when the state is close to the in-focus state), the pixel thinning-out number is set to a small value, so that the number of pixels thinned out from the image G1 is reduced. An image G3 having a relatively large size is obtained.
[0054]
As described above, the subject extraction unit 45 blurs the image components in the focus evaluation area by changing the image size of the image to be processed before performing the main subject extraction process such as the skin color determination process. It is possible to efficiently extract the main subject when it is in the state, while it is possible to accurately extract the main subject when the image components in the focus evaluation area are close to the focus state. become.
[0055]
Next, the processing content changing unit 44 sets the number of block divisions according to the amount of blur in the focus evaluation area (step S203). FIG. 12 is a diagram illustrating the relationship between the blur amount and the number of block divisions. As shown in FIG. 12, the relationship between the amount of blur and the number of block divisions is set so that the pixel thinning number decreases in proportion to the amount of blur. That is, when the amount of blur is small and the image component in the focus evaluation area is relatively close to the focus state, the block division number is set to a large value, the blur amount is large, and the image component in the focus evaluation area is blurred. If it is in the state, the block division number is set to a small value.
[0056]
In step S203, the subject extraction unit 45 is further instructed by the number of block divisions set by the processing content changing unit 44. Based on the designated number of block divisions, the subject extraction unit 45 performs image size reduction by pixel thinning processing. The block division process is executed on the changed image.
[0057]
13 and 14 are diagrams showing the concept of block division processing. FIG. 13 shows a case where the amount of blur is large, and FIG. 14 shows a case where the amount of blur is small, that is, the image component in the focus evaluation area is in focus. It shows a case close to the state.
[0058]
As shown in FIGS. 13 and 14, when the blur amount is large, the subject extraction unit 45 performs block division processing so that a relatively small number of blocks are generated, and when the blur amount is small (that is, in-focus state). When the state is close to the state), the subject extraction unit 45 performs block division processing so that a relatively large number of blocks are generated.
[0059]
In this manner, the subject extraction unit 45 divides the image to be processed into blocks before performing the processing for extracting the main subject such as the skin color determination processing, so that the processing after the grouping processing (step S207) described later is performed. Thus, it is possible to perform processing in units of blocks in order to improve processing efficiency. In particular, when the image component in the focus evaluation area is blurred, it is possible to efficiently extract the main subject by reducing the number of block divisions, while the image component in the focus evaluation area is When the state is close to the in-focus state, the main subject can be accurately extracted by increasing the number of block divisions.
[0060]
Next, the processing content changing unit 44 sets a shape determination criterion according to the amount of blur in the focus evaluation area (step S204). For example, in this embodiment, the subject extraction unit 45 is configured to determine whether or not the flesh color block aggregate has a shape similar to a human face shape. Specifically, it sets the aspect ratio of the reference shape that is the shape determination reference, determines whether the collection of skin color blocks is within the range of the aspect ratio, and if so, the skin color An aggregate of blocks is specified as the main subject. Therefore, the processing content changing unit 44 sets an aspect ratio as a shape determination reference according to the amount of blur in the focus evaluation area, and instructs the subject extracting unit 45 to set it. Here, the aspect ratio means the ratio of the distribution length in the vertical direction when the distribution length in the horizontal direction of the flesh color block aggregate is 1.
[0061]
FIG. 15 is a diagram illustrating the relationship between the blur amount and the aspect ratio. As shown in FIG. 15, the relationship between the blur amount and the aspect ratio is set so that the aspect ratio increases in proportion to the blur amount. That is, when the amount of blur is small and the image component in the focus evaluation area is relatively close to the focus state, the distribution length in the vertical direction when the horizontal distribution length of the block aggregate is set to 1 The ratio is set to be small, but when the amount of blur is large and the image component in the focus evaluation area is in a blurred state, the distribution length in the horizontal direction of the block aggregate is set to 1. The ratio of the distribution length in the vertical direction is set to be large.
[0062]
When the face shape of a person is specified as the main subject, the minimum aspect ratio is preferably about vertical: horizontal = 1.5: 1, and the maximum value is vertical: horizontal = 2: Preferably, it is about 1. By setting in this way, even when the image component in the focus evaluation area is relatively blurred, the subject extraction unit 45 can perform a certain degree of face shape determination with low accuracy and focus. When the image component of the evaluation region is in a state close to the in-focus state, the face shape can be determined with high accuracy.
[0063]
As described above, changing the aspect ratio in accordance with the amount of blur means changing the reference shape for recognizing the face shape, and reducing the aspect ratio is equivalent to tightening the shape criterion. To do. When the image component in the focus evaluation area is in a state close to the focus state, the main subject can be specified with high accuracy by setting the shape determination criterion strictly.
[0064]
In step S205, the subject extraction unit 45 performs a skin color pixel extraction process for extracting skin color pixels from the pixel-thinned image. In other words, this skin color pixel extraction process is a color determination process. In the skin color pixel extraction process, chromaticities u ′ and v ′ that are not affected by luminance are calculated from the RGB values of the pixel data, and the chromaticities u ′ and v ′ are within a specific area of the “CIE 1976 UCS chromaticity diagram”. The flesh color pixel is extracted depending on whether or not it exists. In addition, when calculating chromaticity u 'and v' from the RGB value of a certain pixel, it can calculate with the following formulas 1 and 2.
[0065]
[Expression 1]
Figure 0003760846
[0066]
[Expression 2]
Figure 0003760846
[0067]
FIG. 16 is a simplified diagram of the “CIE 1976 UCS Chromaticity Diagram”. In FIG. 16, a region RH is a skin color region set in advance by measurement or the like. Therefore, whether or not each pixel is a flesh color pixel can be determined by applying the chromaticities u ′ and v ′ obtained by the above formulas 1 and 2 to the following conditional formula.
[0068]
[Equation 3]
Figure 0003760846
[0069]
[Expression 4]
Figure 0003760846
[0070]
That is, when the chromaticity u ′ calculated by the formula 1 satisfies the conditional formula 3 and the chromaticity v ′ calculated by the formula 2 satisfies the conditional formula 4 Is found to be a skin color pixel. By specifying the skin color pixel using the UCS chromaticity diagram, it becomes possible to specify the skin color pixel accurately without being affected by the luminance value, and the chromaticity u ′, Since the conversion to v ′ is a relatively simple calculation, it is possible to efficiently perform the calculation process.
[0071]
In FIG. 16, the skin color region RH is defined as a rectangular region as an example. For example, a trapezoidal or stepped skin color region is set in the u′v ′ space of the UCS chromaticity diagram. Also good.
[0072]
When this skin color pixel extraction process is performed for each pixel, when the image component in the focus evaluation area is blurred as described above, the image size is small and the number of pixels is relatively small. Extraction processing can be performed. On the other hand, when the image component in the focus evaluation area is close to the focus state, the image size is large and the number of pixels is relatively large, so the number of samples is increased and the subject can be accurately extracted. Become.
[0073]
In step S206, the subject extraction unit 45 performs a flesh color block extraction process. Here, it is determined whether or not the flesh color pixels are included in a predetermined ratio or more for each block divided by the block division processing in step S203. As specified. On the other hand, when the number of skin color pixels included in one block is less than a predetermined ratio, it is determined that the block is not extracted as a skin color block and does not constitute a main subject.
[0074]
By extracting the flesh color block in this way and executing the subsequent processing in units of blocks, the processing speed can be increased as compared with the case where the processing is performed in units of pixels. In particular, in the case of the digital camera 1, when the shutter button 8 is half-pressed, it is required to quickly bring the main subject into the focused state in order not to miss the photo opportunity. Each process has an important significance. At the same time, since a block in which a predetermined proportion of flesh-color pixels exists is used as a flesh-color block, the reliability of the flesh-color block is also improved.
[0075]
In addition, when the image component in the focus evaluation area is in a blurred state, the number of block divisions is relatively small, and as a result, the number of blocks specified as flesh-colored blocks is also small, so that subsequent processing can be performed efficiently. It is. However, if the image component in the focus evaluation area is blurred, it becomes difficult to perform accurate main subject detection processing in the subsequent shape determination processing, and the subject magnification is small (that is, If the main subject appears small in the image), it may not be recognized as a skin color block, and the main subject may not be extracted well.
[0076]
On the other hand, when the image component of the focus evaluation area is in a state close to the focus state, the number of block divisions is relatively large, and as a result, the number of blocks specified as flesh-color blocks also increases. In this process, the main subject can be extracted more accurately. Even when the subject magnification is small (that is, the main subject appears small in the image), since the number of blocks is large, the main subject is covered by a plurality of blocks. And the main subject can be extracted accurately.
[0077]
Next, proceeding to step S207, the subject extraction unit 45 performs a grouping process on the blocks identified as skin color blocks. Grouping is a process in which flesh color blocks distributed continuously in the vertical direction or the horizontal direction are connected to form an aggregate of flesh color blocks. For this reason, when one flesh-color block exists in isolation without touching another flesh-color block, the flesh-color block is excluded from the formation of the flesh-color block aggregate by the grouping process. In other words, by this grouping process, a small flesh color block that cannot be a main subject is treated as not constituting the main subject.
[0078]
Further, here, group information of a collection of flesh color blocks formed by the grouping process is also generated. The group information is information that is generated for each aggregate of skin color blocks and includes the number of blocks in the vertical and horizontal directions constituting the aggregate and the barycentric position of the aggregate. This group information is used in a shape determination process (step S208) and a face identification process (step S209) performed later.
[0079]
Next, proceeding to step S208, the subject extraction unit 45 performs a shape determination process of the flesh color block aggregate formed by the grouping process of step S207. In general, when a skin color group aggregate is obtained from an image, only the skin portion of the person is not extracted. obtain. Human hands and feet can also form a flesh-colored group aggregate. Thus, in this embodiment, the subject extraction unit 45 further performs shape determination processing so that a flesh color group aggregate having a shape distribution close to a human face shape is recognized as a main subject. .
[0080]
The shape determination process here is performed by determining whether or not a flesh color block aggregate is included in the range of the aspect ratio set in step S204. Specifically, the numbers of vertical and horizontal blocks included in the group information generated in step S207 are acquired, and the vertical and horizontal aspect ratios (M: 1) of the flesh color block aggregate are obtained. When the aspect ratio set in step S204 is K: 1, if the relationship of M ≦ K is established, it is determined that the flesh color block aggregate is an image component obtained by photographing a human face portion.
[0081]
Note that the skin color block aggregate distributed in a row in the horizontal direction is also determined to be a human face part only by the relationship of M ≦ K. Therefore, in order to avoid such a situation, the lower limit L is added to the value of M. May be set. That is, if the relationship of L ≦ M ≦ K is established, it may be determined that the flesh color block aggregate is an image component obtained by photographing a human face portion.
[0082]
FIG. 17 is a diagram showing an area recognized as the main subject in the shape determination process (step S208). In FIG. 17, the area recognized as the main subject is shown in black. As illustrated in FIG. 17, the subject extraction unit 45 performs shape determination processing, so that a block including a person's face is identified as a main subject region.
[0083]
Next, proceeding to step S209, when a plurality of main subjects are specified by the shape determination process, the subject extraction unit 45 performs face specification processing, that is, main subject specification processing, in order to specify one of the main subjects. I do. A weighting coefficient for the screen is set in advance in the subject extraction unit 45, and the weighting coefficient for the flesh color block aggregate is identified based on the barycentric position of the flesh color block aggregate identified as the main subject.
[0084]
FIG. 18 is a diagram showing an example of weighting coefficients for the screen. As shown in FIG. 18, the screen G5 is divided into a plurality of areas, and a weighting coefficient for each area is defined for each area. Note that the size of the screen G5 changes according to the pixel thinning number and is adjusted to match the image size of the images G1 and G2 (see FIG. 11) after the pixel thinning processing. Then, the position of the center of gravity of the flesh color block aggregate is specified on the screen G5, and the weighting coefficient is specified based on the specification result. For example, in FIG. 17, considering a black-skinned flesh color block aggregate specified as the main subject, the center of gravity is located at position P1 in FIG. 18, and thus the weighting coefficient is specified as “10”. Then, the subject extraction unit 45 calculates the product of the area of the skin color block aggregate (for example, the number of blocks constituting the skin color block aggregate) and the specified weighting coefficient, and the main subject fitness value of the skin color block aggregate (Value indicating the likelihood of being a main subject). Then, when the main subject suitability value is calculated for each of the plurality of skin color block aggregates, the main subject suitability values are compared, and the skin color block aggregate showing the maximum value is recognized as the face portion of the person who is the main subject. .
[0085]
Thus, when a plurality of main subjects are identified, the main subject fitness value is calculated using the weighting coefficient for the position on the screen on the assumption that the main subject will be framed closer to the center of the screen. By determining, one main subject can be specified accurately. Also, the object that appears larger than the object that appears larger is more likely to be the main subject, so the area of the flesh color block aggregate must be taken into account when performing calculations using the weighting coefficient. Thus, the main subject can be accurately specified.
[0086]
It should be noted that a plurality of main subject adaptation values indicating values within a predetermined range from the main subject adaptation value indicating the maximum value may be employed. In this case, since a plurality of areas are specified as the main subject area, so-called multi-area focusing control is applied.
[0087]
When the main subject is specified as described above, the subject extraction unit 45 instructs the main control unit 18 to specify the main subject region, so that the main subject region is also displayed on the liquid crystal display unit 33. (Step S210). Accordingly, the user can easily grasp which part of the image is recognized as the main subject and the focus control is performed. In addition, the subject extraction unit 45 instructs the focus evaluation region setting unit 41 on the main subject region identified by performing the processing as described above.
[0088]
Returning to the flowchart of FIG. 7, when the subject extraction process in step S104 ends, the process proceeds to step S105, where the focus evaluation area setting unit 41 extracts the focus evaluation area for the focus evaluation unit 42 to calculate the evaluation value. The setting is changed to the subject area designated by the unit 45. As a result, when the next evaluation value calculation is performed in the focus evaluation unit 42, the evaluation value can be calculated for the image component of the main subject.
[0089]
Next, the focus control unit 43 drives the focusing lens 12 at a predetermined pitch (step S106), the image is captured at the lens position (step S107), and the evaluation value by the focus evaluation unit 42 is obtained. A calculation process is performed (step S108). In step S108, the focus evaluation unit 42 calculates an evaluation value based on the image component of the focus evaluation area set in the focus evaluation area change setting process in step S105.
[0090]
Thereafter, the processing of steps S106 to S108 is repeated until the evaluation value shows the maximum value (or minimum value), and when the lens position where the evaluation value shows the maximum value (or minimum value) can be specified, that is, step S109. When the in-focus state of the in-focus evaluation area is realized, the process proceeds to the flowchart of FIG.
[0091]
Then, the subject extraction process is executed again at the stage where the in-focus state of the in-focus evaluation area is realized (step S110). The subject extraction process (step S110) here is also the same as the subject extraction process in step S104 described with reference to FIG.
[0092]
However, in the stage of step S104, the extraction process of the main subject is performed in a state where the image component in the focus evaluation area is blurred, and thus the subject extraction process is performed with a large number of pixel thinning and a small number of block divisions. Also, since the shape criterion is not strict, an area that is efficiently estimated to be the main subject is identified, but its accuracy is low. Therefore, even if the main subject extraction process is performed in a state where the image component of the focus evaluation area is blurred, and the main subject area specified thereby is determined to be in focus, the focus evaluation area does not The main subject may not be included.
[0093]
Therefore, in this embodiment, subject extraction processing is performed again in step S110. In step S110, since it is determined that the image component in the focus evaluation area is in the focused state, the subject extraction process has a small pixel thinning number and a large number of block divisions. An extraction process is performed. In addition, since the shape determination criterion is also strict, the main subject area can be specified with high accuracy.
[0094]
When subject extraction processing (step S110) is performed and a highly reliable main subject region is specified, the subject extraction unit 45 determines the main subject region specified for the focus evaluation region setting unit 41 as in the previous time. Instruct.
[0095]
Thereby, the focus evaluation area setting unit 41 determines whether or not the focus evaluation area used in step S108 matches the subject area specified in the subject extraction process in step S110 (step S111). ). That is, this process is a process for confirming whether or not the focus evaluation area that has been the object of evaluation in the repetitive processes of steps S106 to S108 is an accurate main subject area. As a result, when the focus evaluation area does not match the identified main subject area, the process returns to step S105 (FIG. 7), and the focus evaluation area setting unit 41 sets the focus evaluation area as the subject in step S110. The setting is changed to the main subject area specified by the extraction process. Therefore, when the next evaluation value calculation is performed in the focus evaluation unit 42, it is possible to perform the evaluation value calculation for the image component of the main subject region with high reliability, and the processing after step S106 is performed. . On the other hand, if the focus evaluation area matches the identified main subject area, the process proceeds to step S112 (FIG. 8).
[0096]
When the focus evaluation area setting unit 41 determines that the focus evaluation area matches the identified main subject area, the main control section 18 is permitted to perform the main photographing operation (step S112).
[0097]
The overall control unit 18 first determines whether or not the shutter button 8 has been fully pressed by the user when permission for the main photographing operation is given. Since the digital camera 1 is fully depressed when the shutter button 8 is fully depressed, if the shutter button 8 is not fully depressed, in order to cope with a change in framing, step S102 ( Returning to FIG. 7), the processing after the shutter button 8 is half-pressed is repeated.
[0098]
When the shutter button 8 is fully pressed, the overall control unit 18 controls the shooting function unit 20 to perform the actual shooting operation (step S114), and the image processing unit 32 performs predetermined image processing (step S114). After performing S115), the recording process to the recording medium 9 (step S116) is performed.
[0099]
Thus, the processing procedure of the digital camera 1 from when the shutter button 8 is half-pressed to when the main photographing operation is completed is completed. In the main photographing operation, the main subject exists in any part of the image. Even in this case, it is possible to photograph the main subject in a focused state.
[0100]
In the digital camera 1 of this embodiment, the main subject focus control unit 40 that also functions as a subject extraction device performs a main subject (specific subject) extraction process based on the evaluation result of the focus evaluation area. If the image component in the focus evaluation area is blurred, the processing efficiency is improved. Can be set, and when the image components in the focus evaluation area are in a state close to the in-focus state, the processing content can be set with an emphasis on the reliability of subject extraction. .
[0101]
<2. Second Embodiment>
Next, a second embodiment will be described. In this embodiment, the apparatus configuration is the same as that described in the first embodiment (see FIG. 2 and the like).
[0102]
In the first embodiment, the focus control unit 43 drives the focusing lens 12 stepwise at a predetermined pitch, and the focus evaluation unit 42 calculates the evaluation value at each lens position. The processing is executed before the focusing lens 12 is driven stepwise and after the focusing evaluation area reaches the in-focus state. For this reason, if the subject extraction process executed before the focusing lens 12 is driven stepwise has actually identified a subject that is completely different from the main subject as the main subject, the focus including that subject is included. The operation for leading the evaluation area to the in-focus state is wasted.
[0103]
For this reason, in this embodiment, the subject extraction process is executed even while the focusing lens 12 is moved stepwise, thereby eliminating unnecessary operations and more efficiently focusing the main subject accurately. A form to be led to will be described.
[0104]
19 and 20 are flowcharts showing the processing procedure of the digital camera 1 according to the second embodiment, and in particular, the overall processing from when the shutter button 8 is half-pressed until the actual photographing operation is performed. The procedure is shown.
[0105]
First, when the shutter button 8 is pressed halfway by the user (step S301), the overall control unit 18 causes the main subject focusing control unit 40 and the imaging function unit 20 to function.
[0106]
Then, the focusing control unit 43 controls the lens driving unit 50 to move the focusing lens 12 to the farthest side (step S302). When the process of step S302 is executed after the next time, the focusing control unit 43 performs a control operation for moving the focusing lens 12 by a predetermined pitch in the near side direction.
[0107]
Next, a focus evaluation area setting process is performed (step S303). When the main subject region is designated by the subject extraction unit 45, the focus evaluation region setting unit 41 sets the designated main subject region as the focus evaluation region. However, when the process of step S303 is performed for the first time after the shutter button 8 is half-pressed, the subject extraction process (step S308) is not yet executed. For this reason, when the main subject area has not yet been designated by the subject extraction unit 45, the focus evaluation area setting unit 41 uses the initial focus evaluation area FR1 (see FIG. 3) set in advance in the center of the image. It is set as a focus evaluation area for evaluation value calculation. On the other hand, when the subject extraction process has already been performed several times, the focus evaluation area setting unit 41 sets the latest main subject area designated last time as the focus evaluation area to be evaluated. . Then, the focus evaluation area setting unit 41 instructs the focus evaluation part 42 about the focus evaluation area.
[0108]
If a mode for shooting a person such as a snap mode or a portrait mode is selected and set as the shooting mode, subject extraction processing is performed when the shutter button 8 is half-pressed. You may make it go once. With such a processing procedure, when performing the focus evaluation area setting process in step S303, it is possible to always set the area estimated as the main subject as the focus evaluation area.
[0109]
Then, the overall control unit 18 causes the photographing function unit 20 to perform a photographing operation when the focusing lens 12 is at the current lens position. Then, the focus evaluation unit 42 takes in the image stored in the image memory 31 (step S304) and performs evaluation value calculation processing (step S305). At this time, the focus evaluation unit 42 calculates an evaluation value based on the image component of the focus evaluation region specified from the focus evaluation region setting unit 41 in step S303, and the evaluation value calculated as a result is the focus value. This is given to the focus control unit 43 and the processing content change 44.
[0110]
Then, the processing content changing unit 44 determines whether or not to execute subject extraction processing (step S306). In this embodiment, when the focusing lens 12 is moved stepwise at a predetermined pitch, the subject extraction process can be executed at each lens position, but every time the lens is driven at the predetermined pitch. If the subject extraction processing is executed, it takes a long time to lead the main subject to the focused state. Therefore, the processing content changing unit 44 of this embodiment has not only a function of changing the processing content in the subject extraction unit 45 but also a function of adjusting the execution frequency of the subject extraction processing in the subject extraction unit 45.
[0111]
There are several methods for the processing content changing unit 44 to adjust the execution frequency of the subject extraction processing. First, there is a method in which the subject extraction process is executed once every time the lens driving of the focusing lens 12 at a predetermined pitch is performed a predetermined number of times. Accordingly, it is possible to avoid subject extraction processing from being performed every time lens driving is performed, and thus an efficient focusing operation can be realized.
[0112]
Second, there is a method of increasing the execution frequency of the subject extraction process as the image component in the focus evaluation area approaches the focus state by taking into account the evaluation value obtained by the focus evaluation unit 42. For example, when the evaluation value indicates the maximum value at the in-focus position, when the evaluation value is less than the first threshold value, the subject extraction process is executed once every time the lens is driven ten times, and the first threshold value is set. When the value is less than the second threshold, the subject extraction process is executed once every time the lens is driven five times. When the value is equal to or greater than the second threshold, the subject extraction process is performed once every time the lens is driven twice. The execution frequency of the subject extraction process is adjusted on the basis of the evaluation result in the focus evaluation unit 42 so as to execute. With this configuration, the processing for extracting the main subject increases as the image component in the focus evaluation area approaches the focused state. When the image component in the focus evaluation area is close to the focus state, the main subject is identified with relatively high accuracy, so this second method is effective for leading the main subject to the focus state. Method.
[0113]
However, the method by which the processing content changing unit 44 adjusts the execution frequency of the subject extraction processing is not limited to the first or second method, and other methods may be adopted. Further, when the processing speed in the main subject focusing control unit 40 is sufficiently high, the subject extraction process may be executed at the time of image capture every time after driving the lens.
[0114]
If the processing content changing unit 44 determines that the subject extraction process is to be executed by counting the number of lens driving operations, the process proceeds to the subject extraction process in step S308. On the other hand, if it is determined that the subject extraction process is not to be executed, the process proceeds to a process of skipping the subject extraction process (step S308) and performing the focus determination, that is, step S310 (the flowchart of FIG. 20).
[0115]
Also in this embodiment, the details of the subject extraction process (step S308) are the same as those in the flowchart shown in FIG. Accordingly, when the focus evaluation area is in a blurred state, subject extraction processing is performed with emphasis on processing efficiency, and the reliability of the main subject specified by the subject extraction processing as the focus evaluation region approaches the focus state is improved. Will improve.
[0116]
When the main subject region is specified in the subject extraction process (step S308), the main subject region is transmitted from the subject extraction unit 45 to the focus evaluation region setting unit 41.
[0117]
In step S309, the focus evaluation area setting unit 41 compares the focus evaluation area so far with the main subject area specified by the subject extraction process, and determines whether or not they match. This process is a process for confirming whether or not the focus evaluation area that has been the object of evaluation so far is an accurate main subject area. If they do not match, the process returns to step S303, and the focus evaluation area setting unit 41 changes the setting of the subsequent focus evaluation area to the main subject area specified by the subject extraction process in step S308. Therefore, when the next evaluation value calculation is performed in the focus evaluation unit 42, it is possible to calculate the evaluation value for the image component of the main subject region with higher reliability than the previous time. On the other hand, if the focus evaluation area matches the identified main subject area, the process proceeds to step S310 (FIG. 20).
[0118]
Then, the focus control unit 43 determines whether or not the lens position PX having the maximum (or minimum) evaluation value as shown in FIG. 4 has been identified, that is, the focus state of the focus evaluation area is determined. Determine whether it has been realized. Here, if it is determined that the in-focus state of the in-focus evaluation region has not yet been realized, the process returns to step S302 (FIG. 19) to repeat lens driving at a predetermined pitch, evaluation value calculation processing, and the like. As a result, when the in-focus state of the in-focus evaluation area is finally realized, the process proceeds to step S311 to permit the main control unit 18 to perform the main photographing operation.
[0119]
When the main photographing operation is permitted, the overall control unit 18 first determines whether or not the shutter button 8 has been fully pressed by the user (step S312). If the shutter button 8 is not fully pressed, the processing after the shutter button 8 is half-pressed is repeated by returning to step S302 (FIG. 19) in order to cope with the case where the framing is changed. At this time, since the focus control unit 43 needs to perform focus control from the beginning, the focusing lens 12 is moved to the farthest position.
[0120]
On the other hand, when the shutter button 8 is fully pressed, the overall control unit 18 controls the imaging function unit 20 to perform the actual imaging operation (step S313), and the image processing unit 32 performs predetermined image processing. After performing (Step S314), the recording process to the recording medium 9 (Step S315) is performed.
[0121]
As described above, in the digital camera 1 according to the second embodiment, the processing procedure from when the shutter button 8 is pressed halfway down until the main shooting operation is completed is completed. In any part of the image, the main subject can be photographed in a focused state.
[0122]
Also in the digital camera 1 of this embodiment, the main subject focus control unit 40 that also functions as a subject extraction device performs a main subject (specific subject) extraction process based on the evaluation result of the focus evaluation area. If the image component in the focus evaluation area is blurred, the processing efficiency is improved. Can be set, and when the image components in the focus evaluation area are in a state close to the in-focus state, the processing content can be set with an emphasis on the reliability of subject extraction. . As a result, it is possible to efficiently and accurately extract the main subject and realize the focused state of the main subject.
[0123]
Further, in the digital camera 1 of this embodiment, since the subject extraction process is executed even in the lens driving stage for performing the focusing operation, the focusing operation is performed with a portion that is not the main subject as an evaluation target. Since the progress is avoided, a more efficient focusing operation is realized.
[0124]
Furthermore, the main subject can be extracted more accurately by configuring the frequency of subject extraction processing to increase as the image component in the focus evaluation area approaches the focused state, and its reliability is high. The main subject can be quickly brought into focus.
[0125]
<3. Modification>
Although the embodiments of the present invention have been described above, the present invention is not limited to the contents described above.
[0126]
For example, the digital camera in the above description includes both a digital still camera and a digital video camera. Although the digital camera 1 has been described as an example of the photographing apparatus, the present invention can also be applied to photographing apparatuses other than the digital camera.
[0127]
In the above description, the focus control such as the so-called hill-climbing method is described. However, the auto focus detection method called the active method or the phase difference method, and the distance measurement is performed in a plurality of distance measuring areas. The present invention can be applied even to a control method such as an automatic focus detection method.
[0128]
In the above description, the case where the timing for starting the focusing operation is after halfway pressing of the shutter button 8 is described. However, the present invention is not limited to this, for example, a state in which a live view image is displayed Also, the above-described focusing operation may be performed.
[0129]
In the above description, the pixel thinning number, the number of block divisions, and the shape determination criterion, and the blur amount in the focus evaluation area indicate a continuous relationship. Each of the pixel thinning number, the block division number, and the shape determination criterion may be changed in a stepwise manner.
[0130]
In the above description, the case where the main subject (that is, the specific subject) is a human face portion has been described. This is because, in general, when taking a picture, a person is often taken as a subject. However, the essence of the present invention is that the main subject is limited to the face of a person. It is not something. For this reason, if the user can freely set and input information on the color components, shapes, etc. constituting the main subject, the main subject intended by the user can be appropriately specified. In addition, when a mode in which a person is a subject, such as a snap mode or a portrait mode, is selected as a shooting mode, the process for extracting the face portion of a person as a main subject as described above is performed. It is also possible to configure. Conversely, it is possible to determine that the subject is a landscape by extracting the face portion of the person, or to determine that it is a snap or a portrait by the area of the skin color block aggregate of the main subject, Auto scene discrimination can be performed.
[0131]
Furthermore, in the above description, the case where the subject extraction process is performed to guide the main subject to the in-focus state has been described, but in view of the fact that the main subject region is specified from the image according to the result of the subject extraction process, The subject extraction processing can be executed not only for automatic focusing control but also for performing special image processing on the image components of the main subject region. That is, the subject extraction technique described above is not limited to the one applied to guide the main subject to the focused state.
[0132]
【The invention's effect】
  As described above, according to the first aspect of the present invention, the focus evaluation areaAs the subject image included in theSpecific subject extraction processingDecrease the number of thinning out pixels inTherefore, when the image component in the focus evaluation area is blurred, it is possible to set the processing content that emphasizes the processing efficiency, and the image component in the focus evaluation area is in the in-focus state. If it is in a close state, it is possible to set processing contents that place importance on the reliability of the extraction of the specific subject.Further, the processing content of the specific subject extraction processing can be changed according to the amount of blur in the focus evaluation area. Then, when the focus evaluation area approaches the focused state, the number of samples for extracting the specific subject increases, so that the specific subject can be extracted with high accuracy. On the other hand, when the focus evaluation area is blurred, the number of samples is small, so that a specific subject can be extracted quickly.As a result, it is possible to extract a specific subject efficiently and accurately.
[0133]
  According to invention of Claim 2,Since the subject image included in the focus evaluation area is configured to increase the number of block divisions in the block division process in the extraction process of the specific subject as the subject image approaches the in-focus state, the image component of the focus evaluation area When the image is blurred, it is possible to set the processing content with an emphasis on the processing efficiency, and when the image component in the focus evaluation area is close to the focus state, the reliability of the extraction of the specific subject It is possible to set processing contents that place emphasis on. Further, the processing content of the specific subject extraction processing can be changed according to the amount of blur in the focus evaluation area. Then, when the focus evaluation area approaches the focused state, the number of blocks for extracting the specific subject increases, so that the specific subject can be extracted with high accuracy. On the other hand, when the focus evaluation area is blurred, the number of blocks is small, so that a specific subject can be extracted quickly. As a result, it is possible to extract a specific subject efficiently and accurately.
[0135]
  Claim3According to the invention described in the above, when the subject image included in the focus evaluation area approaches the in-focus state, the frequency of executing the extraction process of the specific subject is increased, so that the image component in the focus evaluation area is blurred Can set processing content that emphasizes processing efficiency, and when the image component in the focus evaluation area is in a state close to the in-focus state, processing content that emphasizes the reliability of extraction of a specific subject Can be set. That is, as the in-focus state is approached, it is possible to extract a specific subject with high accuracy. As a result, it is possible to extract a specific subject efficiently and accurately.
[0136]
  Claim4Since the specific subject is extracted by performing skin color discrimination of the image, it is possible to extract the person image as the specific subject when the person is the subject.
[0137]
  Claim5According to the invention described above, when the specific subject region extracted by the specific subject extraction process and the focus evaluation region do not match, the focus evaluation region is configured to be changed to the specific subject region. Therefore, it is possible to appropriately evaluate the focused state of the specific subject.
[0138]
  Claim6According to the invention described in the above, the processing content when performing the extraction processing of the specific subject is changed so that the thinning-out number of the pixel thinning processing is decreased as the subject image included in the focusing evaluation area approaches the in-focus state. In addition, since the specific subject is extracted from the image based on the changed processing content and the region of the specific subject extracted thereby is set as the focus evaluation region, the focus evaluation is performed. When the image component of the area is blurred, the processing content with an emphasis on processing efficiency can be set, and when the image component of the focus evaluation area is close to the focused state, the specific subject It is possible to set processing contents that emphasize extraction reliability. As a result, the specific subject can be identified efficiently and accurately, and the specific subject can be brought into a focused state.
[0139]
  Claim7According to the invention described in the above, the process when performing the extraction process of the specific subject so that the number of block divisions in the block division process increases as the subject image included in the focus evaluation area approaches the in-focus state. Since the content is changed, the specific subject is extracted from the image based on the changed processing content, and the region of the specific subject extracted thereby is set as the focus evaluation region. When the image component in the focus evaluation area is blurred, it is possible to set processing details that emphasize processing efficiency, and when the image component in the focus evaluation area is close to the focus state Therefore, it is possible to set processing contents that place importance on the reliability of extraction of a specific subject. As a result, the specific subject can be identified efficiently and accurately, and the specific subject can be brought into a focused state.
[0141]
  Claim8According to the invention described in the above, when the subject extraction process is performed so that the frequency of the subject extraction process increases as the subject image included in the focus evaluation area approaches the in-focus state. Since the processing content is changed, the specific subject is extracted from the image based on the changed processing content, and the region of the specific subject extracted thereby is set as the focus evaluation region When the image component in the focus evaluation area is blurred, it is possible to set the processing content with an emphasis on processing efficiency, and when the image component in the focus evaluation area is in a state close to the focus state. Can set processing contents that place importance on the reliability of extraction of a specific subject. As a result, the specific subject can be identified efficiently and accurately, and the specific subject can be brought into a focused state.
  Claim9According to the above-described invention, when a specific subject is extracted, if the region of the specific subject and the focus evaluation region match, the shooting operation for performing the main shooting is permitted. It is possible to appropriately perform the main photographing operation in a state where the state is evaluated.
[Brief description of the drawings]
FIG. 1 is a perspective view showing a digital camera as an example of a photographing apparatus.
FIG. 2 is a block diagram showing an internal configuration of the digital camera.
FIG. 3 is a diagram illustrating an initial state of a focus evaluation area set in advance in the digital camera.
FIG. 4 is a diagram illustrating an example of an evaluation value change with respect to a lens position.
FIG. 5 is a diagram showing a captured image when focus control is performed in a fixed focus evaluation area.
FIG. 6 is a diagram illustrating an image that the user intends to shoot.
FIG. 7 is a flowchart illustrating a processing procedure of the digital camera according to the first embodiment.
FIG. 8 is a flowchart illustrating a processing procedure of the digital camera according to the first embodiment.
FIG. 9 is a flowchart showing a detailed processing procedure of subject extraction processing;
FIG. 10 is a diagram illustrating a relationship between a blur amount and a pixel thinning number.
FIG. 11 is a diagram illustrating a concept of pixel thinning processing.
FIG. 12 is a diagram illustrating a relationship between a blur amount and the number of block divisions.
FIG. 13 is a diagram illustrating a concept of block division processing when the amount of blur is large.
FIG. 14 is a diagram illustrating a concept of block division processing when the amount of blur is small.
FIG. 15 is a diagram illustrating a relationship between a blur amount and an aspect ratio as a shape determination criterion.
FIG. 16 is a simplified diagram of a CIE 1976 UCS chromaticity diagram.
FIG. 17 is a diagram illustrating an area recognized as a main subject in the shape determination process.
FIG. 18 is a diagram illustrating an example of a weighting coefficient for a screen.
FIG. 19 is a flowchart illustrating a processing procedure of the digital camera according to the second embodiment.
FIG. 20 is a flowchart illustrating a processing procedure of the digital camera according to the second embodiment.
[Explanation of symbols]
1 Digital camera (photographing device)
8 Shutter button
11 Shooting lens
12 Focusing lens
18 Overall control unit
20 Shooting function section
30 CCD image sensor
31 Image memory
40 Main subject focus control unit (Subject extraction device)
41 Focus evaluation area setting section
42 Focus evaluation section
43 Focus control unit
44 Processing content change section
45 Subject extraction unit
50 Lens drive unit

Claims (9)

画像から特定被写体の検出を行う被写体抽出装置であって、
前記画像における合焦評価領域の合焦状態を評価する合焦評価手段と、
前記合焦評価手段の評価結果に基づいて前記合焦評価領域に含まれる被写体像が合焦状態となるように制御する合焦制御手段と、
前記合焦評価領域の評価結果に基づいて前記特定被写体の抽出処理を行う際の処理内容を変更する処理内容変更手段と、
前記処理内容に基づいて前記画像のうちから前記特定被写体の抽出処理を行う被写体抽出手段と、
を備え、
前記被写体抽出手段は、前記特定被写体の抽出処理にあたって、画素間引き処理を行うように構成され、
前記処理内容変更手段は、前記合焦制御手段の制御によって前記被写体像が合焦状態に近づくにつれて、前記画素間引き処理における間引き数を減少させていくことを特徴とする被写体抽出装置。
A subject extraction device that detects a specific subject from an image,
In-focus evaluation means for evaluating the in-focus state of the in-focus evaluation area in the image;
Focus control means for controlling the subject image included in the focus evaluation area to be in focus based on the evaluation result of the focus evaluation means;
Processing content changing means for changing the processing content when performing extraction processing of the specific subject based on the evaluation result of the focus evaluation area;
Subject extraction means for extracting the specific subject from the image based on the processing content;
With
The subject extraction means is configured to perform pixel thinning processing in the extraction processing of the specific subject,
The subject extraction device according to claim 1, wherein the processing content changing means reduces the thinning-out number in the pixel thinning-out process as the subject image approaches the in-focus state under the control of the focusing control means.
画像から特定被写体の検出を行う被写体抽出装置であって、
前記画像における合焦評価領域の合焦状態を評価する合焦評価手段と、
前記合焦評価手段の評価結果に基づいて前記合焦評価領域に含まれる被写体像が合焦状態となるように制御する合焦制御手段と、
前記合焦評価領域の評価結果に基づいて前記特定被写体の抽出処理を行う際の処理内容を変更する処理内容変更手段と、
前記処理内容に基づいて前記画像のうちから前記特定被写体の抽出処理を行う被写体抽出手段と、
を備え、
前記被写体抽出手段は、前記特定被写体の抽出処理にあたって、ブロック分割処理を行うように構成され、
前記処理内容変更手段は、前記合焦制御手段の制御によって前記被写体像が合焦状態に近づくにつれて、前記ブロック分割処理におけるブロック分割数を増加させていくことを特徴とする被写体抽出装置。
A subject extraction device that detects a specific subject from an image,
In-focus evaluation means for evaluating the in-focus state of the in-focus evaluation area in the image;
Focus control means for controlling the subject image included in the focus evaluation area to be in focus based on the evaluation result of the focus evaluation means;
Processing content changing means for changing the processing content when performing extraction processing of the specific subject based on the evaluation result of the focus evaluation area;
Subject extraction means for extracting the specific subject from the image based on the processing content;
With
The subject extraction means is configured to perform block division processing in the extraction processing of the specific subject,
The subject extraction device characterized in that the processing content changing means increases the number of block divisions in the block division processing as the subject image approaches the in-focus state under the control of the focusing control means.
画像から特定被写体の検出を行う被写体抽出装置であって、
前記画像における合焦評価領域の合焦状態を評価する合焦評価手段と、
前記合焦評価手段の評価結果に基づいて前記合焦評価領域に含まれる被写体像が合焦状態となるように制御する合焦制御手段と、
前記合焦評価領域の評価結果に基づいて前記特定被写体の抽出処理を行う際の処理内容を変更する処理内容変更手段と、
前記処理内容に基づいて前記画像のうちから前記特定被写体の抽出処理を行う被写体抽出手段と、
を備え
記処理内容変更手段は、前記合焦制御手段の制御によって前記被写体像が合焦状態に近づくにつれて、前記特定被写体の抽出処理の実行頻度を増加させることを特徴とする被写体抽出装置。
A subject extraction device that detects a specific subject from an image,
In-focus evaluation means for evaluating the in-focus state of the in-focus evaluation area in the image;
Focus control means for controlling the subject image included in the focus evaluation area to be in focus based on the evaluation result of the focus evaluation means;
Processing content changing means for changing the processing content when performing extraction processing of the specific subject based on the evaluation result of the focus evaluation area;
Subject extraction means for extracting the specific subject from the image based on the processing content;
Equipped with a,
Pre Symbol processing content changing means, as the object image under the control of the focusing control means approaches the focus state, the object extracting apparatus characterized by increasing the frequency of execution of extraction processing of the specific object.
請求項1乃至3のいずれかに記載の被写体抽出装置において、
前記被写体抽出手段は、色判定処理において、前記画像の肌色判別を行うことによって前記特定被写体を抽出することを特徴とする被写体抽出装置。
Subject extraction apparatus odor according to any one of claims 1 to 3 Te,
The subject extraction device, wherein the subject extraction unit extracts the specific subject by performing skin color discrimination of the image in color determination processing .
請求項1乃至4のいずれかに記載の被写体抽出装置において、
前記被写体抽出手段によって抽出される前記特定被写体の領域と前記合焦評価領域とが一致しない場合に、前記合焦評価領域を前記特定被写体の領域に設定変更する手段、
をさらに備える被写体抽出装置。
The subject extraction device according to any one of claims 1 to 4,
Means for changing the setting of the focus evaluation area to the area of the specific subject when the area of the specific subject extracted by the subject extraction means does not match the focus evaluation area;
Further comprising Ru subject extraction device.
撮影レンズを介して画像を撮影する撮影装置であって、
前記画像における合焦評価領域の合焦状態を評価する合焦評価手段と、
前記合焦評価手段の評価結果に基づいて前記撮影レンズを駆動することにより、前記合焦評価領域に含まれる被写体像が合焦状態となるように制御する合焦制御手段と、
前記合焦評価領域の評価結果に基づいて特定被写体の抽出処理を行う際の処理内容を変更する処理内容変更手段と、
前記処理内容に基づいて前記画像のうちから前記特定被写体の抽出処理を行う被写体抽出手段と、
前記被写体抽出手段で抽出される前記特定被写体の領域を前記合焦評価領域として設定する手段と、
を備え、
前記被写体抽出手段は、前記特定被写体の抽出処理にあたって、画素間引き処理を行うように構成され、
前記処理内容変更手段は、前記合焦制御手段の制御によって前記被写体像が合焦状態に近づくにつれて、前記画素間引き処理における間引き数を減少させていくことを特徴とする撮影装置
A photographing device for photographing an image through a photographing lens ,
In-focus evaluation means for evaluating the in-focus state of the in-focus evaluation area in the image;
Focus control means for controlling the subject image included in the focus evaluation area to be in focus by driving the photographing lens based on the evaluation result of the focus evaluation means;
Processing content changing means for changing processing content when performing extraction processing of a specific subject based on the evaluation result of the focus evaluation area;
Subject extraction means for extracting the specific subject from the image based on the processing content;
Means for setting the area of the specific subject extracted by the subject extraction means as the focus evaluation area;
With
The subject extraction means is configured to perform pixel thinning processing in the extraction processing of the specific subject,
The imaging apparatus according to claim 1, wherein the processing content changing unit decreases a thinning number in the pixel thinning process as the subject image approaches a focused state by the control of the focusing control unit .
撮影レンズを介して画像を撮影する撮影装置であって、
前記画像における合焦評価領域の合焦状態を評価する合焦評価手段と、
前記合焦評価手段の評価結果に基づいて前記撮影レンズを駆動することにより、前記合焦評価領域に含まれる被写体像が合焦状態となるように制御する合焦制御手段と、
前記合焦評価領域の評価結果に基づいて特定被写体の抽出処理を行う際の処理内容を変更する処理内容変更手段と、
前記処理内容に基づいて前記画像のうちから前記特定被写体の抽出処理を行う被写体抽出手段と、
前記被写体抽出手段で抽出される前記特定被写体の領域を前記合焦評価領域として設定する手段と、
を備え、
前記被写体抽出手段は、前記特定被写体の抽出処理にあたって、ブロック分割処理を行うように構成され、
前記処理内容変更手段は、前記合焦制御手段の制御によって前記被写体像が合焦状態に近づくにつれて、前記ブロック分割処理におけるブロック分割数を増加させていくことを特徴とする撮影装置。
A photographing device for photographing an image through a photographing lens,
In-focus evaluation means for evaluating the in-focus state of the in-focus evaluation area in the image;
Focus control means for controlling the subject image included in the focus evaluation area to be in focus by driving the photographing lens based on the evaluation result of the focus evaluation means;
Processing content changing means for changing processing content when performing extraction processing of a specific subject based on the evaluation result of the focus evaluation area;
Subject extraction means for extracting the specific subject from the image based on the processing content;
Means for setting the area of the specific subject extracted by the subject extraction means as the focus evaluation area;
With
The subject extraction means is configured to perform block division processing in the extraction processing of the specific subject,
The processing apparatus according to claim 1, wherein the processing content changing unit increases the number of block divisions in the block division processing as the subject image approaches the in-focus state under the control of the focusing control unit.
撮影レンズを介して画像を撮影する撮影装置であって、
前記画像における合焦評価領域の合焦状態を評価する合焦評価手段と、
前記合焦評価手段の評価結果に基づいて前記撮影レンズを駆動することにより、前記合焦評価領域に含まれる被写体像が合焦状態となるように制御する合焦制御手段と、
前記合焦評価領域の評価結果に基づいて特定被写体の抽出処理を行う際の処理内容を変更する処理内容変更手段と、
前記処理内容に基づいて前記画像のうちから前記特定被写体の抽出処理を行う被写体抽出手段と、
前記被写体抽出手段で抽出される前記特定被写体の領域を前記合焦評価領域として設定する手段と、
を備え
記処理内容変更手段は、前記合焦制御手段の制御によって前記被写体像が合焦状態に近づくにつれて、前記特定被写体の抽出処理の実行頻度を増加させることを特徴とする撮影装置。
A photographing device for photographing an image through a photographing lens,
In-focus evaluation means for evaluating the in-focus state of the in-focus evaluation area in the image;
Focus control means for controlling the subject image included in the focus evaluation area to be in focus by driving the photographing lens based on the evaluation result of the focus evaluation means;
Processing content changing means for changing processing content when performing extraction processing of a specific subject based on the evaluation result of the focus evaluation area;
Subject extraction means for extracting the specific subject from the image based on the processing content;
Means for setting the area of the specific subject extracted by the subject extraction means as the focus evaluation area;
Equipped with a,
Pre Symbol processing content changing means, wherein as the object image under the control of the focus control means approaches the focus state, the photographing apparatus characterized by increasing the frequency of execution of extraction processing of the specific object.
請求項6乃至8のいずれかに記載の撮影装置において、
前記被写体抽出手段が前記特定被写体を抽出した際に、前記特定被写体の領域と前記合焦評価領域とが一致する場合に、本撮影を行うための撮影動作を許可する手段、
をさらに備える撮影装置。
Te imaging apparatus smell as claimed in any one of claims 6 to 8,
Means for permitting a photographing operation for performing actual photographing when the subject extraction means extracts the specific subject and the region of the specific subject and the focus evaluation region match;
An imaging device further comprising:
JP2001357984A 2001-11-22 2001-11-22 Subject extraction device and photographing device Expired - Fee Related JP3760846B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2001357984A JP3760846B2 (en) 2001-11-22 2001-11-22 Subject extraction device and photographing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2001357984A JP3760846B2 (en) 2001-11-22 2001-11-22 Subject extraction device and photographing device

Publications (2)

Publication Number Publication Date
JP2003156680A JP2003156680A (en) 2003-05-30
JP3760846B2 true JP3760846B2 (en) 2006-03-29

Family

ID=19169244

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2001357984A Expired - Fee Related JP3760846B2 (en) 2001-11-22 2001-11-22 Subject extraction device and photographing device

Country Status (1)

Country Link
JP (1) JP3760846B2 (en)

Families Citing this family (22)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3918788B2 (en) 2003-08-06 2007-05-23 コニカミノルタフォトイメージング株式会社 Imaging apparatus and program
JP4500212B2 (en) * 2005-05-20 2010-07-14 富士フイルム株式会社 Imaging device and printing device
JP4578334B2 (en) * 2005-06-22 2010-11-10 富士フイルム株式会社 In-focus position determining apparatus and method for imaging lens
JP2007010898A (en) * 2005-06-29 2007-01-18 Casio Comput Co Ltd Imaging apparatus and program therefor
JP4645413B2 (en) * 2005-11-01 2011-03-09 株式会社ニコン Imaging device
JP4608425B2 (en) * 2005-12-21 2011-01-12 オリンパス株式会社 Imaging system
JPWO2007097287A1 (en) 2006-02-20 2009-07-16 パナソニック株式会社 Imaging device and lens barrel
JP5098259B2 (en) * 2006-09-04 2012-12-12 株式会社ニコン camera
JP4848965B2 (en) 2007-01-26 2011-12-28 株式会社ニコン Imaging device
JP4976160B2 (en) * 2007-02-22 2012-07-18 パナソニック株式会社 Imaging device
JP5056168B2 (en) * 2007-05-30 2012-10-24 株式会社ニコン Focus adjustment device and imaging device
JP5003305B2 (en) * 2007-06-27 2012-08-15 カシオ計算機株式会社 Imaging device and specific image detection program
US8237803B2 (en) 2007-07-09 2012-08-07 Panasonic Coporation Digital single-lens reflex camera including control section that performs camera shake correction and motion detecting section that detects speed of subject
JP4894661B2 (en) 2007-07-24 2012-03-14 株式会社ニコン Imaging device
JP5003529B2 (en) * 2008-02-25 2012-08-15 株式会社ニコン Imaging apparatus and object detection method
JP2010098663A (en) * 2008-10-20 2010-04-30 Samsung Digital Imaging Co Ltd Imaging apparatus
US8648959B2 (en) * 2010-11-11 2014-02-11 DigitalOptics Corporation Europe Limited Rapid auto-focus using classifier chains, MEMS and/or multiple object focusing
JP5360191B2 (en) * 2011-12-28 2013-12-04 株式会社ニコン Imaging device
US9277111B2 (en) 2012-05-18 2016-03-01 Canon Kabushiki Kaisha Image capture apparatus and control method therefor
JP5938268B2 (en) * 2012-05-18 2016-06-22 キヤノン株式会社 Imaging apparatus and control method thereof
JP2014179892A (en) * 2013-03-15 2014-09-25 Nikon Corp Image pickup device
JP6366374B2 (en) * 2013-08-30 2018-08-01 キヤノン株式会社 Focus detection apparatus and control method thereof

Also Published As

Publication number Publication date
JP2003156680A (en) 2003-05-30

Similar Documents

Publication Publication Date Title
JP3760846B2 (en) Subject extraction device and photographing device
JP4053764B2 (en) Subject extraction device and photographing device
JP3555607B2 (en) Auto focus device
KR100659387B1 (en) Image sensing apparatus and its control method
US8395694B2 (en) Apparatus and method for blurring image background in digital image processing device
JP3541820B2 (en) Imaging device and imaging method
JP5760727B2 (en) Image processing apparatus and image processing method
JP4122865B2 (en) Autofocus device
JP2013005091A (en) Imaging apparatus and distance information acquisition method
JP2003018453A (en) Image processing unit, image quality control method, program and recording medium
WO2009017138A1 (en) Image processor, image processing method, digital camera, and imaging apparatus
US20100209093A1 (en) Focus adjusting apparatus and focus adjusting method
JP4265233B2 (en) camera
JP2004325517A (en) Imaging unit
JP4039147B2 (en) Imaging device
JP2004361484A (en) Autofocus camera
JP2005173269A (en) Optical equipment
JP5144724B2 (en) Imaging apparatus, image processing apparatus, imaging method, and image processing method
JP5036334B2 (en) Imaging apparatus, imaging method, and program for causing computer to execute the method
CN110771142A (en) Imaging device, method for controlling imaging device, and program for controlling imaging device
JP2009081636A (en) Image recording apparatus and photographing method
JP2003262783A (en) Autofocus device and imaging device
JP5720488B2 (en) Imaging apparatus and distance information acquisition method
JP3555583B2 (en) Optical system control device, optical system control method, recording medium, and imaging device
KR101613617B1 (en) Apparatus and method for digital picturing image

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20040322

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20040330

A711 Notification of change in applicant

Free format text: JAPANESE INTERMEDIATE CODE: A712

Effective date: 20040521

RD03 Notification of appointment of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7423

Effective date: 20040528

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20040810

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20050315

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20050512

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20050809

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20051007

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: 20051220

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20060102

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: 20100120

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20100120

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20110120

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20120120

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20130120

Year of fee payment: 7

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

LAPS Cancellation because of no payment of annual fees