Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JP5987376B2 - Imaging device - Google Patents
[go: Go Back, main page]

JP5987376B2 - Imaging device - Google Patents

Imaging device Download PDF

Info

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
Application number
JP2012055662A
Other languages
Japanese (ja)
Other versions
JP2013191966A (en
Inventor
鉄人 河津
鉄人 河津
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nikon Corp
Original Assignee
Nikon Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nikon Corp filed Critical Nikon Corp
Priority to JP2012055662A priority Critical patent/JP5987376B2/en
Publication of JP2013191966A publication Critical patent/JP2013191966A/en
Application granted granted Critical
Publication of JP5987376B2 publication Critical patent/JP5987376B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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).

特開2011−019177号公報JP 2011-0119177 A

しかし、特許文献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.

本発明の一実施の形態によるデジタルカメラの構成を例示するブロック図である。It is a block diagram which illustrates the composition of the digital camera by one embodiment of the invention. 撮像素子の平面図である。It is a top view of an image sensor. 画像処理部の機能ブロック図である。It is a functional block diagram of an image processing part. 撮像画面の一例とそのCrプレーン画像のヒストグラムの一例である。It is an example of the histogram of an example of an imaging screen, and the Cr plane image. Crプレーン画像のヒストグラムの一例である。It is an example of the histogram of a Cr plane image. YCbCr色空間の一部を表す色相環である。It is a hue circle representing a part of the YCbCr color space. 色差情報に基づいて所定の色相の範囲を指定する方法を説明するための図である。It is a figure for demonstrating the method of designating the range of a predetermined hue based on color difference information. 色差情報に基づいて所定の色相の範囲と所定の彩度の範囲とを指定する方法を説明するための図である。It is a figure for demonstrating the method of designating the range of a predetermined hue and the range of a predetermined saturation based on color difference information. 画像処理部の区分評価部の動作に関するフローチャートの一例である。It is an example of the flowchart regarding operation | movement of the classification | category evaluation part of an image processing part. デジタルカメラが実行する撮像準備動作に関するフローチャートの一例である。It is an example of the flowchart regarding the imaging preparation operation which a digital camera performs. 設定入力画面の一例を示す図である。It is a figure which shows an example of a setting input screen.

以下、図面を参照して本発明を実施するための形態について説明する。図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 lens 2, a lens driving unit 3, an image sensor 4, an A / D conversion unit 5, an image processing unit 6, a memory 7, a CPU 8, a nonvolatile memory 9, and a display unit 10. And a recording / reproducing unit 11.

撮影レンズ2は、フォーカシングレンズやズームレンズを含むレンズ群で構成されているが、図1では単レンズとして図示している。撮影レンズ2に含まれるフォーカシングレンズは、レンズ駆動部3により光軸O方向に駆動される。   The photographic lens 2 is composed of a lens group including a focusing lens and a zoom lens, but is illustrated as a single lens in FIG. The focusing lens included in the photographic lens 2 is driven in the direction of the optical axis O by the lens driving unit 3.

撮影レンズ2は、撮像素子4の撮像面4a上に被写体像を結像させる。撮像素子4は、CMOSイメージセンサなどによって構成される。撮像面4a上には、赤色(R),緑色(G),青色(B)のカラーフィルタを有する撮像画素が二次元状に配列されている。   The photographing lens 2 forms a subject image on the imaging surface 4 a of the imaging element 4. The image sensor 4 is configured by a CMOS image sensor or the like. On the imaging surface 4a, imaging pixels having red (R), green (G), and blue (B) color filters are arranged two-dimensionally.

図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 imaging surface 4a. Image pickup pixels 40R, 40G, and 40B having R, G, and B color filters are arranged in a Bayer array on the image pickup surface 4a illustrated in FIG. The imaging pixels of the imaging device 4 photoelectrically convert the subject image formed on the imaging surface 4a into an analog imaging signal. Specifically, each of the imaging pixels 40R outputs a red (R) analog imaging signal. The imaging pixels 40G each output a green (G) analog imaging signal. The imaging pixels 40B each output a blue (B) analog imaging signal. The A / D converter 5 converts the analog imaging signal output from each of the imaging pixels 40R, 40G, and 40B into a digital imaging signal (RAW image data).

画像処理部6は、CPU8の制御により、A/D変換部5から出力されるデジタル撮像信号に対して、ディベイヤ処理、輝度信号の生成、色差信号の生成、カラー画像の二値化処理、ホワイトバランスの調整等の後述する画像処理を施す。画像処理部6は、画像処理を実行する際、バッファメモリとしてメモリ7を利用する。   Under the control of the CPU 8, the image processing unit 6 performs debayer processing, luminance signal generation, color difference signal generation, color image binarization processing, white processing on the digital imaging signal output from the A / D conversion unit 5. Image processing to be described later such as balance adjustment is performed. The image processing unit 6 uses the memory 7 as a buffer memory when executing image processing.

メモリ7は、不揮発性の記憶部であって、画像処理部6によりバッファメモリとして利用されるほか、CPU8の作業領域としても利用される。CPU8は、不揮発性メモリ9に記憶されているプログラム等に基づいて、デジタルカメラ1の各部を制御し、オートフォーカス(AF)処理や露出演算等を行う。不揮発性メモリ9には、CPU8が実行する各種プログラムのほか、画像処理部6が実行する各種画像処理用の設定パラメータが記憶されている。   The memory 7 is a non-volatile storage unit, and is used as a buffer memory by the image processing unit 6 and also as a work area for the CPU 8. The CPU 8 controls each part of the digital camera 1 based on a program stored in the non-volatile memory 9 and performs autofocus (AF) processing, exposure calculation, and the like. The nonvolatile memory 9 stores various programs executed by the CPU 8 and setting parameters for various image processes executed by the image processing unit 6.

画像処理部6は、CPU8の制御のもと、画像処理後の画像データを、所定形式(JPEG,H.264等)の画像ファイルに変換する。記録再生部11は、CPU8の制御のもと、画像ファイルをメモリカード13に記録する。また、記録再生部11は、CPU8の制御のもと、メモリカード13に記録されている画像ファイルを読出して、表示部10に撮像画像を再生表示させる。メモリカード13は、図示しないカードスロットに着脱自在に取り付けられる記録媒体である。   The image processing unit 6 converts the image data after the image processing into an image file of a predetermined format (JPEG, H.264, etc.) under the control of the CPU 8. The recording / reproducing unit 11 records the image file on the memory card 13 under the control of the CPU 8. Further, the recording / reproducing unit 11 reads an image file recorded on the memory card 13 under the control of the CPU 8 and causes the display unit 10 to reproduce and display the captured image. The memory card 13 is a recording medium that is detachably attached to a card slot (not shown).

表示部10は、液晶モニタ等であって、CPU8の制御のもと、スルー画像の再生表示や、設定パラメータ(詳細を後述する)の設定画面や、操作メニュー画面などを表示する。   The display unit 10 is a liquid crystal monitor or the like, and displays a through image reproduction display, a setting parameter setting screen (details will be described later), an operation menu screen, and the like under the control of the CPU 8.

操作部材12は、レリーズスイッチ121、操作スイッチ122、電源スイッチ、タッチパネル等を含む。ユーザが操作部材12を操作すると、操作に対応する操作信号がCPU8に出力される。たとえば、レリーズスイッチが通常ストロークの半分程度まで押し下げ操作されると、上記AF処理や露出演算などの撮影準備を行う。そして、レリーズスイッチが通常ストロークまで押し下げ操作されると撮影動作を開始する。   The operation member 12 includes a release switch 121, an operation switch 122, a power switch, a touch panel, and the like. When the user operates the operation member 12, an operation signal corresponding to the operation is output to the CPU 8. For example, when the release switch is pushed down to about half of the normal stroke, preparations for shooting such as the AF processing and exposure calculation are performed. When the release switch is pushed down to the normal stroke, the photographing operation is started.

図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 image processing unit 6. The image processing unit 6 includes a debayer processing unit 60, a white balance unit 61, a luminance signal generation unit 62, a color difference signal generation unit 63, a binarization processing unit 65, a classification evaluation unit 64, and a subject candidate extraction unit 66. The image processing unit 6 includes various image processing units such as a gamma correction unit in addition to the illustrated image processing unit.

ディベイヤ処理部60は、A/D変換部5から出力されるRAW画像データに対して周知のディベイヤ処理(ベイヤ補間処理)を行い、RGB画像を生成する。ディベイヤ処理とは、RGB画像の各画素を、周辺の画素との重み付け加算によって補間的に作り出す処理のことである。RGB画像は、各画素ごとにR,G,Bの原色情報を有する。   The debayer processing unit 60 performs a known debayer process (Bayer interpolation process) on the RAW image data output from the A / D conversion unit 5 to generate an RGB image. The debayer process is a process for interpolating each pixel of an RGB image by weighted addition with surrounding pixels. The RGB image has R, G, B primary color information for each pixel.

ホワイトバランス部61は、ディベイヤ処理部60により生成されたRGB画像にホワイトバランスゲインを乗ずることによりホワイトバランス処理を施す。ホワイトバランス処理は、環境光の特性に依らず無彩色の被写体が無彩色な画像として撮影されるように調整する処理である。   The white balance unit 61 performs white balance processing by multiplying the RGB image generated by the debayer processing unit 60 by the white balance gain. The white balance process is a process of adjusting so that an achromatic object is captured as an achromatic image regardless of the characteristics of ambient light.

輝度信号生成部62は、RGB画像の各画素について輝度情報Yを生成する。輝度信号生成部62は、たとえば下式[1]を用いて輝度情報Yを演算する。輝度信号生成部62に入力されたRGB画像の全画素に対応する輝度情報Yで表される画像を、Yプレーン画像と称する。
Y=0.299×R+0.587×G+0.114×B …[1]
The luminance signal generation unit 62 generates luminance information Y for each pixel of the RGB image. The luminance signal generation unit 62 calculates the luminance information Y using, for example, the following equation [1]. An image represented by the luminance information Y corresponding to all pixels of the RGB image input to the luminance signal generation unit 62 is referred to as a Y plane image.
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 signal generation unit 63 generates color difference information for each pixel of the RGB image. The color difference signal generation unit 63 calculates the two color difference information Cb and Cr using, for example, the following equations [2] and [3].
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 signal generation unit 63 is referred to as a Cb plane image. On the other hand, an image represented by color difference information Cr corresponding to all pixels of the RGB image is referred to as a Cr plane image.

輝度信号生成部62および色差信号生成部63の処理により、RGB画像は、YCbCr方式の画像に変換される。以降、YCbCr方式の画像のことをYCbCr画像と称する。   The RGB image is converted into a YCbCr image by the processing of the luminance signal generation unit 62 and the color difference signal generation unit 63. Hereinafter, a YCbCr image is referred to as a YCbCr image.

二値化処理部65は、RGB画像を二値化して二値画像を生成する。二値化処理部65は、RGB画像の二値化に用いる区分(基準)を複数有している。二値化処理部65の詳細については後述する。   The binarization processing unit 65 binarizes the RGB image to generate a binary image. The binarization processing unit 65 has a plurality of sections (references) used for binarization of RGB images. Details of the binarization processing unit 65 will be described later.

区分評価部64は、二値化処理部65により生成される二値化画像の中から白画素のまとまり(白画素塊)を抽出して、各白画素塊ごとに評価値を演算する。そして、その評価値に基づいて二値化に用いた区分を評価する。   The classification evaluation unit 64 extracts a group of white pixels (white pixel block) from the binarized image generated by the binarization processing unit 65, and calculates an evaluation value for each white pixel block. Then, the classification used for binarization is evaluated based on the evaluation value.

被写体候補抽出部66は、区分評価部64の評価に基づいて、被写体の候補(以降、被写体候補と称する)とする画素塊を抽出する。CPU8は、被写体候補抽出部66により抽出された被写体候補に基づいて、AF処理などを行う。   The subject candidate extraction unit 66 extracts a pixel block as a subject candidate (hereinafter referred to as a subject candidate) based on the evaluation of the category evaluation unit 64. The CPU 8 performs AF processing based on the subject candidate extracted by the subject candidate extraction unit 66.

―二値化処理部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 binarization processing unit 65 has a plurality of sections (references) used for binarization of RGB images. The binarization processing unit 65 binarizes the RGB image after the white balance processing is performed by the white balance unit 61. The binarization processing unit 65 uses a classification (standard) used for binarization of the RGB image. ) Is exemplified below.
(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の平均値Eを算出する。そして、二値化処理部65は、Yプレーン画像の各画素の各輝度情報Yと平均値Eとを比較し、Yプレーン画像を二値化する。たとえば、二値化処理部65は、Y>Eを満足するYプレーン画像の画素を白画素に変換し、Y≦Eとなる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 binarization processing unit 65 compares the luminance information Y of each pixel of the Y plane image with the average value EY, and binarizes the Y plane image. For example, the binarization processing unit 65 converts a Y plane image pixel satisfying Y> E Y into a white pixel, converts a Y plane image pixel satisfying Y ≦ E Y into a black pixel, A binary image B1 is generated. In addition, the binarization processing unit 65 generates a complement image B10 of the first binary image B1.

―(区分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 binarization processing unit 65 calculates an average value E Cb of the color difference information Cb of all the pixels of the Cb plane image. Then, the binarization processing unit 65 compares the color difference information Cb of each pixel of the Cb plane image with the average value E Cb , converts the pixel of the Cb plane image satisfying Cb> E Cb into a white pixel, The pixel of the Cb plane image where Cb ≦ E Cb is converted into a black pixel. A binary image generated by the binarization processing unit 65 using (Section 2) is referred to as a second binary image B2.

―(区分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. Binarization processing unit 65, when performing binarization using (Category 3), calculates the average value E Cr of the color difference information Cr for all the pixels of the Cr plane image. Then, the binarization processing unit 65 compares the color difference information Cr of each pixel of the Cr plane image with the average value ECr , converts the pixel of the Cr plane image satisfying Cr> ECr into a white pixel, The pixels of the Cr plane image satisfying Cr ≦ E Cr are converted into black pixels. The binary image generated by the binarization processing unit 65 using (Section 3) is referred to as a third binary image B3.

図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 blue sky background 100 and a vehicle 101 whose main hue is purple (black in FIG. 4A). ) And are included. It is assumed that the user is about to image the vehicle 101 as a subject.

図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 Cr distribution 200 corresponding to the blue color of the background 100 and a Cr distribution 201 corresponding to the purple color of the vehicle 101.

さらに、図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 distribution 200 of Cr corresponding to blue present in the left (Cr ≦ E Cr) than the average value E Cr, presence Cr distribution 201 corresponding to purple to the right (Cr> E Cr) than the average value E Cr doing. The binarization processing unit 65 converts the pixels of the background 100 in FIG. 4A to black pixels and converts the pixels of the vehicle 101 to white pixels based on the average value ECr . In this way, when the background color and the subject color are different, there is a high possibility that a binary image in which the subject is appropriately extracted by (Section 3) is obtained.

しかし、(区分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 distribution 202 illustrated in FIG. 5 is a distribution of color difference information Cr related to the background, and spreads over the entire histogram. A distribution 203 illustrated in FIG. 5 is a distribution of color difference information Cr related to a subject (for example, the vehicle 101 in FIG. 4A), and is confused (embedded) in the distribution 202. In Figure 5, since the different colors are mixed in the background, the distribution 203 will be set on the left side of the average value E Cr, subject from being binarized to black pixels. (Category 4) and (Category 5) described below reduce the occurrence of a situation where the subject is not appropriately binarized due to the influence of the background color as shown in FIG.

―(区分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 hue circle 300 illustrated in FIG. 6 represents a YCbCr color space, and is a perfect circle having a predetermined radius and centering on the center 301. By specifying the color difference information Cb and the color difference information Cr, it is possible to specify a predetermined hue and saturation color shown in the hue circle 300. FIG. 6 shows the approximate positions of the red, yellow, and purple hues on the hue ring 300.

図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 hue ring 300 is illustrated by a white circle. FIG. 7 illustrates a first straight line 311 and a second straight line 312 that pass through the origin of the YCrCb color space (the center 301 of the hue ring 300). The inclination a of the first straight line 311 and the inclination b of the second straight line 312 are different from each other.

図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 hue range 320 set by the binarization processing unit 65 using (Section 4). The hue range 320 is a range that satisfies the following conditional expression [4] in a closed region surrounded by the first straight line 311, the second straight line 312, and the outer periphery of the hue ring 300. Here, the coefficient k1 = a and the coefficient k2 = 1 / b. a and b are inclinations of the first straight line 311 and the second straight line 312, respectively.
Cb-Cr * k1> 0 and Cr-Cb * k2> 0 ... [4]

二値化処理部65は、YCbCr画像の画素のうち、画素に対応する色差情報Crと画素に対応する色差情報Cbとが上記条件式[4]を満足する画素を白画素に変換し、上記条件式[4]を満足しない画素を黒画素に変換する。二値化処理部65が(区分4)を用いて生成する二値画像を第4二値画像B4と称する。   The binarization processing unit 65 converts a pixel in which the color difference information Cr corresponding to the pixel and the color difference information Cb corresponding to the pixel satisfy the conditional expression [4] among the pixels of the YCbCr image into a white pixel, A pixel that does not satisfy the conditional expression [4] is converted into a black pixel. The binary image generated by the binarization processing unit 65 using (Section 4) is referred to as a fourth binary image B4.

(区分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 subject distribution 203 is mixed in the background distribution 202 as shown in FIG. Even so, only pixels having a hue (for example, bluish purple, purple, magenta, etc. in FIG. 5) that substantially matches the hue corresponding to the distribution 203 (purple in FIG. 5) are converted to white pixels. Can do.

係数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 nonvolatile memory 9, and a combination of the coefficient k1 and the coefficient k2 used by the CPU 8 is designated. The image processing unit 6 uses the coefficient k1 and the coefficient k2 specified by the CPU 8. The nonvolatile memory 9 includes a range of hues that are rare in nature (for example, bluish purple, purple, magenta, etc.) and a range of hues that are easily confused in the background of nature (for example, yellowish orange, yellow, etc.) The coefficient k1 and the coefficient k2 for designating the color of the green color of the stems and leaves that can be seen) are stored.

―(区分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 hue circle 300 of FIG. 7 in the same manner as (Category 4).

二値化処理部65は、(区分5)を用いてYCbCr画像を二値化するとき、YCbCr色空間を表す色相環300上に色相および彩度の範囲を設定する。図8は、色相環300上に設定された色相および彩度の範囲の一例を示す図である。   When the binarization processing unit 65 binarizes the YCbCr image using (Section 5), the binarization processing unit 65 sets a range of hue and saturation on the hue ring 300 representing the YCbCr color space. FIG. 8 is a diagram illustrating an example of hue and saturation ranges set on the hue circle 300.

図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 straight line 311 and the second straight line 312 that pass through the origin of the YCbCr color space (center 301 of the hue ring 300), and the origin of the YCbCr color space (center 301 of the hue ring 300) as the center of the circle. A perfect circle 313 is shown. The first straight line 311 and the second straight line 312 are the same as those described in (Category 4), and are used to set the hue range. The perfect circle 313 is used to set a saturation range. The radius T of the perfect circle 313 is set to be equal to or less than the radius of the hue circle 300.

図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 かつ Cb+Cr≧T
…[5]
The hatched area in FIG. 8 illustrates the hue and saturation range 321 set by the binarization processing unit 65 using (Section 5). The hue and saturation range 321 is a closed region surrounded by the first straight line 311, the second straight line 312, the perfect circle 313, and the outer periphery of the hue ring 300, and satisfies the following conditional expression [5]. . Here, the coefficient k1 = a and the coefficient k2 = 1 / b. a and b are inclinations of the first straight line 311 and the second straight line 312, respectively.
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 binarization processing unit 65 converts a pixel in which the color difference information Cr corresponding to the pixel and the color difference information Cb corresponding to the pixel satisfy the conditional expression [5] among the pixels of the YCbCr image into a white pixel, A pixel that does not satisfy the conditional expression [5] is converted to a black pixel. A binary image generated by the binarization processing unit 65 using (Section 5) is referred to as a fifth binary image B5.

彩度の範囲を決定するための閾値として用いられる半径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 image processing unit 6 uses the coefficient k1, the coefficient k2, and the radius T (threshold value T) specified by the CPU 8.

半径T(閾値T)は、不揮発性メモリ9に設定パラメータとして、係数k1と係数k2の組み合わせとともに記憶されている。半径T(閾値T)の値は、係数k1と係数k2の組み合わせごと(すなわち、所定の色相の範囲ごと)に設定されている。たとえば、自然界に少ない色相の範囲(たとえば、青紫、紫、マゼンタ等)の場合は色相環300の半径の20%〜30%程度の値に設定され、自然界で背景に紛れやすい色相の範囲(たとえば、黄みの橙、黄等。花の色に多く見られ茎や葉の緑系の色に紛れ易い)の場合は色相環300の半径の70%程度の値に設定される。   The radius T (threshold value T) is stored in the nonvolatile memory 9 as a setting parameter together with a combination of the coefficient k1 and the coefficient k2. The value of the radius T (threshold value T) is set for each combination of the coefficient k1 and the coefficient k2 (that is, for each predetermined hue range). For example, in the case of a hue range that is rare in nature (for example, bluish purple, purple, magenta, etc.), the range is set to a value that is about 20% to 30% of the radius of the hue circle 300, , Yellowish orange, yellow, etc., which are often found in the color of the flower and are easily confused with the green color of the stem and leaves), the value is set to about 70% of the radius of the hue ring 300.

―区分評価部64の処理―
図9を用いて、区分評価部64の処理について説明する。図9は、区分評価部64の処理に関するフローチャートを例示するものである。区分評価部64には、二値化処理部65により生成された二値画像が入力される。
-Processing of the category evaluation unit 64-
The processing of the category evaluation unit 64 will be described with reference to FIG. FIG. 9 illustrates a flowchart relating to the processing of the category evaluation unit 64. The binarization image generated by the binarization processing unit 65 is input to the category evaluation unit 64.

ステップS660では、区分評価部64は、ラベリング処理と称する処理を実行する。ラベリング処理とは、入力された二値画像の中から白画素のまとまり(白画素塊)を抽出し、その白画素塊にラベルと呼ばれる識別用の情報を付与することである。区分評価部64は、ラベリング処理により二値画像内で分離している白画素塊にそれぞれ異なるラベルを付与する。   In step S660, the category evaluation unit 64 executes a process called a labeling process. The labeling process is to extract a group of white pixels (white pixel block) from the input binary image and give identification information called a label to the white pixel block. The classification evaluation unit 64 gives different labels to the white pixel blocks separated in the binary image by the labeling process.

ステップS661では、区分評価部64は、ステップS660でラベリング処理された各白画素塊について、その面積を算出する。たとえば、各白画素塊を構成する白画素の画素数を算出し、これを面積とする。   In step S661, the classification evaluation unit 64 calculates the area of each white pixel block labeled in step S660. For example, the number of white pixels constituting each white pixel block is calculated, and this is used as the area.

ステップS662では、区分評価部64は、白画素の重心を中心として二値画像の慣性モーメント(白画素の重心周りの慣性モーメント)を演算する。たとえば、区分評価部64は、二値画像の各画素について、その画素の二値(0または1)と、白画素の重心からその画素までの距離の二乗とを乗じた積を演算する。そして、各画素ごとに演算した積の総和を白画素の重心周りの慣性モーメントとして演算する。   In step S662, the classification evaluation unit 64 calculates the moment of inertia of the binary image (the moment of inertia around the centroid of the white pixel) around the centroid of the white pixel. For example, the classification evaluation unit 64 calculates, for each pixel of the binary image, a product obtained by multiplying the binary value (0 or 1) of the pixel and the square of the distance from the center of gravity of the white pixel to the pixel. Then, the sum of the products calculated for each pixel is calculated as the moment of inertia around the center of gravity of the white pixel.

ステップS663では、区分評価部64は、ステップS660でラベリング処理された各白画素塊について、ステップS661で演算した白画素塊の面積とステップS662で演算した白画素の重心周りの慣性モーメントとに基づく下式[6]により、第1評価値を演算する。
第1評価値=白画素塊の面積/白画素の重心周りの慣性モーメント …[6]
In step S663, the classification evaluation unit 64, for each white pixel block labeled in step S660, is based on the area of the white pixel block calculated in step S661 and the moment of inertia around the center of gravity of the white pixel calculated in step S662. The first evaluation value is calculated by the following equation [6].
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 segment evaluation unit 64 calculates a second evaluation value related to the segment when the input binary image is generated based on the first evaluation value calculated for each white pixel block in step S663. For example, the maximum value of the first evaluation value calculated for each white pixel block in step S663 is set as the second evaluation value related to the classification.

―撮像準備動作―
図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 operation member 12 is pushed down to about half of the normal stroke.

ステップ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 / D conversion unit 5, and the debayer processing unit 60 of the image processing unit 6 to generate an RGB image related to the subject image. In step S802, the CPU 8 controls the luminance signal generation unit 62 and the color difference signal generation unit 63 of the image processing unit 6 to generate luminance information Y and color difference information Cb and Cr for each pixel of the RGB image. Thereby, the RGB image related to the subject image is converted into the YCbCr image related to the subject image.

ステップ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 binarization processing unit 65 of the image processing unit 6, and the fourth binary image B4 (binary image generated by the binarization processing unit 65 using the section (4)). And a fifth binary image B5 (a binary image generated by the binarization processing unit 65 using the section (5)). The CPU 8 controls the binarization processing unit 65 of the image processing unit 6 by designating the combination of the coefficient k1 and the coefficient k2 stored in the nonvolatile memory 9 and the threshold value T corresponding to the combination.

ステップS804では、CPU8は、画像処理部6の区分評価部64を制御して、ステップS803で生成した第4二値画像B4と第5二値画像B5とに基づき(区分4)と(区分5)に関する第2評価値をそれぞれ演算する(図9)。   In step S804, the CPU 8 controls the segment evaluation unit 64 of the image processing unit 6, and based on the fourth binary image B4 and the fifth binary image B5 generated in step S803 (category 4) and (category 5). ) For the second evaluation value (FIG. 9).

ステップ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 binarization processing unit 65 of the image processing unit 6 to generate the first binary image B1 and the complement image B10 (the binarization processing unit 65 uses the section (1)). ) And second binary image B2 (binary image generated by binarization processing unit 65 using section (2)) and third binary image B3 (binarization processing unit 65 uses section (3)). To generate a binary image).

ステップS808では、CPU8は、画像処理部6の区分評価部64を制御して、ステップS807で生成した第1二値画像B1と第2二値画像B2と第3二値画像B3と補数画像B10とに基づき(区分1)〜(区分3)に関する第2評価値をそれぞれ演算する(図9)。   In step S808, the CPU 8 controls the segment evaluation unit 64 of the image processing unit 6 to generate the first binary image B1, the second binary image B2, the third binary image B3, and the complement image B10 generated in step S807. Based on the above, the second evaluation values related to (Category 1) to (Category 3) are calculated (FIG. 9).

ステップ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 signal generation unit 63 that generates color difference information Cb and color difference information Cr for each pixel of the captured image, and color difference information. A category evaluation unit 64, a binarization processing unit 65, and a subject candidate extraction unit 66 that specify a predetermined range of Cb and Cr and extract subject candidates having a hue within a predetermined range (hue range 320 in FIG. 7). With. By having such a configuration, it is possible to appropriately extract a subject having a hue within a predetermined range.

以上で説明した実施の形態は、以下のように変形して実施できる。
(変形例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 imaging surface 4a is not limited to the Bayer arrangement.
(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 white balance unit 61. Different coefficients k1 and k2 are stored in the non-volatile memory 9 for each white balance gain of the white balance unit, and the CPU 8 may read them based on the settings of the white balance unit 61.

(変形例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 display unit 10 to set the coefficients k1 and k2 and the predetermined threshold T. In the setting input screen 900 of FIG. 11, the hue circle 300, the first line segment display 901 for setting the coefficient k1, the second line segment display 902 for setting the coefficient k2, and the threshold T are set. A circle display 903 is displayed. The first line segment display 901 and the second line segment display 902 are line segments from the center 301 of the hue ring 300 to the outer periphery of the hue ring 300. The inclination of the first line segment display 901 and the second line segment display 902 can be set by the user via the operation switch 122. The center of the circle display 903 coincides with the center 301 of the hue ring 300. The radius of the circle display 903 can be set by the user via the operation switch 122.

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 line segment display 901 in the nonvolatile memory 9 as the coefficient k1. Further, the CPU 8 stores the reciprocal of the slope b of the second line segment display 902 in the nonvolatile memory 9 as a coefficient k2. The CPU 8 determines a threshold value T based on the radius of the circle display 903 and stores it in the nonvolatile memory 9.

第1線分表示901および第2線分表示902と円表示903と色相環300の外周とで囲われる選択領域904は、ユーザが選択した色相と彩度の範囲である。選択領域904内の色の画素は、二値化処理部65による(区分5)を用いた二値化によって白画素に変換される。なお、選択領域904は、色相環300の他の領域と異なる表示態様で表示してもよい。たとえば、選択領域904のみを点滅させるなどの表示態様が実施可能である。   A selection area 904 surrounded by the first line segment display 901, the second line segment display 902, the circle display 903, and the outer periphery of the hue ring 300 is a range of hue and saturation selected by the user. Color pixels in the selection area 904 are converted into white pixels by binarization using (Section 5) by the binarization processing unit 65. Note that the selection area 904 may be displayed in a different display mode from the other areas of the color wheel 300. For example, a display mode in which only the selection area 904 is blinked can be implemented.

(変形例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 Digital camera 2 Shooting lens 3 Lens drive part 4 Image sensor 5 A / D conversion part 6 Image processing part 7 Memory 8 CPU
9 Non-volatile memory 10 Display unit 11 Recording / playback unit 60 Debayer processing unit 61 White balance unit 62 Luminance signal generation unit 63 Color difference signal generation unit 64 Classification evaluation unit 65 Binarization processing unit 66 Subject candidate extraction unit 300 Hue ring 320 Range 321 Hue and saturation range

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に記載の撮像装置において、The imaging device according to claim 1,
前記第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又は請求項2に記載の撮像装置において、In the imaging device according to claim 1 or 2,
前記第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から請求項3のいずれか一項に記載の撮像装置において、In the imaging device according to any one of claims 1 to 3,
前記第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から請求項4のいずれか一項に記載の撮像装置において、In the imaging device according to any one of claims 1 to 4,
前記第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から請求項5のいずれか一項に記載の撮像装置において、In the imaging device according to any one of claims 1 to 5,
前記第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.
請求項1から請求項6のいずれか一項に記載の撮像装置において、 In the imaging device according to any one of claims 1 to 6,
前記特定の色相情報及び彩度情報は、設定されているホワイトバランスの設定値に基づいて指定される撮像装置。 The specific hue information and saturation information are specified based on a set white balance setting value.
請求項1から請求項6のいずれか一項に記載の撮像装置において、 In the imaging device according to any one of claims 1 to 6,
色相及び彩度から構成される色相環を表示する表示部を備え、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.
JP2012055662A 2012-03-13 2012-03-13 Imaging device Active JP5987376B2 (en)

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)

* Cited by examiner, † Cited by third party
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)

* Cited by examiner, † Cited by third party
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

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