JP5987376B2 - Imaging device - Google Patents
Imaging device Download PDFInfo
- Publication number
- JP5987376B2 JP5987376B2 JP2012055662A JP2012055662A JP5987376B2 JP 5987376 B2 JP5987376 B2 JP 5987376B2 JP 2012055662 A JP2012055662 A JP 2012055662A JP 2012055662 A JP2012055662 A JP 2012055662A JP 5987376 B2 JP5987376 B2 JP 5987376B2
- Authority
- JP
- Japan
- Prior art keywords
- information
- hue
- image
- subject
- unit
- 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
- Color Television Image Signal Generators (AREA)
- Studio Devices (AREA)
Description
本発明は撮像装置に関する。 The present invention relates to an imaging apparatus.
画角内の輝度や色情報の平均値などを用いた条件により撮像画像を二値化して二値画像を生成して、その二値画像の中から被写体を抽出する撮像装置が知られている(たとえば、特許文献1)。 2. Description of the Related Art An imaging device is known that generates a binary image by binarizing a captured image according to a condition using an average value of luminance and color information within an angle of view, and extracts a subject from the binary image. (For example, Patent Document 1).
しかし、特許文献1の方法では、被写体の色相が撮像画像中の背景(被写体以外)の色相の中に埋もれることにより、適切に被写体を抽出することができない虞があった。 However, in the method of Patent Document 1, there is a possibility that the subject cannot be appropriately extracted because the hue of the subject is buried in the background (other than the subject) in the captured image.
本発明による撮像装置は、焦点調節に用いるレンズを介して被写体を撮像する撮像装置であって、色相情報及び彩度情報により被写体に含まれる複数の第1被写体を抽出する第1抽出部と、前記第1抽出部で抽出された前記第1被写体の面積情報と前記第1被写体の慣性モーメント情報とにより前記複数の前記第1被写体から第2被写体を抽出する第2抽出部と、前記第2抽出部により抽出された前記第2被写体に合焦させるように前記レンズを移動させる制御部と、を備え、前記第1抽出部は、予め記憶部に記憶されている前記第1被写体を抽出するための複数の色相情報及び彩度情報から指定された特定の色相情報及び彩度情報により前記複数の第1被写体を抽出する。 An imaging apparatus according to the present invention is an imaging apparatus that images a subject through a lens used for focus adjustment, and a first extraction unit that extracts a plurality of first subjects included in the subject based on hue information and saturation information; A second extraction unit for extracting a second subject from the plurality of first subjects based on the area information of the first subject and the inertia moment information of the first subject extracted by the first extraction unit; A control unit that moves the lens to focus on the second subject extracted by the extraction unit, and the first extraction unit extracts the first subject stored in the storage unit in advance. The plurality of first subjects are extracted based on specific hue information and saturation information designated from the plurality of hue information and saturation information.
本発明によれば、所定の範囲の色相の被写体を適切に抽出することができる。 According to the present invention, it is possible to appropriately extract a subject having a hue within a predetermined range.
以下、図面を参照して本発明を実施するための形態について説明する。図1は、本発明の一実施の形態によるデジタルカメラシステムの構成を例示するブロック図である。図1に例示されるデジタルカメラ1は、撮影レンズ2とレンズ駆動部3と撮像素子4とA/D変換部5と画像処理部6とメモリ7とCPU8と不揮発性メモリ9と表示部10と記録再生部11とを備える。
Hereinafter, embodiments for carrying out the present invention will be described with reference to the drawings. FIG. 1 is a block diagram illustrating the configuration of a digital camera system according to an embodiment of the present invention. A digital camera 1 illustrated in FIG. 1 includes a photographing
撮影レンズ2は、フォーカシングレンズやズームレンズを含むレンズ群で構成されているが、図1では単レンズとして図示している。撮影レンズ2に含まれるフォーカシングレンズは、レンズ駆動部3により光軸O方向に駆動される。
The
撮影レンズ2は、撮像素子4の撮像面4a上に被写体像を結像させる。撮像素子4は、CMOSイメージセンサなどによって構成される。撮像面4a上には、赤色(R),緑色(G),青色(B)のカラーフィルタを有する撮像画素が二次元状に配列されている。
The photographing
図2は、撮像面4aの一部を拡大表示した平面図である。図2に例示された撮像面4aには、R,G,Bのカラーフィルタを有する撮像画素40R,40G,40Bがベイヤ配列されている。撮像素子4の撮像画素は、撮像面4a上に結像された被写体像をアナログ撮像信号に光電変換する。具体的には、撮像画素40Rは、それぞれ赤色(R)のアナログ撮像信号を出力する。撮像画素40Gは、それぞれ緑色(G)のアナログ撮像信号を出力する。撮像画素40Bは、それぞれ青色(B)のアナログ撮像信号を出力する。A/D変換部5は、撮像画素40R,40G,40Bの各々から出力されるアナログ撮像信号をデジタル撮像信号(RAW画像データ)に変換する。
FIG. 2 is a plan view showing an enlarged part of the
画像処理部6は、CPU8の制御により、A/D変換部5から出力されるデジタル撮像信号に対して、ディベイヤ処理、輝度信号の生成、色差信号の生成、カラー画像の二値化処理、ホワイトバランスの調整等の後述する画像処理を施す。画像処理部6は、画像処理を実行する際、バッファメモリとしてメモリ7を利用する。
Under the control of the CPU 8, the
メモリ7は、不揮発性の記憶部であって、画像処理部6によりバッファメモリとして利用されるほか、CPU8の作業領域としても利用される。CPU8は、不揮発性メモリ9に記憶されているプログラム等に基づいて、デジタルカメラ1の各部を制御し、オートフォーカス(AF)処理や露出演算等を行う。不揮発性メモリ9には、CPU8が実行する各種プログラムのほか、画像処理部6が実行する各種画像処理用の設定パラメータが記憶されている。
The
画像処理部6は、CPU8の制御のもと、画像処理後の画像データを、所定形式(JPEG,H.264等)の画像ファイルに変換する。記録再生部11は、CPU8の制御のもと、画像ファイルをメモリカード13に記録する。また、記録再生部11は、CPU8の制御のもと、メモリカード13に記録されている画像ファイルを読出して、表示部10に撮像画像を再生表示させる。メモリカード13は、図示しないカードスロットに着脱自在に取り付けられる記録媒体である。
The
表示部10は、液晶モニタ等であって、CPU8の制御のもと、スルー画像の再生表示や、設定パラメータ(詳細を後述する)の設定画面や、操作メニュー画面などを表示する。
The
操作部材12は、レリーズスイッチ121、操作スイッチ122、電源スイッチ、タッチパネル等を含む。ユーザが操作部材12を操作すると、操作に対応する操作信号がCPU8に出力される。たとえば、レリーズスイッチが通常ストロークの半分程度まで押し下げ操作されると、上記AF処理や露出演算などの撮影準備を行う。そして、レリーズスイッチが通常ストロークまで押し下げ操作されると撮影動作を開始する。
The
図3は、画像処理部6が行う画像処理の一部を例示した機能ブロック図である。画像処理部6は、ディベイヤ処理部60とホワイトバランス部61と輝度信号生成部62と色差信号生成部63と二値化処理部65と区分評価部64と被写体候補抽出部66とを有する。なお、画像処理部6は、図示された画像処理部以外にもガンマ補正部など、様々な画像処理部を有する。
FIG. 3 is a functional block diagram illustrating a part of the image processing performed by the
ディベイヤ処理部60は、A/D変換部5から出力されるRAW画像データに対して周知のディベイヤ処理(ベイヤ補間処理)を行い、RGB画像を生成する。ディベイヤ処理とは、RGB画像の各画素を、周辺の画素との重み付け加算によって補間的に作り出す処理のことである。RGB画像は、各画素ごとにR,G,Bの原色情報を有する。
The
ホワイトバランス部61は、ディベイヤ処理部60により生成されたRGB画像にホワイトバランスゲインを乗ずることによりホワイトバランス処理を施す。ホワイトバランス処理は、環境光の特性に依らず無彩色の被写体が無彩色な画像として撮影されるように調整する処理である。
The
輝度信号生成部62は、RGB画像の各画素について輝度情報Yを生成する。輝度信号生成部62は、たとえば下式[1]を用いて輝度情報Yを演算する。輝度信号生成部62に入力されたRGB画像の全画素に対応する輝度情報Yで表される画像を、Yプレーン画像と称する。
Y=0.299×R+0.587×G+0.114×B …[1]
The luminance
Y = 0.299 * R + 0.587 * G + 0.114 * B [1]
色差信号生成部63は、RGB画像の各画素について色差情報を生成する。色差信号生成部63は、たとえば下式[2],[3]を用いて二つの色差情報CbおよびCrを演算する。
Cb=−0.169×R−0.331×G+0.500×B …[2]
Cr=0.500×R−0.419×G−0.081×B …[3]
色差信号生成部63に入力されたRGB画像の全画素に対応する色差情報Cbで表される画像を、Cbプレーン画像と称する。一方、RGB画像の全画素に対応する色差情報Crで表される画像を、Crプレーン画像と称する。
The color difference
Cb = −0.169 × R−0.331 × G + 0.500 × B (2)
Cr = 0.500 × R−0.419 × G−0.081 × B (3)
An image represented by the color difference information Cb corresponding to all pixels of the RGB image input to the color difference
輝度信号生成部62および色差信号生成部63の処理により、RGB画像は、YCbCr方式の画像に変換される。以降、YCbCr方式の画像のことをYCbCr画像と称する。
The RGB image is converted into a YCbCr image by the processing of the luminance
二値化処理部65は、RGB画像を二値化して二値画像を生成する。二値化処理部65は、RGB画像の二値化に用いる区分(基準)を複数有している。二値化処理部65の詳細については後述する。
The
区分評価部64は、二値化処理部65により生成される二値化画像の中から白画素のまとまり(白画素塊)を抽出して、各白画素塊ごとに評価値を演算する。そして、その評価値に基づいて二値化に用いた区分を評価する。
The
被写体候補抽出部66は、区分評価部64の評価に基づいて、被写体の候補(以降、被写体候補と称する)とする画素塊を抽出する。CPU8は、被写体候補抽出部66により抽出された被写体候補に基づいて、AF処理などを行う。
The subject
―二値化処理部65の詳細―
二値化処理部65は、RGB画像の二値化に用いる区分(基準)を複数有している。二値化処理部65は、ホワイトバランス部61によりホワイトバランス処理が施された後のRGB画像を二値化するもので、二値化処理部65がRGB画像の二値化に用いる区分(基準)を以下に例示する。
(区分1) 輝度情報Y
(区分2) 色差情報Cb
(区分3) 色差情報Cr
(区分4) 色差情報Cbと色差情報Crとに基づく色相
(区分5) 色差情報Cbと色差情報Crとに基づく色相および彩度
-Details of the binarization processing unit 65-
The
(Category 1) Luminance information Y
(Category 2) Color difference information Cb
(Category 3) Color difference information Cr
(Category 4) Hue based on the color difference information Cb and the color difference information Cr (Category 5) Hue and saturation based on the color difference information Cb and the color difference information Cr
―(区分1)―
(区分1)による画像の二値化について説明する。(区分1)については詳細が特許文献1に開示されている。二値化処理部65は、(区分1)を用いて二値化を行う際、Yプレーン画像の全画素の輝度情報Yの平均値EYを算出する。そして、二値化処理部65は、Yプレーン画像の各画素の各輝度情報Yと平均値EYとを比較し、Yプレーン画像を二値化する。たとえば、二値化処理部65は、Y>EYを満足するYプレーン画像の画素を白画素に変換し、Y≦EYとなるYプレーン画像の画素を黒画素に変換して、第1二値画像B1を生成する。また、二値化処理部65は、第1二値画像B1の補数画像B10を生成する。
-(Category 1)-
The binarization of the image by (Category 1) will be described. The details of (Category 1) are disclosed in Patent Document 1. Binarization processing unit 65 (Category 1) when performing binarization is used to calculate the average value E Y of the luminance information Y of all pixels in the Y plane image. Then, the
―(区分2)―
(区分2)による画像の二値化について説明する。(区分2)については詳細が特許文献1に開示されている。二値化処理部65は、(区分2)を用いて二値化を行う際、Cbプレーン画像の全画素の色差情報Cbの平均値ECbを算出する。そして、二値化処理部65は、Cbプレーン画像の各画素の各色差情報Cbと平均値ECbとを比較し、Cb>ECbを満足するCbプレーン画像の画素を白画素に変換し、Cb≦ECbとなるCbプレーン画像の画素を黒画素に変換する。二値化処理部65が(区分2)を用いて生成する二値画像を第2二値画像B2と称する。
-(Category 2)-
The binarization of the image by (Category 2) will be described. Details of (Category 2) are disclosed in Patent Document 1. When performing binarization using (Category 2), the
―(区分3)―
(区分3)による画像の二値化について説明する。(区分3)については詳細が特許文献1に開示されている。二値化処理部65は、(区分3)を用いて二値化を行う際、Crプレーン画像の全画素の色差情報Crの平均値ECrを算出する。そして、二値化処理部65は、Crプレーン画像の各画素の各色差情報Crと平均値ECrとを比較し、Cr>ECrを満足するCrプレーン画像の画素を白画素に変換し、Cr≦ECrとなるCrプレーン画像の画素を黒画素に変換する。二値化処理部65が(区分3)を用いて生成する二値画像を第3二値画像B3と称する。
-(Category 3)-
The binarization of the image by (Category 3) will be described. Details of (Category 3) are disclosed in Patent Document 1.
図4(a)および(b)を例として用いて、区分(3)について二値画像を得る場合の具体例を説明する。なお、(区分1)および(区分2)についても同様である。図4(a)は、撮像画面の一例を図示したものであって、その撮像画面には青空の背景100と主な色相が紫色の車両101(図4(a)中では黒色で塗りつぶしてある)とが含まれている。ユーザは、車両101を被写体として撮像しようとしているものとする。
Using FIGS. 4A and 4B as examples, a specific example in the case of obtaining a binary image for the section (3) will be described. The same applies to (Category 1) and (Category 2). FIG. 4A illustrates an example of an imaging screen, and the imaging screen is painted with a
図4(b)は、図4(a)の撮像画面に対応するCrプレーン画像のヒストグラムである。図4(b)の横軸は色差情報Crのデジタル値を表し、縦軸は各色差情報Crの値の頻度を表す。図4(b)には、背景100の青色に対応するCrの分布200と、車両101の紫色に対応するCrの分布201とが示されている。
FIG. 4B is a histogram of the Cr plane image corresponding to the imaging screen of FIG. The horizontal axis of FIG. 4B represents the digital value of the color difference information Cr, and the vertical axis represents the frequency of the value of each color difference information Cr. FIG. 4B shows a
さらに、図4(b)には色差情報Crの平均値ECrが図示されている。青色に対応するCrの分布200は平均値ECrよりも左側(Cr≦ECr)に存在し、紫色に対応するCrの分布201は平均値ECrよりも右側(Cr>ECr)に存在している。二値化処理部65は、平均値ECrに基づいて、図4(a)の背景100の画素を黒画素に変換し、車両101の画素を白画素に変換する。このように背景と被写体の色が異なる場合、(区分3)により被写体が適切に抽出された二値画像が得られる可能性が高い。
Further, the average value E Cr of chrominance information Cr is shown in Figure 4 (b). The
しかし、(区分1)〜(区分3)では、たとえば背景に様々な色が混在している場合などに、平均値ECr等が適切に設定されず、被写体が背景と同じ色(白黒)に二値化されてしまう虞がある。 However, in (Category 1) to (Category 3), for example, when various colors are mixed in the background, the average value ECr or the like is not set appropriately, and the subject has the same color (black and white) as the background. There is a risk of binarization.
図5は、背景に様々な色が混在している場合のCrプレーン画像のヒストグラムの一例である。図5に図示される分布202は、背景に関する色差情報Crの分布であり、ヒストグラム全域に広がっている。図5に図示される分布203は、被写体(たとえば、図4(a)の車両101)に関する色差情報Crの分布であり、分布202の中に紛れてしまっている(埋没している)。図5では、背景に様々な色が混在しているため、分布203が平均値ECrよりも左側に設定されてしまい、被写体が黒画素に二値化されてしまう。以下で説明する(区分4)や(区分5)は、図5のように背景の色の影響で被写体が適切に二値化されない状況の発生を低減する。
FIG. 5 is an example of a histogram of a Cr plane image when various colors are mixed in the background. A
―(区分4)―
(区分4)による画像の二値化について説明する。(区分4)を用いた二値化では、YCbCr画像を二値化する。(区分4)を用いた二値化では、色差情報Cbと色差情報Crの範囲を指定することで、白画素に変換する色相の範囲を指定する。色相の範囲は、図6に示すような色相環上に設定される。図6に図示された色相環300は、YCbCr色空間を表し、所定の半径を有し中心301を中心とする正円である。色差情報Cbと色差情報Crとを指定することで、色相環300に示す所定の色相と彩度の色を指定することができる。図6には、色相環300上の赤色と黄色と紫色の色相の概略位置が図示されている。
-(Category 4)-
The binarization of the image by (Category 4) will be described. In binarization using (Category 4), the YCbCr image is binarized. In binarization using (Category 4), the range of hues to be converted into white pixels is specified by specifying the range of color difference information Cb and color difference information Cr. The hue range is set on a hue circle as shown in FIG. A
図7は、YCbCr色空間に設定された色相の範囲の一例を示す図である。図7では、図を見易くするため、色相環300を白抜きの正円で図示している。図7には、YCrCb色空間の原点(色相環300の中心301)を通過する第1直線311と第2直線312とが図示されている。第1直線311の傾きaと第2直線312の傾きbとは互いに異なる。
FIG. 7 is a diagram illustrating an example of a hue range set in the YCbCr color space. In FIG. 7, in order to make the drawing easy to see, the
図7中のハッチング領域は、(区分4)を用いる二値化処理部65により設定される色相の範囲320を例示したものである。色相の範囲320は、第1直線311と第2直線312と色相環300の外周とで囲われた閉領域のうち、下記条件式[4]を満足する範囲である。ここで、係数k1=a,係数k2=1/bである。a,bは、それぞれ第1直線311と第2直線312の傾きである。
Cb−Cr×k1>0 かつ Cr−Cb×k2>0 …[4]
The hatched area in FIG. 7 illustrates the
Cb-Cr * k1> 0 and Cr-Cb * k2> 0 ... [4]
二値化処理部65は、YCbCr画像の画素のうち、画素に対応する色差情報Crと画素に対応する色差情報Cbとが上記条件式[4]を満足する画素を白画素に変換し、上記条件式[4]を満足しない画素を黒画素に変換する。二値化処理部65が(区分4)を用いて生成する二値画像を第4二値画像B4と称する。
The
(区分4)を用いてYCbCr画像の二値化を行う場合、係数k1および係数k2を適切に選択すれば、図5のように被写体の分布203が背景の分布202の中に紛れている場合であっても、分布203に対応する色相(図5の場合、紫)と略一致する色相(たとえば、図5の場合、青紫、紫、マゼンタ等)を有する画素のみを白画素に変換することができる。
When binarizing a YCbCr image using (Category 4), if the coefficient k1 and the coefficient k2 are appropriately selected, the
係数k1および係数k2は、不揮発性メモリ9に設定パラメータとして複数の組み合わせが記憶されており、CPU8により使用する係数k1と係数k2の組み合わせが指定される。画像処理部6は、CPU8により指定された係数k1および係数k2を用いる。不揮発性メモリ9には、自然界に少ない色相の範囲(たとえば、青紫、紫、マゼンタ等)や、自然界で背景に紛れやすい色相の範囲(たとえば、黄みの橙、黄等。花の色に多く見られ茎や葉の緑系の色に紛れ易い)を指定するための係数k1および係数k2が記憶されている。
A plurality of combinations of the coefficient k1 and the coefficient k2 are stored as setting parameters in the
―(区分5)―
(区分5)による画像の二値化について説明する。(区分5)を用いた二値化では、YCbCr画像を二値化する。(区分5)を用いた二値化では、色差情報Cbと色差情報Crとを用いて、白画素に変換する色相と彩度の範囲を指定する。色相と彩度の範囲は、(区分4)と同様に図7の色相環300上に設定される。
-(Category 5)-
The binarization of the image by (Category 5) will be described. In binarization using (Category 5), the YCbCr image is binarized. In binarization using (Category 5), the range of hue and saturation to be converted into white pixels is specified using the color difference information Cb and the color difference information Cr. The range of hue and saturation is set on the
二値化処理部65は、(区分5)を用いてYCbCr画像を二値化するとき、YCbCr色空間を表す色相環300上に色相および彩度の範囲を設定する。図8は、色相環300上に設定された色相および彩度の範囲の一例を示す図である。
When the
図8には、YCbCr色空間の原点(色相環300の中心301)を通過する第1直線311および第2直線312と、YCbCr色空間の原点(色相環300の中心301)を円の中心とする正円313とが図示されている。第1直線311と第2直線312とは、(区分4)で説明したものと同様であり、色相の範囲を設定するために用いられる。正円313は、彩度の範囲を設定するために用いられる。正円313の半径Tは、色相環300の半径以下になるように設定される。
FIG. 8 shows the first
図8中のハッチング領域は、(区分5)を用いる二値化処理部65により設定される色相と彩度の範囲321を例示したものである。色相と彩度の範囲321は、第1直線311と第2直線312と正円313と色相環300の外周とで囲われた閉領域であり、下記条件式[5]を満足する範囲である。ここで、係数k1=a,係数k2=1/bである。a,bは、それぞれ第1直線311と第2直線312の傾きである。
Cb−Cr×k1>0 かつ Cr−Cb×k2>0 かつ Cb2+Cr2≧T
…[5]
The hatched area in FIG. 8 illustrates the hue and
Cb-Cr × k1> 0 and Cr-Cb × k2> 0 and Cb 2 + Cr 2 ≧ T
... [5]
二値化処理部65は、YCbCr画像の画素のうち、画素に対応する色差情報Crと画素に対応する色差情報Cbとが上記条件式[5]を満足する画素を白画素に変換し、上記条件式[5]を満足しない画素を黒画素に変換する。二値化処理部65が(区分5)を用いて生成する二値画像を第5二値画像B5と称する。
The
彩度の範囲を決定するための閾値として用いられる半径Tは、CPU8により指定される。そして、画像処理部6は、CPU8により指定された係数k1,係数k2,半径T(閾値T)を用いる。
The radius T used as a threshold value for determining the saturation range is designated by the CPU 8. The
半径T(閾値T)は、不揮発性メモリ9に設定パラメータとして、係数k1と係数k2の組み合わせとともに記憶されている。半径T(閾値T)の値は、係数k1と係数k2の組み合わせごと(すなわち、所定の色相の範囲ごと)に設定されている。たとえば、自然界に少ない色相の範囲(たとえば、青紫、紫、マゼンタ等)の場合は色相環300の半径の20%〜30%程度の値に設定され、自然界で背景に紛れやすい色相の範囲(たとえば、黄みの橙、黄等。花の色に多く見られ茎や葉の緑系の色に紛れ易い)の場合は色相環300の半径の70%程度の値に設定される。
The radius T (threshold value T) is stored in the
―区分評価部64の処理―
図9を用いて、区分評価部64の処理について説明する。図9は、区分評価部64の処理に関するフローチャートを例示するものである。区分評価部64には、二値化処理部65により生成された二値画像が入力される。
-Processing of the category evaluation unit 64-
The processing of the
ステップS660では、区分評価部64は、ラベリング処理と称する処理を実行する。ラベリング処理とは、入力された二値画像の中から白画素のまとまり(白画素塊)を抽出し、その白画素塊にラベルと呼ばれる識別用の情報を付与することである。区分評価部64は、ラベリング処理により二値画像内で分離している白画素塊にそれぞれ異なるラベルを付与する。
In step S660, the
ステップS661では、区分評価部64は、ステップS660でラベリング処理された各白画素塊について、その面積を算出する。たとえば、各白画素塊を構成する白画素の画素数を算出し、これを面積とする。
In step S661, the
ステップS662では、区分評価部64は、白画素の重心を中心として二値画像の慣性モーメント(白画素の重心周りの慣性モーメント)を演算する。たとえば、区分評価部64は、二値画像の各画素について、その画素の二値(0または1)と、白画素の重心からその画素までの距離の二乗とを乗じた積を演算する。そして、各画素ごとに演算した積の総和を白画素の重心周りの慣性モーメントとして演算する。
In step S662, the
ステップS663では、区分評価部64は、ステップS660でラベリング処理された各白画素塊について、ステップS661で演算した白画素塊の面積とステップS662で演算した白画素の重心周りの慣性モーメントとに基づく下式[6]により、第1評価値を演算する。
第1評価値=白画素塊の面積/白画素の重心周りの慣性モーメント …[6]
In step S663, the
First evaluation value = area of white pixel block / moment of inertia around the center of gravity of the white pixel [6]
ステップS664では、区分評価部64は、ステップS663で白画素塊ごとに演算された第1評価値に基づいて、入力された二値画像を生成したときの区分に関する第2評価値を演算する。たとえば、ステップS663で白画素塊ごとに演算された第1評価値の最大値を区分に関する第2評価値とする。
In step S664, the
―撮像準備動作―
図10を用いて、CPU8により実行されるデジタルカメラ1の撮像準備動作に関するフローチャートの一例である。図11に例示する撮像準備動作は、操作部材12に含まれるレリーズスイッチが通常ストロークの半分程度まで押し下げ操作されたときに実行を開始する。
―Image preparation operation―
FIG. 10 is an example of a flowchart regarding an imaging preparation operation of the digital camera 1 executed by a CPU 8 using FIG. The imaging preparation operation illustrated in FIG. 11 is started when the release switch included in the
ステップS801では、CPU8は、撮像素子4とA/D変換部5と画像処理部6のディベイヤ処理部60とを制御して、被写体像に関するRGB画像を生成させる。ステップS802では、CPU8は、画像処理部6の輝度信号生成部62と色差信号生成部63とを制御して、RGB画像の各画素について輝度情報Yと色差情報CbおよびCrを生成させる。これにより、被写体像に関するRGB画像が被写体像に関するYCbCr画像に変換される。
In step S801, the CPU 8 controls the imaging device 4, the A /
ステップS803では、CPU8は、画像処理部6の二値化処理部65を制御して、第4二値画像B4(二値化処理部65が区分(4)を用いて生成する二値画像)と第5二値画像B5(二値化処理部65が区分(5)を用いて生成する二値画像)とを生成させる。CPU8は、不揮発性メモリ9に記憶された係数k1および係数k2の組み合わせとその組み合わせに対応する閾値Tを指定して、画像処理部6の二値化処理部65を制御する。
In step S803, the CPU 8 controls the
ステップS804では、CPU8は、画像処理部6の区分評価部64を制御して、ステップS803で生成した第4二値画像B4と第5二値画像B5とに基づき(区分4)と(区分5)に関する第2評価値をそれぞれ演算する(図9)。
In step S804, the CPU 8 controls the
ステップS805では、CPU8は、ステップS804で演算された(区分4)に関する第2評価値と(区分5)に関する第2評価値との少なくとも一方が所定値以上か否かを判定する。ステップS805が肯定判定されたらステップS806に進み、否定判定されたらステップS807に進む。 In step S805, the CPU 8 determines whether or not at least one of the second evaluation value related to (section 4) and the second evaluation value related to (section 5) calculated in step S804 is greater than or equal to a predetermined value. If a positive determination is made in step S805, the process proceeds to step S806, and if a negative determination is made, the process proceeds to step S807.
ステップS806では、CPU8は、ステップS805で所定値以上と判定された区分を用いて生成された二値画像に含まれる白画素塊の中から被写体候補とする白画素塊を抽出する。たとえば、第1評価値が所定以上の白画素塊を被写体候補として抽出する。ステップS805において、(区分4)および(区分5)の第2評価値がいずれも所定値以上であった場合は互いの第2評価値を比較して、いずれの区分の白画素塊を被写体候補とするかを決定してもよい。 In step S806, the CPU 8 extracts a white pixel block as a subject candidate from white pixel blocks included in the binary image generated using the classification determined to be equal to or greater than the predetermined value in step S805. For example, a white pixel block having a first evaluation value equal to or greater than a predetermined value is extracted as a subject candidate. In step S805, if the second evaluation values of (Category 4) and (Category 5) are both equal to or greater than the predetermined value, the second evaluation values are compared with each other, and the white pixel block of any division is selected as the subject candidate. It may be determined whether or not.
ステップS807では、CPU8は、画像処理部6の二値化処理部65を制御して、第1二値画像B1および補数画像B10(二値化処理部65が区分(1)を用いて生成する)と第2二値画像B2(二値化処理部65が区分(2)を用いて生成する二値画像)と第3二値画像B3(二値化処理部65が区分(3)を用いて生成する二値画像)とを生成させる。
In step S807, the CPU 8 controls the
ステップS808では、CPU8は、画像処理部6の区分評価部64を制御して、ステップS807で生成した第1二値画像B1と第2二値画像B2と第3二値画像B3と補数画像B10とに基づき(区分1)〜(区分3)に関する第2評価値をそれぞれ演算する(図9)。
In step S808, the CPU 8 controls the
ステップS809では、CPU8は、第1二値画像B1と第2二値画像B2と第3二値画像B3とに含まれる白画素塊の中から被写体候補とする白画素塊を抽出する。たとえば、CPU8は、ステップS808で演算された第2評価値に基づいて、(区分1)〜(区分3)の優先順位付け(たとえば、第2評価値の昇順)を行う。そして、CPU8は、最も優先順位の高い区分を用いて生成された二値画像のうち第1評価値が所定以上の白画素塊を被写体候補として抽出する。 In step S809, the CPU 8 extracts a white pixel block as a subject candidate from white pixel blocks included in the first binary image B1, the second binary image B2, and the third binary image B3. For example, the CPU 8 performs prioritization (for example, ascending order of the second evaluation value) of (Category 1) to (Category 3) based on the second evaluation value calculated in Step S808. Then, the CPU 8 extracts a white pixel block having a first evaluation value greater than or equal to a predetermined value as a subject candidate from the binary image generated using the category with the highest priority.
ステップS810では、CPU8は、ステップS806またはステップS809で抽出された被写体候補にAFエリアを設定して、AF処理を実行する。 In step S810, the CPU 8 sets an AF area for the subject candidate extracted in step S806 or step S809, and executes AF processing.
以上で説明した実施の形態によれば、以下の作用効果が得られる。
本発明によるデジタルカメラ1は、被写体像を撮像して撮像画像を出力する撮像素子4と、撮像画像の各画素に関して色差情報Cbと色差情報Crとを生成する色差信号生成部63と、色差情報CbおよびCrの所定の範囲を指定して、所定の範囲(図7の色相の範囲320)の色相を有する被写体候補を抽出する区分評価部64と二値化処理部65と被写体候補抽出部66とを備える。このような構成を有することにより所定の範囲の色相の被写体を適切に抽出することができる。
According to the embodiment described above, the following operational effects can be obtained.
The digital camera 1 according to the present invention includes an image sensor 4 that captures a subject image and outputs a captured image, a color difference
以上で説明した実施の形態は、以下のように変形して実施できる。
(変形例1)撮像面4a上の撮像画素の配列はベイヤ配列に限らない。
(変形例2)図10のステップS807の処理は、ステップS803の処理と並行して実施してもよい。
The embodiment described above can be implemented with the following modifications.
(Modification 1) The arrangement of the imaging pixels on the
(Modification 2) The process of step S807 in FIG. 10 may be performed in parallel with the process of step S803.
(変形例3)係数k1およびk2の値は、ホワイトバランス部61のホワイトバランスゲインごとに異なる値に設定してもよい。不揮発性メモリ9にホワイトバランス部のホワイトバランスゲインごとに異なる係数k1およびk2を記憶させ、ホワイトバランス部61の設定に基づいて、CPU8が読み出すことにすればよい。
(Modification 3) The values of the coefficients k1 and k2 may be set to different values for each white balance gain of the
(変形例4)係数k1およびk2と、所定の閾値Tとは、ユーザが設定できるようにしてもよい。図11は、表示部10に表示されるユーザが係数k1およびk2と所定の閾値Tとを設定するための設定入力画面の一例である。図11の設定入力画面900には、色相環300と、係数k1を設定するための第1線分表示901と、係数k2を設定するための第2線分表示902と、閾値Tを設定するための円表示903とが表示されている。第1線分表示901および第2線分表示902は、色相環300の中心301から色相環300の外周までの線分である。第1線分表示901および第2線分表示902の傾きは、操作スイッチ122を介してユーザが設定可能である。また、円表示903の中心は、色相環300の中心301と一致する。円表示903の半径は、操作スイッチ122を介してユーザが設定可能である。
(Modification 4) The coefficients k1 and k2 and the predetermined threshold T may be set by the user. FIG. 11 is an example of a setting input screen for the user displayed on the
CPU8は、たとえば第1線分表示901の傾きaを係数k1として不揮発性メモリ9に記憶する。また、CPU8は、第2線分表示902の傾きbの逆数を係数k2として不揮発性メモリ9に記憶する。CPU8は、円表示903の半径に基づいて、閾値Tを決定し、不揮発性メモリ9に記憶する。
For example, the CPU 8 stores the inclination a of the first
第1線分表示901および第2線分表示902と円表示903と色相環300の外周とで囲われる選択領域904は、ユーザが選択した色相と彩度の範囲である。選択領域904内の色の画素は、二値化処理部65による(区分5)を用いた二値化によって白画素に変換される。なお、選択領域904は、色相環300の他の領域と異なる表示態様で表示してもよい。たとえば、選択領域904のみを点滅させるなどの表示態様が実施可能である。
A
(変形例5)色差情報Cbおよび色差情報Crのいずれかの代わりにG−Yに基づく色差情報Cgを利用してもよい。
(変形例6)(区分4)および(区分5)において、条件式[4]や条件式[5]を満足する画素を黒画素に変換し、条件式[4]や条件式[5]を満足しない画素を白画素に変換することにしてもよい。
(Modification 5) Color difference information Cg based on G-Y may be used in place of either the color difference information Cb or the color difference information Cr.
(Modification 6) In (Category 4) and (Category 5), a pixel satisfying conditional expression [4] or conditional expression [5] is converted into a black pixel, and conditional expression [4] or conditional expression [5] is changed to Unsatisfied pixels may be converted into white pixels.
以上で説明した実施の形態や変形例はあくまで例示に過ぎず、発明の特徴が損なわれない限り本発明はこれらの内容に限定されない。また、以上で説明した実施の形態や変形例は発明の特徴が損なわれない限り組み合わせて実行してもよい。 The embodiments and modifications described above are merely examples, and the present invention is not limited to these contents as long as the features of the invention are not impaired. Further, the embodiments and modifications described above may be combined and executed as long as the features of the invention are not impaired.
1 デジタルカメラ
2 撮影レンズ
3 レンズ駆動部
4 撮像素子
5 A/D変換部
6 画像処理部
7 メモリ
8 CPU
9 不揮発性メモリ
10 表示部
11 記録再生部
60 ディベイヤ処理部
61 ホワイトバランス部
62 輝度信号生成部
63 色差信号生成部
64 区分評価部
65 二値化処理部
66 被写体候補抽出部
300 色相環
320 色相の範囲
321 色相と彩度の範囲
DESCRIPTION OF SYMBOLS 1
9
Claims (8)
色相情報及び彩度情報により被写体に含まれる複数の第1被写体を抽出する第1抽出部と、
前記第1抽出部で抽出された前記第1被写体の面積情報と前記第1被写体の慣性モーメント情報とにより前記複数の前記第1被写体から第2被写体を抽出する第2抽出部と、
前記第2抽出部により抽出された前記第2被写体に合焦させるように前記レンズを移動させる制御部と、を備え、
前記第1抽出部は、予め記憶部に記憶されている前記第1被写体を抽出するための複数の色相情報及び彩度情報から指定された特定の色相情報及び彩度情報により前記複数の第1被写体を抽出する撮像装置。 An imaging device that images a subject via a lens used for focus adjustment,
A first extraction unit that extracts a plurality of first subjects included in the subject based on hue information and saturation information;
A second extraction unit for extracting a second subject from the plurality of first subjects based on the area information of the first subject and the moment of inertia information of the first subject extracted by the first extraction unit;
A control unit that moves the lens so as to focus on the second subject extracted by the second extraction unit;
The first extraction unit uses the specific hue information and saturation information specified from the plurality of hue information and saturation information for extracting the first subject stored in advance in the storage unit, based on the specific hue information and saturation information. An imaging device that extracts a subject .
前記第1抽出部は、予め記憶部に記憶されている前記第1被写体を抽出するための複数の色相情報及び彩度情報から紫色の色相情報により前記複数の第1被写体を抽出する撮像装置。The first extraction unit is an image pickup apparatus that extracts the plurality of first subjects based on purple hue information from the plurality of hue information and saturation information for extracting the first subject stored in advance in a storage unit.
前記第1抽出部は、予め記憶部に記憶されている前記第1被写体を抽出するための複数の色相情報及び彩度情報から青紫色の色相情報により前記複数の第1被写体を抽出する撮像装置。The first extraction unit is configured to extract the plurality of first subjects from the plurality of hue information and saturation information for extracting the first subject stored in advance in the storage unit based on bluish violet hue information. .
前記第1抽出部は、予め記憶部に記憶されている前記第1被写体を抽出するための複数の色相情報及び彩度情報からマゼンダ色の色相情報により前記複数の第1被写体を抽出する撮像装置。The first extraction unit is configured to extract the plurality of first subjects from the plurality of hue information and saturation information for extracting the first subject stored in advance in the storage unit based on magenta hue information. .
前記第1抽出部は、予め記憶部に記憶されている前記第1被写体を抽出するための複数の色相情報及び彩度情報から黄色の色相情報により前記複数の第1被写体を抽出する撮像装置。The first extraction unit is an imaging device that extracts the plurality of first subjects based on yellow hue information from the plurality of hue information and saturation information for extracting the first subject stored in advance in a storage unit.
前記第1抽出部は、予め記憶部に記憶されている前記第1被写体を抽出するための複数の色相情報及び彩度情報から橙色の色相情報により前記複数の第1被写体を抽出する撮像装置。The first extraction unit is an imaging device that extracts the plurality of first subjects from the plurality of hue information and saturation information for extracting the first subject stored in advance in a storage unit based on orange hue information.
前記特定の色相情報及び彩度情報は、設定されているホワイトバランスの設定値に基づいて指定される撮像装置。 The specific hue information and saturation information are specified based on a set white balance setting value.
色相及び彩度から構成される色相環を表示する表示部を備え、A display unit for displaying a hue circle composed of hue and saturation;
前記特定の色相情報及び彩度情報は、前記表示部で表示された色相環を用いて設定された色相情報及び彩度情報である撮像装置。The image pickup apparatus, wherein the specific hue information and saturation information are hue information and saturation information set using a hue circle displayed on the display unit.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2012055662A JP5987376B2 (en) | 2012-03-13 | 2012-03-13 | Imaging device |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2012055662A JP5987376B2 (en) | 2012-03-13 | 2012-03-13 | Imaging device |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2013191966A JP2013191966A (en) | 2013-09-26 |
| JP5987376B2 true JP5987376B2 (en) | 2016-09-07 |
Family
ID=49391829
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2012055662A Active JP5987376B2 (en) | 2012-03-13 | 2012-03-13 | Imaging device |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP5987376B2 (en) |
Families Citing this family (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN107710278A (en) | 2015-06-18 | 2018-02-16 | 日本电气方案创新株式会社 | Image processing device, image processing method, and computer-readable recording medium |
| JP6999318B2 (en) * | 2017-07-24 | 2022-01-18 | ラピスセミコンダクタ株式会社 | Imaging device and horizontal detection method |
Family Cites Families (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPS6169291A (en) * | 1984-09-12 | 1986-04-09 | Hitachi Ltd | color area extraction device |
| JPH06225328A (en) * | 1993-01-27 | 1994-08-12 | Hitachi Ltd | Subject extraction device |
| JP3505496B2 (en) * | 2000-09-20 | 2004-03-08 | 川崎重工業株式会社 | Image processing method and image processing apparatus |
| JP4039147B2 (en) * | 2002-07-03 | 2008-01-30 | コニカミノルタオプト株式会社 | Imaging device |
| JP4403397B2 (en) * | 2004-07-21 | 2010-01-27 | ソニー株式会社 | User interface providing device |
| JP5246078B2 (en) * | 2009-07-10 | 2013-07-24 | 株式会社ニコン | Object location program and camera |
| JP5609425B2 (en) * | 2010-08-24 | 2014-10-22 | 株式会社ニコン | Image processing apparatus, imaging apparatus, and image processing program |
-
2012
- 2012-03-13 JP JP2012055662A patent/JP5987376B2/en active Active
Also Published As
| Publication number | Publication date |
|---|---|
| JP2013191966A (en) | 2013-09-26 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP5601407B2 (en) | Image classification program, image classification apparatus, and electronic camera | |
| US9325957B2 (en) | Image processing device, method, recording medium and imaging device | |
| JP2011019177A (en) | Program for specify subject position, and camera | |
| US10834370B2 (en) | Image processing apparatus, image processing method, and non-transitory computer readable medium for color conversion | |
| US7668368B2 (en) | Image processing apparatus, camera apparatus, image output apparatus, image processing method, color correction processing program and computer readable recording medium | |
| JP5987376B2 (en) | Imaging device | |
| TWI491974B (en) | Image black print search system and method | |
| JP6415094B2 (en) | Image processing apparatus, imaging apparatus, image processing method, and program | |
| JP5149858B2 (en) | Color image representative color determination device and operation control method thereof | |
| JP6156532B2 (en) | Region extraction device, imaging device, and region extraction program | |
| JP6089476B2 (en) | Image processing apparatus, imaging apparatus, and image processing program | |
| US10929960B2 (en) | Method and image processing device for detecting a portion of an image | |
| US8743230B2 (en) | Digital photographing apparatus, method for controlling the same, and recording medium storing program to execute the method | |
| JP5786544B2 (en) | Image processing apparatus, imaging apparatus, and program | |
| JP6131519B2 (en) | Image processing apparatus, imaging apparatus, and image processing program | |
| CN102243760B (en) | Image black spot search system and method | |
| JP2013034154A (en) | Region extraction device, imaging device, and region extraction program | |
| JP5606300B2 (en) | IMAGING DEVICE AND IMAGING DEVICE CONTROL METHOD | |
| JP6257292B2 (en) | Image processing apparatus, control method thereof, and control program | |
| JP2014022826A (en) | Image processing apparatus, imaging apparatus, and image processing program | |
| JP6508259B2 (en) | Imaging device and program | |
| JP2013161286A (en) | Mask extraction program, image processing apparatus, and imaging device | |
| JP2008071014A (en) | Image processing program, image processing apparatus, and electronic camera | |
| JP2017116606A (en) | Focus adjustment device, imaging device and program | |
| JP2019126090A (en) | Imaging apparatus and program |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20150312 |
|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20160122 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20160126 |
|
| A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20160328 |
|
| 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: 20160712 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20160725 |
|
| R150 | Certificate of patent or registration of utility model |
Ref document number: 5987376 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 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |