JP2018056653A - Image processing device, image processing method and program - Google Patents
Image processing device, image processing method and program Download PDFInfo
- Publication number
- JP2018056653A JP2018056653A JP2016187385A JP2016187385A JP2018056653A JP 2018056653 A JP2018056653 A JP 2018056653A JP 2016187385 A JP2016187385 A JP 2016187385A JP 2016187385 A JP2016187385 A JP 2016187385A JP 2018056653 A JP2018056653 A JP 2018056653A
- Authority
- JP
- Japan
- Prior art keywords
- color difference
- signal
- filter processing
- difference signal
- filter
- 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
Links
- 238000003672 processing method Methods 0.000 title description 4
- 238000000034 method Methods 0.000 claims description 40
- 230000007274 generation of a signal involved in cell-cell signaling Effects 0.000 claims description 8
- 230000015572 biosynthetic process Effects 0.000 claims description 7
- 238000003786 synthesis reaction Methods 0.000 claims description 7
- 238000001914 filtration Methods 0.000 description 8
- 238000010586 diagram Methods 0.000 description 6
- 238000003384 imaging method Methods 0.000 description 5
- 238000006243 chemical reaction Methods 0.000 description 3
- 230000002194 synthesizing effect Effects 0.000 description 2
- 239000003086 colorant Substances 0.000 description 1
- 239000011159 matrix material Substances 0.000 description 1
Images
Landscapes
- Image Processing (AREA)
- Color Television Image Signal Generators (AREA)
- Facsimile Image Signal Circuits (AREA)
- Color Image Communication Systems (AREA)
Abstract
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 interpolating a G signal that is a main component of a luminance signal, a correlation in the vertical direction or the horizontal direction is determined, 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 horizontal direction when there is a correlation in the horizontal direction is disclosed. If there is no correlation in either the vertical direction or the horizontal direction, two-dimensional LPF processing is performed so that the vertical and horizontal edges are not blurred.
しかし、特許文献1の技術では、縦又は横方向の相関がない場合には2次元のLPF処理となるため、例えば斜め方向のエッジは、縦方向、横方向のエッジに比べてぼやけてしまう。 However, in the technique of Patent Document 1, since there is a two-dimensional LPF process when there is no correlation in the vertical or horizontal direction, for example, an edge in an oblique direction is blurred compared to an edge in the vertical direction or the horizontal direction.
そこで、非特許文献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, color difference signals between G pixels and pixels of the same color as the target pixel are calculated in the upper, lower, left, and right directions including the target pixel, and a color difference signal obtained by synthesizing the color difference signals in each direction is obtained. The G signal is calculated by adding to the pixel of interest. At this time, in Non-Patent Document 1, an image with high resolution is generated regardless of the direction by synthesizing the color difference signals in each direction according to the inclination of the color difference signal in the corresponding direction.
しかし、非特許文献1では、上、下、左、右方向の色差信号を算出する際に、色差信号に対して各方向にフィルタ処理を行うため、縦方向、横方向に相関のない斜めの縞状の被写体にブロック状の偽のパターンが生じる場合がある。 However, in Non-Patent Document 1, when calculating the color difference signals in the upper, lower, left, and right directions, the color difference signals are filtered in each direction. A block-like false pattern may occur in a striped subject.
本発明の目的は、フィルタ処理の際に、斜めの縞状の被写体に対するブロック状の偽のパターンを低減することができる画像処理装置、画像処理方法及びプログラムを提供することである。 An object of the present invention is to provide an image processing apparatus, an image processing method, and a program capable of reducing a block-like false pattern with respect to an oblique striped subject during filtering.
本発明の画像処理装置は、入力画像の垂直方向の色差信号を算出する第1の色差信号算出手段と、前記入力画像の水平方向の色差信号を算出する第2の色差信号算出手段と、前記垂直方向の色差信号に対してフィルタ処理を行う第1のフィルタ処理手段と、前記水平方向の色差信号に対してフィルタ処理を行う第2のフィルタ処理手段とを有し、前記第1のフィルタ処理手段と前記第2のフィルタ処理手段は、前記垂直方向の色差信号と前記水平方向の色差信号に基づいて、フィルタ処理の強度を変化させる。 The image processing apparatus of the present invention includes a first color difference signal calculation unit that calculates a color difference signal in the vertical direction of an input image, a second color difference signal calculation unit that calculates a color difference signal in the horizontal direction of the input image, A first filter processing unit that performs a filtering process on the color difference signal in the vertical direction; and a second filter processing unit that performs a filtering process on the color difference signal in the horizontal direction. The means and the second filter processing means change the intensity of the filter processing based on the color difference signal in the vertical direction and the color difference signal in the horizontal direction.
本発明によれば、フィルタ処理の際に、斜めの縞状の被写体に対するブロック状の偽のパターンを低減することができる。 According to the present invention, it is possible to reduce a block-like false pattern with respect to an oblique striped subject during the filtering process.
図1は、本発明の実施形態によるベイヤ配列の色フィルタを有する撮像素子を示す図である。撮像装置は、CMOSイメージセンサ等の撮像素子を有する。撮像装置は、デジタルカメラ、ビデオカメラの他、スマートフォン、タブレット、工業用カメラ、医療用カメラ等に適用可能である。撮像素子は、2次元行列状に配置された複数の画素を有し、複数の画素の各々は、色フィルタ(例えば、赤(R)、緑(G)、青(B)の3色のうちの一つの色フィルタ)を有する。図1は、原色ベイヤ配列の1単位の色フィルタを示す。撮像素子は、画素毎に、光電変換を行い、アナログデジタル変換を行い、デジタルのR信号(赤信号)、G1信号(緑信号)、G2信号(緑信号)、又はB信号(青信号)を出力する。G1信号及びG2信号は、G信号(緑信号)である。ベイヤ配列の色フィルタを有する撮像装置は、各画素においてR、G、Bのうちの一つの色信号しか得られないため、各画素においてRGBすべての色信号を求める場合には、後段の図2の輝度信号生成部200で補間処理を行う必要がある。
FIG. 1 is a diagram illustrating an imaging device having a Bayer array color filter according to an embodiment of the present invention. The imaging device has an imaging element such as a CMOS image sensor. The imaging device can be applied to a smartphone, a tablet, an industrial camera, a medical camera, and the like in addition to a digital camera and a video camera. The imaging element has a plurality of pixels arranged in a two-dimensional matrix, and each of the plurality of pixels is a color filter (for example, among three colors of red (R), green (G), and blue (B)). One color filter). FIG. 1 shows one unit of color filter in a primary color Bayer array. The image sensor performs photoelectric conversion and analog-digital conversion for each pixel, and outputs a digital R signal (red signal), G1 signal (green signal), G2 signal (green signal), or B signal (blue signal). To do. The G1 signal and the G2 signal are G signals (green signals). Since an image pickup apparatus having a Bayer array color filter can obtain only one color signal of R, G, and B in each pixel, when obtaining all RGB color signals in each pixel, FIG. It is necessary to perform an interpolation process in the luminance
図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 illustrating 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からの入力画像及びG補間回路202からのG信号を基に、図1の入力画像のG画素及びB画素の位置のR信号を補間により算出し、全画素のR信号を出力する。例えば、R補間回路203は、着目画素を含む上、下、左、右方向に、R画素と、着目画素と同色の画素との色差信号をそれぞれ算出し、各方向の色差信号を合成した色差信号を着目画素に加算することでR信号を算出する。なお、R補間回路203は、2次元のLPF(ローパスフィルタ)処理によりR信号を算出してもよい。
The
B補間回路204は、青補間手段であり、WB回路201からの入力画像及びG補間回路202からのG信号を基に、図1の入力画像のR画素及びG画素の位置のB信号を補間により算出し、全画素のB信号を出力する。例えば、B補間回路204は、着目画素を含む上、下、左、右方向に、B画素と、着目画素と同色の画素との色差信号をそれぞれ算出し、各方向の色差信号を合成した色差信号を着目画素に加算することでB信号を算出する。なお、B補間回路204は、2次元のLPF処理によりB信号を算出してもよい。
The
APC回路205は、G補間回路202から出力されるG信号のアパーチャ補正信号を生成する。加算回路207は、G補間回路202が出力するG信号とAPC回路204の出力信号とを加算し、全画素の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と、HV相関値算出回路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 illustrating 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×Ri,j−Ri-2,j+Ri+2,j)/4 ・・・(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 × R i, j −R i−2, j + R i + 2, j ) / 4 (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
+(2×Ri,j−Ri,j-2+Ri,j+2)/4 ・・・(3)
Next, in step S402, the G pixel
Gh i, j = (G i, j-1 + G i, j + 1 ) / 2
+ (2 × R i, j −R i, j−2 + R i, j + 2 ) / 4 (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
+(2×Gi,j−Gi-2,j+Gi+2,j)/4 ・・・(4)
Next, in step S403, the R and B pixel
Rv i, j = (R i−1, j + R i + 1, j ) / 2
+ (2 × G i, j −G i−2, j + G i + 2, j ) / 4 (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
+(2×Gi,j−Gi,j-2+Gi,j+2)/4 ・・・(5)
In step S404, the R and B pixel
Rh i, j = (R i, j-1 + R i, j + 1 ) / 2
+ (2 × G i, j −G i, j−2 + G i, j + 2 ) / 4 (5)
なお、ステップS401〜S404において、G画素とR,B画素の垂直及び水平方向の補間方法として、式(2)〜(5)を用いたが、これに限定されず、例えば同色画素を各方向に線形補間して算出してもよい。 In steps S401 to S404, the equations (2) to (5) are used as the vertical and horizontal interpolation methods for the G pixel and the R and B pixels. However, the present invention is not limited to this. May be calculated by linear interpolation.
G画素V補間回路301とR,B画素V補間回路303は、第1の補間手段であり、入力画像に対して垂直方向の補間処理により全画素のR信号、G信号及びB信号を出力する。G画素H補間回路302とR,B画素H補間回路304は、第2の補間手段であり、入力画像に対して水平方向の補間処理により全画素のR信号、G信号及びB信号を出力する。
The G pixel
次に、ステップ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信号Rvi,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 difference calculation circuit 306 subtracts the R signal or B signal output from the R and B pixel
Diff_h i, j = Gh i, j -Rh i, j ··· (7)
次に、ステップS407では、V色差傾き算出回路307は、V色差算出回路305から出力された色差信号を基に、垂直方向の色差の傾きを算出する。V色差傾き算出回路307は、第1の傾き算出手段である。具体的には、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は、第2の傾き算出手段である。具体的には、H色差傾き算出回路308は、着目画素(j,i)において、H色差算出回路306から出力された色差信号Diff_hを基に、水平方向の色差の傾き信号Grad_hを次式(9)により算出する。
Grad_hi,j=|Diff_hi,j-1−Diff_hi,j+1| ・・・(9)
In step S <b> 408, the H color difference
Grad_h i, j = | Diff_h i, j−1 −Diff_h i, j + 1 | (9)
次に、ステップS409では、HV相関値算出回路309は、垂直方向の色差の傾き信号Grad_vと水平方向の色差の傾き信号Grad_hを基に、水平方向と垂直方向の相関値Ratio_HVを算出する。HV相関値算出回路309は、相関値算出手段である。具体的には、まず、HV相関値算出回路309は、V色差傾き算出回路307から入力される垂直方向の色差の傾き信号Grad_vと、H色差傾き算出回路308から入力される水平方向の色差の傾き信号Grad_hの差分の絶対値信号を算出する。ここで、着目画素(j,i)における上記の差分の絶対値信号をDiff_Gradとする。HV相関値算出回路309は、垂直方向の色差の傾き信号Grad_vと水平方向の色差の傾き信号Grad_hとの差分の絶対値信号Diff_Gradを次式(10)により算出する。
Diff_Gradi,j=|Grad_vi,j−Grad_hi,j| ・・・(10)
Next, in step S409, the HV correlation
Diff_Grad i, j = | Grad_v i, j −Grad_h i, j | (10)
例えば、水平方向の色エッジが存在する場合には、垂直方向では色差が変化し、水平方向では色差が変化しない。そのため、垂直方向の色差の傾きGrad_vi,jは大きな値となり、水平方向の色差の傾きGrad_hi,jは小さい値となり、結果的に差分の絶対値信号Diff_Gradは大きな値となる。 For example, when there is a color edge in the horizontal direction, the color difference changes in the vertical direction, and the color difference does not change in the horizontal direction. Therefore, the inclination Grad_v i chrominance vertical, j becomes a large value, the slope Grad_h i chrominance horizontal, j becomes a small value, the absolute value signal Diff_Grad results to the difference becomes a large value.
同様に、垂直方向に色エッジが存在する場合は、垂直方向の色差の傾きGrad_vi,jは小さな値となり、水平方向の色差の傾きGrad_hi,jは大きな値となり、結果的に差分の絶対値信号Diff_Gradは大きな値となる。 Similarly, when there is a color edge in the vertical direction, the gradient grad_v i, j of the color difference in the vertical direction becomes a small value, and the gradient grad_h i, j of the color difference in the horizontal direction becomes a large value, resulting in the absolute difference. The value signal Diff_Grad has a large value.
また、斜め方向の色エッジが存在する場合には、垂直方向の色差の変化と、水平方向の色差の変化が同程度となる。そのため、垂直方向の色差の傾きGrad_vi,jと、水平方向の色差の傾きGrad_hi,jも同程度の値となり、結果的に差分の絶対値信号Diff_Gradは小さな値となる。 In addition, when there is an oblique color edge, the change in the color difference in the vertical direction and the change in the color difference in the horizontal direction are approximately the same. Therefore, the inclination Grad_v i, j of the color difference in the vertical direction, the inclination Grad_h i chrominance horizontal, j becomes a comparable value, the absolute value signal Diff_Grad results to the difference is a small value.
色エッジが存在しない場合には、垂直方向の色差も、水平方向の色差も変化しないため、垂直方向の色差の傾きGrad_vi,jと、水平方向の色差の傾きGrad_hi,jが小さい値となり、差分の絶対値信号Diff_Gradも小さな値となる。 When there is no color edge, the vertical color difference and the horizontal color difference do not change, and therefore the vertical color difference gradient Grad_v i, j and the horizontal color difference gradient Grad_h i, j are small values. The difference absolute value signal Diff_Grad also becomes a small value.
次に、HV相関値算出回路309は、差分の絶対値信号をDiff_Gradに基づいて、画素毎にHV相関値Ratio_HVを算出する。
Next, the HV correlation
図5は、HV相関値算出回路309が差分の絶対値信号Diff_GradからHV相関値Ratio_HVを算出する際の変換テーブルの一例を示す図である。図5において、横軸は差分の絶対値信号Diff_Gradを示し、縦軸はHV相関値Ratio_HVを示す。HV相関値算出回路309は、差分の絶対値信号Diff_Gradが第1の閾値Th1より小さい場合には、水平方向及び垂直方向の色エッジが存在しないと見なせるので、HV相関値Ratio_HVとして0.0を出力する。また、HV相関値算出回路309は、差分の絶対値信号Diff_Gradが第2の閾値Th2より大きい場合には、水平方向及び垂直方向の色エッジが存在するとみなせるので、HV相関値Ratio_HVとして1.0を出力する。ここで、第2の閾値Th2は、第1の閾値Th1より大きい。HV相関値算出回路309は、差分の絶対値信号Diff_Gradが第1の閾値Th1以上かつ第2の閾値Th2以下である場合には、差分の絶対値信号Diff_Gradの大きさに応じて線形的に0.0〜1.0の間のHV相関値Ratio_HVを出力する。
FIG. 5 is a diagram illustrating an example of a conversion table when the HV correlation
次に、ステップS410では、Nフィルタ回路310は、V色差算出回路305から出力された色差信号に対して、HV相関値算出回路309から出力されたHV相関値Ratio_HVに基づいて上方向のフィルタ処理を行う。具体的には、まず、Nフィルタ回路310は、V色差算出回路305から出力された色差信号Diff_vを用いて、着目画素(j,i)における上方向のフィルタ処理の結果Fil_nを次式(11)により算出する。
Next, in step S410, the
次に、Nフィルタ回路310は、HV相関値Ratio_HVに基づいて、色差信号Diff_nを次式(12)により算出して出力する。
Diff_ni,j=Ratio_HVi,j×Fil_ni,j
+(1.0−Ratio_HVi,j)×Diff_vi,j ・・・(12)
Next, the
Diff_n i, j = Ratio_HV i, j × Fil_n i, j
+ (1.0-Ratio_HV i, j ) × Diff_v i, j (12)
次に、ステップS411では、Sフィルタ回路311は、V色差算出回路305から出力された色差信号に対して、HV相関値算出回路309から出力されたHV相関値に基づいて下方向のフィルタ処理を行う。具体的には、まず、Sフィルタ回路311は、V色差算出回路305から出力された色差信号Diff_vを用いて、着目画素(j,i)における下方向のフィルタ処理の結果Fil_sを次式(13)により算出する。
Next, in step S411, the
次に、Sフィルタ回路311は、HV相関値Ratio_HVに基づいて、色差信号Diff_sを次式(14)により算出して出力する。
Diff_si,j=Ratio_HVi,j×Fil_si,j
+(1.0−Ratio_HVi,j)×Diff_vi,j ・・・(14)
Next, the
Diff_s i, j = Ratio_HV i, j × Fil_s i, j
+ (1.0-Ratio_HV i, j ) × Diff_v i, j (14)
次に、ステップS412では、Wフィルタ回路312は、H色差算出回路306から出力された色差信号に対して、HV相関値算出回路309から出力されたHV相関値に基づいて左方向のフィルタ処理を行う。具体的には、まず、Wフィルタ回路312は、H色差算出回路306から出力された色差信号Diff_hを用いて、着目画素(j,i)における左方向のフィルタ処理の結果Fil_wを次式(15)により算出する。
Next, in step S <b> 412, the
次に、Wフィルタ回路312は、HV相関値Ratio_HVに基づいて、色差信号Diff_Wを次式(16)により算出して出力する。
Diff_wi,j=Ratio_HVi,j×Fil_wi,j
+(1.0−Ratio_HVi,j)×Diff_hi,j ・・・(16)
Next, the
Diff_w i, j = Ratio_HV i, j × Fil_w i, j
+ (1.0-Ratio_HV i, j ) × Diff_h i, j (16)
次に、ステップS413では、Eフィルタ回路313は、H色差算出回路306から出力された色差信号に対して、HV相関値算出回路309から出力されたHV相関値に基づいて右方向のフィルタ処理を行う。具体的には、まず、Eフィルタ回路313は、H色差算出回路306から出力された色差信号Diff_hを用いて、着目画素(j,i)における右方向のフィルタ処理の結果Fil_eを次式(17)により算出する。
Next, in step S413, the
次に、Eフィルタ回路313は、HV相関値Ratio_HVに基づいて、色差信号Diff_eを次式(18)により算出して出力する。
Diff_ei,j=Ratio_HVi,j×Fil_ei,j
+(1.0−Ratio_HVi,j)×Diff_hi,j ・・・(18)
Next, the
Diff_e i, j = Ratio_HV i, j × Fil_e i, j
+ (1.0-Ratio_HV i, j ) × Diff_h 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)により算出する。合成回路318は、合成手段である。
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 × Diff_n i, j + Ws i, j × 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は、第1の加算手段である。加算回路319の出力信号は、G補間回路202の出力信号である。
Next, in step S419, when the target pixel of the input image input to the
以上のように、Nフィルタ回路310は上方向のフィルタ処理を行い、Sフィルタ回路311は下方向のフィルタ処理を行い、Wフィルタ回路312は左方向のフィルタ処理を行い、Eフィルタ回路313は右方向のフィルタ処理を行う。Nフィルタ回路310とSフィルタ回路311は、第1のフィルタ処理手段であり、垂直方向の色差信号に対してフィルタ処理を行う。Wフィルタ回路312とEフィルタ回路313は、第2のフィルタ処理手段であり、水平方向の色差信号に対してフィルタ処理を行う。ここで、斜め方向の色エッジが存在する場合には、水平方向及び垂直方向には相関がない。したがって、斜め方向の色エッジが存在する場合に、これらのフィルタ回路310〜313が、HV相関値算出回路309により算出されるHV相関値Ratio_HVを用いずにフィルタ処理を行ってしまうと、フィルタ処理による折り返しが発生する。その結果、斜めの縞状の被写体に対するブロック状の偽のパターンが発生し、画質が低下してしまう。
As described above, the
本実施形態では、HV相関値算出回路309を設ける。HV相関値算出回路309は、差分の絶対値信号Diff_Grad及びHV相関値Ratio_HVを算出し、斜め方向の色エッジの存在を検出することができる。水平方向の色エッジが存在する場合及び垂直方向に色エッジが存在する場合には、差分の絶対値信号Diff_Grad及びHV相関値Ratio_HVが大きな値となり、フィルタ回路310〜313は強い強度でフィルタ処理を行う。フィルタ回路310〜313は、HV相関値Ratio_HVに基づいて、フィルタ処理の強度を変化させる。
In the present embodiment, an HV correlation
図5に示すように、差分の絶対値信号Diff_Gradが第1の閾値Th1より小さい場合には、HV相関値Ratio_HVが0.0であり、フィルタ回路310〜313は、フィルタ処理を行わない。差分の絶対値信号Diff_Gradが第1の閾値以上(第1の閾値Th1以上)である場合には、HV相関値Ratio_HVが0.0より大きくなり、フィルタ回路310〜313は、フィルタ処理を行う。
As shown in FIG. 5, when the absolute value signal Diff_Grad of the difference is smaller than the first threshold value Th1, the HV correlation value Ratio_HV is 0.0, and the
斜め方向の色エッジが存在する場合及び色エッジが存在しない場合には、差分の絶対値信号Diff_Grad及びHV相関値Ratio_HVが小さな値となり、フィルタ回路310〜313はフィルタ処理を行わない(フィルタ処理の強度を弱める)。このように、斜め方向の色エッジが存在する場合には、フィルタ回路310〜313はフィルタ処理を行わないか、又はフィルタ処理の強度を弱めるので、フィルタ処理による折り返しの発生を防止することができる。その結果、斜めの縞状の被写体に対するブロック状の偽のパターンの発生を低減し、画質を向上させることができる。
When there is an oblique color edge and when there is no color edge, the difference absolute value signal Diff_Grad and the HV correlation value Ratio_HV are small values, and the
本実施形態によれば、ベイヤ配列の画像信号からG信号及び輝度信号を生成する際に、方向に因らず解像感の高い画像を生成し、かつ、斜めの縞状の被写体に対するブロック状の偽のパターンを低減した画像を得ることができる。 According to this embodiment, when generating the G signal and the luminance signal from the image signal of the Bayer array, an image with a high resolution feeling is generated regardless of the direction, and the block shape with respect to the oblique striped subject is generated. An image with reduced false patterns can be obtained.
(その他の実施形態)
本発明は、上述の実施形態の1以上の機能を実現するプログラムを、ネットワーク又は記憶媒体を介してシステム又は装置に供給し、そのシステム又は装置のコンピュータにおける1つ以上のプロセッサがプログラムを読み出し実行する処理でも実現可能である。また、1以上の機能を実現する回路(例えば、ASIC)によっても実現可能である。
(Other embodiments)
The present invention supplies a program that realizes one or more functions of the above-described embodiments to a system or apparatus via a network or a storage medium, and one or more processors in the computer of the system or apparatus read and execute the program This process can be realized. It can also be realized by a circuit (for example, ASIC) that realizes one or more functions.
なお、上記実施形態は、何れも本発明を実施するにあたっての具体化の例を示したものに過ぎず、これらによって本発明の技術的範囲が限定的に解釈されてはならないものである。すなわち、本発明はその技術思想、又はその主要な特徴から逸脱することなく、様々な形で実施することができる。 The above-described embodiments are merely examples of implementation in carrying out the present invention, and the technical scope of the present invention should not be construed in a limited manner. That is, the present invention can be implemented in various forms without departing from the technical idea or the main features thereof.
305 V色差算出回路、306 H色差算出回路、310 Nフィルタ回路、311 Sフィルタ回路、312 Wフィルタ回路、313 Wフィルタ回路 305 V color difference calculation circuit, 306 H color difference calculation circuit, 310 N filter circuit, 311 S filter circuit, 312 W filter circuit, 313 W filter circuit
Claims (12)
前記入力画像の水平方向の色差信号を算出する第2の色差信号算出手段と、
前記垂直方向の色差信号に対してフィルタ処理を行う第1のフィルタ処理手段と、
前記水平方向の色差信号に対してフィルタ処理を行う第2のフィルタ処理手段とを有し、
前記第1のフィルタ処理手段と前記第2のフィルタ処理手段は、前記垂直方向の色差信号と前記水平方向の色差信号に基づいて、フィルタ処理の強度を変化させることを特徴とする画像処理装置。 First color difference signal calculating means for calculating a color difference signal in the vertical direction of the input image;
Second color difference signal calculating means for calculating a color difference signal in the horizontal direction of the input image;
First filter processing means for performing filter processing on the color difference signal in the vertical direction;
Second filter processing means for performing filter processing on the horizontal color difference signal;
The image processing apparatus characterized in that the first filter processing means and the second filter processing means change the intensity of filter processing based on the color difference signal in the vertical direction and the color difference signal in the horizontal direction.
前記水平方向の色差信号を基に水平方向の色差の傾きを算出する第2の傾き算出手段とを有し、
前記第1のフィルタ処理手段と前記第2のフィルタ処理手段は、前記垂直方向の色差の傾きと前記水平方向の色差の傾きとの差分に基づいて、フィルタ処理の強度を変化させることを特徴とする請求項1に記載の画像処理装置。 A first inclination calculating means for calculating the inclination of the color difference in the vertical direction based on the color difference signal in the vertical direction;
Second inclination calculating means for calculating the inclination of the color difference in the horizontal direction based on the color difference signal in the horizontal direction;
The first filter processing means and the second filter processing means change the intensity of filter processing based on a difference between the inclination of the color difference in the vertical direction and the inclination of the color difference in the horizontal direction. The image processing apparatus according to claim 1.
前記第1のフィルタ処理手段と前記第2のフィルタ処理手段は、前記相関値に基づいて、フィルタ処理の強度を変化させることを特徴とする請求項2又は3に記載の画像処理装置。 And a correlation value calculating means for calculating a correlation value between the vertical direction and the horizontal direction based on a difference between the inclination of the color difference in the vertical direction and the inclination of the color difference in the horizontal direction,
The image processing apparatus according to claim 2, wherein the first filter processing unit and the second filter processing unit change the strength of the filter processing based on the correlation value.
前記垂直方向の色差信号に対して上方向のフィルタ処理を行うフィルタ処理手段と、
前記垂直方向の色差信号に対して下方向のフィルタ処理を行うフィルタ処理手段とを有し、
前記第2のフィルタ処理手段は、
前記水平方向の色差信号に対して左方向のフィルタ処理を行うフィルタ処理手段と、
前記水平方向の色差信号に対して右方向のフィルタ処理を行うフィルタ処理手段とを有することを特徴とする請求項1乃至4のいずれか1項に記載の画像処理装置。 The first filter processing means includes:
Filter processing means for performing upward filter processing on the vertical color difference signal;
Filter processing means for performing a downward filter process on the vertical color difference signal;
The second filter processing means includes
Filter processing means for performing filter processing in the left direction on the horizontal color difference signal;
5. The image processing apparatus according to claim 1, further comprising: a filter processing unit configured to perform a filter process in a right direction with respect to the color difference signal in the horizontal direction.
前記入力画像に対して水平方向の補間処理により全画素の赤信号、緑信号及び青信号を出力する第2の補間手段とを有し、
前記第1の色差算出手段は、前記第1の補間手段の出力信号に基づいて、前記入力画像の垂直方向の色差信号を算出し、
前記第2の色差算出手段は、前記第2の補間手段の出力信号に基づいて、前記入力画像の水平方向の色差信号を算出することを特徴とする請求項1乃至7のいずれか1項に記載の画像処理装置。 A first interpolation unit that outputs a red signal, a green signal, and a blue signal of all pixels by interpolation processing in a vertical direction with respect to the input image;
Second interpolation means for outputting a red signal, a green signal, and a blue signal of all pixels by a horizontal interpolation process with respect to the input image;
The first color difference calculation means calculates a color difference signal in the vertical direction of the input image based on the output signal of the first interpolation means,
The said 2nd color difference calculation means calculates the color difference signal of the horizontal direction of the said input image based on the output signal of the said 2nd interpolation means, The any one of Claim 1 thru | or 7 characterized by the above-mentioned. The image processing apparatus described.
前記入力画像と前記第1の加算手段により出力される緑信号とに基づいて、前記入力画像の青信号を補間する青補間手段と、
前記第1の加算手段により出力される緑信号と前記赤補間手段により補間された赤信号と前記青補間手段により補間された青信号とを基に輝度信号を生成する輝度信号生成手段とを有することを特徴とする請求項7に記載の画像処理装置。 Furthermore, based on the input image and the green signal output by the first addition means, a red interpolation means for interpolating the red signal of the input image;
Blue interpolation means for interpolating a blue signal of the input image based on the input image and the green signal output by the first addition means;
Luminance signal generation means for generating a luminance signal based on the green signal output by the first addition means, the red signal interpolated by the red interpolation means, and the blue signal interpolated by the blue interpolation means. The image processing apparatus according to claim 7.
第2の色差信号算出手段により、前記入力画像の水平方向の色差信号を算出する第2の色差信号算出ステップと、
第1のフィルタ処理手段により、前記垂直方向の色差信号に対してフィルタ処理を行う第1のフィルタ処理ステップと、
第2のフィルタ処理手段により、前記水平方向の色差信号に対してフィルタ処理を行う第2のフィルタ処理ステップとを有し、
前記第1のフィルタ処理ステップと前記第2のフィルタ処理ステップでは、前記垂直方向の色差信号と前記水平方向の色差信号に基づいて、フィルタ処理の強度を変化させることを特徴とする画像処理方法。 A first color difference signal calculating step of calculating a color difference signal in the vertical direction of the input image by the first color difference signal calculating means;
A second color difference signal calculating step of calculating a horizontal color difference signal of the input image by a second color difference signal calculating means;
A first filter processing step of performing a filter process on the color difference signal in the vertical direction by a first filter processing unit;
A second filter processing step of performing a filter process on the horizontal color difference signal by a second filter processing means;
In the first filter processing step and the second filter processing step, an intensity of filter processing is changed based on the vertical color difference signal and the horizontal color difference signal.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2016187385A JP6794204B2 (en) | 2016-09-26 | 2016-09-26 | Image processing equipment, image processing methods and programs |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2016187385A JP6794204B2 (en) | 2016-09-26 | 2016-09-26 | Image processing equipment, image processing methods and programs |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2018056653A true JP2018056653A (en) | 2018-04-05 |
JP6794204B2 JP6794204B2 (en) | 2020-12-02 |
Family
ID=61836093
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2016187385A Active JP6794204B2 (en) | 2016-09-26 | 2016-09-26 | Image processing equipment, image processing methods and programs |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP6794204B2 (en) |
-
2016
- 2016-09-26 JP JP2016187385A patent/JP6794204B2/en active Active
Also Published As
Publication number | Publication date |
---|---|
JP6794204B2 (en) | 2020-12-02 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP5451782B2 (en) | Image processing apparatus and image processing method | |
KR101391161B1 (en) | Image processing device | |
JP5677040B2 (en) | Image processing apparatus and control method thereof | |
JP4803156B2 (en) | SIGNAL PROCESSING DEVICE FOR SOLID-STATE IMAGING ELEMENT, IMAGING DEVICE HAVING SIGNAL PROCESSING DEVICE, SIGNAL PROCESSING METHOD, AND PROGRAM | |
KR20190100792A (en) | Image sensing device | |
TWI338511B (en) | ||
JP2011109496A (en) | Imaging apparatus | |
JPWO2003058554A1 (en) | Image processing apparatus and image processing program for determining similarity of pixels | |
JP6415093B2 (en) | Image processing apparatus, image processing method, and program | |
JP5268321B2 (en) | Image processing apparatus, image processing method, and image processing program | |
JP2009005166A (en) | Color interpolation device and image processing system | |
US20150042782A1 (en) | Image processing apparatus, imaging apparatus, microscope system, image processing method, and computer readable recording medium | |
JP6270423B2 (en) | Image processing apparatus and control method thereof | |
JP6794204B2 (en) | Image processing equipment, image processing methods and programs | |
JP6987622B2 (en) | Image processing equipment, image processing methods and programs | |
JP6408884B2 (en) | Image processing apparatus, image processing method, and program | |
JP7183015B2 (en) | Image processing device, image processing method, and program | |
JP6862272B2 (en) | Signal processing equipment, signal processing methods and programs | |
JP6987621B2 (en) | Image processing equipment, image processing methods and programs | |
JP2014110507A (en) | Image processing device and image processing method | |
JP5454820B2 (en) | Image processing apparatus, image processing method, and image processing program | |
JP2015179951A (en) | Image processing apparatus, imaging apparatus, image processing method, program and storage medium | |
JP2009290568A (en) | Imaging apparatus | |
JP6478482B2 (en) | Image processing apparatus, imaging apparatus, image processing method, and program | |
CN113781349A (en) | Image processing method, image processing apparatus, electronic device, and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20190920 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20200528 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20200707 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20200804 |
|
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: 20201013 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20201111 |
|
R151 | Written notification of patent or utility model registration |
Ref document number: 6794204 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R151 |