[go: up one dir, main page]

JP2009118052A - Image signal processing method and apparatus - Google Patents

Image signal processing method and apparatus Download PDF

Info

Publication number
JP2009118052A
JP2009118052A JP2007287281A JP2007287281A JP2009118052A JP 2009118052 A JP2009118052 A JP 2009118052A JP 2007287281 A JP2007287281 A JP 2007287281A JP 2007287281 A JP2007287281 A JP 2007287281A JP 2009118052 A JP2009118052 A JP 2009118052A
Authority
JP
Japan
Prior art keywords
color
signal
correction
color correction
false
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2007287281A
Other languages
Japanese (ja)
Inventor
Hidekazu Kurahashi
秀和 倉橋
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.)
Fujifilm Corp
Original Assignee
Fujifilm 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 Fujifilm Corp filed Critical Fujifilm Corp
Priority to JP2007287281A priority Critical patent/JP2009118052A/en
Publication of JP2009118052A publication Critical patent/JP2009118052A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Color Image Communication Systems (AREA)
  • Studio Devices (AREA)
  • Image Processing (AREA)
  • Color Television Image Signal Generators (AREA)
  • Facsimile Image Signal Circuits (AREA)

Abstract

【課題】偽色の発生を抑えて高品質な画像を得ることができる画像信号処理方法及び装置を提供する。
【解決手段】画素ごとのR、G、B各色の色信号に所定の色補正ゲインをかけて色補正し、Nビットの信号として出力する場合において、各色信号に所定の色補正ゲインをかけて色補正し、所望のビット数(N)よりも上位側に余裕を持たせたビット数(M)の色信号を生成する。そして、その色補正後の各色信号の中で最大となる色信号を選出し、選出した色信号をNビットにすると、飽和する信号レベルを検出する。検出された信号レベルを超える色信号について、等倍より大きな偽色補正ゲインをかけて偽色補正し、Nビットとなるようリミットをかけて出力する。
【選択図】 図10
An image signal processing method and apparatus capable of obtaining a high-quality image while suppressing the occurrence of false colors.
When color correction is performed by applying a predetermined color correction gain to color signals of R, G, and B colors for each pixel and outputting as an N-bit signal, a predetermined color correction gain is applied to each color signal. Color correction is performed to generate a color signal having the number of bits (M) with a margin above the desired number of bits (N). Then, when the color signal that is the maximum among the color signals after the color correction is selected and the selected color signal is set to N bits, a saturated signal level is detected. A color signal exceeding the detected signal level is subjected to false color correction by applying a false color correction gain larger than the same magnification, and is output with a limit to be N bits.
[Selection] Figure 10

Description

本発明は画像信号処理方法及び装置に係り、特に画像信号を構成する各色信号に所定の色補正ゲインをかけて色補正する画像信号処理方法及び装置に関する。   The present invention relates to an image signal processing method and apparatus, and more particularly to an image signal processing method and apparatus for performing color correction by applying a predetermined color correction gain to each color signal constituting the image signal.

デジタルカメラで行われる信号処理の一つにホワイトバランス補正がある。ホワイトバランス補正は、色温度が異なる光源状態でも、白色を正確に白く映し出すように補正する処理であり、白色の被写体を撮像したときに得られるR、G、Bの各色信号が、すべて等しくなるようにゲインをかけるものである。   One of the signal processing performed by a digital camera is white balance correction. White balance correction is a process for correcting white so that white is accurately projected even under light source conditions with different color temperatures, and the R, G, and B color signals obtained when a white subject is imaged are all equal. So that gain is applied.

しかし、このようにゲインをかけてホワイトバランス補正すると、図18に示すように、色ごとに飽和レベルが異なるため、高輝度部分で偽色が発生するという問題がある。   However, when white balance correction is performed by applying gain in this way, as shown in FIG. 18, there is a problem that false color occurs in a high luminance portion because the saturation level differs for each color.

そこで、特許文献1では、ゲイン処理後の各色信号が飽和状態であるか否かを判定し、飽和状態であれば、他の色信号のレベルに置き換えることで、色飽和による偽色の発生を防止する方法が提案されている。
特開2004−328564号公報
Therefore, in Patent Document 1, it is determined whether or not each color signal after gain processing is in a saturated state, and if it is in a saturated state, generation of a false color due to color saturation is performed by replacing it with the level of another color signal. Methods for preventing it have been proposed.
JP 2004-328564 A

しかしながら、特許文献1の方法では、閾値判別の結果によって、色が切り換わってしまうという欠点がある。   However, the method of Patent Document 1 has a drawback in that colors are switched depending on the result of threshold discrimination.

本発明はこのような事情に鑑みてなされたもので、偽色の発生を抑えて高品質な画像を得ることができる画像信号処理方法及び装置を提供することを目的とする。   The present invention has been made in view of such circumstances, and an object thereof is to provide an image signal processing method and apparatus capable of obtaining a high-quality image while suppressing generation of false colors.

請求項1に係る発明は、前記目的を達成するために、画像信号を構成する各色信号に所定の色補正ゲインをかけて色補正し、Nビットの色信号を生成する画像信号処理方法であって、画像信号を構成する各色信号に所定の色補正ゲインをかけて色補正し、M(N<M)ビットの色信号を生成するステップと、色補正後の各色信号の中で最大となる色信号を選出するステップと、選出した色信号をNビットにすると、飽和する信号レベルを検出するステップと、色補正後の各色信号に対して、前記信号レベルを超える色信号に所定の偽色補正ゲインをかけて偽色補正し、Nビットの色信号を生成するステップと、からなることを特徴とする画像信号処理方法を提供する。   The invention according to claim 1 is an image signal processing method for generating an N-bit color signal by performing color correction by applying a predetermined color correction gain to each color signal constituting the image signal in order to achieve the object. Thus, each color signal constituting the image signal is subjected to color correction by applying a predetermined color correction gain to generate a color signal of M (N <M) bits, and the maximum among the color signals after color correction. A step of selecting a color signal, a step of detecting a signal level that saturates when the selected color signal is N bits, and a predetermined false color for a color signal that exceeds the signal level for each color signal after color correction An image signal processing method comprising: a step of performing false color correction by applying a correction gain and generating an N-bit color signal.

請求項1に係る発明では、まず、各色信号に所定の色補正ゲインをかけて色補正し、所望のビット数(N)よりも上位側に余裕を持たせたビット数(M)の色信号を生成する。そして、その色補正後の各色信号の中で最大となる色信号を選出し、選出した色信号をNビットにすると、飽和する信号レベルを検出する。ここで、この検出された信号レベルを超える色信号については、Nビットにすると、各色の比が正確に保たれず、偽色が生じる。そこで、各色信号に対して、検出された信号レベルを超える色信号に所定の偽色補正ゲインをかけ、少しでも元の色の比に保たれるように補正し、Nビットの色信号を生成する。このように処理することにより、偽色が発生する領域については、彩度が落とされて、色の変化が分かりにくくなり、見た目に違和感のない高品質な画像を得ることができる。   According to the first aspect of the present invention, first, color correction is performed by applying a predetermined color correction gain to each color signal, and the color signal having the number of bits (M) with a margin above the desired number of bits (N). Is generated. Then, when the color signal that is the maximum among the color signals after the color correction is selected and the selected color signal is set to N bits, a saturated signal level is detected. Here, if the color signal exceeding the detected signal level is set to N bits, the ratio of each color is not accurately maintained and a false color is generated. Therefore, for each color signal, a predetermined false color correction gain is applied to the color signal exceeding the detected signal level, and the color signal is corrected so as to be kept at the original color ratio as much as possible, thereby generating an N-bit color signal. To do. By processing in this manner, the saturation is reduced in the region where the false color is generated, so that the color change becomes difficult to understand, and a high-quality image without a sense of incongruity can be obtained.

請求項2に係る発明は、前記目的を達成するために、前記画像信号が取得された時の撮影モードの情報を取得し、該撮影モードに応じて前記偽色補正ゲインを切り替えることを特徴とする請求項1に記載の画像信号処理方法を提供する。   The invention according to claim 2 is characterized in that, in order to achieve the object, information on a shooting mode when the image signal is acquired is acquired, and the false color correction gain is switched according to the shooting mode. An image signal processing method according to claim 1 is provided.

請求項2に係る発明によれば、画像信号が取得された時の撮影モードに応じて偽色補正ゲインが切り替えられる。これにより、より適切な偽色補正ゲインを用いて、偽色補正を行うことができる。たとえば、マニュアルモードの場合は、撮影者の意図を考慮して、常に等倍となるように偽色補正ゲインを設定する(偽色補正は行わない)。また、水中モードの場合は、B成分が多く、B信号の飽和が生じやすいため、B信号の飽和に対しては積極的に補正するように偽色補正ゲインを設定する。また、夕焼けモードの場合は、R成分が多く、R信号の飽和が生じやすいため、R信号の飽和に対しては積極的に補正するように偽色補正ゲインを設定する。このように、撮影シーンに応じて設定される撮影モードの情報を利用することにより、より適切に偽色補正を行うことができ、より高品質な画像を得ることができる。   According to the second aspect of the present invention, the false color correction gain is switched according to the shooting mode when the image signal is acquired. Thereby, false color correction can be performed using a more appropriate false color correction gain. For example, in the case of the manual mode, the false color correction gain is set so as to be always the same magnification in consideration of the photographer's intention (no false color correction is performed). In the underwater mode, since there are many B components and the B signal is likely to be saturated, the false color correction gain is set so as to positively correct the saturation of the B signal. In the sunset mode, since there are many R components and the R signal is likely to be saturated, the false color correction gain is set so as to positively correct the saturation of the R signal. In this way, by using information on the shooting mode set according to the shooting scene, false color correction can be performed more appropriately, and a higher quality image can be obtained.

請求項3に係る発明は、前記目的を達成するために、前記画像信号が取得された時の色温度の情報を取得し、該色温度に応じて前記偽色補正ゲインを切り替えることを特徴とする請求項1に記載の画像信号処理方法を提供する。   The invention according to claim 3 is characterized in that, in order to achieve the object, information on a color temperature when the image signal is acquired is acquired, and the false color correction gain is switched according to the color temperature. An image signal processing method according to claim 1 is provided.

請求項3に係る発明によれば、画像信号が取得された時の色温度に応じて偽色補正ゲインが切り替えられる。これにより、より適切な偽色補正ゲインを用いて、偽色補正を行うことができる。たとえば、低色温度の場合は、全体として赤みが強く、R信号の飽和が広範囲に生じやすいため、R信号の飽和に対しては積極的に補正するように偽色補正ゲインを設定する。一方、高色温度の場合は、全体として青みが強く、B信号の飽和が広範囲に生じやすいため、B信号の飽和に対しては積極的に補正するように偽色補正ゲインを設定する。このように、撮影シーンの色温度の情報を利用することにより、より適切に偽色補正を行うことができ、より高品質な画像を得ることができる。   According to the invention of claim 3, the false color correction gain is switched in accordance with the color temperature when the image signal is acquired. Thereby, false color correction can be performed using a more appropriate false color correction gain. For example, when the color temperature is low, redness is strong as a whole and saturation of the R signal is likely to occur in a wide range. Therefore, the false color correction gain is set so as to positively correct the saturation of the R signal. On the other hand, in the case of a high color temperature, since the entire image is bluish and the B signal saturation is likely to occur in a wide range, the false color correction gain is set so as to positively correct the B signal saturation. As described above, by using the information on the color temperature of the shooting scene, false color correction can be performed more appropriately, and a higher quality image can be obtained.

請求項4に係る発明は、前記目的を達成するために、前記画像信号に対してダイナミックレンジを拡大する処理を行う場合において、設定するダイナミックレンジが閾値未満の場合は、前記偽色補正は行わず、画像信号を構成する各色信号に所定の色補正ゲインをかけて色補正し、Nビットの色信号を生成することを特徴とする請求項1〜3のいずれか一に記載の画像信号処理方法を提供する。   According to a fourth aspect of the present invention, in order to achieve the above object, the false color correction is performed when the dynamic range to be set is less than a threshold when performing processing for expanding the dynamic range for the image signal. The image signal processing according to any one of claims 1 to 3, wherein each color signal constituting the image signal is subjected to a color correction by applying a predetermined color correction gain to generate an N-bit color signal. Provide a method.

ダイナミックレンジを拡大する処理を行うと、通常のダイナミックレンジでは白飛びしている被写体(全ての色信号が飽和している被写体)であっても、一部の色信号だけが飽和してしまう場合がある。その一方で請求項1〜3に係る発明のように、色補正された色信号に対して更に偽色補正すると、白に飽和しやすく、ダイナミックレンジが狭くなってしまう。そこで、請求項4に係る発明では、設定するダイナミックレンジの広狭によって偽色補正の有無を切り替え、設定するダイナミックレンジが閾値以上の場合のみ、偽色補正の処理を実施する。これにより、互いの欠点を補うことができ、より高品質な画像を得ることができる。   When processing to expand the dynamic range is performed, even if the subject is a white-out subject (a subject in which all color signals are saturated) in the normal dynamic range, only some of the color signals are saturated There is. On the other hand, if the false color correction is further performed on the color signal subjected to the color correction as in the first to third aspects of the invention, the color signal is likely to be saturated with white and the dynamic range becomes narrow. Therefore, in the invention according to claim 4, the presence or absence of false color correction is switched depending on whether the dynamic range to be set is wide or narrow, and the false color correction process is performed only when the dynamic range to be set is equal to or greater than a threshold value. Thereby, a mutual fault can be compensated and a higher quality image can be obtained.

請求項5に係る発明は、前記目的を達成するために、画像信号を構成する各色信号に所定の色補正ゲインをかけて色補正し、Nビットの色信号を生成する画像信号処理装置であって、画像信号を構成する各色信号に所定の色補正ゲインをかけて色補正し、M(N<M)ビットの色信号を生成する色補正手段と、前記色補正手段で色補正された各色信号の中で最大となる色信号を選出する選出手段と、前記選出手段で選出した色信号をNビットにすると、飽和する信号レベルを検出する検出手段と、前記色補正手段で色補正された各色信号に対して、前記信号レベルを超える色信号に所定の偽色補正ゲインをかけて偽色補正し、Nビットの色信号を生成する偽色補正手段と、を備えたことを特徴とする画像信号処理装置を提供する。   The invention according to claim 5 is an image signal processing apparatus for generating an N-bit color signal by performing color correction by applying a predetermined color correction gain to each color signal constituting the image signal in order to achieve the object. Then, each color signal constituting the image signal is subjected to a color correction by applying a predetermined color correction gain to generate a color signal of M (N <M) bits, and each color color corrected by the color correction unit Color selecting means for selecting the maximum color signal among the signals, detecting means for detecting a signal level that saturates when the color signal selected by the selecting means is set to N bits, and color correction by the color correcting means False color correction means for generating a N-bit color signal by performing false color correction on each color signal by applying a predetermined false color correction gain to the color signal exceeding the signal level. An image signal processing apparatus is provided.

請求項5に係る発明によれば、請求項1に係る発明と同様に、偽色が発生する領域で彩度を落とすことにより、見た目に違和感のない高品質な画像を得ることができる。   According to the fifth aspect of the invention, similarly to the first aspect, it is possible to obtain a high-quality image that does not seem strange to the eye by reducing the saturation in the area where the false color is generated.

請求項6に係る発明は、前記目的を達成するために、前記画像信号が取得された時の撮影モードの情報を取得する撮影モード情報取得手段を有し、前記偽色補正手段は、前記撮影モード情報取得手段で取得された撮影モードに応じて前記偽色補正ゲインを切り替えることを特徴とする請求項5に記載の画像信号処理装置を提供する。   In order to achieve the above object, the invention according to claim 6 further includes photographing mode information acquisition means for acquiring information about a photographing mode when the image signal is acquired, and the false color correction means includes the photographing color information. The image signal processing apparatus according to claim 5, wherein the false color correction gain is switched in accordance with a shooting mode acquired by a mode information acquisition unit.

請求項6に係る発明によれば、請求項2に係る発明と同様に、撮影モードに応じて偽色補正ゲインを切り替えることにより、より適切な偽色補正ゲインを用いて、偽色補正を行うことができる。   According to the invention of claim 6, as in the invention of claim 2, false color correction is performed using a more appropriate false color correction gain by switching the false color correction gain according to the shooting mode. be able to.

請求項7に係る発明は、前記目的を達成するために、前記画像信号が取得された時の色温度の情報を取得する色温度情報取得手段を有し、前記偽色補正手段は、前記色温度情報取得手段で取得された色温度に応じて前記偽色補正ゲインを切り替えることを特徴とする請求項5に記載の画像信号処理装置を提供する。   In order to achieve the above object, the invention according to claim 7 includes color temperature information acquisition means for acquiring color temperature information when the image signal is acquired, and the false color correction means includes the color 6. The image signal processing apparatus according to claim 5, wherein the false color correction gain is switched in accordance with the color temperature acquired by the temperature information acquisition means.

請求項7に係る発明によれば、請求項3に係る発明と同様に、色温度に応じて偽色補正ゲインを切り替えることにより、より適切な偽色補正ゲインを用いて、偽色補正を行うことができる。   According to the invention of claim 7, as in the invention of claim 3, false color correction is performed using a more appropriate false color correction gain by switching the false color correction gain according to the color temperature. be able to.

請求項8に係る発明は、前記目的を達成するために、前記画像信号に対してダイナミックレンジを拡大する処理を行う場合において、画像信号を構成する各色信号に所定の色補正ゲインをかけて色補正し、Nビットの色信号を生成する第2の色信号補正手段と、設定するダイナミックレンジの情報を取得するダイナミックレンジ情報取得手段と、前記第2の色信号補正手段で生成されたNビットの色信号と前記偽色信号補正手段で生成されたNビットの色信号とを取り込み、前記ダイナミックレンジ情報取得手段で取得されたダイナミックレンジが閾値未満の場合は、前記第2の色信号補正手段で生成されたNビットの色信号を出力し、閾値以上の場合は、前記偽色信号補正手段で生成されたNビットの色信号を出力する出力切替手段と、を備えたことを特徴とする請求項5〜7のいずれか一に記載の画像信号処理装置を提供する。   According to an eighth aspect of the present invention, in order to achieve the above object, when performing a process of expanding a dynamic range for the image signal, a color correction gain is applied to each color signal constituting the image signal. A second color signal correcting unit that corrects and generates an N-bit color signal; a dynamic range information acquiring unit that acquires information on a dynamic range to be set; and the N bit generated by the second color signal correcting unit When the dynamic range acquired by the dynamic range information acquisition unit is less than a threshold value, the second color signal correction unit Output switching means for outputting the N-bit color signal generated by the false color signal correcting means when the N-bit color signal generated by the false color signal is equal to or greater than a threshold value; To provide an image signal processing apparatus according to any one of claims 5-7, characterized in that there was e.

請求項8に係る発明によれば、請求項4に係る発明と同様に、設定するダイナミックレンジの広狭によって偽色補正の有無を切り替えることにより、偽色の発生を効果的に抑制することができ、高品質な画像を得ることができる。   According to the eighth aspect of the invention, similarly to the fourth aspect of the invention, the occurrence of false color can be effectively suppressed by switching the presence or absence of false color correction depending on the dynamic range to be set. High quality images can be obtained.

本発明に係る画像信号処理方法及び装置によれば、偽色の発生を抑えて高品質な画像を得ることができる。   With the image signal processing method and apparatus according to the present invention, it is possible to obtain a high-quality image while suppressing the occurrence of false colors.

以下、添付図面を参照して本発明に係る画像信号処理方法及び装置を実施するための最良の形態について説明する。   The best mode for carrying out an image signal processing method and apparatus according to the present invention will be described below with reference to the accompanying drawings.

図1、2は、それぞれ本発明が適用されたデジタルカメラ10の外観構成を示す正面斜視図と背面斜視図である。   1 and 2 are a front perspective view and a rear perspective view, respectively, showing the external configuration of the digital camera 10 to which the present invention is applied.

図1に示すように、矩形の箱状に形成されたカメラ本体12の前面には、撮影レンズ14、ストロボ16等が設けられており、また、上面には、シャッタボタン18、電源ボタン20等が設けられている。   As shown in FIG. 1, a photographing lens 14, a strobe 16 and the like are provided on the front surface of a camera body 12 formed in a rectangular box shape, and a shutter button 18, a power button 20 and the like are provided on an upper surface. Is provided.

また、図2に示すように、カメラ本体12の背面には、ズームボタン22、メニューボタン24、キャンセルボタン26、決定ボタン28、十字ボタン30、再生ボタン32等の各種操作ボタン類、各種表示を行うためのモニタ34等が設けられている。   As shown in FIG. 2, various operation buttons such as a zoom button 22, a menu button 24, a cancel button 26, a determination button 28, a cross button 30, and a play button 32, and various displays are displayed on the back of the camera body 12. A monitor 34 and the like are provided.

また、図示されていないが、カメラ本体12の底面には、メモリカードを装填するためのメモリカードスロット、バッテリを装填するためのバッテリ装填室等が開閉自在なカバーを介して設けられている。   Although not shown, the bottom surface of the camera body 12 is provided with a memory card slot for loading a memory card, a battery loading chamber for loading a battery, and the like through a cover that can be freely opened and closed.

撮影レンズ14は、沈胴式のズームレンズで構成されており、カメラの電源をONすると、カメラ本体12の前面から繰り出される。   The taking lens 14 is constituted by a retractable zoom lens, and is extended from the front surface of the camera body 12 when the camera is turned on.

ストロボ16は、キセノン管で構成されており、必要に応じて被写体に向けてストロボ光を発光する。   The strobe 16 is composed of a xenon tube, and emits strobe light toward a subject as necessary.

シャッタボタン18は、いわゆる半押しと全押しが可能な二段ストローク式の押下ボタンで構成されている。デジタルカメラ10は、このシャッタボタン18が半押しされると、AE(自動露出)、AWB(自動ホワイトバランス)、AF(自動焦点合わせ)の各処理を実行して撮影準備を行う。そして、全押しされると、本撮影の処理を実行し、撮影により得られた画像をメモリカードに記録する。   The shutter button 18 is constituted by a two-stage stroke type push button that can be pressed halfway and fully. When the shutter button 18 is half-pressed, the digital camera 10 performs AE (automatic exposure), AWB (automatic white balance), and AF (automatic focusing) processes to prepare for shooting. When the button is fully pressed, the actual shooting process is executed, and an image obtained by shooting is recorded on the memory card.

電源ボタン20は、押下式のボタンで構成されており、カメラの電源をON/OFFするのに用いられる。デジタルカメラ10は、電源OFFの状態で電源ボタン20を押すと、撮影モードの状態で起動する。そして、この撮影モードの状態で再生ボタン32を押すと、再生モードに移行する。また、電源OFFの状態で再生ボタン32を押すと、再生モードの状態で起動する。そして、この再生モードの状態でシャッタボタン18を押すと、撮影モードに移行する。   The power button 20 is a push button and is used to turn on / off the power of the camera. When the power button 20 is pressed while the power is off, the digital camera 10 is activated in the shooting mode. Then, when the playback button 32 is pressed in the state of the photographing mode, the mode is switched to the playback mode. When the playback button 32 is pressed while the power is off, the playback mode is activated. Then, when the shutter button 18 is pressed in the state of the reproduction mode, the mode is changed to the photographing mode.

ズームボタン22は、シーソー式のスイッチで構成されており、一方へ操作されると、テレ側へのズームが指示され、他方へ操作されると、ワイド側へのズームが指示される。   The zoom button 22 is constituted by a seesaw type switch, and when operated to one side, zooming to the tele side is instructed, and when operated to the other side, zooming to the wide side is instructed.

メニューボタン24は、モニタ34へのメニュー画面の表示を指示するボタンとして用いられる。本実施の形態のデジタルカメラ10は、このモニタ34に表示されるメニュー画面を利用して各種設定が行われる。たとえば、画像サイズや撮影感度、撮影モード(オートモード、マニュアルモード、絞り優先AEモード、シャッタ速度優先AEモード、プログラムAEモード、シーンプログラムモード(人物、水中、夕景、夜景、スポーツ、風景等))、ストロボモード(オート発光、強制発光、赤目軽減発光、スローシンクロ、発光禁止)、マクロモード(ON/OFF)、ホワイトバランス設定(オート、プリセット(蛍光灯、電球、晴、曇、日陰等)、マニュアル)、測光方式(分割測光、スポット、中央重点等)、フォーカス(オートエリアAF、センター固定AF、エリア選択AF、マニュアル)、AF方式(シングル、コンティニュアス)、ダイナミックレンジ(通常、広ダイナミックレンジ)等の設定が行われる。ユーザは、モニタ34の表示に従ってキャンセルボタン26、決定ボタン28、十字ボタン30等を利用して、各種設定を行う。   The menu button 24 is used as a button for instructing display of a menu screen on the monitor 34. In the digital camera 10 of the present embodiment, various settings are performed using a menu screen displayed on the monitor 34. For example, image size, shooting sensitivity, shooting mode (auto mode, manual mode, aperture priority AE mode, shutter speed priority AE mode, program AE mode, scene program mode (person, underwater, evening scene, night scene, sport, landscape, etc.)) , Flash mode (auto flash, forced flash, red-eye reduction flash, slow sync, flash off), macro mode (ON / OFF), white balance setting (auto, preset (fluorescent lamp, light bulb, clear, cloudy, shade, etc.), Manual), metering method (division metering, spot, center weight, etc.), focus (auto area AF, center fixed AF, area selection AF, manual), AF method (single, continuous), dynamic range (normal, wide dynamic) Range) and the like are set. The user makes various settings using the cancel button 26, the determination button 28, the cross button 30 and the like according to the display on the monitor 34.

なお、上記撮影モードの設定における「オートモード」は、画像サイズと撮影感度を除く全ての設定をカメラ側が自動で行って撮影するモード、「マニュアルモード」は、絞りとシャッタ速度を自由に設定して撮影できるモード、「絞り優先AEモード」は、絞りを自由に設定して撮影できるオートモード、「シャッタ速度優先AEモード」はシャッタ速度を自由に設定して撮影できるオートモード、「プログラムAEモード」は、絞りとシャッタ速度以外を自由に設定できるオートモードである。   Note that “Auto mode” in the shooting mode settings above is a mode in which the camera automatically performs all settings except image size and shooting sensitivity, and “Manual mode” allows the aperture and shutter speed to be set freely. “Aperture priority AE mode” is an auto mode in which the aperture can be set freely. “Shutter speed priority AE mode” is an auto mode in which the shutter speed can be freely set. “Program AE mode” "Is an auto mode in which settings other than the aperture and shutter speed can be freely set.

また、「シーンプログラムモード」は、シーンに適した露出設定が自動で行われ、シーンに適した画像処理が自動で行われるモードである。ここで、「人物」は、人物撮影に適した処理が行われるモード、「水中」は、水中撮影に適した処理が行われるモード、「夕景」は、夕景撮影に適した処理が行われるモード、「夜景」は、夜景撮影に適した処理が行われるモード、「スポーツ」は、スポーツ撮影に適した処理が行われるモード、「風景」は、風景撮影に適した処理が行われるモードである。   The “scene program mode” is a mode in which an exposure setting suitable for the scene is automatically performed and image processing suitable for the scene is automatically performed. Here, “person” is a mode in which processing suitable for portrait shooting is performed, “underwater” is a mode in which processing suitable for underwater shooting is performed, and “evening” is a mode in which processing suitable for sunset shooting is performed. “Night scene” is a mode in which processing suitable for night scene photography is performed, “Sport” is a mode in which processing suitable for sports photography is performed, and “Landscape” is a mode in which processing suitable for landscape photography is performed. .

また、ダイナミックレンジの設定における「広ダイナミックレンジ」は、高輝度の部分と低輝度の部分が存在する被写体を撮影するためのモードであり、ダイナミックレンジを拡大する処理が行われる。   The “wide dynamic range” in the setting of the dynamic range is a mode for photographing a subject having a high luminance portion and a low luminance portion, and processing for expanding the dynamic range is performed.

モニタ34は、カラー液晶ディスプレイで構成され、上述した各種設定時における操作画面として使用される他、再生モード時に撮影済み画像が表示されて再生用モニタとして使用される。また、撮影時には、撮像素子で捉えた画像がスルー表示されて、電子ファインダとして使用される。   The monitor 34 is composed of a color liquid crystal display, and is used as an operation screen at the time of various settings described above. In addition, a captured image is displayed in the playback mode and used as a playback monitor. Further, at the time of photographing, an image captured by the image sensor is displayed as a through display and used as an electronic viewfinder.

図3は、デジタルカメラ10の電気的構成を示すブロック図である。   FIG. 3 is a block diagram showing an electrical configuration of the digital camera 10.

デジタルカメラ10は、全体の動作をCPU50によって統括制御される。CPU50は、所定の制御プログラムを実行することにより、操作部(シャッタボタン18、電源ボタン20、ズームボタン22、メニューボタン24、キャンセルボタン26、決定ボタン28、十字ボタン30、再生ボタン32等の各種操作部材)52から入力される操作信号に応じてデジタルカメラ10の各部を制御する。   The entire operation of the digital camera 10 is comprehensively controlled by the CPU 50. The CPU 50 executes various control programs such as the operation unit (shutter button 18, power button 20, zoom button 22, menu button 24, cancel button 26, enter button 28, cross button 30, play button 32, etc. Each part of the digital camera 10 is controlled in accordance with an operation signal input from the operation member 52.

ROM54には、このCPU50が実行する制御プログラム及び制御に必要な各種データが記録されている。CPU50は、このROM54に記録された制御プログラムをSDRAM56に読み出し、逐次実行することにより、デジタルカメラ10の各部を制御する。   The ROM 54 stores a control program executed by the CPU 50 and various data necessary for control. The CPU 50 controls each part of the digital camera 10 by reading out the control program recorded in the ROM 54 to the SDRAM 56 and sequentially executing the program.

なお、このSDRAM56は、プログラムの実行処理領域として利用されるほか、画像データ等の一時記憶領域、演算処理等の各種作業領域として利用される。   The SDRAM 56 is used as a program execution processing area, a temporary storage area for image data, and various work areas for arithmetic processing.

また、フラッシュメモリ58は、ユーザ設定情報等の各種設定情報等の記録領域として利用され、VRAM60は、モニタ34に表示させる画像データ専用の記録領域として利用される。   The flash memory 58 is used as a recording area for various setting information such as user setting information, and the VRAM 60 is used as a recording area dedicated for image data to be displayed on the monitor 34.

撮影レンズ14は、図示しないズームレンズ、フォーカスレンズ、絞りを備えており、それぞれ図示しない駆動装置に駆動されて動作する。CPU50は、図示しないレンズ制御部を介してこの駆動装置の駆動を制御して、ズームレンズ、フォーカスレンズ及び絞りの動作を制御する。   The photographic lens 14 includes a zoom lens, a focus lens, and a diaphragm (not shown), and is operated by being driven by a driving device (not shown). The CPU 50 controls the operation of the zoom lens, the focus lens, and the diaphragm by controlling the driving of the driving device via a lens control unit (not shown).

撮影レンズ14の後段には、撮像素子として、カラーCCDイメージセンサ(CCD)62が配置されている。CCD62は、周知のように多数の受光素子がマトリクス状に配列された受光面を備えている。撮影レンズ14を通過した被写体光は、このCCD62の受光面上に結像され、各受光素子によって電気信号に変換される。   A color CCD image sensor (CCD) 62 is disposed as an image pickup element at the rear stage of the photographing lens 14. As is well known, the CCD 62 has a light receiving surface on which a large number of light receiving elements are arranged in a matrix. The subject light that has passed through the photographing lens 14 forms an image on the light receiving surface of the CCD 62 and is converted into an electric signal by each light receiving element.

CCD62は、CCDドライバ64から供給される垂直転送クロック及び水平転送クロックに同期して、各画素に蓄積された電荷を1ラインずつシリアルな画像信号として出力する。CPU50は、CCDドライバ64を制御して、CCD62の駆動を制御する。   The CCD 62 outputs the charges accumulated in each pixel as a serial image signal line by line in synchronization with the vertical transfer clock and horizontal transfer clock supplied from the CCD driver 64. The CPU 50 controls the drive of the CCD 62 by controlling the CCD driver 64.

なお、各画素の電荷蓄積時間(露出時間)は、CCDドライバ64から与えられる電子シャッタ駆動信号によって決められる。CPU50は、CCDドライバ64に対して電荷蓄積時間を指示する。   The charge accumulation time (exposure time) of each pixel is determined by an electronic shutter drive signal given from the CCD driver 64. The CPU 50 instructs the CCD driver 64 about the charge accumulation time.

また、画像信号の出力は、デジタルカメラ10のモードが、撮影モードにセットされると開始される。すなわち、デジタルカメラ10のモードが、撮影モードにセットされると、モニタ34にスルー画像を表示するために、画像信号の出力が開始される。   The output of the image signal is started when the mode of the digital camera 10 is set to the shooting mode. That is, when the mode of the digital camera 10 is set to the shooting mode, output of an image signal is started in order to display a through image on the monitor 34.

CCD62から出力される画像信号は、アナログ信号であり、このアナログの画像信号は、アナログ信号処理部66に取り込まれる。   The image signal output from the CCD 62 is an analog signal, and this analog image signal is taken into the analog signal processing unit 66.

アナログ信号処理部66は、相関二重サンプリング回路(CDS)、自動ゲインコントロール回路(AGC)等を含んで構成されている。CDSは、画像信号に含まれるノイズの除去を行い、AGCは、ノイズ除去された画像信号を所定のゲインで増幅する。   The analog signal processing unit 66 includes a correlated double sampling circuit (CDS), an automatic gain control circuit (AGC), and the like. The CDS removes noise contained in the image signal, and the AGC amplifies the noise-removed image signal with a predetermined gain.

アナログ信号処理部66で所要の信号処理が施されたアナログの画像信号はA/D変換器68に取り込まれる。A/D変換器68は、取り込んだアナログの画像信号をNビット(本例では14ビット)の階調幅を持ったデジタルの画像信号に変換する。この画像信号は、いわゆるRAWデータであり、画素ごとR、G、Bの濃度を示す階調値を有している。   The analog image signal that has been subjected to the required signal processing by the analog signal processing unit 66 is taken into the A / D converter 68. The A / D converter 68 converts the captured analog image signal into a digital image signal having a gradation width of N bits (14 bits in this example). This image signal is so-called RAW data, and has a gradation value indicating the density of R, G, and B for each pixel.

A/D変換器68でデジタル信号に変換された1コマ分の画像信号は、バス70を介してSDRAM56に格納される。   The image signal for one frame converted into a digital signal by the A / D converter 68 is stored in the SDRAM 56 via the bus 70.

バス70には、上記CPU50、ROM54、SDRAM56、フラッシュメモリ58、VRAM60、A/D変換器68のほか、デジタル信号処理部100、AF検出部74、AE/AWB検出部76、圧縮/伸張処理部78、記録制御部80、表示制御部84等が接続されており、これらはバス70を介して互いに情報の送受信できるようにされている。   The bus 70 includes the CPU 50, ROM 54, SDRAM 56, flash memory 58, VRAM 60, A / D converter 68, digital signal processing unit 100, AF detection unit 74, AE / AWB detection unit 76, compression / decompression processing unit. 78, a recording control unit 80, a display control unit 84, and the like are connected, and these can exchange information with each other via a bus 70.

SDRAM56に格納された1コマ分の画像信号は、点順次(画素の順番)にデジタル信号処理部100に取り込まれる。   The image signal for one frame stored in the SDRAM 56 is taken into the digital signal processing unit 100 dot-sequentially (pixel order).

デジタル信号処理部100は、点順次に取り込んだR、G、Bの各色の画像信号(色信号)に対して所定の信号処理を施し、輝度信号Yと色差信号Cr、Cbとからなる画像信号(YC信号)を生成する。   The digital signal processing unit 100 performs predetermined signal processing on image signals (color signals) of R, G, and B colors that are captured in a dot-sequential manner, and an image signal that includes a luminance signal Y and color difference signals Cr and Cb. (YC signal) is generated.

図4は、デジタル信号処理部100の概略構成を示すブロック図である。同図に示すように、デジタル信号処理部100は、ホワイトバランスゲイン算出回路102、オフセット補正回路104、RGB補間演算回路106、ゲイン補正回路108、階調補正回路110、RGB/YC変換回路112、輪郭補正回路114、色差マトリクス回路116、色温度評価値算出回路118等を備えて構成されている。   FIG. 4 is a block diagram illustrating a schematic configuration of the digital signal processing unit 100. As shown in the figure, the digital signal processing unit 100 includes a white balance gain calculation circuit 102, an offset correction circuit 104, an RGB interpolation calculation circuit 106, a gain correction circuit 108, a gradation correction circuit 110, an RGB / YC conversion circuit 112, The image forming apparatus includes an outline correction circuit 114, a color difference matrix circuit 116, a color temperature evaluation value calculation circuit 118, and the like.

ホワイトバランスゲイン算出回路102は、ホワイトバランス補正を行うために、AE/AWB検出部76で算出された積算値を取り込み、ホワイトバランス補正用のゲイン値(色補正ゲイン)を算出する。   In order to perform white balance correction, the white balance gain calculation circuit 102 takes in the integrated value calculated by the AE / AWB detection unit 76 and calculates a white balance correction gain value (color correction gain).

オフセット補正回路104は、黒色の被写体を撮影した場合に黒色が表現されるように、SDRAM56から点順次に取り込まれたR、G、Bの各色の画像信号(Nビット)に対して所定のオフセット処理を施す。すなわち、R、G、Bの各色の画像信号に対してあらかじめ設定されたオフセット値を減算して出力する。   The offset correction circuit 104 has a predetermined offset with respect to the R, G, and B color image signals (N bits) captured in a dot-sequential manner from the SDRAM 56 so that black is expressed when a black subject is photographed. Apply processing. That is, a preset offset value is subtracted from the R, G, and B image signals and output.

RGB補間演算回路106は、オフセット処理されたR、G、Bの色信号(Nビット)を補間演算して、各画素位置におけるR、G、B3色の信号を求める。すなわち、単板式の撮像素子の場合、各画素からは、R、G、Bのいずれか一色の信号しか出力されないため、出力しない色を周囲の画素の色信号から補完演算により求める。たとえば、Rを出力する画素では、この画素位置におけるG、Bの色信号が、どの程度になるかを周囲の画素のG、B信号から補間演算により求める。   The RGB interpolation arithmetic circuit 106 interpolates the offset R, G, B color signals (N bits) to obtain R, G, B3 color signals at each pixel position. That is, in the case of a single-plate image sensor, each pixel outputs only a signal of any one color of R, G, and B. Therefore, a color that is not output is obtained from the color signals of surrounding pixels by a complementary operation. For example, in a pixel that outputs R, the level of the G and B color signals at this pixel position is determined by interpolation from the G and B signals of surrounding pixels.

なお、このようにRGB補完演算は、単板式の撮像素子に特有のものなので、撮像素子134に三板式のものを用いた場合には不要となる。   Note that the RGB complementary calculation is specific to the single-plate image sensor, and thus is not necessary when a three-plate image sensor is used as the image sensor 134.

ゲイン補正回路108は、同時化された各画素の色信号(Nビット)に対して、ホワイトバランスゲイン算出回路102で算出されたゲイン値(色補正ゲイン)を用いてホワイトバランス補正(色補正)を行うとともに、所定の偽色補正ゲインを用いて偽色補正を行う。そして、Nビット(本例では、14ビット)の信号として階調補正回路110に出力する。なお、このゲイン補正回路108における処理については、後に詳述する。   The gain correction circuit 108 uses the gain value (color correction gain) calculated by the white balance gain calculation circuit 102 to perform white balance correction (color correction) on the synchronized color signal (N bits) of each pixel. And false color correction using a predetermined false color correction gain. Then, it is output to the gradation correction circuit 110 as a signal of N bits (14 bits in this example). The processing in the gain correction circuit 108 will be described in detail later.

階調補正回路110は、ゲイン補正された画像信号に対して階調変換処理を施す。すなわち、画像データをモニタに出力すると、モニタに入力された階調値とモニタが出力する階調値との間にズレが生じることから、このズレを補正するために、ゲイン補正後の画像信号に対して所定の階調変換処理(いわゆるガンマ補正)を施す。   The gradation correction circuit 110 performs gradation conversion processing on the gain-corrected image signal. That is, when the image data is output to the monitor, a deviation occurs between the gradation value input to the monitor and the gradation value output from the monitor. In order to correct this deviation, the image signal after gain correction is performed. Is subjected to predetermined gradation conversion processing (so-called gamma correction).

図5に示すように、階調補正回路110には、上記のズレを補正するためのガンマ変換テーブルが、あらかじめ設けられている。階調補正回路110は、このガンマ変換テーブルに基づいて画像信号の入力階調値を変換する。   As shown in FIG. 5, the gradation correction circuit 110 is provided with a gamma conversion table for correcting the above-described deviation. The gradation correction circuit 110 converts the input gradation value of the image signal based on this gamma conversion table.

なお、デジタルカメラ10が広ダイナミックレンジ撮影モードにセットされている場合、所定の前処理が行われた後、上記のガンマ変換テーブルを用いた階調変換処理が行われる。以下、この前処理について説明する。   Note that when the digital camera 10 is set to the wide dynamic range shooting mode, gradation conversion processing using the gamma conversion table is performed after predetermined preprocessing. Hereinafter, this preprocessing will be described.

図6に示すように、階調補正回路110には、100%モード、200%モード、400%モードの3つの階調変換テーブルが設けられている。階調補正回路110は、入力された画像のダイナミックレンジに応じて、この3つの階調変換テーブルの中から一つを選択し、選択した階調変換テーブルに基づいて、画像信号が持つ画素ごとの階調値を変換して、前処理を施す。   As shown in FIG. 6, the gradation correction circuit 110 is provided with three gradation conversion tables of 100% mode, 200% mode, and 400% mode. The gradation correction circuit 110 selects one of the three gradation conversion tables according to the dynamic range of the input image, and for each pixel included in the image signal based on the selected gradation conversion table. The tone values are converted and pre-processed.

ここで、この前処理で用いる階調変換テーブルは、以下の手順で決定される。   Here, the gradation conversion table used in this preprocessing is determined by the following procedure.

まず、入力画像を16分割し、各領域における輝度の平均値(輝度平均値)を算出する。そして、全16領域での輝度平均値を比較することにより、輝度平均値の最大値を検出する。   First, an input image is divided into 16 and an average value of luminance (luminance average value) in each region is calculated. Then, the maximum luminance average value is detected by comparing the average luminance values in all 16 regions.

階調補正回路110は、輝度平均値の最大値が、0〜255であるとき、すなわち被写体輝度が低いと判断される場合には、100%モードを選択する。また、輝度平均値の最大値が、256〜511であるときには、200%モードを選択し、512〜1023のときには、400%モードを選択する。   The gradation correction circuit 110 selects the 100% mode when the maximum luminance average value is 0 to 255, that is, when it is determined that the subject luminance is low. When the maximum luminance average value is 256 to 511, the 200% mode is selected, and when it is 512 to 1023, the 400% mode is selected.

図7に示すように、100%モードでは、入力階調値に対して出力階調値が4倍になるように階調変換処理が施される(入力階調値が255のときに出力階調値が1023となるような直線を描く入出力特性にて階調変換処理が施される。)。   As shown in FIG. 7, in the 100% mode, gradation conversion processing is performed so that the output gradation value is four times the input gradation value (when the input gradation value is 255, the output gradation value is (Tone conversion processing is performed with input / output characteristics that draw a straight line with a tone value of 1023).

また、200%モードでは、入力階調値が高くなるにつれてなだらかなカーブを描く入出力特性にて階調変換される(入力階調値が511のときに出力階調値が1023となるような非線形のカーブを描く入出力特性にて階調変換処理が施される。)。   In the 200% mode, tone conversion is performed with input / output characteristics that draw a gentle curve as the input tone value increases (the output tone value is 1023 when the input tone value is 511). Tone conversion processing is performed with input / output characteristics that draw a non-linear curve.)

また、400%モードでは、入力階調値が高くなるにつれて更になだらかなカーブを描く入出力特性にて階調変換される(入力階調値が1023のときに出力階調値が1023となるような非線形のカーブを描く入出力特性にて階調変換処理が施される。)。   In the 400% mode, gradation conversion is performed with input / output characteristics that draw a gentler curve as the input gradation value increases (the output gradation value becomes 1023 when the input gradation value is 1023). Tone conversion processing is performed with input / output characteristics that draw a non-linear curve.)

このように、広ダイナミックレンジ撮影モードにセットされている場合、階調補正回路110に入力された画像信号は、まず、所定の階調変換テーブルによって階調変換処理(前処理)が施され、この前処理が施された画像信号が、ガンマ変換テーブルによって更に階調変換処理(ガンマ変換処理)が施される。これにより、100%モード、200%モード、400%モードの各階調変換テーブルによって階調変換処理のなされた画像信号は最終的に、図7に示すように階調値が変換されて出力される。   As described above, when the wide dynamic range shooting mode is set, the image signal input to the gradation correction circuit 110 is first subjected to gradation conversion processing (preprocessing) by a predetermined gradation conversion table, The preprocessed image signal is further subjected to gradation conversion processing (gamma conversion processing) using a gamma conversion table. As a result, the image signal that has been subjected to the gradation conversion processing by the gradation conversion tables in the 100% mode, the 200% mode, and the 400% mode is finally output after the gradation value is converted as shown in FIG. .

このように階調補正回路110は、ホワイトバランス補正された画像信号に対して所定の階調補正処理を施す。   In this way, the gradation correction circuit 110 performs a predetermined gradation correction process on the image signal that has been subjected to white balance correction.

RGB/YC変換回路112は、階調補正された画像信号から輝度信号Yと色差信号Cr、Cbとを生成する。生成された輝度信号Yと色差信号Cr、Cbは、それぞれ輪郭補正回路114、色差マトリクス回路116に出力される。   The RGB / YC conversion circuit 112 generates a luminance signal Y and color difference signals Cr and Cb from the tone-corrected image signal. The generated luminance signal Y and color difference signals Cr and Cb are output to the contour correction circuit 114 and the color difference matrix circuit 116, respectively.

輪郭補正回路114は、取り込んだ輝度信号Yに対して所定の輪郭補正処理を行う。   The contour correction circuit 114 performs a predetermined contour correction process on the acquired luminance signal Y.

一方、色差マトリクス回路116は、レベル変換処理後の色差信号Cr、Cbに対し、所定の色差マトリクス(C−MTX)を乗算して色調補正を行う。すなわち、色差マトリクス回路116には、色温度評価値に対応した色差マトリクスが複数種類設けられており、色温度評価値算出回路118が求めた色温度評価値に応じて、使用する色差マトリクスを切り替え、この切り替え後の色差マトリクスを入力された色差信号Cr、Cbに乗算し、色差信号Cr、Cbを色調補正する。   On the other hand, the color difference matrix circuit 116 performs color correction by multiplying the color difference signals Cr and Cb after the level conversion processing by a predetermined color difference matrix (C-MTX). That is, the color difference matrix circuit 116 is provided with a plurality of types of color difference matrices corresponding to the color temperature evaluation values, and the color difference matrix to be used is switched according to the color temperature evaluation values obtained by the color temperature evaluation value calculation circuit 118. Then, the color difference matrix Cr after switching is multiplied by the input color difference signals Cr and Cb to correct the color tone of the color difference signals Cr and Cb.

色温度評価値算出回路118は、AE/AWB検出部76で算出された積算値を取り込み、所定の演算処理を行って色温度評価値を算出する(光源種を判定する)。そして、算出された色温度評価値の情報を色差マトリクス回路116に出力する。   The color temperature evaluation value calculation circuit 118 takes in the integrated value calculated by the AE / AWB detection unit 76, performs a predetermined calculation process, and calculates a color temperature evaluation value (determines the light source type). Then, the calculated color temperature evaluation value information is output to the color difference matrix circuit 116.

以上のようにしてデジタル信号処理部100は、点順次に取り込んだR、G、Bの各色の画像信号から輝度信号Yと色差信号Cr、Cbとからなる画像信号(YC信号)を生成する。   As described above, the digital signal processing unit 100 generates an image signal (YC signal) including the luminance signal Y and the color difference signals Cr and Cb from the R, G, and B color image signals captured in a dot-sequential manner.

AF検出部74は、CPU50の指令に従い、SDRAM56に取り込まれたR、G、Bの各色の画像信号を取り込んでAF制御に必要な焦点評価値を算出する。このAF検出部74は、G信号の高周波成分のみを通過させるハイパスフィルタ、絶対値化処理部、画面に設定された所定のフォーカスエリア内の信号を切り出すフォーカスエリア抽出部、及び、フォーカスエリア内の絶対値データを積算する積算部を含み、この積算部で積算されたフォーカスエリア内の絶対値データを焦点評価値としてCPU50に出力する。CPU50は、AF制御時、このAF検出部74から出力される焦点評価値が極大となる位置をサーチし、その位置に撮影レンズ14のフォーカスレンズを移動させることにより、主要被写体への焦点合わせを行う。   The AF detection unit 74 takes in R, G, and B color image signals taken into the SDRAM 56 according to a command from the CPU 50 and calculates a focus evaluation value necessary for AF control. The AF detection unit 74 includes a high-pass filter that passes only high-frequency components of the G signal, an absolute value processing unit, a focus area extraction unit that extracts a signal within a predetermined focus area set on the screen, and a focus area An integration unit for integrating the absolute value data is included, and the absolute value data in the focus area integrated by the integration unit is output to the CPU 50 as a focus evaluation value. During the AF control, the CPU 50 searches for a position where the focus evaluation value output from the AF detection unit 74 is maximized, and moves the focus lens of the photographing lens 14 to that position, thereby focusing on the main subject. Do.

AE/AWB検出部76は、CPU50の指令に従い、SDRAM56に取り込まれたR、G、Bの各色の画像信号を取り込んでAE制御及びAWB制御に必要な積算値を算出する。すなわち、このAE/AWB検出部76は、一画面を複数のエリア(たとえば、8×8=64エリア)に分割し、分割されたエリアごとにR、G、B信号の積算値を算出する。CPU50は、AE制御時、このAE/AWB検出部76で算出されたエリアごとのR、G、B信号の積算値を取得し、被写体の明るさ(測光値)を求めて、適正な露光量を得るための露出設定を行う。   The AE / AWB detection unit 76 takes in the image signals of R, G, and B colors taken into the SDRAM 56 in accordance with a command from the CPU 50 and calculates an integrated value necessary for AE control and AWB control. That is, the AE / AWB detection unit 76 divides one screen into a plurality of areas (for example, 8 × 8 = 64 areas), and calculates an integrated value of R, G, and B signals for each divided area. At the time of AE control, the CPU 50 acquires an integrated value of R, G, B signals for each area calculated by the AE / AWB detection unit 76, obtains the brightness (photometric value) of the subject, and obtains an appropriate exposure amount. Set the exposure to obtain

また、CPU50は、AWB制御時、AE/AWB検出部76で算出されたエリアごとのR、G、B信号の積算値をデジタル信号処理部100のホワイトバランスゲイン算出回路102及び色温度評価値算出回路118に加える。ホワイトバランスゲイン算出回路102は、このAE/AWB検出部76で算出された積算値に基づいてホワイトバランス補正用のゲイン値(色補正ゲイン)を算出する。また、色温度評価値算出回路118は、このAE/AWB検出部76で算出された積算値に基づいて色温度評価値を算出する。   In addition, during the AWB control, the CPU 50 calculates the integrated value of the R, G, and B signals for each area calculated by the AE / AWB detection unit 76, calculates the white balance gain calculation circuit 102 of the digital signal processing unit 100, and the color temperature evaluation value. Add to circuit 118. The white balance gain calculation circuit 102 calculates a white balance correction gain value (color correction gain) based on the integrated value calculated by the AE / AWB detection unit 76. The color temperature evaluation value calculation circuit 118 calculates a color temperature evaluation value based on the integrated value calculated by the AE / AWB detection unit 76.

圧縮/伸張処理部78は、CPU50からの指令に従い、入力された輝度信号Yと色差信号Cr、Cbとからなる画像信号(YC信号)に所定形式(たとえば、JPEG)の圧縮処理を施し、圧縮画像データを生成する。また、CPU50からの指令に従い、入力された圧縮画像データに所定形式の伸張処理を施して、非圧縮の画像データを生成する。   The compression / decompression processing unit 78 applies compression processing in a predetermined format (for example, JPEG) to the image signal (YC signal) composed of the input luminance signal Y and the color difference signals Cr and Cb in accordance with a command from the CPU 50 to compress the image signal. Generate image data. Further, in accordance with a command from the CPU 50, the input compressed image data is subjected to a decompression process in a predetermined format to generate non-compressed image data.

記録制御部80は、CPU50からの指令に従い、メモリカードスロットに装填されたメモリカード82に対してデータの読み/書きを制御する。   The recording control unit 80 controls reading / writing of data with respect to the memory card 82 loaded in the memory card slot in accordance with a command from the CPU 50.

表示制御部84は、CPU50からの指令に従い、モニタ34への表示を制御する。すなわち、CPU50からの指令に従い、入力された画像信号をモニタ34に表示するための映像信号(たとえば、NTSC信号やPAL信号、SCAM信号)に変換してモニタ34に出力する。   The display control unit 84 controls display on the monitor 34 in accordance with a command from the CPU 50. That is, in accordance with a command from the CPU 50, the input image signal is converted into a video signal (for example, an NTSC signal, a PAL signal, or a SCAM signal) for display on the monitor 34 and output to the monitor 34.

次に、本実施の形態のデジタルカメラ10による基本的な撮影処理動作について説明する。   Next, a basic photographing processing operation by the digital camera 10 of the present embodiment will be described.

上記のように、デジタルカメラ10は、電源OFFの状態で電源スイッチ20を押すと、撮影モードの状態で起動する。   As described above, when the power switch 20 is pressed while the power is off, the digital camera 10 is activated in the shooting mode.

撮影モードの状態で起動すると、まず、CCD62から画像信号の出力が開始され、モニタ34にスルー表示される。撮影者は、このモニタ34の表示を見て構図を決定し、シャッタボタン18を半押しする。   When the camera is activated in the photographing mode, output of an image signal is first started from the CCD 62 and is displayed on the monitor 34 as a through display. The photographer determines the composition by looking at the display on the monitor 34 and presses the shutter button 18 halfway.

シャッタボタン18が半押しされると、CPU50にS1ON信号が入力される。CPU50は、このS1ON信号の入力に応動して、撮影準備処理、すなわちAE、AF、AWBの各処理を実行する。   When the shutter button 18 is half-pressed, an S1 ON signal is input to the CPU 50. In response to the input of the S1 ON signal, the CPU 50 executes shooting preparation processing, that is, AE, AF, and AWB processing.

まず、CCD50から出力された画像信号がアナログ信号処理部66、A/D変換器68を介してAE/AWB検出部76及びAF検出部74に加えられる。   First, the image signal output from the CCD 50 is added to the AE / AWB detection unit 76 and the AF detection unit 74 via the analog signal processing unit 66 and the A / D converter 68.

AE/AWB検出部76は、入力された画像信号からAE制御及びAWB制御に必要な積算値を算出し、CPU50に出力する。CPU50は、このAE/AWB検出部76から得られた積算値に基づき被写体輝度を算出し、適正露出を得るための絞り値、シャッタ速度等を決定する。また、ホワイトバランス補正のためにAE/AWB検出部76から得られた積算値をデジタル信号処理部100に加える。   The AE / AWB detection unit 76 calculates an integrated value necessary for AE control and AWB control from the input image signal, and outputs the integrated value to the CPU 50. The CPU 50 calculates subject brightness based on the integrated value obtained from the AE / AWB detector 76, and determines an aperture value, shutter speed, and the like for obtaining proper exposure. Further, the integrated value obtained from the AE / AWB detector 76 is added to the digital signal processor 100 for white balance correction.

AF検出部74は、入力された画像信号からAF制御に必要な積算値を算出し、CPU50に出力する。CPU50は、このAF検出部74からの出力に基づき撮影レンズ14を制御し、主要被写体に焦点を合わせる。   The AF detection unit 74 calculates an integrated value necessary for AF control from the input image signal and outputs it to the CPU 50. The CPU 50 controls the photographing lens 14 based on the output from the AF detection unit 74 and focuses on the main subject.

撮影者は、モニタ34の表示を見て画角、ピント状態等を確認し、撮影実行を指示する。すなわち、シャッタボタン18を全押しする。   The photographer looks at the display on the monitor 34, confirms the angle of view, the focus state, and the like, and instructs the execution of photographing. That is, the shutter button 18 is fully pressed.

シャッタボタン18が全押しされると、CPU50にS2ON信号が入力される。CPU50は、このS2ON信号に応動して、本撮影の処理を実行する。   When the shutter button 18 is fully pressed, an S2 ON signal is input to the CPU 50. The CPU 50 executes the actual photographing process in response to the S2ON signal.

まず、上記AE制御の結果求めた絞り値、シャッタ速度でCCD62を露光し、記録用の画像を撮像する。   First, the CCD 62 is exposed with the aperture value and shutter speed obtained as a result of the AE control, and a recording image is taken.

CCD62から出力された記録用の画像信号は、アナログ信号処理部66で所要の信号処理が施された後、A/D変換器68でデジタル信号に変換されてSDRAM56に格納される。そして、SDRAM56からデジタル信号処理部100に加えられる。   The recording image signal output from the CCD 62 is subjected to necessary signal processing by the analog signal processing unit 66, converted to a digital signal by the A / D converter 68, and stored in the SDRAM 56. Then, it is added from the SDRAM 56 to the digital signal processing unit 100.

デジタル信号処理部100に取り込まれた画像信号は、まず、オフセット補正回路104で所定のオフセット処理が施された後、RGB補間演算回路106に加えられ、所定の補間演算が行われて、各画素位置におけるR、G、B3色の信号が求められる。そして、ゲイン補正回路108に加えられ、ホワイトバランス補正及び偽色補正が行われた後、階調補正回路110で設定モードに応じた所定の階調変換処理が施される。階調補正された画像信号は、この後、RGB/YC変換回路112で輝度信号Yと色差信号Cr、Cbに変換される。そして、色差信号Cr、Cbは、色差マトリクス回路116で所定の色調補正が施され、輝度信号Yは、輪郭補正回路114で所定の輪郭補正処理が施されて出力される。   The image signal captured by the digital signal processing unit 100 is first subjected to a predetermined offset process by the offset correction circuit 104, and then added to the RGB interpolation calculation circuit 106 to perform a predetermined interpolation calculation. R, G, and B3 color signals at the position are obtained. Then, after being subjected to white balance correction and false color correction in addition to the gain correction circuit 108, the gradation correction circuit 110 performs a predetermined gradation conversion process according to the setting mode. The tone-corrected image signal is then converted into a luminance signal Y and color difference signals Cr and Cb by the RGB / YC conversion circuit 112. The color difference signals Cr and Cb are subjected to predetermined color correction by the color difference matrix circuit 116, and the luminance signal Y is output after being subjected to predetermined contour correction processing by the contour correction circuit 114.

このようにして生成された画像信号(YC信号)は、一旦SDRAM56に加えられた後、圧縮/伸張処理部78に加えられる。そして、圧縮/伸張処理部78で所定の圧縮処理が施された後、再度SDRAM56に格納される。   The image signal (YC signal) generated in this way is once added to the SDRAM 56 and then added to the compression / decompression processing unit 78. Then, after a predetermined compression process is performed by the compression / decompression processing unit 78, it is stored again in the SDRAM 56.

CPU50は、このSDRAM56に格納された圧縮画像データに対して所定の撮影情報(撮影時のシャッタ速度、絞り値、撮影感度、撮影モード等の撮影に関する諸情報)を付加した所定フォーマットの画像ファイル(たとえば、Exif形式の画像ファイル)を生成し、記録制御部80を介してメモリカード82に記録する。   The CPU 50 adds a predetermined shooting information (information on shooting such as shutter speed, aperture value, shooting sensitivity, shooting mode, etc. at the time of shooting) to the compressed image data stored in the SDRAM 56 (an image file of a predetermined format). For example, an Exif format image file) is generated and recorded in the memory card 82 via the recording control unit 80.

以上により撮影、記録の処理が終了する。このようにしてメモリカード82に記録された画像は、デジタルカメラ10のモードを再生モードに設定することにより、モニタ34に再生表示することができる。すなわち、再生ボタン32を押して、デジタルカメラ10のモードを再生モードにすると、メモリカード82に最後に記録された画像ファイルの圧縮画像データが読み出され、圧縮/伸張処理部78に加えられる。そして、圧縮/伸張処理部78で非圧縮の画像信号とされた後、VRAM60に加えられ、VRAM60から表示制御部84を介してモニタ34に出力される。これにより、メモリカード82に記録されている画像がモニタ34に再生表示される。   Thus, the photographing and recording processes are completed. The image recorded in the memory card 82 in this manner can be reproduced and displayed on the monitor 34 by setting the mode of the digital camera 10 to the reproduction mode. That is, when the playback button 32 is pressed to change the mode of the digital camera 10 to the playback mode, the compressed image data of the image file recorded last on the memory card 82 is read and added to the compression / expansion processing unit 78. The compressed / decompressed processing unit 78 generates an uncompressed image signal, adds it to the VRAM 60, and outputs it from the VRAM 60 to the monitor 34 via the display control unit 84. As a result, the image recorded on the memory card 82 is reproduced and displayed on the monitor 34.

画像のコマ送りは、十字ボタン30の左右のキーにて行われ、右キーが押圧操作されると、次の画像がメモリカード82から読み出されて、モニタ34に再生表示される。また、左キーが押圧操作されると、一つ前の画像がメモリカード82から読み出されて、モニタ34に再生表示される。   The frame advance of the image is performed by the left and right keys of the cross button 30, and when the right key is pressed, the next image is read from the memory card 82 and reproduced and displayed on the monitor 34. When the left key is pressed, the previous image is read from the memory card 82 and reproduced and displayed on the monitor 34.

さて、上記のように、本実施の形態のデジタルカメラ10では、ゲイン補正回路108で画像信号をゲイン補正する際、取り込んだR、G、Bの各色の画像信号(色信号)に対して、所定の色補正ゲインを用いてホワイトバランス補正(色補正)を行うとともに、所定の偽色補正ゲインを用いて偽色補正を行い、Nビット(本例では、14ビット)の信号として階調補正回路110に出力する。   As described above, in the digital camera 10 of the present embodiment, when the gain correction circuit 108 performs gain correction of the image signal, the captured R, G, and B color image signals (color signals) White balance correction (color correction) is performed using a predetermined color correction gain, and false color correction is performed using a predetermined false color correction gain, and gradation correction is performed as an N-bit (14 bits in this example) signal. Output to the circuit 110.

図8は、ゲイン補正回路108の構成を示すブロック図である。同図に示すように、ゲイン補正回路108は、色補正部120、偽色補正部122、偽色補正ゲイン算出部124で構成される。   FIG. 8 is a block diagram showing the configuration of the gain correction circuit 108. As shown in the figure, the gain correction circuit 108 includes a color correction unit 120, a false color correction unit 122, and a false color correction gain calculation unit 124.

色補正部120は、画素ごとのR、G、B各色の色信号にホワイトバランスゲイン算出回路102で算出されたゲイン値(色補正ゲイン)をかけてホワイトバランス補正(色補正)を行う。この際、色補正部120は、色補正したR、G、B各色の色信号をM(M>N)ビットの信号として出力する。すなわち、ゲイン補正回路108での最終的な出力となるNビットよりも上位ビットに余裕を持たせて出力する。   The color correction unit 120 performs white balance correction (color correction) by applying the gain value (color correction gain) calculated by the white balance gain calculation circuit 102 to the color signals of R, G, and B for each pixel. At this time, the color correction unit 120 outputs the color signals of the R, G, and B colors that have been color corrected as signals of M (M> N) bits. That is, the higher bits are output with a margin than the N bits that are the final output from the gain correction circuit 108.

本例では、ゲイン補正後の画像信号をN=14ビットで出力するので、たとえば、M=16ビットで出力する。これは色補正ゲインの設定に基づくものである。すなわち、一般にホワイトバランス補正の増幅率は、多くても4倍までであることから、2ビット分余裕を持たせて、16ビットとしている。したがって、色補正部120で出力するビット数は、色補正部120で色信号にかける色補正ゲインの分だけ余裕を持たせて出力することが好ましい。   In this example, since the image signal after gain correction is output with N = 14 bits, for example, it is output with M = 16 bits. This is based on the setting of the color correction gain. In other words, since the gain of white balance correction is generally up to 4 times, it is 16 bits with a margin of 2 bits. Therefore, the number of bits output by the color correction unit 120 is preferably output with a margin corresponding to the color correction gain applied to the color signal by the color correction unit 120.

偽色補正部122は、色補正部120で色補正されたR、G、B各色の色信号を画素ごとに取り込み、画素ごとに所定の偽色補正ゲインをかけて、Nビットの信号として出力する。   The false color correction unit 122 takes in the color signals of the R, G, and B colors that have been color corrected by the color correction unit 120 for each pixel, applies a predetermined false color correction gain to each pixel, and outputs the signal as an N-bit signal. To do.

偽色補正ゲイン算出部124は、色補正部120で色補正された画素ごとの色信号に基づいて、偽色補正部122で使用する偽色補正ゲインを画素ごとに算出する。以下、この偽色補正ゲイン算出部124での偽色補正ゲインの算出手順について説明する。   The false color correction gain calculation unit 124 calculates, for each pixel, a false color correction gain used by the false color correction unit 122 based on the color signal for each pixel that has been color corrected by the color correction unit 120. Hereinafter, the calculation procedure of the false color correction gain in the false color correction gain calculation unit 124 will be described.

色補正部120における色補正後の出力が、図9(a)であると仮定する。なお、同図は、白黒グラデーションパターンの被写体を撮像した時の画像信号の出力例を示している。したがって、画素位置は輝度と捉えることもできる。   Assume that the output after color correction in the color correction unit 120 is as shown in FIG. This figure shows an output example of an image signal when a subject with a monochrome gradation pattern is imaged. Therefore, the pixel position can also be regarded as luminance.

同図に示すように、この場合、Nビットにすると、R信号(R、G、B各色の色信号の中で最大の色信号)についてA点以降で飽和する。この結果、A点以降で色のバランスが崩れる。   As shown in the figure, in this case, when N bits are set, the R signal (the maximum color signal among the color signals of R, G, and B) is saturated after point A. As a result, the color balance is lost after point A.

そこで、図9(b)に示すように、A点まで等倍とし、A点以降で等倍より大きくなるように偽色補正ゲインを設定する。なお、ここではA点以降で直線的に変化するように偽色補正ゲインを設定している。   Therefore, as shown in FIG. 9B, the false color correction gain is set so that the magnification is equal to the point A and is larger than the magnification after the point A. Here, the false color correction gain is set so as to change linearly after point A.

このように、偽色補正ゲイン算出部124は、色補正後の各色信号の中で最大となる色信号を選出し、選出された色信号をNビットにすると、飽和する信号レベル(A点)を検出し、検出された信号レベルを超える信号に対して等倍より大きなゲインがかけられるように、偽色補正ゲインを設定する。   As described above, the false color correction gain calculation unit 124 selects the maximum color signal among the color signals after color correction, and saturates the signal level (point A) when the selected color signal is set to N bits. And a false color correction gain is set so that a gain larger than the same magnification is applied to a signal exceeding the detected signal level.

なお、この飽和する信号レベル(A点)を超える信号に対してかける偽色補正ゲイン量は、たとえば、あらかじめ用意した関数を用いて算出する。   Note that the false color correction gain amount applied to a signal exceeding the saturated signal level (point A) is calculated using a function prepared in advance, for example.

偽色補正部122は、このように設定された偽色補正ゲインを用いて色補正後の各色信号を偽色補正し、Nビットの信号として出力する。   The false color correction unit 122 corrects each color signal after color correction using the false color correction gain set in this way, and outputs the color signal as an N-bit signal.

図9(c)は、偽色補正部122による偽色補正後の色信号の出力例(Nビット)を示している。同図に示すように、A点までは等倍のゲインが掛けられるため、各信号の出力に変化はない。しかし、R信号が飽和レベルに達するA点以降においては、各色信号に等倍より大きなゲインが掛けられるため、B信号とG信号の値がR信号に近づく。この結果、偽色が生じる画素では彩度が落ち、色の変化が分かりにくくなる。また、見た目に違和感のある色の領域が少なくなり(白くなる領域が増える)、高品質な画像を得ることができる。   FIG. 9C shows an output example (N bits) of the color signal after the false color correction by the false color correction unit 122. As shown in the figure, since the equal gain is applied up to the point A, there is no change in the output of each signal. However, after point A at which the R signal reaches the saturation level, each color signal is multiplied by a gain larger than the same magnification, so the values of the B signal and the G signal approach the R signal. As a result, the saturation of the pixels in which the false color occurs is reduced, and the color change is difficult to understand. In addition, the number of color areas that are visually uncomfortable is reduced (the white areas are increased), and a high-quality image can be obtained.

図10は、ゲイン補正回路108によるゲイン補正処理の手順を示すフローチャートである。   FIG. 10 is a flowchart illustrating a procedure of gain correction processing by the gain correction circuit 108.

ゲイン補正回路108に入力されたR、G、B各色の色信号は、まず、色補正部120において、ホワイトバランスゲイン算出回路102で算出されたゲイン値(色補正ゲイン)がかけられて、ホワイトバランス補正(色補正)される(ステップS10)。   The R, G, and B color signals input to the gain correction circuit 108 are first multiplied by the gain value (color correction gain) calculated by the white balance gain calculation circuit 102 in the color correction unit 120 to obtain white. Balance correction (color correction) is performed (step S10).

色補正された各色の色信号は、偽色補正部122と偽色補正ゲイン算出部124に出力される。この際、各色信号は、Nビットよりも上位に余裕を持たせたMビットの信号として、偽色補正部122と偽色補正ゲイン算出部124に出力される(ステップS11)。   The color signal of each color subjected to color correction is output to the false color correction unit 122 and the false color correction gain calculation unit 124. At this time, each color signal is output to the false color correction unit 122 and the false color correction gain calculation unit 124 as an M-bit signal having a margin higher than N bits (step S11).

色補正部120で色補正が行われると、次に、偽色補正ゲイン算出部124において、色補正後の各色信号から画素ごとに偽色補正ゲインが算出される(ステップS12)。すなわち、まず、色補正後の各色信号の中で最大となる色信号が選出される。そして、その選出された色信号をNビットにすると、飽和する信号レベル(A点)が検出される。そして、その検出された信号レベル以下の信号には、等倍のゲインがかけられ、検出された信号レベルを超える信号に対しては、等倍より大きなゲインがかけられるように、偽色補正ゲインが設定される。   Once the color correction is performed by the color correction unit 120, the false color correction gain calculation unit 124 calculates a false color correction gain for each pixel from each color signal after color correction (step S12). That is, first, the color signal that is the maximum among the color signals after color correction is selected. When the selected color signal is set to N bits, a saturated signal level (point A) is detected. The signal below the detected signal level is multiplied by the same magnification, and the signal exceeding the detected signal level is multiplied by a gain greater than the equal magnification so that the false color correction gain is applied. Is set.

偽色補正部122は、このように画素ごとに設定された偽色補正ゲインを用いて、画素ごとに色補正後の各色信号を偽色補正する(ステップS13)。そして、その偽色補正後の色信号にリミットをかけ、Nビットの信号として出力する(ステップS14)。   The false color correction unit 122 corrects each color signal after color correction for each pixel using the false color correction gain set for each pixel in this way (step S13). Then, the color signal after the false color correction is limited and output as an N-bit signal (step S14).

このように、ゲイン補正回路108は、入力された画像信号をまずMビットの信号として色補正し、その後、偽色補正してNビットの信号として出力する。そして、偽色補正する際、飽和する信号レベルを超える色信号に対してのみ等倍より大きなゲインがかけられるように偽色補正ゲインを設定して、偽色補正を行う。   As described above, the gain correction circuit 108 first performs color correction on the input image signal as an M-bit signal, and then performs false color correction and outputs it as an N-bit signal. Then, when performing false color correction, false color correction is performed by setting a false color correction gain so that a gain larger than the same magnification is applied only to a color signal exceeding a saturated signal level.

これにより、偽色が生じる画素では彩度が落ち、色の変化が分かりにくくなる。また、見た目に違和感のある色の領域が少なくなり(白くなる領域が増える)、高品質な画像を得ることができる。また、最終的に要求されるビット数(Nビット)よりも多いビット数(Mビット)を参照して補正しているため、グラデーションの画像を撮影した場合に色の変化が滑らかに推移して白になるため、見た目に良好な出力を得ることができる。さらに、輝度依存による色調整と異なり、色信号が飽和している画素のみに補正を行うことができるので、全体の色調のバランスを崩すこともない(飽和しない画素については、色が保証される。)。   As a result, the saturation of the pixel in which the false color occurs is lowered, and the color change is difficult to understand. In addition, the number of color areas that are visually uncomfortable is reduced (the white areas are increased), and a high-quality image can be obtained. In addition, since correction is performed with reference to the number of bits (M bits) larger than the finally required number of bits (N bits), the color changes smoothly when a gradation image is taken. Since it becomes white, it is possible to obtain an excellent output visually. Further, unlike color adjustment based on luminance, correction can be performed only on pixels in which the color signal is saturated, so that the overall color tone balance is not lost (the color is guaranteed for pixels that are not saturated). .)

なお、上記実施の形態では、偽色補正ゲインの設定例として、飽和する信号レベル(A点)までを等倍とし、飽和する信号レベル以降で直線的に変化するように偽色補正ゲインを設定しているが、偽色補正ゲインの設定例は、これに限定されるものではない。たとえば、図11に示すように、飽和する信号レベル(A点)までは等倍とし、飽和する信号レベル以降で曲線的に変化するように設定(緩やかに変化するように設定)することもできる。また、その変化率についても、特に限定されるものではなく、出力される画像との相関で適宜最適な値に設定することができる。   In the above embodiment, as an example of setting the false color correction gain, the false color correction gain is set so that the signal level (point A) is saturated up to the same magnification and linearly changes after the saturation signal level. However, the setting example of the false color correction gain is not limited to this. For example, as shown in FIG. 11, the signal level up to a saturated signal level (point A) can be set to the same magnification, and can be set so as to change in a curve after the saturated signal level (set so as to change gently). . Further, the rate of change is not particularly limited, and can be set to an optimal value as appropriate based on the correlation with the output image.

図12は、ゲイン補正回路の第2の実施の形態の構成を示すブロック図である。   FIG. 12 is a block diagram showing the configuration of the second embodiment of the gain correction circuit.

同図に示すように、本実施の形態のゲイン補正回路108Aは、ダイナミックレンジの設定に応じて偽色補正の有無を切り替えられるようにしている。すなわち、セレクタ126によって、偽色補正した色信号と偽色補正していない色信号とを切り替えて出力できるようにしている。   As shown in the figure, the gain correction circuit 108A of the present embodiment is configured to switch the presence or absence of false color correction according to the setting of the dynamic range. That is, the selector 126 can switch and output a color signal that has been subjected to false color correction and a color signal that has not been subjected to false color correction.

セレクタ126には、偽色補正部122を介して偽色補正されたNビットの色信号と、偽色補正せず色補正部122AからそのままNビットの色信号として出力された色信号とが入力される。   The selector 126 receives an N-bit color signal that has been subjected to false color correction via the false color correction unit 122 and a color signal that has been output as an N-bit color signal without being subjected to false color correction. Is done.

このため本実施の形態の色補正部122Aは、色補正した各色信号をNビットの信号として出力するとともに、Mビットの信号として出力できるように構成されている。そして、Nビットにリミットをかけられた色信号は、そのままセレクタ126に出力され、Mビットにリミットをかけられた色信号は、偽色補正部122と偽色補正ゲイン算出部124に出力されるように構成されている。   For this reason, the color correction unit 122A of the present embodiment is configured to output each color signal subjected to color correction as an N-bit signal and an M-bit signal. Then, the color signal that is limited to N bits is output to the selector 126 as it is, and the color signal that is limited to M bits is output to the false color correction unit 122 and the false color correction gain calculation unit 124. It is configured as follows.

なお、偽色補正部122と偽色補正ゲイン算出部124の構成は、上述した第1の実施の形態のゲイン補正回路108における偽色補正部122と偽色補正ゲイン算出部124と同じである。   The configurations of the false color correction unit 122 and the false color correction gain calculation unit 124 are the same as those of the false color correction unit 122 and the false color correction gain calculation unit 124 in the gain correction circuit 108 according to the first embodiment described above. .

セレクタ126は、ダイナミックレンジ設定取得部128で取得されたダイナミックレンジの設定に基づいて、色信号の出力を切り替える。すなわち、偽色補正された色信号を出力するか、偽色補正されていない色信号を出力するかを切り替える。   The selector 126 switches the output of the color signal based on the dynamic range setting acquired by the dynamic range setting acquisition unit 128. That is, switching is performed between outputting a color signal with false color correction or outputting a color signal without false color correction.

ここで、この切り替えは、設定されているダイナミックレンジが閾値より広いか否かに基づいて行われ、設定されているダイナミックレンジが閾値より広い場合は、偽色補正された色信号が出力されるように設定され、狭い場合は、偽色補正されていない色信号が出力されるように設定される。   Here, this switching is performed based on whether or not the set dynamic range is wider than the threshold value. If the set dynamic range is wider than the threshold value, a false color corrected color signal is output. If it is narrow, a color signal not subjected to false color correction is set to be output.

本実施の形態のデジタルカメラでは、ダイナミックレンジの設定は、「広ダイナミックレンジ」と「通常ダイナミックレンジ」の2通りであるので、ダイナミックレンジの設定が、「広ダイナミックレンジ」の場合は、偽色補正された色信号が出力されるように設定され、「通常ダイナミックレンジ」の場合は、偽色補正されていない色信号が出力されるように設定される。   In the digital camera of the present embodiment, there are two dynamic range settings: “wide dynamic range” and “normal dynamic range”. Therefore, when the dynamic range setting is “wide dynamic range”, false color is set. The corrected color signal is set to be output, and in the case of “normal dynamic range”, the color signal not subjected to false color correction is set to be output.

ダイナミックレンジ設定取得部128は、CPU50から当該画像データの撮影時に設定されていたダイナミックレンジの設定情報を取得する。   The dynamic range setting acquisition unit 128 acquires from the CPU 50 dynamic range setting information that was set when the image data was captured.

図13は、本実施の形態のゲイン補正回路108Aによるゲイン補正の手順を示すフローチャートである。   FIG. 13 is a flowchart showing the procedure of gain correction by the gain correction circuit 108A of the present embodiment.

ゲイン補正回路108Aに入力されたR、G、B各色の色信号は、まず、色補正部120Aにおいて、ホワイトバランスゲイン算出回路102で算出されたゲイン値(色補正ゲイン)がかけられて、ホワイトバランス補正(色補正)される。この際、色補正部120Aは、Nビットの色信号と、Mビットの色信号の二種類の色信号を出力する(ステップS20)。   The R, G, and B color signals input to the gain correction circuit 108A are first multiplied by the gain value (color correction gain) calculated by the white balance gain calculation circuit 102 in the color correction unit 120A to obtain white. Balance correction (color correction) is performed. At this time, the color correction unit 120A outputs two types of color signals, an N-bit color signal and an M-bit color signal (step S20).

Nビットの色信号は、セレクタ126に出力され、Mビットの色信号は、偽色補正部122と偽色補正ゲイン算出部124に出力される。   The N-bit color signal is output to the selector 126, and the M-bit color signal is output to the false color correction unit 122 and the false color correction gain calculation unit 124.

色補正部120で色補正が行われると、次に、偽色補正ゲイン算出部124において、色補正後の各色信号から画素ごとに偽色補正ゲインが算出される(ステップS21)。 偽色補正部122は、この偽色補正ゲイン算出部124で算出された偽色補正ゲインを用いて、色補正後のMビットの色信号を偽色補正する(ステップS22)。そして、その偽色補正後の色信号にリミットをかけ、Nビットの信号としてセレクタ126に出力する(ステップS23)。   If color correction is performed by the color correction unit 120, then the false color correction gain calculation unit 124 calculates a false color correction gain for each pixel from each color signal after color correction (step S21). The false color correction unit 122 performs false color correction on the M-bit color signal after color correction using the false color correction gain calculated by the false color correction gain calculation unit 124 (step S22). Then, the color signal after the false color correction is limited and output to the selector 126 as an N-bit signal (step S23).

このようにセレクタ126には、偽色補正されたNビットの色信号と、偽色補正されていないNビットの色信号が入力される。   In this manner, the selector 126 receives the N-bit color signal that has been subjected to false color correction and the N-bit color signal that has not been subjected to false color correction.

セレクタ126は、ダイナミックレンジ設定取得部128で取得されたダイナミックレンジの設定情報に基づいて、撮影時に設定されていたダイナミックレンジが閾値より広いか否かを判定する(ステップS24)。本例では、上記のように、広ダイナミックレンジか通常ダイナミックレンジを判定する。   Based on the dynamic range setting information acquired by the dynamic range setting acquisition unit 128, the selector 126 determines whether or not the dynamic range set at the time of shooting is wider than a threshold (step S24). In this example, as described above, the wide dynamic range or the normal dynamic range is determined.

ここで、撮影時に設定されていたダイナミックレンジが閾値より広い場合(広ダイナミックレンジの場合)、セレクタ126は、偽色補正された色信号が出力されるように設定する(ステップS25)。   Here, when the dynamic range set at the time of shooting is wider than the threshold (in the case of a wide dynamic range), the selector 126 is set so as to output a color signal corrected for false color (step S25).

一方、撮影時に設定されていたダイナミックレンジが閾値より狭い場合(通常ダイナミックレンジの場合)、セレクタ126は、偽色補正されていない色信号が出力されるように設定する(ステップS26)。   On the other hand, when the dynamic range set at the time of shooting is narrower than the threshold (in the case of the normal dynamic range), the selector 126 sets so that a color signal not subjected to false color correction is output (step S26).

この結果、撮影時に設定されていたダイナミックレンジが閾値より広い場合(広ダイナミックレンジの場合)は、偽色補正された色信号が出力され、狭い場合(通常ダイナミックレンジの場合)は、偽色補正されていない信号が出力される。   As a result, if the dynamic range set at the time of shooting is wider than the threshold value (in the case of a wide dynamic range), a false color corrected color signal is output, and if it is narrow (in the case of a normal dynamic range), false color correction is performed. A signal that has not been processed is output.

このように、本実施の形態のゲイン補正回路108Aは、ダイナミックレンジの設定に応じて偽色補正の有無を切り替えられ、ダイナミックレンジが閾値より広い場合にのみ偽色補正された色信号が出力される。これにより、より高品質な画像を得ることができる。   As described above, the gain correction circuit 108A according to the present embodiment can switch the presence / absence of the false color correction according to the setting of the dynamic range, and outputs the color signal corrected with the false color only when the dynamic range is wider than the threshold. The Thereby, a higher quality image can be obtained.

すなわち、ダイナミックレンジを拡大する処理を行うと、通常のダイナミックレンジでは白飛びしている被写体(全ての色信号が飽和している被写体)であっても、一部の色信号だけが飽和してしまう場合がある。   In other words, when the process for expanding the dynamic range is performed, even in the normal dynamic range, even if the subject is whiteout (the subject in which all color signals are saturated), only a part of the color signals is saturated. May end up.

その一方で偽色補正の処理を行うと、白に飽和しやすく、ダイナミックレンジが狭くなってしまう。   On the other hand, if false color correction processing is performed, it is likely to be saturated with white and the dynamic range becomes narrow.

そこで、設定するダイナミックレンジの広狭によって偽色補正の有無を切り替え、設定するダイナミックレンジが閾値以上の場合のみ、偽色補正の処理を実施することにより、互いの欠点を効果的に補うことができ、より高品質な画像を得ることができる。   Therefore, it is possible to effectively compensate for each other's defects by switching the presence or absence of false color correction depending on the dynamic range to be set and executing the false color correction process only when the set dynamic range is greater than or equal to the threshold value. Higher quality images can be obtained.

なお、本例では、ダイナミックレンジの設定が、通常と広ダイナミックレンジの2つだけであるが、さらに詳細な設定ができるようにしてもよい。   In this example, there are only two dynamic ranges, normal and wide dynamic range, but more detailed settings may be made.

図14は、ゲイン補正回路の第3の実施の形態の構成を示すブロック図である。   FIG. 14 is a block diagram showing the configuration of the third embodiment of the gain correction circuit.

同図に示すように、本実施の形態のゲイン補正回路108Bは、モード設定取得部130が備えられており、処理対象とする画像信号が撮影されたときの撮影モードの情報がCPU50から取得される。偽色補正ゲイン算出部124Aは、このモード設定取得部130で取得された撮影モードの情報に基づいて偽色補正ゲインを算出する。   As shown in the figure, the gain correction circuit 108B of the present embodiment is provided with a mode setting acquisition unit 130, and information on the shooting mode when the image signal to be processed is shot is acquired from the CPU 50. The The false color correction gain calculation unit 124A calculates a false color correction gain based on the shooting mode information acquired by the mode setting acquisition unit 130.

すなわち、処理対象の画像信号が撮影されたときの撮影モードの情報を取得することにより、被写体(撮影シーン)が推定できるので、その被写体に合わせて偽色補正ゲインを設定することにより、より適切に偽色補正することができる。   In other words, since the subject (shooting scene) can be estimated by acquiring information on the shooting mode when the image signal to be processed is shot, it is more appropriate to set the false color correction gain according to the subject. The false color can be corrected.

たとえば、水中での撮影の場合、得られる画像はBの成分が多く、B信号の飽和が起きやすい。したがって、水中モードの場合は、B信号の飽和に対して積極的に補正するように偽色補正ゲインを設定する(たとえば、変化率(傾き)を大きくする)。   For example, in the case of shooting underwater, the obtained image has many B components, and the B signal is likely to be saturated. Therefore, in the underwater mode, the false color correction gain is set so as to positively correct the saturation of the B signal (for example, the rate of change (slope) is increased).

また、夕景を撮影する場合、得られる画像はRの成分が多く、R信号の飽和が起きやすい。したがって、夕景モードの場合は、R信号の飽和に対して積極的に補正するように偽色補正ゲインを設定する。   Further, when shooting a sunset scene, the obtained image has many R components, and the R signal is likely to be saturated. Therefore, in the evening scene mode, the false color correction gain is set so as to positively correct the saturation of the R signal.

また、マニュアルモードの場合は、撮影者の意図を考慮し、常に等倍になるように偽色補正ゲインを設定する。   In the case of the manual mode, the false color correction gain is set so as to always be the same magnification in consideration of the photographer's intention.

このように、偽色補正ゲイン算出部124Aは、処理対象とする画像信号が取得されたときの撮影モードに応じて偽色補正ゲインを算出する。具体的には、撮影モードごとにR信号用の関数と、G信号用の関数と、B信号用の関数を用意する。この際、各撮影モードの特性に応じて各関数の変化率(傾き)を設定する。たとえば、水中モードの場合は、B信号の変化率を大きく設定する(この場合、たとえば、R信号用の関数とG信号用の関数は、補正しないような設定とする。)。また、夕景モードの場合は、R信号の変化率を大きく設定する(この場合、たとえば、B信号用の関数とG信号用の関数は、補正しないような設定とする。)。また、マニュアルモードの場合は、各色信号について補正しないような設定にする。そして、このように撮影モードごとに用意された関数を設定された撮影モードに応じて切り替えて使用する。   Thus, the false color correction gain calculation unit 124A calculates the false color correction gain according to the shooting mode when the image signal to be processed is acquired. Specifically, a function for R signal, a function for G signal, and a function for B signal are prepared for each photographing mode. At this time, the rate of change (slope) of each function is set according to the characteristics of each shooting mode. For example, in the underwater mode, the change rate of the B signal is set large (in this case, for example, the function for the R signal and the function for the G signal are set so as not to be corrected). In the evening scene mode, the rate of change of the R signal is set large (in this case, for example, the function for the B signal and the function for the G signal are set not to be corrected). In the manual mode, settings are made so that each color signal is not corrected. Then, the functions prepared for each shooting mode are switched and used according to the set shooting mode.

図15は、本実施の形態のゲイン補正回路108Bによるゲイン補正処理の手順を示すフローチャートである。   FIG. 15 is a flowchart showing a procedure of gain correction processing by the gain correction circuit 108B of the present embodiment.

ゲイン補正回路108Bに入力されたR、G、B各色の色信号は、まず、色補正部120において、ホワイトバランスゲイン算出回路102で算出されたゲイン値(色補正ゲイン)がかけられて、ホワイトバランス補正(色補正)される(ステップS30)。   The R, G, and B color signals input to the gain correction circuit 108B are first multiplied by the gain value (color correction gain) calculated by the white balance gain calculation circuit 102 in the color correction unit 120 to obtain white. Balance correction (color correction) is performed (step S30).

色補正された各色の色信号は、偽色補正部122と偽色補正ゲイン算出部124に出力される。この際、各色信号は、Nビットよりも上位に余裕を持たせたMビットの信号として、偽色補正部122と偽色補正ゲイン算出部124Aに出力される(ステップS31)。   The color signal of each color subjected to color correction is output to the false color correction unit 122 and the false color correction gain calculation unit 124. At this time, each color signal is output to the false color correction unit 122 and the false color correction gain calculation unit 124A as an M-bit signal having a margin higher than N bits (step S31).

色補正部120で色補正が行われると、モード設定取得部130において、CPU50から撮影モードの設定情報が取得される(ステップS32)。取得された撮影モードの設定情報は、偽色補正ゲイン算出部124Aに加えられる。   When color correction is performed by the color correction unit 120, the mode setting acquisition unit 130 acquires shooting mode setting information from the CPU 50 (step S32). The acquired shooting mode setting information is added to the false color correction gain calculation unit 124A.

偽色補正ゲイン算出部124Aは、取得した撮影モードの設定情報と、色補正後の各色信号とに基づいて、画素ごとに偽色補正ゲインを算出する(ステップS33)。本例では、たとえば、色補正後の各色信号の中で最大となる色信号を選出し、その選出された色信号をNビットにすると、飽和する信号レベル(A点)を検出する。そして、その検出された信号レベル以下の信号には、等倍のゲインがかけられ、検出された信号レベルを超える信号に対しては、等倍より大きなゲインがかけられるように偽色補正ゲインを設定する。この際、飽和する信号レベルを超える信号に対してかけるゲイン値を撮影モードに応じて用意された関数から設定する。   The false color correction gain calculation unit 124A calculates a false color correction gain for each pixel based on the acquired shooting mode setting information and each color signal after color correction (step S33). In this example, for example, when the maximum color signal is selected from each color signal after color correction, and the selected color signal is set to N bits, a saturated signal level (point A) is detected. The signal below the detected signal level is multiplied by the same magnification, and the signal exceeding the detected signal level is multiplied by a false color correction gain so that a gain larger than the equal magnification is applied. Set. At this time, a gain value to be applied to a signal exceeding a saturated signal level is set from a function prepared according to the photographing mode.

偽色補正部122は、このように画素ごとに設定された偽色補正ゲインを用いて、画素ごとに色補正後の各色信号を偽色補正する(ステップS34)。そして、その偽色補正後の色信号にリミットをかけ、Nビットの信号として出力する(ステップS35)。   The false color correction unit 122 corrects each color signal after color correction for each pixel using the false color correction gain set for each pixel in this way (step S34). Then, the color signal after the false color correction is limited and output as an N-bit signal (step S35).

このように、撮影モードに応じて偽色補正ゲインを設定することにより、より適切に偽色の抑制を図ることができ、より高品質な画像を得ることができる。   Thus, by setting the false color correction gain according to the shooting mode, it is possible to more appropriately suppress the false color and obtain a higher quality image.

なお、本例の場合も上記第2の実施の形態のゲイン補正回路108Aのように、ダイナミックレンジの設定に応じて偽色補正の有無を切り替えるようにしてもよい。   In the case of this example as well, the presence / absence of false color correction may be switched according to the setting of the dynamic range, as in the gain correction circuit 108A of the second embodiment.

図16は、ゲイン補正回路の第4の実施の形態の構成を示すブロック図である。   FIG. 16 is a block diagram showing the configuration of the fourth embodiment of the gain correction circuit.

同図に示すように、本実施の形態のゲイン補正回路108Cは、色温度評価値取得部132が備えられており、処理対象とする画像信号の色温度評価値の情報が色温度評価値算出回路118から取得される。偽色補正ゲイン算出部124Bは、この色温度評価値取得部132で取得された色温度評価値の情報に基づいて偽色補正ゲインを算出する。   As shown in the figure, the gain correction circuit 108C of the present embodiment includes a color temperature evaluation value acquisition unit 132, and information on the color temperature evaluation value of the image signal to be processed is calculated as a color temperature evaluation value. Obtained from circuit 118. The false color correction gain calculation unit 124B calculates a false color correction gain based on the information on the color temperature evaluation value acquired by the color temperature evaluation value acquisition unit 132.

すなわち、処理対象とする画像信号の色温度の情報を取得することにより、被写体(撮影シーン)の色調が推定できるので、その被写体に合わせて偽色補正ゲインを設定することにより、より適切に偽色補正することができる。   In other words, since the color tone of the subject (shooting scene) can be estimated by acquiring information on the color temperature of the image signal to be processed, false false correction can be more appropriately set by setting the false color correction gain according to the subject. Color correction can be performed.

たとえば、色温度が低い場合、得られる画像は全体として赤みが強く、R信号の飽和が起きやすい。したがって、色温度が低い場合は、R信号の飽和に対して積極的に補正するように偽色補正ゲインを設定する(たとえば、変化率(傾き)を大きくする)。   For example, when the color temperature is low, the obtained image as a whole is strongly reddish, and the R signal is likely to be saturated. Therefore, when the color temperature is low, the false color correction gain is set so as to positively correct the saturation of the R signal (for example, the rate of change (gradient) is increased).

一方、色温度が高い場合、得られる画像は全体として青みが強く、B信号の飽和が起きやすい。したがって、色温度が高い場合は、B信号の飽和に対して積極的に補正するように偽色補正ゲインを設定する。   On the other hand, when the color temperature is high, the resulting image is strong blue as a whole, and the B signal is likely to be saturated. Therefore, when the color temperature is high, the false color correction gain is set so as to positively correct the saturation of the B signal.

このように、偽色補正ゲイン算出部124Bは、処理対象とする画像信号の色温度に応じて偽色補正ゲインを算出する。具体的には、色温度評価値ごとにR信号用の関数と、G信号用の関数と、B信号用の関数を用意する。この際、色温度の特性に応じて各関数の変化率(傾き)を設定する。たとえば、色温度が高い場合は、R信号の変化率を大きく設定する(この場合、たとえば、B信号用の関数とG信号用の関数は、補正しないような設定とする。)。また、色温度が高い場合は、B信号の変化率を大きく設定する(この場合、たとえば、R信号用の関数とG信号用の関数は、補正しないような設定とする。)。そして、このように色温度評価値ごと用意された関数を色温度評価値取得部132で取得された色温度評価値に応じて切り替えて使用する。   Thus, the false color correction gain calculation unit 124B calculates the false color correction gain according to the color temperature of the image signal to be processed. Specifically, a function for R signal, a function for G signal, and a function for B signal are prepared for each color temperature evaluation value. At this time, the change rate (slope) of each function is set according to the characteristics of the color temperature. For example, when the color temperature is high, the rate of change of the R signal is set large (in this case, for example, the function for the B signal and the function for the G signal are set so as not to be corrected). When the color temperature is high, the B signal change rate is set to be large (in this case, for example, the function for the R signal and the function for the G signal are set so as not to be corrected). The function prepared for each color temperature evaluation value in this way is switched and used according to the color temperature evaluation value acquired by the color temperature evaluation value acquisition unit 132.

図17は、本実施の形態のゲイン補正回路108Cによるゲイン補正処理の手順を示すフローチャートである。   FIG. 17 is a flowchart showing a procedure of gain correction processing by the gain correction circuit 108C of the present embodiment.

ゲイン補正回路108Cに入力されたR、G、B各色の色信号は、まず、色補正部120において、ホワイトバランスゲイン算出回路102で算出されたゲイン値(色補正ゲイン)がかけられて、ホワイトバランス補正(色補正)される(ステップS40)。   The R, G, and B color signals input to the gain correction circuit 108C are first multiplied by the gain value (color correction gain) calculated by the white balance gain calculation circuit 102 in the color correction unit 120 to obtain white. Balance correction (color correction) is performed (step S40).

色補正された各色の色信号は、偽色補正部122と偽色補正ゲイン算出部124に出力される。この際、各色信号は、Nビットよりも上位に余裕を持たせたMビットの信号として、偽色補正部122と偽色補正ゲイン算出部124Bに出力される(ステップS41)。   The color signal of each color subjected to color correction is output to the false color correction unit 122 and the false color correction gain calculation unit 124. At this time, each color signal is output to the false color correction unit 122 and the false color correction gain calculation unit 124B as an M-bit signal having a margin higher than N bits (step S41).

色補正部120で色補正が行われると、色温度評価値取得部132において、色温度評価値算出回路118から色温度評価値の情報が取得される(ステップS42)。取得された色温度評価値の情報は、偽色補正ゲイン算出部124Bに加えられる。   When color correction is performed by the color correction unit 120, the color temperature evaluation value acquisition unit 132 acquires information on the color temperature evaluation value from the color temperature evaluation value calculation circuit 118 (step S42). The acquired color temperature evaluation value information is added to the false color correction gain calculation unit 124B.

偽色補正ゲイン算出部124Bは、取得した色温度評価値の情報と、色補正後の各色信号とに基づいて、画素ごとに偽色補正ゲインを算出する(ステップS43)。本例では、たとえば、色補正後の各色信号の中で最大となる色信号を選出し、その選出された色信号をNビットにすると、飽和する信号レベル(A点)を検出する。そして、その検出された信号レベル以下の信号には、等倍のゲインがかけられ、検出された信号レベルを超える信号に対しては、等倍より大きなゲインがかけられるように偽色補正ゲインを設定する。この際、飽和する信号レベルを超える信号に対してかけるゲイン値を一定範囲の色温度評価値ごとに用意された関数から設定する。   The false color correction gain calculation unit 124B calculates a false color correction gain for each pixel based on the acquired color temperature evaluation value information and each color signal after color correction (step S43). In this example, for example, when the color signal that is the maximum among the color signals after color correction is selected and the selected color signal is set to N bits, a saturated signal level (point A) is detected. The signal below the detected signal level is multiplied by the same magnification, and the signal exceeding the detected signal level is multiplied by the false color correction gain so that a gain larger than the equal magnification is applied. Set. At this time, a gain value to be applied to a signal exceeding a saturated signal level is set from a function prepared for each color temperature evaluation value within a certain range.

偽色補正部122は、このように画素ごとに設定された偽色補正ゲインを用いて、画素ごとに色補正後の各色信号を偽色補正する(ステップS44)。そして、その偽色補正後の色信号にリミットをかけ、Nビットの信号として出力する(ステップS45)。   The false color correction unit 122 performs false color correction on each color signal after color correction for each pixel using the false color correction gain set for each pixel in this way (step S44). Then, the color signal after the false color correction is limited and output as an N-bit signal (step S45).

このように、色温度評価値に応じて偽色補正ゲインを設定することにより、より適切に偽色の抑制を図ることができ、より高品質な画像を得ることができる。   In this way, by setting the false color correction gain according to the color temperature evaluation value, it is possible to more appropriately suppress the false color and obtain a higher quality image.

なお、本例では色温度評価値に応じて偽色補正ゲインを設定するようにしているが、色温度評価値は光源種と同義であるので、光源種に応じて偽色補正ゲインを設定するようにしてもよい。   In this example, the false color correction gain is set according to the color temperature evaluation value. However, since the color temperature evaluation value is synonymous with the light source type, the false color correction gain is set according to the light source type. You may do it.

また、本例の場合も上記第2の実施の形態のゲイン補正回路108Aのように、ダイナミックレンジの設定に応じて偽色補正の有無を切り替えるようにしてもよい。   Also in the case of this example, the presence or absence of false color correction may be switched according to the setting of the dynamic range, as in the gain correction circuit 108A of the second embodiment.

なお、上記一連の実施の形態では、本発明をホワイトバランス補正に適用した場合を例に説明したが、本発明の適用は、これに限定されるものではなく、複数の色信号に所定のゲインをかけ、所望のビット数で出力する処理すべてに適用することができる。たとえば、上記のホワイトバランス補正処理の他に色差マトリクス処理等にも適用することができる。   In the above series of embodiments, the case where the present invention is applied to white balance correction has been described as an example. However, the application of the present invention is not limited to this, and a predetermined gain is applied to a plurality of color signals. And can be applied to all processes that output with a desired number of bits. For example, the present invention can be applied to color difference matrix processing in addition to the above white balance correction processing.

また、上記一連の実施の形態では、本発明をデジタルカメラに適用した場合を例に説明したが、本発明の適用は、これに限定されるものではない。カメラ付き携帯電話機やデジタルビデオカメラ等の撮像機能を有する機器に適用することができるのはもちろんのこと、いわゆるRAW画像データ(撮像素子から出力された画像信号をデジタル化した画像データ)を現像処理する装置(RAW画像データから輝度信号と色差信号を生成する装置)にも同様に適用することができる。RAW画像データを現像処理する装置は、たとえば、所定の制御プログラムにより上記画像処理の機能をコンピュータに実現させることにより構成することができる。   In the series of embodiments described above, the case where the present invention is applied to a digital camera has been described as an example. However, the application of the present invention is not limited to this. It can be applied to devices having an imaging function, such as a mobile phone with a camera and a digital video camera, as well as so-called RAW image data (image data obtained by digitizing an image signal output from an image sensor). The present invention can be similarly applied to an apparatus that generates a luminance signal and a color difference signal from RAW image data. An apparatus for developing RAW image data can be configured, for example, by causing a computer to realize the above-described image processing function using a predetermined control program.

また、上記実施の形態のデジタルカメラでは、本発明に係る画像処理機能を有するデジタル信号処理部をハードウェア回路で構成しているが、当該ハードウェア回路と同じ機能をソフトウェアで構成することもできる。   In the digital camera of the above embodiment, the digital signal processing unit having the image processing function according to the present invention is configured by a hardware circuit. However, the same function as the hardware circuit can be configured by software. .

また、上記実施の形態のデジタルカメラでは、撮像素子としてCCDを用いているが、撮像素子は、これに限定されるものではなく、この他にCMOSセンサ等の撮像素子を用いてもよい。   In the digital camera of the above embodiment, a CCD is used as an image sensor. However, the image sensor is not limited to this, and an image sensor such as a CMOS sensor may be used.

本発明が適用されたデジタルカメラの外観構成を示す正面斜視図The front perspective view which shows the external appearance structure of the digital camera to which this invention was applied 本発明が適用されたデジタルカメラの外観構成を示す背面斜視図The rear perspective view showing the appearance composition of the digital camera to which the present invention is applied デジタルカメラの電気的構成を示すブロック図Block diagram showing the electrical configuration of the digital camera デジタル信号処理部の概略構成を示すブロック図Block diagram showing schematic configuration of digital signal processor 階調補正回路のガンマ変換処理における入力階調値と出力階調値の関係を表すグラフA graph showing the relationship between the input tone value and the output tone value in the gamma conversion processing of the tone correction circuit 階調補正回路の前処理における入力階調値と出力階調値の関係を表すグラフA graph showing the relationship between the input tone value and the output tone value in the preprocessing of the tone correction circuit 階調補正回路の階調変換処理における入力階調値と出力階調値の関係を表すグラフA graph showing the relationship between the input gradation value and the output gradation value in the gradation conversion processing of the gradation correction circuit ゲイン補正回路の構成を示すブロック図Block diagram showing the configuration of the gain correction circuit 偽色補正方法の説明図Illustration of false color correction method ゲイン補正回路によるゲイン補正処理の手順を示すフローチャートFlow chart showing the procedure of gain correction processing by the gain correction circuit 偽色補正ゲインの他の設定例を示すグラフGraph showing another setting example of false color correction gain ゲイン補正回路の第2の実施の形態の構成を示すブロック図The block diagram which shows the structure of 2nd Embodiment of a gain correction circuit. 第2の実施の形態のゲイン補正回路によるゲイン補正の手順を示すフローチャートThe flowchart which shows the procedure of the gain correction by the gain correction circuit of 2nd Embodiment ゲイン補正回路の第3の実施の形態の構成を示すブロック図The block diagram which shows the structure of 3rd Embodiment of a gain correction circuit. 第3の実施の形態のゲイン補正回路によるゲイン補正の手順を示すフローチャートThe flowchart which shows the procedure of the gain correction by the gain correction circuit of 3rd Embodiment ゲイン補正回路の第4の実施の形態の構成を示すブロック図The block diagram which shows the structure of 4th Embodiment of a gain correction circuit. 第4の実施の形態のゲイン補正回路によるゲイン補正の手順を示すフローチャートThe flowchart which shows the procedure of the gain correction by the gain correction circuit of 4th Embodiment 従来のゲイン補正(ホワイトバランス補正)の説明図Explanatory drawing of conventional gain correction (white balance correction)

符号の説明Explanation of symbols

10…デジタルカメラ、12…カメラ本体、14…撮影レンズ、18…シャッタボタン、34…モニタ、50…CPU、52…操作部、54…ROM、56…SDRAM、58…フラッシュメモリ、60…VRAM、62…CCD、64…CCDドライバ、66…アナログ信号処理部、68…A/D変換器、70…バス、74…AF検出部、76…AE/AWB検出部、78…圧縮/伸張処理部、80…記録制御部、82…メモリカード、84…表示制御部、100…デジタル信号処理部、102…ホワイトバランスゲイン算出回路、104…オフセット補正回路、108、108A、108B、108C…ゲイン補正回路、110…階調補正回路、106…RGB補間演算回路、112…RGB/YC変換回路、114…輪郭補正回路、116…色差マトリクス回路、118…色温度評価値算出回路、120…色補正部、122…偽色補正部、124、124A、124B…偽色補正ゲイン算出部、126…セレクタ、128…ダイナミックレンジ設定取得部、130…モード設定取得部、132…色温度評価値取得部   DESCRIPTION OF SYMBOLS 10 ... Digital camera, 12 ... Camera body, 14 ... Shooting lens, 18 ... Shutter button, 34 ... Monitor, 50 ... CPU, 52 ... Operation part, 54 ... ROM, 56 ... SDRAM, 58 ... Flash memory, 60 ... VRAM, 62 ... CCD, 64 ... CCD driver, 66 ... analog signal processing unit, 68 ... A / D converter, 70 ... bus, 74 ... AF detection unit, 76 ... AE / AWB detection unit, 78 ... compression / decompression processing unit, 80 ... Recording control unit, 82 ... Memory card, 84 ... Display control unit, 100 ... Digital signal processing unit, 102 ... White balance gain calculation circuit, 104 ... Offset correction circuit, 108, 108A, 108B, 108C ... Gain correction circuit, DESCRIPTION OF SYMBOLS 110 ... Tone correction circuit, 106 ... RGB interpolation calculation circuit, 112 ... RGB / YC conversion circuit, 114 ... Contour correction circuit, 1 6 ... Color difference matrix circuit, 118 ... Color temperature evaluation value calculation circuit, 120 ... Color correction unit, 122 ... False color correction unit, 124, 124A, 124B ... False color correction gain calculation unit, 126 ... Selector, 128 ... Dynamic range setting Acquisition unit, 130 ... mode setting acquisition unit, 132 ... color temperature evaluation value acquisition unit

Claims (8)

画像信号を構成する各色信号に所定の色補正ゲインをかけて色補正し、Nビットの色信号を生成する画像信号処理方法であって、
画像信号を構成する各色信号に所定の色補正ゲインをかけて色補正し、M(N<M)ビットの色信号を生成するステップと、
色補正後の各色信号の中で最大となる色信号を選出するステップと、
選出した色信号をNビットにすると、飽和する信号レベルを検出するステップと、
色補正後の各色信号に対して、前記信号レベルを超える色信号に所定の偽色補正ゲインをかけて偽色補正し、Nビットの色信号を生成するステップと、
からなることを特徴とする画像信号処理方法。
An image signal processing method for performing color correction by applying a predetermined color correction gain to each color signal constituting an image signal and generating an N-bit color signal,
Performing color correction by applying a predetermined color correction gain to each color signal constituting the image signal to generate a color signal of M (N <M) bits;
Selecting the maximum color signal among the color signals after color correction;
When the selected color signal is N bits, detecting a saturated signal level;
For each color signal after color correction, a color signal exceeding the signal level is subjected to false color correction by applying a predetermined false color correction gain to generate an N-bit color signal;
An image signal processing method comprising:
前記画像信号が取得された時の撮影モードの情報を取得し、該撮影モードに応じて前記偽色補正ゲインを切り替えることを特徴とする請求項1に記載の画像信号処理方法。   The image signal processing method according to claim 1, wherein information on a shooting mode when the image signal is acquired is acquired, and the false color correction gain is switched according to the shooting mode. 前記画像信号が取得された時の色温度の情報を取得し、該色温度に応じて前記偽色補正ゲインを切り替えることを特徴とする請求項1に記載の画像信号処理方法。   2. The image signal processing method according to claim 1, wherein information on a color temperature when the image signal is acquired is acquired, and the false color correction gain is switched according to the color temperature. 前記画像信号に対してダイナミックレンジを拡大する処理を行う場合において、設定するダイナミックレンジが閾値未満の場合は、前記偽色補正は行わず、画像信号を構成する各色信号に所定の色補正ゲインをかけて色補正し、Nビットの色信号を生成することを特徴とする請求項1〜3のいずれか一に記載の画像信号処理方法。   When performing a process for expanding the dynamic range for the image signal, if the dynamic range to be set is less than a threshold value, the false color correction is not performed, and a predetermined color correction gain is applied to each color signal constituting the image signal. The image signal processing method according to claim 1, wherein color correction is performed to generate an N-bit color signal. 画像信号を構成する各色信号に所定の色補正ゲインをかけて色補正し、Nビットの色信号を生成する画像信号処理装置であって、
画像信号を構成する各色信号に所定の色補正ゲインをかけて色補正し、M(N<M)ビットの色信号を生成する色補正手段と、
前記色補正手段で色補正された各色信号の中で最大となる色信号を選出する選出手段と、
前記選出手段で選出した色信号をNビットにすると、飽和する信号レベルを検出する検出手段と、
前記色補正手段で色補正された各色信号に対して、前記信号レベルを超える色信号に所定の偽色補正ゲインをかけて偽色補正し、Nビットの色信号を生成する偽色補正手段と、
を備えたことを特徴とする画像信号処理装置。
An image signal processing apparatus that performs color correction by applying a predetermined color correction gain to each color signal constituting an image signal, and generates an N-bit color signal,
Color correction means for performing color correction by applying a predetermined color correction gain to each color signal constituting the image signal, and generating a color signal of M (N <M) bits;
Selecting means for selecting the maximum color signal among the color signals color-corrected by the color correcting means;
Detecting means for detecting a saturated signal level when the color signal selected by the selecting means is set to N bits;
False color correction means for generating a N-bit color signal by performing false color correction on each color signal color-corrected by the color correction means by applying a predetermined false color correction gain to a color signal exceeding the signal level; ,
An image signal processing apparatus comprising:
前記画像信号が取得された時の撮影モードの情報を取得する撮影モード情報取得手段を有し、前記偽色補正手段は、前記撮影モード情報取得手段で取得された撮影モードに応じて前記偽色補正ゲインを切り替えることを特徴とする請求項5に記載の画像信号処理装置。   The image capturing mode information acquisition means for acquiring the information of the shooting mode when the image signal is acquired, and the false color correction means, the false color according to the shooting mode acquired by the shooting mode information acquisition means 6. The image signal processing apparatus according to claim 5, wherein the correction gain is switched. 前記画像信号が取得された時の色温度の情報を取得する色温度情報取得手段を有し、前記偽色補正手段は、前記色温度情報取得手段で取得された色温度に応じて前記偽色補正ゲインを切り替えることを特徴とする請求項5に記載の画像信号処理装置。   A color temperature information acquisition unit configured to acquire color temperature information when the image signal is acquired; and the false color correction unit includes the false color according to the color temperature acquired by the color temperature information acquisition unit. 6. The image signal processing apparatus according to claim 5, wherein the correction gain is switched. 前記画像信号に対してダイナミックレンジを拡大する処理を行う場合において、
画像信号を構成する各色信号に所定の色補正ゲインをかけて色補正し、Nビットの色信号を生成する第2の色信号補正手段と、
設定するダイナミックレンジの情報を取得するダイナミックレンジ情報取得手段と、
前記第2の色信号補正手段で生成されたNビットの色信号と前記偽色信号補正手段で生成されたNビットの色信号とを取り込み、前記ダイナミックレンジ情報取得手段で取得されたダイナミックレンジが閾値未満の場合は、前記第2の色信号補正手段で生成されたNビットの色信号を出力し、閾値以上の場合は、前記偽色信号補正手段で生成されたNビットの色信号を出力する出力切替手段と、
を備えたことを特徴とする請求項5〜7のいずれか一に記載の画像信号処理装置。
In performing the process of expanding the dynamic range for the image signal,
Second color signal correction means for performing color correction by applying a predetermined color correction gain to each color signal constituting the image signal, and generating an N-bit color signal;
Dynamic range information acquisition means for acquiring dynamic range information to be set;
The N-bit color signal generated by the second color signal correction unit and the N-bit color signal generated by the false color signal correction unit are fetched, and the dynamic range acquired by the dynamic range information acquisition unit is If it is less than the threshold value, the N-bit color signal generated by the second color signal correction means is output, and if it is equal to or greater than the threshold value, the N-bit color signal generated by the false color signal correction means is output. Output switching means for
The image signal processing apparatus according to claim 5, further comprising:
JP2007287281A 2007-11-05 2007-11-05 Image signal processing method and apparatus Pending JP2009118052A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2007287281A JP2009118052A (en) 2007-11-05 2007-11-05 Image signal processing method and apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2007287281A JP2009118052A (en) 2007-11-05 2007-11-05 Image signal processing method and apparatus

Publications (1)

Publication Number Publication Date
JP2009118052A true JP2009118052A (en) 2009-05-28

Family

ID=40784701

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2007287281A Pending JP2009118052A (en) 2007-11-05 2007-11-05 Image signal processing method and apparatus

Country Status (1)

Country Link
JP (1) JP2009118052A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009124598A (en) * 2007-11-16 2009-06-04 Canon Inc Image processing apparatus and image processing method
JP2013110513A (en) * 2011-11-18 2013-06-06 Keyence Corp Image processing apparatus, image processing method and computer program
JP2017092718A (en) * 2015-11-10 2017-05-25 キヤノン株式会社 Image processing apparatus, imaging apparatus, control method, and program
JP2020057973A (en) * 2018-10-03 2020-04-09 キヤノン株式会社 Image processing device, image processing method, program, and storage medium
CN115205140A (en) * 2022-06-13 2022-10-18 浙江大华技术股份有限公司 Image color correction method, correction apparatus, and readable storage medium

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009124598A (en) * 2007-11-16 2009-06-04 Canon Inc Image processing apparatus and image processing method
JP2013110513A (en) * 2011-11-18 2013-06-06 Keyence Corp Image processing apparatus, image processing method and computer program
JP2017092718A (en) * 2015-11-10 2017-05-25 キヤノン株式会社 Image processing apparatus, imaging apparatus, control method, and program
JP2020057973A (en) * 2018-10-03 2020-04-09 キヤノン株式会社 Image processing device, image processing method, program, and storage medium
JP7216516B2 (en) 2018-10-03 2023-02-01 キヤノン株式会社 IMAGE PROCESSING APPARATUS AND IMAGE PROCESSING METHOD, PROGRAM, STORAGE MEDIUM
CN115205140A (en) * 2022-06-13 2022-10-18 浙江大华技术股份有限公司 Image color correction method, correction apparatus, and readable storage medium

Similar Documents

Publication Publication Date Title
JP5701664B2 (en) Imaging device
KR100799215B1 (en) camera
JP5123137B2 (en) Imaging apparatus and imaging method
JP2006025312A (en) Imaging apparatus and image acquisition method
JP2003224769A (en) Digital camera
JP2012085043A (en) Image processing device, image processing method, and imaging device
JP2005117395A (en) Imaging device
JP2017022610A (en) Image processing apparatus and image processing method
JP5223686B2 (en) Imaging apparatus and imaging method
JP2010093679A (en) Imaging apparatus, and imaging control method
WO2016117137A1 (en) Image-capturing device, image-capturing method, and image display device
JP4730553B2 (en) Imaging apparatus and exposure control method
JP2009118052A (en) Image signal processing method and apparatus
JP4158029B2 (en) White balance adjustment method and electronic camera
JP5310331B2 (en) Imaging apparatus and imaging method
JP5803233B2 (en) Imaging apparatus and imaging method
JP2008298847A (en) Photography method and digital camera
JP2008053931A (en) Imaging device
JP2010068331A (en) Imaging device and imaging method
JP2006166252A (en) Imaging apparatus
JP2008160291A (en) Image signal processing apparatus, image signal processing program, and imaging apparatus
JP4114707B2 (en) Imaging device
JP2008160190A (en) Imaging apparatus and method thereof
JP5444026B2 (en) Imaging device
JP5091734B2 (en) Imaging apparatus and imaging method