JP5659574B2 - Image processing apparatus, imaging apparatus, and image processing program - Google Patents
Image processing apparatus, imaging apparatus, and image processing program Download PDFInfo
- Publication number
- JP5659574B2 JP5659574B2 JP2010140215A JP2010140215A JP5659574B2 JP 5659574 B2 JP5659574 B2 JP 5659574B2 JP 2010140215 A JP2010140215 A JP 2010140215A JP 2010140215 A JP2010140215 A JP 2010140215A JP 5659574 B2 JP5659574 B2 JP 5659574B2
- Authority
- JP
- Japan
- Prior art keywords
- color
- image
- white balance
- image processing
- frequency
- 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
Links
- 238000012545 processing Methods 0.000 title claims description 61
- 238000003384 imaging method Methods 0.000 title claims description 19
- 238000004364 calculation method Methods 0.000 claims description 40
- 238000000034 method Methods 0.000 claims description 32
- 238000009499 grossing Methods 0.000 claims description 5
- 238000010187 selection method Methods 0.000 claims description 2
- 238000005286 illumination Methods 0.000 description 20
- 238000007906 compression Methods 0.000 description 7
- 230000006835 compression Effects 0.000 description 7
- 230000006837 decompression Effects 0.000 description 7
- 230000003595 spectral effect Effects 0.000 description 6
- 238000011161 development Methods 0.000 description 5
- 238000011156 evaluation Methods 0.000 description 5
- 238000009825 accumulation Methods 0.000 description 4
- 238000006243 chemical reaction Methods 0.000 description 4
- 238000012937 correction Methods 0.000 description 3
- 238000013144 data compression Methods 0.000 description 3
- 238000010586 diagram Methods 0.000 description 3
- 210000003127 knee Anatomy 0.000 description 3
- 238000002834 transmittance Methods 0.000 description 3
- 239000003086 colorant Substances 0.000 description 2
- 238000004891 communication Methods 0.000 description 2
- 238000012790 confirmation Methods 0.000 description 2
- 239000000284 extract Substances 0.000 description 2
- 230000006870 function Effects 0.000 description 2
- 230000002411 adverse Effects 0.000 description 1
- 238000004590 computer program Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000000605 extraction Methods 0.000 description 1
- 238000013507 mapping Methods 0.000 description 1
- 239000000203 mixture Substances 0.000 description 1
- 239000013589 supplement Substances 0.000 description 1
Images
Landscapes
- Color Television Image Signal Generators (AREA)
- Processing Of Color Television Signals (AREA)
Description
本発明は、画像処理装置、撮像装置、及び画像処理プログラムに関する。 The present invention relates to an image processing device, an imaging device, and an image processing program.
カメラのホワイトバランス調整機能の1つに、ユーザが無彩色物体の画像として指定した画像の色に基づきホワイトバランスゲインを予め設定(プリセット)する機能があるが、プリセット後に被写界の照明色が変化した場合には、プリセットされたホワイトバランスゲインが不適切になるので、再設定の必要が生じる。このため、特許文献1のカメラは、プリセットされたホワイトバランスゲインを、オートホワイトバランス演算の結果に基づき自動調節している。
One of the camera white balance adjustment functions is a function for presetting (presetting) the white balance gain based on the color of the image specified by the user as an achromatic object image. If it has changed, the preset white balance gain becomes inadequate, and it becomes necessary to reset it. For this reason, the camera of
ところで、プリセットされたホワイトバランスゲインが不適切になるのは、照明色が変化した場合に限られない。例えば、カメラの撮影条件が変化し、撮影レンズの分光透過率、被写体の分光反射率、撮像素子の設定値、信号処理回路の設定値などが変化した場合にも、画像のカラーバランスは微妙に変化するので、プリセットされたホワイトバランスゲインが不適切となり得る。 By the way, the reason why the preset white balance gain becomes inappropriate is not limited to the case where the illumination color changes. For example, when the camera shooting conditions change and the spectral transmittance of the shooting lens, the spectral reflectance of the subject, the setting value of the image sensor, the setting value of the signal processing circuit, etc., the color balance of the image is subtly Since it changes, the preset white balance gain can be inappropriate.
しかしながら、従来の一般的なオートホワイトバランス演算は、被写界内の物体が本来的に有する色の影響を受け易いため、画像のカラーバランスに生じる微妙な変化にまでは対応できない虞があった。 However, since the conventional general auto white balance calculation is easily influenced by the color inherent in the object in the object field, there is a possibility that it cannot cope with the subtle changes that occur in the color balance of the image. .
そこで本発明は、画像のカラーバランスに生じる微妙な変化にも対応可能な画像処理装置、撮像装置、画像処理プログラムを提供することを目的とする。 SUMMARY An advantage of some aspects of the invention is that it provides an image processing apparatus, an imaging apparatus, and an image processing program that can cope with subtle changes in image color balance.
本発明の画像処理装置は、予め指定された色である指定色の情報を記憶する記憶手段と、ホワイトバランス調整の対象となるカラー画像から、前記指定色の近傍の所定色範囲に属する画素群を選出する選出手段と、選出された前記画素群の色座標上の頻度分布を算出する分布算出手段と、算出された前記頻度分布に基づき、前記カラー画像へ適用すべきホワイトバランス調整量を算出する調整量算出手段とを備え、前記調整量算出手段は、前記ホワイトバランス調整量の算出に先立ち、前記頻度分布に含まれる各色の頻度に対して前記指定色に近い色の頻度ほど大きな重みで重み付けする。 The image processing apparatus according to the present invention includes a storage unit that stores information on a designated color that is a color designated in advance, and a pixel group that belongs to a predetermined color range in the vicinity of the designated color from a color image that is a target of white balance adjustment. A selection means for selecting a color distribution; a distribution calculation means for calculating a frequency distribution on the color coordinates of the selected pixel group; and a white balance adjustment amount to be applied to the color image based on the calculated frequency distribution Adjustment amount calculating means, and prior to the calculation of the white balance adjustment amount, the adjustment amount calculating means gives a greater weight to the frequency of each color included in the frequency distribution as the color frequency is closer to the specified color. Weight.
本発明の撮像装置は、カラー画像を取得する撮像素子と、取得された前記カラー画像に適用すべきホワイトバランス調整量を算出する本発明の画像処理装置とを備える。 An imaging apparatus according to the present invention includes an imaging element that acquires a color image, and an image processing apparatus according to the present invention that calculates a white balance adjustment amount to be applied to the acquired color image.
本発明の画像処理プログラムは、予め指定された色である指定色の情報を記憶する記憶手順と、ホワイトバランス調整の対象となるカラー画像から、前記指定色の近傍の所定色範囲に属する画素群を選出する選出手順と、選出された前記画素群の色座標上の頻度分布を算出する分布算出手順と、前記頻度分布に含まれる各色の頻度に対して前記指定色に近い色の頻度ほど大きな重みで重み付けをし、算出された前記頻度分布に基づき、前記カラー画像へ適用すべきホワイトバランス調整量を算出する調整量算出手順とをコンピュータに実行させる。 An image processing program according to the present invention includes a storage procedure for storing information on a designated color, which is a color designated in advance, and a pixel group belonging to a predetermined color range in the vicinity of the designated color from a color image to be subjected to white balance adjustment. A selection procedure for selecting a color, a distribution calculation procedure for calculating a frequency distribution on the color coordinates of the selected pixel group, and a frequency of a color close to the specified color with respect to the frequency of each color included in the frequency distribution weighted by the weight, based on the frequency distribution issued calculated, to execute the adjustment amount calculation step of calculating the white balance adjusting amount to be applied to the color image on a computer.
本発明によれば、画像のカラーバランスに生じる微妙な変化にも対応可能な画像処理装置、撮像装置、画像処理プログラムが実現する。 According to the present invention, an image processing apparatus, an imaging apparatus, and an image processing program that can cope with subtle changes in the color balance of an image are realized.
[実施形態]
以下、本発明の実施形態として電子カメラを説明する。
[Embodiment]
Hereinafter, an electronic camera will be described as an embodiment of the present invention.
図1は、電子カメラの構成図である。図1に示すとおり電子カメラ1には、撮像素子11、信号処理回路12、バッファメモリ13、画像処理回路14、ホワイトバランス演算回路15、表示制御回路16、内部モニタ17、圧縮・伸張回路18、カードインタフェース19、CPU21、撮像回路22、入力器23、外部接続端子24などが備えられる。このうちバッファメモリ13、画像処理回路14、ホワイトバランス演算回路15、表示制御回路16、圧縮・伸張回路18、カードインタフェース19、CPU21は、共通のバスに接続されている。
FIG. 1 is a configuration diagram of an electronic camera. As shown in FIG. 1, the
撮像素子11は、撮影レンズ2が形成した被写界像を撮像するカラー撮像素子であって、例えばベイヤ配列のカラーフィルタを有した単板式カラー撮像素子である。
The image pickup device 11 is a color image pickup device that picks up an object scene image formed by the taking
信号処理回路12は、撮像素子11が撮像で取得したアナログ画像信号に対してアナログ信号処理及びA/D変換処理を順次に施し、ディジタル画像信号に変換する。
The
バッファメモリ13は、信号処理回路12から出力されるディジタル画像信号を順次に蓄積する。撮像素子11の1フレーム分の電荷読み出し期間に亘ってこの蓄積が行われると、バッファメモリ13には1フレーム分のディジタル画像データが蓄積されることになる。以下、1フレーム分のディジタル画像データを単に「画像」と称す。
The
画像処理回路14は、CPU21から指定された画像に対して、ホワイトバランス調整処理、色補間処理(所謂デベイヤ処理)、階調変換処理、KNEE処理などの一連の画像処理を施す。
The
ホワイトバランス演算回路15Bは、CPU21から指定された画像に基づき、その画像へ適用すべきホワイトバランスゲインを算出し、算出したホワイトバランスゲインを画像処理回路14へ設定する。
The white balance calculation circuit 15B calculates a white balance gain to be applied to the image based on the image designated by the CPU 21, and sets the calculated white balance gain in the
表示制御回路16は、表示用メモリを有しており、その表示用メモリに書き込まれた画像を内部モニタ17へ送出することにより、内部モニタ17上へ画像を表示する。なお、外部接続端子24に外部モニタが接続されている期間には、表示制御回路16による画像の送出先は、内部モニタ17ではなく外部モニタとなる。但し、以下では簡単のため、外部接続端子24に外部モニタは接続されていないものと仮定する。
The
内部モニタ17は、電子カメラ1の背面などに設けられ、電子カメラ1で取得された画像をユーザが確認する際などに使用されるモニタである。このモニタは、例えばLCDパネルなどで構成される。
The
外部接続端子24は、表示制御回路16を外部モニタへ接続するための端子である。外部接続端子24は、例えば、USBポートなどで構成される。
The
圧縮・伸張回路18は、バッファメモリ13に格納された画像又は画像群に対し、データ圧縮処理を施す。また、圧縮・伸張回路18は、データ圧縮済みの画像又は画像群(画像ファイル又は動画像ファイル)に対し、データ伸張処理を施すこともできる。
The compression /
カードインタフェース19は、データ圧縮済みの画像(画像ファイル又は動画像ファイル)を、電子カメラ1のカードスロットに装着中のカードメモリ20へ書き込んだり、そのカードメモリ20に書き込まれている画像(画像ファイル又は動画像ファイル)を読み込んだりする。なお、カードメモリ20は、可搬の記憶媒体である。
The card interface 19 writes a data-compressed image (image file or moving image file) to the
撮像回路22は、撮影レンズ2に対して駆動信号を与えることにより、撮影レンズ2の焦点距離(ズーム位置)、撮影レンズ2の合焦距離、撮影レンズ2の絞り値などを調節する。また、撮像回路22は、撮像素子11及び信号処理回路12に対して駆動信号を与えることにより、両者の駆動タイミングを制御する。また、撮像回路22は、撮像素子11の1フレーム当たりの電荷蓄積時間を制御する。なお、電子カメラ1のシャッター速度は、撮像素子11の電荷蓄積時間と不図示のメカシャッタの開放期間との組み合わせによって設定できるが、撮像素子11の電荷蓄積時間のみによって設定することもできる。
The
CPU21は、入力器23を介して入力されるユーザの指示と、CPU21の内部メモリ(ROM)に予め書き込まれたファームウエアとに従い、以上の各部を制御する。なお、CPU21のファームウエアは、電子カメラ1に搭載された不図示の通信回路(公知のネットワーク端子など)を介して適宜に更新される。
The CPU 21 controls each of the above units in accordance with a user instruction input via the input device 23 and firmware written in advance in the internal memory (ROM) of the CPU 21. The firmware of the CPU 21 is appropriately updated via a communication circuit (not shown) (known network terminal or the like) mounted on the
入力器23は、電子カメラ1の上部に設けられたレリーズボタンや、電子カメラ1の背面に設けられたマルチセレクターなどの操作部材である。ユーザは、この入力器23を介して電子カメラ1をホワイトバランスプリセットモードに設定することができる。ホワイトバランスプリセットモードは、撮影に先立ちホワイトバランスゲインをユーザが設定するためのモードである。
The input device 23 is an operation member such as a release button provided on the top of the
また、ユーザは、この入力器23を介して電子カメラ1をセミオートホワイトバランス撮影モードに設定することができる。セミオートホワイトバランス撮影モードは、ホワイトバランスプリセットモードで設定されたホワイトバランスゲイン(プリセットホワイトバランスゲイン)に基づき電子カメラ1がホワイトバランスゲインを自動調節するモードである。
In addition, the user can set the
図2は、ホワイトバランスプリセットモードにおけるCPU21の動作フローチャートである。以下、図2の各ステップを順に説明する。 FIG. 2 is an operation flowchart of the CPU 21 in the white balance preset mode. Hereafter, each step of FIG. 2 is demonstrated in order.
ステップS11:CPU21は、レリーズボタンが全押しされたか否かを判別し、全押しされた場合は、ステップS12へ移行する。 Step S11: The CPU 21 determines whether or not the release button has been fully pressed. If the release button has been fully pressed, the process proceeds to step S12.
ステップS12:CPU21は、撮像回路22を介して撮像素子11をドラフトモード(又はフレームモード)で1フレーム分駆動する。これによってプリセット用の画像が取得される。このプリセット用の画像は、信号処理回路12を介してバッファメモリ13へ蓄積される。
Step S12: The CPU 21 drives the image pickup device 11 for one frame in the draft mode (or frame mode) via the
ステップS13:CPU21は、バッファメモリ13に蓄積されたプリセット用の画像の平均色度を算出すると共に、その平均色度を無彩色にするためのホワイトバランスゲインを算出する。
Step S13: The CPU 21 calculates the average chromaticity of the preset image stored in the
ステップS14:CPU21は、ステップS13で算出した平均色度をプリセット照明色として記憶すると共に、ステップS13で算出したホワイトバランスゲインをプリセットホワイトバランスゲインとして記憶し、フローを終了する。なお、既に記憶されているプリセット照明色及びプリセットホワイトバランスゲインがあった場合には、本ステップでそれらが更新される。 Step S14: The CPU 21 stores the average chromaticity calculated in step S13 as a preset illumination color, stores the white balance gain calculated in step S13 as a preset white balance gain, and ends the flow. If there are preset illumination colors and preset white balance gains already stored, they are updated in this step.
したがって、電子カメラ1がホワイトバランスプリセットモードに設定されている期間に、ユーザがグレー又は白い物体(無彩色物体)を撮像すると、その無彩色物体のおかれたシーンの照明色をプリセット照明色として電子カメラ1へ指定し、その照明色に適したホワイトバランスゲインをプリセットホワイトバランスゲインとして電子カメラ1へ指定することができる。これらのプリセット照明色と、プリセットホワイトバランスゲインとは、セミオートホワイトバランス撮影モードにおいて使用される。
Accordingly, when the user images a gray or white object (achromatic object) while the
図3は、セミオートホワイトバランス撮影モードにおけるCPU21の動作フローチャートである。以下、図3の各ステップを順に説明する。 FIG. 3 is an operation flowchart of the CPU 21 in the semi-auto white balance shooting mode. Hereafter, each step of FIG. 3 is demonstrated in order.
ステップS21:CPU21は、電子カメラ1の撮影パラメータ(絞り値、シャッター速度、合焦距離、ズーム位置など)、電子カメラ1の画像処理パラメータ(ホワイトバランス調整処理のホワイトバランスゲイン、階調変換処理の階調変換カーブ、KNEE処理のKNEE特性カーブなど)を、予め決められた組み合わせに設定する。なお、このうちホワイトバランスゲインは、現時点で記憶しているプリセットホワイトバランスゲインと同じ値に設定される。 Step S21: The CPU 21 captures shooting parameters of the electronic camera 1 (aperture value, shutter speed, focus distance, zoom position, etc.), image processing parameters of the electronic camera 1 (white balance gain of white balance adjustment processing, gradation conversion processing) A gradation conversion curve, a KNEE characteristic curve for KNEE processing, etc.) are set to a predetermined combination. Of these, the white balance gain is set to the same value as the preset white balance gain stored at the present time.
ステップS22:CPU21は、撮像回路22を介して撮像素子11をドラフトモードで連続駆動し始める。これによって撮像素子11は、スルー画像の取得を開始する。CPU21は、このときに信号処理回路12から出力されるスルー画像からAE評価値を抽出し、そのAE評価値が適正となるよう、撮像回路22を介して電子カメラ1のシャッター速度と撮影レンズ22の絞り値との組み合わせを制御する(AE制御)。それと並行して、CPU21は、信号処理回路12から出力されるスルー画像からAF評価値を抽出し、そのAF評価値が適正となるよう、撮像回路22を介して撮影レンズ22の合焦距離を制御する(AF制御)。なお、CPU21は、スルー画像の取得期間中に入力器23からズーム調整指示が入力されると、その指示に応じて撮影レンズ2のズーム位置を調整する。
Step S22: The CPU 21 starts to continuously drive the image pickup device 11 in the draft mode via the
ステップS23:CPU21は、レリーズボタンが全押しされたか否かを判別し、全押しされた場合は、ステップS24へ移行する。 Step S23: The CPU 21 determines whether or not the release button has been fully pressed. If the release button has been fully pressed, the process proceeds to step S24.
ステップS24:CPU21は、撮像回路22を介して撮像素子11をフレームモードで1フレーム分駆動する。これによって保存用の詳細画像が取得される。この詳細画像は、信号処理回路12を介してバッファメモリ13へ蓄積される。
Step S24: The CPU 21 drives the image pickup device 11 for one frame in the frame mode via the
ステップS25:CPU21は、現時点で記憶しているプリセット照明色をホワイトバランス演算回路15へ与えると共に、バッファメモリ13上の詳細画像に関するセミオートホワイトバランス演算の開始指示をホワイトバランス演算回路15へ与える。ホワイトバランス演算回路15は、プリセット照明色に基づき詳細画像に関するセミオートホワイトバランス演算処理(後述)を実行する。このセミオートホワイトバランス演算処理で算出されたホワイトバランスゲインは、CPU21へ出力される。
Step S25: The CPU 21 gives the preset illumination color stored at the present time to the white
ステップS26:CPU21は、ホワイトバランス演算回路15から出力されたホワイトバランスゲインを画像処理回路14へ設定する。これによって、電子カメラ1のホワイトバランスゲインが現時点において最適な値に再設定される。
Step S <b> 26: The CPU 21 sets the white balance gain output from the white
ステップS27:CPU21は、画像処理を実行するよう画像処理回路14へ指示を出す。画像処理回路14は、バッファメモリ13に蓄積されている詳細画像に対して、前述した一連の画像処理を施す。なお、本ステップで実行されるホワイトバランス調整処理のホワイトバランスゲインは、ステップS26にて再設定されたホワイトバランスゲインである。
Step S27: The CPU 21 issues an instruction to the
ステップS28:CPU21は、画像処理後の詳細画像に対してデータ圧縮処理を施すよう圧縮・伸張回路18へ指示する。圧縮・伸張回路18は、その詳細画像をデータ圧縮することにより、JPEGファイルなどの画像ファイルを作成する。CPU21は、カードインタフェース19を介してその画像ファイルをカードメモリ20へ書き込み、フローを終了する。これによって、詳細画像が画像ファイルとして保存される。
Step S28: The CPU 21 instructs the compression /
図4は、ホワイトバランス演算回路15によるセミオートホワイトバランス演算処理(図3のステップS25)の動作フローチャートである。以下、図4の各ステップを順に説明する。
FIG. 4 is an operation flowchart of the semi-auto white balance calculation process (step S25 in FIG. 3) by the white
ステップS25−1:ホワイトバランス演算回路15は、CPU21から与えられたプリセット照明色に基づき、色座標上に参照色範囲を設定する。図5に示すとおり、参照色範囲Arは、プリセット照明色の色度座標P0の近傍の色範囲であって、そのサイズ及び形状は予め決められている。例えば、参照色範囲Arは、色度座標P0を中心とした所定サイズの正方形領域に設定される。
Step S25-1: The white
ステップS25−2:ホワイトバランス演算回路15は、詳細画像の各画素を、その色度に応じて色度座標上へ写像し、詳細画像の全画素の中から、写像先が参照領域Arである画素群を抽出する。なお、前述したカラーフィルタの配列がベイヤ配列であった場合、詳細画像の個々の画素は、図6に示す単位ブロックBPに相当する。単位ブロックBPは、カラーフィルタの最小単位に相当し、2つのG画素と、1つのR画素と、1つのB画素とを有している。
Step S25-2: The white
そして、ホワイトバランス演算回路15は、抽出した画素群の色度座標上の頻度分布を算出する。但し、ホワイトバランス演算回路15は、頻度分布を算出するに当たり、参照領域Arを例えば図5に点線で示すような複数のブロック(色ブロック)に等分割し、画素の頻度を色ブロック毎に計上する。また、その際、ホワイトバランス演算回路15は、高輝度な画素ほど頻度を多めに計上する(つまり高輝度な画素の頻度ほど大きな重みを付与する。)。これによって、例えば図7に示すような頻度分布が得られる。
Then, the white
ステップS25−3:ホワイトバランス演算回路15は、ステップS25−2で算出した頻度分布(図7)に対して、平滑化フィルタ処理を施す。平滑化フィルタ処理は、所謂ボケフィルタ処理であって、各色ブロックの頻度を、その色ブロックの頻度と、その周辺の色ブロックの頻度との平均値(又は重み付け平均値)に置換する処理である。これによって、頻度分布の各頻度は、その周辺の頻度に近づけられることになる。
Step S25-3: The white
ステップS25−4:ホワイトバランス演算回路15は、平滑化フィルタ処理後の頻度分布に対して重み付け処理を施す。この重み付け処理は、平滑化フィルタ処理後の頻度分布に対して、色ブロック毎に重みを付与する処理であって、色ブロック毎に予め割り当てられた重みは、例えば図8に示すとおりであって、参照色範囲Arの中央に近い色ブロックほど大きな重みが割り当てられている。よって、本ステップの重み付け処理によると、プリセット照明色に近い色の頻度ほど大きな重みが付与される。
Step S25-4: The white
ステップS25−5:ホワイトバランス演算回路15は、重み付け処理後の頻度分布を参照し、頻度が最大となった色ブロック(特定の色ブロック)を見出す。そして、ホワイトバランス演算回路15は、その特定の色ブロックの中心座標の色度を、詳細画像に生じている色かぶりの度合い(以下、「被補正色」と称す。)とみなし、その被補正色を無彩色にするためのホワイトバランスゲインを算出する。そして、そのホワイトバランスゲインを演算結果としてCPU21へ出力すると、ホワイトバランス演算回路15は、セミオートホワイトバランス演算処理のフローを終了する。よって、詳細画像には、このホワイトバランスゲインが適用されることになる。但し、本ステップのホワイトバランス演算回路15は、重み付け処理後の頻度分布の最大頻度が閾値未満であった場合には、被補正色を無彩色にするためのホワイトバランスゲインを算出せずに、プリセットホワイトバランスゲインの値をそのまま演算結果としてCPU21へ出力する(以上、ステップS25−5の説明。)。
Step S25-5: The white
以上、本実施形態のセミオートホワイトバランス撮影(図3、図4)では、プリセット照明色の色度座標P0の近傍に参照色範囲Arを設定し、詳細画像の各画素から参照色範囲Arに属する画素群を選出し、その画素群の色度座標上の頻度分布を算出し、その頻度分布に基づき、詳細画像へ適用すべきホワイトバランスゲインを再設定する。よって、詳細画像の各画素のうち、プリセット照明色から一定以上離れた色の画素は、再設定の結果に影響を与えない。 As described above, in the semi-automatic white balance photographing (FIGS. 3 and 4) of the present embodiment, the reference color range Ar is set in the vicinity of the chromaticity coordinate P 0 of the preset illumination color, and each pixel of the detailed image is changed to the reference color range Ar. A pixel group to which the pixel group belongs is selected, a frequency distribution on the chromaticity coordinates of the pixel group is calculated, and a white balance gain to be applied to the detailed image is reset based on the frequency distribution. Therefore, among the pixels of the detailed image, pixels having a color that is more than a certain distance from the preset illumination color do not affect the resetting result.
したがって、仮に、ホワイトバランスプリセット(図2)の時点からセミオートホワイトバランス撮影(図3、図4)の時点までの期間に電子カメラ1の撮影条件(撮影レンズの分光透過率、被写体の分光反射率、撮像素子の設定値、信号処理回路の設定値など)が変化したとしても、その変化に電子カメラ1のホワイトバランスゲインは適応できる。
Therefore, suppose that the shooting conditions of the electronic camera 1 (spectral transmittance of the photographing lens, spectral reflectance of the subject) during the period from the time of the white balance preset (FIG. 2) to the time of the semi-automatic white balance shooting (FIGS. 3 and 4) Even if the setting value of the image sensor, the setting value of the signal processing circuit, etc.) change, the white balance gain of the
また、本実施形態のセミオートホワイトバランス撮影(図3、図4)では、算出した頻度分布の各色の頻度に対して色度座標P0に近い色の頻度ほど大きな重みで重み付けするので、再設定されるホワイトバランスゲインに対して、プリセットホワイトバランスゲインを適度に反映させることができる。 Further, in the semi-automatic white balance photography (FIGS. 3 and 4) of this embodiment, the frequency of each color in the calculated frequency distribution is weighted with a greater weight as the frequency of the color closer to the chromaticity coordinate P 0 is reset. The preset white balance gain can be appropriately reflected with respect to the white balance gain.
また、本実施形態のセミオートホワイトバランス撮影(図3、図4)では、ホワイトバランスゲインの再設定の際に、詳細画像の各部の色を画素毎に評価するので、混色の問題を避けることができる。 Further, in the semi-automatic white balance shooting (FIGS. 3 and 4) of the present embodiment, the color of each part of the detailed image is evaluated for each pixel when the white balance gain is reset, so that the problem of color mixture can be avoided. it can.
混色の問題とは、詳細画像上に実際には存在しない色度の頻度がホワイトバランスゲインに悪影響を与えてしまう問題であって、詳細画像の各部の色度を、画素毎に評価せずに画像上のブロック毎(画像ブロック毎)に評価した場合に発生し得る問題である。なぜなら、画素ブロック毎に評価する場合は、1つの画像ブロック内に互いに異なる複数の色度が存在していた場合は、それら色度の平均色度が画像ブロックの色度とみなされるが、その平均色度は、画像ブロック内に実際には存在しない色度だからである。 The problem of color mixing is a problem in which the frequency of chromaticity that does not actually exist on the detailed image adversely affects the white balance gain. The chromaticity of each part of the detailed image is not evaluated for each pixel. This is a problem that may occur when evaluation is performed for each block (for each image block) on the image. This is because when evaluating for each pixel block, if there are a plurality of different chromaticities in one image block, the average chromaticity of those chromaticities is regarded as the chromaticity of the image block. This is because the average chromaticity is a chromaticity that does not actually exist in the image block.
[実施形態の補足]
なお、上述した実施形態のステップS25−1では、プリセット照明色の色度座標P0の近傍に参照色範囲Arを設定したが、参照色範囲Arの設定前に色度座標P0を補正してもよい。その補正では、現時点における撮影条件(撮影レンズの分光透過率、被写体の分光反射率、撮像素子の設定値、信号処理回路の設定値など)に応じた補正係数を使用するとよい。
[Supplement of embodiment]
In step S25-1 of the above embodiment has been set a reference color range Ar in the vicinity of the chromaticity coordinates P 0 of the preset illumination color, corrects the chromaticity coordinates P 0 before setting of the reference color range Ar May be. In the correction, it is preferable to use a correction coefficient corresponding to the current shooting conditions (spectral transmittance of the shooting lens, spectral reflectance of the subject, setting value of the image sensor, setting value of the signal processing circuit, etc.).
また、上述した実施形態のステップS25−2では、ホワイトバランス演算回路15の演算対象を詳細画像それ自体としたが、演算負荷を削減するために、間引き処理された詳細画像(すなわち詳細画像のサイズ縮小版)としてもよい。このようにすれば、上述した混色の問題を避けつつ演算負荷を削減することができる。
In step S25-2 of the above-described embodiment, the calculation target of the white
また、上述した実施形態の電子カメラ1は、ホワイトバランスプリセットモードにおいて記憶する情報を、プリセットホワイトバランスゲインとプリセット照明色との双方の情報としたが、一方のみの情報としてもよい。なぜなら、ホワイトバランスゲインとプリセット照明色とは、一方から他方を算出することが可能だからである。よって、電子カメラ1がホワイトバランスプリセットモードで記憶する情報を一方のみとした場合、他方については適宜に算出すればよい。
In the
また、上述した実施形態のホワイトバランスプリセットモードでは、プリセットホワイトバランスゲイン又はプリセット照明色をユーザが電子カメラ1へ指定する方法として、ユーザが電子カメラ1で無彩色物体を撮影するという方法を採用したが、他の方法を採用してもよい。例えば、予め決められた複数種類の光源の中の1つをユーザが指定する方法や、被写界の照明色の色温度をユーザが指定する方法などを採用してもよい。
In the white balance preset mode of the above-described embodiment, as a method for the user to specify the preset white balance gain or the preset illumination color to the
また、上述した実施形態では、記録用の静止画撮影に本発明を適用した場合を説明したが、記録用の静止画撮影前の確認用の動画撮影や、記録用の動画撮影前の確認用の動画撮影にも、本発明は同様に適用可能である。 Further, in the above-described embodiment, the case where the present invention is applied to still image shooting for recording has been described. However, for confirmation video shooting before recording still image shooting or for confirmation before shooting moving image recording. The present invention can be similarly applied to the moving image shooting.
但し、動画撮影に適用する場合は、ホワイトバランスゲインをフィードバック制御する場合(すなわち、頻度分布の抽出元となる画像と、ホワイトバランス調整の対象となる画像とが異なる場合)よりも、頻度分布の抽出元となる画像と、ホワイトバランス調整の対象となる画像とが共通である場合の方が、本発明の利用効果は高いと考えられる。 However, when applied to video shooting, the frequency distribution is more controlled than when the white balance gain is feedback controlled (that is, the image from which the frequency distribution is extracted differs from the image from which the white balance is to be adjusted). The use effect of the present invention is considered to be higher when the image that is the extraction source and the image that is the target of white balance adjustment are common.
また、上述した実施形態の電子カメラ1は、ホワイトバランスゲインの再設定処理(ステップS25〜S28の処理)を撮影時に実行したが、過去に保存したRAW画像ファイル(=画像処理前の画像のファイル)の現像処理時に実行してもよい。但し、その場合、電子カメラ1は、RAW画像ファイルの保存時に、その時点におけるプリセットホワイトバランスゲイン又はプリセット照明色の情報をRAW画像ファイルへ付与する必要がある。
In the
また、このような現像処理(ステップS25〜S28の処理を含む現像処理)は、電子カメラ1とは別体で設けられた画像処理装置、例えば、電子フォトフレーム、プリンタ、汎用コンピュータ(画像処理ソフトが搭載されたもの)などで実行させることも可能である。また、その現像処理を画像処理装置に実行させる場合は、その現像処理のコンピュータプログラムが通信網又は記憶媒体を介して画像処理装置へインストールされることになる。
Such development processing (development processing including the processing of steps S25 to S28) is an image processing device provided separately from the
1…電子カメラ、11…撮像素子、12…信号処理回路、13…バッファメモリ、14…画像処理回路、15…ホワイトバランス演算回路、16…表示制御回路、17…内部モニタ、18…圧縮・伸張回路、19…カードインタフェース、21…CPU、22…撮像回路、23…入力器、24…外部接続端子
DESCRIPTION OF
Claims (6)
ホワイトバランス調整の対象となるカラー画像から、前記指定色の近傍の所定色範囲に属する画素群を選出する選出手段と、
選出された前記画素群の色座標上の頻度分布を算出する分布算出手段と、
算出された前記頻度分布に基づき、前記カラー画像へ適用すべきホワイトバランス調整量を算出する調整量算出手段と、
を備え、
前記調整量算出手段は、
前記ホワイトバランス調整量の算出に先立ち、前記頻度分布に含まれる各色の頻度に対して前記指定色に近い色の頻度ほど大きな重みで重み付けする
ことを特徴とする画像処理装置。 Storage means for storing information on a designated color that is a color designated in advance;
Selecting means for selecting a pixel group belonging to a predetermined color range in the vicinity of the designated color from a color image to be subjected to white balance adjustment;
Distribution calculating means for calculating a frequency distribution on the color coordinates of the selected pixel group;
Adjustment amount calculation means for calculating a white balance adjustment amount to be applied to the color image based on the calculated frequency distribution;
Equipped with a,
The adjustment amount calculating means includes
Prior to the calculation of the white balance adjustment amount, the frequency of each color included in the frequency distribution is weighted with a greater weight as the frequency of the color closer to the specified color .
前記調整量算出手段は、
前記ホワイトバランス調整量の算出に先立ち、前記頻度分布に対して平滑化フィルタ処理を施す
ことを特徴とする画像処理装置。 The image processing apparatus according to claim 1 .
The adjustment amount calculating means includes
An image processing apparatus that performs smoothing filter processing on the frequency distribution prior to calculating the white balance adjustment amount.
前記選出手段は、
前記画素群の選出に先立ち、前記カラー画像に対して間引き処理を施す
ことを特徴とする画像処理装置。 The image processing apparatus according to claim 1 or 2 ,
The selection means is:
An image processing apparatus that performs thinning processing on the color image prior to selection of the pixel group.
前記分布算出手段は、
前記頻度分布の算出に当たり、前記色座標上のブロック毎に頻度を計上する
ことを特徴とする画像処理装置。 In the image processing apparatus according to any one of claims 1 to 3 ,
The distribution calculating means includes
In calculating the frequency distribution, the frequency is counted for each block on the color coordinates.
取得された前記カラー画像に適用すべきホワイトバランス調整量を算出する請求項1〜請求項4の何れか一項に記載の画像処理装置と、
を備えることを特徴とする撮像装置。 An image sensor for acquiring a color image;
The image processing apparatus according to any one of claims 1 to 4 , wherein a white balance adjustment amount to be applied to the acquired color image is calculated;
An imaging apparatus comprising:
ホワイトバランス調整の対象となるカラー画像から、前記指定色の近傍の所定色範囲に属する画素群を選出する選出手順と、
選出された前記画素群の色座標上の頻度分布を算出する分布算出手順と、
前記頻度分布に含まれる各色の頻度に対して前記指定色に近い色の頻度ほど大きな重みで重み付けをし、算出された前記頻度分布に基づき、前記カラー画像へ適用すべきホワイトバランス調整量を算出する調整量算出手順と、
をコンピュータに実行させることを特徴とする画像処理プログラム。 A storage procedure for storing information on a designated color that is a color designated in advance;
A selection procedure for selecting a pixel group belonging to a predetermined color range in the vicinity of the specified color from a color image to be subjected to white balance adjustment;
A distribution calculation procedure for calculating a frequency distribution on color coordinates of the selected pixel group;
Weighted with larger weight as the frequency of a color close to the designated color with respect to frequency of each color included in the frequency distribution, based on the frequency distribution issued calculated, the white balance adjusting amount to be applied to the color image An adjustment amount calculation procedure to be calculated;
An image processing program for causing a computer to execute.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2010140215A JP5659574B2 (en) | 2010-06-21 | 2010-06-21 | Image processing apparatus, imaging apparatus, and image processing program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2010140215A JP5659574B2 (en) | 2010-06-21 | 2010-06-21 | Image processing apparatus, imaging apparatus, and image processing program |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2012005011A JP2012005011A (en) | 2012-01-05 |
JP5659574B2 true JP5659574B2 (en) | 2015-01-28 |
Family
ID=45536439
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2010140215A Expired - Fee Related JP5659574B2 (en) | 2010-06-21 | 2010-06-21 | Image processing apparatus, imaging apparatus, and image processing program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP5659574B2 (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP6645099B2 (en) * | 2015-09-30 | 2020-02-12 | リコーイメージング株式会社 | Image processing device |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2003209857A (en) * | 2002-01-11 | 2003-07-25 | Fuji Photo Film Co Ltd | Image processing apparatus |
JP4026516B2 (en) * | 2003-03-07 | 2007-12-26 | 富士フイルム株式会社 | Image processing apparatus and method |
JP2005079623A (en) * | 2003-08-28 | 2005-03-24 | Fuji Photo Film Co Ltd | Method, apparatus and program of correcting white balance |
JP4654874B2 (en) * | 2005-10-17 | 2011-03-23 | 株式会社ニコン | Subject analysis device, imaging device, and image processing program |
-
2010
- 2010-06-21 JP JP2010140215A patent/JP5659574B2/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
JP2012005011A (en) | 2012-01-05 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10412296B2 (en) | Camera using preview image to select exposure | |
KR101900097B1 (en) | Image capturing method and image capturing apparatus | |
KR101549529B1 (en) | Image capture apparatus, control method thereof, and recording medium | |
JP5660341B2 (en) | Imaging apparatus and imaging method | |
JP5553230B2 (en) | Imaging apparatus and imaging processing method | |
JP2009212853A (en) | White balance controller, its control method, and imaging apparatus | |
JP5843027B1 (en) | Imaging apparatus, control method, and program | |
JP4487342B2 (en) | Digital camera | |
JP7157714B2 (en) | Image processing device and its control method | |
US11798143B2 (en) | Image processing apparatus and control method thereof | |
JP5458937B2 (en) | IMAGING DEVICE, IMAGING METHOD, AND COMPUTER-READABLE RECORDING MEDIUM CONTAINING PROGRAM FOR EXECUTING THE IMAGING METHOD | |
JP5822508B2 (en) | Imaging apparatus and control method thereof | |
JP5256947B2 (en) | IMAGING DEVICE, IMAGING METHOD, AND COMPUTER-READABLE RECORDING MEDIUM RECORDING PROGRAM FOR EXECUTING THE METHOD | |
JP2008017198A (en) | Device and method for calculating light source color, and photographing device | |
JP5659574B2 (en) | Image processing apparatus, imaging apparatus, and image processing program | |
JP2004287794A (en) | Image processor | |
JP4705146B2 (en) | Imaging apparatus and imaging method | |
JP6157274B2 (en) | Imaging apparatus, information processing method, and program | |
JP2006253970A (en) | Imaging apparatus, shading correction data generating method, and program | |
JP2015142281A (en) | Subject searching device, control method and control program of the same, and imaging device | |
JP5943682B2 (en) | Imaging apparatus, control method thereof, and program | |
JP2015119436A (en) | Imaging apparatus | |
JP5915242B2 (en) | Image processing apparatus, image processing method, image processing program, and recording medium recording the image processing program on a computer | |
JP2012129611A (en) | Imaging apparatus | |
JP2012133492A (en) | Image processing device and program |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20130527 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20140120 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20140225 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20140425 |
|
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: 20141104 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20141117 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 5659574 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
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 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
LAPS | Cancellation because of no payment of annual fees |