JP6987622B2 - Image processing equipment, image processing methods and programs - Google Patents
Image processing equipment, image processing methods and programs Download PDFInfo
- Publication number
- JP6987622B2 JP6987622B2 JP2017225837A JP2017225837A JP6987622B2 JP 6987622 B2 JP6987622 B2 JP 6987622B2 JP 2017225837 A JP2017225837 A JP 2017225837A JP 2017225837 A JP2017225837 A JP 2017225837A JP 6987622 B2 JP6987622 B2 JP 6987622B2
- Authority
- JP
- Japan
- Prior art keywords
- signal
- color difference
- filter processing
- color
- intensity
- 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.)
- Active
Links
Images
Description
本発明は、画像処理装置、画像処理方法及びプログラムに関する。 The present invention relates to an image processing apparatus, an image processing method and a program.
特許文献1には、輝度信号の主成分となるG信号の補間を行う際に、縦方向、又は横方向の相関を判別し、縦方向の相関がある場合には縦方向にLPF処理を行い、横方向の相関がある場合には横方向にLPF処理を行う技術が開示されている。そして、縦方向にも横方向にも相関がない場合には、2次元のLPF処理を行うことで、縦方向、横方向のエッジがぼけないようにする。 In Patent Document 1, when the G signal, which is the main component of the luminance signal, is interpolated, the correlation in the vertical direction or the horizontal direction is discriminated, and if there is a correlation in the vertical direction, LPF processing is performed in the vertical direction. , A technique for performing LPF processing in the lateral direction when there is a correlation in the lateral direction is disclosed. Then, when there is no correlation in the vertical direction and the horizontal direction, a two-dimensional LPF process is performed to prevent the vertical and horizontal edges from being blurred.
しかし、特許文献1の技術では、縦又は横方向の相関がない場合には2次元のLPF処理となるため、例えば斜め方向のエッジは、縦方向、横方向のエッジに比べてぼやけてしまう。 However, in the technique of Patent Document 1, since the two-dimensional LPF processing is performed when there is no vertical or horizontal correlation, for example, the diagonal edge is blurred as compared with the vertical and horizontal edges.
そこで、非特許文献1には、R又はB画素の位置のG信号の算出方法が開示されている。非特許文献1では、着目画素を含む上、下、左、右方向に、G画素と、着目画素と同色の画素との色差信号をそれぞれ算出し、各方向の色差信号を合成した色差信号を着目画素に加算することでG信号を算出する。このとき、非特許文献1では、各方向の色差信号を、該当する方向の色差信号の傾きに応じて合成することで、方向に因らず解像感の高い画像を生成する。 Therefore, Non-Patent Document 1 discloses a method for calculating the G signal at the position of the R or B pixel. In Non-Patent Document 1, the color difference signals of the G pixel and the pixel of the same color as the pixel of interest are calculated in the upper, lower, left, and right directions including the pixel of interest, and the color difference signal obtained by synthesizing the color difference signals in each direction is obtained. The G signal is calculated by adding it to the pixel of interest. At this time, in Non-Patent Document 1, by synthesizing the color difference signal in each direction according to the inclination of the color difference signal in the corresponding direction, an image having a high resolution is generated regardless of the direction.
しかし、非特許文献1では、R、B信号を用いてG信号を生成しているために、赤色被写体や青色被写体のように、G信号より、R、B信号の信号値が高い被写体では、以下のような問題が発生する。つまり、G信号に対して、R、B信号のサンプリングが少ないことに起因したR、B信号の折り返しが、G信号に存在するエッジよりも振幅の高いエッジとしてG信号に加算されることで、折り返しによる偽パターンが目立つ場合がある。 However, in Non-Patent Document 1, since the G signal is generated using the R and B signals, the subject whose R and B signal values are higher than the G signal, such as a red subject and a blue subject, is used. The following problems occur. That is, the folding back of the R and B signals due to the small sampling of the R and B signals with respect to the G signal is added to the G signal as an edge having a higher amplitude than the edge existing in the G signal. False patterns due to wrapping may be noticeable.
本発明は前述の問題点に鑑み、G信号より、R、B信号の信号値が高い赤色や青色のような被写体に発生する偽パターンを低減した画像を生成できるようにすることを目的としている。 In view of the above-mentioned problems, it is an object of the present invention to be able to generate an image in which false patterns generated in a subject such as red or blue, which have higher signal values of R and B signals than G signals, are reduced. ..
本発明に係る画像処理装置は、水平方向、垂直方向にベイヤ配列に基づくRGB信号を有する入力画像信号に対して、G信号を算出する画像処理装置であって、入力画像信号を垂直方向に補間して色差信号を算出する第1の色差信号算出手段と、前記入力画像信号を水平方向に補間して色差信号を算出する第2の色差信号算出手段と、前記第1の色差信号算出手段により算出された色差信号に対してフィルタ処理を行う第1のフィルタ処理手段と、前記第2の色差信号算出手段により算出された色差信号に対してフィルタ処理を行う第2のフィルタ処理手段と、R信号及びB信号の少なくとも1つの強度を算出する色信号強度算出手段と、前記第1のフィルタ処理手段によるフィルタ処理の結果と、前記第2のフィルタ処理手段によるフィルタ処理の結果と、前記色信号強度算出手段により算出された前記R信号及びB信号の少なくとも1つの強度とに基づき、前記G信号を算出する色信号算出手段とを有し、前記第1のフィルタ処理手段と前記第2のフィルタ処理手段は、前記色信号強度算出手段によって算出された前記R信号及びB信号の少なくとも1つの強度が予め設定した閾値以上である場合には、フィルタ処理を行わないようにすることを特徴とする。 The image processing apparatus according to the present invention is an image processing apparatus that calculates a G signal for an input image signal having an RGB signal based on a bayer arrangement in the horizontal and vertical directions, and interpolates the input image signal in the vertical direction. The first color difference signal calculating means for calculating the color difference signal, the second color difference signal calculating means for calculating the color difference signal by horizontally interpolating the input image signal, and the first color difference signal calculating means. A first filter processing means for filtering the calculated color difference signal, a second filter processing means for filtering the color difference signal calculated by the second color difference signal calculation means, and R. A color signal intensity calculating means for calculating at least one intensity of a signal and a B signal, a result of filtering by the first filtering means, a result of filtering by the second filtering means, and the color. It has a color signal calculation means for calculating the G signal based on at least one intensity of the R signal and the B signal calculated by the signal strength calculation means, and has the first filter processing means and the second filter processing means. The filter processing means is characterized in that the filter processing is not performed when at least one intensity of the R signal and the B signal calculated by the color signal intensity calculation means is equal to or higher than a preset threshold value. do.
本発明によれば、G信号より、R、B信号の信号値が高い赤色や青色のような被写体に発生する偽パターンを低減した画像を生成することができる。 According to the present invention, it is possible to generate an image in which false patterns generated in a subject such as red or blue, in which the signal values of the R and B signals are higher than those of the G signal, are reduced.
(第1の実施形態)
図1は、本発明の第1の実施形態によるベイヤ配列の色フィルタを有する撮像素子を示す図である。撮像装置は、CMOSイメージセンサ等の撮像素子を有する。撮像装置は、デジタルカメラ、ビデオカメラの他、スマートフォン、タブレット、工業用カメラ、医療用カメラ等に適用可能である。撮像素子は、2次元行列状に配置された複数の画素を有し、複数の画素の各々は、色フィルタ(例えば、赤(R)、緑(G)、青(B)の3色のうちの一つの色フィルタ)を有する。図1は、原色ベイヤ配列の1単位の色フィルタを示す。撮像素子は、画素毎に、光電変換を行い、アナログデジタル変換を行い、デジタルのR信号(赤信号)、G1信号(緑信号)、G2信号(緑信号)、又はB信号(青信号)を出力する。G1信号及びG2信号は、G信号(緑信号)である。このようにG信号は、R信号、B信号に対してサンプリング数が多い。ベイヤ配列の色フィルタを有する撮像装置は、各画素においてR、G、Bのうちの一つの色信号しか得られないため、各画素においてRGBすべての色信号を求める場合には、後段の図2の輝度信号生成部200で補間処理を行う必要がある。
(First Embodiment)
FIG. 1 is a diagram showing an image pickup device having a Bayer array color filter according to the first embodiment of the present invention. The image pickup device has an image pickup element such as a CMOS image sensor. The image pickup device can be applied to smartphones, tablets, industrial cameras, medical cameras, etc., in addition to digital cameras and video cameras. The image pickup element has a plurality of pixels arranged in a two-dimensional matrix, and each of the plurality of pixels has a color filter (for example, three colors of red (R), green (G), and blue (B). Has one color filter). FIG. 1 shows a unit color filter of a primary color Bayer array. The image pickup element performs photoelectric conversion for each pixel, performs analog-to-digital conversion, and outputs a digital R signal (red signal), G1 signal (green signal), G2 signal (green signal), or B signal (green signal). do. The G1 signal and the G2 signal are G signals (green signals). As described above, the G signal has a larger number of samplings than the R signal and the B signal. An image pickup device having a Bayer array color filter can obtain only one color signal of R, G, and B in each pixel. Therefore, when obtaining a color signal of all RGB in each pixel, FIG. It is necessary to perform interpolation processing in the brightness
図2は、本実施形態による輝度信号生成部200の構成例を示す図である。輝度信号生成部200は、画像処理装置であり、図1の撮像素子からベイヤ配列のデジタルのR信号、G信号及びB信号を入力する。輝度信号生成部200は、WB回路(ホワイトバランス回路)201と、G補間回路202と、R補間回路203と、B補間回路204と、APC回路205と、輝度信号生成回路206と、加算回路207とを有する。
FIG. 2 is a diagram showing a configuration example of the luminance
WB回路201は、撮像素子からベイヤ配列のデジタルの画像信号(R信号、G信号及びB信号)を入力し、画像信号のホワイトバランスを補正する。G補間回路202は、WB回路201から出力されるベイヤ配列の画像信号を入力し、図1のR画素及びB画素の位置のG信号を補間により算出し、全画素のG信号を出力する。R画素は赤フィルタが設けられた画素であり、B画素は青フィルタが設けられた画素であり、G画素は緑フィルタが設けられた画素である。G補間回路202の処理の詳細は後述する。
The WB
R補間回路203は、WB回路201が出力するベイヤ配列の入力画像信号に対して、図1の入力画像のG画素及びB画素の位置のR信号を補間により算出し、全画素のR信号を出力する。例えば、R補間回路203は、WB回路201が出力するベイヤ配列の入力画像信号に対して、R画素以外の信号レベルを0にした後、2次元のLPF(ローパスフィルタ)処理によりR信号を算出する。
The
B補間回路204は、WB回路201が出力するベイヤ配列の入力画像信号に対して、図1の入力画像のR画素及びG画素の位置のB信号を補間により算出し、全画素のB信号を出力する。例えば、B補間回路204は、WB回路201が出力するベイヤ配列の入力画像信号に対して、B画素以外の信号レベルを0にした後、2次元のLPF処理によりB信号を算出する。
The
APC回路205は、G補間回路202から出力されるG信号に対して、HPF(ハイパスフィルタ)等を適応することでアパーチャ補正信号を生成する。加算回路207は、G補間回路202が出力するG信号とAPC回路205の出力信号とを加算し、全画素のG信号を出力する。輝度信号生成回路206は、加算回路207が出力するG信号と、R補間回路203が出力するR信号と、B補間回路204が出力するB信号とを基に、次式(1)により、全画素の輝度信号Yを生成する。
Y=0.3R+0.59G+0.11B ・・・(1)
The
Y = 0.3R + 0.59G + 0.11B ... (1)
図3は、図2のG補間回路202の構成例を示すブロック図である。G補間回路202は、G画素V補間回路301と、G画素H補間回路302と、R,B画素V補間回路303と、R,B画素H補間回路304と、V色差算出回路305と、H色差算出回路306とを有する。さらに、G補間回路202は、V色差傾き算出回路307と、H色差傾き算出回路308と、赤、青被写体検出回路309と、Nフィルタ回路310と、Sフィルタ回路311と、Wフィルタ回路312と、Eフィルタ回路313とを有する。さらに、G補間回路202は、N重み算出回路314と、S重み算出回路315、W重み算出回路316と、E重み算出回路317と、合成回路318と、加算回路319とを有する。
FIG. 3 is a block diagram showing a configuration example of the
図4は、G補間回路202の画像処理方法の流れを示すフローチャートである。ステップS401では、G画素V補間回路301は、WB回路201が出力するベイヤ配列の入力画像信号に対して、垂直方向に補間処理を行うことによりG信号を算出し、全画素のG信号を出力する。具体的には、G画素V補間回路301は、着目画素がG画素の場合には、そのままG信号として出力し、着目画素がR画素又はB画素の場合には、垂直方向にG信号の補間処理を行うことによりG信号を算出する。例えば、G画素V補間回路301は、画像における着目画素のX座標及びY座標を(j,i)としたとき、着目画素がR画素の場合、G信号Gvi,jを次式(2)により算出する。また、G画素V補間回路301は、着目画素がB画素の場合も、着目画素がR画素の場合と同様の方法によりG信号を算出する。
Gvi,j=(Gi-1,j+Gi+1,j)/2 ・・・(2)
FIG. 4 is a flowchart showing the flow of the image processing method of the
Gv i, j = (G i-1, j + G i + 1, j ) / 2 ... (2)
次に、ステップS402では、G画素H補間回路302は、WB回路201が出力する入力画像信号に対して、水平方向に補間処理を行うことによりG信号を算出し、全画素のG信号を出力する。具体的には、G画素H補間回路302は、着目画素がG画素の場合には、そのままG信号として出力し、着目画素がR画素又はB画素の場合には、水平方向にG信号の補間処理を行うことによりG信号を算出する。例えば、G画素H補間回路302は、着目画素がR画素の場合、G信号Ghi,jを次式(3)により算出する。また、G画素H補間回路302は、着目画素がB画素の場合も、着目画素がR画素の場合と同様の方法によりG信号を算出する。
Ghi,j=(Gi,j-1+Gi,j+1)/2 ・・・(3)
Next, in step S402, the G pixel
Gh i, j = (G i, j-1 + G i, j + 1 ) / 2 ... (3)
次に、ステップS403では、R,B画素V補間回路303は、WB回路201が出力する入力画像信号に対して、垂直方向に補間処理を行うことによりR信号及びB信号を算出し、全画素のR信号及びB信号を出力する。具体的には、R,B画素V補間回路303は、着目画素がR画素又はB画素の場合には、そのままR信号又はB信号として出力する。R,B画素V補間回路303は、着目画素がG画素の場合に、着目画素の垂直方向がR画素の場合には、垂直方向に補間処理を行うことによりR信号を算出し、着目画素の垂直方向がB画素の場合には、垂直方向に補間処理を行うことによりB信号を算出する。例えば、R,B画素V補間回路303は、着目画素がG画素であり、着目画素の垂直方向がR画素の場合には、R信号Rvi,jを次式(4)により算出する。また、R,B画素V補間回路303は、着目画素の垂直方向がB画素の場合も、着目画素の垂直方向がR画素の場合と同様の方法によりB信号を算出する。
Rvi,j=(Ri-1,j+Ri+1,j)/2 ・・・(4)
Next, in step S403, the R and B pixel
Rv i, j = (R i-1, j + R i + 1, j ) / 2 ... (4)
次に、ステップS404では、R,B画素H補間回路304は、WB回路201が出力する入力画像信号に対して、水平方向に補間処理を行うことによりR信号及びB信号を算出し、全画素のR信号及びB信号を出力する。具体的には、R,B画素H補間回路304は、着目画素がR画素又はB画素の場合には、そのままR信号又はB信号として出力する。R,B画素H補間回路304は、着目画素がG画素の場合に、着目画素の水平方向がR画素の場合には、水平方向に補間処理を行うことによりR信号を算出し、着目画素の水平方向がB画素の場合には、水平方向に補間処理を行うことによりB信号を算出する。例えば、R,B画素H補間回路304は、着目画素がG画素であり、着目画素の水平方向がR画素の場合には、R信号Rhi,jを次式(5)により算出する。また、R,B画素H補間回路304は、着目画素の水平方向がB画素の場合も、着目画素の水平方向がR画素の場合と同様の方法によりB信号を算出する。
Rhi,j=(Ri,j-1+Ri,j+1)/2 ・・・(5)
Next, in step S404, the R and B pixel
Rh i, j = (R i, j-1 + R i, j + 1 ) / 2 ... (5)
なお、ステップS401〜S404において、G画素とR,B画素の垂直及び水平方向の補間方法として、式(2)〜(5)を用いて着目画素の隣接画素から補間を行ったが、これに限定されず、隣接画素以外の画素を用いて補間を行ってもよい。 In steps S401 to S404, as a method of vertically and horizontally interpolating the G pixel and the R and B pixels, interpolation was performed from the adjacent pixels of the pixel of interest using the equations (2) to (5). The interpolation may be performed using pixels other than adjacent pixels without limitation.
次に、ステップS405では、V色差算出回路305は、G画素V補間回路301から出力されたG信号から、R,B画素V補間回路303から出力されたR信号又はB信号を減算することにより、入力画像信号の垂直方向の色差信号を算出する。V色差算出回路305は、第1の色差信号算出手段である。V色差算出回路305は、着目画素(j,i)において、G画素V補間回路301が出力する信号がG信号Gvi,jであり、R,B画素V補間回路303が出力する信号がR信号Rvi,jの場合、垂直方向の色差信号Diff_vを次式(6)により算出する。また、V色差算出回路305は、R,B画素V補間回路303が出力する信号がB信号の場合も、R,B画素V補間回路303が出力する信号がR信号の場合と同様の方法により、G信号とB信号の垂直色差信号を算出する。
Diff_vi,j=Gvi,j−Rvi,j ・・・(6)
Next, in step S405, the V color
Diff_v i, j = Gv i, j −Rv i, j・ ・ ・ (6)
次に、ステップS406では、H色差算出回路306は、G画素H補間回路302から出力されたG信号から、R,B画素H補間回路304から出力されたR信号又はB信号を減算することにより、入力画像信号の水平方向の色差信号を算出する。H色差算出回路306は、第2の色差信号算出手段である。H色差算出回路306は、着目画素(j,i)において、G画素H補間回路302が出力する信号がG信号Ghi,jであり、R,B画素H補間回路304が出力する信号がR信号Rhi,jの場合、水平方向の色差信号Diff_hを次式(7)により算出する。また、H色差算出回路306は、R,B画素H補間回路304が出力する信号がB信号の場合も、R,B画素H補間回路304が出力する信号がR信号の場合と同様の方法により、G信号とB信号の水平色差信号を算出する。
Diff_hi,j=Ghi,j−Rhi,j ・・・(7)
Next, in step S406, the H color
Diff_h i, j = Gh i, j -Rh i, j ··· (7)
次に、ステップS407では、V色差傾き算出回路307は、V色差算出回路305から出力された色差信号を基に、垂直方向の色差の傾きを算出する。具体的には、V色差傾き算出回路307は、着目画素(j,i)において、V色差算出回路305から出力された色差信号Diff_vを基に、垂直方向の色差の傾き信号Grad_vを次式(8)により算出する。
Grad_vi,j=|Diff_vi-1,j−Diff_vi+1,j| ・・・(8)
Next, in step S407, the V color difference
Grad_v i, j = | Diff_v i-1, j − Diff_v i + 1, j | ・ ・ ・ (8)
次に、ステップS408では、H色差傾き算出回路308は、H色差算出回路306から出力された色差信号を基に、水平方向の色差の傾きを算出する。具体的には、H色差傾き算出回路308は、着目画素(j,i)において、H色差算出回路306から出力された色差信号Diff_hを基に、水平方向の色差の傾き信号Grad_hを次式(9)により算出する。
Grad_hi,j=|Diff_hi,j-1−Diff_hi,j+1| ・・・(9)
Next, in step S408, the H color difference
Grad_h i, j = | Diff_h i, j-1 − Diff_h i, j + 1 | ・ ・ ・ (9)
次に、ステップS409では、赤、青被写体検出回路309は、R信号の強度が高い赤色の被写体、又は、B信号の強度が高い青色の被写体、若しくはR信号、B信号が両方とも高いマゼンタ色の被写体を検出する。赤、青被写体検出回路309は、色信号強度算出手段である。赤、青被写体検出回路309の処理の詳細は後述するが、赤、青被写体検出回路309では、被写体が赤色、青色、若しくはマゼンタ色である程度に応じて0.0〜1.0の間の色信号強度αを出力する。色信号強度αは、例えば、被写体が赤色、青色、若しくはマゼンタ色の被写体でないと判断される場合には0.0と出力され、被写体が赤色、青色、若しくはマゼンタ色の被写体であると判断される場合には1.0と出力される。
Next, in step S409, the red and blue
次に、ステップS410では、Nフィルタ回路310は、V色差算出回路305から出力された色差信号に対して、赤、青被写体検出回路309から出力された色信号強度αに基づいて上方向のフィルタ処理を行う。具体的には、まず、Nフィルタ回路310は、V色差算出回路305から出力された色差信号Diff_vを用いて、着目画素(j,i)における上方向のフィルタ処理の結果Fil_nを次式(11)により算出する。
Next, in step S410, the
次に、Nフィルタ回路310は、色信号強度αに基づいて、色差信号Diff_nを次式(12)により算出して出力する。
Diff_ni,j=αi,j×Diff_vi,j
+(1.0−αi,j)×Fil_ni,j ・・・(12)
Next, the
Diff_n i, j = α i, j × Diff_v i, j
+ (1.0-α i, j ) × Fil_ni i, j ... (12)
次に、ステップS411では、Sフィルタ回路311は、V色差算出回路305から出力された色差信号に対して、赤、青被写体検出回路309から出力された色信号強度αに基づいて下方向のフィルタ処理を行う。具体的には、まず、Sフィルタ回路311は、V色差算出回路305から出力された色差信号Diff_vを用いて、着目画素(j,i)における下方向のフィルタ処理の結果Fil_sを次式(13)により算出する。
Next, in step S411, the
次に、Sフィルタ回路311は、色信号強度αに基づいて、色差信号Diff_sを次式(14)により算出して出力する。
Diff_si,j=αi,j×Diff_vi,j
+(1.0−αi,j)×Fil_si,j ・・・(14)
Next, the
Diff_s i, j = α i, j × Diff_v i, j
+ (1.0-α i, j ) × Fil_s i, j ... (14)
次に、ステップS412では、Wフィルタ回路312は、H色差算出回路306から出力された色差信号に対して、赤、青被写体検出回路309から出力された色信号強度αに基づいて左方向のフィルタ処理を行う。具体的には、まず、Wフィルタ回路312は、H色差算出回路306から出力された色差信号Diff_hを用いて、着目画素(j,i)における左方向のフィルタ処理の結果Fil_wを次式(15)により算出する。
Next, in step S412, the
次に、Wフィルタ回路312は、色信号強度αに基づいて、色差信号Diff_Wを次式(16)により算出して出力する。
Diff_wi,j=αi,j×Diff_hi,j
+(1.0−αi,j)×Fil_wi,j ・・・(16)
Next, the
Diff_w i, j = α i, j × Diff_h i, j
+ (1.0-α i, j ) × Fil_w i, j ... (16)
次に、ステップS413では、Eフィルタ回路313は、H色差算出回路306から出力された色差信号に対して、赤、青被写体検出回路309から出力された色信号強度αに基づいて右方向のフィルタ処理を行う。具体的には、まず、Eフィルタ回路313は、H色差算出回路306から出力された色差信号Diff_hを用いて、着目画素(j,i)における右方向のフィルタ処理の結果Fil_eを次式(17)により算出する。
Next, in step S413, the
次に、Eフィルタ回路313は、色信号強度αに基づいて、色差信号Diff_eを次式(18)により算出して出力する。
Diff_ei,j=αi,j×Diff_hi,j
+(1.0−αi,j)×Fil_ei,j ・・・(18)
Next, the
Diff_e i, j = α i, j × Diff_h i, j
+ (1.0-α i, j ) × Fil_e i, j ... (18)
次に、ステップS414では、N重み算出回路314は、V色差傾き算出回路307から出力された垂直方向の色差の傾き信号Grad_vを基に、上方向の重みWnを次式(19)により算出する。
Next, in step S414, the N
次に、ステップS415では、S重み算出回路315は、V色差傾き算出回路307から出力された垂直方向の色差の傾き信号Grad_vを基に、下方向の重みWsを次式(20)により算出する。
Next, in step S415, the S
次に、ステップS416では、W重み算出回路316は、H色差傾き算出回路308から出力された水平方向の色差の傾き信号Grad_hを基に、左方向の重みWwを次式(21)により算出する。
Next, in step S416, the W
次に、ステップS417では、E重み算出回路317は、H色差傾き算出回路308から出力された水平方向の色差の傾き信号Grad_hを基に、右方向の重みWeを次式(22)により算出する。
Next, in step S417, the E
次に、ステップS418では、合成回路318は、N重み算出回路314から入力される重みWn、S重み算出回路315から入力される重みWs、W重み算出回路316から入力される重みWw、及びE重み算出回路317から入力される重みWeを入力する。また、合成回路318は、Nフィルタ回路310から入力される色差信号Diff_nと、Sフィルタ回路311から入力される色差信号Diff_sとを入力する。また、合成回路318は、Wフィルタ回路312から入力される色差信号Diff_wと、Eフィルタ回路313から入力される色差信号Diff_eとを入力する。合成回路318は、重みWn、重みWs、重みWw及び重みWeに基づいて、色差信号Diff_nと、色差信号Diff_sと、色差信号Diff_wと、色差信号Diff_eとを合成し、色差信号Diff_mixを次式(23)により算出する。
Diff_mixi,j=(Wni,j×Diff_ni,j+Wsi,j×Diff_si,j
+Wwi,j×Diff_wi,j+Wei,j×Diff_ei,j)/Wti,j
Wti,j=Wni,j+Wsi,j+Wwi,j+Wei,j
・・・(23)
Next, in step S418, the
Diff_mix i, j = (Wn i, j x Diff_n i, j + Ws i, j x Diff_s i, j
+ Ww i, j × Diff_w i, j + We i, j × Diff_e i, j ) / Wt i, j
Wt i, j = Wn i, j + Ws i, j + Ww i, j + We i, j
... (23)
次に、ステップS419では、加算回路319は、G補間回路202に入力された入力画像信号の着目画素がR画素又はB画素の場合には、着目画素の信号に対して合成回路318で合成された色差信号Diff_mixを加算してG信号を算出して出力する。また、加算回路319は、着目画素がG画素の場合には、G補間回路202に入力された画像信号をそのまま出力する。加算回路319の出力信号は、G補間回路202の出力信号である。
Next, in step S419, when the pixel of interest of the input image signal input to the
以上のように、Nフィルタ回路310は上方向のフィルタ処理を行い、Sフィルタ回路311は下方向のフィルタ処理を行い、Wフィルタ回路312は左方向のフィルタ処理を行い、Eフィルタ回路313は右方向のフィルタ処理を行う。Nフィルタ回路310とSフィルタ回路311は、第1のフィルタ処理手段であり、垂直方向の色差信号に対してフィルタ処理を行う。Wフィルタ回路312とEフィルタ回路313は、第2のフィルタ処理手段であり、水平方向の色差信号に対してフィルタ処理を行う。そして、着目画素がR画素又はB画素の場合には、フィルタ処理後の色差信号が、合成回路318で方向毎の重みで合成された後に、加算回路319で着目画素に加算され、G補間回路202の出力となるG信号が生成される。
As described above, the
図5は、図3の赤、青被写体検出回路309の構成例を示すブロック図である。赤、青被写体検出回路309は、R補間回路501と、G補間回路502と、B補間回路503と、減算器504と、減算器505と、リミッタ506と、リミッタ507と、加算器508と、係数算出回路509とを有する。
FIG. 5 is a block diagram showing a configuration example of the red and blue
図6は、赤、青被写体検出回路309の画像処理方法の流れを示すフローチャートである。ステップS601では、R補間回路501は、WB回路201が出力するベイヤ配列の入力画像信号に対して、G画素及びB画素の位置のR信号を補間により算出し、全画素のR信号を出力する。例えば、R補間回路501は、WB回路201が出力するベイヤ配列の入力画像信号に対して、R画素以外の信号レベルを0にした後、2次元のLPF処理によりR信号を算出する。
FIG. 6 is a flowchart showing the flow of the image processing method of the red / blue
ステップS602では、G補間回路502は、WB回路201が出力するベイヤ配列の入力画像信号に対して、R画素及びB画素の位置のG信号を補間により算出し、全画素のG信号を出力する。例えば、G補間回路502は、WB回路201が出力するベイヤ配列の入力画像信号に対して、G画素以外の信号レベルを0にした後、2次元のLPF処理によりG信号を算出する。
In step S602, the G interpolation circuit 502 calculates the G signals at the positions of the R pixels and the B pixels by interpolation with respect to the input image signal of the Bayer array output by the
ステップS603では、B補間回路503は、WB回路201が出力するベイヤ配列の入力画像信号に対して、R画素及びG画素の位置のB信号を補間により算出し、全画素のB信号を出力する。例えば、B補間回路503は、WB回路201が出力するベイヤ配列の入力画像信号に対して、B画素以外の信号レベルを0にした後、2次元のLPF処理によりB信号を算出する。
In step S603, the B interpolation circuit 503 calculates the B signal at the positions of the R pixel and the G pixel by interpolation with respect to the input image signal of the Bayer array output by the
次に、ステップS604では、減算器504は、R補間回路501から出力されたR信号から、G補間回路502から出力されたG信号を減算する。減算器504は、着目画素(j,i)において、R補間回路501が出力する信号がR信号Ri,jであり、G補間回路502が出力する信号がG信号Gi,jである場合、減算結果である色差信号Vi,jは次式(24)により算出する。
Vi,j=Ri,j−Gi,j ・・・(24)
Next, in step S604, the subtractor 504 subtracts the G signal output from the G interpolation circuit 502 from the R signal output from the R interpolation circuit 501. In the subtractor 504, in the pixel of interest (j, i), the signal output by the R interpolation circuit 501 is the R signal R i, j , and the signal output by the G interpolation circuit 502 is the G signal G i, j. , The color difference signals V i and j, which are the subtraction results, are calculated by the following equation (24).
V i, j = R i, j −G i, j・ ・ ・ (24)
ステップS605では、減算器505は、B補間回路503から出力されたB信号から、G補間回路502から出力されたG信号を減算する。減算器505は、着目画素(j,i)において、B補間回路503が出力する信号がB信号Bi,jであり、G補間回路502が出力する信号がG信号Gi,jである場合、減算結果である色差信号Ui,jは次式(25)により算出する。
Ui,j=Bi,j−Gi,j ・・・(25)
In step S605, the subtractor 505 subtracts the G signal output from the G interpolation circuit 502 from the B signal output from the B interpolation circuit 503. In the subtractor 505, in the pixel of interest (j, i), the signal output by the B interpolation circuit 503 is the B signal B i, j , and the signal output by the G interpolation circuit 502 is the G signal G i, j. , The color difference signals U i and j, which are the subtraction results, are calculated by the following equation (25).
U i, j = B i, j −G i, j・ ・ ・ (25)
ステップS606では、リミッタ506は、減算器504から出力された色差信号Vに対して、負の信号を0にクリップする。このようにクリップ処理を行うことで、R信号よりG信号が大きい場合、つまり赤色被写体である可能性がない場合には、色差信号Vが0を出力する。 In step S606, the limiter 506 clips the negative signal to 0 with respect to the color difference signal V output from the subtractor 504. By performing the clip processing in this way, when the G signal is larger than the R signal, that is, when there is no possibility that the subject is a red subject, the color difference signal V outputs 0.
ステップS607では、リミッタ507は、減算器505から出力された色差信号Uに対して、負の信号を0にクリップする。このようにクリップ処理を行うことで、B信号よりG信号が大きい場合、つまり青色被写体である可能性がない場合には、色差信号Uが0を出力する。 In step S607, the limiter 507 clips the negative signal to 0 with respect to the color difference signal U output from the subtractor 505. By performing the clip processing in this way, the color difference signal U outputs 0 when the G signal is larger than the B signal, that is, when there is no possibility that the subject is a blue subject.
ステップS608では、加算器508は、リミッタ506から出力された色差信号Vと、リミッタ507から出力された色差信号Uとを加算する。加算器508は、着目画素(j,i)において、リミッタ506から出力される色差信号VがVi,jであり、リミッタ507から出力された色差信号UがUi,jである場合、加算結果である色信号Ci,jは次式(26)により算出する。
Ci,j=Vi,j+Ui,j ・・・(26)
In step S608, the adder 508 adds the color difference signal V output from the limiter 506 and the color difference signal U output from the limiter 507. The adder 508 adds when the color difference signal V output from the limiter 506 is V i, j and the color difference signal U output from the limiter 507 is U i, j in the pixel of interest (j, i). The resulting color signals C i and j are calculated by the following equation (26).
C i, j = V i, j + U i, j ... (26)
ステップS609では、係数算出回路509は、加算器508から出力される色信号Cに基づいて、赤色、青色、若しくはマゼンタ色である程度を示す色信号強度αを算出する。 In step S609, the coefficient calculation circuit 509 calculates the color signal intensity α indicating a certain degree in red, blue, or magenta color based on the color signal C output from the adder 508.
図7は、係数算出回路509が、加算器508から出力される色信号Cから、色信号強度αを算出する際の変換テーブルの一例を示す図である。図7において、横軸は色信号Cを示し、縦軸は色信号強度αを示す。係数算出回路509は、算出結果である色信号Cが予め設定された第1の閾値Th1以下である場合には、被写体が赤色、青色、若しくはマゼンタ色ではないとみなせるので、色信号強度αとして0.0を出力する。また、係数算出回路509は、算出結果である色信号Cが第2の閾値Th2以上である場合には、被写体が赤色、青色、若しくはマゼンタ色であるとみなせるので、色信号強度αとして1.0を出力する。ここで、第2の閾値Th2は、第1の閾値Th1より大きい。係数算出回路509は、算出結果である色信号Cが第1の閾値Th1より大きく、かつ色信号Cが第2の閾値Th2未満である場合には、色信号Cの大きさに応じて線形的に0.0〜1.0の間の色信号強度αを算出する。 FIG. 7 is a diagram showing an example of a conversion table when the coefficient calculation circuit 509 calculates the color signal intensity α from the color signal C output from the adder 508. In FIG. 7, the horizontal axis represents the color signal C, and the vertical axis represents the color signal intensity α. When the color signal C, which is the calculation result, is equal to or less than the preset first threshold value Th1, the coefficient calculation circuit 509 can consider that the subject is not red, blue, or magenta, and thus sets the color signal intensity α. Output 0.0. Further, the coefficient calculation circuit 509 can consider that the subject is red, blue, or magenta when the color signal C as the calculation result is equal to or higher than the second threshold value Th2. Therefore, the color signal intensity α is 1. Output 0. Here, the second threshold value Th2 is larger than the first threshold value Th1. When the color signal C as the calculation result is larger than the first threshold value Th1 and the color signal C is less than the second threshold value Th2, the coefficient calculation circuit 509 is linear according to the magnitude of the color signal C. The color signal intensity α between 0.0 and 1.0 is calculated.
本実施形態では、赤色や青色のような被写体に発生する偽パターンを低減するために、赤、青被写体検出回路309を設けている。赤、青被写体検出回路309は、色信号Cを算出して色信号強度αを算出し、フィルタ回路310〜313でフィルタ処理を行っていない色差信号の割合を調整する。
In the present embodiment, a red / blue
赤色、青色、若しくはマゼンタ色の被写体である場合(色信号Cが第2の閾値以上の場合)には、色信号強度αは1.0となり、フィルタ回路310〜313はフィルタ処理を行わない(フィルタ処理の特性を変更する)。このように、被写体が赤色、青色、若しくはマゼンタ色あり、着目画素がR画素又はB画素の場合、フィルタ回路310〜313から出力される色差信号は式(2)〜式(7)から、着目画素の左右又は上下のG画素と着目画素との差分となる。そして、加算回路319で着目画素に加算されると、結果的に左右又は上下のG信号から算出した値となる。その結果、R信号及びB信号を用いずにG信号を生成できるため、G信号に対して、R、B信号のサンプリングが少ないことに起因したR、B信号の折り返しがG信号にも生じることを防止することができる。
When the subject is red, blue, or magenta (when the color signal C is equal to or higher than the second threshold value), the color signal intensity α is 1.0, and the
一方、被写体が赤色でも青色でもマゼンタ色でもない場合には、色信号強度αは0.0となり、フィルタ回路310〜313はフィルタ処理を行う。このように、被写体が赤色でも青色でもマゼンタ色でもない場合には、フィルタ処理を行うことで、G信号だけでなく、R、B信号も用いてG信号を生成でき、方向に因らず解像感の高い画像を生成することができる。さらに、色信号強度αが0.0〜1.0の場合には、その強度に応じてフィルタ処理を行わない色差信号の強度を変化させることで、赤色や青色のような被写体に発生する偽パターンを低減し、画質を向上させることができる。
On the other hand, when the subject is neither red nor blue nor magenta, the color signal intensity α is 0.0, and the
以上のように本実施形態によれば、ベイヤ配列の画像信号からG信号及び輝度信号を生成する際に、赤色や青色のような被写体に発生する偽パターンを低減した上で、方向に因らず解像感の高い画像を得ることができる。 As described above, according to the present embodiment, when the G signal and the luminance signal are generated from the image signal of the bayer array, the false patterns generated in the subject such as red and blue are reduced, and then the direction is used. It is possible to obtain an image with a high resolution.
(第2の実施形態)
以下、本発明の第2の実施形態について説明する。本実施形態に係る輝度信号生成部200の構成は図2と同様である。なお、本実施形態では、第1の実施形態と異なる部分についてのみ説明する。
(Second embodiment)
Hereinafter, a second embodiment of the present invention will be described. The configuration of the luminance
図8は、本発明の第2の実施形態によるG補間回路202の構成例を示すブロック図である。G補間回路202は、第1のG補間回路801と、第2のG補間回路802と、赤、青被写体検出回路803と、合成回路804とを有する。第1のG補間回路801は第1の補間手段であり、画像信号に対して色差信号を用いないでG信号を補間し、第1のG信号を出力する。第2のG補間回路802は第2の補間手段であり、画像信号に対して色差信号を用いてG信号を補間し、第2のG信号を出力する。合成回路804は合成手段であり、赤、青被写体検出回路803から出力される色信号強度αに基づいて、第1のG補間回路801により補間された第1のG信号と第2のG補間回路802により補間された第2のG信号とを合成する。その詳細は、後述する。なお、赤、青被写体検出回路803は、第1の実施形態の図5の赤、青被写体検出回路309と同様の回路である。
FIG. 8 is a block diagram showing a configuration example of the
図9は、第1のG補間回路801の構成例を示すブロック図である。第1のG補間回路801は、0挿入回路901と、HV補間回路902とを有する。0挿入回路901は、入力された画像信号のうちのR画素とB画素の信号レベルを0にする。次に、HV補間回路902は、0挿入回路901が出力する画像信号に対して、水平方向および垂直方向に補間処理を行うことにより、G信号を算出する。このとき、HV補間回路902は、水平方向および垂直方向の補間処理には、例えば(1,2,1)/2の係数のフィルタを用いる。
FIG. 9 is a block diagram showing a configuration example of the first
図10は、第2のG補間回路802の構成例を示すブロックである。第2のG補間回路802は、G画素V補間回路1001と、G画素H補間回路1002と、R,B画素V補間回路1003と、R,B画素H補間回路1004と、V色差算出回路1005と、H色差算出回路1006とを有する。さらに、第2のG補間回路802は、V色差傾き算出回路1007と、H色差傾き算出回路1008と、Nフィルタ回路1009と、Sフィルタ回路1010と、Wフィルタ回路1011と、Eフィルタ回路1012とを有する。さらに、第2のG補間回路802は、N重み算出回路1013と、S重み算出回路1014と、W重み算出回路1015と、E重み算出回路1016と、合成回路1017と、加算回路1018とを有する。
FIG. 10 is a block showing a configuration example of the second
図11は、第2のG補間回路802の処理の流れを示すフローチャートである。ステップS1101では、G画素V補間回路1001は、入力画像信号に対して、垂直方向に補間処理を行うことにより、G信号を生成する。具体的には、G画素V補間回路1001は、着目画素がG画素の場合には、G画素の信号をそのままG信号として出力し、着目画素がR画素またはB画素の場合には、垂直方向に補間処理を行うことにより、G信号を生成する。例えば、画像における着目画素のX座標およびY座標を(j,i)としたとき、G画素V補間回路1001は、着目画素がR画素の場合、G信号Gvi,jを次式(27)により生成する。
Gvi,j=(Gi-1,j+Gi+1,j)/2+(2×Ri,j−Ri-2,j+Ri+2,j)/4
・・・(27)
FIG. 11 is a flowchart showing the processing flow of the second
Gv i, j = (G i-1, j + G i + 1, j ) / 2 + (2 x R i, j −R i-2, j + R i + 2, j ) / 4
... (27)
なお、G画素V補間回路1001は、着目画素がB画素の場合も、上記と同様の方法で、G信号を生成する。
The G pixel
次に、ステップS1102では、G画素H補間回路1002は、入力画像信号に対して、水平方向に補間処理を行うことにより、G信号を生成する。具体的には、G画素H補間回路1002は、着目画素がG画素の場合には、G画素の信号をそのままG信号として出力し、着目画素がR画素またはB画素の場合には、水平方向に補間処理を行うことにより、G信号を生成する。例えば、G画素H補間回路1002は、着目画素がR画素の場合、G信号Ghi,jを次式(28)により生成する。
Ghi,j=(Gi,j-1+Gi,j+1)/2+(2×Ri,j−Ri,j-2+Ri,j+2)/4
・・・(28)
Next, in step S1102, the G pixel
Gh i, j = (G i, j-1 + G i, j + 1 ) / 2 + (2 x R i, j −R i, j-2 + R i, j + 2 ) / 4
... (28)
なお、G画素H補間回路1002は、着目画素がB画素の場合も、上記と同様の方法で、G信号を生成する。
The G pixel
次に、ステップS1103では、R,B画素V補間回路1003は、入力画像信号に対して、垂直方向に補間処理を行うことにより、R信号またはB信号を生成する。具体的には、R,B画素V補間回路1003は、着目画素がR画素またはB画素の場合には、R画素またはB画素の信号をそのままR信号またはB信号として出力する。R,B画素V補間回路1003は、着目画素がG画素の場合に、着目画素の垂直方向がR画素の場合には、垂直方向に補間処理を行うことでR信号を生成し、同様に、着目画素の垂直方向がB画素の場合には、垂直方向に補間処理を行うことでB信号を生成する。例えば、着目画素がG画素で、着目画素の垂直方向がR画素の場合、R,B画素V補間回路1003は、R信号Rvi,jを次式(29)により生成する。
Rvi,j=(Ri-1,j+Ri+1,j)/2+(2×Gi,j−Gi-2,j+Gi+2,j)/4
・・・(29)
Next, in step S1103, the R and B pixel
Rv i, j = (R i-1, j + R i + 1, j ) / 2 + (2 x G i, j − G i-2, j + G i + 2, j ) / 4
... (29)
なお、R,B画素V補間回路1003は、着目画素の垂直方向がB画素の場合、上記と同様の方法で、B信号を生成する。
The R and B pixel
次に、ステップS1104では、R,B画素H補間回路1004は、入力画像信号に対して、水平方向に補間処理を行うことにより、R信号またはB信号を生成する。具体的には、R,B画素H補間回路1004は、着目画素がR画素またはB画素の場合には、R画素またはB画素の信号をそのままR信号またはB信号として出力する。R,B画素H補間回路1004は、着目画素がG画素の場合に、着目画素の水平方向がR画素の場合には、水平方向に補間処理を行うことでR信号を生成し、同様に、着目画素の水平方向がB画素の場合には、水平方向に補間処理を行うことでB信号を生成する。例えば、着目画素がG画素で、着目画素の水平方向がR画素の場合、R,B画素H補間回路1004は、R信号Rhi,jを次式(30)により生成する。
Rhi,j=(Ri,j-1+Ri,j+1)/2+(2×Gi,j−Gi,j-2+Gi,j+2)/4
・・・(30)
Next, in step S1104, the R and B pixel
Rh i, j = (R i, j-1 + R i, j + 1 ) / 2 + (2 x G i, j − G i, j-2 + G i, j + 2 ) / 4
... (30)
なお、R,B画素H補間回路1004は、着目画素の水平方向がB画素の場合、上記と同様の方法で、B信号を生成する。また、ステップS1101〜S1104の補間方法として、式(27)〜(30)を用いたが、これに限定されず、例えば第1の実施形態のように式(2)〜(5)を用いて同色画素を各方向に線形補間してもよい。
The R and B pixel
次に、ステップS1105では、V色差算出回路1005は、G画素V補間回路1001が出力したG信号から、R,B画素V補間回路1003が出力したR信号またはB信号を減算し、垂直方向の色差信号を生成する。例えば、V色差算出回路1005は、図3のV色差算出回路305と同様に垂直方向の色差信号Diff_vを式(6)により算出する。
Next, in step S1105, the V color
次に、ステップS1106では、H色差算出回路1006は、G画素H補間回路1002が出力したG信号から、R,B画素H補間回路1004が出力したR信号またはB信号を減算し、水平方向の色差信号を生成する。例えば、H色差算出回路1006は、図3のH色差算出回路306と同様に水平方向の色差信号Diff_hを式(7)により算出する。
Next, in step S1106, the H color
次に、ステップS1107では、V色差傾き算出回路1007は、V色差算出回路1005から出力された色差信号を基に、垂直方向の色差の傾きを算出する。具体的には、V色差傾き算出回路1007は、図3のV色差傾き算出回路307と同様に、垂直方向の色差の傾き信号Grad_vを式(8)により算出する。
Next, in step S1107, the V color difference
なお、傾き信号Grad_vを算出する式は、式(8)に限定されない。V色差傾き算出回路1107は、例えば、着目画素と上下の隣接画素のそれぞれの差分に基づいて、傾き信号Grad_vを算出しても良い。V色差傾き算出回路1007は、算出した垂直方向の色差の傾き信号Grad_vを、N重み算出回路1013、S重み算出回路1014にそれぞれ出力する。
The formula for calculating the slope signal Grad_v is not limited to the formula (8). The V color difference
次に、ステップS1108では、H色差傾き算出回路1008は、H色差算出回路1006から出力された色差信号を基に、水平方向の色差の傾きを算出する。具体的には、H色差傾き算出回路1008は、図3のH色差傾き算出回路308と同様に、水平方向の色差の傾き信号Grad_hを式(9)により算出する。
Next, in step S1108, the H color difference
なお、傾き信号Grad_hを算出する式は、式(9)に限定されない。H色差傾き算出回路1008は、例えば、着目画素と左右の隣接画素のそれぞれの差分に基づいて、傾き信号Grad_hを算出しても良い。H色差傾き算出回路1008は、算出した水平方向の色差の傾き信号Grad_hを、W重み算出回路1015、E重み算出回路1016にそれぞれ出力する。
The formula for calculating the slope signal Grad_h is not limited to the formula (9). The H color difference
次に、ステップS1109では、Nフィルタ回路1009は、V色差算出回路1005から出力された色差信号に対して、上方向のフィルタ処理を行う。具体的には、Nフィルタ回路1009は、V色差算出回路1005から出力された色差信号Diff_vを用いて、着目画素(j,i)における上方向のフィルタ処理の結果Diff_nを次式(31)により算出する。
Next, in step S1109, the
ステップS1110では、Sフィルタ回路1010は、V色差算出回路1005から出力された色差信号に対して、下方向のフィルタ処理を行う。具体的には、Sフィルタ回路1010は、V色差算出回路1005から出力された色差信号Diff_vを用いて、着目画素(j,i)における下方向のフィルタ処理の結果Diff_sを次式(32)により算出する。
In step S1110, the
ステップS1111では、Wフィルタ回路1011は、H色差算出回路1006から出力された色差信号に対して、左方向のフィルタ処理を行う。具体的には、Wフィルタ回路1011は、H色差算出回路1006から出力された色差信号Diff_hを用いて、着目画素(j,i)における左方向のフィルタ処理の結果Diff_wを次式(33)により算出する。
In step S1111, the
ステップS1112では、Eフィルタ回路1012は、H色差算出回路1006から出力された色差信号に対して、右方向のフィルタ処理を行う。具体的には、Eフィルタ回路1012は、H色差算出回路1006から出力された色差信号Diff_hを用いて、着目画素(j,i)における右方向のフィルタ処理の結果Diff_eを次式(34)により算出する。
In step S1112, the
ステップS1113では、N重み算出回路1013は、図3のN重み算出回路314と同様に上方向の重みWnを式(19)により算出する。
In step S1113, the N
ステップS1114では、S重み算出回路1014は、図3のS重み算出回路315と同様に下方向の重みWsを式(20)により算出する。
In step S1114, the S
ステップS1115では、W重み算出回路1015は、図3のW重み算出回路316と同様に左方向の重みWwを式(21)により算出する。
In step S1115, the W
ステップS1116では、E重み算出回路1016は、図3のE重み算出回路317と同様に右方向の重みWeを式(22)により算出する。
In step S1116, the E weight calculation circuit 1016 calculates the weight We in the right direction by the equation (22) in the same manner as the E
ステップS1117では、合成回路1017は、図3の合成回路318と同様に、重みWn、Ws、WwおよびWeを基に、色差信号Diff_n、Diff_s、Diff_wおよびDiff_eを合成する。そして、合成回路1017は、色差信号Diff_mixを式(23)により算出する。
In step S1117, the
ステップS1118では、加算回路1018は、WB回路201が出力した画像信号に対して、着目画素がR画素またはB画素の場合には合成回路1017で合成された色差信号Diff_mixを加算し、第2のG信号を出力する。加算回路1018の出力信号は、第2のG補間回路802の出力信号である。上記の結果、第2のG補間回路802は、R画素またはB画素の画素位置に対して、方向に因らず解像感の高いG信号を算出することができる。
In step S1118, the
次に、図8の合成回路804の合成処理について説明する。合成回路804は、赤、青被写体検出回路803からの色信号強度αに基づいて、第1のG補間回路801からの第1のG信号と第2のG補間回路802からの第2のG信号とを合成し、最終的なG信号を出力する。合成回路804から出力されるG信号は、G補間回路202の出力信号である。合成回路804は、画像における着目画素のX座標およびY座標を(j,i)としたとき、最終的なG信号G_sigi,jを出力する。具体的には、合成回路804は、着目画素における第1のG信号G1_sigi,j、第2のG信号G2_sigi,j、合成係数αi,jを用いて、最終的なG信号G_sigi,jを次式(35)により算出する。つまり、合成係数αi,jが大きいほど、第1のG信号の補間結果の割合が高くなる。
G_sigi,j=αi,j×G1_sigi,j+(1.0−αi,j)×G2_sigi,j
・・・(35)
Next, the synthesis process of the
G_sig i, j = α i, j × G1_sig i, j + (1.0−α i, j ) × G2_sig i, j
... (35)
合成回路804は、色信号強度αが0.0である場合、つまり、被写体が赤色でも青色でもマゼンタ色でもない場合には、方向に因らず解像感の高い画像を生成できる第2のG信号G2_sigを最終的なG信号G_sigとして出力する。また、合成回路804は、合成係数αが1.0である場合、つまり、被写体が赤色、青色、若しくはマゼンタ色である場合には、G信号のみから生成した第1のG信号G1_sigを最終的なG信号G_sigとして出力する。これにより、G信号に対して、R、B信号のサンプリングが少ないことに起因したR、B信号の折り返しがG信号にも生じることを防止することができる。
When the color signal intensity α is 0.0, that is, when the subject is neither red nor blue nor magenta, the
(その他の実施形態)
本発明は、上述の実施形態の1以上の機能を実現するプログラムを、ネットワーク又は記憶媒体を介してシステム又は装置に供給し、そのシステム又は装置のコンピュータにおける1つ以上のプロセッサーがプログラムを読出し実行する処理でも実現可能である。また、1以上の機能を実現する回路(例えば、ASIC)によっても実現可能である。
(Other embodiments)
The present invention supplies a program that realizes one or more functions of the above-described embodiment to a system or device via a network or storage medium, and one or more processors in the computer of the system or device reads and executes the program. It can also be realized by the processing to be performed. It can also be realized by a circuit (for example, ASIC) that realizes one or more functions.
なお、上記実施形態は、何れも本発明を実施するにあたっての具体化の例を示したものに過ぎず、これらによって本発明の技術的範囲が限定的に解釈されてはならないものである。すなわち、本発明はその技術思想、又はその主要な特徴から逸脱することなく、様々な形で実施することができる。 It should be noted that the above embodiments are merely examples of embodiment of the present invention, and the technical scope of the present invention should not be construed in a limited manner by these. That is, the present invention can be implemented in various forms without departing from the technical idea or its main features.
305 V色差算出回路、306 H色差算出回路、309 赤、青被写体検出回路、310 Nフィルタ回路、311 Sフィルタ回路、312 Wフィルタ回路、313 Eフィルタ回路 305 V color difference calculation circuit, 306 H color difference calculation circuit, 309 red, blue subject detection circuit, 310 N filter circuit, 311 S filter circuit, 312 W filter circuit, 313 E filter circuit
Claims (9)
入力画像信号を垂直方向に補間して色差信号を算出する第1の色差信号算出手段と、
前記入力画像信号を水平方向に補間して色差信号を算出する第2の色差信号算出手段と、
前記第1の色差信号算出手段により算出された色差信号に対してフィルタ処理を行う第1のフィルタ処理手段と、
前記第2の色差信号算出手段により算出された色差信号に対してフィルタ処理を行う第2のフィルタ処理手段と、
R信号及びB信号の少なくとも1つの強度を算出する色信号強度算出手段と、
前記第1のフィルタ処理手段によるフィルタ処理の結果と、前記第2のフィルタ処理手段によるフィルタ処理の結果と、前記色信号強度算出手段により算出された前記R信号及びB信号の少なくとも1つの強度とに基づき、前記G信号を算出する色信号算出手段とを有し、
前記第1のフィルタ処理手段と前記第2のフィルタ処理手段は、前記色信号強度算出手段によって算出された前記R信号及びB信号の少なくとも1つの強度が予め設定した閾値以上である場合には、フィルタ処理を行わないようにすることを特徴とする画像処理装置。 An image processing device that calculates a G signal for an input image signal that has RGB signals based on the Bayer arrangement in the horizontal and vertical directions.
The first color difference signal calculation means for calculating the color difference signal by vertically interpolating the input image signal, and
A second color difference signal calculating means for calculating the color difference signal by interpolating the input image signal in the horizontal direction,
A first filter processing means that performs a filter process on the color difference signal calculated by the first color difference signal calculation means, and a first filter processing means.
A second filter processing means that performs a filter process on the color difference signal calculated by the second color difference signal calculation means, and a second filter processing means.
And a color signal intensity calculating means for calculating at least one of the intensity of the R and B signals,
The result of the filter processing by the first filter processing means, the result of the filter processing by the second filter processing means, and at least one intensity of the R signal and the B signal calculated by the color signal intensity calculation means. It has a color signal calculation means for calculating the G signal based on the above .
When the first filter processing means and the second filter processing means have at least one intensity of the R signal and the B signal calculated by the color signal intensity calculation means equal to or higher than a preset threshold value, the first filter processing means and the second filter processing means have a preset threshold value or more. An image processing device characterized in that filtering processing is not performed.
入力画像信号を垂直方向に補間して色差信号を算出する第1の色差信号算出手段と、
前記入力画像信号を水平方向に補間して色差信号を算出する第2の色差信号算出手段と、
前記第1の色差信号算出手段により算出された色差信号に対してフィルタ処理を行う第1のフィルタ処理手段と、
前記第2の色差信号算出手段により算出された色差信号に対してフィルタ処理を行う第2のフィルタ処理手段と、
R信号及びB信号の少なくとも1つの強度を算出する色信号強度算出手段と、
前記第1のフィルタ処理手段によるフィルタ処理の結果と、前記第2のフィルタ処理手段によるフィルタ処理の結果と、前記色信号強度算出手段により算出された前記R信号及びB信号の少なくとも1つの強度とに基づき、前記G信号を算出する色信号算出手段とを有し、
前記第1のフィルタ処理手段と前記第2のフィルタ処理手段は、前記色信号強度算出手段によって算出された前記R信号及びB信号の少なくとも1つの強度が予め設定した閾値より小さい場合には、前記R信号及びB信号の少なくとも1つの強度に応じたフィルタ処理を行うことを特徴とする画像処理装置。 An image processing device that calculates a G signal for an input image signal that has RGB signals based on the Bayer arrangement in the horizontal and vertical directions.
The first color difference signal calculation means for calculating the color difference signal by vertically interpolating the input image signal, and
A second color difference signal calculating means for calculating the color difference signal by interpolating the input image signal in the horizontal direction,
A first filter processing means that performs a filter process on the color difference signal calculated by the first color difference signal calculation means, and a first filter processing means.
A second filter processing means that performs a filter process on the color difference signal calculated by the second color difference signal calculation means, and a second filter processing means.
And a color signal intensity calculating means for calculating at least one of the intensity of the R and B signals,
The result of the filter processing by the first filter processing means, the result of the filter processing by the second filter processing means, and at least one intensity of the R signal and the B signal calculated by the color signal intensity calculation means. It has a color signal calculation means for calculating the G signal based on the above .
When at least one intensity of the R signal and the B signal calculated by the color signal intensity calculation means is smaller than a preset threshold value, the first filter processing means and the second filter processing means are described. An image processing apparatus characterized by performing filter processing according to at least one intensity of an R signal and a B signal.
前記入力画像信号に対して色差信号を用いないで前記G信号を補間する第1の補間手段と、
前記入力画像信号に対して色差信号を用いて前記G信号を補間する第2の補間手段と、
R信号及びB信号の少なくとも1つの強度を算出する色信号強度算出手段と、
前記色信号強度算出手段の算出結果に基づいて、前記第1の補間手段により補間されたG信号と前記第2の補間手段により補間されたG信号とを合成する合成手段と、
前記合成手段による合成結果に基づき、最終的な前記G信号を算出する色信号算出手段とを有し、
前記合成手段は、前記色信号強度算出手段によって算出された前記R信号及びB信号の少なくとも1つの強度が高いほど、前記第1の補間手段の補間結果の割合が高くなるように合成処理を行うことを特徴とする画像処理装置。 An image processing device that calculates a G signal by performing interpolation processing on an input image signal that has RGB signals based on the Bayer arrangement in the horizontal and vertical directions.
A first interpolation means for interpolating the G signal without using a color difference signal with respect to the input image signal,
A second interpolation means for interpolating the G signal using the color difference signal with respect to the input image signal,
A color signal intensity calculating means for calculating at least one intensity of an R signal and a B signal, and
Based on the calculation result of the color signal intensity calculating means, and combining means for combining the G signal interpolated by said first G signal interpolated by interpolation means second interpolation means,
Based on the synthesis result by said synthesizing means, have a color signal calculating means for calculating a final the G signal,
The compositing means performs a compositing process so that the higher the intensity of at least one of the R signal and the B signal calculated by the color signal intensity calculating means, the higher the proportion of the interpolation result of the first interpolating means. An image processing device characterized by this.
入力画像信号を垂直方向に補間して色差信号を算出する第1の色差信号算出手段と、
前記入力画像信号を水平方向に補間して色差信号を算出する第2の色差信号算出手段と、
前記第1の色差信号算出手段により算出された色差信号に対してフィルタ処理を行う第1のフィルタ処理手段と、
前記第2の色差信号算出手段により算出された色差信号に対してフィルタ処理を行う第2のフィルタ処理手段とを有し、
前記第1のフィルタ処理手段および前記第2のフィルタ処理手段によって処理された信号に基づいて前記G信号を補間することを特徴とする請求項3に記載の画像処理装置。 The second interpolation means is
The first color difference signal calculation means for calculating the color difference signal by vertically interpolating the input image signal, and
A second color difference signal calculating means for calculating the color difference signal by interpolating the input image signal in the horizontal direction,
A first filter processing means that performs a filter process on the color difference signal calculated by the first color difference signal calculation means, and a first filter processing means.
It has a second filter processing means for filtering the color difference signal calculated by the second color difference signal calculation means.
The image processing apparatus according to claim 3 , wherein the G signal is interpolated based on the signals processed by the first filter processing means and the second filter processing means.
前記第2のフィルタ処理手段は、前記第2の色差信号算出手段により算出された色差信号に対して左方向および右方向のフィルタ処理を行うことを特徴とする請求項1又は2に記載の画像処理装置。 The first filter processing means performs upward and downward filter processing on the color difference signal calculated by the first color difference signal calculation means.
The image according to claim 1 or 2 , wherein the second filter processing means performs left-right and right-direction filtering on the color difference signal calculated by the second color difference signal calculation means. Processing device.
入力画像信号を垂直方向に補間して色差信号を算出する第1の色差信号算出ステップと、
前記入力画像信号を水平方向に補間して色差信号を算出する第2の色差信号算出ステップと、
前記第1の色差信号算出ステップにより算出された色差信号に対してフィルタ処理を行う第1のフィルタ処理ステップと、
前記第2の色差信号算出ステップにより算出された色差信号に対してフィルタ処理を行う第2のフィルタ処理ステップと、
R信号及びB信号の少なくとも1つの強度を算出する色信号強度算出ステップと、
前記第1のフィルタ処理ステップによるフィルタ処理の結果と、前記第2のフィルタ処理ステップによるフィルタ処理の結果と、前記色信号強度算出ステップにより算出された前記R信号及びB信号の少なくとも1つの強度とに基づき、前記G信号を算出する色信号算出ステップとを有し、
前記第1のフィルタ処理ステップと前記第2のフィルタ処理ステップでは、前記色信号強度算出ステップによって算出された前記R信号及びB信号の少なくとも1つの強度が予め設定した閾値以上である場合には、フィルタ処理を行わないようにすることを特徴とする画像処理方法。 It is an image processing method that calculates a G signal for an input image signal that has RGB signals based on the Bayer arrangement in the horizontal and vertical directions.
The first color difference signal calculation step of vertically interpolating the input image signal to calculate the color difference signal, and
A second color difference signal calculation step of interpolating the input image signal in the horizontal direction to calculate the color difference signal, and
A first filter processing step for filtering the color difference signal calculated by the first color difference signal calculation step, and a first filter processing step.
A second filter processing step that filters the color difference signal calculated by the second color difference signal calculation step, and a second filter processing step.
And a color signal strength calculation step of calculating at least one of the intensity of the R and B signals,
The result of the filter processing by the first filter processing step, the result of the filter processing by the second filter processing step, and at least one intensity of the R signal and the B signal calculated by the color signal intensity calculation step. It has a color signal calculation step for calculating the G signal based on the above .
In the first filter processing step and the second filter processing step, when at least one intensity of the R signal and the B signal calculated by the color signal intensity calculation step is equal to or higher than a preset threshold value, An image processing method characterized by not performing filter processing.
入力画像信号を垂直方向に補間して色差信号を算出する第1の色差信号算出ステップと、
前記入力画像信号を水平方向に補間して色差信号を算出する第2の色差信号算出ステップと、
前記第1の色差信号算出ステップにより算出された色差信号に対してフィルタ処理を行う第1のフィルタ処理ステップと、
前記第2の色差信号算出ステップにより算出された色差信号に対してフィルタ処理を行う第2のフィルタ処理ステップと、
R信号及びB信号の少なくとも1つの強度を算出する色信号強度算出ステップと、
前記第1のフィルタ処理ステップによるフィルタ処理の結果と、前記第2のフィルタ処理ステップによるフィルタ処理の結果と、前記色信号強度算出ステップにより算出された前記R信号及びB信号の少なくとも1つの強度とに基づき、前記G信号を算出する色信号算出ステップとを有し、
前記第1のフィルタ処理ステップと前記第2のフィルタ処理ステップでは、前記色信号強度算出ステップによって算出された前記R信号及びB信号の少なくとも1つの強度が予め設定した閾値より小さい場合には、前記R信号及びB信号の少なくとも1つの強度に応じたフィルタ処理を行うことを特徴とする画像処理方法。 It is an image processing method that calculates a G signal for an input image signal that has RGB signals based on the Bayer arrangement in the horizontal and vertical directions.
The first color difference signal calculation step of vertically interpolating the input image signal to calculate the color difference signal, and
A second color difference signal calculation step of interpolating the input image signal in the horizontal direction to calculate the color difference signal, and
A first filter processing step that filters the color difference signal calculated by the first color difference signal calculation step, and a first filter processing step.
A second filter processing step that filters the color difference signal calculated by the second color difference signal calculation step, and a second filter processing step.
And a color signal strength calculation step of calculating at least one of the intensity of the R and B signals,
The result of the filter processing by the first filter processing step, the result of the filter processing by the second filter processing step, and at least one intensity of the R signal and the B signal calculated by the color signal intensity calculation step. It has a color signal calculation step for calculating the G signal based on the above .
In the first filter processing step and the second filter processing step, when at least one intensity of the R signal and the B signal calculated by the color signal intensity calculation step is smaller than a preset threshold value, the said. An image processing method comprising performing filter processing according to at least one intensity of an R signal and a B signal.
前記入力画像信号に対して色差信号を用いないで前記G信号を補間する第1の補間ステップと、
前記入力画像信号に対して色差信号を用いて前記G信号を補間する第2の補間ステップと、
R信号及びB信号の少なくとも1つの強度を算出する色信号強度算出ステップと、
前記色信号強度算出ステップの算出結果に基づいて、前記第1の補間ステップにおいて補間されたG信号と前記第2の補間ステップにおいて補間されたG信号とを合成する合成ステップと、
前記合成ステップによる合成結果に基づき、最終的な前記G信号を算出する色信号算出ステップとを有し、
前記合成ステップは、前記色信号強度算出ステップによって算出された前記R信号及びB信号の少なくとも1つの強度が高いほど、前記第1の補間ステップの補間結果の割合が高くなるように合成処理を行うことを特徴とする画像処理方法。 An image processing method for calculating a G signal by performing interpolation processing on an input image signal having an RGB signal based on a Bayer arrangement in the horizontal and vertical directions.
A first interpolation step of interpolating the G signal without using a color difference signal with respect to the input image signal,
A second interpolation step of interpolating the G signal using the color difference signal with respect to the input image signal, and
A color signal intensity calculation step for calculating at least one intensity of the R signal and the B signal, and
A synthesis step of synthesizing the G signal interpolated in the first interpolation step and the G signal interpolated in the second interpolation step based on the calculation result of the color signal intensity calculation step .
Based on said synthesis results by the synthetic steps, have a color signal calculating step of calculating the final the G signal,
In the synthesis step, the synthesis process is performed so that the higher the intensity of at least one of the R signal and the B signal calculated by the color signal intensity calculation step, the higher the ratio of the interpolation result of the first interpolation step. An image processing method characterized by that.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2017225837A JP6987622B2 (en) | 2017-11-24 | 2017-11-24 | Image processing equipment, image processing methods and programs |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2017225837A JP6987622B2 (en) | 2017-11-24 | 2017-11-24 | Image processing equipment, image processing methods and programs |
Publications (3)
Publication Number | Publication Date |
---|---|
JP2019097062A JP2019097062A (en) | 2019-06-20 |
JP2019097062A5 JP2019097062A5 (en) | 2021-01-07 |
JP6987622B2 true JP6987622B2 (en) | 2022-01-05 |
Family
ID=66973241
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2017225837A Active JP6987622B2 (en) | 2017-11-24 | 2017-11-24 | Image processing equipment, image processing methods and programs |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP6987622B2 (en) |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP4626007B2 (en) * | 1999-06-14 | 2011-02-02 | 株式会社ニコン | Image processing method, machine-readable recording medium storing image processing program, and image processing apparatus |
JP5129685B2 (en) * | 2008-08-06 | 2013-01-30 | キヤノン株式会社 | Luminance signal generation apparatus, luminance signal generation method, and imaging apparatus |
JP5766274B2 (en) * | 2013-12-27 | 2015-08-19 | キヤノン株式会社 | Image processing apparatus and image processing method |
-
2017
- 2017-11-24 JP JP2017225837A patent/JP6987622B2/en active Active
Also Published As
Publication number | Publication date |
---|---|
JP2019097062A (en) | 2019-06-20 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP5677040B2 (en) | Image processing apparatus and control method thereof | |
KR100755601B1 (en) | Pixel signal processor and pixel signal processing method | |
JP5984493B2 (en) | Image processing apparatus, image processing method, imaging apparatus, and program | |
JP5128207B2 (en) | Image processing apparatus, image processing method, and image processing program | |
KR101391161B1 (en) | Image processing device | |
JP5593683B2 (en) | Imaging device | |
JP2015192199A (en) | Image processor and image processing method | |
CN107623844B (en) | Determination of color values of pixels at intermediate positions | |
JP2009100417A (en) | Image processing device and method, and image processing program | |
TWI338511B (en) | ||
WO2019008693A1 (en) | Image processing device, imaging device, image processing method, image processing program and storage medium | |
JP6415093B2 (en) | Image processing apparatus, image processing method, and program | |
JP6987622B2 (en) | Image processing equipment, image processing methods and programs | |
JP5291788B2 (en) | Imaging device | |
JP2009047734A (en) | Imaging apparatus and image processing program | |
JP2009100150A (en) | Device, method, and program for image processing | |
JP6987621B2 (en) | Image processing equipment, image processing methods and programs | |
JP6794204B2 (en) | Image processing equipment, image processing methods and programs | |
JP7183015B2 (en) | Image processing device, image processing method, and program | |
JP6862272B2 (en) | Signal processing equipment, signal processing methods and programs | |
JP2020057242A (en) | Image processing system, image processing method, and program | |
JP5454820B2 (en) | Image processing apparatus, image processing method, and image processing program | |
JP4334484B2 (en) | Pixel signal processing apparatus and method | |
JP6497822B2 (en) | Imaging device | |
JP2015179951A (en) | Image processing apparatus, imaging apparatus, image processing method, program and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20201120 |
|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20201120 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20210810 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20210817 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20211015 |
|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20211102 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20211201 |
|
R151 | Written notification of patent or utility model registration |
Ref document number: 6987622 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R151 |