JP2008167027A - Image processor, image processing method and image processing program - Google Patents
Image processor, image processing method and image processing program Download PDFInfo
- Publication number
- JP2008167027A JP2008167027A JP2006352791A JP2006352791A JP2008167027A JP 2008167027 A JP2008167027 A JP 2008167027A JP 2006352791 A JP2006352791 A JP 2006352791A JP 2006352791 A JP2006352791 A JP 2006352791A JP 2008167027 A JP2008167027 A JP 2008167027A
- Authority
- JP
- Japan
- Prior art keywords
- interpolation
- region
- differential
- value
- pixel
- 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.)
- Withdrawn
Links
- 238000003672 processing method Methods 0.000 title claims abstract description 6
- 238000004364 calculation method Methods 0.000 claims abstract description 187
- 238000000605 extraction Methods 0.000 claims description 20
- 239000000284 extract Substances 0.000 claims description 3
- 230000004069 differentiation Effects 0.000 abstract description 5
- 238000000034 method Methods 0.000 description 35
- 238000010586 diagram Methods 0.000 description 27
- 230000015654 memory Effects 0.000 description 14
- 230000008569 process Effects 0.000 description 9
- 238000013459 approach Methods 0.000 description 8
- 230000006870 function Effects 0.000 description 7
- 230000000694 effects Effects 0.000 description 5
- 230000008859 change Effects 0.000 description 4
- 230000015572 biosynthetic process Effects 0.000 description 3
- 238000003786 synthesis reaction Methods 0.000 description 3
- 230000008901 benefit Effects 0.000 description 2
- 238000012888 cubic function Methods 0.000 description 2
- 230000006866 deterioration Effects 0.000 description 2
- 238000001914 filtration Methods 0.000 description 2
- 238000002156 mixing Methods 0.000 description 2
- 239000000470 constituent Substances 0.000 description 1
- 230000003111 delayed effect Effects 0.000 description 1
- 238000009499 grossing Methods 0.000 description 1
- 239000000203 mixture Substances 0.000 description 1
- 230000009467 reduction Effects 0.000 description 1
Images
Landscapes
- Image Processing (AREA)
- Editing Of Facsimile Originals (AREA)
- Facsimile Image Signal Circuits (AREA)
Abstract
Description
本発明は、画素数の少ない画像を拡大して画素数の多い画像に変換する画像処理装置、画像処理方法、並びに画像処理プログラムに関するものである。 The present invention relates to an image processing apparatus, an image processing method, and an image processing program for enlarging an image having a small number of pixels and converting the image into an image having a large number of pixels.
画素数の少ない画像を拡大して画素数の多い画像に変換するには、原画素の画素値を用いて画素を補間する必要がある。その補間方法として、補間画素の画素値を、補間点から最も近傍にある原画素の画素値を用いて代入する最近傍法(ニアレスネイバー法)、補間点の周囲4点(2×2)の原画素値を用いて線形に算出する線形補間法(バイリニア法)、補間点の周囲16点(4×4)の原画素値を用いて3次関数により算出する双3次補間法(バイキュービック法)、等が知られている。 In order to enlarge an image with a small number of pixels and convert it to an image with a large number of pixels, it is necessary to interpolate the pixels using the pixel value of the original pixel. As the interpolation method, the nearest neighbor method (nearest neighbor method) in which the pixel value of the interpolation pixel is substituted using the pixel value of the original pixel nearest to the interpolation point, four points around the interpolation point (2 × 2) Linear interpolation method (bilinear method) that calculates linearly using the original pixel values, and bicubic interpolation method (bilinear method) that calculates by a cubic function using the original pixel values of 16 points (4 × 4) around the interpolation point. The cubic method) is known.
最近傍法は、処理が単純であることから高速処理が可能であり、また、水平・垂直のエッジを鮮鋭にできるという利点があるが、一方では、画素が単純に拡大されるため、斜め方向エッジがジャギになるという問題がある。 The nearest neighbor method has the advantage of being able to perform high-speed processing because it is simple and can sharpen the horizontal and vertical edges, but on the other hand, because the pixels are simply enlarged, the diagonal direction There is a problem that the edge becomes jaggy.
線形補間法は、周囲4点の原画素値の重み付け平均値を補間値として算出するので、平滑化効果により最近傍法のようなジャギを目立たなくすることができる利点があるが、反面、平均値を補間値とするため、エッジの鮮鋭度が低下したり、細かなテクスチャの部分が潰れてしまったり、角度によっては斜め方向エッジのジャギ低減効果が十分得られなかったりするという問題がある。 The linear interpolation method calculates the weighted average value of the original pixel values of the four surrounding points as an interpolation value, and thus has an advantage that the jaggies as in the nearest neighbor method can be made inconspicuous by the smoothing effect. Since the value is set as an interpolation value, there is a problem that the sharpness of the edge is lowered, the fine texture portion is crushed, and the effect of reducing the jaggies in the oblique direction edge cannot be obtained sufficiently depending on the angle.
双3次補間法は、周囲16点の原画素値の重み付け平均値で、3次関数で近似しているので、線形補間よりもエッジ鮮鋭度が高く、最近傍法のようなジャギが目立たなくなる利点があるが、一方では、エッジにオーバーシュート/アンダーシュートが発生して、エッジの淵に擬似輪郭が発生したり、角度によっては斜め方向のジャギ低減効果が十分でなかったりするという問題がある。 The bicubic interpolation method is a weighted average value of 16 surrounding original pixel values, and is approximated by a cubic function. Therefore, the edge sharpness is higher than that of linear interpolation, and the jaggy like the nearest neighbor method is not noticeable. On the other hand, there is a problem that overshoot / undershoot occurs at the edge, and a pseudo contour occurs at the edge of the edge, or the effect of reducing the jaggies in the oblique direction is not sufficient depending on the angle. .
上記の問題解決を図った従来の補間方法として、例えば、入力画像の一部領域の形状を、予め用意された複数の形状パターンとの比較に基づいて判定し、その判定された形状パターンに対応した補間処理で補間を行う方法が提案されている(例えば、特許文献1参照)。
また、他の補間方法として、補間点から最も近傍にある原画素の画素値(近位置画素値)と、原画像の算出対象画素区画内における補間点に応じた補間値との混合比、すなわち複数の補間方法の混合比を、算出対象画素区画付近のコントラスト量に基づいて決定して、補間画素の画素値を算出する方法が提案されている(例えば、特許文献2参照)。
As a conventional interpolation method for solving the above problem, for example, the shape of a partial area of the input image is determined based on comparison with a plurality of shape patterns prepared in advance, and the determined shape pattern is supported. There has been proposed a method of performing interpolation by the interpolation processing (see, for example, Patent Document 1).
As another interpolation method, the mixing ratio between the pixel value of the original pixel closest to the interpolation point (near-position pixel value) and the interpolation value corresponding to the interpolation point in the calculation target pixel section of the original image, that is, There has been proposed a method of calculating a pixel value of an interpolation pixel by determining a mixing ratio of a plurality of interpolation methods based on a contrast amount in the vicinity of a calculation target pixel section (for example, see Patent Document 2).
しかしながら、特許文献1に開示の補間方法にあっては、パターンマッチングにより入力画像の形状を判定するに際して、最適な形状パターンが存在しない場合には、拡大画像に画質の劣化が発生するという問題がある。また、このような画質劣化を防止しようとすると、あらゆる入力画像の形状に対応しなければならなくなるため、予め用意する形状パターンの種類が限りなく多くなってしまうという問題がある。
However, the interpolation method disclosed in
また、特許文献2に開示の補間方法にあっては、エッジの存在する領域では、近位置画素値、補間値、コントラスト量を算出するにあたって、相関の低い画素の値が参照されてしまうため、エッジの鮮鋭度の低下が生じるという問題がある。
Further, in the interpolation method disclosed in
したがって、かかる点に鑑みてなされた本発明の目的は、斜め方向エッジのジャギが目立たず、かつエッジ鮮鋭度を保ちつつエッジのオーバーシュート/アンダーシュートが発生しないように画像を拡大処理できる画像処理装置、画像処理方法、並びに画像処理プログラムを提供することにある。 Accordingly, an object of the present invention made in view of such a point is an image processing capable of enlarging an image so that diagonal edges are not noticeable, and edge overshoot / undershoot does not occur while maintaining edge sharpness. An apparatus, an image processing method, and an image processing program are provided.
上記目的を達成する請求項1に係る画像処理装置の発明は、入力画像を拡大処理する画像処理装置において、
前記入力画像から注目画素を含む注目領域を抽出する領域抽出部と、
前記注目領域内の画素の微分値を演算する微分演算部と、
前記微分値に基づいて前記注目領域における領域パターンを判定するパターン分類判定部と、
前記領域パターンおよび前記微分値に基づいて、前記注目領域における補間画素の画素値を演算するための補間係数を算出する補間係数算出部と、
前記補間係数に基づいて前記補間画素の画素値を算出する補間演算部と、
を有することを特徴とするものである。
An image processing apparatus according to
A region extraction unit that extracts a region of interest including a pixel of interest from the input image;
A differential operation unit for calculating a differential value of a pixel in the region of interest;
A pattern classification determination unit that determines a region pattern in the region of interest based on the differential value;
An interpolation coefficient calculation unit that calculates an interpolation coefficient for calculating a pixel value of an interpolation pixel in the region of interest based on the region pattern and the differential value;
An interpolation calculation unit that calculates a pixel value of the interpolation pixel based on the interpolation coefficient;
It is characterized by having.
請求項2に係る発明は、請求項1に記載の画像処理装置において、
前記微分演算部は、少なくとも4方向の微分値を算出する複数の微分フィルタと、該複数の微分フィルタで算出された複数の微分値の絶対値和である微分絶対値和を算出する微分絶対値和算出部とを有し、
前記パターン分類判定部は、前記複数の微分値および前記微分絶対値和に基づいて、前記注目領域における領域パターンを判定することを特徴とするものである。
The invention according to
The differential operation unit includes a plurality of differential filters that calculate differential values in at least four directions, and a differential absolute value that calculates a differential absolute value sum that is an absolute value sum of the plurality of differential values calculated by the plurality of differential filters. A sum calculator,
The pattern classification determination unit is configured to determine a region pattern in the region of interest based on the plurality of differential values and the sum of differential absolute values.
請求項3に係る発明は、請求項2に記載の画像処理装置において、
前記微分演算部は、前記注目画素について、前記複数の微分値および前記微分絶対値和を算出することを特徴とするものである。
The invention according to
The differential operation unit calculates the plurality of differential values and the sum of differential absolute values for the pixel of interest.
請求項4に係る発明は、請求項2に記載の画像処理装置において、
前記微分演算部は、前記注目領域内の全画素について、前記複数の微分値および前記微分絶対値和を算出し、
前記パターン分類判定部は、前記全画素について、対応する前記複数の微分値および前記微分絶対値和に基づいて判定された領域パターンの統計に基づいて、前記注目領域における領域パターンを判定することを特徴とするものである。
The invention according to
The differential calculation unit calculates the plurality of differential values and the differential absolute value sum for all pixels in the region of interest,
The pattern classification determination unit determines a region pattern in the region of interest based on statistics of the region pattern determined based on the plurality of corresponding differential values and the sum of differential absolute values for all the pixels. It is a feature.
請求項5に係る発明は、請求項2〜4のいずれか一項に記載の画像処理装置において、
前記補間係数算出部は、前記補間係数として、前記分類コードに基づいて複数の方向補間フィルタ係数を算出するとともに、前記複数の微分値に基づいて複数の方向毎の角度重み付け係数を算出することを特徴とするものである。
The invention according to
The interpolation coefficient calculating unit calculates a plurality of directional interpolation filter coefficients based on the classification code as the interpolation coefficient, and calculates an angle weighting coefficient for each of a plurality of directions based on the plurality of differential values. It is a feature.
請求項6に係る発明は、請求項5に記載の画像処理装置において、
前記補間演算部は、前記方向補間フィルタ係数に基づいて前記注目領域における複数の方向補間値を算出するとともに、その算出した複数の方向補間値を、前記角度重み付け係数に基づいて重み付けして、前記注目画素の画素値を輪郭線領域補間値として算出する輪郭線領域補間演算部を有することを特徴とするものである。
The invention according to
The interpolation calculation unit calculates a plurality of direction interpolation values in the region of interest based on the direction interpolation filter coefficient, weights the calculated plurality of direction interpolation values based on the angle weighting coefficient, and It has an outline region interpolation calculation unit for calculating a pixel value of a target pixel as an outline region interpolation value.
さらに、上記目的を達成する請求項7に係る画像処理方法の発明は、入力画像を拡大処理するにあたり、
前記入力画像から注目画素を含む注目領域を抽出するステップと、
抽出された注目領域内の画素の微分値を演算するステップと、
演算された微分値に基づいて前記注目領域における領域パターンを判定するステップと、
判定された領域パターンおよび演算された微分値に基づいて、前記注目領域における補間画素の画素値を演算するための補間係数を算出するステップと、
算出された補間係数に基づいて前記補間画素の画素値を算出するステップと、
を含むことを特徴とするものである。
Further, the invention of the image processing method according to
Extracting a region of interest including a pixel of interest from the input image;
Calculating a differential value of a pixel within the extracted region of interest;
Determining a region pattern in the region of interest based on the calculated differential value;
Calculating an interpolation coefficient for calculating a pixel value of an interpolation pixel in the region of interest based on the determined region pattern and the calculated differential value;
Calculating a pixel value of the interpolation pixel based on the calculated interpolation coefficient;
It is characterized by including.
さらに、上記目的を達成する請求項8に係る画像処理プログラムの発明は、
コンピュータに、
入力画像から注目画素を含む注目領域を抽出する機能と、
抽出された注目領域内の画素の微分値を演算する機能と、
演算された微分値に基づいて前記注目領域における領域パターンを判定する機能と、
判定された領域パターンおよび演算された微分値に基づいて、前記注目領域における補間画素の画素値を演算するための補間係数を算出する機能と、
算出された補間係数に基づいて前記補間画素の画素値を算出して、前記入力画像を拡大する機能と、
を実現させることを特徴とするものである。
Furthermore, the invention of the image processing program according to
On the computer,
A function for extracting a region of interest including a pixel of interest from an input image;
A function for calculating the differential value of the pixel within the extracted region of interest;
A function of determining a region pattern in the region of interest based on the calculated differential value;
A function of calculating an interpolation coefficient for calculating a pixel value of an interpolation pixel in the region of interest based on the determined region pattern and the calculated differential value;
A function of calculating a pixel value of the interpolation pixel based on the calculated interpolation coefficient and enlarging the input image;
It is characterized by realizing.
本発明によれば、入力画像における注目領域内の画素の微分値に基づいて、注目領域における領域パターンを判定し、その判定された領域パターンおよび微分値に基づいて、注目領域における補間係数を算出して、補間画素の画素値を算出するようにしたので、輪郭線を有する領域パターンを的確に判定して補間処理することができる。したがって、斜め方向エッジのジャギが目立たず、かつエッジ鮮鋭度を保ちつつエッジのオーバーシュート/アンダーシュートが発生しないように入力画像を拡大処理することが可能となる。 According to the present invention, the region pattern in the region of interest is determined based on the differential value of the pixel in the region of interest in the input image, and the interpolation coefficient in the region of interest is calculated based on the determined region pattern and differential value. Thus, since the pixel value of the interpolation pixel is calculated, it is possible to accurately determine the region pattern having the contour and perform the interpolation process. Therefore, it is possible to enlarge the input image so that diagonal edges are not noticeable and edge overshoot / undershoot does not occur while maintaining edge sharpness.
以下、本発明の実施の形態について、図を参照して説明する。 Hereinafter, embodiments of the present invention will be described with reference to the drawings.
(第1実施の形態)
図1乃至図14は、本発明の第1実施の形態を示すもので、図1は画像処理装置の全体の要部構成を示す機能ブロック図である。本実施の形態に係る画像処理装置は、入力画像の注目画素を含む注目領域を抽出する領域抽出部1と、注目領域の微分値を算出する微分演算部2と、注目画素のパターンを分類するパターン分類判定部3と、補間演算のための補間係数を算出する補間係数算出部4と、補間演算を行う補間演算部5とを有している。
(First embodiment)
FIG. 1 to FIG. 14 show a first embodiment of the present invention, and FIG. 1 is a functional block diagram showing the main configuration of the entire image processing apparatus. The image processing apparatus according to the present embodiment classifies a pattern of a target pixel, a
入力画像は、領域抽出部1に入力する。領域抽出部1は、微分演算部2および補間演算部5に接続し、微分演算部2は、パターン分類判定部3および補間係数算出部4に接続する。また、パターン分類判定部3は、補間係数算出部4および補間演算部5に接続し、補間係数算出部4は、補間演算部5に接続して、補間演算部5から出力画像を出力する。
The input image is input to the
図2は、図1に示す画像処理装置の概略動作を示すフローチャートである。入力画像は、領域抽出部1に、画素単位で順次入力される。領域抽出部1は、メモリを有しており、入力画像の画素データが入力されると、画像拡大処理が可能となる所定ライン分の画素データが揃うまで遅延を行う。画像拡大処理が可能となる所定ライン分の画素データがメモリに格納されると、画像中の(x,y)における注目画素の画素値P(x,y)と、その周辺の画素位置(x+i,y+j)における周辺画素の画素値P(x+i,y+j)とが抽出されて、その抽出された注目画素を含む注目領域が微分演算部2および補間演算部5へ出力する(ステップS1)。
FIG. 2 is a flowchart showing a schematic operation of the image processing apparatus shown in FIG. The input image is sequentially input to the
微分演算部2は、領域抽出部1で抽出された注目領域内の注目画素における微分値を、微分算出フィルタにより算出し、その算出した微分値をパターン分類判定部3および補間係数算出部4へ出力する(ステップS2)。
The
パターン分類判定部3は、微分演算部2で算出された微分値に基づいて、注目領域が、連続する輪郭線領域、テクスチャ領域、平坦領域のいずれの領域パターンに属するかを判定する。さらに、注目領域が連続する輪郭線領域であると判定された場合には、微分演算部2で算出された微分値に基づいて、輪郭線方向パターンを判定し、この輪郭線方向パターンを含む領域パターンの判定結果から分類コードを決定して、補間係数算出部4および補間演算部5へ出力する(ステップS3)。
Based on the differential value calculated by the
補間係数算出部4は、微分演算部2で算出された微分値に基づいて、複数の補間フィルタの重み付けを決定する角度重み付け係数を算出するとともに、パターン分類判定部3で決定された領域パターンの分類コードに基づいて、輪郭線に沿って補間処理を行うための複数の角度に対応した複数の補間フィルタ係数を算出し、これら算出した角度重み付け係数および補間フィルタ係数を補間演算部5へ出力する(ステップS4)。本実施の形態では、隣接する3種類の角度に対応する3種類の補間フィルタ係数を算出する。
The interpolation
補間演算部5は、輪郭線領域については、補間係数算出部4で算出された複数の補間フィルタ係数と角度重み付け係数とに基づいて輪郭線補間値を算出するとともに(ステップS5)、テクスチャ領域についは、予め用意されたテクスチャ補間フィルタ係数により入力画像にフィルタリング処理を行ってテクスチャ補間値を算出し(ステップS6)、さらに、平坦領域については、予め用意された平坦補間フィルタ係数により入力画像にフィルタリング処理を行って平坦補間値を算出して(ステップS7)、注目領域内の補間画素の画素値を算出する。その後、パターン分類判定部3で決定された分類コードに基づいて、算出した輪郭線補間値、テクスチャ補間値、平坦補間値の補間画素の中から適合するものを一つ選択して、補間画素を有する出力画像として出力し(ステップS8)、処理を終了する。
For the contour region, the
次に、図1に示す画像処理装置の各部の構成および動作について、さらに詳細に説明する。 Next, the configuration and operation of each part of the image processing apparatus shown in FIG. 1 will be described in more detail.
図3は、図1に示した微分演算部2の要部の構成を示す機能ブロック図である。微分演算部2は、水平微分値算出部21と、垂直微分値算出部22と、右上微分値算出部23と、左上微分値算出部24と、微分絶対値和算出部25とを有している。入力画像は、領域抽出部1を介して、水平微分値算出部21、垂直微分値算出部22、右上微分値算出部23、左上微分値算出部24、にそれぞれ入力する。
FIG. 3 is a functional block diagram showing a configuration of a main part of the
水平微分値算出部21は、下記の(1)式に従って、領域抽出部1で抽出された注目領域内における注目画素の画素値P(x+i,y+j)と、図4(a)または図5(a)に示す公知の微分フィルタfilterH(i,j)との畳み込み演算を行って、水平微分値EdgeHを算出し、その算出した水平微分値EdgeHをパターン分類判定部3および補間係数算出部4へ出力するとともに、微分絶対値和算出部25へ出力する。
The horizontal differential
垂直微分値算出部22は、下記の(2)式に従って、領域抽出部1で抽出された注目領域内における注目画素の画素値P(x+i,y+j)と、図4(b)または図5(b)に示す公知の微分フィルタfilterV(i,j)との畳み込み演算を行って、垂直微分値EdgeVを算出し、その算出した垂直微分値EdgeVをパターン分類判定部3および補間係数算出部4へ出力するとともに、微分絶対値和算出部25へ出力する。
The vertical differential
右上微分値算出部23は、下記の(3)式に従って、領域抽出部1で抽出された注目領域内における注目画素の画素値P(x+i,y+j)と、図4(c)または図5(c)に示す公知の微分フィルタfilterR(i,j)との畳み込み演算を行って、右上微分値EdgeRを算出し、その算出した右上微分値EdgeRをパターン分類判定部3および補間係数算出部4へ出力するとともに、微分絶対値和算出部25へ出力する。
The upper right differential
同様に、左上微分値算出部24は、下記の(4)式に従って、領域抽出部1で抽出された注目領域内における注目画素の画素値P(x+i,y+j)と、図4(d)または図5(d)に示す公知の微分フィルタfilterL(i,j)との畳み込み演算を行って、左上微分値EdgeLを算出し、その算出した左上微分値EdgeLをパターン分類判定部3および補間係数算出部4へ出力するとともに、微分絶対値和算出部25へ出力する。
Similarly, the upper left differential
また、微分絶対値和算出部25は、下記の(5)式により、入力された4方向の微分値の絶対値の合計である微分絶対値和EdgeAを算出して、パターン分類判定部3へ出力する。
The differential absolute value
このように、微分演算部2では、領域抽出部1で抽出された注目領域内の注目画素に基づいて、微分算出フィルタにより注目画素位置における微分値を算出し、その算出した微分値をパターン分類判定部3および補間係数算出部4へ出力している。これにより、エッジ形状のパターン判別および補間フィルタ係数の重み付けの両方についての処理を、微分値に基づいて制御することが可能となる。
As described above, the
図6は、図1に示したパターン分類判定部3の要部の構成を示す機能ブロック図である。パターン分類判定部3は、正負判定部31,32,33,34と、パターン決定部35とを有している。微分演算部2から出力された水平方向微分値、垂直方向微分値、右上方向微分値、左上方向微分値は、正負判定部31,32,33,34にそれぞれ入力し、微分絶対値和は、パターン決定部35に入力する。
FIG. 6 is a functional block diagram showing a configuration of a main part of the pattern
正負判定部31は、水平微分算出部21から出力された水平方向微分値EdgeHの正負を判別し、その結果をパターン決定部35へ出力する。ここで、水平方向微分値EdgeHは、図7(a)に示すように、水平方向エッジの法線方向の濃度勾配ベクトルを表しており、EdgeHが正の場合は、白の矢印で示す上向きの濃度勾配ベクトルを示し、EdgeHが負の場合は、黒の矢印で示す下向きの濃度勾配ベクトルであることを示している。
The positive /
正負判定部32は、垂直微分算出部22から出力された垂直方向微分値EdgeVの正負を判別し、その結果をパターン決定部35へ出力する。ここで、垂直方向微分値EdgeVは、図7(b)に示すように、垂直方向エッジの法線方向の濃度勾配ベクトルを表しており、EdgeVが正の場合は、白の矢印で示す右向きの濃度勾配ベクトルを示し、EdgeHが負の場合は、黒の矢印で示す左向きの濃度勾配ベクトルであることを示している。
The positive /
正負判定部33は、右上微分算出部23から出力された右上方向微分値EdgeRの正負を判別し、その結果をパターン決定部35へ出力する。ここで、右上方向微分値EdgeRは、図7(c)に示すように、斜め右上方向エッジの法線方向の濃度勾配ベクトルを表しており、EdgeRが正の場合は、白の矢印で示す斜め左上向きの濃度勾配ベクトルを示し、EdgeHが負の場合は、黒の矢印で示す斜め右下向きの濃度勾配ベクトルであることを示している。
The positive /
同様に、正負判定部34は、左上微分算出部24から出力された左上方向微分値EdgeLの正負を判別し、その結果をパターン決定部35へ出力する。ここで、左上方向微分値EdgeLは、図7(d)に示すように、斜め左上方向エッジの法線方向の濃度勾配ベクトルを表しており、EdgeLが正の場合は、白の矢印で示す斜め右上向きの濃度勾配ベクトルを示し、EdgeLが負の場合は黒の矢印で示す斜め左下向きの濃度勾配ベクトルであることを示している。
Similarly, the positive /
また、パターン決定部35は、先ず、微分演算部2により算出された微分絶対値和EdgeAに基づいて、注目領域が平坦領域であるかエッジが存在する領域であるかの第1の領域パターンの判定を行う。この第1の判定では、EdgeAが所定の閾値未満である場合には、注目領域は平坦領域であると判定し、EdgeAが所定の閾値以上である場合には、注目領域はエッジが存在する領域であると判定する。
In addition, the
さらに、第1の判定において、注目領域はエッジが存在する領域であると判定された場合には、正負判定部31,32,33,34により判別された各微分値の正負に基づいて、第2の領域パターンの判定を行う。この第2の判定では、以下に示す0〜7までの条件パターンに適合するかを判定して、注目領域の輪郭線パターンによる領域パターンの分類を行って、図8の概念図に示す分類コードを決定する。
Further, in the first determination, when it is determined that the attention area is an area where an edge exists, the first determination is made based on the positive / negative of each differential value determined by the positive /
0:(EdgeH>0,EdgeV>0,EdgeR<0,EdgeL>0)
1:(EdgeH>0,EdgeV>0,EdgeR>0,EdgeL>0)
2:(EdgeH>0,EdgeV<0,EdgeR>0,EdgeL>0)
3:(EdgeH>0,EdgeV<0,EdgeR>0,EdgeL<0)
4:(EdgeH<0,EdgeV<0,EdgeR>0,EdgeL<0)
5:(EdgeH<0,EdgeV<0,EdgeR<0,EdgeL<0)
6:(EdgeH<0,EdgeV>0,EdgeR<0,EdgeL<0)
7:(EdgeH<0,EdgeV>0,EdgeR<0,EdgeL>0)
0: (EdgeH> 0, EdgeV> 0, EdgeR <0, EdgeL> 0)
1: (EdgeH> 0, EdgeV> 0, EdgeR> 0, EdgeL> 0)
2: (EdgeH> 0, EdgeV <0, EdgeR> 0, EdgeL> 0)
3: (EdgeH> 0, EdgeV <0, EdgeR> 0, EdgeL <0)
4: (EdgeH <0, EdgeV <0, EdgeR> 0, EdgeL <0)
5: (EdgeH <0, EdgeV <0, EdgeR <0, EdgeL <0)
6: (EdgeH <0, EdgeV> 0, EdgeR <0, EdgeL <0)
7: (EdgeH <0, EdgeV> 0, EdgeR <0, EdgeL> 0)
この第2の判定において、図8に示すように、分類コードが上記0〜7の条件パターンのいずれかに適合する場合は、注目領域はいずれかの方向の輪郭線領域である領域パターンと判定して、適合する分類コードを決定する。これに対し、0〜7のパターンのいずれにも適合しない場合は、注目領域は複雑な形状エッジを持つテクスチャ領域である領域パターンと判定し、分類コードを8と決定する。また、第1の判定において注目領域が平坦領域である領域パターンと判定されている場合は、分類コードを9と決定する。
In this second determination, as shown in FIG. 8, when the classification code matches any of the
第1の判定および第2の判定において決定された分類コードは、補間係数算出部4および補間演算部5に出力する。
The classification codes determined in the first determination and the second determination are output to the interpolation
このように、パターン分類判定部3において、注目領域が平坦領域であるか、複雑な形状のテクスチャ領域であるか、連続する輪郭線領域であるかの領域パターンの判定を行うことにより、補間演算部5において最適な補間処理を選択することが可能となる。また、注目領域が連続する輪郭線領域であった場合には、輪郭線を8方向の領域パターンに分類することで、補間演算部5において輪郭線に沿った補間が可能となる。さらに、領域パターンの判定は、微分絶対値和の閾値処理および各方向微分値の正負判定という比較的簡単な処理により行われるので、処理の高速化やハードウェアの単純化が可能となる。
In this way, the pattern
図9は、図1に示した補間係数算出部4の要部の構成を示す機能ブロック図である。補間係数算出部4は、複数の補間値の重み付けを算出する重み付け係数算出部41と、複数の補間値を算出するためのフィルタ係数を算出する補間フィルタ係数算出部42とを有している。重み付け係数算出部41は、角度係数算出部43により構成し、補間フィルタ係数算出部42は、水平/垂直方向補間フィルタ係数LUT44、斜め方向補間フィルタ係数LUT45、中間方向補間フィルタ係数LUT46と、それぞれの補間フィルタ係数を記憶するメモリ47,48,49とを有して構成する。
FIG. 9 is a functional block diagram showing a configuration of a main part of the interpolation
微分演算部2で算出された水平方向微分値、垂直方向微分値、右上方向微分値、左上方向微分値は、角度係数算出部43に入力し、パターン分類判定部3で決定された分類コードは、水平/垂直方向補間フィルタ係数LUT44、斜め方向補間フィルタ係数LUT45、中間方向補間フィルタ係数LUT46に入力する。
The horizontal direction differential value, vertical direction differential value, upper right direction differential value, and upper left direction differential value calculated by the
角度係数算出部43は、微分演算部2から入力された水平方向微分値EdgeH、垂直方向微分値EdgeV、右上方向微分値EdgeR、左上方向微分値EdgeLに基づいて、下記の(6)式および(7)式に従って、水平垂直エッジ強度HVおよび斜めエッジ強度RLを算出し、その算出結果を角度重み付け係数として補間演算部5に出力する。なお、(6)式および(7)式において、HVおよびRLは、0以上の値とし、0より小さくなる場合は0にクリップする。また、kは、重み係数を調整するための任意の係数で、階調のビット数や微分絶対値和の大きさなどに基づいて決定する。
Based on the horizontal differential value EdgeH, the vertical differential value EdgeV, the upper right differential value EdgeR, and the upper left differential value EdgeL, which are input from the
上記(6)式および(7)式から明らかなように、水平垂直エッジ強度HVおよび斜めエッジ強度RLは、水平微分値EdgeHの絶対値|EdgeH|と垂直微分値EdgeVの絶対値|EdgeV|との差と、左上微分値EdgeLの絶対値|EdgeL|と右上微分値EdgeRの絶対値|EdgeR|との差とを比較している。 As is clear from the above equations (6) and (7), the horizontal / vertical edge strength HV and the oblique edge strength RL are expressed by the absolute value | EdgeH | of the horizontal differential value EdgeH and the absolute value | EdgeV | of the vertical differential value EdgeV. And the difference between the absolute value | EdgeL | of the upper left differential value EdgeL and the absolute value | EdgeR | of the upper right differential value EdgeR.
図10は、輪郭線の角度に対する各方向の微分値の絶対値の大きさを示すグラフである。グラフ中の実線は|EdgeH|の大きさ、二重線は|EdgeV|の大きさ、点線は|EdgeR|の大きさ、一点鎖線は|EdgeL|の大きさをそれぞれ示している。 FIG. 10 is a graph showing the magnitude of the absolute value of the differential value in each direction with respect to the angle of the contour line. The solid line in the graph indicates the size of | EdgeH |, the double line indicates the size of | EdgeV |, the dotted line indicates the size of | EdgeR |, and the alternate long and short dash line indicates the size of | EdgeL |.
図10から明らかなように、輪郭線の角度が水平方向に近いとき(図10中の0°および180°付近)、|EdgeH|は極大値に近づき、|EdgeV|は極小値に近づくとともに、|EdgeL|と|EdgeR|はほぼ同じ値になる。また、輪郭線の角度が垂直方向に近いとき(図10中の90°付近)、|EdgeV|は極大値に近づき、|EdgeH|は極小値に近づくとともに、|EdgeL|と|EdgeR|はほぼ同じ値になる。 したがって、輪郭線の角度が水平方向または垂直方向に近い場合には、|EdgeH|と|EdgeV|との差の絶対値は極大となり、|EdgeL|と|EdgeR|との差の絶対値は0に近い値となるので、上記(6)式に示すHVの値は極大となり、上記(7)式に示すRLの値は、負の値になるので、0にクリップされる。 As is apparent from FIG. 10, when the angle of the contour line is close to the horizontal direction (around 0 ° and 180 ° in FIG. 10), | EdgeH | approaches the maximum value, and | EdgeV | approaches the minimum value, | EdgeL | and | EdgeR | are almost the same value. When the angle of the contour line is close to the vertical direction (near 90 ° in FIG. 10), | EdgeV | approaches the maximum value, | EdgeH | approaches the minimum value, and | EdgeL | and | EdgeR | It becomes the same value. Therefore, when the angle of the contour line is close to the horizontal direction or the vertical direction, the absolute value of the difference between | EdgeH | and | EdgeV | is maximum, and the absolute value of the difference between | EdgeL | and | EdgeR | Therefore, the value of HV shown in the above equation (6) is maximal, and the value of RL shown in the above equation (7) is a negative value, so it is clipped to 0.
輪郭線の角度が右上がりの斜め45°方向に近いとき(図10中の45°付近)、|EdgeR|は極大値に近づき|EdgeL|は極小値に近づくとともに、|EdgeH|と|EdgeV|はほぼ同じ値になる。また、輪郭線の角度が左上がりの斜め45°方向に近いとき(図10中の135°付近)、|EdgeL|は極大値に近づき、|EdgeR|は極小値に近づくとともに、|EdgeH|と|EdgeV|はほぼ同じ値になる。したがって、輪郭線の角度が右上がりまたは左上がりの斜め45°方向に近い場合、|EdgeR|と|EdgeL|との差の絶対値は極大となり、|EdgeH|と|EdgeV|との差の絶対値は0に近い値となるので、上記(7)式に示すRLは極大となり、上記(6)式に示すHVの値は負の値になるので、0にクリップされる。 When the angle of the contour line is close to a 45 ° diagonally upward direction (near 45 ° in FIG. 10), | EdgeR | approaches a maximum value, | EdgeL | approaches a minimum value, and | EdgeH | and | EdgeV | Are almost the same value. Further, when the angle of the contour line is close to a 45 ° diagonally upward direction (around 135 ° in FIG. 10), | EdgeL | approaches a maximum value, | EdgeR | approaches a minimum value, and | EdgeH | | EdgeV | becomes substantially the same value. Therefore, when the angle of the contour line is close to a 45 ° diagonally upward or leftward direction, the absolute value of the difference between | EdgeR | and | EdgeL | becomes maximal, and the absolute value of the difference between | EdgeH | and | EdgeV | Since the value is close to 0, the RL shown in the above equation (7) becomes a maximum, and the HV value shown in the above equation (6) becomes a negative value, so it is clipped to 0.
また、輪郭線の角度が水平/垂直と斜め45°との中間の方向に近いとき(図10中の22.5°,67.5°,112.5°,157.5°付近)、|EdgeH|と|EdgeV|との差の絶対値と、|EdgeR|と|EdgeL|との差の絶対値は、ほぼ等しくなるので、上記(6)式に示すHVと上記(7)式に示すRLとは、ともに0に近い値となる。 Further, when the angle of the contour line is close to the intermediate direction between horizontal / vertical and 45 ° obliquely (around 22.5 °, 67.5 °, 112.5 °, and 157.5 ° in FIG. 10), The absolute value of the difference between EdgeH | and | EdgeV | and the absolute value of the difference between | EdgeR | and | EdgeL | are substantially equal. Therefore, the HV shown in the above equation (6) and the above equation (7) are shown. Both RL values are close to zero.
一方、水平/垂直方向補間フィルタ係数LUT44、斜め方向補間フィルタ係数LUT45、中間方向補間フィルタ係数LUT46は、パターン分類判定部3で決定された分類コードに基づいて、ルックアップテーブル(LUT)を参照して、それぞれ水平/垂直方向補間フィルタ係数filterHV(i,j)、斜め方向補間フィルタ係数filterRL(i,j)、中間方向補間フィルタ係数filterMid(i,j)を算出し、それらの補間フィルタ係数を対応するメモリ47,48,49に格納して、補間演算部5に出力する。
On the other hand, the horizontal / vertical direction interpolation filter coefficient LUT44, the diagonal direction interpolation filter coefficient LUT45, and the intermediate direction interpolation filter coefficient LUT46 refer to the lookup table (LUT) based on the classification code determined by the pattern
ここで、水平/垂直方向補間フィルタ係数LUT44、斜め方向補間フィルタ係数LUT45、中間方向補間フィルタ係数LUT46が参照するルックアップテーブルは、輪郭線に沿って補間処理を行うように補間フィルタ係数があらかじめ定められているテーブルである。例えば、図11のイメージ図において、白い円で示す注目領域内の原画素の濃度値を使って、黒い円で示す位置に補間画素を生成しようとした場合には、図12(a)に示すような、水平または垂直方向の輪郭線に対応するフィルタ係数の中から、分類コードに適合するfilterHV(i,j)を選択し、図12(b)に示すような、斜め45°方向の輪郭線に対応するフィルタ係数の中から、分類コードに適合するfilterRL(i,j)を選択し、図12(c)に示すような、水平・垂直と斜め45°との中間の方向の輪郭線に対応するフィルタ係数の中から、分類コードに適合するfilterMid(i,j)を選択する。これらのフィルタ係数は、補間画素位置からの距離に基づいて線形に重み付けされるように、予め定義しておく。なお、図12では、注目領域の右上の位置に補間画素を生成するフィルタを示しているが、フィルタを回転させることにより、左上、左下、右下の位置の補間に対応可能である。 Here, in the lookup table referred to by the horizontal / vertical direction interpolation filter coefficient LUT44, the diagonal direction interpolation filter coefficient LUT45, and the intermediate direction interpolation filter coefficient LUT46, the interpolation filter coefficient is determined in advance so as to perform interpolation processing along the contour line. It is a table that has been. For example, in the image diagram of FIG. 11, when an interpolation pixel is generated at a position indicated by a black circle using the density value of the original pixel in the attention area indicated by a white circle, as shown in FIG. Filter HV (i, j) that matches the classification code is selected from the filter coefficients corresponding to the horizontal or vertical contour, and the diagonal 45 ° contour as shown in FIG. Filter RL (i, j) that matches the classification code is selected from the filter coefficients corresponding to, and the contour line in the middle direction between horizontal / vertical and 45 ° diagonal as shown in FIG. FilterMid (i, j) that matches the classification code is selected from the corresponding filter coefficients. These filter coefficients are defined in advance so as to be weighted linearly based on the distance from the interpolation pixel position. In FIG. 12, a filter that generates an interpolation pixel at the upper right position of the region of interest is shown. However, by rotating the filter, interpolation at upper left, lower left, and lower right positions can be supported.
図13は、図1に示した補間演算部5の要部の構成を示す機能ブロック図である。補間演算部5は、輪郭線領域補間演算部51と、テクスチャ領域補間演算部52と、平坦領域補間演算部53と、補間出力選択部54とを有して構成する。入力画像は、領域抽出部1を介して輪郭線領域補間演算部51、テクスチャ領域補間演算部52、平坦領域補間演算部53に入力し、補間係数算出部4で算出された3種類の補間フィルタ係数および角度係数は、輪郭線領域補間演算部51に入力する。これら輪郭線領域補間演算部51、テクスチャ領域補間演算部52、平坦領域補間演算部53の出力は、補間出力選択部54に入力する。また、パターン分類判定部3で決定された分類コードは、補間出力選択部54に入力し、この補間出力選択部54から最終出力値である出力画像を出力する。
FIG. 13 is a functional block diagram showing a configuration of a main part of the
輪郭線領域補間演算部51は、算出された水平/垂直方向補間フィルタ係数filterHV(i,j)、斜め方向補間フィルタ係数filterRL(i,j)、中間方向補間フィルタ係数filterMid(i,j)、および角度重み付け係数である水平垂直エッジ強度HV、斜めエッジ強度RLに基づいて、輪郭線に沿った入力画像の補間処理を行って輪郭線領域補間値を算出し、その算出した輪郭線領域補間値を補間出力選択部54へ出力する。この輪郭線領域補間演算部51の更に詳細な構成および動作については、図14において詳述する。
The contour region
テクスチャ領域補間演算部52は、予め定義された補間フィルタによる、テクスチャの細かな構造を保存する公知の補間方法(例えばバイキュービック補間)により補間処理を行ってテクスチャ領域補間値を算出し、その算出したテクスチャ領域補間値を補間出力選択部54へ出力する。
The texture region
平坦領域補間演算部53は、予め定義された補間フィルタによる、単純かつ高速で、平坦領域のノイズの影響を受けにくい公知の補間方法(例えばバイリニア補間)により平坦領域補間値を算出し、その算出した平坦領域補間値を補間出力選択部54へ出力する。
The flat area
補間出力選択部54は、パターン分類判定部3で決定された分類コードに基づいて、注目領域が輪郭線領域である場合は輪郭線領域補間値を選択し、テクスチャ領域である場合はテクスチャ領域補間値を選択し、平坦領域である場合は平坦領域補間値を選択して、最終出力値として出力する。
Based on the classification code determined by the pattern
ここで、補間出力選択部54は、輪郭線領域補間演算部51、テクスチャ領域補間演算部52、平坦領域補間演算部53の前段に設置してもよい。この場合、補間出力選択部54は、後述する図18に示す形態と同様に、パターン分類判定部3で決定された分類コードに基づいて、注目領域が輪郭線領域である場合は輪郭線領域補間演算部51の処理を選択し、テクスチャ領域である場合はテクスチャ領域補間演算部52の処理を選択し、平坦領域である場合は平坦領域補間演算部53の処理を選択し、選択された補間演算部の処理をONに、選択されていない補間演算部の処理をOFFにすることにより、分類コードの示す領域に対応して出力する補間値を選択する。この形態においては、輪郭線領域補間演算部51、テクスチャ領域補間演算部52、平坦領域補間演算部53のうち、選択されていない処理については演算が行われないため、より消費電力を抑えることが可能となる。
Here, the interpolation
次に、図14を参照して、輪郭線領域補間演算部51における輪郭線に沿った補間処理の詳細について説明する。
Next, details of the interpolation processing along the contour line in the contour region
図14は、輪郭線領域補間演算部51の要部の構成を示す機能ブロック図である。輪郭線領域補間演算部51は、畳み込み演算部61,62,63と、重み付け加算部64とを有して構成する。入力画像は、領域抽出部1を介して畳み込み演算部61,62,63にそれぞれ入力する。補間係数算出部4で算出された水平/垂直方向補間フィルタ係数は、畳み込み演算部61に入力し、斜め方向補間フィルタ係数は、畳み込み演算部62に入力し、中間方向フィルタ係数は、畳み込み演算部63に入力する。これら畳み込み演算部61,62,63の出力は、重み付け加算部64に入力する。また、補間係数算出部4で算出された角度係数は、重み付け加算部64に入力し、この重み付け加算部64から、輪郭線領域補間値を補間出力選択部54に出力する。
FIG. 14 is a functional block diagram illustrating a configuration of a main part of the contour line area
畳み込み演算部61は、下記の(8)式に従って、水平/垂直方向補間フィルタ係数LUT44から入力された水平/垂直方向補間フィルタ係数filterHV(i,j)と、入力画像P(x+i,y+j)との畳み込み演算を行って、水平/垂直補間値PHVを算出し、その算出した水平/垂直補間値PHVを重み付け加算部64へ出力する。
The
畳み込み演算部62は、下記の(9)式に従って、斜め方向補間フィルタ係数LUT45から入力された斜め方向補間フィルタ係数filterRL(i,j)と、入力画像P(x+i,y+j)との畳み込み演算を行って、斜め補間値PRLを算出し、その算出した斜め補間値PRLを重み付け加算部64へ出力する。
The
畳み込み演算部63は、下記の(10)式に従って、中間方向補間フィルタ係数LUT46から入力された中間方向補間フィルタ係数filterMid(i,j)と、入力画像P(x+i,y+j)との畳み込み演算を行って、中間補間値PMidを算出し、その算出した中間補間値PMidを重み付け加算部64へ出力する。
The
重み付け加算部64は、補間係数算出部4の角度係数算出部43より入力された水平垂直エッジ強度HVおよび斜めエッジ強度RLに基づいて、下記の(11)式に従って、水平/垂直補間値PHV、斜め補間値PRL、中間補間値PMidの重み付け加算を行って、輪郭線領域補間値Plineを算出し、その算出した輪郭線領域補間値Plineを補間出力選択部54へ出力する。
Based on the horizontal / vertical edge strength HV and the oblique edge strength RL input from the angle
上記(11)式から明らかなように、中間補間値PMidにかかる係数は常に1であるのに対して、水平/垂直補間値PHVの重みは水平垂直エッジ強度HVに比例して大きくなり、斜め補間値PRLの重みは斜めエッジ強度RLに比例して大きくなる。これは、水平垂直エッジ強度HVが大きい場合、つまり水平/垂直に近い輪郭線に対しては、水平/垂直補間値PHVの寄与度が大きくなると同時に、中間補間値PMidの寄与度が小さくなることを意味している。また、斜めエッジ強度RLが大きい場合、つまり斜め45°に近い輪郭線に対しては、斜め補間値PRLの寄与度が大きくなると同時に、中間補間値PMidの寄与度が小さくなることを意味している。また、水平垂直エッジ強度HVおよび斜めエッジ強度RLの両方が小さい場合、つまり水平/垂直と斜め45°との中間に近い角度の輪郭線に対しては、中間補間値PMidの寄与度が大きくなることを意味している。 As apparent from the above equation (11), the coefficient applied to the intermediate interpolation value P Mid is always 1, whereas the weight of the horizontal / vertical interpolation value P HV increases in proportion to the horizontal / vertical edge strength HV. The weight of the diagonal interpolation value PRL increases in proportion to the diagonal edge strength RL. This is because, when the horizontal / vertical edge strength HV is large, that is, for a contour line close to horizontal / vertical, the contribution of the horizontal / vertical interpolation value P HV is large, and at the same time, the contribution of the intermediate interpolation value P Mid is small. Is meant to be. Further, when the oblique edge strength RL is large, that is, for a contour line close to 45 °, it means that the contribution of the oblique interpolation value P RL is increased and at the same time, the contribution of the intermediate interpolation value P Mid is reduced. is doing. Further, when both the horizontal / vertical edge strength HV and the oblique edge strength RL are small, that is, for the contour line having an angle close to the middle between the horizontal / vertical and the oblique 45 °, the contribution of the intermediate interpolation value P Mid is large. Is meant to be.
本実施の形態によれば、微分値に基づいて注目画素のパターン分類を行い、輪郭線領域、テクスチャ領域、平坦領域のいずれかに対応する補間方法によって最適な補間値を算出することが可能になる。さらに、輪郭線領域においては、パターン分類の判定結果である分類コードに基づいてフィルタ係数を算出し、輪郭線に沿って相関の低い画素を参照することなく補間処理を行うことにより、輪郭線の鮮鋭度の低下およびジャギを低減するとともに、輪郭線付近のエッジのオーバーシュート・アンダーシュートの発生を防止することができ、高品質な出力画像を得ることが可能となる。 According to the present embodiment, it is possible to perform pattern classification of a pixel of interest based on a differential value, and to calculate an optimal interpolation value by an interpolation method corresponding to any one of a contour line area, a texture area, and a flat area. Become. Furthermore, in the contour region, a filter coefficient is calculated based on the classification code that is the determination result of the pattern classification, and interpolation processing is performed without referring to pixels having low correlation along the contour. A reduction in sharpness and jaggies can be reduced, and overshoot / undershoot of edges near the contour line can be prevented, and a high-quality output image can be obtained.
また、輪郭線領域において、3方向に対応する3種類の補間値を、微分値に基づいて重み付け加算することにより、細かい輪郭線の角度の変化に対応した補間処理を行うことが可能となる。例えば、輪郭線の角度が徐々に変わる弧のような形状の輪郭線に対しては、水平/垂直方向補間値、中間方向補間値、斜め45°方向補間値を、輪郭線の角度の変化に応じて徐々に重み付けを変化して加算するので、パターンの変化による継ぎ目のような不自然な輪郭になるのを防止することができるとともに、ジャギの発生を防止でき、滑らかに輪郭線の補間を行うことが可能となる。 Further, in the contour region, three types of interpolation values corresponding to the three directions are weighted and added based on the differential values, whereby interpolation processing corresponding to fine contour line angle changes can be performed. For example, for an arc-like contour line in which the contour angle gradually changes, the horizontal / vertical direction interpolation value, the intermediate direction interpolation value, and the diagonal 45 ° direction interpolation value are used as the change in the contour angle. Since the weighting is gradually changed according to the addition, it is possible to prevent an unnatural contour such as a seam due to a pattern change and to prevent the occurrence of jaggies and smoothly interpolate the contour line. Can be done.
さらに、微分値に基づいてパターン分類、フィルタ係数の算出、重み付け係数の算出を組み合わせて補間処理を行うことにより、比較的単純な方法の組み合わせにより高品質な出力画像を得ることができ、かつ処理速度やハードウェア規模を軽くすることが可能となる。 Furthermore, by interpolating by combining pattern classification, filter coefficient calculation, and weighting coefficient calculation based on the differential value, a high-quality output image can be obtained by a combination of relatively simple methods, and processing Speed and hardware scale can be reduced.
(第2実施の形態)
図15および図16は、本発明の第2実施の形態に係る画像処理装置を説明するための図で、図15はパターン分類判定部の要部の構成を示す機能ブロック図、図16はその動作を説明するための図である。
(Second Embodiment)
15 and 16 are diagrams for explaining the image processing apparatus according to the second embodiment of the present invention. FIG. 15 is a functional block diagram showing the configuration of the main part of the pattern classification determination unit. FIG. It is a figure for demonstrating operation | movement.
本実施の形態の画像処理装置は、第1実施の形態の画像処理装置において、パターン分類判定部3の構成が異なるものである。したがって、第1実施の形態と同様の構成要素には、同一の参照符号を付して説明を省略し、主として異なる点についてのみ説明する。
The image processing apparatus according to the present embodiment is different from the image processing apparatus according to the first embodiment in the configuration of the pattern
本実施の形態では、注目領域のパターン分類判定を行うにあたって、注目画素だけではなく、注目領域内の全ての画素に対してパターン判定を行い、その統計によって注目領域のパターン分類判定の補正処理を行う。このため、図15に示すように、パターン分類判定部3は、正負判定部31,32,33,34およびパターン決定部35を有する第1実施の形態の場合の構成に加えて、メモリ36およびパターン補正部37を設ける。
In this embodiment, when performing pattern classification determination of a region of interest, not only the pixel of interest but also all pixels in the region of interest are subjected to pattern determination, and correction processing for pattern classification determination of the region of interest is performed based on the statistics. Do. For this reason, as shown in FIG. 15, the pattern
ここで、メモリ36には、図6で説明した処理と同様にして、パターン決定部35で決定された分類コードを入力する。本実施の形態では、このパターン決定部35で決定された分類コードをそのまま順次出力せずにメモリ36に格納して、注目領域内の全ての画素についての分類コードが揃うまで遅延する。
Here, the classification code determined by the
その後、メモリ36に注目領域内の全ての画素についての分類コードが格納された時点で、注目領域内の全ての画素についての分類コードをパターン補正部37へ出力する。パターン補正部37は、注目領域内の全ての画素についての分類コードの統計から、特徴的なパターンを有する特異点を検出して、注目画素の分類コードの補正処理を行う。
Thereafter, when the classification codes for all the pixels in the attention area are stored in the
例えば、注目領域内に、図16(a)に示すようなエッジの角部が存在する場合には、注目領域内において、互いに90°異なる方向を示す分類コードの決定がなされた画素を検出する。また、注目領域内に図16(b) に示すような細線の端点が存在する場合や、図16(c)に示すような孤立点が含まれる場合には、注目領域内において180°異なる方向(互いに逆向き)を示す分類コードの決定がなされた画素を検出する。また、注目領域内に図16(d)に示すような複雑な形状のエッジが存在する場合には、注目領域内の各画素の分類コードが連続せず、複雑に変化する。 For example, when an edge corner as shown in FIG. 16A exists in the attention area, a pixel for which a classification code indicating directions different from each other by 90 ° is determined in the attention area is detected. . Further, when the end point of a thin line as shown in FIG. 16B exists in the attention area, or when an isolated point as shown in FIG. 16C is included, directions different by 180 ° in the attention area A pixel for which a classification code indicating (opposite directions) is determined is detected. In addition, when an edge having a complicated shape as shown in FIG. 16D exists in the attention area, the classification code of each pixel in the attention area does not continue and changes in a complicated manner.
このような特異点の領域においては、注目画素の値を保持した滑らかな補間処理を行うことが望ましいことから、パターン補正部37は、特異点が検出された場合には、図8に示す分類コードを8に変更し、テクスチャ領域補間と同様の注目画素の構造を保持する補間処理を行うように、領域パターンの分類判定を補正する。このようにして、パターン補正部37において、注目領域の分類コードを補正して、補正した分類コードを補間係数算出部4および補間演算部5へ出力する。
Since it is desirable to perform smooth interpolation processing that retains the value of the pixel of interest in such a singular point region, the
本実施の形態によれば、上述した第1実施の形態と同等の効果が得られる他、注目領域内の全ての画素についての分類コードの統計から画像における特異点を検出して、注目領域のパターン分類を補正するようにしたので、パターン分類判定の精度を向上させることができ、コントラストの低下、および画像の構造の変化による画質劣化を、より有効に防止することが可能となる。 According to the present embodiment, the same effect as the first embodiment described above can be obtained, and the singular point in the image is detected from the statistics of the classification codes for all the pixels in the attention area, and Since the pattern classification is corrected, the accuracy of pattern classification determination can be improved, and deterioration of image quality due to a decrease in contrast and a change in image structure can be more effectively prevented.
(第3実施の形態)
図17および図18は、本発明の第3実施の形態に係る画像処理装置を説明するための図で、図17は補間係数算出部の要部の構成を示す機能ブロック図、図18は補間演算部の要部の構成を示す機能ブロック図である。本実施の形態において、第1実施の形態と同様の構成要素には、同一の参照符号を付して説明を省略し、主として異なる点についてのみ説明する。
(Third embodiment)
17 and 18 are diagrams for explaining an image processing apparatus according to the third embodiment of the present invention. FIG. 17 is a functional block diagram showing a configuration of a main part of the interpolation coefficient calculation unit, and FIG. 18 is an interpolation. It is a functional block diagram which shows the structure of the principal part of a calculating part. In the present embodiment, the same components as those in the first embodiment are denoted by the same reference numerals, description thereof is omitted, and only different points will be mainly described.
本実施の形態では、補間係数算出部4において、ルックアップテーブルより3種類のフィルタ係数を算出した後、各フィルタ係数を重み付けして合成フィルタ係数を算出し、その算出した合成フィルタ係数を補間演算部5に出力して、畳み込みにより補間値を算出する。
In the present embodiment, after the interpolation
このため、図17に示すように、補間係数算出部4は、複数の補間値の重み付けを算出する重み付け係数算出部71と、複数の補間値を算出するためのフィルタ係数を算出する補間フィルタ係数算出部72と、算出した重み付け係数に基づいて複数のフィルタの重み付け加算を行って合成フィルタ係数を算出するフィルタ合成部73とを有して構成する。重み付け係数算出部71は、角度係数算出部43により構成し、補間フィルタ係数算出部42は、水平/垂直方向補間フィルタ係数LUT44、斜め方向補間フィルタ係数LUT45および中間方向補間フィルタ係数LUT46を有して構成し、フィルタ合成部73は、重み付け加算部74およびメモリ75を有して構成する。ここで、角度係数算出部43、水平/垂直方向補間フィルタ係数LUT44、斜め方向補間フィルタ係数LUT45および中間方向補間フィルタ係数LUT46の機能は、図9に示した第1実施の形態と同様である。
Therefore, as shown in FIG. 17, the interpolation
微分演算部2で算出された水平方向微分値、垂直方向微分値、右上方向微分値、左上方向微分値は、角度係数算出部43に入力し、ここで算出された角度重み付け係数は、重み付け加算部74に入力する。また、パターン分類判定部3で算出された分類コードは、水平/垂直方向補間フィルタ係数LUT44、斜め方向補間フィルタ係数LUT45、中間方向補間フィルタ係数LUT46に入力して、それぞれの補間フィルタ係数を算出し、これら算出された補間フィルタ係数を重み付け加算部74に入力する。
The horizontal direction differential value, vertical direction differential value, upper right direction differential value, and upper left direction differential value calculated by the
重み付け加算部74は、下記の(12)式に従って、角度係数算出部43で算出された水平垂直エッジ強度HVおよび斜めエッジ強度RLに基づいて、ルックアップテーブルにより出力された水平/垂直方向補間フィルタ係数filterHV(i,j)、斜め方向補間フィルタ係数filterRL(i,j)、中間方向補間フィルタ係数filterMid(i,j)の重み付け加算処理を行って、合成フィルタ係数filterSYN(i,j)を算出し、その算出結果をメモリ75に記憶して、補間演算部5に出力する。
The weighting / adding
また、図18に示すように、補間演算部5は、輪郭線領域補間演算部51と、テクスチャ領域補間演算部52と、平坦領域補間演算部53と、補間出力選択部54とを有して構成する。入力画像は、領域抽出部1を介して輪郭線領域補間演算部51、テクスチャ領域補間演算部52、平坦領域補間演算部53に入力し、図17に示した補間係数算出部4で算出された輪郭線補間フィルタ係数は、輪郭線領域補間演算部51に入力する。また、パターン分類判定部3で決定された分類コードは、補間出力選択部54に入力する。
As shown in FIG. 18, the
補間出力選択部54は、入力された分類コードに基づいて、注目領域が輪郭線領域である場合は輪郭線領域補間演算部51の処理を選択し、テクスチャ領域である場合はテクスチャ領域補間演算部52の処理を選択し、平坦領域である場合は平坦領域補間演算部53の処理を選択して、選択した補間演算部の処理をON、選択されない補間演算部の処理をOFFに制御することにより、選択した補間処理部の出力を最終の出力画像として出力させる。
Based on the input classification code, the interpolation
ここで、補間出力選択部54は、輪郭線領域補間演算部51、テクスチャ領域補間演算部52、平坦領域補間演算部53の前段に設置してもよい。この場合、補間出力選択部54は、前述の図13に示した形態と同様に、パターン分類判定部3で決定された分類コードに基づいて、注目領域が輪郭線領域である場合は輪郭線領域補間演算部51より出力される輪郭線領域補間値を選択し、テクスチャ領域である場合はテクスチャ領域補間演算部52より出力されるテクスチャ領域補間値を選択し、平坦領域である場合は平坦領域補間演算部53より出力される平坦領域補間値を選択して、最終出力値として出力する。
Here, the interpolation
ここで、輪郭線領域補間演算部51は、補間出力選択部54で注目領域が輪郭線領域と判定された場合に、図17に示した補間係数算出部4で算出された合成フィルタ係数filterSYN(i,j)を用いて、下記の(13)式に従って、入力画素との畳み込み演算を行って補間値を算出し、この補間値を最終出力値として出力する。
Here, the contour area
テクスチャ領域補間演算部52は、補間出力選択部54で注目領域がテクスチャ領域と判定された場合に、図13と同様に、予め定義された補間フィルタによる、テクスチャの細かな構造を保存する公知の補間方法(例えばバイキュービック補間)により補間処理を行ってテクスチャ領域補間値を算出し、その算出したテクスチャ領域補間値を最終出力値として出力する。
A texture region
同様に、平坦領域補間演算部53は、補間出力選択部54で注目領域が平坦領域と判定された場合に、図13と同様に、予め定義された補間フィルタによる、単純かつ高速で、平坦領域のノイズの影響を受けにくい公知の補間方法(例えばバイリニア補間)により平坦領域補間値を算出し、その算出した平坦領域補間値を最終出力値として出力する。
Similarly, when the interpolation
本実施の形態によれば、上述した第1実施の形態と同等の効果が得られる他、補間係数算出部4の処理において、フィルタ係数を格納するために必要なメモリを一つにすることができ、ハードウェア化において規模を縮小することができる。また、輪郭線領域補間処理部51では、1度の畳み込み演算で補間値を算出することができるので、処理の簡略化が図れる。
According to the present embodiment, the same effects as those of the first embodiment described above can be obtained, and in the processing of the interpolation
なお、上述した各実施の形態において、領域抽出部1、微分演算部2、パターン分類判定部3、補間係数算出部4および補間演算部5の機能は、コンピュータを用いてプログラムにより実現することもできる。
In each of the above-described embodiments, the functions of the
1 領域抽出部
2 微分演算部
3 パターン分類判定部
4 補間係数算出部
5 補間演算部
21 水平微分値算出部
22 垂直微分値算出部
23 右上微分値算出部
24 左上微分値算出部
25 微分絶対値和算出部
31,32,33,34 正負判定部
35 パターン決定部
36 メモリ
37 パターン補正部
41 重み付け係数算出部
42 補間フィルタ係数算出部
43 角度係数算出部
44 水平/垂直方向補間フィルタ係数LUT
45 斜め方向補間フィルタ係数LUT
46 中間方向補間フィルタ係数LUT
47,48,49 メモリ
51 輪郭線領域補間演算部
52 テクスチャ領域補間演算部
53 平坦領域補間演算部
54 補間出力選択部
61,62,63 畳み込み演算部
64 重み付け加算部
71 重み付け係数算出部
72 補間フィルタ係数算出部
73 フィルタ合成部
74 重み付け加算部
75 メモリ
DESCRIPTION OF
45 Diagonal interpolation filter coefficient LUT
46 Intermediate direction interpolation filter coefficient LUT
47, 48, 49
Claims (8)
前記入力画像から注目画素を含む注目領域を抽出する領域抽出部と、
前記注目領域内の画素の微分値を演算する微分演算部と、
前記微分値に基づいて前記注目領域における領域パターンを判定するパターン分類判定部と、
前記領域パターンおよび前記微分値に基づいて、前記注目領域における補間画素の画素値を演算するための補間係数を算出する補間係数算出部と、
前記補間係数に基づいて前記補間画素の画素値を算出する補間演算部と、
を有することを特徴とする画像処理装置。 In an image processing apparatus for enlarging an input image,
A region extraction unit that extracts a region of interest including a pixel of interest from the input image;
A differential operation unit for calculating a differential value of a pixel in the region of interest;
A pattern classification determination unit that determines a region pattern in the region of interest based on the differential value;
An interpolation coefficient calculation unit that calculates an interpolation coefficient for calculating a pixel value of an interpolation pixel in the region of interest based on the region pattern and the differential value;
An interpolation calculation unit that calculates a pixel value of the interpolation pixel based on the interpolation coefficient;
An image processing apparatus comprising:
前記パターン分類判定部は、前記複数の微分値および前記微分絶対値和に基づいて、前記注目領域における領域パターンを判定することを特徴とする請求項1に記載の画像処理装置。 The differential operation unit includes a plurality of differential filters that calculate differential values in at least four directions, and a differential absolute value that calculates a differential absolute value sum that is an absolute value sum of the plurality of differential values calculated by the plurality of differential filters. A sum calculator,
The image processing apparatus according to claim 1, wherein the pattern classification determination unit determines a region pattern in the region of interest based on the plurality of differential values and the differential absolute value sum.
前記パターン分類判定部は、前記全画素について、対応する前記複数の微分値および前記微分絶対値和に基づいて判定された領域パターンの統計に基づいて、前記注目領域における領域パターンを判定することを特徴とする請求項2に記載の画像処理装置。 The differential calculation unit calculates the plurality of differential values and the differential absolute value sum for all pixels in the region of interest,
The pattern classification determination unit determines a region pattern in the region of interest based on statistics of the region pattern determined based on the plurality of corresponding differential values and the sum of differential absolute values for all the pixels. The image processing apparatus according to claim 2.
前記入力画像から注目画素を含む注目領域を抽出するステップと、
抽出された注目領域内の画素の微分値を演算するステップと、
演算された微分値に基づいて前記注目領域における領域パターンを判定するステップと、
判定された領域パターンおよび演算された微分値に基づいて、前記注目領域における補間画素の画素値を演算するための補間係数を算出するステップと、
算出された補間係数に基づいて前記補間画素の画素値を算出するステップと、
を含むことを特徴とする画像処理方法。 In enlarging the input image,
Extracting a region of interest including a pixel of interest from the input image;
Calculating a differential value of a pixel within the extracted region of interest;
Determining a region pattern in the region of interest based on the calculated differential value;
Calculating an interpolation coefficient for calculating a pixel value of an interpolation pixel in the region of interest based on the determined region pattern and the calculated differential value;
Calculating a pixel value of the interpolation pixel based on the calculated interpolation coefficient;
An image processing method comprising:
入力画像から注目画素を含む注目領域を抽出する機能と、
抽出された注目領域内の画素の微分値を演算する機能と、
演算された微分値に基づいて前記注目領域における領域パターンを判定する機能と、
判定された領域パターンおよび演算された微分値に基づいて、前記注目領域における補間画素の画素値を演算するための補間係数を算出する機能と、
算出された補間係数に基づいて前記補間画素の画素値を算出して、前記入力画像を拡大する機能と、
を実現させることを特徴とする画像処理プログラム。 On the computer,
A function for extracting a region of interest including a pixel of interest from an input image;
A function for calculating the differential value of the pixel within the extracted region of interest;
A function of determining a region pattern in the region of interest based on the calculated differential value;
A function of calculating an interpolation coefficient for calculating a pixel value of an interpolation pixel in the region of interest based on the determined region pattern and the calculated differential value;
A function of calculating a pixel value of the interpolation pixel based on the calculated interpolation coefficient and enlarging the input image;
An image processing program characterized by realizing the above.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2006352791A JP2008167027A (en) | 2006-12-27 | 2006-12-27 | Image processor, image processing method and image processing program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2006352791A JP2008167027A (en) | 2006-12-27 | 2006-12-27 | Image processor, image processing method and image processing program |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2008167027A true JP2008167027A (en) | 2008-07-17 |
Family
ID=39695890
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2006352791A Withdrawn JP2008167027A (en) | 2006-12-27 | 2006-12-27 | Image processor, image processing method and image processing program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2008167027A (en) |
Cited By (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2010283601A (en) * | 2009-06-04 | 2010-12-16 | Canon Inc | Resolution conversion device and control method thereof |
JP2011100424A (en) * | 2009-11-09 | 2011-05-19 | Kyocera Corp | Image processing apparatus, image processing method and image processing program |
CN102567950A (en) * | 2011-12-27 | 2012-07-11 | 深圳市万兴软件有限公司 | Image scaling method and system |
WO2012098854A1 (en) * | 2011-01-20 | 2012-07-26 | 日本電気株式会社 | Image processing system, image processing method, and image processing program |
CN102663676A (en) * | 2012-03-31 | 2012-09-12 | 深圳市万兴软件有限公司 | Image zooming method and system thereof |
CN102663678A (en) * | 2012-03-31 | 2012-09-12 | 深圳市万兴软件有限公司 | Image zooming method and system thereof |
JP2013150361A (en) * | 2013-05-07 | 2013-08-01 | Canon Inc | Resolution converter and control method thereof |
WO2014083857A1 (en) * | 2012-11-29 | 2014-06-05 | 日本電気株式会社 | Image processing device and image processing method |
WO2014091720A1 (en) * | 2012-12-10 | 2014-06-19 | パナソニック株式会社 | Contour correction device and image processing device |
JP2015141707A (en) * | 2014-01-30 | 2015-08-03 | キヤノン株式会社 | Image processing apparatus, and image processing method |
US9727984B2 (en) | 2014-03-19 | 2017-08-08 | Samsung Electronics Co., Ltd. | Electronic device and method for processing an image |
-
2006
- 2006-12-27 JP JP2006352791A patent/JP2008167027A/en not_active Withdrawn
Cited By (16)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2010283601A (en) * | 2009-06-04 | 2010-12-16 | Canon Inc | Resolution conversion device and control method thereof |
JP2011100424A (en) * | 2009-11-09 | 2011-05-19 | Kyocera Corp | Image processing apparatus, image processing method and image processing program |
WO2012098854A1 (en) * | 2011-01-20 | 2012-07-26 | 日本電気株式会社 | Image processing system, image processing method, and image processing program |
CN103229208A (en) * | 2011-01-20 | 2013-07-31 | 日本电气株式会社 | Image processing system, image processing method, and image processing program |
US9324135B2 (en) | 2011-01-20 | 2016-04-26 | Nec Corporation | Image processing system, image processing method, and image processing program |
CN102567950A (en) * | 2011-12-27 | 2012-07-11 | 深圳市万兴软件有限公司 | Image scaling method and system |
CN102663676A (en) * | 2012-03-31 | 2012-09-12 | 深圳市万兴软件有限公司 | Image zooming method and system thereof |
CN102663678A (en) * | 2012-03-31 | 2012-09-12 | 深圳市万兴软件有限公司 | Image zooming method and system thereof |
WO2014083857A1 (en) * | 2012-11-29 | 2014-06-05 | 日本電気株式会社 | Image processing device and image processing method |
JPWO2014083857A1 (en) * | 2012-11-29 | 2017-01-05 | 日本電気株式会社 | Image processing apparatus and image processing method |
US9542725B2 (en) | 2012-11-29 | 2017-01-10 | Nec Corporation | Image processing device, image processing method and medium |
WO2014091720A1 (en) * | 2012-12-10 | 2014-06-19 | パナソニック株式会社 | Contour correction device and image processing device |
JP2013150361A (en) * | 2013-05-07 | 2013-08-01 | Canon Inc | Resolution converter and control method thereof |
JP2015141707A (en) * | 2014-01-30 | 2015-08-03 | キヤノン株式会社 | Image processing apparatus, and image processing method |
US10229474B2 (en) | 2014-01-30 | 2019-03-12 | Canon Kabushiki Kaisha | Image processing apparatus, image processing method, and storage medium |
US9727984B2 (en) | 2014-03-19 | 2017-08-08 | Samsung Electronics Co., Ltd. | Electronic device and method for processing an image |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP2008167027A (en) | Image processor, image processing method and image processing program | |
JP4534594B2 (en) | Image processing apparatus, image processing method, program for image processing method, and recording medium recording program for image processing method | |
US7483040B2 (en) | Information processing apparatus, information processing method, recording medium, and program | |
JP4517872B2 (en) | Image processing apparatus, image processing method, program for image processing method, and recording medium recording program for image processing method | |
JP5115361B2 (en) | Pixel interpolation device, pixel interpolation method, and pixel interpolation program | |
US20050008251A1 (en) | Edge enhancement process and system | |
US20080199101A1 (en) | Image Processing Apparatus and Image Processing Program | |
JP4853653B2 (en) | Image processing apparatus and image processing program | |
US8005313B2 (en) | Edge enhancing device and method | |
JP2001251517A (en) | Image processing method, image processor and image processing system | |
US11416966B2 (en) | Method and system for image scaling and enhancement | |
JP3167120B2 (en) | Image processing apparatus and method | |
US8213736B2 (en) | Image processing device and image processing method | |
RU2310911C1 (en) | Method for interpolation of images | |
JP2019028912A (en) | Image processing apparatus and image processing method | |
US8478063B2 (en) | Image processing apparatus and image processing method | |
JP4804271B2 (en) | Image processing apparatus and control method thereof | |
JP6126054B2 (en) | Image signal processing method and image signal processing apparatus | |
JP4265363B2 (en) | Image processing device | |
JPH07105359A (en) | Picture processor | |
JP2004133592A (en) | Image processor, image processing method and image processing program for magnifying image | |
JP2005293265A (en) | Image processing device, and method | |
JP4265362B2 (en) | Image processing device | |
JP4176681B2 (en) | Image edge correction apparatus and image edge correction method | |
CN113313636B (en) | Method and device for image magnification and enhancement |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A300 | Withdrawal of application because of no request for examination |
Free format text: JAPANESE INTERMEDIATE CODE: A300 Effective date: 20100302 |