JP2006050480A - Image processing apparatus, image processing method and program thereof - Google Patents

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

Info

Publication number
JP2006050480A
JP2006050480A JP2004232135A JP2004232135A JP2006050480A JP 2006050480 A JP2006050480 A JP 2006050480A JP 2004232135 A JP2004232135 A JP 2004232135A JP 2004232135 A JP2004232135 A JP 2004232135A JP 2006050480 A JP2006050480 A JP 2006050480A
Authority
JP
Japan
Prior art keywords
image
pixel
feature amount
region
edge
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.)
Pending
Application number
JP2004232135A
Other languages
Japanese (ja)
Inventor
Satoshi Kubota
聡 久保田
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.)
Fujifilm Business Innovation Corp
Original Assignee
Fuji Xerox Co Ltd
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 Fuji Xerox Co Ltd filed Critical Fuji Xerox Co Ltd
Priority to JP2004232135A priority Critical patent/JP2006050480A/en
Publication of JP2006050480A publication Critical patent/JP2006050480A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • G06T3/40Scaling of whole images or parts thereof, e.g. expanding or contracting
    • G06T3/403Edge-driven scaling; Edge-based scaling

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Editing Of Facsimile Originals (AREA)
  • Record Information Processing For Printing (AREA)
  • Image Processing (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide an image processing apparatus for magnifying an image with high image quality. <P>SOLUTION: The image processing apparatus 2 calculates a feature amount (edge strength, edge direction etc.) of the image region of a predetermined size including a target pixel, calculates a magnification parameter of the image region including the target pixel on the basis of the calculated feature amount, and generates the pixel value of the magnified pixel using the calculated magnification parameter and the pixel value of input image data. In this way, the apparatus 2 can perform image magnification processing for saving the feature amount of a characteristic part in the input image, and can acquire a high-quality magnified image in which image defectives such as blur or jaggy in the characteristic part are suppressed by high-speed magnification processing. <P>COPYRIGHT: (C)2006,JPO&NCIPI

Description

本発明は、画像を拡大する画像処理装置に関する。   The present invention relates to an image processing apparatus that enlarges an image.

例えば、特許文献1は、注目画素の周辺の画素値の分布状態を評価し、その評価結果に応じて代表値を決定し、決定された代表値を注目画素に対応する(N×M)画素のブロック内に配置することにより、画像を拡大する画像処理装置を開示する。
また、特許文献2は、原画像を2値化して、この2値化画像と2次元パターンとを照合することにより斜め成分の方向を判定し、判定された斜め成分の方向をもとに補間処理を行う画素数変換装置を開示する。
また、特許文献3は、補正対象のパターン毎、かつ、倍率毎に拡大画素のドット配置情報を有し、パターンマッチング結果及び倍率から1つのドット配置情報を抽出する画像処理装置を開示する。
また、特許文献4は、原画素が属するエッジ領域の傾斜方向を原画素及び補間画素にマッピングし、マッピングされた傾斜方向に対応するフィルタ処理を原画素及び補間画素に対して実行する画像処理装置を開示する。
特開平7−182503号公報 特開2000−228723号公報 特開2001−188900号公報 特開2000−253238号公報
For example, Patent Document 1 evaluates a distribution state of pixel values around a target pixel, determines a representative value according to the evaluation result, and (N × M) pixels corresponding to the determined representative value as the target pixel. An image processing apparatus for enlarging an image by disposing it in the block is disclosed.
Further, Patent Document 2 binarizes an original image, determines the direction of an oblique component by collating the binarized image with a two-dimensional pattern, and interpolates based on the determined direction of the oblique component. A pixel number conversion device that performs processing is disclosed.
Patent Document 3 discloses an image processing apparatus that has dot arrangement information of enlarged pixels for each pattern to be corrected and for each magnification, and extracts one dot arrangement information from the pattern matching result and the magnification.
Patent Document 4 discloses an image processing apparatus that maps the inclination direction of the edge region to which the original pixel belongs to the original pixel and the interpolation pixel, and executes filter processing corresponding to the mapped inclination direction for the original pixel and the interpolation pixel. Is disclosed.
JP-A-7-182503 JP 2000-228723 A JP 2001-188900 A JP 2000-253238 A

本発明は、上述した背景からなされたものであり、画像を高画質に拡大する画像処理装置を提供することを目的とする。   The present invention has been made from the above-described background, and an object thereof is to provide an image processing apparatus that enlarges an image with high image quality.

[画像処理装置]
上記目的を達成するために、本発明にかかる画像処理装置は、入力画像の拡大処理を行う画像処理装置であって、入力画像における既定の大きさの画像領域について、階調変化に関する特徴量を算出する領域特徴量算出手段と、前記領域特徴量算出手段によりそれぞれの画像領域について算出された特徴量に基づいて、パラメータを生成するパラメータ生成手段と、処理対象画素が含まれる画像領域内の画素値と、前記パラメータ生成手段によりこの画像領域について生成されたパラメータとを用いて、この処理対象画素に対応する拡大画像データを生成する拡大画像生成手段とを有する。
[Image processing device]
In order to achieve the above object, an image processing apparatus according to the present invention is an image processing apparatus that performs an enlargement process of an input image, and has a feature amount related to a gradation change for an image area of a predetermined size in the input image. Area feature amount calculating means for calculating, parameter generation means for generating parameters based on the feature amounts calculated for the respective image regions by the area feature amount calculating means, and pixels in the image area including the processing target pixel Enlarged image generating means for generating enlarged image data corresponding to the processing target pixel using the value and the parameter generated for the image region by the parameter generating means.

好適には、前記領域特徴量算出手段は、前記画像領域における階調変化量を前記特徴量として算出する。   Preferably, the area feature amount calculating means calculates a gradation change amount in the image area as the feature amount.

好適には、前記領域特徴量算出手段は、前記画像領域における階調変化の方向を前記特徴量として算出し、前記パラメータ生成手段は、前記領域特徴量算出手段により算出された階調変化の方向に応じて画像領域内から参照画素を選択し、少なくとも、選択された参照画素の画素値を前記パラメータとする。   Preferably, the region feature amount calculating unit calculates a direction of gradation change in the image region as the feature amount, and the parameter generation unit calculates the direction of gradation change calculated by the region feature amount calculating unit. A reference pixel is selected from the image area in accordance with the above, and at least the pixel value of the selected reference pixel is set as the parameter.

好適には、前記領域特徴量算出手段は、予め用意された複数のエッジパターンのうち、それぞれの画像領域における階調変化に対応するエッジパターンを前記特徴量として選択し、前記パラメータ生成手段は、前記領域特徴量算出手段により選択されたエッジパターンに対応する演算式を用いて、前記パラメータを算出する。   Preferably, the region feature amount calculating unit selects an edge pattern corresponding to a gradation change in each image region from among a plurality of edge patterns prepared in advance as the feature amount, and the parameter generation unit includes: The parameter is calculated using an arithmetic expression corresponding to the edge pattern selected by the region feature amount calculating means.

好適には、前記領域特徴量算出手段は、色空間におけるそれぞれの色成分毎に前記特徴量を算出し、算出された1つ以上の特徴量に基づいていずれか1つの色成分を選択し、選択された色成分の特徴量を前記画像領域の特徴量とする。   Preferably, the area feature value calculating means calculates the feature value for each color component in a color space, selects any one color component based on the calculated one or more feature values, The feature amount of the selected color component is set as the feature amount of the image area.

好適には、前記領域特徴量算出手段は、それぞれの色成分について、前記画像領域における階調変化量を算出し、算出された階調変化量が最大である色成分を選択する。   Preferably, the area feature amount calculating unit calculates a gradation change amount in the image area for each color component, and selects a color component having the maximum calculated gradation change amount.

好適には、前記パラメータ生成手段は、前記領域特徴量算出手段により算出された特徴量に対応する既定の演算式を用いてパラメータを生成する。   Preferably, the parameter generation unit generates a parameter using a predetermined arithmetic expression corresponding to the feature amount calculated by the region feature amount calculation unit.

好適には、前記パラメータ生成手段は、拡大率に応じてカーネル要素及びカーネル要素間距離が異なるエッジ強調カーネルを用いて、入力画像の画素値を補正し、補正された画素値を用いてパラメータを生成する。   Preferably, the parameter generation means corrects the pixel value of the input image using an edge enhancement kernel having a kernel element and a distance between kernel elements different depending on the enlargement ratio, and uses the corrected pixel value to set the parameter. Generate.

好適には、前記拡大画像生成手段は、処理対象画素を含む複数の画像領域の画素値と、前記パラメータ生成手段によりこれらの画像領域について生成されたパラメータとを用いて、この処理対象画素に対応する拡大画像データをそれぞれ生成する。   Preferably, the enlarged image generating unit uses the pixel values of a plurality of image regions including the processing target pixel and the parameters generated for the image region by the parameter generating unit to correspond to the processing target pixel. Each of the enlarged image data to be generated is generated.

好適には、前記拡大画像生成手段は、前記パラメータ生成手段により生成されたパラメータと、処理対象画素が含まれる画像領域中の画素値とを重み付け加算して拡大画像データを生成する。   Preferably, the enlarged image generation unit generates enlarged image data by weighted addition of the parameter generated by the parameter generation unit and the pixel value in the image area including the processing target pixel.

[画像処理方法]
また、本発明にかかる画像処理方法は、入力画像の拡大処理を行う画像処理方法であって、入力画像における既定の大きさの画像領域について、階調変化に関する特徴量を算出し、それぞれの画像領域について算出された特徴量に基づいて、パラメータを生成し、処理対象画素が含まれる画像領域内の画素値と、この画像領域について生成されたパラメータとを用いて、この処理対象画素に対応する拡大画像データを生成する。
[Image processing method]
An image processing method according to the present invention is an image processing method for performing an enlargement process of an input image, and calculates a feature amount related to a gradation change for an image area of a predetermined size in the input image, and each image A parameter is generated based on the feature amount calculated for the region, and the pixel value in the image region including the processing target pixel and the parameter generated for the image region are used to correspond to the processing target pixel. Enlarged image data is generated.

[プログラム]
また、本発明にかかるプログラムは、入力画像の拡大処理を行う画像処理装置において、入力画像における既定の大きさの画像領域について、階調変化に関する特徴量を算出するステップと、それぞれの画像領域について算出された特徴量に基づいて、パラメータを生成するステップと、処理対象画素が含まれる画像領域内の画素値と、この画像領域について生成されたパラメータとを用いて、この処理対象画素に対応する拡大画像データを生成するステップとを前記画像処理装置に実行させる。
[program]
The program according to the present invention includes a step of calculating a feature amount related to a gradation change for an image area of a predetermined size in an input image in an image processing apparatus that performs an enlargement process of the input image, and for each image area Based on the calculated feature amount, a parameter is generated, a pixel value in an image area including the processing target pixel, and a parameter generated for the image area are used to correspond to the processing target pixel. Causing the image processing apparatus to execute a step of generating enlarged image data.

本発明の画像処理装置によれば、比較的軽い処理負荷で、高画質な拡大画像を得ることができる。   According to the image processing apparatus of the present invention, a high-quality enlarged image can be obtained with a relatively light processing load.

まず、本発明の理解を助けるために、その背景及び概略を説明する。
画像の拡大処理は、画像の編集、ファイリング、表示、又は印刷などを行うシステムにおいて基本的な処理の一つである。また近年、インターネット上のホームページに表示される画像やデジタルビデオなどのように、ディスプレイ解像度での表示を主目的とした画像データが普及しており、これらの低解像度画像を高解像度のプリンタなどで印刷することも頻繁に行われている。このプリンタによる印刷の際に、高画質の出力結果を得るためには高画質の拡大処理が必要とされる。
First, in order to help understanding of the present invention, its background and outline will be described.
The image enlargement process is one of basic processes in a system that performs image editing, filing, display, printing, or the like. In recent years, image data mainly intended for display at display resolution, such as images displayed on homepages on the Internet and digital video, has become widespread. These low-resolution images can be used with high-resolution printers, etc. Printing is also frequently done. In order to obtain a high-quality output result during printing by this printer, high-quality enlargement processing is required.

多階調で表現されたカラー画像(以下、多値画像)を拡大処理する手法としては、例えば、最近傍法、線形補間法、キュービック・コンボリューション法などがある。
最近傍法は、拡大後の各画素値として、その画素を原画像上に逆写像した際に最も距離が近い画素の画素値を適用するという方法である。この方法は、演算量が少ないため高速に拡大処理することができる。しかし、原画像の1画素がそのまま矩形形状に拡大されるため、隣り合う画素の画素値の差が小さい場合は画質劣化の程度は小さくほとんど影響はないが、画素値の差が大きい場合などは、斜線部やエッジ部のジャギーが目立ったり、拡大倍率が大きい場合には画像がモザイク状になるなど、画質劣化の程度は大きい。
Examples of a technique for enlarging a color image (hereinafter referred to as a multi-valued image) expressed in multiple gradations include a nearest neighbor method, a linear interpolation method, and a cubic convolution method.
The nearest neighbor method is a method of applying the pixel value of the pixel having the closest distance when the pixel is inversely mapped onto the original image as each pixel value after enlargement. Since this method requires a small amount of computation, it can be enlarged at high speed. However, since one pixel of the original image is directly expanded into a rectangular shape, if the difference in pixel values between adjacent pixels is small, the degree of image quality degradation is small and has little effect, but if the difference in pixel values is large, etc. The degree of image quality deterioration is large, for example, jaggy in the shaded area or the edge part is conspicuous, or when the enlargement magnification is large, the image becomes mosaic.

また、線形補間法は、画素間の画素値が直線的に変化していると仮定し、拡大後の画素を逆写像した点の近傍4画素の画素値を線形に補間して画素値を求めるという方法である。この方法では、最近傍法よりも処理は重いものの演算量は比較的少なく、ジャギーなども発生しにくい。その一方で、直線的に変化しているという仮定に当てはまらないエッジ部分を中心に、画像全体がボケ気味になるという欠点がある。   Further, the linear interpolation method assumes that the pixel value between pixels changes linearly, and linearly interpolates the pixel values of four pixels in the vicinity of the point obtained by inversely mapping the enlarged pixel to obtain the pixel value. It is a method. Although this method is heavier than the nearest neighbor method, the amount of calculation is relatively small, and jaggies are less likely to occur. On the other hand, there is a drawback that the entire image becomes blurred, centering on the edge portion that does not apply to the assumption that it changes linearly.

キュービック・コンボリューション法は、標本化定理に基づいてsinc関数(sin(x)/x)を近似した補間関数を定義し、この近似補間関数と拡大後の画素を逆写像した点の近傍16画素(X、Y方向それぞれ4画素)との畳み込み演算により、拡大後の画素値を求める方法である。この方法は、上記2つの手法に比べて画質は比較的良いが、参照範囲が大きく演算量が多いという欠点がある。また、高域が強調気味となる特性を持つため、エッジ部分で軽いジャギーが発生したりノイズ成分が強調されてしまうなどの欠点もある。   The cubic convolution method defines an interpolation function that approximates a sinc function (sin (x) / x) based on the sampling theorem, and 16 pixels in the vicinity of a point obtained by inversely mapping the approximated interpolation function and the enlarged pixel. This is a method for obtaining a pixel value after enlargement by convolution with (4 pixels in each of the X and Y directions). This method has relatively good image quality compared to the above two methods, but has a drawback that the reference range is large and the amount of calculation is large. In addition, since the high frequency band is emphasized, there are disadvantages such as light jaggies occurring at the edge and noise components being emphasized.

これらの問題を解決する試みとして、例えば、特許文献1、特許文献2、特許文献3及び特許文献4などの手法が提案されている。
特許文献1に記載されている手法では、注目画素の周囲N×M領域(例えば3×3)の画素から最大値及び最小値を検出し、さらにコントラスト及び中間値を算出し、このコントラストにより最大値又は最小値のいずれかとそれ以外の値の平均値とを代表値として導出する。次に注目画素をN×M画素に線形補間処理し、先に算出した中間値を閾値として2値化し、上記2つの代表値を2値化の結果に応じて配置する。コントラストが小さい場合は線形補間処理の画素値をそのまま用いることにより最終的に拡大画像を得るものである。これによりジャギーが発生せず、自然画像でも補間ボケが生じない良好な変換が可能であるが、コントラストのみでエッジ部を判断しており、エッジの方向再現が難しいという問題がある。またN×M領域を2つの値のみで構成するため、エッジ部にブロック状の歪みが生じるという問題がある。
As an attempt to solve these problems, for example, methods such as Patent Document 1, Patent Document 2, Patent Document 3, and Patent Document 4 have been proposed.
In the method described in Patent Document 1, the maximum value and the minimum value are detected from the pixels in the N × M region (for example, 3 × 3) around the target pixel, and the contrast and the intermediate value are calculated. Either the value or the minimum value and the average value of the other values are derived as representative values. Next, the target pixel is linearly interpolated into N × M pixels, binarized using the previously calculated intermediate value as a threshold value, and the two representative values are arranged according to the binarization result. When the contrast is low, the pixel value of the linear interpolation process is used as it is to finally obtain an enlarged image. As a result, jaggies do not occur and good conversion without interpolating blur is possible even in a natural image, but the edge portion is determined only by contrast, and there is a problem that it is difficult to reproduce the edge direction. Further, since the N × M region is composed of only two values, there is a problem that block-like distortion occurs in the edge portion.

また、特許文献2に記載されている手法では、まず原画像を2値化し、その2値画像から原画像に含まれる斜め成分の方向を予め用意した2次元パターン(行列データ)と一致判定することにより求め、求められた斜め方向に沿って補間処理をする。またそれ以外の部分は線形補間処理を行っている。しかし、原画像を予め定められた閾値により2値化してから斜め成分の方向判定を行っているので、濃度差の大きいエッジに対しては有効であるが、濃度差の小さいエッジの再現には問題がある。   In the method described in Patent Document 2, first, the original image is binarized, and the direction of the oblique component included in the original image is determined to coincide with the two-dimensional pattern (matrix data) prepared in advance from the binary image. The interpolation processing is performed along the obtained oblique direction. In addition, linear interpolation processing is performed for the other portions. However, since the direction of the diagonal component is determined after binarizing the original image with a predetermined threshold, it is effective for edges with a large density difference, but for reproducing edges with a small density difference. There's a problem.

また、特許文献3に記載されている手法では、パターンファイルに1対1に対応した整数倍率毎のドット配置ファイル(拡大パターンファイル)と画素ブロックのどの位置の画素値でドット配置ファイルの画素値を決定するかという画素参照情報とにより拡大画像ブロックを生成する。さらに一致パターンがないときは単純に原画像ブロックの注目画素で拡大画像ブロックを生成する。しかし、特許文献3では、パターンマッチングのみで一意に拡大ブロックを生成しているため、パターンファイル及びドット配置ファイルの数により拡大画像の画質が決まる。つまり、画質向上には予め多くのパターンファイルが必要である。しかしながら、多くのパターンファイルを予め用意しておくのは現実的ではない。   Further, in the method described in Patent Document 3, the pixel value of the dot arrangement file is determined by the dot arrangement file (enlarged pattern file) for each integer magnification corresponding to one-to-one in the pattern file and the pixel value at which position of the pixel block. The enlarged image block is generated based on the pixel reference information indicating whether to determine the image. Further, when there is no matching pattern, an enlarged image block is simply generated with the target pixel of the original image block. However, in Patent Document 3, since the enlarged block is uniquely generated only by pattern matching, the image quality of the enlarged image is determined by the number of pattern files and dot arrangement files. That is, a large number of pattern files are required in advance to improve image quality. However, it is not realistic to prepare many pattern files in advance.

また、特許文献4に記載されている手法では、原画像を線形補間処理で拡大し、それと並行して、原画像において注目画素を含む周囲N×M領域毎に2値化し、予め設定された斜線検出パターンと一致判定を行い、注目画素がエッジ領域に属する(斜線検出パターンと一致する)場合には、その方向情報を注目画素にマッピングする。さらに、この方向情報を先に線形補間処理で拡大した拡大画像にマッピングし、マッピングされた方向情報の方向に沿った平滑化フィルタを施すことにより、ジャギーの発生を抑えた拡大処理を行っている。しかし、特許文献4では、原画像の拡大、パターンマッチング、方向情報の拡大、拡大処理画像に対する方向依存平滑化フィルタ処理という流れであり、画像サイズが大きくなると処理負荷が非常に大きくなるという問題がある。   Further, in the method described in Patent Document 4, the original image is enlarged by linear interpolation processing, and in parallel with this, binarization is performed for each surrounding N × M region including the target pixel in the original image, and is set in advance. If the pixel of interest belongs to the edge region (matches the diagonal line detection pattern), the direction information is mapped to the pixel of interest. Furthermore, this direction information is mapped to an enlarged image that has been previously enlarged by linear interpolation processing, and a smoothing filter is applied along the direction of the mapped direction information, thereby performing enlargement processing that suppresses the occurrence of jaggies. . However, in Patent Document 4, there is a flow of enlargement of an original image, pattern matching, enlargement of direction information, and direction-dependent smoothing filter processing for an enlarged image, and there is a problem that the processing load becomes very large as the image size increases. is there.

そこで、本実施形態における画像処理装置2は、注目画素を含む既定の大きさの画像領域の特徴量を算出し、算出された特徴量に基づいて、注目画素を含む画像領域の拡大パラメータを算出し、算出された拡大パラメータと入力画像データの画素値とを用いて拡大画素値を生成する。これにより、入力画像中の特徴的な部分の特徴量を保存する画像拡大処理を実現でき、特徴的部分のボケ及びジャギーの画質欠陥を抑制した高画質な拡大画像を高速に得ることができる。   Therefore, the image processing apparatus 2 according to the present embodiment calculates a feature amount of an image region having a predetermined size including the target pixel, and calculates an enlargement parameter of the image region including the target pixel based on the calculated feature amount. Then, an enlarged pixel value is generated using the calculated enlargement parameter and the pixel value of the input image data. As a result, it is possible to realize an image enlargement process that preserves the feature amount of the characteristic part in the input image, and it is possible to obtain a high-quality enlarged image that suppresses blurring of the characteristic part and image quality defects of jaggy.

[ハードウェア構成]
次に、画像処理装置2のハードウェア構成を説明する。
図1は、本発明にかかる画像処理方法が適応される画像処理装置2のハードウェア構成を、制御装置20を中心に例示する図である。
図1に例示するように、画像処理装置2は、CPU202及びメモリ204などを含む制御装置20、通信装置22、HDD・CD装置などの記録装置24、並びに、LCD表示装置あるいはCRT表示装置及びキーボード・タッチパネルなどを含むユーザインターフェース装置(UI装置)26から構成される。
画像処理装置2は、例えば、画像拡大プログラム5(後述)がインストールされた汎用コンピュータであり、通信装置22又は記録装置24などを介して画像データを取得し、取得された画像データを出力解像度に応じて拡大する。例えば、画像処理装置2は、プリンタ装置10に対して画像データを出力する場合には、600dpi又は2400dpiなどの解像度に変換し、UI装置26に対して画像データを出力する場合には、75dpiなどの解像度に変換する。
[Hardware configuration]
Next, the hardware configuration of the image processing apparatus 2 will be described.
FIG. 1 is a diagram illustrating a hardware configuration of an image processing apparatus 2 to which an image processing method according to the present invention is applied, centering on a control apparatus 20.
As illustrated in FIG. 1, the image processing apparatus 2 includes a control device 20 including a CPU 202 and a memory 204, a communication device 22, a recording device 24 such as an HDD / CD device, an LCD display device or a CRT display device, and a keyboard. A user interface device (UI device) 26 including a touch panel and the like is included.
The image processing apparatus 2 is, for example, a general-purpose computer in which an image enlargement program 5 (described later) is installed. The image processing apparatus 2 acquires image data via the communication device 22 or the recording device 24 and converts the acquired image data to an output resolution. Enlarge accordingly. For example, the image processing apparatus 2 converts the resolution to 600 dpi or 2400 dpi when outputting image data to the printer apparatus 10, and 75 dpi or the like when outputting image data to the UI apparatus 26. Convert to the resolution.

[画像拡大プログラム]
図2は、制御装置20(図1)により実行され、本発明にかかる画像処理方法を実現する画像拡大プログラム5の機能構成を例示する図である。
図2に例示するように、画像拡大プログラム5は、記憶部500、画像ブロック設定部510、画像ブロック特徴量算出部520、拡大パラメータ算出部530及び拡大画素生成部540を有する。
なお、画像拡大プログラム5の全部又は一部をASICなどのハードウェアで実現してもよい。
[Image enlargement program]
FIG. 2 is a diagram illustrating a functional configuration of the image enlargement program 5 which is executed by the control device 20 (FIG. 1) and implements the image processing method according to the present invention.
As illustrated in FIG. 2, the image enlargement program 5 includes a storage unit 500, an image block setting unit 510, an image block feature amount calculation unit 520, an enlargement parameter calculation unit 530, and an enlargement pixel generation unit 540.
Note that all or part of the image enlargement program 5 may be realized by hardware such as an ASIC.

画像拡大プログラム5において、記憶部500は、画像データが他の機能構成により拡大処理されるまで一時的に記憶する機能、及び、解像度変換又は拡大処理された拡大画像データが出力されるまで一時的に記憶する機能などを備える。記憶部500に記憶される画像データは、画像処理装置2で処理可能な画像フォーマット(例えば、BMP、TIFF、PNGなど)で記述されたデータであり、パーソナルコンピュータ(不図示)等において編集等された画像データ等である。拡大された後の画像データ(拡大画像データ)も、同様の画像フォーマットのデータである。すなわち、記憶部500は、メモリ204(図1)及び記録装置24(図1)を制御して、入力された画像データを記憶し、画像ブロック設定部510、画像ブロック特徴量算出部520、拡大パラメータ算出部530及び拡大画素生成部540に対してワークエリアを提供する。   In the image enlargement program 5, the storage unit 500 temporarily stores the image data until the image data is enlarged by another functional configuration, and temporarily outputs the enlarged image data subjected to resolution conversion or enlargement processing. The function to memorize is provided. The image data stored in the storage unit 500 is data described in an image format (for example, BMP, TIFF, PNG, etc.) that can be processed by the image processing apparatus 2, and is edited by a personal computer (not shown) or the like. Image data. The enlarged image data (enlarged image data) is also data in the same image format. That is, the storage unit 500 controls the memory 204 (FIG. 1) and the recording device 24 (FIG. 1) to store the input image data, and stores the image block setting unit 510, the image block feature amount calculation unit 520, and the enlargement. A work area is provided to the parameter calculation unit 530 and the enlarged pixel generation unit 540.

画像ブロック設定部510は、画像ブロック特徴量算出部520及び拡大パラメータ算出部530における処理で必要とされる既定の画像ブロックサイズをそれぞれ設定し、記憶部500により記憶されている入力画像データから、設定されたブロックサイズの画像ブロックを順次(例えばラスタスキャン順に)切り出し、このブロックサイズの画像ブロックそれぞれを画像ブロック特徴量算出部520及び拡大パラメータ算出部530にそれぞれ出力する。   The image block setting unit 510 sets a predetermined image block size required for processing in the image block feature amount calculation unit 520 and the enlargement parameter calculation unit 530, and from the input image data stored in the storage unit 500, The image blocks having the set block size are cut out sequentially (for example, in the raster scan order), and the image blocks having the block size are output to the image block feature amount calculation unit 520 and the enlargement parameter calculation unit 530, respectively.

画像ブロック特徴量算出部520は、画像ブロック設定部510から順次入力される画像ブロックの少なくとも一部(例えば中心部近傍の矩形部分)を注目領域とし、注目領域における画像特徴量を、注目領域又はこの注目領域の周辺部を含む画像ブロック内の各画素値に基づいて算出する。画像特徴量とは、例えば、注目領域のエッジ強度(階調変化量)又はエッジ角度(階調変化の方向)などである。しかしこれに限られるものではなく、画像ブロック特徴量算出部520は、例えば注目領域の各画素値の平均値を算出し、この平均値に対する注目領域の各画素値のばらつきを表す値(例えば標準偏差又は分散)を画像特徴量として算出してもよい。   The image block feature amount calculation unit 520 sets at least a part of the image blocks sequentially input from the image block setting unit 510 (for example, a rectangular portion near the center) as the attention area, and determines the image feature amount in the attention area as the attention area or Calculation is performed based on each pixel value in the image block including the peripheral portion of the region of interest. The image feature amount is, for example, edge strength (gradation change amount) or edge angle (gradation change direction) of a region of interest. However, the present invention is not limited to this, and the image block feature amount calculation unit 520 calculates, for example, an average value of each pixel value of the attention area, and a value (for example, standard) representing variation of each pixel value of the attention area with respect to this average value. Deviation or variance) may be calculated as an image feature amount.

拡大パラメータ算出部530は、画像ブロック特徴量算出部520から入力された各画像ブロックの画像特徴量に基づいて、拡大画素生成部540における拡大画素値算出処理に用いる複数の拡大パラメータを算出する。ここで、複数の拡大パラメータとは、画像ブロック設定部510から入力された画像ブロック内の複数の画素値及びこれらの画素値から画像ブロック特徴量算出部520で算出された画像特徴量に基づいて算出される値などである。   The enlargement parameter calculation unit 530 calculates a plurality of enlargement parameters used for the enlargement pixel value calculation process in the enlargement pixel generation unit 540 based on the image feature amount of each image block input from the image block feature amount calculation unit 520. Here, the plurality of enlargement parameters are based on a plurality of pixel values in the image block input from the image block setting unit 510 and an image feature amount calculated by the image block feature amount calculation unit 520 from these pixel values. For example, a calculated value.

拡大画素生成部540は、入力画像データ中の拡大対象画素(注目画素)を含む画像ブロック中の画素値と、拡大パラメータ算出部530で算出された拡大パラメータ(注目画素を含む画像ブロックについて設定されたもの)とを用いて、注目画素に対応する拡大画素値(拡大画像データ)を算出する。拡大画像はこの拡大画素値により構成される。   The enlargement pixel generation unit 540 is set for the pixel value in the image block including the enlargement target pixel (target pixel) in the input image data and the enlargement parameter (image block including the target pixel) calculated by the enlargement parameter calculation unit 530. And an enlarged pixel value (enlarged image data) corresponding to the target pixel is calculated. The enlarged image is constituted by this enlarged pixel value.

[画像ブロック特徴量算出部の詳細説明]
次に、画像ブロック特徴量算出部520をより詳細に説明する。なお、注目領域が2×2画素サイズブロックであり、注目領域を含む周辺領域が4×4画素サイズブロックである場合を具体例として説明する。
本例の画像ブロック特徴量算出部520は、図2に示すように、エッジ強度算出部522、エッジ方向推定部524及びエッジパターン選択部526を含む。
[Detailed Description of Image Block Feature Quantity Calculation Unit]
Next, the image block feature amount calculation unit 520 will be described in more detail. A case where the attention area is a 2 × 2 pixel size block and the peripheral area including the attention area is a 4 × 4 pixel size block will be described as a specific example.
As shown in FIG. 2, the image block feature quantity calculation unit 520 of this example includes an edge strength calculation unit 522, an edge direction estimation unit 524, and an edge pattern selection unit 526.

エッジ強度算出部522は、画像ブロック設定部510で切り出された画像ブロック中の注目領域のエッジ強度Gを次の式(1)で算出する。
gx=(a+c−b−d)/2
gy=(a+b−c−d)/2
G=gx×gx+gy×gy・・・式(1)
上記式におけるa、b、c及びdは、図3に例示するように、注目領域にある各画素の画素値である。また、このように算出される「gx」は、主走査方向(図3の左右方向)の画素値の変化量を示し、「gy」は、副走査方向(図3の上下方向)の画素値の変化量を示す。
なお、エッジ強度は上記式(1)で算出されるものに限定されるわけでなく、以下の式(2)などで算出しても良い。
G=|gx|+|gy|・・・式(2)
すなわち、エッジ強度Gは、(gx)の絶対値と(gy)の絶対値との和として算出されてもよい。
The edge strength calculation unit 522 calculates the edge strength G of the attention area in the image block cut out by the image block setting unit 510 using the following equation (1).
gx = (a + c−b−d) / 2
gy = (a + b−c−d) / 2
G = gx × gx + gy × gy (1)
In the above formula, a, b, c, and d are pixel values of each pixel in the region of interest, as illustrated in FIG. Further, “gx” calculated in this way indicates the amount of change in the pixel value in the main scanning direction (left and right direction in FIG. 3), and “gy” indicates the pixel value in the sub scanning direction (up and down direction in FIG. 3). The amount of change is shown.
The edge strength is not limited to that calculated by the above formula (1), but may be calculated by the following formula (2).
G = | gx | + | gy | ... Formula (2)
That is, the edge strength G may be calculated as the sum of the absolute value of (gx) and the absolute value of (gy).

次に、エッジ方向推定部524について説明する。
図3(A)は、注目領域及び周辺領域を例示し、図3(B)は、この注目領域について推定されるエッジ方向を例示する図である。
図3(A)に例示するように、注目領域は2×2の矩形領域(主走査方向及び副走査方向にそれぞれ2つ)を有し、周辺領域は4×4の矩形領域(主走査方向及び副走査方向にそれぞれ4つ)を有する。各矩形はそれぞれ画素に相当し、矩形内の各数字はそれぞれの画素値を示している。すなわち、注目領域は、中心部近傍の画素{a,b,c,d}={15,104,86,203}である。以下、この図3(A)で例示する注目領域を具体例として、エッジ方向推定部524によるエッジ方向推定処理を説明する。
Next, the edge direction estimation unit 524 will be described.
FIG. 3A illustrates the attention area and the peripheral area, and FIG. 3B illustrates the edge direction estimated for the attention area.
As illustrated in FIG. 3A, the region of interest has a 2 × 2 rectangular region (two each in the main scanning direction and the sub-scanning direction), and the peripheral region is a 4 × 4 rectangular region (main scanning direction). And 4 each in the sub-scanning direction. Each rectangle corresponds to a pixel, and each number in the rectangle indicates a pixel value. That is, the attention area is the pixel {a, b, c, d} = {15, 104, 86, 203} near the center. Hereinafter, the edge direction estimation processing by the edge direction estimation unit 524 will be described using the attention area illustrated in FIG. 3A as a specific example.

図4は、エッジ方向推定部524によるエッジ方向推定処理(S10)のフローチャートである。
図5は、S110において選択される参照領域を例示する図である。なお、図5におけるハッチングされた部分は、図3に示した注目領域に相当する。
FIG. 4 is a flowchart of the edge direction estimation process (S10) by the edge direction estimation unit 524.
FIG. 5 is a diagram illustrating a reference region selected in S110. The hatched portion in FIG. 5 corresponds to the attention area shown in FIG.

図4に示すように、ステップ100(S100)において、エッジ方向推定部524は、図3(A)に例示した注目領域のエッジ角度Θを、次の式(3)で計算する。
Θ=arctan(gy/gx)・・・式(3)
図3(A)では、注目領域の画素値は、{a,b,c,d}={15,104,86,203}であり、式(1)より、
gx=−103
gy=−85
となり、これらを式(3)に代入することにより、
Θ=−140.5°
となる。
このエッジ角度Θの方向は、図3(B)に示された破線方向に相当する。
As shown in FIG. 4, in step 100 (S100), the edge direction estimation unit 524 calculates the edge angle Θ of the region of interest exemplified in FIG. 3A by the following equation (3).
Θ = arctan (gy / gx) (3)
In FIG. 3 (A), the pixel value of the attention area is {a, b, c, d} = {15, 104, 86, 203}.
gx = −103
gy = −85
By substituting these into equation (3),
Θ = -140.5 °
It becomes.
The direction of the edge angle Θ corresponds to the broken line direction shown in FIG.

さらに、エッジ方向推定部524は、算出されたエッジ角度Θが22.5°ごとに区分された方向(8方向)の角度範囲のいずれに含まれるかを判定する。本例では、エッジ角度Θが0°又は±180°を中心とした角度範囲を「方向0」とし、22.5°又は−157.5°を中心とした角度範囲を「方向1」とし、45°又は−135°を中心とした角度範囲を「方向2」とし、67.5°又は−112.5°を中心とした角度範囲を「方向3」とし、90°又は−90°を中心とした角度範囲を「方向4」とし、112.5°又は−67.5°を中心とした角度範囲を「方向5」とし、135°又は−45°を中心とした角度範囲を「方向6」とし、157.5°又は−22.5°を中心とした角度範囲を「方向7」する。これらの角度範囲は、それぞれの中心から±11.25°の範囲である。上述の具体例におけるエッジ角度Θ(=−140.5°)は、−135°±11.25°の範囲内に含まれるので、エッジ角度は「方向2」となる。   Further, the edge direction estimation unit 524 determines whether the calculated edge angle Θ is included in an angle range of directions (8 directions) divided every 22.5 °. In this example, the angle range around the edge angle Θ of 0 ° or ± 180 ° is “direction 0”, the angle range around 22.5 ° or −157.5 ° is “direction 1”, An angle range centered on 45 ° or −135 ° is “direction 2”, an angle range centered on 67.5 ° or −112.5 ° is “direction 3”, and centered on 90 ° or −90 °. An angle range centered on 112.5 ° or −67.5 ° is referred to as “direction 5”, and an angle range centered on 135 ° or −45 ° is referred to as “direction 6”. ", And an angle range centered on 157.5 ° or -22.5 ° is" direction 7 ". These angle ranges are ± 11.25 ° from their respective centers. Since the edge angle Θ (= −140.5 °) in the above specific example is included in the range of −135 ° ± 11.25 °, the edge angle is “direction 2”.

ステップ110(S110)において、エッジ方向推定部524は、算出された注目領域のエッジ角度Θに応じて、図3(A)に示した周辺領域(太線枠外の領域)の中からエッジ方向の推定に用いる参照領域を選択する。より具体的には、エッジ方向推定部524は、算出されたエッジ角度Θの方向で注目領域と隣接する可能性のある画素を含むように、参照領域を選択する。
例えば、エッジ方向推定部524は、注目領域について算出されたエッジ角度が「方向0」に含まれる場合に、図5(A)に例示する参照領域(太線で囲まれた2つの領域)を選択し、算出されたエッジ角度が「方向4」に含まれる場合に、図5(B)に例示する参照領域(太線で囲まれた2つの領域)を選択し、算出されたエッジ角度が上記以外の方向(方向1〜3、方向5〜7)に含まれる場合に、図5(C)に例示する参照領域(太線で囲まれた4つの領域)を選択する。図3に示した具体例では、エッジ角度の方向は「方向2」であるので、図5(C)に示した4つの参照領域が選択の候補となる。
なお、参照領域は、図5に例示したものに限定されるわけではなく、例えば図5(C)の場合などは、参照領域数を8としたり、それぞれの方向に応じた参照領域を設定してもよい。
In step 110 (S110), the edge direction estimation unit 524 estimates the edge direction from the peripheral area (outside the thick line frame) shown in FIG. 3A according to the calculated edge angle Θ of the attention area. Select the reference area to be used for. More specifically, the edge direction estimation unit 524 selects the reference area so as to include a pixel that may be adjacent to the attention area in the direction of the calculated edge angle Θ.
For example, when the edge angle calculated for the attention area is included in “direction 0”, the edge direction estimation unit 524 selects the reference areas (two areas surrounded by a thick line) illustrated in FIG. When the calculated edge angle is included in “direction 4”, the reference area (two areas surrounded by a thick line) illustrated in FIG. 5B is selected, and the calculated edge angle is other than the above. Are included in the directions (directions 1 to 3 and directions 5 to 7), the reference areas (four areas surrounded by thick lines) illustrated in FIG. 5C are selected. In the specific example shown in FIG. 3, since the direction of the edge angle is “direction 2”, the four reference areas shown in FIG. 5C are candidates for selection.
The reference areas are not limited to those illustrated in FIG. 5. For example, in the case of FIG. 5C, the number of reference areas is set to 8, or the reference areas corresponding to the respective directions are set. May be.

ステップ120(S120)において、エッジ方向推定部524は、選択された参照領域それぞれに対して、S100と同様に、式(1)及び式(3)に従ってエッジ角度Θを計算する。
ステップ130(S130)において、エッジ方向推定部524は、それぞれの参照領域について算出されたエッジ角度と、注目領域について算出されたエッジ角度とを比較して、これらの差分が予め設定されている閾値Θthより小さいか否かを判断する。エッジ方向推定部524は、エッジ角度の差分が閾値Θthより小さい場合には、この参照領域のエッジ角度を適正なエッジ角度として判定してS140の処理に移行し、エッジ角度の差分が閾値Θth以上である場合には、この参照領域のエッジ角度を適正なエッジ角度ではないと判定してS150の処理に移行する。
In step 120 (S120), the edge direction estimation unit 524 calculates the edge angle Θ in accordance with the equations (1) and (3) in the same manner as in S100 for each selected reference region.
In step 130 (S130), the edge direction estimation unit 524 compares the edge angle calculated for each reference area with the edge angle calculated for the attention area, and the difference between these is set in advance. It is determined whether it is smaller than Θth. If the edge angle difference is smaller than the threshold Θth, the edge direction estimation unit 524 determines that the edge angle of the reference region is an appropriate edge angle, and proceeds to the processing of S140. The edge angle difference is equal to or greater than the threshold Θth. If it is, it is determined that the edge angle of the reference region is not an appropriate edge angle, and the process proceeds to S150.

ステップ140(S140)において、エッジ方向推定部524は、角度参照数をインクリメントする。すなわち、エッジ方向推定部524は、参照領域について算出されたエッジ角度が適正なエッジ角度であると判断された場合にのみ、角度参照数をインクリメントする。
なお、角度参照数は、エッジ角度の参照数をカウントするための変数であり、注目領域ごとに「角度参照数1」に初期化される。
In step 140 (S140), the edge direction estimation unit 524 increments the angle reference number. That is, the edge direction estimation unit 524 increments the angle reference number only when it is determined that the edge angle calculated for the reference region is an appropriate edge angle.
The angle reference number is a variable for counting the reference number of the edge angle, and is initialized to “angle reference number 1” for each region of interest.

ステップ150(S150)において、エッジ方向推定部524は、選択した全ての参照領域についてエッジ角度を算出したか否かを判断し、全ての参照領域についてエッジ角度が算出された場合には、S160の処理に移行し、これ以外の場合には、S120の処理に戻って次の参照領域についてエッジ角度を算出する。
ステップ160(S160)において、エッジ方向推定部524は、注目領域のエッジ角度と、適正なエッジ角度として判定された参照領域のエッジ角度との総和を計算し、算出されたエッジ角度の総和を角度参照数で割った平均エッジ角度を注目領域の推定エッジ方向とする。
In step 150 (S150), the edge direction estimation unit 524 determines whether or not the edge angles have been calculated for all the selected reference areas, and if the edge angles have been calculated for all the reference areas, the process proceeds to S160. In other cases, the process returns to S120 to calculate the edge angle for the next reference area.
In step 160 (S160), the edge direction estimation unit 524 calculates the sum of the edge angle of the attention area and the edge angle of the reference area determined as an appropriate edge angle, and calculates the sum of the calculated edge angles as an angle. The average edge angle divided by the reference number is set as the estimated edge direction of the attention area.

なお、図3に示した具体例では、上部の参照領域{86,203,171,211}からエッジ角度ΘU=−149.4°、左部の参照領域{10,15,20,86}からエッジ角度ΘL=−131.2°、下部の参照領域{1,102,15,104}からエッジ角度ΘD=−175.2°、右部の参照領域{104,215,203,219}からエッジ角度ΘR=−141.0°となる。注目領域のエッジ角度Θ=−140.5°とそれぞれの参照領域のエッジ角度が比較され、その差分が閾値Θthより小さい参照領域の数が角度参照数としてカウントされる。   In the specific example shown in FIG. 3, the edge angle ΘU = -149.4 ° from the upper reference area {86, 203, 171, 211}, and from the left reference area {10, 15, 20, 86}. Edge angle ΘL = −131.2 °, lower reference region {1, 102, 15, 104} to edge angle ΘD = −175.2 °, right reference region {104, 215, 203, 219} to edge The angle ΘR = −141.0 °. The edge angle Θ = −140.5 ° of the attention area is compared with the edge angle of each reference area, and the number of reference areas whose difference is smaller than the threshold Θth is counted as the angle reference number.

図6は、図3に示した注目領域における推定エッジ方向の一例の説明図である。例えば上述の具体例において、すべての参照領域について注目領域のエッジ角度との差分が閾値Θthより小さいとすれば、注目領域及び4つの参照領域から求められたエッジ角度の総和は−737.3°となり、角度参照数5で割ることによって平均エッジ角度は−147.5°と求めることができる。この場合も、エッジ方向推定部524は、上述の注目領域のエッジ方向と同様に、例えば8方向のいずれかに含まれるかを判定する。本例では、平均エッジ角度が−147.5°であるため「方向1」に含まれ、これが推定エッジ方向となる。   FIG. 6 is an explanatory diagram illustrating an example of the estimated edge direction in the attention area illustrated in FIG. 3. For example, in the above-described specific example, if the difference between the edge angle of the attention area for all the reference areas is smaller than the threshold Θth, the sum of the edge angles obtained from the attention area and the four reference areas is −737.3 °. By dividing by the angle reference number 5, the average edge angle can be obtained as -147.5 °. Also in this case, the edge direction estimation unit 524 determines whether it is included in one of the eight directions, for example, similarly to the edge direction of the region of interest described above. In this example, since the average edge angle is −147.5 °, it is included in “direction 1”, which is the estimated edge direction.

なお、本実施形態では、1画素につき1色要素であるグレースケール画像を具体例として説明しているが、これに限定されるわけではない。例えば、1画素につき3色要素のRGB色空間のカラー画像が入力される場合には、各々の色成分のデータにおけるエッジ強度Gr、Gg、Gbの強さにより選択された色空間データで上記のエッジ方向推定処理(S10)を行えばよい。より具体的には、画像ブロック特徴量算出部520は、それぞれの色成分についてエッジ強度を算出し、算出されたエッジ強度Gr、Gg、Gbが最大となる色成分を選択して、選択された色成分についてのみ特徴量を算出する。このようにすることで、カラー画像における拡大画像データのエッジ部の色ずれなど、画質低下を抑えることが可能となる。
また、本例では、注目領域及び参照領域について式(1)により算出されたエッジ角度は、8方向のいずれかに分類されたが、これに限定されるものではなく、より精度の高いエッジ方向が必要であれば12方向(15.0°ごと)、16方向(12.25°ごと)など、さらに多数の角度領域に分類してもよい。
In the present embodiment, a grayscale image that is one color element per pixel is described as a specific example, but the present invention is not limited to this. For example, when a color image in the RGB color space having three color elements per pixel is input, the color space data selected by the strengths of the edge strengths Gr, Gg, and Gb in each color component data is used as described above. The edge direction estimation process (S10) may be performed. More specifically, the image block feature quantity calculation unit 520 calculates the edge strength for each color component, selects the color component that maximizes the calculated edge strengths Gr, Gg, and Gb, and selects the selected color component. The feature amount is calculated only for the color component. By doing so, it is possible to suppress deterioration in image quality such as color shift at the edge portion of the enlarged image data in the color image.
Further, in this example, the edge angle calculated by the expression (1) for the attention area and the reference area is classified into any one of the eight directions, but the present invention is not limited to this, and the edge direction with higher accuracy is used. May be classified into a larger number of angle regions such as 12 directions (every 15.0 °) and 16 directions (every 12.25 °).

次に、エッジパターン選択部526について説明する。
図7は、エッジパターン選択部526で用いるエッジパターンテーブルを例示する図である。
図7に例示するように、エッジパターン選択部526は、推定エッジ方向とエッジパターンとを互いに対応付けたエッジパターンテーブルを有する。エッジパターンテーブルには、注目領域のパターンサイズに対応するエッジパターンがそれぞれの推定エッジ方向(ここでは8方向)ごとに1つ以上のエッジパターンが登録されている。
エッジパターン選択部526は、このエッジパターンテーブルを参照して、エッジ方向推定部524によりそれぞれの注目領域について推定された推定エッジ方向に対応するエッジパターンを選択する。
本例では、図6に例示するように、注目領域に対する推定エッジ方向がエッジ方向推定部524によって「方向1」であると推定されているため、エッジパターン選択部526は、この推定エッジ方向(方向1)に従い、図7に示すエッジパターンテーブルの中から、方向1に対応する「パターン0」から「パターン3」までの4つのエッジパターンを選択し、これらをこの注目領域(図3)に対するエッジパターンの候補とする。
Next, the edge pattern selection unit 526 will be described.
FIG. 7 is a diagram illustrating an edge pattern table used in the edge pattern selection unit 526.
As illustrated in FIG. 7, the edge pattern selection unit 526 has an edge pattern table in which the estimated edge direction and the edge pattern are associated with each other. In the edge pattern table, one or more edge patterns corresponding to the pattern size of the region of interest are registered for each estimated edge direction (here, eight directions).
The edge pattern selection unit 526 refers to the edge pattern table and selects an edge pattern corresponding to the estimated edge direction estimated for each region of interest by the edge direction estimation unit 524.
In this example, as illustrated in FIG. 6, since the estimated edge direction with respect to the region of interest is estimated to be “direction 1” by the edge direction estimation unit 524, the edge pattern selection unit 526 includes the estimated edge direction ( According to direction 1), four edge patterns from “pattern 0” to “pattern 3” corresponding to direction 1 are selected from the edge pattern table shown in FIG. 7, and these are selected for this region of interest (FIG. 3). The edge pattern is a candidate.

次に、エッジパターン選択部526は、注目領域の画素値に基づいて、エッジパターンの候補となった1つ以上のエッジパターンの中から、1つのエッジパターンを選択する。エッジパターンの具体的な選択方法について、図8を参照しながら説明する。
図8は、図3に示した注目領域に対応するエッジパターンの選択方法を説明する図である。
本例では、推定エッジ方向が「方向1」であったため、図8(A)に例示するように、エッジパターンの候補として、「パターン0」から「パターン3」までの4つのエッジパターンが選択されている。これらのエッジパターンは、図8(B)に例示するように、ビットパターンとして表現される。具体的には、白部分を0、それ以外を1としてビットパターン化し、「ビットパターン0」から「ビットパターン3」までのビットパターンが生成される。なお、これらのビットパターンは、図7に示すエッジパターンテーブルにビットテーブルとして予め登録されていてもよい。
Next, the edge pattern selection unit 526 selects one edge pattern from one or more edge patterns that are candidates for the edge pattern, based on the pixel value of the region of interest. A specific method for selecting an edge pattern will be described with reference to FIG.
FIG. 8 is a diagram for explaining a method of selecting an edge pattern corresponding to the attention area shown in FIG.
In this example, since the estimated edge direction is “direction 1”, four edge patterns from “pattern 0” to “pattern 3” are selected as candidate edge patterns as illustrated in FIG. 8A. Has been. These edge patterns are expressed as bit patterns as illustrated in FIG. Specifically, a bit pattern is generated by setting the white portion to 0 and the other to 1 to generate bit patterns from “bit pattern 0” to “bit pattern 3”. These bit patterns may be registered in advance as a bit table in the edge pattern table shown in FIG.

エッジパターン選択部526は、注目領域に相当するビットパターンを判定する。具体的には、エッジパターン選択部526は、以下に示す式(4)に従い、注目領域中の平均画素値を計算し、注目領域内の各々の画素値から平均値を引き、その符号を以て注目領域の画素値パターンとする。
Mean=(a+b+c+d)/4
a_sign=a−Mean
b_sign=b−Mean
c_sign=c−Mean
d_sign=d−Mean・・・式(4)
なお、本例では、図8(C)に示すように、Mean=(15+104+86+203)/4=102であり、a_sign=−87、b_sign=2、c_sign=−16、d_sign=101となる。よって、エッジパターン選択部526は、これらの正負符号を判定して、図8(C)に示すように、注目領域のビットパターン(1010)を生成する。
そして、エッジパターン選択部526は、図8(B)に例示するエッジパターン候補に対応するビットパターンと、図8(C)に例示する注目領域のビットパターンとのパターンマッチングを行い、最も類似するエッジパターンを選択パターンとして決定する。選択されたエッジパターンは、後述する拡大パラメータ算出部530による注目領域における拡大パラメータの算出処理に適用される。
The edge pattern selection unit 526 determines a bit pattern corresponding to the attention area. Specifically, the edge pattern selection unit 526 calculates an average pixel value in the attention area according to the following formula (4), subtracts the average value from each pixel value in the attention area, and uses the sign to pay attention. The pixel value pattern of the region is used.
Mean = (a + b + c + d) / 4
a_sign = a-Mean
b_sign = b-Mean
c_sign = c-Mean
d_sign = d−Mean (4)
In this example, as shown in FIG. 8C, Mean = (15 + 104 + 86 + 203) / 4 = 102, a_sign = −87, b_sign = 2, c_sign = −16, and d_sign = 101. Therefore, the edge pattern selection unit 526 determines these positive and negative signs, and generates a bit pattern (1010) of the region of interest, as shown in FIG. 8C.
The edge pattern selection unit 526 performs pattern matching between the bit pattern corresponding to the edge pattern candidate illustrated in FIG. 8B and the bit pattern of the region of interest illustrated in FIG. An edge pattern is determined as a selection pattern. The selected edge pattern is applied to the enlargement parameter calculation process in the attention area by the enlargement parameter calculation unit 530 described later.

なお、エッジパターンは、図7に示したものに限定されるわけではなく、例えば、エッジパターン選択部526は、入力画像データの種類に応じて、エッジパターンテーブルを切り替えて、異なるエッジパターンを適用してもよい。また、エッジパターン選択部526は、各角度におけるエッジパターン候補数を増減させてもよい。   Note that the edge patterns are not limited to those shown in FIG. 7. For example, the edge pattern selection unit 526 switches the edge pattern table according to the type of input image data and applies different edge patterns. May be. Further, the edge pattern selection unit 526 may increase or decrease the number of edge pattern candidates at each angle.

[拡大パラメータ算出部の詳細説明]
次に、拡大パラメータ算出部530をより詳細に説明する。
拡大パラメータ算出部530は、まず、拡大処理の拡大倍率に応じたサイズ及び係数の強調カーネルを用いて、画像ブロック設定部510により切り出された画像ブロック中の注目領域及びその周辺領域の画像データのコントラストを強調する。
図9は、拡大パラメータ算出部530により用いられる強調カーネル(エッジ強調カーネル)を例示する図である。
図9に例示するように、第1の強調カーネル532は、重み付け係数「1.60」及び「−0.15」を用いてコントラストを強調し、第2の強調カーネル534は、重み付け係数「1.20」及び「−0.05」を用いてコントラストを強調する。これらの強調カーネルは、対象画像に対して既になされた拡大処理の拡大倍率に対応付けられており、互いに異なる重み付け係数を用いて、互いに異なる位置の画素値を参照する。
第1の強調カーネル532は、図9(A)に例示するように、注目画素Pの直下画素a、直右画素b、直上画素c及び直左画素dを参照して、これらの画素の画素値にそれぞれ重み付け係数(−0.15)を掛け合わせ、重み付け係数(1.60)が掛けられた注目画素Pの画素値と合算し、合算された値を注目画素Pの画素値とする。
第2の強調カーネル534は、第1の強調カーネル532よりも拡大倍率の大きな画像に対して適用され、図9(B)に例示するように、注目画素Pから1画素分離間した下画素a、右画素b、上画素c及び左画素dを参照して、これらの画素の画素値にそれぞれ重み付け係数(−0.05)を掛け合わせ、重み付け係数(1.20)が掛けられた注目画素Pの画素値と合算し、合算された値を注目画素Pの画素値とする。
例えば、第1の強調カーネル532を適用する場合に、以下の式(5)に従って、コントラスト強調後の画素値P’が算出される。
(画素値P’)=1.60×P‐0.15×(a+b+c+d)・・・式(5)
[Detailed description of the enlarged parameter calculation unit]
Next, the expansion parameter calculation unit 530 will be described in more detail.
The enlargement parameter calculation unit 530 first uses the size and coefficient emphasis kernel according to the enlargement magnification of the enlargement process, and the image data of the attention area and the surrounding area in the image block cut out by the image block setting unit 510. Emphasize contrast.
FIG. 9 is a diagram illustrating an enhancement kernel (edge enhancement kernel) used by the enlargement parameter calculation unit 530.
As illustrated in FIG. 9, the first enhancement kernel 532 uses the weighting factors “1.60” and “−0.15” to enhance contrast, and the second enhancement kernel 534 includes the weighting factor “1”. .20 ”and“ −0.05 ”to enhance contrast. These enhancement kernels are associated with the enlargement magnification of the enlargement process already performed on the target image, and refer to pixel values at different positions using different weighting coefficients.
As illustrated in FIG. 9A, the first enhancement kernel 532 refers to the pixel a, the right pixel b, the pixel c, and the pixel d of the pixel of interest P with reference to the pixels of these pixels. Each value is multiplied by a weighting coefficient (−0.15) and added to the pixel value of the target pixel P multiplied by the weighting coefficient (1.60), and the sum is set as the pixel value of the target pixel P.
The second enhancement kernel 534 is applied to an image having a larger magnification than the first enhancement kernel 532, and as illustrated in FIG. 9B, a lower pixel a that is separated by one pixel from the target pixel P. , The right pixel b, the upper pixel c, and the left pixel d, the pixel value of these pixels is multiplied by a weighting coefficient (−0.05), and the pixel of interest multiplied by the weighting coefficient (1.20) The pixel value of P is added together, and the added value is set as the pixel value of the target pixel P.
For example, when the first enhancement kernel 532 is applied, the pixel value P ′ after contrast enhancement is calculated according to the following equation (5).
(Pixel value P ′) = 1.60 × P−0.15 × (a + b + c + d) Expression (5)

このように、既になされた拡大処理の拡大倍率に応じて強調カーネルが異なるのは、4倍、8倍と順に画像を拡大していくと、原画像の特徴を有している画素は、2画素、4画像離れた位置の画素となる。そのため、拡大パラメータ算出部530は、図9に例示するように、拡大倍率が高いほど離れた画素を参照して強調処理を行う。なお、8倍、16倍以降の倍率においても同様である。
また、参照する画素の位置は、図9に示すような上下左右に限られたものではない。例えば、拡大パラメータ算出部530は、斜め方向の画素を参照してコントラスト強調を行ったり、さらに離れた画素を参照してコントラスト強調を行ったり、処理対象画像データの種類及びサイズなどにより適用する強調カーネルを切り替えたりしてもよい。
As described above, the enhancement kernels differ according to the enlargement magnification of the already performed enlargement process. When the image is enlarged in order of 4 times and 8 times, the pixels having the characteristics of the original image are 2 The pixel is a pixel at a position distant from four images. Therefore, as illustrated in FIG. 9, the enlargement parameter calculation unit 530 performs enhancement processing with reference to pixels that are further away as the enlargement magnification is higher. The same applies to magnifications of 8 times, 16 times and later.
Further, the position of the pixel to be referred to is not limited to the vertical and horizontal directions as shown in FIG. For example, the enlargement parameter calculation unit 530 performs contrast enhancement with reference to pixels in an oblique direction, performs contrast enhancement with reference to further distant pixels, and enhancement applied according to the type and size of the processing target image data. You may switch kernels.

次に、拡大パラメータ算出部530は、エッジ方向推定部524により推定された推定エッジ方向と、エッジパターン選択部526により選択されたエッジパターンと、コントラスト強調がなされた画素値とを用いて、注目領域の画像特徴量に基づく拡大パラメータを算出する。
図10は、拡大パラメータ算出部530により算出される拡大パラメータを例示する図である。
図10に例示するように、「uh」、「lh」、「lv」、「rv」及び「mid」の5つの拡大パラメータは、注目領域(図10中のハッチングを施した領域)の各画素の画素値(a、b、c、d)を用いて、既定の計算式によりそれぞれ算出される。この注目領域の画素値は、図9で例示した強調カーネルによりコントラスト強調がなされたものである。また、この計算式(演算式)は、エッジ方向推定部524で得られた推定エッジ方向と、エッジパターン選択部526で得られたエッジパターンとで決定される。
また、図10に例示したref[0,5]は、注目領域の推定エッジ方向に応じて一意に設定される。具体的には、注目領域の推定エッジ方向が方向1(22.5°)から方向3(67.5°)のいずれかである場合には、図10(A)に示すように、注目領域周辺のコントラスト強調された画素のうち、左上から下へ3画素(ref4、ref2及びref0)と、右下から上へ3画素(ref1、ref3及びref5)とがref[0,5]として設定される(以後、このref設定をtypeAと呼ぶ)。また、注目領域の推定エッジ方向が方向5(112.5°)から方向7(157.5°)のいずれかである場合には、図10(B)に示すように、左下から上へ3画素(ref0、ref2及びref4)と、右上から下へ3画素(ref5、ref3及びref1)とがref[0,5]として設定される(以後、このref設定をtypeBと呼ぶ)。さらに、注目領域の推定エッジ方向が方向0又は方向4(すなわち垂直方向又は水平方向の場合)である場合は、図10(C)に示すように、ref[0,5]が設定される(以後、このref設定をtypeCと呼ぶ)。
なお、ref設定は、図10に例示した3パターンに限定されるものではなく、推定エッジ方向に従い、より多くのref設定パターンが用意されてもよい。
Next, the enlargement parameter calculation unit 530 uses the estimated edge direction estimated by the edge direction estimation unit 524, the edge pattern selected by the edge pattern selection unit 526, and the pixel value on which contrast enhancement has been performed. An enlargement parameter based on the image feature amount of the region is calculated.
FIG. 10 is a diagram illustrating the enlargement parameter calculated by the enlargement parameter calculation unit 530.
As illustrated in FIG. 10, the five expansion parameters “uh”, “lh”, “lv”, “rv”, and “mid” are set for each pixel of the attention area (the hatched area in FIG. 10). The pixel values (a, b, c, d) are respectively calculated by predetermined calculation formulas. The pixel value of this attention area has been subjected to contrast enhancement by the enhancement kernel exemplified in FIG. Also, this calculation formula (calculation formula) is determined by the estimated edge direction obtained by the edge direction estimation unit 524 and the edge pattern obtained by the edge pattern selection unit 526.
Further, ref [0,5] illustrated in FIG. 10 is uniquely set according to the estimated edge direction of the attention area. Specifically, when the estimated edge direction of the attention area is any one of the direction 1 (22.5 °) to the direction 3 (67.5 degrees), as shown in FIG. Among the peripheral-emphasized pixels, three pixels (ref4, ref2, and ref0) from the upper left to the lower and three pixels (ref1, ref3, and ref5) from the lower right to the upper are set as ref [0,5]. (Hereafter, this ref setting is referred to as type A). When the estimated edge direction of the attention area is any one of the direction 5 (112.5 °) to the direction 7 (157.5 °), as shown in FIG. Pixels (ref0, ref2, and ref4) and three pixels (ref5, ref3, and ref1) from the upper right to the lower are set as ref [0,5] (hereinafter, this ref setting is referred to as type B). Furthermore, when the estimated edge direction of the attention area is direction 0 or direction 4 (that is, in the case of the vertical direction or the horizontal direction), ref [0,5] is set as shown in FIG. Hereinafter, this ref setting is referred to as typeC).
Note that the ref setting is not limited to the three patterns illustrated in FIG. 10, and more ref setting patterns may be prepared according to the estimated edge direction.

次に、エッジ方向推定部524で得られた推定エッジ方向、及び、エッジパターン選択部526で得られたエッジパターンに基づいて決定される拡大パラメータの計算式を説明する。
図11は、推定エッジ方向及びエッジパターンに応じて決定される拡大パラメータの計算式を例示する図である。
図11(A)に例示するように、拡大パラメータ算出部530は、エッジ方向推定部524によりエッジ方向1と推定され、かつ、エッジパターン選択部526によりエッジパターン2が選択された場合(すなわち、図3(A)に例示した注目領域が処理対象である場合)、この注目領域(図3(A)に相当)に対して以下の計算式を設定する。
uh=(a+c)/2
lh=(b+d)/2
lv=(a+c)/2
rv=(b+d)/2
mid=(b+c)/2
ref[0,5]=typeA
なお、上記a,b,c及びdは、注目領域にある各画素の画素値である。
Next, calculation formulas for the enlargement parameter determined based on the estimated edge direction obtained by the edge direction estimation unit 524 and the edge pattern obtained by the edge pattern selection unit 526 will be described.
FIG. 11 is a diagram illustrating an enlargement parameter calculation formula determined according to the estimated edge direction and the edge pattern.
As illustrated in FIG. 11A, the enlargement parameter calculation unit 530 estimates the edge direction 1 by the edge direction estimation unit 524 and selects the edge pattern 2 by the edge pattern selection unit 526 (that is, When the attention area illustrated in FIG. 3A is a processing target), the following calculation formula is set for the attention area (corresponding to FIG. 3A).
uh = (a + c) / 2
lh = (b + d) / 2
lv = (a + c) / 2
rv = (b + d) / 2
mid = (b + c) / 2
ref [0,5] = typeA
Note that a, b, c, and d are the pixel values of each pixel in the region of interest.

また、拡大パラメータ算出部530は、推定エッジ方向1であり、かつ、エッジパターン0である場合には、図11(B)に例示するように、以下の計算式を設定する。
lh=(c+d)/2
lv=(a+c)/2
rv=(b+d)/2
mid=(b+c)/2
uh=2*mid−lh
ref[0,5]=typeA
The enlargement parameter calculation unit 530 sets the following calculation formula as illustrated in FIG. 11B when the estimated edge direction is 1 and the edge pattern is 0.
lh = (c + d) / 2
lv = (a + c) / 2
rv = (b + d) / 2
mid = (b + c) / 2
uh = 2 * mid-lh
ref [0,5] = typeA

また、拡大パラメータ算出部530は、推定エッジ方向3であり、かつ、エッジパターン0である場合には、図11(C)に例示するように、以下の計算式を設定する。
uh=(a+b)/2
lh=(c+d)/2
rv=(b+d)/2
mid=(b+c)/2
lv=2*mid−rv
ref[0,5]=typeA
The enlargement parameter calculation unit 530 sets the following calculation formula as illustrated in FIG. 11C when the estimated edge direction is 3 and the edge pattern is 0.
uh = (a + b) / 2
lh = (c + d) / 2
rv = (b + d) / 2
mid = (b + c) / 2
lv = 2 * mid-rv
ref [0,5] = typeA

また、拡大パラメータ算出部530は、推定エッジ方向7であり、かつ、エッジパターン1である場合には、図11(D)に例示するように、以下の計算式を設定する。
uh=(b+d)/2
lh=(a+c)/2
rv=(a+c)/2
mid=(b+d)/2
lv=(a+d)/2
ref[0,5]=typeB
Further, when the estimated parameter direction 530 is the estimated edge direction 7 and the edge pattern 1, the enlarged parameter calculation unit 530 sets the following calculation formula as illustrated in FIG.
uh = (b + d) / 2
lh = (a + c) / 2
rv = (a + c) / 2
mid = (b + d) / 2
lv = (a + d) / 2
ref [0,5] = typeB

拡大パラメータ算出部530は、以上のように設定された計算式に基づいて、拡大パラメータ(uh、lhなど)を算出する。
なお、他の推定エッジ方向及びエッジパターンの組合せについても、同様にそれぞれ一意に対応した計算式が設定され、この計算式に従って拡大パラメータが算出され設定される。
The expansion parameter calculation unit 530 calculates an expansion parameter (uh, lh, etc.) based on the calculation formula set as described above.
For other combinations of estimated edge directions and edge patterns, calculation formulas that uniquely correspond to each other are similarly set, and an enlargement parameter is calculated and set according to the calculation formula.

[拡大画素生成部の詳細説明]
次に、拡大画素生成部540をより詳細に説明する。
拡大画素生成部540は、拡大パラメータ算出部530により算出された複数の拡大パラメータと、入力画像データ中の拡大対象画素(注目画素)が含まれる画像ブロック中の画素値とを用いて、この注目画素に対応する拡大画素値(拡大倍率に応じた拡大処理後の画素の画素値)を算出する。
図12は、注目画素が含まれた複数の画像ブロック(近傍ブロック)を例示する図である。
図12に例示するように、拡大画素生成部540は、拡大画素生成処理において、拡大対象画素である注目画素が含まれる複数の近傍ブロックの画素値を参照して、注目画素に対応する拡大画素値を生成する。具体的には、拡大画素生成部540は、拡大対象画素である注目画素Eを拡大する場合に、図12に示すように、近傍ブロック0(ABDE)、近傍ブロック1(BCEF)、近傍ブロック2(DEGH)及び近傍ブロック3(EFHI)の4つの近傍ブロックに関して、それぞれの近傍ブロックについて拡大パラメータ算出部530により算出された拡大パラメータの一部を用いて、注目画素に対応する拡大画素の画素値を算出する。
[Detailed description of enlarged pixel generator]
Next, the enlarged pixel generation unit 540 will be described in more detail.
The enlargement pixel generation unit 540 uses the attention value by using the plurality of enlargement parameters calculated by the enlargement parameter calculation unit 530 and the pixel value in the image block including the enlargement target pixel (target pixel) in the input image data. An enlarged pixel value corresponding to the pixel (pixel value of the pixel after enlargement processing corresponding to the enlargement magnification) is calculated.
FIG. 12 is a diagram illustrating a plurality of image blocks (neighboring blocks) including the target pixel.
As illustrated in FIG. 12, the enlarged pixel generation unit 540 refers to the pixel values of a plurality of neighboring blocks including the target pixel that is the target pixel in the enlarged pixel generation process, and the enlarged pixel corresponding to the target pixel. Generate a value. Specifically, when enlarging the target pixel E, which is the enlargement target pixel, the enlarged pixel generation unit 540, as shown in FIG. 12, the neighboring block 0 (ABDE), the neighboring block 1 (BCEF), and the neighboring block 2 With respect to the four neighboring blocks of (DEGH) and neighboring block 3 (EFHI), the pixel value of the enlarged pixel corresponding to the pixel of interest using a part of the enlarged parameter calculated by the enlarged parameter calculating unit 530 for each neighboring block Is calculated.

図13は、注目画素Eを主走査方向及び副走査方向にそれぞれ2倍する場合の拡大画素を例示する図である。
図13に例示するように、拡大画素生成部540は、拡大対象画素である注目画素Eを拡大倍率2倍で拡大する場合に、拡大画素S0、S1、S2、S3を生成する。より具体的には、拡大画素生成部540は、注目画素Eが含まれた4つの近傍ブロック(図12)の画素値と、拡大パラメータ算出部530により算出された拡大パラメータとを用いて、以下に示す算出式により拡大画素S0、S1、S2、S3の画素値を算出する。なお、注目画素Eを含む近傍ブロック内の画素値は、拡大パラメータ算出部530により予めコントラスト強調がなされている。
FIG. 13 is a diagram illustrating an enlarged pixel when the target pixel E is doubled in the main scanning direction and the sub-scanning direction, respectively.
As illustrated in FIG. 13, the enlarged pixel generation unit 540 generates the enlarged pixels S0, S1, S2, and S3 when enlarging the pixel of interest E that is an enlargement target pixel at an enlargement magnification of 2 times. More specifically, the enlarged pixel generation unit 540 uses the pixel values of the four neighboring blocks (FIG. 12) including the target pixel E and the enlargement parameter calculated by the enlargement parameter calculation unit 530 to perform the following. The pixel values of the enlarged pixels S0, S1, S2, and S3 are calculated using the calculation formula shown in FIG. Note that the pixel values in the neighboring block including the target pixel E are contrast-enhanced in advance by the enlargement parameter calculation unit 530.

S0=0.05×(A+B)+0.36×E
+0.12×uh(DEGH)+0.06×lh(ABDE)
+0.12×lv(BCEF)+0.06×rv(ABDE)
+0.09×mid(ABDE)
+0.04×ref0(EFHI)
+0.03×ref2(BCEF)
+0.02×ref4(BCEF)
S0 = 0.05 × (A + B) + 0.36 × E
+ 0.12 × uh (DEGH) + 0.06 × lh (ABDE)
+ 0.12 × lv (BCEF) + 0.06 × rv (ABDE)
+0.09 x mid (ABDE)
+ 0.04 × ref0 (EFHI)
+0.03 x ref2 (BCEF)
+ 0.02 × ref4 (BCEF)

S1=0.05×(B+C)+0.36×E
+0.12×uh(EFHI)+0.06×lh(BCEF)
+0.12×rv(ABDE)+0.06×lv(BCEF)
+0.09×mid(BCEF)
+0.04×ref1(DEGH)
+0.03×ref3(ABDE)
+0.02×ref5(ABDE)
S1 = 0.05 × (B + C) + 0.36 × E
+ 0.12 × uh (EFHI) + 0.06 × lh (BCEF)
+ 0.12 × rv (ABDE) + 0.06 × lv (BCEF)
+0.09 x mid (BCEF)
+ 0.04 × ref1 (DEGH)
+0.03 x ref3 (ABDE)
+ 0.02 × ref5 (ABDE)

S2=0.05×(G+H)+0.36×E
+0.12×lh(ABDE)+0.06×uh(DEGH)
+0.12×lv(EFHI)+0.06×rv(DEGH)
+0.09×mid(DEGH)
+0.04×ref4(BCEF)
+0.03×ref2(EFHI)
+0.02×ref0(EFHI)
S2 = 0.05 × (G + H) + 0.36 × E
+ 0.12 × lh (ABDE) + 0.06 × uh (DEGH)
+ 0.12 × lv (EFHI) + 0.06 × rv (DEGH)
+0.09 x mid (DEGH)
+ 0.04 × ref4 (BCEF)
+0.03 x ref2 (EFHI)
+ 0.02 × ref0 (EFHI)

S3=0.05×(H+I)+0.36×E
+0.12×lh(BCEF)+0.06×uh(EFHI)
+0.12×rv(DEGH)+0.06×lv(EFHI)
+0.09×mid(EFHI)
+0.04×ref5(ABDE)
+0.03×ref3(DEGH)
+0.02×ref1(DEGH)
S3 = 0.05 × (H + I) + 0.36 × E
+ 0.12 × lh (BCEF) + 0.06 × uh (EFHI)
+ 0.12 × rv (DEGH) + 0.06 × lv (EFHI)
+0.09 x mid (EFHI)
+ 0.04 × ref5 (ABDE)
+0.03 x ref3 (DEGH)
+ 0.02 × ref1 (DEGH)

なお、上式に示した記号(AからE)は、それぞれ図13で説明した注目画素及び近傍画素の画素値を表す。また、uh、lh、lv、rv、ref[0、5]は、それぞれ拡大パラメータ算出部530により算出された、カッコ内のアルファベット列(ABDE、BCEF、DEGH、EFHI)で表される近傍ブロック0から近傍ブロック3における拡大パラメータである。   Note that the symbols (A to E) shown in the above expression represent the pixel values of the pixel of interest and the neighboring pixels described in FIG. Further, uh, lh, lv, rv, ref [0, 5] are neighborhood blocks 0 represented by parenthesized alphabet strings (ABDE, BCEF, DEGH, EFHI) calculated by the enlarged parameter calculation unit 530, respectively. To the enlargement parameter in the neighborhood block 3.

[全体動作]
次に、画像拡大プログラム5の全体動作を説明する。
図14は、画像拡大プログラム5による画像拡大処理(S20)のフローチャートである。
図14に示すように、ステップ200(S200)において、画像ブロック設定部510は、画像ブロック特徴量算出部520、拡大パラメータ算出部530及び拡大画素生成部540における処理で必要とされる既定の画像ブロックのサイズをそれぞれ設定し、記憶部500に記憶されている処理対象画像データから、設定されたブロックサイズの画像ブロックを順次(例えばラスタスキャン順に)切り出し、切り出された各画像ブロックを画像ブロック特徴量算出部520、拡大パラメータ算出部530及び拡大画素生成部540にそれぞれ出力する。
[Overall operation]
Next, the overall operation of the image enlargement program 5 will be described.
FIG. 14 is a flowchart of image enlargement processing (S20) by the image enlargement program 5.
As shown in FIG. 14, in step 200 (S200), the image block setting unit 510 is a default image required for processing in the image block feature amount calculation unit 520, the enlargement parameter calculation unit 530, and the enlargement pixel generation unit 540. Each block size is set, image blocks of the set block size are cut out sequentially (for example, in raster scan order) from the processing target image data stored in the storage unit 500, and each cut out image block is image block feature The data is output to the amount calculation unit 520, the enlargement parameter calculation unit 530, and the enlargement pixel generation unit 540, respectively.

S10において、画像ブロック特徴量算出部520は、入力された画像ブロック中の注目領域のエッジ強度Gを式(1)で算出する。なお、{a,b,c,d}は図3に例示するように注目領域内の各画素値である。入力画像データがグレースケール画像でなく、例えばRGB色空間のカラー画像である場合には、画像ブロック特徴量算出部520は、注目領域に関してR,G,Bの各色空間の色成分毎の画像ブロックそれぞれについて、式(1)を用いてエッジ強度Gr、Gg、Gbを計算し、Gr、Gg、Gbの中で最大のエッジ強度である色成分の画像ブロックを選択し、そのエッジ強度を注目領域の(すべての色成分に共通の)エッジ強度とする。
さらに、画像ブロック特徴量算出部520は、注目領域及びその注目領域を含む1ないし複数の周辺領域中の参照領域のエッジ角度Θを、式(3)で計算する。
なお、gx、gyは式(1)において各々算出される値である。そして、得られた複数のエッジ角度Θから注目領域のエッジ方向θを推定する。例えば、画像ブロック特徴量算出部520は、得られた複数のエッジ角度Θの平均値を算出し、算出された平均値を推定エッジ方向θとする。
In S10, the image block feature amount calculation unit 520 calculates the edge strength G of the attention area in the input image block using Expression (1). Note that {a, b, c, d} are each pixel value in the region of interest as illustrated in FIG. When the input image data is not a grayscale image but a color image in, for example, an RGB color space, the image block feature quantity calculation unit 520 has an image block for each color component in each of the R, G, and B color spaces with respect to the region of interest. For each, the edge strengths Gr, Gg, and Gb are calculated using the formula (1), and the image component of the color component that is the maximum edge strength among the Gr, Gg, and Gb is selected, and the edge strength is selected as the attention area Edge strength (common to all color components).
Further, the image block feature quantity calculation unit 520 calculates the edge angle Θ of the reference area in the attention area and one or more peripheral areas including the attention area by Expression (3).
Note that gx and gy are values calculated in equation (1). Then, the edge direction θ of the region of interest is estimated from the obtained plurality of edge angles Θ. For example, the image block feature quantity calculation unit 520 calculates the average value of the obtained plurality of edge angles Θ, and sets the calculated average value as the estimated edge direction θ.

ステップ210(S210)において、画像ブロック特徴量算出部520は、推定されたエッジ方向θ及び注目領域の画素分布パターンを用いてエッジパターンを選択する。ここで、エッジパターンについては、エッジ方向及び画素分布パターンに応じて予め用意されたパターンテーブルの中から選択される。   In step 210 (S210), the image block feature quantity calculation unit 520 selects an edge pattern using the estimated edge direction θ and the pixel distribution pattern of the region of interest. Here, the edge pattern is selected from a pattern table prepared in advance according to the edge direction and the pixel distribution pattern.

ステップ220(S220)において、拡大パラメータ算出部530は、拡大率に応じてサイズ及び重み付け係数が設定された強調カーネルを用いて、画像ブロック設定部510により切り出された画像ブロック中の注目領域及びその周辺領域の画像データに対してコントラスト強調処理を施す。さらに、拡大パラメータ算出部530は、コントラスト強調処理が施された画像データと、エッジ方向推定部524により推定された推定エッジ方向と、エッジパターン選択部526により選択されたエッジパターンとを用いて、これら注目領域の画像特徴量に基づく拡大パラメータ(uh、lh、lv、rv、mid、ref)を算出する。   In step 220 (S220), the enlargement parameter calculation unit 530 uses the enhancement kernel in which the size and the weighting coefficient are set according to the enlargement ratio, and the region of interest in the image block clipped by the image block setting unit 510 and its region A contrast enhancement process is performed on the image data in the peripheral area. Further, the enlargement parameter calculation unit 530 uses the image data that has been subjected to contrast enhancement processing, the estimated edge direction estimated by the edge direction estimation unit 524, and the edge pattern selected by the edge pattern selection unit 526, The enlargement parameters (uh, lh, lv, rv, mid, ref) based on the image feature quantities of these attention areas are calculated.

ステップ230(S230)において、拡大画素生成部540は、入力画像データの拡大対象画素(注目画素)が含まれる画像ブロックの画素値(コントラスト強調された画素値)と、注目画素周辺(注目画素を含む)の画像ブロックについて拡大パラメータ算出部530により算出された複数の拡大パラメータ(uh、lh、lv、rv、mid、ref)とを用いて、この注目画素について拡大倍率に応じた拡大画素の画素値を生成し、生成された拡大画素の画素値を記憶部500に出力し格納させる。   In step 230 (S230), the enlarged pixel generation unit 540 selects the pixel value (contrast enhanced pixel value) of the image block including the enlargement target pixel (target pixel) of the input image data, and the target pixel periphery (target pixel). A plurality of enlargement parameters (uh, lh, lv, rv, mid, ref) calculated by the enlargement parameter calculation unit 530 for the image block (including), and a pixel of the enlargement pixel corresponding to the enlargement magnification for the target pixel A value is generated, and the pixel value of the generated enlarged pixel is output to the storage unit 500 and stored.

ステップ240(S240)において、画像拡大プログラム5は、すべての入力画像データについて拡大処理が完了したか否かを判定し、拡大処理が完了していないと判定された場合に、S200の処理に戻って次の画素ブロックに対する拡大処理を行い、拡大処理が完了していると判定された場合に、拡大処理(S20)を終了する。   In step 240 (S240), the image enlargement program 5 determines whether or not the enlargement process has been completed for all input image data. If it is determined that the enlargement process has not been completed, the process returns to the process of S200. If the enlargement process is performed on the next pixel block and it is determined that the enlargement process has been completed, the enlargement process (S20) is terminated.

このように、本実施形態における画像処理装置2は、処理対象となった入力画像データを例えば所定サイズの画像ブロックに分けて、各画像ブロックについてエッジ強度やエッジ方向等の特徴量を算出する。そして、画像処理装置2は、この特徴量に基づいて画像ブロック毎の拡大パラメータを算出し、入力画像データにおける注目画素から拡大画素を生成する際に、これら拡大パラメータを用いることにより、拡大処理全体の処理負荷を抑えた、高画質な拡大画像を得ることができるようになる。
すなわち、本画像処理装置2は、注目画素を含む所定の大きさの画像ブロックの特徴量に従って拡大画素を生成することにより、入力画像中の特徴的な部分の特徴量を保存する拡大処理を実現でき、特徴的部分におけるボケやジャギーなどの画質欠陥を抑制した高画質な拡大処理を小さな処理負荷により高速に行うことができる。
As described above, the image processing apparatus 2 according to the present embodiment divides the input image data to be processed into, for example, image blocks of a predetermined size, and calculates feature quantities such as edge strength and edge direction for each image block. Then, the image processing device 2 calculates an enlargement parameter for each image block based on the feature amount, and uses these enlargement parameters when generating the enlargement pixel from the target pixel in the input image data, so that the entire enlargement process is performed. It is possible to obtain a high-quality enlarged image with a reduced processing load.
That is, the image processing apparatus 2 realizes an enlargement process for storing feature quantities of characteristic portions in the input image by generating enlarged pixels according to feature quantities of an image block having a predetermined size including the target pixel. In addition, high-quality enlargement processing that suppresses image quality defects such as blurring and jaggy in characteristic portions can be performed at high speed with a small processing load.

本発明にかかる画像処理方法が適応される画像処理装置2のハードウェア構成を、制御装置20を中心に例示する図である。It is a figure which illustrates the hardware constitutions of the image processing apparatus 2 with which the image processing method concerning this invention is applied centering on the control apparatus 20. FIG. 制御装置20(図1)により実行され、本発明にかかる画像処理方法を実現する画像拡大プログラム5の機能構成を例示する図である。It is a figure which illustrates the functional structure of the image expansion program 5 which is performed by the control apparatus 20 (FIG. 1) and implement | achieves the image processing method concerning this invention. (A)は、注目領域及び周辺領域を例示し、(B)は、この注目領域について推定されるエッジ方向を例示する図である。(A) illustrates an attention area and a peripheral area, and (B) illustrates an edge direction estimated for the attention area. エッジ方向推定部524によるエッジ方向推定処理(S10)のフローチャートである。It is a flowchart of the edge direction estimation process (S10) by the edge direction estimation part 524. S110において選択される参照領域を例示する図である。It is a figure which illustrates the reference field selected in S110. 図3に示した注目領域における推定エッジ方向の一例の説明図である。It is explanatory drawing of an example of the estimated edge direction in the attention area | region shown in FIG. エッジパターン選択部526で用いるエッジパターンテーブルを例示する図である。5 is a diagram illustrating an edge pattern table used in an edge pattern selection unit 526. FIG. 図3に示した注目領域に対応するエッジパターンの選択方法を説明する図である。It is a figure explaining the selection method of the edge pattern corresponding to the attention area shown in FIG. 拡大パラメータ算出部530により用いられる強調カーネル(エッジ強調カーネル)を例示する図である。FIG. 10 is a diagram illustrating an enhancement kernel (edge enhancement kernel) used by an enlargement parameter calculation unit 530. 拡大パラメータ算出部530により算出される拡大パラメータを例示する図である。It is a figure which illustrates the expansion parameter calculated by the expansion parameter calculation part 530. 推定エッジ方向及びエッジパターンに応じて決定された拡大パラメータの計算式を例示する図である。It is a figure which illustrates the calculation formula of the expansion parameter determined according to the estimated edge direction and the edge pattern. 注目画素が含まれる複数の近傍ブロックを例示する図である。FIG. 6 is a diagram illustrating a plurality of neighboring blocks including a target pixel. 注目画素Eを2倍に拡大する場合の拡大画素S0、S1、S2、S3を例示する図である。It is a figure which illustrates expansion pixel S0, S1, S2, S3 in the case of enlarging attention pixel E 2 times. 画像拡大プログラム5による画像拡大処理(S20)のフローチャートである。It is a flowchart of the image expansion process (S20) by the image expansion program 5. FIG.

符号の説明Explanation of symbols

2・・・画像処理装置
5・・・画像拡大プログラム
500・・・記憶部
510・・・画像ブロック設定部
520・・・画像ブロック特徴量算出部
522・・・エッジ強度算出部
524・・・エッジ方向推定部
526・・・エッジパターン選択部
530・・・拡大パラメータ算出部
532,534・・・強調カーネル
540・・・拡大画素生成部
DESCRIPTION OF SYMBOLS 2 ... Image processing apparatus 5 ... Image expansion program 500 ... Memory | storage part 510 ... Image block setting part 520 ... Image block feature-value calculation part 522 ... Edge strength calculation part 524 ... Edge direction estimation unit 526 ... edge pattern selection unit 530 ... enlargement parameter calculation unit 532, 534 ... enhancement kernel 540 ... enlargement pixel generation unit

Claims (12)

入力画像の拡大処理を行う画像処理装置であって、
入力画像における既定の大きさの画像領域について、階調変化に関する特徴量を算出する領域特徴量算出手段と、
前記領域特徴量算出手段によりそれぞれの画像領域について算出された特徴量に基づいて、パラメータを生成するパラメータ生成手段と、
処理対象画素が含まれる画像領域内の画素値と、前記パラメータ生成手段によりこの画像領域について生成されたパラメータとを用いて、この処理対象画素に対応する拡大画像データを生成する拡大画像生成手段と
を有する画像処理装置。
An image processing apparatus for enlarging an input image,
A region feature amount calculating means for calculating a feature amount related to a gradation change for an image region of a predetermined size in the input image;
Parameter generating means for generating a parameter based on the feature amount calculated for each image region by the region feature amount calculating means;
Enlarged image generating means for generating enlarged image data corresponding to the processing target pixel using the pixel value in the image area including the processing target pixel and the parameter generated for the image area by the parameter generating means; An image processing apparatus.
前記領域特徴量算出手段は、前記画像領域における階調変化量を前記特徴量として算出する
請求項1に記載の画像処理装置。
The image processing apparatus according to claim 1, wherein the region feature amount calculating unit calculates a gradation change amount in the image region as the feature amount.
前記領域特徴量算出手段は、前記画像領域における階調変化の方向を前記特徴量として算出し、
前記パラメータ生成手段は、前記領域特徴量算出手段により算出された階調変化の方向に応じて画像領域内から参照画素を選択し、少なくとも、選択された参照画素の画素値を前記パラメータとする
請求項1に記載の画像処理装置。
The area feature quantity calculating means calculates a direction of gradation change in the image area as the feature quantity,
The parameter generation unit selects a reference pixel from the image region in accordance with the direction of gradation change calculated by the region feature amount calculation unit, and at least the pixel value of the selected reference pixel is used as the parameter. Item 8. The image processing apparatus according to Item 1.
前記領域特徴量算出手段は、予め用意された複数のエッジパターンのうち、それぞれの画像領域における階調変化に対応するエッジパターンを前記特徴量として選択し、
前記パラメータ生成手段は、前記領域特徴量算出手段により選択されたエッジパターンに対応する演算式を用いて、前記パラメータを算出する
請求項1に記載の画像処理装置。
The region feature amount calculation means selects, as the feature amount, an edge pattern corresponding to a gradation change in each image region from among a plurality of edge patterns prepared in advance.
The image processing apparatus according to claim 1, wherein the parameter generation unit calculates the parameter using an arithmetic expression corresponding to the edge pattern selected by the region feature amount calculation unit.
前記領域特徴量算出手段は、色空間におけるそれぞれの色成分毎に前記特徴量を算出し、算出された1つ以上の特徴量に基づいていずれか1つの色成分を選択し、選択された色成分の特徴量を前記画像領域の特徴量とする
請求項1に記載の画像処理装置。
The area feature value calculating means calculates the feature value for each color component in a color space, selects any one color component based on the calculated one or more feature values, and selects the selected color The image processing apparatus according to claim 1, wherein a feature amount of a component is a feature amount of the image area.
前記領域特徴量算出手段は、それぞれの色成分について、前記画像領域における階調変化量を算出し、算出された階調変化量が最大である色成分を選択する
請求項5に記載の画像処理装置。
6. The image processing according to claim 5, wherein the region feature amount calculating unit calculates a gradation change amount in the image region for each color component, and selects a color component having the maximum calculated gradation change amount. apparatus.
前記パラメータ生成手段は、前記領域特徴量算出手段により算出された特徴量に対応する既定の演算式を用いてパラメータを生成する
請求項1に記載の画像処理装置。
The image processing apparatus according to claim 1, wherein the parameter generation unit generates a parameter using a predetermined arithmetic expression corresponding to the feature amount calculated by the region feature amount calculation unit.
前記パラメータ生成手段は、拡大率に応じてカーネル要素及びカーネル要素間距離が異なるエッジ強調カーネルを用いて、入力画像の画素値を補正し、補正された画素値を用いてパラメータを生成する
請求項1に記載の画像処理装置。
The parameter generation means corrects a pixel value of an input image using an edge enhancement kernel having a kernel element and a distance between kernel elements different depending on an enlargement ratio, and generates a parameter using the corrected pixel value. The image processing apparatus according to 1.
前記拡大画像生成手段は、処理対象画素を含む複数の画像領域の画素値と、前記パラメータ生成手段によりこれらの画像領域について生成されたパラメータとを用いて、この処理対象画素に対応する拡大画像データをそれぞれ生成する
請求項1に記載の画像処理装置。
The enlarged image generation means uses the pixel values of a plurality of image areas including the processing target pixel and the parameters generated for the image areas by the parameter generation means, and uses the enlarged image data corresponding to the processing target pixel. The image processing device according to claim 1, wherein each of the image processing devices is generated.
前記拡大画像生成手段は、前記パラメータ生成手段により生成されたパラメータと、処理対象画素が含まれる画像領域中の画素値とを重み付け加算して拡大画像データを生成する
請求項1に記載の画像処理装置。
2. The image processing according to claim 1, wherein the enlarged image generation unit generates enlarged image data by weighted addition of the parameter generated by the parameter generation unit and a pixel value in an image region including the processing target pixel. apparatus.
入力画像の拡大処理を行う画像処理方法であって、
入力画像における既定の大きさの画像領域について、階調変化に関する特徴量を算出し、
それぞれの画像領域について算出された特徴量に基づいて、パラメータを生成し、
処理対象画素が含まれる画像領域内の画素値と、この画像領域について生成されたパラメータとを用いて、この処理対象画素に対応する拡大画像データを生成する
画像処理方法。
An image processing method for enlarging an input image,
For the image area of a predetermined size in the input image, calculate the feature value related to the gradation change,
Based on the feature amount calculated for each image area, generate parameters,
An image processing method for generating enlarged image data corresponding to a processing target pixel by using a pixel value in an image region including the processing target pixel and a parameter generated for the image region.
入力画像の拡大処理を行う画像処理装置において、
入力画像における既定の大きさの画像領域について、階調変化に関する特徴量を算出するステップと、
それぞれの画像領域について算出された特徴量に基づいて、パラメータを生成するステップと、
処理対象画素が含まれる画像領域内の画素値と、この画像領域について生成されたパラメータとを用いて、この処理対象画素に対応する拡大画像データを生成するステップと
を前記画像処理装置に実行させるプログラム。
In an image processing apparatus that performs enlargement processing of an input image,
A step of calculating a feature amount related to a gradation change for an image area of a predetermined size in the input image;
Generating a parameter based on the feature amount calculated for each image region;
Generating the enlarged image data corresponding to the pixel to be processed using the pixel value in the image region including the pixel to be processed and the parameter generated for the image region; program.
JP2004232135A 2004-08-09 2004-08-09 Image processing apparatus, image processing method and program thereof Pending JP2006050480A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2004232135A JP2006050480A (en) 2004-08-09 2004-08-09 Image processing apparatus, image processing method and program thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2004232135A JP2006050480A (en) 2004-08-09 2004-08-09 Image processing apparatus, image processing method and program thereof

Publications (1)

Publication Number Publication Date
JP2006050480A true JP2006050480A (en) 2006-02-16

Family

ID=36028478

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2004232135A Pending JP2006050480A (en) 2004-08-09 2004-08-09 Image processing apparatus, image processing method and program thereof

Country Status (1)

Country Link
JP (1) JP2006050480A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008017291A (en) * 2006-07-07 2008-01-24 Canon Inc Image processor, image processing method, image processing program, and storage medium
JP2012079195A (en) * 2010-10-05 2012-04-19 Jvc Kenwood Corp Image processing method and image processing device
WO2022055273A1 (en) * 2020-09-09 2022-03-17 Samsung Electronics Co., Ltd. Method and electronic device for applying adaptive zoom on an image

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008017291A (en) * 2006-07-07 2008-01-24 Canon Inc Image processor, image processing method, image processing program, and storage medium
JP4677376B2 (en) * 2006-07-07 2011-04-27 キヤノン株式会社 Image processing apparatus, image processing method, image processing program, and storage medium
JP2012079195A (en) * 2010-10-05 2012-04-19 Jvc Kenwood Corp Image processing method and image processing device
WO2022055273A1 (en) * 2020-09-09 2022-03-17 Samsung Electronics Co., Ltd. Method and electronic device for applying adaptive zoom on an image

Similar Documents

Publication Publication Date Title
JP3915563B2 (en) Image processing apparatus and image processing program
JP4568460B2 (en) Image processing apparatus and recording medium
EP1758093B1 (en) Image processing device and method, recording medium, and program
EP0874330A2 (en) Area based interpolation for image enhancement
JP3167120B2 (en) Image processing apparatus and method
US7885486B2 (en) Image processing system, method for processing image and computer readable medium
JP4507279B2 (en) Image processing apparatus, image processing method, and program thereof
JP4716255B2 (en) Image processing apparatus, image processing method, and program thereof
JP4126541B2 (en) Image processing apparatus, image processing method, image processing program, and storage medium
JP4857975B2 (en) Image processing system and image processing program
JP2006050481A (en) Image processing apparatus, image processing method and program thereof
JP2006050480A (en) Image processing apparatus, image processing method and program thereof
JP4730525B2 (en) Image processing apparatus and program thereof
JP3092769B2 (en) Image processing device
KR100587979B1 (en) Interpolation method for image enlargement based on edge and corner
JP4265363B2 (en) Image processing device
JP4827137B2 (en) Resolution conversion processing method, image processing apparatus, image display apparatus, and program
JP4517288B2 (en) Image processing apparatus, image processing method, and program thereof
JP2006252108A (en) Image processing device, image processing method, and its program
JP5013243B2 (en) Image processing apparatus, image processing method, image processing program, and recording medium recording the same
JP4736121B2 (en) Image analysis apparatus, image processing apparatus, image analysis method, image analysis program, and recording medium recording the same
JP4517287B2 (en) Image processing apparatus, image processing method, and program thereof
JP3972625B2 (en) Image processing apparatus and image processing method
JPH0993424A (en) Image processor
JP2006252107A (en) Image processing device, image processing method, and its program