JP4385749B2 - Electronic camera having white balance adjustment function and program - Google Patents

Electronic camera having white balance adjustment function and program Download PDF

Info

Publication number
JP4385749B2
JP4385749B2 JP2003409055A JP2003409055A JP4385749B2 JP 4385749 B2 JP4385749 B2 JP 4385749B2 JP 2003409055 A JP2003409055 A JP 2003409055A JP 2003409055 A JP2003409055 A JP 2003409055A JP 4385749 B2 JP4385749 B2 JP 4385749B2
Authority
JP
Japan
Prior art keywords
white balance
image
balance adjustment
histogram
flash
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.)
Expired - Fee Related
Application number
JP2003409055A
Other languages
Japanese (ja)
Other versions
JP2005175598A (en
Inventor
哲也 武下
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.)
Nikon Corp
Original Assignee
Nikon Corp
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 Nikon Corp filed Critical Nikon Corp
Priority to JP2003409055A priority Critical patent/JP4385749B2/en
Priority to US10/994,404 priority patent/US20050122409A1/en
Priority to US11/118,382 priority patent/US7423674B2/en
Publication of JP2005175598A publication Critical patent/JP2005175598A/en
Application granted granted Critical
Publication of JP4385749B2 publication Critical patent/JP4385749B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Description

本発明は、ホワイトバランスの調整機能を有する電子カメラに関する。
また、本発明は、コンピュータにホワイトバランス調整を実施させるためのプログラムに関する。
The present invention relates to an electronic camera having a white balance adjustment function.
The present invention also relates to a program for causing a computer to perform white balance adjustment.

一般的な閃光撮影では、電子閃光装置の照射する閃光と、太陽光や街灯などの外光とをミックスした状態の光によって、被写体が照明される。この閃光と外光の照射割合は、被写体までの距離や、被写体の角度などによって微妙に変化する。そのため、ミックス光の色温度は、画面内の位置によって大幅に変化する。   In general flash photography, a subject is illuminated with light in a state in which flash light emitted from an electronic flash device is mixed with external light such as sunlight or streetlight. The irradiation ratio of the flash light and the external light slightly changes depending on the distance to the subject and the angle of the subject. Therefore, the color temperature of the mixed light varies greatly depending on the position in the screen.

例えば、夕方の太陽光で逆光状態となった人物被写体に対して閃光撮影を行うと、人物被写体は主として閃光によって照明される。その結果、人物被写体の色温度は、閃光の高い色温度(5000Kなど)を示す。一方、周囲の背景部分は、夕方の太陽光によって照明される。そのため、この背景部分の色温度は、夕方の低い色温度(3000Kなど)となる。
このように同一画面内において色温度にムラが生じると、適正なホワイトバランス調整を実施することが非常に難しくなる。
For example, when flash photography is performed on a human subject that is backlit by sunlight in the evening, the human subject is mainly illuminated by flashlight. As a result, the color temperature of the human subject shows a high color temperature of flash (such as 5000K). On the other hand, the surrounding background portion is illuminated by evening sunlight. Therefore, the color temperature of the background portion is a low color temperature in the evening (eg, 3000K).
If the color temperature is uneven in the same screen as described above, it is very difficult to perform an appropriate white balance adjustment.

下記の特許文献1には、このような問題に対処して、閃光撮影時のホワイトバランス調整を実施する従来装置が開示されている。
この従来装置では、閃光無しの予備撮影と、閃光有りの本撮影とを実施する。次に、従来装置は、この2枚の撮像画像の間で、画素単位に輝度差を求める。この輝度差が大きい領域ほど、閃光に明るく照らされた領域であり、閃光の色温度の染まった領域である。一方、輝度差が小さい領域ほど、閃光の影響は小さく、外光の色温度に染まった領域である。
そこで、この従来装置は、輝度差が大きい領域について、閃光に基づくホワイトバランス調整を実施する。逆に、輝度差が小さい領域については、外光に基づくホワイトバランス調整を実施する。また、輝度差が中間の領域については、閃光と外光の中間光に基づくホワイトバランス調整を実施する。
特開平8−051632号公報(請求項3)
Japanese Patent Application Laid-Open Publication No. 2005-228561 discloses a conventional apparatus that performs such white balance adjustment during flash photography in response to such a problem.
In this conventional apparatus, preliminary shooting without flash and main shooting with flash are performed. Next, the conventional apparatus obtains a luminance difference in pixel units between the two captured images. The region where the luminance difference is larger is the region that is brightly illuminated by the flash, and the region where the color temperature of the flash is stained. On the other hand, the smaller the luminance difference, the smaller the influence of the flash light, and the region dyed by the color temperature of external light.
In view of this, this conventional apparatus performs white balance adjustment based on the flash for an area having a large luminance difference. On the other hand, white balance adjustment based on outside light is performed for an area where the luminance difference is small. Further, for an area with an intermediate luminance difference, white balance adjustment is performed based on the intermediate light between the flashlight and the outside light.
JP-A-8-051632 (Claim 3)

上述したように、従来装置は、閃光の有無によって生じる画素単位の輝度変化を求め、この輝度変化の大きさから閃光の当たり具合を判定して光源色温度を推定している。   As described above, the conventional apparatus obtains the luminance change in pixel units caused by the presence or absence of flash, and estimates the light source color temperature by determining the degree of flash hit from the magnitude of the luminance change.

しかしながら、この従来装置において、閃光有り無しの撮像画像を、同一時刻に撮影することは不可能である。そのため、これら2枚の撮像画像の間には時間差が必ず生じる。この時間差の間に、被写体移動やカメラブレや手ブレが生じると、2枚の撮像画像の絵柄は厳密に一致しなくなる。このような絵柄のずれによっても輝度差が生じるため、閃光発光に起因する輝度変化のみを正確に検出することができない。そのため、従来装置では、動体被写体などにおいて、適正なホワイトバランス調整を行うことが不可能であった。   However, in this conventional apparatus, it is impossible to capture a captured image without flashing at the same time. Therefore, a time difference always occurs between these two captured images. If subject movement, camera shake, or camera shake occurs during this time difference, the images of the two captured images do not exactly match. Since a luminance difference also occurs due to such a picture shift, it is impossible to accurately detect only a luminance change caused by flash emission. Therefore, it has been impossible for the conventional apparatus to perform appropriate white balance adjustment on a moving subject or the like.

従来装置のこのような問題を回避するためには、被写体を静止物に限定し、さらに電子カメラを三脚に固定するなどしなければならず、撮影対象や撮影方法が狭く限られてしまうという問題点があった。   In order to avoid such a problem of the conventional apparatus, the subject must be limited to a stationary object, and the electronic camera must be fixed to a tripod. There was a point.

本発明の目的は、このような問題点に鑑みて、動体被写体などの厳しい条件下においても、閃光発光の影響をより確実に判定し、閃光撮影時のホワイトバランス調整を適切に実施する技術を提供することである。   In view of such problems, an object of the present invention is to provide a technique for more reliably determining the effect of flash emission even under severe conditions such as a moving subject and appropriately performing white balance adjustment during flash photography. Is to provide.

《請求項1》
請求項1の電子カメラは、下記のような撮像部、撮像制御部、ヒストグラム算出部、ヒストグラム相関検出部、ホワイトバランス算出部、およびホワイトバランス調整部を備える。
撮像部は、被写体像を撮像する。
撮像制御部は、この撮像部を制御して、閃光無しの状態で撮像するテスト画像と、閃光発光を実施した状態で撮像する本画像とを生成する。
ヒストグラム算出部は、これらテスト画像および本画像について、それぞれヒストグラム分布を求める。
ヒストグラム相関検出部は、これら2つのヒストグラム分布について相関を検出する。
ホワイトバランス算出部は、この相関の度合いが低い場合には閃光照明が不均一であると判定し、閃光の色温度を重視したホワイトバランス調整値に変更する。逆に、相関の度合いが高い場合には、閃光照明が均一(均一に照明未到達の場合も含む)であると判定し、本画像の色温度を重視したホワイトバランス調整値に変更する。
ホワイトバランス調整部は、ホワイトバランス算出部で求めたホワイトバランス調整値に従って、本画像にホワイトバランス調整を施す。
<Claim 1>
An electronic camera according to a first aspect includes an imaging unit, an imaging control unit, a histogram calculation unit, a histogram correlation detection unit, a white balance calculation unit, and a white balance adjustment unit as described below.
The imaging unit captures a subject image.
The imaging control unit controls the imaging unit to generate a test image that is imaged without flashing and a main image that is captured with flashing light emitted.
The histogram calculation unit obtains a histogram distribution for each of the test image and the main image.
The histogram correlation detection unit detects a correlation for these two histogram distributions.
When the degree of this correlation is low, the white balance calculation unit determines that the flash illumination is not uniform, and changes the white balance adjustment value to emphasize the color temperature of the flash. On the other hand, when the degree of correlation is high, it is determined that the flash illumination is uniform (including the case where the illumination is not uniformly reached), and is changed to a white balance adjustment value that emphasizes the color temperature of the main image.
The white balance adjustment unit performs white balance adjustment on the main image according to the white balance adjustment value obtained by the white balance calculation unit.

《請求項2》
請求項2の電子カメラは、請求項1の電子カメラにおいて、ホワイトバランス算出部が、閃光の色温度を基準に決定される第1ホワイトバランス調整値と、本画像の色温度を基準に求めた第2ホワイトバランス調整値との加重合成値を求めて、ホワイトバランス調整値とする手段である。この場合において、ホワイトバランス算出部は、相関の度合いが低い場合、第1ホワイトバランス調整値の加重配分を増加させる。逆に、相関の度合いが高い場合、第2ホワイトバランス調整値の加重配分を増加させる。
<Claim 2>
According to a second aspect of the present invention, in the electronic camera of the first aspect, the white balance calculation unit obtains the first white balance adjustment value determined based on the color temperature of the flash and the color temperature of the main image. This is a means for obtaining a weighted composite value with the second white balance adjustment value to obtain a white balance adjustment value. In this case, the white balance calculation unit increases the weighted distribution of the first white balance adjustment value when the degree of correlation is low. Conversely, when the degree of correlation is high, the weighted distribution of the second white balance adjustment value is increased.

《請求項3》
請求項3の電子カメラは、請求項1または請求項2の電子カメラにおいて、ホワイトバランス算出部は、本画像について白飛びおよび/または黒潰れの度数を求める。ホワイトバランス算出部は、この度数が予め定められた閾値を上回ると、閃光照明の均一さの判断を停止する。
<Claim 3>
According to a third aspect of the present invention, in the electronic camera according to the first or second aspect, the white balance calculating unit obtains the frequency of overexposure and / or blackout for the main image. When this frequency exceeds a predetermined threshold value, the white balance calculation unit stops the determination of the uniformity of the flash illumination.

《請求項4》
請求項4の電子カメラは、請求項1ないし請求項3のいずれか1項の電子カメラにおいて、撮像部は、分割測光用途の撮像動作を行う測光用撮像素子と、記録保存用途の撮像動作を行う記録用撮像素子とを備える。一方、撮像制御部は、閃光無しの状態において測光用撮像素子を制御して、テスト画像を撮像する。また、撮像制御部は、閃光有りの状態において記録用撮像素子を制御して、本画像を撮像する。
<Claim 4>
According to a fourth aspect of the present invention, in the electronic camera according to any one of the first to third aspects, the imaging unit performs a photometric image sensor for performing an image-capturing operation for split photometry and an image-capturing operation for recording and storage. And an image sensor for recording to be performed. On the other hand, the imaging control unit controls the photometric imaging element in the absence of flash to capture a test image. In addition, the imaging control unit controls the recording imaging element in the presence of the flash to capture the main image.

《請求項5》
請求項5の電子カメラは、請求項4の電子カメラにおいて、ヒストグラム算出部は、測光用撮像素子と記録用撮像素子との素子差に起因する2つのヒストグラム分布の差を抑制する。
<Claim 5>
According to a fifth aspect of the present invention, in the electronic camera according to the fourth aspect, the histogram calculation unit suppresses a difference between two histogram distributions caused by an element difference between the photometric image sensor and the recording image sensor.

《請求項6》
請求項6の電子カメラは、請求項1ないし請求項5のいずれか1項の電子カメラにおいて、ヒストグラム相関検出部は、ヒストグラム算出部により算出される2つのヒストグラム分布から、予め定められた度数値以下を取り除いた上で、2つのヒストグラム分布の相関を検出することを特徴とする。
<Claim 6>
An electronic camera according to a sixth aspect is the electronic camera according to any one of the first to fifth aspects, wherein the histogram correlation detecting unit determines a predetermined frequency value from two histogram distributions calculated by the histogram calculating unit. After removing the following, the correlation between two histogram distributions is detected.

《請求項7》
請求項7のプログラムは、閃光無しの状態で撮像されたテスト画像と、閃光発光を実施した状態で撮像された本画像とを用いる。このプログラムは、以下の各処理をコンピュータに実行させる。ヒストグラム算出処理では、テスト画像および本画像についてそれぞれヒストグラム分布を求める。ヒストグラム相関検出処理では、ヒストグラム算出処理により算出される2つのヒストグラム分布の相関を検出する。ホワイトバランス算出処理では、相関の度合いが低い場合には閃光照明が不均一であると判定し、閃光の色温度を重視したホワイトバランス調整値に変更する。また、ホワイトバランス算出処理では、相関の度合いが高い場合には、閃光照明が均一(均一に照明未到達の場合も含む)であると判定し、本画像の色温度を重視したホワイトバランス調整値に変更する。ホワイトバランス調整処理では、ホワイトバランス算出処理で求めたホワイトバランス調整値に従って、本画像にホワイトバランス調整を施す。
<Claim 7>
The program according to claim 7 uses a test image captured without flashing and a main image captured with flashing. This program causes a computer to execute the following processes. In the histogram calculation process, a histogram distribution is obtained for each of the test image and the main image. In the histogram correlation detection process, the correlation between the two histogram distributions calculated by the histogram calculation process is detected. In the white balance calculation process, when the degree of correlation is low, it is determined that the flash illumination is non-uniform, and the white balance adjustment value is changed with emphasis on the color temperature of the flash. Also, in the white balance calculation process, when the degree of correlation is high, it is determined that the flash illumination is uniform (including the case where the illumination has not been uniformly reached), and the white balance adjustment value that emphasizes the color temperature of the main image Change to In the white balance adjustment processing, white balance adjustment is performed on the main image according to the white balance adjustment value obtained in the white balance calculation processing.

《請求項1》
請求項1の電子カメラは、閃光無しのテスト画像と、閃光有りの本画像とを生成する。次に、電子カメラは、これら両画像のヒストグラム分布を求め、両画像のヒストグラム分布がどの程度似ているか否かを判定する。
<Claim 1>
The electronic camera according to claim 1 generates a test image without flash and a main image with flash. Next, the electronic camera obtains histogram distributions of these two images and determines how similar the histogram distributions of both images are.

このとき、両画像のヒストグラム分布が異なるほど、テスト画像から本画像への輝度分布の変化にムラがあり、閃光照明が不均一であったと判断できる。この場合、本画像の画面内に、閃光照明がよく当たった画像領域と、閃光照明が届いていない画像領域とが混在している。   At this time, it can be determined that as the histogram distributions of the two images are different, the change in the luminance distribution from the test image to the main image is uneven, and the flash illumination is uneven. In this case, in the screen of the main image, there are a mixture of an image area where the flash illumination is well applied and an image area where the flash illumination does not reach.

仮に、この状態の本画像から光源色温度を推定すると、画面内の不均一な光源色温度を無理に平均化するなどして、画面内に存在しない光源色温度が誤って出力してしまう。この誤った光源色温度を基準にすると、閃光照明のよく当たった領域、良く当たらなかった領域のいずれにも不適切なホワイトバランス調整が実施されてしまう。   If the light source color temperature is estimated from the main image in this state, the light source color temperature that does not exist in the screen is erroneously output by, for example, forcibly averaging the uneven light source color temperature in the screen. If this incorrect light source color temperature is used as a reference, improper white balance adjustment will be performed in both areas where the flash illumination is well applied and areas where the flash illumination is not applied well.

そこで、本発明は、この閃光照明の不均一な状況を検出すると、閃光の色温度を重視したホワイトバランス調整に切り換える。この場合、閃光がよく当たっている画像領域について、良好なホワイトバランス調整が実施される。   Therefore, the present invention switches to white balance adjustment with an emphasis on the color temperature of the flash when it detects the non-uniform state of the flash illumination. In this case, a good white balance adjustment is performed for an image area that is well lit.

通常、電子カメラのユーザーは、主要な被写体に対して閃光を十分に当てるように配慮する。したがって、上記のような『閃光がよく当たっている画像領域』は、画面内の主要被写体である可能性が当然に高くなる。したがって、閃光の色温度を重視することにより、主要被写体に対してホワイトバランス調整を適切に実施できる確率が高くなり、主要被写体の色再現性を高い確率で高めることができる。   Usually, the user of an electronic camera takes care to sufficiently flash the main subject. Therefore, the above-mentioned “image area that is well lit” is naturally more likely to be the main subject in the screen. Therefore, by placing importance on the color temperature of the flash, the probability that white balance adjustment can be appropriately performed on the main subject increases, and the color reproducibility of the main subject can be increased with a high probability.

一方、上記とは逆に、両画像のヒストグラム分布が似ているほど、テスト画像から本画像への輝度分布の変化は画面全体で一様であり、閃光照明の当たり具合が画面内で均一に近いと判断できる。
このような状況では、本発明は、本画像の色温度を重視したホワイトバランス調整に切り換える。この場合、閃光の当たり具合が画面内で均一であるから、本画像から推定される光源色温度は、現実の光源色温度をよく反映している。したがって、この本画像の色温度を重視したホワイトバランス調整によって、画面全体に適切なホワイトバランス調整を施すことが可能になる。
On the other hand, as the histogram distributions of both images are similar, the change in the luminance distribution from the test image to the main image is more uniform across the screen, and the degree of flash illumination is more uniform throughout the screen. Can be judged close.
In such a situation, the present invention switches to white balance adjustment that emphasizes the color temperature of the main image. In this case, since the degree of flash hit is uniform within the screen, the light source color temperature estimated from the main image well reflects the actual light source color temperature. Accordingly, it is possible to perform an appropriate white balance adjustment on the entire screen by the white balance adjustment that emphasizes the color temperature of the main image.

このように、本発明ではテスト画像と本画像のヒストグラム比較によって、閃光照明が画面内でどの程度均一であったかを的確に推定し、その推定に沿って適切なホワイトバランス調整を実施することが可能になる。   In this way, in the present invention, it is possible to accurately estimate how uniform the flash illumination is in the screen by comparing the histogram of the test image and the main image, and perform appropriate white balance adjustment according to the estimation. become.

さらに、本発明は、特許文献1の従来技術と比較して、次のような優れた長所も有する。すなわち、本発明では、テスト画像と本画像とについて、ヒストグラム分布を比較する。通常、画面内で主要被写体が移動したり、カメラブレや手ブレが生じると、テスト画像と本画像とは絵柄の位置が微妙に変化する。しかしながら、このように絵柄が微妙に移動した程度では、ヒストグラム分布は殆ど変化しない。
そのため、ヒストグラム比較では、上述した従来装置とは異なり、テスト画像と本画像との間に生じる絵柄変化を巧妙に無視することができる。
したがって、本発明は、被写体移動やカメラブレや手ブレが少しぐらい生じても、閃光照明の均一さを正確に判定し、その判定結果から適切なホワイトバランス調整を実行することが可能になる。
Furthermore, the present invention has the following excellent advantages as compared with the prior art of Patent Document 1. That is, in the present invention, the histogram distribution is compared between the test image and the main image. Normally, when the main subject moves on the screen or camera shake or camera shake occurs, the positions of the patterns of the test image and the main image slightly change. However, the histogram distribution hardly changes to such an extent that the pattern is slightly moved.
Therefore, in the histogram comparison, unlike the above-described conventional apparatus, the pattern change that occurs between the test image and the main image can be skillfully ignored.
Therefore, according to the present invention, even if subject movement, camera shake, or camera shake occurs to some extent, it is possible to accurately determine the uniformity of flash illumination and perform appropriate white balance adjustment from the determination result.

《請求項2》
請求項2の電子カメラは、閃光の色温度を基準にする第1ホワイトバランス調整値と、本画像の色温度を基準にする第2ホワイトバランス調整値との加重合成値を求める。この加重合成に際して、相関の度合いが低いほど、第1ホワイトバランス調整値の加重配分を増加させる。逆に、相関の度合いが高いほど、第2ホワイトバランス調整値の加重配分を増加させる。
このような動作により、閃光の照明分布が画面内で均一/不均一の中間程度であっても、その均一/不均一の中間程度を考慮した、適切なホワイトバランス調整値を求めることが可能になる。
<Claim 2>
The electronic camera according to claim 2 obtains a weighted composite value of the first white balance adjustment value based on the color temperature of the flash and the second white balance adjustment value based on the color temperature of the main image. In this weighted composition, the weighted distribution of the first white balance adjustment value is increased as the degree of correlation is lower. Conversely, as the degree of correlation is higher, the weighted distribution of the second white balance adjustment value is increased.
Such an operation makes it possible to obtain an appropriate white balance adjustment value in consideration of the intermediate degree of uniformity / non-uniformity even if the illumination distribution of the flash is intermediate / uniform in the screen. Become.

《請求項3》
請求項3の電子カメラは、本画像の白飛びおよび/または黒潰れの度数がある程度多くなると、閃光照明の均一さの判断を停止する。
この白飛びや黒潰れは、閃光照明が極端に強く当たるなどして、本画像の信号レベルが非線形に変化して生じる。このような本画像をテスト画像と比較しても、閃光照明の均一性を判断することは難しい。
そこで、請求項3の発明は、本画像の白飛びおよび/または黒潰れの度数がある程度多くなると、閃光照明の均一さの判断を停止する。したがって、閃光照明の均一性を誤判断する確率を大幅に低減できる。
<Claim 3>
The electronic camera according to claim 3 stops the determination of the uniformity of the flash illumination when the frequency of whiteout and / or blackout of the main image increases to some extent.
This overexposure or blackout occurs due to a non-linear change in the signal level of the main image, for example, when the flash illumination strikes extremely strongly. Even if such a main image is compared with a test image, it is difficult to determine the uniformity of flash illumination.
Therefore, the invention of claim 3 stops the determination of the uniformity of the flash illumination when the frequency of whiteout and / or blackout of the main image increases to some extent. Therefore, the probability of misjudging the uniformity of flash illumination can be greatly reduced.

《請求項4》
請求項4の電子カメラは、一眼式の電子カメラに特に好適な構成である。すなわち、一眼式の電子カメラでは、分割測光用途の測光用撮像素子と、記録保存用途の本画像を生成する記録用撮像素子とを備える。
この内、測光用撮像素子でテスト画像を撮像する。一般的に、この測光用撮像素子は、記録用撮像素子よりも画素数が少なく、撮像画像の転送読み出しや処理にかかる時間が短い。
したがって、この測光用撮像素子でテスト画像を撮像することにより、記録用撮像素子でテスト画像を別途撮影するよりも、閃光撮影の動作シーケンスを単純化かつ高速化することが可能になる。
<Claim 4>
The electronic camera according to the fourth aspect is particularly suitable for a single-lens electronic camera. That is, the single-lens electronic camera includes a photometric image sensor for division photometry and a recording image sensor for generating a main image for recording and storage.
Among these, a test image is taken with a photometric image sensor. In general, this photometric image sensor has a smaller number of pixels than the recording image sensor, and takes less time to transfer and read a captured image and to process it.
Therefore, by capturing a test image with this photometric image sensor, it is possible to simplify and speed up the flash photographing operation sequence, rather than separately capturing a test image with a recording image sensor.

《請求項5》
請求項5の電子カメラは、上述した測光用撮像素子と記録用撮像素子との素子差に起因する2つのヒストグラム分布の差を抑制する。
例えば、測光用撮像素子と記録用撮像素子とには、出力画像の画素数差、階調差、量子化ビット数などの素子差が存在する。このような素子差を予め抑制することにより、2つのヒストグラム分布の相関検出に素子差が現れなくなり、閃光照明の均一性判断が一段と正確になる。
<Claim 5>
The electronic camera according to claim 5 suppresses a difference between two histogram distributions caused by the element difference between the above-described photometric image sensor and recording image sensor.
For example, there are element differences such as a difference in the number of pixels in the output image, a gradation difference, and a quantization bit number between the photometric image sensor and the recording image sensor. By suppressing such an element difference in advance, the element difference does not appear in the correlation detection between the two histogram distributions, and the uniformity determination of the flash illumination becomes more accurate.

《請求項6》
請求項6の電子カメラは、2つのヒストグラム分布から、予め定められた度数値以下を切り捨てた上で、2つのヒストグラム分布の相関を検出する。
例えば、このような切り捨て動作により、ノイズに該当する低頻度の度数値をヒストグラム分布から除去することができる。この場合、ヒストグラム分布の相関検出時にノイズによる誤判定を避けることが可能になり、一段と正確に閃光照明の均一さを判定できる。
<Claim 6>
The electronic camera according to claim 6 detects the correlation between the two histogram distributions after rounding off the predetermined frequency value or less from the two histogram distributions.
For example, such a truncation operation can remove infrequent frequency values corresponding to noise from the histogram distribution. In this case, it is possible to avoid erroneous determination due to noise at the time of detecting correlation of the histogram distribution, and the uniformity of flash illumination can be determined more accurately.

また例えば、画面内の高頻度な度数値のみを残すように、小程度の度数値以下をヒストグラム分布から切り捨てることもできる。この場合、高頻度の領域、すなわち同一階調域の大面積領域のみを抽出して、ヒストグラム分布を比較することとなる。このように抽出された画像領域は、画面内でも目立つ領域である可能性が高く、この部分について閃光照明の均一性を判定することにより、目立つ領域を重視した閃光照明の均一性判断が可能になる。その結果、人間の視覚に合わせたホワイトバランス調整が実現する。   Further, for example, a small degree value or less can be cut off from the histogram distribution so as to leave only a high frequency value in the screen. In this case, only high-frequency regions, that is, large-area regions in the same gradation region are extracted and the histogram distributions are compared. The image area extracted in this way is likely to be a conspicuous area even on the screen, and by determining the uniformity of the flash illumination for this part, it is possible to determine the uniformity of the flash illumination with an emphasis on the conspicuous area. Become. As a result, white balance adjustment that matches human vision is realized.

《請求項7》
請求項7のプログラムをコンピュータで実行することにより、コンピュータはホワイトバランス調整装置として機能する。
この場合、電子カメラ等で撮像されたテスト画像および本画像をコンピュータに入力して、請求項1ないし請求項6のいずれか1項に記載のホワイトバランス調整を実施することが可能になる。
<Claim 7>
By executing the program of claim 7 on a computer, the computer functions as a white balance adjusting device.
In this case, it is possible to perform the white balance adjustment according to any one of claims 1 to 6 by inputting a test image and a main image captured by an electronic camera or the like to a computer.

《本実施形態の構成説明》
図1は、本実施形態における電子カメラ11の部品配置を説明する図である。
図1において、電子カメラ11には、電子閃光装置12および撮影レンズ13が設けられる。この撮影レンズ13の像空間側には、クイックリターン式のミラー15が設けられる。このミラー15に反射された被写体光束の結像位置には、拡散板16が配置される。ユーザーは、この拡散板16に形成される被写体像を、ファインダー光学系17を介して観察する。なお、この拡散板16からの光束は、ファインダー光学系17の隅に設けられた測光用撮像素子18の撮像面に導かれ、この撮像面に被写体像を再結像する。さらに、ミラー15の後方には、シャッタ19aおよび記録用撮像素子19などが配置される。
<< Description of Configuration of this Embodiment >>
FIG. 1 is a diagram for explaining a component arrangement of the electronic camera 11 in the present embodiment.
In FIG. 1, the electronic camera 11 is provided with an electronic flash device 12 and a photographing lens 13. A quick return type mirror 15 is provided on the image space side of the photographic lens 13. A diffusion plate 16 is disposed at the imaging position of the subject light beam reflected by the mirror 15. The user observes the subject image formed on the diffusion plate 16 via the finder optical system 17. The light beam from the diffusion plate 16 is guided to the imaging surface of the photometric image sensor 18 provided at the corner of the finder optical system 17 and re-images the subject image on the imaging surface. Further, behind the mirror 15, a shutter 19a, a recording image sensor 19 and the like are arranged.

図2は、この電子カメラ11の画像処理に関するブロック図である。
図2において、測光用撮像素子18の出力は、A/D変換部20を介して、画像メモリ22に入力される。また、記録用撮像素子19の出力は、A/D変換部21を介して、画像メモリ22に入力される。この画像メモリ22は、バス23に接続される。このバス23には、画像処理部24、圧縮記録部25、撮像制御部27、閃光発光制御部28、およびマイクロプロセッサ29などが接続される。
この内、圧縮記録部25は、着脱自在なメモリカード26に対して画像データを圧縮記録する。また、マイクロプロセッサ29には、レリーズ釦29aなどから操作入力が与えられる。
FIG. 2 is a block diagram relating to image processing of the electronic camera 11.
In FIG. 2, the output of the photometric image sensor 18 is input to the image memory 22 via the A / D converter 20. The output of the recording image sensor 19 is input to the image memory 22 via the A / D converter 21. The image memory 22 is connected to the bus 23. Connected to the bus 23 are an image processing unit 24, a compression recording unit 25, an imaging control unit 27, a flash emission control unit 28, a microprocessor 29, and the like.
Among these, the compression recording unit 25 compresses and records image data on a removable memory card 26. The microprocessor 29 is given an operation input from a release button 29a or the like.

《発明との対応関係》
以下、請求項の記載事項と本実施形態との対応関係について説明する。なお、ここでの対応関係は、参考のために一解釈を例示するものであり、本発明を徒らに限定するものではない。
請求項記載の撮像部は、測光用撮像素子18および記録用撮像素子19に対応する。
請求項記載の撮像制御部は、撮像制御部27に対応する。
請求項記載のヒストグラム算出部は、マイクロプロセッサ29による『画像データをヒストグラム解析してヒストグラム分布を求める機能』に対応する。
請求項記載のヒストグラム相関算出部は、マイクロプロセッサ29による『2つのヒストグラム分布を比較して、相関を検出する機能』に対応する。
請求項記載のホワイトバランス算出部は、マイクロプロセッサ29による『ヒストグラム分布の相関に応じて、ホワイトバランス調整値を決定する機能』に対応する。
請求項記載のホワイトバランス調整部は、画像処理部24による『本画像をホワイトバランス調整する機能』に対応する。
<< Correspondence with Invention >>
Hereinafter, the correspondence between the description items of the claims and the present embodiment will be described. Note that the correspondence relationship here illustrates one interpretation for reference, and does not limit the present invention.
The imaging unit described in claims corresponds to the photometric imaging element 18 and the recording imaging element 19.
The imaging control unit described in the claims corresponds to the imaging control unit 27.
The histogram calculation unit described in the claims corresponds to “a function for obtaining histogram distribution by analyzing histogram of image data” by the microprocessor 29.
The histogram correlation calculation unit described in the claims corresponds to “a function of comparing two histogram distributions and detecting a correlation” by the microprocessor 29.
The white balance calculation unit described in the claims corresponds to “a function for determining a white balance adjustment value according to the correlation of the histogram distribution” by the microprocessor 29.
The white balance adjustment unit described in the claims corresponds to the “function for white balance adjustment of the main image” by the image processing unit 24.

《本実施形態の動作説明》
図3は、電子カメラ11の動作を説明する流れ図である。
以下、図3に示すステップ番号に沿って、電子カメラ11の動作を説明する。
<< Explanation of operation of this embodiment >>
FIG. 3 is a flowchart for explaining the operation of the electronic camera 11.
Hereinafter, the operation of the electronic camera 11 will be described along the step numbers shown in FIG.

[ステップS1] 電子カメラ11のメイン電源が投入されると、マイクロプロセッサ29は、電源投入時の初期化処理を開始する。この初期化処理において、マイクロプロセッサ29は、電子閃光装置12側から閃光の色温度に関する情報を取得し、その色温度に適合した第1ホワイトバランス調整値を求める。 [Step S1] When the main power supply of the electronic camera 11 is turned on, the microprocessor 29 starts an initialization process when the power is turned on. In this initialization process, the microprocessor 29 acquires information on the color temperature of the flash from the electronic flash device 12 side, and obtains a first white balance adjustment value that matches the color temperature.

[ステップS2] マイクロプロセッサ29は、電子カメラ11が閃光撮影モードに設定されているか否かを判定する。
閃光撮影モードではない場合、マイクロプロセッサ29は、公知の通常撮影を実施するため、通常撮影ルーチン(不図示)に動作を移行する。なお、この通常撮影ルーチンにおいて、測光用撮像素子18の撮像画像は、分割測光用途などに使用される。
一方、閃光撮影モードの場合、マイクロプロセッサ29は、ステップS3に動作を移行する。
[Step S2] The microprocessor 29 determines whether or not the electronic camera 11 is set to the flash photography mode.
When the flash photographing mode is not set, the microprocessor 29 shifts the operation to a normal photographing routine (not shown) in order to carry out known normal photographing. In this normal photographing routine, the image captured by the photometry image sensor 18 is used for divided photometry applications and the like.
On the other hand, in the flash photography mode, the microprocessor 29 shifts the operation to step S3.

[ステップS3] この時点でミラー15は下に降りているため、撮影レンズ13を通過した被写体光束は、拡散板16、ファインダー光学系17を介して、測光用撮像素子18の撮像面に被写体像を形成する。
この状態で、マイクロプロセッサ29は、撮像制御部27を用いて測光用撮像素子18に駆動信号を与える。測光用撮像素子18からは、閃光無しで撮像されたテスト画像が出力される。このテスト画像は、A/D変換部20を介して画素単位にデジタル化された後、画像メモリ22に一時蓄積される。
[Step S3] Since the mirror 15 is down at this point, the subject luminous flux that has passed through the photographing lens 13 passes through the diffusing plate 16 and the finder optical system 17 to the subject image on the imaging surface of the photometric image sensor 18. Form.
In this state, the microprocessor 29 uses the imaging control unit 27 to give a drive signal to the photometric image sensor 18. A test image captured without flashing is output from the photometric image sensor 18. The test image is digitized in units of pixels via the A / D converter 20 and then temporarily stored in the image memory 22.

[ステップS4] マイクロプロセッサ29は、画像メモリ22内にアクセスして、テスト画像の小領域(例えば画素毎)に輝度成分を求める。
なお、このテスト画像を構成する各色成分を、輝度成分の構成比率(例えばR:G:B=0.29:0.587:0.114等)に従って加重加算して、輝度成分を生成することが好ましい。また、テスト画像中の輝度成分を多く含む色成分(G色成分など)を、そのまま輝度成分とみなしてもよい。
マイクロプロセッサ29は、このように求めたテスト画像の輝度成分を、大まかな輝度範囲に分類して、これら輝度範囲ごとの度数を求める。このようにして、図4に例示するテスト画像のヒストグラム分布Aが得られる。
なお、ヒストグラム分布Aから、予め定められた度数値以下を取り除くことで、ノイズ除去や大面積部分抽出などのデータ加工を行ってもよい。
[Step S4] The microprocessor 29 accesses the image memory 22 to obtain a luminance component in a small area (for example, each pixel) of the test image.
It should be noted that the luminance components are generated by weighted addition of each color component constituting the test image according to the component ratio of the luminance component (for example, R: G: B = 0.29: 0.587: 0.114). Is preferred. Further, a color component (G color component or the like) containing a large amount of luminance component in the test image may be regarded as a luminance component as it is.
The microprocessor 29 classifies the luminance component of the test image obtained in this way into a rough luminance range, and obtains the frequency for each luminance range. In this way, the histogram distribution A of the test image illustrated in FIG. 4 is obtained.
It should be noted that data processing such as noise removal and large area extraction may be performed by removing a predetermined frequency value or less from the histogram distribution A.

[ステップS5] マイクロプロセッサ29は、レリーズ釦29aが全押しされたか否かを判断する。
もしも、レリーズ釦29aが全押しされた場合、マイクロプロセッサ29はステップS6に動作を移行する。
一方、レリーズ釦29aが全押し以外(半押しまたは押されていない)の場合、マイクロプロセッサ29は、ステップS3に動作を戻す。
[Step S5] The microprocessor 29 determines whether or not the release button 29a is fully pressed.
If the release button 29a is fully pressed, the microprocessor 29 proceeds to step S6.
On the other hand, if the release button 29a is not fully pressed (half pressed or not pressed), the microprocessor 29 returns the operation to step S3.

[ステップS6] マイクロプロセッサ29は、公知の予備発光を次のように実施する。まず、マイクロプロセッサ29は、ミラー15を跳ね上げて、シャッタ19aのシャッタ幕に被写体像を投影する。この状態で、マイクロプロセッサ29は、閃光発光制御部28を用いて、電子閃光装置12に微小な予備発光を実施させる。マイクロプロセッサ29は、シャッタ19aを見込む位置に設けられた測光素子(不図示)を用いて、予備発光時のシャッタ幕の明るさを測定する。マイクロプロセッサ29は、この予備発光時のシャッタ幕の明るさに応じて、本発光の目標光量を決定する。この本発光の目標光量は、電子閃光装置12側に情報伝達される。 [Step S6] The microprocessor 29 performs known preliminary light emission as follows. First, the microprocessor 29 raises the mirror 15 and projects a subject image on the shutter curtain of the shutter 19a. In this state, the microprocessor 29 causes the electronic flash device 12 to perform minute preliminary light emission using the flash light emission control unit 28. The microprocessor 29 measures the brightness of the shutter curtain during preliminary light emission using a photometric element (not shown) provided at a position where the shutter 19a is viewed. The microprocessor 29 determines the target light amount for the main light emission in accordance with the brightness of the shutter curtain during the preliminary light emission. Information on the target light amount of the main light emission is transmitted to the electronic flash device 12 side.

[ステップS7] 続いて、マイクロプロセッサ29は、シャッタ19aの先幕を開き、記録用撮像素子19の撮像面に被写体像を投影開始する。
単発式の本発光を実施する場合、シャッタ19aが全開した時点で、マイクロプロセッサ29は、電子閃光装置12に本発光を開始させる。電子閃光装置12は、この本発光の発光量をモニタし、予め情報伝達された目標光量に到達した時点で、本発光を停止させる。
一方、設定されたシャッタ時間が経過すると、マイクロプロセッサ29は、シャッタ19aの後幕を閉じる。このようにしてシャッタ19aが完全に閉じると、マイクロプロセッサ29は、ミラー15を下に降ろす。
[Step S7] Subsequently, the microprocessor 29 opens the front curtain of the shutter 19a and starts projecting a subject image on the imaging surface of the recording imaging device 19.
When single-shot main light emission is performed, the microprocessor 29 causes the electronic flash device 12 to start main light emission when the shutter 19a is fully opened. The electronic flash device 12 monitors the light emission amount of the main light emission, and stops the main light emission when reaching the target light amount for which information has been transmitted in advance.
On the other hand, when the set shutter time has elapsed, the microprocessor 29 closes the rear curtain of the shutter 19a. When the shutter 19a is completely closed in this way, the microprocessor 29 lowers the mirror 15 downward.

[ステップS8] マイクロプロセッサ29は、撮像制御部27を用いて記録用撮像素子19に駆動信号を与える。記録用撮像素子19からは、閃光有りで撮像された本画像が出力される。この本画像は、A/D変換部21を介して画素単位にデジタル化された後、画像メモリ22に一時蓄積される。 [Step S <b> 8] The microprocessor 29 supplies a drive signal to the recording image sensor 19 using the imaging control unit 27. The recording image sensor 19 outputs a main image captured with a flash. The main image is digitized in units of pixels via the A / D converter 21 and then temporarily stored in the image memory 22.

[ステップS9] マイクロプロセッサ29は、画像メモリ22内にアクセスして、本画像を読み出し、テスト画像との比較に適した処理画像を作成する。
この処理画像の作成に際しては、下記のような素子差を抑制する画像処理を施すことが好ましい。
[Step S9] The microprocessor 29 accesses the image memory 22, reads the main image, and creates a processed image suitable for comparison with the test image.
In creating the processed image, it is preferable to perform image processing for suppressing element differences as described below.

(1)テスト画像の撮像画角に合わせて、本画像から処理画像を切り出す処理。
(2)測光用撮像素子18の小領域(ステップS4参照)の各位置に合わせて、本画像を画素ブロックに分割し、画素ブロック単位に輝度成分(G色などの疑似輝度成分も含む)を求める処理。
(3)テスト画像の最大階調値および最小階調値に合わせて、本画像の最大階調値および最小階調値を正規化する処理。
(4)テスト画像の階調特性に合わせて、本画像の階調ステップ数や階調カーブを変換する処理。
(1) Processing to cut out a processed image from the main image in accordance with the imaging field angle of the test image.
(2) The main image is divided into pixel blocks in accordance with the positions of the small areas (see step S4) of the photometric image sensor 18, and luminance components (including pseudo luminance components such as G color) are divided in pixel blocks. The requested process.
(3) A process of normalizing the maximum gradation value and the minimum gradation value of the main image in accordance with the maximum gradation value and the minimum gradation value of the test image.
(4) A process of converting the number of gradation steps and gradation curve of the main image in accordance with the gradation characteristics of the test image.

[ステップS10] マイクロプロセッサ29は、本画像から作成した処理画像の輝度成分を、テスト画像と同様にヒストグラム解析し、図4に例示するようなヒストグラム分布Bを作成する。
なお、このヒストグラム分布Bから、予め定められた度数値以下を取り除くことで、ノイズ除去や大面積部分抽出などのデータ加工を行ってもよい。
[Step S10] The microprocessor 29 analyzes the luminance component of the processed image created from the main image in the same manner as the test image, and creates a histogram distribution B as illustrated in FIG.
It should be noted that data processing such as noise removal and large area extraction may be performed by removing a predetermined frequency value or less from the histogram distribution B.

[ステップS11] マイクロプロセッサ29は、ヒストグラム分布Bから、白飛びおよび黒潰れの度数値を求める。
この度数値が、予め定められた閾値よりも多い場合、本画像の信号レベルは飽和するなど非線形に変化しているため、本画像とテスト画像とは比較に適さないと判断できる。この場合、マイクロプロセッサ29はステップS12に動作を移行する。
一方、この度数値が、予め定められた閾値以下の場合、マイクロプロセッサ29はステップS13に動作を移行する。
[Step S <b> 11] The microprocessor 29 calculates whiteness and blackout frequency values from the histogram distribution B.
If this power value is greater than a predetermined threshold value, the signal level of the main image changes non-linearly, for example, it is saturated, so it can be determined that the main image and the test image are not suitable for comparison. In this case, the microprocessor 29 shifts the operation to step S12.
On the other hand, when the frequency value is equal to or smaller than a predetermined threshold value, the microprocessor 29 shifts the operation to step S13.

[ステップS12] ここでは、本画像とテスト画像とのヒストグラム比較を行わずに、第2ホワイトバランス調整値の加重配分を高めに設定する。この動作後、ステップS15に動作を移行する。 [Step S12] Here, the weight distribution of the second white balance adjustment value is set higher without performing the histogram comparison between the main image and the test image. After this operation, the operation proceeds to step S15.

[ステップS13] マイクロプロセッサ29は、2つのヒストグラム分布A,Bの分布形状を比較し、両者間の相関を求める。
例えば、下式によりヒストグラム分布A,Bのユークリッド距離Dを算出して、両者間の相関を求めてもよい。この場合、ユークリッド距離Dが小さいほど、相関の度合いが高いと判断できる。

Figure 0004385749
ただし、NiとMiは、同一の輝度範囲iにおけるヒストグラム分布A,Bの度数値である。
また例えば、ヒストグラム分布A,Bの分布形状をパターンマッチングして、両者間の類似度から相関を検出してもよい。
また例えば、ヒストグラム分布A、Bのピーク数、ピークの間隔、複数のピークの大小関係、またはピーク形状などについて一致度を判定することにより、相関を求めてもよい。 [Step S13] The microprocessor 29 compares the distribution shapes of the two histogram distributions A and B and obtains a correlation between them.
For example, the Euclidean distance D of the histogram distributions A and B may be calculated by the following equation to obtain the correlation between the two. In this case, it can be determined that the smaller the Euclidean distance D, the higher the degree of correlation.
Figure 0004385749
However, Ni and Mi are frequency values of the histogram distributions A and B in the same luminance range i.
Further, for example, the distribution shapes of the histogram distributions A and B may be pattern-matched, and the correlation may be detected from the similarity between the two.
Further, for example, the correlation may be obtained by determining the degree of coincidence with respect to the number of peaks of the histogram distributions A and B, the interval between peaks, the magnitude relationship of a plurality of peaks, or the peak shape.

[ステップS14] マイクロプロセッサ29は、求めた相関の度合いが高いほど、ステップS14で求める第2ホワイトバランス調整値の加重配分を高める。逆に、相関の度合いが低いほど、第1ホワイトバランス調整値の加重配分を高める。
図5は、(1)式で求めたユークリッド距離Dと加重配分との対応関係を例示する図である。
[Step S14] The microprocessor 29 increases the weighted distribution of the second white balance adjustment value obtained in Step S14 as the degree of correlation obtained is higher. Conversely, the lower the degree of correlation, the higher the weighted distribution of the first white balance adjustment value.
FIG. 5 is a diagram illustrating a correspondence relationship between the Euclidean distance D obtained by the equation (1) and the weighted distribution.

[ステップS15] マイクロプロセッサ29は、画像メモリ22内の本画像から光源色温度を推定し、その光源色温度に適合した第2ホワイトバランス調整値を求める。
例えば、本画像の全部または一部領域について、色成分ごとの平均値を求めることにより、光源色温度を推定することができる。この場合、このように求めた平均色が無彩色になるように、第2ホワイトバランス調整値を決定すればよい。
[Step S15] The microprocessor 29 estimates a light source color temperature from the main image in the image memory 22, and obtains a second white balance adjustment value suitable for the light source color temperature.
For example, the light source color temperature can be estimated by obtaining an average value for each color component for all or part of the main image. In this case, the second white balance adjustment value may be determined so that the average color thus obtained becomes an achromatic color.

また例えば、本画像から無彩色に近い範囲の画素を抽出し、その抽出画素の平均色から、光源色温度を推定することもできる。この場合は、抽出画素の平均色が無彩色になるように、第2ホワイトバランス調整値を決定すればよい。
なお、ステップS14において、第2ホワイトバランス調整値の加重配分がゼロの場合には、ステップS15の処理を省略することが好ましい。
Further, for example, pixels in a range close to an achromatic color can be extracted from the main image, and the light source color temperature can be estimated from the average color of the extracted pixels. In this case, the second white balance adjustment value may be determined so that the average color of the extracted pixels is an achromatic color.
In step S14, when the weighted distribution of the second white balance adjustment value is zero, it is preferable to omit the process in step S15.

[ステップS16] マイクロプロセッサ29は、第1および第2のホワイトバランス調整値を、求めた加重配分に従って加重合成する。マイクロプロセッサ29は、求めた加重合成値を、ホワイトバランス調整値として画像処理部24に情報伝達する。
画像処理部24は、このホワイトバランス調整値に従って、画像メモリ22内の本画像にホワイトバランス調整を施す。
[Step S16] The microprocessor 29 weights and synthesizes the first and second white balance adjustment values according to the obtained weighted distribution. The microprocessor 29 transmits the obtained weighted composite value to the image processing unit 24 as a white balance adjustment value.
The image processing unit 24 performs white balance adjustment on the main image in the image memory 22 according to the white balance adjustment value.

[ステップS17] ステップS16のホワイトバランス調整の完了した本画像は、圧縮記録部25によって画像圧縮されて、メモリカード26に記録保存される。 [Step S17] The main image for which the white balance adjustment in step S16 has been completed is compressed by the compression recording unit 25 and recorded and stored in the memory card 26.

《本実施形態の効果など》
以上説明した動作により、本実施形態では、閃光無しのテスト画像と、閃光有りの本画像との間で、ヒストグラム分布を比較する。このとき、ヒストグラム分布の分布形状が似ているほど、閃光照明が均一に当たっていると判断できる。逆に、ヒストグラム分布の分布形状が異なるほど、閃光照明が不均一に当たっていると判断できる。
<< Effects of this embodiment >>
With the operation described above, in this embodiment, the histogram distribution is compared between the test image without flash and the main image with flash. At this time, it can be determined that flash illumination is more uniformly applied as the distribution shape of the histogram distribution is more similar. Conversely, it can be determined that the flash illumination is more unevenly applied as the distribution shape of the histogram distribution is different.

このような判断に従って、本実施形態では、閃光照明の均一さが高い状況において、本画像の推定色温度を重視したホワイトバランス調整に切り換える。この場合の推定色温度は、閃光撮影時のミックス光の色温度を正確に反映している。したがって、この本画像の推定色温度を重視したホワイトバランス調整を実施することにより、画面全体が適切にホワイトバランス調整される。   In accordance with such a determination, in the present embodiment, switching to white balance adjustment that places importance on the estimated color temperature of the main image in a situation where flash illumination is highly uniform. The estimated color temperature in this case accurately reflects the color temperature of the mixed light at the time of flash photography. Therefore, by performing the white balance adjustment that places importance on the estimated color temperature of the main image, the entire screen is appropriately white balance adjusted.

また、本実施形態では、閃光照明の均一さが低い状況において、閃光の色温度を重視したホワイトバランス調整に切り換える。この場合、閃光がよく当たっている画像領域、すなわちカメラに近くて主要な被写体である確率が高い領域を、適切にホワイトバランス調整できる。   Further, in the present embodiment, in a situation where the uniformity of the flash illumination is low, the white balance adjustment is made with an emphasis on the color temperature of the flash. In this case, it is possible to appropriately adjust the white balance in an image area that is well lit, that is, an area that is close to the camera and has a high probability of being a main subject.

特に、このようなヒストグラム分布の比較では、テスト画像と本画像との間の微妙な絵柄の変化を無視することができる。したがって、特許文献1の従来装置とは異なり、被写体移動やカメラブレや手ブレなどの影響を殆ど受けずに、適切なホワイトバランス調整を実施できる。   In particular, in such comparison of histogram distributions, subtle changes in the pattern between the test image and the main image can be ignored. Therefore, unlike the conventional device of Patent Document 1, appropriate white balance adjustment can be performed with almost no influence of subject movement, camera shake, camera shake, and the like.

ところで、閃光照明が明るすぎて本画像の信号レベルが非線形に変化する場合がある。このような状況では、テスト画像と本画像とを正確に比較できず、閃光照明の均一さを正しく判断できない。そこで、本実施形態では、本画像に白飛びや黒潰れが多いと、閃光照明の均一性判断を諦め、本画像の色温度を重視したホワイトバランス調整に切り換える。このときの本画像には、白飛びや黒つぶれの領域が含まれる。しかし、これらの非線形領域は、もともと彩度が低いため、本画像から光源色温度を推定する際の誤差要因とはなりにくい。したがって、この白飛びや黒潰れを含む本画像を基準にしてホワイトバランス調整を実施しても、ある程度良好な色再現性の本画像を得ることが可能になる。   By the way, there are cases where the flash illumination is too bright and the signal level of the main image changes nonlinearly. In such a situation, the test image and the main image cannot be accurately compared, and the uniformity of the flash illumination cannot be determined correctly. Therefore, in the present embodiment, if there are many overexposures or blackouts in the main image, the determination of the uniformity of the flash illumination is abandoned and the white balance adjustment is performed with emphasis on the color temperature of the main image. The main image at this time includes a whiteout area or a blackout area. However, these non-linear regions are originally low in saturation, and thus are not likely to be an error factor when estimating the light source color temperature from the main image. Therefore, even if the white balance adjustment is performed with reference to the main image including the whiteout or the blackout, it is possible to obtain a main image having a somewhat good color reproducibility.

さらに、本実施形態では、分割測光用途の測光用撮像素子18を用いて、テスト画像を撮像している。この測光用撮像素子18は、記録用撮像素子19に比べて画素数が少ないため、テスト画像の撮像および画像処理(ヒストグラム作成など)にかかる時間は短くて済む。その結果、上述したホワイトバランス調整値の決定動作を加味しても処理負担の増加は少なく、電子カメラの撮像動作の軽快さを失うことがない。   Further, in the present embodiment, a test image is captured using the photometric imaging element 18 for use in split photometry. Since the photometric image sensor 18 has a smaller number of pixels than the recording image sensor 19, it takes less time to capture a test image and to perform image processing (histogram creation or the like). As a result, even if the above-described white balance adjustment value determination operation is taken into account, the processing load is not increased and the lightness of the imaging operation of the electronic camera is not lost.

また、本実施形態のステップS9では、テスト画像と本画像とを比較に適するように処理している。その結果、撮像素子が異なっているにも拘わらず、良好な比較が可能となり、閃光照明の均一性を一段と正確に判定することができる。   In step S9 of the present embodiment, the test image and the main image are processed so as to be suitable for comparison. As a result, although the image pickup devices are different, a good comparison is possible, and the uniformity of flash illumination can be determined more accurately.

さらに、本実施形態では、ヒストグラム分布A,Bから、予め定められた度数値以下を切り捨てた上で、2つのヒストグラム分布A,Bを比較できる。このような切り捨て処理により、ノイズの影響を低減することが可能となり、閃光照明の均一さを一段と正確に判定することができる。また、画面内の特に高頻度な度数値のみを残すように、小程度の度数値以下をヒストグラム分布から切り捨てることもできる。この場合、画面内で目立つ高頻度部分のみに限って、閃光照明の均一さを判定することができる。その結果、視覚的に目立つ高頻度部分に的を絞ったホワイトバランス調整が実現する。   Furthermore, in this embodiment, the two histogram distributions A and B can be compared after the predetermined frequency values are rounded down from the histogram distributions A and B. By such a truncation process, it becomes possible to reduce the influence of noise, and the uniformity of flash illumination can be determined more accurately. It is also possible to cut off a small degree value or less from the histogram distribution so that only a particularly high frequency value in the screen remains. In this case, it is possible to determine the uniformity of the flash illumination only for the high-frequency portion that stands out in the screen. As a result, it is possible to achieve white balance adjustment focusing on visually noticeable high-frequency portions.

《実施形態の補足事項》
なお、上述した実施形態では、一眼式の電子カメラ11について説明した。しかしながら、本発明はこれに限定されるものではない。例えば、コンパクトタイプの電子カメラに本発明を適用することもできる。この場合、テスト画像を記録用撮像素子で撮像することが好ましい。このような構成では、測光用撮像素子18が不要となり、撮像部の構成をより単純化することができる。
<< Additional items of embodiment >>
In the above-described embodiment, the single-lens electronic camera 11 has been described. However, the present invention is not limited to this. For example, the present invention can be applied to a compact type electronic camera. In this case, it is preferable to capture the test image with a recording image sensor. In such a configuration, the photometric image sensor 18 is not required, and the configuration of the imaging unit can be further simplified.

また、上述した実施形態では、画像全体に対して、一つのホワイトバランス調整値を決定している。しかしながら、本発明はこれに限定されるものではない。例えば、画面を複数の領域に分割し、領域ごとに本発明のホワイトバランス調整値を決定してもよい。この場合、領域ごとに閃光照明の均一性判断を行い、その均一性判断に従って領域ごとに適切なホワイトバランス調整値を決定できる。   In the above-described embodiment, one white balance adjustment value is determined for the entire image. However, the present invention is not limited to this. For example, the screen may be divided into a plurality of areas, and the white balance adjustment value of the present invention may be determined for each area. In this case, the uniformity of flash illumination can be determined for each region, and an appropriate white balance adjustment value can be determined for each region according to the uniformity determination.

なお、上述した実施形態では、白飛びおよび黒潰れの両方を検出している。しかしながら、本発明はこれに限定されるものではない。白飛びまたは黒潰れのいずれか一方の増加を検出して、閃光照明の均一性判断を停止してもよい。
また、本画像の白飛びまたは黒潰れの度数値に対応する階調域を、テスト画像のヒストグラムの白側または黒側から検出してもよい。この場合、検出された階調域をテスト画像のヒストグラム分布から除去(最上部および/または最下部の階調域の除去)したり、検出された複数の階調域を単一階調域にまとめてもよい。このようなテスト画像側のヒストグラム加工によって、ヒストグラム比較がより正確になる。このような動作により、本画像の白飛びや黒潰れに拘わらず、閃光照明の均一性判断を正確に実施できるようになる。
In the above-described embodiment, both whiteout and blackout are detected. However, the present invention is not limited to this. The determination of the uniformity of the flash illumination may be stopped by detecting an increase in either whiteout or blackout.
Further, the gradation range corresponding to the whiteout or blackout degree value of the main image may be detected from the white side or the black side of the histogram of the test image. In this case, the detected gradation area is removed from the histogram distribution of the test image (removal of the uppermost and / or lowermost gradation areas), or a plurality of detected gradation areas are changed to a single gradation area. It may be summarized. Such histogram processing on the test image side makes histogram comparison more accurate. Such an operation makes it possible to accurately determine the uniformity of the flash illumination regardless of whether the main image is whiteout or blackout.

なお、上述した実施形態では、内蔵タイプの電子閃光装置12を使用するケースについて説明した。しかしながら、本発明はこれに限定されるものではない。外付けタイプの電子閃光装置を使用するケースに本発明を適用してもかまわない。   In the above-described embodiment, the case where the built-in type electronic flash device 12 is used has been described. However, the present invention is not limited to this. The present invention may be applied to a case in which an external type electronic flash device is used.

さらに、上述した実施形態では、電子カメラ内でホワイトバランス調整を完了するケースについて説明した。しかしながら、これに限定されるものではない。例えば、図3に示した閃光照明の均一性判断からホワイトバランス調整までの処理の一部または全部を実施するプログラムを作成してもよい。このプログラムを外部のコンピュータ上で実行することにより、上述した動作をコンピュータ上で実施することが可能になる。   Furthermore, in the above-described embodiment, the case where the white balance adjustment is completed in the electronic camera has been described. However, the present invention is not limited to this. For example, a program for executing part or all of the processing from the uniformity determination of the flash illumination shown in FIG. 3 to the white balance adjustment may be created. By executing this program on an external computer, the above-described operation can be performed on the computer.

以上説明したように、本発明は、閃光撮影の実施可能な電子カメラに利用可能な技術である。   As described above, the present invention is a technique that can be used for an electronic camera capable of performing flash photography.

本実施形態における電子カメラ11の部品配置を説明する図である。It is a figure explaining component arrangement | positioning of the electronic camera 11 in this embodiment. この電子カメラ11の画像処理に関するブロック図である。2 is a block diagram relating to image processing of the electronic camera 11. FIG. 電子カメラ11の動作を説明する流れ図である。3 is a flowchart for explaining the operation of the electronic camera 11. 2つのヒストグラム分布A,Bの一例を示す図である。It is a figure which shows an example of two histogram distribution A and B. FIG. ヒストグラム分布A,Bの相関値と、ホワイトバランス調整値の加重配分との対応関係を例示する図である。It is a figure which illustrates the correspondence of the correlation value of histogram distribution A and B, and the weight distribution of the white balance adjustment value.

符号の説明Explanation of symbols

11 電子カメラ
12 電子閃光装置
13 撮影レンズ
15 ミラー
16 拡散板
17 ファインダー光学系
18 測光用撮像素子
19 記録用撮像素子
19a シャッタ
20 A/D変換部
22 画像メモリ
23 バス
24 画像処理部
25 圧縮記録部
27 撮像制御部
28 閃光発光制御部
29 マイクロプロセッサ
29a レリーズ釦
DESCRIPTION OF SYMBOLS 11 Electronic camera 12 Electronic flash device 13 Shooting lens 15 Mirror 16 Diffuser 17 Finder optical system 18 Photometric image sensor 19 Recording image sensor 19a Shutter 20 A / D converter 22 Image memory 23 Bus 24 Image processor 25 Compression recording unit 27 Imaging Control Unit 28 Flash Light Emission Control Unit 29 Microprocessor 29a Release Button

Claims (7)

被写体像を撮像する撮像部と、
前記撮像部を制御して、閃光無しの状態で撮像するテスト画像と、閃光発光を実施した状態で撮像する本画像とを生成する撮像制御部と、
前記テスト画像および前記本画像についてそれぞれヒストグラム分布を求めるヒストグラム算出部と、
前記ヒストグラム算出部により算出される2つのヒストグラム分布の相関を検出するヒストグラム相関検出部と、
前記相関の度合いが低い場合には閃光照明が不均一であると判定し、前記閃光の色温度を重視したホワイトバランス調整値に変更し、前記相関の度合いが高い場合には、前記閃光照明が均一(均一に照明未到達の場合も含む)であると判定し、前記本画像の色温度を重視したホワイトバランス調整値に変更するホワイトバランス算出部と、
前記ホワイトバランス算出部の求めたホワイトバランス調整値に従って、前記本画像にホワイトバランス調整を施すホワイトバランス調整部と
を備えたことを特徴とする電子カメラ。
An imaging unit that captures a subject image;
An imaging control unit that controls the imaging unit to generate a test image that is captured without flashing and a main image that is captured while flashing;
A histogram calculation unit for obtaining a histogram distribution for each of the test image and the main image;
A histogram correlation detector that detects a correlation between two histogram distributions calculated by the histogram calculator;
When the degree of correlation is low, it is determined that the flash illumination is non-uniform, and the white balance adjustment value is given with an emphasis on the color temperature of the flash. When the degree of correlation is high, the flash illumination is A white balance calculating unit that determines that the color is uniform (including a case where illumination is not yet achieved), and changes the white balance adjustment value with emphasis on the color temperature of the main image;
An electronic camera comprising: a white balance adjustment unit that performs white balance adjustment on the main image according to a white balance adjustment value obtained by the white balance calculation unit.
請求項1に記載の電子カメラにおいて、
前記ホワイトバランス算出部は、
前記閃光の色温度を基準に決定される第1ホワイトバランス調整値と、前記本画像の色温度を基準に求めた第2ホワイトバランス調整値との加重合成値を求めて、前記ホワイトバランス調整値とする手段であり、前記相関の度合いが低い場合には前記第1ホワイトバランス調整値の加重配分を増加させ、前記相関の度合いが高い場合には前記第2ホワイトバランス調整値の加重配分を増加させる
ことを特徴とする電子カメラ。
The electronic camera according to claim 1,
The white balance calculation unit
A weighted composite value of a first white balance adjustment value determined based on the color temperature of the flash and a second white balance adjustment value determined based on the color temperature of the main image is obtained, and the white balance adjustment value When the degree of correlation is low, the weighted distribution of the first white balance adjustment value is increased, and when the degree of correlation is high, the weighted distribution of the second white balance adjustment value is increased. An electronic camera characterized by
請求項1または請求項2に記載の電子カメラにおいて、
前記ホワイトバランス算出部は、
前記本画像について、白飛びおよび/または黒潰れの度数を求め、前記度数が予め定められた閾値を上回ると、前記閃光照明の均一さの判断を停止する
ことを特徴とする電子カメラ。
The electronic camera according to claim 1 or 2,
The white balance calculation unit
An electronic camera characterized in that, with respect to the main image, the frequency of overexposure and / or blackout is obtained, and when the frequency exceeds a predetermined threshold, the determination of the uniformity of the flash illumination is stopped.
請求項1ないし請求項3のいずれか1項に記載の電子カメラにおいて、
前記撮像部は、
分割測光用途の撮像動作を行う測光用撮像素子と、記録保存用途の撮像動作を行う記録用撮像素子とを備え、
前記撮像制御部は、
前記閃光無しの状態において前記測光用撮像素子を制御して、前記テスト画像を撮像し、前記閃光有りの状態において前記記録用撮像素子を制御して、前記本画像を撮像する
ことを特徴とする電子カメラ。
The electronic camera according to any one of claims 1 to 3,
The imaging unit
A photometric image sensor for performing an image-capturing operation for split photometry and a recording image sensor for performing an image-capturing image-recording operation
The imaging control unit
The photometric image sensor is controlled to capture the test image in the absence of flashing, and the recording image sensor is controlled to capture the main image in the flashing state. Electronic camera.
請求項4に記載の電子カメラにおいて、
前記ヒストグラム算出部は、
前記測光用撮像素子と前記記録用撮像素子との素子差に起因する前記2つのヒストグラム分布の差を抑制する
ことを特徴とする電子カメラ。
The electronic camera according to claim 4,
The histogram calculation unit
An electronic camera that suppresses a difference between the two histogram distributions caused by an element difference between the photometric image sensor and the recording image sensor.
請求項1ないし請求項5のいずれか1項に記載の電子カメラにおいて、
前記ヒストグラム相関検出部は、
前記ヒストグラム算出部により算出される2つのヒストグラム分布から、予め定められた度数値以下を取り除いた上で、2つのヒストグラム分布の相関を検出する
ことを特徴とする電子カメラ。
The electronic camera according to any one of claims 1 to 5,
The histogram correlation detection unit
An electronic camera, wherein a correlation between two histogram distributions is detected after removing a predetermined frequency value or less from the two histogram distributions calculated by the histogram calculation unit.
閃光無しの状態で撮像されたテスト画像と、閃光発光を実施した状態で撮像された本画像とを用いるプログラムであって、  A program that uses a test image captured without flash and a main image captured with flash emission,
前記テスト画像および前記本画像についてそれぞれヒストグラム分布を求めるヒストグラム算出処理と、  A histogram calculation process for obtaining a histogram distribution for each of the test image and the main image;
前記ヒストグラム算出処理により算出される2つのヒストグラム分布の相関を検出するヒストグラム相関検出処理と、  A histogram correlation detection process for detecting a correlation between two histogram distributions calculated by the histogram calculation process;
前記相関の度合いが低い場合には閃光照明が不均一であると判定し、前記閃光の色温度を重視したホワイトバランス調整値に変更し、前記相関の度合いが高い場合には、前記閃光照明が均一(均一に照明未到達の場合も含む)であると判定し、前記本画像の色温度を重視したホワイトバランス調整値に変更するホワイトバランス算出処理と、  When the degree of correlation is low, it is determined that the flash illumination is non-uniform, and the white balance adjustment value is given with an emphasis on the color temperature of the flash. When the degree of correlation is high, the flash illumination is A white balance calculation process for determining that the color is uniform (including a case where illumination is not yet achieved), and changing the white balance adjustment value with an emphasis on the color temperature of the main image;
前記ホワイトバランス算出処理で求めたホワイトバランス調整値に従って、前記本画像にホワイトバランス調整を施すホワイトバランス調整処理と、  A white balance adjustment process for performing a white balance adjustment on the main image in accordance with a white balance adjustment value obtained in the white balance calculation process;
をコンピュータに実行させるためのプログラム。  A program that causes a computer to execute.
JP2003409055A 2003-12-08 2003-12-08 Electronic camera having white balance adjustment function and program Expired - Fee Related JP4385749B2 (en)

Priority Applications (3)

Application Number Priority Date Filing Date Title
JP2003409055A JP4385749B2 (en) 2003-12-08 2003-12-08 Electronic camera having white balance adjustment function and program
US10/994,404 US20050122409A1 (en) 2003-12-08 2004-11-23 Electronic camera having color adjustment function and program therefor
US11/118,382 US7423674B2 (en) 2003-12-08 2005-05-02 Electronic camera having color adjustment function and program therefor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2003409055A JP4385749B2 (en) 2003-12-08 2003-12-08 Electronic camera having white balance adjustment function and program

Publications (2)

Publication Number Publication Date
JP2005175598A JP2005175598A (en) 2005-06-30
JP4385749B2 true JP4385749B2 (en) 2009-12-16

Family

ID=34730563

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2003409055A Expired - Fee Related JP4385749B2 (en) 2003-12-08 2003-12-08 Electronic camera having white balance adjustment function and program

Country Status (1)

Country Link
JP (1) JP4385749B2 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4832899B2 (en) * 2006-01-05 2011-12-07 イーストマン コダック カンパニー Gain calculation device
JP2008122534A (en) * 2006-11-09 2008-05-29 Canon Inc Imaging apparatus, control method and program therefor
CN112218065B (en) * 2020-09-14 2022-05-10 深圳英飞拓科技股份有限公司 Image white balance method, system, terminal device and storage medium

Also Published As

Publication number Publication date
JP2005175598A (en) 2005-06-30

Similar Documents

Publication Publication Date Title
US7423674B2 (en) Electronic camera having color adjustment function and program therefor
US7551797B2 (en) White balance adjustment
CN109862282B (en) Method and device for processing person image
KR101124778B1 (en) Camera flash module and method for controlling same
US8446487B2 (en) White balance adjustment apparatus, white balance adjustment method, recording medium storing white balance adjustment program and imaging apparatus
CN105744175B (en) A kind of screen light compensation method, device and mobile terminal
JPH08340542A (en) Electronic still camera
US20090002518A1 (en) Image processing apparatus, method, and computer program product
US7801437B2 (en) Imaging device, imaging device controlling method, and computer program
CN108319940A (en) Face recognition processing method, device, equipment and storage medium
US20050122409A1 (en) Electronic camera having color adjustment function and program therefor
CN111246114B (en) Photographing processing method and device, terminal equipment and storage medium
US8090253B2 (en) Photographing control method and apparatus using strobe
US20040041941A1 (en) Electronic camera and white balance correction circuit
JP5036334B2 (en) Imaging apparatus, imaging method, and program for causing computer to execute the method
CN108289170B (en) Photographing apparatus, method and computer readable medium capable of detecting measurement area
JP4300936B2 (en) Imaging device
JP4385749B2 (en) Electronic camera having white balance adjustment function and program
JP4412109B2 (en) Electronic camera having color balance adjustment function and program
CN110891145A (en) Method for obtaining image by photographing and electronic equipment
JP5849515B2 (en) Exposure calculation device and camera
JP3684030B2 (en) Imaging device
JP2009063674A (en) Imaging apparatus and flash control method
KR100978675B1 (en) Method of controlling white balance at flashlight photographing
JP2014098859A (en) Imaging apparatus and imaging method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20061101

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20081225

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20090317

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20090515

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20090908

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20090921

R150 Certificate of patent or registration of utility model

Ref document number: 4385749

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20121009

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20121009

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20151009

Year of fee payment: 6

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

LAPS Cancellation because of no payment of annual fees