JP5040519B2 - Image processing apparatus, image processing method, and program - Google Patents

Image processing apparatus, image processing method, and program Download PDF

Info

Publication number
JP5040519B2
JP5040519B2 JP2007211522A JP2007211522A JP5040519B2 JP 5040519 B2 JP5040519 B2 JP 5040519B2 JP 2007211522 A JP2007211522 A JP 2007211522A JP 2007211522 A JP2007211522 A JP 2007211522A JP 5040519 B2 JP5040519 B2 JP 5040519B2
Authority
JP
Japan
Prior art keywords
peripheral region
change amount
pixel
directions
correlation
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.)
Expired - Fee Related
Application number
JP2007211522A
Other languages
Japanese (ja)
Other versions
JP2009049532A (en
Inventor
卓也 千葉
靖二郎 稲葉
豊 米田
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.)
Sony Corp
Original Assignee
Sony Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Sony Corp filed Critical Sony Corp
Priority to JP2007211522A priority Critical patent/JP5040519B2/en
Publication of JP2009049532A publication Critical patent/JP2009049532A/en
Application granted granted Critical
Publication of JP5040519B2 publication Critical patent/JP5040519B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Color Television Image Signal Generators (AREA)

Description

本発明は、画像処理装置に関し、特にデモザイク処理を行う画像処理装置、および、その処理方法ならびに当該方法をコンピュータに実行させるプログラムに関する。   The present invention relates to an image processing apparatus, and more particularly to an image processing apparatus that performs demosaic processing, a processing method thereof, and a program that causes a computer to execute the method.

デジタルスチルカメラの撮像素子では、2次元に配列された各画素の受光面に色フィルタが配置され、この色フィルタのコーディング仕様として様々なものが提案されている。代表的なものとして赤(R)、緑(G)、青(B)といった原色フィルタを3枚の撮像素子の同空間位相に配置することで高解像度なRGB信号を得ることができ、高画質を実現可能な3CCDカメラと呼ばれるものがある。しかし、この3CCDカメラは3つの撮像素子を用い、入射光をRGBの色ごとに光を分けるプリズムを用いる必要があるため、小型化および低コスト化には向いていない。   In an image sensor of a digital still camera, a color filter is arranged on the light receiving surface of each pixel arranged in two dimensions, and various types of color filter coding specifications have been proposed. As a typical example, high-resolution RGB signals can be obtained by arranging primary color filters such as red (R), green (G), and blue (B) in the same spatial phase of three image sensors. There is a so-called 3CCD camera that can realize the above. However, this 3CCD camera uses three imaging elements and needs to use a prism that separates incident light for each color of RGB, so it is not suitable for miniaturization and cost reduction.

一方、1つの撮像素子にRGBの色フィルタをうまく配列することにより、小型でコストの低いデジタルスチルカメラを実現するものもある。1つの撮像素子に複数の色フィルタを配置し、3CCDに近い性能を実現するものである。例えばベイヤー配列といったものでは奇数行目にR画素およびG画素を交互に配列し、偶数行目にG画素およびB画素を交互に配列している。この配列ではR画素およびB画素に対してG画素を多く配列しているため、R画素およびG画素の解像度よりもG画素の解像度が高いという特性を有している。G画素は輝度信号を生成する際に主成分となる色成分であり、人間は輝度に対しての解像度が高く、色に対する解像度が低いことをうまく利用した配列といえる。   On the other hand, there is a camera that realizes a small and low-cost digital still camera by arranging RGB color filters on one image pickup device. A plurality of color filters are arranged in one image sensor to realize performance close to 3CCD. For example, in the Bayer array, R pixels and G pixels are alternately arranged in odd rows, and G pixels and B pixels are alternately arranged in even rows. In this arrangement, since many G pixels are arranged with respect to the R pixel and the B pixel, the resolution of the G pixel is higher than the resolution of the R pixel and the G pixel. The G pixel is a color component that is a main component when generating a luminance signal, and it can be said that a human being is an array that makes good use of the fact that the resolution for luminance is high and the resolution for color is low.

ベイヤー配列において空間的に位相およびサンプリングレートが異なるRGB信号から輝度信号Yや色差信号CrおよびCbを単純に生成することは偽信号を作る原因となるため、同じ空間位相のRGB信号を生成した上で輝度信号Y、色差信号CrおよびCbを生成する必要がある。このように、空間的に位相およびサンプリングレートが異なるRGB信号を、3CCD(以後、3板と呼ぶ)のように同空間位相RGB信号が存在するかのように補間する処理をデモザイク処理と呼ぶ。このデモザイク処理の際には、解像度や色偽に注意する必要がある。   Since simply generating the luminance signal Y and the color difference signals Cr and Cb from RGB signals having spatially different phases and sampling rates in the Bayer array causes a false signal, an RGB signal having the same spatial phase is generated. Therefore, it is necessary to generate the luminance signal Y and the color difference signals Cr and Cb. In this way, a process of interpolating RGB signals having spatially different phases and sampling rates as if the same spatial phase RGB signals exist as in 3CCD (hereinafter referred to as 3 plates) is called demosaic processing. When performing this demosaic process, it is necessary to pay attention to resolution and color falsification.

従来のデモザイク処理では、補間対象画素の周囲画素から相関方向を判定し、その相関方向に基づいて補間処理が行われている。例えば、ベイヤー配列において水平方向および垂直方向に相関方向を判定して、その相関方向に基づいて補間処理を行う技術が提案されている(例えば、特許文献1参照。)。また、ベイヤー配列または斜め画素配列において水平方向、垂直方向、水平方向に対して45度右回転した方向、および、水平方向に対して45度左回転した方向に相関方向を判定して、その相関方向に基づいて補間処理を行う技術が提案されている(例えば、特許文献2参照。)。
特開平11−220742号公報(図2) 特開2007−037104号公報(図16)
In the conventional demosaic process, the correlation direction is determined from the surrounding pixels of the interpolation target pixel, and the interpolation process is performed based on the correlation direction. For example, a technique has been proposed in which correlation directions are determined in a horizontal direction and a vertical direction in a Bayer array, and interpolation processing is performed based on the correlation directions (see, for example, Patent Document 1). Further, in the Bayer array or the diagonal pixel array, the correlation direction is determined in the horizontal direction, the vertical direction, the direction rotated right by 45 degrees with respect to the horizontal direction, and the direction rotated left by 45 degrees with respect to the horizontal direction. A technique for performing an interpolation process based on a direction has been proposed (for example, see Patent Document 2).
Japanese Patent Laid-Open No. 11-220742 (FIG. 2) Japanese Patent Laying-Open No. 2007-037104 (FIG. 16)

ここで、ベイヤー配列と3板の解像度を比較した場合、斜め方向の解像度だけでなく、水平方向および垂直方向のナイキスト周波数付近の解像度が異なる。斜め方向の解像度は、G画素の画素数の違いから理論限界値が異なるため原理的な差が生じる。一方、水平方向および垂直方向のナイキスト周波数付近に関しては、正しい画素を用いて補間すれば解像度を損なうことがないはずであるが、何れの画素が正しい画素であるかを判断できないおそれがある。ここで、ナイキスト周波数とは、表現可能な限界周波数を意味し、具体的には、画素のサンプリング周波数をfsとしたときのその半分の周波数((1/2)・fs)となる。   Here, when the resolutions of the Bayer array and the three plates are compared, not only the resolution in the oblique direction but also the resolutions near the Nyquist frequency in the horizontal direction and the vertical direction are different. The resolution in the oblique direction differs in principle because the theoretical limit value differs from the difference in the number of G pixels. On the other hand, with respect to the vicinity of the Nyquist frequency in the horizontal direction and the vertical direction, if interpolation is performed using correct pixels, the resolution should not be impaired, but it may not be possible to determine which pixel is the correct pixel. Here, the Nyquist frequency means a limit frequency that can be expressed. Specifically, the Nyquist frequency is half that of the pixel sampling frequency fs ((1/2) · fs).

上述の問題は、ベイヤー配列以外の色フィルタ配列でも同様であり、例えばいわゆる斜め画素配列においても、水平方向および垂直方向で「(1/4)・fs」の周波数の信号に関して、ベイヤー配列における「(1/2)・fs」の場合と同様の現象が生じ得る。   The above-described problem is the same in color filter arrays other than the Bayer array. For example, in a so-called diagonal pixel array, a signal having a frequency of “(1/4) · fs” in the horizontal direction and the vertical direction is “ The same phenomenon as in the case of (1/2) · fs ”may occur.

本発明はこのような状況に鑑みてなされたものであり、デモザイク処理の際、色フィルタ配列に起因して補間方向が不明になる場合であっても、適切な補間値を生成することを目的とする。   The present invention has been made in view of such a situation, and an object of the present invention is to generate an appropriate interpolation value even when the interpolation direction is unclear due to the color filter array during the demosaic process. And

本発明は、上記課題を解決するためになされたものであり、その第1の側面は、複数の画素からなる画像データにおいて特定の画素の周辺領域における画素値の複数の方向に対する変化量を検出する周辺領域変化量検出手段と、上記周辺領域のさらに外周領域における画素値の複数の方向に対する変化量を検出する外周領域変化量検出手段と、上記周辺領域における変化量および上記外周領域における変化量を上記複数の方向ごとに合算する変化量合算手段と、上記複数の方向ごとに合算された変化量に基づいて上記周辺領域および上記外周領域を合わせた拡張領域における画素値の上記複数の方向に対する相関度を決定する拡張相関度決定手段と、上記決定された相関度に従って上記特定の画素に隣接する画素値から上記特定の画素の画素値を補間する補間手段とを具備することを特徴とする画像処理装置およびその処理方法ならびに当該方法をコンピュータに実行させるプログラムである。これにより、拡張領域における画素値の複数の方向に対する相関度に従って補間対象画素に隣接する画素値から補間対象画素の画素値を補間させるという作用をもたらす。   The present invention has been made to solve the above problems, and a first aspect of the present invention is to detect a change amount of a pixel value in a plurality of directions in a peripheral area of a specific pixel in image data including a plurality of pixels. A surrounding area change amount detecting means, an outer periphery area change amount detecting means for detecting a change amount of a pixel value in a plurality of directions in the outer peripheral area of the peripheral area, a change amount in the peripheral area, and a change amount in the outer peripheral area. Change amount summing means for summing up each of the plurality of directions, and pixel values in the extension region combining the peripheral region and the outer peripheral region based on the amount of change summed up in the plurality of directions with respect to the plurality of directions. Extended correlation degree determination means for determining a correlation degree, and a pixel value of the specific pixel from a pixel value adjacent to the specific pixel according to the determined correlation degree An image processing apparatus and processing method, and the method characterized by comprising an interpolation means for interpolating a is a program causing a computer to execute the. This brings about the effect | action that the pixel value of an interpolation object pixel is interpolated from the pixel value adjacent to an interpolation object pixel according to the correlation with respect to the several direction of the pixel value in an extended area | region.

また、この第1の側面において、上記周辺領域における画素値の複数の方向に対する変化量に基づいて上記周辺領域における画素値の上記複数の方向に対する相関度を決定する周辺相関度決定手段と、上記周辺領域における上記複数の方向に対する変化量のうち少なくとも2方向の変化量が所定の閾値に満たない場合には上記拡張領域における相関度を選択し、それ以外の場合には上記周辺領域における相関度を選択する相関度選択手段とをさらに具備し、上記補間手段は、上記選択された相関度に従って上記特定の画素に隣接する画素値から上記特定の画素の画素値を補間してもよい。これにより、周辺領域における変化量が所定の閾値に満たない場合に限り、拡張領域における相関度に従って補間対象画素に隣接する画素値から補間対象画素の画素値を補間させるという作用をもたらす。   Further, in this first aspect, the peripheral correlation degree determining means for determining the correlation degree of the pixel values in the peripheral area with respect to the plurality of directions based on the amount of change in the pixel values in the peripheral area with respect to the plurality of directions; When the amount of change in at least two directions among the amounts of change in the plurality of directions in the peripheral region is less than a predetermined threshold, the degree of correlation in the extended region is selected. In other cases, the degree of correlation in the peripheral region is selected. Correlation level selection means for selecting the pixel value, and the interpolation means may interpolate the pixel value of the specific pixel from pixel values adjacent to the specific pixel according to the selected correlation level. Thereby, only when the amount of change in the surrounding area is less than the predetermined threshold, the pixel value of the interpolation target pixel is interpolated from the pixel value adjacent to the interpolation target pixel according to the degree of correlation in the expansion area.

また、この第1の側面において、上記補間手段は、上記複数の方向ごとに合算された変化量のうち少なくとも2方向の変化量が所定の閾値に満たない場合には上記複数の方向に対して均等に上記特定の画素に隣接する画素値から上記特定の画素の画素値を補間してもよい。これにより、拡張領域における変化量が所定の閾値に満たない場合には補間対象画素の画素値を各方向に均等に補間させるという作用をもたらす。   Further, in this first aspect, the interpolating means may perform the interpolation for the plurality of directions when the amount of change in at least two directions out of the amount of change totaled for the plurality of directions does not satisfy a predetermined threshold. The pixel value of the specific pixel may be interpolated from pixel values adjacent to the specific pixel equally. As a result, when the amount of change in the extended region is less than the predetermined threshold, the pixel value of the interpolation target pixel is evenly interpolated in each direction.

また、本発明の第2の側面は、複数の画素からなる画像データにおいて特定の画素の周辺領域における画素値の複数の方向に対する変化量を検出する周辺領域変化量検出手段と、上記周辺領域のさらに外周領域における画素値の複数の方向に対する変化量を検出する外周領域変化量検出手段と、上記周辺領域における変化量および上記外周領域における変化量を上記複数の方向ごとに合算する変化量合算手段と、上記周辺領域における上記複数の方向に対する変化量のうち少なくとも2方向の変化量が所定の閾値に満たない場合には上記複数の方向ごとに合算された変化量を選択し、それ以外の場合には上記周辺領域における変化量を選択する変化量選択手段と、上記選択された変化量の逆数に従って上記特定の画素に隣接する画素値から上記特定の画素の画素値を補間する補間手段とを具備することを特徴とする画像処理装置である。これにより、周辺領域または拡張領域における画素値の複数の方向に対する変化量の逆数に従って補間対象画素に隣接する画素値から補間対象画素の画素値を補間させるという作用をもたらす。   According to a second aspect of the present invention, there is provided a peripheral region change amount detecting means for detecting a change amount of a pixel value in a plurality of directions in a peripheral region of a specific pixel in image data including a plurality of pixels, Further, a peripheral area change amount detecting means for detecting a change amount of a pixel value in a plurality of directions in the peripheral area, and a change amount adding means for adding the change amount in the peripheral area and the change amount in the peripheral area for each of the plurality of directions. And, if the amount of change in at least two directions among the amounts of change in the plurality of directions in the peripheral region is less than a predetermined threshold, select the amount of change added for each of the plurality of directions, otherwise Includes a change amount selecting means for selecting a change amount in the peripheral region, and a pixel value adjacent to the specific pixel according to the reciprocal of the selected change amount. An image processing apparatus characterized by comprising an interpolation means for interpolating a pixel value of a particular pixel. Accordingly, there is an effect that the pixel value of the interpolation target pixel is interpolated from the pixel value adjacent to the interpolation target pixel in accordance with the reciprocal of the amount of change in the plurality of directions of the pixel value in the peripheral region or the extension region.

また、この第2の側面において、上記補間手段は、上記複数の方向ごとに合算された変化量のうち少なくとも2方向の変化量が所定の閾値に満たない場合には上記複数の方向に対して均等に上記特定の画素に隣接する画素値から上記特定の画素の画素値を補間してもよい。これにより、拡張領域における変化量が所定の閾値に満たない場合には補間対象画素の画素値を各方向に均等に補間させるという作用をもたらす。   Further, in this second aspect, the interpolating unit may perform the correction with respect to the plurality of directions when the amount of change in at least two directions out of the amount of change added for each of the plurality of directions does not satisfy a predetermined threshold. The pixel value of the specific pixel may be interpolated from pixel values adjacent to the specific pixel equally. As a result, when the amount of change in the extended region is less than the predetermined threshold, the pixel value of the interpolation target pixel is evenly interpolated in each direction.

本発明によれば、デモザイク処理の際、色フィルタ配列に起因して補間方向が不明になる場合であっても、適切な補間値を生成することができるという優れた効果を奏し得る。   According to the present invention, it is possible to achieve an excellent effect that an appropriate interpolation value can be generated even when the interpolation direction is unclear due to the color filter array during the demosaic process.

次に本発明の実施の形態について図面を参照して詳細に説明する。   Next, embodiments of the present invention will be described in detail with reference to the drawings.

図1は、本発明の実施の形態における画像処理装置の一例である撮像装置の構成例を示す図である。この撮像装置は、レンズ110と、撮像素子120と、A/D(アナログ/デジタル)変換器130と、カメラ信号処理部140とを備えている。   FIG. 1 is a diagram illustrating a configuration example of an imaging apparatus which is an example of an image processing apparatus according to an embodiment of the present invention. This imaging apparatus includes a lens 110, an imaging element 120, an A / D (analog / digital) converter 130, and a camera signal processing unit 140.

レンズ110は、被写体からの光を撮像素子120に合焦させるものである。撮像素子120は、レンズ110から受光した光を電気信号に変換する光電変換回路である。この撮像素子120には、各画素の受光素子毎に赤(R)、緑(G)、青(B)の色フィルタが設けられ、各色成分の光のみが色フィルタを通過して受光素子に入射するようになっている。受光素子に入射した光は、フォトダイオードにより光電変換され、アナログ信号として読み出される。撮像素子120は、例えば、CCD(Charge Coupled Device:電荷結合素子)に代表される電荷転送型固体撮像素子や、MOS(Metal Oxide Semiconductor:金属酸化型半導体)に代表されるX−Yアドレス型固体撮像素子などにより実現される。A/D変換器130は、撮像素子120によって光電変換された電気信号をアナログ信号からデジタル信号に変換するものである。このデジタル信号は、カメラ信号処理部140に入力される。   The lens 110 focuses light from the subject on the image sensor 120. The image sensor 120 is a photoelectric conversion circuit that converts light received from the lens 110 into an electrical signal. The image sensor 120 is provided with a red (R), green (G), and blue (B) color filter for each light receiving element of each pixel, and only light of each color component passes through the color filter to the light receiving element. Incident. Light incident on the light receiving element is photoelectrically converted by a photodiode and read out as an analog signal. The image pickup device 120 is, for example, a charge transfer type solid-state image pickup device represented by a CCD (Charge Coupled Device) or an XY address type solid state represented by a MOS (Metal Oxide Semiconductor). This is realized by an image sensor or the like. The A / D converter 130 converts the electrical signal photoelectrically converted by the image sensor 120 from an analog signal to a digital signal. This digital signal is input to the camera signal processing unit 140.

カメラ信号処理部140は、光学系補正回路141と、WB(ホワイトバランス)回路142と、補間処理回路200と、ガンマ補正回路144と、Y信号処理回路145と、C信号処理回路146と、LPF(ローパスフィルタ)147と、間引き処理回路148とを備える。   The camera signal processing unit 140 includes an optical system correction circuit 141, a WB (white balance) circuit 142, an interpolation processing circuit 200, a gamma correction circuit 144, a Y signal processing circuit 145, a C signal processing circuit 146, and an LPF. (Low-pass filter) 147 and a thinning processing circuit 148 are provided.

光学系補正回路141は、カメラ信号処理部140に入力されるデジタル信号(画像信号)に対して黒レベルを合わせるデジタルクランプ、撮像素子120の欠陥を補正する欠陥補正、レンズ110の周辺光量落ちを補正するシェーディング補正など、撮像素子120や光学系の補正を行うものである。   The optical system correction circuit 141 performs a digital clamp that matches a black level with a digital signal (image signal) input to the camera signal processing unit 140, a defect correction that corrects a defect of the image sensor 120, and a peripheral light amount drop of the lens 110. The image sensor 120 and the optical system are corrected such as shading correction to be corrected.

ホワイトバランス回路142は、光学系補正回路141を経た画像信号に対して、白い被写体に対してRGBの各色が同じレベルになるようにホワイトバランス処理を行うものである。   The white balance circuit 142 performs white balance processing on an image signal that has passed through the optical system correction circuit 141 so that each color of RGB has the same level with respect to a white subject.

補間処理回路200は、それぞれ空間的に位相がずれたRGB信号から3枚のプレーン(同じ空間位置のRGB信号)を生成する補間処理を行うものである。この補間処理は、デモザイク処理とも呼ばれる。この補間処理回路200における補間処理は、本発明の特徴部分であり、その詳細については後述する。   The interpolation processing circuit 200 performs an interpolation process for generating three planes (RGB signals at the same spatial position) from RGB signals that are spatially out of phase. This interpolation processing is also called demosaic processing. The interpolation processing in the interpolation processing circuit 200 is a characteristic part of the present invention, and details thereof will be described later.

ガンマ補正回路144は、同じ空間位置のRGB信号に対してガンマ補正を施すものである。このガンマ補正は、被写体の色の階調を正しく表現するために、撮像素子120および後段の映像再生を行うシステム全体の光電変換特性を1とするように、ホワイトバランス回路142から出力されるRGBの各色信号に対してそれぞれ所定のゲインを掛ける処理である。このガンマ補正の施された画像信号は、Y信号処理回路145およびC信号処理回路146に供給される。   The gamma correction circuit 144 performs gamma correction on RGB signals at the same spatial position. In this gamma correction, the RGB output from the white balance circuit 142 is set so that the photoelectric conversion characteristics of the entire image pickup device 120 and the subsequent image reproduction system are set to 1 in order to correctly represent the color gradation of the subject. Is a process of multiplying each color signal by a predetermined gain. The gamma-corrected image signal is supplied to the Y signal processing circuit 145 and the C signal processing circuit 146.

Y信号処理回路145は、RGB信号から輝度信号(Y)を生成するものである。C信号処理回路146は、RGB信号から色差信号(CrおよびCb)を生成するものである。Y信号処理回路145およびC信号処理回路146は、例えばSD(Standard Definition)の場合、次式より輝度信号(Y)色差信号(CrおよびCb)を生成する。但し、この式の係数はおおまかな数値を示すものであり、厳密なものではない。
Y = 0.3R+0.6G+0.1B
Cr=R−Y= 0.7R−0.6G−0.1B
Cb=B−Y=−0.3R−0.6G+0.9B
The Y signal processing circuit 145 generates a luminance signal (Y) from the RGB signals. The C signal processing circuit 146 generates color difference signals (Cr and Cb) from the RGB signals. For example, in the case of SD (Standard Definition), the Y signal processing circuit 145 and the C signal processing circuit 146 generate a luminance signal (Y) color difference signal (Cr and Cb) by the following equation. However, the coefficient of this formula shows a rough numerical value, and is not exact.
Y = 0.3R + 0.6G + 0.1B
Cr = R−Y = 0.7R−0.6G−0.1B
Cb = B−Y = −0.3R−0.6G + 0.9B

ローパスフィルタ147は、C信号処理回路146によって生成された色差信号について、その通過帯域を制限するフィルタである。このローパスフィルタ147は、例えば色差信号(CrおよびCb)の通過帯域をサンプリング周波数fsの1/4まで落として、Y:Cr:Cb=4:2:2とする。間引き処理回路148は、色差信号(CrおよびCb)のサンプリングの間引きを行うものである。   The low-pass filter 147 is a filter that limits the passband of the color difference signal generated by the C signal processing circuit 146. For example, the low-pass filter 147 reduces the passband of the color difference signals (Cr and Cb) to ¼ of the sampling frequency fs, and sets Y: Cr: Cb = 4: 2: 2. The thinning processing circuit 148 thins out the sampling of the color difference signals (Cr and Cb).

ここで、本発明の特徴部分である補間処理回路200におけるデモザイク処理について説明する。   Here, demosaic processing in the interpolation processing circuit 200, which is a characteristic part of the present invention, will be described.

図2は、ベイヤー配列による各色の配列例を示す図である。ベイヤー配列では、R画素およびG画素が交互に配列された行と、G画素およびB画素が交互に配列された行とが交互に繰り返されている。G画素に着目すると、G画素は市松状に配置されており、G画素が存在しない空間位置にR画素またはB画素が配置されていることになる。これらの画素のサンプリング周波数をfsとすると画素ピッチは「1/fs」となる。   FIG. 2 is a diagram illustrating an example of the arrangement of each color based on the Bayer arrangement. In the Bayer array, rows in which R pixels and G pixels are alternately arranged and rows in which G pixels and B pixels are alternately arranged are alternately repeated. Focusing on the G pixel, the G pixel is arranged in a checkered pattern, and the R pixel or the B pixel is arranged at a spatial position where the G pixel does not exist. If the sampling frequency of these pixels is fs, the pixel pitch is “1 / fs”.

本発明の実施の形態では、デモザイク処理として、G画素が存在しない位置のG画素成分(以下、「補間対象画素」ともいう。)を他のG画素成分から補間することを想定する。これは、高解像度を実現するためには輝度成分が重要であり、G画素は輝度信号を生成する際に主成分となる色成分だからである。もっとも、同様の方法をR画素またはB画素にも適用可能である。また、輝度信号を生成する際に主成分となる他の色成分として、他にも、Cy(シアン)やYe(イエロー)などを利用することができる。   In the embodiment of the present invention, it is assumed that a G pixel component at a position where no G pixel exists (hereinafter, also referred to as “interpolation target pixel”) is interpolated from other G pixel components as demosaic processing. This is because the luminance component is important for realizing a high resolution, and the G pixel is a color component that becomes a main component when generating a luminance signal. However, the same method can be applied to R pixels or B pixels. In addition, Cy (cyan), Ye (yellow), or the like can be used as other color components that are the main components when generating a luminance signal.

デモザイク処理では、撮像素子が有しているRGBそれぞれの画素が表現可能な限界解像度までの信号を再現することになる。図3に示すように3板の場合には、RGBそれぞれの画素について解像度の理論限界値は「(1/2)・fs」となっている。一方、ベイヤー配列の場合、G画素の解像度の理論限界値は水平方向および垂直方向に「(1/2)・fs」であるが、斜め方向には解像度が低下してしまう。また、ベイヤー配列の場合、R画素およびB画素については、画素ピッチが2倍になるため、解像度の理論限界値は「(1/4)・fs」となる。したがって、このようにG画素とR画素およびB画素とのサンプリングレートが異なるため、補間処理が不適切な場合には偽信号を発生してしまい、解像度の低下や色偽の原因となってしまう。   In the demosaic process, a signal up to a limit resolution that can be expressed by each of the RGB pixels of the image sensor is reproduced. As shown in FIG. 3, in the case of three plates, the theoretical limit value of the resolution is “(1/2) · fs” for each pixel of RGB. On the other hand, in the case of the Bayer array, the theoretical limit value of the resolution of the G pixel is “(1/2) · fs” in the horizontal direction and the vertical direction, but the resolution decreases in the oblique direction. Further, in the case of the Bayer arrangement, the pixel pitch is doubled for the R pixel and the B pixel, so the theoretical limit value of the resolution is “(1/4) · fs”. Therefore, since the sampling rates of the G pixel, the R pixel, and the B pixel are different as described above, a false signal is generated when the interpolation processing is inappropriate, resulting in a decrease in resolution and color falseness. .

例えば、図4に示すような解像度チャートからなる入力画像(CPZ:Circular Zone Plate)を例にとって、画素の補間処理について考える。解像度チャートは、中心部分が低周波の信号であり、中心からの距離が大きくなるにつれて高周波の信号となるチャートである。解像度チャートは、同じ周波数の信号でも様々な方向を持っており、解像度チャートの信号を信号処理回路に入力することで、様々な信号に対してどのような処理が適するかを分析することができる。同図において、縦軸上のA点のように横線の被写体のときは、縦方向には画像信号にうねりが観察される一方、横方向の画像信号の相関は高いことから、横方向の画素を用いて補間する。また、横軸上のC点のように縦線の被写体のときは、横方向にはうねりが観察される一方、縦方向の画像信号の相関が高いことから、縦方向の画素を用いて補間する。このように相関が高い方向の周囲画像を用いて補間処理を行うことができれば、より高い解像度を実現することができる。   For example, pixel interpolation processing is considered by taking an input image (CPZ: Circular Zone Plate) composed of a resolution chart as shown in FIG. The resolution chart is a chart in which the central portion is a low-frequency signal and becomes a high-frequency signal as the distance from the center increases. The resolution chart has various directions even for signals of the same frequency. By inputting the resolution chart signal to the signal processing circuit, it is possible to analyze what processing is suitable for the various signals. . In the same figure, when the subject is a horizontal line such as point A on the vertical axis, the image signal is wavy in the vertical direction, but the correlation between the horizontal image signals is high. Interpolate using. In addition, when the subject is a vertical line such as point C on the horizontal axis, undulation is observed in the horizontal direction, while the correlation between the vertical image signals is high, so interpolation is performed using vertical pixels. To do. If interpolation processing can be performed using surrounding images in a direction with high correlation in this way, higher resolution can be realized.

しかしながら、以下に述べるように、相関が高い方向をうまく検出できない場合がある。例えば、黒い線と白い線とが水平方向または垂直方向にナイキスト周波数((1/2)・fs)で並んでいる場合、実際に何れの方向で並んでいるかを判別することができない。   However, as described below, there are cases in which a direction with a high correlation cannot be detected well. For example, when black lines and white lines are arranged in the horizontal direction or the vertical direction at the Nyquist frequency ((1/2) · fs), it is impossible to determine which direction is actually arranged.

例えば、黒い線の画素値を「10」、白い線の画素値を「80」としたとき、図5(a)のように縦線を並べた場合、および、図5(b)のように横線を並べた場合では、G画素だけで見ると全く同一の信号になってしまう。この場合、相関する方向が不明であるとして、図5(c)のように周囲4画素の平均値によって補間してしまうと、本来の信号を再現することができない。すなわち、正しい補間値を作るための画素は周囲に存在しているにも関わらず、相関する方向が検出できずに補間ミスを生じてしまう。   For example, when the pixel value of the black line is “10” and the pixel value of the white line is “80”, when vertical lines are arranged as shown in FIG. 5A, and as shown in FIG. In the case where the horizontal lines are arranged, the signals are exactly the same when viewed with only G pixels. In this case, assuming that the correlating direction is unknown, if interpolation is performed using the average value of the surrounding four pixels as shown in FIG. 5C, the original signal cannot be reproduced. That is, although pixels for creating a correct interpolation value are present in the vicinity, a correlated direction cannot be detected, resulting in an interpolation error.

この点、完全ナイキスト信号に対しては、レンズMTFの劣化や光学LPFにより撮像素子に入力される光の信号レベルがDC(直流成分)に近づいているため、相関ミスはそれほど目立たない。実際に問題になるのは、ナイキスト周波数よりも少し低い周波数付近(図3の点線部分参照)において相関ミスを生じ得ることである。水平方向または垂直方向のナイキスト周波数で相関検出ができないということは、傾向的にナイキスト周波数に近づくほど相関方向が不明となり、補間ミスを起こし易くなっていくことを意味する。入力画像が人工データの場合にはノイズがないため、相関検出が分からなくなる寸前まで敏感に相関検出を行えるため大きな問題にはならないが、実際にはノイズが存在するため相関検出を敏感にすると、ノイズの影響で補間方向が不安定となり不自然な画像になってしまう。そこで補間を安定化するために相関検出をある程度鈍感にする必要があるが、相関検出を鈍感にすればするほどナイキスト周波数付近の信号の解像度がなくなるという問題があった。   In this regard, for a complete Nyquist signal, since the signal level of the light input to the image sensor due to the degradation of the lens MTF and the optical LPF approaches DC (direct current component), the correlation error is not so noticeable. The actual problem is that a correlation error may occur near a frequency slightly lower than the Nyquist frequency (see the dotted line portion in FIG. 3). The fact that the correlation cannot be detected at the Nyquist frequency in the horizontal direction or the vertical direction means that the correlation direction becomes unknown as it is closer to the Nyquist frequency and interpolation errors are likely to occur. Since there is no noise when the input image is artificial data, it is not a big problem because the correlation detection can be performed sensitively until just before the correlation detection becomes unknown, but in reality there is noise, so if the correlation detection is made sensitive, The interpolation direction becomes unstable due to noise, resulting in an unnatural image. Therefore, in order to stabilize the interpolation, it is necessary to make the correlation detection somewhat insensitive, but there is a problem that the resolution of the signal near the Nyquist frequency is lost as the correlation detection is made insensitive.

一方、ナイキスト周波数付近の信号に対して相関する方向を検出する際に、R画素およびB画素を見たとしても、補間ミスは生じ得る。例えば、図6(a)のように、R画素およびB画素の画素値が「10」、G画素の画素値が「10」から「80」の振幅となる、緑色の縦線が並んでいる場合、R画素およびB画素を用いてG画素の補間対象画素を生成しようとすると、G画素の補間方向が水平方向になる。その結果、図6(b)のように、本来の縦線が格子模様になってしまう。このように、輝度信号生成に大きな寄与率をもつG画素を補間する際に、違う色の画素を使う場合は、有彩色の被写体に対して大きな副作用を伴う可能性がありリスクが高い。   On the other hand, even when the R pixel and the B pixel are viewed when detecting the correlation direction with respect to a signal near the Nyquist frequency, an interpolation error may occur. For example, as shown in FIG. 6A, green vertical lines in which the pixel values of the R pixel and the B pixel are “10” and the pixel values of the G pixel are “10” to “80” are arranged. In this case, when an interpolation target pixel of the G pixel is generated using the R pixel and the B pixel, the interpolation direction of the G pixel becomes the horizontal direction. As a result, the original vertical lines become a lattice pattern as shown in FIG. In this way, when interpolating G pixels having a large contribution ratio in luminance signal generation, if pixels of different colors are used, there is a possibility that a large side effect is caused on a chromatic color subject, and there is a high risk.

上述のように、ベイヤー配列ではナイキスト周波数付近で相関検出の精度が落ち、補間方向が分からなくなるという色フィルタ配列の原理的な問題があるが、ここではまず、補間ミスが生じたとき違和感のある被写体とはどのようなものかを考える。   As described above, in the Bayer array, there is a problem in principle of the color filter array that the accuracy of correlation detection decreases near the Nyquist frequency and the interpolation direction is not known, but here, first, there is a sense of incongruity when an interpolation error occurs. Consider what the subject is.

例えば、画像全体が5×5の25画素で構成されていて、そのときのG画素のみを観察したとすると、図7(a)の左側の場合には、人間にとってそのデータを見ても真の画像は何か分からない。このような場合、格子状、水平の線、垂直の線のうち、どの被写体であってもおかしくなく、図7(b)の左側のように様々な補間が想定可能である。   For example, if the entire image is composed of 25 pixels of 5 × 5, and only the G pixel at that time is observed, in the case of the left side of FIG. I don't know what the image is. In such a case, any subject out of a grid, a horizontal line, and a vertical line may be used, and various interpolations can be assumed as shown on the left side of FIG.

一方、図7(b)の左側のように、画像全体が5×5の25画素で構成されていても周囲のGがすべて揃っている場合の補間は、格子状、水平の線、垂直の線、いかなる場合も想定できるわけではなく、図7(b)の右側のように水平の線の確率が非常に高いことが想定され、この時に縦方向から補間したGを採用した場合には不自然な画像になる。   On the other hand, as shown on the left side of FIG. 7B, even when the entire image is composed of 25 pixels of 5 × 5, interpolation when the surrounding G is all aligned is a grid, horizontal line, vertical Lines cannot be assumed in any case, and it is assumed that the probability of a horizontal line is very high as shown on the right side of FIG. 7B. At this time, it is not possible to adopt G interpolated from the vertical direction. A natural image.

このように、補間により違和感を生じる場合というのは、周囲が水平方向の線であるのに、注目画素だけ縦線になっているというように、周囲の画像との比較によって決まるものであることが分かる。   As described above, the case where the sense of incongruity is caused by the interpolation is determined by comparison with the surrounding image such that the surrounding line is a horizontal line but only the target pixel is a vertical line. I understand.

そこで、本発明の実施の形態では、ナイキスト周波数付近のように相関検出の精度が劣化して補間方向が明確に分からない場合には、周囲の補間方向の向きに合わせるように補間を行うことで、比較的解像度のある自然な補間を行う。   Therefore, in the embodiment of the present invention, when the accuracy of correlation detection deteriorates as in the vicinity of the Nyquist frequency and the interpolation direction is not clearly known, the interpolation is performed so as to match the direction of the surrounding interpolation direction. Natural interpolation with relatively high resolution.

図8は、本発明の実施の形態における補間処理回路200の第1の構成例を示す図である。この補間処理回路200は、周辺領域垂直方向変化量検出部211と、周辺領域水平方向変化量検出部212と、外周領域垂直方向変化量検出部221と、外周領域水平方向変化量検出部222と、加算器231および232と、周辺領域相関度決定部240と、拡張領域相関度決定部250と、拡張判定部260と、相関度選択部270と、補間生成部290とを備えている。   FIG. 8 is a diagram illustrating a first configuration example of the interpolation processing circuit 200 according to the embodiment of the present invention. The interpolation processing circuit 200 includes a peripheral region vertical direction change amount detection unit 211, a peripheral region horizontal direction change amount detection unit 212, an outer periphery region vertical direction change amount detection unit 221, and an outer periphery region horizontal direction change amount detection unit 222. , Adders 231 and 232, a peripheral region correlation degree determination unit 240, an extended region correlation degree determination unit 250, an extension determination unit 260, a correlation degree selection unit 270, and an interpolation generation unit 290.

周辺領域垂直方向変化量検出部211および周辺領域水平方向変化量検出部212は、補間対象画素の周辺領域における画素値の各方向の変化量を検出するものである。例えば、図9において、7×7の49画素の中心が補間対象画素Xであり、周辺領域は、G1乃至12の12画素分のG画素からなる領域である。この周辺領域において、周辺領域垂直方向変化量検出部211は垂直方向の変化量を検出し、周辺領域水平方向変化量検出部212は水平方向の変化量を検出する。   The peripheral region vertical direction change amount detection unit 211 and the peripheral region horizontal direction change amount detection unit 212 detect the amount of change in each direction of the pixel value in the peripheral region of the interpolation target pixel. For example, in FIG. 9, the center of 49 pixels of 7 × 7 is the interpolation target pixel X, and the peripheral region is a region composed of G pixels of 12 pixels G1 to G12. In this peripheral region, the peripheral region vertical direction change amount detection unit 211 detects the vertical direction change amount, and the peripheral region horizontal direction change amount detection unit 212 detects the horizontal direction change amount.

ここで、周辺領域垂直方向変化量BPF_V_Xおよび周辺領域水平方向変化量BPF_H_Xは、以下の式により算出される。
BPF_V_X=|−(G1+G2)+2(G6+G7)−(G11+G12)|
BPF_H_X=|−(G3+G8)+2(G4+G9)−(G5+G10)|
この変化量が大きい場合にはその方向に振幅の大きい信号が存在し、相関が低いことが分かる。一方、変化量が小さい場合にはその方向で信号の変動が小さく、相関が高いことが分かる。この変化量は、図10のような周波数特性(−1,0,2,0,−1)を有するバンドパスフィルタをかけることと等価である。このバンドパスフィルタの特性は、「(1/4)・fs」にピークを有し、「(1/2)・fs」の限界解像度ぎりぎりまでの信号に対して値を出力するようになっている。
Here, the peripheral region vertical direction change amount BPF_V_X and the peripheral region horizontal direction change amount BPF_H_X are calculated by the following equations.
BPF_V_X = |-(G1 + G2) +2 (G6 + G7)-(G11 + G12) |
BPF_H_X = |-(G3 + G8) +2 (G4 + G9)-(G5 + G10) |
When this amount of change is large, there is a signal with a large amplitude in that direction, and it can be seen that the correlation is low. On the other hand, when the amount of change is small, it can be seen that the signal fluctuation is small in that direction and the correlation is high. This amount of change is equivalent to applying a band-pass filter having frequency characteristics (-1, 0, 2, 0, -1) as shown in FIG. The characteristics of this bandpass filter have a peak at “(1/4) · fs”, and output a value for a signal up to the limit resolution of “(1/2) · fs”. Yes.

外周領域垂直方向変化量検出部221および外周領域水平方向変化量検出部222は、補間対象画素の周辺領域の外周領域における画素値の各方向の変化量を検出するものである。例えば、図9において、外周領域は、G20乃至31の12画素分のG画素からなる領域である。この外周領域において、外周領域垂直方向変化量検出部221は垂直方向の変化量を検出し、外周領域水平方向変化量検出部222は水平方向の変化量を検出する。   The outer peripheral region vertical direction change amount detection unit 221 and the outer peripheral region horizontal direction change amount detection unit 222 detect the amount of change in each direction of the pixel value in the outer peripheral region of the peripheral region of the interpolation target pixel. For example, in FIG. 9, the outer peripheral region is a region made up of G pixels for 12 pixels G20 to 31. In this outer peripheral region, the outer peripheral region vertical direction change amount detecting unit 221 detects the vertical direction change amount, and the outer peripheral region horizontal direction change amount detecting unit 222 detects the horizontal direction change amount.

ここで、外周領域垂直方向変化量BPF_V_Yおよび外周領域水平方向変化量BPF_H_Yは、それぞれ図15における点a、b、c、dを中心とする変化量の総和として以下の式により算出される。
BPF_V_Y=|−(G20+G21)+2(G3+G4)−(G8+G9)|
+|−(G21+G22)+2(G4+G5)−(G9+G10)|
+|−(G3+G4)+2(G8+G9)−(G29+G30)|
+|−(G4+G5)+2(G9+G10)−(G30+G31)|
BPF_H_Y=|−(G23+G25)+2(G1+G6)−(G2+G7)|
+|−(G1+G6)+2(G2+G7)−(G24+G26)|
+|−(G25+G27)+2(G6+G11)−(G7+G12)|
+|−(G6+G11)+2(G7+G12)−(G26+G28)|
Here, the outer peripheral region vertical direction change amount BPF_V_Y and the outer peripheral region horizontal direction change amount BPF_H_Y are calculated by the following equations as the sum of the change amounts centered at points a, b, c, and d in FIG.
BPF_V_Y = |-(G20 + G21) +2 (G3 + G4)-(G8 + G9) |
+ |-(G21 + G22) +2 (G4 + G5)-(G9 + G10) |
+ |-(G3 + G4) +2 (G8 + G9)-(G29 + G30) |
+ |-(G4 + G5) +2 (G9 + G10)-(G30 + G31) |
BPF_H_Y = |-(G23 + G25) +2 (G1 + G6)-(G2 + G7) |
+ |-(G1 + G6) +2 (G2 + G7)-(G24 + G26) |
+ |-(G25 + G27) +2 (G6 + G11)-(G7 + G12) |
+ |-(G6 + G11) +2 (G7 + G12)-(G26 + G28) |

加算器231および232は、周辺領域および外周領域を合わせた拡張領域における変化量を出力するものである。すなわち、加算器231は、周辺領域垂直方向変化量BPF_V_Xと外周領域垂直方向変化量BPF_V_Yとを加算して、拡張領域垂直方向変化量BPF_V_Zを出力する。また、加算器232は、周辺領域水平方向変化量BPF_H_Xと外周領域水平方向変化量BPF_H_Yとを加算して、拡張領域水平方向変化量BPF_H_Zを出力する。
BPF_V_Z=BPF_V_X+BPF_V_Y
BPF_H_Z=BPF_H_X+BPF_H_Y
The adders 231 and 232 output the amount of change in the extended region that combines the peripheral region and the outer peripheral region. That is, the adder 231 adds the peripheral region vertical direction change amount BPF_V_X and the outer peripheral region vertical direction change amount BPF_V_Y, and outputs the extended region vertical direction change amount BPF_V_Z. The adder 232 adds the peripheral region horizontal direction change amount BPF_H_X and the outer peripheral region horizontal direction change amount BPF_H_Y, and outputs an extended region horizontal direction change amount BPF_H_Z.
BPF_V_Z = BPF_V_X + BPF_V_Y
BPF_H_Z = BPF_H_X + BPF_H_Y

周辺領域相関度決定部240は、補間対象画素の周辺領域における画素値の水平方向および垂直方向に対する相関度を決定するものである。この周辺領域相関度決定部240は、次式により周辺領域における垂直方向の相関度S_V_Xおよび水平方向の相関度S_H_Xを算出する。この相関度が大きい場合には相関が高く、相関度が小さい場合には相関が低いことになる。
S_H_X=BPF_V_X/(BPF_H_X+BPF_V_X)
S_V_X=BPF_H_X/(BPF_H_X+BPF_V_X)=1.0−S_H_X
The surrounding area correlation degree determination unit 240 determines the degree of correlation of the pixel values in the surrounding area of the interpolation target pixel with respect to the horizontal direction and the vertical direction. This peripheral area correlation degree determination unit 240 calculates the vertical correlation degree S_V_X and the horizontal correlation degree S_H_X in the peripheral area by the following equations. When this degree of correlation is large, the correlation is high, and when the degree of correlation is small, the correlation is low.
S_H_X = BPF_V_X / (BPF_H_X + BPF_V_X)
S_V_X = BPF_H_X / (BPF_H_X + BPF_V_X) = 1.0−S_H_X

例えば、図4のA点においてはS_H_X=1、S_V_X=0となり、水平方向に相関度が高く、垂直方向には相関がない。また、B点においてはS_H_X=S_V_X=0.5となり、水平方向および垂直方向の相関が同じ、すなわち水平方向および垂直方向のどちらも同じ画像の変化があることを示している。また、C点においてはS_H_X=0、S_V_X=1となり、垂直方向の相関度が高いことを示している。   For example, at point A in FIG. 4, S_H_X = 1 and S_V_X = 0, and the degree of correlation is high in the horizontal direction and there is no correlation in the vertical direction. At point B, S_H_X = S_V_X = 0.5, which indicates that the correlation in the horizontal direction and the vertical direction is the same, that is, the same image changes in both the horizontal direction and the vertical direction. At point C, S_H_X = 0 and S_V_X = 1, indicating that the degree of correlation in the vertical direction is high.

拡張領域相関度決定部250は、拡張領域における画素値の水平方向および垂直方向に対する相関度を決定するものである。この拡張領域相関度決定部250は、次式により拡張領域における垂直方向の相関度S_V_Zおよび水平方向の相関度S_H_Zを算出する。
S_H_Z=BPF_V_Z/(BPF_H_Z+BPF_V_Z)
S_V_Z=1.0−S_H_Z
The extended region correlation degree determination unit 250 determines the degree of correlation of pixel values in the extended region with respect to the horizontal direction and the vertical direction. The extended area correlation degree determination unit 250 calculates the correlation degree S_V_Z in the vertical direction and the correlation degree S_H_Z in the horizontal direction in the extended area by the following equations.
S_H_Z = BPF_V_Z / (BPF_H_Z + BPF_V_Z)
S_V_Z = 1.0−S_H_Z

拡張判定部260は、拡張領域において相関度を決定すべきか否かを判定するものである。拡張領域において相関度を決定するためには、補間対象画素から離れた画素の画素値を用いることになるため、周辺領域において相関度を決定できる場合にはそのまま周辺領域における相関度を採用した方がよいと考えられる。そのため、拡張判定部260は、周辺領域における水平方向および垂直方向の各変化量の値が予め定められた閾値に満たないことを検出して、閾値に満たない場合には拡張領域における画素値の相関度を採用し、閾値を超える場合には周辺領域における画素値の相関度を採用する。   The extension determination unit 260 determines whether or not the degree of correlation should be determined in the extension region. In order to determine the degree of correlation in the extended area, the pixel values of the pixels away from the interpolation target pixel are used. Therefore, when the degree of correlation can be determined in the surrounding area, the degree of correlation in the surrounding area is used as it is. Is considered good. Therefore, the extension determination unit 260 detects that the value of each amount of change in the horizontal direction and the vertical direction in the peripheral area is less than a predetermined threshold, and if not, the pixel value of the extension area The degree of correlation is adopted, and when the threshold value is exceeded, the degree of correlation of pixel values in the peripheral region is adopted.

閾値に満たない場合として考えられるのが、水平方向または垂直方向のナイキスト周波数付近、または、直流成分の被写体である。ナイキスト周波数付近の場合は拡張領域を用いることで補間精度が上がり、直流成分の被写体の場合は相関方向が何れであっても影響はない。したがって、水平方向および垂直方向の各変化量の値が予め定められた閾値に満たない場合に拡張領域を用いて相関度の検出を行う、という手法で副作用なく動作させることができる。   A case where the threshold value is not satisfied is a subject in the vicinity of the Nyquist frequency in the horizontal direction or the vertical direction or a DC component. In the vicinity of the Nyquist frequency, the interpolation accuracy is improved by using the extended region, and in the case of a subject having a DC component, there is no influence regardless of the correlation direction. Therefore, it is possible to operate without a side effect by a method of detecting the degree of correlation using the extended region when the value of each change amount in the horizontal direction and the vertical direction is less than a predetermined threshold value.

相関度選択部270は、拡張判定部260による判定結果に応じて周辺領域相関度決定部240または拡張領域相関度決定部250の出力を選択するものである。すなわち、相関度選択部270は、周辺領域における水平方向および垂直方向の各変化量の値が予め定められた閾値に満たない場合には拡張領域相関度決定部250によって決定された相関度を選択し、閾値を超える場合には周辺領域相関度決定部240によって決定された相関度を選択することになる。   Correlation degree selection section 270 selects the output of peripheral area correlation degree determination section 240 or extended area correlation degree determination section 250 according to the determination result by extension determination section 260. That is, the correlation degree selection unit 270 selects the correlation degree determined by the extended area correlation degree determination unit 250 when the change values in the horizontal direction and the vertical direction in the peripheral area are less than a predetermined threshold value. If the threshold value is exceeded, the correlation degree determined by the peripheral region correlation degree determination unit 240 is selected.

補間生成部290は、相関度選択部270により選択された相関度に従って、補間対象画素に隣接する画素値を補間するものである。例えば、相関度選択部270において拡張領域の相関度が選択された場合、図9の補間対象画素Xにおける補間値GXは次式のように算出される。
GX=((G6+G7)×S_H_Z+(G4+G9)×S_V_Z)/2
The interpolation generation unit 290 interpolates pixel values adjacent to the interpolation target pixel according to the correlation level selected by the correlation level selection unit 270. For example, when the correlation degree of the extended region is selected by the correlation degree selection unit 270, the interpolation value GX in the interpolation target pixel X in FIG. 9 is calculated as follows.
GX = ((G6 + G7) × S_H_Z + (G4 + G9) × S_V_Z) / 2

すなわち、補間値GXは、相関度が高い方向に対して大きい重みをかけて補間される。例えば、図4のA点では、GX=(G6+G7)/2となり、水平方向で補間される。B点では、GX=(G6+G7+G4+G9)/4となり、水平方向および垂直方向の画素が均等な重みで補間される。C点では、GX=(G4+G9)/2となり、垂直方向で補間される。   That is, the interpolation value GX is interpolated by applying a large weight to the direction in which the degree of correlation is high. For example, at point A in FIG. 4, GX = (G6 + G7) / 2 and interpolation is performed in the horizontal direction. At point B, GX = (G6 + G7 + G4 + G9) / 4, and horizontal and vertical pixels are interpolated with equal weights. At point C, GX = (G4 + G9) / 2, and interpolation is performed in the vertical direction.

図11は、本発明の実施の形態における補間処理回路200の第1の構成例による画像処理方法の処理手順を示す図である。   FIG. 11 is a diagram illustrating a processing procedure of an image processing method according to the first configuration example of the interpolation processing circuit 200 according to the embodiment of the present invention.

まず、周辺領域垂直方向変化量検出部211および周辺領域水平方向変化量検出部212では、周辺領域における垂直方向および水平方向の画素値の変化量が算出される(ステップS911)。拡張判定部260における判定の結果、周辺領域における水平方向および垂直方向の各変化量の値が予め定められた閾値を超える場合には周辺領域における画素値の変化量に基づいて補間が行われる(ステップS913)。すなわち、周辺領域における水平方向変化量が周辺領域における垂直方向変化量より小さければ(ステップS912)、水平方向に補間が行われる(ステップS922)。一方、周辺領域における水平方向変化量が周辺領域における垂直方向変化量より小さくなければ(ステップS912)、垂直方向に補間が行われる(ステップS921)。   First, the peripheral region vertical direction change amount detection unit 211 and the peripheral region horizontal direction change amount detection unit 212 calculate the amount of change in the vertical and horizontal pixel values in the peripheral region (step S911). As a result of the determination in the extension determination unit 260, when the value of each change amount in the horizontal direction and the vertical direction in the peripheral region exceeds a predetermined threshold value, interpolation is performed based on the change amount of the pixel value in the peripheral region ( Step S913). That is, if the horizontal direction change amount in the peripheral region is smaller than the vertical direction change amount in the peripheral region (step S912), interpolation is performed in the horizontal direction (step S922). On the other hand, if the horizontal direction change amount in the peripheral region is not smaller than the vertical direction change amount in the peripheral region (step S912), interpolation is performed in the vertical direction (step S921).

拡張判定部260における判定の結果、周辺領域における水平方向および垂直方向の各変化量の値が予め定められた閾値に満たない場合には(ステップS913)、拡張領域における画素値の変化量に基づいて補間が行われる。そのため、外周領域垂直方向変化量検出部221および外周領域水平方向変化量検出部222において、外周領域における水平方向および垂直方向の各変化量が算出され、加算器231および232によって周辺領域の変化量と加算されることにより、拡張領域における画素値の変化量が算出される(ステップS914)。拡張領域における水平方向変化量が拡張領域における垂直方向変化量より小さければ(ステップS916)、水平方向に補間が行われる(ステップS924)。一方、拡張領域における水平方向変化量が拡張領域における垂直方向変化量より小さくなければ(ステップS916)、垂直方向に補間が行われる(ステップS923)。   As a result of the determination by the extension determination unit 260, when the value of each change amount in the horizontal direction and the vertical direction in the peripheral region is less than a predetermined threshold value (step S913), based on the change amount of the pixel value in the extension region. Is interpolated. For this reason, the outer peripheral region vertical direction change amount detecting unit 221 and the outer peripheral region horizontal direction change amount detecting unit 222 calculate the horizontal direction and vertical direction change amounts in the outer peripheral region, and the adders 231 and 232 change the peripheral region change amount. Is added to calculate the amount of change in the pixel value in the extended region (step S914). If the horizontal direction change amount in the extension region is smaller than the vertical direction change amount in the extension region (step S916), interpolation is performed in the horizontal direction (step S924). On the other hand, if the horizontal direction change amount in the extension region is not smaller than the vertical direction change amount in the extension region (step S916), interpolation is performed in the vertical direction (step S923).

なお、同図の処理手順では、各方向に対する変化量の大小により補間方向を決定する例を示したが、上述のように、変化量から相関度を求めて、相関度に応じて補間値を生成してもよい。   In the processing procedure shown in the figure, an example in which the interpolation direction is determined based on the amount of change with respect to each direction has been described. It may be generated.

ここまでは、本発明の実施の形態におけるデモザイク処理のベイヤー配列への適用例について説明したが、本発明は他の色フィルタ配列にも適用可能である。以下では、いわゆる斜め配列への適用例について説明する。   Up to this point, the application example of the demosaic processing to the Bayer array in the embodiment of the present invention has been described. However, the present invention is also applicable to other color filter arrays. Below, the example of application to what is called a diagonal arrangement | sequence is demonstrated.

図12は、本発明の実施の形態のデモザイク処理の対象となる他の色フィルタ配列の一例を示す図である。この配列は、水平および垂直方向の各画素ピッチを√2dとし、各画素が1行毎および1列毎に画素ピッチ√2dの1/2ずつずれた、いわゆる斜め画素配列であり、GとRが交互に配列されたRGラインと、Gのみが配列されたGラインと、BとGが交互に配列されたGBラインと、Gのみが配列されたGラインの4行を単位として繰り返し配列されている。   FIG. 12 is a diagram illustrating an example of another color filter array that is a target of demosaic processing according to the embodiment of this invention. This arrangement is a so-called diagonal pixel arrangement in which each pixel pitch in the horizontal and vertical directions is √2d, and each pixel is shifted by ½ of the pixel pitch √2d for each row and each column. Are arranged in units of four rows of RG lines in which G is arranged alternately, G lines in which only G is arranged, GB lines in which B and G are arranged alternately, and G lines in which only G is arranged. ing.

この斜め画素配列では、G画素だけで観察した際に、水平方向および垂直方向に「(1/4)・fs」の場合と、「(1/2)・fs」の場合とで同様の問題が起こることが分かっている。水平方向および垂直方向に「(1/2)・fs」の場合はベイヤー配列と全く同じことが起こるが、水平方向および垂直方向に「(1/4)・fs」の場合に相関検出が不明確になるのは、この配列特有のものである。   In this diagonal pixel arrangement, when only G pixels are observed, the same problem occurs in the case of “(1/4) · fs” and “(1/2) · fs” in the horizontal and vertical directions. Is known to happen. In the case of “(1/2) · fs” in the horizontal and vertical directions, exactly the same thing as the Bayer array occurs, but in the case of “(1/4) · fs” in the horizontal and vertical directions, correlation detection is not possible. What is clear is unique to this sequence.

このように、色フィルタ配列が異なると、補間の相関が分からない周波数も異なる場合がある。しかし、そのような場合であっても、相関検出する領域を周辺領域から拡張領域に広げることにより、補間精度を向上させることができる。   Thus, when the color filter array is different, the frequency at which the correlation of interpolation is not known may be different. However, even in such a case, the interpolation accuracy can be improved by expanding the correlation detection area from the peripheral area to the extended area.

例えば、図13のように、「(1/4)・fs」の縦線の被写体を撮影した際に、元々存在するG画素だけを観察しても、縦方向または横方向のどちらの線であるかを判別することはできない。このとき、周辺領域において相関検出を行うと、以下のようになる。
垂直方向変化量=0
水平方向変化量=0
右斜方向変化量=400
左斜方向変化量=400
この値は、相関がある被写体においては不自然な値である。
For example, as shown in FIG. 13, when a subject with a vertical line of “(1/4) · fs” is photographed, even if only the originally existing G pixel is observed, the vertical or horizontal line is used. It cannot be determined whether it exists. At this time, if correlation detection is performed in the peripheral region, the following is obtained.
Vertical variation = 0
Horizontal change = 0
Right oblique direction change amount = 400
Left oblique direction change amount = 400
This value is unnatural for a correlated subject.

ここで、図4のような様々な角度を持った解像度チャートで見ると、A点における変化量は以下のようになる。
垂直方向変化量=大
水平方向変化量=0
右斜方向変化量=中
左斜方向変化量=中
Here, when viewed from a resolution chart having various angles as shown in FIG. 4, the amount of change at point A is as follows.
Vertical change amount = large Horizontal change amount = 0
Right oblique direction change amount = Middle Left oblique direction change amount = Medium

同様に、C点では以下のようになる。
垂直方向変化量=0
水平方向変化量=大
右斜方向変化量=中
左斜方向変化量=中
Similarly, at point C:
Vertical variation = 0
Horizontal change amount = Large Right oblique direction change amount = Medium Left oblique direction change amount = Medium

同様に、D点では以下のようになる。
垂直方向変化量=小
水平方向変化量=大
右斜方向変化量=大
左斜方向変化量=中
Similarly, at point D:
Vertical change amount = Small Horizontal change amount = Large Right oblique direction change amount = Large Left oblique direction change amount = Medium

すなわち、「(1/4)・fs」以外では、水平方向および垂直方向の変化量と、斜め方向の変化量は連続して変化していることがわかる。   That is, except for “(1/4) · fs”, it can be seen that the amount of change in the horizontal and vertical directions and the amount of change in the oblique direction change continuously.

これに対し、水平方向および垂直方向に「(1/4)・fs」の場合には水平方向および垂直方向の変化量が「0」であるのに、斜め方向の変化量が大きな値であり不連続な相関を示していることが分かる。このように斜め画素配列の場合、G画素の相関が分からなくなる水平方向および垂直方向に「(1/4)・fs」であるか否かの判断は、4方向の変化量を見ることで検出可能であると考えられる。   In contrast, in the case of “(1/4) · fs” in the horizontal and vertical directions, the change in the horizontal and vertical directions is “0”, but the change in the oblique direction is a large value. It can be seen that the correlation is discontinuous. As described above, in the case of the diagonal pixel arrangement, the determination as to whether or not “(1/4) · fs” is in the horizontal direction and the vertical direction where the correlation of the G pixel is unknown is detected by looking at the amount of change in the four directions. It is considered possible.

図14は、本発明の実施の形態における補間処理回路200の第2の構成例を示す図である。この補間処理回路200の第2の構成例は、第1の構成例に加えて、周辺領域右斜方向変化量検出部213と、周辺領域左斜方向変化量検出部214と、補償処理部280とをさらに備えている。   FIG. 14 is a diagram illustrating a second configuration example of the interpolation processing circuit 200 according to the embodiment of the present invention. In addition to the first configuration example, the second configuration example of the interpolation processing circuit 200 includes a peripheral region right oblique direction change amount detection unit 213, a peripheral region left oblique direction change amount detection unit 214, and a compensation processing unit 280. And further.

周辺領域垂直方向変化量検出部211、周辺領域水平方向変化量検出部212、周辺領域右斜方向変化量検出部213および周辺領域左斜方向変化量検出部214は、補間対象画素の周辺領域における画素値の各方向の変化量を検出するものである。例えば、図15において、中心が補間対象画素Xであり、周辺領域は、G1乃至16の16画素分のG画素からなる領域である。この周辺領域において、周辺領域垂直方向変化量検出部211は垂直方向の変化量を検出し、周辺領域水平方向変化量検出部212は水平方向の変化量を検出し、周辺領域右斜方向変化量検出部213右斜方向(右肩上がりに45度傾斜した方向)の変化量を検出し、周辺領域左斜方向変化量検出部214は左斜方向(左肩上がりに45度傾斜した方向)の変化量を検出する。   The peripheral area vertical direction change amount detection unit 211, the peripheral area horizontal direction change amount detection unit 212, the peripheral area right oblique direction change amount detection unit 213, and the peripheral area left oblique direction change amount detection unit 214 are arranged in the peripheral region of the interpolation target pixel. The amount of change in each direction of the pixel value is detected. For example, in FIG. 15, the center is the interpolation target pixel X, and the peripheral area is an area composed of G pixels of 16 pixels G1 to G16. In this peripheral region, the peripheral region vertical direction change amount detection unit 211 detects the vertical direction change amount, the peripheral region horizontal direction change amount detection unit 212 detects the horizontal direction change amount, and the peripheral region right oblique direction change amount The detection unit 213 detects a change amount in the right oblique direction (a direction inclined 45 degrees upward to the right shoulder), and the peripheral region left oblique direction change amount detection unit 214 detects a change in the left oblique direction (a direction inclined 45 degrees upward to the left shoulder). Detect the amount.

ここで、周辺領域垂直方向変化量BPF_V_X、周辺領域水平方向変化量BPF_H_X、周辺領域右斜方向変化量BPF_R_Xおよび周辺領域左斜方向変化量BPF_L_Xは、以下の式により算出される。
BPF_V_X=|−G1+2×G5−G11|+|−G5+2×G11−G15|
+|−G2+2×G6−G12|+|−G6+2×G12−G16|
BPF_H_X=|−G4+2×G5−G6|+|−G5+2×G6−G7|
+|−G10+2×G11−G12|+|−G11+2×G12−G13|
BPF_R_X=|−G2+2×G3−G5|+|−G5+2×G8−G10|
+|−G7+2×G9−G12|+|−G12+2×G14−G15|
BPF_L_X=|−G1+2×G3−G6|+|−G6+2×G9−G13|
+|−G4+2×G8−G11|+|−G11+2×G14−G16|
Here, the peripheral region vertical direction change amount BPF_V_X, the peripheral region horizontal direction change amount BPF_H_X, the peripheral region right oblique direction change amount BPF_R_X, and the peripheral region left oblique direction change amount BPF_L_X are calculated by the following equations.
BPF_V_X = | −G1 + 2 × G5−G11 | + | −G5 + 2 × G11−G15 |
+ | −G2 + 2 × G6−G12 | + | −G6 + 2 × G12−G16 |
BPF_H_X = | −G4 + 2 × G5−G6 | + | −G5 + 2 × G6−G7 |
+ | −G10 + 2 × G11−G12 | + | −G11 + 2 × G12−G13 |
BPF_R_X = | −G2 + 2 × G3−G5 | + | −G5 + 2 × G8−G10 |
+ | −G7 + 2 × G9−G12 | + | −G12 + 2 × G14−G15 |
BPF_L_X = | −G1 + 2 × G3−G6 | + | −G6 + 2 × G9−G13 |
+ | −G4 + 2 × G8−G11 | + | −G11 + 2 × G14−G16 |

外周領域垂直方向変化量検出部221および外周領域水平方向変化量検出部222は、補間対象画素の周辺領域の外周領域における画素値の各方向の変化量を検出するものである。例えば、図15において、外周領域は、G20乃至47の28画素分のG画素からなる領域である。この外周領域において、外周領域垂直方向変化量検出部221は垂直方向の変化量を検出し、外周領域水平方向変化量検出部222は水平方向の変化量を検出する。   The outer peripheral region vertical direction change amount detection unit 221 and the outer peripheral region horizontal direction change amount detection unit 222 detect the amount of change in each direction of the pixel value in the outer peripheral region of the peripheral region of the interpolation target pixel. For example, in FIG. 15, the outer peripheral area is an area composed of G pixels for 28 pixels of G20 to 47. In this outer peripheral region, the outer peripheral region vertical direction change amount detecting unit 221 detects the vertical direction change amount, and the outer peripheral region horizontal direction change amount detecting unit 222 detects the horizontal direction change amount.

ここで、外周領域垂直方向変化量BPF_V_Yおよび外周領域水平方向変化量BPF_H_Yは、それぞれ図15における点a、b、c、dを中心とする変化量の総和として以下の式により算出される。
BPF_V_Y=|−G20+2×G23−G1|+|−G23+2×G1−G5|
+|−G21+2×G24−G2|+|−G24+2×G2−G6|
+|−G26+2×G31−G35|+|−G31+2×G35−G38|
+|−G27+2×G4−G10|+|−G4+2×G10−G39|
+|−G28+2×G7−G13|+|−G7+2×G13−G40|
+|−G29+2×G32−G36|+|−G32+2×G36−G41|
+|−G11+2×G15−G43|+|−G15+2×G43−G46|
+|−G12+2×G16−G44|+|−G16+2×G44−G47|
BPF_H_Y=|−G22+2×G23−G24|+|−G23+2×G24−G25|
+|−G27+2×G1−G2|+|−G1+2×G2−G28|
+|−G30+2×G31−G4|+|−G31+2×G4−G5|
+|−G34+2×G35−G10|+|−G35+2×G10−G11|
+|−G6+2×G7−G32|+|−G7+2×G32−G33|
+|−G12+2×G13−G36|+|−G13+2×G36−G37|
+|−G39+2×G15−G16|+|−G15+2×G16−G40|
+|−G42+2×G43−G44|+|−G43+2×G44−G45|
Here, the outer peripheral region vertical direction change amount BPF_V_Y and the outer peripheral region horizontal direction change amount BPF_H_Y are calculated by the following equations as the sum of the change amounts centered at points a, b, c, and d in FIG.
BPF_V_Y = | −G20 + 2 × G23−G1 | + | −G23 + 2 × G1−G5 |
+ | −G21 + 2 × G24−G2 | + | −G24 + 2 × G2−G6 |
+ | −G26 + 2 × G31−G35 | + | −G31 + 2 × G35−G38 |
+ | −G27 + 2 × G4−G10 | + | −G4 + 2 × G10−G39 |
+ | −G28 + 2 × G7−G13 | + | −G7 + 2 × G13−G40 |
+ | −G29 + 2 × G32−G36 | + | −G32 + 2 × G36−G41 |
+ | −G11 + 2 × G15−G43 | + | −G15 + 2 × G43−G46 |
+ | −G12 + 2 × G16−G44 | + | −G16 + 2 × G44−G47 |
BPF_H_Y = | −G22 + 2 × G23−G24 | + | −G23 + 2 × G24−G25 |
+ | −G27 + 2 × G1−G2 | + | −G1 + 2 × G2−G28 |
+ | −G30 + 2 × G31−G4 | + | −G31 + 2 × G4−G5 |
+ | −G34 + 2 × G35−G10 | + | −G35 + 2 × G10−G11 |
+ | −G6 + 2 × G7−G32 | + | −G7 + 2 × G32−G33 |
+ | −G12 + 2 × G13−G36 | + | −G13 + 2 × G36−G37 |
+ | −G39 + 2 × G15−G16 | + | −G15 + 2 × G16−G40 |
+ | −G42 + 2 × G43−G44 | + | −G43 + 2 × G44−G45 |

加算器231および232は、第1の構成例と同様に、周辺領域および外周領域を合わせた拡張領域における変化量を出力するものである。   The adders 231 and 232 output the amount of change in the extended region including the peripheral region and the outer peripheral region, as in the first configuration example.

周辺領域相関度決定部240は、補間対象画素の周辺領域における画素値の水平方向、垂直方向、右斜方向および左斜方向に対する相関度を決定するものである。この場合、周辺領域相関度決定部240は、水平方向、垂直方向、右斜方向および左斜方向のうち、変化量の最も少ない方向を相関度の高い方向として出力することができる。   The surrounding area correlation degree determination unit 240 determines the degree of correlation of the pixel values in the surrounding area of the interpolation target pixel with respect to the horizontal direction, the vertical direction, the right oblique direction, and the left oblique direction. In this case, the peripheral region correlation degree determination unit 240 can output the direction with the smallest amount of change among the horizontal direction, the vertical direction, the right oblique direction, and the left oblique direction as a direction with a high degree of correlation.

拡張判定部260は、拡張領域において相関度を決定すべきか否かを判定するものである。この第2の構成例では、拡張判定部260は、水平方向および垂直方向に「(1/4)・fs」となる場合に、拡張領域における画素値の相関度を採用する。そのために、以下の2つの条件を満たすか否かが判定される。
条件(1):4方向変化量においてソートして、最も小さい値および2番目に小さい値の方向が水平方向および垂直方向であること。但し、順番は何れでもよい。
条件(2):水平方向および垂直方向の変化量の差分が所定の閾値以下であること。
The extension determination unit 260 determines whether or not the degree of correlation should be determined in the extension region. In the second configuration example, the extension determination unit 260 employs the correlation value of the pixel values in the extension region when “(1/4) · fs” is obtained in the horizontal direction and the vertical direction. Therefore, it is determined whether or not the following two conditions are satisfied.
Condition (1): Sorting in four direction change amounts, the direction of the smallest value and the second smallest value is the horizontal direction and the vertical direction. However, the order may be any.
Condition (2): The difference between the amount of change in the horizontal direction and the vertical direction is not more than a predetermined threshold.

条件(1)および(2)の両者を満たす場合には拡張領域における画素値の相関度を採用し、少なくとも何れか一方を満たさない場合には周辺領域における画素値の相関度を採用する。また、条件(1)のみを満たし、条件(2)を満たさない場合には、直流成分からなる画像であると考えられるため、隣接する画素値から均等に補間する。   When both of the conditions (1) and (2) are satisfied, the correlation value of the pixel values in the extended region is adopted, and when at least one of the conditions is not satisfied, the correlation value of the pixel values in the peripheral region is adopted. Further, when only the condition (1) is satisfied and the condition (2) is not satisfied, it is considered that the image is composed of a direct current component, and therefore, interpolation is performed equally from adjacent pixel values.

相関のある被写体では上述の条件(1)および(2)を満たすことはない。また、直流成分の画像にノイズが入った場合には条件(1)および(2)を満たす可能性があるが、そのような画像においてG画素の補間方向は重要ではないため、特に問題にはならない。   A correlated object does not satisfy the above conditions (1) and (2). Further, when noise is included in the DC component image, the conditions (1) and (2) may be satisfied. However, since the G pixel interpolation direction is not important in such an image, the problem is particularly problematic. Don't be.

拡張領域相関度決定部250は、第1の構成例と同様に、拡張領域における画素値の水平方向および垂直方向に対する相関度を決定するものである。第2の構成例による周辺領域相関度決定部240では、水平方向および垂直方向のみならず、右斜方向および左斜方向に対する相関度を判定しているが、条件(1)を満たす場合には、斜め方向は変化量が大きいため、斜め補間は想定されない。したがって、この場合、拡張領域相関度決定部250は、水平方向および垂直方向のうち、変化量の少ない方向を相関度の高い方向として出力する。   Similar to the first configuration example, the extended region correlation degree determination unit 250 determines the correlation degree of the pixel values in the extended region with respect to the horizontal direction and the vertical direction. The surrounding area correlation degree determination unit 240 according to the second configuration example determines the degree of correlation not only in the horizontal direction and the vertical direction but also in the right oblique direction and the left oblique direction. When the condition (1) is satisfied, Since the amount of change is large in the diagonal direction, diagonal interpolation is not assumed. Therefore, in this case, the expanded region correlation degree determination unit 250 outputs a direction with a small amount of change between the horizontal direction and the vertical direction as a direction with a high degree of correlation.

相関度選択部270は、拡張判定部260による判定結果に応じて周辺領域相関度決定部240または拡張領域相関度決定部250の出力を選択するものである。すなわち、相関度選択部270は、上述の条件(1)および(2)の両者を満たす場合には拡張領域相関度決定部250によって決定された相関度を選択し、少なくとも何れか一方を満たさない場合には周辺領域相関度決定部240によって決定された相関度を選択することになる。   Correlation degree selection section 270 selects the output of peripheral area correlation degree determination section 240 or extended area correlation degree determination section 250 according to the determination result by extension determination section 260. That is, the correlation degree selection unit 270 selects the correlation degree determined by the extended region correlation degree determination unit 250 when both of the above conditions (1) and (2) are satisfied, and does not satisfy at least one of them. In this case, the correlation degree determined by the peripheral region correlation degree determination unit 240 is selected.

補償処理部280は、拡張領域で相関度を検出する場合の補償処理を行うものである。上述の条件(1)および(2)を満たす場合でも、人工データのように「(1/4)・fs」の信号が永遠と羅列されている信号では、補間方向が一定せず不安定になるおそれがある。そこで、補償処理部280は、次式が成立する場合には何れの方向にも相関がないと判断して、補間生成部290に指示する。
|拡張領域の水平方向変化量−拡張領域の垂直方向変化量|<閾値
The compensation processing unit 280 performs compensation processing when the degree of correlation is detected in the extended region. Even when the above conditions (1) and (2) are satisfied, the interpolation direction is not constant and unstable with a signal in which the signals of “(1/4) · fs” are listed forever like artificial data There is a risk. Therefore, the compensation processing unit 280 determines that there is no correlation in any direction when the following expression is satisfied, and instructs the interpolation generation unit 290.
| Horizontal change amount of extended area−Vertical change amount of extended area | <Threshold

補間生成部290は、相関度選択部270により選択された相関度に従って、補間対象画素に隣接する画素値を補間するものである。例えば、相関度選択部270において周辺領域の相関度が選択された場合、図15の補間対象画素Xにおける補間値GXは、周辺領域の水平方向変化量が最小であればGX=(G8+G9)/2、周辺領域の右斜方向変化量が最小であればGX=(G6+G11)/2のように算出される。   The interpolation generation unit 290 interpolates pixel values adjacent to the interpolation target pixel according to the correlation level selected by the correlation level selection unit 270. For example, when the correlation degree of the surrounding area is selected by the correlation degree selecting unit 270, the interpolation value GX in the interpolation target pixel X in FIG. 15 is GX = (G8 + G9) / if the horizontal direction change amount of the surrounding area is minimum. 2. If the amount of change in the right oblique direction of the peripheral region is the minimum, GX = (G6 + G11) / 2 is calculated.

また、拡張判定部260において、直流成分であると判定された場合には、補間生成部290は隣接する画素値から均等に補間値を生成する。また、補償処理部280において、何れの方向にも相関がないと判断された場合も同様であり、補間生成部290は隣接する画素値から均等に補間値を生成する。この場合、例えば、図15の補間対象画素Xにおける補間値GXは、GX=(G5+G6+G11+G12)/4のように算出される。   In addition, when the extension determination unit 260 determines that the component is a direct current component, the interpolation generation unit 290 generates an interpolation value evenly from adjacent pixel values. The same applies to the case where the compensation processing unit 280 determines that there is no correlation in any direction, and the interpolation generation unit 290 generates interpolation values equally from adjacent pixel values. In this case, for example, the interpolation value GX in the interpolation target pixel X in FIG. 15 is calculated as GX = (G5 + G6 + G11 + G12) / 4.

なお、拡張領域で相関度を検出しても補間方向が一定しないとの判断が補償処理部280においてされた場合、所定の係数αによって均等な補間値と拡張領域で決定された補間値とを混合してもよい。この場合、補間値GXは、以下のように算出される。
GX=α×((G5+G6+G11+G12)/4)
+(α−1)×(拡張領域で決定された補間値)
If the compensation processing unit 280 determines that the interpolation direction is not constant even if the degree of correlation is detected in the extended region, an equal interpolation value and an interpolation value determined in the extended region are determined by a predetermined coefficient α. You may mix. In this case, the interpolation value GX is calculated as follows.
GX = α × ((G5 + G6 + G11 + G12) / 4)
+ (Α-1) × (interpolated value determined in the extended region)

図16は、本発明の実施の形態における補間処理回路200の第2の構成例による画像処理方法の処理手順を示す図である。   FIG. 16 is a diagram illustrating a processing procedure of an image processing method according to the second configuration example of the interpolation processing circuit 200 according to the embodiment of the present invention.

まず、周辺領域垂直方向変化量検出部211、周辺領域水平方向変化量検出部212、周辺領域右斜方向変化量検出部213および周辺領域左斜方向変化量検出部214では、周辺領域における垂直方向、水平方向、右斜方向および左斜方向の画素値の変化量が算出される(ステップS931)。拡張判定部260における判定の結果、算出された4方向の変化量のうち、最も小さい値および2番目に小さい値の方向が水平方向および垂直方向でないと判定された場合には(ステップS932)、補間生成部290は周辺領域の変化量が最も小さい方向を補間方向として補間値を生成する(ステップS941)。   First, the peripheral region vertical direction change amount detection unit 211, the peripheral region horizontal direction change amount detection unit 212, the peripheral region right oblique direction change amount detection unit 213, and the peripheral region left oblique direction change amount detection unit 214 perform the vertical direction in the peripheral region. The change amount of the pixel value in the horizontal direction, the right oblique direction, and the left oblique direction is calculated (step S931). As a result of the determination in the extension determination unit 260, when it is determined that the direction of the smallest value and the second smallest value among the calculated change amounts in the four directions is not the horizontal direction and the vertical direction (step S932). The interpolation generation unit 290 generates an interpolation value with the direction in which the change amount of the peripheral area is the smallest as the interpolation direction (step S941).

また、拡張判定部260における判定の結果、算出された4方向の変化量のうち、最も小さい値および2番目に小さい値の方向が水平方向および垂直方向であると判定され(ステップS932)、かつ、水平方向および垂直方向の変化量の差分が所定の閾値以上であると判定された場合には(ステップS933)、直流成分であると考えられるため、補間生成部290は隣接する画素値から均等に補間値を生成する(ステップS942)。   As a result of the determination in the extension determination unit 260, it is determined that the direction of the smallest value and the second smallest value among the calculated amounts of change in the four directions is the horizontal direction and the vertical direction (step S932), and When it is determined that the difference between the change amounts in the horizontal direction and the vertical direction is equal to or greater than the predetermined threshold (step S933), since it is considered to be a direct current component, the interpolation generation unit 290 equalizes the adjacent pixel values. An interpolation value is generated (step S942).

また、拡張判定部260における判定の結果、算出された4方向の変化量のうち、最も小さい値および2番目に小さい値の方向が水平方向および垂直方向であると判定され(ステップS932)、かつ、水平方向および垂直方向の変化量の差分が所定の閾値未満であると判定された場合には(ステップS933)、水平方向および垂直方向に「(1/4)・fs」となると考えられるため、拡張領域における画素値の変化量に基づいて補間が行われる。そのため、外周領域垂直方向変化量検出部221および外周領域水平方向変化量検出部222において、外周領域における水平方向および垂直方向の各変化量が算出され、加算器231および232によって周辺領域の変化量と加算されることにより、拡張領域における画素値の変化量が算出される(ステップS934)。   As a result of the determination in the extension determination unit 260, it is determined that the direction of the smallest value and the second smallest value among the calculated amounts of change in the four directions is the horizontal direction and the vertical direction (step S932), and If it is determined that the difference between the change amounts in the horizontal direction and the vertical direction is less than the predetermined threshold (step S933), it is considered that “(1/4) · fs” is obtained in the horizontal direction and the vertical direction. Interpolation is performed based on the amount of change in the pixel value in the extended region. For this reason, the outer peripheral region vertical direction change amount detecting unit 221 and the outer peripheral region horizontal direction change amount detecting unit 222 calculate the horizontal direction and vertical direction change amounts in the outer peripheral region, and the adders 231 and 232 change the peripheral region change amount. Is added to calculate the amount of change in the pixel value in the extended region (step S934).

その結果、補償処理部280において、拡張領域の水平方向変化量と拡張領域の垂直方向変化量との差分の絶対値が所定の閾値に満たないと判断された場合には(ステップS935)、何れの方向にも相関がないと考えられるため、補間生成部290は隣接する画素値から均等に補間値を生成する(ステップS942)。   As a result, when the compensation processing unit 280 determines that the absolute value of the difference between the horizontal direction change amount of the extension region and the vertical direction change amount of the extension region is less than the predetermined threshold (step S935), Therefore, the interpolation generation unit 290 generates an interpolation value equally from adjacent pixel values (step S942).

一方、補償処理部280において、拡張領域の水平方向変化量と拡張領域の垂直方向変化量との差分の絶対値が所定の閾値以上であると判断された場合には、拡張領域における変化量に応じて補間値が生成される。すなわち、拡張領域における水平方向変化量が拡張領域における垂直方向変化量より小さければ(ステップS936)、水平方向に補間が行われる(ステップS944)。一方、拡張領域における水平方向変化量が拡張領域における垂直方向変化量より小さくなければ(ステップS936)、垂直方向に補間が行われる(ステップS943)。   On the other hand, when the compensation processing unit 280 determines that the absolute value of the difference between the horizontal direction change amount of the extension region and the vertical direction change amount of the extension region is equal to or greater than a predetermined threshold, the change amount in the extension region is set. In response, an interpolated value is generated. That is, if the horizontal direction change amount in the extension region is smaller than the vertical direction change amount in the extension region (step S936), interpolation is performed in the horizontal direction (step S944). On the other hand, if the horizontal direction change amount in the extension region is not smaller than the vertical direction change amount in the extension region (step S936), interpolation is performed in the vertical direction (step S943).

図17は、本発明の実施の形態における効果の一例を示す図である。図17(a)は、上述の斜め画素配列において、周辺領域のみで相関を検出した場合の補間処理後の画像例である。この例では、中央の楕円で囲まれた領域の一部において誤った方向に補間されているのがわかる。   FIG. 17 is a diagram showing an example of the effect in the embodiment of the present invention. FIG. 17A shows an example of an image after the interpolation processing when the correlation is detected only in the peripheral region in the above-described oblique pixel arrangement. In this example, it can be seen that a part of the region surrounded by the central ellipse is interpolated in the wrong direction.

一方、図17(b)は、上述の斜め画素配列において、拡張領域で相関を検出した場合の補間処理後の画像例である。この例では、図17(a)で誤った方向に補間されていた部分についても、違和感なく補間されていることがわかる。   On the other hand, FIG. 17B is an image example after the interpolation processing in the case where the correlation is detected in the extended region in the above-described oblique pixel array. In this example, it can be seen that the portion that was interpolated in the wrong direction in FIG.

なお、本発明の実施の形態では、画素値の各方向に対する変化量を比較することにより相関度を求めて、その相関度に従って補間値を生成する例について説明したが、変化量から直接、重み付け補間を行うようにしてもよい。その場合、以下のように、画素値の各方向に対する変化量の逆数を重みとして、加重平均により補間値GXを求めることができる。
In the embodiment of the present invention, the example in which the degree of correlation is obtained by comparing the amount of change in each direction of the pixel value and the interpolation value is generated according to the degree of correlation has been described. Interpolation may be performed. In this case, as described below, the interpolation value GX can be obtained by weighted average using the reciprocal of the amount of change in each direction of the pixel value as a weight.

ここで、図15の補間対象画素Xを想定すると、各補間値は以下の式により算出することができる。
水平方向補間値=(G8+G9)/2
垂直方向補間値=(G3+G14)/2
右斜方向補間値=(G6+G11)/2
左斜方向補間値=(G5+G12)/2
Here, assuming the interpolation target pixel X in FIG. 15, each interpolation value can be calculated by the following equation.
Horizontal interpolation value = (G8 + G9) / 2
Vertical interpolation value = (G3 + G14) / 2
Interpolated value in right oblique direction = (G6 + G11) / 2
Left diagonal direction interpolation value = (G5 + G12) / 2

図18は、本発明の実施の形態における補間処理回路200の変形例を示す図である。この変形例は、上述の重み付け補間を行うためのものであり、図14の構成例と比較して、周辺領域相関度決定部240、拡張領域相関度決定部250および相関度選択部270に代えて、変化量選択部277が設けられている。この変化量選択部277は、拡張判定部260による判定結果に従って、周辺領域または外周領域の変化量を選択するものである。補間生成部290は、この選択された変化量に基づいて、補間対象画素における補間値を生成する。   FIG. 18 is a diagram showing a modification of the interpolation processing circuit 200 in the embodiment of the present invention. This modification is for performing the above-described weighted interpolation, and is replaced with the peripheral region correlation degree determination unit 240, the extended region correlation degree determination unit 250, and the correlation degree selection unit 270, as compared with the configuration example of FIG. Thus, a change amount selection unit 277 is provided. The change amount selection unit 277 selects a change amount of the peripheral region or the outer peripheral region according to the determination result by the extension determination unit 260. The interpolation generation unit 290 generates an interpolation value in the interpolation target pixel based on the selected change amount.

図19は、本発明の実施の形態における変化量選択部277の一構成例を示す図である。この変化量選択部277は、垂直方向変化量選択器271と、水平方向変化量選択器272と、右斜方向変化量選択器273と、左斜方向変化量選択器274とを備えている。   FIG. 19 is a diagram illustrating a configuration example of the change amount selection unit 277 according to the embodiment of the present invention. The change amount selection unit 277 includes a vertical direction change amount selector 271, a horizontal direction change amount selector 272, a right oblique direction change amount selector 273, and a left oblique direction change amount selector 274.

垂直方向変化量選択器271は、拡張判定部260の判定結果に応じて、周辺領域垂直方向変化量検出部211からの周辺領域の垂直方向変化量または加算器231からの拡張領域の垂直方向変化量の何れか一方を選択するものである。   The vertical direction change amount selector 271 determines the vertical direction change amount of the peripheral region from the peripheral region vertical direction change amount detection unit 211 or the vertical direction change of the extension region from the adder 231 according to the determination result of the extension determination unit 260. One of the quantities is selected.

水平方向変化量選択器272は、拡張判定部260の判定結果に応じて、周辺領域水平方向変化量検出部212からの周辺領域の水平方向変化量または加算器232からの拡張領域の水平方向変化量の何れか一方を選択するものである。   The horizontal direction change amount selector 272 determines the horizontal direction change amount of the peripheral region from the peripheral region horizontal direction change amount detection unit 212 or the horizontal direction change of the extension region from the adder 232 according to the determination result of the extension determination unit 260. One of the quantities is selected.

右斜方向変化量選択器273は、拡張判定部260の判定結果に応じて、周辺領域右斜方向変化量検出部213からの周辺領域の右斜方向変化量または最大値を示す定数値の何れか一方を選択するものである。   The right oblique direction change amount selector 273 selects either the right oblique direction change amount or the maximum value of the peripheral region from the peripheral region right oblique direction change amount detection unit 213 according to the determination result of the extension determination unit 260. Either one is selected.

左斜方向変化量選択器274は、拡張判定部260の判定結果に応じて、周辺領域左斜方向変化量検出部214からの周辺領域の左斜方向変化量または最大値を示す定数値の何れか一方を選択するものである。   The left oblique direction change amount selector 274 determines either the left oblique direction change amount or the maximum value of the peripheral region from the peripheral region left oblique direction change amount detection unit 214 according to the determination result of the extension determination unit 260. Either one is selected.

拡張判定部260によって拡張領域における相関度が採用された場合には、右斜方向変化量選択器273および左斜方向変化量選択器274は、変化量として最大値を出力する。これは、右斜方向および左斜方向に相関がないことを意味するものである。   When the degree of correlation in the extended region is adopted by the extension determination unit 260, the right oblique direction change amount selector 273 and the left oblique direction change amount selector 274 output a maximum value as the change amount. This means that there is no correlation between the right oblique direction and the left oblique direction.

図20は、本発明の実施の形態における補間処理回路200の第2の構成例による画像処理方法の処理手順の変形例を示す図である。   FIG. 20 is a diagram showing a modification of the processing procedure of the image processing method according to the second configuration example of the interpolation processing circuit 200 in the embodiment of the present invention.

この変形例では、ステップS961およびS963における処理が図16の処理手順と異なっている。図16のステップS941では周辺領域における変化量が最小となる方向が選択され、その方向に従って補間が行われたが、この変形例では、周辺領域における変化量の逆数を重みとして加重平均による重み付け補間が行われる(ステップS961)。また、図16のステップS936、S943およびS944では拡張領域における変化量が最小となる方向が選択され、その方向に従って補間が行われたが、この変形例では、拡張領域における変化量の逆数を重みとして加重平均による重み付け補間が行われる(ステップS963)。   In this modification, the processes in steps S961 and S963 are different from the process procedure of FIG. In step S941 in FIG. 16, the direction in which the amount of change in the peripheral region is minimized is selected, and interpolation is performed according to the direction. In this modification, weighted interpolation by weighted average is performed using the reciprocal of the amount of change in the peripheral region as a weight. Is performed (step S961). In addition, in steps S936, S943, and S944 in FIG. 16, the direction in which the amount of change in the extended region is minimized is selected, and interpolation is performed according to the direction. In this modification, the reciprocal of the amount of change in the extended region is weighted. As a result, weighted interpolation by weighted average is performed (step S963).

このように、本発明の実施の形態によれば、デモザイク処理において、補間対象画素の周辺領域のさらに外周領域を含む拡張領域における画素値の各方向に対する変化量を検出することにより、周囲の補間方向に合わせて補間値を生成することができ、補間精度を向上させ、自然な補間を行うことが可能となる。また、異なる領域における変化量を加算することにより、耐ノイズ性能を向上させることができる。   As described above, according to the embodiment of the present invention, in the demosaic process, by detecting the amount of change in the pixel value in each direction in the extended region including the outer peripheral region of the peripheral region of the interpolation target pixel, the surrounding interpolation is performed. Interpolation values can be generated according to the direction, so that the interpolation accuracy can be improved and natural interpolation can be performed. Moreover, noise resistance can be improved by adding the amount of change in different regions.

なお、本発明の実施の形態では、拡張領域の具体例を挙げて説明したが、本発明はこれに限定されるものではなく、補間精度を向上させるために必要に応じてさらに広げてもよい。   In the embodiment of the present invention, the specific example of the extended region has been described. However, the present invention is not limited to this, and may be further expanded as necessary in order to improve the interpolation accuracy. .

また、本発明の実施の形態は本発明を具現化するための一例を示したものであり、以下に示すように特許請求の範囲における発明特定事項とそれぞれ対応関係を有するが、これに限定されるものではなく本発明の要旨を逸脱しない範囲において種々の変形を施すことができる。   Further, the embodiment of the present invention shows an example for embodying the present invention, and has a corresponding relationship with the invention specific matter in the claims as shown below, but is not limited thereto. However, various modifications can be made without departing from the scope of the present invention.

なお、本発明の実施の形態において説明した処理手順は、これら一連の手順を有する方法として捉えてもよく、また、これら一連の手順をコンピュータに実行させるためのプログラム乃至そのプログラムを記憶する記録媒体として捉えてもよい。   The processing procedure described in the embodiment of the present invention may be regarded as a method having a series of these procedures, and a program for causing a computer to execute these series of procedures or a recording medium storing the program May be taken as

本発明の実施の形態における画像処理装置の一例である撮像装置の構成例を示す図である。It is a figure which shows the structural example of the imaging device which is an example of the image processing apparatus in embodiment of this invention. ベイヤー配列による各色の配列例を示す図である。It is a figure which shows the example of an arrangement | sequence of each color by a Bayer arrangement | sequence. 3板およびベイヤー配列の限界解像度を示す図である。It is a figure which shows the limiting resolution of 3 plates and a Bayer arrangement. 解像度チャート(CPZ)を示す図である。It is a figure which shows a resolution chart (CPZ). ベイヤー配列における問題点を示す図である。It is a figure which shows the problem in a Bayer arrangement | sequence. ベイヤー配列における問題点を示す他の図である。It is another figure which shows the problem in a Bayer arrangement. ベイヤー配列における補間例を示す図である。It is a figure which shows the example of interpolation in a Bayer arrangement | sequence. 本発明の実施の形態における補間処理回路200の第1の構成例を示す図である。It is a figure which shows the 1st structural example of the interpolation processing circuit 200 in embodiment of this invention. ベイヤー配列においてG画素を抜き出した図である。It is the figure which extracted G pixel in Bayer arrangement. バンドパスフィルタの周波数特性を示す図である。It is a figure which shows the frequency characteristic of a band pass filter. 本発明の実施の形態における補間処理回路200の第1の構成例による画像処理方法の処理手順を示す図である。It is a figure which shows the process sequence of the image processing method by the 1st structural example of the interpolation processing circuit 200 in embodiment of this invention. 本発明の実施の形態のデモザイク処理の対象となる他の色フィルタ配列(斜め画素配列)の一例を示す図である。It is a figure which shows an example of the other color filter arrangement | sequence (diagonal pixel arrangement | sequence) used as the object of the demosaic process of embodiment of this invention. 斜め画素配列における問題点を示す図である。It is a figure which shows the problem in a diagonal pixel arrangement | sequence. 本発明の実施の形態における補間処理回路200の第2の構成例を示す図である。It is a figure which shows the 2nd structural example of the interpolation processing circuit 200 in embodiment of this invention. 斜め画素配列においてG画素を抜き出した図である。It is the figure which extracted G pixel in the diagonal pixel arrangement. 本発明の実施の形態における補間処理回路200の第2の構成例による画像処理方法の処理手順を示す図である。It is a figure which shows the process sequence of the image processing method by the 2nd structural example of the interpolation processing circuit 200 in embodiment of this invention. 本発明の実施の形態における効果の一例を示す図である。It is a figure which shows an example of the effect in embodiment of this invention. 本発明の実施の形態における補間処理回路200の変形例を示す図である。It is a figure which shows the modification of the interpolation processing circuit 200 in embodiment of this invention. 本発明の実施の形態における変化量選択部277の一構成例を示す図である。It is a figure which shows one structural example of the variation | change_quantity selection part 277 in embodiment of this invention. 本発明の実施の形態における補間処理回路200の第2の構成例による画像処理方法の処理手順の変形例を示す図である。It is a figure which shows the modification of the process sequence of the image processing method by the 2nd structural example of the interpolation process circuit 200 in embodiment of this invention.

符号の説明Explanation of symbols

110 レンズ
120 撮像素子
130 A/D変換器
140 カメラ信号処理部
141 光学系補正回路
142 ホワイトバランス回路
144 ガンマ補正回路
145 Y信号処理回路
146 C信号処理回路
147 ローパスフィルタ
148 間引き処理回路
200 補間処理回路
211 周辺領域垂直方向変化量検出部
212 周辺領域水平方向変化量検出部
213 周辺領域右斜方向変化量検出部
214 周辺領域左斜方向変化量検出部
221 外周領域垂直方向変化量検出部
222 外周領域水平方向変化量検出部
231、232 加算器
240 周辺領域相関度決定部
250 拡張領域相関度決定部
260 拡張判定部
270 相関度選択部
271 垂直方向変化量選択器
272 水平方向変化量選択器
273 右斜方向変化量選択器
274 左斜方向変化量選択器
277 変化量選択部
280 補償処理部
290 補間生成部
DESCRIPTION OF SYMBOLS 110 Lens 120 Image pick-up element 130 A / D converter 140 Camera signal processing part 141 Optical system correction circuit 142 White balance circuit 144 Gamma correction circuit 145 Y signal processing circuit 146 C signal processing circuit 147 Low-pass filter 148 Decimation processing circuit 200 Interpolation processing circuit 211 Peripheral area vertical direction change detection unit 212 Peripheral area horizontal direction change detection part 213 Peripheral area right oblique direction change detection part 214 Peripheral area left oblique direction change detection part 221 Outer peripheral area vertical direction change detection part 222 Outer peripheral area Horizontal direction change detection unit 231, 232 Adder 240 Peripheral region correlation degree determination unit 250 Extended region correlation degree determination unit 260 Extension determination unit 270 Correlation degree selection unit 271 Vertical direction change amount selector 272 Horizontal direction change amount selector 273 Right Diagonal change amount selector 274 Left diagonal Direction change amount selector 277 changes amount selector 280 compensation processor 290 interpolation data generation unit

Claims (4)

複数の画素からなる画像データにおいて特定の画素の周辺領域における画素値の複数の方向に対する変化量を検出する周辺領域変化量検出手段と、
前記周辺領域のさらに外周領域における画素値の複数の方向に対する変化量を検出する外周領域変化量検出手段と、
前記周辺領域における変化量および前記外周領域における変化量を前記複数の方向ごとに合算する変化量合算手段と、
前記複数の方向ごとに合算された変化量に基づいて前記周辺領域および前記外周領域を合わせた拡張領域における画素値の前記複数の方向に対する相関度を決定する拡張相関度決定手段と、
前記周辺領域における画素値の複数の方向に対する変化量に基づいて前記周辺領域における画素値の前記複数の方向に対する相関度を決定する周辺相関度決定手段と、
前記周辺領域における前記複数の方向に対する変化量のうち少なくとも2方向の変化量が所定の閾値に満たない場合には前記拡張領域における相関度を選択し、それ以外の場合には前記周辺領域における相関度を選択する相関度選択手段と、
前記選択された相関度に従って前記特定の画素に隣接する画素値から前記特定の画素の画素値を補間する補間手段と
を具備する画像処理装置。
A peripheral region change amount detecting means for detecting a change amount in a plurality of directions of a pixel value in a peripheral region of a specific pixel in image data composed of a plurality of pixels;
A peripheral region change amount detecting means for detecting a change amount of a pixel value in a plurality of directions in a further peripheral region of the peripheral region;
Change amount adding means for adding the change amount in the peripheral region and the change amount in the outer peripheral region for each of the plurality of directions;
An expanded correlation degree determining means for determining a correlation degree of the pixel values in the extended area combining the peripheral area and the outer peripheral area based on the amount of change added for each of the plurality of directions;
Peripheral correlation degree determining means for determining a correlation degree of the pixel values in the peripheral region with respect to the plurality of directions based on a change amount of the pixel value in the peripheral region with respect to the plurality of directions;
When the amount of change in at least two directions among the amounts of change in the peripheral region in the plurality of directions is less than a predetermined threshold, the degree of correlation in the extended region is selected, and in other cases, the correlation in the peripheral region is selected. Correlation degree selecting means for selecting the degree;
The selected the particular said specific to that images processing device and a interpolation means for interpolating the pixel value of the pixel from the pixel values adjacent to the pixel in accordance with the degree of correlation.
前記補間手段は、前記複数の方向ごとに合算された変化量のうち少なくとも2方向の変化量が所定の閾値に満たない場合には前記複数の方向に対して均等に前記特定の画素に隣接する画素値から前記特定の画素の画素値を補間する
求項1記載の画像処理装置。
The interpolating unit is adjacent to the specific pixel evenly with respect to the plurality of directions when the amount of change in at least two directions out of the amount of change combined for each of the plurality of directions is less than a predetermined threshold. Interpolate the pixel value of the specific pixel from the pixel value
The image processing apparatus Motomeko 1 wherein.
複数の画素からなる画像データにおいて特定の画素の周辺領域における画素値の複数の方向に対する変化量を検出する周辺領域変化量検出手順と、
前記周辺領域のさらに外周領域における画素値の複数の方向に対する変化量を検出する外周領域変化量検出手順と、
前記周辺領域における変化量および前記外周領域における変化量を前記複数の方向ごとに合算する変化量合算手順と、
前記複数の方向ごとに合算された変化量に基づいて前記周辺領域および前記外周領域を合わせた拡張領域における画素値の前記複数の方向に対する相関度を決定する拡張相関度決定手順と、
前記周辺領域における画素値の複数の方向に対する変化量に基づいて前記周辺領域における画素値の前記複数の方向に対する相関度を決定する周辺相関度決定手順と、
前記周辺領域における前記複数の方向に対する変化量のうち少なくとも2方向の変化量が所定の閾値に満たない場合には前記拡張領域における相関度を選択し、それ以外の場合には前記周辺領域における相関度を選択する相関度選択手順と、
前記選択された相関度に従って前記特定の画素に隣接する画素値から前記特定の画素の画素値を補間する補間手順と
を具備する画像処理方法。
A peripheral region change amount detection procedure for detecting a change amount in a plurality of directions of pixel values in a peripheral region of a specific pixel in image data including a plurality of pixels;
A peripheral region change amount detection procedure for detecting a change amount in a plurality of directions of pixel values in a further peripheral region of the peripheral region;
A change amount adding procedure for adding the change amount in the peripheral region and the change amount in the outer peripheral region for each of the plurality of directions;
An extended correlation degree determination procedure for determining a correlation degree of the pixel values in the extension area combining the peripheral area and the outer peripheral area based on the amount of change added for each of the plurality of directions;
A peripheral correlation degree determination procedure for determining a correlation degree of the pixel values in the peripheral area with respect to the plurality of directions based on a change amount of the pixel value in the peripheral area with respect to the plurality of directions;
When the amount of change in at least two directions among the amounts of change in the peripheral region in the plurality of directions is less than a predetermined threshold, the degree of correlation in the extended region is selected, and in other cases, the correlation in the peripheral region is selected. Correlation degree selection procedure for selecting the degree,
The selected interpolation procedure to that images processing method comprising the interpolating a pixel value of the particular pixel from the pixel values adjacent to the specific pixel in accordance with correlation.
複数の画素からなる画像データにおいて特定の画素の周辺領域における画素値の複数の方向に対する変化量を検出する周辺領域変化量検出手順と、
前記周辺領域のさらに外周領域における画素値の複数の方向に対する変化量を検出する外周領域変化量検出手順と、
前記周辺領域における変化量および前記外周領域における変化量を前記複数の方向ごとに合算する変化量合算手順と、
前記複数の方向ごとに合算された変化量に基づいて前記周辺領域および前記外周領域を合わせた拡張領域における画素値の前記複数の方向に対する相関度を決定する拡張相関度決定手順と、
前記周辺領域における画素値の複数の方向に対する変化量に基づいて前記周辺領域における画素値の前記複数の方向に対する相関度を決定する周辺相関度決定手順と、
前記周辺領域における前記複数の方向に対する変化量のうち少なくとも2方向の変化量が所定の閾値に満たない場合には前記拡張領域における相関度を選択し、それ以外の場合には前記周辺領域における相関度を選択する相関度選択手順と、
前記選択された相関度に従って前記特定の画素に隣接する画素値から前記特定の画素の画素値を補間する補間手順と
をコンピュータに実行させるプログラム。
A peripheral region change amount detection procedure for detecting a change amount in a plurality of directions of pixel values in a peripheral region of a specific pixel in image data including a plurality of pixels;
A peripheral region change amount detection procedure for detecting a change amount in a plurality of directions of pixel values in a further peripheral region of the peripheral region;
A change amount adding procedure for adding the change amount in the peripheral region and the change amount in the outer peripheral region for each of the plurality of directions;
An extended correlation degree determination procedure for determining a correlation degree of the pixel values in the extension area combining the peripheral area and the outer peripheral area based on the amount of change added for each of the plurality of directions;
A peripheral correlation degree determination procedure for determining a correlation degree of the pixel values in the peripheral area with respect to the plurality of directions based on a change amount of the pixel value in the peripheral area with respect to the plurality of directions;
When the amount of change in at least two directions among the amounts of change in the peripheral region in the plurality of directions is less than a predetermined threshold, the degree of correlation in the extended region is selected, and in other cases, the correlation in the peripheral region is selected. Correlation degree selection procedure for selecting the degree,
Help program to execute the interpolation procedure on the computer to interpolate the pixel value of the particular pixel from the pixel values adjacent to the specific pixel in accordance with the selected correlation.
JP2007211522A 2007-08-14 2007-08-14 Image processing apparatus, image processing method, and program Expired - Fee Related JP5040519B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2007211522A JP5040519B2 (en) 2007-08-14 2007-08-14 Image processing apparatus, image processing method, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2007211522A JP5040519B2 (en) 2007-08-14 2007-08-14 Image processing apparatus, image processing method, and program

Publications (2)

Publication Number Publication Date
JP2009049532A JP2009049532A (en) 2009-03-05
JP5040519B2 true JP5040519B2 (en) 2012-10-03

Family

ID=40501360

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2007211522A Expired - Fee Related JP5040519B2 (en) 2007-08-14 2007-08-14 Image processing apparatus, image processing method, and program

Country Status (1)

Country Link
JP (1) JP5040519B2 (en)

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8594840B1 (en) 2004-07-07 2013-11-26 Irobot Corporation Celestial navigation system for an autonomous robot
US8606401B2 (en) 2005-12-02 2013-12-10 Irobot Corporation Autonomous coverage robot navigation system
US8656550B2 (en) 2002-01-03 2014-02-25 Irobot Corporation Autonomous floor-cleaning robot
US9480381B2 (en) 2007-05-09 2016-11-01 Irobot Corporation Compact autonomous coverage robot
US9486924B2 (en) 2004-06-24 2016-11-08 Irobot Corporation Remote control scheduler and method for autonomous robotic device
US9492048B2 (en) 2006-05-19 2016-11-15 Irobot Corporation Removing debris from cleaning robots
US9582005B2 (en) 2001-01-24 2017-02-28 Irobot Corporation Robot confinement
US9949608B2 (en) 2002-09-13 2018-04-24 Irobot Corporation Navigational control system for a robotic device
US10314449B2 (en) 2010-02-16 2019-06-11 Irobot Corporation Vacuum brush
US10470629B2 (en) 2005-02-18 2019-11-12 Irobot Corporation Autonomous surface cleaning robot for dry cleaning
US10524629B2 (en) 2005-12-02 2020-01-07 Irobot Corporation Modular Robot

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011084606A (en) * 2009-10-13 2011-04-28 Kuraray Co Ltd Acrylic thermoplastic resin composition
JP5898428B2 (en) * 2011-08-09 2016-04-06 キヤノン株式会社 Image processing apparatus and control method thereof

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4298446B2 (en) * 2003-09-12 2009-07-22 キヤノン株式会社 Image processing device
JP4583871B2 (en) * 2004-10-18 2010-11-17 三菱電機株式会社 Pixel signal generation device, imaging device, and pixel signal generation method

Cited By (24)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9622635B2 (en) 2001-01-24 2017-04-18 Irobot Corporation Autonomous floor-cleaning robot
US9582005B2 (en) 2001-01-24 2017-02-28 Irobot Corporation Robot confinement
US8656550B2 (en) 2002-01-03 2014-02-25 Irobot Corporation Autonomous floor-cleaning robot
US8671507B2 (en) 2002-01-03 2014-03-18 Irobot Corporation Autonomous floor-cleaning robot
US9949608B2 (en) 2002-09-13 2018-04-24 Irobot Corporation Navigational control system for a robotic device
US9486924B2 (en) 2004-06-24 2016-11-08 Irobot Corporation Remote control scheduler and method for autonomous robotic device
US8874264B1 (en) 2004-07-07 2014-10-28 Irobot Corporation Celestial navigation system for an autonomous robot
US8634956B1 (en) 2004-07-07 2014-01-21 Irobot Corporation Celestial navigation system for an autonomous robot
US8594840B1 (en) 2004-07-07 2013-11-26 Irobot Corporation Celestial navigation system for an autonomous robot
US8634958B1 (en) 2004-07-07 2014-01-21 Irobot Corporation Celestial navigation system for an autonomous robot
US10470629B2 (en) 2005-02-18 2019-11-12 Irobot Corporation Autonomous surface cleaning robot for dry cleaning
US9599990B2 (en) 2005-12-02 2017-03-21 Irobot Corporation Robot system
US8606401B2 (en) 2005-12-02 2013-12-10 Irobot Corporation Autonomous coverage robot navigation system
US10524629B2 (en) 2005-12-02 2020-01-07 Irobot Corporation Modular Robot
US9955841B2 (en) 2006-05-19 2018-05-01 Irobot Corporation Removing debris from cleaning robots
US10244915B2 (en) 2006-05-19 2019-04-02 Irobot Corporation Coverage robots and associated cleaning bins
US9492048B2 (en) 2006-05-19 2016-11-15 Irobot Corporation Removing debris from cleaning robots
US9480381B2 (en) 2007-05-09 2016-11-01 Irobot Corporation Compact autonomous coverage robot
US10070764B2 (en) 2007-05-09 2018-09-11 Irobot Corporation Compact autonomous coverage robot
US10299652B2 (en) 2007-05-09 2019-05-28 Irobot Corporation Autonomous coverage robot
US11072250B2 (en) 2007-05-09 2021-07-27 Irobot Corporation Autonomous coverage robot sensing
US11498438B2 (en) 2007-05-09 2022-11-15 Irobot Corporation Autonomous coverage robot
US10314449B2 (en) 2010-02-16 2019-06-11 Irobot Corporation Vacuum brush
US11058271B2 (en) 2010-02-16 2021-07-13 Irobot Corporation Vacuum brush

Also Published As

Publication number Publication date
JP2009049532A (en) 2009-03-05

Similar Documents

Publication Publication Date Title
JP5040519B2 (en) Image processing apparatus, image processing method, and program
JP5151075B2 (en) Image processing apparatus, image processing method, imaging apparatus, and computer program
KR100782812B1 (en) Method and apparatus for edge adaptive color interpolation
US8131067B2 (en) Image processing apparatus, image processing method, and computer-readable media for attaining image processing
KR100976284B1 (en) Image pickup device
JP5872408B2 (en) Color imaging apparatus and image processing method
TWI428025B (en) Image processing apparatus and image processing method, image capturing apparatus and computer program product
US7995840B2 (en) Image processing apparatus, image processing method, and program for attaining image processing
WO2011048870A1 (en) Image processing device, image processing method, and program
EP1389771A2 (en) Digital image system and method for combining demosaicing and bad pixel correction
JP2010199650A (en) Image processing apparatus and method
JP4982897B2 (en) Image processing device
JP4548390B2 (en) Imaging apparatus and signal processing method
JP6282123B2 (en) Image processing apparatus, image processing method, and program
US8077234B2 (en) Image pickup device and method for processing an interpolated color signal
JP4962293B2 (en) Image processing apparatus, image processing method, and program
JP4446818B2 (en) Pixel interpolation method
JP6525522B2 (en) Image processing apparatus and image processing method
KR20070099238A (en) Image sensor for expanding wide dynamic range and output bayer-pattern image
JP2010104019A (en) Pixel interpolation method
JP4303525B2 (en) Interpolated pixel generation apparatus and method
JP5106221B2 (en) Imaging device
JP2009049533A (en) Image processing device, image processing method, and program
JP2008277911A (en) Interpolation processor, imaging device, and interpolation processing method
JP6276581B2 (en) Pixel interpolation processing device, imaging device, program, and integrated circuit

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20100604

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20120220

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20120321

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20120510

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: 20120612

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20120625

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20150720

Year of fee payment: 3

LAPS Cancellation because of no payment of annual fees