JP2018056653A - Image processing device, image processing method and program - Google Patents

Image processing device, image processing method and program Download PDF

Info

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
Application number
JP2016187385A
Other languages
Japanese (ja)
Other versions
JP6794204B2 (en
Inventor
洋 荻野
Hiroshi Ogino
洋 荻野
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 JP2016187385A priority Critical patent/JP6794204B2/en
Publication of JP2018056653A publication Critical patent/JP2018056653A/en
Application granted granted Critical
Publication of JP6794204B2 publication Critical patent/JP6794204B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

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

Abstract

PROBLEM TO BE SOLVED: To provide an image processing device that can reduce a block-shaped false pattern for a subject having a slant striped shape in filter processing.SOLUTION: An image processing device comprises first color difference signal calculation means (305) that calculates a color difference signal in a vertical direction of an input image, second color difference signal calculation means (306) that calculates the color difference signal in a horizontal direction of the input image, first filter processing means (310, 311) that performs filter processing to the color difference signal in the vertical direction, and second filter processing means (312, 313) that performs filter processing to the color difference signal in the horizontal direction, and the first filter processing means and the second filter processing means change strength of the filter processing based on the color difference signal in the vertical direction and the color difference signal in the horizontal direction.SELECTED DRAWING: Figure 3

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.

特許第3862506号公報Japanese Patent No. 3862506

I. Pekkucuksen,Y. Altunbasak,“Gradient based threshold free color filter array interpolation”,ICIP 2010I. Pekkucuksen, Y. Altunbasak, “Gradient based threshold free color filter array interpolation”, ICIP 2010

しかし、非特許文献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単位を示す図である。It is a figure which shows 1 unit of a primary color Bayer arrangement | sequence. 本実施形態による画像処理装置の構成例を示すブロック図である。It is a block diagram which shows the structural example of the image processing apparatus by this embodiment. G補間回路の構成例を示すブロック図である。It is a block diagram which shows the structural example of a G interpolation circuit. G補間回路の処理の流れの一例を示すフローチャートである。It is a flowchart which shows an example of the flow of a process of G interpolation circuit. HV相関値算出回路の入出力特性の一例を示す図である。It is a figure which shows an example of the input-output characteristic of an HV correlation value calculation circuit.

図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 signal generation unit 200 of the second.

図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 signal generation unit 200 according to the present embodiment. The luminance signal generation unit 200 is an image processing apparatus, and inputs digital R, G, and B signals from the image sensor shown in FIG. The luminance signal generation unit 200 includes a WB circuit (white balance circuit) 201, a G interpolation circuit 202, an R interpolation circuit 203, a B interpolation circuit 204, an APC circuit 205, a luminance signal generation circuit 206, and an addition circuit 207. And have.

WB回路201は、撮像素子からデジタルの画像信号(R信号、G信号及びB信号)を入力し、画像信号のホワイトバランスを補正する。G補間回路202は、WB回路201から出力される画像信号を入力し、図1のR画素及びB画素の位置のG信号を補間により算出し、全画素のG信号を出力する。R画素は赤フィルタが設けられた画素であり、B画素は青フィルタが設けられた画素であり、G画素は緑フィルタが設けられた画素である。G補間回路202の処理の詳細は後述する。   The WB circuit 201 inputs digital image signals (R signal, G signal, and B signal) from the image sensor, and corrects the white balance of the image signal. The G interpolation circuit 202 receives the image signal output from the WB circuit 201, calculates the G signal at the positions of the R pixel and the B pixel in FIG. 1 by interpolation, and outputs the G signal of all the pixels. The R pixel is a pixel provided with a red filter, the B pixel is a pixel provided with a blue filter, and the G pixel is a pixel provided with a green filter. Details of the processing of the G interpolation circuit 202 will be described later.

R補間回路203は、赤補間手段であり、WB回路201からの入力画像及びG補間回路202からのG信号を基に、図1の入力画像のG画素及びB画素の位置のR信号を補間により算出し、全画素のR信号を出力する。例えば、R補間回路203は、着目画素を含む上、下、左、右方向に、R画素と、着目画素と同色の画素との色差信号をそれぞれ算出し、各方向の色差信号を合成した色差信号を着目画素に加算することでR信号を算出する。なお、R補間回路203は、2次元のLPF(ローパスフィルタ)処理によりR信号を算出してもよい。   The R interpolation circuit 203 is a red interpolation unit, and interpolates R signals at the positions of the G pixel and B pixel in the input image of FIG. 1 based on the input image from the WB circuit 201 and the G signal from the G interpolation circuit 202. To calculate the R signal of all pixels. For example, the R interpolation circuit 203 calculates a color difference signal between the R pixel and the pixel of the same color as the target pixel in the upper, lower, left, and right directions including the target pixel, and combines the color difference signals in each direction. The R signal is calculated by adding the signal to the pixel of interest. The R interpolation circuit 203 may calculate the R signal by two-dimensional LPF (low pass filter) processing.

B補間回路204は、青補間手段であり、WB回路201からの入力画像及びG補間回路202からのG信号を基に、図1の入力画像のR画素及びG画素の位置のB信号を補間により算出し、全画素のB信号を出力する。例えば、B補間回路204は、着目画素を含む上、下、左、右方向に、B画素と、着目画素と同色の画素との色差信号をそれぞれ算出し、各方向の色差信号を合成した色差信号を着目画素に加算することでB信号を算出する。なお、B補間回路204は、2次元のLPF処理によりB信号を算出してもよい。   The B interpolation circuit 204 is blue interpolation means, and interpolates the B signal at the position of the R pixel and the G pixel in the input image of FIG. 1 based on the input image from the WB circuit 201 and the G signal from the G interpolation circuit 202. And B signals of all pixels are output. For example, the B interpolation circuit 204 calculates a color difference signal between the B pixel and a pixel of the same color as the target pixel in the upper, lower, left, and right directions including the target pixel, and combines the color difference signals in each direction. The B signal is calculated by adding the signal to the pixel of interest. Note that the B interpolation circuit 204 may calculate the B signal by two-dimensional LPF processing.

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 APC circuit 205 generates an aperture correction signal for the G signal output from the G interpolation circuit 202. The adder circuit 207 adds the G signal output from the G interpolation circuit 202 and the output signal of the APC circuit 204, and outputs a G signal for all pixels. The luminance signal generation circuit 206 is a luminance signal generation unit, and based on the G signal output from the adder circuit 207, the R signal output from the R interpolation circuit 203, and the B signal output from the B interpolation circuit 204, The luminance signal Y for all pixels is generated by the following equation (1).
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 G interpolation circuit 202 of FIG. The G interpolation circuit 202 includes a G pixel V interpolation circuit 301, a G pixel H interpolation circuit 302, an R and B pixel V interpolation circuit 303, an R and B pixel H interpolation circuit 304, a V color difference calculation circuit 305, an H And a color difference calculation circuit 306. Further, the G interpolation circuit 202 includes a V color difference inclination calculation circuit 307, an H color difference inclination calculation circuit 308, an HV correlation value calculation circuit 309, an N filter circuit 310, an S filter circuit 311, and a W filter circuit 312. E filter circuit 313. Further, the G interpolation circuit 202 includes an N weight calculation circuit 314, an S weight calculation circuit 315, a W weight calculation circuit 316, an E weight calculation circuit 317, a synthesis circuit 318, and an addition circuit 319.

図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 G interpolation circuit 202. In step S401, the G pixel V interpolation circuit 301 calculates the G signal by performing interpolation processing in the vertical direction on the Bayer array input image output from the WB circuit 201, and outputs the G signal of all pixels. . Specifically, the G pixel V interpolation circuit 301 outputs the G signal as it is when the target pixel is a G pixel, and interpolates the G signal in the vertical direction when the target pixel is an R pixel or a B pixel. The G signal is calculated by performing processing. For example, when the X and Y coordinates of the pixel of interest in the image are (j, i) and the pixel of interest is an R pixel, the G pixel V interpolation circuit 301 calculates the G signal Gv i, j using the following equation (2). Calculated by Further, the G pixel V interpolation circuit 301 calculates the G signal by the same method as when the target pixel is the R pixel even when the target pixel is the B pixel.
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 H interpolation circuit 302 calculates a G signal by performing an interpolation process in the horizontal direction on the input image output from the WB circuit 201, and outputs the G signal of all pixels. . Specifically, the G pixel H interpolation circuit 302 outputs the G signal as it is when the target pixel is a G pixel, and interpolates the G signal in the horizontal direction when the target pixel is an R pixel or a B pixel. The G signal is calculated by performing processing. For example, when the target pixel is an R pixel, the G pixel H interpolation circuit 302 calculates the G signal Gh i, j by the following equation (3). The G pixel H interpolation circuit 302 calculates the G signal by the same method as that when the target pixel is the R pixel even when the target pixel is the B 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 V interpolation circuit 303 calculates an R signal and a B signal by performing interpolation processing in the vertical direction on the input image output from the WB circuit 201, and calculates all the pixels. R signal and B signal are output. Specifically, when the target pixel is an R pixel or a B pixel, the R and B pixel V interpolation circuit 303 outputs the R signal or the B signal as it is. When the pixel of interest is a G pixel and the vertical direction of the pixel of interest is an R pixel, the R and B pixel V interpolation circuit 303 calculates an R signal by performing interpolation processing in the vertical direction. When the vertical direction is a B pixel, the B signal is calculated by performing interpolation processing in the vertical direction. For example, when the target pixel is a G pixel and the vertical direction of the target pixel is an R pixel, the R and B pixel V interpolation circuit 303 calculates the R signal Rv i, j by the following equation (4). The R and B pixel V interpolation circuit 303 calculates the B signal by the same method as that when the vertical direction of the target pixel is the R pixel even when the vertical direction of the target pixel is the 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 H interpolation circuit 304 calculates an R signal and a B signal by performing an interpolation process in the horizontal direction on the input image output from the WB circuit 201, and calculates all the pixels. R signal and B signal are output. Specifically, when the target pixel is an R pixel or a B pixel, the R and B pixel H interpolation circuit 304 outputs the R signal or the B signal as it is. When the target pixel is a G pixel and the horizontal direction of the target pixel is an R pixel, the R and B pixel H interpolation circuit 304 calculates an R signal by performing an interpolation process in the horizontal direction, When the horizontal direction is B pixels, the B signal is calculated by performing interpolation processing in the horizontal direction. For example, when the target pixel is a G pixel and the horizontal direction of the target pixel is an R pixel, the R and B pixel H interpolation circuit 304 calculates the R signal Rh i, j by the following equation (5). The R and B pixel H interpolation circuit 304 calculates the B signal by the same method as that when the horizontal direction of the target pixel is the R pixel even when the horizontal direction of the target pixel is the 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 V interpolation circuit 301 and the R and B pixel V interpolation circuits 303 are first interpolation means, and output R signals, G signals, and B signals of all pixels by interpolation processing in the vertical direction with respect to the input image. . The G pixel H interpolation circuit 302 and the R and B pixel H interpolation circuits 304 are second interpolation means, and output an R signal, a G signal, and a B signal of all the pixels by horizontal interpolation processing on the input image. .

次に、ステップ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 difference calculation circuit 305 subtracts the R signal or B signal output from the R and B pixel V interpolation circuit 303 from the G signal output from the G pixel V interpolation circuit 301. The color difference signal in the vertical direction of the input image is calculated. The V color difference calculation circuit 305 is a first color difference signal calculation unit. In the V color difference calculation circuit 305, the signal output from the G pixel V interpolation circuit 301 is the G signal Gv i, j and the signal output from the R and B pixel V interpolation circuit 303 is R in the target pixel (j, i). In the case of the signal Rv i, j , the color difference signal Diff_v in the vertical direction is calculated by the following equation (6). The V color difference calculation circuit 305 uses the same method as that when the signal output from the R and B pixel V interpolation circuit 303 is the R signal even when the signal output from the R and B pixel V interpolation circuit 303 is the B signal. , A vertical color difference signal between the G signal and the B signal is calculated.
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 H interpolation circuit 304 from the G signal output from the G pixel H interpolation circuit 302. The horizontal color difference signal of the input image is calculated. The H color difference calculation circuit 306 is a second color difference signal calculation unit. In the H color difference calculation circuit 306, in the pixel of interest (j, i), the signal output from the G pixel H interpolation circuit 302 is the G signal Gh i, j , and the signal output from the R, B pixel H interpolation circuit 304 is R In the case of the signal Rv i, j , the color difference signal Diff_h in the horizontal direction is calculated by the following equation (7). The H color difference calculation circuit 306 uses the same method as when the signal output from the R and B pixel H interpolation circuit 304 is an R signal even when the signal output from the R and B pixel H interpolation circuit 304 is a B signal. The horizontal color difference signals of the G signal and the B signal are calculated.
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 inclination calculation circuit 307 calculates the inclination of the color difference in the vertical direction based on the color difference signal output from the V color difference calculation circuit 305. The V color difference inclination calculation circuit 307 is a first inclination calculation unit. Specifically, the V color difference inclination calculation circuit 307 calculates a vertical color difference inclination signal Grad_v based on the color difference signal Diff_v output from the V color difference calculation circuit 305 in the pixel of interest (j, i) as follows: 8).
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 inclination calculation circuit 308 calculates the horizontal color difference inclination based on the color difference signal output from the H color difference calculation circuit 306. The H color difference inclination calculation circuit 308 is a second inclination calculation unit. Specifically, the H color difference inclination calculation circuit 308 generates a horizontal color difference inclination signal Grad_h based on the color difference signal Diff_h output from the H color difference calculation circuit 306 in the pixel of interest (j, i) as follows: 9).
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 value calculation circuit 309 calculates a correlation value Ratio_HV in the horizontal direction and the vertical direction based on the gradient signal Grad_v in the vertical direction and the gradient signal Grad_h in the horizontal direction. The HV correlation value calculation circuit 309 is a correlation value calculation unit. Specifically, first, the HV correlation value calculation circuit 309 includes the vertical color difference inclination signal Grad_v input from the V color difference inclination calculation circuit 307 and the horizontal color difference input from the H color difference inclination calculation circuit 308. An absolute value signal of the difference between the inclination signals Grad_h is calculated. Here, the absolute value signal of the difference in the pixel of interest (j, i) is defined as Diff_Grad. The HV correlation value calculation circuit 309 calculates the absolute value signal Diff_Grad of the difference between the vertical color difference inclination signal Grad_v and the horizontal color difference inclination signal Grad_h by the following equation (10).
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 value calculation circuit 309 calculates an HV correlation value Ratio_HV for each pixel based on the difference absolute value signal based on Diff_Grad.

図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 value calculation circuit 309 calculates the HV correlation value Ratio_HV from the difference absolute value signal Diff_Grad. In FIG. 5, the horizontal axis represents the difference absolute value signal Diff_Grad, and the vertical axis represents the HV correlation value Ratio_HV. When the absolute value signal Diff_Grad of the difference is smaller than the first threshold value Th1, the HV correlation value calculation circuit 309 can be regarded as having no color edge in the horizontal direction and the vertical direction, so 0.0 is set as the HV correlation value Ratio_HV. Output. Further, when the absolute value signal Diff_Grad of the difference is larger than the second threshold value Th2, the HV correlation value calculation circuit 309 can consider that there is a color edge in the horizontal direction and the vertical direction, so that the HV correlation value Ratio_HV is 1.0. Is output. Here, the second threshold Th2 is larger than the first threshold Th1. When the difference absolute value signal Diff_Grad is greater than or equal to the first threshold value Th1 and less than or equal to the second threshold value Th2, the HV correlation value calculation circuit 309 linearly varies according to the magnitude of the difference absolute value signal Diff_Grad. An HV correlation value Ratio_HV between .0 and 1.0 is output.

次に、ステップ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 filter circuit 310 performs an upward filter process on the color difference signal output from the V color difference calculation circuit 305 based on the HV correlation value Ratio_HV output from the HV correlation value calculation circuit 309. I do. Specifically, first, the N filter circuit 310 uses the color difference signal Diff_v output from the V color difference calculation circuit 305 to calculate the result Fil_n of the upward filter processing on the pixel of interest (j, i) as follows: ).

Figure 2018056653
Figure 2018056653

次に、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 N filter circuit 310 calculates and outputs the color difference signal Diff_n by the following equation (12) based on the HV correlation value Ratio_HV.
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 filter circuit 311 performs a downward filter process on the color difference signal output from the V color difference calculation circuit 305 based on the HV correlation value output from the HV correlation value calculation circuit 309. Do. Specifically, first, the S filter circuit 311 uses the color difference signal Diff_v output from the V color difference calculation circuit 305 to obtain a filter result Fil_s in the downward direction for the pixel of interest (j, i) as follows: ).

Figure 2018056653
Figure 2018056653

次に、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 S filter circuit 311 calculates the color difference signal Diff_s by the following equation (14) based on the HV correlation value Ratio_HV and outputs it.
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 filter circuit 312 performs leftward filtering on the color difference signal output from the H color difference calculation circuit 306 based on the HV correlation value output from the HV correlation value calculation circuit 309. Do. Specifically, first, the W filter circuit 312 uses the color difference signal Diff_h output from the H color difference calculation circuit 306 to calculate the result Fil_w of the leftward filter processing for the pixel of interest (j, i) as follows: ).

Figure 2018056653
Figure 2018056653

次に、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 W filter circuit 312 calculates and outputs the color difference signal Diff_W by the following equation (16) based on the HV correlation value Ratio_HV.
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 filter circuit 313 performs rightward filter processing on the color difference signal output from the H color difference calculation circuit 306 based on the HV correlation value output from the HV correlation value calculation circuit 309. Do. Specifically, first, the E filter circuit 313 uses the color difference signal Diff_h output from the H color difference calculation circuit 306 to obtain the filter processing result Fil_e in the right direction for the pixel of interest (j, i) as follows: ).

Figure 2018056653
Figure 2018056653

次に、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 E filter circuit 313 calculates and outputs the color difference signal Diff_e by the following equation (18) based on the HV correlation value Ratio_HV.
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 weight calculation circuit 314 calculates the upward weight Wn by the following equation (19) based on the vertical color difference inclination signal Grad_v output from the V color difference inclination calculation circuit 307. .

Figure 2018056653
Figure 2018056653

次に、ステップS415では、S重み算出回路315は、V色差傾き算出回路307から出力された垂直方向の色差の傾き信号Grad_vを基に、下方向の重みWsを次式(20)により算出する。   Next, in step S415, the S weight calculation circuit 315 calculates the downward weight Ws by the following equation (20) based on the vertical color difference inclination signal Grad_v output from the V color difference inclination calculation circuit 307. .

Figure 2018056653
Figure 2018056653

次に、ステップS416では、W重み算出回路316は、H色差傾き算出回路308から出力された水平方向の色差の傾き信号Grad_hを基に、左方向の重みWwを次式(21)により算出する。   Next, in step S416, the W weight calculation circuit 316 calculates the left weight Ww by the following equation (21) based on the horizontal color difference inclination signal Grad_h output from the H color difference inclination calculation circuit 308. .

Figure 2018056653
Figure 2018056653

次に、ステップS417では、E重み算出回路317は、H色差傾き算出回路308から出力された水平方向の色差の傾き信号Grad_hを基に、右方向の重みWeを次式(22)により算出する。   Next, in step S417, the E weight calculation circuit 317 calculates the right weight We by the following equation (22) based on the horizontal color difference gradient signal Grad_h output from the H color difference gradient calculation circuit 308. .

Figure 2018056653
Figure 2018056653

次に、ステップ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 synthesis circuit 318 receives the weight Wn input from the N weight calculation circuit 314, the weight Ws input from the S weight calculation circuit 315, the weight Ww input from the W weight calculation circuit 316, and E The weight We input from the weight calculation circuit 317 is input. Further, the synthesis circuit 318 inputs the color difference signal Diff_n input from the N filter circuit 310 and the color difference signal Diff_s input from the S filter circuit 311. Further, the synthesis circuit 318 receives the color difference signal Diff_w input from the W filter circuit 312 and the color difference signal Diff_e input from the E filter circuit 313. The combining circuit 318 combines the color difference signal Diff_n, the color difference signal Diff_s, the color difference signal Diff_w, and the color difference signal Diff_e based on the weight Wn, the weight Ws, the weight Ww, and the weight We, and the color difference signal Diff_mix is expressed by the following formula ( 23). The synthesis circuit 318 is a synthesis unit.
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 G interpolation circuit 202 is an R pixel or a B pixel, the adder circuit 319 is combined with the signal of the target pixel by the combining circuit 318. The color difference signal Diff_mix is added to calculate and output a G signal. In addition, when the target pixel is a G pixel, the addition circuit 319 outputs the image signal input to the G interpolation circuit 202 as it is. The adder circuit 319 is a first adder. An output signal of the adder circuit 319 is an output signal of the G interpolation circuit 202.

以上のように、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 N filter circuit 310 performs an upward filter process, the S filter circuit 311 performs a downward filter process, the W filter circuit 312 performs a left filter process, and the E filter circuit 313 performs a right filter process. Perform direction filtering. The N filter circuit 310 and the S filter circuit 311 are first filter processing means, and perform filter processing on the color difference signal in the vertical direction. The W filter circuit 312 and the E filter circuit 313 are second filter processing means and perform filter processing on the color difference signal in the horizontal direction. Here, when there is an oblique color edge, there is no correlation between the horizontal direction and the vertical direction. Therefore, if there is a color edge in an oblique direction and these filter circuits 310 to 313 perform the filter process without using the HV correlation value Ratio_HV calculated by the HV correlation value calculation circuit 309, the filter process Wrapping occurs. As a result, a block-like false pattern is generated with respect to an oblique striped subject, and the image quality is degraded.

本実施形態では、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 value calculation circuit 309 is provided. The HV correlation value calculation circuit 309 can calculate the absolute value signal Diff_Grad of the difference and the HV correlation value Ratio_HV and detect the presence of the color edge in the oblique direction. When there is a color edge in the horizontal direction and when there is a color edge in the vertical direction, the difference absolute value signal Diff_Grad and the HV correlation value Ratio_HV become large values, and the filter circuits 310 to 313 perform the filtering process with a strong intensity. Do. The filter circuits 310 to 313 change the strength of the filter processing based on the HV correlation value Ratio_HV.

図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 filter circuits 310 to 313 do not perform the filtering process. When the difference absolute value signal Diff_Grad is equal to or greater than the first threshold (first threshold Th1 or greater), the HV correlation value Ratio_HV is greater than 0.0, and the filter circuits 310 to 313 perform filter processing.

斜め方向の色エッジが存在する場合及び色エッジが存在しない場合には、差分の絶対値信号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 filter circuits 310 to 313 do not perform the filter processing (filter processing is performed). Weaken). As described above, when there is an oblique color edge, the filter circuits 310 to 313 do not perform the filter process or reduce the strength of the filter process, thereby preventing the aliasing due to the filter process. . As a result, it is possible to reduce the occurrence of a block-like false pattern with respect to an oblique striped subject and improve the image quality.

本実施形態によれば、ベイヤ配列の画像信号から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)

入力画像の垂直方向の色差信号を算出する第1の色差信号算出手段と、
前記入力画像の水平方向の色差信号を算出する第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.
さらに、前記垂直方向の色差信号を基に垂直方向の色差の傾きを算出する第1の傾き算出手段と、
前記水平方向の色差信号を基に水平方向の色差の傾きを算出する第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のフィルタ処理手段は、前記差分が第1の閾値より小さい場合にはフィルタ処理を行わず、前記差分が第1の閾値以上である場合にはフィルタ処理を行うことを特徴とする請求項2に記載の画像処理装置。   The first filter processing unit and the second filter processing unit do not perform a filter process when the difference is smaller than a first threshold, and perform a filter process when the difference is equal to or larger than the first threshold. The image processing apparatus according to claim 2, wherein: さらに、前記垂直方向の色差の傾きと前記水平方向の色差の傾きとの差分に基づいて、垂直方向と水平方向の相関値を算出する相関値算出手段を有し、
前記第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.
前記第1のフィルタ処理手段は、
前記垂直方向の色差信号に対して上方向のフィルタ処理を行うフィルタ処理手段と、
前記垂直方向の色差信号に対して下方向のフィルタ処理を行うフィルタ処理手段とを有し、
前記第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.
さらに、前記第1のフィルタ処理手段によりフィルタ処理された色差信号と前記第2のフィルタ処理手段によりフィルタ処理された色差信号とを合成する合成手段を有することを特徴とする請求項1乃至5のいずれか1項に記載の画像処理装置。   6. The apparatus according to claim 1, further comprising a combining unit that combines the color difference signal filtered by the first filter processing unit and the color difference signal filtered by the second filter processing unit. The image processing apparatus according to any one of the above. さらに、前記入力画像の着目画素が赤フィルタの画素又は青フィルタの画素である場合には、前記着目画素の信号に対して前記合成手段により合成された色差信号を加算することにより緑信号を出力する第1の加算手段を有することを特徴とする請求項6に記載の画像処理装置。   Furthermore, when the pixel of interest of the input image is a pixel of a red filter or a pixel of a blue filter, a green signal is output by adding the color difference signal synthesized by the synthesis means to the signal of the pixel of interest The image processing apparatus according to claim 6, further comprising a first addition unit configured to perform the first addition. さらに、前記入力画像に対して垂直方向の補間処理により全画素の赤信号、緑信号及び青信号を出力する第1の補間手段と、
前記入力画像に対して水平方向の補間処理により全画素の赤信号、緑信号及び青信号を出力する第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の加算手段により出力される緑信号とに基づいて、前記入力画像の青信号を補間する青補間手段と、
前記第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.
前記入力画像は、ベイヤ配列の画像であることを特徴とする請求項1乃至9のいずれか1項に記載の画像処理装置。   The image processing apparatus according to claim 1, wherein the input image is a Bayer array image. 第1の色差信号算出手段により、入力画像の垂直方向の色差信号を算出する第1の色差信号算出ステップと、
第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.
コンピュータを、請求項1乃至10のいずれか1項に記載された画像処理装置の各手段として機能させるためのプログラム。   A program for causing a computer to function as each unit of the image processing apparatus according to any one of claims 1 to 10.
JP2016187385A 2016-09-26 2016-09-26 Image processing equipment, image processing methods and programs Active JP6794204B2 (en)

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)

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