JP2006023339A - Imaging apparatus - Google Patents

Imaging apparatus Download PDF

Info

Publication number
JP2006023339A
JP2006023339A JP2004198870A JP2004198870A JP2006023339A JP 2006023339 A JP2006023339 A JP 2006023339A JP 2004198870 A JP2004198870 A JP 2004198870A JP 2004198870 A JP2004198870 A JP 2004198870A JP 2006023339 A JP2006023339 A JP 2006023339A
Authority
JP
Japan
Prior art keywords
luminance
value
pixel
scene
image
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.)
Pending
Application number
JP2004198870A
Other languages
Japanese (ja)
Inventor
Shinichi Fujii
真一 藤井
Yuko Nakamura
祐子 中村
Akio Nakamaru
晃男 中丸
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.)
Konica Minolta Photo Imaging Inc
Original Assignee
Konica Minolta Photo Imaging Inc
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 Konica Minolta Photo Imaging Inc filed Critical Konica Minolta Photo Imaging Inc
Priority to JP2004198870A priority Critical patent/JP2006023339A/en
Publication of JP2006023339A publication Critical patent/JP2006023339A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Exposure Control For Cameras (AREA)
  • Focusing (AREA)
  • Automatic Focus Adjustment (AREA)
  • Studio Devices (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide an imaging apparatus capable of more accurately determining whether it is a night scene. <P>SOLUTION: A digital camera 1A is equipped with a determining means for judging based on image data whether or not a photographic scene is a night-time scene. The determination means determines that the photographic scene is the night-time scene, when a high luminance part exists in a 1st part (AF area AR or the like) being the center part of a framing area FR and a low luminance part exists in a 2nd part (hatched part MR or the like) in the framing area. <P>COPYRIGHT: (C)2006,JPO&NCIPI

Description

本発明は、撮像装置において撮影画像のシーンを判別する技術に関し、特に夜景シーンであるか否かを判別する技術に関する。   The present invention relates to a technique for discriminating a scene of a captured image in an imaging apparatus, and more particularly to a technique for discriminating whether or not it is a night scene.

デジタルカメラなどの撮像装置においては、撮影画像のシーンを判別し、そのシーンに応じた適切な撮影条件等を定めることがある。   In an imaging apparatus such as a digital camera, a scene of a captured image may be determined and appropriate shooting conditions may be determined according to the scene.

例えば、特許文献1においては、被写界の平均輝度が小さく且つ被写界に占める高輝度領域の割合が大きいときに、その撮影シーンを夜景シーンとして判定し、カメラの撮影モードを夜景モードに設定する技術が記載されている。   For example, in Patent Document 1, when the average brightness of the object scene is small and the ratio of the high brightness area in the object scene is large, the shooting scene is determined as a night scene, and the camera shooting mode is set to the night scene mode. The technology to set is described.

特開2003−315866号公報JP 2003-315866 A

しかしながら、上記の技術においては、多数の点光源が存在する場合には、測定対象領域の平均輝度が大きくなってしまうことがあり、これに起因して、夜景であるにもかかわらず夜景ではないとして、誤って判定されることがある。   However, in the above technique, when there are a large number of point light sources, the average luminance of the measurement target region may increase, and as a result, the night scene is not a night scene. May be erroneously determined.

そこで、この発明の課題は、より正確に夜景シーンであるか否かを判定することが可能な撮像装置を提供することにある。   Accordingly, an object of the present invention is to provide an imaging apparatus capable of determining whether or not a night scene is more accurately.

上記の課題を解決するため、請求項1の発明は、撮像装置であって、撮影光学系による光像を画像データへ変換する撮像手段と、前記画像データに基づいて撮影シーンが夜景シーンであるか否かを判定する判定手段とを備え、前記判定手段は、フレーミング領域の中央部分である第1の部分に高輝度部が存在し且つ前記フレーミング領域のうち前記第1の部分以外の第2の部分に低輝度部が存在する場合に、撮影シーンが夜景シーンであると判定することを特徴とする。   In order to solve the above-mentioned problems, the invention of claim 1 is an imaging apparatus, wherein an imaging means for converting a light image obtained by the imaging optical system into image data, and a shooting scene based on the image data is a night scene. Determination means for determining whether or not the high-luminance portion is present in the first portion that is the central portion of the framing region and the second portion other than the first portion of the framing region. When a low-luminance part exists in this part, it is determined that the shooting scene is a night scene.

請求項2の発明は、請求項1の発明に係る撮像装置において、前記第2の部分は、前記フレーミング領域の周縁部分であることを特徴とする。   According to a second aspect of the present invention, in the imaging apparatus according to the first aspect of the invention, the second portion is a peripheral portion of the framing region.

請求項3の発明は、請求項1の発明に係る撮像装置において、前記第2の部分は、前記フレーミング領域の上端側周縁部分であることを特徴とする。   According to a third aspect of the present invention, in the imaging apparatus according to the first aspect of the present invention, the second portion is an upper edge side peripheral portion of the framing region.

請求項4の発明は、請求項1の発明に係る撮像装置において、前記第2の部分は、前記フレーミング領域の左端側周縁部分、右端側周縁部分、および上端側周縁部分とで構成されていることを特徴とする。   According to a fourth aspect of the present invention, in the imaging apparatus according to the first aspect of the invention, the second portion includes a left end side peripheral portion, a right end side peripheral portion, and an upper end side peripheral portion of the framing region. It is characterized by that.

請求項5の発明は、請求項1から請求項4のいずれかの発明に係る撮像装置において、前記判定手段は、高輝度画素が前記第1の部分において所定数以上存在するとき又は高輝度画素が前記第1の部分において所定割合以上存在するときに、前記第1の部分に高輝度部が存在すると判定することを特徴とする。   According to a fifth aspect of the present invention, in the imaging device according to any one of the first to fourth aspects, the determination unit is configured to detect when a predetermined number or more of high-luminance pixels are present in the first portion or a high-luminance pixel. , It is determined that a high-luminance portion is present in the first portion when a predetermined ratio or more is present in the first portion.

請求項6の発明は、請求項5の発明に係る撮像装置において、前記判定手段は、高輝度画素が前記第1の部分において所定数以上存在するか否か又は高輝度画素が前記第1の部分において所定割合以上存在するか否かを、間引き画像データではないAF用画像データを用いて判定するとともに、前記第2の部分に低輝度部が存在するか否かを、間引き画像データであるAE用画像データを用いて判定することを特徴とする。   According to a sixth aspect of the present invention, in the imaging device according to the fifth aspect of the invention, the determination means determines whether or not a predetermined number or more of high-luminance pixels are present in the first portion, or whether the high-luminance pixels are the first Whether or not there is a predetermined ratio or more in the portion is determined using AF image data that is not thinned image data, and whether or not the low luminance portion exists in the second portion is thinned image data. The determination is made using AE image data.

請求項7の発明は、請求項1から請求項6のいずれかの発明に係る撮像装置において、前記判定手段は、前記第2の部分に位置する複数の区分領域のうち、その平均輝度が所定値以下の低輝度区分領域が所定割合以上存在するとき又は前記低輝度区分領域が所定数以上存在するときに、前記第2の部分に低輝度部が存在すると判定することを特徴とする。   According to a seventh aspect of the present invention, in the imaging apparatus according to any one of the first to sixth aspects, the determination means has a predetermined average luminance among a plurality of segmented regions located in the second portion. It is characterized in that it is determined that a low-luminance portion exists in the second portion when there are a predetermined percentage or more of low-luminance segment areas that are less than or equal to a value or when there are a predetermined number or more of the low-luminance segment areas.

請求項8の発明は、請求項1から請求項7のいずれかの発明に係る撮像装置において、撮影シーンが夜景シーンでないと判定されるときには第1の手法でAF動作を行い、撮影シーンが夜景シーンであると判定されるときには前記第1の手法とは異なる第2の手法でAF動作を行うAF制御手段、をさらに備えることを特徴とする。   According to an eighth aspect of the present invention, in the imaging apparatus according to any one of the first to seventh aspects, when it is determined that the shooting scene is not a night scene, the AF operation is performed by the first method, and the shooting scene is a night scene. An AF control means for performing an AF operation using a second method different from the first method when it is determined that the scene is a scene is further provided.

請求項9の発明は、請求項8の発明に係る撮像装置において、前記第2の手法は、フォーカスレンズを一旦無限遠端に移動させた後に、前記フォーカスレンズを近側に向けて移動させつつ各レンズ位置におけるAF評価値を取得し、当該AF評価値が最適化されるレンズ位置を合焦位置として検出する手法であることを特徴とする。   According to a ninth aspect of the present invention, in the imaging apparatus according to the eighth aspect of the invention, the second method is to move the focus lens toward the near side after moving the focus lens to the infinity end. The method is characterized in that an AF evaluation value at each lens position is acquired, and a lens position at which the AF evaluation value is optimized is detected as an in-focus position.

請求項10の発明は、請求項8または請求項9の発明に係る撮像装置において、前記第2の手法によるAF動作でのAF評価値は、前記第1の部分における高輝度画素と当該高輝度画素に隣接する非高輝度画素との画素値の差分値の積算値を、前記第1の部分における高輝度画素に隣接する非高輝度画素の存在数で除することによって正規化された値に基づいて算出されることを特徴とする。   According to a tenth aspect of the present invention, in the imaging apparatus according to the eighth or ninth aspect, the AF evaluation value in the AF operation by the second method is the high luminance pixel and the high luminance in the first portion. To the normalized value by dividing the integrated value of the pixel value difference with the non-high luminance pixel adjacent to the pixel by the number of non-high luminance pixels adjacent to the high luminance pixel in the first portion It is calculated based on.

請求項11の発明は、請求項10の発明に係る撮像装置において、前記AF評価値は、前記正規化された値を、前記第1の部分における高輝度画素の個数でさらに除した値に基づいて算出されることを特徴とする。   According to an eleventh aspect of the present invention, in the imaging apparatus according to the tenth aspect, the AF evaluation value is based on a value obtained by further dividing the normalized value by the number of high-luminance pixels in the first portion. It is characterized by being calculated.

請求項12の発明は、請求項1から請求項11のいずれかの発明に係る撮像装置において、撮影シーンが夜景シーンであると判定される場合は当該撮像装置の撮影条件を夜景シーン用の条件に設定する撮影条件設定手段、をさらに備えることを特徴とする。   According to a twelfth aspect of the present invention, in the image pickup apparatus according to any one of the first to eleventh aspects of the invention, when it is determined that the shooting scene is a night scene, the shooting conditions of the image pickup apparatus are the conditions for the night scene. Further, it is characterized by further comprising an imaging condition setting means for setting to.

請求項1から請求項12に記載の発明によれば、フレーミング領域の中央部分である第1の部分に高輝度部が存在し且つ前記フレーミング領域のうち第1の部分以外の第2の部分に低輝度部が存在する場合に、撮影シーンが夜景シーンであると判定されるので、より正確な夜景判定が可能である。   According to the invention described in claims 1 to 12, the high-luminance portion exists in the first portion that is the central portion of the framing region, and the second portion other than the first portion in the framing region. When the low luminance portion exists, it is determined that the shooting scene is a night scene, so that a more accurate night scene determination is possible.

特に、請求項3に記載の発明によれば、夜空の部分に対応する上端側周縁部分において低輝度部の存在の有無を判定しているので、さらに正確に夜景判定を行うことができる。   In particular, according to the third aspect of the invention, since the presence / absence of the low-luminance portion is determined in the peripheral portion on the upper end side corresponding to the night sky portion, night scene determination can be performed more accurately.

また、請求項5に記載の発明によれば、第1の部分における高輝度画素の存在数又は存在割合に基づいて高輝度部の存在の有無を判定しているので、第1の部分の平均輝度を用いて高輝度部の存在の有無を判定する場合に比べて、より正確な夜景判定が可能である。   According to the invention described in claim 5, since the presence / absence of the high luminance part is determined based on the number or existence ratio of the high luminance pixels in the first part, the average of the first part is determined. Compared with the case where the presence / absence of a high-luminance portion is determined using luminance, more accurate night scene determination is possible.

さらに、請求項6に記載の発明によれば、間引き画像ではないAF用画像データに基づいて高輝度画素の存在数等を判定しているので、より正確に高輝度画素の存在数を認識することができる。また、間引き画像であるAE用画像データに基づいて、低輝度ブロックであるか否かを判定しているので、平均輝度算出にあたって演算対象となる画素の数を低減して効率的に夜景判定を行うことができる。   Furthermore, according to the invention described in claim 6, since the number of high-luminance pixels is determined based on AF image data that is not a thinned image, the number of high-luminance pixels is more accurately recognized. be able to. Further, since it is determined whether or not the block is a low-intensity block based on the AE image data that is a thinned image, the night scene determination is efficiently performed by reducing the number of pixels to be calculated in calculating the average luminance. It can be carried out.

また、請求項8に記載の発明によれば、夜景撮影時のAF動作を最適化することが可能である。   According to the eighth aspect of the invention, it is possible to optimize the AF operation during night scene photography.

さらに、請求項10に記載の発明によれば、AF動作の高精度化を図ることができる。   Furthermore, according to the invention described in claim 10, it is possible to improve the accuracy of the AF operation.

また、請求項12に記載の発明によれば、夜景撮影時の撮影条件を最適化することが可能である。   In addition, according to the twelfth aspect of the present invention, it is possible to optimize shooting conditions during night scene shooting.

以下、本発明の実施形態を図面に基づいて説明する。   Hereinafter, embodiments of the present invention will be described with reference to the drawings.

<ハードウエア構成>
デジタルカメラ1Aのハードウエア構成を図1〜図3を参照しながら説明する。図1は、デジタルカメラ1Aを正面から見た正面図である。図2は、図1のD−Dの位置におけるデジタルカメラ1Aの断面図である。また、図3は、デジタルカメラ1Aを背面から見た背面図である。
<Hardware configuration>
The hardware configuration of the digital camera 1A will be described with reference to FIGS. FIG. 1 is a front view of the digital camera 1A as viewed from the front. 2 is a cross-sectional view of the digital camera 1A at the position DD in FIG. FIG. 3 is a rear view of the digital camera 1A as viewed from the back.

デジタルカメラ1Aの正面には、撮影レンズ110が設けられる。撮影レンズ110は、撮影用の光像(被写体の光像)を取得し、撮像素子であるCCD120(Charge Coupled Device)の受光面に結像させる。   A photographing lens 110 is provided in front of the digital camera 1A. The photographing lens 110 acquires a light image for photographing (light image of a subject) and forms an image on a light receiving surface of a CCD 120 (Charge Coupled Device) that is an image sensor.

また、撮影レンズ110のレンズ鏡胴111の内部には、焦点距離を変化させて撮影用の光像の画角を変化させるためのズームレンズ112と、撮影用の光像の合焦状態を変化させるためのフォーカスレンズ113とが設けられている。ズームレンズ112およびフォーカスレンズ113は、それぞれ、実際には1つ又は複数のレンズ要素等で構成されるが、ここでは模式的に示している。   Also, inside the lens barrel 111 of the photographing lens 110, the zoom lens 112 for changing the focal angle and changing the angle of view of the light image for photographing, and the focus state of the light image for photographing are changed. A focus lens 113 is provided. Each of the zoom lens 112 and the focus lens 113 is actually composed of one or a plurality of lens elements or the like, but is schematically shown here.

ズームレンズ112およびフォーカスレンズ113は、図示しないエンコーダに接続されている。これにより、デジタルカメラ1Aは、ズームレンズ112およびフォーカスレンズ113の光軸OA方向の位置(代表位置)を検出可能である。また、ズームレンズ112およびフォーカスレンズ113は、それぞれ、ズームモータM1(図4)およびフォーカスモータM3(図4)に接続されている。これにより、デジタルカメラ1Aは、ズームレンズ112およびフォーカスレンズ113を光軸OA方向に駆動可能である。すなわち、デジタルカメラ1Aは、光学系の駆動による光学ズームおよびフォーカス制御が可能に構成されている。また、撮影レンズ110は、CCD120へ入射する光量を変化させるための絞り114を備える。絞り114は、ズームレンズ112とフォーカスレンズ113との中間に設けられる。絞り114は、絞りモータM2(図4)に接続されている。これにより、デジタルカメラ1Aは、露出制御のために絞り径を変化させることができる。   The zoom lens 112 and the focus lens 113 are connected to an encoder (not shown). As a result, the digital camera 1A can detect the positions (representative positions) of the zoom lens 112 and the focus lens 113 in the optical axis OA direction. The zoom lens 112 and the focus lens 113 are connected to a zoom motor M1 (FIG. 4) and a focus motor M3 (FIG. 4), respectively. As a result, the digital camera 1A can drive the zoom lens 112 and the focus lens 113 in the direction of the optical axis OA. That is, the digital camera 1A is configured to be capable of optical zoom and focus control by driving an optical system. The taking lens 110 also includes a stop 114 for changing the amount of light incident on the CCD 120. The diaphragm 114 is provided between the zoom lens 112 and the focus lens 113. The diaphragm 114 is connected to the diaphragm motor M2 (FIG. 4). Thus, the digital camera 1A can change the aperture diameter for exposure control.

デジタルカメラ1Aの上面には、デジタルカメラ1Aに撮影開始指示を与えるためのシャッタスタートボタン150(以下、シャッタボタンと略す)と、デジタルカメラ1Aの動作モードを設定するためのモード設定ダイアル160と、フラッシュ撮影時に発光するポップアップフラッシュ170とが設けられている。   On the top surface of the digital camera 1A, a shutter start button 150 (hereinafter referred to as a shutter button) for giving a shooting start instruction to the digital camera 1A, a mode setting dial 160 for setting an operation mode of the digital camera 1A, A pop-up flash 170 that emits light during flash photography is provided.

シャッタボタン150は、半押し状態S1と全押し状態S2とを判別可能な押しボタンスイッチである。デジタルカメラ1Aは、シャッタボタン150が半押し状態S1となったことを検出すると、AF(オートフォーカス)制御などの撮影準備動作を開始する。また、デジタルカメラ1Aは、シャッタボタン150が全押し状態S2となったことを検出すると、本撮影動作を開始する。   The shutter button 150 is a push button switch that can distinguish between a half-pressed state S1 and a fully-pressed state S2. When the digital camera 1A detects that the shutter button 150 is half-pressed S1, the digital camera 1A starts a shooting preparation operation such as AF (autofocus) control. Further, when the digital camera 1A detects that the shutter button 150 has been fully pressed S2, the digital camera 1A starts the main photographing operation.

モード設定ダイアル160は、被写体の静止画撮影を行う「静止画撮影モード」と、被写体の動画撮影を行う「動画撮影モード」と、記憶画像の再生表示を行う「再生モード」との間で、デジタルカメラ1Aの動作モードを切り替えるロータリースイッチである。   The mode setting dial 160 includes a “still image shooting mode” for shooting a still image of a subject, a “movie shooting mode” for shooting a movie of a subject, and a “playback mode” of playing back and displaying a stored image. This is a rotary switch for switching the operation mode of the digital camera 1A.

デジタルカメラ1Aの背面には、撮影画像のライブビュー表示や記録画像の再生表示を行なう液晶ディスプレイ(LCD;Liquid Crystal Display)180が設けられる。また、LCD180の背面上方には、撮影画像のライブビューを表示するための電子ビューファインダ(EVF;Electronic View Finder)190が設けられる。また、背面には撮影時のズームや画像再生時のフレーム送り等を行うための十字スイッチ205が設けられている。この十字スイッチ205は上下左右4個の押し釦UP,DN,LF,RTを備えており、上の釦UPの押下により望遠側へのズーム、下の釦DNの押下により広角側へのズームが行われる(以下、望遠をテレ、広角をワイドと表記する)。さらに、デジタルカメラ1Aの背面であって十字スイッチ205の中央には、決定ボタン200が設けられている。   On the back surface of the digital camera 1A, a liquid crystal display (LCD) 180 that performs live view display of captured images and playback display of recorded images is provided. Further, an electronic view finder (EVF) 190 for displaying a live view of the photographed image is provided above the back surface of the LCD 180. Also, on the back side, a cross switch 205 is provided for performing zooming at the time of shooting and frame advancement at the time of image reproduction. This cross switch 205 is provided with four push buttons UP, DN, LF, and RT on the top, bottom, left, and right. Zooming to the telephoto side is achieved by pressing the upper button UP, and zooming to the wide angle side is performed by pressing the lower button DN. (Hereinafter, telephoto is described as tele, and wide angle as wide). Further, an enter button 200 is provided on the back of the digital camera 1A and in the center of the cross switch 205.

<機能構成>
続いて、デジタルカメラ1Aの機能構成を図4のブロック図を参照しながら説明する。
<Functional configuration>
Next, the functional configuration of the digital camera 1A will be described with reference to the block diagram of FIG.

ズームレンズ112、フォーカスレンズ113および絞り114を備える撮影レンズ110によって取得された撮影用の光像は、CCD120の受光面に結像させられる。   A photographing optical image acquired by the photographing lens 110 including the zoom lens 112, the focus lens 113, and the diaphragm 114 is formed on the light receiving surface of the CCD 120.

CCD120は、撮影用の光像をR(赤),G(緑),B(青)の色成分を有する画像信号に光電変換して、信号処理部210へ出力する。当該画像信号は、CCD120を構成する受光素子(画素)の受光量に応じた画素信号の信号列である。   The CCD 120 photoelectrically converts a light image for photographing into an image signal having R (red), G (green), and B (blue) color components, and outputs the image signal to the signal processing unit 210. The image signal is a signal sequence of pixel signals corresponding to the amount of light received by the light receiving elements (pixels) constituting the CCD 120.

信号処理部210は、CCD120から入力される画像信号に所定のアナログ信号処理を行なう。信号処理部210は、相関二重サンプリング(CDS;Correlated Double Sampling)回路および自動利得制御(AGC;Automatic Gain Control)回路を備える。CDS回路は、画像信号のサンプリングノイズの低減を行なう。AGC回路は、画像信号の信号レベルの調整を行う。AGC回路における利得制御は、絞り114の絞り径およびCCD120の露光時間の調整により適正露出を得ることができない場合における画像信号のレベルアップにも用いられる。   The signal processing unit 210 performs predetermined analog signal processing on the image signal input from the CCD 120. The signal processing unit 210 includes a correlated double sampling (CDS) circuit and an automatic gain control (AGC) circuit. The CDS circuit reduces sampling noise of the image signal. The AGC circuit adjusts the signal level of the image signal. The gain control in the AGC circuit is also used to increase the level of the image signal when proper exposure cannot be obtained by adjusting the aperture diameter of the aperture 114 and the exposure time of the CCD 120.

A/D変換部220は、信号処理部210から入力されるアナログ画像信号を有するデジタル画像信号へ変換して、画像データとして画像処理部230へ出力する。これによって、R,G,B成分ごとに所定の階調数(ここでは256段階)を有するデジタルカラー画像データが生成される。   The A / D conversion unit 220 converts the digital image signal having the analog image signal input from the signal processing unit 210 and outputs the digital image signal to the image processing unit 230 as image data. As a result, digital color image data having a predetermined number of gradations (here, 256 levels) is generated for each of the R, G, and B components.

CCD120、信号処理部210およびA/D変換部220の動作は、タイミング制御回路240から入力される基準クロックに同期して行われる。タイミング制御回路240は、全体制御部250から入力される制御信号に基づいて、基準クロックを生成する。   The operations of the CCD 120, the signal processing unit 210, and the A / D conversion unit 220 are performed in synchronization with a reference clock input from the timing control circuit 240. The timing control circuit 240 generates a reference clock based on a control signal input from the overall control unit 250.

画像処理部230は、黒レベル補正回路231、ホワイトバランス(WB;White Balance)回路232、γ補正回路233および画像メモリ234を備える。   The image processing unit 230 includes a black level correction circuit 231, a white balance (WB) circuit 232, a γ correction circuit 233, and an image memory 234.

黒レベル補正回路231は、A/D変換部220から入力された画像データの黒レベルを所定の黒レベルに補正する。   The black level correction circuit 231 corrects the black level of the image data input from the A / D conversion unit 220 to a predetermined black level.

WB回路232は、画像データのR,G,Bの色成分のレベル変換を行う。レベル変換は、全体制御部250から入力されるレベル変換テーブルを用いて行われる。このレベル変換テーブルは、全体制御部250により撮影画像ごとに設定される。   The WB circuit 232 performs level conversion of R, G, and B color components of the image data. The level conversion is performed using a level conversion table input from the overall control unit 250. This level conversion table is set for each captured image by the overall control unit 250.

γ補正回路233は、WB回路232から入力された画像データの階調変換を行う。階調変換は、所定のレベル変換テーブルに基づいて行われる。   The γ correction circuit 233 performs gradation conversion of the image data input from the WB circuit 232. The gradation conversion is performed based on a predetermined level conversion table.

画像メモリ234は、γ補正回路233から入力された画像データを一時的に格納する。画像メモリ234は、全画素数分の画像データを格納可能な記憶容量を有する。   The image memory 234 temporarily stores the image data input from the γ correction circuit 233. The image memory 234 has a storage capacity capable of storing image data for the total number of pixels.

デジタルカメラ1Aは、ズームモータ制御部260、絞りモータ制御部270およびフォーカスモータ制御部280を備える。ズームモータ制御部260、絞りモータ制御部270およびフォーカスモータ制御部280は、それぞれ、全体制御部250から入力されるズーム制御信号、絞り制御信号およびフォーカス制御信号に基づいて、ズームモータM1、絞りモータM2およびフォーカスモータM3へ駆動電力を供給する。これにより、全体制御部250は、撮影レンズ110のズーム倍率、絞り径およびフォーカス状態を変化させることが可能である。   The digital camera 1A includes a zoom motor control unit 260, an aperture motor control unit 270, and a focus motor control unit 280. The zoom motor control unit 260, the aperture motor control unit 270, and the focus motor control unit 280 are based on the zoom control signal, the aperture control signal, and the focus control signal input from the overall control unit 250, respectively. Drive power is supplied to M2 and focus motor M3. As a result, the overall control unit 250 can change the zoom magnification, the aperture diameter, and the focus state of the photographing lens 110.

また、デジタルカメラ1Aは、ズームレンズ112およびフォーカスレンズ113の位置を検出するためのエンコーダを含むレンズ位置検出部290を備える。レンズ位置検出部290は、検出したズームレンズ112およびフォーカスレンズ113の位置を全体制御部250へ出力する。   The digital camera 1A also includes a lens position detection unit 290 including an encoder for detecting the positions of the zoom lens 112 and the focus lens 113. The lens position detection unit 290 outputs the detected positions of the zoom lens 112 and the focus lens 113 to the overall control unit 250.

さらに、デジタルカメラ1Aは、フラッシュ回路310およびポップアップフラッシュ170を備える。フラッシュ回路310は、全体制御部250から入力されるフラッシュ制御信号に応答して、ポップアップフラッシュ170にフラッシュ発光のための電力を供給する。   Further, the digital camera 1A includes a flash circuit 310 and a pop-up flash 170. The flash circuit 310 supplies power for flash emission to the pop-up flash 170 in response to a flash control signal input from the overall control unit 250.

また、デジタルカメラ1Aは、操作部320を備える。操作部320は、先述したシャッタボタン150、モード設定ダイアル160および決定ボタン200を包含している。全体制御部250は、これらの操作部材の状態を検出し、デジタルカメラ1Aの動作に反映させる。   The digital camera 1 </ b> A includes an operation unit 320. The operation unit 320 includes the shutter button 150, the mode setting dial 160, and the determination button 200 described above. The overall control unit 250 detects the states of these operation members and reflects them in the operation of the digital camera 1A.

デジタルカメラ1Aは、EVF190およびLCD180に表示される画像のバッファメモリとなるEVFVRAM330およびLCDVRAM340を備える。EVFVRAM330およびLCDVRAM340は、それぞれ、EVF190およびLCD180と画素数が同一の画像データを格納可能な記憶容量を有している。   The digital camera 1 </ b> A includes an EVFVRAM 330 and an LCDVRAM 340 that serve as buffer memories for images displayed on the EVF 190 and the LCD 180. The EVFVRAM 330 and the LCDVRAM 340 have storage capacities capable of storing image data having the same number of pixels as the EVF 190 and the LCD 180, respectively.

また、デジタルカメラ1Aは、カードインターフェース350、メモリカード360および通信用I/F370を備える。メモリカード360は、撮影済の画像データを記憶する不揮発性のメモリである。カードインターフェース350は、メモリカード360に対する画像データの書込みおよびメモリカード360からの画像データの読み出しを行なうためのインターフェースである。通信用I/F370は、デジタルカメラ1Aに接続された外部機器との間で通信を行うためのインターフェースである。   The digital camera 1A also includes a card interface 350, a memory card 360, and a communication I / F 370. The memory card 360 is a non-volatile memory that stores captured image data. The card interface 350 is an interface for writing image data to the memory card 360 and reading image data from the memory card 360. The communication I / F 370 is an interface for performing communication with an external device connected to the digital camera 1A.

撮影モードの撮影待機状態においては、CCD120において所定時間間隔で生成された画像信号は、信号処理部210、A/D変換部220、および画像処理部230の各処理回路231〜234で処理された後に画像データとして画像メモリ234に一時的に格納される。当該画像データは、全体制御部250によって読み出され、EVF190およびLCD180と画素数が同一の画像データへ変換される。さらに、変換された画像データは、EVFVRAM330およびLCDVRAM340へ転送され、EVF190およびLCD180にライブビューとして表示される。これにより、撮影者は被写体像を視認可能である。また、再生モードにおいては、メモリカード360に記憶された画像データが、カードインターフェース350を介して全体制御部250によって読み出され、所定の画像処理が施される。画像処理が施された画像データは、EVF190およびLCD180と画素数が同一の画像データへ変換され、EVFVRAM330およびLCDVRAM340へ転送される。そして、この画像データは、EVF190およびLCD180に再生表示される。   In the shooting standby state in the shooting mode, the image signals generated at predetermined time intervals in the CCD 120 are processed by the processing circuits 231 to 234 of the signal processing unit 210, the A / D conversion unit 220, and the image processing unit 230. Later, it is temporarily stored in the image memory 234 as image data. The image data is read by the overall control unit 250 and converted into image data having the same number of pixels as the EVF 190 and the LCD 180. Further, the converted image data is transferred to the EVFVRAM 330 and the LCDVRAM 340 and displayed on the EVF 190 and the LCD 180 as a live view. Thereby, the photographer can visually recognize the subject image. In the playback mode, the image data stored in the memory card 360 is read by the overall control unit 250 via the card interface 350 and subjected to predetermined image processing. The image data subjected to the image processing is converted into image data having the same number of pixels as the EVF 190 and the LCD 180 and transferred to the EVFVRAM 330 and the LCDVRAM 340. This image data is reproduced and displayed on the EVF 190 and the LCD 180.

また、全体制御部250は、少なくともCPU251、RAM252およびROM253を備えるマイクロコンピュータであり、ROM253に格納されているプログラムPGにしたがってデジタルカメラ1Aの各構成の動作を統括的に制御する。また、図4の全体制御部250においては、CPU251、RAM252およびROM253によって実現される機能が、夜景判定部254、AF制御部255、AE制御部256および撮影条件設定部257として模式的に表現されている。   The overall control unit 250 is a microcomputer including at least a CPU 251, a RAM 252, and a ROM 253, and comprehensively controls the operation of each component of the digital camera 1 </ b> A according to a program PG stored in the ROM 253. 4, functions realized by the CPU 251, the RAM 252, and the ROM 253 are schematically expressed as a night scene determination unit 254, an AF control unit 255, an AE control unit 256, and a shooting condition setting unit 257. ing.

夜景判定部254は、撮影シーンが夜景シーンであるか否かを画像データに基づいて判定する。AF制御部255は、AF評価値(合焦評価値)に基づいてオートフォーカス制御(自動合焦制御)を行い、AE制御部256は、AE評価値に基づいて自動露出制御を行う。また、撮影条件設定部257は、撮影シーンに応じて、撮影条件(絞り値、シャッタスピード、画像処理の内容等)を設定する。   The night view determination unit 254 determines whether the shooting scene is a night view scene based on the image data. The AF control unit 255 performs autofocus control (automatic focus control) based on the AF evaluation value (focus evaluation value), and the AE control unit 256 performs automatic exposure control based on the AE evaluation value. The shooting condition setting unit 257 sets shooting conditions (aperture value, shutter speed, image processing content, etc.) according to the shooting scene.

また、デジタルカメラ1Aは、さらに、AF評価値演算部236と高輝度画素検出部237とブロック輝度演算部238とを備えている。これらの各部による処理については次述する。   The digital camera 1 </ b> A further includes an AF evaluation value calculation unit 236, a high luminance pixel detection unit 237, and a block luminance calculation unit 238. The processing by these units will be described below.

<AF>
つぎに、AF処理について説明する。
<AF>
Next, the AF process will be described.

図5は、自動合焦制御(AF制御)用の画像MG1を示す図である。この画像MG1は、CCD120の全画素のうちの一部で構成される画像である。例えば、CCD120が2560×1920個の全画素数を有するものとするとき、画像MG1は、CCD120から読み出された垂直方向中央に位置する帯状領域である中央帯状領域CR(2560×240個の画素数を有する)のうち、水平方向中央に位置する320×240個の画素で構成される。   FIG. 5 is a diagram showing an image MG1 for automatic focusing control (AF control). This image MG1 is an image composed of a part of all the pixels of the CCD 120. For example, when the CCD 120 has a total number of pixels of 2560 × 1920, the image MG1 is a central strip region CR (2560 × 240 pixels) that is a strip region located at the center in the vertical direction read from the CCD 120. The pixel is composed of 320 × 240 pixels located at the center in the horizontal direction.

AF評価値演算部236(図4)は、フレーミング領域(すなわち撮影画像全体)FRのうちの画像MG1に対応する領域(言い換えれば、フレーミング領域FR内の中央部分に相当する領域)を合焦評価領域(以下、「AFエリア」とも称する)ARとして用い、そのAFエリアAR内の各画素の画素値に基づいてAF評価値を算出する。ここでは、AF評価値としてコントラスト値Cを用いるものとする。詳細には、AF評価値演算部236は、注目画素と、その注目画素の近隣に位置し且つ注目画素と一定の位置関係を有する画素(例えば水平方向に隣接する画素)との差分絶対値を求め、その差分演算結果を累積加算していく。この累積加算は、AFエリアARに含まれる全ての画素が注目画素として選択されるまで繰り返される。これによって、AFエリアARについてのコントラスト値Cが求められ、得られたコントラスト値Cは、全体制御部250に出力される。   The AF evaluation value calculation unit 236 (FIG. 4) focuses on a region corresponding to the image MG1 in the framing region (that is, the entire captured image) FR (in other words, a region corresponding to the central portion in the framing region FR). An AF evaluation value is calculated based on the pixel value of each pixel in the AF area AR, which is used as an area (hereinafter also referred to as “AF area”) AR. Here, the contrast value C is used as the AF evaluation value. Specifically, the AF evaluation value calculation unit 236 calculates the absolute difference between the target pixel and a pixel (for example, a pixel adjacent in the horizontal direction) located in the vicinity of the target pixel and having a certain positional relationship with the target pixel. The difference calculation results are cumulatively added. This cumulative addition is repeated until all the pixels included in the AF area AR are selected as the target pixel. Thus, the contrast value C for the AF area AR is obtained, and the obtained contrast value C is output to the overall control unit 250.

全体制御部250のAF(オートフォーカス)制御部255は、AFエリアARのコントラスト値Cに基づいて合焦の度合いを判定し、フォーカスレンズを合焦位置に移動させる。   The AF (autofocus) control unit 255 of the overall control unit 250 determines the degree of focus based on the contrast value C of the AF area AR, and moves the focus lens to the focus position.

<AE>
さらに、AE処理について説明する。
<AE>
Further, the AE process will be described.

図6は、自動露出制御用(AE制御用)の画像MG2を示す図である。この画像MG2は、CCD120の全画素のうちの一部を間引いて構成される間引き画像である。例えば、画像MG2は、2560×1920個の全画素数を有するCCD120において、水平方向および垂直方向にそれぞれ1/8間引きされることによって、320×240個の画素を有する画像データとして生成される。この画像MG2は、撮影対象全体(言い換えればフレーミング領域全体)を示す粗画像となっている。   FIG. 6 is a diagram showing an image MG2 for automatic exposure control (AE control). This image MG2 is a thinned image configured by thinning out a part of all the pixels of the CCD 120. For example, the image MG2 is generated as image data having 320 × 240 pixels by being thinned by 1/8 in the horizontal direction and the vertical direction in the CCD 120 having the total number of pixels of 2560 × 1920. This image MG2 is a rough image showing the entire subject to be photographed (in other words, the entire framing area).

ブロック輝度演算部238は、画像MG2内を用いて自動露出制御用のAE評価値を算出する。ブロック輝度演算部238は、A/D変換部220から出力される画像データ(画像MG2)を、例えば300ブロック(=(20×15)ブロック)に分割(区分)し、各ブロック(区分領域)ごとに測光データを算出する多分割測光を行う。例えば、ブロック輝度演算部238は、G色成分の画素値の平均値を被写体輝度として算出し、全体制御部250に出力する。あるいは、R色成分とG色成分とB色成分との全成分の合成値としてY成分を算出し、そのY成分の画素値の平均値を被写体輝度として算出するようにしてもよい。   The block luminance calculation unit 238 calculates an AE evaluation value for automatic exposure control using the inside of the image MG2. The block luminance calculation unit 238 divides (divides) the image data (image MG2) output from the A / D conversion unit 220 into, for example, 300 blocks (= (20 × 15) blocks), and each block (divided area) Multi-segment photometry is performed to calculate photometric data for each time. For example, the block luminance calculation unit 238 calculates the average value of the pixel values of the G color component as the subject luminance and outputs it to the overall control unit 250. Alternatively, the Y component may be calculated as a composite value of all components of the R color component, the G color component, and the B color component, and the average value of the pixel values of the Y component may be calculated as the subject luminance.

また、全体制御部250のAE制御部256は、入力される被写体輝度値に基づいて、露出制御値(絞り値、シャッタスピード、ゲイン)を算出し、各部を制御することで、AEを実現する。   Further, the AE control unit 256 of the overall control unit 250 calculates an exposure control value (aperture value, shutter speed, gain) based on the input subject luminance value and controls each unit to realize AE. .

なお、このデジタルカメラ1Aは、画像MG1,MG2をほぼ同時に取得することができる。また、フレーミング領域FR内における両画像MG1,MG2の位置関係を示すため、図6の画像MG2において図5のAFエリアAR(画像MG1)に相当する領域を破線で示している。   The digital camera 1A can acquire the images MG1 and MG2 almost simultaneously. In order to show the positional relationship between the images MG1 and MG2 in the framing region FR, a region corresponding to the AF area AR (image MG1) in FIG. 5 in the image MG2 in FIG. 6 is indicated by a broken line.

<夜景判定>
つぎに、このデジタルカメラ1Aにおける撮影シーンが夜景シーンであるか否かの判定(以下、単に「夜景判定」とも称する)について説明する。ここでは、上記の2つの画像MG1,MG2を用いて、夜景判定を行う場合を例示する。この夜景判定は、夜景判定部254によって行われる。
<Night scene judgment>
Next, determination of whether or not the shooting scene in the digital camera 1A is a night scene (hereinafter also simply referred to as “night scene determination”) will be described. Here, a case where night scene determination is performed using the above-described two images MG1 and MG2 is illustrated. This night view determination is performed by the night view determination unit 254.

夜景シーンにおいては、夜景の点光源部分は画面中央部分に分布しており、画面の端側は暗いという一般的傾向が存在する。次述する処理は、このような性質に着目し、そして、このような性質を利用して、より正確に夜景であるか否かを判定するものである。   In a night view scene, there is a general tendency that the point light source portion of the night view is distributed in the center of the screen and the end side of the screen is dark. The processing described below pays attention to such a property, and uses such a property to determine whether or not it is a night view more accurately.

具体的には、夜景判定部254は、(1)画像MG1(すなわちAFエリアAR)において「高輝度画素」が所定数(N個)以上存在するという条件CA、および(2)画像MG2における周縁部分MRに存在する周縁ブロックのうち、「低輝度ブロック」が所定数(M個)以上存在するという条件CBの両条件が満たされる場合に、夜景であると判定する。以下では、それぞれの条件について説明する。   Specifically, the night view determination unit 254 (1) a condition CA that there are a predetermined number (N) or more of “high luminance pixels” in the image MG1 (that is, the AF area AR), and (2) a peripheral edge in the image MG2. When both conditions of the condition CB that a predetermined number (M) or more of “low-intensity blocks” are present among the peripheral blocks present in the partial MR are satisfied, it is determined to be a night scene. Below, each condition is demonstrated.

まず、条件CAについて説明する。画像MG1(すなわちAFエリアAR)において高輝度画素が所定数(N個)以上存在する場合には、画面の中央部分に高輝度部が存在するものとして判定される。より詳細には、高輝度画素検出部237が、画素値(Y成分あるいはG成分等)が閾値TH1(例えば250)以上の画素を「高輝度画素」と判定して検出する。そして、夜景判定部254は、検出された高輝度画素がAFエリアAR内にN個以上存在する場合に、条件CAを満たすものと判定する。なお、閾値TH1を最大値MAX(例えば255)に設定する場合には、「高輝度画素」は「オーバーフロー画素(後述)」と同義になる。   First, the condition CA will be described. When a predetermined number (N) or more of high-luminance pixels are present in the image MG1 (that is, the AF area AR), it is determined that a high-luminance portion exists in the center portion of the screen. More specifically, the high luminance pixel detection unit 237 determines and detects a pixel having a pixel value (Y component, G component, or the like) equal to or higher than a threshold TH1 (for example, 250) as a “high luminance pixel”. The night view determination unit 254 determines that the condition CA is satisfied when N or more detected high-luminance pixels exist in the AF area AR. When the threshold value TH1 is set to the maximum value MAX (for example, 255), “high luminance pixel” is synonymous with “overflow pixel (described later)”.

次に、条件CBについて説明する。夜景判定部254は、画像MG2における20×15個(合計300個)のブロックBL(i,j)のうち、画面の周縁部分MRに存在する92個のブロック(図6の斜線部分)を判定対象として選択する。より詳細には、夜景判定部254は、上端側周縁ブロック群BG1と左端側周縁ブロック群BG2と右端側周縁ブロック群BG3との3つのブロック群で構成される周縁部分MRを、判定対象として選択する。なお、上端側周縁ブロック群BG1は、上端側周縁部分に存在し、最上段のブロックBL(1,1)〜BL(20,1)の20ブロックと、その下側のブロックBL(1,2)〜BL(20,2)の20ブロックとを合わせた合計40ブロックで構成されるブロック群である。また、左端側周縁ブロック群BG2は、左端側周縁部分に存在し、最左列のブロックBL(1,3)〜BL(1,15)の13ブロックと、その右側のブロックBL(2,3)〜BL(2,15)の13ブロックとを合わせた合計26ブロックで構成されるブロック群である。同様に、右端側周縁ブロック群BG3は、右端側周縁部分に存在し、最右列のブロックBL(20,3)〜BL(20,15)の13ブロックと、その左側のブロックBL(19,3)〜BL(19,15)の13ブロックとを合わせた合計26ブロックで構成されるブロック群である。   Next, the condition CB will be described. The night view determination unit 254 determines 92 blocks (hatched portions in FIG. 6) existing in the peripheral portion MR of the screen among 20 × 15 (total 300) blocks BL (i, j) in the image MG2. Select as target. More specifically, the night view determination unit 254 selects a peripheral portion MR composed of three block groups of an upper end side peripheral block group BG1, a left end side peripheral block group BG2, and a right end side peripheral block group BG3 as a determination target. To do. The upper end side peripheral block group BG1 exists in the upper end side peripheral portion, and the uppermost block BL (1, 1) to BL (20, 1) 20 blocks and the lower block BL (1, 2). ) To BL (20, 2), a total of 40 blocks including 20 blocks. Further, the left end side peripheral block group BG2 exists in the left end side peripheral portion, and 13 blocks BL (1, 3) to BL (1, 15) in the leftmost column and the right side block BL (2, 3). ) To BL (2,15), and a total of 26 blocks. Similarly, the right end side peripheral block group BG3 exists in the right end side peripheral edge portion, and the rightmost block BL (20, 3) to BL (20, 15) has 13 blocks and the left side block BL (19, 19). 3) is a block group composed of a total of 26 blocks including 13 blocks of BL (19, 15).

夜景判定部254は、判定対象の上記92ブロックのうち、その平均輝度が所定の閾値TH2(例えば20)以下であるブロックを「低輝度ブロック(低輝度区分領域とも称する)」として判定し、低輝度ブロックの数を算出する。そして、低輝度ブロックがM個以上存在する場合には、画像の周縁部分に低輝度部が存在するものとみなす。なお、各ブロックの平均輝度は、ブロック輝度演算部238によって算出された値を用いればよい。   The night scene determination unit 254 determines a block whose average luminance is equal to or less than a predetermined threshold value TH2 (for example, 20) from among the above 92 blocks to be determined as a “low luminance block (also referred to as a low luminance division region)”. Calculate the number of luminance blocks. If there are M or more low-luminance blocks, it is assumed that the low-luminance portion exists in the peripheral portion of the image. In addition, what is necessary is just to use the value calculated by the block brightness calculating part 238 for the average brightness | luminance of each block.

夜景判定部254は、上記のような条件CA,CBの両方が満たされる場合に、撮影シーンが夜景シーンであると判定する。   The night scene determination unit 254 determines that the shooting scene is a night scene when both of the above conditions CA and CB are satisfied.

そして、夜景シーンであると判定される場合には、夜景シーンに適したAF手法を採用するとともに、撮影条件を夜景シーンに適した条件(夜景シーン撮影用の条件)に設定する。このような動作については後に詳述する。   When it is determined that the scene is a night scene, the AF method suitable for the night scene is adopted, and the shooting condition is set to a condition suitable for the night scene (condition for shooting the night scene). Such an operation will be described in detail later.

以上のような夜景判定によれば、より正確に夜景シーンであるか否かを判定することが可能である。   According to the night view determination as described above, it is possible to determine whether or not the night view scene is more accurate.

特に、フレーミング領域FRの周縁部分、より詳細には、上記の92ブロックに低輝度部が存在するか否かを判定しているので、夜景判定の精度を向上させることができる。また、この92ブロックには、夜景撮影時の「夜空」の部分に対応する上端側周縁部分が含まれている。そして、このような上端側周縁部分を含む周縁部分において、低輝度部の存在の有無を判定しているので、さらに正確に夜景判定を行うことができる。   In particular, since it is determined whether or not there is a low-luminance portion in the peripheral portion of the framing region FR, more specifically, the 92 blocks, it is possible to improve night scene determination accuracy. In addition, the 92 blocks include a peripheral portion on the upper end side corresponding to the “night sky” portion at the time of night scene shooting. And since the presence or absence of a low-intensity part is determined in the peripheral part including such an upper end side peripheral part, night scene determination can be performed more accurately.

また、AFエリアAR内において本撮影画像と同様の画素数(解像度)を有するAF用画像データ(言い換えれば、間引き画像データではないAF用画像データ)に基づいて高輝度画素の存在数を判定しているので、より正確に高輝度画素の存在数を認識することができる。   Further, the number of high-luminance pixels is determined based on AF image data (in other words, AF image data that is not thinned-out image data) having the same number of pixels (resolution) as the actual captured image in the AF area AR. Therefore, the number of high-luminance pixels can be recognized more accurately.

さらに、本撮影画像に対する間引き画像であるAE用画像データに基づいて、低輝度ブロックであるか否かを判定しているので、平均輝度算出にあたって演算対象となる画素の数を低減して効率的に夜景判定を行うことが可能になる。   Furthermore, since it is determined whether or not the block is a low-intensity block based on the AE image data that is a thinned-out image of the actual captured image, the number of pixels to be calculated can be efficiently reduced in calculating the average luminance. It becomes possible to perform night view judgment.

<動作>
図7〜図9のフローチャートを参照しながら、デジタルカメラ1Aの撮影動作について説明する。
<Operation>
The photographing operation of the digital camera 1A will be described with reference to the flowcharts of FIGS.

まず、ステップSP10(図7)においては、シャッタボタン150が半押し状態S1であるか否かが判定される。半押し状態S1であることが確認されると、AF動作等を行うためステップSP20以降に進む。   First, in step SP10 (FIG. 7), it is determined whether or not the shutter button 150 is in the half-pressed state S1. If it is confirmed that it is in the half-pressed state S1, the process proceeds to step SP20 and subsequent steps in order to perform an AF operation or the like.

ステップSP20〜SP50においては撮影シーンが夜景シーンであるか否かを判定し、撮影シーンが夜景シーンでないと判定された場合には手法MAでAF動作を行い(ステップSP60)、撮影シーンが夜景シーンであると判定された場合には別の手法MBでAF動作を行う(ステップSP70)。なお、手法MA,MBは、いずれも画像データを用いたAF(いわゆる山登り法)である点で共通するが、初期微小駆動の有無、レンズ位置の移動法等において相違する。   In steps SP20 to SP50, it is determined whether or not the shooting scene is a night scene. If it is determined that the shooting scene is not a night scene, an AF operation is performed by the method MA (step SP60), and the shooting scene is a night scene. If it is determined that, AF operation is performed by another method MB (step SP70). The methods MA and MB are common in that both are AF (so-called hill-climbing method) using image data, but differ in the presence or absence of initial micro-driving, the lens position moving method, and the like.

その後、シャッタボタン150が全押し状態S2にされるまでAF動作が継続され、シャッタボタン150が全押し状態S2にされると、本撮影のための撮影条件が設定され(ステップSP90)、本撮影動作が行われる(ステップSP100)。   Thereafter, the AF operation is continued until the shutter button 150 is fully pressed S2, and when the shutter button 150 is fully pressed S2, shooting conditions for the main shooting are set (step SP90), and the main shooting is performed. An operation is performed (step SP100).

具体的には、ステップSP20において、夜景判定部254は、高輝度画素検出部237によって検出された「高輝度画素」の数を取得し、その高輝度画素の数に基づいて、画面中央部に高輝度部が存在するか否かを判定する。夜景判定部254は、高輝度画素検出部237によって検出された高輝度画素がAFエリアAR内にN個以上存在する場合には、画面中央部に高輝度部が存在するものと判定し、夜景シーンであると判定するための条件(「夜景判定条件」とも称する)の1つの要件を満たしているものと判定する。ステップSP30の分岐処理では、夜景判定条件の1つの要件を満たしていると判定される場合にはステップSP40に進み、当該要件を満たしていないと判定される場合にはステップSP60に進む。   Specifically, in step SP20, the night scene determination unit 254 acquires the number of “high luminance pixels” detected by the high luminance pixel detection unit 237, and displays the number of high luminance pixels in the center of the screen. It is determined whether or not a high luminance part exists. When there are N or more high-luminance pixels detected by the high-luminance pixel detection unit 237 in the AF area AR, the night scene determination unit 254 determines that the high-luminance part exists in the center of the screen, and the night scene It is determined that one of the conditions for determining that the scene is a scene (also referred to as “night scene determination condition”) is satisfied. In the branching process of step SP30, when it is determined that one requirement of the night view determination condition is satisfied, the process proceeds to step SP40, and when it is determined that the requirement is not satisfied, the process proceeds to step SP60.

ステップSP40では、夜景判定部254は、ブロック輝度演算部238によって算出されたブロック輝度に基づいて、上述の判定対象の92ブロックのうちの低輝度ブロックの数に基づいて、画面周縁部に低輝度部が存在するか否かを判定する。具体的には、低輝度ブロックの数がM個以上の場合には、画面周縁部に低輝度部が存在すると判定し、夜景判定条件のもう1つの要件をも満たしていると判定する。ステップSP50の分岐処理では、夜景判定条件に関する2つ目の要件をも満たしていると判定される場合にはステップSP70に進み、当該要件を満たしていないと判定される場合にはステップSP60に進む。   In step SP40, the night scene determination unit 254 has a low luminance at the screen periphery based on the number of low luminance blocks among the 92 blocks to be determined based on the block luminance calculated by the block luminance calculation unit 238. It is determined whether or not a part exists. Specifically, when the number of low-luminance blocks is M or more, it is determined that a low-luminance portion is present at the peripheral edge portion of the screen, and it is determined that another requirement for night scene determination conditions is also satisfied. In the branching process of step SP50, when it is determined that the second requirement regarding the night view determination condition is also satisfied, the process proceeds to step SP70, and when it is determined that the requirement is not satisfied, the process proceeds to step SP60. .

次に、図8のフローチャートを参照しながら、手法MAによるAF動作(ステップSP60)について説明する。   Next, the AF operation (step SP60) by the technique MA will be described with reference to the flowchart of FIG.

ステップSP61において、レンズ微小駆動ルーチンが実行され、フォーカスレンズ113のレンズ駆動方向が決定される。具体的には、図10にも示すように、AF制御部255は、フォーカスレンズ113の位置をレンズ初期位置から近側に所定量だけ移動させる。そして、レンズ移動前のAF評価値とレンズ移動後のAF評価値とを比較して、AF評価値がより適切な値になる方向(例えばコントラスト値Cがより大きくなる方向)にフォーカスレンズ113の合焦位置が存在するものと推定し、AF評価値がより適切な値になる方向をレンズ駆動方向として決定する。   In step SP61, a minute lens driving routine is executed, and the lens driving direction of the focus lens 113 is determined. Specifically, as shown in FIG. 10, the AF control unit 255 moves the position of the focus lens 113 from the initial lens position to the near side by a predetermined amount. Then, the AF evaluation value before moving the lens and the AF evaluation value after moving the lens are compared, and the focus lens 113 is moved in a direction in which the AF evaluation value becomes a more appropriate value (for example, a direction in which the contrast value C becomes larger). It is estimated that the in-focus position exists, and the direction in which the AF evaluation value becomes a more appropriate value is determined as the lens driving direction.

次のステップSP62においては、ステップSP61で決定されたレンズ駆動方向に向けて、フォーカスレンズ113を所定量ΔXずつ移動させつつ、各レンズ位置でのAF評価値を取得する。このフォーカスレンズ113の移動動作等は、AF評価値の変化曲線が極大となるまで繰り返される(図10参照)。   In the next step SP62, the AF evaluation value at each lens position is acquired while moving the focus lens 113 by a predetermined amount ΔX toward the lens driving direction determined in step SP61. This movement operation of the focus lens 113 is repeated until the change curve of the AF evaluation value reaches a maximum (see FIG. 10).

そして、極大値付近の数点、たとえば、(X(n−1),Y(n−1))、(X(n),Y(n))、(X(n+1),Y(n+1))の3点のデータを用いて、二次補間近似計算によりAF評価値がピークとなるレンズ位置(合焦位置)を求める(ステップSP63)。その後、ステップSP64において、ステップSP63で求められた合焦位置にフォーカスレンズ113を移動させる。   Then, several points near the maximum value, for example, (X (n-1), Y (n-1)), (X (n), Y (n)), (X (n + 1), Y (n + 1)) The lens position (focus position) at which the AF evaluation value reaches a peak is obtained by quadratic interpolation approximation calculation (step SP63). Thereafter, in step SP64, the focus lens 113 is moved to the in-focus position obtained in step SP63.

以上のようにして手法MAによるAF動作が行われる。   As described above, the AF operation by the method MA is performed.

次に、図9のフローチャートを参照しながら、手法MBによるAF動作(ステップSP70)について説明する。この手法MBにおいては、撮影シーンが夜景シーンであることを前提にして、AF動作が行われる。手法MBは、フォーカスレンズ113を一旦無限遠端に移動させた後に、フォーカスレンズ113を近側に向けて移動させつつ各レンズ位置におけるAF評価値を取得し、当該AF評価値が最適化されるレンズ位置を合焦位置として検出する手法である。   Next, the AF operation (step SP70) using the technique MB will be described with reference to the flowchart of FIG. In this method MB, the AF operation is performed on the assumption that the shooting scene is a night scene. In the method MB, after the focus lens 113 is once moved to the infinity end, the AF evaluation value at each lens position is acquired while the focus lens 113 is moved toward the near side, and the AF evaluation value is optimized. This is a method for detecting the lens position as the in-focus position.

具体的には、まず、ステップSP71においてフォーカスレンズ113のレンズ位置を無限遠端にまで移動する(図11も参照)。   Specifically, first, in step SP71, the lens position of the focus lens 113 is moved to the infinity end (see also FIG. 11).

次のステップSP72においては、フォーカスレンズ113を近側に向けて所定量ΔXずつ移動させつつ、各レンズ位置でのAF評価値を取得する。このフォーカスレンズ113の移動動作等は、AF評価値の変化曲線が極大となるまで繰り返される。   In the next step SP72, the AF evaluation value at each lens position is acquired while moving the focus lens 113 by a predetermined amount ΔX toward the near side. This movement operation of the focus lens 113 is repeated until the change curve of the AF evaluation value becomes maximum.

そして、極大値付近の数点(たとえば3点)のデータを用いて、二次補間近似計算によりAF評価値がピークとなるレンズ位置(合焦位置)が求められ(ステップSP73)、その合焦位置にフォーカスレンズ113が移動される(ステップSP74)。ステップSP73,SP74の処理は、ステップSP63,64と同様の処理である。   Then, using the data of several points (for example, three points) near the maximum value, the lens position (focus position) at which the AF evaluation value reaches a peak is obtained by secondary interpolation approximation calculation (step SP73). The focus lens 113 is moved to the position (step SP74). The processing of steps SP73 and SP74 is the same as that of steps SP63 and 64.

以上のようにして手法MBによるAF動作が行われる。   As described above, the AF operation by the method MB is performed.

夜景シーンの撮影においては、被写体は比較的遠方に存在することが多いという性質が存在する。上記の処理では、この性質を利用して、無限遠端から近側に向けてフォーカスレンズ113を移動させている。これによれば、手法MAのステップSP61に示すようなレンズ駆動方向の決定動作が不要になるため、より高速なAF動作を行うことができる。また、次述するような擬合焦をも回避できるため、より正確なAF動作を行うことも可能になる。   In photographing night scenes, there is a property that a subject often exists relatively far away. In the above process, the focus lens 113 is moved from the infinity end toward the near side using this property. According to this, since the determination operation of the lens driving direction as shown in step SP61 of the technique MA is not necessary, a higher-speed AF operation can be performed. Further, since it is possible to avoid pseudo-focusing as described below, it is possible to perform a more accurate AF operation.

図11には、擬似ピークが存在する状況が例示されている。例えば、ぼけた状態の比較的大きな点光源が、手振れ等によってAFエリアAR(図5)に対して出入りすることなどに起因して、図11に示すように本来の合焦位置よりも近側に擬似ピークが表れることがある。仮に、夜景撮影時に手法MAを用いると、レンズ初期位置によっては、この擬似ピークの影響を受けてしまい、被写体に関する本来の合焦位置に到達できないことがある。   FIG. 11 illustrates a situation where a pseudo peak exists. For example, a relatively large point light source in a blurred state enters or exits the AF area AR (FIG. 5) due to camera shake or the like, and is closer to the original focus position as shown in FIG. May show a pseudo peak. If the method MA is used during night scene shooting, depending on the initial position of the lens, it may be affected by this pseudo peak, and the original in-focus position for the subject may not be reached.

これに対して、手法MBを用いる場合には、フォーカスレンズ113を最初に無限遠端にまで移動させてしまうため、上記のような擬似ピークの検出を回避して、本来の合焦位置にフォーカスレンズ113を移動させることが可能である。   On the other hand, when the method MB is used, since the focus lens 113 is first moved to the infinity end, the detection of the pseudo peak as described above is avoided, and the focus is adjusted to the original in-focus position. The lens 113 can be moved.

以上のように、撮影シーンが夜景シーンであると判定される場合には、手法MBを用いたAF動作が行われるため、より高速且つより正確なAF動作を行うことが可能である。   As described above, when it is determined that the shooting scene is a night scene, since the AF operation using the technique MB is performed, it is possible to perform a faster and more accurate AF operation.

なお、ここではAF評価値としてコントラスト値Cを採用しており、その値が大きくなるにつれて合焦度合いが大きくなる場合を例示しているが、これに限定されず、逆に、その値が小さくなるにつれて合焦度合いが大きくなるようなAF評価値を用いても良い。後者の場合には、例えばステップSP62,SP72において、AF評価値が極小となるまでフォーカスレンズ113の移動動作等を繰り返せばよい。   Here, the contrast value C is adopted as the AF evaluation value, and the case where the degree of focusing increases as the value increases is illustrated. However, the present invention is not limited to this, and conversely the value decreases. An AF evaluation value may be used so that the degree of focus increases as the time increases. In the latter case, for example, in steps SP62 and SP72, the movement operation of the focus lens 113 may be repeated until the AF evaluation value becomes minimum.

さて、以上のAF動作が行われた後、シャッタボタン150が全押し状態S2にされたことがステップSP80において判定されると、本撮影のための撮影条件が設定される(ステップSP90)。   If it is determined in step SP80 that the shutter button 150 has been fully pressed S2 after the above-described AF operation has been performed, shooting conditions for actual shooting are set (step SP90).

具体的には、撮影シーンが夜景シーンであるか否かに応じて、撮影条件の設定を変更する。   Specifically, the setting of the shooting condition is changed according to whether or not the shooting scene is a night scene.

ステップSP20〜SP50において撮影シーンが夜景シーンであると判定されている場合には、撮影条件を夜景シーン撮影用のものに設定する。詳細には、絞りを開放にして、シャッタスピードを通常撮影よりも短くして、露出制御パラメータを夜景シーン撮影用の値に設定する。また、夜景シーン撮影時には、ノイズが発生しやすいという性質がある。そこで、ノイズリダクションをオンにして、ノイズを除去するような画像処理を行うべき旨を設定する。これにより、ノイズを抑制した撮影画像を得ることが可能になる。以上のような設定動作によれば、撮影シーンが夜景シーンである場合に、より適切な撮影条件による撮影画像を得ることが可能になる。   If it is determined in steps SP20 to SP50 that the shooting scene is a night scene, the shooting conditions are set for shooting a night scene. More specifically, the aperture is opened, the shutter speed is made shorter than normal shooting, and the exposure control parameter is set to a value for night scene shooting. Also, there is a property that noise is likely to occur during night scene shooting. Therefore, it is set that noise reduction should be turned on and image processing to remove noise should be performed. Thereby, it is possible to obtain a captured image in which noise is suppressed. According to the setting operation as described above, when the shooting scene is a night scene, it is possible to obtain a shot image with more appropriate shooting conditions.

一方、撮影シーンが夜景シーンでないと判定されている場合には、撮影条件を通常撮影用のものに設定する。具体的には、標準的なプログラム線図にしたがって露出制御パラメータを設定するとともに、ノイズリダクションをオフにする。   On the other hand, if it is determined that the shooting scene is not a night scene, the shooting conditions are set to those for normal shooting. Specifically, exposure control parameters are set according to a standard program diagram, and noise reduction is turned off.

その後、本撮影動作が行われ、所望の被写体に関する撮影画像(本撮影画像)が取得される(ステップSP100)。   Thereafter, a main photographing operation is performed, and a photographed image (main photographed image) relating to a desired subject is acquired (step SP100).

<AF評価値>
ところで、上記実施形態においては、隣接画素の差分値をAFエリアAR内の全画素を対象として積算したコントラスト値Cを、AF評価値として用いる場合について説明したが、これに限定されず、夜景シーン撮影時のAF評価値として、例えば後述する評価値V1,V2等を用いても良い。値V1又は値V2をAF評価値として用いれば、夜景撮影時におけるAF動作の高精度化を図ることができる。
<AF evaluation value>
In the above embodiment, the case where the contrast value C obtained by integrating the difference values of adjacent pixels for all the pixels in the AF area AR is used as the AF evaluation value is described. However, the present invention is not limited to this. As AF evaluation values at the time of shooting, for example, evaluation values V1 and V2 described later may be used. If the value V1 or the value V2 is used as the AF evaluation value, it is possible to improve the accuracy of the AF operation during night scene shooting.

図12は、夜景の点光源を撮影した場合における当該点光源付近の被写体輝度の位置変化を示す図である。図12において、横軸は画面内での所定方向(例えば水平方向)における位置を表し、縦軸は被写体輝度(あるいは画素値)を表している。図12の3つの曲線CL1,CL2,CL3は、それぞれ、異なる合焦度合いにおける被写体輝度を示す図である。3つの曲線CL1,CL2,CL3のうち、曲線CL1は、合焦度合いが比較的低い状態での被写体輝度の位置変化を示す曲線であり、曲線CL2は合焦度合いが比較的高い状態での被写体輝度の位置変化を示す曲線であり、曲線CL3は合焦度合いがさらに高い状態での被写体輝度の位置変化を示す曲線である。図12に示すように、合焦度合いが高くなるほど、エッジ付近における曲線が急峻に立ち上がる(あるいは立ち下がる)。なお、A/D変換後の画素値は最大値MAX(たとえば255)までの値しか取り得ず、点光源の中心位置CX近傍においては画素値がオーバーフローし、A/D変換時において最大値MAXでクリップされることになる。以下では、被写体輝度がオーバーフローしている画素を「オーバーフロー画素」とも称し、オーバーフローしていない画素を「非オーバーフロー画素」とも称する。図12においては、オーバーフロー画素が黒丸で示され、非オーバーフロー画素が白丸で示されている。   FIG. 12 is a diagram illustrating a change in the position of the subject brightness in the vicinity of the point light source when the point light source of the night view is captured. In FIG. 12, the horizontal axis represents a position in a predetermined direction (for example, the horizontal direction) in the screen, and the vertical axis represents subject luminance (or pixel value). The three curves CL1, CL2, and CL3 in FIG. 12 are diagrams showing subject brightness at different degrees of focus. Of the three curves CL1, CL2 and CL3, the curve CL1 is a curve indicating the change in the position of the subject brightness when the degree of focus is relatively low, and the curve CL2 is the subject when the degree of focus is relatively high. A curve indicating a change in the position of the luminance, and a curve CL3 is a curve indicating the change in the position of the subject luminance when the degree of focus is higher. As shown in FIG. 12, the curve near the edge rises steeply (or falls) as the degree of focus increases. The pixel value after A / D conversion can only take a value up to the maximum value MAX (for example, 255), the pixel value overflows in the vicinity of the center position CX of the point light source, and at the maximum value MAX during A / D conversion. It will be clipped. Hereinafter, a pixel in which the subject luminance has overflowed is also referred to as an “overflow pixel”, and a pixel that has not overflowed is also referred to as a “non-overflow pixel”. In FIG. 12, overflow pixels are indicated by black circles, and non-overflow pixels are indicated by white circles.

ここでは、このエッジ部分での画素値の傾き度合いを算出して、AF評価値として用いる場合を例示する。具体的には、高輝度画素と非高輝度画素とが隣接している場合(ここではオーバーフロー画素と非オーバーフロー画素とが隣接している場合)に、両画素の画素値の差分値(より正確には差分値の絶対値)を算出する。   Here, the case where the inclination degree of the pixel value at the edge portion is calculated and used as the AF evaluation value is illustrated. Specifically, when the high-brightness pixel and the non-high-brightness pixel are adjacent to each other (here, when the overflow pixel and the non-overflow pixel are adjacent to each other), the difference value between the two pixel values (more accurately (The absolute value of the difference value) is calculated.

たとえば、曲線CL1,CL2,CL3については、それぞれ、立ち上がり部分において、差分値DV1,DV2,DV3がそれぞれ取得される。これらの差分値DV1,DV2,DV3の間には、DV1<DV2<DV3、の関係が存在し、合焦度合いが大きくなるにつれて差分値が大きくなる。このように、差分値は、エッジ部分での画素値の傾き度合いを反映した値となっている。ここでは、その差分値に基づく値をAF評価値として用いる。   For example, for the curves CL1, CL2, CL3, the difference values DV1, DV2, DV3 are respectively acquired at the rising portions. A relationship of DV1 <DV2 <DV3 exists between these difference values DV1, DV2, and DV3, and the difference value increases as the degree of focusing increases. Thus, the difference value is a value that reflects the degree of inclination of the pixel value at the edge portion. Here, a value based on the difference value is used as the AF evaluation value.

より具体的には、注目画素とその隣接画素とのうち一方がオーバーフロー画素であり他方が非オーバーフロー画素である場合に、その両画素の画素値の差分値を求める。そして、注目画素を順次AFエリアAR内の別の画素に変更しつつ当該差分値を積算していき、AFエリアAR内の全ての画素が注目画素にされるまで同様の動作を繰り返して、当該差分値の積算値を得る。また、後述するように、その積算値を積算回数(カウント数)で除することによって正規化する。これによって、安定した評価値を得ることができる。   More specifically, when one of the target pixel and its neighboring pixels is an overflow pixel and the other is a non-overflow pixel, a difference value between the pixel values of the two pixels is obtained. Then, the difference value is accumulated while sequentially changing the target pixel to another pixel in the AF area AR, and the same operation is repeated until all the pixels in the AF area AR are set as the target pixel. The integrated value of the difference value is obtained. Further, as will be described later, normalization is performed by dividing the integrated value by the number of times of integration (count number). Thereby, a stable evaluation value can be obtained.

以下では、図13を参照しながら、G画素(グリーン成分画素)の画素値を用いてAF評価値を算出する場合について、より詳細に説明する。なお、これに限定されず、他の成分の画素(例えばR画素あるいはB画素)の画素値を用いてもよく、あるいは、R,G,B成分の合成値として生成されるY成分画素値(輝度成分画素値)を用いても良い。   Hereinafter, the case where the AF evaluation value is calculated using the pixel value of the G pixel (green component pixel) will be described in more detail with reference to FIG. However, the present invention is not limited to this, and pixel values of other component pixels (for example, R pixels or B pixels) may be used, or Y component pixel values (as synthesized values of R, G, and B components) ( (Luminance component pixel value) may be used.

図13は、CCD120の画素配列の一部を抜き出して示す図である。ここでは、各注目画素について3つの方向に隣接する隣接画素との関係を考慮する。   FIG. 13 is a diagram showing a part of the pixel array of the CCD 120 extracted. Here, the relationship between adjacent pixels adjacent in three directions is considered for each target pixel.

詳細には、まず、水平方向について考慮する。注目画素G(i,j)とその左側に隣接する隣接画素G(i−1,j)とのうちの一方のみがオーバーフロー画素である場合に、両画素の画素値PV(i,j)と画素値PV(i−1,j)との差分値(詳細には差分絶対値、すなわち|PV(i,j)−PV(i−1,j)|)を算出して、値DHとして積算していく。この動作は、AFエリアAR内の全ての画素が注目画素にされるまで繰り返される。この際、積算した回数、言い換えれば、注目画素と隣接画素とのうちの一方のみがオーバーフロー画素であると判定された回数も値NHとしてカウントしておく。   Specifically, first, the horizontal direction is considered. When only one of the target pixel G (i, j) and the adjacent pixel G (i-1, j) adjacent to the left side is an overflow pixel, the pixel value PV (i, j) of both pixels A difference value (specifically, a difference absolute value, that is, | PV (i, j) −PV (i−1, j) |) is calculated from the pixel value PV (i−1, j) and integrated as a value DH. I will do it. This operation is repeated until all the pixels in the AF area AR are set as the target pixel. At this time, the number of times of integration, in other words, the number of times that only one of the target pixel and the adjacent pixel is determined to be an overflow pixel is also counted as the value NH.

また同様に、注目画素G(i,j)とその左上側に隣接する隣接画素G(i,j−1)とのうちの一方のみがオーバーフロー画素である場合に、両画素の画素値PV(i,j)と画素値PV(i,j−1)との差分値(詳細には差分絶対値、すなわち|PV(i,j)−PV(i,j−1)|)を算出して、値DUとして積算していく。この動作は、AFエリアAR内の全ての画素が注目画素にされるまで繰り返される。この際、積算した回数、言い換えれば、注目画素と隣接画素とのうちの一方のみがオーバーフロー画素であると判定された回数も値NUとしてカウントしておく。   Similarly, when only one of the target pixel G (i, j) and the adjacent pixel G (i, j-1) adjacent to the upper left is an overflow pixel, the pixel value PV ( i, j) and a difference value between pixel values PV (i, j-1) (specifically, a difference absolute value, i.e., | PV (i, j) -PV (i, j-1) |) is calculated. The value DU is accumulated. This operation is repeated until all the pixels in the AF area AR are set as the target pixel. At this time, the number of times of accumulation, in other words, the number of times that only one of the target pixel and the adjacent pixel is determined to be an overflow pixel is also counted as the value NU.

さらに同様に、注目画素G(i,j)とその左下側に隣接する隣接画素G(i,j+1)とのうちの一方のみがオーバーフロー画素である場合に、両画素の画素値PV(i,j)と画素値PV(i,j+1)との差分値(詳細には差分絶対値、すなわち|PV(i,j)−PV(i,j+1)|)を算出して、値DLとして積算していく。この動作は、AFエリアAR内の全ての画素が注目画素にされるまで繰り返される。この際、積算した回数、言い換えれば、注目画素と隣接画素とのうちの一方のみがオーバーフロー画素であると判定された回数も値NLとしてカウントしておく。   Similarly, when only one of the target pixel G (i, j) and the adjacent pixel G (i, j + 1) adjacent to the lower left side is an overflow pixel, the pixel values PV (i, j, j) and a difference value between pixel values PV (i, j + 1) (specifically, a difference absolute value, that is, | PV (i, j) −PV (i, j + 1) |) is calculated and integrated as a value DL. To go. This operation is repeated until all the pixels in the AF area AR are set as the target pixel. At this time, the number of times of accumulation, in other words, the number of times that only one of the target pixel and the adjacent pixel is determined to be an overflow pixel is also counted as the value NL.

そして、3つの方向のそれぞれにおける各積算値DH,DU、DLをさらに加算した値VS(=DH+DU+DL)を求めるとともに、カウント数NH,NU,NLの加算値NA(=NH+NU+NL)を求める。   Then, a value VS (= DH + DU + DL) obtained by further adding the integrated values DH, DU, DL in each of the three directions is obtained, and an addition value NA (= NH + NU + NL) of the count numbers NH, NU, NL is obtained.

その後、この総和値VSを総カウント数NAで除した値V1(=VS/NA)を求める。差分値の積算値である総和値VSを総カウント数NAで除して正規化した値V1を、AF評価値として用いれば、より正確なAF動作を行うことが可能になる。総和値VSをそのままAF評価値として用いる場合に比べて、AFエリアARに対して出入りする点光源数の変動による影響を受けにくくなるためである。   Thereafter, a value V1 (= VS / NA) obtained by dividing the total value VS by the total count number NA is obtained. If the value V1 normalized by dividing the total value VS, which is an integrated value of the difference values, is used as the AF evaluation value, a more accurate AF operation can be performed. This is because, compared with the case where the total value VS is used as an AF evaluation value as it is, it is less affected by the fluctuation of the number of point light sources that enter and exit the AF area AR.

また、この値V1をさらに、AFエリアAR内のオーバーフロー画素の数NFで除した値V2(=V1/NF)を求め、この値V2をAF評価値とすることがさらに好ましい。図14に示すように、合焦状態での点光源の光像C1の面積は、非合焦状態での点光源の光像C2の面積よりも小さいという性質がある。言い換えれば、AFエリアAR内のオーバーフロー画素の画素数NFが少ないほど、合焦状態に近いという性質が存在する。そのため、値V1をオーバーフロー画素数NFで除した値V2は、合焦状態に近づく際の増加度合いが値V1よりも大きくなる。したがって、この値V2をAF評価値として用いることによれば、AF評価値のピーク位置をより正確に決定して、さらに正確なAF動作を行うことができる。   Further, it is more preferable to obtain a value V2 (= V1 / NF) obtained by further dividing this value V1 by the number NF of overflow pixels in the AF area AR, and to use this value V2 as an AF evaluation value. As shown in FIG. 14, the area of the light image C1 of the point light source in the focused state is smaller than the area of the light image C2 of the point light source in the out-of-focus state. In other words, the smaller the number of overflow pixels NF in the AF area AR, the closer to the in-focus state. For this reason, the value V2 obtained by dividing the value V1 by the overflow pixel number NF has a degree of increase when approaching the in-focus state larger than the value V1. Therefore, by using this value V2 as the AF evaluation value, it is possible to more accurately determine the peak position of the AF evaluation value and perform a more accurate AF operation.

なお、ここでは、オーバーフロー画素と非オーバーフロー画素との隣接箇所についての差分値を求める場合について例示したが、これに限定されない。たとえば、高輝度画素判定における閾値TH1を最大値MAX(ここでは255)よりも小さな値(例えば250)に設定した上で高輝度画素判定を行い、高輝度画素と非高輝度画素との隣接箇所についての差分値等を求めるようにしてもよい。   In addition, although the case where the difference value about the adjacent part of the overflow pixel and the non-overflow pixel is obtained is illustrated here, the present invention is not limited to this. For example, after setting the threshold TH1 in the high luminance pixel determination to a value (for example, 250) smaller than the maximum value MAX (here, 255), the high luminance pixel determination is performed, and the adjacent portion between the high luminance pixel and the non-high luminance pixel A difference value or the like may be obtained.

<その他>
上記実施形態においては、夜景判定部254は、AFエリアARにおいて高輝度画素が所定数(N個)以上存在するか否かに応じて、画面中央に高輝度部が存在するか否かを判定していたが、これに限定されない。
<Others>
In the above-described embodiment, the night scene determination unit 254 determines whether or not the high-luminance portion exists in the center of the screen, depending on whether or not there are a predetermined number (N) or more of high-luminance pixels in the AF area AR. However, it is not limited to this.

例えば、AFエリアARに高輝度画素が所定割合(例えば5%)以上存在するときに、画面中央に高輝度部が存在するものとして判定してもよい。   For example, it may be determined that a high-luminance portion exists in the center of the screen when high-luminance pixels are present in the AF area AR at a predetermined ratio (for example, 5%) or more.

あるいは、高輝度画素数ではなく、AFエリアARの平均輝度が所定の閾値よりも高い場合に、画面中央に高輝度部が存在するものと判定するようにしてもよい。   Alternatively, when the average brightness of the AF area AR is higher than a predetermined threshold instead of the number of high brightness pixels, it may be determined that the high brightness portion exists in the center of the screen.

ただし、高輝度画素の存在数あるいは占有割合を用いて判断することによれば、平均輝度を用いて判断する場合と比べて、より正確に点光源の有無を判定すること、ひいては、撮影シーンが夜景シーンであるか否かをより正確に判定することが可能である。   However, according to the determination using the existence number or the occupation ratio of high-luminance pixels, it is possible to more accurately determine the presence / absence of a point light source than in the case of determination using average luminance. It is possible to more accurately determine whether the scene is a night scene.

さらに、上記実施形態においては、画像MG2内の周縁ブロックのうち、低輝度ブロックが所定数(M個)以上存在するときに、画面の周縁部分に低輝度部が存在するものと判定していたが、これに限定されない。   Furthermore, in the above embodiment, when there are a predetermined number (M) or more of low-luminance blocks among the peripheral blocks in the image MG2, it is determined that the low-luminance portion exists in the peripheral portion of the screen. However, it is not limited to this.

例えば、画像MG2内の周縁ブロックのうち、低輝度ブロックが所定割合(例えば50%)以上存在するときに、画面の周縁部分に低輝度部が存在するものと判定してもよい。   For example, when a low-luminance block is present in a predetermined ratio (for example, 50%) or more among the peripheral blocks in the image MG2, it may be determined that a low-luminance portion exists in the peripheral portion of the screen.

あるいは、各区分領域(ブロック)ごとに低輝度ブロック(低輝度区分領域)であるか否かを判定するのではなく、図6の斜線を付した複数の周縁ブロック全体の平均輝度が所定の閾値以下であるか否かによって、画面の周縁部分に低輝度部が存在するものと判定してもよい。ただし、各区分領域ごとに低輝度区分領域であるか否かを判定した方が、図6の斜線を付した複数の周縁ブロック全体の平均輝度を用いる場合に比べて、より正確に低輝度部の存在の有無を判定することが可能である。   Alternatively, instead of determining whether or not each segmented area (block) is a low-luminance block (low-luminance segmented area), the average luminance of the plurality of peripheral blocks shaded in FIG. 6 is a predetermined threshold value. It may be determined that there is a low-luminance part in the peripheral part of the screen depending on whether or not it is below. However, it is more accurate to determine whether each divided region is a low-luminance divided region than to use the average luminance of the entire plurality of peripheral blocks hatched in FIG. It is possible to determine the presence / absence of the existence.

また、上記実施形態においては、図6の周縁部分(斜線部分)MRに低輝度部が存在するか否かを判定する場合を例示したが、これに限定されない。例えば、このような判定に代えて、図15に示すように、フレーミング領域FRの上端側周縁部分MU(斜線部分)に存在するブロック群BG1を用いて、当該上端側周縁部分MUに低輝度部が存在するか否かを判定するようにしてもよい。この場合でも、夜景撮影時の「夜空」の部分に対応する上端側周縁部分MUにおいて低輝度部の存在の有無を判定することによって、正確に夜景判定を行うことができる。   Moreover, although the case where it was determined whether the low-intensity part exists in the peripheral part (shaded part) MR of FIG. 6 was illustrated in the said embodiment, it is not limited to this. For example, instead of such determination, as shown in FIG. 15, the block group BG1 existing in the upper edge portion MU (shaded portion) of the framing region FR is used, and the low luminance portion is added to the upper edge portion MU. It may be determined whether or not there exists. Even in this case, it is possible to accurately determine the night view by determining the presence or absence of the low brightness portion in the upper edge portion MU corresponding to the “night sky” portion at the time of night view shooting.

さらに、上記実施形態においては、図7に示すように、シャッタボタン150が全押し状態S2になったと判定(ステップSP80)された後に撮影条件を設定する(ステップSP90)場合を例示したが、これに限定されない。例えば、シャッタボタン150が全押し状態S2になる前から撮影条件を変更するようにしてもよい。具体的には、ステップSP90の設定動作を、ステップSP20〜SP50での夜景判定動作とステップSP80の判定動作との間(例えば、ステップSP80の直前)に行うようにしてもよい。   Furthermore, in the above-described embodiment, as illustrated in FIG. 7, the case where the shooting condition is set (step SP90) after it is determined that the shutter button 150 has been fully pressed (step SP80) is illustrated. It is not limited to. For example, the shooting conditions may be changed before the shutter button 150 is fully pressed S2. Specifically, the setting operation in step SP90 may be performed between the night scene determination operation in steps SP20 to SP50 and the determination operation in step SP80 (for example, immediately before step SP80).

デジタルカメラ1Aの正面図である。It is a front view of digital camera 1A. 図1のD−Dの位置におけるデジタルカメラ1Aの断面図である。It is sectional drawing of the digital camera 1A in the position of DD of FIG. デジタルカメラ1Aの背面図である。It is a rear view of the digital camera 1A. デジタルカメラ1Aの機能ブロック図である。It is a functional block diagram of digital camera 1A. AF制御用の画像MG1を示す図である。It is a figure which shows image MG1 for AF control. AE制御用の画像MG2を示す図である。It is a figure which shows image MG2 for AE control. デジタルカメラ1Aの動作を示すフローチャートである。It is a flowchart which shows operation | movement of 1 A of digital cameras. 手法MAによるAF動作を示すフローチャートである。It is a flowchart which shows AF operation by technique MA. 手法MBによるAF動作を示すフローチャートである。It is a flowchart which shows AF operation by method MB. 手法MAによるAF動作を示す概念図である。It is a conceptual diagram which shows AF operation by technique MA. 手法MBによるAF動作を示す概念図である。It is a conceptual diagram which shows AF operation by method MB. 夜景の点光源付近の被写体輝度の位置変化を示す図である。It is a figure which shows the position change of the object brightness | luminance near the point light source of a night view. CCDの画素配列(一部)を示す図である。It is a figure which shows the pixel arrangement | sequence (part) of CCD. 合焦時および非合焦時における点光源の大きさを示す図である。It is a figure which shows the magnitude | size of the point light source at the time of focusing and the non-focusing. 低輝度部の判定に用いられるブロック(区分領域)を示す図である。It is a figure which shows the block (partition area | region) used for determination of a low-intensity part.

符号の説明Explanation of symbols

1A デジタルカメラ
112 ズームレンズ
113 フォーカスレンズ
120 CCD
150 シャッタボタン
AR AFエリア
MG1 AF用画像
MG2 AE用画像
1A digital camera 112 zoom lens 113 focus lens 120 CCD
150 Shutter button AR AF area MG1 AF image MG2 AE image

Claims (12)

撮像装置であって、
撮影光学系による光像を画像データへ変換する撮像手段と、
前記画像データに基づいて撮影シーンが夜景シーンであるか否かを判定する判定手段と、
を備え、
前記判定手段は、フレーミング領域の中央部分である第1の部分に高輝度部が存在し且つ前記フレーミング領域のうち前記第1の部分以外の第2の部分に低輝度部が存在する場合に、撮影シーンが夜景シーンであると判定することを特徴とする撮像装置。
An imaging device comprising:
Imaging means for converting a light image by the photographing optical system into image data;
Determination means for determining whether or not the shooting scene is a night scene based on the image data;
With
In the case where the high-luminance portion exists in the first portion that is the central portion of the framing region and the low-luminance portion exists in the second portion other than the first portion of the framing region, An image pickup apparatus that determines that a shooting scene is a night scene.
請求項1に記載の撮像装置において、
前記第2の部分は、前記フレーミング領域の周縁部分であることを特徴とする撮像装置。
The imaging device according to claim 1,
2. The imaging apparatus according to claim 1, wherein the second portion is a peripheral portion of the framing region.
請求項1に記載の撮像装置において、
前記第2の部分は、前記フレーミング領域の上端側周縁部分であることを特徴とする撮像装置。
The imaging device according to claim 1,
2. The imaging apparatus according to claim 1, wherein the second portion is a peripheral portion on an upper end side of the framing region.
請求項1に記載の撮像装置において、
前記第2の部分は、前記フレーミング領域の左端側周縁部分、右端側周縁部分、および上端側周縁部分とで構成されていることを特徴とする撮像装置。
The imaging device according to claim 1,
2. The imaging apparatus according to claim 1, wherein the second portion includes a left end side peripheral portion, a right end side peripheral portion, and an upper end side peripheral portion of the framing region.
請求項1から請求項4のいずれかに記載の撮像装置において、
前記判定手段は、高輝度画素が前記第1の部分において所定数以上存在するとき又は高輝度画素が前記第1の部分において所定割合以上存在するときに、前記第1の部分に高輝度部が存在すると判定することを特徴とする撮像装置。
In the imaging device according to any one of claims 1 to 4,
The determination means includes a high-luminance portion in the first portion when a predetermined number or more of high-luminance pixels are present in the first portion or when a high-luminance pixel is present in a predetermined ratio or more in the first portion. An imaging device characterized in that it is determined to exist.
請求項5に記載の撮像装置において、
前記判定手段は、高輝度画素が前記第1の部分において所定数以上存在するか否か又は高輝度画素が前記第1の部分において所定割合以上存在するか否かを、間引き画像データではないAF用画像データを用いて判定するとともに、前記第2の部分に低輝度部が存在するか否かを、間引き画像データであるAE用画像データを用いて判定することを特徴とする撮像装置。
The imaging apparatus according to claim 5,
The determination means determines whether or not a predetermined number or more of high-luminance pixels are present in the first portion or whether or not high-luminance pixels are present in a predetermined ratio or more in the first portion. An image pickup apparatus comprising: determining using image data, and determining whether or not a low-luminance portion is present in the second portion using image data for AE that is thinned image data.
請求項1から請求項6のいずれかに記載の撮像装置において、
前記判定手段は、前記第2の部分に位置する複数の区分領域のうち、その平均輝度が所定値以下の低輝度区分領域が所定割合以上存在するとき又は前記低輝度区分領域が所定数以上存在するときに、前記第2の部分に低輝度部が存在すると判定することを特徴とする撮像装置。
The imaging apparatus according to any one of claims 1 to 6,
The determination means includes a plurality of divided areas located in the second portion when a low luminance divided area having an average luminance equal to or lower than a predetermined value is present in a predetermined ratio or more or a predetermined number of low luminance divided areas are present. And determining that a low-luminance portion is present in the second portion.
請求項1から請求項7のいずれかに記載の撮像装置において、
撮影シーンが夜景シーンでないと判定されるときには第1の手法でAF動作を行い、撮影シーンが夜景シーンであると判定されるときには前記第1の手法とは異なる第2の手法でAF動作を行うAF制御手段、
をさらに備えることを特徴とする撮像装置。
In the imaging device in any one of Claims 1-7,
When it is determined that the shooting scene is not a night scene, the first method performs AF operation. When it is determined that the shooting scene is a night scene, the AF operation is performed using a second method different from the first method. AF control means,
An image pickup apparatus further comprising:
請求項8に記載の撮像装置において、
前記第2の手法は、フォーカスレンズを一旦無限遠端に移動させた後に、前記フォーカスレンズを近側に向けて移動させつつ各レンズ位置におけるAF評価値を取得し、当該AF評価値が最適化されるレンズ位置を合焦位置として検出する手法であることを特徴とする撮像装置。
The imaging device according to claim 8,
In the second method, after the focus lens is once moved to the infinity end, the AF evaluation value at each lens position is acquired while the focus lens is moved toward the near side, and the AF evaluation value is optimized. An imaging apparatus characterized in that it is a method for detecting a lens position to be detected as a focus position.
請求項8または請求項9に記載の撮像装置において、
前記第2の手法によるAF動作でのAF評価値は、前記第1の部分における高輝度画素と当該高輝度画素に隣接する非高輝度画素との画素値の差分値の積算値を、前記第1の部分における高輝度画素に隣接する非高輝度画素の存在数で除することによって正規化された値に基づいて算出されることを特徴とする撮像装置。
In the imaging device according to claim 8 or 9,
The AF evaluation value in the AF operation according to the second method is the integrated value of the difference value of the pixel value between the high luminance pixel in the first portion and the non-high luminance pixel adjacent to the high luminance pixel. An image pickup apparatus that is calculated based on a normalized value by dividing by the number of non-high brightness pixels adjacent to a high brightness pixel in one portion.
請求項10に記載の撮像装置において、
前記AF評価値は、前記正規化された値を、前記第1の部分における高輝度画素の個数でさらに除した値に基づいて算出されることを特徴とする撮像装置。
The imaging device according to claim 10.
The AF evaluation value is calculated based on a value obtained by further dividing the normalized value by the number of high-luminance pixels in the first portion.
請求項1から請求項11のいずれかに記載の撮像装置において、
撮影シーンが夜景シーンであると判定される場合は当該撮像装置の撮影条件を夜景シーン用の条件に設定する撮影条件設定手段、
をさらに備えることを特徴とする撮像装置。
The imaging apparatus according to any one of claims 1 to 11,
When it is determined that the shooting scene is a night scene, shooting condition setting means for setting the shooting condition of the imaging device to the condition for the night scene,
An image pickup apparatus further comprising:
JP2004198870A 2004-07-06 2004-07-06 Imaging apparatus Pending JP2006023339A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2004198870A JP2006023339A (en) 2004-07-06 2004-07-06 Imaging apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2004198870A JP2006023339A (en) 2004-07-06 2004-07-06 Imaging apparatus

Publications (1)

Publication Number Publication Date
JP2006023339A true JP2006023339A (en) 2006-01-26

Family

ID=35796670

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2004198870A Pending JP2006023339A (en) 2004-07-06 2004-07-06 Imaging apparatus

Country Status (1)

Country Link
JP (1) JP2006023339A (en)

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5993806A (en) * 1982-11-16 1984-05-30 Matsushita Electric Ind Co Ltd Production of needle fe-co alloy
JP2007267227A (en) * 2006-03-29 2007-10-11 Sony Corp Image analyzing device, image analyzing method, image analyzing program and image capturing device
JP2011139171A (en) * 2009-12-25 2011-07-14 Canon Inc Video processing apparatus, and video processing method
JP2011223378A (en) * 2010-04-12 2011-11-04 Sanyo Electric Co Ltd Electronic camera
JP2013235164A (en) * 2012-05-09 2013-11-21 Canon Inc Imaging device, and control method for the same
JP2015127721A (en) * 2013-11-26 2015-07-09 株式会社ニコン Focus detection device and imaging device
JP2015141207A (en) * 2014-01-27 2015-08-03 株式会社 日立産業制御ソリューションズ Imaging device, imaging method, and focus control device
CN105827968A (en) * 2016-03-28 2016-08-03 广东欧珀移动通信有限公司 Control method and device, and electronic device
JP2016218232A (en) * 2015-05-19 2016-12-22 キヤノン株式会社 Imaging apparatus and method for controlling the same
CN106454100A (en) * 2016-10-24 2017-02-22 广东欧珀移动通信有限公司 Focusing method and device and mobile terminal
JP2017118577A (en) * 2017-02-09 2017-06-29 日立マクセル株式会社 Encoding method and encoding device

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5993806A (en) * 1982-11-16 1984-05-30 Matsushita Electric Ind Co Ltd Production of needle fe-co alloy
JP2007267227A (en) * 2006-03-29 2007-10-11 Sony Corp Image analyzing device, image analyzing method, image analyzing program and image capturing device
JP2011139171A (en) * 2009-12-25 2011-07-14 Canon Inc Video processing apparatus, and video processing method
JP2011223378A (en) * 2010-04-12 2011-11-04 Sanyo Electric Co Ltd Electronic camera
US9319595B2 (en) 2012-05-09 2016-04-19 Canon Kabushiki Kaisha Image capturing apparatus and exposure control method thereof
JP2013235164A (en) * 2012-05-09 2013-11-21 Canon Inc Imaging device, and control method for the same
JP2015127721A (en) * 2013-11-26 2015-07-09 株式会社ニコン Focus detection device and imaging device
JP2015141207A (en) * 2014-01-27 2015-08-03 株式会社 日立産業制御ソリューションズ Imaging device, imaging method, and focus control device
US9426352B2 (en) 2014-01-27 2016-08-23 Hitachi Industry & Control Solutions, Ltd. Imaging apparatus, imaging method, and focus control apparatus
JP2016218232A (en) * 2015-05-19 2016-12-22 キヤノン株式会社 Imaging apparatus and method for controlling the same
CN105827968A (en) * 2016-03-28 2016-08-03 广东欧珀移动通信有限公司 Control method and device, and electronic device
CN105827968B (en) * 2016-03-28 2017-10-10 广东欧珀移动通信有限公司 Control method, control device and electronic installation
CN106454100A (en) * 2016-10-24 2017-02-22 广东欧珀移动通信有限公司 Focusing method and device and mobile terminal
JP2017118577A (en) * 2017-02-09 2017-06-29 日立マクセル株式会社 Encoding method and encoding device

Similar Documents

Publication Publication Date Title
JP4528235B2 (en) Digital camera
JP5347707B2 (en) Imaging apparatus and imaging method
JP6457776B2 (en) IMAGING DEVICE AND IMAGING DEVICE CONTROL METHOD
US9160919B2 (en) Focus adjustment unit and camera system
JP2007065048A (en) Photographing device and focus control method
JP2007243759A (en) Digital imaging apparatus
JP5343588B2 (en) Imaging device
JP4834425B2 (en) IMAGING DEVICE AND IMAGING DEVICE CONTROL METHOD
US20150358552A1 (en) Image combining apparatus, image combining system, and image combining method
JP2016133674A (en) Focus control device, and method, program and storage medium therefor
US20170318208A1 (en) Imaging device, imaging method, and image display device
JP5223686B2 (en) Imaging apparatus and imaging method
JP2006091915A (en) Imaging apparatus
JP2006023339A (en) Imaging apparatus
JP2008053931A (en) Imaging apparatus
JP2004361611A (en) Solid-state image pickup element and photographing device
US9274402B2 (en) Imaging device that executes auto focus control by referring to distance image data regarding a depth of a region
JP5277863B2 (en) Imaging apparatus and imaging method
CN109964479B (en) Image pickup apparatus and control method thereof
US9967452B2 (en) Imaging apparatus and imaging method for controlling auto-focus
US8373766B2 (en) Image shooting device and image shooting method
JP4597887B2 (en) Imaging device
JP2014230121A (en) Imaging apparatus and pixel defect detection method
JP5224879B2 (en) Imaging device
CN106464783B (en) Image pickup control apparatus, image pickup apparatus, and image pickup control method