JP5378282B2 - Purple fringe correction device, control method thereof, and program for correcting purple fringe - Google Patents
Purple fringe correction device, control method thereof, and program for correcting purple fringe Download PDFInfo
- Publication number
- JP5378282B2 JP5378282B2 JP2010074865A JP2010074865A JP5378282B2 JP 5378282 B2 JP5378282 B2 JP 5378282B2 JP 2010074865 A JP2010074865 A JP 2010074865A JP 2010074865 A JP2010074865 A JP 2010074865A JP 5378282 B2 JP5378282 B2 JP 5378282B2
- Authority
- JP
- Japan
- Prior art keywords
- purple fringe
- white balance
- image data
- gain
- purple
- 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
Images
Landscapes
- Image Processing (AREA)
- Color Television Image Signal Generators (AREA)
- Facsimile Image Signal Circuits (AREA)
- Color Image Communication Systems (AREA)
Description
この発明は,パープルフリンジ補正装置およびその制御方法,ならびにパープルフリンジを補正するためのプログラムに関する。 The present invention relates to a purple fringe correction apparatus, a control method thereof, and a program for correcting purple fringes.
ディジタル・スチル・カメラ等による撮像によって得られた画像中にパープルフリンジが視認されることがある。高輝度の被写体(たとえば,光源)が撮像されることで輝度差(輝度勾配)の大きな輪郭(エッジ)が撮像画像中に存在する場合に,画像輪郭の周辺にパープルフリンジは生じやすい。 Purple fringes may be visually recognized in an image obtained by imaging with a digital still camera or the like. When a high brightness subject (for example, a light source) is imaged and a contour (edge) having a large luminance difference (luminance gradient) is present in the captured image, purple fringes tend to occur around the image contour.
パープルフリンジを除去ないし低減する場合,パープルフリンジが発生している画素が見つけられ,見つかったパープルフリンジ画素の色等が補正される。特許文献1,2では紫色を帯びた画素がパープルフリンジ画素として選択されている。いずれも精度の高いパープルフリンジ画素の検出ではない。
When the purple fringe is removed or reduced, the pixel in which the purple fringe is generated is found, and the color or the like of the found purple fringe pixel is corrected. In
この発明はパープルフリンジの検出精度を高めることを目的とする。 An object of the present invention is to improve the detection accuracy of purple fringes.
この発明によるパープルフリンジ補正装置は,パープルフリンジ補正対象画像データの入力を受付け,上記パープルフリンジ補正対象画像データに対して第1および第2のホワイトバランス・ゲインをそれぞれ適用してホワイトバランスを調整して,第1の調整済み画像データおよび第2の調整済み画像データを出力するホワイトバランス調整手段,上記ホワイトバランス調整手段から出力される第1の調整済み画像データの入力を受付け,第1の調整済み画像データを用いてパープルフリンジ画素を検出するパープルフリンジ検出手段,ならびに上記ホワイトバランス調整手段から出力される第2の調整済み画像データの入力を受付け,上記パープルフリンジ検出手段において検出されたパープルフリンジ画素に対応する,第2の調整済み画像データによって表される第2の調整済み画像中の画素を補正するパープルフリンジ補正手段を備え,上記第1のホワイトバランス・ゲインが上記パープルフリンジ画素の検出に適するものであることを特徴とする。 A purple fringe correction apparatus according to the present invention receives input of purple fringe correction target image data and adjusts the white balance by applying first and second white balance gains to the purple fringe correction target image data. The white balance adjusting means for outputting the first adjusted image data and the second adjusted image data, the input of the first adjusted image data output from the white balance adjusting means is received, and the first adjustment is performed. Purple fringe detection means for detecting purple fringe pixels using the finished image data, and the input of the second adjusted image data output from the white balance adjustment means, and the purple fringe detected by the purple fringe detection means Second adjusted corresponding to pixel Purple fringe correction means for correcting pixels in the second adjusted image represented by the image data is provided, and the first white balance gain is suitable for detection of the purple fringe pixels. .
この発明は上記パープルフリンジ補正装置の制御に適する方法も提供する。この方法は,ホワイトバランス調整手段が,パープルフリンジ補正対象画像データの入力を受付け,上記パープルフリンジ補正対象画像データに対して第1および第2のホワイトバランス・ゲインをそれぞれ適用してホワイトバランスを調整して,第1の調整済み画像データおよび第2の調整済み画像データを出力し,パープルフリンジ検出手段が,上記ホワイトバランス調整手段から出力される第1の調整済み画像データの入力を受付け,第1の調整済み画像データを用いてパープルフリンジ画素を検出し,パープルフリンジ補正手段が,上記ホワイトバランス調整手段から出力される第2の調整済み画像データの入力を受付け,第2の調整済み画像データによって表される第2の調整済み画像について,上記パープルフリンジ検出手段において検出されたパープルフリンジ画素に対応する画素を補正するようにパープルフリンジ補正装置を制御するものであって,上記第1のホワイトバランス・ゲインが上記パープルフリンジ画素の検出に適するものであることを特徴とする。 The present invention also provides a method suitable for controlling the purple fringe correcting apparatus. In this method, the white balance adjusting means accepts input of purple fringe correction target image data, and adjusts the white balance by applying the first and second white balance gains to the purple fringe correction target image data, respectively. Then, the first adjusted image data and the second adjusted image data are output, and the purple fringe detecting means receives the input of the first adjusted image data output from the white balance adjusting means, and Purple fringe pixels are detected using the adjusted image data of 1, and the purple fringe correcting means receives the input of the second adjusted image data output from the white balance adjusting means, and the second adjusted image data For the second fringe detection means represented by The purple fringe correction device is controlled so as to correct the pixel corresponding to the detected purple fringe pixel, and the first white balance gain is suitable for detection of the purple fringe pixel. Features.
この発明はさらに,コンピュータを上記パープルフリンジ補正装置として機能させるプログラムも提供する。 The present invention further provides a program for causing a computer to function as the purple fringe correction apparatus.
パープルフリンジ画素を検出するために用いられる画像(第1の調整済み画像)と,パープルフリンジ画素を補正するために用いられる画像(第2の調整済み画像)の2つの画像が用いられて,パープルフリンジ補正が行われる。第1の調整済み画像はパープルフリンジ画素の検出に適する第1のホワイトバランス・ゲインを用いて,処理対象の画像データをホワイトバランス調整したものである。第2の調整済み画像は上記第2のホワイトバランス・ゲインを用いてホワイトバランス調整したものである。第1のホワイトバランス・ゲインと第2のホワイトバランス・ゲインは一般には異なる値(ゲイン値)であるが,同一である場合も含む。 Two images are used to detect purple fringe pixels (first adjusted image) and an image used to correct purple fringe pixels (second adjusted image). Fringe correction is performed. The first adjusted image is obtained by performing white balance adjustment on image data to be processed using a first white balance gain suitable for detecting purple fringe pixels. The second adjusted image is obtained by adjusting the white balance using the second white balance gain. The first white balance gain and the second white balance gain are generally different values (gain values), but include the same case.
この発明によると,第1の調整済み画像がパープルフリンジ画素の検出に適する第1のホワイトバランス・ゲインを用いてホワイトバランス調整されたものであるから,第1の調整済み画像を用いるとパープルフリンジ画素を高い精度で検出することができる。そして,高い精度で検出されたパープルフリンジ画素に対応する,第2の調整済み画像中の画素に対してパープルフリンジ補正は行われる。第2のホワイトバランス・ゲインを用いてホワイトバランス調整された第2の調整済み画像がパープルフリンジ画素を見つけにくい画像であったとしても,第2の調整済み画像において高精度にパープルフリンジ画素を補正することができる。第2のホワイトバランス・ゲインがユーザの好み(ユーザによる設定)にしたがうものであれば,ユーザの好みにしたがってホワイトバランス調整された画像であって,かつ高精度にパープルフリンジ画素が補正された画像を得ることができる。 According to the present invention, since the first adjusted image is white balance adjusted using the first white balance gain suitable for detection of purple fringe pixels, if the first adjusted image is used, purple fringe is used. Pixels can be detected with high accuracy. Then, purple fringe correction is performed on the pixels in the second adjusted image corresponding to the purple fringe pixels detected with high accuracy. Even if the second adjusted image that is white balance adjusted using the second white balance gain is an image in which it is difficult to find the purple fringe pixel, the purple fringe pixel is corrected with high accuracy in the second adjusted image. can do. If the second white balance gain is in accordance with the user's preference (setting by the user), the image is white balance adjusted according to the user's preference and the purple fringe pixel is corrected with high accuracy. Can be obtained.
一実施態様では,上記パープルフリンジ補正装置は,画素位置ごとに,パープルフリンジ画素であるかどうかを表すパープルフリンジ・フラグを少なくとも記憶するパープルフリンジ処理情報テーブルを備え,上記パープルフリンジ検出手段は,パープルフリンジ画素の検出に応じて,その画素位置に対応する上記パープルフリンジ・フラグをオンするものであり,上記パープルフリンジ補正手段は,上記第2の調整済み画像において,パープルフリンジ処理情報テーブルに記憶されている上記パープルフリンジ・フラグがオンされている画素位置の画素を補正するものである。パープルフリンジ検出手段において検出されたパープルフリンジ画素の画素位置と,これに対応する第2の調整済み画像中の補正すべき画素の画素位置とが対応付けられる。 In one embodiment, the purple fringe correction apparatus includes a purple fringe processing information table that stores at least a purple fringe flag indicating whether or not each pixel position is a purple fringe pixel, and the purple fringe detection means includes a purple fringe detection means. In response to detection of a fringe pixel, the purple fringe flag corresponding to the pixel position is turned on. The purple fringe correcting means is stored in the purple fringe processing information table in the second adjusted image. The pixel at the pixel position where the purple fringe flag is turned on is corrected. The pixel position of the purple fringe pixel detected by the purple fringe detection means is associated with the pixel position of the pixel to be corrected in the second adjusted image corresponding thereto.
好ましくは,上記パープルフリンジ補正対象画像データの入力を受付け,上記パープルフリンジ補正対象画像がどのような光源種類の光源下で得られたものかを推定する光源推定手段を備え,上記ホワイトバランス調整手段は,上記光源推定手段によって推定された光源種類の光源色を白色に色補正するためのホワイトバランス・ゲインを上記第1のホワイトバランス・ゲインに用いる。 Preferably, the white balance adjustment unit includes a light source estimation unit that receives input of the purple fringe correction target image data and estimates under which light source type the purple fringe correction target image is obtained. Uses a white balance gain for correcting the light source color of the light source type estimated by the light source estimation means to white as the first white balance gain.
パープルフリンジは,光源に代表される高い輝度を有する被写体が撮像されたときに撮像画像中の輝度差の大きな輪郭(エッジ)付近に現れる。光源色を白色に近づける色補正,すなわち光源色補正を行うホワイトバランス処理が行われると,被写体像中の高輝度部分(光源画像部分)がより白色に近づくように色補正され,その高輝度部分(光源画像部分)の周囲に存在するパープルフリンジがより紫色に明確に表わされた画像を得ることができる。推定される光源種類に対応するホワイトバランス・ゲインを上記第1のホワイトバランス・ゲインとして用いることによって,第1の調整済み画像を用いた高い精度によるパープルフリンジ画素の検出を達成することができる。 Purple fringe appears in the vicinity of a contour (edge) having a large luminance difference in a captured image when a subject having high luminance represented by a light source is imaged. When color correction that brings the light source color closer to white, that is, white balance processing that performs light source color correction, the high-intensity part (light source image part) in the subject image is color-corrected so that it becomes closer to white. An image in which purple fringes existing around (light source image portion) are clearly expressed in purple can be obtained. By using the white balance gain corresponding to the estimated light source type as the first white balance gain, it is possible to achieve purple fringe pixel detection with high accuracy using the first adjusted image.
上記光源推定手段によって推定される光源種類ごとに,光源色を白色に近づけるためのホワイトバランス・ゲインを記憶したゲイン記憶手段を備えてもよい。ゲイン記憶手段二記憶されているホワイトバランス・ゲインのうち,推定された光源種類に対応するホワイトバランス・ゲインが第1のホワイトバランス・ゲインとして用いられる。 You may provide the gain memory | storage means which memorize | stored the white balance gain for making a light source color close to white for every light source kind estimated by the said light source estimation means. Of the white balance gains stored in the gain storage means 2, the white balance gain corresponding to the estimated light source type is used as the first white balance gain.
好ましくは,ホワイトバランスの調整の強さが強められるようにホワイトバランス・ゲインを変更する調整強化手段を備え,上記ホワイトバランス調整手段は,上記調整強化手段によって変更されたホワイトバランス・ゲインを上記第1のホワイトバランス・ゲインとして用いる。推定される光源種類に対応するホワイトバランス・ゲインを,光源色をさらに白色に近づけるように変更する(光源色補正を強化する)ことによって,高輝度部分(光源)の周囲に存在するパープルフリンジがより紫色に明確に表わされた画像が得られるので,パープルフリンジ画素をさらに精度良く検出することができる。 Preferably, the image processing apparatus further comprises adjustment strengthening means for changing the white balance gain so that the strength of white balance adjustment is enhanced, and the white balance adjusting means is configured to change the white balance gain changed by the adjustment strengthening means to the first balance gain. Used as a white balance gain of 1. By changing the white balance gain corresponding to the estimated light source type so that the light source color is closer to white (strengthening the light source color correction), purple fringes around the high-intensity part (light source) Since an image clearly expressed in purple is obtained, purple fringe pixels can be detected with higher accuracy.
一実施態様では,上記光源推定手段によって複数の光源種類が推定された場合に,上記ホワイトバランス調整手段は,推定された複数の光源種類のそれぞれについて,光源色を白色に近づけるためのホワイトバランス・ゲインのそれぞれを用いて,複数の第1の調整済み画像データを出力するものであり,上記パープルフリンジ検出手段は,複数の第1の調整済み画像データのそれぞれについてパープルフリンジ画素を検出するものであり,上記パープルフリンジ補正手段は,複数の第1の調整済み画像データのそれぞれにおいて検出されたパープルフリンジ画素に対応する,第2の調整済み画像中の画素を補正するものである。複数種類の光源下で撮像された画像が処理対象であっても,精度良くパープルフリンジ画素を見つけることができる。 In one embodiment, when a plurality of light source types are estimated by the light source estimation unit, the white balance adjustment unit is configured to provide a white balance for making the light source color close to white for each of the estimated plurality of light source types. Each of the gains is used to output a plurality of first adjusted image data, and the purple fringe detection means detects purple fringe pixels for each of the plurality of first adjusted image data. The purple fringe correcting means corrects pixels in the second adjusted image corresponding to the purple fringe pixels detected in each of the plurality of first adjusted image data. Even if images captured under a plurality of types of light sources are to be processed, purple fringe pixels can be found with high accuracy.
他の実施態様では,第1の調整済み画像データについて検出されたパープルフリンジ画素の数をカウントするパープルフリンジ画素数カウンタを備え,上記光源推定手段によって複数の光源種類が推定された場合に,上記ホワイトバランス調整手段は,推定された複数の光源種類のそれぞれについて,光源色を白色に近づけるためのホワイトバランス・ゲインのそれぞれを用いて,複数の第1の調整済み画像データを出力するものであり,上記パープルフリンジ補正手段は,上記パープルフリンジ画素数カウンタによるカウント数にしたがって,複数の第1の調整済み画像データのうちパープルフリンジ画素が最も多い第1の調整済み画像データにおいて検出されたパープルフリンジ画素に対応する,第2の調整済み画像中の画素を補正するものである。パープルフリンジ補正の効率化が図られ,パープルフリンジ補正手段における補正処理の負荷を軽減することができる。 In another embodiment, a purple fringe pixel number counter that counts the number of purple fringe pixels detected for the first adjusted image data is provided, and when a plurality of light source types are estimated by the light source estimation unit, The white balance adjustment means outputs a plurality of first adjusted image data for each of a plurality of estimated light source types using a white balance gain for making the light source color close to white. The purple fringe correcting means is configured to detect the purple fringe detected in the first adjusted image data having the largest number of purple fringe pixels among the plurality of first adjusted image data in accordance with the number counted by the purple fringe pixel number counter. Correct the pixel in the second adjusted image that corresponds to the pixel Than is. The efficiency of purple fringe correction is improved, and the load of correction processing in the purple fringe correction means can be reduced.
好ましくは,上記第2のホワイトバランス・ゲインがパープルフリンジ画素を目立ちにくくするゲインであるかを判断するゲイン判断手段,および上記ゲイン判断手段によって上記第2のホワイトバランス・ゲインがパープルフリンジ画素を目立ちにくくするゲインであることが判断された場合に,上記パープルフリンジ補正手段による補正を停止する補正停止手段を備える。 Preferably, gain determination means for determining whether the second white balance gain is a gain that makes the purple fringe pixel inconspicuous, and the second white balance gain makes the purple fringe pixel stand out by the gain determination means. Correction stop means for stopping correction by the purple fringe correction means when the gain is determined to be difficult is provided.
パープルフリンジは紫色で画像中に表れる。紫色はRGB成分で言えば赤(R)成分および青(B)成分を多く含む。したがって,パープルフリンジ補正装置においてパープルフリンジ補正の対象とされる第2の処理済み画像の生成に用いられる第2のホワイトバランス・ゲインが赤成分および青成分を弱めるものであれば,第2の処理済み画像においてパープルフリンジ画素があるとしても,第2のホワイトバランス・ゲインによって紫色が弱められていることになる。また,第2のホワイトバランス・ゲインが赤成分および青成分を大きく強めるものであれば,第2の処理済み画像においてパープルフリンジ画素があるとしても,画像全体が紫色の傾向を持つことになるのでパープルフリンジ画素は目立ちにくくなる。このように,第2のホワイトバランス・ゲインがパープルフリンジ画素を目立ちにくくするゲインである場合に,上記パープルフリンジ補正手段による補正が停止される。パープルフリンジ画素の誤補正を未然に防止することができる。 Purple fringes appear purple in the image. Purple is rich in red (R) and blue (B) components in terms of RGB components. Therefore, if the second white balance gain used to generate the second processed image that is the target of purple fringe correction in the purple fringe correction device is one that weakens the red component and the blue component, Even if there are purple fringe pixels in the finished image, the purple color is weakened by the second white balance gain. Also, if the second white balance gain greatly enhances the red and blue components, the entire image will tend to be purple even if there are purple fringe pixels in the second processed image. Purple fringe pixels are less noticeable. In this way, when the second white balance gain is a gain that makes the purple fringe pixel less noticeable, the correction by the purple fringe correcting means is stopped. It is possible to prevent erroneous correction of purple fringe pixels.
この発明は,被写体を撮像し,撮像によって得られる画像データを出力する撮像手段,および上述したパープルフリンジ補正装置を備え,上記撮像手段から出力される画像データが上記パープルフリンジ補正対象画像データとして用いる撮像装置も提供する。 The present invention includes an imaging unit that images a subject and outputs image data obtained by the imaging, and the above-described purple fringe correction device, and the image data output from the imaging unit is used as the purple fringe correction target image data. An imaging device is also provided.
図1はパープルフリンジが発生している画像に対して互いに異なるホワイトバランス・ゲインを用いてホワイトバランス調整を行ったときの,ホワイトバランス調整後の画像中のパープルフリンジ画素の色相値をa*b*色空間にプロットしたものを示している。 FIG. 1 shows a hue value of a purple fringe pixel in an image after white balance adjustment when white balance adjustment is performed on an image in which purple fringe is generated using different white balance gains. * Shows a plot in color space.
パープルフリンジは光源に代表される高輝度の被写体が撮像されることで輝度差(輝度勾配)の大きな輪郭(エッジ)が撮像画像中に存在する場合に,画像輪郭の周辺に表れる。 Purple fringe appears around the image contour when a high brightness subject represented by a light source is imaged and a contour (edge) having a large luminance difference (luminance gradient) is present in the captured image.
パープルフリンジが発生している画像についてホワイトバランス処理が行われると,パープルフリンジの色も変化する。図1において,光源と無関係にホワイトバランス調整を行った画像では青に近い色でパープルフリンジが表れている。他方,光源に合わせたホワイトバランス調整を行った画像ではパープル(マゼンタ)に近い色でパープルフリンジが表れている。 When white balance processing is performed on an image in which purple fringes are generated, the color of purple fringes also changes. In FIG. 1, purple fringes appear in a color close to blue in an image that has undergone white balance adjustment regardless of the light source. On the other hand, purple fringes appear in a color close to purple (magenta) in an image that has been subjected to white balance adjustment in accordance with the light source.
この実施例の撮像装置は,ホワイトバランス調整によってパープルフリンジの色が変化することに着目して,ホワイトバランス調整を利用してパープルフリンジの検出精度を高めるものである。 The imaging apparatus of this embodiment focuses on the fact that the color of purple fringe changes due to white balance adjustment, and improves the detection accuracy of purple fringe using white balance adjustment.
図2はパープルフリンジ補正機能を有する,第1実施例の撮像装置の電気的構成を概略的に示すブロック図である。図3は図2に示す撮像装置におけるパープルフリンジ補正処理の手順を,後述する2つの画像(パープルフリンジ検出用画像11および記録用画像21)のそれぞれに対する処理の観点から示すフローチャートである。
FIG. 2 is a block diagram schematically showing an electrical configuration of the image pickup apparatus of the first embodiment having a purple fringe correction function. FIG. 3 is a flowchart showing the procedure of purple fringe correction processing in the imaging apparatus shown in FIG. 2 from the viewpoint of processing for each of two images (purple
図2を参照して,撮像装置はCCD1を備え,その前方にレンズ2が設けられている。被写体像を表す光線束はレンズ2を通してCCD1の受光面上に入射する。CCD1には多数のフォトダイオード(光電変換素子)が受光面上に二次元的に配置され,かつ受光面上には所定の配列構造(ベイヤー配列,Gストライプ配列など)を持って配列された赤(R),緑(G),青(B)のカラーフィルタが設けられている。CCD1はタイミング・ジェネレータ5から出力されるタイミング・パルスにもとづいて動作する。
Referring to FIG. 2, the imaging apparatus includes a
CCD1から出力された被写体像を表すアナログ信号はアナログ/ディジタル変換回路3に入力し,ディジタル画像データに変換される。アナログ/ディジタル変換回路3も,タイミング・ジェネレータ5から出力されるタイミング・パルスにもとづいて動作する。ディジタル画像データは信号配列変換回路4に入力し,点順次配列の画像データが面順次配列の画像データに変換される。画素ごとにR(赤)成分,G(緑)成分およびB(青)成分のデータを有する1フレーム分の画像データがメモリ6に一時的に記憶される。
An analog signal representing the subject image output from the
撮像装置は第1のホワイトバランス処理回路10と第2のホワイトバランス処理回路20の2つのホワイトバランス処理回路を備えている。メモリ6に記憶された画像データは第1のホワイトバランス処理回路10と第2のホワイトバランス処理回路20の両方に与えられる。後述するように,第1のホワイトバランス処理回路10と第2のホワイトバランス処理回路20では基本的に互い異なるゲインが用いられて画像データに対するホワイトバランス調整が行われる。
The imaging apparatus includes two white balance processing circuits, a first white
第1のホワイトバランス処理回路10によってホワイトバランス調整された画像11はパープルフリンジ検出回路30に入力し,パープルフリンジ画素の検出に用いられる。パープルフリンジ画素が検出されると,検出されたパープルフリンジ画素の位置を表すデータ(PFフラグ)がパープルフリンジ補正回路31に与えられる。
The
パープルフリンジ補正回路31には,第2のホワイトバランス処理回路20によってホワイトバランス調整された画像21が与えられる。パープルフリンジ検出回路30において検出されたパープルフリンジ画素に対応する位置にある画像21中の画素に対して,パープルフリンジ補正回路31によってパープルフリンジを低減する処理が行われる。
The purple
パープルフリンジ補正された画像21はガンマ補正回路32に入力しガンマ補正が行われる。ガンマ補正後の画像21はRGB/YC変換回路33において輝度データおよび色差データに変換され,表示装置(LCD)34に与えられて画像再生される。また,輝度データおよび色差データは圧縮回路35において圧縮され,圧縮画像データが記録媒体36に記録される。
The purple fringe-corrected
図3に示すフローチャートを参照して,第1のホワイトバランス処理回路10,第2のホワイトバランス処理回路20,パープルフリンジ検出回路30およびパープルフリンジ補正回路31の処理を説明する。
Processing of the first white
上述のように,メモリ6に記憶された画像データは,第1のホワイトバランス処理回路10と第2のホワイトバランス処理回路20の両方に与えられる。第1のホワイトバランス処理回路10および第2のホワイトバランス処理回路20は,いずれも画像データによって表される画像のホワイトバランスを調整するものであるが,調整に用いられるホワイトバランス・ゲイン(以下,WBゲインという)が異なる。
As described above, the image data stored in the
図4は,第1のホワイトバランス処理回路10において用いられるWBゲインと第2のホワイトバランス処理回路20において用いられるWBゲインの違いの一例を,R/G−B/G色空間上に示すものである。
FIG. 4 shows an example of the difference between the WB gain used in the first white
ホワイトバランス調整では,一般に,白色で表されるべき物体を白色によって表現するためのWBゲイン(R成分に対するWBゲイン,G成分に対するWBゲインおよびB成分に対するWBゲイン)が画像データに乗算される。 In white balance adjustment, image data is generally multiplied by WB gain (WB gain for R component, WB gain for G component and WB gain for B component) for expressing an object to be represented in white by white.
図4においてR:G:Bの比が1:1:1である点が符号Wによって示されている。符号Wは白色を示す(以下,白色点Wという)。 In FIG. 4, the point where the ratio of R: G: B is 1: 1: 1 is indicated by the symbol W. The symbol W indicates white (hereinafter referred to as white point W).
処理対象の画像データがタングステン光源下で得られたものであり,白色で表されるべき物体が画像中において黄色を帯びているとする。この場合,黄色の色味を白色に近づける処理が,第1のホワイトバランス処理回路10および第2のホワイトバランス処理回路20において行われる。
It is assumed that the image data to be processed is obtained under a tungsten light source, and an object to be represented in white is yellowish in the image. In this case, the process of bringing the yellow color closer to white is performed in the first white
図4の符号Tで示す画素(以下,画素Tという)を白色点Wに向けて調節するためのホワイトバランス調整が行われるとする。画素Tの色を白色点Wに近づける処理が行われるのは,第1のホワイトバランス処理回路10および第2のホワイトバランス処理回路20において共通する。ここで,第1のホワイトバランス処理回路10は,第2のホワイトバランス処理回路20よりも,画素Tの色をより白色点Wに近づける処理を行う。すなわち,第1のホワイトバランス処理回路10と第2のホワイトバランス処理回路20とではホワイトバランス処理に用いられるWBゲインが異なっており,第1のホワイトバランス処理回路10は,第2のホワイトバランス処理回路20よりも,画素Tの色をより白色点Wに近づける(光源色補正を強める)WBゲインを用いて画像データをホワイトバランス調整する。図4において,画素Tを第1のホワイトバランス処理回路10によってホワイトバランス調整した後のものが符号PF(□印)によって示されている。画素Tを第2のホワイトバランス処理回路20によってホワイトバランス調整した後のものが符号N(△印)によって示されている。
Assume that white balance adjustment for adjusting the pixel indicated by the symbol T in FIG. 4 (hereinafter referred to as pixel T) toward the white point W is performed. The processing for bringing the color of the pixel T closer to the white point W is common to the first white
パープルフリンジは,光源のような高い輝度を有する被写体が撮像されたときに,撮像画像中の輝度差の大きな輪郭(エッジ)付近に現れる。光源色補正が行われるようにホワイトバランス処理を行うと,被写体像中の高輝度部分(光源画像部分)がより白色に近づくように色補正(光源色補正)され,その高輝度部分(光源画像部分)の周囲に存在するパープルフリンジはほぼ正確に紫色を帯びた画像となる。光源色補正するWBゲインを用いて画像データをホワイトバランス調整する第1のホワイトバランス処理回路10によってホワイトバランス調整された画像は,パープルフリンジ画素の検出に適したものと言える。次に説明するように,第1のホワイトバランス処理回路10によってホワイトバランス調整された画像はパープルフリンジ画素の検出に用いられる。第1のホワイトバランス処理回路10によってホワイトバランス調整された画像を,以下,「パープルフリンジ検出用画像11」(またはPF検出用画像11)と呼ぶ。第1のホワイトバランス処理回路10におけるホワイトバランス調整に用いられるWBゲインを「パープルフリンジ強調ゲイン」(またはPF強調ゲイン)と呼ぶ。
Purple fringe appears in the vicinity of a contour (edge) having a large luminance difference in a captured image when a subject having high luminance such as a light source is imaged. When white balance processing is performed so that light source color correction is performed, color correction (light source color correction) is performed so that the high-luminance portion (light source image portion) in the subject image approaches white, and the high-luminance portion (light source image) The purple fringe existing around (part) is almost exactly a purple image. An image whose white balance is adjusted by the first white
他方,第2のホワイトバランス処理回路20は,たとえば撮影者による設定に応じたWBゲインを用いて画像データをホワイトバランス調整する。第2のホワイトバランス処理回路20によってホワイトバランス調整された画像データが記録媒体36に記録されることになる。以下,第2のホワイトバランス処理回路20によってホワイトバランス調整された画像を「記録用画像21」と呼ぶ。第2のホワイトバランス処理回路20におけるホワイトバランス調整に用いられるWBゲインを「ユーザ設定ゲイン」と呼ぶ。ユーザによって任意に設定されたユーザ設定ゲインが用いられると,一般に,図4に示す符号N(△印)(画素Tを第2のホワイトバランス処理回路20によってホワイトバランス調整した後の画素の色)は,画素Tと白色点Wを結ぶ直線上から外れることになる。
On the other hand, the second white
第1のホワイトバランス処理回路10においてパープルフリンジ強調ゲインが用いられて画像データがホワイトバランス調整される(ステップ51)。パープルフリンジ検出用画像11が得られる。他方,第2のホワイトバランス処理回路10ではユーザ設定ゲインが用いられて画像データがホワイトバランス調整される(ステップ41)。記録用画像21が得られる。
The first white
図2に戻って,パープルフリンジ検出用画像11がパープルフリンジ検出回路30(以下,PF検出回路30という)に与えられる。PF検出回路30において,パープルフリンジ検出用画像11中にパープルフリンジ画素(偽色画素)が含まれるかどうかが検出される。
Returning to FIG. 2, the purple
PF検出回路30は,パープルフリンジ検出用画像11を構成する画素ごとに,それが紫色を有する画素であるかどうかを判断し(たとえば,CrデータおよびCbデータに基づいて判断する),紫色であると判断された画素(以下,PF画素という)についてパープルフリンジ・フラグ(以下,PFフラグという)をオンする処理を行う(ステップ52でYES ,ステップ53)。
The
図5は,PFフラグのオン/オフ・データを含むパープルフリンジ処理情報テーブル22(以下,PF処理情報テーブル22という)の一例を示している。 FIG. 5 shows an example of a purple fringe processing information table 22 (hereinafter referred to as a PF processing information table 22) including on / off data of the PF flag.
PF処理情報テーブル22には,処理対象の画像データによって表される画像を構成する画素のそれぞれについて,画素位置(X座標,Y座標),PFフラグ(1または0),輝度,彩度等のデータが含まれている。上記パープルフリンジ検出回路30によって処理対象画素(注目画素)がPF画素であると判断されると,その注目画素の画素位置に対応するPFフラグがオンされてPF処理情報テーブル22に書き込まれる(ステップ52でYES )。注目画素がPF画素ではないと判断された場合には,その注目画素についてPFフラグがオンされないのは言うまでもない(ステップ52でNO)。PF処理情報テーブル22は撮像装置が有する記憶装置(図示略)に記憶される。
In the PF processing information table 22, the pixel position (X coordinate, Y coordinate), PF flag (1 or 0), luminance, saturation, etc. are set for each of the pixels constituting the image represented by the image data to be processed. Contains data. When the purple
PF検出回路30によるパープルフリンジ画素の検出処理が終わると,パープルフリンジ補正回路31(以下,PF補正回路31という)による処理に進む。
When the purple fringe pixel detection process by the
PF補正回路31は,PF検出回路30によってPFフラグがオンされた画素位置を上記PF処理情報テーブル22から取得し,その画素位置にある記録用画像21中の画素に対して紫色を目立たなくする処理(パープルフリンジ補正)(以下,PF補正)を行う(ステップ42でYES ,ステップ43)。PF補正は色度値(Crデータ,Cbデータ)を変更する補正であってもよいし,彩度を低める補正であってもよい。PFフラグがオフである画素位置にある画素についてPF補正回路31におけるPF補正は行われないのは言うまでもない(ステップ42でNO)。
The
記録用画像21のすべての画素についての処理が終了すると,PF補正後の記録用画像21を表すデータがガンマ補正回路32,RGB/YC変換回路33を経てLCD34における画像表示に用いられ,または記録媒体36に圧縮された上で記録される。
When the processing for all the pixels of the
このように,パープルフリンジ強調ゲインが用いられてホワイトバランス調整されたPF検出用画像11が用いられてPF画素が検出されるので,PF画素の検出精度は高い。PF補正は高い精度で検出されたPF画素に対応する位置にある記録用画像21中の画素に対して行われる。記録用画像21はユーザ設定ゲインにしたがって撮影者の意図に沿ってホワイトバランス調整されたものである。したがって,パープルフリンジが精度良く補正され,かつ撮影者の好みに沿うホワイトバランス調整が施された記録用画像21を得ることができる。
Thus, since the PF pixel is detected by using the
上述した第1実施例において,第1,第2の2つのホワイトバランス処理回路10,20が用いられているが,もちろん一つのホワイトバランス処理回路を用いてPF検出用画像11および記録用画像21を生成してもよい。また,基本的には第1のホワイトバランス処理回路10において用いられるパープルフリンジ強調ゲインと,第2のホワイトバランス処理回路20において用いられるユーザ設定ゲインは異なる値であるが,ユーザによる設定によっては,ユーザ設定ゲインがパープルフリンジ強調ゲインと同じになることがあるのは言うまでもない。
In the first embodiment described above, the first and second white
また,第1実施例においてハードウエア回路(ホワイトバランス処理回路10,20,PF検出回路30,およびPF補正回路31)が用いられて,パープルフリンジ画素の検出処理,パープルフリンジ画素の補正処理等が行われているが,コンピュータまたは信号処理装置にこれらの処理を実行させてもよい。この場合には,記憶装置(図示略)にホワイトバランス調整処理,パープルフリンジ画素の検出処理,パープルフリンジ画素の補正処理等を実行するプログラムが記憶され,このプログラムがコンピュータまたは信号処理装置によって実行される。このことは,後述する他の実施例でも同様である。
In the first embodiment, hardware circuits (white
第2実施例
図6は第2実施例のパープルフリンジ補正機能を有する撮像装置の電気的構成を概略的に示すブロック図である。図2に示す第1実施例の撮像装置のブロック図とは,CPU7および光源種類ごとのホワイトバランス・ゲインが記憶されたメモリ(AWBメモリ)7aが追加されている点が異なる。AWBメモリ7aはCPU7に接続されている。図7は,図6に示す撮像装置におけるパープルフリンジ補正処理の手順を,パープルフリンジ検出用画像11および記録用画像21のそれぞれに対する処理の観点から示すフローチャートである。
Second Embodiment FIG. 6 is a block diagram schematically showing an electrical configuration of an imaging apparatus having a purple fringe correction function according to a second embodiment. 2 is different from the block diagram of the image pickup apparatus of the first embodiment shown in FIG. 2 in that a CPU 7 and a memory (AWB memory) 7a storing a white balance gain for each light source type are added. The
第2実施例の撮像装置では,CPU7によって撮影シーン光源推定処理が行われる(ステップ44)。たとえば,撮像によって得られた画像データ中の赤(R),緑(G),青(B)の各色についての色データの積算値がCPU7によって算出され,その積算値(ヒストグラム)に基づいて撮影が行われた際の光源種類(色温度でもよい)が推定される。推定される光源種類には晴天の日の太陽,雲りの日の太陽,蛍光灯,タングステンなどがある。撮影シーン光源推定処理において,メモリ6に記憶された画像データが複数の光源種類のうちのいずれの光源種類の光源下における撮像によって得られたのかが推定(識別)される。
In the imaging apparatus of the second embodiment, the photographing scene light source estimation process is performed by the CPU 7 (step 44). For example, an integrated value of color data for each color of red (R), green (G), and blue (B) in image data obtained by imaging is calculated by the CPU 7, and photographing is performed based on the integrated value (histogram). The light source type (color temperature may be used) is estimated. Estimated types of light sources include sunny day sun, cloudy day sun, fluorescent light, and tungsten. In the photographing scene light source estimation process, it is estimated (identified) whether the image data stored in the
推定される光源種類に応じて色再現の目標は変わってくるので,目標を満たすようなホワイトバランス・ゲインがあらかじめ求められている。すなわち,上述した複数の光源種類のそれぞれに対応するホワイトバランス・ゲインがAWBメモリ7aに記憶されている。図8はAWBメモリ7aに記憶されている光源種類のそれぞれに対応するホワイトバランス・ゲインを示している。
Since the target of color reproduction varies depending on the estimated light source type, a white balance gain that satisfies the target is required in advance. That is, the white balance gain corresponding to each of the plurality of light source types described above is stored in the
CPU7は推定された光源種類に対応するホワイトバランス・ゲインをAWBメモリ7aから読出し,第1のホワイトバランス処理回路10に与える。もちろん,読出されたホワイトバランス・ゲインに対して,撮像によって得られた画像データに基づいて微調整を行ってもよい。すなわち,第1のホワイトバランス処理回路10では自動ホワイトバランス調整(AWB)が行われる(ステップ51)。以下,AWBメモリ7aに記憶されているホワイトバランス・ゲインを,AWBゲインと呼ぶ。もちろん,自動ホワイトバランス調整(AWB)に用いられるゲインは撮像によって得られた画像データのみを用いて(すなわち,AWBメモリ7aを用いずに)所定のアルゴリズムにしたがって決定してもよい。
The CPU 7 reads the white balance gain corresponding to the estimated light source type from the
自動ホワイトバランス調整では,推定される光源種類に対応するAWBゲインが用いられてホワイトバランス調整が行われ,光源色を白色に近づける色補正が行われる。パープルフリンジ画素がより紫色を持つように色補正されるから,AWBゲインはパープルフリンジ強調ゲインであると言える。AWBゲインを用いてホワイトバランス調整が行われることによって,光源画像部分の周囲に存在するパープルフリンジがより明確に表わされた画像が得られる。自動ホワイトバランス調整された画像がPF検出用画像11として用いられる。
In the automatic white balance adjustment, the AWB gain corresponding to the estimated light source type is used to perform white balance adjustment, and color correction is performed to bring the light source color closer to white. Since the color correction is performed so that the purple fringe pixel has a more purple color, it can be said that the AWB gain is a purple fringe enhancement gain. By performing white balance adjustment using the AWB gain, an image in which purple fringes existing around the light source image portion are more clearly represented is obtained. An image subjected to automatic white balance adjustment is used as the
他方,第2のホワイトバランス処理回路20では,上述のように,たとえば撮影者による設定に応じたユーザ設定ゲインが用いられてホワイトバランス調整が行われる(ステップ41)。撮影者の意図に沿ったホワイトバランス調整が,第2のホワイトバランス処理回路20において行われる。
On the other hand, in the second white
PF検出用画像11が用いられてPF検出回路30においてPF画素検出処理が行われ,見つかったPF画素に対応する位置にある記録用画像21中の画素に対して,PF補正回路31においてPF補正処理が行われるのは,第1実施例と同様である(ステップ52,42,43)。
The
AWBメモリ7aに記憶されている光源種類のそれぞれに対応するAWBゲインそのものではなく,光源色をより白色に近づける(光源色補正を強める)ようにAWBゲインを調整したゲイン(光源色補正効果を強めたゲイン)(図4参照)を用いて,第1のホワイトバランス処理回路10におけるホワイトバランス調整を行ってもよい。光源画像部分の周囲に存在するパープルフリンジがさらに紫色を帯びて表わされたPF検出用画像11を得ることができる。AWBゲインの調整はCPU7によって行われる。
A gain obtained by adjusting the AWB gain so as to make the light source color closer to white (intensify the light source color correction) rather than the AWB gain corresponding to each of the light source types stored in the
第3実施例
図9はパープルフリンジ補正機能を有する第3実施例の撮像装置の電気的構成を概略的に示すブロック図である。図10は図9に示す撮像装置におけるパープルフリンジ補正処理の手順を示すフローチャートである。
Third Embodiment FIG. 9 is a block diagram schematically showing an electrical configuration of an image pickup apparatus of a third embodiment having a purple fringe correction function. FIG. 10 is a flowchart showing a procedure of purple fringe correction processing in the imaging apparatus shown in FIG.
第3実施例は,複数種類の光源を表す画像が処理対象画像に含まれる場合に好適な実施例である。 The third embodiment is a preferred embodiment when images representing a plurality of types of light sources are included in the processing target image.
第3実施例の撮像装置には,撮像装置によって推定可能な光源種類の数に対応する数の第1のホワイトバランス処理回路101〜10Nが設けられている。第1のホワイトバランス処理回路101〜10Nのそれぞれに対応して,複数のPF検出回路301〜30Nが設けられている。
The imaging apparatus of the third embodiment, the first white
CPU7による撮影シーン光源推定処理の結果,処理対象の画像データによって表される画像が複数種類の光源が混在した状況下で撮影されたものであることが推定された場合に,推定された光源種類の数に対応する数のPF検出用画像111〜11Nが作成される。たとえば,CPU7によって3つの光源種類の存在が推定された場合,その3つの光源種類に対応するAWBゲインがAWBメモリ7aから読出され,3つの第1のホワイトバランス処理回路101,102および103にそれぞれ与えられる。第1のホワイトバランス処理回路101,102および103のそれぞれにおいてPF検出用画像111〜113が作成される。PF検出用画像111〜113はPF検出回路301〜303にそれぞれ与えられる。PF検出回路301〜303のそれぞれにおいてPF画素検出処理が行われる(ステップ511,512,51N,ステップ521,522,52N)。
As a result of the photographing scene light source estimation processing by the CPU 7, when it is estimated that the image represented by the image data to be processed is photographed in a situation where a plurality of types of light sources are mixed, the estimated light source type The number of
複数のPF画素検出処理のそれぞれにおいて,PF画素が検出されるとその画素位置についてPFフラグ(図5参照)がオンされる(ステップ531,532,53N)。 In each of the plurality of PF pixel detection processes, when a PF pixel is detected, the PF flag (see FIG. 5) is turned on for the pixel position (steps 53 1 , 53 2 , 53 N ).
PFフラグがオンされている画素位置の画素について,記録用画像21が用いられてPF補正回路31におけるPF補正が行われるのは第1実施例と同様である(ステップ42,43)。
As in the first embodiment, the
第3実施例では,上述のように,複数種類の光源画像が含まれる場合に,光源種類ごとのAWBゲインが用いられてホワイトバランス調整が行われ,複数のPF検出用画像111〜11Nを用いてPF画素検出処理が行われる。一のPF検出用画像では見つからなかったPF画素であっても,他のPF検出用画像においては見つけることができる可能性が高まる。PF画素を精度良く見つけることができる。
In the third embodiment, as described above, when a plurality of types of light source images are included, the AWB gain for each light source type is used to perform white balance adjustment, and a plurality of
パープルフリンジは輝度差の大きな画像輪郭周辺に発生するので,複数のPF検出用画像111〜11Nのうち,所定値以上の輝度の画像部分(ハイライト部分)を有するPF検出用画像111〜11NだけについてPF検出回路301〜303においてPF画素を検出するようにしてもよい。複数のPF検出用画像111〜11Nにおいて画像輪郭(エッジ)を検出し,検出された画像輪郭の周辺の画素のみをPF検出回路301〜303におけるPF画素の検出対象としてもよい。所定値以上の輝度の画像部分(ハイライト部分)を最も多く有するPF検出用画像のみを用いてPF画素を検出するようにしてもよい。
Since the purple fringe occurs around the image contour having a large luminance difference, among the plurality of
第4実施例
図11はパープルフリンジ補正機能を有する第4実施例の撮像装置の電気的構成を概略的に示すブロック図である。第3実施例のブロック図とはPFフラグカウンタ38が設けられている点が異なる。図12は図11に示す撮像装置におけるパープルフリンジ補正処理の手順を示すフローチャートである。
Fourth Embodiment FIG. 11 is a block diagram schematically showing an electrical configuration of an image pickup apparatus according to a fourth embodiment having a purple fringe correction function. This is different from the block diagram of the third embodiment in that a
第3実施例と同様に,複数のPF検出用画像111〜11Nのそれぞれに対するPF画素検出処理が行われ,複数のPF検出用画像111〜11Nのそれぞれにおいて,画素ごとにPFフラグがオン/オフされる(ステップ511〜51N,ステップ521〜52N,ステップ531〜53N)。
Like the third embodiment, PF pixel detecting process for each of a plurality of
PFフラグカウンタ38において,複数のPF検出用画像111〜11Nのそれぞれにおいて見つかったPF画素の数が,PF検出用画像111〜11Nごとに,オンされているPFフラグにしたがって算出(カウント)され,複数のPF検出用画像111〜11Nのうち,見つかったPF画素の数が最も多いPF検出用画像が用いられて(見つかったPF画素の数が最も多いPF検出用画像において検出されたPF画素に対応する,記録用画像21中の画素について),PF補正回路31におけるPF補正処理が行われる(ステップ54,ステップ42,43)。
In the
見つかったFP画素が最も多いPF検出用画像が用いられてPF補正が行われるので,高い精度でPF補正を行うことができる。また,第3実施例と比べてPF補正回路31におけるPF補正の負荷を小さくすることができる。
Since the PF detection image having the largest number of found FP pixels is used to perform the PF correction, the PF correction can be performed with high accuracy. Further, the load of the PF correction in the
第4実施例においても,所定値以上の輝度の画像部分(ハイライト部分)を有するPF検出用画像111〜11NだけPF検出回路301〜303においてPF画素を検出するようにしてもよい。複数のPF検出用画像111〜11Nにおいて画像輪郭(エッジ)を検出し,検出された画像輪郭の周辺の画素のみをPF検出回路301〜303におけるPF画素の検出対象としてもよい。
Also in the fourth embodiment, PF pixels may be detected by the
第5実施例
図13はパープルフリンジ補正機能を有する第5実施例の撮像装置の電気的構成を概略的に示すブロック図である。図6に示す第2実施例の撮像装置のブロック図とはセレクタ71が加えられている点が異なる。図14および図15は,図13に示す撮像装置におけるパープルフリンジ補正処理の手順を示すフローチャートである。
Fifth Embodiment FIG. 13 is a block diagram schematically showing an electrical configuration of an image pickup apparatus according to a fifth embodiment having a purple fringe correction function. It differs from the block diagram of the image pickup apparatus of the second embodiment shown in FIG. 6 in that a
第2のホワイトバランス処理回路20において用いられ,記録用画像21を得るためのユーザ設定ゲインにおけるRゲインおよびBゲインがいずれも小さい値であるとすると,記録用画像21にPF画素が存在しても,その色(パープル色)は第2のホワイトバランス処理回路20におけるホワイトバランス調整において弱められて目立たないものになる。第5実施例では,記録用画像21を得るために用いられるユーザ設定ゲインにおけるRゲインおよびBゲインがいずれも小さい値である場合に,PF補正回路31におけるPF補正を行わないようにすることによってPF補正による誤補正リスクを小さくするものである。
If the R gain and B gain in the user setting gain for obtaining the
他方,記録用画像21を得るためのユーザ設定ゲインにおけるRゲインおよびBゲインがいずれも大きい値であるとすると,記録用画像21は画像全体がパープル色の傾向を持つことになり,PF画素が存在してもそのPF画素が目立ちにくくなる。第5実施例では,記録用画像21を得るために用いられるユーザ設定ゲインにおけるRゲインおよびBゲインがいずれも大きい値である場合にも,PF補正回路31におけるPF補正を行わないようにすることによってPF補正による誤補正リスクを小さくするものでもある。
On the other hand, if the R gain and the B gain in the user setting gain for obtaining the
図14を参照して,図14は,記録用画像21を得るためのユーザ設定ゲインにおけるRゲインおよびBゲインがいずれも小さい値である場合に,PF補正回路31におけるPF補正を行わないようにする処理を示している。
Referring to FIG. 14, FIG. 14 shows that the
CPU7によって,ユーザ設定ゲインにおけるRゲインおよびBゲインが小さいかどうかが判断される(ステップ81)。たとえば,ユーザ設定ゲイン中のRゲインおよびBゲインのいずれもが,色温度5000Kのときを白基準としたときのRおよびBゲインの0.75倍以下の値であれば,ユーザ設定ゲインにおけるRゲインおよびBゲインは小さいと判断される(ステップ81でYES )。この場合,セレクタ71によってすべてのPFフラグをオフにする命令がPF検出回路30に与えられる。PF検出回路30はPF検出用画像11においてPF画素を検出したとしてもPFフラグをオンしない。これにより,PF補正回路31においてはPF補正が行われないことになる(ステップ42でNO)。
The CPU 7 determines whether or not the R gain and B gain in the user set gain are small (step 81). For example, if both the R gain and the B gain in the user set gain are values equal to or less than 0.75 times the R gain and the B gain when the color temperature is 5000K, the R at the user set gain is set. It is determined that the gain and the B gain are small (YES in step 81). In this case, the
他方,ユーザ設定ゲインにおけるRゲインおよびBゲインが小さくはない(たとえば,ユーザ設定ゲイン中のRゲインおよびBゲインのいずれかが,色温度5000Kのときを白基準としたときのRおよびBゲインの0.75倍よりも大きい値)場合には(ステップ81でNO),第1実施例と同様,PF検出用画像11が用いられてPF画素の検出処理が行われ,見つかったPF画素に対応する位置にある記録用画像21中の画素に対してPF補正処理が行われる(ステップ53,ステップ42でYES ,ステップ43)。
On the other hand, the R gain and the B gain in the user set gain are not small (for example, the R gain and the B gain when any of the R gain and B gain in the user set gain is based on the white reference when the color temperature is 5000K). If the value is larger than 0.75 times (NO in step 81), the PF pixel detection processing is performed using the
図15を参照して,図15は,記録用画像21を得るためのユーザ設定ゲインにおけるRゲインおよびBゲインがいずれも大きい値である場合に,PF補正回路31におけるPF補正を行わないようにする処理である。
Referring to FIG. 15, FIG. 15 shows that the
CPU7によって,ユーザ設定ゲインにおけるRゲインおよびBゲインが大きいかどうかが判断される(ステップ82)。たとえば,ユーザ設定ゲイン中のRゲインおよびBゲインのそれぞれが,色温度5000Kのときを白基準としたときのRゲインおよびBゲインの3倍以上の値であれば,ユーザ設定ゲインにおけるRゲインおよびBゲインは大きいと判断される(ステップ82でYES )。この場合,セレクタ71によってすべてのPFフラグをオフする命令がPF検出回路30に与えられる。PF検出回路30はPF検出用画像11においてPF画素を検出したとしてもPFフラグをオンしない。これにより,PF補正回路31においてはPF補正が行われないことになる(ステップ42でNO)。
The CPU 7 determines whether or not the R gain and B gain in the user set gain are large (step 82). For example, if each of the R gain and B gain in the user set gain is a value that is at least three times the R gain and B gain when the color temperature is 5000K, the R gain and the user set gain are It is determined that the B gain is large (YES in step 82). In this case, the
他方,ユーザ設定ゲインにおけるRゲインおよびBゲインが大きくはない(たとえば,ユーザ設定ゲイン中のRゲインおよびBゲインのいずれかが,色温度5000Kのときを白基準としたときのRゲインおよびBゲインの3倍よりも小さい値)と判断されると(ステップ82でNO),第1実施例と同様に,PF検出用画像11が用いられてPF画素検出処理が行われ,見つかったPF画素に対応する位置にある記録用画像21中の画素に対してPF補正処理が行われる(ステップ53,ステップ42でYES ,ステップ43)。
On the other hand, the R gain and the B gain in the user set gain are not large (for example, the R gain and the B gain when any of the R gain and the B gain in the user set gain is based on the white reference when the color temperature is 5000K). If it is determined that the value is smaller than 3 times (NO in step 82), as in the first embodiment, the
もちろん,図14に示す処理と図15に示す処理とを組合わせた処理を行ってもよいのは言うまでもない。図14のステップ81の判断と図15のステップ82の判断の両方が行われて,PF補正の実行または非実行が判断される。
Of course, it goes without saying that the processing shown in FIG. 14 and the processing shown in FIG. 15 may be combined. Both the determination at
1 CCD
2 レンズ
6 メモリ
7 CPU
7a AWBメモリ
10 第1のホワイトバランス処理回路
20 第2のホワイトバランス処理回路
30 パープルフリンジ検出回路
31 パープルフリンジ補正回路
38 パープルフリンジ・フラグ・カウンタ
71 セレクタ
1 CCD
2
7a AWB memory
10 First white balance processing circuit
20 Second white balance processing circuit
30 Purple fringe detection circuit
31 Purple fringe correction circuit
38 Purple Fringe Flag Counter
71 selector
Claims (11)
上記ホワイトバランス調整手段から出力される第1の調整済み画像データの入力を受付け,第1の調整済み画像データを用いてパープルフリンジ画素を検出するパープルフリンジ検出手段,ならびに
上記ホワイトバランス調整手段から出力される第2の調整済み画像データの入力を受付け,上記パープルフリンジ検出手段において検出されたパープルフリンジ画素に対応する,第2の調整済み画像データによって表される第2の調整済み画像中の画素を補正するパープルフリンジ補正手段を備え,
上記第1のホワイトバランス・ゲインが上記パープルフリンジ画素の検出に適するものであることを特徴とする,
パープルフリンジ補正装置。 The first adjusted image data is received by receiving purple fringe correction target image data and adjusting the white balance by applying the first and second white balance gains to the purple fringe correction target image data. And white balance adjusting means for outputting the second adjusted image data,
Receiving the input of the first adjusted image data output from the white balance adjusting means, detecting purple fringe pixels using the first adjusted image data, and outputting from the white balance adjusting means; Pixels in the second adjusted image represented by the second adjusted image data corresponding to the purple fringe pixels detected by the purple fringe detecting means and receiving the second adjusted image data input With purple fringe correction means to correct
The first white balance gain is suitable for detecting the purple fringe pixel;
Purple fringe correction device.
上記パープルフリンジ検出手段は,
パープルフリンジ画素の検出に応じて,その画素位置に対応するパープルフリンジ・フラグをオンするものであり,
上記パープルフリンジ補正手段は,
上記第2の調整済み画像において,パープルフリンジ処理情報テーブルに記憶されている上記パープルフリンジ・フラグがオンされている画素位置の画素を補正するものである,
請求項1に記載のパープルフリンジ補正装置。 A purple fringe processing information table for storing at least a purple fringe flag indicating whether or not each pixel position is a purple fringe pixel;
The purple fringe detection means is
In response to detection of a purple fringe pixel, the purple fringe flag corresponding to the pixel position is turned on.
The purple fringe correction means is
In the second adjusted image, the pixel at the pixel position where the purple fringe flag stored in the purple fringe processing information table is turned on is corrected.
The purple fringe correction apparatus according to claim 1.
上記ホワイトバランス調整手段は,
上記光源推定手段によって推定された光源種類の光源色を白色に色補正するためのホワイトバランス・ゲインを上記第1のホワイトバランス・ゲインに用いる,
請求項1に記載のパープルフリンジ補正装置。 Light source estimation means for receiving input of the purple fringe correction target image data and estimating under what kind of light source the purple fringe correction target image is obtained;
The white balance adjustment means
A white balance gain for correcting the light source color of the light source type estimated by the light source estimation means to white is used as the first white balance gain.
The purple fringe correction apparatus according to claim 1.
請求項3に記載のパープルフリンジ補正装置。 For each light source type estimated by the light source estimation means, a gain storage means for storing a white balance gain for making the light source color close to white is provided.
The purple fringe correction apparatus according to claim 3.
上記ホワイトバランス調整手段は,
上記調整強化手段によって変更されたホワイトバランス・ゲインを上記第1のホワイトバランス・ゲインに用いる,
請求項3に記載のパープルフリンジ補正装置。 There is an adjustment enhancement means to change the white balance gain so that the strength of white balance adjustment can be strengthened.
The white balance adjustment means
The white balance gain changed by the adjustment enhancing means is used as the first white balance gain.
The purple fringe correction apparatus according to claim 3.
上記ホワイトバランス調整手段は,
推定された複数の光源種類のそれぞれについて,光源色を白色に近づけるためのホワイトバランス・ゲインのそれぞれを用いて,複数の第1の調整済み画像データを出力するものであり,
上記パープルフリンジ検出手段は,
複数の第1の調整済み画像データのそれぞれについてパープルフリンジ画素を検出するものであり,
上記パープルフリンジ補正手段は,
複数の第1の調整済み画像データのそれぞれにおいて検出されたパープルフリンジ画素に対応する,第2の調整済み画像中の画素を補正するものである,
請求項3に記載のパープルフリンジ補正装置。 When multiple light source types are estimated by the light source estimation means,
The white balance adjustment means
For each of a plurality of estimated light source types, a plurality of first adjusted image data is output using each of the white balance and gain for bringing the light source color close to white.
The purple fringe detection means is
Detecting purple fringe pixels for each of the plurality of first adjusted image data;
The purple fringe correction means is
Correcting pixels in the second adjusted image corresponding to purple fringe pixels detected in each of the plurality of first adjusted image data;
The purple fringe correction apparatus according to claim 3.
上記光源推定手段によって複数の光源種類が推定された場合に,
上記ホワイトバランス調整手段は,
推定された複数の光源種類のそれぞれについて,光源色を白色に近づけるためのホワイトバランス・ゲインのそれぞれを用いて,複数の第1の調整済み画像データを出力するものであり,
上記パープルフリンジ検出手段は,
複数の第1の調整済み画像データのそれぞれについてパープルフリンジ画素を検出するものであり,
上記パープルフリンジ補正手段は,
上記パープルフリンジ画素数カウンタによるカウント数にしたがって,複数の第1の調整済み画像データのうちパープルフリンジ画素が最も多い第1の調整済み画像データにおいて検出されたパープルフリンジ画素に対応する,第2の調整済み画像中の画素を補正するものである,
請求項3に記載のパープルフリンジ補正装置。 A purple fringe pixel counter that counts the number of purple fringe pixels detected for the first adjusted image data;
When multiple light source types are estimated by the light source estimation means,
The white balance adjustment means
For each of a plurality of estimated light source types, a plurality of first adjusted image data is output using each of the white balance and gain for bringing the light source color close to white.
The purple fringe detection means is
Detecting purple fringe pixels for each of the plurality of first adjusted image data;
The purple fringe correction means is
A second fringe pixel corresponding to the purple fringe pixel detected in the first adjusted image data having the largest number of purple fringe pixels among the plurality of first adjusted image data in accordance with the count number of the purple fringe pixel number counter. To correct pixels in the adjusted image,
The purple fringe correction apparatus according to claim 3.
上記ゲイン判断手段によって上記第2のホワイトバランス・ゲインがパープルフリンジ画素を目立ちにくくするゲインであることが判断された場合に,上記パープルフリンジ補正手段による補正を停止する補正停止手段を備える,
請求項1に記載のパープルフリンジ補正装置。 Gain determining means for determining whether the second white balance gain is a gain that makes purple fringe pixels inconspicuous, and a gain that makes the second white balance gain indistinguish purple fringe pixels by the gain determining means A correction stop means for stopping the correction by the purple fringe correction means when it is determined that
The purple fringe correction apparatus according to claim 1.
請求項1から8のいずれか一項に記載をパープルフリンジ補正装置を備え,
上記撮像手段から出力される画像データが上記パープルフリンジ補正対象画像データとして用いられる,
撮像装置。 An imaging unit that images a subject and outputs image data obtained by imaging, and a purple fringe correction device according to any one of claims 1 to 8,
The image data output from the imaging means is used as the purple fringe correction target image data.
Imaging device.
パープルフリンジ検出手段が,上記ホワイトバランス調整手段から出力される第1の調整済み画像データの入力を受付け,第1の調整済み画像データを用いてパープルフリンジ画素を検出し,
パープルフリンジ補正手段が,上記ホワイトバランス調整手段から出力される第2の調整済み画像データの入力を受付け,第2の調整済み画像データによって表される第2の調整済み画像について,上記パープルフリンジ検出手段において検出されたパープルフリンジ画素に対応する画素を補正するようにパープルフリンジ補正装置を制御する方法であって,
上記第1のホワイトバランス・ゲインが上記パープルフリンジ画素の検出に適するものである,
方法。 The white balance adjusting means receives the input of the purple fringe correction target image data, applies the first and second white balance gains to the purple fringe correction target image data, respectively, and adjusts the white balance. 1 adjusted image data and 2nd adjusted image data are output,
Purple fringe detection means receives the input of the first adjusted image data output from the white balance adjustment means, detects purple fringe pixels using the first adjusted image data,
Purple fringe correction means receives the input of the second adjusted image data output from the white balance adjustment means, and detects the purple fringe detection for the second adjusted image represented by the second adjusted image data. A method of controlling a purple fringe correction device to correct a pixel corresponding to a purple fringe pixel detected in the means,
The first white balance gain is suitable for detecting the purple fringe pixel;
Method.
パープルフリンジ補正対象画像データの入力を受付け,上記パープルフリンジ補正対象画像データに対して第1および第2のホワイトバランス・ゲインをそれぞれ適用してホワイトバランスを調整して,第1の調整済み画像データおよび第2の調整済み画像データを出力するホワイトバランス調整手段,
上記ホワイトバランス調整手段から出力される第1の調整済み画像データの入力を受付け,第1の調整済み画像データを用いてパープルフリンジ画素を検出するパープルフリンジ検出手段,
上記ホワイトバランス調整手段から出力される第2の調整済み画像データの入力を受付け,上記パープルフリンジ検出手段において検出されたパープルフリンジ画素に対応する,第2の調整済み画像データによって表される第2の調整済み画像中の画素を補正するパープルフリンジ補正手段として機能させるプログラムであって,
上記第1のホワイトバランス・ゲインが上記パープルフリンジ画素の検出に適するものである,
プログラム。 Computer
The first adjusted image data is received by receiving purple fringe correction target image data and adjusting the white balance by applying the first and second white balance gains to the purple fringe correction target image data. And white balance adjusting means for outputting the second adjusted image data,
Purple fringe detection means for receiving input of first adjusted image data output from the white balance adjustment means and detecting purple fringe pixels using the first adjusted image data;
Second input represented by the second adjusted image data corresponding to the purple fringe pixel detected by the purple fringe detection unit, which receives the input of the second adjusted image data output from the white balance adjustment unit. A program for functioning as a purple fringe correcting means for correcting pixels in an adjusted image of
The first white balance gain is suitable for detecting the purple fringe pixel;
program.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2010074865A JP5378282B2 (en) | 2010-03-29 | 2010-03-29 | Purple fringe correction device, control method thereof, and program for correcting purple fringe |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2010074865A JP5378282B2 (en) | 2010-03-29 | 2010-03-29 | Purple fringe correction device, control method thereof, and program for correcting purple fringe |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2011211328A JP2011211328A (en) | 2011-10-20 |
JP5378282B2 true JP5378282B2 (en) | 2013-12-25 |
Family
ID=44941964
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2010074865A Expired - Fee Related JP5378282B2 (en) | 2010-03-29 | 2010-03-29 | Purple fringe correction device, control method thereof, and program for correcting purple fringe |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP5378282B2 (en) |
Families Citing this family (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP6318549B2 (en) * | 2013-10-30 | 2018-05-09 | リコーイメージング株式会社 | Image processing apparatus, imaging apparatus, image processing method, and image processing program |
JP6354134B2 (en) * | 2013-10-30 | 2018-07-11 | リコーイメージング株式会社 | Image processing apparatus, imaging apparatus, image processing method, and image processing program |
CN106251298B (en) * | 2016-07-22 | 2020-03-31 | 华为技术有限公司 | Method and apparatus for processing image |
CN111353960B (en) * | 2020-03-02 | 2022-04-26 | 浙江大学 | Image purple boundary correction method based on region growing and cross channel information |
CN111970449B (en) * | 2020-08-27 | 2022-03-29 | 豪威科技(武汉)有限公司 | Image processing method, device, terminal and computer readable storage medium |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2002218495A (en) * | 2001-01-15 | 2002-08-02 | Fuji Photo Film Co Ltd | White balance control method and electronic camera |
JP4487902B2 (en) * | 2005-11-09 | 2010-06-23 | ソニー株式会社 | Image processing apparatus and method, and program |
JP2010068465A (en) * | 2008-09-12 | 2010-03-25 | Canon Inc | Image processing apparatus, image capturing apparatus, and image processing method |
-
2010
- 2010-03-29 JP JP2010074865A patent/JP5378282B2/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
JP2011211328A (en) | 2011-10-20 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8229217B2 (en) | Image processing method and apparatus, image processing program and medium storing this program | |
US7969480B2 (en) | Method of controlling auto white balance | |
US7880783B2 (en) | Image pickup apparatus and method | |
US9936172B2 (en) | Signal processing device, signal processing method, and signal processing program for performing color reproduction of an image | |
JP5378282B2 (en) | Purple fringe correction device, control method thereof, and program for correcting purple fringe | |
JP2012165204A (en) | Signal processing apparatus, signal processing method, imaging apparatus, and imaging processing method | |
US11889202B2 (en) | Image processing apparatus, image processing method, and storage medium | |
JP5782311B2 (en) | Imaging apparatus and control method thereof | |
US20090041295A1 (en) | Image Display Device, Image Display Method, and Image Display Program | |
KR101854432B1 (en) | Method and apparatus for detecting and compensating back light frame | |
US20070211165A1 (en) | Imaging device, method for controlling imaging device, program of method for controlling imaging device, recording medium in which program of method for controlling imaging device is recorded | |
JPWO2013099792A1 (en) | Image processing apparatus, method and program, and imaging apparatus | |
US8885062B2 (en) | Auto white balance adjustment system, auto white balance adjustment method, and camera module | |
US11190713B2 (en) | Image processing apparatus and method, and imaging apparatus | |
JP2017130836A (en) | Image processing apparatus, image processing method, and program | |
JP5706705B2 (en) | Image processing apparatus, control method therefor, and imaging apparatus | |
US8804025B2 (en) | Signal processing device and imaging device | |
JP4857856B2 (en) | Electronic camera having saturation adjustment function and image processing program | |
JP2019004281A (en) | Image processing device | |
KR100581526B1 (en) | A digital still camera operating white correction in response to variable light source | |
JP5264695B2 (en) | Image processing method, image processing apparatus, and imaging apparatus | |
JP2013176144A (en) | Image processing method, image processor and imaging apparatus | |
JP7383393B2 (en) | Image processing device, image processing method, program, and storage medium | |
KR102315200B1 (en) | Image processing apparatus for auto white balance and processing method therefor | |
JP2008153834A (en) | Image processing apparatus |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20120606 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20130805 |
|
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: 20130903 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20130925 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 5378282 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 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 |