JP4461892B2 - Electronic camera having color cast adjustment function by special light source, and program - Google Patents

Electronic camera having color cast adjustment function by special light source, and program Download PDF

Info

Publication number
JP4461892B2
JP4461892B2 JP2004128721A JP2004128721A JP4461892B2 JP 4461892 B2 JP4461892 B2 JP 4461892B2 JP 2004128721 A JP2004128721 A JP 2004128721A JP 2004128721 A JP2004128721 A JP 2004128721A JP 4461892 B2 JP4461892 B2 JP 4461892B2
Authority
JP
Japan
Prior art keywords
color
balance adjustment
image
electronic camera
color balance
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
JP2004128721A
Other languages
Japanese (ja)
Other versions
JP2005311892A (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 JP2004128721A priority Critical patent/JP4461892B2/en
Priority to US10/994,404 priority patent/US20050122409A1/en
Priority to US11/118,382 priority patent/US7423674B2/en
Publication of JP2005311892A publication Critical patent/JP2005311892A/en
Application granted granted Critical
Publication of JP4461892B2 publication Critical patent/JP4461892B2/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 function of reducing the color cast of an image.
The present invention also relates to a program for reducing the color cast of an image on a computer.

従来、蛍光灯照明下において撮影を行うと、蛍光灯の波長特性によって、撮像画像に緑かぶりを生じることが知られている。
特許文献1では、このような緑かぶりをホワイトバランス調整により補正する技術が記載されている。さらに、特許文献1では、画像の色を分析して植物の緑と判別すると、緑かぶりの補正を弱める技術についても記載されている。
特開2003−264850号公報(要約など)
Conventionally, when photographing is performed under fluorescent lamp illumination, it is known that a green fog is generated in a captured image due to the wavelength characteristics of the fluorescent lamp.
Patent Document 1 describes a technique for correcting such a green fog by white balance adjustment. Furthermore, Patent Document 1 also describes a technique for weakening the correction of the green fog when the color of the image is analyzed and determined to be green of the plant.
JP 2003-264850 A (summary)

ところで、夜景撮影や室内撮影などでは、蛍光灯や電球や閃光のミックスされた複雑な照明環境となることが多い。このような環境で各光の当たり方にムラが生じると、被写体の一部のみに蛍光灯の緑かぶりが発生し、電球や閃光の当たっている箇所には緑かぶりが発生しないといった状況となる。   By the way, in night scene shooting and indoor shooting, a complicated lighting environment in which fluorescent lights, light bulbs, and flashlights are mixed is often obtained. If there is unevenness in how each light hits in such an environment, only a part of the subject will have a green fog on the fluorescent lamp, and no green fog will occur on the light bulb or flashing part. .

例えば、高層ビル群(窓からは多数の蛍光灯が見える)を背景に、電球光で照らされた人物を手前に配して、電子閃光装置を発光させてスローシンクロ撮影を実施した場合を考えてみる。このような場合、背景の大部分を占める高層ビル群の明かりには、蛍光灯による緑かぶりが発生する。一方、手前の人物は、電球や閃光によって強く照らされるため、緑かぶりは殆ど生じない。
この状態の撮像画像に対して従来通りに緑かぶりの補正を行うと、緑かぶりを生じていない人物の赤青成分が上がり過ぎて、不自然なマゼンタかぶりが生じてしまうという問題点があった。
For example, consider a case where a slow-synchronized photo is taken with a person illuminated by a light bulb in front of a skyscraper group (a large number of fluorescent lamps can be seen from the window) and the electronic flash device emitting light. Try. In such a case, a green fog caused by a fluorescent lamp occurs in the light of a high-rise building group that occupies most of the background. On the other hand, the person in the foreground is strongly illuminated by light bulbs and flashes, so there is almost no green fog.
If the green fog correction is performed on the captured image in this state as usual, the red-blue component of the person who does not cause the green fog rises too much, resulting in an unnatural magenta fog. .

従来、このような問題は、緑かぶりの発生箇所が画面全体かあるいは画面の一部かを適切に判別できないため、電子カメラ内の画像処理によって自動的に解決することは非常に困難であった。なぜなら、従来技術では、画面内の低彩度領域といった限られた領域について色かぶりを検出しているに過ぎず、検出された緑かぶりが画面全体にわたって発生しているのか否かを決定できないからでなる。   Conventionally, it is very difficult to solve such a problem automatically by image processing in an electronic camera because it is not possible to properly determine whether the occurrence of green fog is the entire screen or a part of the screen. . This is because the conventional technology only detects color fog in a limited area such as a low saturation area in the screen, and cannot determine whether or not the detected green fog occurs over the entire screen. It becomes.

そこで、本発明の目的は、緑かぶりなどの色かぶりが画面全体に広く発生しているのか否かを適切に判断する技術を提供することである。
また、本発明の別の目的は、色かぶりの広がり具合の判断を活用して、撮像画像の色バランス調整を適切に行う技術を提供することである。
また、本発明の別の目的は、蛍光灯の緑かぶりを補正する際に、画面内に生じる不自然なマゼンタかぶりを適切に抑制する技術を提供することである。
Therefore, an object of the present invention is to provide a technique for appropriately determining whether or not a color cast such as a green cast is widely generated on the entire screen.
Another object of the present invention is to provide a technique for appropriately adjusting the color balance of a captured image by utilizing the determination of the extent of color cast.
Another object of the present invention is to provide a technique for appropriately suppressing an unnatural magenta fog generated in a screen when correcting a green fog of a fluorescent lamp.

《請求項1》
請求項1の電子カメラは、撮像部、撮像制御部、特殊光源判別部、均一照明判定部、および色バランス調整部を備える。
撮像部は、被写体像を撮像する。
撮像制御部は、撮像部を制御して、閃光無しで撮像するテスト画像と、閃光発光を実施して撮像する本画像とを生成する。
特殊光源判別部は、本画像の低彩度領域について黒体軌跡からの乖離を判定して、蛍光灯照明による緑かぶりを検出する。
均一照明判定部は、テスト画像および本画像についてそれぞれヒストグラム分布を求め、両ヒストグラム分布の相関を検出することにより、照明状態の均一度を判定する。
色バランス調整部は、ヒストグラム相関の度合いが高く、かつ低彩度領域に緑かぶりを検出した場合には、蛍光灯照明は均一であると判定して、本画像の赤青成分を緑成分より相対的に上げて緑かぶりを補正する。
その一方で、色バランス調整部は、ヒストグラム相関の度合いが低く、かつ低彩度領域に緑かぶりを検出した場合には、蛍光灯照明は不均一であると判定し、緑かぶりに対する上記補正を弱めて実施する。
<Claim 1>
An electronic camera according to a first aspect includes an imaging unit, an imaging control unit, a special light source determination unit, a uniform illumination determination unit, and a color balance adjustment unit.
The imaging unit captures a subject image.
The imaging control unit controls the imaging unit to generate a test image that is captured without flashing and a main image that is captured by performing flash emission.
The special light source determination unit determines a deviation from the black body locus for the low-saturation region of the main image, and detects a green fog caused by fluorescent lamp illumination.
The uniform illumination determination unit determines the uniformity of the illumination state by obtaining a histogram distribution for each of the test image and the main image and detecting the correlation between the two histogram distributions.
When the degree of histogram correlation is high and green fog is detected in the low saturation area, the color balance adjustment unit determines that the fluorescent lamp illumination is uniform, and the red-blue component of the main image is replaced with the green component. Raise it relatively to correct the green fog.
On the other hand, if the degree of histogram correlation is low and a green fog is detected in the low saturation area, the color balance adjustment unit determines that the fluorescent lamp illumination is non-uniform and performs the above correction for the green fog. Weaken and carry out.

《請求項2》
請求項2の電子カメラは、請求項1の電子カメラにおいて、『ヒストグラム相関の度合いが低く』かつ『緑かぶりを検出した』という条件を満足すると、色バランス調整部は、ホワイトバランス調整値および色バランス調整値を加重合成し、その加重合成値を用いて本画像の色バランスを調整する。
なお、ここでのホワイトバランス調整値は、本画像の相関色温度(黒体軌跡上に写像して得た色温度)を基準に決定されるホワイトバランス調整値である。一方、色バランス調整値は、緑かぶりを補正するための色バランス調整値である。
<Claim 2>
When the electronic camera according to claim 2 satisfies the conditions that “the degree of histogram correlation is low” and “green fog is detected” in the electronic camera according to claim 1, the color balance adjustment unit sets the white balance adjustment value and the color The balance adjustment value is weighted and combined, and the color balance of the main image is adjusted using the weighted combination value.
Note that the white balance adjustment value here is a white balance adjustment value determined on the basis of the correlated color temperature of the main image (color temperature obtained by mapping on the black body locus). On the other hand, the color balance adjustment value is a color balance adjustment value for correcting the green fog.

《請求項3》
請求項3の電子カメラは、請求項2の電子カメラにおいて、加重合成値の算出に当たり、ヒストグラム相関の度合いが低いほど、色バランス調整値の加重比率を下げる。
<Claim 3>
According to a third aspect of the present invention, in calculating the weighted composite value in the electronic camera of the second aspect, the weighted ratio of the color balance adjustment value is lowered as the degree of histogram correlation is lower.

《請求項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 color balance adjustment unit is configured to determine a correspondence between a predetermined color of the low saturation region and the color balance adjustment value. Prepare multiple “data” for each color rendering difference of fluorescent lamps. And a color balance adjustment part calculates | requires a color balance adjustment value using corresponding data with high color rendering property, so that the degree of histogram correlation is low. The color balance adjustment unit adjusts the color balance of the main image based on the color balance adjustment value.

《請求項5》
請求項5の電子カメラは、撮像部、特殊光源判定部、均一照明判定部、および色バランス調整部を備える。
撮像部は、被写体像を撮像して撮像画像を生成する。
特殊光源判別部は、撮像画像の低彩度領域について黒体軌跡からの乖離を判定することにより、特殊光源による色かぶりを検出する。
均一照明判定部は、撮像画像の照明状態の均一度を判定する。
色バランス調整部は、照明状態が均一照明と判定され、かつ低彩度領域に色かぶりを検出した場合、撮像画像の黒体軌跡からの乖離を縮める方向に、色かぶりを補正する。一方、色バランス調整部は、照明状態が不均一照明と判定され、かつ低彩度領域に色かぶりを検出した場合、色かぶりに対する上記補正を弱めて実施する。
<Claim 5>
The electronic camera according to a fifth aspect includes an imaging unit, a special light source determination unit, a uniform illumination determination unit, and a color balance adjustment unit.
The imaging unit captures a subject image and generates a captured image.
The special light source determination unit detects a color cast by the special light source by determining a deviation from the black body locus in the low saturation region of the captured image.
The uniform illumination determination unit determines the uniformity of the illumination state of the captured image.
When it is determined that the illumination state is uniform illumination and a color cast is detected in the low saturation region, the color balance adjustment unit corrects the color cast in a direction that reduces the deviation from the black body locus of the captured image. On the other hand, when it is determined that the illumination state is non-uniform illumination and the color cast is detected in the low saturation region, the color balance adjustment unit performs the above correction for the color cast with a weakening.

《請求項6》
請求項6のプログラムは、コンピュータを、請求項1ないし請求項5のいずれか1項に記載の特殊光源判別部、均一照明判定部、および色バランス調整部として機能させるためのプログラムである。
<Claim 6>
A program according to a sixth aspect is a program for causing a computer to function as the special light source determination unit, the uniform illumination determination unit, and the color balance adjustment unit according to any one of the first to fifth aspects.

(請求項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 the histogram distributions of these two images, and correlates to determine how similar the histogram distributions of both images are.

このとき、両画像のヒストグラム分布が異なるほど、閃光の届き方や、被写体の反射率にムラがあり、本画像の照明状態は不均一であると判断できる。
一方、両画像のヒストグラム分布の形状が似ている場合、閃光の届き方や、被写体の反射率にムラがなく、本画像の照明状態は均一であると判断できる。
At this time, it can be determined that the more the histogram distributions of the two images are different, the more uneven the flashing method and the reflectance of the subject, and the non-uniform illumination state of the main image.
On the other hand, when the shapes of the histogram distributions of both images are similar, it can be determined that there is no unevenness in the way the flash reaches and the reflectance of the subject, and the illumination state of the main image is uniform.

さらに、この電子カメラでは、本画像から低彩度領域を抽出し、この低彩度領域の黒体軌跡からの乖離を判定することで、蛍光灯照明の緑かぶりを検出する。   Furthermore, in this electronic camera, a low saturation area is extracted from the main image, and a green fog of fluorescent lamp illumination is detected by determining a deviation of the low saturation area from the black body locus.

ここで、均一照明であると判断された本画像の一部(低彩度領域)から、緑かぶりが検出された場合、本画像の広範囲にわたって蛍光灯の緑かぶりが発生していると判断できる。このような場合、電子カメラは、本画像の赤青成分を緑成分より相対的に上げることで、緑かぶりを補正する。その結果、画面の広範囲に発生している緑かぶりを確実に低減し、全体的に緑かぶりの少ない自然な本画像が得られる。   Here, when a green fog is detected from a part (low saturation region) of the main image determined to be uniform illumination, it can be determined that the green fog of the fluorescent lamp has occurred over a wide range of the main image. . In such a case, the electronic camera corrects the green fog by raising the red-blue component of the main image relative to the green component. As a result, it is possible to reliably reduce the green fog generated over a wide range of the screen and to obtain a natural main image with less green fog as a whole.

一方、不均一照明であると判断された本画像の一部(低彩度領域)から、緑かぶりが検出された場合、本画像の一部に限って緑かぶりが発生していると判断できる。このような場合、電子カメラは、上述した緑かぶりに対する補正を弱めて実施する。その結果、緑かぶり以外の領域にマゼンタかぶりが生じるといった不具合を解消できる。   On the other hand, if a green fog is detected from a part (low saturation area) of the main image determined to be non-uniform illumination, it can be determined that the green fog is generated only in a part of the main image. . In such a case, the electronic camera performs the above-described correction for the green fog with weakening. As a result, it is possible to solve the problem that magenta fog occurs in an area other than the green fog.

(請求項2)
請求項2の電子カメラは、相関色温度(黒体軌跡上に写像して得た色温度)を基準に決定されるホワイトバランス調整値と、緑かぶりを補正する色バランス調整値とを加重合成することで、緑かぶりの補正を弱める。
(Claim 2)
The electronic camera according to claim 2 is a weighted combination of a white balance adjustment value determined on the basis of a correlated color temperature (color temperature obtained by mapping on a black body locus) and a color balance adjustment value for correcting green fog. By doing so, the correction of the green fog is weakened.

蛍光灯による緑かぶりは、黒体軌跡から緑方向に色がずれる形で現れる。したがって、黒体軌跡上に写像することでこの緑方向の乖離を打ち消し、緑かぶりの影響を排除した相関色温度が得られる。この相関色温度を基準に求めたホワイトバランス調整値は、緑かぶりを生じていない箇所(前述例では、手前の主要被写体)に適切な色再現を与える調整値となる。   Green fog caused by fluorescent lamps appears in a form that deviates from the black body locus in the green direction. Accordingly, mapping on the black body locus cancels the deviation in the green direction, and a correlated color temperature is obtained in which the influence of the green fog is eliminated. The white balance adjustment value obtained on the basis of the correlated color temperature is an adjustment value that gives an appropriate color reproduction to a portion where green fog is not generated (in the above example, the main subject in front).

このホワイトバランス調整値を、緑かぶりを補正する色バランス調整値に加重合成することにより、色バランス調整値の本来の値をずらして緑かぶりの補正を弱めている。その結果、緑かぶりの補正によって副次的に生じていたマゼンタかぶりを低減できる。さらに、加重合成値にホワイトバランス調整値が含まれることにより、緑かぶりを生じていない箇所の色再現性を向上させることもできる。   The white balance adjustment value is weighted and synthesized with the color balance adjustment value for correcting the green fog, thereby shifting the original value of the color balance adjustment value to weaken the correction of the green fog. As a result, it is possible to reduce magenta fog that has been generated as a result of correcting the green fog. Furthermore, by including the white balance adjustment value in the weighted composite value, it is possible to improve the color reproducibility of a portion where no green fog is generated.

(請求項3)
請求項3の電子カメラは、上記の加重合成値の算出に当たり、ヒストグラム相関の度合いが低いほど色バランス調整値の加重比率を下げる。
(Claim 3)
In calculating the weighted composite value, the electronic camera of claim 3 decreases the weight ratio of the color balance adjustment value as the degree of histogram correlation is lower.

一般にヒストグラム相関の度合いが低いほど、緑かぶりの発生箇所は狭く限定的であると考えられる。この状況において、色バランス調整値の加重比率を下げることで、緑かぶりの補正を一段と弱め、画面内の広い範囲にわたって生じるマゼンタかぶりを積極的に防止することが可能になる。   In general, the lower the degree of histogram correlation, the narrower and more limited the occurrence of green fog. In this situation, by lowering the weight ratio of the color balance adjustment value, it is possible to further weaken the green fog correction and to actively prevent magenta fog generated over a wide range in the screen.

(請求項4)
請求項4の電子カメラは、蛍光灯の演色性の違い毎に、色バランス調整値の対応データを複数準備する。演色性の低い蛍光灯は緑かぶりが顕著に生じるため、その蛍光灯に合わせた対応データを使用すれば、緑かぶりの補正が強くなる。逆に、演色性の高い蛍光灯は緑かぶりが少ないため、その蛍光灯に合わせた対応データを使用すれば、緑かぶりの補正が弱くなる。
(Claim 4)
The electronic camera of claim 4 prepares a plurality of correspondence data of color balance adjustment values for each color rendering difference of the fluorescent lamp. Since a fluorescent lamp with low color rendering properties has a noticeable green fog, the correction of the green fog is enhanced by using corresponding data that matches the fluorescent lamp. On the other hand, since a fluorescent lamp with high color rendering has little green fog, correction of the green fog is weakened by using corresponding data matched to the fluorescent lamp.

そこで、電子カメラは、ヒストグラム相関の度合いが低いほど、演色性の高い蛍光灯グループの対応データを使用して色バランス調整値を求める。これは、ヒストグラム相関が低く、すなわち緑かぶりの発生箇所が狭いほど、緑かぶりの補正を一段と弱めることに等しい。その結果、画面内の広い範囲にわたって生じるマゼンタかぶりを積極的に防止することが可能になる。   Therefore, the electronic camera obtains the color balance adjustment value using the correspondence data of the fluorescent light group having higher color rendering properties as the degree of histogram correlation is lower. This is equivalent to further weakening the correction of the green fog as the histogram correlation is lower, that is, the portion where the green fog is generated is narrower. As a result, it is possible to positively prevent magenta fog that occurs over a wide range in the screen.

(請求項5)
請求項5の電子カメラは、撮像画像から低彩度領域を抽出し、この低彩度領域の黒体軌跡からの乖離を判定することで、特殊光源による色かぶりを検出する。
さらに、この電子カメラは、撮影画像の照明状態の均一度を判定する。このような判定は、例えば、マルチパターン測光の輝度分布や、撮影画像の複数箇所について平均輝度を比較するといった処理により判定することが好ましい。
(Claim 5)
The electronic camera according to claim 5 detects a color cast by a special light source by extracting a low saturation area from the captured image and determining a deviation of the low saturation area from the black body locus.
Furthermore, this electronic camera determines the uniformity of the illumination state of the captured image. Such a determination is preferably performed by, for example, a process of comparing the luminance distribution of multi-pattern photometry or the average luminance of a plurality of locations of a captured image.

ここで、均一照明であると判断された撮像画像の一部(低彩度領域)から、色かぶりが検出された場合、撮像画像の広範囲にわたって特殊光源による色かぶりが発生していると判断できる。この場合、電子カメラは、撮像画像の黒体軌跡からの乖離を縮める方向に色バランスを調整して、色かぶりを補正する。その結果、画面の広範囲にわたる色かぶりを確実に低減することができる。   Here, when a color cast is detected from a part of the captured image (low saturation region) determined to be uniform illumination, it can be determined that a color cast is generated by a special light source over a wide range of the captured image. . In this case, the electronic camera corrects the color cast by adjusting the color balance in a direction that reduces the deviation from the black body locus of the captured image. As a result, it is possible to reliably reduce the color cast over a wide range of the screen.

一方、不均一照明であると判断された撮像画像の一部(低彩度領域)から、色かぶりが検出された場合、撮像画像の一部に限って特殊光源による色かぶりが発生していると判断できる。この場合、電子カメラは、上述した色かぶりに対する補正を弱めて実施する。その結果、色かぶりの補正によって、新たな色かぶりが生じるといった不具合を解消できる。   On the other hand, when a color cast is detected from a part of the captured image determined to be non-uniform illumination (low saturation area), a color cast by a special light source occurs only in a part of the captured image. It can be judged. In this case, the electronic camera performs the above-described correction for the color cast with weakening. As a result, the problem that a new color cast occurs due to the correction of the color cast can be solved.

(請求項6)
請求項6のプログラムをコンピュータで実行することにより、請求項1ないし請求項5のいずれか1項に記載の電子カメラと同様の色バランス調整を、コンピュータ上で実施することが可能になる。
(Claim 6)
By executing the program according to claim 6 on a computer, the same color balance adjustment as that of the electronic camera according to any one of claims 1 to 5 can be performed on the 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による『記録用撮像素子19で生成される本画像から低彩度領域を抽出し、この低彩度領域の黒体軌跡からの乖離を判定して、特殊光源の色かぶり(例えば蛍光灯の緑かぶり)を検出する機能』に対応する。
請求項記載の均一照明判定部は、マイクロプロセッサ29による『閃光前後の画像データからヒストグラムをそれぞれ求め、両ヒストグラム間の相関を検出することで、照明の均一度を判定する機能』に対応する。
請求項記載の色バランス調整部は、マイクロプロセッサ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 special light source discriminating unit described in the claims is configured to extract a low saturation area from the main image generated by the recording image pickup device 19 by the microprocessor 29 and determine the deviation of the low saturation area from the black body locus. This corresponds to a function for detecting a color cast of a special light source (for example, a green cast of a fluorescent lamp).
The uniform illumination determination unit described in the claims corresponds to “a function for determining the uniformity of illumination by obtaining the histograms from the image data before and after the flash and detecting the correlation between both histograms” by the microprocessor 29.
The color balance adjusting unit described in the claims is “a function for adjusting the color balance of the main image according to the result of the detection of the color cast in the uniformity of the illumination state and the low saturation region” by the microprocessor 29 and the image processing unit 24. Corresponding to

《本実施形態の動作説明》
図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] レリーズ操作の開始前、ミラー15は下降状態にある。そのため、撮影レンズ13を通過した被写体光束は、拡散板16、ファインダー光学系17を介して、測光用撮像素子18の撮像面に被写体像を形成する。
この状態で、マイクロプロセッサ29は、撮像制御部27を用いて測光用撮像素子18に駆動信号を与える。測光用撮像素子18からは、閃光無しで撮像されたテスト画像が出力される。このテスト画像は、A/D変換部20を介して画素単位にデジタル化された後、画像メモリ22に一時蓄積される。
[Step S1] Before starting the release operation, the mirror 15 is in the lowered state. Therefore, the subject luminous flux that has passed through the photographing lens 13 forms a subject image on the imaging surface of the photometric imaging element 18 via the diffusion plate 16 and the finder optical system 17.
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.

[ステップS2] マイクロプロセッサ29は、画像メモリ22内にアクセスして、テスト画像の小領域(例えば画素毎)ごとに輝度成分を求める。
なお、このテスト画像を構成する各色成分を、輝度成分の構成比率(例えばR:G:B=0.29:0.587:0.114等)に従って加重加算して、輝度成分を生成することが好ましい。また、テスト画像中の輝度成分を多く含む色成分(G色成分など)を、そのまま輝度成分とみなしてもよい。
マイクロプロセッサ29は、このように求めたテスト画像の輝度成分を、大まかな輝度範囲に分類して、これら輝度範囲ごとの度数を求める。このようにして、図4に例示するテスト画像のヒストグラム分布Aが得られる。
なお、ヒストグラム分布Aから、予め定められた度数値以下を取り除くことで、ノイズ除去や大面積部分抽出などのデータ加工を行ってもよい。
[Step S2] The microprocessor 29 accesses the image memory 22 and obtains a luminance component for each small region (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.

[ステップS3] マイクロプロセッサ29は、レリーズ釦29aが全押しされたか否かを判断する。
もしも、レリーズ釦29aが全押しされた場合、マイクロプロセッサ29はステップS4に動作を移行する。
一方、レリーズ釦29aが全押し以外(半押しまたは押されていない)の場合、マイクロプロセッサ29は、ステップS1に動作を戻す。
[Step S3] 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 S4.
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 S1.

[ステップS4] マイクロプロセッサ29は、公知の予備発光を次のように実施する。まず、マイクロプロセッサ29は、ミラー15を跳ね上げて、シャッタ19aのシャッタ幕に被写体像を投影する。この状態で、マイクロプロセッサ29は、閃光発光制御部28を用いて、電子閃光装置12に微小な予備発光を実施させる。マイクロプロセッサ29は、シャッタ19aを見込む位置に設けられた測光素子(不図示)を用いて、予備発光時のシャッタ幕の明るさを測定する。マイクロプロセッサ29は、この予備発光時のシャッタ幕の明るさに応じて、本発光の目標光量を決定する。この本発光の目標光量は、電子閃光装置12側に情報伝達される。   [Step S4] 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.

[ステップS5] 続いて、マイクロプロセッサ29は、シャッタ19aの先幕を開き、記録用撮像素子19の撮像面に被写体像を投影開始する。
単発式の本発光を実施する場合、シャッタ19aが全開した時点で、マイクロプロセッサ29は、電子閃光装置12に本発光を開始させる。電子閃光装置12は、この本発光の発光量をモニタし、予め情報伝達された目標光量に到達した時点で、本発光を停止させる。
一方、設定されたシャッタ時間が経過すると、マイクロプロセッサ29は、シャッタ19aの後幕を閉じる。このようにしてシャッタ19aが完全に閉じると、マイクロプロセッサ29は、ミラー15を下に降ろす。
[Step S5] 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 image sensor 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.

[ステップS6] マイクロプロセッサ29は、撮像制御部27を用いて記録用撮像素子19に駆動信号を与える。記録用撮像素子19からは、閃光有りで撮像された本画像が出力される。この本画像は、A/D変換部21を介して画素単位にデジタル化された後、画像メモリ22に一時蓄積される。   [Step S <b> 6] The microprocessor 29 supplies a drive signal to the recording image sensor 19 using the imaging controller 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.

[ステップS7] マイクロプロセッサ29は、画像メモリ22内にアクセスして、本画像から低彩度領域(彩度が所定値以下の領域)を読み出す。マイクロプロセッサ29は、この低彩度領域のRGB色成分について小領域(例えば画素毎)ごとに色度(R/G,B/G)を求め、これら色度の分布中心を求める。続いて、マイクロプロセッサ29は、この分布中心と、色度座標上の黒体軌跡との乖離を判定する。   [Step S7] The microprocessor 29 accesses the image memory 22 and reads out a low saturation area (area where the saturation is equal to or less than a predetermined value) from the main image. The microprocessor 29 obtains the chromaticity (R / G, B / G) for each small region (for example, each pixel) for the RGB color components in the low saturation region, and obtains the distribution center of these chromaticities. Subsequently, the microprocessor 29 determines the difference between the distribution center and the black body locus on the chromaticity coordinates.

[ステップS8] マイクロプロセッサ29は、ステップS7で求めた乖離が閾値を上回るか否かを判別する。この閾値は、乖離の程度が色かぶりとして感知し得るか否かを峻別するための値であり、画像の主観評価実験などから定めることができる。
ここで、乖離が閾値以下の場合、色かぶりを感知できない程度であると判断できる。この場合、マイクロプロセッサ29は、通常の色バランス調整へ動作を移行する。
一方、乖離が閾値を上回る場合、黒体軌跡から離れた波長分布を示す特殊光源(例えば蛍光灯やナトリウム灯など)であると判断し、ステップS9移行の色バランス調整に移行する。
[Step S8] The microprocessor 29 determines whether or not the deviation obtained in step S7 exceeds a threshold value. This threshold value is a value for distinguishing whether or not the degree of divergence can be perceived as a color cast, and can be determined from an image subjective evaluation experiment or the like.
Here, when the deviation is equal to or less than the threshold value, it can be determined that the color cast cannot be detected. In this case, the microprocessor 29 shifts the operation to normal color balance adjustment.
On the other hand, when the deviation exceeds the threshold, it is determined that the light source is a special light source (for example, a fluorescent lamp or a sodium lamp) that shows a wavelength distribution away from the black body locus, and the process shifts to the color balance adjustment of step S9.

[ステップS9] マイクロプロセッサ29は、黒体軌跡からの乖離を短縮する方向に色成分の調整ゲインを設定することにより、低彩度領域を無彩色に近づける色バランス調整値を一旦求める。
例えば、蛍光灯の緑かぶりの場合、黒体軌跡から緑寄りの乖離を短縮するため、赤青成分を相対的に大きくする調整ゲインを設定して、色バランス調整値とする。
[Step S <b> 9] The microprocessor 29 sets a color component adjustment gain in a direction that shortens the deviation from the black body locus, thereby obtaining a color balance adjustment value that brings the low saturation region closer to an achromatic color.
For example, in the case of a green fog of a fluorescent lamp, an adjustment gain that relatively increases the red-blue component is set to obtain a color balance adjustment value in order to shorten the deviation from the black body locus toward the green.

[ステップS10] マイクロプロセッサ29は、画像メモリ22内にアクセスして、本画像を読み出し、テスト画像との比較に適した処理画像を作成する。
この処理画像の作成に際しては、下記のような撮像素子の差を抑制する画像処理を施すことが好ましい。
[Step S10] 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 that suppresses the difference between the imaging elements 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) The maximum gradation value, average gradation value, and most frequent gradation value of the main image according to the maximum gradation value, average gradation value, most frequent gradation value, and minimum gradation value of the test image. , And the process of normalizing and matching the minimum gradation value.
(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.

[ステップS11] マイクロプロセッサ29は、本画像から作成した処理画像の輝度成分を、テスト画像と同様にヒストグラム解析し、図4に例示するようなヒストグラム分布Bを作成する。
なお、このヒストグラム分布Bから、予め定められた度数値以下を取り除くことで、ノイズ除去や大面積部分抽出などのデータ加工を行ってもよい。
[Step S11] The microprocessor 29 performs histogram analysis on 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.

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

Figure 0004461892
ただし、NiとMiは、同一の輝度範囲iにおけるヒストグラム分布A,Bの度数値である。
また例えば、ヒストグラム分布A,Bの分布形状をパターンマッチングして、両者間の類似度からヒストグラム相関を検出してもよい。
また例えば、ヒストグラム分布A、Bのピーク数、ピークの間隔、複数のピークの大小関係、またはピーク形状などについて一致度を判定することにより、ヒストグラム相関を簡易に求めてもよい。
このヒストグラム相関の高低から、次のような判断が可能になる。 [Step S12] The microprocessor 29 compares the distribution shapes of the two histogram distributions A and B, and obtains a histogram correlation between them.
For example, the Euclidean distance D between the histogram distributions A and B may be calculated according to the following equation, and the histogram correlation between them may be obtained. In this case, it can be determined that the smaller the Euclidean distance D is, the higher the degree of histogram correlation is.
Figure 0004461892
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 histogram correlation may be detected from the similarity between the two.
Further, for example, the histogram correlation may be easily 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.
From the level of the histogram correlation, the following determination is possible.

(ヒストグラム相関が高いケース)
まず、ヒストグラム相関が高い場合、閃光発光が一様に届く被写体配置であるか、あるいは閃光発光が届かない一様に遠い被写体配置のいずれかである。これらの被写体配置では、照明光のムラは少なく、照明の均一度が高いと判断できる。
一方、ステップS8では、画面内の低彩度領域において色かぶりを既に検出している。これらのことから、特殊光源による色かぶりも均一度が高く、画面の広範囲に発生していると判断できる。
(When histogram correlation is high)
First, when the histogram correlation is high, either the subject arrangement where the flash emission reaches uniformly or the subject arrangement where the flash emission does not reach uniformly is far away. With these subject arrangements, it can be determined that there is little unevenness in the illumination light and the illumination uniformity is high.
On the other hand, in step S8, the color cast has already been detected in the low saturation area in the screen. From these facts, it can be determined that the color cast by the special light source is also highly uniform and occurs over a wide range of the screen.

(ヒストグラム相関が低いケース)
また逆に、ヒストグラム相関が低い場合、閃光発光の届き方にムラが生じるような被写体配置であり、閃光発光の前後で輝度分布が大きく変化したと判断できる。例えば、閃光発光に強く照らされる手前被写体と、閃光発光が届きにくい遠方の被写体が一画面内に混在するなどの状況である。このような被写体配置では、特定の照明光(太陽、街灯、閃光発光、蛍光灯など)の届き方が画面全体に一様とならず、照明の均一度が低いと判断できる。
一方、ステップS8では、画面内の低彩度領域において色かぶりを既に検出している。これらのことから、特殊光源による色かぶりは不均一であって、画面の一部に限って発生していると判断できる。
(When histogram correlation is low)
On the contrary, when the histogram correlation is low, it is determined that the subject arrangement is such that unevenness is caused in the way the flash emission reaches, and it can be determined that the luminance distribution has greatly changed before and after the flash emission. For example, there is a situation in which a near subject that is strongly illuminated by flash emission and a distant subject that is difficult to reach flash emission are mixed in one screen. In such a subject arrangement, it can be determined that the way the specific illumination light (sun, street lamp, flash emission, fluorescent lamp, etc.) reaches does not become uniform over the entire screen, and the illumination uniformity is low.
On the other hand, in step S8, the color cast has already been detected in the low saturation area in the screen. From these facts, it can be determined that the color cast by the special light source is uneven and occurs only in a part of the screen.

[ステップS13] マイクロプロセッサ29は、求めたヒストグラム相関の度合いが低いほど、色かぶりの補正を弱める方向に色バランス調整値を変更する。例えば、緑かぶりの補正の場合には、ヒストグラム相関の度合いが低い場合、赤青成分の調整ゲインを若干下げることで、緑かぶりの補正を弱める。
以下、この色かぶり補正を弱める方策について具体的に説明する。
[Step S13] The microprocessor 29 changes the color balance adjustment value in such a direction that the correction of the color cast is weakened as the degree of the obtained histogram correlation is lower. For example, in the case of green fog correction, if the degree of histogram correlation is low, the green fog correction is weakened by slightly reducing the adjustment gain of the red-blue component.
Hereinafter, a measure for weakening the color cast correction will be described in detail.

(色かぶり補正の加減法その1)
マイクロプロセッサ29は、ステップS7で求めた低彩度領域の色度の分布中心を、黒体軌跡上に写像することにより、相関色温度を求める。この相関色温度は、黒体軌跡上の色温度であり、乖離方向の色かぶりを無視した色温度である。マイクロプロセッサ29は、この相関色温度を標準色温度に変換するホワイトバランス調整値を求める。マイクロプロセッサ29は、このホワイトバランス調整値と、先に求めた色バランス調整値(ステップS9参照)とを加重合成する。この加重合成によって、色バランス調整値の色かぶり補正を弱めることができる。その結果、色かぶり補正による新たな色かぶり(マゼンタかぶりなど)を抑えることができる。さらに、この加重合成値には、ホワイトバランス調整値が加味される。そのため、色かぶりの生じていない領域(閃光照明に照らされている手前の被写体など)の色温度を標準色温度に近づけて、本画像の色再現性を高めることができる。
(Color fog correction adjustment method 1)
The microprocessor 29 obtains the correlated color temperature by mapping the distribution center of the chromaticity in the low saturation area obtained in step S7 on the black body locus. This correlated color temperature is a color temperature on a black body locus, and is a color temperature ignoring a color cast in the direction of deviation. The microprocessor 29 obtains a white balance adjustment value for converting the correlated color temperature into the standard color temperature. The microprocessor 29 weights and synthesizes the white balance adjustment value and the previously obtained color balance adjustment value (see step S9). By this weighted synthesis, the color cast correction of the color balance adjustment value can be weakened. As a result, it is possible to suppress a new color cast (such as magenta fog) due to the color cast correction. Further, a white balance adjustment value is added to the weighted composite value. Therefore, the color temperature of an area where no color cast is generated (such as the subject in front of the flash illumination) can be brought close to the standard color temperature, and the color reproducibility of the main image can be improved.

(色かぶり補正の加減法その2)
マイクロプロセッサ29は、上述した『加減法その1』と同様に、『相関色温度を基準にホワイトバランス調整値』と『色かぶりを補正する色バランス調整値』とを加重合成する。マイクロプロセッサ29は、この加重合成の比率を、ステップS12で求めたヒストグラム相関に応じて変更する。すなわち、ヒストグラム相関の度合いが低いほど色バランス調整値の加重比率を下げる。その結果、ヒストグラム相関の度合いが低くて、画面内の色かぶりが不均一すなわち局所的な状況ほど、色かぶり補正を弱めることで、色かぶり補正による新たな色かぶり発生を強く抑えることができる。また逆に、ヒストグラム相関の度合いが高いほど色バランス調整値の加重比率を上げる。その結果、ヒストグラム相関の度合いが高くて、画面内の色かぶりが均一すなわち広範囲に発生している状況ほど、色かぶり補正を強めることで、画面の広範囲に生じる色かぶりを適切に除去することが可能になる。
(Color fog correction adjustment method 2)
The microprocessor 29 weights and synthesizes the “white balance adjustment value based on the correlated color temperature” and the “color balance adjustment value for correcting the color cast” in the same manner as the “adjustment method 1” described above. The microprocessor 29 changes the ratio of the weighted synthesis according to the histogram correlation obtained in step S12. That is, the weight ratio of the color balance adjustment value is lowered as the degree of histogram correlation is lower. As a result, when the degree of histogram correlation is low and the color cast in the screen is non-uniform, that is, in a local situation, the color cast correction is weakened, so that new color cast generation due to the color cast correction can be strongly suppressed. Conversely, the higher the degree of histogram correlation, the higher the weight ratio of the color balance adjustment value. As a result, when the degree of histogram correlation is high and the color cast in the screen is uniform, that is, in a wide range, it is possible to appropriately remove the color cast that occurs in the wide range of the screen by strengthening the color cast correction. It becomes possible.

(色かぶり補正の加減法その3)
例えば、蛍光灯は、演色性の高いものから低いものまで、複数のグループに分けられる。
マイクロプロセッサ29は、これら演色性のグループごとに『ステップS7で求めた色度の分布中心と緑かぶりを補正する色バランス調整値との対応データ』を記憶する。例えば、これらの対応データは、演色性のグループごとに、本画像の色バランス調整の主観評価実験を繰り返して定めることができる。この場合、演色性の低いグループの対応データを使用するほど、緑かぶりを強めに除去することになる。一方、演色性の高いグループの対応データを使用するほど、緑かぶりを弱めに除去することになる。そこで、ヒストグラム相関の度合いが低いほど、マイクロプロセッサ29は、演色性の高い対応データを使用して、色バランス調整値を決定する。その結果、ヒストグラム相関の度合いが低くて、画面内の色かぶりが不均一すなわち局所的な状況ほど、色かぶり補正を弱めて、色かぶり補正による新たな色かぶり発生を強く抑えることができる。
(Color fog correction adjustment method 3)
For example, fluorescent lamps are divided into a plurality of groups from those having high color rendering properties to those having low color rendering properties.
The microprocessor 29 stores “correspondence data between the distribution center of the chromaticity obtained in step S7 and the color balance adjustment value for correcting the green fog” for each color rendering group. For example, the correspondence data can be determined by repeating a subjective evaluation experiment of color balance adjustment of the main image for each color rendering group. In this case, the green fog is removed more strongly as the correspondence data of the group having lower color rendering properties is used. On the other hand, the more the corresponding data of the group having higher color rendering properties is used, the more the green fog is removed. Therefore, as the degree of histogram correlation is lower, the microprocessor 29 uses the corresponding data having higher color rendering properties to determine the color balance adjustment value. As a result, when the degree of histogram correlation is low and the color cast in the screen is non-uniform, that is, in a local situation, the color cast correction can be weakened and the occurrence of a new color cast due to the color cast correction can be strongly suppressed.

[ステップS14] マイクロプロセッサ29は、ステップS13で加減された色かぶり補正の調整値に従って、本画像の色バランス調整を実施する。   [Step S14] The microprocessor 29 adjusts the color balance of the main image in accordance with the adjustment value of the color fog correction adjusted in step S13.

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

《本実施形態の効果など》
以上説明したように、本実施形態では、照明状態の均一性判断と、低彩度領域の色かぶり検出とを組み合わせることにより、色かぶりが画面の広範囲に発生しているのか、あるいは色かぶりが画面の狭い範囲に限って発生しているのかを判別できる。
<< Effects of this embodiment >>
As described above, in the present embodiment, by combining the uniformity determination of the illumination state and the color cast detection in the low saturation region, the color cast is generated over a wide range of the screen, or the color cast is generated. It can be discriminated whether it occurs only in a narrow area of the screen.

さらに、本実施形態では、このように判別される色かぶりの広がり具合に応じて、色かぶり補正の強弱を変更するので、補正処理後に新たな色かぶりを発生するといった不具合を適切に防止できる。   Furthermore, in this embodiment, since the intensity of color fog correction is changed according to the extent of color fog determined in this way, it is possible to appropriately prevent problems such as the occurrence of a new color fog after the correction process.

また、本実施形態では、閃光無しのテスト画像と、閃光有りの本画像とについてヒストグラム分布をとる。このヒストグラム分布は、テスト画像と本画像との間の時間差によって絵柄がある程度変化しても、この影響を殆ど受けずに、照明状態の均一性を的確に判断できる。   In the present embodiment, histogram distributions are taken for the test image without flash and the main image with flash. Even if the pattern changes to some extent due to the time difference between the test image and the main image, the histogram distribution can accurately determine the uniformity of the illumination state with almost no influence.

さらに、本実施形態では、分割測光用途の測光用撮像素子18を用いて、テスト画像を撮像している。この測光用撮像素子18は、記録用撮像素子19に比べて画素数が少ないため、テスト画像の撮像および画像処理(ヒストグラム作成など)にかかる時間は短くて済む。その結果、上述した色バランス調整値の決定動作を加味しても処理負担の増加は少なく、電子カメラ11の撮像動作の軽快さを失うことがない。   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 operation for determining the color balance adjustment value is taken into account, the increase in processing load is small, and the lightness of the imaging operation of the electronic camera 11 is not lost.

特に、本実施形態では、ステップS10では、テスト画像と本画像とを比較に適するように処理している。その結果、異なる撮像素子18,19を使用するにも拘わらず、良好な比較が可能となり、照明状態の均一性を一段と正確に判定することができる。   In particular, in this embodiment, in step S10, the test image and the main image are processed so as to be suitable for comparison. As a result, despite the use of different image sensors 18 and 19, good comparison is possible, and the uniformity of the illumination state can be determined more accurately.

さらに、本実施形態では、ヒストグラム分布A,Bから、予め定められた度数値以下を切り捨てた上で、2つのヒストグラム分布A,Bを比較する。このような切り捨て処理により、ノイズの影響を低減することが可能となり、照明状態の均一さを一段と正確に判定することができる。また、画面内の特に高頻度な度数値のみを残すように、小程度の度数値以下をヒストグラム分布から切り捨てることもできる。この場合、画面内で目立つ高頻度部分のみに限って、照明状態の均一さを判定することができる。その結果、視覚的に目立つ高頻度部分に的を絞った色バランス調整が実現する。   Further, in the present embodiment, the histogram distributions A and B are compared with each other after the predetermined frequency values are rounded down from the histogram distributions A and B. Such truncation processing makes it possible to reduce the influence of noise, and to determine the uniformity of the illumination state 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 illumination state only in the high-frequency part that stands out in the screen. As a result, it is possible to achieve color balance adjustment focused on a visually noticeable high-frequency portion.

《実施形態の補足事項》
なお、上述した実施形態では、一眼式の電子カメラ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 color 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 color balance adjustment value of the present invention may be determined for each area. In this case, it is possible to determine the uniformity of the illumination state for each region, and determine an appropriate color balance adjustment value for each region according to the uniformity determination.

なお、上述した実施形態では、内蔵タイプの電子閃光装置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に示した処理の一部または全部を実施するプログラムを作成してもよい。このプログラムを外部のコンピュータ上で実行することにより、上述した画像処理をコンピュータ上で実施することが可能になる。   Further, in the above-described embodiment, the case where the color balance adjustment is performed 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 shown in FIG. 3 may be created. By executing this program on an external computer, the above-described image processing can be performed on the computer.

なお、閃光撮影時に不均一照明となるのは、手前の主要被写体が明るく、遠い背景が暗くなるといったケースが多い。したがって、閃光撮影された画像の明暗差(例えば、輝度分布の標準偏差)が大きいほど、照明状態が不均一であると判断してもよい。   Note that non-uniform illumination during flash photography is often the case where the main subject in front is bright and the distant background is dark. Therefore, it may be determined that the illumination state is more uneven as the light / dark difference (for example, the standard deviation of the luminance distribution) of the flash image is larger.

特に、閃光に対して周辺環境光の割合が低いほど、顕著な不均一照明となる。そこで、輝度分布の標準偏差を輝度で割った値を、照明の不均一度の指標とすることが好ましい。この指標では、画像の明暗差(輝度分布の標準偏差)が等しくても、周辺環境光が明るいほど不均一度は低くなる。すなわち、日中シンクロのように周辺環境光が被写体によく当たって輝度が平均して高い場合には、不均一度は低い値となる。逆に、暗闇での閃光撮影のように輝度が平均して低くなる場合には、不均一度が高い値となる。
これらの照明の均一判定と、色かぶりの検出結果からも、画面内における色かぶりの広がり具合を判定することが可能である。
In particular, the lower the ratio of ambient ambient light to flashlight, the more pronounced non-uniform illumination. Therefore, a value obtained by dividing the standard deviation of the luminance distribution by the luminance is preferably used as an indicator of the nonuniformity of illumination. With this index, even if the image brightness difference (standard deviation of the luminance distribution) is the same, the non-uniformity becomes lower as the ambient environment light becomes brighter. That is, when the ambient light hits the subject well and the luminance is high on average, such as during daytime synchronization, the non-uniformity is a low value. On the other hand, when the luminance is low on average as in flash photography in the dark, the non-uniformity is a high value.
It is possible to determine the extent of color fogging in the screen from these illumination uniformity determinations and color fog detection results.

以上説明したように、本発明は、電子カメラや画像処理プログラムなどに利用可能な技術である。   As described above, the present invention is a technique that can be used for an electronic camera, an image processing program, and the like.

本実施形態における電子カメラ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.

符号の説明Explanation of symbols

11 電子カメラ
12 電子閃光装置
13 撮影レンズ
16 拡散板
17 ファインダー光学系
18 測光用撮像素子
19 記録用撮像素子
19a シャッタ
22 画像メモリ
23 バス
24 画像処理部
25 圧縮記録部
26 メモリカード
27 撮像制御部
28 閃光発光制御部
29 マイクロプロセッサ
29a レリーズ釦
DESCRIPTION OF SYMBOLS 11 Electronic camera 12 Electronic flash device 13 Shooting lens 16 Diffuser 17 Finder optical system 18 Photometric image sensor 19 Recording image sensor 19a Shutter 22 Image memory 23 Bus 24 Image processing unit 25 Compression recording unit 26 Memory card 27 Imaging control unit 28 Flash light emission control unit 29 Microprocessor 29a Release button

Claims (6)

被写体像を撮像する撮像部と、
前記撮像部を制御して、閃光無しで撮像するテスト画像と、閃光発光を実施して撮像する本画像とを生成する撮像制御部と、
前記本画像の低彩度領域について黒体軌跡からの乖離を判定して、蛍光灯照明による緑かぶりを検出する特殊光源判別部と、
前記テスト画像および前記本画像についてそれぞれヒストグラム分布を求め、両ヒストグラム分布の相関を検出することにより、照明状態の均一度を判定する均一照明判定部と、
前記ヒストグラム相関が高く、かつ前記低彩度領域に前記緑かぶりを検出した場合には、蛍光灯照明は均一であると判定して、前記本画像の赤青成分を緑成分より相対的に上げて前記緑かぶりを補正し、
一方、前記ヒストグラム相関が低く、かつ前記低彩度領域に前記緑かぶりを検出した場合には、蛍光灯照明は不均一であると判定し、前記緑かぶりの補正を弱める色バランス調整部と
を備えたことを特徴とする電子カメラ。
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 by flashing;
A special light source discriminating unit for determining a deviation from a black body locus for the low saturation region of the main image and detecting a green fog caused by fluorescent lamp illumination; and
A uniform illumination determination unit that determines the uniformity of the illumination state by obtaining a histogram distribution for each of the test image and the main image, and detecting a correlation between both histogram distributions;
When the histogram correlation is high and the green fog is detected in the low saturation area, it is determined that the fluorescent lamp illumination is uniform, and the red-blue component of the main image is relatively higher than the green component. To correct the green fog,
On the other hand, when the histogram correlation is low and the green fog is detected in the low saturation area, it is determined that the fluorescent lamp illumination is non-uniform, and the color balance adjustment unit weakens the correction of the green fog. An electronic camera characterized by comprising.
請求項1に記載の電子カメラにおいて、
前記色バランス調整部は、
前記ヒストグラム相関が低く、かつ前記緑かぶりを検出した場合に、
前記本画像の相関色温度(黒体軌跡上に写像して得た色温度)を基準に決定されるホワイトバランス調整値と、前記緑かぶりを補正する色バランス調整値との加重合成値を求め、前記加重合成値を用いて前記本画像の色バランスを調整する
ことを特徴とする電子カメラ。
The electronic camera according to claim 1,
The color balance adjustment unit
When the histogram correlation is low and the green fog is detected,
A weighted composite value of a white balance adjustment value determined based on a correlated color temperature (color temperature obtained by mapping on a black body locus) of the main image and a color balance adjustment value for correcting the green fog is obtained. An electronic camera that adjusts the color balance of the main image using the weighted composite value.
請求項2に記載の電子カメラにおいて、
前記加重合成値の算出に当たり、前記ヒストグラム相関が低いほど前記色バランス調整値の加重比率を下げる
ことを特徴とする電子カメラ。
The electronic camera according to claim 2,
In calculating the weighted composite value, the weight ratio of the color balance adjustment value is lowered as the histogram correlation is lower.
請求項1ないし請求項3のいずれか1項に記載の電子カメラにおいて、
前記色バランス調整部は、
予め定められた『前記低彩度領域の色と色バランス調整値との対応データ』を蛍光灯の演色性の違いごとに複数用意し、前記ヒストグラム相関の度合いが低いほど、演色性の高い前記対応データを使用して色バランス調整値を求め、前記色バランス調整値に基づいて前記本画像の色バランスを調整する
ことを特徴とする電子カメラ。
The electronic camera according to any one of claims 1 to 3,
The color balance adjustment unit
Prepare a plurality of predetermined "correspondence data between the color of the low saturation region and the color balance adjustment value" for each color rendering difference of the fluorescent lamp, and the lower the degree of histogram correlation, the higher the color rendering property An electronic camera characterized by obtaining a color balance adjustment value using correspondence data and adjusting the color balance of the main image based on the color balance adjustment value.
被写体像を撮像して撮像画像を生成する撮像部と、
前記撮像画像の低彩度領域について黒体軌跡からの乖離を判定して、特殊光源による色かぶりを検出する特殊光源判別部と、
前記撮像画像の照明状態の均一度を判定する均一照明判定部と、
前記照明状態が均一照明と判定され、かつ前記低彩度領域に色かぶりを検出した場合、前記撮像画像の前記黒体軌跡からの乖離を縮める方向に、前記色かぶりを補正し、
前記照明状態が不均一照明と判定され、かつ前記低彩度領域に色かぶりを検出した場合、前記色かぶりの補正を弱める色バランス調整部と
を備えたことを特徴とする電子カメラ。
An imaging unit that captures a subject image and generates a captured image;
A special light source discriminating unit for detecting a color cast by a special light source by determining a deviation from a black body locus for a low saturation region of the captured image;
A uniform illumination determination unit for determining the uniformity of the illumination state of the captured image;
When the illumination state is determined to be uniform illumination and a color cast is detected in the low saturation region, the color cast is corrected in a direction to reduce the deviation from the black body locus of the captured image,
An electronic camera comprising: a color balance adjustment unit that weakens correction of the color cast when the illumination state is determined to be non-uniform illumination and color cast is detected in the low saturation region.
コンピュータを、請求項1ないし請求項5のいずれか1項に記載の前記特殊光源判別部、前記均一照明判定部、および前記色バランス調整部として機能させるためのプログラム。   A program for causing a computer to function as the special light source determination unit, the uniform illumination determination unit, and the color balance adjustment unit according to any one of claims 1 to 5.
JP2004128721A 2003-12-08 2004-04-23 Electronic camera having color cast adjustment function by special light source, and program Expired - Fee Related JP4461892B2 (en)

Priority Applications (3)

Application Number Priority Date Filing Date Title
JP2004128721A JP4461892B2 (en) 2004-04-23 2004-04-23 Electronic camera having color cast adjustment function by special light source, 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
JP2004128721A JP4461892B2 (en) 2004-04-23 2004-04-23 Electronic camera having color cast adjustment function by special light source, and program

Publications (2)

Publication Number Publication Date
JP2005311892A JP2005311892A (en) 2005-11-04
JP4461892B2 true JP4461892B2 (en) 2010-05-12

Family

ID=35440111

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2004128721A Expired - Fee Related JP4461892B2 (en) 2003-12-08 2004-04-23 Electronic camera having color cast adjustment function by special light source, and program

Country Status (1)

Country Link
JP (1) JP4461892B2 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008122534A (en) * 2006-11-09 2008-05-29 Canon Inc Imaging apparatus, control method and program therefor
KR101072945B1 (en) 2009-11-17 2011-10-17 한국과학기술원 Apparatus for balancing flashed image color using depth estimation and method therefor
KR101317552B1 (en) * 2010-11-04 2013-10-16 가시오게산키 가부시키가이샤 Image capturing apparatus, method and storage medium capable of adjusting white balance

Also Published As

Publication number Publication date
JP2005311892A (en) 2005-11-04

Similar Documents

Publication Publication Date Title
US7423674B2 (en) Electronic camera having color adjustment function and program therefor
US11503219B2 (en) Image processing apparatus, image capture apparatus, and control method for adding an effect of a virtual light source to a subject
US7027662B2 (en) Method and apparatus for the removal of flash artifacts
US8004599B2 (en) Automatic focus adjusting apparatus and automatic focus adjusting method, and image pickup apparatus and image pickup method
JP2002374539A (en) Camera capable of correcting white balance
US9497433B2 (en) Imaging device with color adjustment function, imaging method using the same, and non-transitory storage medium in which imaging program is stored
US20050122409A1 (en) Electronic camera having color adjustment function and program therefor
US8285133B2 (en) Dynamic lighting control in hybrid camera-projector device
US11115637B2 (en) Image processing apparatus, image capturing apparatus, image processing method, and storage medium
JP4269421B2 (en) Electronic camera
JP2003234955A (en) Image processing device, image processing program, and image processing method
JP2003234950A (en) Image processing device, image processing program, and image processing method
JP4029206B2 (en) Imaging device
JP4461892B2 (en) Electronic camera having color cast adjustment function by special light source, and program
JP4412109B2 (en) Electronic camera having color balance adjustment function and program
JP2009063674A (en) Imaging apparatus and flash control method
KR100978675B1 (en) Method of controlling white balance at flashlight photographing
JP4385749B2 (en) Electronic camera having white balance adjustment function and program
JP5732799B2 (en) Image processing apparatus, imaging apparatus, and image processing program
JP4231599B2 (en) Imaging device
JP2004173251A (en) Camera
JP2013132065A (en) Imaging apparatus and flash control method
EP2461574A9 (en) Dynamic lighting control in hybrid camera-projector device
JP2020101624A (en) Imaging apparatus, electronic apparatus, and control method and program of imaging apparatus
JP5055569B2 (en) Color imaging apparatus and image processing program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20070409

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20100119

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

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

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

Free format text: PAYMENT UNTIL: 20130226

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

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

Free format text: PAYMENT UNTIL: 20130226

Year of fee payment: 3

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

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

Free format text: PAYMENT UNTIL: 20130226

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20140226

Year of fee payment: 4

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