JP2003173438A - Image processing device - Google Patents

Image processing device

Info

Publication number
JP2003173438A
JP2003173438A JP2001372922A JP2001372922A JP2003173438A JP 2003173438 A JP2003173438 A JP 2003173438A JP 2001372922 A JP2001372922 A JP 2001372922A JP 2001372922 A JP2001372922 A JP 2001372922A JP 2003173438 A JP2003173438 A JP 2003173438A
Authority
JP
Japan
Prior art keywords
image
pixel
value
color component
subject
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
JP2001372922A
Other languages
Japanese (ja)
Inventor
Fumiko Uchino
文子 内野
Shirou Usui
支朗 臼井
Shigeki Nakauchi
茂樹 中内
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Minolta Co Ltd
Original Assignee
Minolta Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Minolta Co Ltd filed Critical Minolta Co Ltd
Priority to JP2001372922A priority Critical patent/JP2003173438A/en
Publication of JP2003173438A publication Critical patent/JP2003173438A/en
Pending legal-status Critical Current

Links

Abstract

<P>PROBLEM TO BE SOLVED: To provide an image processing device capable of producing a composite image correctly reflecting the color information of an image before composition. <P>SOLUTION: A first image 231 is acquired in a state that a part of comparatively high brightness of an object is properly exposed, and a second image 232 is acquired in a state that a part of comparatively low brightness is properly exposed in a digital camera. Both images are composed by an image composing part 204 on the basis of a weighted coefficient determined on each image element, after each image element value of the both images are converted into an apparatus-independent XYZ value by an XYZ conversion part 202, to produce the composite image. As the image processing is performed in a state that the image element values are represented by the apparatus-independent XYZ values, the composite image on which the color information of the first image and the second image before the composition is correctly reflected, can be formed. <P>COPYRIGHT: (C)2003,JPO

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、画像を合成して階
調が調整された画像を求める技術に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a technique for synthesizing images to obtain an image whose gradation is adjusted.

【0002】[0002]

【従来の技術】デジタルカメラ等の撮像装置において
は、2次元の画素配列を有するCCD(Charge Coupled
Device)等の撮像素子を用いて被写体を撮影すると、
被写体の比較的高輝度の部分に相当する領域において画
素値が飽和する(いわゆる白とび)現象が生じる一方、
被写体の比較的低輝度の部分に相当する領域が黒くつぶ
れてしまう(いわゆる黒つぶれ)現象が生じることがあ
る。この現象は、一般的な撮像素子のダイナミックレン
ジが狭いことに起因するものであり、画質低下の要因と
なっている。
2. Description of the Related Art In an image pickup device such as a digital camera, a CCD (Charge Coupled) having a two-dimensional pixel array is used.
When you shoot a subject using an image sensor such as Device),
While the pixel value saturation (so-called whiteout) phenomenon occurs in the area corresponding to the relatively high brightness part of the subject,
There may occur a phenomenon in which a region corresponding to a relatively low-brightness portion of the subject is blackened (so-called black shadow). This phenomenon is caused by the narrow dynamic range of a general image pickup element, and is a factor of image quality deterioration.

【0003】このような現象を解消するために、従来よ
り、同一被写体に対して露出条件を変更して二枚の画像
を撮影し、得られた二枚の画像を適切な比率で合成する
ことによって階調の調整処理を行い、実質的にダイナミ
ックレンジを拡げた合成画像を生成する技術が知られて
いる。
In order to eliminate such a phenomenon, conventionally, the exposure condition is changed for the same subject, two images are photographed, and the obtained two images are combined at an appropriate ratio. There is known a technique of performing gradation adjustment processing by means of and generating a composite image with a substantially expanded dynamic range.

【0004】[0004]

【発明が解決しようとする課題】ところで一般に、デジ
タルカメラ等の撮像装置にて取得される画像において
は、各画素の色情報を示す画素値(色成分値)はRGB
表色系の値(RGB値)で表される。このため、上記の
ような階調の調整された合成画像を生成する過程におい
てもRGB値で表される画素値を用いて各種の画像処理
が行われていた。
Generally, in an image acquired by an image pickup device such as a digital camera, the pixel value (color component value) indicating the color information of each pixel is RGB.
It is represented by a color system value (RGB value). Therefore, in the process of generating a gradation-adjusted composite image as described above, various image processes are performed using pixel values represented by RGB values.

【0005】しかしながら、このようなRGB値は取得
された撮像素子の特性に依存した値(デバイスに依存す
る値)であるため、RGB値のままで合成画像を生成し
た場合、その生成過程の種々の画像処理(演算処理)に
おいて色情報が歪められ、最終的な合成画像において合
成前の二枚の画像の色情報を正確に反映させることがで
きなかった。
However, since such RGB values depend on the characteristics of the acquired image pickup device (device dependent values), when a composite image is generated with the RGB values as it is, various generation processes are required. The color information is distorted in the image processing (arithmetic processing), and the color information of the two images before the combining cannot be accurately reflected in the final combined image.

【0006】本発明は、上記課題に鑑みてなされたもの
であり、合成前の画像の色情報を正確に反映した合成画
像を生成することのできる画像処理装置を提供すること
を目的とする。
The present invention has been made in view of the above problems, and an object of the present invention is to provide an image processing apparatus capable of generating a composite image that accurately reflects color information of an image before composition.

【0007】[0007]

【課題を解決するための手段】上記課題を解決するた
め、請求項1の発明は、画像処理装置であって、同一被
写体に対して露出条件を変更して取得された第1画像お
よび第2画像それぞれの各画素の色成分値を、機器非依
存の表色系における色成分値に変換する表色系変換手段
と、前記表色系変換手段により各画素の色成分値がそれ
ぞれ変換された前記第1画像および前記第2画像を合成
して、階調が調整された合成画像を生成する画像合成手
段と、を備えている。
In order to solve the above-mentioned problems, the invention of claim 1 is an image processing apparatus, wherein a first image and a second image acquired by changing the exposure condition for the same subject. A color system conversion unit that converts the color component value of each pixel of each image into a color component value in a device-independent color system, and the color component value of each pixel is converted by the color system conversion unit. An image synthesizing unit for synthesizing the first image and the second image to generate a grayscale-adjusted synthetic image.

【0008】また、請求項2の発明は、画像処理装置で
あって、被写体の比較的高輝度の部分が適正露出となる
露出条件で取得された画像群から、前記被写体への照明
環境の分光特性の影響を取り除いた画像のデータに相当
する第1物体色成分データを求める手段と、前記被写体
の比較的低輝度の部分が適正露出となる露出条件で取得
された画像群から、前記被写体への照明環境の分光特性
の影響を取り除いた画像のデータに相当する第2物体色
成分データを求める手段と、前記第1および第2物体色
成分データそれぞれと、光源の分光特性が画像に与える
影響を示す照明成分データとを合成して、第1画像およ
び第2画像を生成する手段と、前記第1画像および前記
第2画像それぞれの各画素の色成分値を、機器非依存の
表色系における色成分値に変換する表色系変換手段と、
前記表色系変換手段により各画素の色成分値がそれぞれ
変換された前記第1画像および前記第2画像を合成し
て、階調が調整された合成画像を生成する画像合成手段
と、を備えている。
According to a second aspect of the present invention, there is provided an image processing device, wherein a spectrum of an illumination environment for the object is spectrally divided from an image group acquired under an exposure condition in which a relatively high brightness portion of the object is properly exposed. A means for obtaining first object color component data corresponding to the image data from which the influence of the characteristic is removed, and an image group acquired under an exposure condition in which a relatively low luminance portion of the subject is properly exposed, to the subject. Means for obtaining second object color component data corresponding to image data from which the influence of the spectral characteristics of the illumination environment is removed, the first and second object color component data, and the influence of the spectral characteristics of the light source on the image. Means for generating a first image and a second image by synthesizing with the illumination component data indicating the color component value of each pixel of the first image and the second image, and a device-independent color system Color in A color system conversion means for converting the frequency value,
An image synthesizing unit for synthesizing the first image and the second image in which the color component values of the respective pixels are converted by the color system conversion unit to generate a gradation-adjusted combined image. ing.

【0009】また、請求項3の発明は、請求項1または
2に記載の画像処理装置において、前記第1画像および
前記第2画像の各画素ごとに、該画素の色成分値の有効
度に応じた合成比率を設定する手段、をさらに備え、前
記画像合成手段は、前記第1画像および前記第2画像の
各画素の表色系変換後の色成分値を前記合成比率で合成
して、前記合成画像を生成することを特徴とする。
According to a third aspect of the present invention, in the image processing apparatus according to the first or second aspect, for each pixel of the first image and the second image, the validity of the color component value of the pixel is determined. Further comprising means for setting a compositing ratio according to the above, wherein the image composing means composes the color component values after color system conversion of each pixel of the first image and the second image at the composition ratio, It is characterized in that the composite image is generated.

【0010】また、請求項4の発明は、請求項1ないし
3のいずれかに記載の画像処理装置において、前記第1
画像および前記第2画像のそれぞれの明るさと、前記第
1画像および前記第2画像の各画素の合成比率とに基づ
いて、前記合成画像の各画素の明るさの調整を行う明る
さ調整手段、をさらに備えている。
The invention according to claim 4 is the image processing apparatus according to any one of claims 1 to 3, wherein the first
Brightness adjusting means for adjusting the brightness of each pixel of the composite image based on the brightness of each of the image and the second image and the composite ratio of each pixel of the first image and the second image. Is further equipped.

【0011】また、請求項5の発明は、請求項4に記載
の画像処理装置において、前記明るさ調整手段が前記合
成画像の各画素の明るさを調整する際の調整度合の指定
を受け付ける受付手段、をさらに備えている。
According to a fifth aspect of the present invention, in the image processing apparatus according to the fourth aspect, the acceptance for accepting designation of an adjustment degree when the brightness adjusting means adjusts the brightness of each pixel of the composite image Means are further provided.

【0012】[0012]

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

【0013】<1.第1の実施の形態> <1−1.デジタルカメラの構成>図1は本発明の第1
の実施の形態に係る画像処理装置であるデジタルカメラ
1の全体を示す斜視図である。デジタルカメラ1は、撮
影を行うレンズユニット11、および、レンズユニット
11にてデジタルデータとして取得された画像を処理す
る本体部12とを有する。
<1. First Embodiment><1-1. Structure of Digital Camera> FIG. 1 shows a first embodiment of the present invention.
2 is a perspective view showing the entire digital camera 1 which is the image processing apparatus according to the embodiment of FIG. The digital camera 1 includes a lens unit 11 that performs shooting, and a main body 12 that processes an image acquired as digital data by the lens unit 11.

【0014】レンズユニット11は、複数のレンズを有
するレンズ系111、および、レンズ系111を介して
被写体の像を取得するCCD112を有する。そして、
CCD112から出力される画像信号は本体部12へと
送られる。また、レンズユニット11には、操作者が被
写体を捉えるためのファインダ113、測距センサ11
4等も配置される。
The lens unit 11 has a lens system 111 having a plurality of lenses, and a CCD 112 for acquiring an image of a subject through the lens system 111. And
The image signal output from the CCD 112 is sent to the main body 12. Further, the lens unit 11 includes a finder 113 and a distance measuring sensor 11 for an operator to capture a subject.
4th grade is also placed.

【0015】本体部12には、フラッシュ121および
シャッタボタン122が設けられ、操作者がファインダ
113を介して被写体を捉え、シャッタボタン122を
操作することにより、CCD112にて電気的に画像が
取得される。このとき、必要に応じてフラッシュ121
が発光する。なお、CCD112は各画素の値として
R,G,Bの各色に関する値を取得する3バンドの撮像
デバイスとなっている。
The main body 12 is provided with a flash 121 and a shutter button 122. An operator captures an object through the finder 113 and operates the shutter button 122 to electrically capture an image with the CCD 112. It At this time, if necessary, the flash 121
Emits light. It should be noted that the CCD 112 is a three-band image pickup device that acquires values for each color of R, G, and B as the value of each pixel.

【0016】CCD112からの画像信号は本体部12
内部にて後述する処理が行われ、必要に応じて本体部1
2に装着されている外部メモリ123(いわゆる、メモ
リカード)に記憶される。外部メモリ123は本体部1
2下面の蓋を開けて取出ボタン124を操作することに
より本体部12から取り出される。記録媒体である外部
メモリ123に記憶されたデータは別途設けられたコン
ピュータ等を用いて他の装置に渡すことができる。逆
に、他の装置にて外部メモリ123に記憶されたデータ
をデジタルカメラ1が読み出すことも可能である。
The image signal from the CCD 112 is the main body 12
The processing described below is performed inside the main body 1 as necessary.
It is stored in the external memory 123 (so-called memory card) mounted on the No. 2 memory. The external memory 123 is the main body 1
2 By opening the lid on the lower surface and operating the take-out button 124, the take-out button 124 is taken out. The data stored in the external memory 123, which is a recording medium, can be transferred to another device by using a computer or the like provided separately. Conversely, the digital camera 1 can read the data stored in the external memory 123 by another device.

【0017】図2はデジタルカメラ1を背後から見たと
きの様子を示す図である。本体部12の背面の中央には
撮影された画像を表示したり、操作者へのメニューを表
示する液晶のディスプレイ125が設けられ、ディスプ
レイ125の側方にはディスプレイ125に表示される
メニューに従って入力操作を行うための操作ボタン12
6が配置される。これにより、デジタルカメラ1の操
作、外部メモリ123の保守、画像の再生、撮影モード
の設定等ができるようにされている。
FIG. 2 is a diagram showing a state when the digital camera 1 is viewed from behind. A liquid crystal display 125 is provided in the center of the back surface of the main body 12 for displaying a photographed image and a menu for the operator, and the side of the display 125 is used for inputting according to the menu displayed on the display 125. Operation buttons 12 for operating
6 is arranged. Thereby, the operation of the digital camera 1, the maintenance of the external memory 123, the reproduction of the image, the setting of the photographing mode and the like can be performed.

【0018】デジタルカメラ1は、通常の撮影を行う通
常撮影モードとともに、階調調整モードを、その撮影モ
ードとして備えており、いずれかの撮影モードを操作ボ
タン126により選択することができるようにされてい
る。階調調整モードとは、同一被写体に対して露出条件
を変更して二枚の画像を連続的に撮影し、この二枚の画
像を適当な合成比率で合成することによって階調調整
し、実質的にダイナミックレンジを拡げた合成画像(以
下、「階調調整画像」ともいう。)を得ることを目的と
するモードであるが、この処理の詳細は後述する。
The digital camera 1 has a gradation adjusting mode as its photographing mode as well as a normal photographing mode for performing normal photographing, and one of the photographing modes can be selected by the operation button 126. ing. The gradation adjustment mode is to adjust the gradation by changing the exposure condition for the same subject, taking two images continuously, and combining these two images at an appropriate combining ratio. This mode is intended to obtain a composite image (hereinafter, also referred to as a “tone adjustment image”) with a wide dynamic range, and details of this processing will be described later.

【0019】図3は、デジタルカメラ1の主要な構成を
示すブロック図である。
FIG. 3 is a block diagram showing the main configuration of the digital camera 1.

【0020】図3に示す構成のうち、レンズ系111、
CCD112、A/D変換部115、シャッタボタン1
22、CPU21、ROM22およびRAM23は画像
を取得する機能を実現する。すなわち、レンズ系111
により被写体の像がCCD112上に結像され、シャッ
タボタン122が押されると、CCD112からの画像
信号がA/D変換部115により例えば8ビット(0〜
255)のデジタル画像信号に変換される。A/D変換
部115にて変換されたデジタル画像信号は本体部12
のRAM23に画像データとして記憶される。なお、こ
れらの処理の制御はCPU21がROM22内に記憶さ
れているプログラム221に従って動作することにより
行われる。
In the configuration shown in FIG. 3, the lens system 111,
CCD 112, A / D converter 115, shutter button 1
22, the CPU 21, the ROM 22, and the RAM 23 realize the function of acquiring an image. That is, the lens system 111
When the image of the subject is formed on the CCD 112 by the, and the shutter button 122 is pressed, the image signal from the CCD 112 is, for example, 8 bits (0 to 0) by the A / D converter 115.
255) digital image signal. The digital image signal converted by the A / D converter 115 is the main body 12
Is stored in the RAM 23 as image data. The control of these processes is performed by the CPU 21 operating according to the program 221 stored in the ROM 22.

【0021】また、本体部12に設けられるCPU2
1、ROM22およびRAM23が画像を処理する機能
を実現する。具体的には、ROM22に記憶されている
プログラム221に従って、RAM23を作業領域とし
て利用しながらCPU21が取得された画像に画像処理
を施す。
Further, the CPU 2 provided in the main body 12
1, ROM22 and RAM23 implement | achieve the function which processes an image. Specifically, according to the program 221 stored in the ROM 22, the CPU 21 performs image processing on the acquired image while using the RAM 23 as a work area.

【0022】外部メモリ123はRAM23と接続さ
れ、操作ボタン126からの入力操作に基づいて各種デ
ータの受け渡しが行われる。また、ディスプレイ125
もCPU21からの信号に基づいて画像の表示や操作者
への情報の表示を行う。
The external memory 123 is connected to the RAM 23 and exchanges various data based on the input operation from the operation button 126. Also, the display 125
Also displays an image or displays information to the operator based on a signal from the CPU 21.

【0023】フラッシュ121は発光制御回路121a
を介してCPU21に接続されており、CPU21から
フラッシュ121を発光する旨の指示を受けた場合に
は、発光制御回路121aがフラッシュ121の発光開
始/発光停止を制御する。
The flash 121 is a light emission control circuit 121a.
When the flash 21 is instructed to be emitted from the CPU 21, the light emission control circuit 121a controls the start / stop of light emission of the flash 121.

【0024】デジタルカメラ1における露出制御は、シ
ャッタースピード(CCD112の積分時間)と、絞り
値(レンズ系111に含まれる絞りの開口径)とを調節
して行なわれる。図3において露出制御部201は、C
PU21、ROM22およびRAM23等によって実現
される機能であり、このようなシャッタースピードおよ
び絞り値(すなわち、露出条件)の設定および制御を行
う。
The exposure control in the digital camera 1 is performed by adjusting the shutter speed (the integration time of the CCD 112) and the aperture value (the aperture diameter of the aperture included in the lens system 111). In FIG. 3, the exposure control unit 201 is C
This is a function realized by the PU 21, the ROM 22, the RAM 23, and the like, and sets and controls such a shutter speed and aperture value (that is, exposure condition).

【0025】露出条件を設定する際には、CCD112
から被写体の輝度を示す信号が露出制御部201に入力
され、露出制御部201はこの被写体の輝度とCCD1
12の感度特性とに基づいて露出値を決定する。そし
て、決定した露出値に基づいて、デジタルカメラ1内に
予め準備されている絞り値とシャッタースピードとの関
係を示すプログラム線図を参照し、シャッタースピード
および絞り値を設定する。
When setting the exposure conditions, the CCD 112
A signal indicating the brightness of the subject is input to the exposure control unit 201 from the exposure control unit 201 and the CCD 1 and the brightness of the subject.
The exposure value is determined based on 12 sensitivity characteristics. Then, based on the determined exposure value, the shutter speed and the aperture value are set with reference to a program diagram showing the relationship between the aperture value and the shutter speed prepared in advance in the digital camera 1.

【0026】被写体の輝度を測定するための測光モード
としてデジタルカメラ1は、CCD112のいくつかの
エリアの所定画素からの信号を使用する通常測光モード
と、ファインダ113の画面中央部に相当する画素およ
びその近傍画素からの信号を使用するスポット測光モー
ドとを備えている。このような測光モードは、撮影に応
じて手動あるいは自動で適宜選択される。
As a photometric mode for measuring the brightness of the object, the digital camera 1 uses the normal photometric mode in which signals from predetermined pixels in several areas of the CCD 112 are used, and the pixel corresponding to the central portion of the screen of the finder 113. A spot metering mode that uses signals from the neighboring pixels is provided. Such a photometric mode is appropriately selected manually or automatically according to shooting.

【0027】<1−2.デジタルカメラの動作>図4
は、主としてCPU21、ROM22およびRAM23
により実現される機能のうち階調調整モードに係る構成
を他の構成とともに示すブロック図であり、図5および
図6は階調調整モードにおける撮影および画像処理の流
れを示す図である。図4に示す構成のうち、露出制御部
201、XYZ変換部202、輝度レベル調整部20
3、画像合成部204、局所コントラスト補正部20
5、RGB変換部206および重み設定部207が、C
PU21、ROM22、RAM23等により実現される
機能を示す。以下、これらの図を参照しながらデジタル
カメラ1の階調調整モードにおける動作について説明す
る。
<1-2. Digital camera operation> Figure 4
Mainly includes the CPU 21, the ROM 22, and the RAM 23.
FIG. 7 is a block diagram showing the configuration related to the gradation adjustment mode of the functions realized by, together with other configurations, and FIGS. 5 and 6 are diagrams showing the flow of shooting and image processing in the gradation adjustment mode. In the configuration shown in FIG. 4, the exposure control unit 201, the XYZ conversion unit 202, and the brightness level adjustment unit 20.
3, image composition unit 204, local contrast correction unit 20
5, the RGB conversion unit 206 and the weight setting unit 207 are C
The functions realized by the PU 21, the ROM 22, the RAM 23, etc. are shown. The operation of the digital camera 1 in the gradation adjustment mode will be described below with reference to these drawings.

【0028】階調調整モードにおいては、被写体の高輝
度の部分および低輝度の部分にそれぞれ露出を合わせた
二枚の画像を取得し、これら二枚の画像を合成して階調
調整画像を得ることとなる。このため、まず、ユーザは
ファインダ113を通して構図を決定し、決定した構図
内に含まれる被写体において比較的高輝度の部分と、比
較的低輝度の部分とにおける露出値をデジタルカメラ1
に取得させる。
In the tone adjustment mode, two images are obtained by exposing the high-luminance portion and the low-luminance portion of the subject respectively, and these two images are combined to obtain a tone adjusted image. It will be. Therefore, first, the user determines the composition through the viewfinder 113, and the exposure values of a relatively high-luminance portion and a relatively low-luminance portion of the subject included in the determined composition are calculated.
To get.

【0029】具体的には、デジタルカメラ1の測光モー
ドがスポット測光モードに設定され、ユーザが被写体の
高輝度の部分にファインダ113の画面中央部を合わ
せ、操作ボタン126において所定の操作をする。この
操作に応答して、CCD112から被写体の輝度を示す
信号が露出制御部201に入力され、この信号に基づく
露出値が露出制御部201により取得される。取得され
た露出値は被写体の高輝度の部分に合わせた第1露出値
Ev1としてRAM23に記憶される(ステップST1
1)。
Specifically, the metering mode of the digital camera 1 is set to the spot metering mode, and the user aligns the central portion of the screen of the finder 113 with the high-luminance portion of the subject and performs a predetermined operation with the operation button 126. In response to this operation, a signal indicating the brightness of the subject is input from the CCD 112 to the exposure control unit 201, and the exposure control unit 201 acquires an exposure value based on this signal. The acquired exposure value is stored in the RAM 23 as the first exposure value Ev1 that matches the high-luminance portion of the subject (step ST1).
1).

【0030】次に、同様にして、ユーザが被写体の低輝
度の部分にファインダ113の画面中央部を合わせ、操
作ボタン126において所定の操作をする。この操作に
応答して、CCD112から被写体の輝度を示す信号が
露出制御部201に入力され、この信号に基づく露出値
が露出制御部201により取得される。取得された露出
値は、被写体の低輝度の部分に合わせた第2露出値Ev
2としてRAM23に記憶される(ステップST1
2)。
Next, in the same manner, the user aligns the central portion of the screen of the finder 113 with the low-luminance portion of the subject and performs a predetermined operation with the operation button 126. In response to this operation, a signal indicating the brightness of the subject is input from the CCD 112 to the exposure control unit 201, and the exposure control unit 201 acquires an exposure value based on this signal. The acquired exposure value is the second exposure value Ev that matches the low-luminance portion of the subject.
2 is stored in the RAM 23 (step ST1
2).

【0031】図7は、高輝度の部分と低輝度の部分が存
在する被写体の具体例を示す図である。図7では、窓の
外の部分71が太陽光を受けており、室内の部分72が
室内の蛍光灯などの照明を受けている状態となってい
る。したがって、窓の外の部分71は比較的高輝度であ
り、室内の部分72は比較的低輝度となっている。この
例で示す被写体を撮影する場合は、窓の外の部分71の
輝度に合わせた露出値が第1露出値Ev1として取得さ
れ、室内の部分72の輝度に合わせた露出値が第2露出
値Ev2として取得されることとなる。
FIG. 7 is a diagram showing a specific example of a subject having a high-luminance portion and a low-luminance portion. In FIG. 7, a portion 71 outside the window receives sunlight, and a portion 72 inside the room receives illumination such as a fluorescent lamp inside the room. Therefore, the part 71 outside the window has a relatively high brightness, and the part 72 inside the room has a relatively low brightness. When the subject shown in this example is photographed, the exposure value matched to the brightness of the portion 71 outside the window is acquired as the first exposure value Ev1, and the exposure value matched to the brightness of the portion 72 inside the room is the second exposure value. It will be acquired as Ev2.

【0032】第1および第2露出値が取得されると、次
に、ユーザは決定した構図にファインダ113の画面を
合わせてシャッタボタン122を操作する。デジタルカ
メラ1はこの操作に応答して第1露出値Ev1に基づく
露出条件にて撮影を行い、被写体の高輝度の部分に相当
する領域が適正露出となる画像(以下、「第1画像」と
いう。)を得る。すなわち、絞りを比較的絞り込み、シ
ャッタースピードを比較的高速とする露出条件でCCD
112にて画像を取得し、得られた画像(正確には、画
像信号)がA/D変換部115からRAM23へと送ら
れ、第1画像231として記憶される(ステップST1
3)。
When the first and second exposure values have been acquired, the user then operates the shutter button 122 while aligning the screen of the finder 113 with the determined composition. In response to this operation, the digital camera 1 shoots under the exposure condition based on the first exposure value Ev1, and an image in which a region corresponding to a high-brightness portion of the subject has a proper exposure (hereinafter, referred to as “first image”). .) That is, the CCD is set under the exposure condition that the aperture is relatively narrowed down and the shutter speed is relatively high.
An image is obtained at 112, and the obtained image (to be exact, an image signal) is sent from the A / D conversion unit 115 to the RAM 23 and stored as a first image 231 (step ST1
3).

【0033】次に、第2露出値Ev2に基づく露出条件
にて撮影を行い、被写体の低輝度の部分に相当する領域
が適正露出となる画像(以下、「第2画像」という。)
を得る。すなわち、絞りの開口径を比較的開放し、シャ
ッタースピードを比較的低速とする露出条件でCCD1
12にて画像を取得し、得られた画像がA/D変換部1
15からRAM23へと送られ、第2画像232として
記憶される(ステップST14)。
Next, an image is taken under the exposure condition based on the second exposure value Ev2, and an image in which a region corresponding to a low-luminance portion of the subject has a proper exposure (hereinafter referred to as "second image").
To get That is, the CCD 1 is exposed under the exposure condition that the aperture diameter of the diaphragm is relatively open and the shutter speed is relatively low.
An image is obtained at 12, and the obtained image is the A / D conversion unit 1
It is sent from 15 to the RAM 23 and stored as the second image 232 (step ST14).

【0034】図8は図7に示した被写体を撮影したとき
の第1画像231の例を示す図であり、図9は図7に示
した被写体を撮影したときの第2画像232の例を示す
図である。図8に示すように第1画像231において
は、被写体の高輝度の部分に相当する領域(窓の外の部
分71:図においては樹木等が含まれる)は適正露出と
なり適切に撮影される一方、被写体の低輝度の部分に相
当する領域(室内の部分72:図においては花瓶等が含
まれる)は露出アンダーとなる。逆に、図9に示すよう
に第2画像232においては、被写体の低輝度の部分に
相当する領域は適正露出となり適切に撮影される一方、
被写体の高輝度の部分に相当する領域は露出オーバーと
なる。
FIG. 8 is a diagram showing an example of the first image 231 when the subject shown in FIG. 7 is photographed, and FIG. 9 is an example of the second image 232 when the subject shown in FIG. 7 is photographed. FIG. As shown in FIG. 8, in the first image 231, a region corresponding to a high-intensity part of the subject (portion 71 outside the window: trees and the like are included in the figure) has proper exposure and is appropriately photographed. An area corresponding to the low-luminance portion of the subject (indoor portion 72: a vase or the like is included in the drawing) is underexposed. On the contrary, as shown in FIG. 9, in the second image 232, the area corresponding to the low-brightness portion of the subject is properly exposed and appropriately photographed,
The area corresponding to the high brightness portion of the subject is overexposed.

【0035】これらの2回の撮影は、連写のように迅速
に行われる。したがって、第1画像231と第2画像2
32との撮影範囲は同一となる。
These two photographings are carried out quickly like continuous photographing. Therefore, the first image 231 and the second image 2
The shooting range with 32 is the same.

【0036】2回の撮影により、RAM23に第1画像
231および第2画像232が保存されると、XYZ変
換部202により、両画像のRGB値で表される画素値
(色成分値)が、所定のマトリクス演算によってXYZ
表色系におけるXYZ値に変換される。この演算に用い
られるマトリクスはCCD112のカラーフィルタの分
光透過特性を考慮したマトリクスである。したがって、
この演算により各画素値がCCD112の特性に依存し
ないXYZ値で表わされ、各画素の色情報が機器非依存
のXYZ表色系において正確に表現されることとなる。
なお、演算に用いられるマトリクスは予め計測等によっ
て求められROM22やRAM23に記憶される(ステ
ップST15)。
When the first image 231 and the second image 232 are stored in the RAM 23 by two times of photographing, the pixel values (color component values) represented by the RGB values of both images are changed by the XYZ conversion section 202. XYZ by predetermined matrix operation
Converted to XYZ values in the color system. The matrix used for this calculation is a matrix considering the spectral transmission characteristics of the color filter of the CCD 112. Therefore,
By this calculation, each pixel value is represented by an XYZ value that does not depend on the characteristics of the CCD 112, and the color information of each pixel is accurately represented in the device-independent XYZ color system.
The matrix used for the calculation is obtained in advance by measurement or the like and stored in the ROM 22 or the RAM 23 (step ST15).

【0037】次に、第1画像231と第2画像232と
を合成する前の処理として、それらの輝度レベルが合わ
せられる(ステップST16)。第1画像231は被写
体の高輝度の部分に相当する領域が適正露出となる比較
的露出アンダーの画像であるため画素値は比較的低くな
り、逆に、第2画像232は被写体の低輝度の部分に相
当する領域が適正露出となる比較的露出オーバーの画像
であるため画素値は比較的高くなる。したがって、単純
にそのまま同一の合成割合で両画像を合成したとする
と、生成される合成画像において第2画像232の画素
値の影響(色情報の影響)が強くなってしまう。このた
め、第1画像231の輝度レベルに一致するように、第
2画像232の輝度レベルが低下される。
Next, as a process before the first image 231 and the second image 232 are combined, their brightness levels are matched (step ST16). Since the first image 231 is a relatively underexposed image in which the region corresponding to the high-brightness portion of the subject is a proper exposure, the pixel value is relatively low, and conversely, the second image 232 is a low-brightness subject. The pixel value is relatively high because the image corresponding to a portion is a relatively overexposed image in which the proper exposure is obtained. Therefore, if the two images are simply combined at the same combination ratio, the influence of the pixel value of the second image 232 (the influence of the color information) becomes strong in the generated combined image. Therefore, the brightness level of the second image 232 is lowered so as to match the brightness level of the first image 231.

【0038】具体的には、まず、両画像の輝度の差(明
るさの差)を示す値として、第1露出値Ev1と第2露
出値Ev2との差分値である差分露出値ΔEvが露出制
御部201から輝度レベル調整部203に入力される。
差分露出値ΔEvは、次の数1によって露出制御部20
1により求められる。
Specifically, first, a difference exposure value ΔEv which is a difference value between the first exposure value Ev1 and the second exposure value Ev2 is exposed as a value indicating a difference in brightness (brightness difference) between the two images. It is input from the control unit 201 to the brightness level adjusting unit 203.
The differential exposure value ΔEv is calculated by
It is calculated by 1.

【0039】[0039]

【数1】 [Equation 1]

【0040】そして、輝度レベル調整部203によりこ
の差分露出値ΔEvを用いて下記の数2で示す演算が行
われることにより、露出オーバーの第2画像232の輝
度レベルが、露出アンダーの第1画像の231の輝度レ
ベルに調整される。なお、数2においてX2,Y2,Z2
はそれぞれ輝度レベル調整前の第2画像232の一の画
素のXYZ値であり、X2’,Y2’,Z2’はそれぞれ
輝度レベル調整後の第2画像232の当該画素のXYZ
値である。
Then, the brightness level adjusting unit 203 uses the differential exposure value ΔEv to perform the calculation shown in the following expression 2, so that the brightness level of the overexposed second image 232 is the underexposed first image. 231 of the brightness level. In the equation 2, X 2 , Y 2 , Z 2
Are XYZ values of one pixel of the second image 232 before brightness level adjustment, and X 2 ′, Y 2 ′, and Z 2 ′ are XYZ of the pixel of the second image 232 after brightness level adjustment.
It is a value.

【0041】[0041]

【数2】 [Equation 2]

【0042】ここで露出値をEvとし、被写体の輝度を
示す値をBv、CCD112の感度を示す値をSvとす
ると、露出値Evは、
When the exposure value is Ev, the value indicating the brightness of the subject is Bv, and the value indicating the sensitivity of the CCD 112 is Sv, the exposure value Ev is

【0043】[0043]

【数3】 [Equation 3]

【0044】と表現される。このため、CCD112の
感度を示す値Svは一定であることから、被写体が比較
的高輝度である(値Bvが比較的大きい)と露出値Ev
は比較的大きな値として決定され、逆に、被写体が比較
的低輝度である(値Bvが比較的小さい)と露出値Ev
は比較的小さな値として決定される。したがって、第1
露出値Ev1と第2露出値Ev2とは互いに異なる値
(具体的には、第1露出値Ev1>第2露出値Ev2)
となり、求められる差分露出値ΔEvはゼロでない値
(正の値)となる。
It is expressed as Therefore, since the value Sv indicating the sensitivity of the CCD 112 is constant, if the subject has a relatively high brightness (the value Bv is relatively large), the exposure value Ev.
Is determined as a relatively large value, and conversely, when the subject has relatively low brightness (value Bv is relatively small), the exposure value Ev
Is determined as a relatively small value. Therefore, the first
The exposure value Ev1 and the second exposure value Ev2 are different from each other (specifically, the first exposure value Ev1> the second exposure value Ev2).
The calculated differential exposure value ΔEv is a non-zero value (positive value).

【0045】また、一般に、露出値Evを1段増やして
画像を取得すると、取得される画像の輝度(明るさ)は
1/2倍となる。したがって、数2の演算を第2画像2
32の各画素について行うことにより、第2画像232
の輝度レベルが第1画像の231の輝度レベルに一致す
るように調整される。
In general, when the exposure value Ev is increased by one step to acquire an image, the brightness (brightness) of the acquired image is halved. Therefore, the operation of Equation 2 is performed by the second image 2
32 for each pixel so that the second image 232
Is adjusted so as to match the brightness level of 231 of the first image.

【0046】なお、このように画像の輝度レベルを変更
した場合であっても、画素値は自然数のRGB値ではな
く、実数のXYZ値で表されることから、各画素の示す
色情報は正確に保持され失われることはない。
Even when the brightness level of the image is changed in this way, the pixel values are represented by real XYZ values rather than natural RGB values, and therefore the color information indicated by each pixel is accurate. It is held in and never lost.

【0047】次に、重み設定部207により表色系変換
前の第2画像232が参照され、重み付け係数WT(0
≦WT≦1)が各画素ごとに決定される。すなわち、第
2画像232中の一の画素が注目画素として決定され
(図6:ステップST17)、注目画素の画素値の有効
度に基づいて、注目画素の重み付け係数が決定される
(ステップST18)。一の注目画素についての重み付
け係数WTが決定されると、順次注目画素を変更させつ
つステップST18が繰り返され、全画素について重み
付け係数WTが決定されRAM23に記憶される。
Next, the weight setting unit 207 refers to the second image 232 before color system conversion, and the weighting coefficient WT (0
≦ WT ≦ 1) is determined for each pixel. That is, one pixel in the second image 232 is determined as the target pixel (FIG. 6: step ST17), and the weighting coefficient of the target pixel is determined based on the effectiveness of the pixel value of the target pixel (step ST18). . When the weighting coefficient WT for one target pixel is determined, step ST18 is repeated while sequentially changing the target pixel, and the weighting coefficient WT is determined for all pixels and stored in the RAM 23.

【0048】次に、決定された重み付け係数WTを用い
て、画像合成部204により、下記の数4に示す演算が
各画素について行われ、合成画像241が生成されてR
AM23に記憶される(ステップST20)。なお、数
4においてX1,Y1,Z1はそれぞれ第1画像231の
一の画素(演算の対象画素)のXYZ値であり、
2’,Y2’,Z2’はそれぞれ輝度レベル調整後の第
2画像232の画素(第1画像231の対象画素と同一
位置の画素)のXYZ値であり、Xc,Yc,Zcはそ
れぞれ合成画像241の画素(第1画像231の対象画
素と同一位置の画素)のXYZ値である。
Next, using the determined weighting coefficient WT, the image combining unit 204 performs the calculation shown in the following formula 4 for each pixel to generate a combined image 241 and R
It is stored in the AM 23 (step ST20). In Expression 4, X 1 , Y 1 , and Z 1 are the XYZ values of one pixel of the first image 231 (pixel to be calculated),
X 2 ′, Y 2 ′, and Z 2 ′ are XYZ values of the pixels of the second image 232 after the brightness level adjustment (pixels at the same position as the target pixel of the first image 231), and Xc, Yc, and Zc are These are XYZ values of pixels of the composite image 241 (pixels at the same position as the target pixel of the first image 231).

【0049】[0049]

【数4】 [Equation 4]

【0050】数4の演算は重み付け係数WTを用いた加
重平均であり、重み付け係数WTは実質的に第1画像2
31と第2画像232との合成比率に相当する。
The calculation of equation 4 is a weighted average using the weighting coefficient WT, and the weighting coefficient WT is substantially the first image 2
This corresponds to the composition ratio of 31 and the second image 232.

【0051】ステップST18において重み付け係数W
Tの決定の際に使用される画素値の有効度としては、表
色系変換前の第2画像232の画素値(例えば、R,
G,Bの各色成分の平均値)が参照される。
In step ST18, the weighting coefficient W
As the validity of the pixel value used when determining T, the pixel value of the second image 232 before color system conversion (for example, R,
The average value of each of the G and B color components is referred to.

【0052】第2画像232は被写体の低輝度の部分に
相当する領域が適正露出となる画像であるため、画素値
が比較的低い値であるときはその画素値は被写体の色情
報を有効に示しており、逆に、画素値が比較的高い値で
あるときはその画素値は被写体の色情報を有効に示して
はいない。すなわち、第2画像232において画素値が
比較的低い値であるときはその画素の色情報の有効度は
比較的高いといえ、逆に、画素値が比較的高い値である
ときはその画素の色情報の有効度は比較的低いといえ
る。
Since the second image 232 is an image in which the area corresponding to the low-brightness portion of the subject is properly exposed, when the pixel value is relatively low, the pixel value makes the color information of the subject valid. On the contrary, when the pixel value is relatively high, the pixel value does not effectively indicate the color information of the subject. That is, when the pixel value in the second image 232 is relatively low, the effectiveness of the color information of the pixel is relatively high. Conversely, when the pixel value is relatively high, the pixel value of the pixel is relatively high. It can be said that the effectiveness of the color information is relatively low.

【0053】このため、第2画像232において有効度
が高い画素値を有する画素に関しては重み付け係数WT
を大きくすることにより第2画像232の合成比率を高
くし、逆に、第2画像232において有効度が低い画素
値を有する画素に関しては、重み付け係数WTを小さく
して第1画像231の合成比率を高くするようにしてい
る。
For this reason, the weighting coefficient WT is applied to the pixel having the pixel value of high effectiveness in the second image 232.
To increase the combination ratio of the second image 232, and conversely, for the pixels having a pixel value with low effectiveness in the second image 232, decrease the weighting coefficient WT to reduce the combination ratio of the first image 231. I try to raise it.

【0054】具体的には、重み付け係数WTは、図10
に示す第2画像232の画素値と、重み付け係数WTと
の関係を示す関係式に基づいて決定される。すなわち、
第2画像232の注目画素の画素値が所定のしきい値V
1未満のときは、注目画素の重み付け係数WTは1に決
定され、第2画像232の注目画素の画素値が所定のし
きい値V2(V2>V1)を超えるときは、注目画素の
重み付け係数WTは0に決定される。また、第2画像2
32の注目画素の画素値がしきい値V1以上、しきい値
V2以下のときは、注目画素の重み付け係数WTは、画
素値をPとして次の数5により決定される。
Specifically, the weighting coefficient WT is as shown in FIG.
Is determined based on the relational expression indicating the relation between the pixel value of the second image 232 and the weighting coefficient WT. That is,
The pixel value of the pixel of interest of the second image 232 has a predetermined threshold value V
When it is less than 1, the weighting coefficient WT of the target pixel is determined to be 1. When the pixel value of the target pixel of the second image 232 exceeds a predetermined threshold value V2 (V2> V1), the weighting coefficient of the target pixel is set. WT is determined to be 0. Also, the second image 2
When the pixel value of the target pixel of 32 is not less than the threshold value V1 and not more than the threshold value V2, the weighting coefficient WT of the target pixel is determined by the following formula 5 with the pixel value of P.

【0055】[0055]

【数5】 [Equation 5]

【0056】なお、画素値が0〜255の範囲内である
とした場合、しきい値V1については例えば100〜2
00の範囲内の値とすることが好ましく、しきい値V2
については例えば150〜250の範囲内の値とするこ
とが好ましい。ただし、しきい値V1<しきい値V2と
する。
When the pixel value is in the range of 0 to 255, the threshold value V1 is, for example, 100 to 2
A value within the range of 00 is preferable, and the threshold value V2
Is preferably set to a value within the range of 150 to 250, for example. However, threshold value V1 <threshold value V2.

【0057】このように、各画素の画素値の有効度に応
じた合成比率で第1画像231および第2画像232を
合成して合成画像241を生成するため、合成前の第1
画像231および第2画像232において有効な色情報
を合成画像241において適切に反映させることができ
る。
As described above, since the first image 231 and the second image 232 are combined to generate the combined image 241 at the combining ratio according to the effectiveness of the pixel value of each pixel, the first image before the combination is generated.
Effective color information in the image 231 and the second image 232 can be appropriately reflected in the composite image 241.

【0058】次に、生成された合成画像241の各画素
の明るさの調整が局所コントラスト補正部205により
行われる(ステップST21)。前述したように、第2
画像232は輝度レベルが低下されてから合成に用いら
れるため、合成画像241において第2画像232の画
素値が含まれる領域については暗くなりすぎてしまい、
合成画像241は人間の感覚的に不自然な明るさの画像
となる。このため、このような領域に関して明るさを上
昇させて、自然な明るさの合成画像241を得ることと
なる。
Next, the brightness of each pixel of the generated composite image 241 is adjusted by the local contrast correction section 205 (step ST21). As mentioned above, the second
Since the image 232 is used for composition after the brightness level is lowered, the area of the composite image 241 including the pixel value of the second image 232 becomes too dark.
The composite image 241 is an image having a brightness that is unnatural to human senses. For this reason, the brightness of such an area is increased, and a synthetic image 241 having a natural brightness is obtained.

【0059】具体的には、局所コントラスト補正部20
5に、露出制御部201から第1画像231および第2
画像232のそれぞれ明るさの差を示す値として差分露
出値ΔEvが入力され、重み設定部207から各画素の
合成比率を示す値として重み付け係数WTが入力され
る。局所コントラスト補正部205は、入力された差分
露出値ΔEvおよび重み付け係数WT並びに予め設定さ
れる明暗順応計数α(0≦α≦1)を用いて、下記の数
6に示す演算を全画素について行うことにより合成画像
241の明るさの調整を行う。なお、数6においてX
c,Yc,Zcはそれぞれ明るさ調整前の合成画像24
1の一の画素のXYZ値であり、Xa,Ya,Zaはそ
れぞれ明るさ調整後の合成画像241の当該画素のXY
Z値である。
Specifically, the local contrast correction unit 20
5, the first image 231 and the second image from the exposure control unit 201.
The differential exposure value ΔEv is input as a value indicating the difference in brightness of each image 232, and the weighting coefficient WT is input from the weight setting unit 207 as a value indicating the composition ratio of each pixel. The local contrast correction unit 205 uses the input differential exposure value ΔEv, the weighting coefficient WT, and the preset light-dark adaptation coefficient α (0 ≦ α ≦ 1) to perform the calculation shown in Formula 6 below for all pixels. By doing so, the brightness of the composite image 241 is adjusted. In addition, in Formula 6, X
c, Yc, and Zc are composite images 24 before brightness adjustment, respectively.
1 is the XYZ value of one pixel, and Xa, Ya, and Za are the XY of that pixel in the composite image 241 after the brightness adjustment.
Z value.

【0060】[0060]

【数6】 [Equation 6]

【0061】ここで、合成画像241において第2画像
232の画素値が含まれない領域についての重み付け係
数WTは0であるため、これらの領域の明るさの調整は
行われない。したがって、合成画像241において第2
画像232の画素値が含まれる領域についてのみ、その
合成比率に応じて明るさが上昇される。すなわち、この
処理は合成画像241に対して局所的にコントラストを
補正することに相当するため、以下この処理を「局所コ
ントラスト補正」とも称する。
Here, since the weighting coefficient WT is 0 for the areas of the composite image 241 in which the pixel value of the second image 232 is not included, the brightness of these areas is not adjusted. Therefore, in the composite image 241, the second
The brightness of only the area of the image 232 including the pixel value is increased according to the combination ratio. That is, since this process corresponds to locally correcting the contrast of the composite image 241, this process is also referred to as “local contrast correction” below.

【0062】局所コントラスト補正において明暗順応係
数αは、各画素の明るさを調整する際の調整度合に相当
し、合成画像241を人間の感覚的に自然な画像として
得るためには、その値が0.2〜0.8の範囲内の値と
されることが好ましい。この明暗順応係数αの値は、所
定の値がROM22やRAM23に予め記憶されていて
もよいが、本実施の形態では明暗順応係数αはユーザの
好みを反映するための係数として利用される。すなわ
ち、階調調整モードにおける撮影前に、明暗順応係数α
の値は予め操作ボタン126を介してユーザにより設定
されてRAM23に記憶され、この明暗順応係数αの値
を用いて局所コントラスト補正が行われる。これによ
り、ユーザの好みを反映した所望の合成画像241を生
成することができることとなる。
In the local contrast correction, the light-dark adaptation coefficient α corresponds to the degree of adjustment when adjusting the brightness of each pixel, and its value is required to obtain the composite image 241 as a human-natural image. It is preferable to set the value within the range of 0.2 to 0.8. As the value of the light-dark adaptation coefficient α, a predetermined value may be stored in advance in the ROM 22 or the RAM 23, but in the present embodiment, the light-dark adaptation coefficient α is used as a coefficient for reflecting the user's preference. That is, before the image pickup in the gradation adjustment mode, the light-dark adaptation coefficient α
The value of is previously set by the user via the operation button 126 and is stored in the RAM 23, and the local contrast correction is performed using the value of the light-dark adaptation coefficient α. This makes it possible to generate a desired composite image 241 that reflects the user's preference.

【0063】合成画像241に対して局所コントラスト
補正が施されると、次に、RGB変換部206により、
合成画像241の各画素のXYZ値で表される画素値
が、所定のマトリクス演算によって再度RGB値に変換
される(ステップST22)。合成画像241の画素値
をRGB値へ変換する際に用いるマトリクスとしては、
上記ステップST15において用いたマトリクスの逆行
列などを利用してもよいが、所定のRGB表色系(例え
ば、sRGBに準拠したRGB表色系)のRGB値に変
換するマトリクスなどを利用してもよい。
When the local contrast correction is applied to the composite image 241, the RGB conversion unit 206 then
The pixel value represented by the XYZ value of each pixel of the composite image 241 is converted into the RGB value again by a predetermined matrix calculation (step ST22). As a matrix used when converting the pixel values of the composite image 241 into RGB values,
The inverse matrix of the matrix used in step ST15 may be used, or a matrix that converts RGB values of a predetermined RGB color system (for example, an RGB color system conforming to sRGB) may be used. Good.

【0064】その後、上記のようにして求められた合成
画像241が、外部メモリ123に保存される(ステッ
プST23)。求められた合成画像241は、被写体の
高輝度の部分に相当する領域および低輝度の部分に相当
する領域の双方が適切な明るさとなり実質的にダイナミ
ックレンジを拡げた画像となるとともに、合成前の第1
画像231および第2画像232において有効な画素の
色情報を正確に反映する画像となる。
Thereafter, the composite image 241 obtained as described above is stored in the external memory 123 (step ST23). The obtained composite image 241 becomes an image in which both the region corresponding to the high-intensity part and the region corresponding to the low-intensity part of the subject have appropriate brightness, and the dynamic range is substantially expanded. First of
In the image 231 and the second image 232, the image accurately reflects the color information of effective pixels.

【0065】以上、本発明の第1の実施の形態について
説明を行ったが、デジタルカメラ1では階調が調整され
た合成画像(階調調整画像)を生成する際に、各画素の
画素値が機器非依存のXYZ表色系におけるXYZ値に
変換されることから、各画素の色情報が機器に依存しな
い正確な値として表現され、合成画像の生成過程におい
て色情報が歪められることが無くなる。また、画素値が
実数のXYZ値で表現されて実数のまま演算されるた
め、演算において生じた端数が丸められることなく正確
に演算される。これらのことから、合成画像の生成過程
において色情報の欠落が無くなり、合成前の第1および
第2画像の色情報を正確に反映する合成画像を得ること
ができる。
The first embodiment of the present invention has been described above. However, when the digital camera 1 generates a composite image (gradation adjusted image) whose gradation is adjusted, the pixel value of each pixel is Is converted into an XYZ value in a device-independent XYZ color system, so that the color information of each pixel is expressed as an accurate value that does not depend on the device, and the color information is not distorted in the process of generating a composite image. . Further, since the pixel value is expressed by a real number XYZ value and is calculated as a real number, the fraction generated in the calculation is not rounded and is accurately calculated. For these reasons, there is no loss of color information in the process of generating a composite image, and it is possible to obtain a composite image that accurately reflects the color information of the first and second images before composition.

【0066】また、デジタルカメラ1では、各画素ごと
に画素値の有効度を判断して重み付け係数WTを決定
し、この重み付け係数WTを用いて合成画像を生成する
ため、合成前の第1画像および第2画像において有効で
ある色情報を合成画像において適切に反映させることが
できる。
In the digital camera 1, the weighting coefficient WT is determined by judging the validity of the pixel value for each pixel, and the weighting coefficient WT is used to generate the composite image. And, the color information that is effective in the second image can be appropriately reflected in the combined image.

【0067】また、合成前の第1画像および第2画像そ
れぞれの明るさの差である差分露出値ΔEv、各画素の
合成比率を示す重み付け係数WTに基づいて、合成画像
の各画素の明るさの調整を行うため、各画素に応じて適
切な明るさの調整を行うこととができ、合成画像として
自然な画像を取得することができる。
Further, the brightness of each pixel of the composite image is calculated based on the differential exposure value ΔEv which is the difference in brightness between the first image and the second image before the composition and the weighting coefficient WT indicating the composition ratio of each pixel. Therefore, it is possible to adjust the brightness appropriately for each pixel, and it is possible to obtain a natural image as a composite image.

【0068】<2.第2の実施の形態>次に、本発明の
第2の実施の形態について説明する。
<2. Second Embodiment> Next, a second embodiment of the present invention will be described.

【0069】一般に、デジタルカメラ等によって取得さ
れる画像においては、被写体を照明する照明光の分光特
性の影響を受けることにより、画像全体が照明光に応じ
た色に偏る現象(いわゆる色かぶり)が発生する。この
ため、一般的なデジタルカメラではホワイトバランス補
正などを行うことによりこのような影響を補正するよう
にしている。このようなホワイトバランス補正において
は、画像中の被写体全てが同一の照明光により照明され
ているものとして処理が行われる。したがって、図7に
示す被写体のように複数の照明光(図においては、太陽
光および室内灯)を受けた被写体を撮影する場合には、
適切なホワイトバランス補正を施すことはできない。
In general, in an image obtained by a digital camera or the like, a phenomenon (so-called color cast) in which the entire image is biased to a color corresponding to the illumination light due to the influence of the spectral characteristic of the illumination light that illuminates the subject. Occur. Therefore, in a general digital camera, such influence is corrected by performing white balance correction or the like. In such white balance correction, processing is performed assuming that all the subjects in the image are illuminated by the same illumination light. Therefore, when a subject such as the subject shown in FIG. 7 that receives a plurality of illumination lights (in the figure, sunlight and indoor light) is photographed,
Appropriate white balance correction cannot be applied.

【0070】そこで、本実施の形態の画像処理装置であ
るデジタルカメラ1においては、このような複数の照明
光の分光特性の影響も考慮して合成画像を生成する。本
実施の形態のデジタルカメラ1の構成は図1ないし図3
に示すものと同様であるため詳細な説明は省略し、デジ
タルカメラ1の動作を中心に説明する。
Therefore, in the digital camera 1 which is the image processing apparatus of the present embodiment, a composite image is generated in consideration of the influence of such spectral characteristics of the plurality of illumination lights. The configuration of the digital camera 1 according to the present embodiment is shown in FIGS.
Since it is similar to that shown in FIG. 1, detailed description thereof will be omitted, and the operation of the digital camera 1 will be mainly described.

【0071】図11は、本実施の形態のデジタルカメラ
1の主としてCPU21、ROM22およびRAM23
により実現される機能のうち階調調整モードに係る構成
を他の構成とともに示すブロック図である。図11に示
す構成のうち物体色成分データ生成部208および再現
画像生成部209は、CPU21、ROM22、RAM
23等により実現される機能を示す。なお、図11にお
いては省略しているがデジタルカメラ1は、図4に示し
たXYZ変換部202、輝度レベル調整部203、画像
合成部204、局所コントラスト補正部205、RGB
変換部206および重み設定部207も同様に備えてい
る。また、図12および図13は階調調整モードにおけ
る撮影および画像処理の流れを示す図である。以下、こ
れらの図を参照しながらデジタルカメラ1の階調調整モ
ードにおける動作について説明する。
FIG. 11 mainly shows the CPU 21, ROM 22 and RAM 23 of the digital camera 1 according to the present embodiment.
FIG. 10 is a block diagram showing a configuration related to a gradation adjustment mode among the functions realized by, together with other configurations. In the configuration shown in FIG. 11, the object color component data generation unit 208 and the reproduction image generation unit 209 include a CPU 21, a ROM 22, and a RAM.
23 shows functions realized by 23 and the like. Although omitted in FIG. 11, the digital camera 1 includes the XYZ conversion unit 202, the brightness level adjustment unit 203, the image composition unit 204, the local contrast correction unit 205, and the RGB shown in FIG.
The conversion unit 206 and the weight setting unit 207 are similarly provided. 12 and 13 are diagrams showing the flow of shooting and image processing in the gradation adjustment mode. The operation of the digital camera 1 in the gradation adjustment mode will be described below with reference to these drawings.

【0072】まず、上記ステップST11およびステッ
プST12と同様にして、被写体の高輝度の部分に合わ
せた露出値が第1露出値Ev1として、被写体の低輝度
の部分に合わせた露出値が第2露出値Ev2としてそれ
ぞれRAM23に記憶される(ステップST31,ST
32)。
First, similarly to steps ST11 and ST12, the exposure value adjusted to the high-luminance portion of the subject is the first exposure value Ev1, and the exposure value adjusted to the low-luminance portion of the subject is the second exposure value Ev1. The value Ev2 is stored in the RAM 23 (steps ST31 and ST).
32).

【0073】次に、シャッタボタン122が操作される
と、デジタルカメラ1はこれに応答して、第1露出値E
v1に基づく露出条件かつフラッシュがONの状態にて
撮影を行い被写体の画像(以下、「第3画像」とい
う。)を得る(ステップST33)。すなわち、被写体
の高輝度の部分が適正露出となる露出条件で、フラッシ
ュ光を浴びた被写体の画像が第3画像233として得ら
れ、RAM23に記憶される。
Next, when the shutter button 122 is operated, the digital camera 1 responds to this by operating the first exposure value E.
An image of the subject (hereinafter, referred to as “third image”) is obtained by taking an image under the exposure condition based on v1 and the flash is on (step ST33). That is, the image of the subject exposed to the flash light is obtained as the third image 233 and stored in the RAM 23 under the exposure condition in which the high-luminance portion of the subject is properly exposed.

【0074】次に、第1露出値Ev1に基づく露出条件
かつフラッシュがOFFの状態にて撮影を行い被写体の
画像(以下、「第4画像」という。)を得る(ステップ
ST34)。すなわち、被写体の高輝度の部分が適正露
出となる露出条件で、フラッシュ光を有しない照明環境
下での被写体の画像が第4画像234として得られ、R
AM23に記憶される。
Next, photographing is performed under the exposure condition based on the first exposure value Ev1 and the flash is OFF to obtain an image of the subject (hereinafter referred to as "fourth image") (step ST34). That is, an image of the subject in an illumination environment that does not have flash light is obtained as the fourth image 234 under the exposure condition in which the high-luminance portion of the subject is properly exposed.
It is stored in AM23.

【0075】続いて、第2露出値Ev2に基づく露出条
件かつフラッシュがONの状態にて撮影を行いフラッシ
ュ光を浴びた被写体の画像(以下、「第5画像」とい
う。)を得る(ステップST35)。すなわち、被写体
の低輝度の部分が適正露出となる露出条件で、フラッシ
ュ光を浴びた被写体の画像が第5画像235として得ら
れ、RAM23に記憶される。
Then, an image of the subject exposed to the flash light (hereinafter referred to as "fifth image") is obtained by photographing under the exposure condition based on the second exposure value Ev2 and the flash is on (step ST35). ). That is, an image of the subject exposed to the flash light is obtained as the fifth image 235 and stored in the RAM 23 under the exposure condition in which the low-luminance portion of the subject is properly exposed.

【0076】さらに、第2露出値Ev2に基づく露出条
件かつフラッシュがOFFの状態にて撮影を行い被写体
の画像(以下、「第6画像」という。)を得る(ステッ
プST36)。すなわち、被写体の低輝度の部分が適正
露出となる露出条件で、フラッシュ光を有しない照明環
境下での被写体の画像が第6画像236として得られ、
RAM23に記憶される。
Further, an image of the subject (hereinafter referred to as "sixth image") is obtained by photographing under the exposure condition based on the second exposure value Ev2 and the flash is OFF (step ST36). That is, an image of the subject in an illumination environment that does not have flash light is obtained as the sixth image 236 under an exposure condition in which the low-luminance portion of the subject is properly exposed,
It is stored in the RAM 23.

【0077】これらの4回の撮影は、連写のように迅速
に行われる。したがって、第3画像233、第4画像2
34、第5画像235および第6画像236の撮影範囲
は同一となる。
These four times of photographing are performed quickly like continuous shooting. Therefore, the third image 233 and the fourth image 2
34, the fifth image 235, and the sixth image 236 have the same shooting range.

【0078】ここで、上記ステップST33およびステ
ップST35におけるフラッシュ121の発光は、一定
の電圧および発光時間となるように発光制御回路121
aにより制御され、フラッシュ121の発光特性が撮影
ごとにばらつくことはない。フラッシュ121の分光分
布もこの発光制御により一定に保たれ、この分光分布は
予め計測されてRAM23にフラッシュ分光データ24
3として記憶されている。なお、正確にはフラッシュ光
の相対的な分光分布(最大の分光強度を1として正規化
された分光分布をいい、以下「相対分光分布」とい
う。)がフラッシュ分光データ243として用いられ
る。
Here, in the light emission of the flash 121 in the steps ST33 and ST35, the light emission control circuit 121 is controlled so that the voltage and the light emission time are constant.
The light emission characteristics of the flash 121 are controlled by a and do not vary from one shooting to another. The spectral distribution of the flash 121 is also kept constant by this light emission control, this spectral distribution is measured in advance, and the flash spectral data 24 is stored in the RAM 23.
It is stored as 3. To be precise, the relative spectral distribution of the flash light (referred to as a spectral distribution normalized with the maximum spectral intensity being 1, hereinafter referred to as “relative spectral distribution”) is used as the flash spectral data 243.

【0079】4回の撮影によりRAM23に4枚の画像
が保存されると、物体色成分データ生成部208により
第3画像233および第4画像234から、照明環境の
分光特性の影響を取り除いた画像のデータに相当する物
体色成分データ(以下、「第1物体色成分データ」とい
う。)237が求められる(図13:ステップST3
7)。さらに、物体色成分データ生成部208により第
5画像235および第6画像236から物体色成分デー
タ(以下、「第2物体色成分データ」という。)238
が求められる(ステップST38)。
When four images are stored in the RAM 23 by four times of photographing, the object color component data generation unit 208 removes the influence of the spectral characteristic of the illumination environment from the third image 233 and the fourth image 234. Object color component data (hereinafter, referred to as “first object color component data”) 237 corresponding to the data in FIG. 13 (FIG. 13: step ST3).
7). Further, the object color component data generation unit 208 extracts object color component data (hereinafter, referred to as “second object color component data”) 238 from the fifth image 235 and the sixth image 236.
Is required (step ST38).

【0080】図14は、物体色成分データ生成部208
が第1および第2物体色成分データ237,238を求
める際の処理(ステップST37,ST38)の流れを
示す図である。以下、図14を参照して、第3画像23
3および第4画像234から第1物体色成分データ23
7を求める際の処理の流れについて説明するが、第5画
像235および第6画像236から第2物体色成分デー
タ238を求める際の処理の流れは、以下の説明におい
て第3画像233を第5画像235に、第4画像234
を第6画像236にそれぞれ置き換えたものにほぼ相当
することから、適宜相違点のみを説明する。
FIG. 14 shows the object color component data generator 208.
FIG. 7 is a diagram showing a flow of processing (steps ST37, ST38) when obtaining the first and second object color component data 237, 238. Hereinafter, referring to FIG. 14, the third image 23
The first object color component data 23 from the third and fourth images 234
7 will be described. The flow of processing when determining the second object color component data 238 from the fifth image 235 and the sixth image 236 will be described below with reference to the third image 233 and the fifth image 233. The image 235 has a fourth image 234.
Are almost equivalent to the sixth image 236, respectively, so only the different points will be described as appropriate.

【0081】まず、第3画像233から第4画像234
を減算して差分画像を求める。これにより、第3画像2
33の各画素のR,G,Bの各値から第4画像234の
対応する画素のR,G,Bの各値がそれぞれ減算され、
第3画像233と第4画像234との差分画像が得られ
る(ステップST101)。
First, the third image 233 to the fourth image 234.
Is subtracted to obtain a difference image. As a result, the third image 2
The R, G, B values of the corresponding pixel of the fourth image 234 are subtracted from the R, G, B values of the 33 pixel,
A difference image between the third image 233 and the fourth image 234 is obtained (step ST101).

【0082】次に、画像中の一の画素(すなわち、第3
画像233、第4画像234および差分画像における一
の画素の位置)が注目画素(の位置)として決定され
(ステップST102)、各画像における注目画素の画
素値が所定の条件を満たすが否かが判断される(ステッ
プST103)。条件が満たされる場合には注目画素に
対応する被写体上の微小領域の分光反射率が一画素分の
仮物体色成分データとして求められる(ステップST1
04)。
Next, one pixel in the image (that is, the third pixel
The position of one pixel in the image 233, the fourth image 234, and the difference image is determined as the target pixel (the position thereof) (step ST102), and whether or not the pixel value of the target pixel in each image satisfies the predetermined condition. It is determined (step ST103). If the condition is satisfied, the spectral reflectance of the minute area on the subject corresponding to the pixel of interest is obtained as temporary object color component data for one pixel (step ST1).
04).

【0083】また、仮物体色成分データが求められた注
目画素の位置が演算対象画素の位置(例えば、xy座
標)として所定の記憶場所に記憶される(ステップST
105)。
Further, the position of the pixel of interest for which the temporary object color component data is obtained is stored in a predetermined storage location as the position (for example, xy coordinate) of the pixel to be calculated (step ST).
105).

【0084】一の注目画素についてステップST103
〜ST105が実行されると、注目画素(の位置)を変
更させつつステップST102〜ST105が繰り返さ
れ、全画素について条件に応じつつ仮物体色成分データ
の算出および演算対象画素の位置の記憶が行われる(ス
テップST106)。
Step ST103 for one pixel of interest
When ST105 is executed, steps ST102 to ST105 are repeated while changing (the position of) the target pixel, and the calculation of the temporary object color component data and the storage of the position of the calculation target pixel are performed for all the pixels according to the conditions. (Step ST106).

【0085】演算対象画素ごとの仮物体色成分データが
求められると、各演算対象画素に関する第4画像234
の画素値および仮物体色成分データから演算対象画素に
関する照明成分データが求められる。そして、演算対象
画素ごとの照明成分データの平均値が、演算対象画素全
体に関する照明成分データとして求められる(ステップ
ST107)。照明成分データは実質的には被写体への
照明光の分光分布に相当するデータである。
When the temporary object color component data for each pixel to be calculated is obtained, the fourth image 234 for each pixel to be calculated is obtained.
The illumination component data regarding the calculation target pixel is obtained from the pixel value of and the temporary object color component data. Then, the average value of the illumination component data for each calculation target pixel is obtained as the illumination component data for all the calculation target pixels (step ST107). The illumination component data is data that substantially corresponds to the spectral distribution of the illumination light on the subject.

【0086】次に、ステップST103における演算対
象画素(正確には、演算対象画素の位置)の特定につい
て説明する。演算対象画素の特定は、照明成分データを
求める際の画像中の不適切な画素やノイズ成分を除去す
る処理に相当する。すなわち、第3画像233、第4画
像234および差分画像に基づいて、照明成分データの
算出には不適切な値を有する画素が演算対象から取り除
かれる。
Next, the specification of the calculation target pixel (correctly, the position of the calculation target pixel) in step ST103 will be described. The specification of the calculation target pixel corresponds to a process of removing inappropriate pixels and noise components in the image when obtaining the illumination component data. That is, based on the third image 233, the fourth image 234, and the difference image, the pixels having an inappropriate value for calculating the illumination component data are removed from the calculation target.

【0087】具体的には、注目画素の画素値のいずれか
の色成分がほぼ飽和している場合に演算対象画素から外
される。例えば、R,G,Bの色成分の値が0〜255
の範囲内であるとした場合、いずれかの色成分の値が2
50以上であると演算対象画素として取り扱わないとい
う判定がなされる。
Specifically, when any of the color components of the pixel value of the target pixel is almost saturated, it is excluded from the calculation target pixels. For example, the values of R, G, and B color components are 0 to 255.
If it is within the range of, the value of any color component is 2
If it is 50 or more, it is determined that the pixel is not treated as a calculation target pixel.

【0088】また、注目画素の画素値のいずれかの色成
分が黒つぶれしている場合に演算対象画素から外され
る。例えば、R,G,Bの色成分の値が0〜255の範
囲内であるとした場合、いずれかの色成分の値が4以下
であると演算対象画素として取り扱われない。
If any of the color components of the pixel value of the target pixel is crushed in black, it is excluded from the calculation target pixels. For example, if the R, G, and B color component values are in the range of 0 to 255, and any one of the color component values is 4 or less, the pixel is not treated as a calculation target pixel.

【0089】差分画像は実質的にフラッシュ光のみにて
撮影が行われた際の画像に相当するため、背景などの暗
い部分やフラッシュ光を反射して明るくなりすぎている
画素は演算対象画素から外される。すなわち、差分画像
においても、画素値の各色成分が低すぎたり高すぎる場
合には演算対象画素としては取り扱われない。
Since the difference image substantially corresponds to the image when the image is taken only with the flash light, a dark portion such as the background or a pixel which is too bright by reflecting the flash light is out of the calculation target pixel. Removed. That is, even in the difference image, if each color component of the pixel value is too low or too high, it is not treated as a calculation target pixel.

【0090】以上の3つの判定をステップST103に
おいて行うことにより、第3画像233、第4画像23
4および差分画像のいずれにおいても適切な画素値を有
する画素の位置が演算対象画素の位置として求められ
る。
By performing the above three determinations in step ST103, the third image 233 and the fourth image 23
In both 4 and the difference image, the position of the pixel having an appropriate pixel value is obtained as the position of the calculation target pixel.

【0091】第3画像233および第4画像234は被
写体の高輝度の部分が適正露出となる露出条件で取得さ
れる画像であるため、被写体の低輝度の部分に相当する
領域の画素は黒つぶれしている可能性がある。上記の判
定によりこのような領域の画素は演算対象画素としては
取り扱われないこととなるため、被写体の比較的高輝度
の部分に相当する領域の画素が主に演算対象画素とされ
る。
Since the third image 233 and the fourth image 234 are images acquired under the exposure condition in which the high-intensity part of the subject is properly exposed, the pixels in the region corresponding to the low-intensity part of the subject are blacked out. There is a possibility that According to the above determination, the pixels in such an area are not treated as the calculation target pixels, and therefore the pixels in the area corresponding to the comparatively high brightness portion of the subject are mainly the calculation target pixels.

【0092】なお、第5画像235および第6画像23
6から第2物体色成分データ238を求める際において
は、第5画像235および第6画像236は被写体の低
輝度の部分が適正露出となる露出条件で取得される画像
であるため、被写体の高輝度の部分に相当する領域の画
素はいずれかの色成分が飽和している可能性がある。上
記の判定によりこのような領域の画素は演算対象画素と
しては取り扱われないことなるため、被写体の比較的低
輝度の部分に相当する領域の画素が主に演算対象画素と
される。
The fifth image 235 and the sixth image 23
When determining the second object color component data 238 from No. 6, since the fifth image 235 and the sixth image 236 are images acquired under the exposure condition in which the low-luminance portion of the subject is properly exposed, It is possible that any of the color components of the pixels in the area corresponding to the luminance portion is saturated. Pixels in such a region are not treated as calculation target pixels by the above determination, and thus pixels in a region corresponding to a relatively low brightness portion of the subject are mainly used as calculation target pixels.

【0093】次に、演算対象画素において第4画像23
4から照明環境の分光特性の影響を取り除いた成分(実
質的に被写体の分光反射率に相当する。)が仮物体色成
分データとして求められ、その後、演算対象画素の照明
成分データが求められる原理について説明する。
Next, in the calculation target pixel, the fourth image 23
4 is obtained by removing the effect of the spectral characteristics of the illumination environment (substantially equivalent to the spectral reflectance of the subject) as temporary object color component data, and then the illumination component data of the calculation target pixel is obtained. Will be described.

【0094】まず、被写体を照明する照明光(光源から
の直接的な光および間接的な光を含む照明環境における
照明光をいう。)の分光分布をE(λ)とし、この分光分
布E(λ)を3つの基底関数E1(λ),E2(λ),E3(λ)
および加重係数ε1,ε2,ε3を用いて、
First, the spectral distribution of the illumination light that illuminates the subject (the illumination light in the illumination environment that includes direct light and indirect light from the light source) is E (λ), and this spectral distribution E ( λ) to three basis functions E 1 (λ), E 2 (λ), E 3 (λ)
And the weighting factors ε 1 , ε 2 , ε 3 ,

【0095】[0095]

【数7】 [Equation 7]

【0096】と表し、同様に、一の演算対象画素(以
下、「対象画素」という。)に対応する被写体上の位置
の分光反射率S(λ)を3つの基底関数S1(λ),S
2(λ),S3(λ)および加重係数σ1,σ2,σ3を用い
て、
Similarly, the spectral reflectance S (λ) at the position on the subject corresponding to one calculation target pixel (hereinafter referred to as “target pixel”) is represented by three basis functions S 1 (λ), S
Using 2 (λ), S 3 (λ) and weighting factors σ 1 , σ 2 , σ 3 ,

【0097】[0097]

【数8】 [Equation 8]

【0098】と表すと、CCD112上の対象画素に入
射する光I(λ)(レンズユニット11内のフィルタ等を
無視した場合の入射光)は、
When expressed, the light I (λ) incident on the target pixel on the CCD 112 (incident light when the filter in the lens unit 11 is ignored) is

【0099】[0099]

【数9】 [Equation 9]

【0100】と表現される。また、対象画素のR,G,
Bのいずれかの色(以下、「対象色」という。)に関す
る値がρcであり、CCD112の対象色の分光感度を
c(λ)とすると、値ρcは、
It is expressed as follows. In addition, R, G, and
Assuming that the value relating to one of the colors of B (hereinafter referred to as “target color”) is ρ c and the spectral sensitivity of the target color of the CCD 112 is R c (λ), the value ρ c is

【0101】[0101]

【数10】 [Equation 10]

【0102】により導かれる。It is derived by

【0103】ここで、フラッシュONの第3画像233
の対象画素の対象色の値がρc1であり、フラッシュOF
Fの第4画像234の対応する値がρc2である場合、差
分画像の対応する値ρsは、
Here, the third image 233 of flash ON
Value of the target color of the target pixel is ρ c1 , and the flash OF
If the corresponding value of the fourth image 234 of F is ρ c2 , the corresponding value of the difference image ρ s is

【0104】[0104]

【数11】 [Equation 11]

【0105】となる。I1(λ)はフラッシュONの際の
対象画素に入射する光であり、ε11,ε12,ε13はフラ
ッシュ光を含む照明光に関する基底関数の加重係数であ
る。同様に、I2(λ)はフラッシュOFFの際の対象画
素に入射する光であり、ε21,ε22,ε23はフラッシュ
光を含まない照明光に関する基底関数の加重係数であ
る。さらに、εsi(i=1,2,3)は(ε1i−ε2i
である。
It becomes: I 1 (λ) is the light incident on the target pixel when the flash is ON, and ε 11 , ε 12 , and ε 13 are weighting coefficients of the basis function for the illumination light including the flash light. Similarly, I 2 (λ) is the light that is incident on the target pixel when the flash is off, and ε 21 , ε 22 , and ε 23 are the basis function weighting coefficients for the illumination light that does not include the flash light. Furthermore, ε si (i = 1, 2, 3) is (ε 1i −ε 2i ).
Is.

【0106】数11において、基底関数Ei(λ),S
j(λ)は予め定められた関数であり、分光感度Rc(λ)は
予め計測により求めることができる関数である。これら
の情報は予めROM22やRAM23に記憶される。一
方、第3画像233および第4画像234の撮影におい
て露出条件が同一に制御され、第3画像233から第4
画像234を減算した差分画像は、フラッシュ光のみを
照明光源とする画像に相当することから、後述する手法
により加重係数εsiはフラッシュ光の相対分光分布から
導くことができる。
In equation 11, the basis functions E i (λ), S
j (λ) is a predetermined function, and the spectral sensitivity R c (λ) is a function that can be obtained in advance by measurement. These pieces of information are stored in the ROM 22 and the RAM 23 in advance. On the other hand, the exposure conditions are controlled to be the same in the shooting of the third image 233 and the fourth image 234, and the third image 233 to the fourth image
Since the difference image obtained by subtracting the image 234 corresponds to the image in which only the flash light is used as the illumination light source, the weighting coefficient ε si can be derived from the relative spectral distribution of the flash light by the method described later.

【0107】したがって、数11に示す方程式において
未知数は3つの加重係数σ1,σ2,σ3のみである。ま
た、数11に示す方程式は対象画素におけるR,G,B
の3つの色のそれぞれに関して求めることができ、これ
ら3つの方程式を解くことにより3つの加重係数σ1
σ2,σ3を求めることができる。すなわち、対象画素に
対応する被写体上の位置の分光反射率が得られる。
Therefore, in the equation shown in the equation 11, only three weighting coefficients σ 1 , σ 2 and σ 3 are unknowns. Further, the equation shown in the equation 11 is R, G, B in the target pixel.
Can be obtained for each of the three colors of, and by solving these three equations, the three weighting factors σ 1 ,
σ 2 and σ 3 can be obtained. That is, the spectral reflectance at the position on the subject corresponding to the target pixel is obtained.

【0108】次に、加重係数εsiを求める手法について
説明する。既述のように差分画像はフラッシュ光のみを
照明光とする画像に相当し、差分画像における照明光の
相対分光分布は既知である。一方で、フラッシュから遠
い被写体上の領域はフラッシュ121に近い領域よりも
フラッシュ光を受ける度合いが小さい。したがって、差
分画像ではおおよそフラッシュ121から遠い位置ほど
暗く現れる。
Next, a method for obtaining the weighting coefficient ε si will be described. As described above, the difference image corresponds to an image in which only the flash light is used as the illumination light, and the relative spectral distribution of the illumination light in the difference image is known. On the other hand, the area on the subject far from the flash receives the flash light less than the area near the flash 121. Therefore, in the difference image, the position farther from the flash 121 appears darker.

【0109】そこで、3つの加重係数εs1,εs2,εs3
の値の相対関係を一定に保ったまま差分画像中の対象画
素の輝度に比例してこれらの加重係数の値を増減する。
すなわち、差分画像中の対象画素の輝度が小さい場合に
は加重係数εs1,εs2,εs3の値は小さな値として決定
され、輝度が大きい場合には加重係数εs1,εs2,ε s3
の値は大きな値として決定される。3つの加重係数
εs1,εs2,εs3の相対関係は3つの基底関数E
1(λ),E2(λ),E3(λ)の加重和がフラッシュ光の分
光分布と比例するように予め求められており、輝度と加
重係数εsiとの比例関係は予め測定により求められる。
Therefore, the three weighting factors εs1, Εs2, Εs3
The target image in the difference image while keeping the relative relationship of
The value of these weighting factors is increased or decreased in proportion to the brightness of the element.
That is, when the brightness of the target pixel in the difference image is small
Is the weighting coefficient εs1, Εs2, Εs3Value is determined as a small value
If the brightness is large, the weighting coefficient εs1, Εs2, Ε s3
The value of is determined as a large value. 3 weighting factors
εs1, Εs2, Εs3Is based on three basis functions E
1(λ), E2(λ), E3The weighted sum of (λ) is the flash light
Pre-determined to be proportional to the light distribution, it
Weighting coefficient εsiThe proportional relationship with and is previously obtained by measurement.

【0110】なお、加重係数εsiは対象画素に対応する
被写体上の位置に照射されるフラッシュ光の分光分布を
示す値であり、第3画像233および第4画像234間
におけるフラッシュ121による照明光の変更量の分光
分布を示す値である。したがって、フラッシュ分光デー
タ243より加重係数εsiを求める処理は、フラッシュ
光の相対分光分布からフラッシュ121による照明環境
(照明光)の分光変更量を求める処理に相当する。
The weighting coefficient ε si is a value indicating the spectral distribution of the flash light emitted to the position on the subject corresponding to the target pixel, and is the illumination light of the flash 121 between the third image 233 and the fourth image 234. Is a value indicating the spectral distribution of the change amount of. Therefore, the process of obtaining the weighting coefficient ε si from the flash spectral data 243 corresponds to the process of obtaining the spectral change amount of the illumination environment (illumination light) by the flash 121 from the relative spectral distribution of the flash light.

【0111】以上の原理に基づき、デジタルカメラ1の
物体色成分データ生成部208は差分画像の演算対象画
素の画素値およびフラッシュ分光データ243を参照し
ながら、各演算対象画素に対応する被写体上の位置の分
光反射率を求める。被写体の分光反射率は、照明環境の
分光特性の影響が取り除かれた画像データに相当し、仮
物体色成分データとしてRAM23に記憶される(ステ
ップST104)。
Based on the above principle, the object color component data generation unit 208 of the digital camera 1 refers to the pixel value of the calculation target pixel of the difference image and the flash spectral data 243 and refers to the object corresponding to each calculation target pixel. Determine the spectral reflectance of the position. The spectral reflectance of the subject corresponds to the image data from which the influence of the spectral characteristics of the illumination environment has been removed, and is stored in the RAM 23 as temporary object color component data (step ST104).

【0112】仮物体色成分データが求められると、数9
および数10(ただし、数9のεiにε2iを代入す
る。)より第4画像234の演算対象画素のR,G,B
の値に基づいて加重係数ε21,ε22,ε23に関する3つ
の方程式を求めることができる。これらの方程式を解く
ことにより画像における各演算対象画素に関する加重係
数ε2iが求められる。求められた加重係数ε2iは演算対
象画素におけるフラッシュ光を含まない照明環境の分光
特性の影響を示す成分となる。
When the temporary object color component data is obtained,
And number 10 (where substitutes epsilon 2i number 9 of epsilon i.) From the calculation target pixels of the fourth image 234 R, G, B
Based on the value of, the three equations for the weighting factors ε 21 , ε 22 , ε 23 can be obtained. By solving these equations, the weighting coefficient ε 2i for each calculation target pixel in the image is obtained. The obtained weighting coefficient ε 2i becomes a component indicating the influence of the spectral characteristic of the illumination environment that does not include the flash light in the calculation target pixel.

【0113】ここで、およそ均一な照明光の照明環境で
ある場合には演算対象画素ごとの加重係数ε2iのばらつ
きは少ない。そこで、加重係数ε21,ε22,ε23のそれ
ぞれについて全演算対象画素の平均値ε21a,ε22a,ε
23aを求め、求められた3つの加重係数が演算対象画素
全体に関する照明成分データとされる(ステップST1
07)。
Here, when the illumination environment of the illumination light is approximately uniform, there is little variation in the weighting coefficient ε 2i among the calculation target pixels. Therefore, for each of the weighting factors ε 21 , ε 22 , and ε 23 , the average values ε 21a , ε 22a , and ε of all the calculation target pixels are set.
23a is obtained, and the obtained three weighting factors are used as illumination component data for all the calculation target pixels (step ST1).
07).

【0114】演算対象画素は主に被写体の比較的高輝度
の部分に相当する領域の画素であることから、求められ
た照明成分データは被写体の比較的高輝度の部分を照明
する照明光の分光分布に実質的に相当するデータとな
る。
Since the calculation target pixel is mainly a pixel in a region corresponding to a relatively high-brightness portion of the subject, the obtained illumination component data is the spectrum of the illumination light that illuminates the relatively high-brightness portion of the subject. The data substantially corresponds to the distribution.

【0115】なお、第5画像235および第6画像23
6から第2物体色成分データ238を求める際において
は、演算対象画素は主に被写体の比較的低輝度の部分に
相当する領域の画素であることから、求められた照明成
分データは被写体の比較的低輝度の部分を照明する照明
光の分光分布に実質的に相当するデータとなる。
The fifth image 235 and the sixth image 23
When calculating the second object color component data 238 from No. 6, since the calculation target pixel is mainly the pixel of the region corresponding to the relatively low luminance part of the subject, the obtained illumination component data is compared with the subject. The data is substantially equivalent to the spectral distribution of the illumination light that illuminates the portion of low luminance.

【0116】照明成分データが求められると、照明成分
データおよび第4画像234を用いて、各画素の物体色
成分データが求められる(ステップST108)。具体
的には、R,G,Bのそれぞれの色成分に関して数12
に示す方程式を求め、未知数σjが物体色成分データと
して求められる。
When the illumination component data is obtained, the object color component data of each pixel is obtained using the illumination component data and the fourth image 234 (step ST108). Specifically, regarding each of the R, G, and B color components,
The unknowns σ j are obtained as object color component data.

【0117】[0117]

【数12】 [Equation 12]

【0118】その後、求められた物体色成分データは第
1物体色成分データ237としてRAM23に記憶され
る。この第1物体色成分データ237は、実質的に被写
体の分光反射率に相当するデータであるが、被写体の比
較的高輝度の部分を照明する照明光の分光分布に相当す
る照明成分データに基づいて求められたものであること
から、被写体の比較的高輝度の部分の分光反射率を比較
的高精度に示すデータとなる。
Thereafter, the obtained object color component data is stored in the RAM 23 as the first object color component data 237. The first object color component data 237 is data that substantially corresponds to the spectral reflectance of the subject, but is based on illumination component data that corresponds to the spectral distribution of the illumination light that illuminates a relatively high-luminance portion of the subject. Since it is obtained by the above, it is data showing the spectral reflectance of a relatively high-luminance portion of the subject with relatively high accuracy.

【0119】なお、第5画像235および第6画像23
6から第2物体色成分データ238を求める際において
は、求められた物体色成分データは第2物体色成分デー
タ238としてRAM23に記憶される。この第2物体
色成分データ238は、被写体の比較的低輝度の部分を
照明する照明光の分光分布に相当する照明成分データに
基づいて求められたものであることから、被写体の比較
的低輝度の部分の分光反射率を比較的高精度に示すデー
タとなる。
The fifth image 235 and the sixth image 23
When obtaining the second object color component data 238 from 6, the obtained object color component data is stored in the RAM 23 as the second object color component data 238. Since the second object color component data 238 is obtained based on the illumination component data corresponding to the spectral distribution of the illumination light that illuminates the relatively low-luminance portion of the subject, the relatively low-luminance of the subject is obtained. This is data that indicates the spectral reflectance of the portion with relatively high accuracy.

【0120】以上のようにして第1物体色成分データ2
37および第2物体色成分データ238が求められる
と、次に、求められた第1物体色成分データ237と、
光源(例えば「CIE D65」,「CIE D50」
等の標準光源が望ましい。)の分光特性が画像に与える
影響を示す照明成分データ(分光分布に実質的に相当す
るデータ)244とを用いて、再現画像生成部209に
より数9および数10に示した演算が行われる。これに
より、第1物体色成分データ237と照明成分データ2
44とが合成されて各画素のR,G,Bの値ρr,ρg
ρbが求められ、被写体の画像(以下、「第1再現画
像」という。)239が生成される。生成された第1再
現画像239はRAM23に記憶される。なお、この照
明成分データ244は予め準備され、ROM22やRA
M23に記憶される。
As described above, the first object color component data 2
37 and the second object color component data 238 are obtained, next, the obtained first object color component data 237 and
Light source (eg "CIE D65", "CIE D50"
A standard light source such as The reproduction image generation unit 209 performs the calculations shown in Expressions 9 and 10 using the illumination component data (data substantially corresponding to the spectral distribution) 244 indicating the influence of the spectral characteristics of (1) on the image. As a result, the first object color component data 237 and the illumination component data 2
44 and are combined to obtain R, G, B values ρ r , ρ g of each pixel,
ρ b is calculated, and an image of the subject (hereinafter, referred to as “first reproduction image”) 239 is generated. The generated first reproduction image 239 is stored in the RAM 23. The illumination component data 244 is prepared in advance and stored in the ROM 22 and RA.
It is stored in M23.

【0121】この第1再現画像239は、被写体の比較
的高輝度の部分を照明する照明光による色かぶりが取り
除かれた画像であり、被写体の比較的高輝度の部分の色
を正確に再現するものとなる(図13:ステップST3
9)。
The first reproduced image 239 is an image from which the color cast due to the illumination light for illuminating the relatively high-intensity part of the subject is removed, and the color of the relatively high-intensity part of the subject is accurately reproduced. (Fig. 13: Step ST3
9).

【0122】次に、第2物体色成分データ238と、照
明成分データ244とが再現画像生成部209により合
成されて、各画素のR,G,Bの値ρr,ρg,ρbが求
められ、被写体の画像(以下、「第2再現画像」とい
う。)240が生成される。生成された第2再現画像2
40はRAM23に記憶される。
Next, the second object color component data 238 and the illumination component data 244 are combined by the reproduction image generation unit 209 to obtain the R, G, B values ρ r , ρ g , ρ b of each pixel. The image of the subject (hereinafter, referred to as “second reproduction image”) 240 is obtained. Generated second reproduction image 2
40 is stored in the RAM 23.

【0123】この第2再現画像240は、被写体の比較
的低輝度の部分を照明する照明光による色かぶりが取り
除かれた画像であり、被写体の比較的低輝度の部分の色
を正確に再現するものとなる(ステップST40)。
The second reproduced image 240 is an image from which the color cast due to the illumination light that illuminates the relatively low luminance part of the subject has been removed, and the color of the relatively low luminance part of the subject is accurately reproduced. (Step ST40).

【0124】このようにして得られた第1再現画像23
9および第2再現画像240はそれぞれ、第1の実施の
形態の第1画像231および第2画像232に相当する
画像とされ、その後、図5のステップST15以降の処
理と同様の処理が行われる。これにより、第1再現画像
239および第2再現画像240から、階調が調整さ
れ、実質的にダイナミックレンジを広げた合成画像が生
成されることとなる。
The first reproduced image 23 thus obtained
9 and the second reproduced image 240 are images corresponding to the first image 231 and the second image 232 of the first embodiment, respectively, and thereafter, the same processing as the processing after step ST15 in FIG. 5 is performed. . As a result, the gradation is adjusted from the first reproduction image 239 and the second reproduction image 240, and a composite image having a substantially expanded dynamic range is generated.

【0125】この合成画像は、第1の実施の形態と同様
に、合成前の第1再現画像239および第2画像240
において有効な画素の色情報を正確に反映する画像とな
る。ここで、第1再現画像239において有効とされる
画素は、被写体の比較的高輝度の部分に相当する領域内
のものであり、この領域内は照明環境の分光特性の影響
が適切に取り除かれ被写体の色が正確に再現されてい
る。一方、第2再現画像240において有効とされる画
素は、被写体の比較的低輝度の部分に相当する領域内の
ものであり、この領域内は照明環境の分光特性の影響が
適切に取り除かれ被写体の色が正確に再現されている。
したがって、生成された合成画像は、被写体の比較的高
輝度の部分を照明する照明環境、および、被写体の比較
的低輝度の部分を照明する照明環境の双方の分光特性の
影響が適切に取り除かれたものとすることができる。
This combined image is the same as the first embodiment, that is, the first reproduced image 239 and the second image 240 before combination.
In this case, the image accurately reflects the effective pixel color information. Here, the effective pixels in the first reproduction image 239 are those in a region corresponding to a relatively high-luminance portion of the subject, and the influence of the spectral characteristics of the illumination environment is appropriately removed in this region. The color of the subject is accurately reproduced. On the other hand, the effective pixels in the second reproduction image 240 are in the area corresponding to the relatively low brightness portion of the subject, and the effect of the spectral characteristics of the illumination environment is appropriately removed in this area. Is accurately reproduced.
Therefore, the generated composite image appropriately removes the influence of the spectral characteristics of both the illumination environment that illuminates the relatively high-intensity part of the subject and the illumination environment that illuminates the relatively low-intensity part of the subject. It can be

【0126】<3.第3の実施の形態>上記の第1およ
び第2実施の形態では、デジタルカメラの内部において
画像の処理を行うようになっているが、画像の処理をコ
ンピュータにて行うことももちろん可能である。図15
はこのような場合の画像データ取得システム3の構成を
示す図である。
<3. Third Embodiment> In the first and second embodiments described above, the image processing is performed inside the digital camera, but it is of course possible to perform the image processing by a computer. . Figure 15
FIG. 3 is a diagram showing a configuration of the image data acquisition system 3 in such a case.

【0127】画像データ取得システム3は、CCDにて
取得された画像をそのまま外部メモリに保存するデジタ
ルカメラ31と外部メモリに保存された画像を処理して
階調が調整された合成画像を生成するコンピュータ32
とから構成される。
The image data acquisition system 3 processes the image acquired by the CCD as it is in the external memory and the digital camera 31 and the image saved in the external memory to generate a gradation-adjusted composite image. Computer 32
Composed of and.

【0128】デジタルカメラ31としては、図1ないし
図3に示す上記実施の形態と同様の構成のものを用いる
ことができる。また、コンピュータ32は、CPU、R
OM、RAM、固定ディスク、ディスプレイ等を備えた
汎用のコンピュータで構成される。
As the digital camera 31, one having the same configuration as that of the above-described embodiment shown in FIGS. 1 to 3 can be used. Further, the computer 32 is a CPU, R
It is composed of a general-purpose computer including an OM, a RAM, a fixed disk, a display, and the like.

【0129】このような構成は上記第1および第2の実
施の形態のいずれの動作にも利用可能である。
Such a configuration can be used for any operation of the first and second embodiments.

【0130】例えば、図15に示す画像データ取得シス
テム3を第1の実施の形態の処理に利用する場合、デジ
タルカメラ31は、被写体の高輝度の部分が適正露出と
なる露出条件で得られる第1画像と、被写体の低輝度の
部分が適正露出となる露出条件で得られる第2画像と、
差分露出値とを外部メモリ123に保存し、外部メモリ
123を介してこれらのデータをコンピュータ32に転
送する。
For example, when the image data acquisition system 3 shown in FIG. 15 is used for the processing of the first embodiment, the digital camera 31 obtains the first exposure condition under which the high-intensity part of the subject is properly exposed. One image and a second image obtained under an exposure condition in which the low-luminance portion of the subject is properly exposed,
The differential exposure value is stored in the external memory 123, and these data are transferred to the computer 32 via the external memory 123.

【0131】コンピュータ32内部のCPU、ROM、
RAM等は図4に示すXYZ変換部202、輝度レベル
調整部203、画像合成部204、局所コントラスト補
正部205、RGB変換部206および重み設定部20
7として機能し、第1画像、第2画像および差分露出値
から階調が調整された合成画像を生成する。
The CPU, ROM, and the like inside the computer 32
The RAM or the like includes an XYZ conversion unit 202, a brightness level adjustment unit 203, an image composition unit 204, a local contrast correction unit 205, an RGB conversion unit 206, and a weight setting unit 20 shown in FIG.
7 and generates a composite image in which the gradation is adjusted from the first image, the second image, and the differential exposure value.

【0132】また、画像データ取得システム3を第2の
実施の形態の処理に利用する場合には、デジタルカメラ
31は、露出条件およびフラッシュのオンオフを変更し
て得られる4つの画像(第3画像、第4画像、第5画像
および第6画像)と、差分露出値と、フラッシュ分光デ
ータとを外部メモリ123に保存し、これらのデータを
コンピュータ32に転送する。
When the image data acquisition system 3 is used for the processing of the second embodiment, the digital camera 31 has four images (third image) obtained by changing the exposure condition and flash on / off. , Fourth image, fifth image, and sixth image), the differential exposure value, and the flash spectral data are stored in the external memory 123, and these data are transferred to the computer 32.

【0133】コンピュータ32内部のCPU、ROM、
RAM等は図4に示すXYZ変換部202、輝度レベル
調整部203、画像合成部204、局所コントラスト補
正部205、RGB変換部206および重み設定部20
7として機能するともに、図11に示す物体色成分デー
タ生成部208および再現画像生成部209として機能
する。そして、4つの画像(第3画像、第4画像、第5
画像および第6画像)と、差分露出値と、フラッシュ分
光データとから第1再現画像および第2再現画像を生成
し、さらに、第1再現画像、第2再現画像および差分露
出値から階調が調整された合成画像を生成する。
CPU, ROM in the computer 32,
The RAM or the like includes an XYZ conversion unit 202, a brightness level adjustment unit 203, an image composition unit 204, a local contrast correction unit 205, an RGB conversion unit 206, and a weight setting unit 20 shown in FIG.
7, and also functions as the object color component data generation unit 208 and the reproduction image generation unit 209 shown in FIG. Then, four images (third image, fourth image, fifth image
Image and sixth image), the differential exposure value, and the flash spectral data to generate a first reproduced image and a second reproduced image, and further, a gradation is obtained from the first reproduced image, the second reproduced image, and the differential exposure value. Generate an adjusted composite image.

【0134】コンピュータ32を図4に示すXYZ変換
部202、輝度レベル調整部203、画像合成部20
4、局所コントラスト補正部205、RGB変換部20
6および重み設定部207として機能させるために、あ
るいは、さらに図11に示す物体色成分データ生成部2
08および再現画像生成部209として機能させるため
に、予め磁気ディスク、光ディスク、光磁気ディスク等
の記録媒体9を介してプログラムがコンピュータ32内
にインストールされる。これにより、汎用のコンピュー
タ32が本発明に係る画像処理を行うコンピュータとし
て利用することが可能となる。
The computer 32 has an XYZ conversion section 202, a brightness level adjustment section 203, and an image composition section 20 shown in FIG.
4, local contrast correction unit 205, RGB conversion unit 20
6 and the weight setting unit 207, or further, the object color component data generation unit 2 shown in FIG.
The program is installed in the computer 32 in advance via the recording medium 9 such as a magnetic disk, an optical disk, or a magneto-optical disk in order to function as the 08 and the reproduction image generation unit 209. This allows the general-purpose computer 32 to be used as a computer that performs the image processing according to the present invention.

【0135】以上のように、第1または第2の実施の形
態に係るデジタルカメラを、デジタルカメラ31とコン
ピュータ32とからなる画像データ取得システム3とし
て構築することも可能であり、この場合、デジタルカメ
ラ31が行うべき処理量の低減を図ることができる。
As described above, the digital camera according to the first or second embodiment can be constructed as the image data acquisition system 3 including the digital camera 31 and the computer 32. In this case, the digital camera can be used. The amount of processing that the camera 31 should perform can be reduced.

【0136】<4.変形例>以上、本発明の実施の形態
について説明してきたが、この発明は上記実施の形態に
限定されるものではなく様々な変形が可能である。
<4. Modifications> Although the embodiments of the present invention have been described above, the present invention is not limited to the above embodiments, and various modifications can be made.

【0137】例えば、上記実施の形態においては、被写
体の高輝度の部分および低輝度の部分にそれぞれあわせ
た第1露出値および第2露出値に基づいて露出条件を変
更して、第1画像および第2画像を撮影するようにして
いたが、通常測光モードによって被写体全体に対する適
正露出値を算出し、予め決められた段数だけオーバー
側、あるいは、アンダー側に露出条件を設定して第1画
像および第2画像を撮影するようにしてもよい。
For example, in the above-described embodiment, the exposure condition is changed based on the first exposure value and the second exposure value that match the high-luminance portion and the low-luminance portion of the subject, respectively. Although the second image is photographed, the proper exposure value for the entire subject is calculated in the normal photometry mode, and the exposure condition is set to the over side or the under side by a predetermined number of steps to set the first image and The second image may be captured.

【0138】また、上記実施の形態においては、スポッ
ト測光モードに設定してファインダ113の画面中央部
を、測光対象となる被写体に合わせて露出値を取得する
ようにしていたが、例えば、デジタルカメラ1は固定し
た状態とし、ファインダ113の画面内の測光対象とな
る被写体を、カーソルなどで指定することができるよう
になっていてもよい。
Further, in the above-described embodiment, the spot metering mode is set and the exposure value is obtained by adjusting the central portion of the screen of the finder 113 to the subject to be metered. 1 may be fixed, and a subject to be metered in the screen of the finder 113 may be designated by a cursor or the like.

【0139】また、上記実施の形態においては、被写体
の画像を撮影後、そのまま合成画像の生成を行うものと
して説明を行ったが、合成画像の生成はユーザにより任
意のタイミングで行われるようになっていてもよい。
Further, in the above-mentioned embodiment, the description has been made assuming that the synthetic image is generated as it is after the image of the subject is photographed, but the synthetic image is generated by the user at an arbitrary timing. May be.

【0140】また、上記第3の実施の形態においては、
デジタルカメラ31は画像を取得するのみで、合成画像
の生成に係る画像処理は全てコンピュータ32において
行われるものとして説明を行ったが、コンピュータ32
が行うとした処理の一部をデジタルカメラ31で予め行
ってから、残った処理のみをコンピュータ32において
行わせるようにしてもよい。
Further, in the third embodiment,
The digital camera 31 only acquires an image, and the image processing related to generation of a composite image is described as being performed by the computer 32.
The digital camera 31 may perform a part of the processing performed by the digital camera 31, and only the remaining processing may be performed by the computer 32.

【0141】また、上記実施の形態では、第2画像の画
素値の有効度に基づいて、各画素の重み付け係数を決定
するものとしたが、第1画像の画素値の有効度に基づい
て、各画素の重み付け係数を決定するようにしてもよ
く、合成する両画像の画素値の有効度を総合的に判断し
て、各画素の重み付け係数を決定してもよい。
Further, in the above embodiment, the weighting coefficient of each pixel is determined based on the effectiveness of the pixel value of the second image. However, based on the effectiveness of the pixel value of the first image, The weighting coefficient of each pixel may be determined, or the weighting coefficient of each pixel may be determined by comprehensively determining the effectiveness of pixel values of both images to be combined.

【0142】また、上記実施の形態では、各画素値をX
YZ表色系の値に変換するものとして説明を行ったが、
例えばLab表色系など、機器非依存の表色系であれば
どのような表色系を採用してもよい。
In the above embodiment, each pixel value is set to X.
Although the description has been made assuming that the values are converted into the YZ color system values,
For example, any color system that is device-independent, such as the Lab color system, may be used.

【0143】また、階調が調整された合成画像を生成す
る際における合成手法は上記で説明したものに限定され
ず、他の手法を適用してもよい。
Further, the synthesizing method for generating the synthesized image of which the gradation is adjusted is not limited to the one described above, and another method may be applied.

【0144】また、上記実施の形態では、CPUがプロ
グラムに従って演算を行うことにより、各種機能が実現
されると説明したが、演算処理の全部または一部は専用
の電気的回路により実現されてもよい。特に、繰り返し
演算を行う箇所をロジック回路にて構築することによ
り、高速な演算が実現される。
Further, in the above-described embodiment, various functions are realized by the CPU performing calculations according to programs, but all or part of the calculation processing may be realized by a dedicated electric circuit. Good. In particular, a high-speed operation can be realized by constructing a place where a repeated operation is performed with a logic circuit.

【0145】[0145]

【発明の効果】以上、説明したように、請求項1の発明
によれば、各画素の色成分値が機器非依存の表色系にお
ける色成分値に変換されることから、各画素の色情報が
機器に依存しない正確な値として表されるため、合成前
の第1および第2画像の色情報を正確に反映した合成画
像が得られる。
As described above, according to the invention of claim 1, since the color component value of each pixel is converted into the color component value in the device-independent color system, the color of each pixel is changed. Since the information is represented as an accurate value that does not depend on the device, a combined image that accurately reflects the color information of the first and second images before combining can be obtained.

【0146】また、請求項2の発明によれば、複数の照
明光を受けた被写体の画像を、照明環境の分光特性の影
響が適切に取り除かれ、かつ、階調が適切に調整された
合成画像として取得することができる。また、各画素の
色成分値が機器非依存の表色系における色成分値に変換
されることから、各画素の色情報が機器に依存しない正
確な値として表されるため、合成前の第1および第2画
像の色情報を正確に反映した合成画像が得られる。
According to the second aspect of the present invention, an image of a subject that has received a plurality of illumination lights is combined so that the influence of the spectral characteristics of the illumination environment is appropriately removed and the gradation is appropriately adjusted. It can be acquired as an image. In addition, since the color component value of each pixel is converted to the color component value in the device-independent color system, the color information of each pixel is represented as an accurate value that does not depend on the device. A composite image that accurately reflects the color information of the first and second images can be obtained.

【0147】また、請求項3の発明によれば、各画素の
色成分値の有効度に応じた合成比率で第1画像および第
2画像を合成して合成画像を生成するため、合成前の第
1画像および第2画像において有効な色情報を合成画像
において適切に反映させることができる。
According to the third aspect of the present invention, since the first image and the second image are combined at a combination ratio according to the validity of the color component value of each pixel to generate a combined image, the pre-combination Color information effective in the first image and the second image can be appropriately reflected in the combined image.

【0148】また、請求項4の発明によれば、合成前の
画像それぞれの明るさ、および、各画素の合成比率に基
づいて、合成画像の各画素の明るさの調整を行うため、
各画素ごとに適切な明るさの調整を行うことができる。
これにより、合成画像全体として自然な明るさの画像を
取得することができる。
According to the invention of claim 4, the brightness of each pixel of the composite image is adjusted based on the brightness of each image before composition and the composition ratio of each pixel.
Appropriate brightness adjustment can be performed for each pixel.
This makes it possible to obtain an image with natural brightness as the entire composite image.

【0149】また、請求項5の発明によれば、合成画像
の各画素の明るさを調整する際の調整度合を指定するこ
とができるため、所望の明るさの合成画像を生成するこ
とができる。
According to the fifth aspect of the present invention, since the degree of adjustment when adjusting the brightness of each pixel of the composite image can be specified, a composite image having a desired brightness can be generated. .

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

【図1】第1の実施の形態に係るデジタルカメラの全体
を示す斜視図である。
FIG. 1 is a perspective view showing an entire digital camera according to a first embodiment.

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

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

【図4】デジタルカメラの階調調整モードに係る機能構
成を示すブロック図である。
FIG. 4 is a block diagram showing a functional configuration related to a gradation adjustment mode of the digital camera.

【図5】第1の実施の形態のデジタルカメラの階調調整
モードにおける動作の流れを示す図である。
FIG. 5 is a diagram showing a flow of operations in a gradation adjustment mode of the digital camera of the first embodiment.

【図6】第1の実施の形態のデジタルカメラの階調調整
モードにおける動作の流れを示す図である。
FIG. 6 is a diagram showing a flow of operations in a gradation adjustment mode of the digital camera of the first embodiment.

【図7】高輝度の部分と低輝度の部分が存在する被写体
の具体例を示す図である。
FIG. 7 is a diagram showing a specific example of a subject having a high-luminance portion and a low-luminance portion.

【図8】第1画像の例を示す図である。FIG. 8 is a diagram showing an example of a first image.

【図9】第2画像の例を示す図である。FIG. 9 is a diagram showing an example of a second image.

【図10】第2画像の画素値と重み付け係数との関係を
示す図である。
FIG. 10 is a diagram showing a relationship between a pixel value of a second image and a weighting coefficient.

【図11】第2の実施の形態のデジタルカメラの階調調
整モードに係る機能構成の一部を示すブロック図であ
る。
FIG. 11 is a block diagram showing a part of a functional configuration relating to a gradation adjustment mode of the digital camera of the second embodiment.

【図12】第2の実施の形態のデジタルカメラの階調調
整モードにおける動作の流れを示す図である。
FIG. 12 is a diagram showing an operation flow in a gradation adjustment mode of the digital camera of the second embodiment.

【図13】第2の実施の形態のデジタルカメラの階調調
整モードにおける動作の流れを示す図である。
FIG. 13 is a diagram showing a flow of operations in a gradation adjustment mode of the digital camera of the second embodiment.

【図14】物体色成分データを求める際の処理の流れを
示す図である。
FIG. 14 is a diagram showing a flow of processing when obtaining object color component data.

【図15】第3の実施の形態の画像データ取得システム
の構成を示す図である。
FIG. 15 is a diagram showing a configuration of an image data acquisition system according to a third embodiment.

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

1 デジタルカメラ 3 画像データ取得システム 9 記録媒体 201 露出制御部 202 XYZ変換部 203 輝度レベル調整部 204 画像合成部 205 局所コントラスト補正部 208 物体色成分データ生成部 221 プログラム 1 digital camera 3 Image data acquisition system 9 recording media 201 Exposure control unit 202 XYZ converter 203 Brightness level adjustment unit 204 image composition section 205 Local Contrast Correction Unit 208 Object Color Component Data Generation Unit 221 program

───────────────────────────────────────────────────── フロントページの続き (51)Int.Cl.7 識別記号 FI テーマコート゛(参考) H04N 1/60 H04N 5/235 5/232 9/04 B 5/235 101:00 9/04 1/40 D // H04N 101:00 1/46 Z (72)発明者 中内 茂樹 大阪府大阪市中央区安土町二丁目3番13号 大阪国際ビル ミノルタ株式会社内 Fターム(参考) 5B057 BA02 CA01 CA08 CA12 CA16 CB01 CB08 CB12 CB16 CC01 CE08 CE17 CH07 CH08 CH11 CH12 DB02 DB06 DB09 5C022 AA13 AB15 AB17 AB68 AC52 AC69 5C065 AA03 BB48 DD19 EE18 FF02 GG26 5C077 LL19 MM03 MM27 MP08 NN02 PP06 PP23 PP32 PP37 PQ12 PQ22 SS03 TT09 5C079 HB01 HB05 JA23 LA12 LA19 LA23 LA40 MA01 MA04 MA11 NA05 PA00 ─────────────────────────────────────────────────── ─── Continuation of front page (51) Int.Cl. 7 Identification code FI theme code (reference) H04N 1/60 H04N 5/235 5/232 9/04 B 5/235 101: 00 9/04 1/40 D // H04N 101: 00 1/46 Z (72) Inventor Shigeki Nakauchi 2-33 Azuchi-cho, Chuo-ku, Osaka-shi, Osaka Osaka International Building Minolta Co., Ltd. F-term (reference) 5B057 BA02 CA01 CA08 CA12 CA16 CB01 CB08 CB12 CB16 CC01 CE08 CE17 CH07 CH08 CH11 CH12 DB02 DB06 DB09 5C022 AA13 AB15 AB17 AB68 AC52 AC69 5C065 AA03 BB48 DD19 EE18 FF02 GG26 5C077 LL19 MM19P23B01Q22 P06 PP23 PQ PPQ PP23 PP02 PP06 PP23 PQ LA40 MA01 MA04 MA11 NA05 PA00

Claims (5)

【特許請求の範囲】[Claims] 【請求項1】 画像処理装置であって、 同一被写体に対して露出条件を変更して取得された第1
画像および第2画像それぞれの各画素の色成分値を、機
器非依存の表色系における色成分値に変換する表色系変
換手段と、 前記表色系変換手段により各画素の色成分値がそれぞれ
変換された前記第1画像および前記第2画像を合成し
て、階調が調整された合成画像を生成する画像合成手段
と、を備えることを特徴とする画像処理装置。
1. An image processing apparatus, comprising: a first object obtained by changing exposure conditions for the same subject.
A color system conversion unit that converts the color component value of each pixel of the image and the second image into a color component value in a device-independent color system, and the color component value of each pixel by the color system conversion unit. An image processing apparatus, comprising: an image synthesizing unit that synthesizes the converted first image and the second image to generate a synthesized image whose gradation is adjusted.
【請求項2】 画像処理装置であって、 被写体の比較的高輝度の部分が適正露出となる露出条件
で取得された画像群から、前記被写体への照明環境の分
光特性の影響を取り除いた画像のデータに相当する第1
物体色成分データを求める手段と、 前記被写体の比較的低輝度の部分が適正露出となる露出
条件で取得された画像群から、前記被写体への照明環境
の分光特性の影響を取り除いた画像のデータに相当する
第2物体色成分データを求める手段と、 前記第1および第2物体色成分データそれぞれと、光源
の分光特性が画像に与える影響を示す照明成分データと
を合成して、第1画像および第2画像を生成する手段
と、 前記第1画像および前記第2画像それぞれの各画素の色
成分値を、機器非依存の表色系における色成分値に変換
する表色系変換手段と、 前記表色系変換手段により各画素の色成分値がそれぞれ
変換された前記第1画像および前記第2画像を合成し
て、階調が調整された合成画像を生成する画像合成手段
と、を備えることを特徴とする画像処理装置。
2. An image processing apparatus, wherein an image obtained by removing an influence of a spectral characteristic of an illumination environment on an object from an image group acquired under an exposure condition in which a relatively high-intensity part of the object is properly exposed. Corresponding to the first data
A means for obtaining object color component data, and image data obtained by removing the influence of the spectral characteristics of the illumination environment on the subject from the image group acquired under the exposure condition in which the relatively low-brightness portion of the subject is properly exposed. Means for obtaining the second object color component data corresponding to the above, each of the first and second object color component data, and the illumination component data indicating the influence of the spectral characteristics of the light source on the image, And a unit for generating a second image, and a color system conversion unit for converting the color component value of each pixel of the first image and the second image into a color component value in a device-independent color system. An image synthesizing unit for synthesizing the first image and the second image in which the color component values of the respective pixels are converted by the color system conversion unit to generate a composite image in which gradation is adjusted. Characterized by Image processing device.
【請求項3】 請求項1または2に記載の画像処理装置
において、 前記第1画像および前記第2画像の各画素ごとに、該画
素の色成分値の有効度に応じた合成比率を設定する手
段、をさらに備え、 前記画像合成手段は、前記第1画像および前記第2画像
の各画素の表色系変換後の色成分値を前記合成比率で合
成して、前記合成画像を生成することを特徴とする画像
処理装置。
3. The image processing apparatus according to claim 1, wherein for each pixel of the first image and the second image, a combination ratio is set according to the validity of the color component value of the pixel. The image synthesizing unit synthesizes the color component values of the respective pixels of the first image and the second image after the color system conversion at the synthesizing ratio to generate the synthetic image. An image processing device characterized by:
【請求項4】 請求項1ないし3のいずれかに記載の画
像処理装置において、 前記第1画像および前記第2画像のそれぞれの明るさ
と、前記第1画像および前記第2画像の各画素の合成比
率とに基づいて、前記合成画像の各画素の明るさの調整
を行う明るさ調整手段、をさらに備えることを特徴とす
る画像処理装置。
4. The image processing apparatus according to claim 1, wherein the brightness of each of the first image and the second image and each pixel of the first image and the second image are combined. An image processing apparatus, further comprising brightness adjusting means for adjusting the brightness of each pixel of the composite image based on the ratio.
【請求項5】 請求項4に記載の画像処理装置におい
て、 前記明るさ調整手段が前記合成画像の各画素の明るさを
調整する際の調整度合の指定を受け付ける受付手段、を
さらに備えることを特徴とする画像処理装置。
5. The image processing apparatus according to claim 4, further comprising: a receiving unit that receives a designation of an adjustment degree when the brightness adjusting unit adjusts the brightness of each pixel of the composite image. A characteristic image processing device.
JP2001372922A 2001-12-06 2001-12-06 Image processing device Pending JP2003173438A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2001372922A JP2003173438A (en) 2001-12-06 2001-12-06 Image processing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2001372922A JP2003173438A (en) 2001-12-06 2001-12-06 Image processing device

Publications (1)

Publication Number Publication Date
JP2003173438A true JP2003173438A (en) 2003-06-20

Family

ID=19181726

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2001372922A Pending JP2003173438A (en) 2001-12-06 2001-12-06 Image processing device

Country Status (1)

Country Link
JP (1) JP2003173438A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005295566A (en) * 2004-04-01 2005-10-20 Microsoft Corp Luminance correction
WO2007129533A1 (en) * 2006-05-09 2007-11-15 Sharp Kabushiki Kaisha Imaging device
JP2011150733A (en) * 2004-08-04 2011-08-04 Intergraph Software Technologies Co Method for preparing composite image with nonhomogeneous resolution
JP2012054811A (en) * 2010-09-02 2012-03-15 Canon Inc Image processor, image processing method and program
JP2013009316A (en) * 2011-05-24 2013-01-10 Canon Inc Imaging apparatus performing exposure control, control method of imaging apparatus, program, and recording medium
JP2016163052A (en) * 2015-02-26 2016-09-05 オリンパス株式会社 Image processing apparatus, imaging device, image processing method, and image processing program
US10553178B2 (en) 2015-03-10 2020-02-04 Interdigital Vc Holdings, Inc. Adaptive color grade interpolation method and device

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005295566A (en) * 2004-04-01 2005-10-20 Microsoft Corp Luminance correction
JP2011150733A (en) * 2004-08-04 2011-08-04 Intergraph Software Technologies Co Method for preparing composite image with nonhomogeneous resolution
WO2007129533A1 (en) * 2006-05-09 2007-11-15 Sharp Kabushiki Kaisha Imaging device
JP2012054811A (en) * 2010-09-02 2012-03-15 Canon Inc Image processor, image processing method and program
JP2013009316A (en) * 2011-05-24 2013-01-10 Canon Inc Imaging apparatus performing exposure control, control method of imaging apparatus, program, and recording medium
JP2016163052A (en) * 2015-02-26 2016-09-05 オリンパス株式会社 Image processing apparatus, imaging device, image processing method, and image processing program
US10553178B2 (en) 2015-03-10 2020-02-04 Interdigital Vc Holdings, Inc. Adaptive color grade interpolation method and device

Similar Documents

Publication Publication Date Title
US10873704B2 (en) Illumination systems and methods for computer imagers
JP5610762B2 (en) Imaging apparatus and control method
JP3927995B2 (en) Image display control apparatus, image display control method, and imaging apparatus
EP2426928B1 (en) Image processing apparatus, image processing method and program
CN107888841A (en) Picture pick-up device and its control method
CN106358030B (en) Image processing apparatus and image processing method
JP5665436B2 (en) Image processing apparatus, image processing method, and program
JP2007067907A (en) Image pickup apparatus, image pickup method, and image pickup program; and image processor, image processing method, and image processing program
JP2012109900A (en) Photographing device, photographing method and program
US11838648B2 (en) Image processing device, imaging apparatus, image processing method, and program for determining a condition for high dynamic range processing
JP2009065269A (en) Image processor and image processing method
JP2003173438A (en) Image processing device
JP2000148978A (en) Method and device for estimating photographic light source, method and device for processing image and recording medium
KR20090111065A (en) Apparatus for image composition
JP2002369075A (en) Image pickup unit, picture processor, image pickup program and picture processing program
JPWO2016170604A1 (en) Endoscope device
JP4412109B2 (en) Electronic camera having color balance adjustment function and program
JP4043928B2 (en) Digital camera
JP2003198867A (en) Program for generating profile, and profile generation system
JP2013058869A (en) Image processor, image processing method, and program
JPH08242459A (en) Light source information collectng device and image pickup device using the same
JP2003259392A (en) White balance correction method
JP3903095B2 (en) White balance control method and digital camera
JP3903093B2 (en) White balance control method and digital camera
JP2004349930A (en) Digital camera

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20041116

A711 Notification of change in applicant

Free format text: JAPANESE INTERMEDIATE CODE: A712

Effective date: 20041116

RD03 Notification of appointment of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7423

Effective date: 20041130

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20071207

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20071218

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20080408