JP2006295774A - Imaging apparatus, control method thereof, and image processing program for digital camera - Google Patents

Imaging apparatus, control method thereof, and image processing program for digital camera Download PDF

Info

Publication number
JP2006295774A
JP2006295774A JP2005116790A JP2005116790A JP2006295774A JP 2006295774 A JP2006295774 A JP 2006295774A JP 2005116790 A JP2005116790 A JP 2005116790A JP 2005116790 A JP2005116790 A JP 2005116790A JP 2006295774 A JP2006295774 A JP 2006295774A
Authority
JP
Japan
Prior art keywords
image
image data
image processing
unit
imaging apparatus
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
JP2005116790A
Other languages
Japanese (ja)
Inventor
Hiroaki Kubo
広明 久保
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Konica Minolta Photo Imaging Inc
Original Assignee
Konica Minolta Photo Imaging Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Konica Minolta Photo Imaging Inc filed Critical Konica Minolta Photo Imaging Inc
Priority to JP2005116790A priority Critical patent/JP2006295774A/en
Publication of JP2006295774A publication Critical patent/JP2006295774A/en
Pending legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To provide an imaging apparatus for realizing a high image quality image without variations in the color tone and the gradation among consecutively photographed frames, by obtaining information from all of consecutively photographed image data. <P>SOLUTION: The imaging apparatus obtains the information from all of the consecutively photographed image data to acquire average image data, and applies image processing optimum to the average image data to all of the consecutively photographed image data. <P>COPYRIGHT: (C)2007,JPO&INPIT

Description

本発明は、撮像装置、撮像装置の制御方法および、プログラムに関する。より詳しくは、撮影した複数の画像データから情報を得て、画像処理手段の設定を行うことを特徴とする撮像装置、撮像装置の制御方法および、プログラムに関する。   The present invention relates to an imaging device, an imaging device control method, and a program. More specifically, the present invention relates to an imaging apparatus, an imaging apparatus control method, and a program characterized by obtaining information from a plurality of captured image data and setting image processing means.

デジタルカメラなどの撮像装置において、撮像した画像の濃度パターンや色の偏りを解析したりして得られた被写体の輝度分布情報や色情報から、より実際の被写体に近い画像を再現できるように、撮影した画像の画像処理設定(たとえばガンマ補正やホワイトバランスなど)を変更することが知られている。   In an imaging device such as a digital camera, so that an image closer to the actual subject can be reproduced from the luminance distribution information and color information of the subject obtained by analyzing the density pattern and color deviation of the captured image, It is known to change image processing settings (for example, gamma correction and white balance) of a photographed image.

しかしながら、撮影した画像は被写体を取り巻く環境の一部を切り取ったにすぎないので、非常に限られた情報しか得られない。たとえば、空を撮影した時、撮影した画像だけでは青空か、曇り空かを判断するのは難しい。また、撮像素子のダイナミックレンジは狭く、被写体の輝度情報の一部しか得られない。   However, since the photographed image is only a part of the environment surrounding the subject, only very limited information can be obtained. For example, when the sky is photographed, it is difficult to determine whether it is a blue sky or a cloudy sky based on the photographed image alone. Further, the dynamic range of the image sensor is narrow, and only a part of the luminance information of the subject can be obtained.

また、デジタル一眼レフカメラにおいては、撮影前は撮像素子への光路は遮られているので、撮影前は撮像素子から画像情報を得ることはできない。そのため、前記技術は適用できなかった。   In a digital single-lens reflex camera, since the optical path to the image sensor is blocked before shooting, image information cannot be obtained from the image sensor before shooting. Therefore, the technique cannot be applied.

撮影した画像以外から被写体の色情報を得る方法としては、撮像素子とは別に広い範囲を測色できるセンサを設けてホワイトバランスの情報を得る方法が知られている。   As a method for obtaining color information of a subject from a non-photographed image, a method for obtaining white balance information by providing a sensor capable of measuring a wide range separately from an image sensor is known.

しかしながら、室内から窓越しに風景を撮影する場合など、センサの測色している範囲と撮影範囲が一致しない場合は正しく測色できなかった。また、別途センサを設けるためコスト高になった。   However, when photographing a landscape from a room through a window, the colorimetric measurement cannot be performed correctly if the sensor's colorimetric range does not match the photographing range. In addition, since a separate sensor is provided, the cost is increased.

センサを設けずに撮影した画像以外から被写体の色情報を得る別法としては、撮影前に撮像素子から得られた画像信号を積分し、色情報を得る方法(例えば、特許文献1参照)が提案されている。   As another method for obtaining color information of a subject from an image other than a photographed image without providing a sensor, a method for obtaining color information by integrating image signals obtained from an image sensor before photographing (see, for example, Patent Document 1). Proposed.

また、撮影した画像以外から被写体の輝度分布を測光する方法としては、露光量を変えて複数回撮像し、得られた複数の画像データから被写体の輝度分布を推定する方法が用いられる。   Further, as a method for measuring the luminance distribution of the subject from other than the photographed image, a method is used in which the exposure distribution is changed and images are taken a plurality of times, and the luminance distribution of the subject is estimated from a plurality of obtained image data.

たとえば、ストロボ装置により複数回予備発光を行った際の反射光を測光した結果の輝度分布に応じて、自動的に本発光の回数、露光量を設定し、複数回の露光を行い、その結果得られた画像データをガンマ補正して画像合成する方法(例えば、特許文献2参照)が提案されている。
特開2004−159183号公報 特開2003−198876号公報
For example, the number of main flashes and the exposure amount are automatically set according to the luminance distribution of the result of photometry of the reflected light when multiple flashes are made with a strobe device, and multiple exposures are performed. There has been proposed a method (for example, see Patent Document 2) in which the obtained image data is gamma-corrected to synthesize an image.
JP 2004-159183 A JP 2003-198876 A

デジタルカメラ、特に一眼レフデジタルカメラのようにライブビューを行わないカメラでは、撮影した1コマの画像を解析して被写体の輝度分布情報や色情報を推定し、前記画像の画像処理設定(たとえばガンマ補正やホワイトバランスなど)を行っているので、前記画像から得られた情報に偏りがあった場合、最適な画像処理設定ができないことがあった。   In a digital camera, particularly a camera that does not perform live view, such as a single-lens reflex digital camera, the luminance distribution information and color information of a subject are estimated by analyzing a captured image, and image processing settings (for example, gamma) of the image are analyzed. Correction, white balance, etc.), if the information obtained from the image is biased, the optimal image processing setting may not be possible.

そのため、上記特許文献1のように撮影前に撮像素子から得られた画像信号を積分し、色情報を得る方法や上記特許文献2のように撮影前に複数回予備発光を行うことによって、被写体の輝度分布情報を得て、広い再現階調を確保するための技術が提案されている。   Therefore, by integrating the image signal obtained from the image sensor before photographing as in Patent Document 1 and obtaining color information or performing preliminary light emission a plurality of times before photographing as in Patent Document 2, the subject can be obtained. Techniques have been proposed for obtaining luminance distribution information of the above and ensuring a wide reproduction gradation.

しかしながら、上記特許文献1や上記特許文献2の撮像装置では、複数枚連続して撮影する場合において、ガンマ補正やホワイトバランスなどの画像処理が各撮影コマ毎に異なった設定になり、画像の再現がばらつくという問題が解決できなかった。   However, in the imaging devices of Patent Document 1 and Patent Document 2 described above, when a plurality of images are continuously captured, image processing such as gamma correction and white balance is set differently for each captured frame, and image reproduction is performed. Could not solve the problem of variation.

また、上記特許文献2の撮像装置ではストロボ装置による複数回の予備発光を行う必要があり、さらに本露光時も複数回露光を行う必要があるため、限られた撮影機会や被写体にしか適用できなかった。   In addition, the image pickup apparatus disclosed in Patent Document 2 needs to perform preliminary light emission a plurality of times with a strobe device, and also needs to perform a plurality of exposures during main exposure, so that it can be applied only to limited shooting opportunities and subjects. There wasn't.

本発明は、上記課題に鑑みてなされたものであって、連続撮影した各コマ間の色調や階調にバラツキのない、高画質画像が得られる撮像装置および撮像装置の制御方法およびデジタルカメラ用画像処理プログラムを提供することを目的とする。   The present invention has been made in view of the above problems, and provides an imaging device capable of obtaining a high-quality image without variations in color tone and gradation between frames continuously shot, a method for controlling the imaging device, and a digital camera An object is to provide an image processing program.

本発明の目的は、下記構成により達成することができる。   The object of the present invention can be achieved by the following constitution.

(請求項1)
レンズ鏡胴から入射した被写体像を光電変換する撮像素子と、
前記撮像素子から獲得した画像データを、一時記憶する第1の記憶手段と、
前記第1の記憶手段に記憶した画像データに所定の処理を行う画像処理手段と、
前記所定の処理を行った画像データを記憶する第2の記憶手段と、
を有する撮像装置において、
所定の時間内に前記第1の記憶手段に記憶されたすべての画像データに基づいて画像処理手段の設定を変更する制御手段を有することを特徴とする撮像装置。
(Claim 1)
An image sensor that photoelectrically converts a subject image incident from a lens barrel;
First storage means for temporarily storing image data acquired from the image sensor;
Image processing means for performing predetermined processing on the image data stored in the first storage means;
Second storage means for storing the image data subjected to the predetermined processing;
In an imaging apparatus having
An image pickup apparatus comprising: a control unit that changes a setting of an image processing unit based on all image data stored in the first storage unit within a predetermined time.

(請求項2)
前記画像処理手段の設定は、撮像した画像データの階調変換特性であることを特徴とする請求項1に記載の撮像装置。
(Claim 2)
The imaging apparatus according to claim 1, wherein the setting of the image processing unit is a gradation conversion characteristic of captured image data.

(請求項3)
前記画像処理手段の設定は、撮像した画像データのホワイトバランスであることを特徴とする請求項1に記載の撮像装置。
(Claim 3)
The imaging apparatus according to claim 1, wherein the setting of the image processing unit is white balance of captured image data.

(請求項4)
前記制御手段は画像データを連続して獲得する連写モードを有し、
前記連写モードにおいて獲得したすべての画像データに基づいて、前記制御手段が画像処理手段の設定を変更することを特徴とする請求項1〜3のいずれか1項に記載の撮像装置。
(Claim 4)
The control means has a continuous shooting mode for continuously acquiring image data,
The imaging apparatus according to claim 1, wherein the control unit changes settings of the image processing unit based on all image data acquired in the continuous shooting mode.

(請求項5)
前記制御手段は露光条件を順次変更した画像データを連続して獲得するブラケットモードを有し、
前記ブラケットモードにおいて獲得したすべての画像データに基づいて、前記制御手段が画像処理手段の設定を変更することを特徴とする請求項1〜3のいずれか1項に記載の撮像装置。
(Claim 5)
The control means has a bracket mode for continuously acquiring image data obtained by sequentially changing exposure conditions,
The imaging apparatus according to claim 1, wherein the control unit changes the setting of the image processing unit based on all the image data acquired in the bracket mode.

(請求項6)
前記制御手段は前記第1の記憶手段に記憶された画像データから基準画像を選択する基準画像選択手段を有し、前記制御手段は選択された基準画像の画像データに基づいて、画像処理手段の設定を変更することを特徴とする請求項1〜3のいずれか1項に記載の撮像装置。
(Claim 6)
The control means includes reference image selection means for selecting a reference image from the image data stored in the first storage means, and the control means is configured to perform image processing on the basis of image data of the selected reference image. The imaging apparatus according to claim 1, wherein the setting is changed.

(請求項7)
前記画像処理手段は獲得した少なくとも2つの画像データの階調特性の設定を同一にすることを特徴とする請求項1に記載の撮像装置。
(Claim 7)
The imaging apparatus according to claim 1, wherein the image processing unit makes the setting of the gradation characteristics of at least two acquired image data the same.

(請求項8)
前記画像処理手段は獲得した少なくとも2つの画像データのホワイトバランスの設定を同一にすることを特徴とする請求項1に記載の撮像装置。
(Claim 8)
The imaging apparatus according to claim 1, wherein the image processing unit makes the white balance settings of at least two acquired image data the same.

(請求項9)
所定時間内に獲得された画像データを一時記憶する第1の記憶工程と、
前記第1の記憶工程において一時記憶した画像データに所定の処理を行う画像処理工程と、
前記所定の処理を行った画像データを記憶する第2の記憶工程と、
前記第1の記憶工程で記憶されたすべての画像データに基づいて、前記画像処理工程の設定を変更する制御工程と、を有することを特徴とする撮像装置の制御方法。
(Claim 9)
A first storage step of temporarily storing image data acquired within a predetermined time;
An image processing step of performing a predetermined process on the image data temporarily stored in the first storage step;
A second storage step of storing the image data subjected to the predetermined processing;
A control step of changing settings of the image processing step based on all the image data stored in the first storage step.

(請求項10)
コンピュータによって撮像装置が獲得した画像データの画像処理を行うプログラムであって、
コンピュータに画像データの撮影情報を判定してグループ化する処理と、
グループ化した画像データのすべてに基づいて、画像処理の設定を決定する処理と、
前記設定に基づいて画像処理を実行させることを特徴とするデジタルカメラ用画像処理プログラム。
(Claim 10)
A program for performing image processing of image data acquired by an imaging device by a computer,
A process for determining shooting information of image data on a computer and grouping it,
A process for determining image processing settings based on all of the grouped image data;
An image processing program for a digital camera, wherein image processing is executed based on the setting.

請求項1または9に記載の発明によれば、所定の時間内に撮影したすべての画像データから被写体の情報を得て、撮影したすべての画像データに最適な画像処理ができるので、バラツキの少ない高画質な画像の得られる撮像装置を提供できる。   According to the first or ninth aspect of the invention, information on the subject is obtained from all image data photographed within a predetermined time, and optimum image processing can be performed on all photographed image data, so that there is little variation. An imaging device capable of obtaining a high-quality image can be provided.

請求項2に記載の発明によれば、所定の時間内に撮影したすべての画像データから得た被写体の情報から、撮影した画像データの階調変換設定を行うので、階調のバラツキが少なく、すべての画像データに最適な階調を再現できる撮像装置を提供できる。   According to the second aspect of the present invention, since the gradation conversion setting of the captured image data is performed from the information of the subject obtained from all the image data captured within a predetermined time, there is little variation in gradation, It is possible to provide an imaging apparatus capable of reproducing the optimum gradation for all image data.

請求項3に記載の発明によれば、所定の時間内に撮影したすべての画像データから得た被写体の色情報から設定値を求めて、撮影した画像データのホワイトバランス設定を行うので、最適な色を再現した画像の得られる撮像装置を提供できる。   According to the third aspect of the invention, the setting value is obtained from the color information of the subject obtained from all the image data photographed within the predetermined time, and the white balance setting of the photographed image data is performed. It is possible to provide an imaging apparatus capable of obtaining an image in which colors are reproduced.

請求項4に記載の発明によれば、画像データを連続して獲得する連写モードにおいて、前記連写モード時に撮影したすべての画像データから被写体の情報を得るので、バラツキの少ない高画質な連続撮影画像の得られる撮像装置を提供できる。   According to the fourth aspect of the present invention, in the continuous shooting mode in which image data is continuously acquired, subject information is obtained from all the image data photographed in the continuous shooting mode. An imaging device capable of obtaining a captured image can be provided.

請求項5に記載の発明によれば、露出条件を順次変更した画像データを連続して獲得するブラケットモードにおいて、前記ブラケットモードで撮影したすべての画像データから被写体の情報を得るので、バラツキの少ない高画質なブラケット画像の得られる撮像装置を提供できる。   According to the fifth aspect of the present invention, in the bracket mode in which image data obtained by sequentially changing the exposure conditions is continuously acquired, subject information is obtained from all the image data photographed in the bracket mode, so that there is little variation. An imaging device capable of obtaining a high-quality bracket image can be provided.

請求項6に記載の発明によれば、所定の時間内に撮影した画像データの中から選択した画像データを基準として、撮影画像データに最適な画像処理ができるので、バラツキの少ない高画質な画像の得られる撮像装置を提供できる。   According to the sixth aspect of the present invention, since it is possible to perform optimal image processing for captured image data based on image data selected from image data captured within a predetermined time, a high-quality image with little variation An imaging device can be provided.

請求項7に記載の発明によれば、所定の時間内に撮影したすべての画像データから被写体の情報を得て、少なくとも2つの画像データに同じ設定の階調変換を行うので、階調のバラツキの少ない高画質な画像の得られる撮像装置を提供できる。   According to the seventh aspect of the present invention, the subject information is obtained from all the image data photographed within a predetermined time, and gradation conversion with the same setting is performed on at least two image data. It is possible to provide an imaging device capable of obtaining a high-quality image with less image quality.

請求項8に記載の発明によれば、所定の時間内に撮影したすべての画像データから被写体の情報を得て、少なくとも2つの画像データに同じホワイトバランスの設定を行うので、色のバラツキの少ない高画質な画像の得られる撮像装置を提供できる。   According to the eighth aspect of the present invention, information on the subject is obtained from all image data photographed within a predetermined time, and the same white balance is set for at least two image data. Therefore, there is little color variation. An imaging device capable of obtaining a high-quality image can be provided.

請求項10に記載の発明によれば、画像データの撮影情報を判定してグループ化し、グループ化した画像データのすべてに基づいて、画像処理の設定を決定し、画像処理を実行するので、バラツキの少ない高画質な画像の得られるプログラムを提供できる。   According to the tenth aspect of the present invention, the shooting information of the image data is determined and grouped, the image processing setting is determined based on all the grouped image data, and the image processing is executed. It is possible to provide a program that can obtain a high-quality image with less image quality.

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

図1は、本発明に係る撮像装置を適用した一実施形態であるデジタルカメラ1の概略構成を示す外観背面図である。   FIG. 1 is an external rear view showing a schematic configuration of a digital camera 1 which is an embodiment to which an imaging apparatus according to the present invention is applied.

カメラ本体部2の上面側にはシャッタボタン61と撮影モードダイアル64が設けられている。カメラ本体部2の背面側には電源スイッチ102、液晶モニタ81、モードスイッチ62、表示切り替えボタン63、十字キー65、実行ボタン66、ファインダ104、ファインダ接眼部105、メモリカード蓋82が設けられている。   A shutter button 61 and a shooting mode dial 64 are provided on the upper surface side of the camera body 2. On the back side of the camera body 2, a power switch 102, a liquid crystal monitor 81, a mode switch 62, a display switching button 63, a cross key 65, an execution button 66, a viewfinder 104, a viewfinder eyepiece 105, and a memory card lid 82 are provided. ing.

モードスイッチ62は撮影モードと再生モードとセットアップモードを切り替えるスイッチである。撮影モードは、写真撮影を行うモードであり、再生モードは、メモリカード25に記録された撮影画像を液晶モニタ81に再生表示するモードである。セットアップモードは各種設定を行うモードである。セットアップモードでは、記録モードをメモリカード25に記録する撮影画像を画像処理後圧縮して記録するモードと、撮影画像を画像処理を行わず非圧縮のまま記録するモード、画像処理後圧縮した画像と画像処理を行わず非圧縮のままの画像の両方を記録するモード、のいずれかを設定できる。セットアップモードにおける各種設定は、セットアップモードを選択した後、液晶モニタ81に表示される設定画面を見ながら、十字キー65、実行ボタン66で設定する。   The mode switch 62 is a switch for switching between a photographing mode, a reproduction mode, and a setup mode. The shooting mode is a mode for taking a picture, and the playback mode is a mode for playing back and displaying the shot image recorded on the memory card 25 on the liquid crystal monitor 81. The setup mode is a mode for performing various settings. In the setup mode, the recording mode is a mode in which a captured image to be recorded in the memory card 25 is compressed and recorded after image processing, a mode in which the captured image is recorded without being subjected to image processing and uncompressed, a compressed image after image processing, Either a mode for recording both uncompressed images without image processing can be set. Various settings in the setup mode are set with the cross key 65 and the execution button 66 while viewing the setting screen displayed on the liquid crystal monitor 81 after selecting the setup mode.

撮影モードダイアル64は撮影モードを切り替えるダイアルである。撮影モードには一駒撮影モード、連続して撮影を行う連写モード、撮影条件を変えて連続して撮影を行うブラケット撮影モードが選択できる。連写モードにおいて連続して撮影する枚数の設定は、液晶モニタ81に表示される設定画面を見ながら、十字キー65、実行ボタン66で設定する。ブラケット撮影モードでは、露出を少しずつ変えて複数枚連続撮影するAEブラケット撮影モードや、露出は一定で絞りとシャッタースピードの組み合わせを変えて連続撮影する絞りブラケット撮影モード、速度ブラケット撮影モードを同様に十字キー65、実行ボタン66で設定できる。   The shooting mode dial 64 is a dial for switching the shooting mode. The shooting mode can be selected from a single frame shooting mode, a continuous shooting mode in which continuous shooting is performed, and a bracket shooting mode in which continuous shooting is performed by changing shooting conditions. The number of images to be continuously shot in the continuous shooting mode is set with the cross key 65 and the execution button 66 while viewing the setting screen displayed on the liquid crystal monitor 81. In the bracket shooting mode, the AE bracket shooting mode in which multiple exposures are taken by changing the exposure little by little, the aperture bracket shooting mode in which the exposure is constant and the combination of the aperture and shutter speed is changed, and the speed bracket shooting mode are the same. This can be set with the cross key 65 and the execution button 66.

図1に示したデジタルカメラ1の内部構成を、図2を用いて説明する。図2(a)、図2(b)は図1のデジタルカメラ1の側面から見た断面図である。図2(a)は撮影前の状態、図2(b)は撮影中の状態である。   The internal configuration of the digital camera 1 shown in FIG. 1 will be described with reference to FIG. 2A and 2B are cross-sectional views as seen from the side of the digital camera 1 in FIG. FIG. 2A shows a state before photographing, and FIG. 2B shows a state during photographing.

デジタルカメラ1は、レンズ交換可能な、いわゆるデジタル一眼レフカメラであり、主としてカメラ本体部2と、カメラ本体部2と結合する撮影レンズ3とから構成される。   The digital camera 1 is a so-called digital single-lens reflex camera with interchangeable lenses, and mainly includes a camera main body 2 and a photographing lens 3 coupled to the camera main body 2.

撮影レンズ3は主として、レンズ鏡胴31、レンズ鏡胴31の内部に設けられる複数のレンズ群32、絞り33等から構成される。複数のレンズ群32の光軸Lに沿って入射した光の大部分は、第1のミラー34aにより90度直角に上部方向(紙面上向き方向)に曲げられ、焦点板38に結像する。結像した光像はペンタプリズム35内部で2回反射し、接眼レンズ104を通して被写体像を、撮影者が見るように構成されている。ペンタプリズム35の上部に設けられた測光センサ41は、前記焦点板38上に結像した被写体像を測光し、被写体の輝度分布の情報を得て自動露出を行う目的で設けられている。   The photographic lens 3 mainly includes a lens barrel 31, a plurality of lens groups 32 provided in the lens barrel 31, a diaphragm 33, and the like. Most of the light incident along the optical axis L of the plurality of lens groups 32 is bent 90 degrees perpendicularly to the upper direction (upward in the drawing) by the first mirror 34 a and forms an image on the focusing screen 38. The formed optical image is reflected twice inside the pentaprism 35, and the photographer views the subject image through the eyepiece 104. The photometric sensor 41 provided on the upper part of the pentaprism 35 is provided for the purpose of photometrically measuring the subject image formed on the focusing screen 38 and obtaining information on the luminance distribution of the subject for automatic exposure.

一方、複数のレンズ群32の光軸Lに沿って入射した光の一部は、半透過鏡である第1のミラー34aを透過し、第2のミラー34bに入射する。前記入射光は第2のミラー34bにより90度直角に下部方向(紙面下向き方向)に曲げられ、光軸L2となってAFセンサ光学ユニット36に入射し、測距センサ42上に結像する。   On the other hand, part of the light incident along the optical axis L of the plurality of lens groups 32 is transmitted through the first mirror 34a, which is a semi-transmissive mirror, and is incident on the second mirror 34b. The incident light is bent 90 degrees perpendicular to the lower direction (downward direction in the drawing) by the second mirror 34b, enters the AF sensor optical unit 36 as an optical axis L2, and forms an image on the distance measuring sensor 42.

次に撮影中の状態について図2(b)を用いて説明する。   Next, a state during photographing will be described with reference to FIG.

撮影中は図示せぬミラー駆動機構により第1のミラー34a、第2のミラー34bは光軸L1から退避し、カメラ本体部2の上部に格納される。図2(a)は撮影前にシャッタ51が光路を遮るように完全に閉じた状態である。撮影中に露光を行う時は図2(b)のようにシャッタ51が上下に開き光路を開放する。   During shooting, the first mirror 34a and the second mirror 34b are retracted from the optical axis L1 by a mirror driving mechanism (not shown) and stored in the upper part of the camera body 2. FIG. 2A shows a state in which the shutter 51 is completely closed so as to block the optical path before photographing. When exposure is performed during shooting, the shutter 51 opens up and down as shown in FIG. 2B to open the optical path.

この状態で、複数のレンズ群32から入射した光は、撮像素子の一例であるCCD(電荷結合素子)5上に結像する。なお、本発明において撮像素子は、CCDに代えて、CMOSセンサ、CIDセンサ等の固体撮像素子であってもよい。CCD5にて取得された映像信号は図示せぬ回路基板でデジタル信号に変換し、画像処理を行った後、メモリカード25に記録する。   In this state, light incident from the plurality of lens groups 32 forms an image on a CCD (charge coupled device) 5 which is an example of an image sensor. In the present invention, the image sensor may be a solid-state image sensor such as a CMOS sensor or a CID sensor instead of the CCD. The video signal acquired by the CCD 5 is converted into a digital signal by a circuit board (not shown), subjected to image processing, and then recorded on the memory card 25.

フラッシュ94は図2(a)ではカメラ本体部2の内部に収納された状態を図示し、図2(b)ではカメラ本体部2から発光部分が飛び出して、被写体に向けて発光できる状態を図示している。   2A shows a state in which the flash 94 is housed inside the camera body 2, and FIG. 2B shows a state in which the light emitting portion is projected from the camera body 2 and can emit light toward the subject. Show.

フラッシュ撮影時はフラッシュ撮影に先だって、フラッシュ94を予備発光し、被写体からの反射光を測光して、本発光時の光量を設定している。   At the time of flash photography, prior to flash photography, the flash 94 is preliminarily emitted, the reflected light from the subject is measured, and the light quantity at the main emission is set.

シャッタ51がまだ閉じている状態で、フラッシュ94を所定の光量で発光すると、被写体で反射した反射光は複数のレンズ群32を通って入射し、シャッタ51の表面で反射し、フラッシュ光量測光センサ43上に結像するように構成されている。   When the flash 94 emits light with a predetermined light amount while the shutter 51 is still closed, the reflected light reflected by the subject enters through the plurality of lens groups 32 and is reflected by the surface of the shutter 51, and the flash light amount photometric sensor. 43 is formed so as to form an image.

撮影レンズ3はズームレンズとして構成され、レンズ群32の配置を変更することにより、焦点距離(撮像倍率)を変更可能としている。   The photographing lens 3 is configured as a zoom lens, and the focal length (imaging magnification) can be changed by changing the arrangement of the lens group 32.

CCD5は、カラーフィルタがそれぞれ付された微細な画素群で構成される撮像素子であり、撮影レンズ3によって結像される被写体の光像(被写体像)を、例えばRGBの色成分を有する画像信号に光電変換する。CCD5の受光面は結像平面と一致するように配置され、イメージサークルを含む結像平面の一部の領域が画像データ(本明細書中では、適宜単に「画像」ともいう。)として取得されることとなる。   The CCD 5 is an image sensor composed of fine pixel groups each provided with a color filter, and an optical signal (subject image) of a subject formed by the photographing lens 3 is converted into an image signal having, for example, RGB color components. To photoelectric conversion. The light receiving surface of the CCD 5 is disposed so as to coincide with the imaging plane, and a partial area of the imaging plane including the image circle is acquired as image data (also simply referred to as “image” as appropriate in this specification). The Rukoto.

撮影レンズ3はズームレンズとして構成され、レンズ群32の配置を変更することにより、焦点距離(撮像倍率)を変更可能としている。   The photographing lens 3 is configured as a zoom lens, and the focal length (imaging magnification) can be changed by changing the arrangement of the lens group 32.

CCD5は、カラーフィルタがそれぞれ付された微細な画素群で構成される撮像素子であり、撮影レンズ3によって結像される被写体の光像(被写体像)を、例えばR(赤)、G(緑)、B(青)の色成分を有する画像信号に光電変換する。CCD5の受光面は結像平面と一致するように配置され、イメージサークルを含む結像平面の一部の領域が画像データ(本明細書中では、適宜単に「画像」ともいう。)として取得されることとなる。   The CCD 5 is an image sensor composed of fine pixel groups each provided with a color filter, and a light image (subject image) of a subject formed by the photographing lens 3 is, for example, R (red), G (green). ) And B (blue) are converted into image signals having photoelectric components. The light receiving surface of the CCD 5 is disposed so as to coincide with the imaging plane, and a partial area of the imaging plane including the image circle is acquired as image data (also simply referred to as “image” as appropriate in this specification). The Rukoto.

図3は、図1、図2のデジタルカメラ1の主たる機能構成を示すブロック図である。なお、図1、図2に示したものと同じ構成要素には同符号を付して説明を省略する。   FIG. 3 is a block diagram showing a main functional configuration of the digital camera 1 of FIGS. 1 and 2. The same components as those shown in FIGS. 1 and 2 are denoted by the same reference numerals, and description thereof is omitted.

デジタルカメラ1は、AD変換部21、本発明の画像処理手段である画像処理部22、操作部60、メインマイコン部7、本発明の第1の記憶手段であるバッファメモリ26、画像メモリ23、本発明の第2の記憶手段であるメモリカード25等を有する。   The digital camera 1 includes an AD conversion unit 21, an image processing unit 22 that is an image processing unit of the present invention, an operation unit 60, a main microcomputer unit 7, a buffer memory 26 that is a first storage unit of the present invention, an image memory 23, It has a memory card 25 or the like as the second storage means of the present invention.

制御手段として機能するメインマイコン部7は、マイクロコンピュータを備えて構成される。すなわち、メインマイコン部7は、各種演算処理を行うCPU70と、演算を行うための作業領域となるRAM75と、制御プログラム等が記憶されるROM76とを備え、デジタルカメラ1の各処理部の動作を統括的に制御する。不揮発性メモリであるROM76としては、例えば、データの電気的な書き換えが可能なEEPROMが採用される。これにより、ROM76は、データの書き換えが可能で、かつ、電源を落とした場合でもそのデータの内容を保持する。   The main microcomputer 7 that functions as a control means is configured to include a microcomputer. That is, the main microcomputer unit 7 includes a CPU 70 that performs various arithmetic processing, a RAM 75 that is a work area for performing arithmetic, and a ROM 76 that stores a control program and the like, and performs operations of the respective processing units of the digital camera 1. Control all over. As the ROM 76 which is a non-volatile memory, for example, an EEPROM capable of electrically rewriting data is adopted. As a result, the ROM 76 can rewrite data and retains the contents of the data even when the power is turned off.

操作部60の独立して設けられた複数の操作部材であるシャッタボタン61、モードスイッチ62、表示切り替えボタン63、撮影モードダイアル64、十字キー65,実行ボタン66および電源スイッチ102の出力はメインマイコン部7に入力されている。   The outputs of the shutter button 61, the mode switch 62, the display switching button 63, the shooting mode dial 64, the cross key 65, the execution button 66 and the power switch 102, which are a plurality of operation members provided independently of the operation unit 60, are the main microcomputer. It is input to part 7.

操作者(ユーザ)は、この操作部60にて所定の操作を行うことにより、各種の設定操作を行うことができる。   An operator (user) can perform various setting operations by performing predetermined operations on the operation unit 60.

例えば、操作者は、モードスイッチ62を操作することによって、デジタルカメラ1のモードを再生モードと撮影モードとの間で切り替えることができる。また、電源スイッチ102で電源のON/OFF操作も行うことができる。   For example, the operator can switch the mode of the digital camera 1 between the playback mode and the shooting mode by operating the mode switch 62. The power switch 102 can also be used to turn on / off the power.

撮影モードダイアル64は1コマ撮影モードと連写撮影モード、ブラケット撮影モードを切り替えるダイアルである。   The shooting mode dial 64 is a dial for switching between a single frame shooting mode, a continuous shooting mode, and a bracket shooting mode.

シャッタボタン61には半押し(S1)でONになるスイッチと全押し(S2)でONになるスイッチが連動しており、CPU70がS1、S2のタイミングを検知できるようになっている。   A switch that is turned on when the shutter button 61 is half-pressed (S1) and a switch that is turned on when the shutter button 61 is fully pressed (S2) are linked to each other, so that the CPU 70 can detect the timing of S1 and S2.

1コマ撮影モードはシャッタボタン61を全押し(S2)すると、1コマの撮影が行われるモード、連写撮影モードはシャッタボタン61を全押し(S2)している間、所定の時間間隔で連続して撮影が行われるモードである。   In single-frame shooting mode, the shutter button 61 is fully pressed (S2), and one frame is shot. In continuous shooting mode, the shutter button 61 is fully pressed (S2). In this mode, shooting is performed.

ブラケット撮影モードには標準的な露出条件から露光量を少しずつずらして自動的に撮影するAEブラケット撮影モードと露光量は一定で絞りまたはシャッタースピードのいずれかを優先して、少しずつずらして撮影する絞りブラケット撮影モード、速度ブラケット撮影モードなどがある。   The bracket shooting mode automatically shoots by shifting the exposure amount gradually from the standard exposure conditions. The AE bracket shooting mode and exposure amount are constant, and priority is given to either the aperture or shutter speed, and the shooting is shifted gradually. There are aperture bracket shooting mode and speed bracket shooting mode.

撮影モードダイアル64をブラケット撮影モードに設定すると、LCD81にAEブラケット撮影モード、絞りブラケット撮影モード、速度ブラケット撮影モードなどを選択し、設定する画面が表示されるので、撮影者は十字キー65,実行ボタン66を使っていずれかを選択する。   When the shooting mode dial 64 is set to the bracket shooting mode, a screen for selecting and setting the AE bracket shooting mode, aperture bracket shooting mode, speed bracket shooting mode, etc. on the LCD 81 is displayed. Either one is selected using the button 66.

各モードの設定は、たとえば、AEブラケット撮影モードではLCD81に露出のずらし量設定値M(EV)と撮影コマ数Kを選択する画面が表示されるので、撮影者は十字キー65,実行ボタン66を使ってMを選択する。たとえば、露出のずらし量設定値Mは1/2(EV)と1/3(EV)を、撮影コマ数Kは3コマと5コマを選択できるようになっている。   For example, in the AE bracket shooting mode, each mode is set by displaying a screen for selecting the exposure shift amount setting value M (EV) and the number of shot frames K on the LCD 81. Use to select M. For example, the exposure shift amount setting value M can be selected from 1/2 (EV) and 1/3 (EV), and the number K of shooting frames can be selected from 3 frames and 5 frames.

一例として、露出のずらし量設定値M(EV)を1/2(EV)に、撮影コマ数Kを3コマに設定すると−1/2(EV)、0(EV)、+1/2(EV)というように1/2(EV)ずつ露光量をずらして自動的に3コマ撮影する。   As an example, if the exposure shift amount setting value M (EV) is set to 1/2 (EV) and the number of shot frames K is set to 3 frames, -1/2 (EV), 0 (EV), +1/2 (EV ) And automatically shoots three frames by shifting the exposure amount by 1/2 (EV).

また、操作者は、表示切替ボタン63を操作することによって、デジタルカメラ1のLCD81の状態を表示状態および非表示状態との間で切り替えることができるようになっている。   Further, the operator can switch the state of the LCD 81 of the digital camera 1 between the display state and the non-display state by operating the display switching button 63.

ミラー駆動部91はメインマイコン部7の指令により、ミラー34を駆動し、撮影レンズ3の光路から退避させる。また、シャッタ駆動部93はメインマイコン部7の指令によりシャッタ51を開放する。   The mirror driving unit 91 drives the mirror 34 according to a command from the main microcomputer unit 7 and retracts it from the optical path of the photographing lens 3. Further, the shutter drive unit 93 opens the shutter 51 in response to a command from the main microcomputer unit 7.

A/D変換部21、バッファメモリ26、画像処理部22および画像メモリ23は、CCD5にて取得された画像を扱う処理部を示している。   The A / D conversion unit 21, the buffer memory 26, the image processing unit 22, and the image memory 23 are processing units that handle images acquired by the CCD 5.

CCD5にて取得されたアナログ信号の画像は、A/D変換部21にてたとえば14ビットのデジタル信号に逐次変換され、デジタル画像データとしてバッファメモリ26に一時記憶される。前記画像データを画像処理を行う前の生データ、すなわちRAWデータと呼ぶ。連写モードやブラケットモードでは、設定された所定の撮影枚数のRAWデータがバッファメモリ26に一時記憶される。   The analog signal image acquired by the CCD 5 is sequentially converted into, for example, a 14-bit digital signal by the A / D converter 21 and temporarily stored in the buffer memory 26 as digital image data. The image data is called raw data before image processing, that is, RAW data. In the continuous shooting mode and the bracket mode, the set predetermined number of RAW data is temporarily stored in the buffer memory 26.

画像処理部22は、WB(White Balance)補正部220、画素補間部221、リニアマトリクス処理部222、ガンマ補正部223、色差マトリクス処理部224、輪郭補正部225、画像圧縮部226などの画像処理機能を有する。ガンマ補正部223、輪郭補正部225、WB補正部220の補正量の設定値はメインマイコン部7の階調変換制御部77、周波数応答制御部78、WB制御部73からの指令により設定される。   The image processing unit 22 includes image processing such as a WB (White Balance) correction unit 220, a pixel interpolation unit 221, a linear matrix processing unit 222, a gamma correction unit 223, a color difference matrix processing unit 224, a contour correction unit 225, and an image compression unit 226. It has a function. The set values of the correction amounts of the gamma correction unit 223, the contour correction unit 225, and the WB correction unit 220 are set by commands from the gradation conversion control unit 77, the frequency response control unit 78, and the WB control unit 73 of the main microcomputer unit 7. .

WB補正部220は、WB制御部73が設定する係数を、CCD5から得た前記RAWデータのRとBの画像データにそれぞれかけ算し、ホワイトバランスを調整する。   The WB correction unit 220 multiplies the coefficient set by the WB control unit 73 by the R and B image data of the RAW data obtained from the CCD 5 and adjusts the white balance.

画素補間部221は、ホワイトバランス調整後のR、G、B毎に画素データを分離し、画素補間を行って、面順次のR、G、B画像データを作る。   The pixel interpolation unit 221 separates pixel data for each of R, G, and B after white balance adjustment, performs pixel interpolation, and creates frame sequential R, G, and B image data.

リニアマトリクス処理部222は、R、G、Bの画像データに3×3のマトリックス演算によりそれぞれ分光感度に応じた係数をかけて加算し、分光感度による色誤差を補正する。   The linear matrix processing unit 222 adds the coefficients corresponding to the spectral sensitivity to the R, G, and B image data by a 3 × 3 matrix calculation and adds the coefficients to correct the color error due to the spectral sensitivity.

ガンマ補正部223は、入出力特性である階調特性を表すルックアップテーブルを持ち、入力されたデジタル値に対応するデジタル値に変換して出力する機能を持っている。すなわち、R、G、B画像データを、階調変換制御部77が前記ルックアップテーブルに設定する階調特性で階調変換する。   The gamma correction unit 223 has a look-up table that represents gradation characteristics as input / output characteristics, and has a function of converting the input digital values into digital values and outputting the digital values. That is, the R, G, B image data is tone-converted with the tone characteristics set by the tone conversion control unit 77 in the lookup table.

色差マトリクス処理部224は、前記ガンマ補正部223で階調変換されたR、G、B画像データに3×3のマトリックス演算を行い、輝度Y、色差Cr、Cb信号に変換する。   The color difference matrix processing unit 224 performs a 3 × 3 matrix operation on the R, G, and B image data subjected to gradation conversion by the gamma correction unit 223 to convert it into luminance Y, color difference Cr, and Cb signals.

輪郭補正部225は、周波数応答制御部78の設定する入出力特性である周波数応答特性で輝度Yの輪郭を補正し、画像メモリ23に一時的に格納する。   The contour correcting unit 225 corrects the contour of the luminance Y with the frequency response characteristic that is the input / output characteristic set by the frequency response control unit 78 and temporarily stores it in the image memory 23.

画像圧縮部226は、画像処理後の画像データをJPEG形式などに圧縮する。   The image compression unit 226 compresses the image data after image processing into a JPEG format or the like.

測距センサ42は自動合焦制御に、測光センサ41とフラッシュ光量測光センサ43は自動露出制御に用いられるセンサである。メインマイコン部7は、入力された各センサの出力電圧をデジタル値に変換し、メインマイコン部7に入力する、図示せぬA/D変換部を備えて構成されている。   The distance measuring sensor 42 is used for automatic focusing control, and the photometric sensor 41 and the flash light quantity measuring sensor 43 are used for automatic exposure control. The main microcomputer unit 7 includes an A / D converter (not shown) that converts the input output voltage of each sensor into a digital value and inputs the digital value to the main microcomputer unit 7.

メインマイコン部7は、自動合焦制御部(AF制御部)71、自動露出制御部(AE制御部)72、階調変換制御部77、周波数応答制御部78、本発明の基準画像選択手段である基準画像選択部74などの各種の制御機能を有する。メインマイコン部7の各種の機能は、予めROM76内に記憶される制御プログラムに従ってCPU70が演算処理を行うことにより実現される。   The main microcomputer unit 7 is an automatic focusing control unit (AF control unit) 71, an automatic exposure control unit (AE control unit) 72, a gradation conversion control unit 77, a frequency response control unit 78, and a reference image selection unit of the present invention. Various control functions such as a reference image selection unit 74 are provided. Various functions of the main microcomputer unit 7 are realized by the CPU 70 performing arithmetic processing according to a control program stored in the ROM 76 in advance.

また、圧縮後の画像をメモリカード25に記録したり、またLCD81などに表示出力する制御機能も持っている。このような画像に対する各種の処理もメインマイコン部7の制御に基づいて行われる。   In addition, it has a control function for recording the compressed image in the memory card 25 and displaying it on the LCD 81 or the like. Various processes for such an image are also performed based on the control of the main microcomputer unit 7.

AF制御部71は、測距センサ42より得られた輝度情報により合焦用評価値を得て、撮影レンズ3の焦点位置を調整することによって自動合焦制御を実現する。   The AF control unit 71 obtains an in-focus evaluation value from the luminance information obtained from the distance measuring sensor 42 and adjusts the focal position of the photographing lens 3 to realize automatic focusing control.

基準画像選択部74は、連続撮影した画像データから所定のアルゴリズムにより画像処理の基準となる基準画像データを選択する。基準画像データ選択のアルゴリズムについては、後で詳しく説明する。   The reference image selection unit 74 selects reference image data that serves as a reference for image processing from image data that has been continuously captured using a predetermined algorithm. The reference image data selection algorithm will be described in detail later.

図3の撮影レンズ3は、ズーム・フォーカス駆動部332および絞り駆動部331を備えている。ズーム・フォーカス駆動部332は、ユーザにより設定される焦点距離となるように、また、焦点が合うように(フォーカシング)レンズ群32に含まれるレンズを適宜光軸方向に駆動する。   3 includes a zoom / focus drive unit 332 and an aperture drive unit 331. The zoom / focus drive unit 332 appropriately drives the lenses included in the lens group 32 in the optical axis direction so that the focal length is set by the user and is in focus (focusing).

AE制御部72は、定常光による撮影の場合、被写体像を複数の測光ブロックに分割して光電変換する測光センサ41により得られた輝度値に基づいて、AE用評価値を算出し自動露出制御を実現する。   In the case of shooting with steady light, the AE control unit 72 calculates an AE evaluation value based on the luminance value obtained by the photometric sensor 41 that photoelectrically converts the subject image into a plurality of photometric blocks, and performs automatic exposure control. To realize.

絞り駆動部331は、AE制御部72により設定される絞り値となるように絞り33の開口径を調整するものである。ズーム・フォーカス駆動部332および絞り駆動部331も電気的にメインマイコン部7に接続され、メインマイコン部7の制御下にて動作する。   The aperture driving unit 331 adjusts the aperture diameter of the aperture 33 so that the aperture value set by the AE control unit 72 is obtained. The zoom / focus drive unit 332 and the aperture drive unit 331 are also electrically connected to the main microcomputer unit 7 and operate under the control of the main microcomputer unit 7.

フラッシュ光による撮影の場合も同様に、AE制御部72は、フラッシュ光量測光センサ43により得られた、測光ブロックの代表輝度値に基づいて、AE用評価値を算出し、フラッシュ94の発光量を制御して自動露出制御を実現する。   Similarly, in the case of shooting with flash light, the AE control unit 72 calculates an AE evaluation value based on the representative luminance value of the photometry block obtained by the flash light quantity photometry sensor 43, and sets the light emission amount of the flash 94. Control to achieve automatic exposure control.

図4は本発明の撮像装置が行う撮影時の概略の手順を説明するフローチャート、図5は本発明の第1の画像処理ルーチンを説明するフローチャート、図6は本発明の第2の画像処理ルーチンを説明するフローチャートである。なお、図4においては、デジタルカメラ1の電源が投入され、撮影モードが選択されて撮影待機状態になってからの処理について説明する。図4では、撮影画像を画像処理後圧縮して記録するモードが選択されているものとする。   FIG. 4 is a flowchart for explaining a schematic procedure at the time of photographing performed by the imaging apparatus of the present invention, FIG. 5 is a flowchart for explaining a first image processing routine of the present invention, and FIG. 6 is a second image processing routine of the present invention. It is a flowchart explaining these. In FIG. 4, processing after the digital camera 1 is turned on, the shooting mode is selected, and the camera enters a shooting standby state will be described. In FIG. 4, it is assumed that a mode for compressing and recording a captured image after image processing is selected.

シャッタボタン61が半押し(S1)になると(ステップS102)、AE制御部72は測光センサ41の出力に応じて自動露出制御を、AF制御部71は測距センサ42の出力に応じて自動焦点制御を行う。AE制御部72は、自動露出制御で得られた露出値E(EV)から絞りとシャッタ速度の組み合わせを求め、露出値E(EV)と得られた絞り値、シャッタ速度の値をRAM75に記録する(ステップS103)。   When the shutter button 61 is half-pressed (S1) (step S102), the AE control unit 72 performs automatic exposure control according to the output of the photometry sensor 41, and the AF control unit 71 performs autofocus according to the output of the distance measurement sensor 42. Take control. The AE control unit 72 obtains a combination of the aperture value and the shutter speed from the exposure value E (EV) obtained by the automatic exposure control, and records the exposure value E (EV) and the obtained aperture value and shutter speed value in the RAM 75. (Step S103).

次に、シャッタボタン61が全押し(S2)になると(ステップS104)、次に、メインマイコン部7は撮影のシーケンスを開始し、所定のタイミングでミラー駆動部91に指令を送り、ミラー34を撮影レンズ3の光路から退避させる(ステップS105)。   Next, when the shutter button 61 is fully pressed (S2) (step S104), the main microcomputer unit 7 starts a shooting sequence, sends a command to the mirror drive unit 91 at a predetermined timing, and moves the mirror 34. Retreat from the optical path of the taking lens 3 (step S105).

次に、メインマイコン部7は設定されているモードがAEブラケット撮影モードかどうか、判定する(ステップS106)。設定されたモードがAEブラケット撮影モードではない場合(ステップS106;No)、メインマイコン部7は設定されているモードが絞りブラケット撮影モード、または速度ブラケット撮影モードかどうか、判定する(ステップS107)。   Next, the main microcomputer unit 7 determines whether the set mode is the AE bracket shooting mode (step S106). When the set mode is not the AE bracket shooting mode (step S106; No), the main microcomputer unit 7 determines whether the set mode is the aperture bracket shooting mode or the speed bracket shooting mode (step S107).

設定されたモードが絞りブラケット撮影モード、または速度ブラケット撮影モードではない場合(ステップS107;No)、AE制御部71は通常の露光値で1コマ露光する。すなわち、AE制御部71は、ステップS103でRAM75に記録した絞り値を、絞り駆動部331に指令して絞り33を設定し、同様に記録されたシャッタ速度により決定される露光時間の間、シャッタ駆動部93に指令してシャッタ51を開き、CCD5に露光する。所定の露光時間が経過すると、AE制御部71はシャッタ駆動部93に指令を送りシャッタ51を閉じる。メインマイコン部7はCCD5から読み出したRAWデータをバッファメモリ26に一時記憶する(ステップS108)。   When the set mode is not the aperture bracket shooting mode or the speed bracket shooting mode (step S107; No), the AE control unit 71 performs one frame exposure with a normal exposure value. That is, the AE control unit 71 instructs the aperture value recorded in the RAM 75 in step S103 to set the aperture 33 by instructing the aperture drive unit 331, and similarly during the exposure time determined by the recorded shutter speed. The drive unit 93 is instructed to open the shutter 51 and expose the CCD 5. When a predetermined exposure time has elapsed, the AE control unit 71 sends a command to the shutter drive unit 93 to close the shutter 51. The main microcomputer unit 7 temporarily stores the RAW data read from the CCD 5 in the buffer memory 26 (step S108).

次に、メインマイコン部7は設定されたモードが連写モードで、かつシャッタボタン61が全押し(S2)かどうかを判定する(ステップS109)。メインマイコン部7は、設定されたモードが連写モードで、かつシャッタボタン61が全押し(S2)の場合(ステップS109;Yes)、ステップS108に戻り、次の1コマを通常の露光量で露光し、RAWデータをバッファメモリ26に一時記憶する。   Next, the main microcomputer unit 7 determines whether or not the set mode is the continuous shooting mode and the shutter button 61 is fully pressed (S2) (step S109). When the set mode is the continuous shooting mode and the shutter button 61 is fully pressed (S2) (step S109; Yes), the main microcomputer unit 7 returns to step S108 to perform the next one frame with the normal exposure amount. Exposure is performed, and RAW data is temporarily stored in the buffer memory 26.

設定されたモードが連写モードではないか、またはシャッタボタン61が全押し(S2)でない場合(ステップS109;No)、ステップS111に進み、メインマイコン部7はミラー駆動部91に指令を送り、ミラー34を所定の状態に復帰させる(ステップS111)。   If the set mode is not the continuous shooting mode or the shutter button 61 is not fully pressed (S2) (step S109; No), the process proceeds to step S111, and the main microcomputer unit 7 sends a command to the mirror driving unit 91, The mirror 34 is returned to a predetermined state (step S111).

設定されたモードが絞りブラケット撮影モード、または速度ブラケット撮影モードの場合(ステップS107;Yes)、AE制御部71はステップS108と同様に、1コマ目を通常の露光量でCCD5に露光し、メインマイコン部7は露光終了後CCD5から読み出されたRAWデータをコマ番号とともにバッファメモリ26に一時記憶する。その後、AE制御部71は設定された絞りまたは速度のずらし量に基づいて、露光量を変えずに絞り値またはシャッタ速度をずらしてCCD5に露光する。メインマイコン部7は、CCD5から読み出したRAWデータを順次バッファメモリ26に一時記憶する。設定された撮影コマ数分、メインマイコン部7はCCD5への露光とRAWデータのバッファメモリ26への一時記憶を繰り返す。設定された撮影コマ数分、撮影すると、ステップS111に進み、メインマイコン部7はミラー駆動部91に指令を送り、ミラー34を所定の状態に復帰させる(ステップS111)。   When the set mode is the aperture bracket shooting mode or the speed bracket shooting mode (step S107; Yes), the AE control unit 71 exposes the first frame to the CCD 5 with the normal exposure amount in the same manner as in step S108. The microcomputer unit 7 temporarily stores the RAW data read from the CCD 5 after completion of exposure in the buffer memory 26 together with the frame number. Thereafter, the AE control unit 71 exposes the CCD 5 while shifting the aperture value or the shutter speed without changing the exposure amount based on the set aperture or speed shift amount. The main microcomputer unit 7 temporarily stores the RAW data read from the CCD 5 in the buffer memory 26 sequentially. The main microcomputer unit 7 repeats exposure to the CCD 5 and temporary storage of the RAW data in the buffer memory 26 for the set number of frames. When shooting is performed for the set number of frames, the process proceeds to step S111, where the main microcomputer unit 7 sends a command to the mirror drive unit 91 to return the mirror 34 to a predetermined state (step S111).

次に、画像処理ルーチン1に進み、画像処理部22はバッファメモリ26に一時記憶しているRAWデータに画素補間、マトリクス処理、WB補正、ガンマ補正、輪郭補正などの画像処理を行う(ステップS200)。画像処理ルーチン1では、すべての撮影コマの画像データを平均して基準コマを決定し、基準コマと同じ設定値ですべてのコマのWB補正、ガンマ補正、輪郭補正を行うのが特徴である。ステップS200で行う画像処理ルーチン1については後で詳述する。   Next, proceeding to the image processing routine 1, the image processing unit 22 performs image processing such as pixel interpolation, matrix processing, WB correction, gamma correction, and contour correction on the RAW data temporarily stored in the buffer memory 26 (step S200). ). The image processing routine 1 is characterized in that the image data of all shot frames is averaged to determine a reference frame, and WB correction, gamma correction, and contour correction are performed on all frames with the same setting values as the reference frame. The image processing routine 1 performed in step S200 will be described in detail later.

次に、画像圧縮部226はステップS200で画像処理を行った画像データを圧縮し、圧縮した画像データは一旦画像メモリ23に保存する。その後、メインマイコン部7は前記画像データを順次メモリカード25に記録する(ステップS130)。撮影はこれで終了である。   Next, the image compression unit 226 compresses the image data that has been subjected to image processing in step S <b> 200 and temporarily stores the compressed image data in the image memory 23. Thereafter, the main microcomputer unit 7 sequentially records the image data on the memory card 25 (step S130). This is the end of shooting.

設定されたモードがAEブラケット撮影モードの場合(ステップS106;Yes)、AE制御部71はステップS108と同様に、1コマ目を通常の露光値でCCD5に露光し、メインマイコン部7は露光終了後CCD5から読み出されたRAWデータをバッファメモリ26に一時記憶する。次に、AE制御部71は設定された露出のずらし量設定値M(EV)と撮影コマ数Kに基づいて露光量を決定する。その後、AE制御部71は設定された露出のずらし量設定値Mに基づいて、絞り値とシャッタ速度の値を変更して露光量を変え、CCD5に露光する。メインマイコン部7は、CCD5から読み出したRAWデータをコマ番号とともに順次バッファメモリ26に一時記憶する。設定された撮影コマ数分、メインマイコン部7はCCD5への露光とRAWデータのバッファメモリ26への一時記憶を繰り返す。設定された撮影コマ数分、撮影すると、ステップS121に進み、メインマイコン部7はミラー駆動部91に指令を送り、ミラー34を所定の状態に復帰させる(ステップS121)。   When the set mode is the AE bracket shooting mode (step S106; Yes), the AE control unit 71 exposes the first frame to the CCD 5 with the normal exposure value as in step S108, and the main microcomputer unit 7 ends the exposure. Thereafter, the RAW data read from the CCD 5 is temporarily stored in the buffer memory 26. Next, the AE control unit 71 determines the exposure amount based on the set exposure shift amount setting value M (EV) and the number K of shot frames. Thereafter, the AE control unit 71 changes the exposure value by changing the aperture value and the shutter speed value based on the set exposure shift amount setting value M, and exposes the CCD 5. The main microcomputer section 7 temporarily stores the RAW data read from the CCD 5 together with the frame number in the buffer memory 26 sequentially. The main microcomputer unit 7 repeats exposure to the CCD 5 and temporary storage of the RAW data in the buffer memory 26 for the set number of frames. When shooting is performed for the set number of frames, the process proceeds to step S121, and the main microcomputer unit 7 sends a command to the mirror drive unit 91 to return the mirror 34 to a predetermined state (step S121).

次に、AEブラケット撮影画像処理ルーチンに進み、画像処理部22はバッファメモリ26に一時記憶しているRAWデータに画素補間、マトリクス処理、WB補正、ガンマ補正、輪郭補正などの画像処理を行う(ステップS300)。AEブラケット撮影画像処理ルーチンでは、通常の露光量で撮影した撮影コマを基準コマとし、各コマの露出のずらし量に応じて、ガンマ補正の特性を変更する点が画像処理ルーチン1との大きな違いである。ステップS300で行うAEブラケット撮影画像処理ルーチンについては後で詳述する。   Next, proceeding to the AE bracketing image processing routine, the image processing unit 22 performs image processing such as pixel interpolation, matrix processing, WB correction, gamma correction, and contour correction on the RAW data temporarily stored in the buffer memory 26 ( Step S300). The AE bracketing image processing routine differs from the image processing routine 1 in that the gamma correction characteristic is changed according to the exposure shift amount of each frame, with the shot frame shot at the normal exposure amount as the reference frame. It is. The AE bracketing image processing routine performed in step S300 will be described in detail later.

次に、画像圧縮部226はステップS300で画像処理を行った画像データを圧縮し、圧縮された画像データは一旦画像メモリ23に保存する。その後、メインマイコン部7は前記画像データを順次メモリカード25に記録する(ステップS320)。撮影はこれで終了である。   Next, the image compression unit 226 compresses the image data that has been subjected to image processing in step S300, and temporarily stores the compressed image data in the image memory 23. Thereafter, the main microcomputer unit 7 sequentially records the image data on the memory card 25 (step S320). This is the end of shooting.

次に本発明の第1の実施の形態である画像処理ルーチン1(ステップS200)について図5を用いて説明する。   Next, the image processing routine 1 (step S200) according to the first embodiment of the present invention will be described with reference to FIG.

図7は撮像装置より得られた画像データ分布の例を説明する説明図、図8は本発明で被写体輝度分布に応じて実施する階調変換特性の例を説明する説明図、図9は本発明で被写体輝度分布に応じて実施する周波数応答特性の例を説明する説明図である。   FIG. 7 is an explanatory diagram for explaining an example of image data distribution obtained from the image pickup apparatus, FIG. 8 is an explanatory diagram for explaining an example of gradation conversion characteristics implemented according to the subject luminance distribution in the present invention, and FIG. It is explanatory drawing explaining the example of the frequency response characteristic implemented according to subject brightness distribution by invention.

以下、図5に示すフローチャートと合わせて図7、図8、図9も説明する。   Hereinafter, FIGS. 7, 8, and 9 will be described together with the flowchart shown in FIG.

画像処理ルーチン1が起動されると、メインマイコン部7はバッファメモリ26に一時記憶された各コマのRAWデータを順次画像処理部22に送る。WB補正部220は各コマのRAWデータからR、G、B各色毎に画素データ分離して加算し、すべてのコマのR、G、B各色の平均値Rav、Gav、Bavを求める。次に、WB補正部220はR、G、B平均値Rav、Gav、Bavから、WB補正のためにR、Bの画素データにかけるWB係数Rg、Bgを式(1)、式(2)で求める。なお、Rg、Bgの値には上限値、下限値が決められており、必要以上に補正がかからないようにしている(ステップS211)。   When the image processing routine 1 is started, the main microcomputer unit 7 sequentially sends the RAW data of each frame temporarily stored in the buffer memory 26 to the image processing unit 22. The WB correction unit 220 separates and adds pixel data for each color of R, G, and B from the RAW data of each frame, and obtains average values Rav, Gav, and Bav for each color of R, G, and B of all frames. Next, the WB correction unit 220 calculates the WB coefficients Rg and Bg to be applied to the R and B pixel data for WB correction from the R, G, and B average values Rav, Gav, and Bav using the equations (1) and (2). Ask for. Note that an upper limit value and a lower limit value are determined for the values of Rg and Bg, and correction is not performed more than necessary (step S211).

Rg=Gav/Rav (1)
Bg=Gav/Bav (2)
WB補正部220はステップS211で求めたWB係数Rg、Bgを、各コマのRAWデータのR、B画素データにかけてWB補正を行う。その結果得られた各コマの画像データをバッファメモリ26に一時記憶する(ステップS212)。
Rg = Gav / Rav (1)
Bg = Gav / Bav (2)
The WB correction unit 220 performs WB correction by applying the WB coefficients Rg and Bg obtained in step S211 to the R and B pixel data of the RAW data of each frame. The image data of each frame obtained as a result is temporarily stored in the buffer memory 26 (step S212).

次に、画素補間部221はバッファメモリ26に一時記憶されたWB補正後の各コマのRAWデータを、画素補間し、R、G、Bの面順次画像データにする。次にリニアマトリクス処理部222では各コマのR、G、Bの各画素データに、3×3のマトリクス演算で分光感度を補正する係数をかけてR’、G’、B’を求め、R’、G’、B’の面順次画像データを得る。画素補間部221は得られた各コマの面順次画像データを画像メモリ23に一時記憶する(ステップS213)。   Next, the pixel interpolating unit 221 interpolates the RAW data of each frame after WB correction temporarily stored in the buffer memory 26 to obtain R, G, and B frame sequential image data. Next, the linear matrix processing unit 222 obtains R ′, G ′, and B ′ by multiplying the R, G, and B pixel data of each frame by a coefficient that corrects the spectral sensitivity by 3 × 3 matrix calculation. Obtain frame sequential image data of ', G', B '. The pixel interpolation unit 221 temporarily stores the obtained frame sequential image data of each frame in the image memory 23 (step S213).

次に、基準画像選択部74は、ステップS213で画像メモリ23に一時記憶されたすべてのコマのR’、G’、B’面順次画像データから、各コマのR’、G’、B’各色の平均値R’h(i)、G’h(i)、B’h(i)を求める。ここでiはコマ番号である。基準画像選択部74は各コマのR’、G’、B’各色の平均値R’h(i)、G’h(i)、B’h(i)から全コマの平均値R’t、G’t、B’tを求める(ステップS214)。   Next, the reference image selection unit 74 performs R ′, G ′, B ′ of each frame from the R ′, G ′, B ′ plane sequential image data of all the frames temporarily stored in the image memory 23 in step S213. Average values R′h (i), G′h (i), and B′h (i) for each color are obtained. Here, i is a frame number. The reference image selection unit 74 calculates the average value R′t of all frames from the average values R′h (i), G′h (i), and B′h (i) of R ′, G ′, and B ′ of each frame. , G′t and B′t are obtained (step S214).

次に、基準画像選択部74は、得られた全コマの平均値と各コマの平均値から、式(3)により評価値S(i)を求める。   Next, the reference image selection unit 74 obtains the evaluation value S (i) from the obtained average value of all frames and the average value of each frame, using Equation (3).

S(i)=(R’t−R’h(i))2+(G’t−G’h(i))2+(B’t−B’h(i))2 (3)
基準画像選択部74は、式(3)で得られた評価値S(i)が最も少ないコマを基準コマに選択する(ステップS215)。ここでは基準コマのコマ番号をkとする。
S (i) = (R′t−R′h (i)) 2 + (G′t−G′h (i)) 2 + (B′t−B′h (i)) 2 (3)
The reference image selection unit 74 selects a frame having the smallest evaluation value S (i) obtained by Expression (3) as a reference frame (step S215). Here, the frame number of the reference frame is k.

次に、WB補正部220は基準コマに最適なWB補正のための係数Rg(k)、Bg(k)をステップS212と同様の手順で求める。   Next, the WB correction unit 220 obtains coefficients Rg (k) and Bg (k) for WB correction optimal for the reference frame in the same procedure as in step S212.

WB補正部220は基準コマのRAWデータからR、G、B各色毎に画素データ分離して加算し、基準コマのR、G、B各色の平均値Rav(k)、Gav(k)、Bav(k)を求め、WB補正のためにR、Bの画素データにかけるWB係数Rg(k)、Bg(k)を式(1)、式(2)で求める。   The WB correction unit 220 separates and adds pixel data for each color of R, G, and B from the RAW data of the reference frame, and averages Rav (k), Gav (k), and Bav for each of the R, G, and B colors of the reference frame. (K) is obtained, and WB coefficients Rg (k) and Bg (k) to be applied to the R and B pixel data for WB correction are obtained by Expressions (1) and (2).

WB補正部220は基準コマのWB係数Rg(k)、Bg(k)を各コマのRAWデータのR、B画素データにかけてWB補正を行う。その結果得られた各コマの画像データを画像メモリ23に一時記憶する(ステップS216)。   The WB correction unit 220 performs WB correction by applying the WB coefficients Rg (k) and Bg (k) of the reference frame to the R and B pixel data of the RAW data of each frame. The image data of each frame obtained as a result is temporarily stored in the image memory 23 (step S216).

次に、ステップS213と同様に画素補間とマトリクス処理を行い、R’’、G’’、B’’の面順次画像データを得る。画素補間部221は得られた各コマの面順次画像データを画像メモリ23に一時記憶する(ステップS217)。   Next, pixel interpolation and matrix processing are performed in the same manner as in step S213 to obtain frame sequential image data of R ″, G ″, and B ″. The pixel interpolation unit 221 temporarily stores the obtained frame sequential image data of each frame in the image memory 23 (step S217).

次に、メインマイコン部7は、画像メモリ23に一時記憶された基準コマのR’’、G’’、B’’の面順次画像データから、同じ数値データを持つ画素の数を計数する(ステップS218)。   Next, the main microcomputer unit 7 counts the number of pixels having the same numerical data from the frame sequential image data of R ″, G ″, B ″ of the reference frame temporarily stored in the image memory 23 ( Step S218).

図7はステップS218で計数した結果を示すグラフである。ここでは各画素が14ビットすなわち最大16384の数値データを持つものとする。図7(a)は被写体のコントラストが低い場合、図7(b)は被写体のコントラストが高い場合に得られた数値データ分布の一例を示す。   FIG. 7 is a graph showing the results counted in step S218. Here, it is assumed that each pixel has numerical data of 14 bits, that is, a maximum of 16384. FIG. 7A shows an example of numerical data distribution obtained when the subject contrast is low, and FIG. 7B shows the numerical data distribution obtained when the subject contrast is high.

次に、階調変換制御部77はステップS218で得られた基準コマの数値データ分布に応じて、ガンマ補正部の階調特性を設定する(ステップS219)。   Next, the gradation conversion control unit 77 sets the gradation characteristics of the gamma correction unit in accordance with the numerical data distribution of the reference frame obtained in step S218 (step S219).

ここで、ステップS219でガンマ補正部の階調特性を設定する手順について、図7、図8を用いて説明する。   Here, the procedure for setting the gradation characteristics of the gamma correction unit in step S219 will be described with reference to FIGS.

図8は基準コマの数値データ分布に応じて選択する階調特性の例を説明する説明図である。図8(a)、図8(b)は両対数グラフであり、横軸は入力する各画素の数値データ、縦軸は出力の数値データである。図8では入力14ビット、出力8ビットで図示している。また、図8の階調特性の傾きがガンマ値に相当する。このような階調特性はROM76に記憶されており、階調変換制御部77は最適な階調特性を選択し、ガンマ補正部223に設定する。   FIG. 8 is an explanatory diagram for explaining an example of gradation characteristics selected according to the numerical data distribution of the reference frame. FIGS. 8A and 8B are log-log graphs, in which the horizontal axis represents the numerical data of each input pixel, and the vertical axis represents the output numerical data. In FIG. 8, the input is 14 bits and the output is 8 bits. Further, the gradient of the gradation characteristic in FIG. 8 corresponds to the gamma value. Such gradation characteristics are stored in the ROM 76, and the gradation conversion control unit 77 selects an optimum gradation characteristic and sets it in the gamma correction unit 223.

次に、階調変換制御部77が最適な階調特性を選択する手順を説明する。階調変換制御部77はステップS218で得られた基準コマの数値データ分布とコントラストが低い場合または高い場合の標準数値データ分布との相関を評価して、基準コマの数値データ分布のコントラストが高いか、低いかを判定する。   Next, a procedure for the gradation conversion control unit 77 to select an optimum gradation characteristic will be described. The gradation conversion control unit 77 evaluates the correlation between the numerical data distribution of the reference frame obtained in step S218 and the standard numerical data distribution when the contrast is low or high, and the contrast of the numerical data distribution of the reference frame is high. Or low.

図8(a)は被写体の輝度分布が図7(a)に示すようにコントラストが低い場合、適用する階調特性の例である。   FIG. 8A shows an example of gradation characteristics to be applied when the luminance distribution of the subject has a low contrast as shown in FIG. 7A.

コントラストが低い場合はできるだけ階調を豊かに再現できるように、ガンマ値を大に設定する。すなわち、図8(a)の例では、数値データ8200を中心として狭い範囲に分布しているので、この狭い範囲の数値データを記録する際に、階調を最大限使って再現できるように入出力特性の傾きを立てている。たとえばガンマ値は0.7である。   When the contrast is low, the gamma value is set large so that the gradation can be reproduced as richly as possible. That is, in the example of FIG. 8 (a), since the numerical data 8200 is distributed in a narrow range, the numerical data in this narrow range is recorded so that it can be reproduced with the maximum possible gradation. The output characteristics are tilted. For example, the gamma value is 0.7.

図8(b)は被写体の輝度分布が図7(b)に示すようにコントラストが高い場合に、適用する階調特性の例である。   FIG. 8B shows an example of gradation characteristics to be applied when the luminance distribution of the subject has a high contrast as shown in FIG. 7B.

コントラストが高い場合はできるだけ階調を豊かに再現できるように、ガンマ値を小に設定する。すなわち、図8(b)の例では、数値データ8200を中心として広い範囲に分布しているので、この広い範囲の数値データを記録する際に、階調を最大限使って再現できるように入出力特性の傾きを寝かせている。たとえばガンマ値は0.4である。   When the contrast is high, the gamma value is set small so that the gradation can be reproduced as richly as possible. That is, in the example of FIG. 8B, since the numerical data 8200 is distributed over a wide range, the numerical data in the wide range is recorded so that it can be reproduced with the maximum possible gradation. The slope of the output characteristics is laid down. For example, the gamma value is 0.4.

このようにステップS219で設定された基準コマに最適な階調特性に基づき、ガンマ補正部223は画像メモリ23に一時記憶されたすべてのコマの画像データを順次ガンマ補正し(ステップS220)、色差マトリックス部224で輝度Yと色差Cr、Cbに変換し、画像メモリ23に一時記憶する(ステップS221)。   As described above, the gamma correction unit 223 sequentially performs gamma correction on the image data of all the frames temporarily stored in the image memory 23 based on the gradation characteristics optimum for the reference frame set in step S219 (step S220), and the color difference. The matrix unit 224 converts the luminance Y and the color differences Cr and Cb, and temporarily stores them in the image memory 23 (step S221).

次に、メインマイコン部7はステップS218で得られた数値データ分布から、被写体のコントラスト状況を判定し、基準コマに最適な輪郭補正部の周波数応答特性を設定する(ステップS222)。   Next, the main microcomputer unit 7 determines the contrast status of the subject from the numerical data distribution obtained in step S218, and sets the frequency response characteristic of the contour correction unit optimal for the reference frame (step S222).

図9は数値データ分布のコントラストに応じて選択する周波数応答特性の例を説明する説明図である。図9(a)、図9(b)の横軸は撮影画像の空間周波数、縦軸は出力応答である。   FIG. 9 is an explanatory diagram illustrating an example of frequency response characteristics selected according to the contrast of the numerical data distribution. 9A and 9B, the horizontal axis represents the spatial frequency of the captured image, and the vertical axis represents the output response.

図9(a)は被写体の輝度分布が図7(a)に示すようにコントラストが低い場合、適用する周波数応答特性の例である。   FIG. 9A shows an example of frequency response characteristics to be applied when the luminance distribution of the subject has a low contrast as shown in FIG. 7A.

被写体輝度のコントラストが低い場合は、できるだけ輪郭を強調して再現できるように、周波数応答の高周波応答を上げて設定する。すなわち、図9(a)の例のように、低周波領域よりも高周波の応答を上げている。   When the contrast of the subject brightness is low, the high frequency response is set so that the contour can be reproduced with the emphasis as much as possible. That is, as in the example of FIG. 9A, the response of the high frequency is raised compared to the low frequency region.

図9(b)は被写体の輝度分布が図7(b)に示すようにコントラストが高い場合に、適用する周波数応答特性の例である。   FIG. 9B shows an example of frequency response characteristics to be applied when the luminance distribution of the subject has a high contrast as shown in FIG. 7B.

被写体輝度のコントラストが高い場合は、輪郭をあまり強調すると画面がぎらつくので、周波数応答の高周波応答を下げて設定する。すなわち、図9(b)の例のように、低周波領域よりも高周波の応答を下げている。   When the contrast of the subject brightness is high, the screen becomes glaring if the outline is emphasized too much, so the high frequency response of the frequency response is set to be low. That is, as in the example of FIG. 9B, the high frequency response is lowered than in the low frequency region.

このように設定された基準コマの周波数応答特性に基づき、輪郭補正部225はすべてのコマの輪郭補正を順次行い、輪郭補正後の画像データを画像メモリ23に一時記憶する(ステップS218)。これで画像処理ルーチン1は終了し、元のルーチンのステップS130に戻り、画像圧縮後メモリーカードに画像をメモリカード25に記録する。   Based on the frequency response characteristic of the reference frame set in this way, the contour correcting unit 225 sequentially performs contour correction of all the frames, and temporarily stores the image data after the contour correction in the image memory 23 (step S218). This completes the image processing routine 1, returns to step S130 of the original routine, and records the image on the memory card 25 after the image compression.

次に本発明の第2の実施形態である画像処理ルーチン2(ステップS300)について図6を用いて説明する。画像処理ルーチン2はAEブラケット撮影モードで行う画像処理ルーチンである。図5で説明した処理と基本的な処理内容は同じであるので、図5と同じ処理には同符号を付け説明を省略する。   Next, an image processing routine 2 (step S300) according to the second embodiment of the present invention will be described with reference to FIG. The image processing routine 2 is an image processing routine performed in the AE bracket shooting mode. Since the basic processing content is the same as the processing described in FIG. 5, the same processing as in FIG.

画像処理ルーチン2が起動されると、メインマイコン部7はバッファメモリ26に一時記憶された各コマのRAWデータを順次画像処理部22に送る。WB補正部220は各コマのRAWデータから、すべてのコマのR、G、B各色の平均値Rav、Gav、Bavを求め、R、Bの画素データにかけるWB係数Rg、Bgを求める(ステップS211)。   When the image processing routine 2 is activated, the main microcomputer unit 7 sequentially sends the RAW data of each frame temporarily stored in the buffer memory 26 to the image processing unit 22. The WB correction unit 220 obtains average values Rav, Gav, Bav of R, G, B colors of all the frames from the RAW data of each frame, and obtains WB coefficients Rg, Bg to be applied to the R, B pixel data (step) S211).

WB補正部220はステップS211で求めたWB係数Rg、Bgを、各コマのRAWデータのR、B画素データにかけてWB補正を行う。その結果得られた各コマの画像データをバッファメモリ26に一時記憶する(ステップS212)。   The WB correction unit 220 performs WB correction by applying the WB coefficients Rg and Bg obtained in step S211 to the R and B pixel data of the RAW data of each frame. The image data of each frame obtained as a result is temporarily stored in the buffer memory 26 (step S212).

基準コマを選定するにあたって、AEブラケット撮影モードでは通常の露光値で露光されたコマを基準に、露光をずらしたコマを撮影するので、通常の露光値で露光されたコマを基準コマとすれば良い。基準画像選択部74はバッファメモリ26に一時記憶された通常の露光値で露光されたコマのRAWデータを画像処理部22に送る(ステップS311)。   In selecting the reference frame, in the AE bracket shooting mode, a frame with a different exposure is shot based on the frame exposed with the normal exposure value. Therefore, if the frame exposed with the normal exposure value is used as the reference frame, good. The reference image selection unit 74 sends the RAW data of the frame exposed with the normal exposure value temporarily stored in the buffer memory 26 to the image processing unit 22 (step S311).

WB補正部220は基準コマに最適なWB補正のための係数Rg(k)、Bg(k)をステップS216と同様の手順で求め、基準コマのWB係数Rg(k)、Bg(k)を各コマのRAWデータのR、B画素データにかけてWB補正を行う。その結果得られた各コマの画像データを画像メモリ23に一時記憶する(ステップS216)。   The WB correction unit 220 obtains coefficients Rg (k) and Bg (k) for WB correction optimum for the reference frame in the same procedure as in step S216, and calculates the WB coefficients Rg (k) and Bg (k) of the reference frame. WB correction is performed on the R and B pixel data of the RAW data of each frame. The image data of each frame obtained as a result is temporarily stored in the image memory 23 (step S216).

次に、ステップS213と同様に画素補間とマトリクス処理を行い、R’’、G’’、B’’の面順次画像データを得る。画素補間部221は得られた各コマの面順次画像データを画像メモリ23に一時記憶する(ステップS217)。   Next, pixel interpolation and matrix processing are performed in the same manner as in step S213 to obtain frame sequential image data of R ″, G ″, and B ″. The pixel interpolation unit 221 temporarily stores the obtained frame sequential image data of each frame in the image memory 23 (step S217).

次に、メインマイコン部7は、画像メモリ23に一時記憶された基準コマのR’’、G’’、B’’の面順次画像データから、同じ数値データを持つ画素の数を計数する(ステップS218)。   Next, the main microcomputer unit 7 counts the number of pixels having the same numerical data from the frame sequential image data of R ″, G ″, B ″ of the reference frame temporarily stored in the image memory 23 ( Step S218).

次に、メインマイコン部7はステップS218で得られた基準コマの数値データ分布から、基準コマに最適な階調特性を設定する(ステップS319)。   Next, the main microcomputer unit 7 sets the optimum gradation characteristics for the reference frame from the numerical data distribution of the reference frame obtained in step S218 (step S319).

AEブラケット撮影モードでは、基準コマ以外は通常の露光量に対して露光量をずらして撮影するので、階調変換制御部77は基準コマに最適な階調特性を基準に、基準コマ以外の階調特性をずらし露光量に合わせて設定する(ステップS320)。   In the AE bracket shooting mode, the exposure is shifted with respect to the normal exposure except for the reference frame. Therefore, the gradation conversion control unit 77 uses the gradation characteristics optimum for the reference frame as a reference and sets the levels other than the reference frame. The tone characteristic is shifted and set according to the exposure amount (step S320).

図10はAEブラケット撮影モードで用いる階調特性の一例である。たとえば、基準コマの撮影データに適用する階調特性はγ1、−1/2(EV)ずらした撮影データに適用する階調特性はγ2、+1/2(EV)ずらした撮影データに適用する階調特性はγ3である。これらの特性はROM76に記憶されており、階調変換制御部77はこれらを読み出して、ガンマ補正部223に設定する。   FIG. 10 shows an example of gradation characteristics used in the AE bracket shooting mode. For example, the gradation characteristic applied to the shooting data of the reference frame is γ1, and the gradation characteristic applied to the shooting data shifted by −1/2 (EV) is the floor applied to the shooting data shifted by γ2, +1/2 (EV). The tonal characteristic is γ3. These characteristics are stored in the ROM 76, and the gradation conversion control unit 77 reads these and sets them in the gamma correction unit 223.

ガンマ補正部223は画像メモリ23に一時記憶されたすべてのコマの画像データを順次ガンマ補正し(ステップS220)、図示せぬ色差マトリックス部で輝度Yと色差Cr、Cbに変換し、画像メモリ23に一時記憶する(ステップS221)。   The gamma correction unit 223 sequentially performs gamma correction on the image data of all frames temporarily stored in the image memory 23 (step S220), and converts them into luminance Y and color differences Cr and Cb in a color difference matrix unit (not shown). (Step S221).

次に、メインマイコン部7はステップS218で得られた数値データ分布から、被写体のコントラスト状況を判定し、基準コマに最適な輪郭補正部の周波数応答特性を設定する(ステップS222)。   Next, the main microcomputer unit 7 determines the contrast status of the subject from the numerical data distribution obtained in step S218, and sets the frequency response characteristic of the contour correction unit optimal for the reference frame (step S222).

このように設定された基準コマの周波数応答特性に基づき、輪郭補正部225はすべてのコマの輪郭補正を順次行い、輪郭補正後の画像データを画像メモリ23に一時記憶する(ステップS223)。これで画像処理ルーチン1は終了し、元のルーチンのステップS130に戻り、画像圧縮後メモリカード25に記録する。   Based on the frequency response characteristics of the reference frame set in this way, the contour correcting unit 225 sequentially performs contour correction of all the frames, and temporarily stores the image data after the contour correction in the image memory 23 (step S223). This completes the image processing routine 1, returns to the original routine step S130, and records the image in the memory card 25 after image compression.

次に、本発明の第3、第4の実施の形態として、デジタルカメラ1で撮影した画像データの画像処理をコンピュータで行う場合について説明する。   Next, as third and fourth embodiments of the present invention, a case where image processing of image data captured by the digital camera 1 is performed by a computer will be described.

図11は本発明に係わるデジタルカメラ1と撮影した画像データを記録するメモリカード25と画像処理を行うコンピュータ500のブロック図である。図12は本発明の第3、第4の実施の形態において、撮像装置が行う撮影時の概略の手順を説明するフローチャート、図13は本発明の第3、第4の実施の形態において、コンピュータ500が実行するデジタルカメラ用画像処理プログラムの概略の手順を説明するフローチャートである。   FIG. 11 is a block diagram of a digital camera 1 according to the present invention, a memory card 25 for recording captured image data, and a computer 500 for performing image processing. FIG. 12 is a flowchart for explaining a schematic procedure at the time of photographing performed by the imaging apparatus in the third and fourth embodiments of the present invention. FIG. 13 is a computer in the third and fourth embodiments of the present invention. 5 is a flowchart for explaining a schematic procedure of an image processing program for a digital camera executed by 500.

最初に、図11のブロック図について説明する。   First, the block diagram of FIG. 11 will be described.

コンピュータ500は各種演算処理を行うCPU530と、演算を行うための作業領域となるRAM501と、OSとデジタルカメラ用画像処理プログラムとコンテンツ等の各種データが記憶されるHDD502とを備え、デジタルカメラの記録媒体であるメモリカード25に記録された各種データを読み込み可能なカードインターフェイス504(以下カードIF504と記す)を備えている。また、コンピュータ500にはキーボード、マウスなどで構成される入力部505と、液晶モニタなどのモニタ580が接続されている。   The computer 500 includes a CPU 530 that performs various arithmetic processes, a RAM 501 that is a work area for performing arithmetic operations, and an HDD 502 that stores an OS, an image processing program for a digital camera, and various data such as contents, and the like. A card interface 504 (hereinafter referred to as a card IF 504) capable of reading various data recorded on a memory card 25 as a medium is provided. Further, the computer 500 is connected with an input unit 505 including a keyboard and a mouse, and a monitor 580 such as a liquid crystal monitor.

次に、CPU530の機能について説明する。   Next, functions of the CPU 530 will be described.

画像処理部521は、WB(White Balance)補正部520、画素補間部521、リニアマトリクス処理部522、ガンマ補正部523、色差マトリクス処理部524、輪郭補正部525、画像圧縮部526など画像処理部22と同等の機能を有し、すべての機能をCPU530のソフトウェア処理で行っている。そのため、ガンマ補正部523、輪郭補正部525、WB補正部520の補正量の設定値はCPU530が行うソフトウェア処理のなかで設定される。   The image processing unit 521 includes an image processing unit such as a WB (White Balance) correction unit 520, a pixel interpolation unit 521, a linear matrix processing unit 522, a gamma correction unit 523, a color difference matrix processing unit 524, a contour correction unit 525, and an image compression unit 526. 22, and all functions are performed by software processing of the CPU 530. For this reason, the set values of the correction amounts of the gamma correction unit 523, the contour correction unit 525, and the WB correction unit 520 are set in software processing performed by the CPU 530.

WB補正部520は、CPU530が設定する係数を、メモリカード25から得たデジタルカメラ1で得られた後述するRAWデータのRとBの画像データにそれぞれかけ算し、ホワイトバランスを調整する。   The WB correction unit 520 multiplies the coefficient set by the CPU 530 with R and B image data of RAW data (to be described later) obtained by the digital camera 1 obtained from the memory card 25, and adjusts the white balance.

画素補間部521は、ホワイトバランス調整後のR、G、B毎に画素データを分離し、画素補間を行って、面順次のR、G、B画像データを作る。   The pixel interpolation unit 521 separates pixel data for each of R, G, and B after the white balance adjustment, performs pixel interpolation, and creates frame sequential R, G, and B image data.

リニアマトリクス処理部522は、R、G、Bの画像データに3×3のマトリックス演算によりそれぞれ分光感度に応じた係数をかけて加算し、分光感度による色誤差を補正する。   The linear matrix processing unit 522 adds a coefficient corresponding to the spectral sensitivity to each of the R, G, and B image data by a 3 × 3 matrix calculation, and corrects the color error due to the spectral sensitivity.

ガンマ補正部523は、入出力特性である階調特性を表すルックアップテーブルを持ち、入力されたデジタル値に対応するデジタル値に変換して出力する機能を持っている。すなわち、R、G、B画像データを、CPU530が前記ルックアップテーブルに設定する階調特性で階調変換する。   The gamma correction unit 523 has a look-up table that represents gradation characteristics that are input / output characteristics, and has a function of converting the input digital values into digital values and outputting the digital values. That is, the R, G, B image data is tone-converted with the tone characteristics set by the CPU 530 in the look-up table.

色差マトリクス処理部524は、CPU530が階調変換したR、G、B画像データに3×3のマトリックス演算を行い、輝度Y、色差Cr、Cb信号に変換する。   The color difference matrix processing unit 524 performs a 3 × 3 matrix operation on the R, G, and B image data subjected to gradation conversion by the CPU 530, and converts the result into luminance Y, color difference Cr, and Cb signals.

輪郭補正部525は、CPU530の設定する入出力特性である周波数応答特性で輝度Yの輪郭を補正し、RAM501に一時的に格納する。   The contour correcting unit 525 corrects the contour of the luminance Y with the frequency response characteristic which is the input / output characteristic set by the CPU 530 and temporarily stores it in the RAM 501.

画像圧縮部526は、画像処理後の画像データをJPEG形式などに圧縮する。   The image compression unit 526 compresses the image data after the image processing into a JPEG format or the like.

次に、図12を用いて、本発明の第3の実施の形態において、撮像装置が行う撮影時の概略の手順を説明する。   Next, with reference to FIG. 12, an outline procedure at the time of shooting performed by the imaging apparatus in the third embodiment of the present invention will be described.

図12においては、デジタルカメラ1の電源が投入され、撮影モードが選択されて撮影待機状態になってからの処理について説明する。また、図12では撮影画像を画像処理を行わず非圧縮のまま記録するモードが選択されているものとする。   In FIG. 12, the processing after the digital camera 1 is turned on, the shooting mode is selected, and the shooting standby state is entered will be described. In FIG. 12, it is assumed that a mode for recording a photographed image without performing image processing without compression is selected.

なお、図4で説明した処理と基本的な処理内容は同じであるので、図5と同じ処理には同符号を付け説明を省略する。すなわち、ステップS102からステップS111およびステップ121までは、図5と同じ処理なので説明は省略し、ステップS400から説明する。   Since the basic processing content is the same as the processing described in FIG. 4, the same processing as in FIG. That is, since steps S102 to S111 and 121 are the same processing as in FIG. 5, the description thereof will be omitted and will be described from step S400.

ステップS111またはステップ121が終了すると、撮影した枚数分のRAWデータが画像メモリ23に一時記憶されている。CPU70は各コマのRAWデータファイルの先頭部分に、撮影情報を付加する(ステップS400)。CPU70は本発明の撮影情報を付加する付加手段である。RAWデータファイルに付加する撮影情報の一例を図16に示す。   When step S111 or step 121 is completed, the RAW data for the number of shots is temporarily stored in the image memory 23. The CPU 70 adds shooting information to the beginning of the RAW data file for each frame (step S400). The CPU 70 is an adding means for adding shooting information of the present invention. An example of shooting information added to the RAW data file is shown in FIG.

図16では、撮影情報の項目はカメラの機種名、カメラのメーカー名、撮影日時、撮影モード、ずらし量、総コマ数、コマ番号である。カメラの機種名、カメラのメーカー名はの項目にはデジタルカメラ1の機種名、メーカー名が、撮影日時に項目には撮影した日付と撮影時刻の時、分、秒が記録される。   In FIG. 16, the items of shooting information are the camera model name, camera manufacturer name, shooting date and time, shooting mode, shift amount, total number of frames, and frame number. The model name and maker name of the digital camera 1 are recorded in the item of the camera model name and the camera manufacturer name, and the shooting date and time, the hour, minute, and second are recorded in the shooting date and time item.

撮影モードは、通常モードは0、連写モードは1、絞りブラケットモードは2、速度ブラケットモードは3、AEブラケットモードは4が記録される。ずらし量の項目にはブラケットモードの最大ずらし量Mが記録される。総コマ数は連写モード、ブラケットモードで1回に撮影された総コマ数Kであり、コマ番号KMはそのなかで何コマ目に撮影されたか、を記録する
CPU70はステップS400で作成したRAWデータファイルを、順次メモリカード25に記録して撮影を終了する(ステップS401)。
The shooting mode is recorded as 0 in the normal mode, 1 in the continuous shooting mode, 2 in the aperture bracket mode, 3 in the speed bracket mode, and 4 in the AE bracket mode. The maximum shift amount M in the bracket mode is recorded in the shift amount item. The total number of frames is the total number K of frames taken at one time in the continuous shooting mode and the bracketing mode, and the frame number KM records the number of frames shot in that. The CPU 70 records the RAW created in step S400. Data files are sequentially recorded on the memory card 25, and shooting is finished (step S401).

次に図13を用いて、本発明の第3の実施の形態において、コンピュータが実行するデジタルカメラ用画像処理プログラムの手順を説明する。   Next, the procedure of a digital camera image processing program executed by a computer in the third embodiment of the present invention will be described with reference to FIG.

なお、コンピュータ500は起動状態であり、デジタルカメラ1で撮影された画像の記録されているメモリカード25がコンピュータ500のカードIF504に挿入され、読みとり可能な状態になっているものとする。   It is assumed that the computer 500 is in an activated state and the memory card 25 on which an image photographed by the digital camera 1 is recorded is inserted into the card IF 504 of the computer 500 and is readable.

CPU530はメモリカード25に記録されているRAWデータの先頭部分に付加されている撮影情報を読み出し(ステップS501)、カメラの機種名、カメラのメーカー名がデジタルカメラ1と一致するRAWデータを抽出する。   The CPU 530 reads the shooting information added to the head of the RAW data recorded in the memory card 25 (step S501), and extracts the RAW data in which the camera model name and the camera manufacturer name match those of the digital camera 1. .

次に、CPU530は同じ撮影モードで撮影され、撮影日時が一定時間以内のRAWデータをグループ化し、グループ毎にフォルダを作成してRAM501に記憶する。CPU530が作成したフォルダの数Fとすると、フォルダはフォルダ1からフォルダFまで作成される(ステップS502)。   Next, the CPU 530 groups the RAW data shot in the same shooting mode and whose shooting date and time is within a certain time, creates a folder for each group, and stores it in the RAM 501. Assuming that the number of folders F created by the CPU 530 is F, folders 1 to F are created (step S502).

フォルダ番号を表すNを初期化し、1とする(ステップS503)。   N representing the folder number is initialized to 1 (step S503).

フォルダNに分類されたRAWデータの撮影条件がAEブラケットモードか、どうか、を判定する(ステップS504)。   It is determined whether or not the shooting condition of the RAW data classified into the folder N is the AE bracketing mode (step S504).

撮影条件がAEブラケットモード以外のとき(ステップS504;No)、画像処理ルーチン3を実行し、画像処理部521はRAM501に一時記憶しているRAWデータに画素補間、マトリクス処理、WB補正、ガンマ補正、輪郭補正などの画像処理を行う(ステップS505)。画像処理ルーチン3は画像処理ルーチン1と同様に、すべての撮影コマの画像データを平均して基準コマを決定し、基準コマと同じ設定値ですべてのコマのWB補正、ガンマ補正、輪郭補正を行うのが特徴である。ステップS505で行う画像処理ルーチン3については後で詳述する。   When the shooting condition is other than the AE bracketing mode (step S504; No), the image processing routine 3 is executed, and the image processing unit 521 performs pixel interpolation, matrix processing, WB correction, and gamma correction on the RAW data temporarily stored in the RAM 501. Then, image processing such as contour correction is performed (step S505). Similar to the image processing routine 1, the image processing routine 3 determines the reference frame by averaging the image data of all the shot frames, and performs WB correction, gamma correction, and contour correction for all the frames with the same setting values as the reference frame. It is a feature to do. The image processing routine 3 performed in step S505 will be described in detail later.

撮影条件がAEブラケットモードのとき(ステップS504;Yes)、画像処理ルーチン4を実行する。画像処理部521はRAM501に一時記憶しているRAWデータに画素補間、マトリクス処理、WB補正、ガンマ補正、輪郭補正などの画像処理を行う(ステップS506)。画像処理ルーチン4では画像処理ルーチン1と同様に、すべての撮影コマの画像データを平均して基準コマを決定し、基準コマと同じ設定値ですべてのコマのWB補正、ガンマ補正、輪郭補正を行うのが特徴である。ステップS506で行う画像処理ルーチン4については後で詳述する。   When the shooting condition is the AE bracketing mode (step S504; Yes), the image processing routine 4 is executed. The image processing unit 521 performs image processing such as pixel interpolation, matrix processing, WB correction, gamma correction, and contour correction on the RAW data temporarily stored in the RAM 501 (step S506). In the image processing routine 4, similar to the image processing routine 1, the image data of all the shot frames is averaged to determine the reference frame, and the WB correction, gamma correction, and contour correction of all the frames are performed with the same setting values as the reference frame. It is a feature to do. The image processing routine 4 performed in step S506 will be described in detail later.

次に、ステップS507では、画像処理後の画像データをモニタ580に表示する(ステップS507)。   Next, in step S507, the image data after image processing is displayed on the monitor 580 (step S507).

次に、N=Fかどうか、判定する(ステップS509)。N=Fであればすべてのフォルダ内のRAWデータの画像処理を終えたので、画像処理を終了する(ステップS509;Yes)。N≠Fであれば(ステップS509;No)、N=N+1にして(ステップS510)ステップS505を実行する。   Next, it is determined whether N = F (step S509). If N = F, since the image processing of the RAW data in all the folders has been completed, the image processing is terminated (step S509; Yes). If N ≠ F (step S509; No), N = N + 1 (step S510) and step S505 is executed.

次に本発明の第3の実施の形態である画像処理ルーチン3(ステップS506)について図14を用いて説明する。画像処理ルーチン3はAEブラケット撮影モード以外で撮影されたRAWデータに対して実行する画像処理ルーチンである。図6で説明した処理と基本的な処理内容は同じであるので、図6と同じ処理には同符号を付け説明を省略する。   Next, an image processing routine 3 (step S506) according to the third embodiment of the present invention will be described with reference to FIG. The image processing routine 3 is an image processing routine that is executed on RAW data shot in a mode other than the AE bracket shooting mode. Since the basic processing content is the same as the processing described in FIG. 6, the same processing as in FIG.

画像処理ルーチン3が起動されると、CPU530はRAM501のフォルダNに一時記憶されたすべてのコマのRAWデータに順次画像処理を実行する。WB補正部520は各コマのRAWデータから、すべてのコマのR、G、B各色の平均値Rav、Gav、Bavを求め、R、Bの画素データにかけるWB係数Rg、Bgを求める(ステップS511)。   When the image processing routine 3 is activated, the CPU 530 sequentially executes image processing on the RAW data of all frames temporarily stored in the folder N of the RAM 501. The WB correction unit 520 obtains average values Rav, Gav, Bav of R, G, B colors of all the frames from the RAW data of each frame, and obtains WB coefficients Rg, Bg to be applied to the R, B pixel data (step) S511).

WB補正部520はステップS211で求めたWB係数Rg、Bgを、各コマのRAWデータのR、B画素データにかけてWB補正を行う。その結果得られた各コマの画像データをRAM501に一時記憶する(ステップS512)。   The WB correction unit 520 performs WB correction by applying the WB coefficients Rg and Bg obtained in step S211 to the R and B pixel data of the RAW data of each frame. The image data of each frame obtained as a result is temporarily stored in the RAM 501 (step S512).

次に、WB補正部520は、RAM501に一時記憶されたWB補正後の各コマのRAWデータを、画素補間し、R、G、Bの面順次画像データにする。次にリニアマトリクス処理部522では各コマのR、G、Bの各画素データに、3×3のマトリクス演算で分光感度を補正する係数をかけてR’、G’、B’を求め、R’、G’、B’の面順次画像データを得る。画素補間部521は得られた各コマの面順次画像データをRAM501に一時記憶する(ステップS513)。   Next, the WB correction unit 520 interpolates the RAW data of each frame after WB correction temporarily stored in the RAM 501 into pixel sequential image data of R, G, and B. Next, the linear matrix processing unit 522 obtains R ′, G ′, and B ′ by multiplying the R, G, and B pixel data of each frame by a coefficient that corrects the spectral sensitivity by 3 × 3 matrix calculation. Obtain frame sequential image data of ', G', B '. The pixel interpolation unit 521 temporarily stores the obtained frame sequential image data of each frame in the RAM 501 (step S513).

次に、基準画像選択部527は、ステップS513でRAM501のフォルダNに一時記憶された、すべてのコマのR’、G’、B’面順次画像データから、各コマのR’、G’、B’各色の平均値R’h(i)、G’h(i)、B’h(i)を求める。ここでiはコマ番号である。基準画像選択部527は各コマのR’、G’、B’各色の平均値R’h(i)、G’h(i)、B’h(i)から全コマの平均値R’t、G’t、B’tを求める(ステップS514)。   Next, the reference image selection unit 527 uses the R ′, G ′, and B ′ frame sequential image data of all frames temporarily stored in the folder N of the RAM 501 in step S513 to perform R ′, G ′, B ′ Average values R′h (i), G′h (i), and B′h (i) for each color are obtained. Here, i is a frame number. The reference image selection unit 527 calculates the average value R′t of all frames from the average values R′h (i), G′h (i), and B′h (i) of R ′, G ′, and B ′ of each frame. , G′t and B′t are obtained (step S514).

次に、CPU520は、ステップS215のアルゴリズムで、基準コマを選択する(ステップS515)。ここでは基準コマのコマ番号をkとする。   Next, the CPU 520 selects a reference frame using the algorithm of step S215 (step S515). Here, the frame number of the reference frame is k.

次に、WB補正部520は基準コマに最適なWB補正のための係数Rg(k)、Bg(k)をステップS212と同様の手順で求め、基準コマのWB係数Rg(k)、Bg(k)を各コマのRAWデータのR、B画素データにかけてWB補正を行う。その結果得られた各コマの画像データをRAM501に一時記憶する(ステップS516)。   Next, the WB correction unit 520 obtains coefficients Rg (k) and Bg (k) for WB correction optimum for the reference frame in the same procedure as in step S212, and WB coefficients Rg (k) and Bg ( k) is applied to R and B pixel data of RAW data of each frame to perform WB correction. The image data of each frame obtained as a result is temporarily stored in the RAM 501 (step S516).

次に、ステップS513と同様に画素補間とマトリクス処理を行い、R’’、G’’、B’’の面順次画像データを得る。画素補間部521は得られた各コマの面順次画像データをRAM501に一時記憶する(ステップS517)。   Next, pixel interpolation and matrix processing are performed in the same manner as in step S513 to obtain frame sequential image data of R ″, G ″, and B ″. The pixel interpolation unit 521 temporarily stores the obtained frame sequential image data of each frame in the RAM 501 (step S517).

次に、CPU520は、RAM501に一時記憶された基準コマのR’’、G’’、B’’の面順次画像データから、同じ数値データを持つ画素の数を計数する(ステップS518)。   Next, the CPU 520 counts the number of pixels having the same numerical data from the frame sequential image data of R ″, G ″, B ″ of the reference frame temporarily stored in the RAM 501 (step S518).

次に、CPU520はステップS518で得られた基準コマの数値データ分布に応じて、ガンマ補正部の階調特性を設定する(ステップS519)。   Next, the CPU 520 sets the gradation characteristics of the gamma correction unit according to the numerical data distribution of the reference frame obtained in step S518 (step S519).

ステップS519で設定された基準コマに最適な階調特性に基づき、ガンマ補正部523はRAM501に一時記憶されたすべてのコマの画像データを順次ガンマ補正し(ステップS520)、色差マトリックス部524で輝度Yと色差Cr、Cbに変換し、RAM501に一時記憶する(ステップS521)。   Based on the gradation characteristics optimum for the reference frame set in step S519, the gamma correction unit 523 sequentially gamma-corrects all frame image data temporarily stored in the RAM 501 (step S520), and the color difference matrix unit 524 performs luminance. Y and color differences Cr and Cb are converted and temporarily stored in the RAM 501 (step S521).

次に、CPU520はステップS518で得られた数値データ分布から、被写体のコントラスト状況を判定し、基準コマに最適な輪郭補正部の周波数応答特性を設定する(ステップS522)。   Next, the CPU 520 determines the contrast status of the subject from the numerical data distribution obtained in step S518, and sets the frequency response characteristic of the contour correction unit optimal for the reference frame (step S522).

このように設定された基準コマの周波数応答特性に基づき、輪郭補正部525はすべてのコマの輪郭補正を順次行い、輪郭補正後の画像データをRAM501に一時記憶する(ステップS523)。これで画像処理ルーチン3は終了し、元のルーチンのステップS507に戻り、画像処理後の画像データをモニタ580に表示する。   Based on the frequency response characteristics of the reference frame set in this way, the contour correction unit 525 sequentially performs contour correction of all frames, and temporarily stores the image data after the contour correction in the RAM 501 (step S523). This completes the image processing routine 3 and returns to step S507 of the original routine, and displays the image data after the image processing on the monitor 580.

次に本発明の第4の実施の形態である画像処理ルーチン4(ステップS506)について図15を用いて説明する。画像処理ルーチン4はAEブラケット撮影モードで撮影されたRAWデータに対して実行する画像処理ルーチンである。図6で説明した処理と基本的な処理内容は同じであるので、図14と同じ処理には同符号を付け説明を省略する。   Next, an image processing routine 4 (step S506) according to the fourth embodiment of the present invention will be described with reference to FIG. The image processing routine 4 is an image processing routine executed for RAW data shot in the AE bracket shooting mode. Since the basic processing content is the same as the processing described in FIG. 6, the same processing as in FIG.

ステップS511、ステップS512は図14と同じなので説明を省略し、ステップS611から説明する。   Steps S511 and S512 are the same as those shown in FIG.

CPU520はRAM501に一時記憶されたRAWデータに付加されている撮影情報を読みとって、ずらし量0のコマを基準コマに選択する(ステップS611)。   The CPU 520 reads the shooting information added to the RAW data temporarily stored in the RAM 501 and selects a frame with a shift amount of 0 as a reference frame (step S611).

ステップS516からステップS518で行う、処理は図14と同じなので説明を省略する。   The processing performed from step S516 to step S518 is the same as that in FIG.

次に、CPU520はステップS518で得られた基準コマの数値データ分布から、基準コマに最適な階調特性を設定し(ステップS619)、基準コマに最適な階調特性を基準に、基準コマ以外の階調特性をずらし露光量に合わせて設定する(ステップS620)。   Next, the CPU 520 sets an optimum gradation characteristic for the reference frame from the numerical data distribution of the reference frame obtained in step S518 (step S619), and sets the gradation characteristics other than the reference frame based on the optimum gradation characteristic for the reference frame. The gradation characteristics are shifted and set according to the exposure amount (step S620).

ステップS520からステップS522までの処理は図14と同じなので説明を省略する。   The processing from step S520 to step S522 is the same as that in FIG.

これで画像処理ルーチン4は終了し、元のルーチンのステップS508に戻り、画像処理後の画像データをモニタ580に表示する。   Thus, the image processing routine 4 ends, and the process returns to step S508 of the original routine, and the image data after the image processing is displayed on the monitor 580.

以上のように本実施の形態によれば、撮影したすべてのコマの画像データに基づいて、画像処理手段の設定を変更するので、連続撮影した各コマ間の色調や階調にバラツキのない、高画質画像が得られる撮像装置およびデジタルカメラ用画像処理プログラムを提供できる。   As described above, according to the present embodiment, since the setting of the image processing means is changed based on the image data of all shot frames, there is no variation in the color tone and gradation between the frames shot continuously. An image processing program for obtaining a high-quality image and an image processing program for a digital camera can be provided.

また、このような撮像装置を利用すれば、低コストで小型、高画質なデジタルカメラを提供できる。   In addition, if such an imaging apparatus is used, a small-sized and high-quality digital camera can be provided at low cost.

なお、本実施の形態としてデジタル一眼レフカメラを例示したが、一眼レフ方式以外のデジタルカメラ、携帯電話やビデオカメラなどにも適用可能である。   Although a digital single-lens reflex camera is exemplified as the present embodiment, the present invention can also be applied to digital cameras other than single-lens reflex systems, mobile phones, video cameras, and the like.

また、基準画像を撮影者が選択できるようにしても良い。このようにすることにより、撮影者の意図に沿った画像処理が可能になる。   The photographer may be able to select the reference image. By doing so, it is possible to perform image processing according to the photographer's intention.

本発明に係るデジタルカメラ1の外観図である。1 is an external view of a digital camera 1 according to the present invention. 本発明に係るデジタルカメラ1の構成を示す断面図である。It is sectional drawing which shows the structure of the digital camera 1 which concerns on this invention. 本発明に係るデジタルカメラ1の機能ブロック図である。1 is a functional block diagram of a digital camera 1 according to the present invention. 本発明の撮像装置が行う撮影時の概略の手順の一つを説明するフローチャートである。It is a flowchart explaining one of the outline procedures at the time of imaging | photography which the imaging device of this invention performs. 本発明の第1の実施形態である画像処理ルーチン1を説明するフローチャートである。It is a flowchart explaining the image processing routine 1 which is the 1st Embodiment of this invention. 本発明の第2の実施形態である画像処理ルーチン2を説明するフローチャートであるIt is a flowchart explaining the image processing routine 2 which is the 2nd Embodiment of this invention. 撮影した画像データより得られた数値データの分布の例を説明する説明図である。It is explanatory drawing explaining the example of distribution of the numerical data obtained from the image | photographed image data. 本発明において、撮影画像データに適用する階調変換特性の例を説明する説明図である。It is explanatory drawing explaining the example of the gradation conversion characteristic applied to picked-up image data in this invention. 本発明において、撮影画像データに適用する周波数応答特性の例を説明する説明図である。It is explanatory drawing explaining the example of the frequency response characteristic applied to picked-up image data in this invention. 本発明において、AEブラケット撮影モード撮影した画像データに適用する周波数応答特性の例を説明する説明図である。In this invention, it is explanatory drawing explaining the example of the frequency response characteristic applied to the image data image | photographed in AE bracket imaging mode. 本発明において、撮影した画像データの画像処理を行うコンピュータの機能ブロック図である。FIG. 3 is a functional block diagram of a computer that performs image processing of captured image data in the present invention. 本発明の撮像装置が行う撮影時の概略の別の手順を説明するフローチャートである。It is a flowchart explaining another procedure of the outline at the time of the imaging | photography which the imaging device of this invention performs. 本発明において、コンピュータが行う撮影した画像データの画像処理を説明するフローチャートである。6 is a flowchart illustrating image processing of captured image data performed by a computer in the present invention. 本発明の第3の実施形態である画像処理ルーチン3を説明するフローチャートである。It is a flowchart explaining the image processing routine 3 which is the 3rd Embodiment of this invention. 本発明の第4の実施形態である画像処理ルーチン4を説明するフローチャートである。It is a flowchart explaining the image processing routine 4 which is the 4th Embodiment of this invention. 本発明において、撮影した画像データに付加する撮影情報を説明する説明図である。In this invention, it is explanatory drawing explaining the imaging | photography information added to the image | photographed image data.

符号の説明Explanation of symbols

1 デジタルカメラ
2 カメラ本体部
3 撮影レンズ
5 CCD
22 画像処理部
70 CPU
73 WB制御部
74 基準画像選択部
77 階調変換制御部
78 周波数応答制御部
220 WB補正部
221 画像補間部
222 リニアマトリクス処理部
223 ガンマ補正部
224 色差マトリクス処理部部
225 輪郭補正部
226 画像圧縮部
L 撮影レンズの光軸
1 Digital Camera 2 Camera Body 3 Shooting Lens 5 CCD
22 Image processing unit 70 CPU
73 WB control unit 74 Reference image selection unit 77 Gradation conversion control unit 78 Frequency response control unit 220 WB correction unit 221 Image interpolation unit 222 Linear matrix processing unit 223 Gamma correction unit 224 Color difference matrix processing unit 225 Contour correction unit 226 Image compression Part L Optical axis of taking lens

Claims (10)

レンズ鏡胴から入射した被写体像を光電変換する撮像素子と、
前記撮像素子から獲得した画像データを、一時記憶する第1の記憶手段と、
前記第1の記憶手段に記憶した画像データに所定の処理を行う画像処理手段と、
前記所定の処理を行った画像データを記憶する第2の記憶手段と、
を有する撮像装置において、
所定の時間内に前記第1の記憶手段に記憶されたすべての画像データに基づいて画像処理手段の設定を変更する制御手段を有することを特徴とする撮像装置。
An image sensor that photoelectrically converts a subject image incident from a lens barrel;
First storage means for temporarily storing image data acquired from the image sensor;
Image processing means for performing predetermined processing on the image data stored in the first storage means;
Second storage means for storing the image data subjected to the predetermined processing;
In an imaging apparatus having
An image pickup apparatus comprising: a control unit that changes a setting of an image processing unit based on all image data stored in the first storage unit within a predetermined time.
前記画像処理手段の設定は、撮像した画像データの階調変換特性であることを特徴とする請求項1に記載の撮像装置。 The imaging apparatus according to claim 1, wherein the setting of the image processing unit is a gradation conversion characteristic of captured image data. 前記画像処理手段の設定は、撮像した画像データのホワイトバランスであることを特徴とする請求項1に記載の撮像装置。 The imaging apparatus according to claim 1, wherein the setting of the image processing unit is white balance of captured image data. 前記制御手段は画像データを連続して獲得する連写モードを有し、
前記連写モードにおいて獲得したすべての画像データに基づいて、前記制御手段が画像処理手段の設定を変更することを特徴とする請求項1〜3のいずれか1項に記載の撮像装置。
The control means has a continuous shooting mode for continuously acquiring image data,
The imaging apparatus according to claim 1, wherein the control unit changes settings of the image processing unit based on all image data acquired in the continuous shooting mode.
前記制御手段は露光条件を順次変更した画像データを連続して獲得するブラケットモードを有し、
前記ブラケットモードにおいて獲得したすべての画像データに基づいて、前記制御手段が画像処理手段の設定を変更することを特徴とする請求項1〜3のいずれか1項に記載の撮像装置。
The control means has a bracket mode for continuously acquiring image data obtained by sequentially changing exposure conditions,
The imaging apparatus according to claim 1, wherein the control unit changes the setting of the image processing unit based on all the image data acquired in the bracket mode.
前記制御手段は前記第1の記憶手段に記憶された画像データから基準画像を選択する基準画像選択手段を有し、前記制御手段は選択された基準画像の画像データに基づいて、画像処理手段の設定を変更することを特徴とする請求項1〜3のいずれか1項に記載の撮像装置。 The control means includes reference image selection means for selecting a reference image from the image data stored in the first storage means, and the control means is configured to perform image processing on the basis of image data of the selected reference image. The imaging apparatus according to claim 1, wherein the setting is changed. 前記画像処理手段は獲得した少なくとも2つの画像データの階調特性の設定を同一にすることを特徴とする請求項1に記載の撮像装置。 The imaging apparatus according to claim 1, wherein the image processing unit makes the setting of the gradation characteristics of at least two acquired image data the same. 前記画像処理手段は獲得した少なくとも2つの画像データのホワイトバランスの設定を同一にすることを特徴とする請求項1に記載の撮像装置。 The imaging apparatus according to claim 1, wherein the image processing unit makes the white balance settings of at least two acquired image data the same. 所定時間内に獲得された画像データを一時記憶する第1の記憶工程と、
前記第1の記憶工程において一時記憶した画像データに所定の処理を行う画像処理工程と、
前記所定の処理を行った画像データを記憶する第2の記憶工程と、
前記第1の記憶工程で記憶されたすべての画像データに基づいて、前記画像処理工程の設定を変更する制御工程と、を有することを特徴とする撮像装置の制御方法。
A first storage step of temporarily storing image data acquired within a predetermined time;
An image processing step of performing a predetermined process on the image data temporarily stored in the first storage step;
A second storage step for storing the image data subjected to the predetermined processing;
A control step of changing settings of the image processing step based on all the image data stored in the first storage step.
コンピュータによって撮像装置が獲得した画像データの画像処理を行うプログラムであって、
コンピュータに画像データの撮影情報を判定してグループ化する処理と、
グループ化した画像データのすべてに基づいて、画像処理の設定を決定する処理と、
前記設定に基づいて画像処理を実行させることを特徴とするデジタルカメラ用画像処理プログラム。
A program for performing image processing of image data acquired by an imaging device by a computer,
A process for determining shooting information of image data on a computer and grouping it,
A process for determining image processing settings based on all of the grouped image data;
An image processing program for a digital camera, wherein image processing is executed based on the setting.
JP2005116790A 2005-04-14 2005-04-14 Imaging apparatus, control method thereof, and image processing program for digital camera Pending JP2006295774A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2005116790A JP2006295774A (en) 2005-04-14 2005-04-14 Imaging apparatus, control method thereof, and image processing program for digital camera

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2005116790A JP2006295774A (en) 2005-04-14 2005-04-14 Imaging apparatus, control method thereof, and image processing program for digital camera

Publications (1)

Publication Number Publication Date
JP2006295774A true JP2006295774A (en) 2006-10-26

Family

ID=37415818

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2005116790A Pending JP2006295774A (en) 2005-04-14 2005-04-14 Imaging apparatus, control method thereof, and image processing program for digital camera

Country Status (1)

Country Link
JP (1) JP2006295774A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2007063731A1 (en) * 2005-12-01 2007-06-07 Olympus Corporation Camera system
US8730377B2 (en) 2009-07-27 2014-05-20 Panasonic Corporation Imaging apparatus adjusting autofocus position based on stored adjustment amount
TWI498955B (en) * 2010-02-12 2015-09-01 Sekisui Chemical Co Ltd A method for manufacturing a semiconductor wafer with a spin - die tape and an adhesive layer

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH06225317A (en) * 1992-09-11 1994-08-12 Toshiba Corp Electronic still camera
JP2001069385A (en) * 1999-08-25 2001-03-16 Olympus Optical Co Ltd Electronic camera
JP2004080230A (en) * 2002-08-14 2004-03-11 Fuji Photo Film Co Ltd Image processing apparatus

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH06225317A (en) * 1992-09-11 1994-08-12 Toshiba Corp Electronic still camera
JP2001069385A (en) * 1999-08-25 2001-03-16 Olympus Optical Co Ltd Electronic camera
JP2004080230A (en) * 2002-08-14 2004-03-11 Fuji Photo Film Co Ltd Image processing apparatus

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2007063731A1 (en) * 2005-12-01 2007-06-07 Olympus Corporation Camera system
US8081236B2 (en) 2005-12-01 2011-12-20 Olympus Corporation Camera system capable of performing exposure control processing combined with gradation conversion processing
US8730377B2 (en) 2009-07-27 2014-05-20 Panasonic Corporation Imaging apparatus adjusting autofocus position based on stored adjustment amount
TWI498955B (en) * 2010-02-12 2015-09-01 Sekisui Chemical Co Ltd A method for manufacturing a semiconductor wafer with a spin - die tape and an adhesive layer

Similar Documents

Publication Publication Date Title
JP3551123B2 (en) Electronic camera
JP4644883B2 (en) Imaging device
US7769287B2 (en) Image taking apparatus and image taking method
KR100942634B1 (en) Image correction device, image correction method, and computer readable medium
JP5553230B2 (en) Imaging apparatus and imaging processing method
JP2006033241A (en) Image pickup device and image acquiring means
JP2001211362A (en) Composition assisting frame selecting method for digital camera and digital camera
JP2011146957A (en) Imaging apparatus, control method thereof, and program
JP2017022610A (en) Image processing apparatus and image processing method
JP4697549B2 (en) Image capturing apparatus and face detection method thereof
JP4796007B2 (en) Imaging device
JP2010087664A (en) Imaging apparatus and method for controlling flash emission
JP2006108759A (en) Imaging apparatus
JP5277863B2 (en) Imaging apparatus and imaging method
JP2006295774A (en) Imaging apparatus, control method thereof, and image processing program for digital camera
JP3601500B2 (en) Digital camera
JP4760496B2 (en) Image data generation apparatus and image data generation method
JP2002218495A (en) White balance control method and electronic camera
JP3607237B2 (en) Digital camera
JP4964992B2 (en) Image capturing apparatus and image recording method thereof
JP2006261928A (en) Imaging apparatus and digital camera
JP3105621B2 (en) Electronic still camera and playback device
JP2009033386A (en) Photographing device and method
JP2008005248A (en) Imaging apparatus
JP2006080960A (en) Image pickup device and method

Legal Events

Date Code Title Description
A711 Notification of change in applicant

Free format text: JAPANESE INTERMEDIATE CODE: A711

Effective date: 20070827

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20080401

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20100511

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20101019