JP2012239242A - Luminance signal generation device and luminance signal generation method and image pickup device - Google Patents

Luminance signal generation device and luminance signal generation method and image pickup device Download PDF

Info

Publication number
JP2012239242A
JP2012239242A JP2012200854A JP2012200854A JP2012239242A JP 2012239242 A JP2012239242 A JP 2012239242A JP 2012200854 A JP2012200854 A JP 2012200854A JP 2012200854 A JP2012200854 A JP 2012200854A JP 2012239242 A JP2012239242 A JP 2012239242A
Authority
JP
Japan
Prior art keywords
signal
frequency signal
luminance signal
pixel
luminance
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.)
Granted
Application number
JP2012200854A
Other languages
Japanese (ja)
Other versions
JP5409864B2 (en
Inventor
Eiichiro Ikeda
栄一郎 池田
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.)
Canon Inc
Original Assignee
Canon Inc
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 Canon Inc filed Critical Canon Inc
Priority to JP2012200854A priority Critical patent/JP5409864B2/en
Publication of JP2012239242A publication Critical patent/JP2012239242A/en
Application granted granted Critical
Publication of JP5409864B2 publication Critical patent/JP5409864B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

PROBLEM TO BE SOLVED: To generate a luminance signal from a picture signal read out of an image pickup device using color filters of a primary color Bayer array, in which luminance signal occurrence of a folding distortion in the diagonal direction component of a red or blue color subject is suppressed.SOLUTION: A first high frequency signal is generated from the picture signal of pixels in all colors of an image pickup device by limiting the band of the spatial frequency thereof. Also, a second high frequency signal is generated from the picture signal of pixels in one of red and blue colors by limiting the band of the spatial frequency thereof. Then, a high frequency signal is generated for a pixel of interest by adding the first and the second high frequency signals together while applying a weight in such a way that the closer to one of red and blue colors the pixel of interest is, the higher will be a ratio of the second high frequency signal. The high frequency signal for the pixel of interest is added to a luminance signal generated for the pixel of interest, whereby an edge enhanced luminance signal for the pixel of interest is generated.

Description

本発明は輝度信号生成装置及び輝度信号生成方法並びに撮像装置に関する。本発明は特に、原色ベイヤー配列の色フィルタを用いた撮像素子により得られる信号から輝度信号を生成する装置及び方法、並びにそれらを用いる撮像装置に関する。   The present invention relates to a luminance signal generation device, a luminance signal generation method, and an imaging device. In particular, the present invention relates to an apparatus and method for generating a luminance signal from a signal obtained by an image sensor using a primary color Bayer array color filter, and an imaging apparatus using them.

CCDイメージセンサやCMOSイメージセンサのような、光量を検出可能な撮像素子を用いてカラー画像を生成するため、色フィルタを透過させた光を撮像素子に入射させる構成が一般に用いられている。   In order to generate a color image using an image sensor that can detect the amount of light, such as a CCD image sensor or a CMOS image sensor, a configuration in which light transmitted through a color filter is incident on the image sensor is generally used.

色フィルタには、用いる色の種類や、画素毎に割り当てる色の配列などによって様々な種類が存在するが、色の種類は原色(赤、緑、青)又は補色(シアン、マゼンタ、イエロー)が、色配列についてはベイヤー配列がそれぞれ広く用いられている。   There are various types of color filters depending on the type of color used and the arrangement of colors assigned to each pixel. The color types are primary colors (red, green, blue) or complementary colors (cyan, magenta, yellow). For the color arrangement, the Bayer arrangement is widely used.

図24は、原色ベイヤー配列の1単位を示す図である。実際には、同様の配列が撮像素子の画素数に応じて繰り返される。Rが赤、G1及びG2は緑、Bが青である。   FIG. 24 is a diagram showing one unit of the primary color Bayer array. Actually, the same arrangement is repeated according to the number of pixels of the image sensor. R is red, G1 and G2 are green, and B is blue.

図25は、図24に示す原色ベイヤー配列の色フィルタを用いて輝度信号を生成する従来方法のうち、緑(G)信号のみから輝度信号(OG信号)を生成するOutOfGreen方式を実現する輝度生成回路の構成例を示す図である。   FIG. 25 shows a luminance generation that realizes an OutOfGreen method in which a luminance signal (OG signal) is generated only from a green (G) signal, among conventional methods for generating a luminance signal using the color filters of the primary color Bayer array shown in FIG. It is a figure which shows the structural example of a circuit.

まず、撮像素子の出力(2204)をデジタル化したRAW信号2200に対してZero挿入回路2201を適用して、G画素以外の値を0とする(2205)。次に、垂直方向の帯域を制限するローパスフィルタ(V-LPF)回路2202及び水平方向の帯域を制限するローパスフィルタ(H-LPF)回路2203を適用し、輝度信号を得る。以下、OutOfGreen方式で得られる輝度信号をOG信号という。   First, the zero insertion circuit 2201 is applied to the RAW signal 2200 obtained by digitizing the output (2204) of the image sensor, and values other than the G pixel are set to 0 (2205). Next, a low-pass filter (V-LPF) circuit 2202 for limiting the vertical band and a low-pass filter (H-LPF) circuit 2203 for limiting the horizontal band are applied to obtain a luminance signal. Hereinafter, a luminance signal obtained by the OutOfGreen method is referred to as an OG signal.

また、図24に示す原色ベイヤー配列の色フィルタを用いて輝度信号を生成する従来方法の別の例として、RGB全ての画素を用いて輝度信号(SWY信号)を生成するSWY方式がある。   Further, as another example of the conventional method for generating the luminance signal using the color filters of the primary color Bayer array shown in FIG. 24, there is an SWY method for generating the luminance signal (SWY signal) using all the RGB pixels.

図26は、SWY方式を実現する輝度生成回路の構成例を示す図である。
図25との比較から明らかなように、SWY方式は、OutOfGreen方式における、Zero挿入回路2201を用いずに輝度信号を得る方式である。以下、SWY方式で得られる輝度信号をSWY信号という。
FIG. 26 is a diagram illustrating a configuration example of a luminance generation circuit that realizes the SWY method.
As is clear from comparison with FIG. 25, the SWY method is a method of obtaining a luminance signal without using the zero insertion circuit 2201 in the OutOfGreen method. Hereinafter, a luminance signal obtained by the SWY method is referred to as a SWY signal.

図27は、OG信号とSWY信号の解像可能な空間周波数特性を示す図である。
x軸は被写体の水平(H)方向の周波数空間を、y軸は垂直(V)方向の周波数空間を示し、原点から遠ざかるほど空間周波数が高い。OG信号はG信号のみから輝度信号を生成するため、水平及び垂直方向の解像限界は撮像素子のナイキスト周波数(軸上、π/2)に等しい。しかし、斜め方向は画素が存在しないラインが存在するため、斜め方向の限界解像周波数は水平垂直と比較して低く、結果としてひし形上の空間周波数領域2400が解像可能な空間周波数となる。
FIG. 27 is a diagram showing resolvable spatial frequency characteristics of the OG signal and the SWY signal.
The x-axis indicates the frequency space in the horizontal (H) direction of the subject, the y-axis indicates the frequency space in the vertical (V) direction, and the spatial frequency increases as the distance from the origin increases. Since the OG signal generates a luminance signal from only the G signal, the resolution limit in the horizontal and vertical directions is equal to the Nyquist frequency (on the axis, π / 2) of the image sensor. However, since there are lines in which no pixels exist in the oblique direction, the limit resolution frequency in the oblique direction is lower than that in the horizontal and vertical directions, and as a result, the spatial frequency region 2400 on the rhombus becomes a resolvable spatial frequency.

一方、SWY信号は、全ての画素を用いて信号をつくるため、被写体が無彩色の場合、図のような正方形領域2401が解像可能な空間周波数となる。しかしながら、例えば赤い被写体においては、R画素以外からの画素からは輝度信号が出力されないため、無彩色被写体に比べ、水平及び垂直方向とも半分となる空間周波数範囲2402でしか解像しない。   On the other hand, since the SWY signal is generated using all pixels, when the subject is achromatic, the square frequency 2401 as shown in the figure has a spatial frequency that can be resolved. However, for a red subject, for example, luminance signals are not output from pixels other than the R pixel, and therefore, resolution is performed only in a spatial frequency range 2402 that is half of the horizontal and vertical directions compared to an achromatic subject.

特許文献1では、図27における、OG信号の斜め領域2403については、SWY信号で置換する方法を提案している。ただし、有彩色被写体はSWY信号の解像限界周波数が下がるため、斜め領域2403が無彩色被写体である場合に限り、OG信号をSWY信号で置換する。その後、生成された輝度信号を用いてエッジ強調成分を検出し、輝度信号に加算して最終輝度信号を生成する。   Patent Document 1 proposes a method of replacing the oblique region 2403 of the OG signal in FIG. 27 with the SWY signal. However, since the resolution limit frequency of the SWY signal is lowered for the chromatic object, the OG signal is replaced with the SWY signal only when the oblique region 2403 is an achromatic object. Thereafter, an edge enhancement component is detected using the generated luminance signal and added to the luminance signal to generate a final luminance signal.

一方、特許文献2では、被写体の角度に応じて、予め用意した複数の補間フィルタを使い分けて輝度信号を生成し、その後エッジ強調を行なって最終輝度信号を生成する方法を提案している。   On the other hand, Patent Document 2 proposes a method of generating a luminance signal by using a plurality of interpolation filters prepared in advance according to the angle of the subject and then performing edge enhancement to generate a final luminance signal.

また、特許文献3では、特許文献1と同様、OG信号とSWY信号を、被写体の色相及び彩度に応じて加重加算する方法を提案している。具体的には、低彩度被写体被写体はSWY信号、高彩度被写体かつMg(マゼンタ)、G(グリーン)の被写体にはSWY信号を使用し、その他有彩色被写体についてはOG信号を使用する。その後、MIX信号でエッジ強調成分を算出し、別途生成した輝度信号に加算して最終輝度信号を生成する。   Patent Document 3 proposes a method of weighted addition of the OG signal and the SWY signal according to the hue and saturation of the subject, as in Patent Document 1. Specifically, the SWY signal is used for the low saturation subject, the SWY signal is used for the high saturation subject and Mg (magenta) and G (green) subjects, and the OG signal is used for the other chromatic subjects. Thereafter, an edge enhancement component is calculated from the MIX signal and added to a separately generated luminance signal to generate a final luminance signal.

更に、特許文献4記載の方法では、OG信号を用いて第1の高周波信号を生成するとともに、全色画素の信号から、水平及び垂直方向だけではなく、斜め方向の帯域も制限した角度適応型SWY方式で生成した輝度信号を用いて第2の高周波信号を生成する。そして、信号の空間周波数に応じて第1の高周波信号と第2の高周波信号を加重加算して第3の高周波信号を生成し、OG信号と第3の高周波信号を加算して最終的な輝度信号を生成する。   Further, in the method described in Patent Document 4, the first high-frequency signal is generated using the OG signal, and the angle adaptive type in which not only the horizontal and vertical directions but also the diagonal band is limited from the signals of all the color pixels. A second high-frequency signal is generated using a luminance signal generated by the SWY method. Then, the first high-frequency signal and the second high-frequency signal are weighted and added according to the spatial frequency of the signal to generate a third high-frequency signal, and the OG signal and the third high-frequency signal are added to obtain the final luminance. Generate a signal.

特開2003−348609号公報JP 2003-348609 A 特開2003−196649号公報JP 2003-196649 A 特許第3699873号公報Japanese Patent No. 3699873 特開2008−72377号公報JP 2008-72377 A

しかしながら、特許文献1記載の手法を原色ベイヤー配列の色フィルタを用いて得た信号に適用する場合、図26に示した輝度信号生成回路で生成したSWY信号を用いると、斜め45度及び135度付近に偽解像信号(折り返し歪み)が発生する弊害があった。これは、図26の回路では、H方向及びV方向のみ帯域制限しているため、斜め45度及び135度方向における帯域制限が十分でないことによるものと考えられる。   However, when the technique described in Patent Document 1 is applied to a signal obtained by using a color filter with a primary color Bayer array, if the SWY signal generated by the luminance signal generation circuit shown in FIG. There was an adverse effect of generating a false resolution signal (folding distortion) in the vicinity. This is presumably because the band in the H and V directions is limited in the circuit of FIG. 26, and the band limitation in the 45 ° and 135 ° directions is not sufficient.

また、有彩色被写体についてはOG信号を用いるので、有彩色被写体についての斜め方向の解像度は向上しない。更に、OG信号の一部(斜め領域2403)をSWY信号に置換えた後の輝度信号でエッジ強調信号を生成すると、OG信号とSWY信号の切り替わり部分が強調され、不自然なテクスチャーが発生しやすい。   Further, since the OG signal is used for the chromatic color subject, the oblique resolution of the chromatic color subject is not improved. Furthermore, when an edge emphasis signal is generated with a luminance signal after a part of the OG signal (oblique area 2403) is replaced with the SWY signal, the switching portion between the OG signal and the SWY signal is emphasized, and an unnatural texture is likely to occur. .

また、特許文献2の手法は、被写体の確度に応じた複数の補間フィルタを予め用意し、かつ保持する必要がある。色の構成を例えばNTSC−RGB空間とすると、輝度信号構成比であるR:G:B=3:6:1を維持する補間フィルタを準備する必要がある。その結果、フィルタの係数が限定され、被写体の角度に最適なフィルタ処理が行えないという問題がある。また、特許文献1と同様、複数の補間方法で算出された輝度信号を混在させてからエッジ強調を実施しているため、算出方法の異なる輝度信号の微妙な切り替わりが強調されてしまう。   In the method of Patent Document 2, it is necessary to prepare and hold a plurality of interpolation filters according to the accuracy of the subject in advance. When the color configuration is, for example, NTSC-RGB space, it is necessary to prepare an interpolation filter that maintains the luminance signal configuration ratio R: G: B = 3: 6: 1. As a result, the filter coefficient is limited, and there is a problem that optimum filter processing cannot be performed for the angle of the subject. Similarly to Patent Document 1, since edge enhancement is performed after luminance signals calculated by a plurality of interpolation methods are mixed, subtle switching of luminance signals with different calculation methods is emphasized.

また、特許文献3の手法では、OG信号の代わりにSWY信号を使用するのがMgとGの被写体であるため、有彩色被写体のうちMgとG以外の被写体の解像度は向上しない。更に、特許文献1及び特許文献2の手法と同様、複数の手法で算出された輝度信号を加重加算してからエッジ強調を実施しているため、手法の切り替わり部分が強調されてしまう。   Further, in the method of Patent Document 3, since the SWY signal is used instead of the OG signal by the Mg and G subjects, the resolution of subjects other than Mg and G among the chromatic subjects is not improved. Furthermore, as in the methods of Patent Document 1 and Patent Document 2, edge enhancement is performed after weighted addition of luminance signals calculated by a plurality of methods, so that the switching portion of the method is emphasized.

また、特許文献4では、赤色被写体における画質劣化を抑制するため、赤色領域を検出し、その領域はOG信号から生成した第1の高周波信号を用いて最終的な輝度信号を生成していた。そのため、赤色被写体がぼける、特に赤色と区別のつきにくい金髪などがぼけるといった現象や、赤色の斜め線の折り返し歪みが除去できないという問題があった。
また、色フィルタの分光分布特性によっては青色被写体について同様の問題が発生する。
In Patent Document 4, in order to suppress image quality deterioration in a red subject, a red region is detected, and the final luminance signal is generated using the first high-frequency signal generated from the OG signal. For this reason, there are problems such as a phenomenon that a red subject is blurred, particularly a blonde that is difficult to distinguish from red, and a problem that the aliasing distortion of the red diagonal line cannot be removed.
The same problem occurs for a blue subject depending on the spectral distribution characteristics of the color filter.

本発明はこのような従来技術の問題点に鑑みてなされたものである。本発明の一目的は、赤色又は青色被写体について斜め方向成分における折り返し歪みの発生を抑制可能な輝度信号生成装置及び輝度信号生成方法を提供することにある。   The present invention has been made in view of such problems of the prior art. An object of the present invention is to provide a luminance signal generation apparatus and a luminance signal generation method capable of suppressing the occurrence of aliasing distortion in a diagonal component for a red or blue subject.

上述の目的は、原色ベイヤー配列の色フィルタを備えた撮像素子から読み出した画像信号から、エッジ強調された輝度信号を画素毎に生成する輝度信号生成装置であって、画像信号から輝度信号を生成する輝度信号生成手段と、撮像素子の全色の画素の画像信号を用いて第1の高周波信号を生成する第1の高周波信号生成手段と、撮像素子のうち、赤色又は青色のいずれか一方の画素の画像信号を用いて第2の高周波信号を生成する第2の高周波信号生成手段と、画像信号から、着目画素が赤色又は青色のいずれか一方に近い色かどうかの尺度を示す指標を算出する算出手段と、指標に基づき、着目画素が赤色又は青色のいずれか一方に近い色であるほど、第2の高周波信号の割合が高くなるように第1の高周波信号と第2の高周波信号を加重加算して着目画素に対する高周波信号を生成する第1の加重加算手段と、輝度信号生成手段が着目画素に対して生成した輝度信号に、着目画素に対する高周波信号を加算して、着目画素に対するエッジ強調された輝度信号を生成する加算手段を有することを特徴とする輝度信号生成装置によって達成される。   The above-described object is a luminance signal generation device that generates an edge-enhanced luminance signal for each pixel from an image signal read from an image sensor having a primary color Bayer array color filter, and generates the luminance signal from the image signal. A luminance signal generating means for generating, a first high-frequency signal generating means for generating a first high-frequency signal using image signals of pixels of all colors of the image sensor, and one of red and blue among the image sensors. Second high-frequency signal generation means for generating a second high-frequency signal using the image signal of the pixel, and an index indicating a measure of whether the pixel of interest is a color close to either red or blue from the image signal Based on the calculation means and the index, the first high-frequency signal and the second high-frequency signal are set so that the ratio of the second high-frequency signal increases as the pixel of interest is closer to either red or blue. Addition First weighted addition means for generating a high-frequency signal for the pixel of interest by addition, and edge enhancement for the pixel of interest by adding the high-frequency signal for the pixel of interest to the luminance signal generated by the luminance signal generation means for the pixel of interest It is achieved by a luminance signal generating apparatus characterized by having addition means for generating a luminance signal.

また、上述の目的は、原色ベイヤー配列の色フィルタを備えた撮像素子から読み出した画像信号から、エッジ強調された輝度信号を画素毎に生成する輝度信号生成方法であって、輝度信号生成手段が、画像信号から輝度信号を生成する輝度信号生成工程と、第1の高周波信号生成手段が、撮像素子の全色の画素の画像信号を用いて第1の高周波信号を生成する第1の高周波信号生成工程と、第2の高周波信号生成手段が、撮像素子のうち、赤色又は青色のいずれか一方の画素の画像信号を用いて第2の高周波信号を生成する第2の高周波信号生成工程と、算出手段が、画像信号から、着目画素が赤色又は青色のいずれか一方に近い色かどうかの尺度を示す指標を算出する算出工程と、第1の加重加算手段が、指標に基づき、着目画素が赤色又は青色のいずれか一方に近い色であるほど、第2の高周波信号の割合が高くなるように第1の高周波信号と第2の高周波信号を加重加算して着目画素に対する高周波信号を生成する第1の加重加算工程と、加算手段が、輝度信号生成工程が着目画素に対して生成した輝度信号に、着目画素に対する高周波信号を加算して、着目画素に対するエッジ強調された輝度信号を生成する加算工程を有することを特徴とする輝度信号生成方法によっても達成される。   Another object of the present invention is to provide a luminance signal generation method for generating an edge-enhanced luminance signal for each pixel from an image signal read from an image sensor having a primary color Bayer array color filter. A luminance signal generating step of generating a luminance signal from the image signal, and a first high frequency signal in which the first high frequency signal generating means generates the first high frequency signal using the image signals of the pixels of all colors of the image sensor. And a second high-frequency signal generating step in which the second high-frequency signal generating means generates a second high-frequency signal using an image signal of one of red or blue pixels in the image sensor. A calculating unit that calculates an index indicating a measure of whether the pixel of interest is a color close to either red or blue from the image signal; and a first weighted addition unit that determines whether the pixel of interest is based on the index Red or The first high-frequency signal for the pixel of interest is generated by weighted addition of the first high-frequency signal and the second high-frequency signal so that the closer the color is to one of blue, the higher the ratio of the second high-frequency signal is. And an adding step in which the addition means adds a high-frequency signal for the pixel of interest to the luminance signal generated by the luminance signal generation step for the pixel of interest to generate an edge-enhanced luminance signal for the pixel of interest. It is also achieved by a luminance signal generation method characterized by comprising:

このような構成により、本発明によれば、赤色又は青色被写体についても斜め方向成分における折り返し歪みの発生を抑制した輝度信号を生成することができる。   With such a configuration, according to the present invention, it is possible to generate a luminance signal that suppresses the occurrence of aliasing distortion in a diagonal component even for a red or blue subject.

本発明の第1の実施形態に係る輝度信号生成装置の構成例を示すブロック図である。It is a block diagram which shows the structural example of the luminance signal generation apparatus which concerns on the 1st Embodiment of this invention. 本発明の第1の実施形態に係る輝度信号生成装置に用いるローパスフィルタの周波数特性の例を示す図である。It is a figure which shows the example of the frequency characteristic of the low pass filter used for the luminance signal generation apparatus which concerns on the 1st Embodiment of this invention. 本発明の第1の実施形態に係る輝度信号生成装置に用いる2次元空間フィルタの係数の例を示す図である。It is a figure which shows the example of the coefficient of the two-dimensional spatial filter used for the luminance signal generation apparatus which concerns on the 1st Embodiment of this invention. 本発明の第1の実施形態における角度信号生成回路の構成例を示すブロック図である。It is a block diagram which shows the structural example of the angle signal generation circuit in the 1st Embodiment of this invention. 本発明の第1の実施形態における第1のHVD加重加算回路の構成例を示すブロック図である。It is a block diagram which shows the structural example of the 1st HVD weighted addition circuit in the 1st Embodiment of this invention. 図5における第1の係数算出回路の入出力特性例を示す図である。FIG. 6 is a diagram illustrating an input / output characteristic example of a first coefficient calculation circuit in FIG. 5. 本発明の第1の実施形態における色処理回路の構成例を示すブロック図である。FIG. 2 is a block diagram illustrating a configuration example of a color processing circuit according to the first embodiment of the present invention. 本発明の第1の実施形態における第1及び第2のGR加重加算回路の構成例を示すブロック図である。It is a block diagram which shows the structural example of the 1st and 2nd GR weighted addition circuit in the 1st Embodiment of this invention. 図8における第1の赤色度算出回路の入出力特性例を示す図である。It is a figure which shows the example of the input-output characteristic of the 1st red degree calculation circuit in FIG. 図8における第2の赤色度算出回路の入出力特性例を示す図である。It is a figure which shows the input-output characteristic example of the 2nd redness degree calculation circuit in FIG. 図8における第2の係数算出回路の入出力特性例を示す図である。FIG. 9 is a diagram illustrating an input / output characteristic example of a second coefficient calculation circuit in FIG. 8. 本発明の第2の実施形態に係る輝度信号生成装置の構成例を示すブロック図である。It is a block diagram which shows the structural example of the luminance signal generation apparatus which concerns on the 2nd Embodiment of this invention. 本発明の第2の実施形態に係る輝度信号生成装置における適応補間回路の構成例を示すブロック図である。It is a block diagram which shows the structural example of the adaptive interpolation circuit in the luminance signal generation apparatus which concerns on the 2nd Embodiment of this invention. 図13におけるDiffH信号生成回路及びDiffV信号生成回路の動作を説明する図である。It is a figure explaining operation | movement of the DiffH signal generation circuit in FIG. 13, and a DiffV signal generation circuit. 図13におけるG係数算出回路の入出力特性例を示す図である。It is a figure which shows the input-output characteristic example of the G coefficient calculation circuit in FIG. 本発明の第2の実施形態に係る輝度信号生成装置における斜め加重加算回路の構成例を示すブロック図である。It is a block diagram which shows the structural example of the diagonally weighted addition circuit in the luminance signal generation apparatus which concerns on the 2nd Embodiment of this invention. 適応OG信号とSWY信号が解像可能な周波数空間を示す図である。It is a figure which shows the frequency space in which an adaptive OG signal and a SWY signal can be resolved. 図16における第2のSWY係数算出回路の入出力特性例を示す図である。FIG. 17 is a diagram illustrating an input / output characteristic example of a second SWY coefficient calculation circuit in FIG. 16. 図16における第3のSWY係数算出回路の構成例を示すブロック図である。FIG. 17 is a block diagram illustrating a configuration example of a third SWY coefficient calculation circuit in FIG. 16. 図19におけるCalSwyUse3の入出力特性例を示す図である。It is a figure which shows the input-output characteristic example of CalSwyUse3 in FIG. 図16における第4のSWY係数算出回路の構成例を示すブロック図である。FIG. 17 is a block diagram illustrating a configuration example of a fourth SWY coefficient calculation circuit in FIG. 16. 図21におけるCalSwyUse4の入出力特性例を示す図である。It is a figure which shows the input-output characteristic example of CalSwyUse4 in FIG. 図16における第5のSWY係数算出回路の構成例を示すブロック図である。FIG. 17 is a block diagram illustrating a configuration example of a fifth SWY coefficient calculation circuit in FIG. 16. 原色ベイヤー配列の1単位を示す図である。It is a figure which shows 1 unit of a primary color Bayer arrangement | sequence. OG方式による輝度信号生成回路の構成例を示すブロック図である。It is a block diagram which shows the structural example of the luminance signal generation circuit by OG system. SWY方式による輝度信号生成回路の構成例を示すブロック図である。It is a block diagram which shows the structural example of the luminance signal generation circuit by a SWY system. OG信号とSWY信号の解像可能な空間周波数特性を示す図である。It is a figure which shows the resolvable spatial frequency characteristic of OG signal and SWY signal.

(第1の実施形態)
以下、図面を参照して、本発明をその好適かつ例示的な実施形態に基づき詳細に説明する。
図1は本発明の第1の実施形態に係る輝度信号生成装置の構成例を示すブロック図である。本実施形態の輝度信号生成装置は、原色ベイヤー配列の色フィルタを備える撮像素子を用いる撮像装置において、いわゆる現像処理等の信号処理を行なう信号処理回路で好適に実現可能である。
(First embodiment)
Hereinafter, the present invention will be described in detail based on preferred and exemplary embodiments with reference to the drawings.
FIG. 1 is a block diagram showing a configuration example of a luminance signal generation apparatus according to the first embodiment of the present invention. The luminance signal generation device according to the present embodiment can be suitably realized by a signal processing circuit that performs signal processing such as so-called development processing in an imaging device that uses an imaging device having a color filter with a primary color Bayer array.

また、輝度信号生成装置は、撮像素子から読み出した画素毎の画像信号を用い、画素毎の輝度信号を生成する。従って、特に述べないが、以下の処理は着目画素を順次更新しながら、着目画素ごとに実行される。   The luminance signal generation device generates a luminance signal for each pixel using the image signal for each pixel read from the image sensor. Therefore, although not particularly described, the following processing is executed for each target pixel while sequentially updating the target pixel.

(第1の輝度信号の算出)
原色ベイヤー配列の色フィルタを備える撮像素子(図示せず)から読み出され、デジタルデータ化及びホワイトバランス処理が行なわれた画像信号がRAW信号100として入力される。
(Calculation of the first luminance signal)
An image signal read out from an image sensor (not shown) having a primary color Bayer array color filter and subjected to digitization and white balance processing is input as a RAW signal 100.

第1のローパスフィルタとしての垂直ローパスフィルタ(V-LPF)101および水平ローパスフィルタ(H-LPF)102は、RAW信号100の水平および垂直方向の帯域を制限し、輝度信号Yhv_1を生成する。   A vertical low-pass filter (V-LPF) 101 and a horizontal low-pass filter (H-LPF) 102 serving as a first low-pass filter limit the horizontal and vertical bands of the RAW signal 100 to generate a luminance signal Yhv_1.

図2は本実施形態の輝度信号生成装置に用いるローパスフィルタの周波数特性の例を示す図である。図2において、x軸が空間周波数、y軸が通過ゲインを示している。V-LPF101、V-LPF102は、撮像素子のナイキスト周波数Nでゲインが0となる周波数特性200を有している。一方、後述するように、V-LPF116、H-LPF117は、撮像素子のナイキスト周波数Nの半分の周波数(N/2)でゲインが0となる周波数特性201を有する。
通常、白黒(無彩色)被写体には、周波数特性200を有するV-LPF101及びH-LPF102を適用する。
FIG. 2 is a diagram illustrating an example of frequency characteristics of the low-pass filter used in the luminance signal generation apparatus of the present embodiment. In FIG. 2, the x-axis indicates the spatial frequency and the y-axis indicates the pass gain. The V-LPF 101 and the V-LPF 102 have a frequency characteristic 200 in which the gain is 0 at the Nyquist frequency N of the image sensor. On the other hand, as will be described later, the V-LPF 116 and the H-LPF 117 have a frequency characteristic 201 in which the gain is 0 at a frequency (N / 2) that is half the Nyquist frequency N of the image sensor.
Normally, the V-LPF 101 and the H-LPF 102 having the frequency characteristic 200 are applied to a monochrome (achromatic) subject.

H-LPF102から出力される輝度信号Yhv_1は、第1のHVD加重加算回路114に供給される。輝度信号Yhv_1はまた、2次元ローパスフィルタD45-LPF103及びD135-LPF106、及び垂直バンドパスフィルタ(V-LPF)109及び水平バンドパスフィルタ(H-BPF)111に供給される。   The luminance signal Yhv_1 output from the H-LPF 102 is supplied to the first HVD weighted addition circuit 114. The luminance signal Yhv_1 is also supplied to the two-dimensional low-pass filters D45-LPF103 and D135-LPF106, the vertical bandpass filter (V-LPF) 109, and the horizontal bandpass filter (H-BPF) 111.

図3は、本実施形態の輝度信号生成装置に用いる2次元空間フィルタの係数の例を示す図である。図3において、(a)はD45-LPF103、(b)はD135-LPF106、(c)は後述するD135-BPF104、(d)は後述するD45-BPF107の係数の例を示す。   FIG. 3 is a diagram illustrating an example of coefficients of a two-dimensional spatial filter used in the luminance signal generation apparatus according to the present embodiment. 3, (a) shows an example of D45-LPF 103, (b) shows an example of D135-LPF 106, (c) shows an example of D135-BPF 104 described later, and (d) shows an example of a coefficient of D45-BPF 107 described later.

D45-LPF103は、輝度信号Yhv_1の45度方向の帯域を制限した輝度信号Yd45_1を生成して、第1のHVD加重加算回路114に供給する。
D135-LPF106は、輝度信号Yhv_1の135度方向の帯域を制限した輝度信号Yd135_1を生成して、第1のHVD加重加算回路114に供給する。
The D45-LPF 103 generates a luminance signal Yd45_1 in which the band of the luminance signal Yhv_1 in the 45-degree direction is limited, and supplies the luminance signal Yd45_1 to the first HVD weighted addition circuit 114.
The D135-LPF 106 generates a luminance signal Yd135_1 in which the band of the luminance signal Yhv_1 in the 135 degree direction is limited, and supplies the luminance signal Yd135_1 to the first HVD weighted addition circuit 114.

第1のHVD加重加算回路114は、水平及び垂直方向に帯域制限された輝度信号Yhv_1、さらに45度方向または135度方向がそれぞれ帯域制限された輝度信号Yd45_1及び輝度信号Yd135_1を加重加算し、第1の輝度信号Yh_1を生成する。   The first HVD weighted adder circuit 114 weights and adds the luminance signal Yhv_1 band-limited in the horizontal and vertical directions, and the luminance signal Yd45_1 and luminance signal Yd135_1 band-limited in the 45-degree direction or 135-degree direction, respectively. 1 luminance signal Yh_1 is generated.

次に、第1のHVD加重加算回路114での加重加算方法について説明する。
第1のHVD加重加算回路114は、被写体の角度に応じた加重加算係数により、3つの輝度信号を加重加算する。
Next, a weighted addition method in the first HVD weighted addition circuit 114 will be described.
The first HVD weighted addition circuit 114 weights and adds the three luminance signals with a weighted addition coefficient corresponding to the angle of the subject.

まず、RAW信号100から、OG信号生成回路140でOG信号を生成する。OG信号生成回路140は、図25を用いて説明した方法でOG信号を生成する。角度信号生成回路150は、OG信号から被写体の角度を示す角度信号angleSigDを生成し、第1のHVD加重加算回路114に供給する。   First, an OG signal is generated from the RAW signal 100 by the OG signal generation circuit 140. The OG signal generation circuit 140 generates an OG signal by the method described with reference to FIG. The angle signal generation circuit 150 generates an angle signal angleSigD indicating the angle of the subject from the OG signal, and supplies the angle signal angleSigD to the first HVD weighted addition circuit 114.

図4は、角度信号生成回路の構成例を示すブロック図である。OG信号300は、2次元バンドパスフィルタであるD135-BPF301及びD45-BPF303へ入力される。D135-BPF301及びD45-BPF303は、それぞれ図3の(c)及び(d)に示す係数を有し、45度線及び135度線を強調する。
絶対値回路(ABS)302及び304は、D135-BPF301及びD45-BPF303の出力から、それぞれ、45度線検出信号及び135度線検出信号を生成する。
FIG. 4 is a block diagram illustrating a configuration example of the angle signal generation circuit. The OG signal 300 is input to D135-BPF301 and D45-BPF303, which are two-dimensional bandpass filters. D135-BPF301 and D45-BPF303 have coefficients shown in (c) and (d) of FIG. 3, respectively, and emphasize the 45-degree line and the 135-degree line.
Absolute value circuits (ABS) 302 and 304 generate 45 degree line detection signals and 135 degree line detection signals from the outputs of D135-BPF 301 and D45-BPF 303, respectively.

減算回路305は、ABS302からの45度線検出信号からABS304からの135度線検出信号を減算し、減算結果を角度信号(angleSigD)306とする。角度信号angleSigDは、正なら45度線、負なら135度線を意味する。また、出力信号の振幅が小さい領域は水平および垂直線を意味する。   The subtraction circuit 305 subtracts the 135 degree line detection signal from the ABS 304 from the 45 degree line detection signal from the ABS 302 and sets the subtraction result as an angle signal (angleSigD) 306. The angle signal angleSigD means a 45 degree line if positive and a 135 degree line if negative. The region where the amplitude of the output signal is small means horizontal and vertical lines.

図5は、第1の輝度信号生成手段としての第1のHVD加重加算回路114の構成例を示すブロック図である。
第1の係数算出回路1141は、角度信号angleSigDの値に基づき、加重加算係数D_UseRatioを求めて出力する。極性判別回路1142は角度信号angleSigDの極性を判別し、極性(正負)に基づいてセレクタ1143を制御することで、輝度信号Yd45_1及び輝度信号Yd135_1の一方を第1の演算回路1144へ供給する。具体的には、極性判別回路1142は、角度信号angleSigDの極性が正の場合には輝度信号Yd45_1を、負の場合には輝度信号Yd135_1を第1の演算回路1144へ供給するようにセレクタ1143を制御する。
FIG. 5 is a block diagram showing a configuration example of the first HVD weighted addition circuit 114 as the first luminance signal generation means.
The first coefficient calculation circuit 1141 calculates and outputs a weighted addition coefficient D_UseRatio based on the value of the angle signal angleSigD. The polarity discriminating circuit 1142 discriminates the polarity of the angle signal angleSigD and controls the selector 1143 based on the polarity (positive / negative), thereby supplying one of the luminance signal Yd45_1 and the luminance signal Yd135_1 to the first arithmetic circuit 1144. Specifically, the polarity determination circuit 1142 supplies the selector 1143 to supply the luminance signal Yd45_1 to the first arithmetic circuit 1144 when the polarity of the angle signal angleSigD is positive and the luminance signal Yd135_1 when it is negative. Control.

第1の演算回路1144は、第1の係数算出回路1141からの加重加算係数D_UseRatioを用いて、輝度信号Yhv_1及び、輝度信号Yd45_1又は輝度信号Yd135_1を加重加算し、第1の輝度信号Yh_1を算出する。   The first arithmetic circuit 1144 uses the weighted addition coefficient D_UseRatio from the first coefficient calculation circuit 1141 to calculate the first luminance signal Yh_1 by weighted addition of the luminance signal Yhv_1 and the luminance signal Yd45_1 or the luminance signal Yd135_1. To do.

図6は、第1の係数算出回路1141の入出力特性例を示す図である。
角度信号angleSigDの絶対値(振幅)が0から予め設定した閾値P1まで(0 ≦ |angleSigD| ≦ P1)は水平もしくは垂直信号であることから、第1の係数算出回路1141は、係数D_UseRatioを0とする。一方、完全な斜め信号を表す閾値P2以上の区間(P2 < |angleSigD|)は係数D_UseRatioを128とする。一方、閾値P1からP2の区間(P1 < |angleSigD| < P2)は、線形補間出力する。
FIG. 6 is a diagram illustrating an input / output characteristic example of the first coefficient calculation circuit 1141.
Since the absolute value (amplitude) of the angle signal angleSigD is from 0 to a preset threshold value P1 (0 ≦ | angleSigD | ≦ P1) is a horizontal or vertical signal, the first coefficient calculation circuit 1141 sets the coefficient D_UseRatio to 0. And On the other hand, the coefficient D_UseRatio is set to 128 in a section (P2 <| angleSigD |) equal to or greater than the threshold value P2 representing a complete oblique signal. On the other hand, linear interpolation output is performed in the interval between the threshold values P1 and P2 (P1 <| angleSigD | <P2).

このようにして、第1の係数算出回路1141は、角度信号の絶対値|angleSigD|に基づいて加重加算係数D_UseRatioを求め、第1の演算回路1144に供給する。   In this way, the first coefficient calculation circuit 1141 obtains the weighted addition coefficient D_UseRatio based on the absolute value | angleSigD | of the angle signal and supplies it to the first arithmetic circuit 1144.

第1の演算回路1144は、以下の式(1−1)及び(1−2)を用いて、第1の輝度信号Yh_1を生成する。   The first arithmetic circuit 1144 generates the first luminance signal Yh_1 using the following equations (1-1) and (1-2).

Figure 2012239242
Figure 2012239242

ここで、Yhv_1は水平及び垂直方向が帯域制限された輝度信号、Yd45_1及びYd135_1はさらに45度方向及び135度方向が帯域制限された45度輝度信号及び135度輝度信号をそれぞれ示す。   Here, Yhv_1 indicates a luminance signal whose band is limited in the horizontal and vertical directions, and Yd45_1 and Yd135_1 indicate a 45 degree luminance signal and a 135 degree luminance signal whose band is further limited in the 45 degree direction and the 135 degree direction, respectively.

(第1の高周波信号の算出)
V-LPF101およびH-LPF102により、垂直及び水平方向の帯域が制限された輝度信号Yhv_1は、垂直バンドパスフィルタ(V-BPF)109および水平バンドパスフィルタ(H-BPF)111で垂直および水平方向のエッジ成分が検出される。それぞれのエッジ成分は垂直ゲイン回路(V-Gain)110および水平ゲイン回路(H-Gain)112で予め設定したゲインが乗じられた後、加算回路113によって加算され、第1の水平垂直エッジ信号(高周波信号)AChv_1となる。
(Calculation of the first high-frequency signal)
The luminance signal Yhv_1 whose vertical and horizontal bands are limited by the V-LPF 101 and the H-LPF 102 is displayed in the vertical and horizontal directions by the vertical bandpass filter (V-BPF) 109 and the horizontal bandpass filter (H-BPF) 111. Edge components are detected. Each edge component is multiplied by a gain set in advance by a vertical gain circuit (V-Gain) 110 and a horizontal gain circuit (H-Gain) 112 and then added by an adder circuit 113 to obtain a first horizontal vertical edge signal ( High-frequency signal) AChv_1.

一方、D45-LPF103によりさらに45度方向の帯域が制限された輝度信号は、135度方向のAC成分(エッジ成分もしくは高周波成分)を検出するD135-BPF104(係数は図3の(c)に示す)で45度線のエッジ成分が抽出される。その後ゲイン回路105によってゲイン調整され、45度線用エッジ信号ACd45_1が算出される。同様に、D135-LPF106でさらに135度方向の帯域が制限された輝度信号は、D45-BPF107(係数は図3の(d)に示す)で135度方向のエッジ成分が抽出される。その後、ゲイン回路108によってゲイン調整され、135度線エッジ信号Acd135_1が算出される。   On the other hand, the luminance signal whose band in the 45-degree direction is further limited by the D45-LPF 103 is D135-BPF 104 for detecting an AC component (edge component or high-frequency component) in the 135-degree direction (coefficients are shown in FIG. 3C). ), The edge component of the 45 degree line is extracted. Thereafter, the gain is adjusted by the gain circuit 105, and a 45-degree line edge signal ACd45_1 is calculated. Similarly, the edge signal in the 135 degree direction is extracted from the luminance signal whose band in the 135 degree direction is further limited by the D135-LPF 106 by the D45-BPF 107 (coefficients are shown in FIG. 3D). Thereafter, the gain is adjusted by the gain circuit 108, and a 135-degree line edge signal Acd135_1 is calculated.

第2のHVD加重加算回路115は、第1の高周波信号生成手段として機能する。第2のHVD加重加算回路115で、第1の輝度信号Yh_1の生成時に使用した加重加算係数D_UseRatioと3つのエッジ信号を以下の式(1−3)および(1−4)に従って加重加算し、第1の高周波信号AC_1を生成する。   The second HVD weighted addition circuit 115 functions as first high-frequency signal generation means. In the second HVD weighted addition circuit 115, the weighted addition coefficient D_UseRatio and the three edge signals used when generating the first luminance signal Yh_1 are weighted and added according to the following equations (1-3) and (1-4). A first high-frequency signal AC_1 is generated.

Figure 2012239242
Figure 2012239242

第2のHVD加重加算回路115は、Yhv_1, Yd45_1,Yd135_1に代えてAChv_1, ACd45_1,ACd135_1を入力とすること以外、図5に示した第1のHVD加重加算回路114と同様の構成であってよい。または、加重加算係数D_UseRatioと、角度信号angleSigDの極性情報を第1のHVD加重加算回路114から取得することもできる。この場合には、第1の係数算出回路1141と極性判別回路1142は不要である。   The second HVD weighted addition circuit 115 has the same configuration as the first HVD weighted addition circuit 114 shown in FIG. 5 except that AChv_1, ACd45_1, and ACd135_1 are input instead of Yhv_1, Yd45_1, and Yd135_1. Good. Alternatively, the weighted addition coefficient D_UseRatio and the polarity information of the angle signal angleSigD can be acquired from the first HVD weighted addition circuit 114. In this case, the first coefficient calculation circuit 1141 and the polarity determination circuit 1142 are unnecessary.

(第2の輝度信号(赤色被写体用)の算出)
赤色被写体用の第2の輝度信号は、第1の輝度信号と同様の処理で生成するが、処理における帯域制限フィルタの特性が異なる。
(Calculation of second luminance signal (for red subject))
The second luminance signal for the red subject is generated by the same processing as the first luminance signal, but the characteristics of the band limiting filter in the processing are different.

RAW信号100は、V-LPF116およびH-LPF117で水平および垂直方向の帯域が制限される。第2のローパスフィルタとしてのV-LPF116およびH-LPF117は、図2の周波数特性201を有する。すなわち、RAW信号100の帯域を、V-LPF101およびH-LPF102の周波数特性200の約半分(撮像素子のナイキスト周波数の約半分)に制限する。   The RAW signal 100 is limited in the horizontal and vertical bands by the V-LPF 116 and the H-LPF 117. The V-LPF 116 and the H-LPF 117 as the second low-pass filter have the frequency characteristics 201 of FIG. That is, the band of the RAW signal 100 is limited to about half of the frequency characteristic 200 of the V-LPF 101 and the H-LPF 102 (about half of the Nyquist frequency of the image sensor).

これは、原色フィルタの場合、特に赤色被写体では、緑画素及び青画素からの出力信号値がほぼ0となるため、撮像素子による空間サンプリングによるナイキスト周波数が垂直方向、水平方向とも通常の無彩色被写体の半分になるからである。   This is because, in the case of a primary color filter, particularly in a red subject, the output signal value from the green pixel and the blue pixel is almost 0. Therefore, the Nyquist frequency by spatial sampling by the image sensor is a normal achromatic subject in both the vertical and horizontal directions. Because it becomes half of

H-LPF117から出力される輝度信号Yhv_2は、輝度信号Yhv_1と同様に処理されて、第3及び第4の加重加算回路129及び130により第2の輝度信号Yh_2および第2の高周波信号AC_2が生成される。   The luminance signal Yhv_2 output from the H-LPF 117 is processed in the same manner as the luminance signal Yhv_1, and the second luminance signal Yh_2 and the second high-frequency signal AC_2 are generated by the third and fourth weighted addition circuits 129 and 130. Is done.

具体的には、輝度信号Yhv_2は、D45-LPF118及びD135-LPF121で45度方向及び135度方向の帯域が制限され信号Yd45_2及びYd135_2として第3のHVD加重加算回路129に供給される。また、輝度信号Yhv_2は、そのままの状態でも第3のHVD加重加算回路129に供給される。   Specifically, the luminance signal Yhv_2 is supplied to the third HVD weighted addition circuit 129 as the signals Yd45_2 and Yd135_2 after the bands in the 45 degree direction and the 135 degree direction are limited by the D45-LPF 118 and the D135-LPF 121. Further, the luminance signal Yhv_2 is supplied to the third HVD weighted addition circuit 129 as it is.

第2の輝度信号生成手段としての第3のHVD加重加算回路129は、第1のHVD加重加算回路114と同様の構成を有し、角度信号angleSigDから加重加算係数D_UseRatioを算出する。そして、第3の加重加算回路129は、以下の式(1−5)および式(1−6)を用いて、第2の輝度信号Yh_2を生成する。   The third HVD weighted addition circuit 129 serving as the second luminance signal generation unit has the same configuration as the first HVD weighted addition circuit 114, and calculates the weighted addition coefficient D_UseRatio from the angle signal angleSigD. Then, the third weighted addition circuit 129 generates the second luminance signal Yh_2 using the following equations (1-5) and (1-6).

Figure 2012239242
Figure 2012239242

ここで、Yhv_2は水平及び垂直方向が帯域制限された輝度信号、Yd45_2及びYd135_2はさらに45度方向及び135度方向が帯域制限された45度輝度信号及び135度輝度信号をそれぞれ示す。これら信号が、垂直方向及び水平方向での帯域制限がYhv_1、Yd45_1及びYd135_1と異なることは、上述したとおりである。   Here, Yhv_2 indicates a luminance signal whose band is limited in the horizontal and vertical directions, and Yd45_2 and Yd135_2 indicate a 45 degree luminance signal and a 135 degree luminance signal whose band is further limited in the 45 degree direction and the 135 degree direction, respectively. As described above, these signals are different from Yhv_1, Yd45_1, and Yd135_1 in the band limitation in the vertical direction and the horizontal direction.

(第2の高周波信号(赤色被写体用)の算出)
V-LPF116およびH-LPF117により、垂直及び水平方向の帯域が制限された輝度信号Yhv_2は、垂直バンドパスフィルタ(V-BPF)124および水平バンドパスフィルタ(H-BPF)126で垂直および水平方向のエッジ成分が検出される。それぞれのエッジ成分は垂直ゲイン回路(V-Gain)125および水平ゲイン回路(H-Gain)127で予め設定したゲインが乗じられた後、加算回路128によって加算され、第2の水平垂直エッジ信号(高周波信号)AChv_2となる。
(Calculation of second high-frequency signal (for red subject))
The luminance signal Yhv_2 whose band in the vertical and horizontal directions is limited by the V-LPF 116 and the H-LPF 117 is displayed in the vertical and horizontal directions by the vertical bandpass filter (V-BPF) 124 and the horizontal bandpass filter (H-BPF) 126. Edge components are detected. Each edge component is multiplied by a gain set in advance by a vertical gain circuit (V-Gain) 125 and a horizontal gain circuit (H-Gain) 127, and then added by an adder circuit 128 to obtain a second horizontal / vertical edge signal ( High frequency signal) AChv_2.

一方、D45-LPF118によりさらに45度方向の帯域が制限された輝度信号は、135度方向のAC成分(エッジ成分もしくは高周波成分)を検出するD135-BPF119(係数は図3の(c)に示す)で45度線のエッジ成分が抽出される。その後ゲイン回路120によってゲイン調整され、45度線用エッジ信号ACd45_2が算出される。同様に、D135-LPF121でさらに135度方向の帯域が制限された輝度信号は、D45-BPF122(係数は図3の(d)に示す)で135度方向のエッジ成分が抽出される。その後、ゲイン回路123によってゲイン調整され、135度線エッジ信号Acd135_2が算出される。   On the other hand, the luminance signal whose band in the 45-degree direction is further limited by the D45-LPF 118 is D135-BPF 119 for detecting the AC component (edge component or high-frequency component) in the 135-degree direction (the coefficients are shown in FIG. 3C). ), The edge component of the 45 degree line is extracted. Thereafter, the gain is adjusted by the gain circuit 120, and a 45-degree line edge signal ACd45_2 is calculated. Similarly, the edge signal in the 135 degree direction is extracted from the luminance signal whose band in the 135 degree direction is further limited by the D135-LPF 121 by the D45-BPF 122 (coefficients are shown in FIG. 3D). Thereafter, the gain is adjusted by the gain circuit 123, and a 135-degree line edge signal Acd135_2 is calculated.

第4のHVD加重加算回路130は第2の高周波信号生成手段として機能する。第4のHVD加重加算回路130で、第2の輝度信号Yh_2の生成時に使用した加重加算係数D_UseRatioと3つのエッジ信号を以下の式(1−7)および(1−8)に従って加重加算し、第2のエッジ信号AC_2を生成する。   The fourth HVD weighted addition circuit 130 functions as second high frequency signal generation means. In the fourth HVD weighted addition circuit 130, the weighted addition coefficient D_UseRatio and the three edge signals used when generating the second luminance signal Yh_2 are weighted and added according to the following equations (1-7) and (1-8), A second edge signal AC_2 is generated.

Figure 2012239242
Figure 2012239242

第4のHVD加重加算回路115は、Yhv_1, Yd45_1,Yd135_1に代えてAChv_2, ACd45_2,ACd135_2を入力とすること以外、図5に示した第1のHVD加重加算回路114と同様の構成であってよい。または、加重加算係数D_UseRatioと、角度信号angleSigDの極性情報を第3のHVD加重加算回路129から取得することもできる。この場合には、第1の係数算出回路1141と極性判別回路1142は不要である。   The fourth HVD weighted addition circuit 115 has the same configuration as the first HVD weighted addition circuit 114 shown in FIG. 5 except that AChv_2, ACd45_2, and ACd135_2 are input instead of Yhv_1, Yd45_1, and Yd135_1. Good. Alternatively, the weighted addition coefficient D_UseRatio and the polarity information of the angle signal angleSigD can be acquired from the third HVD weighted addition circuit 129. In this case, the first coefficient calculation circuit 1141 and the polarity determination circuit 1142 are unnecessary.

(第1と第2の輝度信号および高周波信号の加重加算)
第1及び第3のHVD加重加算回路114及び129で生成された第1の輝度信号Yh_1と第2の輝度信号Yh_2は、第1の加重加算手段としての第1のGR加重加算回路131で加重加算され、第3の輝度信号Yh_3となる。
(Weighted addition of first and second luminance signal and high frequency signal)
The first luminance signal Yh_1 and the second luminance signal Yh_2 generated by the first and third HVD weighted addition circuits 114 and 129 are weighted by the first GR weighted addition circuit 131 as the first weighted addition means. Addition results in a third luminance signal Yh_3.

本実施形態の第1のGR加重加算回路131は、赤色被写体以外の通常被写体に対しては第1の輝度信号Yh_1信号を100%使用する。また、第1のGR加重加算回路131は、赤色被写体は垂直方向及び水平方向の帯域を第1の輝度信号Yh_1の半分に制限した第2の輝度信号Yh_2信号を100%使用する。   The first GR weighted addition circuit 131 of the present embodiment uses 100% of the first luminance signal Yh_1 for the normal subject other than the red subject. Further, the first GR weighted addition circuit 131 uses 100% of the second luminance signal Yh_2 signal in which the red subject is limited to the half of the first luminance signal Yh_1 in the vertical and horizontal bands.

このような加重加算を行うことで、原色フィルタを備えた撮像装置の輝度信号生成時に全画素の情報を用いる場合(例えばSWY方式を用いた場合)、赤色被写体に対しても折り返し歪みの発生を十分に抑制した輝度信号を生成することができる。   By performing such weighted addition, when information of all pixels is used at the time of generating a luminance signal of an imaging device having a primary color filter (for example, when the SWY method is used), aliasing distortion is also generated for a red subject. A sufficiently suppressed luminance signal can be generated.

図7は、図1における色処理回路160の構成例を示すブロック図である。
色処理回路160は、RAW信号100から、被写体の赤さを判別するための信号として、位相角信号Chromaθ及び彩度信号ChromaSigを生成し、第1及び第2のGR加重加算回路131及び132に供給する。
FIG. 7 is a block diagram illustrating a configuration example of the color processing circuit 160 in FIG.
The color processing circuit 160 generates a phase angle signal Chromaθ and a saturation signal ChromaSig from the RAW signal 100 as signals for determining the redness of the subject, and sends them to the first and second GR weighted addition circuits 131 and 132. Supply.

図7において、RAW信号100は、色補間回路601において、画素毎に補間演算(ロ−パスフィルタ処理)が実施され、その後、色差信号生成回路602によって色差信号R-Y(Ry)信号及びB-Y(By)信号に変換される。   In FIG. 7, the RAW signal 100 is subjected to interpolation calculation (low-pass filter processing) for each pixel in the color interpolation circuit 601, and then the color difference signal RY (Ry) signal and BY (By ) Converted to a signal.

色相角検出回路603は、画素毎に生成された色差信号に、以下の式(1−9)を適用して色相角信号Chromaθを生成する。   The hue angle detection circuit 603 generates the hue angle signal Chromaθ by applying the following expression (1-9) to the color difference signal generated for each pixel.

Figure 2012239242
Figure 2012239242

また、彩度算出回路604は、色差信号生成回路602で生成された色差信号に以下の式(1−10)を適用して彩度信号ChromaSigを生成する。   The saturation calculation circuit 604 generates the saturation signal ChromaSig by applying the following equation (1-10) to the color difference signal generated by the color difference signal generation circuit 602.

Figure 2012239242
Figure 2012239242

色処理回路160で生成された色相角信号Chromaθ及び彩度信号ChromaSigは、第1及び第2のGR加重加算回路131及び132へ出力される。   The hue angle signal Chromaθ and the saturation signal ChromaSig generated by the color processing circuit 160 are output to the first and second GR weighted addition circuits 131 and 132.

図8は、第1及び第2のGR加重加算回路131及び132の構成例を示すブロック図である。
第1の赤色度算出回路1311は、図9に示すような入出力特性を有し、色相角信号Chromaθを、被写体の赤さを示す指標の1つとしての第1の赤色度RedSig_1に変換する。
FIG. 8 is a block diagram illustrating a configuration example of the first and second GR weighted addition circuits 131 and 132.
The first redness calculation circuit 1311 has input / output characteristics as shown in FIG. 9, and converts the hue angle signal Chromaθ into a first redness RedSig_1 as one of indices indicating the redness of the subject. .

図9に示す例では、色相角信号Chromaθの値が0から予め定めた閾値P1まで(Chromaθ≦P1)と、閾値P4以上(P4≦Chromaθ)の範囲は、赤以外の色を表すものとして、RedSig_1を0とする。一方、閾値P2からP3の範囲(P2≦Chromaθ≦P3)は、赤色を表すものとして、第1の赤色度RedSig_1を128とする。その他の範囲(P1<Chromaθ<P2,P3<Chromaθ<P4)は、128と0を線形補間した値を有する第1の赤色度RedSig_1を出力する。P1〜P4は、赤色度の閾値として予め定めておくことができる。   In the example shown in FIG. 9, the range of the hue angle signal Chromaθ from 0 to a predetermined threshold P1 (Chromaθ ≦ P1) and the threshold P4 or more (P4 ≦ Chromaθ) represents colors other than red. Set RedSig_1 to 0. On the other hand, the range from the threshold value P2 to P3 (P2 ≦ Chromaθ ≦ P3) represents red, and the first redness RedSig_1 is set to 128. In the other ranges (P1 <Chromaθ <P2, P3 <Chromaθ <P4), the first redness RedSig_1 having a value obtained by linear interpolation of 128 and 0 is output. P1 to P4 can be determined in advance as redness thresholds.

第2の赤色度算出回路1312は、図10に示すような入出力特性を有し、彩度信号ChromaSigを、被写体の赤さの尺度を示す指標の1つとしての第2の赤色度RedSig_2に変換する。
図10に示す例では、彩度信号ChromaSigの値が0から予め定めた閾値C1まで(ChromaSig≦C1)は、低彩度でありノイズの影響があるため、RedSig_2を0とする。閾値C2以上(C2≦ChromaSig)の範囲は赤色を表すものとして、第2の赤色度RedSig_2を128とする。その他の範囲(C1<ChromaSig<C2)は、128と0を線形補間した値を有する第2の赤色度RedSig_2を出力する。C1〜C2は、赤色度の閾値として予め定めておくことができる。
The second redness calculation circuit 1312 has input / output characteristics as shown in FIG. 10, and the saturation signal ChromaSig is converted into the second redness RedSig_2 as one of indices indicating the measure of the redness of the subject. Convert.
In the example shown in FIG. 10, the value of the saturation signal ChromaSig from 0 to a predetermined threshold C1 (ChromaSig ≦ C1) is low saturation and is affected by noise, so RedSig_2 is set to 0. The range of the threshold C2 or more (C2 ≦ ChromaSig) represents red, and the second redness RedSig_2 is set to 128. In the other range (C1 <ChromaSig <C2), the second redness RedSig_2 having a value obtained by linear interpolation of 128 and 0 is output. C1 to C2 can be determined in advance as redness thresholds.

第3の赤色度算出回路1313は、第1の赤色度RedSig_1と第2の赤色度RedSig_2を以下の式(1−11)に従って乗算して、第3の赤色度RedSig_3を算出する。   The third redness calculation circuit 1313 multiplies the first redness RedSig_1 and the second redness RedSig_2 according to the following equation (1-11) to calculate the third redness RedSig_3.

Figure 2012239242
Figure 2012239242

第2の係数算出回路1314は、図11に示すような入出力特性を有し、第3の赤色度RedSig_3からGR加重加算係数Yh2UseRatioを出力する。   The second coefficient calculation circuit 1314 has input / output characteristics as shown in FIG. 11, and outputs a GR weighted addition coefficient Yh2UseRatio from the third redness RedSig_3.

図11に示す例では、第3の赤色度RedSig_3の値が0から予め定めた閾値Th1まで(RedSig_3≦Th1)は、赤色でないため、GR加重加算係数Yh2UseRatioを0とする。閾値Th2以上(Th2≦RedSig_3)の範囲は赤色を表すものとして、GR加重加算係数Yh2UseRatioを128とする。その他の範囲(Th1<RedSig_3<Th2)は、128と0を線形補間した値を有するGR加重加算係数Yh2UseRatioを出力する。Th1〜Th2は、赤色度の閾値として予め定めておくことができる。   In the example shown in FIG. 11, the value of the third redness RedSig_3 from 0 to a predetermined threshold Th1 (RedSig_3 ≦ Th1) is not red, so the GR weighted addition coefficient Yh2UseRatio is set to 0. The range of threshold Th2 or more (Th2 ≦ RedSig — 3) represents red, and the GR weighted addition coefficient Yh2UseRatio is set to 128. In the other range (Th1 <RedSig_3 <Th2), a GR weighted addition coefficient Yh2UseRatio having a value obtained by linear interpolation of 128 and 0 is output. Th1 to Th2 can be determined in advance as redness thresholds.

このような入出力特性により、赤色被写体には第2の輝度信号Yh_2が、赤色でない被写体には第1の輝度信号Yh_1がそれぞれ100%用いられ、中間色の被写体には第1及び第2の輝度信号Yh_1及びYh_2が赤味に応じた割合で用いられる。   With such input / output characteristics, 100% of the second luminance signal Yh_2 is used for a red subject, and 100% of the first luminance signal Yh_1 is used for a non-red subject, and the first and second luminances are used for an intermediate subject. Signals Yh_1 and Yh_2 are used in proportion to redness.

最後に、第2の演算回路1315が、加重加算係数Yh2UseRatioを用い、以下の式(1−12)及び式(1−13)に従い、第1の輝度信号Yh_1と第2の輝度信号Yh_2から、第3の輝度信号Yh_3を算出する。また、第2の加重加算手段としての第2のGR加重加算回路132においても、同様にして、第1の高周波信号AC_1と第2の高周波信号AC_2を加重加算し、第3の高周波信号AC_3を生成する。   Finally, the second arithmetic circuit 1315 uses the weighted addition coefficient Yh2UseRatio and, from the first luminance signal Yh_1 and the second luminance signal Yh_2, according to the following equations (1-12) and (1-13), A third luminance signal Yh_3 is calculated. Similarly, in the second GR weighted addition circuit 132 as the second weighted addition means, the first high frequency signal AC_1 and the second high frequency signal AC_2 are weighted and added, and the third high frequency signal AC_3 is obtained. Generate.

Figure 2012239242
Figure 2012239242

なお、第2のGR加重加算回路132においては、第1のGR加重加算回路131から加重加算係数Yh2UseRatioを取得して用いても良い。この場合、第2のGR加重加算回路132は、図8における第2の演算回路1315のみを有すればよい。   In the second GR weighted addition circuit 132, the weighted addition coefficient Yh2UseRatio may be acquired from the first GR weighted addition circuit 131 and used. In this case, the second GR weighted addition circuit 132 may have only the second arithmetic circuit 1315 in FIG.

または、第2のGR加重加算回路132が加重加算係数Yh2UseRatioを算出し、第1のGR加重加算回路131が第2のGR加重加算回路132から加重加算係数Yh2UseRatioを取得しても良い。この場合、第1のGR加重加算回路131は、図8における第2の演算回路1315のみを有すればよい。
加算回路133は、第3の輝度信号Yh_3と第3の高周波信号AC_3を加算し、加算結果を最終輝度信号として出力する。
Alternatively, the second GR weighted addition circuit 132 may calculate the weighted addition coefficient Yh2UseRatio, and the first GR weighted addition circuit 131 may acquire the weighted addition coefficient Yh2UseRatio from the second GR weighted addition circuit 132. In this case, the first GR weighted addition circuit 131 need only have the second arithmetic circuit 1315 in FIG.
The adder circuit 133 adds the third luminance signal Yh_3 and the third high-frequency signal AC_3, and outputs the addition result as a final luminance signal.

本実施形態では、水平及び垂直方向の解像度が低下する被写体色として赤色被写体を想定して説明した。しかし、色フィルタの分光分布特性によっては青色被写体についてR画素及びG画素の出力がほぼ0になる場合がある。この場合には、赤色度の代わりに青色度を検出し、青色被写体に対して同様の処理を適用し、第2の輝度信号Yh_2を導入して輝度信号を生成することができる。また、赤色及び青色の両被写体に対して第2の輝度信号Yh_2を用いるように構成しても良い。   In the present embodiment, the description has been made assuming that a red subject is used as a subject color whose horizontal and vertical resolutions are reduced. However, depending on the spectral distribution characteristics of the color filter, the output of the R pixel and the G pixel may be almost zero for a blue subject. In this case, it is possible to detect the blueness instead of the redness, apply the same processing to the blue subject, and introduce the second luminance signal Yh_2 to generate the luminance signal. Further, the second luminance signal Yh_2 may be used for both the red and blue subjects.

以上説明したように、本実施形態によれば、原色ベイヤー配列の色フィルタを用いた撮像素子から得られる画像信号から輝度信号を生成する輝度信号生成装置において、垂直方向及び水平方向の帯域を第1の範囲に制限して第1の輝度信号を生成する。また、垂直方向及び水平方向の帯域を第1の範囲よりも狭い第2の範囲に制限して第2の輝度信号を生成する。そして、被写体の色の赤さ又は青さが強いほど、第2の輝度信号の割合を高めて第1及び第2の輝度信号を加重加算して、最終的な輝度信号を生成する。そのため、赤色被写体や青色被写体に対しても、折り返し歪みの発生を十分抑制した輝度信号を生成することができる。   As described above, according to the present embodiment, in the luminance signal generation device that generates a luminance signal from an image signal obtained from an image sensor using a color filter with a primary color Bayer array, the vertical and horizontal bands are assigned to the first and second bands. The first luminance signal is generated by limiting to the range of 1. Further, the second luminance signal is generated by limiting the vertical and horizontal bands to the second range narrower than the first range. Then, as the red or blue color of the subject is stronger, the ratio of the second luminance signal is increased and the first and second luminance signals are weighted and added to generate a final luminance signal. Therefore, it is possible to generate a luminance signal that sufficiently suppresses the occurrence of aliasing distortion for a red subject and a blue subject.

また、本実施形態では、高周波信号についても同様に帯域制限範囲の異なる第1の高周波信号及び第2の高周波信号を生成して、被写体の色の赤さ又は青さが強いほど、第2の高周波信号の割合を高めて第1及び第2の高周波信号を加重加算する。そして、このような高周波信号を用いて輝度信号を生成するので、赤色被写体や青色被写体に対しても、ぼけを抑制した、解像度の高い輝度信号を生成することができる。   In the present embodiment, the first high-frequency signal and the second high-frequency signal having different band limitation ranges are similarly generated for the high-frequency signal, and the second red color or blue color of the subject becomes stronger. The ratio of the high frequency signal is increased and the first and second high frequency signals are weighted and added. Since a luminance signal is generated using such a high-frequency signal, a high-resolution luminance signal with reduced blur can be generated for a red subject and a blue subject.

(第2の実施形態)
図12は本発明の第2の実施形態に係る輝度信号生成装置の構成例を示すブロック図である。図12において、第1の実施形態と同様の構成には同様の参照数字を付し、重複する説明は省略する。本実施形態において、全てのLPFは帯域制限する方向について図2の200で示した周波数特性を有するものとする。
(Second Embodiment)
FIG. 12 is a block diagram illustrating a configuration example of a luminance signal generation apparatus according to the second embodiment of the present invention. In FIG. 12, the same components as those in the first embodiment are denoted by the same reference numerals, and a duplicate description is omitted. In the present embodiment, it is assumed that all LPFs have the frequency characteristics indicated by 200 in FIG.

(第1の高周波信号の算出)
第1の実施形態における第1の高周波信号AC_1と同様の手法で生成する。
(Calculation of the first high-frequency signal)
It is generated by the same method as the first high-frequency signal AC_1 in the first embodiment.

RAW信号100は、第1の実施形態におけるV-LPF101及びH-LPF102と同等のV-LPF1017およびH-LPF1018でそれぞれ垂直方向及び水平方向の帯域が制限される。そして、V-BPF109およびH-BPF111により、垂直および水平方向のエッジ成分が検出される。それぞれのエッジ成分はゲイン回路110および112で予め設定したゲインが乗じられ加算回路113で加算されて、第1の水平垂直エッジ信号AChv_1が算出される。   The RAW signal 100 has V-LPF 1017 and H-LPF 1018 that are equivalent to the V-LPF 101 and H-LPF 102 in the first embodiment, and the bands in the vertical and horizontal directions are limited, respectively. The V-BPF 109 and H-BPF 111 detect edge components in the vertical and horizontal directions. Each edge component is multiplied by a gain set in advance by the gain circuits 110 and 112 and added by the adding circuit 113 to calculate a first horizontal / vertical edge signal AChv_1.

一方、第1の実施形態におけるD45-LPF103と同等のD45-LPF1019で45度方向の帯域が制限された輝度信号Yhv_1は、D135-BPF104で45度線のエッジ成分が抽出される。そして、ゲイン回路105によってゲイン調整され、第1の45度線用エッジ信号ACd45_1が算出される。   On the other hand, from the D45-LPF 1019 equivalent to the D45-LPF 103 in the first embodiment, the luminance signal Yhv_1 whose band in the 45-degree direction is limited is extracted by the D135-BPF 104 as the edge component of the 45-degree line. Then, the gain is adjusted by the gain circuit 105, and the first 45-degree line edge signal ACd45_1 is calculated.

同様に、第1の実施形態におけるD135-LPF106と同等のD135-LPF1022で135度方向の帯域が制限された輝度信号Yhv_1は、D45-BPF107で135度方向のエッジ成分が抽出される。そして、ゲイン回路108によってゲイン調整され、第1の135度線エッジ信号Acd135_1が算出される。
第1のHVD加重加算回路115は、第1の実施形態で算出した加重加算係数D_UseRatioを用いて3つのエッジ信号を加重加算し、第1の高周波信号AC_1を生成する。
Similarly, in the luminance signal Yhv_1 whose band in the 135 degree direction is limited by the D135-LPF 1022 equivalent to the D135-LPF 106 in the first embodiment, an edge component in the 135 degree direction is extracted by the D45-BPF 107. Then, the gain is adjusted by the gain circuit 108, and the first 135-degree line edge signal Acd135_1 is calculated.
The first HVD weighted addition circuit 115 weights and adds the three edge signals using the weighted addition coefficient D_UseRatio calculated in the first embodiment to generate a first high-frequency signal AC_1.

(第2の高周波信号(赤色被写体用)の算出)
第1の実施形態における第2の高周波信号とほぼ同様の手法で生成するが、本実施形態ではRAW信号100の全ての画素信号を用いて高周波成分を求めるのではなく、R画素以外に0挿入処理した信号を用いる点が第1の実施形態と異なる。このように、R画素以外を0とすることにより、赤色被写体撮影時に、R画素以外の色画素から微小な振幅の輝度信号への折り返し歪みを防ぐことができる。また、RAW信号の垂直方向及び水平方向の帯域を、第1の高周波信号と同等に制限する点においても第1の実施形態と異なる。
(Calculation of second high-frequency signal (for red subject))
Although it is generated by a method almost the same as the second high-frequency signal in the first embodiment, in this embodiment, all pixel signals of the RAW signal 100 are not used to obtain a high-frequency component, and 0 is inserted in addition to the R pixel. The difference from the first embodiment is that a processed signal is used. In this way, by setting the pixels other than the R pixel to 0, it is possible to prevent the aliasing distortion from the color pixel other than the R pixel to the luminance signal with a minute amplitude when photographing the red subject. The second embodiment is also different from the first embodiment in that the vertical and horizontal bands of the RAW signal are limited to the same level as the first high-frequency signal.

RAW信号100は、0挿入回路1001で、R画素以外の画素信号値が0に置換される。その後、V-LPF1004およびH-LPF1005で垂直方向及び水平方向の帯域がナイキスト周波数以下に制限される。また、V-BPF124およびH-BPF126で水平および垂直方向のエッジ成分が検出され、それぞれゲイン回路125、127でゲインが乗じられた後、加算回路128によって加算され、エッジ信号AChv_2が算出される。   In the RAW signal 100, pixel signal values other than the R pixel are replaced with 0 by the 0 insertion circuit 1001. Thereafter, the V-LPF 1004 and the H-LPF 1005 limit the vertical and horizontal bands to the Nyquist frequency or lower. Further, edge components in the horizontal and vertical directions are detected by the V-BPF 124 and the H-BPF 126, respectively multiplied by gains by the gain circuits 125 and 127, and then added by the adder circuit 128 to calculate an edge signal AChv_2.

一方、D45-LPF1006で45度方向の帯域が制限された画像信号は、D135-BPF119で45度線のエッジ成分が抽出され、ゲイン回路120によってゲイン調整されて、エッジ信号ACd45_2が算出される。同様に、D135-LPF1009で135度方向の帯域が制限された画像信号は、D45-BPF122で135度線のエッジ成分が抽出され、ゲイン回路123によってゲイン調整されて、エッジ信号ACd135_2が算出される。
第2のHVD加重加算回路130は、加重加算係数D_UseRatioを用いて3つのエッジ信号を加重加算し、第2のエッジ信号AC_2を生成する。
On the other hand, for the image signal whose band in the 45-degree direction is limited by the D45-LPF 1006, the edge component of the 45-degree line is extracted by the D135-BPF 119, the gain is adjusted by the gain circuit 120, and the edge signal ACd45_2 is calculated. Similarly, for the image signal whose band in the 135 degree direction is limited by the D135-LPF 1009, the edge component of the 135 degree line is extracted by the D45-BPF 122, and the gain is adjusted by the gain circuit 123 to calculate the edge signal ACd135_2. .
The second HVD weighted addition circuit 130 weights and adds the three edge signals using the weighted addition coefficient D_UseRatio to generate a second edge signal AC_2.

(第3の高周波信号の算出)
第1の実施形態ではSWY信号を用いて高周波信号を算出しているため、水平及び垂直のナイキスト周波数付近の解像度が劣化する。そこで、適応的に補間したOG信号を用いて第3の高周波信号を生成することで、ナイキスト周波数付近の解像度劣化を防ぐ。
(Calculation of third high-frequency signal)
In the first embodiment, since the high-frequency signal is calculated using the SWY signal, the resolution near the horizontal and vertical Nyquist frequencies deteriorates. Therefore, the third high-frequency signal is generated using the adaptively interpolated OG signal to prevent resolution degradation near the Nyquist frequency.

0挿入回路1032〜加算回路1038は、緑色画素の画像信号から高周波信号を生成する第3の高周波信号生成手段として機能する。
RAW信号100は、0挿入回路1032でG画素以外の画素信号値が0に置換され、適応補間回路1033は、0挿入されたRAW信号100を適応補間して適応OG信号を生成する。
The 0 insertion circuit 1032 to the addition circuit 1038 function as third high frequency signal generation means for generating a high frequency signal from the image signal of the green pixel.
In the RAW signal 100, pixel signal values other than G pixels are replaced with 0 in the 0 insertion circuit 1032 and the adaptive interpolation circuit 1033 generates an adaptive OG signal by adaptive interpolation of the RAW signal 100 inserted in 0.

図13は、本実施形態における適応補間回路1033の構成例を示すブロック図である。
適応補間回路1033には、0挿入回路1032でG画素以外の画素信号値が0に置換されたRAW信号100と、置換前のRAW信号100の両方が入力される。
FIG. 13 is a block diagram illustrating a configuration example of the adaptive interpolation circuit 1033 in the present embodiment.
The adaptive interpolation circuit 1033 receives both the RAW signal 100 in which pixel signal values other than G pixels are replaced with 0 by the 0 insertion circuit 1032 and the RAW signal 100 before replacement.

0置換されたRAW信号100は、V-LPH1102により垂直方向の帯域が制限され、Gv信号が生成される。Gv信号はG加重加算回路1105に入力される一方、H-LPF1103に入力される。H-LPF1103はGv信号の水平方向の帯域を制限し、垂直方向及び水平方向の帯域が制限されたGhv信号を生成する。Ghv信号はG加重加算回路1105に入力される。H-LPF1104は、0置換されたRAW信号100の水平方向の帯域を制限し、Gh信号を生成して、G加重加算回路1105に入力する。   The zero-replaced RAW signal 100 is limited in the vertical band by the V-LPH 1102 to generate a Gv signal. The Gv signal is input to the G weighted addition circuit 1105 and input to the H-LPF 1103. The H-LPF 1103 limits the horizontal band of the Gv signal, and generates a Ghv signal in which the vertical and horizontal bands are limited. The Ghv signal is input to the G weighted addition circuit 1105. The H-LPF 1104 limits the horizontal band of the zero-substituted RAW signal 100, generates a Gh signal, and inputs the Gh signal to the G weighted addition circuit 1105.

このようにして、G画素以外が0とされた信号の(1)垂直方向の帯域が制限されたGv信号、(2)水平方向の帯域が制限されたGh信号、(3)垂直及び水平方向の帯域が制限されたGhv信号が生成され、いずれもG加重加算回路1105へ入力される。   In this way, signals other than G pixels are set to 0 (1) Gv signal in which the vertical band is limited, (2) Gh signal in which the horizontal band is limited, and (3) Vertical and horizontal directions A Ghv signal with a limited bandwidth is generated and is input to the G-weighted addition circuit 1105.

一方、DiffH信号生成回路(DiffH)1106、DiffV信号生成回路(DiffV)1107は、0挿入されていないRAW信号100から、以下のようにしてDiffH信号及びDiffV信号を生成する。   On the other hand, the DiffH signal generation circuit (DiffH) 1106 and the DiffV signal generation circuit (DiffV) 1107 generate a DiffH signal and a DiffV signal from the RAW signal 100 in which 0 is not inserted as follows.

図14は、DiffH信号生成回路1106及びDiffV信号生成回路1107の動作を説明する図である。着目画素をP22とした場合、DiffH信号生成回路1106及びDiffV信号生成回路1107は、以下の式(2−1)及び(2−2)に従って、DiffH信号及びDiffV信号を生成する。
DiffH = |P21-P23|+|2×P22-P20-P24| (2−1)
DiffV = |P12-P32|+|2×P22-P02-P42| (2−2)
なお、式中のP12〜P42は、図14における対応画素の信号値である。
FIG. 14 is a diagram for explaining the operation of the DiffH signal generation circuit 1106 and the DiffV signal generation circuit 1107. When the target pixel is P22, the DiffH signal generation circuit 1106 and the DiffV signal generation circuit 1107 generate a DiffH signal and a DiffV signal according to the following equations (2-1) and (2-2).
DiffH = | P21-P23 | + | 2 × P22-P20-P24 | (2-1)
DiffV = | P12-P32 | + | 2 × P22-P02-P42 | (2-2)
Note that P12 to P42 in the equation are signal values of corresponding pixels in FIG.

被写体が縦縞の場合、DiffH信号が大きくなり、横縞の場合DiffV信号の値が大きくなる。減算器1108は、DiffH信号からDiffV信号を減算し、着目画素が傾いた線に対応する度合いを示すDiffHV信号を出力する。
すなわち、
DiffHV = DiffH - DiffV
である。
When the subject is a vertical stripe, the DiffH signal is large, and when the subject is a horizontal stripe, the value of the DiffV signal is large. The subtractor 1108 subtracts the DiffV signal from the DiffH signal, and outputs a DiffHV signal indicating the degree to which the target pixel corresponds to the tilted line.
That is,
DiffHV = DiffH-DiffV
It is.

係数算出回路(Tsig)1109は、DiffHV信号に基づいて加重加算係数を算出し、G加重加算回路1105へ供給する。   A coefficient calculation circuit (Tsig) 1109 calculates a weighted addition coefficient based on the DiffHV signal and supplies it to the G weighted addition circuit 1105.

図15は、G係数算出回路1109の入出力特性例を示す図である。
横軸がDiffHV信号、縦軸が加重加算係数Tsigの値をそれぞれ示す。DiffHV≦Th0の場合は、DiffVがDiffHより大きいため横縞領域であると判定される。この場合、G加重加算回路1105がGh信号を100%使用するTsig値(Tsig=-128)が出力される。
FIG. 15 is a diagram illustrating an example of input / output characteristics of the G coefficient calculation circuit 1109.
The horizontal axis indicates the DiffHV signal, and the vertical axis indicates the value of the weighted addition coefficient Tsig. When DiffHV ≦ Th0, since DiffV is larger than DiffH, it is determined that the region is a horizontal stripe region. In this case, a Tsig value (Tsig = −128) in which the G weighted addition circuit 1105 uses the Gh signal 100% is output.

Th1<DiffHV<Th2の区間は、DiffVとDiffHが互いに近い値であるため、斜め領域と判定される。この区間では、G加重加算回路1105がGhv信号を100%使用するTsig値(Tsig=0)が出力される。
更に、DiffHV≧Th3の場合は、DiffHがDiffVより大きいため縦縞領域であると判定される。この場合には、Gv信号を100%使用するTsig値(Tsig=128)が出力される。
The section of Th1 <DiffHV <Th2 is determined as an oblique area because DiffV and DiffH are close to each other. In this section, a Tsig value (Tsig = 0) at which the G weighted addition circuit 1105 uses 100% of the Ghv signal is output.
Further, when DiffHV ≧ Th3, since DiffH is larger than DiffV, it is determined to be a vertical stripe region. In this case, a Tsig value (Tsig = 128) using 100% of the Gv signal is output.

Th0<DiffHV≦Th1の区間は、−128から0まで線形的に変化するように決定されたTsigを出力する。同様に、Th2≦DiffHV<Th3の区間は、0から128まで線形的に変化するように決定されたTsigを出力する。   In the section of Th0 <DiffHV ≦ Th1, Tsig determined so as to change linearly from −128 to 0 is output. Similarly, Tsig determined so as to change linearly from 0 to 128 is output in the section of Th2 ≦ DiffHV <Th3.

G加重加算回路1105は、このように決定されたTsigの値に基づいて、Gh信号、Gv信号、Ghv信号は、を以下の式(2−3)及び(2−4)を用いて加重加算し、適応OG信号を生成する。   Based on the Tsig value determined in this way, the G weighted addition circuit 1105 performs weighted addition using the following equations (2-3) and (2-4) for the Gh signal, Gv signal, and Ghv signal. And an adaptive OG signal is generated.

Figure 2012239242
Figure 2012239242

適応補間回路1033によって生成された適応OG信号は、V-BPF1034で垂直方向のエッジ成分が検出され、ゲイン回路1035でゲイン調整される。一方、適応OG信号は、H-BPF1036で水平方向のエッジ成分が検出され、ゲイン回路1037でゲイン調整される。ゲイン調整後の垂直及び水平エッジ成分は加算回路1038で加算され、第3の高周波信号AC_3として斜め加重加算回路1039に送られる。   In the adaptive OG signal generated by the adaptive interpolation circuit 1033, the edge component in the vertical direction is detected by the V-BPF 1034, and the gain is adjusted by the gain circuit 1035. On the other hand, in the adaptive OG signal, the horizontal edge component is detected by the H-BPF 1036 and the gain is adjusted by the gain circuit 1037. The vertical and horizontal edge components after gain adjustment are added by the adder circuit 1038 and sent to the obliquely weighted adder circuit 1039 as the third high-frequency signal AC_3.

(第1と第3の高周波信号の加重加算)
斜め加重加算回路1039は、全色画素(SWY信号)から生成した第1の高周波信号AC_1と、適応OG信号から生成した第3の高周波信号AC_3を、以下の式(2−5)に従って加重加算し、第4の高周波信号AC_4を生成する。
(Weighted addition of first and third high-frequency signals)
The oblique weighted addition circuit 1039 weights and adds the first high-frequency signal AC_1 generated from all the color pixels (SWY signal) and the third high-frequency signal AC_3 generated from the adaptive OG signal according to the following equation (2-5). Then, the fourth high-frequency signal AC_4 is generated.

Figure 2012239242
Figure 2012239242

図16は、本実施形態の斜め加重加算回路1039の構成例を示すブロック図である。
第2の加重加算手段としての斜め加重加算回路1039は、第1〜第4のSWY係数算出回路1060〜1063で第1〜第4のSWY係数SWYUseRatio_1~4を求める。そして、これら次いで第5のSWY係数算出回路1064において、第1〜第4のSWY係数SWYUseRatio_1~4から最終的な加重加算係数SWYUseRatioを求める。第3の演算回路1065は、上述の式(2−5)に従った加重加算を行い、第4の高周波信号AC_4を求める。
FIG. 16 is a block diagram illustrating a configuration example of the oblique weighted addition circuit 1039 of the present embodiment.
The oblique weighted addition circuit 1039 as the second weighted addition means obtains the first to fourth SWY coefficients SWYUseRatio_1 to 4 by the first to fourth SWY coefficient calculation circuits 1060 to 1063. Then, in the fifth SWY coefficient calculation circuit 1064, the final weighted addition coefficient SWYUseRatio is obtained from the first to fourth SWY coefficients SWYUseRatio_1 to 4. The third arithmetic circuit 1065 performs weighted addition according to the above equation (2-5) to obtain the fourth high-frequency signal AC_4.

(1)SWYUseRatio_1(第1のSWY係数)の算出
図17は、適応OG信号とSWY信号が解像可能な周波数空間を示す図である。
ここで、第3の高周波信号AC_3が折り返し歪みの影響を受ける領域は、斜め領域1400である。よって、斜め領域1400を第1の高周波信号AC_1で置換すれば、折り返し歪みのない第4の高周波信号AC_4が生成できる。よって第1の実施形態で使用した角度信号AngleSigDを用いることで、加重加算係数を算出できる。
(1) Calculation of SWYUseRatio_1 (first SWY coefficient) FIG. 17 is a diagram illustrating a frequency space in which the adaptive OG signal and the SWY signal can be resolved.
Here, the region where the third high-frequency signal AC_3 is affected by the aliasing distortion is an oblique region 1400. Therefore, if the oblique region 1400 is replaced with the first high-frequency signal AC_1, the fourth high-frequency signal AC_4 having no aliasing distortion can be generated. Therefore, the weighted addition coefficient can be calculated by using the angle signal AngleSigD used in the first embodiment.

角度信号AngleSigDは、正なら45度線、負なら135度線となり、また信号値の絶対量が大きければ、より45度および135度線に近くなり、小さいければ0度および90度線に近くなるとなる特徴を持っている。   The angle signal AngleSigD is a 45-degree line if positive, a 135-degree line if negative, and closer to the 45-degree and 135-degree lines if the absolute value of the signal value is large, and closer to the 0-degree and 90-degree lines if it is small. It has the characteristics to become.

これにより、第1のSWY係数算出回路1060により、角度信号AngleSigDから第1のSWY係数SWYUseRatio_1を求めることができる。具体的には、第1の実施形態で使用した、第1の係数算出回路1141と同様の入出力特性(図6において、出力値D_UseRatioをSWYUseRatio_1としたもの)を第1のSWY係数算出回路1060に持たせればよい。   As a result, the first SWY coefficient SWYUseRatio_1 can be obtained from the angle signal AngleSigD by the first SWY coefficient calculation circuit 1060. Specifically, the same input / output characteristics (in FIG. 6, the output value D_UseRatio is SWYUseRatio_1 in FIG. 6) used in the first embodiment are set to the first SWY coefficient calculation circuit 1060. You just have to.

(2)SWYUseRatio_2(第2のSWY係数)の算出
図17における水平垂直領域1401は適応OG信号から生成されている第3の高周波信号AC_3を用いる。これは第3の高周波信号AC_3が、適応OG信号に基づくことで、水平及び垂直の両方向について必ず帯域が制限されているSWY信号から生成された第2の高周波信号AC_2より解像度が良好であることによる。
(2) Calculation of SWYUseRatio_2 (second SWY coefficient) The horizontal and vertical region 1401 in FIG. 17 uses the third high-frequency signal AC_3 generated from the adaptive OG signal. This is because the third high-frequency signal AC_3 is based on the adaptive OG signal, so that the resolution is better than the second high-frequency signal AC_2 generated from the SWY signal whose band is always limited in both the horizontal and vertical directions. by.

水平垂直領域1401は、図13及び図14説明したDiffH信号及びDiffV信号を用いて判別することができる。上述の通り、被写体が縦縞の場合、DiffHの値は大きくなりDiffVは0となる。また被写体が横縞の場合、DiffVの値は大きくなりDiffH0となる。   The horizontal / vertical region 1401 can be determined using the DiffH signal and the DiffV signal described with reference to FIGS. 13 and 14. As described above, when the subject is a vertical stripe, the value of DiffH increases and DiffV becomes zero. When the subject is a horizontal stripe, the value of DiffV increases and becomes DiffH0.

従って、図18に示す入出力特性を有する第2のSWY係数算出回路1061を用いることにより、DiffHV信号から第2のSWY係数SWYUseRatio_2を算出することができる。図18において、入力信号|DiffHV|の値が0からP1までは値が小さいため斜め線であり、第2のSWY係数SWYUseRatio_2を128とする。また、P2以上は完全に横縞又は縦縞であり、第2のSWY係数SWYUseRatio_2を0とする。また、P1からP2の区間は、第2のSWY係数SWYUseRatio_2の値を128と0とを線形補間した値とする。   Therefore, the second SWY coefficient SWYUseRatio_2 can be calculated from the DiffHV signal by using the second SWY coefficient calculation circuit 1061 having the input / output characteristics shown in FIG. In FIG. 18, the value of the input signal | DiffHV | is from 0 to P1 and is a diagonal line because the value is small, and the second SWY coefficient SWYUseRatio_2 is set to 128. Further, P2 or more are completely horizontal stripes or vertical stripes, and the second SWY coefficient SWYUseRatio_2 is set to 0. In the interval from P1 to P2, the value of the second SWY coefficient SWYUseRatio_2 is a value obtained by linearly interpolating 128 and 0.

(3)SWYUseRatio_3(第3のSWY係数)の算出
図17における水平及び垂直のナイキスト周波数付近の領域(ナイキスト領域)1402は、(2)と同じ理由から、第3の高周波信号AC_3を用いるのが好ましい。ナイキスト領域1402は、G1画素信号とG2画素信号の位相ずれを検出することで判別可能である。
(3) Calculation of SWYUseRatio_3 (third SWY coefficient) In the region near the horizontal and vertical Nyquist frequencies (Nyquist region) 1402 in FIG. 17, the third high-frequency signal AC_3 is used for the same reason as (2). preferable. The Nyquist area 1402 can be determined by detecting a phase shift between the G1 pixel signal and the G2 pixel signal.

図19は、第3のSWY係数算出回路1062の構成例を示すブロック図である。
0挿入回路1601及び1064は、RAW信号100のG1及びG2画素以外の画素信号値を0とした信号をそれぞれ生成する。水平及び垂直方向の補間のためのローパスフィルタ(V-LPF1602、H-LPF1603、V-LPF1605、H-LPF1066)により、0とされた画素に値が補間される。
FIG. 19 is a block diagram illustrating a configuration example of the third SWY coefficient calculation circuit 1062.
The 0 insertion circuits 1601 and 1064 respectively generate signals having pixel signal values other than the G1 and G2 pixels of the RAW signal 100 as 0. Values are interpolated to pixels set to 0 by low-pass filters (V-LPF 1602, H-LPF 1603, V-LPF 1605, and H-LPF 1066) for horizontal and vertical interpolation.

次に、減算回路1607により、補間されたG1信号(H-LPF1063の出力)と補間されたG2信号(H-LPF1066の出力)の差分が求められ、差分の絶対値を絶対値回路(abs)1608で求め、領域判別信号sigDiffGとして出力する。   Next, the subtraction circuit 1607 obtains the difference between the interpolated G1 signal (output of the H-LPF 1063) and the interpolated G2 signal (output of the H-LPF 1066), and calculates the absolute value of the difference as an absolute value circuit (abs). Obtained in 1608 and output as a region discrimination signal sigDiffG.

領域判別信号sigDiffGを、図20に示すような入出力特性を有するCalSwyUse3 1609を用い、第3のSWY係数SWYUseRatio_3を算出する。CalSwyUse3 1609は、演算回路であっても、テーブルであっても良い。   A third SWY coefficient SWYUseRatio — 3 is calculated from the area discrimination signal sigDiffG using CalSwyUse3 1609 having input / output characteristics as shown in FIG. CalSwyUse3 1609 may be an arithmetic circuit or a table.

領域判別信号sigDiffGの値が0からP1までは値が小さいため斜め線であり、第3のSWY係数SWYUseRatio_3を128とする。またP2以上では完全に横縞又は縦縞であるため、第3のSWY係数SWYUseRatio_3を0とする。また、P1からP2の区間は、第3のSWY係数SWYUseRatio_3の値を128と0とを線形補間した値とする。   Since the value of the area discrimination signal sigDiffG is small from 0 to P1, it is a diagonal line, and the third SWY coefficient SWYUseRatio_3 is set to 128. Also, since P2 or more are completely horizontal stripes or vertical stripes, the third SWY coefficient SWYUseRatio_3 is set to zero. In the interval from P1 to P2, the value of the third SWY coefficient SWYUseRatio_3 is a value obtained by linearly interpolating 128 and 0.

(4)SWYUseRatio_4(第4のSWY係数)の算出
図17における低周波領域1403は、第1の高周波信号AC_1を用いるのが好ましい。低周波領域1403は、RAW信号に低周波領域を検出するフィルタを適用することで検出可能である。
(4) Calculation of SWYUseRatio — 4 (fourth SWY coefficient) It is preferable that the low frequency region 1403 in FIG. 17 uses the first high frequency signal AC_1. The low frequency region 1403 can be detected by applying a filter that detects the low frequency region to the RAW signal.

図21は、第4のSWY係数算出回路1063の構成例を示すブロック図である。
RAW信号100は、V-LPF1801及びH-LPF1802により、垂直方向及び水平方向の帯域が制限される。その後、さらに水平方向のバンドパスフィルタ(H-BPF)1803と垂直方向のバンドパスフィルタ(V-BPF)1804が別々に適用される。そして減算器1805によって、H-BPF1803の出力からV-BPF1804の出力を減算する。絶対値回路(abs)1806は減算結果の絶対値を算出し、低域検出用信号LowFとして出力される。
FIG. 21 is a block diagram illustrating a configuration example of the fourth SWY coefficient calculation circuit 1063.
The RAW signal 100 is limited in the vertical and horizontal bands by the V-LPF 1801 and the H-LPF 1802. Thereafter, a band-pass filter (H-BPF) 1803 in the horizontal direction and a band-pass filter (V-BPF) 1804 in the vertical direction are applied separately. The subtracter 1805 subtracts the output of the V-BPF 1804 from the output of the H-BPF 1803. An absolute value circuit (abs) 1806 calculates the absolute value of the subtraction result and outputs it as a low-frequency detection signal LowF.

そして、図22に示すような入出力特性を有するCalSwyUse4 1807を用い、第4のSWY係数SWYUseRatio_4を算出する。CalSwyUse4 1807は、演算回路であっても、テーブルであっても良い。   Then, a fourth SWY coefficient SWYUseRatio_4 is calculated using CalSwyUse4 1807 having input / output characteristics as shown in FIG. CalSwyUse4 1807 may be an arithmetic circuit or a table.

低域検出用信号LowFの値が0からP1までは値が小さいため高周波領域であり、第4のSWY係数SWYUseRatio_4を128とする。また、P2以上は低周波領域であるため、第4のSWY係数SWYUseRatio_4を0とする。P1からP2の区間は、第4のSWY係数SWYUseRatio_4の値を128と0とを線形補間した値とする。
第5のSWY係数算出回路1064は、第1のSWY係数SWYUseRatio_1から第4のSWY係数SWYUseRatio_4から、最終的な加重加算係数SWYUseRatioを算出する。
The value of the low-frequency detection signal LowF from 0 to P1 is small because it is a high-frequency region, and the fourth SWY coefficient SWYUseRatio_4 is set to 128. Also, since P2 and above are in the low frequency region, the fourth SWY coefficient SWYUseRatio_4 is set to zero. In the interval from P1 to P2, the value of the fourth SWY coefficient SWYUseRatio_4 is a value obtained by linearly interpolating 128 and 0.
The fifth SWY coefficient calculation circuit 1064 calculates a final weighted addition coefficient SWYUseRatio from the first SWY coefficient SWYUseRatio_1 to the fourth SWY coefficient SWYUseRatio_4.

図23は、第5のSWY係数算出回路1064の構成例を示すブロック図である。
乗算器2004は、第1のSWY係数SWYUseRatio_1と第2のSWY係数SWYUseRatio_2を乗算し、シフター2005により右方向に7ビットシフト演算される。シフター2005により、乗算器2004の出力は1/128倍される。
FIG. 23 is a block diagram illustrating a configuration example of the fifth SWY coefficient calculation circuit 1064.
The multiplier 2004 multiplies the first SWY coefficient SWYUseRatio_1 and the second SWY coefficient SWYUseRatio_2, and the shifter 2005 performs a 7-bit shift operation in the right direction. The shifter 2005 multiplies the output of the multiplier 2004 by 1/128.

シフター2005の出力は乗算器2006により第3のSWY係数SWYUseRatio_3と乗算され、乗算結果がシフター2007により右方向に7ビットシフト演算される。最後に、シフター2007の出力は乗算器2008により第4のSWY係数SWYUseRatio_4と乗算され、乗算結果が最終の加重加算係数SWYUseRatioとして出力される。   The output of the shifter 2005 is multiplied by the third SWY coefficient SWYUseRatio_3 by the multiplier 2006, and the multiplication result is shifted 7 bits to the right by the shifter 2007. Finally, the output of the shifter 2007 is multiplied by the fourth SWY coefficient SWYUseRatio_4 by the multiplier 2008, and the multiplication result is output as the final weighted addition coefficient SWYUseRatio.

すなわち、
SWYUseRatio=SWYUseRatio_1*SWYUseRatio_2/128*SWYUseRatio_3/128*SWYUseRatio_4*/128
である。
That is,
SWYUseRatio = SWYUseRatio_1 * SWYUseRatio_2 / 128 * SWYUseRatio_3 / 128 * SWYUseRatio_4 * / 128
It is.

第3の演算回路1065は、上述の式(2−5)に従った加重加算を行い、第1及び第3の高周波信号AC_1及びAC_3から、第4の高周波信号AC_4を求める。   The third arithmetic circuit 1065 performs weighted addition according to the above equation (2-5) to obtain the fourth high-frequency signal AC_4 from the first and third high-frequency signals AC_1 and AC_3.

(第2と第4の高周波信号の加重加算)
図12における第3のGR加重加算回路1051は、第4の高周波信号AC_4と第2の高周波信号AC_2を加重加算し、以下の式(2−6)に従って第5の高周波信号AC_5を生成する。第3のGR加重加算回路1051は、AC_1がAC_4に、AC_3がAC_5に、加重加算係数の名称がAC2UseRatioとなることを除き、図8に示した第1の実施形態における第2のGR加重加算回路132と同様の構成であってよい。
(Weighted addition of second and fourth high-frequency signals)
The third GR weighted addition circuit 1051 in FIG. 12 weights and adds the fourth high-frequency signal AC_4 and the second high-frequency signal AC_2, and generates a fifth high-frequency signal AC_5 according to the following equation (2-6). The third GR weighted addition circuit 1051 is the second GR weighted addition in the first embodiment shown in FIG. 8 except that AC_1 is AC_4, AC_3 is AC_5, and the name of the weighted addition coefficient is AC2UseRatio. A configuration similar to that of the circuit 132 may be used.

Figure 2012239242
Figure 2012239242

(最終輝度信号の生成)
図12に戻り、適応補間回路1033で生成された適応OG信号は、ゲイン回路1046にも供給される。ゲイン回路1046は、適応OG信号に0.6倍のゲインを乗じて出力する。
(Generation of final luminance signal)
Returning to FIG. 12, the adaptive OG signal generated by the adaptive interpolation circuit 1033 is also supplied to the gain circuit 1046. The gain circuit 1046 multiplies the adaptive OG signal by a gain of 0.6 and outputs the result.

一方、RAW信号100は、0挿入回路1040でR画素以外の画素信号値が0に置換され、V-LPF1041とH-LPF1042で補間演算された後、ゲイン回路1047に供給される。ゲイン回路1047はR信号に0.3倍のゲインを乗じて出力する。   On the other hand, the RAW signal 100 is supplied to the gain circuit 1047 after the pixel signal values other than the R pixel are replaced with 0 by the 0 insertion circuit 1040 and interpolated by the V-LPF 1041 and the H-LPF 1042. The gain circuit 1047 multiplies the R signal by a gain of 0.3 times and outputs the result.

更に、RAW信号100は0挿入回路1043でB画素以外の画素信号値が0に置換され、V-LPF1044とH-LPF1045で補間演算された後、ゲイン回路1048に供給される。ゲイン回路1048はB信号に0.1倍のゲインを乗じて出力する。   Further, the RAW signal 100 is supplied to the gain circuit 1048 after the pixel signal values other than the B pixel are replaced with 0 by the 0 insertion circuit 1043, interpolated by the V-LPF 1044 and the H-LPF 1045. A gain circuit 1048 multiplies the B signal by a gain of 0.1 times and outputs the result.

ゲイン回路1047及び1048の出力信号は加算回路1049で加算され、さらに加算回路1050でゲイン回路1046の出力信号と加算されて、輝度信号Yhとなる。
その後、加算回路1052で第5の高周波信号AC_5と輝度信号Yhとが加算され、エッジ強調された最終輝度信号YhFinalが生成される。
The output signals of the gain circuits 1047 and 1048 are added by the adder circuit 1049, and further added by the adder circuit 1050 with the output signal of the gain circuit 1046 to become the luminance signal Yh.
Thereafter, the adder circuit 1052 adds the fifth high-frequency signal AC_5 and the luminance signal Yh to generate a final luminance signal YhFinal with edge enhancement.

以上説明したように、本実施形態では、G画素の信号のみから生成した第3の高周波信号の斜め領域についてはRGB全色画素の信号から生成した第1の高周波信号で置き換えるように加重加算した第4の高周波信号を生成する。そのため、従来のOG信号の斜めの解像度がSWY信号に置換され、大幅に解像度が向上する。   As described above, in the present embodiment, the weighted addition is performed so that the oblique region of the third high-frequency signal generated from only the G pixel signal is replaced with the first high-frequency signal generated from the RGB color signal. A fourth high-frequency signal is generated. Therefore, the diagonal resolution of the conventional OG signal is replaced with the SWY signal, and the resolution is greatly improved.

さらに、第4の高周波信号とは別に、R画素の信号のみを用いて第2の高周波信号を生成し、被写体が赤である尺度を示す赤色度が高いほど第2の高周波信号の重みを大きくして両者を加重加算して最終的な高周波信号を生成する。そのため、赤色被写体においても斜め領域の解像度が向上し、かつ、エッジ強調の効いた輝度信号を生成できる。   Further, separately from the fourth high frequency signal, the second high frequency signal is generated using only the R pixel signal, and the weight of the second high frequency signal is increased as the redness indicating the scale of the subject is red. Then, the final high frequency signal is generated by weighted addition of both. For this reason, even in a red subject, the resolution of an oblique region is improved and a luminance signal with enhanced edge can be generated.

なお、第2の高周波信号と第4の高周波信号を加重加算する方法は、上記の方法に限られるものではない。被写体が赤である尺度を示す赤色度が高いほど第2の高周波信号に対して高いゲインをかけ、第4の高周波信号に、このゲインをかけた第2の高周波信号を加算することで、第2の高周波信号と第4の高周波信号を加重加算する構成としても構わない。赤い被写体であってもG画素からある程度の出力が得られるような分光特性の色フィルタを備えた撮像素子の出力からは、このような加重加算のほうが良好な輝度信号を生成できることがある。   Note that the method of weighted addition of the second high-frequency signal and the fourth high-frequency signal is not limited to the above method. By applying a higher gain to the second high-frequency signal as the degree of redness indicating the scale of the subject being red is higher, and adding the second high-frequency signal to which the gain has been added to the fourth high-frequency signal, A configuration may be adopted in which the second high frequency signal and the fourth high frequency signal are weighted and added. In some cases, such weighted addition can generate a better luminance signal from the output of an image sensor provided with a color filter with spectral characteristics such that a certain amount of output can be obtained from the G pixel even for a red subject.

(他の実施形態)
上述の実施形態は、システム或は装置のコンピュータ(或いはCPU、MPU等)によりソフトウェア的に実現することも可能である。
従って、上述の実施形態をコンピュータで実現するために、該コンピュータに供給されるコンピュータプログラム自体も本発明を実現するものである。つまり、上述の実施形態の機能を実現するためのコンピュータプログラム自体も本発明の一つである。
(Other embodiments)
The above-described embodiment can also be realized in software by a computer of a system or apparatus (or CPU, MPU, etc.).
Therefore, the computer program itself supplied to the computer in order to implement the above-described embodiment by the computer also realizes the present invention. That is, the computer program itself for realizing the functions of the above-described embodiments is also one aspect of the present invention.

なお、上述の実施形態を実現するためのコンピュータプログラムは、コンピュータで読み取り可能であれば、どのような形態であってもよい。例えば、オブジェクトコード、インタプリタにより実行されるプログラム、OSに供給するスクリプトデータ等で構成することができるが、これらに限るものではない。   The computer program for realizing the above-described embodiment may be in any form as long as it can be read by a computer. For example, it can be composed of object code, a program executed by an interpreter, script data supplied to the OS, but is not limited thereto.

上述の実施形態を実現するためのコンピュータプログラムは、記憶媒体又は有線/無線通信によりコンピュータに供給される。プログラムを供給するための記憶媒体としては、例えば、フレキシブルディスク、ハードディスク、磁気テープ等の磁気記憶媒体、MO、CD、DVD等の光/光磁気記憶媒体、不揮発性の半導体メモリなどがある。   A computer program for realizing the above-described embodiment is supplied to a computer via a storage medium or wired / wireless communication. Examples of the storage medium for supplying the program include a magnetic storage medium such as a flexible disk, a hard disk, and a magnetic tape, an optical / magneto-optical storage medium such as an MO, CD, and DVD, and a nonvolatile semiconductor memory.

有線/無線通信を用いたコンピュータプログラムの供給方法としては、コンピュータネットワーク上のサーバを利用する方法がある。この場合、本発明を形成するコンピュータプログラムとなりうるデータファイル(プログラムファイル)をサーバに記憶しておく。プログラムファイルとしては、実行形式のものであっても、ソースコードであっても良い。   As a computer program supply method using wired / wireless communication, there is a method of using a server on a computer network. In this case, a data file (program file) that can be a computer program forming the present invention is stored in the server. The program file may be an executable format or a source code.

そして、このサーバにアクセスしたクライアントコンピュータに、プログラムファイルをダウンロードすることによって供給する。この場合、プログラムファイルを複数のセグメントファイルに分割し、セグメントファイルを異なるサーバに分散して配置することも可能である。
つまり、上述の実施形態を実現するためのプログラムファイルをクライアントコンピュータに提供するサーバ装置も本発明の一つである。
Then, the program file is supplied by downloading to a client computer that has accessed the server. In this case, the program file can be divided into a plurality of segment files, and the segment files can be distributed and arranged on different servers.
That is, a server apparatus that provides a client computer with a program file for realizing the above-described embodiment is also one aspect of the present invention.

また、上述の実施形態を実現するためのコンピュータプログラムを暗号化して格納した記憶媒体を配布し、所定の条件を満たしたユーザに、暗号化を解く鍵情報を供給し、ユーザの有するコンピュータへのインストールを許可してもよい。鍵情報は、例えばインターネットを介してホームページからダウンロードさせることによって供給することができる。   In addition, a storage medium in which the computer program for realizing the above-described embodiment is encrypted and distributed is distributed, and key information for decrypting is supplied to a user who satisfies a predetermined condition, and the user's computer Installation may be allowed. The key information can be supplied by being downloaded from a homepage via the Internet, for example.

また、上述の実施形態を実現するためのコンピュータプログラムは、すでにコンピュータ上で稼働するOSの機能を利用するものであってもよい。
さらに、上述の実施形態を実現するためのコンピュータプログラムは、その一部をコンピュータに装着される拡張ボード等のファームウェアで構成してもよいし、拡張ボード等が備えるCPUで実行するようにしてもよい。
Further, the computer program for realizing the above-described embodiment may use an OS function already running on the computer.
Further, a part of the computer program for realizing the above-described embodiment may be configured by firmware such as an expansion board attached to the computer, or may be executed by a CPU provided in the expansion board. Good.

Claims (5)

原色ベイヤー配列の色フィルタを備えた撮像素子から読み出した画像信号から、エッジ強調された輝度信号を画素毎に生成する輝度信号生成装置であって、
前記画像信号から輝度信号を生成する輝度信号生成手段と、
前記撮像素子の全色の画素の画像信号を用いて第1の高周波信号を生成する第1の高周波信号生成手段と、
前記撮像素子のうち、赤色又は青色のいずれか一方の画素の画像信号を用いて第2の高周波信号を生成する第2の高周波信号生成手段と、
前記画像信号から、着目画素が前記赤色又は青色のいずれか一方に近い色かどうかの尺度を示す指標を算出する算出手段と、
前記指標に基づき、前記着目画素が前記赤色又は青色のいずれか一方に近い色であるほど、前記第2の高周波信号の割合が高くなるように前記第1の高周波信号と前記第2の高周波信号を加重加算して前記着目画素に対する高周波信号を生成する第1の加重加算手段と、
前記輝度信号生成手段が前記着目画素に対して生成した輝度信号に、前記着目画素に対する高周波信号を加算して、前記着目画素に対するエッジ強調された輝度信号を生成する加算手段を有することを特徴とする輝度信号生成装置。
A luminance signal generation device that generates an edge-enhanced luminance signal for each pixel from an image signal read from an image sensor having a primary color Bayer array color filter,
Luminance signal generating means for generating a luminance signal from the image signal;
First high-frequency signal generation means for generating a first high-frequency signal using image signals of pixels of all colors of the image sensor;
A second high-frequency signal generating unit configured to generate a second high-frequency signal using an image signal of one of red or blue pixels of the image sensor;
A calculating means for calculating an index indicating a measure of whether the pixel of interest is a color close to either one of the red or blue from the image signal;
Based on the index, the first high-frequency signal and the second high-frequency signal are set so that the ratio of the second high-frequency signal becomes higher as the pixel of interest is closer to either red or blue. A weighted addition means for generating a high-frequency signal for the pixel of interest,
The luminance signal generating means includes addition means for adding a high-frequency signal for the target pixel to the luminance signal generated for the target pixel to generate an edge-enhanced luminance signal for the target pixel. Luminance signal generating device.
さらに、前記撮像素子の緑色画素の画像信号から第3の高周波信号を生成する第3の高周波信号生成手段と、
前記着目画素が傾いた線に対応する度合いを検出する傾き検出手段と、
前記着目画素が傾いた線に対応する度合いが高いほど、前記第3の高周波信号の割合が高くなるように前記第1の高周波信号と前記第3の高周波信号とを加重加算して第4の高周波信号を生成する第2の加重加算手段とをさらに有し、
前記第1の加重加算手段が、前記第1の高周波信号に代えて前記第4の高周波信号と前記第2の高周波信号とを加重加算して前記着目画素に対する高周波信号を生成することを特徴とする請求項1記載の輝度信号生成装置。
And third high-frequency signal generating means for generating a third high-frequency signal from the image signal of the green pixel of the image sensor;
Inclination detecting means for detecting a degree corresponding to the inclined line of the target pixel;
The higher the degree that the pixel of interest corresponds to the inclined line is, the higher the ratio of the third high-frequency signal is, and the first high-frequency signal and the third high-frequency signal are weighted and added. A second weighted addition means for generating a high-frequency signal;
The first weighted addition means generates a high-frequency signal for the pixel of interest by performing weighted addition of the fourth high-frequency signal and the second high-frequency signal instead of the first high-frequency signal. The luminance signal generation apparatus according to claim 1.
原色ベイヤー配列の色フィルタを備えた撮像素子と、
請求項1又は請求項2に記載の輝度信号生成装置とを有することを特徴とする撮像装置。
An image sensor having a primary color Bayer array color filter;
An imaging apparatus comprising: the luminance signal generation apparatus according to claim 1.
原色ベイヤー配列の色フィルタを備えた撮像素子から読み出した画像信号から、エッジ強調された輝度信号を画素毎に生成する輝度信号生成方法であって、
輝度信号生成手段が、前記画像信号から輝度信号を生成する輝度信号生成工程と、
第1の高周波信号生成手段が、前記撮像素子の全色の画素の画像信号を用いて第1の高周波信号を生成する第1の高周波信号生成工程と、
第2の高周波信号生成手段が、前記撮像素子のうち、赤色又は青色のいずれか一方の画素の画像信号を用いて第2の高周波信号を生成する第2の高周波信号生成工程と、
算出手段が、前記画像信号から、着目画素が前記赤色又は青色のいずれか一方に近い色かどうかの尺度を示す指標を算出する算出工程と、
第1の加重加算手段が、前記指標に基づき、前記着目画素が前記赤色又は青色のいずれか一方に近い色であるほど、前記第2の高周波信号の割合が高くなるように前記第1の高周波信号と前記第2の高周波信号を加重加算して前記着目画素に対する高周波信号を生成する第1の加重加算工程と、
加算手段が、前記輝度信号生成工程が前記着目画素に対して生成した輝度信号に、前記着目画素に対する高周波信号を加算して、前記着目画素に対するエッジ強調された輝度信号を生成する加算工程を有することを特徴とする輝度信号生成方法。
A luminance signal generation method for generating an edge-enhanced luminance signal for each pixel from an image signal read from an image sensor having a primary color Bayer array color filter,
A luminance signal generating means for generating a luminance signal from the image signal;
A first high-frequency signal generating unit that generates a first high-frequency signal using image signals of pixels of all colors of the image sensor;
A second high-frequency signal generating step, wherein the second high-frequency signal generating means generates a second high-frequency signal using an image signal of one of the red and blue pixels of the image sensor;
A calculating step in which a calculating means calculates an index indicating a measure of whether the pixel of interest is a color close to either one of the red or blue from the image signal;
Based on the index, the first weighted addition means is configured to increase the ratio of the second high-frequency signal so that the pixel of interest has a color closer to either red or blue. A weighted addition of a signal and the second high-frequency signal to generate a high-frequency signal for the pixel of interest;
The adding means includes an adding step of adding a high-frequency signal for the target pixel to the luminance signal generated by the luminance signal generation step for the target pixel to generate an edge-enhanced luminance signal for the target pixel. A luminance signal generation method characterized by the above.
コンピュータに、請求項4記載の輝度信号生成方法の各工程を実行させるためのプログラム。   The program for making a computer perform each process of the luminance signal production | generation method of Claim 4.
JP2012200854A 2012-09-12 2012-09-12 Luminance signal generation apparatus, luminance signal generation method, and imaging apparatus Expired - Fee Related JP5409864B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2012200854A JP5409864B2 (en) 2012-09-12 2012-09-12 Luminance signal generation apparatus, luminance signal generation method, and imaging apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2012200854A JP5409864B2 (en) 2012-09-12 2012-09-12 Luminance signal generation apparatus, luminance signal generation method, and imaging apparatus

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP2008203444A Division JP5129685B2 (en) 2008-08-06 2008-08-06 Luminance signal generation apparatus, luminance signal generation method, and imaging apparatus

Publications (2)

Publication Number Publication Date
JP2012239242A true JP2012239242A (en) 2012-12-06
JP5409864B2 JP5409864B2 (en) 2014-02-05

Family

ID=47461660

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2012200854A Expired - Fee Related JP5409864B2 (en) 2012-09-12 2012-09-12 Luminance signal generation apparatus, luminance signal generation method, and imaging apparatus

Country Status (1)

Country Link
JP (1) JP5409864B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP7299398B1 (en) 2022-10-14 2023-06-27 株式会社 日立産業制御ソリューションズ Image processing device and image processing method

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003304550A (en) * 2002-04-11 2003-10-24 Fuji Photo Film Co Ltd Apparatus for revising reproduction band of video signal
JP2005109991A (en) * 2003-09-30 2005-04-21 Canon Inc Signal processing method and device, and imaging device
JP2005286411A (en) * 2004-03-26 2005-10-13 Fuji Photo Film Co Ltd Image processor, and contour emphasis method and program
JP2008072377A (en) * 2006-09-13 2008-03-27 Canon Inc Luminance signal creating device, luminance signal creating method and image pickup device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003304550A (en) * 2002-04-11 2003-10-24 Fuji Photo Film Co Ltd Apparatus for revising reproduction band of video signal
JP2005109991A (en) * 2003-09-30 2005-04-21 Canon Inc Signal processing method and device, and imaging device
JP2005286411A (en) * 2004-03-26 2005-10-13 Fuji Photo Film Co Ltd Image processor, and contour emphasis method and program
JP2008072377A (en) * 2006-09-13 2008-03-27 Canon Inc Luminance signal creating device, luminance signal creating method and image pickup device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP7299398B1 (en) 2022-10-14 2023-06-27 株式会社 日立産業制御ソリューションズ Image processing device and image processing method

Also Published As

Publication number Publication date
JP5409864B2 (en) 2014-02-05

Similar Documents

Publication Publication Date Title
JP5129685B2 (en) Luminance signal generation apparatus, luminance signal generation method, and imaging apparatus
JP4859220B2 (en) Luminance signal creation device, brightness signal creation method, and imaging device
RU2496253C1 (en) Image processing device and image processing method for correcting chromatic aberration
JP4284628B2 (en) IMAGING DEVICE, IMAGE PROCESSING DEVICE, IMAGE PROCESSING METHOD, PROGRAM FOR IMAGE PROCESSING METHOD, AND RECORDING MEDIUM CONTAINING PROGRAM FOR IMAGE PROCESSING METHOD
JP4144630B2 (en) Imaging device
JP4952251B2 (en) Image processing method, image processing program, recording medium, and image processing apparatus
JP5672776B2 (en) Image processing apparatus, image processing method, and program
US20130077862A1 (en) Image processing apparatus, image processing method and program
US9123102B2 (en) Image processing apparatus, imaging apparatus, image processing method, and computer readable medium storing instructions for performing image correction
JP5474586B2 (en) Image processing device
JP5868046B2 (en) Luminance signal creation device, imaging device, brightness signal creation method, program, and recording medium
JPWO2002021849A1 (en) Image processing apparatus and color system conversion method
JPWO2002071761A1 (en) Image processing apparatus and image processing program
JP4571607B2 (en) Noise reduction apparatus and method
JP2010171940A (en) Image processing apparatus and image processing method
JP6415093B2 (en) Image processing apparatus, image processing method, and program
JP5409864B2 (en) Luminance signal generation apparatus, luminance signal generation method, and imaging apparatus
JP2009194721A (en) Image signal processing device, image signal processing method, and imaging device
US8675106B2 (en) Image processing apparatus and control method for the same
JP5103580B2 (en) Image processing apparatus and digital camera
JP2015211347A (en) Image processing apparatus, imaging apparatus, image processing method and program
JP5494249B2 (en) Image processing apparatus, imaging apparatus, and image processing program
JP2004064227A (en) Video signal processing apparatus
JP2012100215A (en) Image processing device, imaging device, and image processing program
JP2018107682A (en) Luminance signal generating device, luminance signal generating method, and program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20120912

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20130906

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20131007

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20131105

LAPS Cancellation because of no payment of annual fees