JP6098374B2 - Image processing apparatus, imaging apparatus, and image processing program - Google Patents
Image processing apparatus, imaging apparatus, and image processing program Download PDFInfo
- Publication number
- JP6098374B2 JP6098374B2 JP2013115642A JP2013115642A JP6098374B2 JP 6098374 B2 JP6098374 B2 JP 6098374B2 JP 2013115642 A JP2013115642 A JP 2013115642A JP 2013115642 A JP2013115642 A JP 2013115642A JP 6098374 B2 JP6098374 B2 JP 6098374B2
- Authority
- JP
- Japan
- Prior art keywords
- image
- image processing
- unit
- mask
- processing apparatus
- 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
- 238000012545 processing Methods 0.000 title claims description 168
- 238000003384 imaging method Methods 0.000 title claims description 50
- 238000000034 method Methods 0.000 claims description 81
- 230000008569 process Effects 0.000 claims description 76
- 238000000605 extraction Methods 0.000 claims description 68
- 238000006243 chemical reaction Methods 0.000 claims description 12
- 239000000284 extract Substances 0.000 claims description 3
- 230000003287 optical effect Effects 0.000 description 26
- 238000011156 evaluation Methods 0.000 description 10
- 238000004891 communication Methods 0.000 description 7
- 230000006870 function Effects 0.000 description 5
- 230000002093 peripheral effect Effects 0.000 description 4
- 230000007246 mechanism Effects 0.000 description 3
- 230000004044 response Effects 0.000 description 3
- 238000012937 correction Methods 0.000 description 2
- 238000010586 diagram Methods 0.000 description 2
- 238000011049 filling Methods 0.000 description 2
- 238000002372 labelling Methods 0.000 description 2
- 230000015572 biosynthetic process Effects 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 230000000295 complement effect Effects 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 229910044991 metal oxide Inorganic materials 0.000 description 1
- 150000004706 metal oxides Chemical class 0.000 description 1
- 238000005457 optimization Methods 0.000 description 1
- 238000002360 preparation method Methods 0.000 description 1
- 230000009467 reduction Effects 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 238000003786 synthesis reaction Methods 0.000 description 1
- 230000008685 targeting Effects 0.000 description 1
Images
Landscapes
- Studio Devices (AREA)
Description
本発明は、画像処理装置、撮像装置及び画像処理プログラムに関する。 The present invention relates to an image processing device, an imaging device, and an image processing program.
従来、被写体の動きに合わせて焦点調節時に用いるフォーカスエリアを追従させる、所謂追尾に関して様々な技術が考案されている。この追尾に関する技術として、例えばカメラに近づく、或いはカメラから離れる方向に移動する被写体の形状や大きさ等に応じて、フォーカスエリアを変化させる技術が挙げられる(特許文献1参照)。 Conventionally, various techniques have been devised for so-called tracking in which a focus area used for focus adjustment is adjusted in accordance with the movement of a subject. As a technique related to this tracking, for example, a technique of changing a focus area according to the shape or size of a subject moving in a direction approaching or moving away from the camera (see Patent Document 1).
例えば風景などの撮影は、人物の撮影と異なり、撮影範囲(画角)内に被写体となる対象物が少ないことから、予め画角内に設定された複数の領域をフォーカスエリアとした焦点調節を行うことが一般的である。したがって、ユーザが注目する領域が画角内に含まれる場合であっても、ユーザが注目する領域が上述したフォーカスエリアとして用いられないことが多い。その結果、ユーザが注目する領域に焦点が合わない画像が得られてしまうという欠点がある。 For example, when shooting landscapes, unlike subjects, there are few objects that are subjects within the shooting range (angle of view), so focus adjustment is performed using multiple areas set in advance within the angle of view as the focus area. It is common to do. Therefore, even when a region focused on by the user is included within the angle of view, the region focused on by the user is often not used as the focus area described above. As a result, there is a drawback in that an image that does not focus on the region that the user pays attention to is obtained.
本発明は、上述した課題を鑑みて発明されたものであり、ユーザが注目する領域をフォーカスエリアとして設定することができるようにした画像処理装置、撮像装置及び画像処理プログラムを提供することを目的とする。 The present invention has been invented in view of the above-described problems, and an object of the present invention is to provide an image processing apparatus, an imaging apparatus, and an image processing program that can set an area focused by a user as a focus area. And
上述した課題を解決するために、本発明の画像処理装置は、画像に含まれる被写体領域を抽出する抽出部と、前記抽出部が前記被写体領域を抽出したか否かを判定する第1の判定部と、前記第1の判定部が前記被写体領域を抽出していないと判定したときに、前記画像が風景の画像であるか否かを推定する推定部と、前記推定部が前記風景の画像でないと推定したときに、前記被写体領域を抽出する際に用いる抽出条件を変更する条件変更部と、変更した前記抽出条件を用いて前記画像から前記被写体領域を再度抽出する再抽出部と、前記変更した前記抽出条件を用いて抽出された前記被写体領域を主要被写体領域として設定する設定部と、を備えたことを特徴とする。 In order to solve the above-described problem, an image processing apparatus according to the present invention includes an extraction unit that extracts a subject area included in an image, and a first determination that determines whether the extraction unit has extracted the subject area. And an estimation unit that estimates whether the image is a landscape image when the first determination unit determines that the subject region is not extracted, and the estimation unit is an image of the landscape A condition changing unit that changes an extraction condition used when extracting the subject region, a re-extracting unit that re-extracts the subject region from the image using the changed extraction condition, and A setting unit configured to set the subject area extracted using the changed extraction condition as a main subject area.
また、本発明の撮像装置は、前記画像を取得する撮像部と、上述した画像処理装置と、を備えたことを特徴とする。 In addition, an imaging apparatus of the present invention includes an imaging unit that acquires the image and the above-described image processing apparatus.
また、本発明の画像処理プログラムは、画像に含まれる被写体領域を抽出する抽出工程と、前記抽出工程により前記被写体領域を抽出したか否かを判定する判定工程と、前記判定工程により前記被写体領域を抽出していないと判定したときに、前記画像が風景の画像であるか否かを推定する推定工程と、前記推定工程により前記風景の画像でないと推定したときに、前記被写体領域を抽出する際に用いる抽出条件を変更する条件変更工程と、変更した前記抽出条件を用いて、前記画像から前記被写体領域を再度抽出する再抽出工程と、前記変更した前記抽出条件を用いて抽出された前記被写体領域を主要被写体領域として設定する設定工程と、をコンピュータに実行させることが可能なものである。 The image processing program of the present invention includes an extraction step of extracting a subject region included in an image, a determination step of determining whether or not the subject region has been extracted by the extraction step, and the subject region by the determination step. When it is determined that the image is a landscape image, and when the estimation step estimates that the image is not a landscape image, the subject region is extracted. A condition changing step for changing the extraction condition used at the time, a re-extraction step for re-extracting the subject region from the image using the changed extraction condition, and the extracted using the changed extraction condition It is possible to cause the computer to execute a setting step of setting the subject area as the main subject area.
本発明によれば、ユーザが注目する領域をフォーカスエリアとして設定することができる。 According to the present invention, it is possible to set a region that the user pays attention as a focus area.
以下、撮像装置の一形態について、図1を用いて説明する。この撮像装置10は、装置本体11、レンズ鏡筒12から構成される。ここで、レンズ鏡筒12は、装置本体11に一体であってもよいし、着脱できるものであってもよい。
Hereinafter, an embodiment of the imaging device will be described with reference to FIG. The
装置本体11は、撮像部21、画像処理回路22、表示部23、バッファメモリ部24、記憶部25、CPU26、操作部27及び通信部28を備えている。撮像部21、画像処理回路22、表示部23、バッファメモリ部24、記憶部25、CPU26、操作部27及び通信部28は、バスを介して電気的に接続される。なお、本発明の画像処理装置は、CPU26及び画像処理回路22からなる。
The apparatus main body 11 includes an
撮像部21は、撮像素子29、A/D(Analog/Digital)変換部30を有している。撮像部21は、設定された撮像条件(例えば露出値、シャッタ速度等)に従って、CPU26により、その動作が制御される。
The
撮像素子29は、光電変換面を備え、レンズ鏡筒12により光電変換面に結像された光学像を電気信号に変換して、A/D変換部30に出力する。撮像素子29は、例えば、CMOS(Complementary Metal Oxide Semiconductor)などの光電変換素子で構成される。ここで、撮像素子29は、光電変換面の全領域において光学像を電気信号に変換してもよいし、光電変換面の一部領域において光学像を電気信号に変換するようにしてもよい。この撮像素子29から出力される電気信号が画像データとなる。
The imaging device 29 includes a photoelectric conversion surface, converts an optical image formed on the photoelectric conversion surface by the lens barrel 12 into an electric signal, and outputs the electric signal to the A /
A/D変換部30は、撮像素子29から出力される画像データをデジタル化して、デジタル化した画像データをバッファメモリ部24等に出力する。
The A /
画像処理回路22は、記憶部25に記憶されている画像処理条件に基づいて、バッファメモリ部24に一時的に記憶されている画像データに対する画像処理を行う。ここで、画像処理としては、ホワイトバランス調整、補間処理、色調補正処理、階調変換処理などが挙げられる。画像処理回路22にて画像処理が施された画像データは、バッファメモリ部24に一次記憶される他、通信部28を介して記憶媒体31に記憶される。
The image processing circuit 22 performs image processing on the image data temporarily stored in the
また、画像処理回路22は、撮影指示が行われていない状態で撮像部21にて連続して得られる画像データを用いて、主要被写体領域を設定する処理を実行する。ここで、撮影指示が行われていない状態で撮像部21にて連続して得られる画像データを、スルー画像データと称する。なお、主要被写体領域を設定する処理については、後述する。
In addition, the image processing circuit 22 executes a process of setting a main subject region using image data continuously obtained by the
表示部23は、例えば液晶ディスプレイが挙げられる。この表示部23は制御部を有し、この制御部により表示部23における画像の表示制御が行われる。ここで、表示部23に表示される画像としては、撮像部21により得られた画像データに基づく画像や、各種設定を行う際に表示する画像が挙げられる。バッファメモリ部24は、撮像部21によって生成された画像データや画像処理回路22によって画像処理が施された画像データを一時的に記憶する。記憶部25は、撮像条件や、各種判定の際にCPU26によって参照される判定条件などを記憶する他、マスク抽出処理の結果を示すフラグや、フラグの履歴を記憶する。
An example of the
CPU26は、画像処理回路22や記憶部25などから取得した情報や、操作部27の操作状態などに基づいて、装置本体11の各部を統括的に制御する。CPU26による制御には、焦点調整(AF)の設定、露出調整(AE)の設定、ホワイトバランス調整(AWB)の設定、閃光の発光量の変更の設定、被写体追尾の設定、各種撮影モードの設定、各種画像処理の設定、各種表示の設定、ズーム倍率に連動した明るさの最適化の設定などが含まれる。
The
操作部27は、電源スイッチ、シャッタボタン、マルチセレクタ(十字キー)、又はその他の操作キーから構成される。なお、表示部23がタッチパネルを備えた表示部23となる場合、タッチパネルも操作部27として機能する。この操作部27は、ユーザの操作入力を受け付け、操作入力に応じた信号をCPU26に出力する。
The operation unit 27 includes a power switch, a shutter button, a multi selector (cross key), or other operation keys. When the
通信部28は、不揮発性メモリからなるメモリカード等、装置本体11に対して着脱することができる記憶媒体31と電気的に接続される。通信部28は、装置本体11に装着された記憶媒体31にデータ(画像データ、領域の情報など)を書き込む、または記憶媒体31に記憶されたデータを消去する。通信部28は、必要に応じて、記憶媒体31に記憶されたデータの読み出しを行う。
The
レンズ鏡筒12は、撮像光学系35、レンズ駆動部36、エンコーダ37、鏡筒制御部38を有している。撮像光学系35はフォーカスレンズやズームレンズなどの複数のレンズを有している。この撮像光学系35の各レンズは、レンズ駆動部36により、その位置が光軸方向に移動するように制御される。撮像光学系35は、装置本体11に設けられた撮像素子29の受光面(光電変換面)に取り込まれた光学像を導く。
The lens barrel 12 includes an imaging
レンズ駆動部36は、例えば駆動モータや、ギヤ機構又はヘリコイド機構などの駆動機構を有し、撮像光学系35の各レンズを光軸方向に移動させる。エンコーダ37は、撮像光学系35のズームレンズやフォーカスレンズが光軸方向に移動したときに、その移動に伴う位置や移動方向を検出し、鏡筒制御部38に出力する。
The
鏡筒制御部38は、装置本体11のCPU26から入力される駆動制御信号に応じて、レンズ駆動部36を制御する。ここで、駆動制御信号とは、撮像光学系35の各レンズを光軸方向に移動させる制御信号である。鏡筒制御部38は、駆動制御信号に応じて、レンズ駆動部36に出力するパルス電圧のステップ数を制御する。また、鏡筒制御部38は、撮像光学系35の各レンズの移動量に応じた信号に基づいて、フォーカスレンズの位置(フォーカスポジション)を、装置本体11のCPU26に出力する。
The lens
次に、画像処理回路22の構成について説明する。上述したように、画像処理回路22は、画像処理条件に基づいて画像データに対する画像処理を実行する他に、スルー画像データを用いて、主要被写体領域を設定する処理を実行する。図2に示すように、画像処理回路22は、抽出部41、判定部42、追尾部43、評価部44及び設定部45の機能を有している。
Next, the configuration of the image processing circuit 22 will be described. As described above, the image processing circuit 22 executes processing for setting a main subject area using through image data, in addition to performing image processing on image data based on image processing conditions. As illustrated in FIG. 2, the image processing circuit 22 has functions of an
抽出部41は、撮像部21にて取得されるスルー画像データを用いて、該スルー画像データに基づいた画像に含まれる被写体の領域をマスクとして抽出する。以下、スルー画像データに基づく画像をスルー画像と称する。なお、マスク抽出処理については後述する。マスク抽出処理を行うことで、抽出部41は、マスクとして抽出した被写体の情報(以下、マスク情報)を記憶部25に記憶する。ここで、マスク情報としては、マスク抽出処理の抽出条件(色区分やマスク区分など)、マスクの位置、マスクの大きさや形状、マスクの動き(移動方向、移動ベクトル)、マスクに該当する被写体までの距離の情報が含まれる。
The
判定部42は、複数のスルー画像のそれぞれから得られるマスク情報を用いて、同一のマスクがn回(nフレーム)以上連続して検出されるか否かを判定する。この判定を行うことで、同一のマスクが安定しているか否かが判定される。
The
例えば、図示を省略した撮像光学系35における光学ズーム倍率が一定の場合には、対象となるマスクと同色で、且つ同一サイズとなるマスクが、連続するnフレーム以上のスルー画像データのそれぞれで検出されているか否かを判定する。この場合、被写体自体が動いていても、静止していてもよい。 For example, when the optical zoom magnification in the imaging optical system 35 (not shown) is constant, a mask having the same color and the same size as the target mask is detected in each of the through image data of n or more consecutive frames. It is determined whether or not it has been done. In this case, the subject itself may be moving or may be stationary.
また、撮像光学系35における光学ズーム倍率を変更する場合や、撮像光学系35における光学ズーム倍率が一定で被写体又は撮影者が撮像光学系35の光軸方向に変化する場合もある。このような場合、連続して得られるスルー画像においては検出される被写体の領域の大きさが変化する。よって、対象となるマスクと同色となり、且つ光学ズーム倍率に合わせた拡大率又は縮小率でサイズが変化しているマスクが、連続するnフレーム以上のスルー画像のそれぞれで検出されているか否かを判定すればよい。
In some cases, the optical zoom magnification in the imaging
ここで、判定部42においては、同一のマスクがn回(nフレーム)以上連続して検出されるか否かを判定するようにしているが、少なくとも2回(2フレーム)以上連続して検出される場合に、マスクが安定していると判定することもできる。なお、マスクが安定しているか否かの判定として用いるスルー画像については、撮像部21から出力される全てのスルー画像を対象としてもよいし、撮像部21から出力されるスルー画像のうち、例えば3フレームおき等、所定フレーム間隔を空けて得られるスルー画像を対象のスルー画像として上記判定を行うことも可能である。
Here, the
追尾部43は、主要被写体領域が設定された以降に得られるスルー画像に対して、例えば主要被写体領域として設定されたマスクを用いたテンプレートマッチングの手法を用い、取得されるスルー画像に含まれる主要被写体領域の位置を特定する。この処理をスルー画像のそれぞれに対して行うことで、主要被写体を追尾することが可能となる。
The
評価部44は、判定部42において、n回(nフレーム)以上連続して検出されるマスク(主要被写体領域として設定されるマスクも含む)に対する評価を実行する。ここで、評価部44は、記憶部25に記憶されたマスク情報を用いて、マスクに対する評価を行う。
The
設定部45は、評価部44における評価結果に基づいて主要被写体領域を設定する。ここで、主要被写体領域を設定する処理としては、主要被写体領域が設定されていないときに、新規に主要被写体領域を設定する場合の他に、主要被写体領域が設定されているときに、主要被写体領域となる被写体の領域を切り替える(再設定する)処理が含まれる。設定部45は、主要被写体領域を設定したときに、該設定した情報を記憶部25に書き込む。なお、この情報は、マスク情報に対応付けて記憶してもよいし、個別に記憶してもよい。
The setting
以下、主要被写体領域として用いるマスクを抽出する処理について、図3のフローチャートを参照して説明する。 Hereinafter, a process of extracting a mask used as a main subject area will be described with reference to a flowchart of FIG.
ステップS101は、Y画像データ、Cb画像データ及びCr画像データを生成する処理である。画像処理回路22は、画像処理済みのスルー画像データを読み出す。そして画像処理回路22は、読み出したスルー画像データから、Y画像データ、Cb画像データ及びCr画像データを生成する。 Step S101 is processing for generating Y image data, Cb image data, and Cr image data. The image processing circuit 22 reads through image data that has undergone image processing. Then, the image processing circuit 22 generates Y image data, Cb image data, and Cr image data from the read through image data.
ステップS102は、注目点を推定する処理である。画像処理回路22は、生成されたY画像データに対して、例えば2次元のガボールフィルタ関数を用いたフィルタ処理を行い、マップ(ガボールマップ)を生成する。ここで、2次元のガボールフィルタ関数を用いたフィルタ処理としては、複数方向(例えば45°及び135°)の2次元のガボールフィルタ関数のそれぞれとY画像データとを畳み込みし、その演算結果を加算することで、畳み込み和を求める処理である。この処理を行うことで、ガボールマップが生成される。画像処理回路22は、生成したガボールマップに対して2値化処理を行う。画像処理回路22は、2値化処理を行ったガボールマップに含まれる白画素の領域の重心を注目点として推定する。なお、このステップS102における注目点を推定する処理は、上記に限定されるものではなく、例えばユーザが指定した位置を注目点の位置としてもよい。 Step S102 is processing for estimating a point of interest. The image processing circuit 22 performs a filter process using, for example, a two-dimensional Gabor filter function on the generated Y image data to generate a map (Gabor map). Here, as the filter processing using the two-dimensional Gabor filter function, each of the two-dimensional Gabor filter functions in a plurality of directions (for example, 45 ° and 135 °) is convolved with the Y image data, and the calculation result is added. This is a process for obtaining the convolution sum. By performing this process, a Gabor map is generated. The image processing circuit 22 performs binarization processing on the generated Gabor map. The image processing circuit 22 estimates the centroid of the white pixel area included in the binarized Gabor map as a point of interest. Note that the process of estimating the attention point in step S102 is not limited to the above, and for example, the position designated by the user may be set as the position of the attention point.
ステップS103は、対象となるマスクを抽出する処理である。画像処理回路22は、Y画像データ、Cb画像データ及びCr画像データのそれぞれを用いて、ステップS102にて推定した注目点となる画素と、その周辺部の画素を含む例えば3×3画素の領域における画素値の平均Aveを求める。画像処理回路22は、Y画像データ、Cb画像データ及びCr画像データに対して、Ave±ασを用いた2値化処理を行う。ここで、αは係数であり、例えばα=0.6が挙げられる。また、σは標準偏差である。画像処理回路22は、2値化処理によりAve±ασの範囲に含まれる画素に対してラベリング処理を行う。このラベリング処理を行うことで、上記範囲に含まれる画素値を有する画素が白画素となり、上記範囲から外れる画素値を有する画素が黒画素となる。画像処理回路22は、Y画像データ、Cb画像データ及びCr画像データのそれぞれから生成された2値化画像データを合成する。画像処理回路22は、合成後の2値化画像データを用いて、白画素となる画素の領域が重なり合う領域をマスクとして抽出する。画像処理回路22は、抽出したマスクに係る情報を、記憶部25に記憶する。 Step S103 is processing for extracting a target mask. The image processing circuit 22 uses, for example, each of Y image data, Cb image data, and Cr image data, and is an area of, for example, 3 × 3 pixels including the pixel that is the target point estimated in step S102 and the peripheral pixels The average Ave of the pixel values at is obtained. The image processing circuit 22 performs binarization processing using Ave ± ασ on the Y image data, Cb image data, and Cr image data. Here, α is a coefficient, for example, α = 0.6. Σ is a standard deviation. The image processing circuit 22 performs a labeling process on the pixels included in the range of Ave ± ασ by the binarization process. By performing this labeling process, pixels having pixel values included in the above range become white pixels, and pixels having pixel values outside the above range become black pixels. The image processing circuit 22 combines the binarized image data generated from each of the Y image data, Cb image data, and Cr image data. The image processing circuit 22 uses the binarized image data after synthesis to extract, as a mask, a region where pixel regions that are white pixels overlap. The image processing circuit 22 stores information related to the extracted mask in the storage unit 25.
このステップS103においては、Y画像データ、Cb画像データ及びCr画像データから生成された2値化画像データを合成したときに、白画素となる領域が重なり合う領域をマスクとして抽出している。この他に、2値化画像データのいずれかにおいて白画素となる領域があれば、その領域をマスクとして抽出することも可能である。 In step S103, when the binarized image data generated from the Y image data, the Cb image data, and the Cr image data are combined, an area where white pixel areas overlap is extracted as a mask. In addition, if there is a region that becomes a white pixel in any of the binarized image data, it is also possible to extract that region as a mask.
ステップS104は、面積が大きいマスク又は面積が小さいマスクを除外する処理である。画像処理回路22は、抽出されたマスクのうち、合成された2値化画像の総面積に対するマスクの総面積の比率が60%以上となるマスクや、1%以下となるマスクを除外する。 Step S104 is a process of excluding a mask having a large area or a mask having a small area. The image processing circuit 22 excludes masks in which the ratio of the total area of the mask to the total area of the synthesized binarized image is 60% or more from among the extracted masks or a mask in which the ratio is 1% or less.
ステップS105は、充填率が低いマスクを除外する処理である。画像処理回路22は、マスクが含まれる矩形の領域(以下、矩形領域)毎に、矩形領域に対してマスクが占める比率を求める。そして、画像処理回路22は、求めた比率が閾値(例えば0.2)以下である場合に、そのマスクを充填率が低いマスクとして除外する。 Step S105 is processing to exclude a mask with a low filling rate. The image processing circuit 22 determines the ratio of the mask to the rectangular area for each rectangular area (hereinafter, rectangular area) including the mask. The image processing circuit 22 excludes the mask as a mask with a low filling rate when the obtained ratio is equal to or less than a threshold value (for example, 0.2).
ステップS106は、横長及び縦長となるマスクを除外する処理である。画像処理回路22は、マスクが含まれる矩形領域の縦横比を求める。画像処理回路22は、求めた縦横比が、例えば0.2以上5未満の範囲から外れるマスクを横長のマスク又は縦長のマスクとして除外する。 Step S <b> 106 is a process of excluding a horizontally long and vertically long mask. The image processing circuit 22 obtains the aspect ratio of the rectangular area including the mask. For example, the image processing circuit 22 excludes a mask whose aspect ratio is outside the range of 0.2 or more and less than 5 as a horizontally long mask or a vertically long mask.
ステップS107は、背景となるマスクを除外する処理である。画像処理回路22は、Y画像データ、Cb画像データ及びCr画像データを参照して、対象となるマスクにおける輝度値や色相の情報を読み出す。そして、画像処理回路22は、輝度値や色相の情報から、背景に想到する輝度値や色相の情報を有するマスクを除外する。 Step S107 is processing for excluding the background mask. The image processing circuit 22 reads out the luminance value and hue information in the target mask with reference to the Y image data, Cb image data, and Cr image data. Then, the image processing circuit 22 excludes the mask having the luminance value and hue information conceived in the background from the luminance value and hue information.
ステップS108は、画像の周縁部に位置するマスクを除外する処理である。画像処理回路22は、画像の左端および右端にかかるマスクや、例えば左端、右端にかかるマスクの画素数が縦辺に配置される画素の総数の1/3以上であれば排除する。 Step S108 is processing for excluding the mask located at the peripheral portion of the image. The image processing circuit 22 eliminates a mask applied to the left end and the right end of the image, for example, if the number of pixels of the mask applied to the left end and the right end is 1/3 or more of the total number of pixels arranged on the vertical side.
ステップS109は、除外したマスクの情報を記憶する処理である。画像処理回路22は、ステップSからステップSによって除外したマスクの情報を記憶部に記憶する。 Step S109 is processing for storing information of the excluded mask. The image processing circuit 22 stores information on the masks excluded from step S to step S in the storage unit.
ステップS110は、抽出したマスクの優先度を設定する処理である。画像処理回路22は、残りのマスクのそれぞれに対して、マスクの面積を慣性モーメントで除算した値(評価値)を求める。そして、求めた値(評価値)の高いマスクから順に優先度を設定する。 Step S110 is processing for setting the priority of the extracted mask. The image processing circuit 22 obtains a value (evaluation value) obtained by dividing the mask area by the moment of inertia for each of the remaining masks. Then, priorities are set in order from the mask with the highest value (evaluation value).
次に、撮影時の処理の流れについて、図4及び図5のフローチャートを用いて説明する。なお、これらフローチャートは、レリーズボタンが半押し操作されたことを契機にして実行される。 Next, the flow of processing during shooting will be described with reference to the flowcharts of FIGS. These flowcharts are executed when the release button is pressed halfway.
ステップS201は、スルー画像データを取得する処理である。CPU26は、撮像部21を制御して、スルー画像データの取得を開始する。取得されたスルー画像データの画像情報はバッファメモリ部24に一時的に記憶される。このスルー画像データは、所定の時間間隔で連続して取得される。
Step S201 is processing for acquiring through image data. The
ステップS202は、画像処理である。CPU26は、画像処理回路22に対して画像処理を行う指示を行う。この指示を受けて、画像処理回路22は、バッファメモリ部24に記憶されたスルー画像データを読み出す。そして、画像処理回路22は、読み出したスルー画像データに対して、ホワイトバランス調整処理、補間処理、色調補正処理、階調変換処理などの画像処理を実行する。これら画像処理が実行された後、画像処理回路22は、スルー画像データをバッファメモリ部24に一時記憶する。
Step S202 is image processing. The
ステップS203は、スルー画像を表示する処理である。このステップS203の処理において、CPU26は、バッファメモリ部24に一時記憶されたスルー画像データを読み出し、表示部23に出力する。これを受けて、表示部23は読み出したスルー画像データに基づくスルー画像を表示する。
Step S203 is processing to display a through image. In the process of step S <b> 203, the
ステップS204は、マスク抽出処理である。CPU26は、画像処理回路22に対して、主要被写体領域を設定する指示を行う。この指示を受けて、画像処理回路22は、バッファメモリ部24からスルー画像データを読み出す。そして、画像処理回路22は、読み出したスルー画像データを用いてマスク抽出処理を行う。マスクが抽出される場合、CPU26は、マスクが抽出されたことを示すフラグを記憶部25に書き込む。一方、マスクが抽出されない場合、CPU26は、マスクが抽出されないことを示すフラグを記憶部25に書き込む。
Step S204 is a mask extraction process. The
ステップS205は、マスクが抽出できたか否かを判定する処理である。ステップS204の処理により、記憶部25にはマスク抽出の結果を示すフラグが記憶される。画像処理回路22は、記憶部25からフラグを読み出す。読み出したフラグが、マスクを抽出したことを示すフラグであれば、画像処理回路22は、ステップS205の判定結果をYesとする。この場合、ステップS206に進む。一方、読み出したフラグが、マスクを抽出されていないことを示すフラグであれば、画像処理回路22は、ステップS205の判定結果をNoとする。この場合、ステップS220に進む。 Step S205 is processing for determining whether or not a mask has been extracted. As a result of the processing in step S204, the storage unit 25 stores a flag indicating the result of mask extraction. The image processing circuit 22 reads the flag from the storage unit 25. If the read flag is a flag indicating that the mask has been extracted, the image processing circuit 22 sets the determination result in step S205 to Yes. In this case, the process proceeds to step S206. On the other hand, if the read flag is a flag indicating that the mask has not been extracted, the image processing circuit 22 sets the determination result in step S205 to No. In this case, the process proceeds to step S220.
ステップS206は、マスク情報を記録する処理である。画像処理回路22は、ステップS204により抽出したマスクに係る情報をマスク情報として記憶部25等に記録する。 Step S206 is processing to record mask information. The image processing circuit 22 records information relating to the mask extracted in step S204 in the storage unit 25 or the like as mask information.
ステップS207は、n回以上連続して抽出されたマスクがあるか否かを判定する処理である。このステップS207における判定は、ステップS204のマスク抽出処理により抽出されたマスクが安定しているか否かを判定するためのものである。よって、n回以上連続して同一のマスクを抽出した場合、画像処理回路22は、抽出されたマスクが安定していると判定する。つまり、主要被写体領域を正しく検出していると判断することができる。画像処理回路22は、ステップS207の判定結果をYesとする。この場合、ステップS208に進む。一方、n回以上連続して同一のマスクを抽出していない場合は、画像処理回路22は、ステップS204のマスク抽出処理により抽出されたマスクが安定していないと判定する。画像処理回路22は、ステップS207の判定結果をNoとする。この場合、ステップS215に進む。 Step S207 is processing for determining whether or not there is a mask extracted n times or more continuously. The determination in step S207 is for determining whether or not the mask extracted by the mask extraction process in step S204 is stable. Therefore, when the same mask is extracted n times or more continuously, the image processing circuit 22 determines that the extracted mask is stable. That is, it can be determined that the main subject area is correctly detected. The image processing circuit 22 sets the determination result in step S207 to Yes. In this case, the process proceeds to step S208. On the other hand, if the same mask is not extracted n times or more consecutively, the image processing circuit 22 determines that the mask extracted by the mask extraction process in step S204 is not stable. The image processing circuit 22 sets the determination result in step S207 to No. In this case, the process proceeds to step S215.
ステップS208は、主要被写体領域を設定する処理である。画像処理回路22は、ステップS204におけるマスク抽出処理により抽出されたマスクから、優先度の高いマスクを選択する。そして、画像処理回路22は、選択されたマスクに対応する領域を主要被写体領域として設定する。 Step S208 is processing for setting a main subject area. The image processing circuit 22 selects a mask having a high priority from the masks extracted by the mask extraction process in step S204. Then, the image processing circuit 22 sets an area corresponding to the selected mask as a main subject area.
ステップS209は、主要被写体領域に係る情報を記憶する処理である。画像処理回路22は、主要被写体領域の情報(主要被写体領域情報)を記憶部25等に記録する。主要被写体領域情報としては、マスクに関するマスク情報、主要被写体領域の位置、主要被写体領域の大きさや形状などの情報が挙げられる。 Step S209 is processing to store information relating to the main subject area. The image processing circuit 22 records main subject area information (main subject area information) in the storage unit 25 and the like. The main subject area information includes mask information related to the mask, information on the position of the main subject area, the size and shape of the main subject area, and the like.
ステップS210は、主要被写体領域情報を表示する処理である。CPU26は、主要被写体領域情報を表示部23に出力する。表示部23は、主要被写体領域情報に基づいた表示をスルー画像に重畳して表示する。主要被写体領域情報に基づいた表示としては、例えば主要被写体領域であることを示す枠が挙げられる。なお、この枠は、主要被写体領域の形状に応じた枠であってもよいし、矩形や円形など所定の形状の枠であってもよい。このような表示を行うことにより、ユーザは、自動で検出される主要被写体領域の位置や形状がどのようなものであるかを、容易に把握することができる。
Step S210 is processing for displaying main subject area information. The
ステップS211は、撮影指示があるか否かを判定する処理である。操作部27を用いた入力操作が行われた場合、CPU26には、操作部27における入力操作に基づく信号が入力される。CPU26は、この入力される信号が撮影指示を示す信号であるか否かを判定する。例えばレリーズボタンの全押し操作が行われた場合に入力される信号など、撮影指示を示す信号であれば、CPU26は、ステップS211の判定結果をYesとする。この場合、ステップS212に進む。一方、入力される信号が撮影指示を示す信号でない場合には、CPU26は、ステップS211の判定結果をNoとする。この場合、ステップS201に戻る。
Step S211 is processing for determining whether or not there is a shooting instruction. When an input operation using the operation unit 27 is performed, a signal based on the input operation in the operation unit 27 is input to the
ステップS212は、撮像処理である。例えば安定したマスク抽出が行えている場合には、ステップS208で主要被写体領域を設定し、ステップS209で該主要被写体領域情報を記憶している。CPU26は、記憶部25に記憶される主要被写体領域情報に基づいて、焦点調整(AF)の設定処理、露出調整(AE)の設定処理、ホワイトバランス調整処理(AWB)の3A処理を行う。また、CPU26は、画像処理回路22における各種画像処理の条件等を決定する。
Step S212 is an imaging process. For example, when stable mask extraction can be performed, a main subject area is set in step S208, and the main subject area information is stored in step S209. The
一方、安定したマスク抽出が行えていないときにも、ユーザの操作により撮影が実行される場合がある。このような場合には、CPU26は、例えば中央の領域など特定の領域を用いて、焦点調整(AF)の設定処理、露出調整(AE)の設定処理、ホワイトバランス調整処理(AWB)の3A処理を行う。これに合わせて、CPU26は、画像処理回路22における各種画像処理の条件等を決定する。CPU26は、上述した処理の結果に基づいて、撮像処理を実行する。
On the other hand, even when stable mask extraction cannot be performed, photographing may be performed by a user operation. In such a case, the
ステップS213は、画像を記録する処理である。CPU26は、ステップS212による撮像処理により取得された画像データを、通信部28を介して記憶媒体31に記録して一連の処理を終了する。
Step S213 is processing to record an image. CPU26 records the image data acquired by the imaging process by step S212 to the
ステップS207の判定結果がNoとなる、言い換えれば、n回以上連続して抽出されたマスクがないと判定された場合、ステップS215に進む。 If the determination result in step S207 is No, in other words, if it is determined that there is no mask extracted n times or more continuously, the process proceeds to step S215.
ステップS215は、前回までのマスク抽出処理で連続して抽出されたマスクがあるか否かを判定する処理である。画像処理回路22は、記憶部25に記憶されたマスク情報を読み出す。例えば、前回までのマスク抽出処理において連続して抽出されたマスクに関するマスク情報があれば、画像処理回路22は、ステップS215の判定結果をYesとする。この場合、ステップS210に進む。一方、前回までのマスク抽出処理において連続して抽出されたマスクに関するマスク情報がない場合、画像処理回路22は、ステップS215の判定結果をNoとする。この場合、ステップS216に進む。 Step S215 is processing for determining whether or not there is a mask extracted continuously in the previous mask extraction processing. The image processing circuit 22 reads the mask information stored in the storage unit 25. For example, if there is mask information related to a mask extracted continuously in the previous mask extraction process, the image processing circuit 22 sets the determination result in step S215 to Yes. In this case, the process proceeds to step S210. On the other hand, when there is no mask information regarding the masks extracted continuously in the previous mask extraction process, the image processing circuit 22 sets the determination result in step S215 to No. In this case, the process proceeds to step S216.
ステップS216は、通常の3A処理である。例えば主要被写体領域の設定処理を行っていない状態で撮影指示が行われてしまう場合に備えて、CPU26は、通常の3A処理を行う。3A処理とは、焦点調整(AF)の設定処理、露出調整(AE)の設定処理、ホワイトバランス調整処理(AWB)であり、公知技術と同様に行われる。この処理が実行された後、ステップS211に進む。
Step S216 is a normal 3A process. For example, the
また、ステップS205の判定結果がNoとなる場合、言い換えれば、取得されたスルー画像からマスクが抽出されない場合には、ステップS220に進む。 If the determination result in step S205 is No, in other words, if no mask is extracted from the acquired through image, the process proceeds to step S220.
ステップS220は、m(m<n)回以上マスク抽出されていないか否かを判定する処理である。画像処理回路22は、記憶部25に書き込まれたフラグの履歴を参照する。画像処理回路22は、記憶部25に記憶されたフラグの履歴からm回以上マスクが抽出されていないか否かを判定する。例えばm回以上連続してマスクが抽出されていない場合には、画像処理回路22は、ステップS220の判定結果をYesとする。この場合、ステップS221に進む。一方、m回以上連続してマスクが抽出されている場合には、画像処理回路22は、ステップS220の判定結果をNoとする。この場合、ステップS211に進む。 Step S220 is a process of determining whether or not the mask has been extracted m (m <n) times or more. The image processing circuit 22 refers to the flag history written in the storage unit 25. The image processing circuit 22 determines whether or not a mask has been extracted m or more times from the flag history stored in the storage unit 25. For example, if the mask has not been extracted m times or more, the image processing circuit 22 sets the determination result in step S220 to Yes. In this case, the process proceeds to step S221. On the other hand, when the mask has been extracted continuously m times or more, the image processing circuit 22 sets the determination result in step S220 to No. In this case, the process proceeds to step S211.
ステップS221は、画像の輝度値Bvが所定値を超過するか否かを判定する処理である。画像処理回路22は、バッファメモリ部24に記憶されたスルー画像データを読み出す。画像処理回路22は、読み出したスルー画像データを用いて画像の輝度値を求める。画像処理回路22は、求めた画像の輝度値Bvが所定値(例えば6)を超過するか否かを判定する。求めた画像の輝度値Bvが所定値を超過する場合、画像処理回路22は、ステップS221の判定結果をYesとする。この場合、ステップS222に進む。一方、求めた画像の輝度値Bvが所定値以下となる場合には、画像処理回路22は、ステップS221の判定結果をNoとする。この場合、ステップS224に進む。
Step S221 is processing for determining whether or not the luminance value Bv of the image exceeds a predetermined value. The image processing circuit 22 reads through image data stored in the
ステップS222は、風景撮影用に設定される領域を主要被写体領域として設定する処理である。画像処理回路22は、記憶部25から風景撮影用に設定される領域の情報を読み出す。そして、画像処理回路22は、読み出した風景撮影用に設定される領域を主要被写体領域として設定する。なお、風景撮影用に設定される領域としては、画像の中央の領域が挙げられ、その領域の横幅及び縦幅は、例えば画像の横幅及び縦幅の0.4倍に設定される。なお、風景撮影用に設定される領域の幅は一例を示すものである。 Step S222 is processing for setting an area set for landscape photography as a main subject area. The image processing circuit 22 reads out information on an area set for landscape photography from the storage unit 25. Then, the image processing circuit 22 sets the read area set for landscape photography as the main subject area. The area set for landscape photography includes the center area of the image, and the horizontal width and vertical width of the area are set to 0.4 times the horizontal width and vertical width of the image, for example. The width of the area set for landscape photography is an example.
ステップS223は、主要被写体領域情報を記録する処理である。このステップS223の処理は、ステップS209と同一の処理である。 Step S223 is processing for recording main subject area information. The process of step S223 is the same process as step S209.
ステップS224は、主要被写体領域情報を表示する処理である。このステップS224の処理は、ステップS210と同一の処理である。 Step S224 is processing to display main subject area information. The process of step S224 is the same process as step S210.
例えば、図6に示すように、晴れた日に山を撮影する場合には、スルー画像51においては画像全体の輝度が高く、また画像全体の色相が類似していることから、スルー画像51に含まれる山の部分を主要被写体として特定することができない。このような場合には、画像全体の輝度値に基づいて風景撮影であるか否かを自動的に判別する。つまり、輝度値が高い場合には風景撮影であると自動的に判別される。その結果、予め風景撮影用として設定される領域が主要被写体領域として設定される。したがって、このような場合には、表示部23においては、スルー画像51と風景撮影用の枠52が表示される。
For example, as shown in FIG. 6, when shooting a mountain on a sunny day, the through
上述したステップS221の判定結果がNoとなる場合、言い換えれば、被写体輝度Bvが所定値以下となる場合には、ステップS225に進む。 If the determination result in step S221 described above is No, in other words, if the subject brightness Bv is equal to or lower than the predetermined value, the process proceeds to step S225.
ステップS225は、マスク抽出処理時に除外されたマスクのうち、中央の領域に位置するマスクがあるか否かを判定する処理である。画像処理回路22は、記憶部25に記憶されたマスク情報を参照する。そして、参照したマスク情報に含まれるマスクの位置情報から、中央の領域に位置するマスクがあるか否かを判定する。中央の領域に位置するマスクがある場合、画像処理回路22は、ステップS225の判定結果をYesとする。この場合、ステップS226に進む。一方、中央の領域に位置するマスクがない場合、画像処理回路22は、ステップS225の判定結果をNoとする。この場合、ステップS228に進む。ここで、画像の中央の領域としては、例えば画像の横幅及び縦幅の1/2の領域を示す。なお、画像の中央の領域と、上述した風景撮影用の領域とは、同一の大きさであってもよいし、異なる大きさであってもよい。 Step S225 is a process of determining whether or not there is a mask located in the center area among the masks excluded during the mask extraction process. The image processing circuit 22 refers to the mask information stored in the storage unit 25. Then, it is determined from the mask position information included in the referenced mask information whether there is a mask located in the central region. If there is a mask located in the center area, the image processing circuit 22 sets the determination result in step S225 to Yes. In this case, the process proceeds to step S226. On the other hand, when there is no mask located in the central region, the image processing circuit 22 sets the determination result in step S225 to No. In this case, the process proceeds to step S228. Here, as the central region of the image, for example, a region having a half of the horizontal width and vertical width of the image is shown. Note that the central area of the image and the above-described landscape photographing area may have the same size or different sizes.
ステップS226は、対象となるマスクを主要被写体領域として設定する処理である。例えばステップS225において中央の領域に位置するマスクがあると判定された場合には、該マスクを主要被写体領域として設定する。また、後述するステップS229において条件を満足するマスクがあると判定された場合には、抽出条件を変更することで抽出されたマスクを主要被写体領域として設定する。そして、画像処理回路22は、主要被写体領域の情報を記憶部25等に記録する。 Step S226 is processing for setting a target mask as a main subject region. For example, if it is determined in step S225 that there is a mask located in the center area, the mask is set as the main subject area. If it is determined in step S229 that will be described later that there is a mask that satisfies the condition, the mask extracted by changing the extraction condition is set as the main subject region. Then, the image processing circuit 22 records information on the main subject area in the storage unit 25 and the like.
ステップS227は、主要被写体領域情報を表示する処理である。CPU26は、主要被写体領域の情報を表示部23に出力する。表示部23は、入力された主要被写体領域の情報に基づいた表示をスルー画像に重畳して表示する。この処理が実行されると、ステップS211に進む。
Step S227 is processing for displaying main subject area information. The
このように、マスク抽出処理で除外されるマスクのうち、画像の中央の領域に位置するマスクがあれば、そのマスクを主要被写体領域として設定する。例えば建造物などを含む風景を撮影する場合等、マスク抽出処理によりマスクの対象から除外される場合がある。しかしながら、除外されたマスクのうち、ユーザが注目するマスクが中央の領域にあれば、そのマスクが主要被写体として設定される。したがって、主要被写体として抽出された対象物に合わせた枠が表示されるので、ユーザはユーザ自身が狙っている被写体の位置や大きさを確認することが可能となる。 As described above, if there is a mask located in the center area of the image among the masks excluded in the mask extraction process, the mask is set as the main subject area. For example, when shooting a landscape including a building or the like, the mask may be excluded from the mask target by the mask extraction process. However, if the mask that is noticed by the user is in the central area among the excluded masks, the mask is set as the main subject. Therefore, since a frame that matches the object extracted as the main subject is displayed, the user can check the position and size of the subject that the user is targeting.
ステップS225の判定結果がNoとなる、言い換えれば、除外されたマスクのいずれもが中央の領域に位置していない場合には、ステップS228に進む。 If the determination result in step S225 is No, in other words, if none of the excluded masks is located in the central region, the process proceeds to step S228.
ステップS228は、抽出条件を変更してマスク抽出を行う処理である。なお、抽出条件を変更するとは、上述したマスク抽出処理時に実行される2値化処理における係数αの値を、α=0.6ではなく、他の値(例えばα=0.8,1.0,1.2)に変更することが挙げられる。なお、このステップS228の処理は、係数αの値を変更して、上述したマスク抽出処理(ステップS101からステップS110の処理)を実行する。この係数αの値を変更することで、ステップS204の処理におけるマスク抽出処理の際にマスクが抽出されない場合であっても、抽出条件を変更することでマスクを抽出することが可能となる。 Step S228 is a process of performing mask extraction by changing the extraction condition. Note that changing the extraction condition means that the value of the coefficient α in the binarization processing executed during the mask extraction processing described above is not α = 0.6 but another value (for example, α = 0.8, 1.. 0, 1.2). In the process of step S228, the value of the coefficient α is changed and the above-described mask extraction process (processes from step S101 to step S110) is executed. By changing the value of the coefficient α, it is possible to extract the mask by changing the extraction condition even if the mask is not extracted during the mask extraction process in the process of step S204.
ここで、抽出条件を変更する例として、Y画像データ、Cb画像データ及びCr画像データに対して2値化処理を行う際の係数αの値を変更する場合を例に取り上げているが、この他に、注目点及びその周辺部の画素からなる3×3画素の領域ではなく、例えば注目点及びその周辺部の画素からなる3×3画素の領域に対して、上方向、下方向、左方向或いは右方向に3画素ずらした領域に含まれる画素の画素値の平均値、及び標準偏差をそれぞれ求め、これら値を用いた2値化処理を行うことも可能である。 Here, as an example of changing the extraction condition, the case of changing the value of the coefficient α when binarizing the Y image data, Cb image data, and Cr image data is taken as an example. Other than the 3 × 3 pixel region composed of the pixel of interest and its peripheral portion, for example, the upward direction, the downward direction, and the left side with respect to the 3 × 3 pixel region composed of the pixel of interest and its peripheral portion. It is also possible to obtain an average value and a standard deviation of pixel values of pixels included in a region shifted by three pixels in the right direction or the right direction, and perform binarization processing using these values.
ステップS229は、条件を満足するマスクがあるか否かを判定する処理である。画像処理回路22は、ステップS228の処理を行うことで抽出されたマスクがあるか否かを判定する。抽出したマスクがあれば、画像処理回路22は、ステップS229の判定結果をYesとする。この場合、ステップS226に進む。一方、抽出したマスクがない場合には、ステップS229の判定結果をNoとする。この場合、ステップS230に進む。 Step S229 is processing for determining whether there is a mask that satisfies the condition. The image processing circuit 22 determines whether there is a mask extracted by performing the process of step S228. If there is an extracted mask, the image processing circuit 22 sets the determination result in step S229 to Yes. In this case, the process proceeds to step S226. On the other hand, if there is no extracted mask, the determination result in step S229 is No. In this case, the process proceeds to step S230.
ステップS230は、中央の領域を主要被写体領域として設定する処理である。CPU26は、画像の中央の領域を主要被写体領域として設定する。そして、CPU26は主要被写体領域の情報を記憶部25に書き込む。
Step S230 is a process of setting the central area as the main subject area. The
ステップS231は主要被写体領域情報を表示する処理である。CPU26は、ステップS230にて設定した主要被写体領域の情報を表示部23に出力する。この処理が実行されると、ステップS211に進む。
Step S231 is processing for displaying main subject area information. The
このように、マスク抽出処理で除外されるマスクのうち、中央の領域に位置するマスクがない場合には、抽出条件を変更してマスク抽出処理が再度実行される。再度実行されるマスク抽出処理によりマスクが抽出された場合には、抽出されたマスクを主要被写体領域とした枠が表示される。したがって、ユーザは新たに抽出されたマスクに基づく枠の表示を確認しながら、画角の調整を行うことが可能となる。 As described above, when there is no mask located in the center area among the masks excluded in the mask extraction process, the mask extraction process is executed again by changing the extraction condition. When a mask is extracted by the mask extraction process executed again, a frame with the extracted mask as the main subject area is displayed. Therefore, the user can adjust the angle of view while confirming the display of the frame based on the newly extracted mask.
一方、抽出条件を変更してもマスクが抽出されない場合には、予め設定されている画像の中央の領域を主要被写体領域とした枠が表示される。この場合には、ユーザが注目している対象が枠の中に入るように画角の調整を行うことが可能となる。 On the other hand, if the mask is not extracted even if the extraction condition is changed, a frame with the central area of the preset image as the main subject area is displayed. In this case, the angle of view can be adjusted so that the target focused on by the user falls within the frame.
本実施形態では、ステップS102において注目点を推定する処理を行っているが、この動作を行う必要はなく、例えばユーザによる操作部の入力操作に基づく位置を注目点とすることも可能である。 In the present embodiment, the process of estimating the point of interest is performed in step S102. However, this operation is not necessary, and for example, a position based on the input operation of the operation unit by the user can be set as the point of interest.
本実施形態では、抽出されたマスクのうち、最も評価値の高いマスクを主要被写体領域として設定しているが、例えばマスク抽出処理により抽出されたマスクを全て表示部に表示し、ユーザによる操作部の入力操作により、主要被写体領域とするマスクを選択させることも可能である。 In the present embodiment, among the extracted masks, the mask with the highest evaluation value is set as the main subject region. However, for example, all the masks extracted by the mask extraction process are displayed on the display unit, and the operation unit by the user It is also possible to select a mask as a main subject area by the input operation.
本実施形態では、画像処理装置を備えた撮像装置を例に取り上げているが、これに限定される必要はなく、図2に示す画像処理回路の構成や、図3から図5に示すフローチャートの処理をコンピュータに実行させることが可能な画像処理プログラムであってもよい。この場合、画像処理プログラムは、メモリカード、光学ディスク、磁気ディスクなどコンピュータにて読み取り可能な記憶媒体に記憶されることが好ましい。 In the present embodiment, an imaging apparatus provided with an image processing apparatus is taken as an example, but the present invention is not limited to this, and the configuration of the image processing circuit shown in FIG. 2 and the flowcharts shown in FIGS. It may be an image processing program capable of causing a computer to execute processing. In this case, the image processing program is preferably stored in a computer-readable storage medium such as a memory card, an optical disk, or a magnetic disk.
10…撮像装置、21…撮像部、22…画像処理回路、23…表示部、26…CPU、41…抽出部、42…判定部、43…追尾部、44…評価部、45…設定部
DESCRIPTION OF
Claims (12)
前記抽出部が前記被写体領域を抽出したか否かを判定する第1の判定部と、
前記第1の判定部が前記被写体領域を抽出していないと判定したときに、前記画像が風景の画像であるか否かを推定する推定部と、
前記推定部が前記風景の画像でないと推定したときに、前記被写体領域を抽出する際に用いる抽出条件を変更する条件変更部と、
変更した前記抽出条件を用いて前記画像から前記被写体領域を再度抽出する再抽出部と、
前記変更した前記抽出条件を用いて抽出された前記被写体領域を主要被写体領域として設定する設定部と、
を備えたことを特徴とする画像処理装置。 An extraction unit for extracting a subject area included in the image;
A first determination unit that determines whether or not the extraction unit has extracted the subject region;
An estimation unit that estimates whether the image is a landscape image when the first determination unit determines that the subject region is not extracted;
A condition changing unit that changes an extraction condition used when extracting the subject region when the estimating unit estimates that the image is not the landscape image;
A re-extraction unit that re-extracts the subject area from the image using the extracted extraction condition;
A setting unit that sets the subject area extracted using the changed extraction condition as a main subject area;
An image processing apparatus comprising:
前記第1の判定部が前記被写体領域を抽出していないと判定したときに、前記画像が取得される以前に前記被写体領域を安定して抽出していたか否かを判定する第2の判定部を備え、
前記推定部は、前記第2の判定部が前記被写体領域を安定して抽出していないと判定したときに、前記画像が前記風景の画像であるか否かを推定することを特徴とする画像処理装置。 The image processing apparatus according to claim 1.
A second determination unit that determines whether or not the subject region has been stably extracted before the image is acquired when the first determination unit determines that the subject region has not been extracted; With
The estimation unit is configured to estimate whether the image is an image of the landscape when the second determination unit determines that the subject area is not stably extracted. Processing equipment.
前記推定部は、前記画像の輝度値に基づいて、前記画像が風景の画像であるか否かを推定することを特徴とする画像処理装置。 The image processing apparatus according to claim 1 or 2,
The image processing apparatus, wherein the estimation unit estimates whether or not the image is a landscape image based on a luminance value of the image.
前記設定部は、前記推定部が前記風景の画像であると推定したときに、風景撮影用として設定される領域を前記主要被写体領域として設定することを特徴とする画像処理装置。 The image processing apparatus according to any one of claims 1 to 3,
The image processing apparatus according to claim 1, wherein when the estimation unit estimates that the image is an image of the landscape, the setting unit sets an area set for landscape photography as the main subject area.
前記設定部は、変更した前記抽出条件を用いて前記被写体領域を抽出する処理を行っても前記画像から前記被写体領域を抽出していないときに、前記画像の中央の領域を前記主要被写体領域として設定することを特徴とする画像処理装置。 The image processing apparatus according to claim 1, wherein:
The setting unit sets a central region of the image as the main subject region when the subject region is not extracted from the image even when the subject region is extracted using the changed extraction condition. An image processing apparatus characterized by setting.
前記抽出部は、
前記画像を、輝度画像及び色度画像に変換する変換部と、
前記輝度画像及び前記色度画像のそれぞれに対して前記抽出条件を用いた2値化処理を実行する2値化処理部と、
前記2値化処理により生成された2値化画像を合成する合成部と、
を備えたことを特徴とする画像処理装置。 The image processing apparatus according to any one of claims 1 to 5,
The extraction unit includes:
A conversion unit for converting the image into a luminance image and a chromaticity image;
A binarization processing unit that executes binarization processing using the extraction condition for each of the luminance image and the chromaticity image;
A combining unit that combines the binarized images generated by the binarization process;
An image processing apparatus comprising:
前記抽出部は、合成された2値化画像に含まれる白画素で構成される白画素領域のうち、該白画素領域を含む矩形の面積に対する前記白画素領域の面積の比が閾値以下となる白画素領域を除外することを特徴とする画像処理装置。 The image processing apparatus according to claim 6.
In the extraction unit, the ratio of the area of the white pixel region to the rectangular area including the white pixel region out of the white pixel region composed of white pixels included in the synthesized binary image is equal to or less than a threshold value. An image processing apparatus characterized by excluding a white pixel region.
前記抽出部は、合成された2値化画像に含まれる白画素で構成される白画素領域のうち、該白画素領域を含む矩形の縦横比が所定範囲内に含まれる白画素領域を除外することを特徴とする画像処理装置。 The image processing apparatus according to claim 6.
The extraction unit excludes a white pixel area including a white pixel area including a white pixel area within a predetermined range from white pixel areas including white pixels included in the synthesized binary image. An image processing apparatus.
前記設定部は、変更した前記抽出条件を用いて前記画像から前記被写体領域を抽出する処理を実行したときに、合成された2値化画像に対して設定された所定領域に含まれる白画素領域を前記主要被写体領域として設定することを特徴とする画像処理装置。 The image processing apparatus according to any one of claims 6 to 8,
The setting unit, when executing the process of extracting the subject area from the image using the changed extraction condition, a white pixel area included in a predetermined area set for the synthesized binary image Is set as the main subject area.
前記設定部が設定した前記主要被写体領域の情報を前記画像とともに表示する表示部を、さらに備えることを特徴とする画像処理装置。 The image processing apparatus according to any one of claims 1 to 9,
An image processing apparatus, further comprising: a display unit configured to display information on the main subject region set by the setting unit together with the image.
請求項1から請求項10のいずれか1項に記載の画像処理装置と、
を備えたことを特徴とする撮像装置。 An imaging unit for acquiring the image;
The image processing apparatus according to any one of claims 1 to 10,
An imaging apparatus comprising:
前記抽出工程により前記被写体領域を抽出したか否かを判定する判定工程と、
前記判定工程により前記被写体領域を抽出していないと判定したときに、前記画像が風景の画像であるか否かを推定する推定工程と、
前記推定工程により前記風景の画像でないと推定したときに、前記被写体領域を抽出する際に用いる抽出条件を変更する条件変更工程と、
変更した前記抽出条件を用いて、前記画像から前記被写体領域を再度抽出する再抽出工程と、
前記変更した前記抽出条件を用いて抽出された前記被写体領域を主要被写体領域として設定する設定工程と、
をコンピュータに実行させることが可能な画像処理プログラム。 An extraction step of extracting a subject area included in the image;
A determination step of determining whether or not the subject region has been extracted by the extraction step;
An estimation step of estimating whether or not the image is a landscape image when it is determined that the subject region is not extracted by the determination step;
A condition changing step of changing an extraction condition used when extracting the subject region when the estimation step estimates that the image is not an image of the landscape;
A re-extraction step of re-extracting the subject region from the image using the changed extraction condition;
A setting step of setting the subject region extracted using the changed extraction condition as a main subject region;
An image processing program capable of causing a computer to execute.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2013115642A JP6098374B2 (en) | 2013-05-31 | 2013-05-31 | Image processing apparatus, imaging apparatus, and image processing program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2013115642A JP6098374B2 (en) | 2013-05-31 | 2013-05-31 | Image processing apparatus, imaging apparatus, and image processing program |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2014236310A JP2014236310A (en) | 2014-12-15 |
JP6098374B2 true JP6098374B2 (en) | 2017-03-22 |
Family
ID=52138736
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2013115642A Active JP6098374B2 (en) | 2013-05-31 | 2013-05-31 | Image processing apparatus, imaging apparatus, and image processing program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP6098374B2 (en) |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2010035048A (en) * | 2008-07-30 | 2010-02-12 | Fujifilm Corp | Imaging apparatus and imaging method |
JP2010134176A (en) * | 2008-12-04 | 2010-06-17 | Fujifilm Corp | Photographing device and photographing method |
JP5592720B2 (en) * | 2010-07-14 | 2014-09-17 | オリンパスイメージング株式会社 | Imaging apparatus and imaging method |
-
2013
- 2013-05-31 JP JP2013115642A patent/JP6098374B2/en active Active
Also Published As
Publication number | Publication date |
---|---|
JP2014236310A (en) | 2014-12-15 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP6512810B2 (en) | Image pickup apparatus, control method and program | |
EP3480784B1 (en) | Image processing method, and device | |
EP2429177A1 (en) | Electron camera, image processing device, and image processing method | |
US10306210B2 (en) | Image processing apparatus and image capturing apparatus | |
US9485436B2 (en) | Image processing apparatus and image processing method | |
JP2010263584A (en) | Electronic camera, image processing device, and image processing method | |
WO2015196896A1 (en) | Focusing state prompting method and shooting device | |
US10121067B2 (en) | Image processing apparatus that determines processing target area of an image based on degree of saliency, image processing method, and storage medium | |
US20160117803A1 (en) | Image processing apparatus capable of properly emphasizing differences in brightness between bright spots, image processing method, and storage medium | |
US20130129221A1 (en) | Image processing device, image processing method, and recording medium | |
JP2017143354A (en) | Image processing apparatus and image processing method | |
JP6099973B2 (en) | Subject area tracking device, control method thereof, and program | |
JP6098374B2 (en) | Image processing apparatus, imaging apparatus, and image processing program | |
JP5786544B2 (en) | Image processing apparatus, imaging apparatus, and program | |
JP2015041901A (en) | Image processing device, its control method, control program, and imaging apparatus | |
JP2016148933A (en) | Image processing system and image processing method | |
JP6131519B2 (en) | Image processing apparatus, imaging apparatus, and image processing program | |
JP6248662B2 (en) | Image processing apparatus, imaging apparatus, and image processing program | |
JP6326841B2 (en) | Image processing apparatus, imaging apparatus, and image processing program | |
US20160350924A1 (en) | Image capturing apparatus and image processing method | |
JP2011217355A (en) | Subject specification program, and camera | |
JP2011253099A (en) | Focus detector | |
JP2017182668A (en) | Data processor, imaging device, and data processing method | |
JP6003383B2 (en) | Image processing apparatus, imaging apparatus, and image processing program | |
JP5949306B2 (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: 20160524 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20170116 |
|
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: 20170124 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20170206 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 6098374 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 |