JP5786544B2 - Image processing apparatus, imaging apparatus, and program - Google Patents
Image processing apparatus, imaging apparatus, and program Download PDFInfo
- Publication number
- JP5786544B2 JP5786544B2 JP2011175876A JP2011175876A JP5786544B2 JP 5786544 B2 JP5786544 B2 JP 5786544B2 JP 2011175876 A JP2011175876 A JP 2011175876A JP 2011175876 A JP2011175876 A JP 2011175876A JP 5786544 B2 JP5786544 B2 JP 5786544B2
- Authority
- JP
- Japan
- Prior art keywords
- image
- subject
- unit
- region
- image area
- 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.)
- Active
Links
Images
Landscapes
- Image Processing (AREA)
- Studio Devices (AREA)
Description
本発明は、画像処理装置、撮像装置、及びプログラムに関する。 The present invention relates to an image processing device, an imaging device, and a program.
画像の特徴量のヒストグラムに基づいて、撮像された画像から画像領域を抽出する技術が知られている(例えば、特許文献1参照)。 A technique for extracting an image area from a captured image based on a histogram of image feature amounts is known (see, for example, Patent Document 1).
しかしながら、特許文献1に記載されている技術では、撮像された画像から人が注目する画像領域を抽出すること、すなわち、被写体の画像領域を抽出することができなかった。
However, with the technique described in
本発明は、上記問題を解決すべくなされたもので、その目的は、撮像された画像から被写体の画像領域を抽出することができる画像処理装置、撮像装置、及びプログラムを提供することにある。 The present invention has been made to solve the above problems, and an object of the present invention is to provide an image processing apparatus, an imaging apparatus, and a program that can extract an image area of a subject from a captured image.
上記問題を解決するために、本発明の一実施形態は、画像から複数の被写体領域を検出する検出部と、前記検出部で検出された複数の前記被写体領域のうち、前記画像の第1領域を形成する、対向した2つの辺に接している被写体領域を抽出する抽出部と、を備える画像処理装置である。 In order to solve the above problem, an embodiment of the present invention includes a detection unit that detects a plurality of subject regions from an image, and a first region of the image among the plurality of subject regions detected by the detection unit. And an extraction unit that extracts a subject area in contact with two opposing sides.
また、本発明の一実施形態は、画像から複数の被写体領域を検出する検出部と、前記検出部で検出された複数の前記被写体領域のうち、特定の被写体領域を抽出する抽出部と、を備え、前記抽出部は、前記画像の第1領域を形成する1つの辺に接している面積が第1閾値以上である被写体領域を抽出しない画像処理装置である。 Further, an embodiment of the present invention includes: a detection unit that detects a plurality of subject areas from an image; and an extraction unit that extracts a specific subject area among the plurality of subject areas detected by the detection unit. And the extraction unit is an image processing apparatus that does not extract a subject region whose area in contact with one side forming the first region of the image is equal to or greater than a first threshold.
また、本発明の一実施形態は、画像から複数の被写体領域を検出する検出部と、前記検出部で検出された複数の前記被写体領域のうち、特定の被写体領域を抽出する抽出部と、を備え、前記抽出部は、前記画像の第1領域を形成する1つの辺の長さと、前記辺において被写体領域が接している部分の長さと、の割合が第2閾値以上である被写体領域を抽出しない画像処理装置である。 Further, an embodiment of the present invention includes: a detection unit that detects a plurality of subject areas from an image; and an extraction unit that extracts a specific subject area among the plurality of subject areas detected by the detection unit. And the extraction unit extracts a subject region in which a ratio of a length of one side forming the first region of the image and a length of a portion of the side that is in contact with the subject region is equal to or greater than a second threshold value. It is an image processing device that does not.
また、本発明の一実施形態は、画像から複数の被写体領域を検出する検出部と、前記検出部で検出された複数の前記被写体領域のうち、前記画像内に定められた第1範囲を形成する、対向した2つの辺に接している被写体領域を抽出する抽出部と、を備える画像処理装置である。 In one embodiment of the present invention, a detection unit that detects a plurality of subject areas from an image, and a first range defined in the image among the plurality of subject areas detected by the detection unit is formed. And an extraction unit that extracts a subject area that is in contact with two opposing sides.
また、本発明の一実施形態は、画像から複数の被写体領域を検出する検出部と、前記検出部で検出された複数の前記被写体領域のうち、特定の被写体領域を抽出する抽出部と、を備え、前記抽出部は、前記画像内に定められた第1範囲を形成する1つの辺に接している面積が第1閾値以上である被写体領域を抽出しない画像処理装置である。 Further, an embodiment of the present invention includes: a detection unit that detects a plurality of subject areas from an image; and an extraction unit that extracts a specific subject area among the plurality of subject areas detected by the detection unit. And the extraction unit is an image processing apparatus that does not extract a subject area whose area in contact with one side forming a first range defined in the image is equal to or greater than a first threshold.
また、本発明の一実施形態は、画像から複数の被写体領域を検出する検出部と、前記検出部で検出された複数の前記被写体領域のうち、特定の被写体領域を抽出する抽出部と、を備え、前記抽出部は、前記検出部で検出された複数の前記被写体領域のうち、前記画像内に定められた第1範囲を形成する1つの辺の長さと、前記辺において被写体領域が接している部分の長さと、の割合が第2閾値以上である被写体領域を抽出しない画像処理装置である。 Further, an embodiment of the present invention includes: a detection unit that detects a plurality of subject areas from an image; and an extraction unit that extracts a specific subject area among the plurality of subject areas detected by the detection unit. The extraction unit includes a length of one side forming a first range defined in the image, and the subject region is in contact with the side of the plurality of subject regions detected by the detection unit. This is an image processing apparatus that does not extract a subject area whose ratio to the length of the existing part is equal to or greater than the second threshold.
また、本発明の一実施形態は、上述の画像処理装置と、前記画像処理装置の前記抽出部で抽出された被写体領域により光学像を撮像素子に導くレンズを制御する制御部と、を備えるレンズ制御装置である。 In addition, an embodiment of the present invention includes a lens including the above-described image processing device, and a control unit that controls a lens that guides an optical image to an imaging device using a subject area extracted by the extraction unit of the image processing device. It is a control device.
また、本発明の一実施形態は、レンズから射出された光学像を撮像する撮像素子と、上述の画像処理装置と、前記画像処理装置の前記抽出部で抽出された被写体領域により前記レンズを制御する制御部と、を備える撮像装置である。 In one embodiment of the present invention, the lens is controlled by an imaging device that captures an optical image emitted from the lens, the image processing device described above, and a subject area extracted by the extraction unit of the image processing device. And a control unit.
また、本発明の一実施形態は、コンピュータに、画像から複数の被写体領域を検出する検出ステップと、前記検出ステップで検出された複数の前記被写体領域のうち、前記画像の第1領域を形成する、対向した2つの辺に接している被写体領域を抽出する抽出ステップと、を実行させるためのプログラムである。 In one embodiment of the present invention, a detection step of detecting a plurality of subject regions from an image and a first region of the image among the plurality of subject regions detected in the detection step are formed in a computer. , An extraction step for extracting a subject area that is in contact with two opposite sides.
また、本発明の一実施形態は、コンピュータに、画像から複数の被写体領域を検出する検出ステップと、前記検出ステップで検出された複数の前記被写体領域のうち、前記画像内に定められた第1範囲を形成する、対向した2つの辺に接している被写体領域を抽出する抽出ステップと、を実行させるためのプログラムである。 According to one embodiment of the present invention, a detection step of detecting a plurality of subject areas from an image on a computer, and a first step defined in the image among the plurality of subject areas detected in the detection step. And an extraction step for extracting a subject area that is in contact with two opposite sides that form a range.
本発明によれば、撮像された画像から被写体の画像領域を抽出することができる。 According to the present invention, an image area of a subject can be extracted from a captured image.
以下、本発明の一実施形態による画像処理装置及び撮像装置について、図面を参照して説明する。
図1は、本実施形態による画像処理装置1と撮像装置100との構成を示すブロック図である。
撮像装置100は、レンズ鏡筒111から入射される光学像を撮像し、得られた画像を静止画又は動画の画像として、記憶媒体200に記憶させる。また、撮像装置100は、画像処理装置1(画像処理部140)を備えている。
Hereinafter, an image processing apparatus and an imaging apparatus according to an embodiment of the present invention will be described with reference to the drawings.
FIG. 1 is a block diagram illustrating the configuration of the
The
まず、レンズ鏡筒111の構成を説明する。
レンズ鏡筒111は、焦点調整レンズ(以下、「AF(Auto Focus)レンズ」という)112、レンズ駆動部116、AFエンコーダ117、及び鏡筒制御部118を備える。なお、レンズ鏡筒111は、撮像装置100に着脱可能に接続されてもよいし、撮像装置100と一体であってもよい。
First, the configuration of the
The
AFレンズ112は、レンズ駆動部116により駆動され、後述する撮像部110の撮像素子119の受光面(光電変換面)に、光学像を導く。
The AF lens 112 is driven by a
AFエンコーダ117は、AFレンズ112の移動を検出し、AFレンズ112の移動量に応じた信号を、鏡筒制御部118に出力する。ここで、AFレンズ112の移動量に応じた信号とは、例えば、AFレンズ112の移動量に応じて位相が変化するサイン(sin)波信号であってもよい。
The
鏡筒制御部118は、撮像装置100のCPU190から入力される駆動制御信号に応じて、レンズ駆動部116を制御する。ここで、駆動制御信号とは、AFレンズ112を光軸方向に駆動させる制御信号である。鏡筒制御部118は、駆動制御信号に応じて、例えば、レンズ駆動部116に出力するパルス電圧のステップ数を変更する。
The lens
また、鏡筒制御部118は、AFレンズ112の移動量に応じた信号に基づいて、レンズ鏡筒111におけるAFレンズ112の位置(フォーカスポジション)を、CPU190に出力する。ここで、鏡筒制御部118は、例えば、AFレンズ112の移動量に応じた信号を、AFレンズ112の移動方向に応じて積算することで、レンズ鏡筒111におけるAFレンズ112の移動量(位置)を算出してもよい。
Further, the lens
レンズ駆動部116は、鏡筒制御部118の制御に応じてAFレンズ112を駆動し、AFレンズ112をレンズ鏡筒111内で光軸方向に移動させる。
The
次に、撮像装置100の構成を説明する。
撮像装置100は、撮像部110、画像処理部140、表示部150、バッファメモリ部130、操作部180、記憶部160、CPU190、通信部170及びバス300を備えている。
Next, the configuration of the
The
撮像部110は、撮像素子119と、A/D(Analog/Digital)変換部120とを備える。撮像部110は、設定された撮像条件(例えば絞り値、露出値等)に従って、CPU190により制御される。
The
撮像素子119は、光電変換面を備え、レンズ鏡筒111(光学系)により光電変換面に結像された光学像を電気信号に変換して、A/D変換部120に出力する。撮像素子119は、例えば、CMOS(Complementary Metal Oxide Semiconductor)で構成されていてもよい。また、撮像素子119は、光電変換面の一部の領域について、光学像を電気信号に変換するようにしてもよい(画像切り出し)。
The
また、撮像素子119は、操作部180を介してユーザからの撮影指示を受け付けた際に得られる画像を、A/D変換部120を介して記憶媒体200に記憶させる。一方、撮像素子119は、操作部180を介してユーザからの撮影指示を受け付けていない状態において、連続的に得られる画像をスルー画像として、バッファメモリ部130及び表示部150に、A/D変換部120を介して出力する。
Further, the
A/D変換部120は、撮像素子119によって変換された電気信号をデジタル化して、デジタル信号である画像をバッファメモリ部130に出力する。
The A /
操作部180は、例えば、電源スイッチ、シャッタボタン、マルチセレクタ(十字キー)、又はその他の操作キーを備え、ユーザによって操作されることでユーザの操作入力を受け付け、操作入力に応じた信号をCPU190に出力する。
The
画像処理部140(画像処理装置1)は、記憶部160に記憶されている画像処理条件に基づいて、バッファメモリ部130に一時的に記憶されている画像を画像処理する。そして、画像処理された画像は、通信部170を介して記憶媒体200に記憶される。
なお、画像処理部140は、画像処理装置1に対応する。
The image processing unit 140 (image processing apparatus 1) performs image processing on the image temporarily stored in the
Note that the
画像処理部140(画像処理装置1)は、バッファメモリ部130に一時的に記憶されている画像から、画像の特徴の特徴量毎に定まる画像領域(マスク)と、後述する「画像領域の情報(ラベル属性)」とを検出する。そして、画像処理部140は、画像の特徴の特徴量毎に定まる画像領域と、領域の情報とを対応付けて、記憶部160及び記憶媒体200に記憶させる。
The image processing unit 140 (the image processing apparatus 1) includes an image region (mask) determined for each feature amount of the image feature from the image temporarily stored in the
ここで、画像領域の情報(ラベル属性)とは、例えば、画像における領域の分布(位置、形状(慣性モーメント))、面積、数、被写体距離(デフォーカス量)、動きベクトル(差分データ)、色相、彩度、明度、テクスチャ(模様)、輝度(Y)、色差(Cb、Cr)、エッジ、AFコントラスト評価値、設定したフラグ、設定したラベル(識別子)、算出した評点、又は設定した優先度などである。画像領域の情報には、これらを組み合わせて使用してもよいし、単独で使用してもよい。また、評点とは、ラベリングした画像領域同士を比較するための点数(評価点)である。 Here, the information (label attribute) of the image area includes, for example, the distribution (position, shape (moment of inertia)), area, number, subject distance (defocus amount), motion vector (difference data) in the image, Hue, saturation, brightness, texture (pattern), brightness (Y), color difference (Cb, Cr), edge, AF contrast evaluation value, set flag, set label (identifier), calculated score, or set priority Degree. These may be used in combination for the image area information, or may be used alone. The score is a score (evaluation score) for comparing the labeled image areas.
また、画像処理部140は、画像領域(マスク)を被写体候補の画像領域として、被写体候補の画像領域のうちから、被写体の画像領域を抽出する。
ここで、被写体の画像領域とは、撮像された画像から人が注目する画像領域のことである。画像処理部140の詳細な構成は、後述する。
また、画像処理部140は、例えば、抽出した被写体の画像領域に基づいて、AF用の矩形領域を生成する。
Further, the
Here, the image area of the subject is an image area that a person pays attention to from the captured image. The detailed configuration of the
Further, the
表示部150は、例えば液晶ディスプレイであって、撮像部110によって得られた画像、及び操作画面等を表示する。
バッファメモリ部130は、撮像部110によって撮像された画像を、一時的に記憶する。
The
The
記憶部160は、撮像の際にCPU190によって参照される各種判定条件や、設定された各種撮像条件、画像領域の情報などを記憶する。
The
CPU190は、設定された撮像条件(例えば絞り値、露出値等)に従って撮像部110を制御する。また、CPU190は、画像領域の情報を、記憶部160又は記憶媒体200から取得する。
The
そして、CPU190は、画像領域の情報に基づいて、プレ処理又はポスト処理として、焦点調整(AF)の設定、露出調整(AE)の設定、ホワイトバランス調整(AWB)の設定、被写体像(オブジェクト)の追尾の設定、夜景か否かの判定の設定、色補正処理の設定、被写体像の拡大表示の設定、パンニング表示の設定、ズーム倍率に連動した明るさの最適化の設定、などを制御する。
Then, based on the image area information, the
また、CPU190は、操作部180から入力された「操作入力に応じた信号」に基づいて、静止画又は動画として、画像処理部140に画像を画像処理させる。
Further, the
通信部170は、カードメモリ等の取り外しが可能な記憶媒体200と接続され、この記憶媒体200への情報(画像データ、領域の情報など)の書込み、読み出し、あるいは消去を行う。
The
記憶媒体200は、撮像装置100に対して着脱可能に接続される記憶部であって、情報(画像データ、領域の情報など)を記憶する。なお、記憶媒体200は、撮像装置100と一体であってもよい。
バス300は、撮像部110と、レンズ鏡筒111の鏡筒制御部118と、画像処理部140と、表示部150と、バッファメモリ部130と、操作部180と、記憶部160と、CPU190と、通信部170とに接続され、各部から出力されたデータ等を転送する。
The
The
次に、画像処理部140の詳細について説明する。
画像処理部140は、特徴量算出部10と、領域検出部15と、被写体判定部20とを備えている。
Next, details of the
The
特徴量算出部10は、撮像された画像の特徴を算出する。すなわち、特徴量算出部10は、入力された画像の特徴毎に、特徴の特徴量を算出する。具体的に、特徴量算出部10は、撮像部110が撮像した画像を、バッファメモリ部130から取得する。特徴量算出部10は、バッファメモリ部130から取得した画像における複数の特徴(例えば、輝度(Y)、色差(Cb、Cr)等)毎に、その特徴量を算出する。
The feature
領域検出部15(抽出部)は、撮像された画像の特徴に基づいて、画像に含まれる画像領域を被写体候補の画像領域(第1画像領域)として検出(抽出)する。すなわち、領域検出部15は、取得した画像に含まれる領域であって特徴量毎に定まる画像領域を、被写体候補の画像領域として画像から検出する。つまり、領域検出部15は、特徴量算出部10により算出された特徴量毎に定まる被写体候補の画像領域を抽出する。ここで、領域検出部15が検出する領域は、例えば、撮像部110が撮像した画像に含まれる被写体候補の画像領域である。
The area detection unit 15 (extraction unit) detects (extracts) an image area included in the image as an image area (first image area) of a subject candidate based on the characteristics of the captured image. That is, the
領域検出部15は、特徴量毎に検出した被写体候補の画像領域を識別するラベル(識別子)を設定する(ラベリング処理)。ここで、ラベルとは、特徴量が互いに近い画素により構成された画像領域であって、グループ化された画像領域(集合)である。また、ラベリングとは、特徴量が互いに近い(例えば、彩度h=0〜20度に該当する)画素に隣接する画像領域を、順次検出してグループ化することである。
領域検出部15は、画像領域を識別するラベルを、画像領域の情報として、画像領域毎に記憶部160及び記憶媒体200に記憶させる。
The
The
被写体判定部20(判定部)は、領域検出部15によって検出された被写体候補の画像領域のうちから、被写体の画像領域(第2画像領域)を抽出(判定)する。すなわち、被写体判定部20は、後述する背景画像領域の除外処理及び枠縁画像領域の除外処理などによって、被写体候補の画像領域のうちから被写体の可能性が低い画像領域を除外し、被写体候補の画像領域を数個(例えば、5個以下)に絞り込む。
The subject determination unit 20 (determination unit) extracts (determines) the subject image region (second image region) from the subject candidate image regions detected by the
被写体判定部20は、異なる特徴(例えば、輝度(Y)と色差(Cb、Cr))の特徴量毎に基づいてラベリングした画像領域同士を比較するための評点を、画像領域毎(ラベル毎)に算出する。そして、被写体判定部20は、算出した評点に基づいて、画像における「画像領域の優先度」を設定する。この「画像領域の優先度」とは、人がより注目しているであろう画像領域を示す被写体の画像領域の優先度である。すなわち、被写体判定部20は、設定した「画像領域の優先度」に基づいて、被写体の画像領域を抽出(判定)する。なお、被写体判定部20は、設定した「画像領域の優先度」を、画像領域の情報として、画像領域毎に記憶部160及び記憶媒体200に記憶させる。
The
また、被写体判定部20は、背景除外部21と、枠縁除外部22とを備えている。
背景除外部21は、被写体候補の画像領域うちの画像領域それぞれと、画像の撮像範囲内の予め定められた抽出範囲を示す抽出枠(抽出領域)との位置関係に応じて、画像領域それぞれが背景の画像領域を示す背景画像領域であるか否かを判定する。すなわち、被写体判定部20は、領域検出部15により抽出された被写体候補の画像領域と、入力された画像内の予め定められた抽出範囲を示す抽出枠との位置関係に応じて、被写体候補の画像領域から抽出される被写体の画像領域を抽出するか否かを判定する。背景除外部21は、画像領域が背景画像領域であると判定した場合に、判定した背景画像領域を、被写体候補の画像領域のうちから除外する(背景画像領域の除外処理)。すなわち、背景画像領域は、被写体の画像領域になる可能性が低いため、被写体判定部20は、判定した背景画像領域を被写体候補の画像領域のうちから除外する。
なお、抽出枠は、例えば、撮像範囲(画角)を示す枠である。この抽出枠は、撮像範囲(画角)の内側に任意の大きさで設定してもよい。また、本実施形態において、抽出枠の形状は四角形である一例について説明するが、抽出枠の形状は、多角形であってもよい。
The
The
The extraction frame is, for example, a frame that indicates an imaging range (view angle). This extraction frame may be set to an arbitrary size inside the imaging range (view angle). In the present embodiment, an example in which the shape of the extraction frame is a quadrangle will be described, but the shape of the extraction frame may be a polygon.
背景除外部21は、例えば、以下の3つの条件によって、画像領域が背景画像領域であるか否か(被写体候補の画像領域から抽出される被写体の画像領域を抽出するか否かを)を判定する。
[第1の条件]
背景除外部21は、画像領域が抽出枠の2辺以上に接する場合に、当該画像領域を背景画像領域であると判定する。この場合、背景除外部21は、背景画像領域であると判定した画像領域を、被写体候補の画像領域のうちから除外する。すなわち、背景除外部21は、被写体候補の画像領域が抽出枠(抽出領域)を形成する隣接した2辺(又は2辺以上)に接する場合、当該被写体候補の画像領域を被写体の画像領域として抽出しないと判定する。
For example, the
[First condition]
When the image area touches two or more sides of the extraction frame, the
[第2の条件]
背景除外部21は、画像領域が抽出枠の1辺に接する線幅(又は画像領域の面積)が予め定められた第1閾値以上である場合に、当該画像領域を背景画像領域であると判定する。この場合、背景除外部21は、背景画像領域であると判定した画像領域を、被写体候補の画像領域のうちから除外する。すなわち、背景除外部21は、抽出枠を形成する1辺に接する被写体候補の画像領域の面積(又は線幅)が予め定められた第1閾値以上である場合、当該被写体候補の画像領域を被写体の画像領域として抽出しないと判定する。なお、この場合、画像領域が抽出枠の1辺に接する割合(例えば、面積の割合、線幅の割合など)が予め定められた第1閾値以上である形態でもよい。
[Second condition]
The
[第3の条件]
背景除外部21は、画像領域が抽出枠の2辺に接し、且つ、画像領域が抽出枠の対向する2辺に接する場合に、当該画像領域を背景画像領域でないと判定する。この場合、背景除外部21は、当該画像領域を被写体候補の画像領域のうちに残し、被写体候補の画像領域のうちから除外しない。すなわち、背景除外部21は、被写体候補の画像領域が抽出枠を形成する対向した2辺に接する場合、当該被写体候補の画像領域を被写体の画像領域として抽出すると判定する。
[Third condition]
The
なお、本実施形態では、画像処理装置1は、背景除外部21による処理を実行した後に、枠縁除外部22による処理を実行する一例について説明する。そのため、背景除外部21によって抽出された被写体の画像領域(第2画像領域)は、枠縁除外部22における処理において、被写体候補の画像領域として説明する。さらに、本実施形態では、枠縁除外部22が被写体候補の画像領域(第2画像領域)から被写体の画像領域(第3画像領域又は第4画像領域)を抽出する一例について説明する。
In the present embodiment, an example in which the
枠縁除外部22は、被写体候補の画像領域(第2画像領域)うちの画像領域それぞれと、抽出枠(抽出領域)の内側の範囲であって、撮像範囲における中心部分の範囲を示す予め定められた中央枠(中央領域)との位置関係に応じて、画像領域それぞれを枠縁画像領域であるか否かを判定する。すなわち、枠縁除外部22は、被写体候補の画像領域と、抽出枠の内側の範囲であって、入力された画像の中央部分の範囲を示す中央枠との位置関係に応じて、被写体候補の画像領域から抽出される被写体の画像領域(第3画像領域)を抽出するか否かを判定する。
The frame
枠縁除外部22は、画像領域を枠縁画像領域であると判定した場合、判定した枠縁画像領域を、被写体候補の画像領域のうちから除外する(枠縁画像領域の除外処理)。ここで、枠縁画像領域とは、撮像された画像における枠形状の画像領域を示し、例えば、窓枠や窓桟等、それに類する枠的な物体による画像領域である。すなわち、枠縁画像領域は、被写体の画像領域になる可能性が低いため、枠縁除外部22は、判定した枠縁画像領域を被写体候補の画像領域のうちから除外する。
When it is determined that the image area is a frame edge image area, the frame
枠縁除外部22は、例えば、以下の4つの条件によって、画像領域が枠縁画像領域であるか否かを判定する。
[条件A]
枠縁除外部22は、画像領域のアスペクト比が予め定められた第2閾値以上であり、且つ、画像領域が中央枠外にある場合に、当該画像領域を枠縁画像領域であると判定する。この場合、枠縁除外部22は、枠縁画像領域であると判定した画像領域を、被写体候補の画像領域のうちから除外する。すなわち、枠縁除外部22は、被写体候補の画像領域のアスペクト比が予め定められた第2閾値以上であり、且つ、被写体候補の画像領域が中央枠の範囲外にある場合、当該被写体候補の画像領域を被写体の画像領域(第3画像領域)として抽出しないと判定する。
なお、画像領域のアスペクト比とは、画像領域の長辺長と短辺長との比であり、(長辺長/短辺長)に対応する。
For example, the frame
[Condition A]
The frame
The aspect ratio of the image area is the ratio of the long side length to the short side length of the image area and corresponds to (long side length / short side length).
次の[条件B]から[条件D]において、中央枠には、第1の中央枠(図7の中央枠B参照)と、第1の中央枠より内側の範囲を示す第2の中央枠(図7の中央枠A参照)とが含まれる。枠縁除外部22は、被写体候補の画像領域と、第1の中央枠(第1中央領域)と、第2の中央枠(第2中央領域)との位置関係に応じて、被写体候補の画像領域から抽出される被写体の画像領域(第4画像領域)を抽出するか否かを判定する。ここで、第1の中央枠(中央枠B)は、抽出枠の内側の範囲であって、入力された画像の中央部分の範囲を示す。また、第2の中央枠(中央枠A)は、第1の中央枠の内側の範囲であって、第1の中央枠の中央部分の範囲を示す。
In the following [Condition B] to [Condition D], the central frame includes a first central frame (see the central frame B in FIG. 7) and a second central frame indicating a range inside the first central frame. (Refer to the center frame A in FIG. 7). The frame
[条件B]
枠縁除外部22は、画像領域のアスペクト比が予め定められた第2閾値以上であり、且つ、画像領域が第1の中央枠内及び第2の中央枠内にある場合に、当該画像領域を枠縁画像領域でないと判定する。この場合、枠縁除外部22は、当該画像領域を被写体候補の画像領域のうちに残し、被写体候補の画像領域のうちから除外しない。すなわち、枠縁除外部22は、被写体候補の画像領域のアスペクト比が予め定められた第2閾値以上であり、且つ、被写体候補の画像領域が第1の中央枠(中央枠B)の内側の範囲及び第2の中央枠(中央枠A)の内側の範囲にある場合、当該被写体候補の画像領域を被写体の画像領域(第4画像領域)として抽出すると判定する。
[Condition B]
The frame
[条件C]
枠縁除外部22は、画像領域のアスペクト比が予め定められた第2閾値以上であり、且つ、画像領域が第1の中央枠内であり、且つ、画像領域が第2の中央枠内にない場合であって、さらに、第2の中央枠内に他の画像領域がある場合に、当該画像領域を枠縁画像領域であると判定する。この場合、枠縁除外部22は、枠縁画像領域であると判定した画像領域を、被写体候補の画像領域のうちから除外する。すなわち、枠縁除外部22は、被写体候補の画像領域のアスペクト比が予め定められた第2閾値以上であり、且つ、被写体候補の画像領域が第1の中央枠(中央枠B)の内側の範囲及び第2の中央枠(中央枠A)の外側の範囲にある場合であって、さらに、第2の中央枠(中央枠A)に他の被写体候補の画像領域がある場合、当該被写体候補の画像領域を被写体の画像領域(第4画像領域)として抽出しないと判定する。
[Condition C]
The frame
[条件D]
枠縁除外部22は、画像領域のアスペクト比が予め定められた第2閾値以上であり、且つ、画像領域が第1の中央枠内であり、且つ、画像領域が第2の中央枠内にない場合であって、さらに、第2の中央枠内に他の画像領域がない場合に、当該画像領域を枠縁画像領域でないと判定する。この場合、枠縁除外部22は、当該画像領域を被写体候補の画像領域のうちに残し、被写体候補の画像領域のうちから除外しない。すなわち、枠縁除外部22は、被写体候補の画像領域のアスペクト比が予め定められた第2閾値以上であり、且つ、被写体候補の画像領域が第1の中央枠(中央枠B)の内側の範囲及び第2の中央枠(中央枠A)の外側の範囲にある場合であって、さらに、被写体候補の画像領域に他の被写体候補の画像領域がない場合、当該被写体候補の画像領域を被写体の画像領域(第4画像領域)として抽出すると判定する。
[Condition D]
The frame
次に、画像処理部140(画像処理装置1)における画像処理を説明する。
図2は、本実施形態における画像処理部140(画像処理装置1)における画像処理の一例を示すフローチャートである。
なお、本実施形態では、輝度(Y)、色差(Cb、Cr)を特徴量として、画像領域を検出する例について説明する。
Next, image processing in the image processing unit 140 (image processing apparatus 1) will be described.
FIG. 2 is a flowchart illustrating an example of image processing in the image processing unit 140 (image processing apparatus 1) according to the present embodiment.
In the present embodiment, an example in which an image region is detected using luminance (Y) and color differences (Cb, Cr) as feature amounts will be described.
まず、画像処理部140は、スルー画像を取得する(ステップS101)。すなわち、CPU190は、撮像部110を介して撮像した画像をスルー画像として、バッファメモリ部130に記憶させる。画像処理部140は、このバッファメモリ部130に記憶されているスルー画像を取得する。ここで、画像処理部140は、時間的に連続するスルー画像(スルー画列)を取得してもよい。
First, the
次に、画像処理部140は、基本的な画像処理をスルー画像に実行する(ステップS102)。ここで、基本的な画像処理とは、例えば、簡易的な露出調整(簡易AE)、ホワイトバランス調整(AWB)、ノイズリダクション(NR)である。
Next, the
次に、画像処理部140は、リサイズYUV(ワイユーブイ)処理を実行する(ステップS103)。すなわち、画像処理部140は、基本的な画像処理を実行した画像を、被写体の画像領域を抽出するのに適した画像サイズ及びYUV形式の画像に変換する。
Next, the
次に、画像処理部140は、9個のYUV空間で2値画像を生成する(ステップS104)。すなわち、画像処理部140の領域検出部15は、Y画像(輝度画像)を階調方向に3分割し、2値画像を生成する。なお、3分割とは、例えば、(M−σ)未満の範囲、(M−σ)から(M+σ)までの範囲、及び(M+σ)から(M+1.6σ)までの範囲である。ここで、Mは輝度分布の平均値に対応し、σは標準偏差に対応する。画像処理部140は、Y画像(輝度画像)と同様に、Cr画像(色差画像)、及びCb画像(色差画像)を階調方向に3分割し、2値画像を生成する。これにより、9個のYUV空間で2値画像が生成される。
Next, the
次に、画像処理部140は、ラベリングして画像領域を作成する(ステップS105)。すなわち、特徴量算出部10は、2値画像における特徴(例えば、輝度(Y)、色差(Cb、Cr)等)毎に、その特徴量を算出する。領域検出部15は、特徴量毎に検出した被写体候補の画像領域を識別するラベル(識別子)を設定するラベリング処理を実行し、画像領域を被写体候補の画像領域として検出する。
Next, the
次に、画像処理部140は、ノイズ画像領域を被写体候補の画像領域のうちから除外する(ステップS106)。すなわち、画像処理部140の被写体判定部20は、被写体候補の画像領域のうちで、孤立した画像領域(ノイズ)を被写体候補の画像領域のうちから除外する。
Next, the
次に、画像処理部140は、背景画像領域の除外処理を実行する(ステップS107)。すなわち、被写体判定部20の背景除外部21は、被写体候補の画像領域うちの画像領域それぞれと、画像の撮像範囲内の予め定められた抽出範囲を示す抽出枠との位置関係に応じて、画像領域が背景画像領域であるか否かを判定する。具体的には、背景除外部21は、上述した第1の条件から第3の条件に基づいて、画像領域が背景画像領域であるか否かを判定する。すなわち、背景除外部21は、上述した第1の条件から第3の条件に基づいて、被写体候補の画像領域から抽出される被写体の画像領域を抽出するか否かを判定する。背景除外部21は、画像領域が背景画像領域であると判定した場合に、判定した背景画像領域を、被写体候補の画像領域のうちから除外する。
Next, the
ここで、背景除外部21が上述した第1の条件から第3の条件による画像領域が背景画像領域であるか否かを判定する具体例について説明する。
図3は、第1の条件及び第2の条件による背景除外部21の処理の一例を示すイメージ図である。
この図において、画像は、横辺幅a×縦辺幅bの範囲を抽出枠G1とする画像である。図3(a)に示すように、抽出枠G1には、領域検出部15によって、画像領域M1からM5の5つの画像領域(被写体候補の画像領域)が検出されている。
Here, a specific example in which the
FIG. 3 is an image diagram showing an example of processing of the
In this figure, the image is an image having an extraction frame G1 in a range of horizontal side width a × vertical side width b. As shown in FIG. 3A, in the extraction frame G1, the
例えば、画像領域M4が抽出枠G1の2辺に接しているため、背景除外部21は、上述した第1の条件に基づいて、画像領域M4を背景画像領域であると判定する。この場合、背景除外部21は、背景画像領域であると判定した画像領域を、被写体候補の画像領域のうちから除外する。
For example, since the image region M4 is in contact with the two sides of the extraction frame G1, the
また、例えば、画像領域M5が抽出枠G1の1辺に接する線幅dが1辺に対して一定の割合以上(例えば、(線幅d/縦辺幅b)が予め定めた閾値K以上)であるため、上述した第2の条件に基づいて、背景除外部21は、当該画像領域を背景画像領域であると判定する。すなわち、背景除外部21は、像領域M5が抽出枠G1の1辺に接する線幅dが予め定められた第1閾値K1(閾値K×縦線幅b)以上である場合に、背景除外部21は、当該画像領域を背景画像領域であると判定する。この場合、背景除外部21は、背景画像領域であると判定した画像領域を、被写体候補の画像領域のうちから除外する。
Further, for example, the line width d in which the image region M5 is in contact with one side of the extraction frame G1 is a certain ratio or more with respect to one side (for example, (line width d / vertical side width b) is equal to or greater than a predetermined threshold K). Therefore, based on the second condition described above, the
これにより、背景画像領域(M4、M5)が被写体候補の画像領域から除外され、図3(b)に示すように、画像領域(M1、M2、M3)が、背景除外部21によって、被写体候補の画像領域として残される。
As a result, the background image areas (M4, M5) are excluded from the subject candidate image areas, and as shown in FIG. 3B, the image areas (M1, M2, M3) are subject candidates by the
また、図4は、第3の条件による背景除外部21の処理の一例を示すイメージ図である。
例えば、図4(a)に示される画像領域M6は、抽出枠G1の対向する2辺(左右の縦辺)に接する。そのため、背景除外部21は、上述した第3の条件に基づいて、画像領域M6を背景画像領域でないと判定する。この場合、背景除外部21は、画像領域M6を被写体候補の画像領域のうちに残し、被写体候補の画像領域のうちから除外しない。
FIG. 4 is an image diagram showing an example of processing of the
For example, the image region M6 shown in FIG. 4A is in contact with two opposite sides (left and right vertical sides) of the extraction frame G1. Therefore, the
また、例えば、図4(b)に示される画像領域M7は、抽出枠G1の対向する2辺(上下の横辺)に接する。そのため、背景除外部21は、上述した第3の条件に基づいて、画像領域M7を背景画像領域でないと判定する。この場合、背景除外部21は、画像領域M7を被写体候補の画像領域のうちに残し、被写体候補の画像領域のうちから除外しない。
このように、ステップS107において、背景除外部21は、背景画像領域(例えば、画像領域(M4、M5))の除外処理を実行する。
For example, the image region M7 shown in FIG. 4B is in contact with two opposing sides (upper and lower horizontal sides) of the extraction frame G1. Therefore, the
As described above, in step S107, the
次に、画像処理部140は、枠縁画像領域の除外処理を実行する(ステップS108)。すなわち、被写体判定部20の枠縁除外部22は、被写体候補の画像領域うちの画像領域それぞれと、抽出枠G1の内側の範囲である上述した中央枠との位置関係に応じて、画像領域それぞれを枠縁画像領域であるか否かを判定する。具体的には、枠縁除外部22は、上述した条件Aから条件Dに基づいて、画像領域が枠縁画像領域であるか否かを判定する。すなわち、枠縁除外部22は、上述した条件Aから条件Dに基づいて、被写体候補の画像領域から抽出される被写体の画像領域を抽出するか否かを判定する。枠縁除外部22は、画像領域が枠縁画像領域であると判定した場合に、判定した枠縁画像領域を、被写体候補の画像領域のうちから除外する。
なお、この被写体判定部20の枠縁除外部22による枠縁画像領域の除外処理の詳細については、図5から図9を参照して後述する。
Next, the
The details of the frame edge image region exclusion process performed by the frame
次に、画像処理部140は、画像領域(被写体候補の画像領域)を優先度付けする(ステップS109)。すなわち、被写体判定部20は、異なる特徴(例えば、輝度(Y)と色差(Cb、Cr))の特徴量毎に基づいてラベリングした画像領域同士を比較するための評点を、画像領域毎(ラベル毎)に算出する。そして、被写体判定部20は、算出した評点に基づいて、画像における「画像領域の優先度」を設定し、「画像領域の優先度」に基づいて、優先度の高い画像領域を被写体の画像領域として抽出する。
Next, the
次に、画像処理部140は、AF用の矩形領域を生成する(ステップS110)。すなわち、画像処理部140は、被写体判定部20によって、「画像領域の優先度」に基づいて抽出された被写体の画像領域(例えば、5個以下)に対して、AF用矩形領域を生成する。画像処理部140は、例えば、被写体の画像領域に外接する矩形枠として、AF用矩形領域を生成する。
Next, the
次に、CPU190は、生成されたAF用の矩形領域でコントラストスキャンを実行する(ステップS111)。すなわち、CPU190は、コントラストスキャンを実行し、AFコントラスト評価値がピークを示したレンズ位置を、AF用の矩形領域毎に、記憶部160に記憶させる。
Next, the
次に、CPU190は、至近優先にてAF制御を実行する(ステップS112)。すなわち、CPU190は、記憶部160に記憶されているAFコントラスト評価値がピークを示したレンズ位置に基づいて、設定されたAF用の矩形領域を、至近優先によって合焦するように、AF制御(焦点調整制御)を実行する。
Next, the
次に、撮像装置100が撮像する(ステップS113)。すなわち、CPU190は、操作部180を介してユーザからの撮影指示を受け付けた場合、撮像部110に撮像させる。さらに、画像処理部140は、領域の情報に基づいて、後段処理(画像処理)を実行する(ステップS114)。そして、画像処理部140は、領域の情報を、画像(領域)と対応付けて記憶部160及び記憶媒体200に記憶させる(ステップS115)。
Next, the
次に、枠縁除外部22による枠縁画像領域の除外処理について説明する。
図5は、本実施形態における枠縁除外部22の処理を示すフローチャートである。
また、図6から図9は、枠縁除外部22が上述した条件Aから条件Dによる画像領域が枠縁画像領域であるか否かを判定する具体例を示すイメージ図である。
なお、図5における図2の枠縁除外部22の処理は、ステップS108における処理に対応する。
Next, the frame edge image region exclusion process by the frame
FIG. 5 is a flowchart showing the processing of the frame
FIGS. 6 to 9 are image diagrams showing specific examples in which the frame
Note that the processing of the frame
図5において、まず、枠縁除外部22は、画像領域のアスペクト比(長辺長/短辺長)が第2閾値K2以上か否かを判定する(ステップS201)。すなわち、枠縁除外部22は、画像領域のアスペクト比を算出する。例えば、図6に示される画像領域M8では、アスペクト比は、(長辺長W/短辺長h)である。枠縁除外部22は、算出したアスペクト比(長辺長W/短辺長h)が第2閾値K2以上か否かを判定する。枠縁除外部22は、算出したアスペクト比(長辺長W/短辺長h)が第2閾値K2以上である場合に、処理をステップS202に進め、第2閾値K2未満である場合に、処理をステップS205に進める。
In FIG. 5, first, the frame
次に、ステップS202において、枠縁除外部22は、画像領域が中央枠Bの範囲外か否かを判定する。ここで、中央枠Bは、図6から図9に示すように、撮像範囲における中心部分の範囲を示す抽出枠であり、例えば、図3及び図4と同様の抽出枠G1の1/2の横辺幅及び縦辺幅(抽出枠G1の1/4の面積)を持つ。枠縁除外部22は、画像領域が中央枠Bの範囲外である場合に、処理をステップS206に進め(条件A)、画像領域が中央枠Bの範囲内である場合に、処理をステップS203に進める。
具体的には、図6に示される画像領域M8は、中央枠Bの範囲外であるため、上述した条件Aに基づいて、枠縁除外部22は、処理をステップS206に進める。
Next, in step S <b> 202, the frame
Specifically, since the image region M8 shown in FIG. 6 is outside the range of the central frame B, the frame
次に、ステップS203において、枠縁除外部22は、画像領域が中央枠Aの範囲内か否かを判定する。ここで、中央枠Aは、図7から図9に示すように、中央枠Bより内側の範囲を示し、例えば、図3及び図4と同様の抽出枠G1の1/3の横辺幅及び縦辺幅(抽出枠G1の1/9の面積)を持つ。枠縁除外部22は、画像領域が中央枠Aの範囲内である場合に、処理をステップS205に進め(条件B)、画像領域が中央枠Aの範囲外である場合に、処理をステップS204に進める。
具体的には、図7に示される画像領域M9は、中央枠Aの範囲内であるため、上述した条件Bに基づいて、枠縁除外部22は、処理をステップS205に進める。また、図8及び図9に示される画像領域M10及びM12は、中央枠Aの範囲外であるため、枠縁除外部22は、処理をステップS204に進める。
Next, in step S <b> 203, the frame
Specifically, since the image region M9 shown in FIG. 7 is within the range of the center frame A, the frame
次に、ステップS204において、枠縁除外部22は、画像領域が中央枠A内に他の画像領域があるか否かを判定する。枠縁除外部22は、画像領域が中央枠A内に他の画像領域がある場合に、処理をステップS206に進め(条件C)、画像領域が中央枠A内に他の画像領域がない場合に、処理をステップS205に進める(条件D)。
具体的には、図8に示される画像領域M10は、中央枠A内に他の画像領域M11があるため、上述した条件Cに基づいて、枠縁除外部22は、処理をステップS206に進める。また、図9に示される画像領域M12は、中央枠A内に他の画像領域がない(中央枠A外に画像領域M11がある)ため、枠縁除外部22は、上述した条件Dに基づいて、処理をステップS205に進める。
Next, in step S <b> 204, the frame
Specifically, since the image region M10 shown in FIG. 8 has another image region M11 in the central frame A, the frame
次に、ステップS205において、枠縁除外部22は、画像領域(M9、M12)を枠縁画像領域でないと判定する。この場合、枠縁除外部22は、画像領域(M9、M12)を被写体候補の画像領域のうちに残し、被写体候補の画像領域のうちから除外しない。
すなわち、画像領域M9は、条件Bにより、枠縁画像領域でないと判定され、被写体候補の画像領域として残される。また、画像領域M12は、条件Dにより、枠縁画像領域でないと判定され、被写体候補の画像領域として残される。
Next, in step S205, the frame
That is, the image area M9 is determined not to be a frame edge image area according to the condition B, and is left as an image area of a subject candidate. The image area M12 is determined not to be a frame edge image area according to the condition D, and is left as an image area of a subject candidate.
次に、ステップS206において、枠縁除外部22は、画像領域(M8、M10)を枠縁画像領域であると判定する。この場合、枠縁除外部22は、枠縁画像領域であると判定した画像領域M8、M10)を、被写体候補の画像領域のうちから除外する。
すなわち、画像領域M8は、条件Aにより、枠縁画像領域であると判定され、被写体候補の画像領域のうちから除外される。また、画像領域M10は、条件Cにより、枠縁画像領域であると判定され、被写体候補の画像領域のうちから除外される。
Next, in step S206, the frame
That is, the image area M8 is determined to be a frame edge image area according to the condition A, and is excluded from the subject candidate image areas. The image area M10 is determined to be a frame edge image area according to the condition C, and is excluded from the subject candidate image areas.
このように、図2のステップS108において、枠縁除外部22は、枠縁画像領域(例えば、画像領域(M8、M10))の除外処理を実行する。
As described above, in step S108 in FIG. 2, the frame
図10は、本実施形態における画像処理部140(画像処理装置1)による被写体抽出結果の一例を示すイメージ図である。
この図において、画像処理部140は、例えば、画像領域(M14、M15)を被写体の画像領域として抽出する。また、画像処理部140は、画像領域(M14、M15)に基づいて、AF用の矩形領域(AF1、AF2)を生成する。
なお、例えば、画像処理部140の背景除外部21は、画像領域(M17、M18)を上述した第1の条件によって、背景画像領域と判定し、被写体候補の画像領域から除外する。また、例えば、画像処理部140の枠縁除外部22は、画像領域M16を上述した条件Cによって、枠縁画像領域と判定し、被写体候補の画像領域から除外する。
FIG. 10 is an image diagram illustrating an example of a subject extraction result by the image processing unit 140 (image processing apparatus 1) in the present embodiment.
In this figure, the
For example, the
以上のように、本実施形態における画像処理装置1は、領域検出部15が、撮像された画像の特徴に基づいて、画像に含まれる画像領域を被写体候補の画像領域として検出する。被写体判定部20が、領域検出部15によって検出された被写体候補の画像領域のうちから、被写体の画像領域を抽出する。また、被写体判定部20(背景除外部21)は、被写体候補の画像領域うちの画像領域それぞれと抽出枠G1との位置関係に応じて、画像領域それぞれが背景画像領域であるか否かを判定する。そして、背景除外部21は、判定した背景画像領域を、被写体候補の画像領域のうちから除外する。すなわち、本実施形態における画像処理装置1は、特徴量算出部10が、入力された画像の特徴毎に、特徴の特徴量を算出する。領域検出部15が、特徴量算出部10により算出された特徴量毎に定まる被写体候補の画像領域を抽出する。被写体判定部20(背景除外部21)は、領域検出部15により抽出された被写体候補の画像領域と入力された画像内の予め定められた抽出範囲を示す抽出枠との位置関係に応じて、被写体候補の画像領域から抽出される被写体の画像領域を抽出するか否かを判定する。
これにより、被写体判定部20は、被写体候補の画像領域から、被写体となる可能性の低い画像領域(背景画像領域)を除外することができる。そのため、本実施形態における画像処理装置1は、撮像された画像から被写体の画像領域を適切に抽出することができる。
As described above, in the
Accordingly, the
また、本実施形態において、被写体判定部20は、異なる特徴の特徴量毎に基づいてラベリングした画像領域同士を比較するための評点を、画像領域毎(ラベル毎)に算出する。そして、被写体判定部20は、算出した評点に基づいて、画像における「画像領域の優先度」を設定し、「画像領域の優先度」に基づいて、優先度の高い画像領域を被写体の画像領域として抽出する。
これにより、本実施形態における画像処理装置1は、撮像された画像から被写体の画像領域を適切に抽出することができる。
In the present embodiment, the
Thereby, the
また、背景除外部21及び枠縁除外部22によって、被写体候補の画像領域を絞り込んだ後に、上述の「画像領域の優先度」に基づいて、優先度の高い画像領域を被写体の画像領域として抽出する。
これにより、処理量の多い比較するための評点の算出量を低減することができる。そのため、被写体判定部20の処理量を低減することができる。
Further, after narrowing down the image areas of the subject candidates by the
Thereby, the calculation amount of the score for comparison with a large amount of processing can be reduced. Therefore, the processing amount of the
また、本実施形態において、背景除外部21は、画像領域が抽出枠G1の2辺以上に接する場合に、当該画像領域を背景画像領域であると判定する。すなわち、被写体判定部20(背景除外部21)は、被写体候補の画像領域が抽出枠G1を形成する隣接した2辺(又は2辺以上)に接する場合、当該被写体候補の画像領域を被写体の画像領域として抽出しないと判定する。
これにより、背景除外部21は、被写体となる可能性の低い背景画像領域を精度良く判定することができ、被写体候補の画像領域から背景画像領域を除外する。そのため、本実施形態における画像処理装置1は、撮像された画像から被写体の画像領域を適切に抽出することができる。
In the present embodiment, the
As a result, the
また、本実施形態において、背景除外部21は、画像領域が抽出枠G1の2辺に接し、且つ画像領域が抽出枠G1の対向する2辺に接する場合に、当該画像領域を被写体候補の画像領域として残す。すなわち、被写体判定部20(背景除外部21)は、被写体候補の画像領域が抽出枠を形成する対向した2辺に接する場合、当該被写体候補の画像領域を被写体の画像領域として抽出すると判定する。
これにより、背景除外部21は、被写体となる可能性の高い画像領域を予め判定し、被写体候補の画像領域として残すことができる。そのため、本実施形態における画像処理出装置1は、撮像された画像から被写体の画像領域を適切に抽出することができる。
In the present embodiment, the
As a result, the
また、本実施形態において、背景除外部21は、画像領域が抽出枠G1の1辺に接する線幅が予め定められた第1閾値K1(閾値K×縦線幅b)以上である場合に、当該画像領域を背景画像領域であると判定する。すなわち、被写体判定部20(背景除外部21)は、抽出枠G1を形成する1辺に接する被写体候補の画像領域の面積(又は線幅)が予め定められた第1閾値以上である場合、当該被写体候補の画像領域を被写体の画像領域として抽出しないと判定する。
これにより、背景除外部21は、被写体となる可能性の低い背景画像領域を精度良く判定することができ、被写体候補の画像領域から背景画像領域を除外する。そのため、本実施形態における画像処理装置1は、撮像された画像から被写体の画像領域を適切に抽出することができる。
In the present embodiment, the
As a result, the
また、本実施形態において、被写体判定部20の枠縁除外部22は、被写体候補の画像領域うちの画像領域それぞれと、撮像範囲における中心部分の範囲を示す予め定められた中央枠B(又は中央枠A)との位置関係に応じて、枠縁画像領域であるか否かを判定する。そして、枠縁除外部22は、判定した枠縁画像領域を、被写体候補の画像領域のうちから除外する。すなわち、被写体判定部20(枠縁除外部22)は、被写体候補の画像領域と、抽出枠の内側の範囲であって、入力された画像の中央部分の範囲を示す中央枠B(又は中央枠A)との位置関係に応じて、被写体候補の画像領域から抽出される被写体の画像領域(第3画像領域)を抽出するか否かを判定する。
これにより、被写体判定部20は、被写体候補の画像領域から、被写体となる可能性の低い枠縁画像領域(例えば、窓枠や窓桟等、それに類する枠的な物体による画像領域)を除外することができる。そのため、本実施形態における画像処理装置1は、撮像された画像から被写体の画像領域を適切に抽出することができる。
In the present embodiment, the frame
Thereby, the
また、本実施形態において、枠縁除外部22は、画像領域のアスペクト比が予め定められた第2閾値K2以上であり、且つ、画像領域が中央枠B外にある場合に、当該画像領域を枠縁画像領域であると判定する。すなわち、被写体判定部20(枠縁除外部22)は、被写体候補の画像領域のアスペクト比が予め定められた第2閾値K2以上であり、且つ、被写体候補の画像領域が中央枠Bの範囲外にある場合、当該被写体候補の画像領域を被写体の画像領域として抽出しないと判定する。
これにより、枠縁除外部22は、被写体となる可能性の低い枠縁画像領域を精度良く判定することができ、被写体候補の画像領域から枠縁画像領域を除外する。そのため、本実施形態における画像処理装置1は、撮像された画像から被写体の画像領域を適切に抽出することができる。
Further, in the present embodiment, the frame
Thereby, the frame
また、本実施形態において、被写体判定部20(枠縁除外部22)は、被写体候補の画像領域と、中央枠B(第1中央領域)と、中央枠A(第2中央領域)との位置関係に応じて、被写体候補の画像領域から抽出される被写体の画像領域を抽出するか否かを判定する。ここで、中央枠Bは、抽出枠の内側の範囲であって、入力された画像の中央部分の範囲を示す。また、中央枠Aは、第1の中央枠の内側の範囲であって、第1の中央枠の中央部分の範囲を示す。
これにより、被写体判定部20は、被写体候補の画像領域から、被写体となる可能性の低い枠縁画像領域(例えば、窓枠や窓桟等、それに類する枠的な物体による画像領域)を除外することができる。そのため、本実施形態における画像処理装置1は、撮像された画像から被写体の画像領域を適切に抽出することができる。
In the present embodiment, the subject determination unit 20 (frame edge exclusion unit 22) positions the subject candidate image region, the center frame B (first center region), and the center frame A (second center region). It is determined whether or not to extract the subject image area extracted from the subject candidate image area according to the relationship. Here, the center frame B is a range inside the extraction frame and indicates the range of the center portion of the input image. The center frame A is a range inside the first center frame and indicates a range of the center portion of the first center frame.
Thereby, the
また、本実施形態において、中央枠には、中央枠B(第1の中央枠)と、中央枠Bより内側の範囲を示す中央枠A(第2の中央枠)とが含まれる。そして、枠縁除外部22は、画像領域のアスペクト比が予め定められた第2閾値K2以上であり、且つ、画像領域が中央枠B内及び中央枠A内にある場合に、当該画像領域を被写体候補の画像領域として残す。すなわち、被写体判定部20(枠縁除外部22)は、被写体候補の画像領域のアスペクト比が予め定められた第2閾値K2以上であり、且つ、被写体候補の画像領域が中央枠Bの内側の範囲及び中央枠Aの内側の範囲にある場合、当該被写体候補の画像領域を被写体の画像領域として抽出すると判定する。
これにより、枠縁除外部22は、被写体となる可能性の高い画像領域を予め判定し、被写体候補の画像領域として残すことができる。そのため、本実施形態における画像処理装置1は、撮像された画像から被写体の画像領域を適切に抽出することができる。
In the present embodiment, the central frame includes a central frame B (first central frame) and a central frame A (second central frame) indicating a range inside the central frame B. The frame
As a result, the frame
また、本実施形態において、枠縁除外部22は、画像領域のアスペクト比が予め定められた第2閾値K2以上であり、且つ、画像領域が中央枠B内であり、且つ、画像領域が中央枠A内にない場合であって、さらに、中央枠A内に他の画像領域がある場合に、当該画像領域を枠縁画像領域であると判定する。すなわち、被写体判定部20(枠縁除外部22)は、被写体候補の画像領域のアスペクト比が予め定められた第2閾値K2以上であり、且つ、被写体候補の画像領域が中央枠B内側の範囲及び中央枠Aの外側の範囲にある場合であって、さらに、中央枠Aに他の被写体候補の画像領域がある場合、当該被写体候補の画像領域を被写体の画像領域として抽出しないと判定する。
これにより、枠縁除外部22は、被写体となる可能性の低い枠縁画像領域を精度良く判定することができ、被写体候補の画像領域から枠縁画像領域を除外する。そのため、本実施形態における画像処理装置1は、撮像された画像から被写体の画像領域を適切に抽出することができる。
In the present embodiment, the frame
Thereby, the frame
また、本実施形態において、枠縁除外部22は、画像領域のアスペクト比が予め定められた第2閾値K2以上であり、且つ、画像領域が中央枠B内であり、且つ、画像領域が中央枠A内にない場合であって、さらに、中央枠A内に他の画像領域がない場合に、当該画像領域を被写体候補の画像領域として残す。すなわち、被写体判定部20(枠縁除外部22)は、被写体候補の画像領域のアスペクト比が予め定められた第2閾値K2以上であり、且つ、被写体候補の画像領域が中央枠Bの内側の範囲及び中央枠Aの外側の範囲にある場合であって、さらに、被写体候補の画像領域に他の被写体候補の画像領域がない場合、当該被写体候補の画像領域を被写体の画像領域として抽出すると判定する。
これにより、枠縁除外部22は、被写体となる可能性の高い画像領域を予め判定し、被写体候補の画像領域として残すことができる。そのため、本実施形態における画像処理装置1は、撮像された画像から被写体の画像領域を適切に抽出することができる。
In the present embodiment, the frame
As a result, the frame
また、本実施形態において、撮像装置100は、画像処理装置1を備えている。
これにより、撮像装置100は、撮像された画像から被写体の画像領域を適切に抽出することができる。そのため、撮像装置100は、精度よくAF処理を行うことができる。
In the present embodiment, the
Thereby, the
なお、本発明は、上記の実施形態に限定されるものではなく、本発明の趣旨を逸脱しない範囲で変更可能である。
例えば、上記の実施形態において、被写体判定部20は、背景除外部21及び枠縁除外部22を備える形態を説明したが、背景除外部21と枠縁除外部22とのうちのいずれか一方を備える形態でもよい。例えば、枠縁除外部22のみを備える形態では、画像処理装置1は、特徴量算出部10が入力された画像の特徴毎に、特徴量を算出する。領域検出部15が、特徴量算出部10により算出された特徴量毎に定まる被写体候補の画像領域(第1画像領域)を抽出する。被写体判定部20(枠縁除外部22)は、領域検出部15により抽出された被写体候補の画像領域と入力された画像の中央部分の範囲を示す中央枠(中央領域)との位置関係に応じて、被写体候補の画像領域から抽出される被写体の画像領域(第2画像領域)を抽出するか否かを判定する。
これにより、被写体判定部20は、被写体候補の画像領域から、被写体となる可能性の低い画像領域(枠縁画像領域)を除外することができる。そのため、本実施形態における画像処理装置1は、撮像された画像から被写体の画像領域を適切に抽出することができる。
In addition, this invention is not limited to said embodiment, It can change in the range which does not deviate from the meaning of this invention.
For example, in the above embodiment, the
Thereby, the
また、図2に示す処理において、背景除外部21による背景画像領域の除外処理(ステップS107)が実行された後に、枠縁除外部22による枠縁画像領域の除外処理(ステップS108)が実行される形態を説明したが、これに限定されるものではない。例えば、枠縁除外部22による枠縁画像領域の除外処理(ステップS108)が、背景除外部21による背景画像領域の除外処理(ステップS107)より先に実行される形態でもよい。
Further, in the process shown in FIG. 2, after the background image area exclusion process (step S107) by the
また、上記の実施形態において、孤立した画像領域をノイズ画像領域(ノイズマスク)として除外する形態を説明したが、予め定められたサイズより小さい画像領域(極端に小さい画像領域)又は予め定められたサイズより大きい画像領域(極端に大きい画像領域)をノイズ画像領域とする形態でもよい。 In the above-described embodiment, the form in which the isolated image area is excluded as a noise image area (noise mask) has been described. However, an image area smaller than a predetermined size (an extremely small image area) or a predetermined size is determined. An image area larger than the size (an extremely large image area) may be a noise image area.
また、上記の実施形態において、画像処理部140は、AF用に矩形領域を生成する形態を説明したが、多角形の領域を生成する形態でもよい。また、画像処理部140は、被写体の画像領域に外接する矩形枠として、AF用矩形領域を生成する形態を説明したが、被写体の画像領域よりも少し大きめの領域を生成する形態でもよいし、他の形態でもよい。
In the above embodiment, the
また、上記の実施形態において、画像処理装置1によって抽出された被写体の画像領域をAF制御に適用する形態を説明したが、これに限定されるものではない。例えば、抽出した被写体の画像領域を、ホワイトバランス処理、画像領域の加工処理などの画像処理に適用する形態でもよい。また、抽出した被写体の画像領域を、切り抜いて画像を使用したり、スーパーインポーズのように貼り付けたりする画像処理に適用する形態でもよい。
In the above-described embodiment, the form in which the image area of the subject extracted by the
また、図1における撮像装置100及び画像処理装置1の各機能を実現するためのプログラムをコンピュータ読み取り可能な記録媒体に記録して、この記録媒体に記録されたプログラムをコンピュータシステムに読み込ませ、実行することにより撮像装置100及び画像処理装置1の各処理を行ってもよい。なお、ここでいう「コンピュータシステム」とは、OSや周辺機器等のハードウェアを含むものとする。
1 is recorded in a computer-readable recording medium, and the program recorded in the recording medium is read into a computer system and executed. By doing so, each process of the
また、「コンピュータシステム」は、WWWシステムを利用している場合であれば、ホームページ提供環境(あるいは表示環境)も含むものとする。
また、「コンピュータ読み取り可能な記録媒体」とは、フレキシブルディスク、光磁気ディスク、ROM、CD−ROM等の可搬媒体、コンピュータシステムに内蔵されるハードディスク等の記憶装置のことをいう。さらに「コンピュータ読み取り可能な記録媒体」とは、インターネット等のネットワークや電話回線等の通信回線を介してプログラムを送信する場合の通信線のように、短時間の間、動的にプログラムを保持するもの、その場合のサーバやクライアントとなるコンピュータシステム内部の揮発性メモリのように、一定時間プログラムを保持しているものも含むものとする。また上記プログラムは、前述した機能の一部を実現するためのものであってもよく、さらに前述した機能をコンピュータシステムにすでに記録されているプログラムとの組み合わせで実現できるものであってもよい。
Further, the “computer system” includes a homepage providing environment (or display environment) if a WWW system is used.
The “computer-readable recording medium” refers to a storage device such as a flexible medium, a magneto-optical disk, a portable medium such as a ROM and a CD-ROM, and a hard disk incorporated in a computer system. Furthermore, the “computer-readable recording medium” dynamically holds a program for a short time like a communication line when transmitting a program via a network such as the Internet or a communication line such as a telephone line. In this case, a volatile memory in a computer system serving as a server or a client in that case, and a program that holds a program for a certain period of time are also included. The program may be a program for realizing a part of the functions described above, and may be a program capable of realizing the functions described above in combination with a program already recorded in a computer system.
1…画像処理装置、10…特徴量算出部、15…領域検出部、20…被写体判定部、21…背景除外部、22…枠縁除外部、100…撮像装置
DESCRIPTION OF
Claims (14)
前記検出部で検出された複数の前記被写体領域のうち、前記画像の第1領域を形成する、対向した2つの辺に接している被写体領域を抽出する抽出部と、 An extraction unit that extracts a subject region that is in contact with two opposite sides and forms a first region of the image among the plurality of subject regions detected by the detection unit;
を備える画像処理装置。 An image processing apparatus comprising:
前記検出部で検出された複数の前記被写体領域のうち、特定の被写体領域を抽出する抽出部と、 An extraction unit for extracting a specific subject region from the plurality of subject regions detected by the detection unit;
を備え、 With
前記抽出部は、前記画像の第1領域を形成する1つの辺に接している面積が第1閾値以上である被写体領域を抽出しない画像処理装置。 The image processing apparatus, wherein the extraction unit does not extract a subject region whose area in contact with one side forming the first region of the image is equal to or greater than a first threshold.
前記検出部で検出された複数の前記被写体領域のうち、特定の被写体領域を抽出する抽出部と、 An extraction unit for extracting a specific subject region from the plurality of subject regions detected by the detection unit;
を備え、 With
前記抽出部は、前記画像の第1領域を形成する1つの辺の長さと、前記辺において被写体領域が接している部分の長さと、の割合が第2閾値以上である被写体領域を抽出しない画像処理装置。 The extraction unit does not extract a subject area in which a ratio of a length of one side forming the first area of the image and a length of a portion where the subject area is in contact with the side is equal to or more than a second threshold value. Processing equipment.
前記検出部で検出された複数の前記被写体領域のうち、前記画像内に定められた第1範囲を形成する、対向した2つの辺に接している被写体領域を抽出する抽出部と、 An extraction unit that extracts a subject region that is in contact with two opposing sides and forms a first range defined in the image among the plurality of subject regions detected by the detection unit;
を備える画像処理装置。An image processing apparatus comprising:
前記検出部で検出された複数の前記被写体領域のうち、特定の被写体領域を抽出する抽出部と、 An extraction unit for extracting a specific subject region from the plurality of subject regions detected by the detection unit;
を備え、 With
前記抽出部は、前記画像内に定められた第1範囲を形成する1つの辺に接している面積が第1閾値以上である被写体領域を抽出しない画像処理装置。 The image processing apparatus, wherein the extraction unit does not extract a subject region whose area in contact with one side forming a first range defined in the image is equal to or greater than a first threshold.
前記検出部で検出された複数の前記被写体領域のうち、特定の被写体領域を抽出する抽出部と、 An extraction unit for extracting a specific subject region from the plurality of subject regions detected by the detection unit;
を備え、 With
前記抽出部は、前記検出部で検出された複数の前記被写体領域のうち、前記画像内に定められた第1範囲を形成する1つの辺の長さと、前記辺において被写体領域が接している部分の長さと、の割合が第2閾値以上である被写体領域を抽出しない画像処理装置。 The extraction unit includes a portion of the plurality of subject areas detected by the detection unit that is in contact with the length of one side forming the first range defined in the image and the subject region at the side. An image processing apparatus that does not extract a subject area whose ratio is equal to or greater than a second threshold.
前記画像処理装置の前記抽出部で抽出された被写体領域により光学像を撮像素子に導くレンズを制御する制御部と、 A control unit that controls a lens that guides an optical image to an imaging device by the subject region extracted by the extraction unit of the image processing apparatus;
を備えるレンズ制御装置。 A lens control device.
請求項1から請求項10のいずれか一項に記載の画像処理装置と、 The image processing apparatus according to any one of claims 1 to 10,
前記画像処理装置の前記抽出部で抽出された被写体領域により前記レンズを制御する制御部と、 A control unit that controls the lens according to the subject region extracted by the extraction unit of the image processing apparatus;
を備える撮像装置。 An imaging apparatus comprising:
画像から複数の被写体領域を検出する検出ステップと、 A detection step for detecting a plurality of subject areas from the image;
前記検出ステップで検出された複数の前記被写体領域のうち、前記画像の第1領域を形成する、対向した2つの辺に接している被写体領域を抽出する抽出ステップと、 An extraction step of extracting a subject region that is in contact with two opposing sides and forms a first region of the image among the plurality of subject regions detected in the detection step;
を実行させるためのプログラム。 A program for running
画像から複数の被写体領域を検出する検出ステップと、 A detection step for detecting a plurality of subject areas from the image;
前記検出ステップで検出された複数の前記被写体領域のうち、前記画像内に定められた第1範囲を形成する、対向した2つの辺に接している被写体領域を抽出する抽出ステップと、 An extraction step of extracting a subject region that is in contact with two opposing sides and forms a first range defined in the image among the plurality of subject regions detected in the detection step;
を実行させるためのプログラム。 A program for running
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2011175876A JP5786544B2 (en) | 2011-08-11 | 2011-08-11 | Image processing apparatus, imaging apparatus, and program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2011175876A JP5786544B2 (en) | 2011-08-11 | 2011-08-11 | Image processing apparatus, imaging apparatus, and program |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2013042201A JP2013042201A (en) | 2013-02-28 |
JP5786544B2 true JP5786544B2 (en) | 2015-09-30 |
Family
ID=47890234
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2011175876A Active JP5786544B2 (en) | 2011-08-11 | 2011-08-11 | Image processing apparatus, imaging apparatus, and program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP5786544B2 (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2014232418A (en) * | 2013-05-29 | 2014-12-11 | 株式会社ニコン | Image processing apparatus, imaging device, and image processing program |
JP6303395B2 (en) * | 2013-10-24 | 2018-04-04 | 株式会社ニコン | Image processing apparatus, imaging apparatus, and image processing program |
JP2018121346A (en) * | 2018-03-07 | 2018-08-02 | 株式会社ニコン | Image processing apparatus, imaging apparatus, and image processing program |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2848749B2 (en) * | 1992-11-18 | 1999-01-20 | 富士写真フイルム株式会社 | Feature image data extraction method |
JP3499305B2 (en) * | 1994-10-28 | 2004-02-23 | 富士写真フイルム株式会社 | Face area extraction method and exposure amount determination method |
JP3918141B2 (en) * | 1999-08-18 | 2007-05-23 | 富士フイルム株式会社 | Image processing apparatus and image processing method |
-
2011
- 2011-08-11 JP JP2011175876A patent/JP5786544B2/en active Active
Also Published As
Publication number | Publication date |
---|---|
JP2013042201A (en) | 2013-02-28 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP5159515B2 (en) | Image processing apparatus and control method thereof | |
US8994874B2 (en) | Image capture apparatus and control method therefor | |
JP5246078B2 (en) | Object location program and camera | |
JP2012528506A (en) | Method and apparatus for separating the top of the foreground from the background | |
CN104919791A (en) | Image processing device, image processing method and program | |
JP7223079B2 (en) | IMAGE PROCESSING APPARATUS, CONTROL METHOD THEREOF, AND IMAGING APPARATUS | |
JP2009111716A (en) | Imaging apparatus, program and template generating method | |
US8582813B2 (en) | Object detection device which detects object based on similarities in different frame images, and object detection method and computer-readable medium recording program | |
JP2013110484A (en) | Image processing device, image processing method, and recording medium | |
JP5786544B2 (en) | Image processing apparatus, imaging apparatus, and program | |
JP2017201818A (en) | Area extraction device | |
US20110074982A1 (en) | Apparatus and method for digital photographing | |
JP2011146827A (en) | Unit and method for processing image, and program | |
US20230386166A1 (en) | Image processing apparatus and electronic apparatus | |
JP6156532B2 (en) | Region extraction device, imaging device, and region extraction program | |
JP4716266B2 (en) | Image processing apparatus, imaging apparatus, and program thereof | |
JP5899693B2 (en) | Region extraction device, imaging device, and region extraction program | |
JP5786460B2 (en) | Region extraction device, imaging device, and region extraction program | |
JP5871175B2 (en) | Region extraction device, imaging device, and region extraction program | |
JP6131519B2 (en) | Image processing apparatus, imaging apparatus, and image processing program | |
US20170365063A1 (en) | Image processing apparatus and method for controlling the same | |
JP5899700B2 (en) | Region extraction device, imaging device, and region extraction program | |
US20230065506A1 (en) | Image processing apparatus, control method thereof, and image capturing apparatus | |
JP2013157675A (en) | Imaging device, method for controlling the same, program, and storage medium | |
JP6003383B2 (en) | Image processing apparatus, imaging apparatus, and image processing program |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20140718 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20150410 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20150421 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20150518 |
|
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: 20150630 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20150713 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 5786544 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |