JP2003185911A - Optical system control device - Google Patents

Optical system control device

Info

Publication number
JP2003185911A
JP2003185911A JP2001384195A JP2001384195A JP2003185911A JP 2003185911 A JP2003185911 A JP 2003185911A JP 2001384195 A JP2001384195 A JP 2001384195A JP 2001384195 A JP2001384195 A JP 2001384195A JP 2003185911 A JP2003185911 A JP 2003185911A
Authority
JP
Japan
Prior art keywords
image
evaluation
area
edge
optical system
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.)
Granted
Application number
JP2001384195A
Other languages
Japanese (ja)
Other versions
JP3628648B2 (en
Inventor
Masahiro Kitamura
雅裕 北村
Noriyuki Nobuyuki
宣之 沖須
Keiji Tamai
啓二 玉井
Motohiro Nakanishi
基浩 中西
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.)
Minolta Co Ltd
Original Assignee
Minolta Co Ltd
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 Minolta Co Ltd filed Critical Minolta Co Ltd
Priority to JP2001384195A priority Critical patent/JP3628648B2/en
Publication of JP2003185911A publication Critical patent/JP2003185911A/en
Application granted granted Critical
Publication of JP3628648B2 publication Critical patent/JP3628648B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Studio Devices (AREA)
  • Focusing (AREA)
  • Automatic Focus Adjustment (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide a technology for focussing the objects of a close view and of a distant view even when the contrast of the object of the close view is low. <P>SOLUTION: A large edge LE including a far and near boundary is detected by using a luminance difference between the adjacent pixels of an image. Based on the means of a Hough transformation, etc., a vertical edge A on the left-hand side of a first image region P1 is detected from the direction of the line segment of the large edge LE and the change of the direction. A first evaluation region F1 including a part of large edge LE and including a first image region P1 more than a second image region P2, and a second evaluation region F2 including the second image regions P2 more than the first image region P1 are set up at the position. Evaluation values regarding the focussing state of the photographic lens 11 is determined about the first and second evaluation regions F1 and F2. The far and near boundary is detected on the basis of the evaluation values, and the focussing operation of the photographic lens is carried out on the basis of the evaluation value of one evaluation region to the far and near boundary. <P>COPYRIGHT: (C)2003,JPO

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【発明の属する技術分野】本発明は、デジタルカメラに
関し、特にデジタルカメラにおける自動合焦(以下、
「オートフォーカス」または「AF」ともいう。)の技
術に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a digital camera, and more particularly to automatic focusing (hereinafter
Also referred to as "autofocus" or "AF". ) Technology.

【0002】[0002]

【従来の技術】従来、デジタルカメラ等において用いら
れているオートフォーカス装置としては、撮影レンズを
光軸方向に駆動させつつ、各レンズ位置で取得された画
像の特定の評価領域について撮影レンズの合焦状態に関
する評価値を求め、その評価値をもとに撮影レンズの合
焦動作を行うコントラスト方式によるオートフォーカス
動作を実施するものが一般的である。また、ここでいう
評価値は、各画素の画素値を隣接画素の画素値と比較し
たコントラスト値を算出し、このコントラスト値を所定
の領域内の複数の画素について合算することにより求め
られる。すなわち、評価値は、評価領域内の各隣接画素
間に関するコントラスト値の総和として求められる。
2. Description of the Related Art Conventionally, as an autofocus device used in a digital camera or the like, while the photographing lens is driven in the optical axis direction, the combination of the photographing lens with respect to a specific evaluation area of an image acquired at each lens position is used. In general, an evaluation value relating to a focus state is obtained, and based on the evaluation value, an autofocus operation by a contrast method for performing a focusing operation of a photographing lens is performed. Further, the evaluation value mentioned here is obtained by calculating the contrast value by comparing the pixel value of each pixel with the pixel value of the adjacent pixel, and adding the contrast value for a plurality of pixels in a predetermined area. That is, the evaluation value is obtained as the sum of contrast values between adjacent pixels in the evaluation area.

【0003】図17には、評価値と撮影レンズの光軸方
向の位置xとの関係を表す曲線CLが示されている。図
17に示すように、撮影レンズが合焦状態の位置に存在
する場合(x=xv)に、上記評価値が最も大きくな
る。そして、コントラスト方式のオートフォーカス動作
は、撮影レンズの光軸方向の位置xを相違させて撮像し
た少なくとも2枚の撮像画像の評価値を比較することに
より行われる。具体的には、2枚の画像のそれぞれにつ
いての評価値を比較し、評価値がより大きくなる方向に
撮影レンズを駆動する。そして、このような動作を繰り
返して撮影レンズを駆動させることにより、撮影レンズ
を合焦状態の位置へと駆動させることができる。
FIG. 17 shows a curve CL representing the relationship between the evaluation value and the position x of the taking lens in the optical axis direction. As shown in FIG. 17, when the taking lens is in the in-focus position (x = xv), the evaluation value is the largest. Then, the contrast autofocus operation is performed by comparing the evaluation values of at least two picked-up images picked up at different positions x in the optical axis direction of the taking lens. Specifically, the evaluation values of the two images are compared, and the taking lens is driven in the direction in which the evaluation value becomes larger. Then, by repeating such an operation and driving the taking lens, the taking lens can be driven to the in-focus position.

【0004】[0004]

【発明が解決しようとする課題】しかしながら、評価領
域内の画像に近景の被写体(近景被写体)と遠景の被写
体(遠景被写体)とが混在しているような場合は、図1
8に示すように、実線で示される曲線CLが評価値とし
て算出される。ここでは、評価値は、一点鎖線の曲線C
Ln,CLfによってそれぞれ示される近景被写体につ
いての評価値(近景評価値)および遠景被写体について
の評価値(遠景評価値)が合成されたような値として算
出される。したがって、このような場合は、上記評価値
が最も大きくなる撮影レンズの位置(x=xv)におい
ては近景被写体または遠景被写体のどちらに対しても合
焦させることができない。
However, in the case where the near-field subject (near-view subject) and the distant-view subject (distant-view subject) are mixed in the image in the evaluation area, the image shown in FIG.
As shown in 8, the curve CL indicated by the solid line is calculated as the evaluation value. Here, the evaluation value is the dashed-dotted curve C
The evaluation value (near view evaluation value) for the near view subject and the evaluation value (distant view evaluation value) for the distant view subject, which are respectively indicated by Ln and CLf, are calculated as a combined value. Therefore, in such a case, it is impossible to focus on either the near view object or the distant view object at the position (x = xv) of the taking lens where the evaluation value is the largest.

【0005】さらに、近景被写体のコントラストが低い
場合、具体的には、図19に示すように、近景被写体N
Pはコントラストが低い旗およびポールであり、遠景被
写体FPはコントラストが高いビルであるような場合
は、評価領域FAについての評価値は、図20に示すよ
うに、実線の曲線CLで示される評価値として算出され
る。ここでも、評価値は、一点鎖線の曲線CLn,CL
fによってそれぞれ示される近景評価値および遠景評価
値が合成されたような値として算出される。そして、こ
こでは、近景評価値に比べて、遠景評価値の方が著しく
大きなピークを持つため、評価値が最大となる撮影レン
ズの位置(x=xv)は、遠景評価値が最大となる撮影
レンズの位置(x=xvf)と近くなるため、評価値が
最大となる撮影レンズの位置(x=xv)に撮影レンズ
の位置を駆動させても近景被写体には合焦させることが
できない。また、ここで、仮に近景被写体のみに評価領
域を設定すると、近景被写体のコントラストは低いた
め、評価値に一定以上のピークがない。評価値の変
化量が小さい。評価値の全体のレベルが低い。といっ
た3条件すべてを満たし、評価領域FAにおいては一定
以上のコントラストがないとデジタルカメラによって判
断され、近景被写体に合焦させる撮影レンズの位置を求
めることはできない。
Further, when the contrast of the near view subject is low, specifically, as shown in FIG.
When P is a flag and pole with low contrast and the distant view subject FP is a building with high contrast, the evaluation value for the evaluation area FA is the evaluation shown by the solid line CL, as shown in FIG. It is calculated as a value. Also here, the evaluation values are the dashed line curves CLn and CL.
It is calculated as a value obtained by combining the near view evaluation value and the distant view evaluation value respectively indicated by f. Since the distant view evaluation value has a significantly larger peak than the near view evaluation value, the photographing lens position (x = xv) at which the evaluation value is maximized is the image at which the distant view evaluation value is maximized. Since the position is close to the position of the lens (x = xvf), even if the position of the shooting lens is driven to the position of the shooting lens (x = xv) where the evaluation value is maximum, it is not possible to focus on the near-field subject. Further, here, if the evaluation area is set only for the near-view subject, the contrast of the near-view subject is low, and therefore the evaluation value does not have a peak above a certain level. The amount of change in the evaluation value is small. The overall level of evaluation value is low. It is determined by the digital camera that all three conditions are satisfied, and that the contrast in the evaluation area FA is not higher than a certain level, and the position of the taking lens that focuses the near-field subject cannot be obtained.

【0006】本発明は、上記課題に鑑みてなされたもの
であり、近景被写体のコントラストが低い場合でも、近
景被写体にも遠景被写体にも容易に合焦可能な技術を提
供することを目的とする。
The present invention has been made in view of the above problems, and an object of the present invention is to provide a technique capable of easily focusing on a near-distance subject or a distant-distance subject even when the contrast of the near-distance subject is low. .

【0007】[0007]

【課題を解決するための手段】上記の課題を解決するた
めに、請求項1の発明は、複数の画素で構成される画像
を入力して、撮影レンズの合焦制御を行う光学系制御装
置であって、前記画像に所定の境界検出領域を設定する
検出領域設定手段と、前記境界検出領域から近景被写体
と遠景被写体との境界を含むエッジを検出するエッジ検
出手段と、前記エッジの一部を含み、かつ、当該エッジ
の両側の領域である第1と第2の画像領域について、前
記第2の画像領域よりも前記第1の画像領域を多く含む
第1の評価領域と、前記第1の画像領域よりも前記第2
の画像領域を多く含む第2の評価領域とを設定する評価
領域設定手段と、前記第1と第2の評価領域について前
記撮影レンズの合焦状態に関する評価値を算出する評価
値算出手段と、前記評価値算出手段によって算出された
評価値に基づいて前記撮影レンズの合焦位置を求め、前
記合焦位置への前記撮影レンズの駆動を制御する制御手
段と、を備えることを特徴とする。
In order to solve the above-mentioned problems, the invention of claim 1 is an optical system control device for inputting an image composed of a plurality of pixels to control the focusing of a photographing lens. A detection area setting means for setting a predetermined boundary detection area in the image, an edge detection means for detecting an edge including a boundary between a near view object and a distant view object from the boundary detection area, and a part of the edge The first and second image areas which are areas on both sides of the edge and which include the first image area more than the second image area, and the first evaluation area. The second from the image area of
Evaluation area setting means for setting a second evaluation area including a large number of image areas, and evaluation value calculation means for calculating an evaluation value regarding the focus state of the photographing lens for the first and second evaluation areas, Control means for determining a focus position of the taking lens based on the evaluation value calculated by the evaluation value calculating means and controlling driving of the taking lens to the focus position.

【0008】また、請求項2の発明は、請求項1に記載
の光学系制御装置であって、前記エッジ検出手段は、隣
接画素間の輝度差が所定値以上である場合に、エッジと
して認識するエッジ認識手段を含むことを特徴とする。
According to a second aspect of the present invention, in the optical system control device according to the first aspect, the edge detecting means recognizes an edge as an edge when a brightness difference between adjacent pixels is a predetermined value or more. It is characterized in that it includes an edge recognizing means for performing.

【0009】また、請求項3の発明は、請求項1または
請求項2のいずれかに記載の光学系制御装置であって、
前記検出領域設定手段が、前記画像の全体を境界検出領
域として設定することを特徴とする。
The invention according to claim 3 is the optical system control device according to claim 1 or 2.
The detection area setting means sets the entire image as a boundary detection area.

【0010】また、請求項4の発明は、請求項1または
請求項2のいずれかに記載の光学系制御装置であって、
前記検出領域設定手段が、前記画像に対して水平方向に
一定幅の境界検出領域を設定することを特徴とする。
The invention according to claim 4 is the optical system control device according to claim 1 or 2.
The detection area setting means sets a boundary detection area having a constant width in the horizontal direction with respect to the image.

【0011】また、請求項5の発明は、請求項1から請
求項4のいずれかに記載の光学系制御装置であって、前
記第1と第2の評価領域は、それぞれ前記エッジによっ
て区切られる一方の領域の面積が他方の領域の面積の2
倍以上であることを特徴とする。
Further, the invention of claim 5 is the optical system control device according to any one of claims 1 to 4, wherein the first and second evaluation regions are respectively separated by the edge. The area of one area is 2 of the area of the other area.
It is characterized by being more than double.

【0012】[0012]

【発明の実施の形態】以下、本発明の実施形態を図面に
基づいて説明する。
BEST MODE FOR CARRYING OUT THE INVENTION Embodiments of the present invention will be described below with reference to the drawings.

【0013】<デジタルカメラの要部構成>図1は本発
明の一実施形態であるデジタルカメラ1を示す斜視図で
ある。また、図2はデジタルカメラ1の背面図である。
<Main Structure of Digital Camera> FIG. 1 is a perspective view showing a digital camera 1 according to an embodiment of the present invention. 2 is a rear view of the digital camera 1.

【0014】図1に示すように、デジタルカメラ1の前
面側には、撮影レンズ11とファインダ窓2とが設けら
れている。撮影レンズ11の内側には撮影レンズ11を
介して入射する被写体像を光電変換して画像信号(画素
ごとの画素データの配列からなる信号)を生成するため
の画像生成手段としてCCD撮像素子30が設けられて
いる。
As shown in FIG. 1, a taking lens 11 and a finder window 2 are provided on the front side of the digital camera 1. A CCD image pickup device 30 is provided inside the photographing lens 11 as an image generation unit for photoelectrically converting a subject image incident through the photographing lens 11 to generate an image signal (a signal including an array of pixel data for each pixel). It is provided.

【0015】撮影レンズ11には光軸方向に沿って駆動
可能なレンズ系が含まれており、当該レンズ系を光軸方
向に駆動することにより、CCD撮像素子30に結像さ
れる被写体像の合焦状態を実現することができるように
構成されている。また、撮影レンズ11には、被写界深
度を変更することができる絞りが備えられており、絞り
を絞ることによって、被写界深度を大きくすることがで
きる。
The photographic lens 11 includes a lens system that can be driven along the optical axis direction. By driving the lens system in the optical axis direction, a subject image formed on the CCD image pickup device 30 is formed. It is configured so that a focused state can be realized. Further, the taking lens 11 is provided with an aperture that can change the depth of field, and the aperture can be increased to increase the depth of field.

【0016】また、デジタルカメラ1の上面側には、シ
ャッターボタン8と、ズームキー10と、カメラ状態表
示部13と、撮影モード設定ボタン14とが配置されて
いる。シャッターボタン8は被写体の撮影を行うときに
ユーザーが押下操作を行ってデジタルカメラ1に撮影指
示を与えるボタンである。ここでは、シャッターボタン
8を半押し状態(S1)とすることによって後述するオ
ートフォーカス動作が実施され、全押し状態(S2)と
することによって後述する本撮影が実施される。ズーム
キー10はユーザーの押下操作によって、撮影レンズ1
1を駆動させてズーミングを行う。カメラ状態表示部1
3は例えばセグメント表示タイプの液晶モニタによって
構成され、デジタルカメラ1における現在の設定内容等
をユーザーに示すために設けられている。また、撮影モ
ード設定ボタン14は、デジタルカメラ1による撮影動
作時の撮影モード、例えばポートレートモード、風景モ
ード、後述する近景モードおよび遠景モード等の複数の
撮影モードのうちから被写体に応じた一の撮影モードを
手動操作で選択設定するためのボタンである。
A shutter button 8, a zoom key 10, a camera status display section 13, and a photographing mode setting button 14 are arranged on the upper surface of the digital camera 1. The shutter button 8 is a button that the user presses to photograph the subject and gives a photographing instruction to the digital camera 1. Here, the shutter button 8 is half-pressed (S1) to perform an autofocus operation described later, and the fully-pressed state (S2) is to perform a main shooting described later. The zoom key 10 is pressed by the user to take the photographing lens 1.
1 is driven to perform zooming. Camera status display 1
Reference numeral 3 is composed of, for example, a segment display type liquid crystal monitor, and is provided to show the user the present setting contents and the like in the digital camera 1. Further, the shooting mode setting button 14 is one of a plurality of shooting modes such as a portrait mode, a landscape mode, a near-view mode and a distant-view mode, which will be described later, depending on a subject. It is a button for selecting and setting the shooting mode by manual operation.

【0017】また、デジタルカメラ1の側面部には、ユ
ーザーによるシャッターボタン8の押下操作に伴う本撮
影動作で得られる画像データを記録するためのメモリカ
ード9を着装する着装部15が形成されており、交換可
能なメモリカード9を着装することができる。さらに、
着装部15からメモリカード9を取り出す際に押下する
カード取り出しボタン7が配置されており、着装部15
からメモリカード9を取り出すことができる。
A mounting portion 15 for mounting a memory card 9 for recording image data obtained in a main photographing operation in response to a user's operation of pressing the shutter button 8 is formed on a side surface portion of the digital camera 1. A removable memory card 9 can be attached. further,
A card take-out button 7 that is pressed when taking out the memory card 9 from the wearing section 15 is arranged.
The memory card 9 can be taken out from.

【0018】また、図2に示すように、デジタルカメラ
1の背面図にはライブビュー画像や撮影画像等を表示す
るための液晶表示部16と、デジタルカメラ1の各種設
定状態を変更するための操作ボタン17と、ファインダ
窓2とが設けられている。さらに、4連スイッチ25が
設けられ、4連スイッチ25を種々押下操作することに
よって、後述する検出領域の変更等が可能である。な
お、図2には、方向関係を明確にするために直交座標系
を付しており、また、以下の図において同様の直交座標
系を付している場合は、同様の方向関係を示しているも
のとする。
Further, as shown in FIG. 2, a rear view of the digital camera 1 is provided with a liquid crystal display unit 16 for displaying a live view image, a photographed image, etc., and various setting states of the digital camera 1. An operation button 17 and a finder window 2 are provided. Further, a quad switch 25 is provided, and by pressing the quad switch 25 variously, it is possible to change the detection area described later. In addition, in FIG. 2, a Cartesian coordinate system is attached to clarify the directional relationship, and when the same Cartesian coordinate system is attached in the following drawings, the same directional relationship is shown. Be present.

【0019】<デジタルカメラの機能ブロック>図3は
デジタルカメラ1の内部構成を示すブロック図である。
図3に示すように、デジタルカメラ1は、画像信号を処
理するための撮影機能部3、オートフォーカス制御を実
現するための光学系制御部150およびレンズ駆動部1
10、デジタルカメラ1に設けられた各部を統括的に制
御するカメラ制御部100とを備えて構成される。
<Functional Block of Digital Camera> FIG. 3 is a block diagram showing the internal structure of the digital camera 1.
As shown in FIG. 3, the digital camera 1 includes a photographing function unit 3 for processing an image signal, an optical system control unit 150 for realizing autofocus control, and a lens driving unit 1.
10 and a camera control unit 100 that integrally controls each unit provided in the digital camera 1.

【0020】撮影レンズ11を介してCCD撮像素子3
0に結像される被写体像は、CCD撮像素子30におい
て複数の画素を有する電気的な画像、すなわち画像信号
に変換され、A/D変換器40へと導かれる。
CCD image pickup device 3 via the taking lens 11
The subject image formed at 0 is converted into an electric image having a plurality of pixels, that is, an image signal in the CCD image pickup device 30, and is guided to the A / D converter 40.

【0021】A/D変換器40はCCD撮像素子30か
ら出力される画像信号を例えば1画素あたり10ビット
のデジタル信号に変換する。A/D変換器40から出力
される画像信号は、画像処理部50へと導かれる。
The A / D converter 40 converts the image signal output from the CCD image pickup device 30 into, for example, a digital signal of 10 bits per pixel. The image signal output from the A / D converter 40 is guided to the image processing unit 50.

【0022】画像処理部50は画像信号に対してホワイ
トバランスの調整、γ補正、色補正等の画像処理を施
す。ライブビュー画像の表示時には、画像処理部50は
画像処理を施した画像信号をライブビュー画像作成部6
0に与える。また、オートフォーカス制御を行うときに
は、画像処理部50は画像信号を画像メモリ70に与え
る。さらに、シャッターボタン8の押下操作に伴って行
われる撮影動作(本撮影)ときには、画像処理部50は
画像処理を施した画像信号を画像圧縮部80に与える。
The image processing unit 50 performs image processing such as white balance adjustment, γ correction and color correction on the image signal. At the time of displaying the live view image, the image processing unit 50 outputs the image signal subjected to the image processing to the live view image creation unit 6
Give to 0. Further, when performing the autofocus control, the image processing unit 50 gives an image signal to the image memory 70. Further, during the shooting operation (main shooting) performed in response to the pressing operation of the shutter button 8, the image processing unit 50 provides the image compression unit 80 with the image signal subjected to the image processing.

【0023】そして、ライブビュー画像の表示時等に
は、ライブビュー画像作成部60が液晶表示部16に適
合した画像信号を生成し、それを液晶表示部16に与え
るように構成されている。そのため、ライブビュー画像
の表示時には、CCD撮像素子30において逐次光電変
換して得られる画像信号に基づいて液晶表示部16に画
像表示が行われる。
When the live view image is displayed, the live view image creating section 60 generates an image signal suitable for the liquid crystal display section 16 and supplies it to the liquid crystal display section 16. Therefore, at the time of displaying the live view image, image display is performed on the liquid crystal display unit 16 based on the image signal obtained by successive photoelectric conversion in the CCD image pickup device 30.

【0024】画像メモリ70は、オートフォーカス制御
を行うために画像信号を一時的に記憶するためのもので
ある。この画像メモリ70には、光学系制御部150が
撮影レンズ11のレンズ位置を段階的に駆動させ、カメ
ラ制御部100の制御によって撮影レンズ11の各レン
ズ位置で撮影された画像信号が格納される。
The image memory 70 is for temporarily storing an image signal for performing autofocus control. In the image memory 70, the optical system control unit 150 drives the lens position of the taking lens 11 in a stepwise manner, and the image signal taken at each lens position of the taking lens 11 is stored under the control of the camera control unit 100. .

【0025】画像処理部50から画像メモリ70に画像
信号が格納されるタイミングは、オートフォーカス制御
が行われるタイミングである。このため、ライブビュー
画像表示時に液晶表示部16に対して合焦状態のライブ
ビュー画像を表示させたい場合にはそのライブビュー画
像表示時にも画像メモリ70に画像信号を格納するよう
に構成すれば良い。
The timing at which the image signal is stored in the image memory 70 from the image processing section 50 is the timing at which the autofocus control is performed. For this reason, when it is desired to display a focused live view image on the liquid crystal display unit 16 during live view image display, an image signal may be stored in the image memory 70 during the live view image display. good.

【0026】また、シャッターボタン8の押下操作が行
われた場合、本撮影の撮影動作を行う前にオートフォー
カス制御を行う必要がある。そのため、本撮影動作を行
う前に、撮影レンズ11のレンズ位置を段階的に駆動さ
せつつ、各レンズ位置で撮影された画像信号が画像メモ
リ70に格納される。光学系制御部150は、画像メモ
リ70に格納される画像信号を取得して、コントラスト
方式のオートフォーカス動作を行うように構成される。
そして、光学系制御部150によるオートフォーカス制
御が行われて撮影レンズ11が合焦位置に駆動された後
に本撮影の撮影動作が行われ、本撮影によって得られる
画像信号が画像圧縮部80に与えられる。
Further, when the shutter button 8 is pressed, it is necessary to perform autofocus control before the photographing operation of the main photographing. Therefore, before performing the main photographing operation, the image signals photographed at the respective lens positions are stored in the image memory 70 while driving the lens positions of the photographing lens 11 in stages. The optical system controller 150 is configured to acquire an image signal stored in the image memory 70 and perform a contrast autofocus operation.
Then, after the photographic lens 11 is driven to the in-focus position by performing the autofocus control by the optical system control unit 150, the photographing operation of the main photographing is performed, and the image signal obtained by the main photographing is given to the image compressing unit 80. To be

【0027】画像圧縮部80は本撮影によって得られる
画像信号に対して所定の圧縮方法による画像圧縮処理を
施すように構成されており、画像圧縮の施された画像信
号が画像圧縮部80から出力され、メモリカード9に記
憶される。
The image compression section 80 is configured to perform an image compression process by a predetermined compression method on the image signal obtained by the actual photographing, and the image signal subjected to the image compression is output from the image compression section 80. And is stored in the memory card 9.

【0028】カメラ制御部100はCPUが所定のプロ
グラムを実行することによって実現され、シャッターボ
タン8、ユーザーが撮影モード設定ボタン14、操作ボ
タン17、および4連スイッチ25を含む各種ボタンを
押下操作した場合に、その操作内容に応じて撮影機能部
3の各部や光学系制御部150を制御するように構成さ
れる。また、カメラ制御部100は、光学系制御部15
0と連繋し、オートフォーカス制御時には光学系制御部
150が撮影レンズ11のレンズ位置を段階的に駆動さ
せた場合に、各レンズ位置でCCD撮像素子30の撮影
動作を制御し、かつ、その撮影された画像信号を画像メ
モリ70に格納するように制御する。
The camera control unit 100 is realized by the CPU executing a predetermined program, and the shutter button 8, the user presses various buttons including the photographing mode setting button 14, the operation button 17, and the quad switch 25. In this case, each unit of the photographing function unit 3 and the optical system control unit 150 are configured to be controlled according to the operation content. Further, the camera control unit 100 includes the optical system control unit 15
When the optical system controller 150 drives the lens position of the photographing lens 11 stepwise in autofocus control, the photographing operation of the CCD image pickup device 30 is controlled at each lens position and the photographing is performed. It controls so as to store the generated image signal in the image memory 70.

【0029】レンズ駆動部110は、光学系制御部15
0からの指令に応じて撮影レンズ11を光軸に沿って駆
動させるための駆動手段であり、CCD撮像素子30に
結像される被写体像の合焦状態を変化させるものであ
る。また、レンズ駆動部110は、光学系制御部150
およびカメラ制御部100の制御のもとで撮影レンズ1
1に備えられた絞りを駆動させる。
The lens driving unit 110 includes an optical system control unit 15
It is a drive unit for driving the taking lens 11 along the optical axis in response to a command from 0, and changes the focus state of the subject image formed on the CCD image pickup device 30. Further, the lens driving unit 110 includes an optical system control unit 150.
And the photographing lens 1 under the control of the camera control unit 100.
The diaphragm provided in 1 is driven.

【0030】<光学系制御部150について>図4は光
学系制御部150の内部構成を示すブロック図である。
図4に示すように、光学系制御部150は、画像取得部
151、検出領域設定部152、エッジ検出部153、
評価領域設定部154、評価値算出部155、境界検出
部156、評価領域選択部157、駆動制御部158を
備えて構成され、画像メモリ70に格納された画像信号
を取得して、コントラスト方式によるオートフォーカス
制御を行う。つまり、撮影レンズ11によってCCD撮
像素子30に結像される被写体像を合焦位置に導くよう
に動作する。
<Regarding Optical System Control Unit 150> FIG. 4 is a block diagram showing the internal structure of the optical system control unit 150.
As shown in FIG. 4, the optical system control unit 150 includes an image acquisition unit 151, a detection area setting unit 152, an edge detection unit 153,
It comprises an evaluation area setting unit 154, an evaluation value calculation unit 155, a boundary detection unit 156, an evaluation area selection unit 157, and a drive control unit 158, acquires the image signal stored in the image memory 70, and uses the contrast method. Performs auto focus control. In other words, the photographing lens 11 operates so as to guide the subject image formed on the CCD image pickup device 30 to the in-focus position.

【0031】また、光学系制御部150は、撮影モード
設定ボタン14の操作によって設定される撮影モードに
よって、オートフォーカス制御において果たす機能が異
なるが、ここでは、本発明にかかるデジタルカメラ1の
特徴である近景被写体のコントラストが低い場合等に選
択される近景モードおよび遠景モードにおける光学系制
御部150の各部の機能について説明し、その他のポー
トレートモードおよび風景モード等が設定された場合に
ついては、一般的なコントラスト方式によるオートフォ
ーカス制御と同様となるため、説明を省略する。
The function of the optical system controller 150 in the autofocus control differs depending on the photographing mode set by the operation of the photographing mode setting button 14. Here, the features of the digital camera 1 according to the present invention are described. The function of each part of the optical system control unit 150 in the near view mode and the distant view mode selected when the contrast of a certain near view subject is low, etc. will be described, and when other portrait mode, landscape mode, etc. are set, The description is omitted because it is similar to the autofocus control by the conventional contrast method.

【0032】画像取得部151は、画像メモリ70に入
力した画像信号を画像メモリ70から取得する。
The image acquisition unit 151 acquires the image signal input to the image memory 70 from the image memory 70.

【0033】エッジ検出部153は、画像メモリ70か
ら取得される画像に設定される所定の境界検出領域か
ら、近景被写体と遠景被写体との境界(遠近境界)を含
むエッジを検出する。具体的には、まず、画像メモリ7
0に格納された画像信号より、隣接画素の輝度差が所定
値以上であるような隣接画素群が所定の閾値長さ以上に
連続している部分をエッジとして認識する。なお、エッ
ジ検出部153によってエッジを認識する際には、被写
体の遠近を問わずエッジを認識し易いようにデジタルカ
メラ1の絞りを最も絞った状態とすることが好ましい。
The edge detecting section 153 detects an edge including a boundary between the near view object and the distant view object (a perspective boundary) from a predetermined boundary detection area set in the image acquired from the image memory 70. Specifically, first, the image memory 7
From the image signal stored in 0, a portion in which a group of adjacent pixels whose luminance difference between adjacent pixels is a predetermined value or more is continuous for a predetermined threshold length or more is recognized as an edge. When the edge detection unit 153 recognizes an edge, it is preferable to set the aperture of the digital camera 1 to the most narrowed state so that the edge can be easily recognized regardless of the distance of the subject.

【0034】エッジ検出部153では、上述したよう
に、エッジを認識することができるが、遠景被写体に輝
度差が激しい部分が多いと、エッジが多数認識されてし
まう。そこで、ここでは、遠景被写体におけるエッジの
多くは比較的細かいことを利用して、比較的細かいエッ
ジを遠景被写体の輝度差が激しい部分として排除する。
たとえば、上記のエッジ検出153における閾値長さを
比較的大きくとることによってこれを実現することがで
きる。このようにして、遠景被写体における比較的大き
なエッジと、遠近境界とからなる大エッジを検出するこ
とができる。
As described above, the edge detecting section 153 can recognize the edges, but if the distant view subject has many portions with a large luminance difference, many edges will be recognized. Therefore, here, by utilizing the fact that many of the edges in the distant object are relatively fine, the relatively fine edges are excluded as the portion where the luminance difference of the distant object is severe.
For example, this can be achieved by setting the threshold length in the above edge detection 153 to be relatively large. In this way, it is possible to detect a relatively large edge in the distant view subject and a large edge composed of the perspective boundary.

【0035】境界検出領域は、画像から遠近境界を含む
エッジを検出するための単位領域であり、検出領域設定
部152によって画像メモリ70に格納される画像に対
して設定される。図5は、境界検出領域の一例を示す図
である。図示するように、検出領域設定部152によっ
て、画像メモリ70に格納される画像G10に対して水
平方向に一定幅を持つ3つの領域からなる境界検出領域
EA1を設定する。また、エッジ検出部153により境
界検出領域EA1において大エッジを検出することがで
きないとき、または、後述する境界検出部156により
境界検出領域EA1において遠近境界を選択的に検出す
ることができないときには、検出領域設定部152は、
境界検出領域を切り替える。具体的には、図6に示すよ
うに、画像メモリ70に格納される画像G10に対して
垂直方向に一定幅を持つ3つの領域からなる境界検出領
域EA2として設定する。なお、これらにおける「水平
方向」および「垂直方向」は、デジタルカメラ1の画角
のうちCCD走査線が走る方向(図2のDX方向)と、
それに垂直な方向(図2のDY方向)としてそれぞれ定
義される。遠景と近景との区別という本来の趣旨からす
れば、地平線(水平線)方向と鉛直方向とにそれぞれ対
応させることが好ましいが、デジタルカメラ1はその底
面を下側に向けて使用することが多いため、CCD走査
線方向を基準として定義しても多くの場合をカバーでき
る。また、デジタルカメラ1を傾けて撮影するような場
合であっても、この実施形態のエッジ検出や境界検出が
不可能になるわけではないため、上記のように水平方向
と垂直方向とを規定しても実用上の問題は生じない。
The boundary detection area is a unit area for detecting an edge including a perspective boundary from the image, and is set for the image stored in the image memory 70 by the detection area setting unit 152. FIG. 5 is a diagram showing an example of the boundary detection area. As illustrated, the detection area setting unit 152 sets a boundary detection area EA1 composed of three areas having a certain width in the horizontal direction with respect to the image G10 stored in the image memory 70. When the edge detection unit 153 cannot detect a large edge in the boundary detection area EA1, or when the boundary detection unit 156 described later cannot selectively detect a perspective boundary in the boundary detection area EA1, detection is performed. The area setting unit 152
Switch the boundary detection area. Specifically, as shown in FIG. 6, it is set as a boundary detection area EA2 composed of three areas having a constant width in the vertical direction with respect to the image G10 stored in the image memory 70. The "horizontal direction" and the "vertical direction" in these are the direction in which the CCD scanning line runs in the angle of view of the digital camera 1 (DX direction in FIG. 2),
Each is defined as a direction perpendicular to it (the DY direction in FIG. 2). From the original purpose of distinguishing a distant view from a near view, it is preferable to correspond to the horizon (horizontal line) direction and the vertical direction respectively, but the digital camera 1 is often used with its bottom face facing downward. , The CCD scanning line direction can be defined as a reference to cover many cases. In addition, even when the digital camera 1 is tilted to take an image, the edge detection and the boundary detection of this embodiment are not impossible. Therefore, the horizontal direction and the vertical direction are defined as described above. However, there is no practical problem.

【0036】図7は、画像メモリ70に格納される、近
景被写体のコントラストが低く、背景である遠景被写体
のコントラストが高い画像G10に対して境界検出領域
EA1が設定されている一例を示す模式図である。ここ
では、近景被写体NPはコントラストが低い旗およびポ
ールであり、遠景被写体FPはコントラストが高いビル
である。なお、ここでは、説明のため、便宜上画像メモ
リ70に格納されている画像G10と境界検出領域EA
1を示す枠とを併せて図示しているが、実際には境界検
出領域EA1を示す枠は画像G10に含まれるものでは
ない。図7に示すように、境界検出領域EA1内に近景
被写体NPと遠景被写体FPとの境界が存在するため、
エッジ検出部153は大エッジを検出し、境界検出部1
56は遠近境界を選択的に検出可能となる。
FIG. 7 is a schematic diagram showing an example in which the boundary detection area EA1 is set for the image G10 stored in the image memory 70, in which the contrast of the foreground subject is low and the contrast of the background subject in the background is high. Is. Here, the near view subject NP is a flag and a pole with low contrast, and the distant view subject FP is a building with high contrast. Here, for convenience of description, the image G10 and the boundary detection area EA stored in the image memory 70 are illustrated for convenience.
1 is also shown together with the frame indicating No. 1, but the frame indicating the boundary detection area EA1 is not actually included in the image G10. As shown in FIG. 7, since the boundary between the foreground object NP and the distant object FP exists in the boundary detection area EA1,
The edge detection unit 153 detects a large edge, and the boundary detection unit 1
56 can selectively detect the perspective boundary.

【0037】図8は、近景被写体のコントラストが低
く、背景の遠景被写体のコントラストが高い画像G10
に対して境界検出領域EA1が設定されている一例を示
す模式図である。ここでも、図7と同様に、近景被写体
NPはコントラストが低い旗およびポールであり、遠景
被写体FPはコントラストが高いビルである。なお、こ
こでも、図7と同様に、説明のため、便宜上画像メモリ
70に格納されている画像G10と境界検出領域EA1
を示す枠とを併せて図示しているが、実際には境界検出
領域EA1を示す枠は画像G10に含まれるものではな
い。図8に示すように、境界検出領域EA1において
は、隣接画素間の輝度差が大きな場所はないため、エッ
ジ検出部153は、大エッジを検出することができな
い。このような場合、検出領域設定部152によって、
境界検出領域を、境界検出領域EA1から図6に示すよ
うな境界検出領域EA2に切り替える。
FIG. 8 shows an image G10 in which the foreground subject has a low contrast and the background distant subject has a high contrast.
It is a schematic diagram which shows an example in which the boundary detection area EA1 is set with respect to. Here, as in FIG. 7, the near-view subject NP is a flag and a pole with low contrast, and the distant-view subject FP is a building with high contrast. Here, as in FIG. 7, for convenience of explanation, the image G10 and the boundary detection area EA1 stored in the image memory 70 are also illustrated for convenience of explanation.
The frame indicating the boundary detection area EA1 is not actually included in the image G10. As shown in FIG. 8, in the boundary detection area EA1, since there is no place where the brightness difference between adjacent pixels is large, the edge detection unit 153 cannot detect a large edge. In such a case, the detection area setting unit 152
The boundary detection area is switched from the boundary detection area EA1 to the boundary detection area EA2 as shown in FIG.

【0038】図9は、境界検出領域を切り替えた後に、
画像G10に対して境界検出領域EA2が設定されてい
る一例を示す模式図である。ここでの画像は、図8と同
様に、近景被写体NPはコントラストが低い旗およびポ
ールであり、遠景被写体FPはコントラストが高いビル
である。なお、ここでは、説明のため、便宜上画像メモ
リ70に格納されている画像G10と境界検出領域EA
2を示す枠とを併せて図示しているが、実際には境界検
出領域EA2を示す枠は画像G10に含まれるものでは
ない。図9に示すように、境界検出領域EA2内に近景
被写体NPと遠景被写体FPとの境界が存在するため、
エッジ検出部153は大エッジを検出し、境界検出部1
56は遠近境界を選択的に検出可能となる。
FIG. 9 shows that after switching the boundary detection area,
It is a schematic diagram which shows an example in which the boundary detection area EA2 is set with respect to the image G10. In the image here, as in FIG. 8, the near-view subject NP is a flag and a pole with low contrast, and the distant-view subject FP is a building with high contrast. Here, for convenience of description, the image G10 and the boundary detection area EA stored in the image memory 70 are illustrated for convenience.
2 is also shown together with the frame indicating the area 2, but the frame indicating the boundary detection area EA2 is not actually included in the image G10. As shown in FIG. 9, since the boundary between the foreground object NP and the distant object FP exists in the boundary detection area EA2,
The edge detection unit 153 detects a large edge, and the boundary detection unit 1
56 can selectively detect the perspective boundary.

【0039】評価領域設定部154は、エッジ検出部1
53によって検出された大エッジをもとに、画像メモリ
70に格納される画像に対して、撮影レンズ11の合焦
状態に関する評価値を求めるための評価領域を設定す
る。図10および図11は、評価領域の設定について説
明する模式図である。図10は、エッジ検出部153に
よって境界検出領域EA1内で後述する縦エッジが検出
された場合における評価領域の設定を説明する図であ
り、図11は、エッジ検出部153によって境界検出領
域EA1内で後述する横エッジが検出された場合、また
は、エッジ検出部153によって境界検出領域EA2に
おいて横エッジが検出された場合における評価領域の設
定を説明する図である。
The evaluation area setting unit 154 includes the edge detection unit 1
Based on the large edge detected by 53, an evaluation area for obtaining an evaluation value regarding the focus state of the taking lens 11 is set for the image stored in the image memory 70. 10 and 11 are schematic diagrams illustrating setting of the evaluation area. FIG. 10 is a diagram illustrating setting of an evaluation area when a vertical edge described below is detected in the boundary detection area EA1 by the edge detection unit 153, and FIG. FIG. 6 is a diagram illustrating setting of an evaluation area when a horizontal edge described below is detected or when a horizontal edge is detected by the edge detection unit 153 in the boundary detection area EA2.

【0040】エッジ検出部153によって境界検出領域
EA1内で大エッジが検出された場合、評価領域設定部
154は、ハフ変換等の手法によって、大エッジの線分
が縦方向に向いた部分(縦エッジ)を見つけ、図10に
示すように、縦エッジAの位置において大エッジLEの
一部を含み、かつ、大エッジLEの両側の領域である第
1の画像領域P1と第2の画像領域P2について、第2
の画像領域P2よりも第1の画像領域P1を多く含む第
1の評価領域F1と、大エッジLEの一部を含み、か
つ、第1の画像領域P1よりも第2の画像領域P2を多
く含む第2の評価領域F2とを設定する。なお、図10
では、縦エッジは、A,Bの2カ所存在するが、このよ
うな場合には、例えば、ハフ変換等の手法によって求ま
る大エッジLEの線分の方向の変化から、第1の画像領
域P1の左側の縦エッジ(Aの部分)を自動的に選択す
る。
When a large edge is detected in the boundary detection area EA1 by the edge detection unit 153, the evaluation area setting unit 154 uses a method such as Hough transformation to determine a portion in which the line segment of the large edge is oriented vertically (vertically). Edge), and as shown in FIG. 10, the first image area P1 and the second image area P1 that include a part of the large edge LE at the position of the vertical edge A and are areas on both sides of the large edge LE. Second about P2
Of the first evaluation area F1 including the first image area P1 more than the first image area P2 and a part of the large edge LE, and more second image area P2 than the first image area P1. The second evaluation area F2 including the area is set. Note that FIG.
Then, although there are two vertical edges A and B, in such a case, for example, from the change in the direction of the line segment of the large edge LE found by a method such as Hough transform, the first image region P1 The left vertical edge (portion A) is automatically selected.

【0041】ここで、第1の評価領域F1および第2の
評価領域F2がそれぞれ大エッジLEで区切られる面積
については、後述するオートフォーカス動作による合焦
の精度を考慮すると、大エッジLEによって区切られる
一方の領域の面積が他方の領域の面積の2倍以上である
ことが好ましい。具体的には、図10を例に挙げて説明
すれば、第1の評価領域F1について、第1の画像領域
P1の占める面積が第2の画像領域P2の占める領域の
2倍以上であるような状態である。また、オートフォー
カス動作による合焦をさらに高精度に行うためには、大
エッジLEによって区切られる一方の領域の面積が他方
の領域の面積の4倍以上であることが好ましい。なお、
ここで、縦エッジを見つけることができない場合は、図
11において後述するように、横エッジを見つけて、そ
の位置において大エッジLEの一部を含み、かつ、第2
の画像領域P2よりも第1の画像領域P1を多く含む第
1の評価領域F1と、第1の画像領域P1よりも第2の
画像領域P2を多く含む第2の評価領域F2とを設定す
る。
Here, regarding the areas in which the first evaluation area F1 and the second evaluation area F2 are each separated by the large edge LE, in consideration of the accuracy of focusing by the autofocus operation described later, the areas are separated by the large edge LE. It is preferable that the area of one of the two regions is at least twice the area of the other region. Specifically, referring to FIG. 10 as an example, regarding the first evaluation area F1, the area occupied by the first image area P1 is twice or more the area occupied by the second image area P2. It is in a state. Further, in order to perform focusing by the autofocus operation with higher accuracy, it is preferable that the area of one region divided by the large edge LE is four times or more the area of the other region. In addition,
Here, when the vertical edge cannot be found, the horizontal edge is found and a part of the large edge LE is included at that position, as described later in FIG.
A first evaluation area F1 including a larger number of first image areas P1 than the second image area P2 and a second evaluation area F2 including a larger number of second image areas P2 than the first image area P1. .

【0042】また、エッジ検出部153によって境界検
出領域EA1内で後述する横エッジが検出された場合、
または、エッジ検出部153によって境界検出領域EA
2において大エッジが検出された場合、評価領域設定部
154は、ハフ変換等の手法によって、第1の画像領域
P1と第2の画像領域P2との境界である大エッジLE
の線分が横方向に向いた部分(横エッジ)を見つけ、図
11に示すように、その位置において大エッジLEの一
部を含み、かつ、第2の画像領域P2よりも第1の画像
領域P1を多く含む第1の評価領域F1と、第1の画像
領域P1よりも第2の画像領域P2を多く含む第2の評
価領域F2とを設定する。なお、図11では、横エッジ
は、C,Dの2カ所存在するが、このような場合には、
例えば、ハフ変換等の手法によって求まる大エッジLE
の線分の方向の変化から、第1の画像領域P1の上側の
横エッジ(Cの部分)を自動的に選択する。
When the edge detecting section 153 detects a lateral edge described later in the boundary detecting area EA1,
Alternatively, the edge detection unit 153 causes the boundary detection area EA to be detected.
When a large edge is detected in No. 2, the evaluation area setting unit 154 uses the Hough transform or the like to determine the large edge LE that is the boundary between the first image area P1 and the second image area P2.
Finds a portion (horizontal edge) in which the line segment of FIG. 11 is oriented in the horizontal direction, and includes a part of the large edge LE at that position, and the first image rather than the second image region P2 A first evaluation region F1 including a large amount of the region P1 and a second evaluation region F2 including a larger amount of the second image region P2 than the first image region P1 are set. In FIG. 11, there are two horizontal edges C and D, but in such a case,
For example, a large edge LE obtained by a method such as Hough transform
The horizontal edge (C portion) on the upper side of the first image region P1 is automatically selected from the change in the direction of the line segment.

【0043】ここで、第1の評価領域F1および第2の
評価領域F2が大エッジLEで区切られる面積について
は、図10において説明したように、後述するオートフ
ォーカス動作による合焦の精度を考慮すると、大エッジ
によって区切られる一方の領域の面積が他方の領域の面
積の2倍以上であるであることが好ましい。また、オー
トフォーカス動作による合焦をさらに高精度に行うため
には、大エッジによって区切られる一方の領域の面積が
他方の領域の面積の4倍以上であることが好ましい。な
お、境界検出領域EA2において検出された大エッジに
対して評価領域を設定する際には、はじめから横エッジ
を見つけて、評価領域を設定しているが、これは境界検
出領域EA1において大エッジが検出されず、境界検出
領域EA2において大エッジが検出される場合は、検出
される大エッジの線分の方向が横方向に向いていること
が一般的であるからである。
Here, regarding the area where the first evaluation area F1 and the second evaluation area F2 are separated by the large edge LE, as described with reference to FIG. 10, the accuracy of focusing by the autofocus operation described later is taken into consideration. Then, the area of one region divided by the large edge is preferably twice or more the area of the other region. Further, in order to perform focusing by the autofocus operation with higher accuracy, it is preferable that the area of one region divided by the large edge is four times or more the area of the other region. When setting the evaluation area for the large edge detected in the boundary detection area EA2, the horizontal edge is found from the beginning and the evaluation area is set, but this is the large edge in the boundary detection area EA1. This is because when is not detected and a large edge is detected in the boundary detection area EA2, the line segment of the detected large edge is generally in the horizontal direction.

【0044】評価値算出部155は、評価領域設定部1
54によって設定された第1の評価領域F1および第2
の評価領域F2について、撮影レンズ11の合焦状態に
関する評価値を求める。この評価値は、通常、コントラ
スト方式のオートフォーカス動作において実施されてい
るものと同様に、評価領域内の各隣接画素間に関するコ
ントラスト値の総和として求められる。
The evaluation value calculation unit 155 includes an evaluation area setting unit 1
The first evaluation area F1 and the second evaluation area F1 set by 54
With respect to the evaluation area F2, the evaluation value regarding the in-focus state of the taking lens 11 is obtained. This evaluation value is normally obtained as the sum of contrast values between adjacent pixels in the evaluation area, as in the case of being performed in the contrast autofocus operation.

【0045】上述したように、大エッジは、遠景被写体
の比較的大きなエッジと、遠近境界とから構成されてお
り、図12および図13は、第1および第2の評価領域
F1,F2においてそれぞれ求まる評価値(第1および
第2の評価値)と撮影レンズ11の光軸方向の位置xと
の関係を表す曲線CL1,CL2の一例を示す模式図で
ある。図12は遠近境界に対して設定された第1および
第2の評価領域についての評価値を示し、図13は遠景
被写体の比較的大きなエッジに対して設定された第1お
よび第2の評価領域についての評価値を示している。
As described above, the large edge is composed of the relatively large edge of the distant view subject and the perspective boundary, and FIGS. 12 and 13 show the first and second evaluation areas F1 and F2, respectively. FIG. 6 is a schematic diagram showing an example of curves CL1 and CL2 representing the relationship between the obtained evaluation values (first and second evaluation values) and the position x of the taking lens 11 in the optical axis direction. FIG. 12 shows the evaluation values for the first and second evaluation areas set for the perspective boundary, and FIG. 13 shows the first and second evaluation areas set for the relatively large edge of the distant view subject. The evaluation value is shown.

【0046】図12に示すように、曲線CL1が第1の
評価値で、曲線CL2が第2の評価値であり、撮影レン
ズ11が第1の評価領域に対して合焦状態の位置にある
場合(x=x1)および撮影レンズ11が第2の評価領
域に対して合焦状態の位置にある場合(x=x2)に、
それぞれ上記評価値が最も大きくなる。ここでは、第1
の評価領域F1はその領域の多くをコントラストの低い
近景被写体によって占められていても、第1の評価領域
F1は遠近境界を含んでいるため、第1の評価値は主と
して遠近境界のコントラストに基づいた一定以上のピー
クを持つ。そして、ここでは、第1および第2の画像領
域はそれぞれ主に近景被写体および遠景被写体によって
占められるため、レンズ位置x=x1とx=x2とは一
定以上の異なる値をとる。また、図13に示すように、
第1および第2の画像領域がともに遠景被写体であると
きは、レンズ位置x=x1とx=x2とはほぼ等しい値
をとる。
As shown in FIG. 12, the curve CL1 is the first evaluation value, the curve CL2 is the second evaluation value, and the taking lens 11 is in the in-focus position with respect to the first evaluation area. In the case (x = x1) and when the taking lens 11 is in the in-focus position with respect to the second evaluation area (x = x2),
The above evaluation values are the largest. Here, the first
Even if most of the evaluation area F1 of the first evaluation area F1 is occupied by a near-field subject having a low contrast, the first evaluation area F1 includes a perspective boundary, and thus the first evaluation value is mainly based on the contrast of the perspective boundary. It has a peak above a certain level. Then, since the first and second image areas are mainly occupied by the near-view subject and the distant-view subject, respectively, the lens positions x = x1 and x = x2 have different values of a certain value or more. Also, as shown in FIG.
When both the first and second image areas are distant objects, the lens positions x = x1 and x = x2 have almost the same value.

【0047】境界検出部156は、評価値算出部155
によって算出された評価値に基づいて、遠近境界に対し
て設定された第1および第2の評価領域を特定すること
によって、遠近境界を検出する。具体的には、第1およ
び第2の評価領域それぞれについての評価値の最大値を
とるレンズ位置x=x1とx=x2とが一定以上の異な
る値を示す場合は、遠近境界に対して設定された第1お
よび第2の評価領域であると特定することができる。
The boundary detecting section 156 has an evaluation value calculating section 155.
The perspective boundary is detected by specifying the first and second evaluation regions set for the perspective boundary based on the evaluation value calculated by. Specifically, when the lens positions x = x1 and x = x2, which have the maximum evaluation values for the first and second evaluation areas, show different values of a certain value or more, they are set for the perspective boundary. It is possible to specify the first and second evaluation areas.

【0048】合焦領域選択部は、撮影前にユーザーによ
って操作ボタン17を種々押下操作されて近景モードま
たは遠景モードが選択設定されることによって、近景ま
たは遠景の被写体のいずれの被写体に対して合焦するの
かについて選択された結果に基づいて、検出された遠近
境界に対して設定された第1の評価領域F1および第2
の評価領域F2のうちから一方の評価領域を撮影レンズ
11を合焦状態とするための合焦領域として選択する。
なお、ここでは、2つの評価領域のうちいずれの領域が
近景被写体を多く含む評価領域(近景評価領域)または
遠景被写体を多く含む評価領域(遠景評価領域)である
のかについては、2つの評価領域についての評価値が最
大となるレンズ位置(x=x1,x2)から判別するこ
とができる。
The in-focus area selection section is operated by the user to depress various operation buttons 17 before shooting to selectively set the near view mode or the distant view mode, so that either the near view object or the distant view object is in focus. The first evaluation area F1 and the second evaluation area F1 set for the detected perspective boundary are selected based on the selected result regarding whether to focus.
One of the evaluation areas F2 is selected as the focus area for bringing the taking lens 11 into the focus state.
It should be noted that here, two evaluation regions are used to determine which one of the two evaluation regions is the evaluation region containing many near-view subjects (near-view evaluation region) or the evaluation region containing many distant-view subjects (distant view evaluation region). Can be discriminated from the lens position (x = x1, x2) where the evaluation value of is maximum.

【0049】駆動制御手段は、合焦領域選択部によって
選択された合焦領域について算出された評価値に基づい
て撮影レンズ11の合焦位置を求め、合焦位置への撮影
レンズ11の駆動を制御する。具体的には、近景モード
が選択されているときには、近景評価領域についての評
価値に基づいて撮影レンズ11の合焦位置を求め、合焦
位置への撮影レンズ11の駆動を制御する。また、遠景
モードが選択されているときには、遠景評価領域につい
ての評価値に基づいて撮影レンズ11の合焦位置を求
め、合焦位置への撮影レンズ11の駆動を制御する。
The drive control means obtains the in-focus position of the taking lens 11 based on the evaluation value calculated for the in-focus area selected by the in-focus area selecting section, and drives the taking lens 11 to the in-focus position. Control. Specifically, when the near view mode is selected, the focusing position of the taking lens 11 is obtained based on the evaluation value of the near view evaluation area, and the driving of the taking lens 11 to the focusing position is controlled. When the distant view mode is selected, the focus position of the taking lens 11 is obtained based on the evaluation value of the distant view evaluation area, and the driving of the taking lens 11 to the focus position is controlled.

【0050】<デジタルカメラ1の動作>次に、デジタ
ルカメラ1の動作について説明する。図14から図16
はデジタルカメラ1における合焦動作を示すフローチャ
ートであり、一例として、ユーザーによってあらかじめ
近景モードまたは遠景モードが選択された場合のオート
フォーカス制御を行う場合を示している。
<Operation of Digital Camera 1> Next, the operation of the digital camera 1 will be described. 14 to 16
3 is a flowchart showing a focusing operation in the digital camera 1, and shows an example of performing autofocus control when the user selects the near view mode or the distant view mode in advance.

【0051】まず、図14に示すように、ユーザーによ
って、撮影モード設定ボタン14の操作によって近景モ
ードまたは遠景モードが設定された後に、デジタルカメ
ラ1が撮影待機状態となると、ステップS1に進む。
First, as shown in FIG. 14, when the user sets the near-field mode or the distant-view mode by operating the photographing mode setting button 14, when the digital camera 1 enters the photographing standby state, the process proceeds to step S1.

【0052】ステップS1では、デジタルカメラ1のカ
メラ制御部100は、ユーザーがシャッターボタン8を
半押し状態(S1)としてオートフォーカス動作開始の
指示の入力を行ったか否かを判断する。そして、ユーザ
ーからのオートフォーカス動作の指示の入力があった場
合に、デジタルカメラ1においてCCD撮像素子30に
結像される被写体像を合焦状態とするためのオートフォ
ーカス制御が開始され、ステップS2に進む。
In step S1, the camera control unit 100 of the digital camera 1 determines whether or not the user has pressed the shutter button 8 halfway (S1) to input an instruction to start the autofocus operation. Then, when the user inputs an instruction of an autofocus operation, the autofocus control for bringing the subject image formed on the CCD image pickup device 30 into the in-focus state in the digital camera 1 is started, and step S2 Proceed to.

【0053】ステップS2では、検出領域設定部152
によって、画像メモリ70に格納される画像に対して境
界検出領域が設定され、ステップS3に進む。具体的に
は、図5に示す境界検出領域EA1が設定される。
In step S2, the detection area setting unit 152
Thus, the boundary detection area is set for the image stored in the image memory 70, and the process proceeds to step S3. Specifically, the boundary detection area EA1 shown in FIG. 5 is set.

【0054】ステップS3では、エッジ検出部153に
よって、境界検出領域EA1内のエッジを認識し、ステ
ップS4に進む。
In step S3, the edge detection section 153 recognizes an edge in the boundary detection area EA1 and the process proceeds to step S4.

【0055】ステップS4では、エッジ検出部153に
よって、ステップS3において認識されたエッジのう
ち、比較的細かいエッジは遠景被写体の輝度差が激しい
部分として除外し、ステップS5に進む。ここでは、比
較的細かいエッジを除外することによって、遠景被写体
における比較的大きなエッジと、遠近境界とからなる大
エッジのみを検出することができる。
In step S4, the edge detecting section 153 excludes the relatively fine edges among the edges recognized in step S3 as a portion where the luminance difference of the distant view subject is large, and proceeds to step S5. Here, by excluding relatively fine edges, it is possible to detect only the relatively large edges in the distant view subject and the large edges including the perspective boundary.

【0056】続くステップS5からステップS9におけ
るデータ処理は、評価領域設定部154によって実行さ
れる。以下ステップS5からステップS9について説明
する。
The data processing in subsequent steps S5 to S9 is executed by the evaluation area setting unit 154. Hereinafter, steps S5 to S9 will be described.

【0057】ステップS5では、ステップS4において
検出された大エッジについて、ハフ変換等の手法によっ
て大エッジの線分の方向の変化より縦エッジを見つけ、
ステップS6に進む。
In step S5, for the large edge detected in step S4, a vertical edge is found from the change in the direction of the line segment of the large edge by a method such as Hough transform.
Go to step S6.

【0058】ステップS6では、ステップS5において
縦エッジを検出することができたか否か判断する。ここ
では、縦エッジを検出することができた場合はステップ
S9に進み、縦エッジを検出することができなかった場
合はステップS7に進む。
In step S6, it is determined whether or not the vertical edge could be detected in step S5. Here, if the vertical edge can be detected, the process proceeds to step S9, and if the vertical edge cannot be detected, the process proceeds to step S7.

【0059】ステップS7では、ステップS4において
検出された大エッジについて、ハフ変換等の手法によっ
て大エッジの線分の方向の変化より横エッジを見つけ、
ステップS8に進む。
In step S7, with respect to the large edge detected in step S4, a horizontal edge is found from the change in the direction of the line segment of the large edge by a method such as Hough transform.
Go to step S8.

【0060】ステップS8では、ステップS7において
横エッジを検出することができたか否か判断する。ここ
では、横エッジを検出することができた場合はステップ
S9に進み、横エッジを検出することができなかった場
合はステップS1に戻る。
In step S8, it is determined whether or not the horizontal edge could be detected in step S7. Here, if the horizontal edge can be detected, the process proceeds to step S9, and if the horizontal edge cannot be detected, the process returns to step S1.

【0061】ステップS9では、撮影レンズ11の合焦
状態に関する評価値を求めるための第1および第2の評
価領域F1,F2を設定し、ステップS10に進む。具
体的には、ステップS6からステップS9に進んだ場合
は、図10で示したように、縦エッジAの位置で、大エ
ッジLEの一部を含み、かつ、第2の画像領域P2より
も第1の画像領域P1を多く含む第1の評価領域F1
と、縦エッジAの位置で、大エッジLEの一部を含み、
かつ、第1の画像領域P1よりも第2の画像領域P2を
多く含む第2の評価領域F2とを設定する。また、ステ
ップS8からステップS9に進んだ場合は、図11で示
したように、横エッジCの位置で、大エッジLEの一部
を含み、かつ、第2の画像領域P2よりも第1の画像領
域P1を多く含む第1の評価領域F1と、大エッジLE
の一部を含み、かつ、第1の画像領域P1よりも第2の
画像領域P2を多く含む第2の評価領域F2とを設定す
る。
In step S9, first and second evaluation areas F1 and F2 for obtaining an evaluation value relating to the focus state of the taking lens 11 are set, and the flow advances to step S10. Specifically, when the process proceeds from step S6 to step S9, as shown in FIG. 10, it includes a part of the large edge LE at the position of the vertical edge A, and is larger than the second image region P2. A first evaluation area F1 including a large amount of the first image area P1
And a part of the large edge LE at the position of the vertical edge A,
In addition, the second evaluation area F2 including the second image area P2 more than the first image area P1 is set. Further, when the process proceeds from step S8 to step S9, as shown in FIG. 11, it includes a portion of the large edge LE at the position of the lateral edge C and is located at a position that is larger than that of the second image region P2. The first evaluation area F1 including many image areas P1 and the large edge LE
And a second evaluation area F2 including a part of the first image area P1 and a larger number of the second image area P2 than the first image area P1.

【0062】ステップS10では、第1および第2の評
価領域F1,F2について、評価値算出部155が、撮
影レンズ11の合焦状態に関する評価値を求め、ステッ
プS11に進む。
In step S10, the evaluation value calculation section 155 obtains an evaluation value regarding the in-focus state of the taking lens 11 for the first and second evaluation areas F1 and F2, and proceeds to step S11.

【0063】ステップS11では、境界検出部156
が、ステップS10において求めた評価値より、遠近境
界を検出し、ステップS12に進む。具体的には、図1
2に示したように、第1および第2の評価領域F1,F
2についての評価値が最大値を示すレンズ位置が一定以
上異なる場合に、その第1および第2の評価領域F1,
F2の設定の対象となった大エッジを遠近境界として検
出する。
In step S11, the boundary detection unit 156
However, the perspective boundary is detected from the evaluation value obtained in step S10, and the process proceeds to step S12. Specifically, FIG.
As shown in FIG. 2, the first and second evaluation areas F1 and F1
When the lens position at which the evaluation value for 2 shows the maximum value differs by a certain amount or more, the first and second evaluation areas F1,
The large edge for which F2 is set is detected as the perspective boundary.

【0064】ステップS12では、ステップS11にお
いて遠近境界を検出した結果に基づいて、境界検出部1
56によって遠近境界を検出することができたか否かに
ついて判別する。そして、遠近境界を検出することがで
きたときはステップS20に進み、遠近境界を検出する
ことができなかったときはステップS13に進む。
In step S12, based on the result of detecting the perspective boundary in step S11, the boundary detection unit 1
It is determined by 56 whether or not the near-far boundary can be detected. When the perspective boundary can be detected, the process proceeds to step S20, and when the perspective boundary cannot be detected, the process proceeds to step S13.

【0065】ステップS13では、検出領域設定部15
2によって、画像メモリ70に格納される画像に対する
境界検出領域が切り替えられ、ステップS14に進む。
具体的には、図5に示した境界検出領域EA1から図6
に示す境界検出領域EA2に切り替えられる。
In step S13, the detection area setting unit 15
2, the boundary detection area for the image stored in the image memory 70 is switched, and the process proceeds to step S14.
Specifically, from the boundary detection area EA1 shown in FIG.
The boundary detection area EA2 shown in FIG.

【0066】ステップS14では、ステップS3と同様
に、エッジ検出部153によって、境界検出領域EA2
内のエッジを認識し、ステップS15に進む。
In step S14, as in step S3, the edge detection unit 153 causes the boundary detection area EA2 to be detected.
The inner edge is recognized, and the process proceeds to step S15.

【0067】ステップS15では、ステップS4と同様
に、ステップS14において認識されたエッジのうち、
比較的細かいエッジは遠景被写体の輝度差が激しい部分
として除外し、ステップS15に進む。ここでは、比較
的細かいエッジを除外することによって、遠景被写体に
おける比較的大きなエッジと、遠近境界とからなる大エ
ッジを検出することができる。
In step S15, as in step S4, among the edges recognized in step S14,
The relatively fine edge is excluded as a portion having a large brightness difference in the distant view subject, and the process proceeds to step S15. Here, by excluding relatively fine edges, it is possible to detect a large edge including a relatively large edge in the distant view subject and a perspective boundary.

【0068】ステップS16では、評価領域設定部15
4によって、撮影レンズ11の合焦状態に関する評価値
を求めるための第1の評価領域F1および第2の評価領
域F2を設定し、ステップS17に進む。具体的には、
図11で示したように、ステップS15において検出さ
れた大エッジLEについて、ハフ変換等の手法によって
求まる大エッジLEの線分の方向の変化より横エッジを
見つけ、横エッジの位置において大エッジLEの一部を
含み、かつ、第2の画像領域P2よりも第1の画像領域
P1を多く含む第1の評価領域F1と、大エッジLEの
一部を含み、かつ、第1の画像領域P1よりも第2の画
像領域P2を多く含む第2の評価領域F2とを設定す
る。
In step S16, the evaluation area setting unit 15
The first evaluation area F1 and the second evaluation area F2 for obtaining the evaluation value regarding the focus state of the taking lens 11 are set by 4, and the process proceeds to step S17. In particular,
As shown in FIG. 11, with respect to the large edge LE detected in step S15, a horizontal edge is found from the change in the direction of the line segment of the large edge LE found by a method such as Hough transform, and the large edge LE is located at the position of the horizontal edge. Of the first image area P1 including a part of the first image area P1 and a larger number of the first image area P1 than the second image area P2, and a part of the large edge LE, and the first image area P1. A second evaluation area F2 including a larger number of second image areas P2 than that is set.

【0069】ステップS17では、第1および第2の評
価領域F1,F2について、評価値算出部155が、撮
影レンズ11の合焦状態に関する評価値を求め、ステッ
プS18に進む。
In step S17, the evaluation value calculation section 155 obtains an evaluation value relating to the in-focus state of the taking lens 11 for the first and second evaluation areas F1 and F2, and proceeds to step S18.

【0070】ステップS18では、ステップS11と同
様に、境界検出部156が、ステップS17において求
めた評価値に基づいて、遠近境界を検出し、ステップS
19に進む。
In step S18, as in step S11, the boundary detecting section 156 detects the perspective boundary based on the evaluation value obtained in step S17, and then in step S18.
Proceed to 19.

【0071】ステップS19では、ステップS18にお
いて遠近境界を検出した結果に基づいて、境界検出部1
56によって遠近境界を検出することができたか否かに
ついて判別する。そして、遠近境界を検出することがで
きたときはステップS20に進み、遠近境界を検出する
ことができなかったときはステップS1に戻る。
In step S19, based on the result of detecting the perspective boundary in step S18, the boundary detection unit 1
It is determined by 56 whether or not the near-far boundary can be detected. Then, when the perspective boundary can be detected, the process proceeds to step S20, and when the perspective boundary cannot be detected, the process returns to step S1.

【0072】ステップS20では、撮影前にユーザーに
よって設定された撮影モードにしたがって、合焦領域選
択部により、遠近境界に対して設定された第1の評価領
域F1または第2の評価領域F2のうちから一方の評価
領域を撮影レンズ11を合焦状態とするための合焦領域
として選択する。ここでは、近景モードが選択されてい
る場合は、近景評価領域を合焦領域として選択して、ス
テップS21に進み、近景モードが選択されていない場
合、つまり、遠景モードが選択されている場合は、遠景
評価領域を合焦領域として選択して、ステップS22に
進む。
In step S20, of the first evaluation area F1 and the second evaluation area F2 set for the perspective boundary by the focus area selection unit according to the shooting mode set by the user before shooting. One of the evaluation areas is selected as the focus area for bringing the taking lens 11 into the focus state. Here, when the near view mode is selected, the near view evaluation area is selected as the focus area, and the process proceeds to step S21. When the near view mode is not selected, that is, when the distant view mode is selected, , The distant view evaluation area is selected as the focus area, and the process proceeds to step S22.

【0073】ステップS21では、ステップS12から
ステップS20に進んだ場合は、ステップS10におい
て評価値算出部155が近景評価領域について算出した
評価値をもとに撮影レンズ11を合焦状態とするレンズ
位置を算出し、また、ステップS19からステップS2
0に進んだ場合は、ステップS17において評価値算出
部155が近景評価領域について算出した評価値をもと
に撮影レンズ11を合焦状態とするレンズ位置を算出
し、ステップS23に進む。
In step S21, if the process proceeds from step S12 to step S20, the lens position for bringing the photographing lens 11 into the in-focus state based on the evaluation value calculated by the evaluation value calculation section 155 for the near view evaluation area in step S10. From step S19 to step S2
When the process proceeds to 0, the evaluation value calculation unit 155 calculates the lens position that brings the taking lens 11 into the in-focus state based on the evaluation value calculated for the near view evaluation region in step S17, and the process proceeds to step S23.

【0074】ステップS22では、ステップS12から
ステップS20に進んだ場合は、ステップS10におい
て評価値算出部155が遠景評価領域について算出した
評価値をもとに撮影レンズ11を合焦状態とするレンズ
位置を算出し、また、ステップS19からステップS2
0に進んだ場合は、ステップS17において評価値算出
部155が遠景評価領域について算出した評価値をもと
に撮影レンズ11を合焦状態とするレンズ位置を算出
し、ステップS23に進む。
In step S22, if the process proceeds from step S12 to step S20, the lens position for bringing the photographing lens 11 into the in-focus state based on the evaluation value calculated by the evaluation value calculation unit 155 for the distant view evaluation area in step S10. From step S19 to step S2
When the process proceeds to 0, the evaluation value calculation unit 155 calculates the lens position that brings the taking lens 11 into the in-focus state based on the evaluation value calculated for the distant view evaluation region in step S17, and the process proceeds to step S23.

【0075】ステップS23では、ステップS21また
はステップS22において算出された撮影レンズ11の
レンズ位置に基づいて、被写体に対して撮影レンズ11
を合焦状態とするように撮影レンズ11を駆動制御部1
58の制御の下で駆動させ、ステップS24に進む。
In step S23, based on the lens position of the taking lens 11 calculated in step S21 or step S22, the taking lens 11 with respect to the subject is taken.
The drive control unit 1 drives the taking lens 11 so that
It is driven under the control of 58 and the process proceeds to step S24.

【0076】ステップS24では、シャッターボタン8
が押下されることによって、全押し状態(S2)とされ
て本撮影の実施の指示があったか否かをカメラ制御部1
00が判断する。ここでは、本撮影の実施の指示があっ
た場合は、ステップS25に進み、本撮影の実施の指示
がない場合は、ステップS24の判断を繰り返す。な
お、ここでは、図示を省略しているが、本撮影の実施の
指示が一定時間ない場合は、ステップS1に戻る。
In step S24, the shutter button 8
When is pressed, the camera control unit 1 determines whether or not the full-pressed state (S2) is given and an instruction to perform the main photographing is given.
00 judges. Here, if there is an instruction to perform the main photographing, the process proceeds to step S25, and if there is no instruction to perform the main photographing, the determination in step S24 is repeated. Although illustration is omitted here, if there is no instruction to carry out the main photographing for a certain period of time, the process returns to step S1.

【0077】ステップS25では、本撮影が実施され
て、画像処理部50から画像信号が画像圧縮部80に送
信され、画像圧縮部80において、本撮影によって得ら
れる画像に対して所定の圧縮方法による画像圧縮処理を
施し、画像圧縮の施された画像信号が画像圧縮部80か
ら出力され、メモリカード9に記憶される。その後、ス
テップS1に戻る。
In step S25, the main photographing is performed, the image signal is transmitted from the image processing section 50 to the image compressing section 80, and the image compressing section 80 applies a predetermined compression method to the image obtained by the main photographing. Image compression processing is performed, and the image signal subjected to the image compression is output from the image compression unit 80 and stored in the memory card 9. Then, it returns to step S1.

【0078】以上、画像に設定される所定の境界検出領
域から遠近境界を含むエッジを検出し、そのエッジの一
部を含み、かつ、当該エッジの両側である第1と第2の
画像領域について、第2の画像領域よりも第1の画像領
域を多く含む第1の評価領域と、第1の画像領域よりも
第2の画像領域を多く含む第2の評価領域とについて撮
影レンズの合焦状態に関する評価値を算出し、算出され
た評価値に基づいて撮影レンズの合焦位置を求め、合焦
位置に撮影レンズを駆動することによって、近景被写体
のコントラストが低い場合であっても、近景被写体にも
遠景被写体にも合焦させることができる。
As described above, the edge including the perspective boundary is detected from the predetermined boundary detection area set in the image, and the first and second image areas including a part of the edge and on both sides of the edge are detected. , The focusing of the photographing lens for the first evaluation area including the first image area more than the second image area and the second evaluation area including the second image area more than the first image area By calculating an evaluation value for the state, obtaining the in-focus position of the taking lens based on the calculated evaluation value, and driving the taking lens to the in-focus position, even if the contrast of the near-field subject is low, It can focus on both subjects and distant subjects.

【0079】<変形例>以上、この発明の実施形態につ
いて説明したが、この発明は上記説明した内容のものに
限定されるものではない。
<Modification> The embodiment of the present invention has been described above, but the present invention is not limited to the above description.

【0080】例えば、上述したオートフォーカス制御に
ついては、上述した光学系制御部150の機能は、CP
Uが所定のソフトウェアを実行することによって実現す
ることも可能であるため、必ずしも光学系制御部150
における各部が区別されて構成される必要はない。
For example, regarding the above-described autofocus control, the function of the optical system control unit 150 described above is
Since it can be realized by U executing predetermined software, the optical system control unit 150 is not always necessary.
It is not necessary that the respective parts in are configured separately.

【0081】また、上述した実施形態においては、境界
検出領域は、図5に示すように、オートフォーカス動作
の開始時には、画像メモリ70に格納される画像G10
に対してあらかじめ設定されている所定の境界検出領域
EA1であったが、これに限られるものではなく、撮影
前にユーザーによる操作ボタン17および4連スイッチ
25の操作等によって境界検出領域の位置や大きさ等を
種々変更できるようなものであっても良い。
Further, in the above-described embodiment, the boundary detection area is, as shown in FIG. 5, the image G10 stored in the image memory 70 at the start of the autofocus operation.
However, the present invention is not limited to this, and the position of the boundary detection area EA1 is not limited to this, and the position of the boundary detection area may be changed by the user operating the operation button 17 and the quad switch 25 before photographing. The size may be variously changed.

【0082】また、上述した実施形態においては、境界
検出領域は、水平方向または垂直方向に一定の幅を持つ
3つの領域から構成されていたが、これに限られるもの
ではなく、境界検出領域が、水平方向または垂直方向に
一定の幅を持つ1つの領域、または2つの領域、若しく
は4つ以上の領域から構成されるものであっても良い。
Further, in the above-described embodiment, the boundary detection area is composed of three areas having a constant width in the horizontal direction or the vertical direction, but the invention is not limited to this, and the boundary detection area is not limited to this. , One region having a constant width in the horizontal direction or the vertical direction, or two regions or four or more regions may be configured.

【0083】また、上述した実施形態においては、境界
検出領域は、図5および図6に示すように、画像メモリ
70に格納される画像G10の全体の領域に対して一部
の領域であったが、これに限られるものではなく、境界
検出領域が、画像メモリ70に格納される画像G10の
全体の領域であるようなものであっても良い。
In the above-described embodiment, the boundary detection area is a partial area of the entire area of the image G10 stored in the image memory 70, as shown in FIGS. However, the invention is not limited to this, and the boundary detection area may be the entire area of the image G10 stored in the image memory 70.

【0084】また、上述した実施形態においては、境界
検出部156によって、遠近境界を選択的に検出した後
に、近景評価領域または遠景評価領域のうち一方を合焦
領域として設定したが、これに限られるものではなく、
近景モードの場合は、評価値が最大値となるレンズ位置
をすべての大エッジに対して設定された評価領域につい
て算出し、このうち最も近景の被写体に合焦するレンズ
位置を自動選択しても良い。また、遠景モードの場合
は、評価値が最大値となるレンズ位置をすべての大エッ
ジに対して設定された評価領域について算出し、このう
ち最も遠景の被写体に合焦するレンズ位置を自動選択し
ても良い。
Further, in the above-described embodiment, the boundary detection unit 156 selectively detects the perspective boundary and then sets one of the near view evaluation area and the distant view evaluation area as the focus area. However, the present invention is not limited to this. Not
In the near view mode, the lens position with the maximum evaluation value is calculated for the evaluation areas set for all large edges, and even if the lens position that focuses on the closest object is automatically selected, good. In the distant view mode, the lens position with the maximum evaluation value is calculated for the evaluation areas set for all large edges, and the lens position that focuses on the farthest object is automatically selected. May be.

【0085】また、上述した実施形態においては、近景
モードまたは遠景モードを選択することができるが、こ
れに限られるものではなく、近景モードのみとして、合
焦領域選択部が、近景評価領域または遠景評価領域のう
ち近景評価領域を合焦領域として自動的に選択するよう
なものであっても良い。なお、上述した具体的実施形態
には以下の構成を有する発明が含まれている。
Further, in the above-described embodiment, the near view mode or the distant view mode can be selected, but the present invention is not limited to this, and only the near view mode can be selected by the focusing area selection unit in the near view evaluation area or the distant view mode. A foreground evaluation area of the evaluation areas may be automatically selected as the focus area. The specific embodiments described above include inventions having the following configurations.

【0086】(1) 請求項4に記載の光学系制御装置で
あって、前記水平方向に一定幅の境界検出領域において
前記遠近境界を検出することができないときに、前記検
出領域設定手段が、前記境界検出領域を垂直方向に一定
幅の領域に切り替える領域切替手段を含むことを特徴と
する光学系制御装置。
(1) In the optical system controller according to claim 4, the detection area setting means, when the perspective boundary cannot be detected in the boundary detection area having a constant width in the horizontal direction, An optical system control device comprising area switching means for vertically switching the boundary detection area to an area having a constant width.

【0087】この構成によって、画像中の遠近境界の線
分の方向が水平方向である場合等、水平方向に一定幅の
境界検出領域においては遠近境界を検出することができ
ないときに、境界検出領域を垂直方向に一定幅の領域に
切り替えることによって、線分の方向があらゆる方向を
向いた場合も遠近境界を検出する確率を向上させること
ができる。
With this configuration, when the perspective boundary cannot be detected in the boundary detection area having a constant width in the horizontal direction, such as when the line segment of the perspective boundary in the image is the horizontal direction, the boundary detection area is detected. By switching to a region with a constant width in the vertical direction, it is possible to improve the probability of detecting the perspective boundary even when the direction of the line segment is in any direction.

【0088】(2) 請求項1から請求項5、または(1)の
いずれかに記載の光学系制御装置であって、前記制御手
段が、自動的に、前記第1と第2の評価領域のうち近景
被写体を多く含む評価領域についての評価値に基づいて
前記撮影レンズの合焦位置を求め、前記合焦位置への前
記撮影レンズの駆動を制御することを特徴とする光学系
制御装置。
(2) The optical system control device according to any one of claims 1 to 5 or (1), wherein the control means automatically performs the first and second evaluation areas. An optical system control device, wherein a focusing position of the photographing lens is obtained based on an evaluation value of an evaluation region including a large number of near-view subjects, and driving of the photographing lens to the focusing position is controlled.

【0089】この構成によって、自動的に近景被写体に
対して合焦動作を行うため、ユーザーは、コントラスト
の低い近景被写体に対して容易に合焦させることができ
る。
With this configuration, since the focusing operation is automatically performed on the near-view subject, the user can easily focus on the near-view subject having a low contrast.

【0090】[0090]

【発明の効果】以上説明したように、請求項1の発明に
おいては、画像に設定される所定の境界検出領域から遠
近境界を含むエッジを検出し、そのエッジの一部を含
み、かつ、当該エッジの両側である第1と第2の画像領
域について、第2の画像領域よりも第1の画像領域を多
く含む第1の評価領域と、第1の画像領域よりも第2の
画像領域を多く含む第2の評価領域とについて撮影レン
ズの合焦状態に関する評価値を算出し、算出された評価
値に基づいて撮影レンズの合焦位置を求め、合焦位置に
撮影レンズを駆動することによって、近景被写体のコン
トラストが低い場合であっても、近景被写体にも遠景被
写体にも合焦させることができる。
As described above, according to the invention of claim 1, an edge including a perspective boundary is detected from a predetermined boundary detection area set in an image, and a part of the edge is included, and Regarding the first and second image areas on both sides of the edge, a first evaluation area including a larger number of the first image area than the second image area and a second image area than the first image area are provided. By calculating an evaluation value relating to the in-focus state of the taking lens with respect to the second evaluation area including a large amount, obtaining the in-focus position of the taking lens based on the calculated evaluation value, and driving the taking lens to the in-focus position Even if the contrast of the near view subject is low, it is possible to focus on the near view subject and the distant view subject.

【0091】また、請求項2の発明においては、画像中
の隣接画素間の輝度差が所定値以上である位置をエッジ
として認識することによって、遠近境界を含むエッジを
検出することができる。
According to the second aspect of the invention, the edge including the perspective boundary can be detected by recognizing the position where the brightness difference between the adjacent pixels in the image is a predetermined value or more as the edge.

【0092】また、請求項3の発明においては、画像全
体においてエッジを検出することによって、画像中にお
ける近景被写体の位置に拘わらず、遠近境界を含むエッ
ジを検出することができる。
According to the third aspect of the present invention, by detecting the edge in the entire image, it is possible to detect the edge including the perspective boundary regardless of the position of the near view subject in the image.

【0093】また、請求項4の発明においては、水平方
向に一定幅の境界検出領域においてエッジを検出するこ
とによって、画像の全体においてエッジを検出する場合
よりも少ない領域においてエッジの検出を行うため、遠
近境界を含むエッジを検出する処理速度の向上を図るこ
とができる。
Further, according to the invention of claim 4, by detecting the edge in the boundary detection area having a constant width in the horizontal direction, the edge is detected in a smaller area than in the case where the edge is detected in the entire image. It is possible to improve the processing speed for detecting an edge including a perspective boundary.

【0094】また、請求項5の発明においては、第1と
第2の評価領域について、それぞれエッジによって区切
られる一方の領域の面積を他方の領域の面積の2倍以上
とすることによって、近景被写体のコントラストが低い
場合であっても、近景被写体にも遠景被写体にも精度良
く合焦することができる。
Further, in the fifth aspect of the present invention, in the first and second evaluation areas, the area of one of the areas divided by the edge is set to be twice or more the area of the other area, so that the near-view subject is photographed. Even when the contrast is low, it is possible to accurately focus on a near-field subject and a distant-view subject.

【図面の簡単な説明】[Brief description of drawings]

【図1】本発明の一実施形態であるデジタルカメラを示
す斜視図である。
FIG. 1 is a perspective view showing a digital camera according to an embodiment of the present invention.

【図2】図1に示すデジタルカメラの背面図である。FIG. 2 is a rear view of the digital camera shown in FIG.

【図3】デジタルカメラの内部構成を示すブロック図で
ある。
FIG. 3 is a block diagram showing an internal configuration of a digital camera.

【図4】光学系制御部の内部構成を示すブロック図であ
る。
FIG. 4 is a block diagram showing an internal configuration of an optical system controller.

【図5】画像に対して設定される境界検出領域の一例を
示す図である。
FIG. 5 is a diagram showing an example of a boundary detection area set for an image.

【図6】切り替えられた後の境界検出領域を示す図であ
る。
FIG. 6 is a diagram showing a boundary detection area after switching.

【図7】画像に対して境界検出領域が設定される一例を
示す模式図である。
FIG. 7 is a schematic diagram showing an example in which a boundary detection area is set for an image.

【図8】画像に対して境界検出領域が設定される一例を
示す模式図である。
FIG. 8 is a schematic diagram showing an example in which a boundary detection area is set for an image.

【図9】画像に対して切り替え後の境界検出領域が設定
される一例を示す模式図である。
FIG. 9 is a schematic diagram showing an example in which a boundary detection area after switching is set for an image.

【図10】画像に対する評価領域の設定について説明す
る模式図である。
FIG. 10 is a schematic diagram illustrating setting of an evaluation area for an image.

【図11】画像に対する評価領域の設定について説明す
る模式図である。
FIG. 11 is a schematic diagram illustrating setting of an evaluation area for an image.

【図12】評価値と撮影レンズのレンズ位置との関係の
一例を示す模式図である。
FIG. 12 is a schematic diagram showing an example of a relationship between an evaluation value and a lens position of a photographing lens.

【図13】評価値と撮影レンズのレンズ位置との関係の
一例を示す模式図である。
FIG. 13 is a schematic diagram showing an example of the relationship between the evaluation value and the lens position of the taking lens.

【図14】合焦動作を示すフローチャートである。FIG. 14 is a flowchart showing a focusing operation.

【図15】合焦動作を示すフローチャートである。FIG. 15 is a flowchart showing a focusing operation.

【図16】合焦動作を示すフローチャートである。FIG. 16 is a flowchart showing a focusing operation.

【図17】評価値と撮影レンズのレンズ位置との関係の
一例を示す模式図である。
FIG. 17 is a schematic diagram showing an example of the relationship between the evaluation value and the lens position of the taking lens.

【図18】近景被写体と遠景被写体とが混在している画
像についての評価値と撮影レンズのレンズ位置との関係
の一例を示す模式図である。
FIG. 18 is a schematic diagram illustrating an example of the relationship between the evaluation value and the lens position of the photographing lens for an image in which a near-field subject and a distant-view subject are mixed.

【図19】近景被写体のコントラストが低く、遠景被写
体のコントラストが高い画像に対して評価領域が設定さ
れる一例を示す模式図である。
FIG. 19 is a schematic diagram showing an example in which an evaluation area is set for an image in which a near-field subject has low contrast and a distant-view subject has high contrast.

【図20】近景被写体のコントラストが低く、遠景被写
体のコントラストが高い画像についての評価値と撮影レ
ンズのレンズ位置との関係の一例を示す模式図である。
FIG. 20 is a schematic diagram showing an example of the relationship between the evaluation value and the lens position of the photographing lens for an image in which the contrast of the near-field subject is low and the contrast of the distant-view subject is high.

【符号の説明】[Explanation of symbols]

1 デジタルカメラ 8 シャッターボタン 11 撮影レンズ 70 画像メモリ 100 カメラ制御部 110 レンズ駆動部 150 光学系制御部 152 検出領域設定部 153 エッジ検出部 154 評価領域設定部 155 評価値算出部 158 駆動制御部 A,B 縦エッジ C,D 横エッジ LE 大エッジ EA1,EA2 境界検出領域 F1 第1の評価領域 F2 第2の評価領域 P1 第1の画像領域 P2 第2の画像領域 1 digital camera 8 shutter button 11 Shooting lens 70 image memory 100 camera controller 110 lens drive 150 Optical system controller 152 detection area setting unit 153 Edge detector 154 Evaluation area setting section 155 Evaluation value calculation unit 158 Drive control unit A, B vertical edge C, D horizontal edge LE large edge EA1, EA2 boundary detection area F1 First evaluation area F2 Second evaluation area P1 First image area P2 Second image area

───────────────────────────────────────────────────── フロントページの続き (72)発明者 玉井 啓二 大阪府大阪市中央区安土町二丁目3番13号 大阪国際ビル ミノルタ株式会社内 (72)発明者 中西 基浩 大阪府大阪市中央区安土町二丁目3番13号 大阪国際ビル ミノルタ株式会社内 Fターム(参考) 2H011 AA03 BA31 BB02 BB04 2H051 AA00 BA47 CE14 CE16 DA19 DA23 DA26 DB01 DD10 DD17 5C022 AA13 AB29 AB30 AB66 AC02 AC03 AC32 AC42 AC74    ─────────────────────────────────────────────────── ─── Continued front page    (72) Inventor Keiji Tamai             2-3-3 Azuchi-cho, Chuo-ku, Osaka-shi, Osaka Prefecture               Osaka International Building Minolta Co., Ltd. (72) Inventor Motohiro Nakanishi             2-3-3 Azuchi-cho, Chuo-ku, Osaka-shi, Osaka Prefecture               Osaka International Building Minolta Co., Ltd. F term (reference) 2H011 AA03 BA31 BB02 BB04                 2H051 AA00 BA47 CE14 CE16 DA19                       DA23 DA26 DB01 DD10 DD17                 5C022 AA13 AB29 AB30 AB66 AC02                       AC03 AC32 AC42 AC74

Claims (5)

【特許請求の範囲】[Claims] 【請求項1】 複数の画素で構成される画像を入力し
て、撮影レンズの合焦制御を行う光学系制御装置であっ
て、 前記画像に所定の境界検出領域を設定する検出領域設定
手段と、 前記境界検出領域から近景被写体と遠景被写体との境界
を含むエッジを検出するエッジ検出手段と、 前記エッジの一部を含み、かつ、当該エッジの両側の領
域である第1と第2の画像領域について、前記第2の画
像領域よりも前記第1の画像領域を多く含む第1の評価
領域と、前記第1の画像領域よりも前記第2の画像領域
を多く含む第2の評価領域とを設定する評価領域設定手
段と、 前記第1と第2の評価領域について前記撮影レンズの合
焦状態に関する評価値を算出する評価値算出手段と、 前記評価値算出手段によって算出された評価値に基づい
て前記撮影レンズの合焦位置を求め、前記合焦位置への
前記撮影レンズの駆動を制御する制御手段と、を備える
ことを特徴とする光学系制御装置。
1. An optical system control device for inputting an image composed of a plurality of pixels to control focusing of a photographing lens, comprising: detection area setting means for setting a predetermined boundary detection area in the image. Edge detection means for detecting an edge including a boundary between a near view object and a distant view object from the boundary detection area, and first and second images including a part of the edge and being areas on both sides of the edge Regarding a region, a first evaluation region including more of the first image region than the second image region, and a second evaluation region including more of the second image region than the first image region. An evaluation area setting means for setting the evaluation value, an evaluation value calculation means for calculating an evaluation value relating to a focus state of the photographing lens for the first and second evaluation areas, and an evaluation value calculated by the evaluation value calculation means. Based on the shooting Determined focus position of the lens, the optical system control apparatus characterized by comprising a control means for controlling driving of the photographic lens to the focus position.
【請求項2】 請求項1に記載の光学系制御装置であっ
て、 前記エッジ検出手段は、隣接画素間の輝度差が所定値以
上である場合に、エッジとして認識するエッジ認識手段
を含むことを特徴とする光学系制御装置。
2. The optical system control device according to claim 1, wherein the edge detecting means includes edge recognizing means for recognizing an edge when a difference in brightness between adjacent pixels is a predetermined value or more. An optical system controller characterized by.
【請求項3】 請求項1または請求項2のいずれかに記
載の光学系制御装置であって、前記検出領域設定手段
が、前記画像の全体を境界検出領域として設定すること
を特徴とする光学系制御装置。
3. The optical system control device according to claim 1, wherein the detection area setting means sets the entire image as a boundary detection area. System controller.
【請求項4】 請求項1または請求項2のいずれかに記
載の光学系制御装置であって、前記検出領域設定手段
が、前記画像に対して水平方向に一定幅の境界検出領域
を設定することを特徴とする光学系制御装置。
4. The optical system control device according to claim 1, wherein the detection area setting means sets a boundary detection area having a constant width in the horizontal direction with respect to the image. An optical system control device characterized by the above.
【請求項5】 請求項1から請求項4のいずれかに記載
の光学系制御装置であって、 前記第1と第2の評価領域は、 それぞれ前記エッジによって区切られる一方の領域の面
積が他方の領域の面積の2倍以上であることを特徴とす
る光学系制御装置。
5. The optical system control device according to claim 1, wherein the first and second evaluation regions have an area of one region divided by the edge, respectively. The optical system control device is characterized in that it is at least twice as large as the area of the region.
JP2001384195A 2001-12-18 2001-12-18 Optical system controller Expired - Fee Related JP3628648B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2001384195A JP3628648B2 (en) 2001-12-18 2001-12-18 Optical system controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2001384195A JP3628648B2 (en) 2001-12-18 2001-12-18 Optical system controller

Publications (2)

Publication Number Publication Date
JP2003185911A true JP2003185911A (en) 2003-07-03
JP3628648B2 JP3628648B2 (en) 2005-03-16

Family

ID=27593982

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2001384195A Expired - Fee Related JP3628648B2 (en) 2001-12-18 2001-12-18 Optical system controller

Country Status (1)

Country Link
JP (1) JP3628648B2 (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2005033763A1 (en) * 2003-09-10 2005-04-14 Sharp Kabushiki Kaisha Imaging lens position control device
WO2007058099A1 (en) * 2005-11-15 2007-05-24 Olympus Corporation Imaging device
CN100414339C (en) * 2003-09-10 2008-08-27 夏普株式会社 Imaging lens position control device
JP2012133049A (en) * 2010-12-20 2012-07-12 Samsung Electronics Co Ltd Imaging apparatus
JP2016177293A (en) * 2010-05-26 2016-10-06 ナム タイ,ヒョク Autofocus imaging system

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2005033763A1 (en) * 2003-09-10 2005-04-14 Sharp Kabushiki Kaisha Imaging lens position control device
CN100414339C (en) * 2003-09-10 2008-08-27 夏普株式会社 Imaging lens position control device
WO2007058099A1 (en) * 2005-11-15 2007-05-24 Olympus Corporation Imaging device
JP2007139894A (en) * 2005-11-15 2007-06-07 Olympus Corp Imaging apparatus
JP2016177293A (en) * 2010-05-26 2016-10-06 ナム タイ,ヒョク Autofocus imaging system
JP2012133049A (en) * 2010-12-20 2012-07-12 Samsung Electronics Co Ltd Imaging apparatus
KR101799600B1 (en) * 2010-12-20 2017-11-20 삼성전자주식회사 Imaging device and method for taking image

Also Published As

Publication number Publication date
JP3628648B2 (en) 2005-03-16

Similar Documents

Publication Publication Date Title
JP4674471B2 (en) Digital camera
JP3541820B2 (en) Imaging device and imaging method
JP4518131B2 (en) Imaging method and apparatus
US7564486B2 (en) Image sensing apparatus with feature extraction mechanism and its control method
JP4980982B2 (en) Imaging apparatus, imaging method, focus control method, and program
US7893969B2 (en) System for and method of controlling a parameter used for detecting an objective body in an image and computer program
JP5961929B2 (en) camera
US20060002698A1 (en) Image-taking apparatus and focusing method
US20090244354A1 (en) Imaging apparatus and method for controlling the imaging apparatus
JP2003241072A (en) Camera
JP4645413B2 (en) Imaging device
US20030169363A1 (en) Image pickup apparatus and method, and image-pickup control computer program
JP2008085737A (en) Electronic camera
JP7154758B2 (en) Image processing device and its control method
JP4801960B2 (en) Autofocus control device, image forming apparatus using the autofocus control device, and autofocus control method
KR100965320B1 (en) Automatic controlling device of a continuous auto focus and Automatic controlling method of the same
JP5027580B2 (en) Imaging apparatus, method, and program
JP2021021857A (en) Imaging apparatus and control method thereof
JP2007133301A (en) Autofocus camera
JP2007225897A (en) Focusing position determination device and method
JP6590894B2 (en) Image processing apparatus, imaging apparatus, image processing method, and program
JP3628648B2 (en) Optical system controller
JP2013205675A (en) Imaging apparatus
JP2003156679A (en) Focus detector
JP2009260565A (en) Imaging apparatus and control method thereof, and program

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20040308

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20040316

A711 Notification of change in applicant

Free format text: JAPANESE INTERMEDIATE CODE: A712

Effective date: 20040423

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20040510

RD03 Notification of appointment of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7423

Effective date: 20040510

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20040810

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: 20041207

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20041208

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20071217

Year of fee payment: 3

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20081217

Year of fee payment: 4

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20081217

Year of fee payment: 4

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20091217

Year of fee payment: 5

LAPS Cancellation because of no payment of annual fees