JPH11313240A - Image processing method for digital camera - Google Patents

Image processing method for digital camera

Info

Publication number
JPH11313240A
JPH11313240A JP10116818A JP11681898A JPH11313240A JP H11313240 A JPH11313240 A JP H11313240A JP 10116818 A JP10116818 A JP 10116818A JP 11681898 A JP11681898 A JP 11681898A JP H11313240 A JPH11313240 A JP H11313240A
Authority
JP
Japan
Prior art keywords
image data
image
contrast
digital camera
lens
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
JP10116818A
Other languages
Japanese (ja)
Inventor
Toshihiro Hamamura
俊宏 濱村
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 JP10116818A priority Critical patent/JPH11313240A/en
Publication of JPH11313240A publication Critical patent/JPH11313240A/en
Pending legal-status Critical Current

Links

Landscapes

  • Studio Devices (AREA)
  • Cameras In General (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide the image processing method for a digital camera that realizes panning focus photographing without a limit of a focal distance of a lens used for photographing. SOLUTION: Newest image data photographed at a focal position are divided into blocks and a contrast of each block is calculated (step ST284). Then the calculated contrast is compared with a contrast of a block corresponding to image data with highest contrast (step ST285). When the calculated contrast is higher, the image data with the highest contrast of the corresponding block are updated. The processing is applied to image data obtained for all focal positions to obtain image data with panning focus.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明はデジタルカメラの画
像処理方法に関し、特に遠距離から近距離までピントの
合った画像データを得るための画像処理方法に関する。
The present invention relates to an image processing method for a digital camera, and more particularly to an image processing method for obtaining focused image data from a long distance to a short distance.

【0002】[0002]

【従来の技術】遠距離から近距離までピントの合った写
真(パンフォーカス写真)を撮りたい場合、銀塩カメラ
(フィルム感光カメラ)ではレンズの絞り値を調整して
被写界深度を深くする手法が採られている。具体的には
被写界深度が深い広角レンズ(例えば焦点距離fが20
mm程度)を用い、レンズの絞り値Fを例えば16程度
まで絞り込むことで実現している。例えば、フィルムサ
イズが35mmの銀塩カメラ(以後、35mmカメラと
呼称)では、焦点距離20mmのレンズを使用し、F=
16とした場合は、フォーカス調整をせずとも無限遠か
ら37.5cmまではピントをほぼ合わせることができ
る。
2. Description of the Related Art When it is desired to take a focused photograph (pan-focus photograph) from a long distance to a short distance, a silver halide camera (film exposure camera) adjusts the aperture value of a lens to increase the depth of field. A technique has been adopted. Specifically, a wide-angle lens having a large depth of field (for example, a focal length f of 20
mm), and the aperture value F of the lens is reduced to, for example, about 16. For example, a silver halide camera having a film size of 35 mm (hereinafter referred to as a 35 mm camera) uses a lens having a focal length of 20 mm, and F =
In the case of 16, the focus can be almost adjusted from infinity to 37.5 cm without adjusting the focus.

【0003】[0003]

【発明が解決しようとする課題】しかし、望遠レンズで
は被写界深度が浅いので、フォーカス調整をせずに遠距
離から近距離までの被写体にピントを合わせることはで
きない。例えば、35mmカメラでは、焦点距離300
mmのレンズを使用し、F=32(絞りの限界値)とし
ても、フォーカス調整をしない場合は無限遠から42m
までしかピントを合わせることができない。
However, since the depth of field of a telephoto lens is small, it is impossible to focus on a subject from a long distance to a short distance without adjusting the focus. For example, a 35 mm camera has a focal length of 300
Even if a lens of mm is used and F = 32 (limit value of the aperture), if focus adjustment is not performed, 42 m from infinity
You can only focus up to that point.

【0004】このように、レンズの絞りを絞って被写界
深度を深くして撮影する手法では、レンズの焦点距離に
よってはパンフォーカス写真の撮影ができないという問
題があり、これはデジタルカメラにおいても同様であっ
た。
[0004] As described above, the technique of taking a picture by increasing the depth of field by narrowing the aperture of the lens has a problem that a pan-focus photograph cannot be taken depending on the focal length of the lens. It was similar.

【0005】本発明は上記のような問題点を解消するた
めになされたもので、撮影するレンズの焦点距離の制限
なしにパンフォーカス撮影を実現するデジタルカメラの
画像処理方法を提供することを目的とする。
SUMMARY OF THE INVENTION The present invention has been made to solve the above problems, and has as its object to provide an image processing method for a digital camera that realizes pan-focus photographing without limiting the focal length of a lens to be photographed. And

【0006】[0006]

【課題を解決するための手段】本発明に係る請求項1記
載の画像処理方法は、撮影レンズ駆動手段を備え、自動
的に焦点位置の変更が可能な撮影レンズによって、被写
体像を撮像素子上に結像し、被写体像を画像データに変
換し、画像メモリ上に一時記録し、画像処理を行うデジ
タルカメラにおいて、露光開始用スイッチが操作された
場合の画像処理方法であって、レンズの焦点を1の焦点
位置において撮影を行って最新画像データを得るステッ
プ(a)と、前記最新画像データおよび、それ以前に取得
した画像データに基づいて得られた比較対象画像データ
のそれぞれについて、合焦の指標値を算出するステップ
(b)と、算出された前記指標値を比較し、前記最新画像
データのうち、前記比較対象画像データよりも前記指標
値が合焦に近い値を示す部分のみを抽出し、前記比較対
象画像データの対応部分を前記抽出部分で置き換え、前
記比較対象画像データを更新するステップ(c)とを備え
ている。
According to a first aspect of the present invention, there is provided an image processing method, comprising: a photographing lens driving unit; and a photographing lens capable of automatically changing a focal position. In a digital camera that converts an object image into image data, temporarily records the image in an image memory, and performs image processing, an image processing method when an exposure start switch is operated is provided. (A) obtaining the latest image data by photographing at the one focus position, and focusing on each of the latest image data and the comparison target image data obtained based on the image data obtained before. For calculating the index value of
(b), the calculated index value is compared, the latest image data, the index value is extracted from the comparison target image data only a portion showing a value closer to the focus, the comparison target image And (c) updating the comparison target image data by replacing a corresponding portion of the data with the extracted portion.

【0007】本発明に係る請求項2記載の画像処理方法
は、前記デジタルカメラがカラー撮影が可能なカメラで
あって、前記指標値が各部分で前記コントラスト値が最
大となったコントラスト値であって、前記比較対象画像
データがコントラスト最大画像データであって、前記ス
テップ(b)が、前記最新画像データおよび前記コントラ
スト最大画像データを、複数の画素データで構成される
複数のブロックに分割するステップ(b−1)と、前記複
数のブロックのそれぞれについて、前記複数の画素デー
タのうち最近隣の同色の画素データの差の絶対値の総和
値を算出し、各色ごとの前記総和値の合計を前記コント
ラスト値として算出するステップ(b−2)とを備え、前
記ステップ(c)が、前記最新画像データおよび前記コン
トラスト最大画像データにおいて、前記複数のブロック
ごとに前記コントラスト値を比較するステップ(c−1)
と、前記最新画像データの前記複数のブロックのうち、
前記コントラスト最大画像データよりも前記コントラス
ト値が大きいブロックについては、前記コントラスト最
大画像データの対応ブロックの画素データを、前記最新
画像データの前記ブロックの画素データで置き換えるス
テップ(c−2)とを備えている。
According to a second aspect of the present invention, in the image processing method according to the second aspect, the digital camera is a camera capable of performing color photographing, and the index value is a contrast value at which the contrast value is maximum in each part. Wherein the image data to be compared is maximum contrast image data, and the step (b) divides the latest image data and the maximum contrast image data into a plurality of blocks composed of a plurality of pixel data. (b-1) calculating, for each of the plurality of blocks, a total sum of absolute values of differences between pixel data of the same color closest to each other among the plurality of pixel data, and calculating a sum of the total sum for each color; (B-2) calculating as the contrast value, wherein the step (c) comprises the step of: In data, comparing said contrast value for each of the plurality of blocks (c-1)
And, among the plurality of blocks of the latest image data,
(C-2) for a block having a larger contrast value than the maximum contrast image data, replacing pixel data of a block corresponding to the maximum contrast image data with pixel data of the block of the latest image data. ing.

【0008】本発明に係る請求項3記載の画像処理方法
は、前記ステップ(a)、(b)、(c)が繰り返して実行さ
れ、前記焦点位置の1回の変更に伴う前記レンズの移動
距離が、被写界深度以下になるように前記レンズを移動
させるステップ(d)をさらに備えている。
According to a third aspect of the present invention, in the image processing method, the steps (a), (b), and (c) are repeatedly executed, and the movement of the lens according to one change of the focal position. The method further comprises the step (d) of moving the lens so that the distance is equal to or less than the depth of field.

【0009】本発明に係る請求項4記載の画像処理方法
は、前記ステップ(d)が、前記焦点位置の1回の変更に
よって、前記被写界深度の半分に相当する距離だけ前記
レンズを移動させるステップ(d−1)を含んでいる。
In the image processing method according to a fourth aspect of the present invention, in the step (d), the lens is moved by a distance corresponding to half of the depth of field by one change of the focal position. And (d-1).

【0010】本発明に係る請求項5記載の画像処理方法
は、前記ステップ(d)が、前記焦点位置を、前記レンズ
に近づける方向に変更するステップ(d−2)を備えてい
る。
According to a fifth aspect of the present invention, in the image processing method, the step (d) includes a step (d-2) of changing the focal position in a direction approaching the lens.

【0011】本発明に係る請求項6記載の画像処理方法
は、前記ステップ(d−2)が、前記焦点位置を、無限遠
から前記レンズの駆動許容最近接距離まで変更するステ
ップを含んでいる。
According to a sixth aspect of the present invention, in the image processing method, the step (d-2) includes a step of changing the focal position from infinity to a closest allowable driving distance of the lens.

【0012】[0012]

【発明の実施の形態】<A.発明の基本概念>本発明
は、ピントが合っている状態では被写体のコントラスト
が最大になるという点に着目するとともに、デジタルカ
メラの最終画像データが種々の画像処理工程を経て得ら
れることを利用し、従来にない画像処理工程を加えるこ
とで撮影するレンズの焦点距離の制限なしにパンフォー
カス撮影を実現するものである。
DESCRIPTION OF THE PREFERRED EMBODIMENTS <A. Basic Concept of the Invention> The present invention focuses on the fact that the contrast of a subject is maximized when the subject is in focus, and utilizes the fact that the final image data of a digital camera is obtained through various image processing steps. The present invention realizes pan-focus photographing by adding an unconventional image processing step without limiting the focal length of a lens to be photographed.

【0013】すなわち、フォーカス位置を無限遠から近
距離まで、あるいはその逆に段階的にずらしながら撮像
を行い、前後関係にあるフォーカス位置での画像データ
を比較することで合焦の指標値であるコントラストが最
大となる画像データを抽出し、各フォーカス位置でコン
トラストが最大となるデータを合成することで、遠距離
の被写体から近距離の被写体までピントの合った最終画
像データを得るという基本概念に基づいている。
That is, imaging is performed while shifting the focus position stepwise from infinity to a short distance, or vice versa, and comparing the image data at the focus positions in a front-rear relationship, thereby obtaining a contrast index value. Is based on the basic concept of extracting the image data that maximizes and combining the data that maximizes the contrast at each focus position to obtain the final image data that is in focus from a distant subject to a close subject. ing.

【0014】<B.デジタルカメラの基本的な構成およ
び動作>まず、図1および図2を用いてデジタルカメラ
の基本的な構成および動作について説明する。図1は本
発明に係るデジタルカメラの画像処理方法を実現するた
めの構成を備えたデジタルカメラ100のブロック図で
ある。
<B. Basic Configuration and Operation of Digital Camera> First, the basic configuration and operation of the digital camera will be described with reference to FIGS. FIG. 1 is a block diagram of a digital camera 100 having a configuration for realizing an image processing method for a digital camera according to the present invention.

【0015】図1に示すように、デジタルカメラ100
はメインマイクロコンピュータ(以後、メインマイコン
と略称)1を備え、以下に説明する各構成の機能を制御
する構成となっている。
As shown in FIG. 1, a digital camera 100
Is provided with a main microcomputer (hereinafter abbreviated as a main microcomputer) 1 and is configured to control the function of each component described below.

【0016】メインマイコン1で制御される構成は、被
写体からの反射光を受光し被写体の距離情報を出力する
測距モジュール2、撮影者がデジタルカメラ100を操
作するための電源スイッチを含むスイッチ群3、デジタ
ルカメラ100ごとの機種差に関する工場出荷時の検査
値、および電源オフ直前の各種設定値等を記録する電気
的に書き換え可能なROM(EEPROM)4、被写体
画像および撮影のための設定値を表示する液晶ディスプ
レイ(LCD)等の表示部材5、パーソナルコンピュー
タや外部モニターに対して画像情報等を入出力するため
の外部インタフェース6、撮影した画像情報を記録する
脱着可能な記録媒体7、撮影された画像データを演算処
理するためのRAM8、レンズを介して被写体像を撮像
する固体撮像素子(ここではCCDを使用しているので
CCDと呼称する場合も有り)9、固体撮像素子9を駆
動させるためのパルスを発生させる撮像素子ドライバ
(タイミングジェネレータ:TGと呼称する場合も有
り)10、固体撮像素子9から出力された画像のアナロ
グ信号を増幅するアナログアンプ11、アナログアンプ
11によって増幅された画像アナログ信号をデジタル変
換し、メインマイコン1に出力するA/Dコンバータ1
2、フォーカスレンズ群14を光軸方向に駆動させると
ともに、フォーカスレンズ群14の位置を検出するフォ
ーカスドライバ・位置検出センサ13、撮影補助光であ
るフラッシュ光を発光する発光部であるXe管16に対
する充電と発光を制御する充電・発光回路15、フラッ
シュ光の被写体からの反射光をモニターし、適正なフラ
ッシュ光量に達したかどうかを検出する調光素子17等
である。
The configuration controlled by the main microcomputer 1 includes a distance measuring module 2 for receiving reflected light from a subject and outputting distance information of the subject, and a switch group including a power switch for a photographer to operate the digital camera 100. 3. Electrically rewritable ROM (EEPROM) 4 for recording inspection values at the time of factory shipment regarding model differences for each digital camera 100, various setting values immediately before power-off, etc. 4, setting values for subject images and photographing A display member 5 such as a liquid crystal display (LCD), an external interface 6 for inputting / outputting image information and the like to / from a personal computer or an external monitor, a detachable recording medium 7 for recording photographed image information, RAM 8 for performing arithmetic processing on the obtained image data, and a solid-state image sensor for capturing an image of a subject via a lens Here, since a CCD is used, the CCD may be referred to as a CCD) 9, an image sensor driver for generating a pulse for driving the solid-state image sensor 9 (timing generator: sometimes referred to as a TG) 10, a solid An analog amplifier 11 for amplifying an analog signal of an image output from the imaging element 9, an A / D converter 1 for converting an image analog signal amplified by the analog amplifier 11 to digital and outputting the analog signal to the main microcomputer 1
2. A focus driver / position detection sensor 13 that drives the focus lens group 14 in the optical axis direction and detects the position of the focus lens group 14, and a Xe tube 16 that is a light emitting unit that emits flash light that is a photographing auxiliary light. A charging / light emitting circuit 15 for controlling charging and light emission, a dimming element 17 for monitoring the reflected light of the flash light from the subject and detecting whether or not an appropriate flash light amount has been reached, and the like.

【0017】なお、フォーカスレンズ群14は撮像光学
系である撮像レンズ群の一部を構成しており、撮像レン
ズ群はフォーカスレンズ群14の他に固定された固定レ
ンズ群141を有している。
The focus lens group 14 forms a part of an image pickup lens group which is an image pickup optical system. The image pickup lens group has a fixed lens group 141 fixed in addition to the focus lens group 14. .

【0018】図2は固体撮像素子9の基本構成を説明す
る概念図である。固体撮像素子9は複数の受光セル21
が配列された受光セル列21Lが複数配列されて構成さ
れている。受光セル21は光エネルギーを電気エネルギ
ーに変換する光電変換素子で構成され、受光セル21に
光が照射されると電荷が発生し、発生した電荷を撮像素
子ドライバ10により生成される所定のタイミングに応
じて出力したものが画像信号となる。
FIG. 2 is a conceptual diagram for explaining the basic configuration of the solid-state imaging device 9. The solid-state imaging device 9 includes a plurality of light receiving cells 21
Are arranged in a plurality of light receiving cell rows 21L. The light receiving cell 21 is configured by a photoelectric conversion element that converts light energy into electric energy. When the light receiving cell 21 is irradiated with light, an electric charge is generated, and the generated electric charge is generated at a predetermined timing generated by the image sensor driver 10. What is output in response is an image signal.

【0019】図2においては、受光セル列21Lに併設
される転送ゲート22を開く(受光セル21の電荷を移
動させるようにポテンシャル井戸の深さを変更する)こ
とで各受光セル21の電荷が転送ゲート22に併設され
る転送レジスタ23に排出される。転送レジスタ23に
排出された電荷は、ポテンシャル井戸の深さを順次変更
することで電荷を移動させるCCD動作によって転送レ
ジスタ23中を移動し、転送レジスタ23に直交する読
み出しレジスタ24に転送される。読み出しレジスタ2
4においてもCCD動作により電荷が転送され、出力部
25から外部に出力される。なお、転送レジスタ23お
よび読み出しレジスタ24は遮光され、それ自体が光電
変換を起こすことはない。
In FIG. 2, the charge of each light receiving cell 21 is changed by opening the transfer gate 22 provided adjacent to the light receiving cell row 21L (changing the depth of the potential well so as to move the charge of the light receiving cell 21). The data is discharged to a transfer register 23 attached to the transfer gate 22. The electric charge discharged to the transfer register 23 moves in the transfer register 23 by the CCD operation of moving the electric charge by sequentially changing the depth of the potential well, and is transferred to the readout register 24 orthogonal to the transfer register 23. Read register 2
Also in 4, the charge is transferred by the CCD operation and output from the output unit 25 to the outside. The transfer register 23 and the read register 24 are shielded from light, and do not cause photoelectric conversion by themselves.

【0020】固体撮像素子9から出力される画像信号は
アナログ値であり、微弱であるのでアナログアンプ11
によって増幅され、A/Dコンバータ12によってデジ
タル値に変換されてメインマイコン1に与えられる。メ
インマイコン1では与えられたデジタル画像信号に種々
の画像処理を施して表示部材5に被写体画像として表示
するとともに、撮影者の操作に応じてJPEG方式に基
づいて圧縮し記録媒体7に記録する。なお、画像処理に
際してメインマイコン1に内蔵されているメモリだけで
は対処できない場合があるので、RAM8を用いて演算
処理等を行う。
The image signal output from the solid-state image pickup device 9 is an analog value, and is weak.
, And is converted into a digital value by the A / D converter 12 and supplied to the main microcomputer 1. The main microcomputer 1 performs various image processings on the given digital image signal, displays the digital image signal on the display member 5 as a subject image, and compresses the image based on the JPEG method according to the operation of the photographer and records it on the recording medium 7. In some cases, it is not possible to cope with the image processing only by the memory built in the main microcomputer 1. Therefore, the arithmetic processing is performed using the RAM 8.

【0021】従って、デジタルカメラ100が撮影モー
ド状態にある場合は、固体撮像素子9は常に画像信号を
出力しており、表示部材5には被写体画像が動画像とし
て表示されていることになる。撮影者は表示部材5の画
像が所望の画像になったときに露光開始用スイッチを押
せば、当該所望の画像の画像データを記録媒体7に記録
できる。
Therefore, when the digital camera 100 is in the shooting mode, the solid-state imaging device 9 always outputs an image signal, and the display member 5 displays a subject image as a moving image. When the photographer presses the exposure start switch when the image on the display member 5 becomes a desired image, the image data of the desired image can be recorded on the recording medium 7.

【0022】<C.発明に係る動作>次に、図3〜図6
に示すフローチャートを用いて本発明に係る動作につい
て説明する。なお、図3〜図6においては記号〜を
付した部分は同じ記号どうしで接続されることを意味し
ている。
<C. Operation According to the Invention> Next, FIGS.
The operation according to the present invention will be described using the flowchart shown in FIG. In FIGS. 3 to 6, the parts marked with the symbol “-” mean that they are connected by the same symbol.

【0023】<C−1.予備動作>まず、図3および図
4を用いて本撮影に入る前の予備動作について説明す
る。図3に示すように、電源スイッチをオン状態にする
と(ステップST1)、メインマイコン1がリセットさ
れる(ステップST2)。リセットによりメインマイコ
ン1の各ポートはデフォルト状態になっているので、使
用すべきポートを設定するなどメインマイコン1の初期
設定を行う(ステップST3)。
<C-1. Preliminary Operation> First, a preliminary operation before starting the actual photographing will be described with reference to FIGS. As shown in FIG. 3, when the power switch is turned on (step ST1), the main microcomputer 1 is reset (step ST2). Since the ports of the main microcomputer 1 are in the default state by the reset, the initial setting of the main microcomputer 1 is performed such as setting the port to be used (step ST3).

【0024】次に、機種差に関する工場出荷時の検査
値、および前回電源オフ直前の各種設定値、例えばフラ
ッシュモードの種類あるいは画像圧縮モードの種類等を
EEPROM4から読み出す(ステップST4)。
Next, the inspection values at the time of shipment from the factory concerning the model differences and various setting values immediately before the last power-off, such as the type of flash mode or the type of image compression mode, are read from the EEPROM 4 (step ST4).

【0025】次に、記録媒体7の有無、種類および種類
に基づく記録可能容量を確認し(ステップST5)、フ
ォーカスドライバ・位置検出センサ13によりレンズの
位置をモニターしながらフォーカスレンズ群14をEE
PROM4に設定された初期位置に移動(ステップST
6)させた後、表示部材5を起動させる(ステップST
7)。この段階では固体撮像素子9は動作しておらず、
撮影者に表示部材5の起動を知らせるために表示部材5
が点灯するだけである。このとき、前回電源オフ直前の
各種設定値や記録媒体7の記録可能容量等を表示して撮
影者に告知する。
Next, the presence / absence and type of the recording medium 7 and the recordable capacity based on the type are confirmed (step ST5). The focus driver / position detection sensor 13 monitors the position of the lens and moves the focus lens group 14 to EE.
Move to initial position set in PROM 4 (step ST
6) After that, the display member 5 is activated (step ST)
7). At this stage, the solid-state imaging device 9 is not operating,
Display member 5 to inform the photographer of activation of display member 5
Only lights up. At this time, various setting values immediately before the power is turned off last time, the recordable capacity of the recording medium 7, and the like are displayed to notify the photographer.

【0026】そして、メインマイコン1は撮像動作の予
備として撮像素子ドライバ(TG)10に、例えば露光
時間を1/30秒に設定するなどの初期設定を行う(ス
テップST8)。ここで、露光時間とは受光セル21に
電荷を蓄積する時間であり、いわゆるシャッタースピー
ド(SSと呼称する場合も有り)値と言うことができ
る。
Then, the main microcomputer 1 performs an initial setting such as setting the exposure time to 1/30 second, for example, in the image pickup device driver (TG) 10 as a spare for the image pickup operation (step ST8). Here, the exposure time is a time for accumulating electric charges in the light receiving cells 21, and can be called a so-called shutter speed (sometimes referred to as SS) value.

【0027】撮像素子ドライバ10の初期設定が完了
し、撮像素子ドライバ10が動作することで固体撮像素
子9から画像信号が出力され、表示部材5に画像が表示
される。このとき、アナログアンプ11のゲインも所定
の初期値、例えば1倍に設定される(ステップST
9)。
When the initialization of the image sensor driver 10 is completed and the image sensor driver 10 operates, an image signal is output from the solid-state image sensor 9 and an image is displayed on the display member 5. At this time, the gain of the analog amplifier 11 is also set to a predetermined initial value, for example, 1 (step ST).
9).

【0028】そして、メインマイコン1は表示部材5に
画像を表示しながら、スイッチ群3のスイッチ操作を監
視し(ステップST10)、次のカメラ操作のために待
機する。なお、メインマイコン1内部のタイマー機能に
よって一定時間、撮影者がスイッチ群3によるカメラ操
作を行わなければ消費電力の節約のため電源をオフ状態
にする。通常、この一定時間は数分程度に設定されてい
る。
Then, the main microcomputer 1 monitors the switch operation of the switch group 3 while displaying the image on the display member 5 (step ST10), and waits for the next camera operation. If the photographer does not operate the camera with the switch group 3 for a certain period of time by a timer function inside the main microcomputer 1, the power is turned off to save power consumption. Usually, this fixed time is set to about several minutes.

【0029】撮影者がスイッチ群3のうちの所定のスイ
ッチを操作してパンフォーカスモードを設定するとメイ
ンマイコン1がそれを検出する(ステップST11)。
なお、パンフォーカスモードが選択されない場合は、ノ
ーマルフォーカスモードとなり通常の動作モードとなる
が(ステップST12)、当該モードについては従来と
同様であり本発明との関連が薄いので説明は省略する。
When the photographer operates a predetermined switch of the switch group 3 to set the pan focus mode, the main microcomputer 1 detects this (step ST11).
If the pan focus mode is not selected, the normal focus mode is set and the normal operation mode is set (step ST12). However, since this mode is the same as the conventional one and has little relevance to the present invention, the description is omitted.

【0030】パンフォーカスモード設定後に撮影者がス
イッチ群3のうちの露光開始用スイッチ(以後、レリー
ズスイッチと呼称)の半押し操作(以後、S1操作と呼
称)を行うと、メインマイコン1がそれを検知し(ステ
ップST13)、測光素子15を動作させて被写体の明
るさ情報を得る(ステップST14)。なお、レリーズ
スイッチがS1操作状態にならない場合はステップST
10以下の動作を繰り返す。
When the photographer performs a half-press operation (hereinafter, referred to as an S1 operation) of an exposure start switch (hereinafter, referred to as a release switch) of the switch group 3 after setting the pan focus mode, the main microcomputer 1 performs the operation. Is detected (step ST13), and the photometric element 15 is operated to obtain the brightness information of the subject (step ST14). If the release switch does not enter the S1 operation state, step ST
Repeat the operation of 10 or less.

【0031】メインマイコン1は被写体の明るさ情報か
ら被写体が適正露光となる露光制御値を算出する。ここ
で、露光制御値としては受光セル21に電荷を蓄積する
時間(露光時間)を規定する、いわゆるシャッタースピ
ード(SSと呼称する場合も有り)値と、アナログアン
プ11のゲイン等がある。ここで、シャッタースピード
とは最も単純には、図2の構成を例に採れば、受光セル
21の電荷を排出して転送ゲート22が閉じ、次に開く
までの時間で定義される。
The main microcomputer 1 calculates an exposure control value at which the subject is properly exposed from the brightness information of the subject. Here, the exposure control value includes a so-called shutter speed (sometimes referred to as SS) value that defines a time (exposure time) for accumulating charges in the light receiving cell 21, a gain of the analog amplifier 11, and the like. Here, in the simplest case, taking the configuration of FIG. 2 as an example, the shutter speed is defined as the time from when the charge of the light receiving cell 21 is discharged to when the transfer gate 22 is closed and then opened.

【0032】そして、メインマイコン1は算出したゲイ
ンをアナログアンプ11に、シャッタースピード値を撮
像素子ドライバ10に設定する(ステップST16、S
T17)。
Then, the main microcomputer 1 sets the calculated gain to the analog amplifier 11 and the shutter speed value to the image sensor driver 10 (steps ST16 and S16).
T17).

【0033】その後、メインマイコン1はレリーズスイ
ッチがS1操作状態にあるか否かを確認し(ステップS
T18)、S1操作状態にある場合(S1オンの場合)
には撮影者がレリーズスイッチの全押し操作(以後、S
2操作と呼称)を行うまで待機し、撮影者のS2操作を
検知する(ステップST19)と本撮影のための露光動
作に入る。なお、レリーズスイッチがS1操作状態にな
っていない場合(S1オフの場合)はステップST10
以下の動作を繰り返す。
Thereafter, the main microcomputer 1 checks whether or not the release switch is in the S1 operating state (step S1).
T18) When in the S1 operation state (when S1 is on)
Indicates that the photographer has fully pressed the release switch (hereinafter S
2 operation), and when the photographer's S2 operation is detected (step ST19), the exposure operation for actual photographing is started. If the release switch is not in the S1 operation state (if S1 is off), the process proceeds to step ST10.
The following operation is repeated.

【0034】<C−2.本撮影>次に、図5〜図12を
用いて本撮影について説明する。本撮影は複数回の露
光、すなわち複数回の撮像動作で構成されている。
<C-2. Next, the actual photographing will be described with reference to FIGS. The main shooting includes a plurality of exposures, that is, a plurality of imaging operations.

【0035】メインマイコン1はS2操作を検知する
と、コントラスト最大画像データ(すなわち比較対象画
像データ)の保存領域となるRAM8の一部領域に0デ
ータを書き込んで初期化を行う(ステップST20)。
同時に、コントラスト最大画像データを得るための最大
コントラスト値の保存領域となるRAM8の一部領域に
も0データを書き込んで初期化を行う(ステップST2
1)。
When the main microcomputer 1 detects the S2 operation, it initializes by writing 0 data in a partial area of the RAM 8 which is a storage area of the maximum contrast image data (that is, the image data to be compared) (step ST20).
At the same time, 0 data is also written and initialized in a partial area of the RAM 8 which is a storage area of a maximum contrast value for obtaining maximum contrast image data (step ST2).
1).

【0036】次に、メインマイコン1はフォーカスドラ
イバ・位置検出センサ13を制御してフォーカスレンズ
群14を駆動し、撮影を行う最も遠い距離である最遠距
離を越える位置(初期位置と呼称する場合あり)にピン
トを合わせる(ステップST22)。なお、通常は無限
遠を最遠距離とし、フォーカスレンズ群14の最大可動
位置を最遠距離を越える位置とするが、撮影者がスイッ
チ群3の操作によって初期位置を任意に設定するように
しても良い。
Next, the main microcomputer 1 controls the focus driver / position detection sensor 13 to drive the focus lens group 14, and the position exceeding the furthest distance, which is the furthest distance for taking an image (hereinafter referred to as an initial position) (YES) (step ST22). Normally, infinity is set as the farthest distance, and the maximum movable position of the focus lens group 14 is set as a position exceeding the farthest distance. However, the photographer sets the initial position arbitrarily by operating the switch group 3. Is also good.

【0037】なお、フォーカスレンズ群14の駆動は、
設定距離とEEPROM4に予め記録されている撮影レ
ンズの焦点距離情報とを照合することでフォーカスレン
ズ群14の繰り出し量(繰り出し情報)を算出し、それ
に基づいてメインマイコン1がフォーカスドライバ・位
置検出センサ13を制御し、位置検出することで実行さ
れる。
The driving of the focus lens group 14 is as follows.
By comparing the set distance with the focal length information of the photographing lens pre-recorded in the EEPROM 4, the extension amount (extension information) of the focus lens group 14 is calculated, and based on the calculated amount, the main microcomputer 1 uses the focus driver / position detection sensor. 13 is executed by detecting the position.

【0038】次に、メインマイコン1は現在のフォーカ
スレンズ群14の設定距離が最近接距離(駆動許容最近
接距離)であるか否かを確認し(ステップST23)、
最近接距離でない場合は、EEPROM4から読み出さ
れたレンズの焦点距離情報と、絞り情報および許容錯乱
円から被写界深度を算出し、現在の設定距離を基準に被
写界深度が半分オーバーラップするような距離を求め、
フォーカスレンズ群14の駆動量(次回のフォーカス位
置)を算出する(ステップST24)。なお、最近接距
離は初期位置の設定と同様に撮影者が任意に設定するよ
うにしても良い。なお、初期位置および最近接距離の設
定は、デジタルカメラ100の表示部材5に表示される
メニュー画面を見ながら設定できるように構成しておけ
ば良い。
Next, the main microcomputer 1 checks whether or not the current set distance of the focus lens group 14 is the closest distance (permissible closest drive distance) (step ST23).
If it is not the closest distance, the depth of field is calculated from the focal length information of the lens read from the EEPROM 4, the aperture information and the permissible circle of confusion, and the depth of field is half overlapped based on the current set distance. To find a distance
The drive amount of the focus lens group 14 (the next focus position) is calculated (step ST24). Note that the closest distance may be arbitrarily set by the photographer similarly to the setting of the initial position. Note that the initial position and the closest distance may be set while viewing the menu screen displayed on the display member 5 of the digital camera 100.

【0039】ここで、ステップST24の動作につい
て、図7に示すフローチャートを用いてさらに説明す
る。図7はステップST24の動作を詳細に説明するフ
ローチャートであり、ステップST241〜ST248
で構成され、ステップST241は図5に示すステップ
ST23に続くステップであり、ステップST248の
後には図5に示すステップST25が続くことになる。
Here, the operation of step ST24 will be further described with reference to the flowchart shown in FIG. FIG. 7 is a flowchart illustrating the operation of step ST24 in detail, and includes steps ST241 to ST248.
Step ST241 is a step following Step ST23 shown in FIG. 5, and Step ST248 is followed by Step ST25 shown in FIG.

【0040】次回のフォーカス位置の算出は、まず、現
在のフォーカスレンズ群14の設定距離を確認する(ス
テップST241)。
In the next calculation of the focus position, first, the current set distance of the focus lens group 14 is confirmed (step ST241).

【0041】続いて、ステップST242、ST243
およびST244で、それぞれレンズ焦点距離、レンズ
絞り値および許容錯乱円をEEPROM4から読み出
す。なお、許容錯乱円とは撮像素子面上で、被写体であ
る点像がぼやけて円像となっても許容できる円の直径で
定義され、通常、撮像素子の画素ピッチの√2〜2倍の
大きさに設定されている。
Subsequently, steps ST242 and ST243
In step ST244, the lens focal length, the lens aperture value, and the permissible circle of confusion are read from the EEPROM 4. Note that the permissible circle of confusion is defined as the diameter of a circle that can be tolerated even if a point image as a subject is blurred and a circular image is formed on the image sensor surface, and is usually √2 to 2 times the pixel pitch of the image sensor. The size is set.

【0042】ここで、デフォーカス量をd、被写体距離
をD、レンズ焦点距離をfとすると光学的に下記の数式
(1)の近似式が成り立つ。
Here, assuming that the defocus amount is d, the object distance is D, and the lens focal length is f, the following approximate expression (1) holds optically.

【0043】[0043]

【数1】 (Equation 1)

【0044】また、レンズ絞り値をF、許容錯乱円をδ
とすると、被写界深度は下記の数式(2)で表される。
The lens aperture value is F, and the permissible circle of confusion is δ.
Then, the depth of field is represented by the following equation (2).

【0045】[0045]

【数2】 (Equation 2)

【0046】次回設定距離を、被写体距離(換言すれば
現在設定距離)Dに対して被写界深度の半分だけカメラ
側に近づいた距離とするように設定するならば、数式
(1)および(2)から、次回設定距離DXは下記の数
式(3)で表される。
If the next set distance is set to be a distance closer to the camera by half the depth of field with respect to the subject distance (in other words, the current set distance) D, equations (1) and (1) From 2), the next set distance DX is represented by the following equation (3).

【0047】[0047]

【数3】 (Equation 3)

【0048】そして、ステップST245において、数
式(3)を用いて次回設定距離を算出する。なお、次回
設定距離を、現在設定距離Dに対して被写界深度の半分
だけカメラ側に近づいた距離とするのは、被写界深度以
上にレンズが移動すると被写界深度から外れた部分では
ピントが合わなくなって(デフォーカス)、鮮明な映像
が得られなくなるからである。これを防ぐには、被写界
深度以上にレンズを移動させなければ良く、数式(3)
の係数0.5は一例であって、係数としては1以下であ
れば良い。なお、係数が1の場合はレンズの有する被写
界深度に相当する距離ずつレンズを移動させることにな
る。
Then, in step ST245, the next set distance is calculated using equation (3). Note that the next set distance is a distance closer to the camera by half the depth of field with respect to the current set distance D, because the lens moves beyond the depth of field when the lens moves beyond the depth of field. In this case, the focus becomes out of focus (defocus), and a clear image cannot be obtained. To prevent this, it is only necessary to move the lens beyond the depth of field.
The coefficient 0.5 is merely an example, and the coefficient may be 1 or less. When the coefficient is 1, the lens is moved by a distance corresponding to the depth of field of the lens.

【0049】次に、メインマイコン1はフォーカスドラ
イバ・位置検出センサ13が出力する位置情報から現在
のフォーカスレンズ群14の位置、すなわちレンズの繰
り出し量を再計算し(ステップST246)、現在のフ
ォーカスレンズ群14の位置を確認する(ステップST
247)。
Next, the main microcomputer 1 recalculates the current position of the focus lens group 14, that is, the amount of lens extension from the position information output from the focus driver / position detection sensor 13 (step ST246), and returns the current focus lens. Confirm the position of the group 14 (step ST
247).

【0050】次に、ステップST245で求めた次回設
定距離DXに合わせて、フォーカスレンズ群14の駆動
量を算出する(ステップS248)。
Next, the drive amount of the focus lens group 14 is calculated in accordance with the next set distance DX obtained in step ST245 (step S248).

【0051】次に、ステップST24(すなわち図7の
ステップST245)で算出したフォーカスレンズ群1
4の駆動量に基づいてフォーカスレンズ群14を駆動さ
せる(ステップST25)。そして、図4に示すステッ
プST17で設定した適正シャッタースピードとなるよ
うに撮像素子ドライバ10を制御して固体撮像素子9に
より背景を撮像する(ステップST26)。これを第1
回目の露光と呼称する。
Next, the focus lens group 1 calculated in step ST24 (ie, step ST245 in FIG. 7)
The focus lens group 14 is driven based on the drive amount of No. 4 (step ST25). Then, the image sensor driver 10 is controlled so that the shutter speed becomes the proper shutter speed set in step ST17 shown in FIG. 4, and the background is imaged by the solid-state image sensor 9 (step ST26). This is the first
Called the second exposure.

【0052】適正シャッタースピードで背景の露光を行
った固体撮像素子9からの画像信号は、アナログアンプ
11によって適正ゲイン(図4に示すステップST17
で設定)で増幅され、A/Dコンバータ12によってデ
ジタル出力に変換され、画像データとしてメインマイコ
ン1に取り込まれる(ステップST27)。
The image signal from the solid-state imaging device 9 which has been subjected to background exposure at an appropriate shutter speed is given an appropriate gain by the analog amplifier 11 (step ST17 shown in FIG. 4).
), Converted into a digital output by the A / D converter 12, and taken into the main microcomputer 1 as image data (step ST27).

【0053】取り込まれた画像データは補完処理を含む
画像処理を施される(ステップST28)。ここで、補
完処理について説明する。固体撮像素子9がカラーCC
Dである場合、各画素(受光素子)には色フィルターR
(赤)、G(緑)、B(青)の何れかが配設されてお
り、その色フィルターの配列にはベイヤー配列やインタ
ーライン配列などがあるが、解像度を上げるために、特
定の1つの画素において、配設されたフィルターの色以
外の色に関するデータは周辺の他の画素のデータから算
出する処理が補間処理である。例えばRの画素の部分の
G(またはB)に関するデータは、周辺のG(または
B)の画素の出力データを用いて算出する。
The fetched image data is subjected to image processing including a complementing process (step ST28). Here, the complementing process will be described. Solid-state image sensor 9 is color CC
D, each pixel (light receiving element) has a color filter R
(Red), G (Green), or B (Blue), and the color filter array includes a Bayer array and an interline array. In one pixel, the process of calculating data related to colors other than the color of the arranged filter from data of other surrounding pixels is interpolation processing. For example, data relating to G (or B) of the R pixel portion is calculated using output data of peripheral G (or B) pixels.

【0054】ここで、ステップST28の動作につい
て、図8に示すフローチャートを用いてさらに説明す
る。図8はステップST28の動作を詳細に説明するフ
ローチャートであり、ステップST281〜ST288
で構成され、ステップST281は図5に示すステップ
ST27に続くステップであり、ステップST287の
後には図5に示すステップST23が続くことになる。
Here, the operation of step ST28 will be further described with reference to the flowchart shown in FIG. FIG. 8 is a flowchart illustrating the operation of step ST28 in detail, and includes steps ST281 to ST288.
The step ST281 is a step following the step ST27 shown in FIG. 5, and the step ST287 is followed by a step ST23 shown in FIG.

【0055】取り込まれた画像データは、まず上に説明
した補完処理が施される(ステップST281)。そし
て、メインマイコン1は画像データを画面に対応させ
て、例えば縦横20に分割し、計400個のブロック領
域を形成する(ステップST282)。この作業はRA
M8において行われ、ステップST20およびST21
において説明したRAM8の一部領域の初期化はこの作
業を行う領域についてなされる。
The captured image data is first subjected to the above-described complement processing (step ST281). Then, the main microcomputer 1 divides the image data into, for example, 20 in the vertical and horizontal directions in correspondence with the screen to form a total of 400 block areas (step ST282). This work is RA
This is performed in M8, and in steps ST20 and ST21.
The initialization of a partial area of the RAM 8 described in (1) is performed for an area for performing this work.

【0056】ここで、ステップST282〜ST288
の動作については、当該動作を示す概念図(図9〜図1
2)を参照しつつ説明する。
Here, steps ST282 to ST288 are performed.
Are conceptual diagrams showing the operation (FIGS. 9 to 1).
This will be described with reference to 2).

【0057】図9に示すように、RAM8においてはそ
の一部領域が4つの領域に区分されて使用される。すな
わち、コントラスト値が最大となる画像データ(コント
ラスト最大画像データ)の保存領域であるコントラスト
最大画像データ領域MR、最新の画像データが一時的に
保存される最新画像データ領域XR、コントラスト最大
画像データを得るための最大コントラスト値の保存領域
となる最大コントラストデータ領域CMR、最新の画像
データのコントラスト値の保存領域となる最新コントラ
ストデータ領域CXRの4つである。
As shown in FIG. 9, a part of the RAM 8 is divided into four areas. That is, the maximum contrast image data area MR, which is the storage area of the image data having the maximum contrast value (maximum contrast image data), the latest image data area XR in which the latest image data is temporarily stored, and the maximum contrast image data. A maximum contrast data area CMR serving as a storage area of a maximum contrast value to be obtained, and a latest contrast data area CXR serving as a storage area of a contrast value of the latest image data.

【0058】図9においては簡単化のため、CCDによ
って撮像される1フレームの画像データを縦横4×5の
20ブロックに分割した例を示している。また、ステッ
プST20およびST21に示す0データの書き込みは
コントラスト最大画像データ領域MR、最大コントラス
トデータ領域CMRについてなされる。
FIG. 9 shows an example in which, for simplicity, one frame of image data picked up by a CCD is divided into 20 blocks of 4.times.5. The writing of 0 data shown in steps ST20 and ST21 is performed for the maximum contrast data area MR and the maximum contrast data area CMR.

【0059】なお、RAM8は所定のアドレスの記憶セ
ルにデータを書き込み、当該所定のアドレスを指定する
ことで記憶セルからデータを読み出すことができるメモ
リであり、複数の記憶セルが配列されているが、当該記
憶セルの配列そのものが図9のように4つの領域に区分
されているわけではなく、アドレスが図9のように配列
されている。
The RAM 8 is a memory capable of writing data to a storage cell at a predetermined address and reading data from the storage cell by designating the predetermined address. A plurality of storage cells are arranged. The memory cell array itself is not divided into four regions as shown in FIG. 9, but the addresses are arranged as shown in FIG.

【0060】RAM8において上記ブロック区分が終わ
ると、ステップST281において補完処理が施された
画像データが最新画像データ領域XRに保存される。図
10は、最新画像データ領域XRに画像データが保存さ
れた状態を、最新画像データ領域XRにハッチングを施
すことで模式的に表した図である。
When the above block division is completed in the RAM 8, the image data subjected to the complementing process in step ST281 is stored in the latest image data area XR. FIG. 10 is a diagram schematically illustrating a state in which image data is stored in the latest image data area XR by hatching the latest image data area XR.

【0061】次に、最新画像データ領域XRのブロック
の中から1番目、例えば最上段左端のブロックをコント
ラスト値の算出ブロックとして選択する(ステップST
283)。
Next, the first block, for example, the leftmost block at the top of the latest image data area XR is selected as a contrast value calculation block (step ST).
283).

【0062】そして、算出ブロック内の各画素につい
て、最近隣の同色の画素のデータ差の絶対値の総和、す
なわちコントラスト値を算出する(ステップST28
4)。より具体的には、例えばベイヤー配列ではその並
びは第1列がRGRGRG・・・となっており、第2列
がGBGBGB・・・となっている。この場合、まず、
第1列の1番目のRの画素と、2番目のRの画素のデー
タの比較を行い、その差の絶対値を算出する。次に、2
番目のRの画素のデータと3番目のRの画素のデータの
比較を行いその差の絶対値を算出する。この動作を繰り
返し(横だけでなく縦方向についても)、全てのRの画
素のデータ差の絶対値を算出し、その総和を得る。これ
はGの画素のデータ、Bの画素のデータについても同様
に施され、最終的にはR、G、B全てのデータ差の総和
を合計することで、1番目のブロックのコントラスト値
が算出されることになる。なお、以上の説明ではカラー
画像を処理するカラーCCDを例に採って説明したが、
モノクロ画像を処理するモノクロCCDにおいても同様
であり、その場合は単に隣合う画素のデータ差を算出す
れば良い。
Then, for each pixel in the calculation block, the sum of the absolute values of the data differences between the pixels of the same color in the nearest neighborhood, that is, the contrast value is calculated (step ST28).
4). More specifically, for example, in the Bayer arrangement, the first column is RGRGRG... And the second column is GBGBGB. In this case, first
The data of the first R pixel in the first column is compared with the data of the second R pixel, and the absolute value of the difference is calculated. Next, 2
The data of the Rth pixel is compared with the data of the third R pixel, and the absolute value of the difference is calculated. This operation is repeated (in the horizontal direction as well as in the vertical direction), the absolute values of the data differences of all the R pixels are calculated, and the sum is obtained. This is performed similarly for the data of the G pixel and the data of the B pixel. Finally, the contrast value of the first block is calculated by summing the sum of the data differences of all the R, G, and B pixels. Will be done. In the above description, a color CCD for processing a color image has been described as an example.
The same applies to a monochrome CCD for processing a monochrome image, in which case the data difference between adjacent pixels may be simply calculated.

【0063】算出したコントラスト値は最新コントラス
トデータ領域CXRの1番目のブロック(本例では最上
段左端)に入力される。そして、当該算出コントラスト
値と、最大コントラストデータ領域CMRの1番目のブ
ロック(本例では最上段左端)に入力されているコント
ラスト値との比較を行い(ステップST285)、算出
コントラスト値の方が大きければ、コントラスト最大画
像データ領域MRの1番目のブロックの画像データを、
最新画像データ領域XRの1番目のブロックの画像デー
タに書き換える(ステップST286)。このとき、最
大コントラストデータ領域CMRの1番目のブロックの
コントラスト値を算出コントラスト値に書き換える作業
も行う。
The calculated contrast value is input to the first block (in this example, the left end of the uppermost row) of the latest contrast data area CXR. Then, the calculated contrast value is compared with the contrast value input to the first block (in this example, the uppermost left end) of the maximum contrast data area CMR (step ST285), and the calculated contrast value is larger. For example, the image data of the first block of the maximum contrast image data area MR is
The image data is rewritten to the image data of the first block in the latest image data area XR (step ST286). At this time, an operation of rewriting the contrast value of the first block in the maximum contrast data area CMR to the calculated contrast value is also performed.

【0064】次に、現在の算出ブロックが最終ブロック
であるか否かを確認し(ステップST287)、最終ブ
ロックでない場合はブロック番号を1つ進め、ステップ
ST284以下の動作を繰り返す。なお、現在の算出ブ
ロックが最終ブロックである場合には図5に示すステッ
プST23以下の動作を繰り返す。
Next, it is confirmed whether or not the current calculation block is the last block (step ST287). If the current block is not the last block, the block number is incremented by one, and the operation from step ST284 is repeated. When the current calculation block is the last block, the operation from step ST23 shown in FIG. 5 is repeated.

【0065】図11に、ステップST284以下の動作
を繰り返すことで最新コントラストデータ領域CXRに
コントラスト値が書き込まれた状態を示し、図12に、
コントラスト値の比較を行う状態を模式的に示す。な
お、図12においては、最新画像データ領域XRの第2
行第2列のブロックX22と、コントラスト最大画像デ
ータ領域MRの第2行第2列のブロックM22の比較を
行う例を示している。これは、最新コントラストデータ
領域CXRの第2行第2列のブロックCX22の記憶デ
ータと、最大コントラストデータ領域CMRの第2行第
2列のブロックCM22の記憶データの比較を行うこと
を意味しており、該当するブロックには斜線のハッチン
グを付加している。
FIG. 11 shows a state in which the contrast value is written in the latest contrast data area CXR by repeating the operation of step ST284 and subsequent steps.
7 schematically illustrates a state in which contrast values are compared. In FIG. 12, the second image data area XR
An example is shown in which a block X22 in the second row and second column is compared with a block M22 in the second row and second column of the maximum contrast image data area MR. This means that the storage data of the block CX22 in the second row and second column of the latest contrast data area CXR is compared with the storage data of the block CM22 in the second row and second column of the maximum contrast data area CMR. Therefore, the corresponding blocks are hatched with diagonal lines.

【0066】このように、ステップST284以下の動
作を繰り返すことで、最新画像データ領域XRの全ての
ブロックについてコントラスト値を算出し、最新コント
ラストデータ領域CXRに書き込んで、最大コントラス
トデータ領域CMRのコントラスト値との比較を行うこ
とで、第1回目の露光で得られた画像データについての
画像処理が終了する。なお、第1回目の露光時にはコン
トラスト最大画像データ領域MRは初期化された状態で
あるので、全て最新画像データ領域XRの画像データに
書き換えられることになる。
As described above, by repeating the operation from step ST284, the contrast value is calculated for all the blocks in the latest image data area XR, written in the latest contrast data area CXR, and the contrast value in the maximum contrast data area CMR is calculated. , The image processing for the image data obtained in the first exposure is completed. At the time of the first exposure, since the maximum contrast image data area MR is in an initialized state, all of the image data is rewritten to the image data of the latest image data area XR.

【0067】ステップST287において現在の算出ブ
ロックが最終ブロックであると判断された場合は、ステ
ップST23以下の動作を繰り返す。すなわち、ステッ
プST23において、現在のフォーカスレンズ群14の
設定距離が最近接距離に達したと判断するまで、現在の
設定距離を基準にして被写界深度の半分だけカメラ側に
近づいた距離となるようにフォーカスレンズ群14を駆
動させ、その都度ステップST26〜ステップST28
の動作を繰り返す。
If it is determined in step ST287 that the current calculation block is the last block, the operation from step ST23 is repeated. That is, in step ST23, until the current set distance of the focus lens group 14 reaches the closest distance, the distance is closer to the camera side by half the depth of field based on the current set distance. The focus lens group 14 is driven as described above, and each time the steps ST26 to ST28 are performed.
Is repeated.

【0068】この結果、フォーカスレンズ群14の設定
距離が最近接距離に達した段階では、RAM8のコント
ラスト最大画像データ領域MRには、フォーカスレンズ
群14の各フォーカス位置で得られた最大コントラスト
を示す画像データのみが保存されていることになり、こ
れが最終画像データとなる。
As a result, when the set distance of the focus lens group 14 reaches the closest distance, the maximum contrast image data area MR of the RAM 8 indicates the maximum contrast obtained at each focus position of the focus lens group 14. Only the image data is stored, and this is the final image data.

【0069】なお、フォーカスレンズ群14の設定距離
が最近接距離に達した場合には、コントラスト最大画像
データ領域MRに保存された最終画像データを記録媒体
7に記録するため、図6にステップST29で示すよう
にRAM8上で最終画像データを圧縮し、圧縮された最
終画像データは記録媒体7に記録される(ステップST
30)。画像データは一般的にデータサイズが大きいの
で、記録媒体7により多く記録するためにデータ圧縮が
行われる。一般的な圧縮方式としてJPEG方式を用い
る。
When the set distance of the focus lens group 14 has reached the closest distance, the final image data stored in the maximum contrast image data area MR is recorded on the recording medium 7, so that FIG. , The final image data is compressed on the RAM 8 and the compressed final image data is recorded on the recording medium 7 (step ST).
30). Since image data generally has a large data size, data compression is performed to record more on the recording medium 7. The JPEG method is used as a general compression method.

【0070】ステップST30の終了後、メインマイコ
ン1は撮影者がS1およびS2操作を行っているか否か
を確認し、S1およびS2操作を行っていないことを検
知した場合、すなわちレリーズスイッチから指を離した
場合には図3に示すステップST10以下の動作を繰り
返す。なお、S1およびS2操作を行っている場合、す
なわちレリーズスイッチから指を離していない場合は、
指を離すまでレリーズスイッチの確認動作を続ける。
After the end of step ST30, the main microcomputer 1 checks whether or not the photographer has performed the operations S1 and S2, and when it is detected that the photographer has not performed the operations S1 and S2, that is, the finger is pressed from the release switch. When it has been released, the operation from step ST10 shown in FIG. 3 is repeated. When the S1 and S2 operations are performed, that is, when the finger is not released from the release switch,
Continue checking the release switch until you release your finger.

【0071】<C−3.特徴的作用効果>以上説明した
ように、フォーカス位置を無限遠から近距離まで段階的
にずらしながら撮像を行い、前後関係にあるフォーカス
位置での画像データを比較することでコントラストが最
大となる画像データを抽出し、各フォーカス位置でコン
トラストが最大となるデータを合成することで、撮影す
るレンズの焦点距離の制限を受けることなく、遠距離の
被写体から近距離の被写体までピントの合った(パンフ
ォーカスの)最終画像データを得ることができる。
<C-3. Characteristic operation and effect> As described above, image data is captured while gradually shifting the focus position from infinity to short distance, and image data at the focus position in the front-back relationship is compared to obtain the image data having the maximum contrast. Is extracted and the data that maximizes the contrast at each focus position is synthesized, so that the focus can be adjusted from the long-distance subject to the short-distance subject without being limited by the focal length of the lens to be photographed (pan focus ) Final image data can be obtained.

【0072】なお、以上の説明においては、最遠距離を
越える位置を初期位置とし、最近接距離に達するまでフ
ォーカス位置を段階的に変更する例について説明した
が、逆に、初期位置を最近接位置の側に設定し、最遠距
離に達するまでフォーカス位置を段階的に変更するよう
にしても良いことは言うまでもない。その場合、図5に
示すステップST23は、現在のフォーカスレンズ群1
4の設定距離が最遠距離であるか否かを確認する動作と
なる。
In the above description, an example has been described in which the position beyond the farthest distance is set as the initial position, and the focus position is changed stepwise until the closest distance is reached. It goes without saying that the focus position may be set to the position side and the focus position may be changed stepwise until the farthest distance is reached. In that case, step ST23 shown in FIG.
The operation is to check whether the set distance of No. 4 is the farthest distance.

【0073】なお、合焦の指標値として本実施例におい
てはコントラスト値を用いた例を示したが、空間周波数
が最大となった点をもって合焦したとみなしても良い。
In this embodiment, an example is described in which a contrast value is used as a focus index value. However, it may be considered that focusing is performed at a point where the spatial frequency becomes maximum.

【0074】また、本実施例においては現在の設定距離
を基準にして被写界深度の半分だけカメラ側に近づいた
距離となるようにフォーカスレンズ群14を駆動させ、
その都度ステップST26〜ステップST28の動作を
繰り返すといったように、フォーカスレンズ群14の駆
動を数多く行い、多数の画像データから最終画像データ
を得る例について説明したが、焦点位置を無限遠距離に
おいて得た画像データと、焦点位置を特定の距離におい
て得た画像データ(最新画像データ)の2つから最終画
像データを得るようにすれば、最新画像データを得るた
めのフォーカスレンズ群14の駆動回数は最低限1回で
済む。
Further, in this embodiment, the focus lens group 14 is driven so as to have a distance closer to the camera side by half the depth of field based on the current set distance.
An example has been described in which the focus lens group 14 is driven many times to obtain final image data from a large number of image data, such as repeating the operations of steps ST26 to ST28 each time. However, the focus position is obtained at an infinite distance. If the final image data is obtained from the image data and the image data (the latest image data) obtained at a specific distance from the focal position, the number of driving of the focus lens group 14 for obtaining the latest image data is minimum. Only once.

【0075】以上が本発明に係るデジタルカメラの動作
であるが、撮影された映像データを記録媒体7に記録す
るだけでなく、外部インタフェース6にパーソナルコン
ピュータ等の外部機器を接続し、そこに出力しても構わ
ない。なお、記録媒体7としては、スマートディア、コ
ンパクトフラッシュ(CF)カード、PCメモリーカー
ド等がある。
The operation of the digital camera according to the present invention has been described above. In addition to recording photographed video data on the recording medium 7, an external device such as a personal computer is connected to the external interface 6 and output there. It does not matter. The recording medium 7 includes a smart media, a compact flash (CF) card, a PC memory card, and the like.

【0076】また、外部インタフェース6を介して外部
機器からのカメラ制御も可能である。なお、外部インタ
フェース6としてはRS−422C等のシリアルケーブ
ルを接続可能な端子、テレビ受像機への出力に対応した
NTSC出力端子、プリンターへのプリンター出力端子
等がある。
Further, camera control from an external device through the external interface 6 is also possible. The external interface 6 includes a terminal to which a serial cable such as RS-422C can be connected, an NTSC output terminal corresponding to output to a television receiver, a printer output terminal to a printer, and the like.

【0077】[0077]

【発明の効果】本発明に係る請求項1記載のデジタルカ
メラの画像処理方法によれば、前後関係にある最新画像
データと比較対象画像データとの合焦の指標値を比較
し、最新画像データのうち、比較対象画像データよりも
指標値が合焦に近い値を示す部分のみを抽出して、比較
対象画像データの対応部分を抽出部分で置き換える作業
を行うことで、撮影レンズの焦点距離の制限を受けるこ
となく、遠距離の被写体から近距離の被写体まで焦点の
合った最終画像データを得ることができる。
According to the image processing method of the digital camera according to the first aspect of the present invention, the index value of focusing between the latest image data in the context and the image data to be compared is compared. Of the focal length of the photographing lens by extracting only the portion where the index value indicates a value closer to the focus than the comparison target image data and replacing the corresponding portion of the comparison target image data with the extracted portion. Without limitation, it is possible to obtain in-focus final image data from a long-distance subject to a short-distance subject.

【0078】本発明に係る請求項2記載のデジタルカメ
ラの画像処理方法によれば、最新画像データとコントラ
スト最大画像データとのコントラスト値の比較をブロッ
クごとに算出したコントラスト値によって行うので、デ
ータ処理の速度が速く、焦点位置を段階的に変更しなが
ら行うパンフォーカス撮影であっても、通常の撮影モー
ドと変わらない時間での撮影が可能となる。
According to the image processing method of the digital camera according to the second aspect of the present invention, the comparison of the contrast value between the latest image data and the maximum contrast image data is performed based on the contrast value calculated for each block. Is fast, and even in pan-focus photographing performed while changing the focal position stepwise, photographing can be performed in the same time as in the normal photographing mode.

【0079】本発明に係る請求項3記載のデジタルカメ
ラの画像処理方法によれば、焦点位置の1回の変更に伴
うレンズの移動距離を、被写界深度以下になるようにす
るので、焦点位置を変更しても被写界深度から外れるこ
とが防止され、焦点が合わずに鮮明な映像が得られなく
なるという現象を防止できる。
According to the digital camera image processing method according to the third aspect of the present invention, the moving distance of the lens in one change of the focal position is set to be equal to or less than the depth of field. Even if the position is changed, it is prevented from deviating from the depth of field, and it is possible to prevent a phenomenon that clear images cannot be obtained due to lack of focus.

【0080】本発明に係る請求項4記載のデジタルカメ
ラの画像処理方法によれば、焦点位置を変更しても被写
界深度の半分は常にオーバーラップするので、焦点位置
を変更しても被写界深度から外れることが確実に防止で
きる。また、被写界深度を半分ずつオーバーラップさせ
るので、オーバーラップ部分においては、ほぼ同じ画像
データを得ることになり、実質的に2回の画像処理を行
うことになって、コントラスト値比較の精度を高めるこ
とができる。
According to the image processing method for a digital camera according to the fourth aspect of the present invention, even if the focal position is changed, half of the depth of field always overlaps. Departure from the depth of field can be reliably prevented. In addition, since the depth of field is overlapped by half, almost the same image data is obtained in the overlapped portion, and the image processing is performed substantially twice, so that the accuracy of the contrast value comparison is improved. Can be increased.

【0081】本発明に係る請求項5記載のデジタルカメ
ラの画像処理方法によれば、焦点位置をレンズに近づけ
る方向に変更することで、被写体が存在する可能性が比
較的高い遠距離側から画像データを得ることができる。
According to the image processing method for a digital camera according to the fifth aspect of the present invention, by changing the focal position to a direction closer to the lens, the image is more likely to be present from a long distance side. Data can be obtained.

【0082】本発明に係る請求項6記載のデジタルカメ
ラの画像処理方法によれば、焦点位置を無限遠からレン
ズの駆動許容最近接距離まで変更することで、レンズの
撮影可能距離の全ての範囲で焦点の合った画像データを
得ることができる。
According to the image processing method for a digital camera according to the sixth aspect of the present invention, by changing the focal position from infinity to the closest driving distance of the lens to allow the lens to be photographed over the entire range of the photographable distance of the lens. In-focus image data can be obtained.

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

【図1】 本発明に係るデジタルカメラの画像処理方法
を実現する構成を備えたデジタルカメラを示すブロック
図である。
FIG. 1 is a block diagram showing a digital camera having a configuration for realizing an image processing method for a digital camera according to the present invention.

【図2】 固体撮像素子の構成および動作を説明する概
念図である。
FIG. 2 is a conceptual diagram illustrating the configuration and operation of a solid-state imaging device.

【図3】 本発明に係るデジタルカメラの画像処理方法
を説明するフローチャートである。
FIG. 3 is a flowchart illustrating an image processing method of the digital camera according to the present invention.

【図4】 本発明に係るデジタルカメラの画像処理方法
を説明するフローチャートである。
FIG. 4 is a flowchart illustrating an image processing method of the digital camera according to the present invention.

【図5】 本発明に係るデジタルカメラの画像処理方法
を説明するフローチャートである。
FIG. 5 is a flowchart illustrating an image processing method of the digital camera according to the present invention.

【図6】 本発明に係るデジタルカメラの画像処理方法
を説明するフローチャートである。
FIG. 6 is a flowchart illustrating an image processing method of the digital camera according to the present invention.

【図7】 本発明に係るデジタルカメラの画像処理方法
を説明するフローチャートである。
FIG. 7 is a flowchart illustrating an image processing method of the digital camera according to the present invention.

【図8】 本発明に係るデジタルカメラの画像処理方法
を説明するフローチャートである。
FIG. 8 is a flowchart illustrating an image processing method of the digital camera according to the present invention.

【図9】 コントラスト値の比較動作を説明する概念図
である。
FIG. 9 is a conceptual diagram illustrating a comparison operation of contrast values.

【図10】 コントラスト値の比較動作を説明する概念
図である。
FIG. 10 is a conceptual diagram illustrating a comparison operation of contrast values.

【図11】 コントラスト値の比較動作を説明する概念
図である。
FIG. 11 is a conceptual diagram illustrating a comparison operation of contrast values.

【図12】 コントラスト値の比較動作を説明する概念
図である。
FIG. 12 is a conceptual diagram illustrating a contrast value comparison operation.

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

MR コントラスト最大画像データ領域、XR 最新画
像データ領域、CMR最大コントラストデータ領域CM
R、CXR 最新コントラストデータ領域
MR contrast maximum image data area, XR latest image data area, CMR maximum contrast data area CM
R, CXR Latest contrast data area

Claims (6)

【特許請求の範囲】[Claims] 【請求項1】 撮影レンズ駆動手段を備え、自動的に焦
点位置の変更が可能な撮影レンズによって、被写体像を
撮像素子上に結像し、被写体像を画像データに変換し、
画像メモリ上に一時記録し、画像処理を行うデジタルカ
メラにおいて、露光開始用スイッチが操作された場合の
画像処理方法であって、 (a)前記撮影レンズの焦点を1の焦点位置において撮影
を行って最新画像データを得るステップと、 (b)前記最新画像データおよび、それ以前に取得した画
像データに基づいて得られた比較対象画像データのそれ
ぞれについて、合焦の指標値を算出するステップと、 (c)算出された前記指標値を比較し、前記最新画像デー
タのうち、前記比較対象画像データよりも前記指標値が
合焦に近い値を示す部分のみを抽出し、前記比較対象画
像データの対応部分を前記抽出部分で置き換え、前記比
較対象画像データを更新するステップと、を備えるデジ
タルカメラの画像処理方法。
1. An image pickup apparatus comprising: a photographing lens driving unit; a photographing lens capable of automatically changing a focal position; forming a subject image on an image sensor; converting the subject image into image data;
An image processing method in a case where an exposure start switch is operated in a digital camera that performs temporary image recording on an image memory and performs image processing. (B) calculating the focus index value for each of the latest image data and the comparison target image data obtained based on the image data obtained before; (c) comparing the calculated index values, extracting only a portion of the latest image data in which the index value indicates a value closer to focusing than the comparison target image data, Replacing the corresponding part with the extracted part and updating the comparison target image data.
【請求項2】 前記デジタルカメラはカラー撮影が可能
なカメラであって、前記指標値はコントラスト値であっ
て、 前記比較対象画像データは各部分で前記コントラスト値
が最大となったコントラスト最大画像データであって、 前記ステップ(b)は、 (b−1)前記最新画像データおよび前記コントラスト最
大画像データを、複数の画素データで構成される複数の
ブロックに分割するステップと、 (b−2)前記複数のブロックのそれぞれについて、前記
複数の画素データのうち最近隣の同色の画素データの差
の絶対値の総和値を算出し、各色ごとの前記総和値の合
計を前記コントラスト値として算出するステップとを備
え、 前記ステップ(c)は、 (c−1)前記最新画像データおよび前記コントラスト最
大画像データにおいて、前記複数のブロックごとに前記
コントラスト値を比較するステップと、 (c−2)前記最新画像データの前記複数のブロックのう
ち、前記コントラスト最大画像データよりも前記コント
ラスト値が大きいブロックについては、前記コントラス
ト最大画像データの対応ブロックの画素データを、前記
最新画像データの前記ブロックの画素データで置き換え
るステップとを備える、請求項1記載のデジタルカメラ
の画像処理方法。
2. The digital camera is a camera capable of taking a color image, wherein the index value is a contrast value, and the comparison target image data is contrast maximum image data in which the contrast value is maximum in each part. Wherein the step (b) comprises: (b-1) dividing the latest image data and the maximum contrast image data into a plurality of blocks composed of a plurality of pixel data; Calculating, for each of the plurality of blocks, a sum of absolute values of differences between pixel data of the same color closest to the plurality of pieces of pixel data, and calculating a sum of the sum of each color as the contrast value; The step (c) comprises: (c-1) in the latest image data and the maximum contrast image data, the plurality of blocks. (C-2) among the plurality of blocks of the latest image data, for a block having a higher contrast value than the maximum contrast image data, 2. The image processing method for a digital camera according to claim 1, further comprising the step of: replacing pixel data of a corresponding block with pixel data of the block of the latest image data.
【請求項3】 前記ステップ(a)、(b)、(c)は繰り返
して実行され、 (d)前記焦点位置の1回の変更に伴う前記レンズの移動
距離が、被写界深度以下になるように前記レンズを移動
させるステップをさらに備える、請求項1または請求項
2記載のデジタルカメラの画像処理方法。
3. The steps (a), (b), and (c) are repeatedly executed, and (d) the moving distance of the lens with one change of the focal position is equal to or less than the depth of field. 3. The image processing method for a digital camera according to claim 1, further comprising the step of moving the lens so as to achieve the following.
【請求項4】 前記ステップ(d)は、 (d−1)前記焦点位置の1回の変更によって、前記被写
界深度の半分に相当する距離だけ前記レンズを移動させ
るステップを含む、請求項3記載のデジタルカメラの画
像処理方法。
4. The step (d) includes: (d-1) moving the lens by a distance corresponding to half the depth of field by one change of the focal position. 4. The image processing method of the digital camera according to 3.
【請求項5】 前記ステップ(d)は、 (d−2)前記焦点位置を、前記レンズに近づける方向に
変更するステップを備える、請求項3または請求項4記
載のデジタルカメラの画像処理方法。
5. The image processing method for a digital camera according to claim 3, wherein said step (d) includes: (d-2) changing the focal position in a direction approaching the lens.
【請求項6】 前記ステップ(d−2)は、 前記焦点位置を、無限遠から前記レンズの駆動許容最近
接距離まで変更するステップを含む、請求項5記載のデ
ジタルカメラの画像処理方法。
6. The image processing method for a digital camera according to claim 5, wherein the step (d-2) includes a step of changing the focal position from infinity to a closest driving distance of the lens.
JP10116818A 1998-04-27 1998-04-27 Image processing method for digital camera Pending JPH11313240A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP10116818A JPH11313240A (en) 1998-04-27 1998-04-27 Image processing method for digital camera

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP10116818A JPH11313240A (en) 1998-04-27 1998-04-27 Image processing method for digital camera

Publications (1)

Publication Number Publication Date
JPH11313240A true JPH11313240A (en) 1999-11-09

Family

ID=14696402

Family Applications (1)

Application Number Title Priority Date Filing Date
JP10116818A Pending JPH11313240A (en) 1998-04-27 1998-04-27 Image processing method for digital camera

Country Status (1)

Country Link
JP (1) JPH11313240A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014145808A (en) * 2013-01-28 2014-08-14 Olympus Corp Imaging apparatus and method for controlling imaging apparatus

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014145808A (en) * 2013-01-28 2014-08-14 Olympus Corp Imaging apparatus and method for controlling imaging apparatus

Similar Documents

Publication Publication Date Title
JP3860367B2 (en) Imaging device
US7391447B2 (en) Method and apparatus for removing noise from a digital image
JP4214926B2 (en) Electronic still camera
JP4834425B2 (en) IMAGING DEVICE AND IMAGING DEVICE CONTROL METHOD
JP2008199477A (en) Imaging apparatus
KR100819811B1 (en) Photographing apparatus, and photographing method
JP3738652B2 (en) Digital camera
JP2001285698A (en) Electronic camera
JP2000041186A (en) Digital camera and control method therefor
JPH11239291A (en) Image pickup controller and image pickup control method
JP2009089037A (en) Photographing controller, photographing control method, photographing control program and photographing device
JP2002207162A (en) Digital camera
JPH1188731A (en) Camera
JP2001292367A (en) Imaging apparatus and image pickup method
JP3358584B2 (en) 3D information input camera
JPH11313240A (en) Image processing method for digital camera
JP3275873B2 (en) 3D information input camera
JP2007306064A (en) Imaging apparatus
JP2000059679A (en) Digital camera
JP3269484B2 (en) 3D information input camera
JP2007074114A (en) Electronic camera
JP2003295044A (en) Digital camera
JP2003319231A (en) Digital camera
JP2005333491A (en) Imaging apparatus
JP2005150835A (en) Image processing apparatus, digital camera system, and digital camera