JP2006252107A - Image processing device, image processing method, and its program - Google Patents

Image processing device, image processing method, and its program Download PDF

Info

Publication number
JP2006252107A
JP2006252107A JP2005066830A JP2005066830A JP2006252107A JP 2006252107 A JP2006252107 A JP 2006252107A JP 2005066830 A JP2005066830 A JP 2005066830A JP 2005066830 A JP2005066830 A JP 2005066830A JP 2006252107 A JP2006252107 A JP 2006252107A
Authority
JP
Japan
Prior art keywords
image
region
area
enlarged
unit
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
JP2005066830A
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 JP2005066830A priority Critical patent/JP2006252107A/en
Publication of JP2006252107A publication Critical patent/JP2006252107A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Image Processing (AREA)
  • Editing Of Facsimile Originals (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide an image processing device capable of quickly obtaining a high quality enlarged image, with a comparatively light processing load. <P>SOLUTION: In the image processing device 2, with regard to a spotlighted pixel included in an input image, an image area of a predetermined size, included in the spotlighted pixel is distinguished, on the basis of the characteristics of the image area, the feature amount of the distinguished image area is calculated, one enlarging technique from a plurality of enlarging techniques is applied, on the basis of the calculated feature amount, with regard to the distinguished image area, an enlarge image area corresponding to the image area is generated, and the generated enlarged image area is arranged in an output image. <P>COPYRIGHT: (C)2006,JPO&NCIPI

Description

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

画像の拡大処理は、画像の編集やファイリング、表示、印刷などを行うシステムにとって、基本的な処理の一つである。また近年、インターネットのホームページ上の画像やデジタルビデオなどのディスプレイ解像度での表示を主目的とした画像データなどの普及により、これらの低解像度画像を高解像度のプリンタなどで印刷することも頻繁に行われている。このプリンタによる印刷の際に、高画質の出力結果を得ることが望まれており、高画質の拡大処理に対する重要度が高まっている。
加えて、PC、ワークステーション、ディスプレイ又はプリンタなどのハードウェア、及びそれらのハードウェアなどで使用されるソフトウェアの高機能化に伴い、各アプリケーションが出力する画像データも多様化している。
The image enlargement process is one of the basic processes for a system that performs image editing, filing, display, printing, and the like. In recent years, with the widespread use of image data mainly for display at display resolutions such as images on the Internet homepage and digital video, these low-resolution images are frequently printed by high-resolution printers. It has been broken. At the time of printing with this printer, it is desired to obtain a high-quality output result, and the importance of the high-quality enlargement process is increasing.
In addition, image data output by each application is diversified as hardware such as PCs, workstations, displays or printers, and software used in the hardware increase in functionality.

図1は、画像データの構成を例示する図であり、図1(A)は、ソース画像を示し、図3(B)は、2値画像であるマスク画像を示し、図1(C)は、背景画像を示し、図1(D)は、ソース画像とマスク画像とを用いてマスク処理した画像を背景画像に貼り込んで構成した後の画像データを示す。このような複数構成の画像データを高解像度のプリンタなどで出力する場合には、構成後の画像データ(図1(D))に対して拡大処理を行う方法も採られるが、アプリケーション及びシステムによっては、各々の構成画像データ(図1では、ソース画像(A)、マスク画像(B)、背景画像(C)、で、以下ではこれらを構成要素画像と称する)に対して拡大処理を行い、それら拡大処理後のそれぞれの構成要素画像データを用いて拡大画像データを構成する方法も採られうる。このような拡大処理においても、同様に高画質拡大処理に対する重要度が高まっている。   FIG. 1 is a diagram illustrating the configuration of image data. FIG. 1A illustrates a source image, FIG. 3B illustrates a mask image that is a binary image, and FIG. FIG. 1D shows image data after an image that has been masked using the source image and the mask image is pasted into the background image. When outputting image data of a plurality of configurations with a high-resolution printer or the like, a method of enlarging the image data after configuration (FIG. 1D) is also employed. Performs an enlargement process on each component image data (in FIG. 1, source image (A), mask image (B), background image (C), hereinafter referred to as component image), A method of constructing enlarged image data using each component image data after the enlargement processing can also be adopted. In such an enlargement process, the importance of the high-quality enlargement process is also increasing.

図2は、ソース画像とマスク画像とを用いてマスク処理を行う方法を例示する図である。
図2に示すように、一般にカラーを含む多階調で表現された画像(以下では、多値画像と称する)では、ソース画像(A)と2値画像であるマスク画像(B)とをそれぞれ拡大処理し、拡大処理後の各々の画像データを用いて、マスク処理が行われることがある。
一般に、画像を拡大処理する既存の代表的な手法としては、最近傍法、線形補間法、キュービック・コンボリューション法などがある。ソース画像(図2(A))及びマスク画像(図2(B))を最近傍法で拡大処理を行い、マスク処理を施した場合、最近傍法が拡大後の各画素値として、その画素を原画像上に逆写像した際に最も距離が近い画素の画素値を使うという方法(つまり、同じ画素値をもつ画素が連続する方法)であるため、高速処理は可能であるが、斜線部やエッジ部にジャギーが発生し、画像がモザイク状になるなど合成画像の画質劣化の程度は大きい。
また、ソース画像を、最近傍法に比べて高画質な線形補間法やキュービック・コンボリューション法などで拡大処理を行った場合には、マスク画像のエッジ部分に相当する、マスク処理後の合成画像のエッジ部周辺画素値に不具合が生じる。
FIG. 2 is a diagram illustrating a method for performing mask processing using a source image and a mask image.
As shown in FIG. 2, in an image generally expressed in multiple gradations including color (hereinafter referred to as a multi-valued image), a source image (A) and a mask image (B) as a binary image are respectively represented. In some cases, the enlargement process is performed, and the mask process is performed using each image data after the enlargement process.
In general, existing representative methods for enlarging an image include a nearest neighbor method, a linear interpolation method, and a cubic convolution method. When the source image (FIG. 2A) and the mask image (FIG. 2B) are enlarged by the nearest neighbor method and mask processing is performed, the nearest neighbor method uses each pixel value after enlargement as its pixel value. Is the method of using the pixel value of the pixel with the closest distance when the image is inversely mapped onto the original image (that is, the method in which pixels having the same pixel value are continuous). As a result, jaggies are generated at the edges and the image has a mosaic shape.
In addition, when the source image is enlarged using a linear interpolation method or cubic convolution method with higher image quality than the nearest neighbor method, the composite image after mask processing, which corresponds to the edge portion of the mask image There is a problem in the pixel values around the edge of each other.

図3は、図1で示した構成要素画像であるソース画像およびマスク画像を、それぞれ線形補間法および最近傍法で拡大した具体例を示している。線形補間法は、画素間の画素値が直線的に変化していると仮定し、拡大後の画素を逆写像した点の近傍4画素の画素値を線形に補間して画素値を求めるという方法である。このため、図3(C)に示すように、ソース画像のエッジ部分の画素値が太枠で囲まれた画素で変化する。したがって、図3(B)に示す拡大処理後のマスク画像と、図3(C)に示す拡大処理後のソース画像を用いてマスク処理を行うと、ソース画像のエッジ部分に関して、マスク画像のエッジ部分に相当する位置の画素値が変化するという不具合が生じる。ここで、図3では、ソース画像を線形補間法を用いて拡大する具体例を示したが、ソース画像の拡大処理にキュービック・コンボリューション法などを用いた場合でも同様な現象が生じる。   FIG. 3 shows a specific example in which the source image and the mask image, which are the component image shown in FIG. 1, are enlarged by the linear interpolation method and the nearest neighbor method, respectively. In the linear interpolation method, it is assumed that pixel values between pixels change linearly, and pixel values of four pixels in the vicinity of a point obtained by inversely mapping the enlarged pixel are linearly interpolated to obtain a pixel value. It is. For this reason, as shown in FIG. 3C, the pixel value of the edge portion of the source image changes in pixels surrounded by a thick frame. Therefore, when mask processing is performed using the mask image after the enlargement process shown in FIG. 3B and the source image after the enlargement process shown in FIG. 3C, the edge of the mask image is related to the edge portion of the source image. There arises a problem that the pixel value at the position corresponding to the portion changes. Here, FIG. 3 shows a specific example of enlarging the source image using the linear interpolation method, but the same phenomenon occurs even when the cubic convolution method or the like is used for the enlargement process of the source image.

これら合成画像の画質問題を解決する試みとして、例えば特許文献1などの方式が提案されている。特許文献1に記載されている技術では、スムージング補正された画像と補正対象でない画像とが重なる部分では、その重なる両画素の画素値を比較して、画素値が高い方(あるいは低い方)を選択して出力することにより、合成画像の画素値変化の不具合が解消されている。しかし、特許文献1に記載の技術では、補正対象画像と補正対象外画像の正確な分離が前提であり、2つの画像データを用いたマスク処理による合成画像生成の場合には、不具合は解消されない。
また、上述したようなマスク処理に伴うエッジ部分の不具合とは別に、高画質な拡大処理という点において、先に述べた線形補間法は、直線的に変化しているという仮定に当てはまらないエッジ部分を中心に、画像全体がボケ気味になるという欠点がある。またキュービック・コンボリューション法に関しては、標本化定理に基づいてsinc関数(sin(x)/x)を近似した補間関数を定義し、拡大後の画素を逆写像した点の近傍16画素(X、Y方向それぞれ4画素)と前記の近似補間関数との畳み込み演算により、拡大後の画素値を求める方法のため、参照範囲が大きく演算量が多いという欠点がある。また、高域が強調気味となる特性を持つため、エッジ部分で軽いジャギーが発生し、ノイズ成分が強調されてしまうなどの欠点もある。
As an attempt to solve the image quality problem of these synthesized images, for example, a method such as Patent Document 1 has been proposed. In the technique described in Patent Document 1, in a portion where an image subjected to smoothing correction and an image that is not a correction target overlap, the pixel values of the two overlapping pixels are compared, and the pixel value that is higher (or lower) is compared. By selecting and outputting, the problem of the pixel value change of the composite image is solved. However, the technique described in Patent Document 1 is premised on accurate separation of a correction target image and a non-correction target image, and the problem is not solved in the case of generating a composite image by mask processing using two image data. .
In addition to the above-mentioned defect in the edge part due to the mask process, the above-mentioned linear interpolation method does not apply to the assumption that the linear interpolation method changes linearly in terms of high-quality enlargement processing. There is a drawback that the whole image becomes blurred. As for the cubic convolution method, an interpolation function that approximates a sinc function (sin (x) / x) is defined based on the sampling theorem, and 16 pixels (X, Since the pixel value after enlargement is obtained by convolution with the approximate interpolation function in the Y direction (4 pixels each), there is 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 is a drawback that light jaggy occurs at the edge portion and noise components are emphasized.

これら拡大画像の画質問題を解決する試みとして、例えば特許文献2、特許文献3などの新規方式が提案されている。
特許文献2に記載されている技術では、原画像の変化度合いの検出法として、エッジ検出フィルタによるエッジ検出を行い、そのエッジ検出結果に基づいてエッジ画素を定義する。そしてエッジ画素と判断された場合には、キュービック・コンボリューション法の3次関数形状を調整したM−キュービック法で拡大を行い、そうでない場合は最近傍法で拡大する。しかし、変化度合いの大きいエッジ部分をM−キュービック法で行うので、キュービック・コンボリューション法の画質特徴を踏襲し、ジャギーの発生やノイズ成分が強調されるという欠点がある。
As an attempt to solve the image quality problem of these enlarged images, new systems such as Patent Document 2 and Patent Document 3 have been proposed.
In the technique described in Patent Document 2, as a method for detecting the degree of change in an original image, edge detection is performed using an edge detection filter, and edge pixels are defined based on the edge detection result. When it is determined that the pixel is an edge pixel, enlargement is performed by the M-cubic method in which the cubic function shape of the cubic convolution method is adjusted. Otherwise, enlargement is performed by the nearest neighbor method. However, since the edge portion having a large degree of change is performed by the M-cubic method, the image quality characteristics of the cubic convolution method are followed, and there is a disadvantage that jaggy generation and noise components are emphasized.

特許文献3に記載されている技術では、画像の性質を予めブロック毎の濃度ヒストグラムで測り、その結果に基づいて第1補間(パターンマッチング法又はニアレストネイバー法(NN法))と第2補間(キュービック・コンボリューション法あるいはM−キュービック法)の結果を重畳する。第1補間処理の1つであるパターンマッチング法では、予め定めた角度パターンに現画像ブロックから生成したパターン(2値化パターン)が一致した場合、現画像ブロックを含む参照ブロックを用いて所定のルールで注目画素に対する補間画素ブロックを生成する。しかし特許文献3においても、M−キュービック法との重畳であるのでジャギーの発生やノイズ成分が強調される問題がある。   In the technique described in Patent Document 3, the property of an image is measured in advance by a density histogram for each block, and based on the result, a first interpolation (pattern matching method or nearest neighbor method (NN method)) and a second interpolation are performed. Superimpose the results of (cubic convolution method or M-cubic method). In the pattern matching method, which is one of the first interpolation processes, when a pattern (binarized pattern) generated from a current image block matches a predetermined angle pattern, a predetermined block is used using a reference block including the current image block. An interpolation pixel block for the target pixel is generated by the rule. However, Patent Document 3 also has a problem that jaggy and noise components are emphasized because of superimposition with the M-cubic method.

特開平10−336454号公報JP-A-10-336454 特開2000−188681号公報JP 2000-188681 A 特開2002−165089号公報JP 2002-165089 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.

上記目的を達成するために、本発明にかかる第1の画像処理装置は、入力画像の拡大処理を行う画像処理装置であって、入力画像に含まれる注目画素について、この注目画素を含む所定の大きさの画像領域を、この画像領域の特徴に基づいて判別する領域判別手段と、前記領域判別手段により判別された画像領域の特徴量を算出する領域特徴量算出手段と、前記領域判別手段による判別された画像領域について、前記領域特徴量算出手段により算出された特徴量に基づいて選択された、複数の拡大手法のうち1つの拡大手法を適用して、画像領域に対応する拡大画像領域を生成する拡大画像領域生成手段と、前記拡大画像領域生成手段により生成された拡大画像領域を出力画像に配置する画像配置手段とを有する。   In order to achieve the above object, a first image processing apparatus according to the present invention is an image processing apparatus that performs an enlargement process of an input image, and for a target pixel included in the input image, a predetermined pixel including the target pixel is included. A region discriminating unit that discriminates a size image region based on the feature of the image region, a region feature amount calculating unit that calculates a feature amount of the image region discriminated by the region discriminating unit, and a region discriminating unit. For the discriminated image area, an enlarged image area corresponding to the image area is selected by applying one of the plurality of enlargement techniques selected based on the feature quantity calculated by the area feature quantity calculating means. An enlarged image region generating unit for generating, and an image arranging unit for arranging the enlarged image region generated by the enlarged image region generating unit on an output image.

好適には、前記領域判別手段は、画像領域内の階調数を計数し、この階調数と所定の基準値とを比較することにより画像領域を判別する。
好適には、前記領域判別手段は、所定値を有する画素が、画像領域内に含まれるか否かにより、画像領域を判別する。
Preferably, the area discriminating unit discriminates the image area by counting the number of gradations in the image area and comparing the number of gradations with a predetermined reference value.
Preferably, the area determination unit determines the image area based on whether or not a pixel having a predetermined value is included in the image area.

好適には、前記領域特徴量算出手段は、前記領域判別手段により判別された画像領域が、所定の条件を満たす場合に、この画像領域の特徴量を算出する。
好適には、前記領域特徴量算出手段は、画像領域内の各画素値に基づいて、この画像領域における階調変化量を算出し、この階調変化量を特徴量とする。
好適には、前記領域特徴量算出手段は、画像領域内の各画素値に基づいて、この画像領域における階調変化方向を算出し、この階調変化方向を特徴量とする。
Preferably, the area feature amount calculating unit calculates a feature amount of the image region when the image region determined by the region determining unit satisfies a predetermined condition.
Preferably, the region feature amount calculating means calculates a gradation change amount in the image region based on each pixel value in the image region, and uses the gradation change amount as a feature amount.
Preferably, the region feature amount calculating means calculates a gradation change direction in the image region based on each pixel value in the image region, and uses the gradation change direction as a feature amount.

好適には、前記領域特徴量算出手段は、画像領域内の各画素値に基づいて、この画像領域における階調変化を算出し、この階調変化が既定の画素値パターンに対応する場合に、この画素値パターンを特徴量として選択する。
好適には、前記領域特徴量算出手段は、色空間における色成分それぞれについて特徴量を算出し、算出された特徴量に基づいて1つの色成分を選択し、この色成分について算出された特徴量を画像領域の特徴量とする。
Preferably, the area feature amount calculating means calculates a gradation change in the image area based on each pixel value in the image area, and when the gradation change corresponds to a predetermined pixel value pattern, This pixel value pattern is selected as a feature amount.
Preferably, the area feature value calculating unit calculates a feature value for each color component in the color space, selects one color component based on the calculated feature value, and calculates the feature value calculated for the color component. Is the feature quantity of the image area.

好適には、前記拡大画像領域生成手段は、前記領域特徴量算出手段により算出された特徴量が所定の条件を満たす画像領域に対して、画像領域の特徴量、画像領域の近傍領域の特徴量、及び近傍領域内の画素値に基づいて選択された、拡大画像領域を生成する拡大手法を適用して、拡大画像領域を生成する。
好適には、前記拡大画像領域生成手段は、エッジ強調処理を拡大率に応じて行って、画像領域内の画素値を補正し、補正された画素値を用いて拡大画像領域を生成する拡大手法を適用して、拡大画像領域を生成する。
Preferably, the enlarged image area generation unit is configured such that the feature quantity calculated by the area feature quantity calculation unit satisfies a predetermined condition, and the feature quantity of the image area and the feature quantity of the neighborhood area of the image area The enlarged image area is generated by applying an enlargement method for generating an enlarged image area selected based on the pixel values in the neighboring area.
Preferably, the enlarged image area generating means performs edge enhancement processing according to an enlargement ratio, corrects a pixel value in the image area, and generates an enlarged image area using the corrected pixel value. Is applied to generate an enlarged image region.

好適には、前記拡大画像領域生成手段は、前記領域特徴量算出手段により算出された階調変化の方向に応じて近傍領域内の画素値を選択し、選択された画素値を用いて拡大画像領域を生成する拡大手法を適用して、拡大画像領域を生成する。
好適には、前記拡大画像領域生成手段は、前記領域特徴量算出手段により算出された特徴量に対応する既定の演算式を用いて拡大画像領域を生成する拡大手法を適用して、拡大画像領域を生成する。
Preferably, the enlarged image region generation unit selects a pixel value in a neighboring region according to the direction of gradation change calculated by the region feature amount calculation unit, and uses the selected pixel value to enlarge the image. An enlarged image area is generated by applying an enlargement method for generating an area.
Preferably, the enlarged image region generating unit applies an enlargement method for generating an enlarged image region using a predetermined arithmetic expression corresponding to the feature amount calculated by the region feature amount calculating unit, and Is generated.

好適には、前記拡大画像領域生成手段は、前記領域判別手段により判別された画像領域が既定の条件を満たす場合、及び前記領域特徴量算出手段により算出された画像領域の特徴量が所定の条件を満たす場合に、画像領域に対して、複数の拡大手法のうち処理負荷の小さい拡大手法を適用して、拡大画像領域を生成する。
好適には、前記拡大画像領域生成手段は、処理負荷の小さい拡大手法として、少なくとも最近傍補間法に基づいた拡大手法を適用する。
Preferably, the enlarged image region generation unit is configured such that when the image region determined by the region determination unit satisfies a predetermined condition, the feature amount of the image region calculated by the region feature amount calculation unit is a predetermined condition. When the above condition is satisfied, an enlarged image area is generated by applying an enlargement technique with a small processing load among a plurality of enlargement techniques to the image area.
Preferably, the enlarged image region generating unit applies an enlargement method based on at least the nearest neighbor interpolation method as an enlargement method with a small processing load.

好適には、前記画像配置手段は、前記領域特徴量算出手段により算出された特徴量が所定の条件を満たす場合に、前記拡大画像領域生成手段により生成される拡大画像領域を重なり合うように配置する。
好適には、前記画像配置手段は、前記拡大画像領域生成手段により生成される複数の拡大画像領域が互いに重なり合う場合に、これらの拡大画像領域の重複部分について、同一画素に対応する複数の画素値の平均値を算出する。
好適には、前記画像配置手段は、前記領域特徴量算出手段により算出された特徴量が所定の条件を満たす場合に、前記拡大画像領域生成手段により生成される拡大画像領域を重なり合わないように配置する。
Preferably, the image arranging unit arranges the enlarged image regions generated by the enlarged image region generating unit so as to overlap when the feature amount calculated by the region feature amount calculating unit satisfies a predetermined condition. .
Preferably, when the plurality of enlarged image regions generated by the enlarged image region generating unit overlap each other, the image arranging unit has a plurality of pixel values corresponding to the same pixel with respect to an overlapping portion of these enlarged image regions. The average value of is calculated.
Preferably, the image arrangement unit does not overlap the enlarged image regions generated by the enlarged image region generation unit when the feature amount calculated by the region feature amount calculation unit satisfies a predetermined condition. Deploy.

本発明にかかる第2の画像処理装置は、入力画像の拡大処理を行う画像処理装置であって、入力画像に含まれる注目画素について、この注目画素を含む所定の大きさの画像領域が、ソース部分であるか、又はマスク部分であるかを判別する判別手段と、前記判別手段による判別結果に応じた拡大手法を適用して、前記判別手段により判別された画像領域に対応する拡大画像領域を生成する拡大画像領域生成手段と、前記拡大画像領域生成手段により生成された複数の拡大画像領域の境界部分を補正する補正手段とを有する。   A second image processing apparatus according to the present invention is an image processing apparatus that performs an enlargement process of an input image. For a target pixel included in the input image, an image area having a predetermined size including the target pixel is a source. Applying a discriminating means for discriminating whether it is a part or a mask part, and an enlargement method according to the discrimination result by the discriminating means, an enlarged image area corresponding to the image area discriminated by the discriminating means is obtained. An enlarged image area generating means for generating; and a correcting means for correcting boundary portions of the plurality of enlarged image areas generated by the enlarged image area generating means.

本発明にかかる第1の画像処理方法は、入力画像の拡大処理を行う画像処理方法であって、入力画像に含まれる注目画素について、この注目画素を含む所定の大きさの画像領域を、この画像領域の特徴に基づいて判別し、前記判別された画像領域の特徴量を算出し、前記判別された画像領域について、前記算出された特徴量に基づいて選択された、複数の拡大手法のうち1つの拡大手法を適用して、画像領域に対応する拡大画像領域を生成し、前記生成された前記拡大画像領域を出力画像に配置する。   A first image processing method according to the present invention is an image processing method for enlarging an input image, and for an attention pixel included in the input image, an image area having a predetermined size including the attention pixel Discrimination based on the features of the image region, calculating the feature amount of the discriminated image region, and selecting among the plurality of enlargement methods selected based on the calculated feature amount for the discriminated image region One enlarged method is applied to generate an enlarged image area corresponding to the image area, and the generated enlarged image area is arranged in the output image.

本発明にかかる第2の画像処理方法は、入力画像の拡大処理を行う画像処理方法であって、入力画像に含まれる注目画素について、この注目画素を含む所定の大きさの画像領域が、ソース部分であるか、又はマスク部分であるかを判別し、前記判別結果に応じた拡大手法を適用して、前記判別された画像領域に対応する拡大画像領域を生成し、前記生成された複数の拡大画像領域の境界部分を補正する。   A second image processing method according to the present invention is an image processing method for performing an enlargement process of an input image. For a target pixel included in the input image, an image area having a predetermined size including the target pixel is a source. Determining whether it is a part or a mask part, applying an enlargement method according to the determination result, generating an enlarged image area corresponding to the determined image area, and generating the plurality of generated The boundary portion of the enlarged image area is corrected.

本発明にかかる第1のプログラムは、コンピュータを含み、入力画像の拡大処理を行う画像処理装置において、入力画像に含まれる注目画素について、この注目画素を含む所定の大きさの画像領域を、この画像領域の特徴に基づいて判別する領域判別ステップと、前記判別された画像領域の特徴量を算出する領域特徴量算出ステップと、前記判別された画像領域について、前記算出された特徴量に基づいて選択された、複数の拡大手法のうち1つの拡大手法を適用して、画像領域に対応する拡大画像領域を生成する拡大画像領域生成ステップと、前記生成された拡大画像領域を出力画像に配置する画像配置ステップとを前記画像処理装置のコンピュータに実行させる。   A first program according to the present invention includes a computer, and in an image processing apparatus that performs an enlargement process of an input image, for a target pixel included in the input image, an image region having a predetermined size including the target pixel An area determining step for determining based on the feature of the image area, an area feature amount calculating step for calculating the feature amount of the determined image area, and the determined image area based on the calculated feature amount Applying one of the selected enlargement methods, an enlarged image region generating step for generating an enlarged image region corresponding to the image region, and arranging the generated enlarged image region in the output image The image placement step is executed by the computer of the image processing apparatus.

本発明にかかる第2のプログラムは、コンピュータを含み、入力画像の拡大処理を行う画像処理装置において、入力画像に含まれる注目画素について、この注目画素を含む所定の大きさの画像領域が、ソース部分であるか、又はマスク部分であるかを判別する判別ステップと、前記判別結果に応じた拡大手法を適用して、前記判別された画像領域に対応する拡大画像領域を生成する拡大画像領域生成ステップと、前記生成された複数の拡大画像領域の境界部分を補正する補正ステップとを前記画像処理装置のコンピュータに実行させる。   A second program according to the present invention includes a computer, and in an image processing apparatus that performs an enlargement process of an input image, for a target pixel included in the input image, an image region having a predetermined size including the target pixel is a source A discrimination step for discriminating whether the image is a part or a mask portion, and an enlarged image region generation for generating an enlarged image region corresponding to the discriminated image region by applying an enlargement method according to the discrimination result Causing the computer of the image processing apparatus to execute a step and a correction step of correcting boundary portions of the plurality of generated enlarged image regions.

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

[第1実施形態]
本発明にかかる画像処理装置の第1の実施形態を説明する。
[First Embodiment]
A first embodiment of an image processing apparatus according to the present invention will be described.

[ハードウェア構成]
本実施形態における画像処理装置2のハードウェア構成を説明する。
図4は、本発明にかかる画像処理方法が適応される画像処理装置2のハードウェア構成を、制御装置20を中心に例示する図である。
図4に例示するように、画像処理装置2は、CPU202及びメモリ204などを含む制御装置20、通信装置22、HDD・CD装置などの記憶装置24、並びに、LCD表示装置あるいはCRT表示装置及びキーボード・タッチパネルなどを含むユーザインターフェース装置(UI装置)26から構成される。
画像処理装置2は、例えば、画像拡大プログラム4(後述)がインストールされた汎用コンピュータであり、通信装置22又は記憶装置24などを介して画像データを取得し、取得された画像データを出力解像度に応じて拡大する。例えば、画像処理装置2は、プリンタ装置10に対して画像データを出力する場合には、600dpi又は2400dpiなどの解像度に変換し、UI装置26に対して画像データを出力する場合には、75dpiなどの解像度に変換する。
[Hardware configuration]
A hardware configuration of the image processing apparatus 2 in the present embodiment will be described.
FIG. 4 is a diagram illustrating the hardware configuration of the image processing apparatus 2 to which the image processing method according to the present invention is applied, centering on the control apparatus 20.
As illustrated in FIG. 4, the image processing apparatus 2 includes a control device 20 including a CPU 202 and a memory 204, a communication device 22, a storage 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 4 (described later) is installed. The image processing apparatus 2 acquires image data via the communication device 22 or the storage 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.

[画像拡大プログラム]
図5は、制御装置20(図4)により実行され、本発明にかかる画像処理方法を実現する画像拡大プログラム4の機能構成を例示する図である。
図5に例示するように、画像拡大プログラム4は、記憶部400、画像ブロック設定部410、画像ブロック判定部420、画像ブロック特徴量算出部430、拡大画像ブロック生成部440及び画像ブロック配置部450を有する。画像ブロック判定部420は、階調数計数部422及び境界ブロック判別部424を有し、画像ブロック特徴量算出部430は、エッジ強度算出部432、エッジ方向推定部434及びエッジパターン選択部436を有する。また、拡大画像ブロック生成部440は、高画質画像ブロック生成部442及び高速画像ブロック生成部444を有する。
なお、画像拡大プログラム4の全部又は一部は、ASICなどのハードウェアにより実現されてもよい。
[Image enlargement program]
FIG. 5 is a diagram illustrating a functional configuration of the image enlargement program 4 which is executed by the control device 20 (FIG. 4) and implements the image processing method according to the present invention.
As illustrated in FIG. 5, the image enlargement program 4 includes a storage unit 400, an image block setting unit 410, an image block determination unit 420, an image block feature amount calculation unit 430, an enlarged image block generation unit 440, and an image block arrangement unit 450. Have The image block determination unit 420 includes a gradation number counting unit 422 and a boundary block determination unit 424, and the image block feature amount calculation unit 430 includes an edge strength calculation unit 432, an edge direction estimation unit 434, and an edge pattern selection unit 436. Have. The enlarged image block generation unit 440 includes a high-quality image block generation unit 442 and a high-speed image block generation unit 444.
Note that all or part of the image enlargement program 4 may be realized by hardware such as an ASIC.

記憶部400は、画像データが拡大処理されるまで画像データを一時的に記憶し、解像度変換又は拡大処理された拡大画像データが出力装置(不図示)に出力されるまで一時的に記憶する。なお、画像データは、画像処理装置2により処理可能である画像フォーマット(例えば、BMP、TIFF、PNGなど)で記述されたデータであり、デジタルカメラ(不図示)又はスキャナ(不図示)などにより取り込まれた画像データ、又は、パーソナルコンピュータ(画像処理装置2など)等において作成又は編集等を行うアプリケーションプログラムにより作成された画像データ等である。拡大画像データ(拡大された後の画像データ)もまた、同様の画像フォーマットのデータである。   The storage unit 400 temporarily stores image data until the image data is enlarged, and temporarily stores the enlarged image data that has undergone resolution conversion or enlargement processing until it is output to an output device (not shown). The image data 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 captured by a digital camera (not shown) or a scanner (not shown). Or image data created by an application program that is created or edited in a personal computer (image processing apparatus 2 or the like). Enlarged image data (image data after being enlarged) is also data in the same image format.

画像ブロック設定部410は、画像ブロック判定部420、画像ブロック特徴量算出部430及び拡大画像ブロック生成部440の処理において必要とされる既定の画像ブロックサイズをそれぞれ設定する。また、画像ブロック設定部410は、記憶部400により記憶されている入力画像データから、設定されたブロックサイズの画像ブロックを順次(例えばラスタスキャン順に)切り出し、このブロックサイズの画像ブロックそれぞれを、画像ブロック判定部420、画像ブロック特徴量算出部430及び拡大画像ブロック生成部440それぞれに対して出力する。   The image block setting unit 410 sets a predetermined image block size required in the processing of the image block determination unit 420, the image block feature amount calculation unit 430, and the enlarged image block generation unit 440, respectively. In addition, the image block setting unit 410 sequentially cuts out image blocks having a set block size from the input image data stored in the storage unit 400 (for example, in raster scan order), and converts each image block having the block size into an image. It outputs to each of the block determination unit 420, the image block feature value calculation unit 430, and the enlarged image block generation unit 440.

画像ブロック判定部420は、画像ブロック設定部410から順次入力される画像ブロックの少なくとも一部(例えば中心部近傍の矩形部分)を注目領域とし、この注目領域とその周辺部とを含む画像ブロック内に、異なる画素値がいくつあるか(以下、これをブロック階調数と称する)を計数する。また、画像ブロック判定部420は、ある特定の値の画素が存在するかどうかを判別する。さらに、画像ブロック判定部420は、注目領域とその周辺部とを含む画像ブロックのブロック階調数、及び特定の値の画素を含むか否かの判別結果によって、それらの画像ブロックの切り分けを行う。   The image block determination unit 420 sets at least a part of the image blocks sequentially input from the image block setting unit 410 (for example, a rectangular portion in the vicinity of the central portion) as a region of interest, and includes an image block including the region of interest and its peripheral portion. The number of different pixel values (hereinafter referred to as the block gradation number) is counted. In addition, the image block determination unit 420 determines whether there is a pixel having a specific value. Further, the image block determination unit 420 performs segmentation of the image blocks based on the number of block gradations of the image block including the region of interest and its peripheral portion and the determination result of whether or not the pixel includes a specific value. .

画像ブロック特徴量算出部430は、画像ブロック判定部420においてブロック階調数が所定の閾値以上であって、かつ、ある特定の値の画素を含まない画像ブロックと判定されたブロックに関して、その画像ブロックの少なくとも一部である注目領域における画像特徴量を、注目領域又はこの注目領域の周辺部を含む画像ブロック内の各画素値に基づいて算出する。画像特徴量は、例えば、注目領域のエッジ強度(階調変化量)又はエッジ角度(階調変化の方向)である。しかし、画像特徴量はこれらに限られず、画像ブロック特徴量算出部430は、例えば注目領域の各画素値の平均値を算出し、この平均値に対する注目領域の各画素値のばらつきを表す値(例えば標準偏差又は分散)を画像特徴量として算出してもよい。   The image block feature amount calculation unit 430 is configured to perform image processing on a block determined by the image block determination unit 420 as an image block whose block gradation number is equal to or greater than a predetermined threshold and does not include a pixel having a specific value. The image feature amount in the attention area that is at least a part of the block is calculated based on each pixel value in the image block including the attention area or a peripheral portion of the attention area. The image feature amount is, for example, edge strength (gradation change amount) or edge angle (direction of gradation change) of the attention area. However, the image feature amount is not limited to these, and the image block feature amount calculation unit 430 calculates, for example, an average value of each pixel value of the attention area, and a value that represents variation of each pixel value of the attention area with respect to the average value ( For example, standard deviation or variance) may be calculated as the image feature amount.

また、画像ブロック特徴量算出部430は、それぞれの注目領域について算出された画像特徴量と基準値とを比較し、注目領域の切り分けを行う。注目領域の切り分けにより、特徴のある画像ブロック(例えば、エッジを含んだ画像ブロックなど)と、特徴の少ない画像ブロック(例えば、画素値変化の少ない画像ブロックなど)とが切り分けられる。より具体的には、画像ブロック特徴量算出部430は、算出された画像特徴量が基準値以上である画像ブロックを特徴ブロックと判定し、算出された画像特徴量が基準値未満である画像ブロックを非特徴ブロックと判定する。本例では、画像ブロック特徴量算出部430は、画像特徴量の1つとして画像ブロックのエッジ強度(数値)を算出し、算出されたエッジ強度が基準値以上である画像ブロックを特徴ブロックであると判定し、エッジ強度が基準値未満である画像ブロックを非特徴ブロックであると判定する。なお、特徴ブロックの切り分けに用いられる特徴量は、エッジ強度に限られず、上述の標準偏差、分散又はその他の特徴量であってもよい。   Further, the image block feature quantity calculation unit 430 compares the image feature quantity calculated for each attention area and the reference value, and performs the attention area separation. By distinguishing the attention area, an image block having a characteristic (for example, an image block including an edge) and an image block having a small feature (for example, an image block having a small change in pixel value) are separated. More specifically, the image block feature amount calculation unit 430 determines that an image block whose calculated image feature amount is equal to or greater than a reference value is a feature block, and an image block whose calculated image feature amount is less than the reference value. Are determined as non-characteristic blocks. In this example, the image block feature amount calculation unit 430 calculates the edge strength (numerical value) of an image block as one of the image feature amounts, and an image block whose calculated edge strength is a reference value or more is a feature block. The image block having the edge strength less than the reference value is determined to be a non-feature block. Note that the feature quantity used for the feature block segmentation is not limited to the edge strength, and may be the above-described standard deviation, variance, or other feature quantities.

拡大画像ブロック生成部440は、複数の拡大手段、例えば高画質画像ブロック生成部442及び高速画像ブロック生成部444を有する。拡大画像ブロック生成部440は、画像ブロック判定部420による画像ブロックの判定結果、及び画像ブロック特徴量算出部430により算出された画像特徴量に従って、複数の拡大手段を切り替えて、注目領域に対応する拡大画像ブロックを生成する。例えば、画像ブロック判定部420により、ブロック階調数の計数とある特定の画素値を有する画素の有無とが判別される場合においては、ブロック階調数が所定の閾値以下である場合、又は、ある特定の画素値を有する画素が注目領域とその周辺部とを含む画像ブロック内に存在する場合には、拡大画像ブロック生成部440は、その注目領域に対して、拡大手段を高速画像ブロック生成部444による拡大処理に切り替えて、拡大画像ブロックを生成する。   The enlarged image block generation unit 440 includes a plurality of enlargement units, for example, a high quality image block generation unit 442 and a high-speed image block generation unit 444. The enlarged image block generation unit 440 switches a plurality of enlargement means according to the determination result of the image block by the image block determination unit 420 and the image feature amount calculated by the image block feature amount calculation unit 430 to correspond to the attention area. Generate an enlarged image block. For example, when the image block determination unit 420 determines the count of the block gradation number and the presence or absence of a pixel having a specific pixel value, the block gradation number is equal to or less than a predetermined threshold, or When a pixel having a specific pixel value is present in an image block including the region of interest and its peripheral portion, the enlarged image block generation unit 440 generates an enlargement means for the region of interest at high speed. Switching to the enlargement process by the unit 444 generates an enlarged image block.

さらに、例えば、画像ブロック特徴量算出部430において、エッジ強度を数値として算出する場合、拡大画像ブロック生成部440は、特徴量と所定値とを比較し、その比較の結果に応じて、拡大手段を高画質画像ブロック生成部442あるいは高速画像ブロック生成部444のいずれかに切り替えて、拡大画像ブロックを生成する。なお、ここでは、拡大画像ブロック生成部440は、特徴量が所定値よりも大きい場合には、画質を優先した処理を行う高画質画像ブロック生成部442により拡大処理を行い、特徴量が所定値以下の場合には、速度を優先した処理を行う高速画像ブロック生成部444により拡大処理を行う。これによって、全体の処理時間が短縮されることができる。もちろん、拡大手段の切り替えに用いる特徴量は、エッジ強度に限られず、上述の標準偏差や分散、あるいはそのほかの種々の特徴量が用いられることができる。   Further, for example, when the edge strength is calculated as a numerical value in the image block feature amount calculation unit 430, the enlarged image block generation unit 440 compares the feature amount with a predetermined value, and according to the comparison result, enlargement means Is switched to either the high-quality image block generation unit 442 or the high-speed image block generation unit 444 to generate an enlarged image block. Here, when the feature amount is larger than the predetermined value, the enlarged image block generation unit 440 performs the enlargement process by the high-quality image block generation unit 442 that performs processing with priority on the image quality, and the feature amount is the predetermined value. In the following cases, enlargement processing is performed by the high-speed image block generation unit 444 that performs processing with priority on speed. Thereby, the entire processing time can be shortened. Of course, the feature quantity used for switching the enlargement means is not limited to the edge strength, and the above-described standard deviation and variance, or other various feature quantities can be used.

画像ブロック配置部450は、拡大画像ブロック生成部440により生成された拡大画像ブロックを順次配置し、解像度変換あるいは拡大された拡大画像データを、記憶部400に対して出力する。なお、拡大画像ブロックの配置方法は後述されるが、例えば順次並べてゆく方法の他、拡大画像ブロックを重なり合うように順次配置して重畳させ、重なる画素値の総和を重なった数で割ることにより画素値を算出する方法も採用されることができる。   The image block arrangement unit 450 sequentially arranges the enlarged image blocks generated by the enlarged image block generation unit 440, and outputs the enlarged image data subjected to resolution conversion or enlargement to the storage unit 400. The arrangement method of the enlarged image blocks will be described later. For example, in addition to the method of sequentially arranging the enlarged image blocks, the enlarged image blocks are sequentially arranged so as to overlap each other, and the sum of the overlapping pixel values is divided by the number of the overlapped pixels. A method of calculating the value can also be employed.

[画像ブロック判定部]
画像ブロック判定部420を、より詳細に説明する。なお、注目領域が2×2画素サイズブロックであり、注目領域を含む周辺領域が4×4画素サイズブロックである場合を具体例として説明する。
階調数計数部422は、注目領域を含む周辺領域が、何階調で構成されているかを計数する。例えば4×4画素サイズブロックの場合、ブロック内すべての画素値が異なれば、ブロック階調数は16階調であり、ブロック内すべての画素値が同じ値ならば、ブロック階調数は1階調である。さらに、階調数計数部422は、計数されたブロック階調数と基準階調数(既定のブロック階調数Tr)との比較を行い、注目領域を含む周辺領域が、自然画像のような多階調画像ブロック、又は、パターン画像やマスク画像のような限定階調画像ブロックのいずれであるかを判別する。つまり、階調数計数部422は、計数されたブロック階調数が基準階調数Trより大きければ、多階調画像ブロックであると判別し、基準階調数Trより小さければ、限定階調画像ブロックと判別する。
なお、境界ブロック判別部424は、注目領域を含む周辺領域のブロック階調数が基準階調数Trよりも小さい場合は、この領域については処理を行わない。
[Image block determination unit]
The image block determination unit 420 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.
The gradation number counting unit 422 counts how many gradations the peripheral area including the attention area is composed of. For example, in the case of a 4 × 4 pixel size block, if all pixel values in the block are different, the block gradation number is 16 gradations. If all the pixel values in the block are the same value, the block gradation number is the first floor. Key. Further, the gradation number counting unit 422 compares the counted block gradation number with the reference gradation number (predetermined block gradation number Tr), and the peripheral region including the attention region is like a natural image. It is determined whether it is a multi-tone image block or a limited-tone image block such as a pattern image or a mask image. That is, if the counted block gradation number is larger than the reference gradation number Tr, the gradation number counting unit 422 determines that the block is a multi-gradation image block, and if smaller than the reference gradation number Tr, the gradation number counting unit 422 determines the limited gradation. Discriminated as an image block.
Note that the boundary block determination unit 424 does not perform processing on the area when the block gradation number of the peripheral area including the attention area is smaller than the reference gradation number Tr.

境界ブロック判別部424は、階調数計数部422において注目領域を含む周辺領域のブロック階調数が基準階調数Trよりも大きいと判断された領域に対して、その領域が、前景画素と背景画素とが混在する境界ブロック(境界領域)であるのかどうかを判定する。つまり、境界ブロック判別部424は、画像ブロックが、ある特定な値を持つ画素が1つでも存在する画像ブロックであるか又は全く存在しない画像ブロックであるかを判別し、その判断結果を画像ブロック特徴量算出部430等に対して出力する。   The boundary block discriminating unit 424 determines that the area for which the gradation number counting unit 422 determines that the block gradation number of the peripheral area including the attention area is larger than the reference gradation number Tr is the foreground pixel. It is determined whether the boundary block (boundary region) is mixed with background pixels. In other words, the boundary block determination unit 424 determines whether the image block is an image block in which at least one pixel having a specific value is present or an image block in which no pixel exists at all, and the determination result is used as the image block. This is output to the feature quantity calculation unit 430 and the like.

画像ブロック判定部420の全体動作を説明する。
図6は、画像ブロック判定部420による画像ブロック判定処理を示すフローチャート(S10)である。
図6に示すように、ステップ100(S100)において、階調数計数部422は、注目領域を含む周辺領域のブロック階調数を計数する。
The overall operation of the image block determination unit 420 will be described.
FIG. 6 is a flowchart (S10) showing an image block determination process by the image block determination unit 420.
As shown in FIG. 6, in step 100 (S100), the gradation number counting unit 422 counts the number of block gradations in the peripheral area including the attention area.

ステップ102(S102)において、階調数計数部422は、計数されたブロック階調数と所定の基準階調数Trとの比較を行い、この領域が多階調画像ブロックであるか限定階調画像ブロックであるかを判別する。
注目領域を含む周辺領域が多階調画像ブロックであると判別された場合は、境界ブロックであるかどうかの判定を行うべくステップ104(S104)の処理に移行し、注目領域を含む周辺領域が限定階調画像ブロックであると判別された場合は、ステップ106(S106)に処理を移行し、画像ブロック判定部420は、その判定結果を画像ブロック特徴量算出部430に出力する。
In step 102 (S102), the gradation number counting unit 422 compares the counted number of block gradations with a predetermined reference gradation number Tr, and determines whether this area is a multi-gradation image block or a limited gradation. It is determined whether it is an image block.
If it is determined that the peripheral area including the attention area is a multi-tone image block, the process proceeds to step 104 (S104) to determine whether the peripheral area is a boundary block, and the peripheral area including the attention area is determined. If it is determined that the block is a limited gradation image block, the process proceeds to step 106 (S106), and the image block determination unit 420 outputs the determination result to the image block feature amount calculation unit 430.

ステップ104(S104)において、境界ブロック判別部424は、注目領域を含む周辺領域に背景画素が存在するかどうかを検索し、この領域が境界ブロックであるかどうかを判別する。境界ブロック判別部424は、注目領域を含む周辺領域内に背景画素が1つでも存在した場合は、この領域を境界ブロックと判別し、背景画素が全く存在しない場合は、ステップ102(S102)において、階調数計数部422が判別したとおり多階調画像ブロックとして判別する。さらに、ステップ106(S106)に処理を移行し、画像ブロック判定部420は、その判定結果を画像ブロック特徴量算出部430に出力する。
このようにして、画像ブロック判定部420は、注目領域を含む周辺領域が、多階調画像ブロック、限定階調画像ブロック及び境界ブロックのいずれであるか判定する。
In step 104 (S104), the boundary block determination unit 424 searches for a background pixel in a peripheral region including the region of interest, and determines whether this region is a boundary block. The boundary block discriminating unit 424 discriminates this area as a boundary block when there is even one background pixel in the peripheral area including the attention area, and when there is no background pixel at step 102 (S102). As the gradation number counting unit 422 determines, it is determined as a multi-gradation image block. Further, the process proceeds to step 106 (S106), and the image block determination unit 420 outputs the determination result to the image block feature amount calculation unit 430.
In this way, the image block determination unit 420 determines whether the peripheral region including the attention region is a multi-tone image block, a limited tone image block, or a boundary block.

[画像ブロック特徴量算出部]
画像ブロック特徴量算出部430を、より詳細に説明する。なお、前述の画像ブロック判定部420の説明と同様に、注目領域が2×2画素サイズブロックであり、注目領域を含む周辺領域が4×4画素サイズブロックである場合を具体例として説明する。
エッジ強度算出部432は、画像ブロック設定部410により切り出され、画像ブロック判定部420において多階調画像ブロックと判定された画像ブロックの中の注目領域のエッジ強度Gを、次の式(1)により算出する。
[Image block feature value calculation unit]
The image block feature quantity calculation unit 430 will be described in more detail. Similar to the description of the image block determination unit 420 described above, 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.
The edge strength calculation unit 432 extracts the edge strength G of the region of interest in the image block extracted by the image block setting unit 410 and determined as a multi-tone image block by the image block determination unit 420 using the following equation (1). Calculated by

gx=(a+c−b−d)/2
gy=(a+b−c−d)/2
G=gx×gx+gy×gy・・・(1)
gx = (a + c−b−d) / 2
gy = (a + b−c−d) / 2
G = gx × gx + gy × gy (1)

式(1)において、a、b、c及びdは、図7に例示するように、注目領域にある各画素の画素値である。gxは、主走査方向(図7の左右方向)の画素値の変化量を示し、gyは、副走査方向(図7の上下方向)の画素値の変化量を示す。
なお、エッジ強度は、上記式(1)のみにより算出される値でなく、以下の式(2)などにより算出されてもよい。
G=|gx|+|gy|・・・(2)
すなわち、エッジ強度Gは、gxの絶対値と、gyの絶対値との和として算出されてもよい。
In Expression (1), a, b, c, and d are pixel values of each pixel in the region of interest, as illustrated in FIG. gx represents the amount of change in the pixel value in the main scanning direction (left and right direction in FIG. 7), and gy represents the amount of change in the pixel value in the sub scanning direction (up and down direction in FIG. 7).
Note that the edge strength may be calculated by the following formula (2) or the like instead of the value calculated by the above formula (1) alone.
G = | gx | + | gy | (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.

また、エッジ強度算出部432は、算出されたエッジ強度Gと基準値(既定のしきい値Th)との比較を行い、注目領域が特徴ブロック又は非特徴ブロックのいずれであるかを判定し、判定結果を拡大画像ブロック生成部440等に対して出力する。
なお、注目領域のエッジ強度Gがしきい値Thよりも小さい場合は、エッジ方向推定部434及びエッジパターン選択部436は、この注目領域について処理を行わない。
The edge strength calculation unit 432 compares the calculated edge strength G with a reference value (predetermined threshold Th) to determine whether the attention area is a feature block or a non-feature block, The determination result is output to the enlarged image block generation unit 440 and the like.
When the edge strength G of the attention area is smaller than the threshold value Th, the edge direction estimation unit 434 and the edge pattern selection unit 436 do not perform processing on the attention area.

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

図8は、エッジ方向推定部434によるエッジ方向推定処理(S20)を示すフローチャートである。
図9は、エッジ方向推定処理(S20)のS202の処理において選択される参照領域を例示する図である。なお、図9におけるハッチングされた部分は、図7に示した注目領域に相当する。
図8に示すように、ステップ200(S200)において、エッジ方向推定部434は、図7(A)に例示した注目領域のエッジ角度Θを、次の式(3)で計算する。
Θ=arctan(gy/gx)・・・(3)
図7(A)では、注目領域の画素値は、{a,b,c,d}={15,104,86,203}であり、式(1)より、
gx=−103
gy=−85
となり、これらを式(3)に代入すると、
Θ=−140.5°
となる。
このエッジ角度Θの方向は、図7(B)に示された破線方向に相当する。
FIG. 8 is a flowchart showing edge direction estimation processing (S20) by the edge direction estimation unit 434.
FIG. 9 is a diagram illustrating a reference region selected in the process of S202 of the edge direction estimation process (S20). The hatched portion in FIG. 9 corresponds to the attention area shown in FIG.
As shown in FIG. 8, in step 200 (S200), the edge direction estimation unit 434 calculates the edge angle Θ of the region of interest exemplified in FIG. 7A by the following equation (3).
Θ = arctan (gy / gx) (3)
In FIG. 7A, the pixel value of the attention area is {a, b, c, d} = {15, 104, 86, 203}, and from the equation (1),
gx = −103
gy = −85
And substituting these into equation (3),
Θ = -140.5 °
It becomes.
The direction of the edge angle Θ corresponds to the broken line direction shown in FIG.

さらに、エッジ方向推定部434は、算出されたエッジ角度Θが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」となる。   Furthermore, the edge direction estimation unit 434 determines which of the angle ranges in the directions (eight directions) divided every 22.5 ° is the calculated edge angle Θ. 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 “direction 5”, and an angle range centered on 135 ° or −45 ° is “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”.

ステップ202(S202)において、エッジ方向推定部434は、算出された注目領域のエッジ角度Θに応じて、図7(A)に示した周辺領域(太線枠外の領域)の中からエッジ方向の推定に用いる参照領域を選択する。より具体的には、エッジ方向推定部434は、算出されたエッジ角度Θの方向で注目領域と隣接する可能性のある画素を含むように、参照領域を選択する。
例えば、エッジ方向推定部434は、注目領域について算出されたエッジ角度が「方向0」に含まれる場合に、図9(A)に例示する参照領域(太線で囲まれた2つの領域)を選択し、算出されたエッジ角度が「方向4」に含まれる場合に、図9(B)に例示する参照領域(太線で囲まれた2つの領域)を選択し、算出されたエッジ角度が上記以外の方向(方向1〜3、方向5〜7)に含まれる場合に、図9(C)に例示する参照領域(太線で囲まれた4つの領域)を選択する。図7に示した具体例では、エッジ角度の方向は「方向2」であるので、図9(C)に示した4つの参照領域が選択の候補となる。
なお、参照領域は、図9に例示した領域に限定されず、例えば図9(C)の場合には、参照領域数は8であったり、それぞれの方向に応じて設定されてもよい。
In step 202 (S202), the edge direction estimation unit 434 estimates the edge direction from the peripheral area (area outside the thick frame) shown in FIG. 7A 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 434 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 434 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. 9B 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. 9C are selected. In the specific example shown in FIG. 7, since the direction of the edge angle is “direction 2”, the four reference areas shown in FIG. 9C are candidates for selection.
The reference area is not limited to the area illustrated in FIG. 9. For example, in the case of FIG. 9C, the number of reference areas may be 8, or may be set according to each direction.

ステップ204(S204)において、エッジ方向推定部434は、選択された参照領域それぞれに対して、S200の処理と同様に、式(1)及び式(3)に従って、エッジ角度Θを計算する。
ステップ206(S206)において、エッジ方向推定部434は、それぞれの参照領域について算出されたエッジ角度と、注目領域について算出されたエッジ角度とを比較して、これらの差分が予め設定されている閾値Θthより小さいか否かを判断する。エッジ方向推定部434は、エッジ角度の差分が閾値Θthより小さい場合には、この参照領域のエッジ角度を適正なエッジ角度として判定してS208の処理に移行し、エッジ角度の差分が閾値Θth以上である場合には、この参照領域のエッジ角度を適正なエッジ角度ではないと判定してS210の処理に移行する。
In step 204 (S204), the edge direction estimation unit 434 calculates the edge angle Θ for each of the selected reference areas in accordance with the equations (1) and (3) as in the processing of S200.
In step 206 (S206), the edge direction estimation unit 434 compares the edge angle calculated for each reference region with the edge angle calculated for the attention region, and a threshold value in which these differences are set in advance. It is determined whether it is smaller than Θth. If the edge angle difference is smaller than the threshold value Θth, the edge direction estimation unit 434 determines that the edge angle of the reference region is an appropriate edge angle and proceeds to the processing of S208, and the edge angle difference is equal to or greater than the threshold value Θ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 S210.

ステップ208(S208)において、エッジ方向推定部434は、角度参照数をインクリメントする。すなわち、エッジ方向推定部434は、参照領域について算出されたエッジ角度が適正なエッジ角度であると判断された場合にのみ、角度参照数をインクリメントする。
なお、角度参照数は、エッジ角度の参照数をカウントするための変数であり、注目領域ごとに「角度参照数1」に初期化される。
In step 208 (S208), the edge direction estimation unit 434 increments the angle reference number. That is, the edge direction estimation unit 434 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.

ステップ210(S210)において、エッジ方向推定部434は、選択した全ての参照領域についてエッジ角度を算出したか否かを判断し、全ての参照領域についてエッジ角度が算出された場合には、S212の処理に移行し、これ以外の場合には、S204の処理に戻って次の参照領域についてエッジ角度を算出する。
ステップ212(S212)において、エッジ方向推定部434は、注目領域のエッジ角度と、適正なエッジ角度として判定された参照領域のエッジ角度との総和を計算し、算出されたエッジ角度の総和を角度参照数で割った平均エッジ角度を注目領域の推定エッジ方向とする。
In step 210 (S210), the edge direction estimation unit 434 determines whether or not the edge angle has been calculated for all the selected reference areas. If the edge angle has been calculated for all the reference areas, the edge direction estimation section 434 In other cases, the process returns to S204 to calculate an edge angle for the next reference area.
In step 212 (S212), the edge direction estimation unit 434 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.

なお、図7に示した具体例では、エッジ角度ΘUは、上部の参照領域{86,203,171,211}からΘU=−149.4°となり、エッジ角度ΘLは、左部の参照領域{10,15,20,86}からΘL=−131.2°となり、エッジ角度ΘDは、下部の参照領域{1,102,15,104}からΘD=−175.2°となり、エッジ角度ΘRは、右部の参照領域{104,215,203,219}からΘR=−141.0°となる。注目領域のエッジ角度Θ=−140.5°とそれぞれの参照領域のエッジ角度とが比較され、その差分が閾値Θthより小さい参照領域の数が、角度参照数としてカウントされる。   In the specific example shown in FIG. 7, the edge angle ΘU is ΘU = -149.4 ° from the upper reference region {86, 203, 171, 211}, and the edge angle ΘL is the left reference region { ΘL = −131.2 ° from 10, 15, 20, 86}, and the edge angle ΘD becomes ΘD = −175.2 ° from the lower reference region {1,102,15,104}, and the edge angle ΘR is From the reference region {104, 215, 203, 219} on the right side, Θ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.

図10は、図7に示した注目領域における推定エッジ方向の一例の説明図である。例えば上述の具体例において、すべての参照領域について注目領域のエッジ角度との差分が閾値Θthより小さいとすれば、注目領域及び4つの参照領域から求められたエッジ角度の総和は−737.3°となり、角度参照数5で割ることによって、平均エッジ角度は−147.5°と求められる。この場合においても、エッジ方向推定部434は、上述の注目領域のエッジ方向と同様に、平均エッジ角度が例えば8方向のいずれかに含まれるかを判定する。本例では、平均エッジ角度が−147.5°であるため「方向1」に含まれ、「方向1」が推定エッジ方向となる。   FIG. 10 is an explanatory diagram of an example of the estimated edge direction in the region of interest shown in FIG. 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 is determined to be -147.5 °. Also in this case, the edge direction estimation unit 434 determines whether the average edge angle is included in any of the eight directions, for example, in the same manner as 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”, and “direction 1” is the estimated edge direction.

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

エッジパターン選択部436について説明する。
図11は、エッジパターン選択部436により用いられるエッジパターンテーブルを例示する図である。
図11に例示するように、エッジパターン選択部436は、推定エッジ方向とエッジパターンとを互いに対応付けたエッジパターンテーブルを有する。エッジパターンテーブルには、エッジパターンが、注目領域のパターンサイズに対応して、推定エッジ方向(例えば8方向)ごとに1つ以上登録されている。
エッジパターン選択部436は、このエッジパターンテーブルを参照して、エッジ方向推定部434によりそれぞれの注目領域について推定された推定エッジ方向に対応するエッジパターンを選択する。
本例では、図10に例示するように、注目領域に対する推定エッジ方向が、エッジ方向推定部434により「方向1」であると推定されているため、エッジパターン選択部436は、この推定エッジ方向(方向1)に従い、図11に示すエッジパターンテーブルの中から、方向1に対応する「パターン0」から「パターン3」までの4つのエッジパターンを選択し、これらをこの注目領域に対するエッジパターンの候補とする。
The edge pattern selection unit 436 will be described.
FIG. 11 is a diagram illustrating an edge pattern table used by the edge pattern selection unit 436.
As illustrated in FIG. 11, the edge pattern selection unit 436 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 are registered for each estimated edge direction (for example, eight directions) corresponding to the pattern size of the region of interest.
The edge pattern selection unit 436 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 434.
In this example, as illustrated in FIG. 10, since the estimated edge direction with respect to the attention area is estimated to be “direction 1” by the edge direction estimation unit 434, the edge pattern selection unit 436 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. Candidate.

エッジパターン選択部436は、注目領域の画素値に基づいて、エッジパターンの候補となった1つ以上のエッジパターンの中から、1つのエッジパターンを選択する。エッジパターンの具体的な選択方法について、図12を参照しながら説明する。
図12は、図11に示した注目領域に対応するエッジパターンの選択方法を説明する図である。
本例では、推定エッジ方向が「方向1」であったため、図12(A)に例示するように、エッジパターンの候補として、「パターン0」から「パターン3」までの4つのエッジパターンが選択されている。これらのエッジパターンは、図12(B)に例示するように、ビットパターンとして表現される。具体的には、エッジパターンは、白部分を0、それ以外を1としてビットパターン化され、「ビットパターン0」から「ビットパターン3」までのビットパターンが生成される。なお、これらのビットパターンは、図11に示すエッジパターンテーブルにビットテーブルとして予め登録されていてもよい。
The edge pattern selection unit 436 selects one edge pattern from one or more edge patterns that are edge pattern candidates 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. 12 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. Has been. These edge patterns are expressed as bit patterns as illustrated in FIG. Specifically, the edge pattern is formed into a bit pattern with the white portion being 0 and the others being 1, and bit patterns from “bit pattern 0” to “bit pattern 3” are generated. Note that these bit patterns may be registered in advance in the edge pattern table shown in FIG. 11 as bit tables.

エッジパターン選択部436は、注目領域に相当するビットパターンを判定する。具体的には、エッジパターン選択部436は、以下に示す式(4)に従い、注目領域中の平均画素値を計算し、注目領域内の各々の画素値から平均値を引き、その符号を以て注目領域の画素値パターンとする。   The edge pattern selection unit 436 determines a bit pattern corresponding to the attention area. Specifically, the edge pattern selection unit 436 calculates an average pixel value in the attention area in accordance with the following expression (4), subtracts the average value from each pixel value in the attention area, and uses the sign as the 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)
Mean = (a + b + c + d) / 4
a_sign = a-Mean
b_sign = b-Mean
c_sign = c-Mean
d_sign = d-Mean (4)

なお、本例では、図12(C)に示すように、Mean=(15+104+86+203)/4=102であり、a_sign=−87、b_sign=2、c_sign=−16、d_sign=101となる。よって、エッジパターン選択部436は、これらの正負符号を判定して、図12(C)に示すように、注目領域のビットパターン(1010)を生成する。
エッジパターン選択部436は、図12(B)に例示するエッジパターン候補に対応するビットパターンと、図12(C)に例示する注目領域のビットパターンとのパターンマッチングを行い、最も類似するエッジパターンを選択パターンとして決定する。選択されたエッジパターンは、後述する拡大画像ブロック生成部440における拡大画像ブロック生成処理に適用される。
In this example, as shown in FIG. 12C, 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 436 determines these positive and negative signs, and generates a bit pattern (1010) of the region of interest as shown in FIG.
The edge pattern selection unit 436 performs pattern matching between the bit pattern corresponding to the edge pattern candidate illustrated in FIG. 12B and the bit pattern of the region of interest illustrated in FIG. Is determined as the selection pattern. The selected edge pattern is applied to an enlarged image block generation process in the enlarged image block generation unit 440 described later.

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

[拡大画像ブロック生成部]
拡大画像ブロック生成部440を、より詳細に説明する。
高画質画像ブロック生成部442は、画像ブロック特徴量算出部430において、特徴ブロックであると判定された注目領域に対して、画像ブロック特徴量算出部430で得られた注目領域に対するエッジパターン及び推定エッジ方向に基づいて、拡大画像ブロック生成処理を行う。詳細は後述する。
[Enlarged image block generator]
The enlarged image block generation unit 440 will be described in more detail.
The high-quality image block generation unit 442 performs the edge pattern and estimation for the attention area obtained by the image block feature amount calculation unit 430 with respect to the attention area determined by the image block feature amount calculation unit 430 as the feature block. Enlarged image block generation processing is performed based on the edge direction. Details will be described later.

高速画像ブロック生成部444は、画像ブロック判定部420において、限定階調画像ブロック及び境界ブロックであると判別された注目領域、また画像ブロック特徴量算出部430において、非特徴ブロックであると判定された注目領域に対して、高画質画像ブロック生成部442における拡大画像ブロック生成処理より処理負荷が軽く、高速に処理できる最近傍補間によって拡大画像ブロック生成処理を行う。   The high-speed image block generation unit 444 determines that the region of interest is determined to be the limited gradation image block and the boundary block by the image block determination unit 420, and is determined to be a non-feature block by the image block feature amount calculation unit 430. The enlarged image block generation process is performed on the attention area by nearest neighbor interpolation, which has a lighter processing load than the enlarged image block generation process in the high-quality image block generation unit 442 and can be processed at high speed.

[高画質画像ブロック生成部]
高画質画像ブロック生成部442をより詳細に説明する。
高画質画像ブロック生成部442は、まず、拡大処理の拡大倍率に応じたサイズ及び係数の強調カーネルを用いて、画像ブロック設定部410により切り出された画像ブロック中の注目領域及びその周辺領域の画像データのコントラストを強調する。
図13は、高画質画像ブロック生成部442により用いられる強調カーネル446(エッジ強調カーネル)を例示する図である。
図13に例示するように、第1の強調カーネル446aは、重み付け係数「1.60」及び「−0.15」を用いてコントラストを強調し、第2の強調カーネル446bは、重み付け係数「1.20」及び「−0.05」を用いてコントラストを強調する。これらの強調カーネルは、対象画像に対して既になされた拡大処理の拡大倍率に対応付けられており、互いに異なる重み付け係数を用いて、互いに異なる位置の画素値を参照する。
[High-quality image block generator]
The high-quality image block generation unit 442 will be described in more detail.
First, the high-quality image block generation unit 442 uses the size and coefficient emphasis kernel according to the enlargement magnification of the enlargement process, and the image of the attention area and the peripheral area in the image block cut out by the image block setting unit 410 Emphasize the contrast of data.
FIG. 13 is a diagram illustrating an enhancement kernel 446 (edge enhancement kernel) used by the high-quality image block generation unit 442.
As illustrated in FIG. 13, the first enhancement kernel 446 a uses the weighting factors “1.60” and “−0.15” to enhance contrast, and the second enhancement kernel 446 b uses 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.

第1の強調カーネル446aは、図13(A)に例示するように、注目画素Pの直下画素a、直右画素b、直上画素c及び直左画素dを参照して、これらの画素の画素値にそれぞれ重み付け係数(−0.15)を掛け合わせ、重み付け係数(1.60)が掛けられた注目画素Pの画素値と合算し、合算された値を注目画素Pの画素値とする。
第2の強調カーネル446bは、第1の強調カーネル446aよりも拡大倍率の大きな画像に対して適用され、図13(B)に例示するように、注目画素Pから1画素分離間した下画素a、右画素b、上画素c及び左画素dを参照して、これらの画素の画素値にそれぞれ重み付け係数(−0.05)を掛け合わせ、重み付け係数(1.20)が掛けられた注目画素Pの画素値と合算し、合算された値を注目画素Pの画素値とする。
例えば、第1の強調カーネル446aを適用する場合に、以下の式(5)に従って、コントラスト強調後の画素値P’が算出される。
画素値P’=1.60×P−0.15×(a+b+c+d)・・・(5)
As illustrated in FIG. 13A, the first enhancement kernel 446a 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 pixel a of these pixels. Each value is multiplied by a weighting coefficient (−0.15) and added to the pixel value of the pixel of interest P multiplied by the weighting coefficient (1.60), and the sum is set as the pixel value of the pixel of interest P.
The second enhancement kernel 446b is applied to an image having an enlargement magnification larger than that of the first enhancement kernel 446a. As illustrated in FIG. 13B, the lower pixel a 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 applying the first enhancement kernel 446a, 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) (5)

このように、強調カーネルは、既になされた拡大処理の拡大倍率に応じて異なるので、画像が、4倍、8倍と順に拡大されると、原画像の特徴を有している画素は、2画素、4画像離れた位置の画素となる。そのため、高画質画像ブロック生成部442は、図13に例示するように、拡大倍率が高いほど離れた画素を参照して強調処理を行う。例えば、高画質画像ブロック生成部442は、2倍拡大処理を2回連続して適用することにより4倍拡大が実現される場合に、最初の2倍拡大処理において第1の強調カーネル446a(図13(A))を適用し、2回目の2倍拡大処理において第2の強調カーネル446b(図13(B))を適用する。なお、8倍、16倍以降の倍率においても同様である。
また、参照する画素の位置は、図13に示すような上下左右に限られない。例えば、高画質画像ブロック生成部442は、斜め方向の画素を参照してコントラスト強調を行ったり、さらに離れた画素を参照してコントラスト強調を行ったり、又は、処理対象画像データの種類及びサイズなどにより適用する強調カーネルを切り替えたりしてもよい。
As described above, the enhancement kernel differs depending on the enlargement magnification of the enlargement processing that has already been performed. Therefore, 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. 13, the high-quality image block generation unit 442 performs enhancement processing with reference to pixels that are further away as the enlargement magnification is higher. For example, the high-quality image block generation unit 442 performs the first enhancement kernel 446a (see FIG. 5) in the first double enlargement process when the double enlargement process is applied twice in succession to realize the quadruple enlargement. 13 (A)) and the second enhancement kernel 446b (FIG. 13B) is applied in the second double enlargement process. 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 high-quality image block generation unit 442 performs contrast enhancement with reference to pixels in an oblique direction, performs contrast enhancement with reference to further distant pixels, or the type and size of processing target image data. The emphasis kernel to be applied may be switched by.

次に、高画質画像ブロック生成部442は、画像ブロック特徴量算出部430により得られた注目領域に対するエッジパターン及び推定エッジ方向と、前述したようにコントラスト強調処理が行われた注目領域とその周辺領域との画素値とを用いて、注目領域に対する拡大画像ブロックを生成する。   Next, the high-quality image block generation unit 442 includes the edge pattern and the estimated edge direction with respect to the attention area obtained by the image block feature value calculation section 430, the attention area on which the contrast enhancement processing has been performed as described above, and its surroundings. An enlarged image block for the region of interest is generated using the pixel value of the region.

図14は、高画質画像ブロック生成部442における拡大画像ブロックの生成処理の具体例の説明図である。まず、高画質画像ブロック生成部442は、注目領域のエッジパターン及び推定エッジ方向基づき、コントラスト強調処理を施された画素値を用いて、3×3画像ブロックに相当する画素値を算出する。図14(A)は、図7(A)に示した注目領域及び周辺領域の一例を示す。前述したように画像ブロック特徴量算出部430において、この注目領域はエッジパターン1010に対応し、推定エッジ方向は「方向1」であると求められている。高画質画像ブロック生成部442は、(エッジパターン1010)−(推定エッジ方向「1」)の組み合わせの場合、図14(B)に示すように、3×3画像ブロックに相当するそれぞれの画素をp0〜p8とすると、図14(A)に示した注目領域の画素値{a,b,c,d}をもとに、p0〜p8の画素値を次の式によって計算する。なお、エッジパターンと推定エッジ方向との組み合わせは、「(エッジパターン)−(推定エッジ方向)」と表される。   FIG. 14 is an explanatory diagram of a specific example of enlarged image block generation processing in the high-quality image block generation unit 442. First, the high-quality image block generation unit 442 calculates a pixel value corresponding to a 3 × 3 image block using a pixel value subjected to contrast enhancement processing based on the edge pattern of the region of interest and the estimated edge direction. FIG. 14A illustrates an example of the attention area and the peripheral area illustrated in FIG. As described above, in the image block feature quantity calculation unit 430, this attention area corresponds to the edge pattern 1010 and the estimated edge direction is determined to be “direction 1”. In the case of the combination of (edge pattern 1010) − (estimated edge direction “1”), the high-quality image block generation unit 442 calculates each pixel corresponding to the 3 × 3 image block as illustrated in FIG. Assuming p0 to p8, the pixel values of p0 to p8 are calculated by the following formula based on the pixel values {a, b, c, d} of the attention area shown in FIG. The combination of the edge pattern and the estimated edge direction is expressed as “(edge pattern) − (estimated edge direction)”.

p0=a
p1=(a+b)/2
p2=b
p3=(a+c)/2
p4=(b+c)/2
p5=(b+d)/2
p6=c
p7=(b+b)/2
p8=d
p0 = a
p1 = (a + b) / 2
p2 = b
p3 = (a + c) / 2
p4 = (b + c) / 2
p5 = (b + d) / 2
p6 = c
p7 = (b + b) / 2
p8 = d

これらの計算式は、(エッジパターン)−(推定エッジ方向)の組み合わせにより一意に決定され、3×3画像ブロック相当の画素値が計算される。   These calculation formulas are uniquely determined by a combination of (edge pattern) − (estimated edge direction), and pixel values corresponding to 3 × 3 image blocks are calculated.

図15は、他の(エッジパターン)−(推定エッジ方向)の組み合わせの場合に用いられる計算式の一例の説明図である。
図15(A)は、(エッジパターン1000)−(推定エッジ方向「1」)の場合に用いられる計算式を示し、3×3画像ブロック相当の画素値は、次の式によって計算される。
FIG. 15 is an explanatory diagram of an example of a calculation formula used in the case of another (edge pattern)-(estimated edge direction) combination.
FIG. 15A shows a calculation formula used in the case of (edge pattern 1000) − (estimated edge direction “1”), and pixel values corresponding to 3 × 3 image blocks are calculated by the following formula.

p0=a
p2=b
p3=a
p4=(b+c)/2
p5=(b+d)/2
p6=c
p7=(c+d)/2
p8=d
p1=(p4+c)/2
p0 = a
p2 = b
p3 = a
p4 = (b + c) / 2
p5 = (b + d) / 2
p6 = c
p7 = (c + d) / 2
p8 = d
p1 = (p4 + c) / 2

図15(B)は(エッジパターン1100)−(推定エッジ方向「5」)の場合に用いられる計算式を示し、3×3画像ブロック相当の画素値は、次の式によって計算される。   FIG. 15B shows a calculation formula used in the case of (edge pattern 1100) − (estimated edge direction “5”), and pixel values corresponding to 3 × 3 image blocks are calculated by the following formula.

p0=a
p1=(a+b)/2
p2=b
p4=(a+d)/2
p6=c
p7=(c+d)/2
p8=d
p3=(p4+c)/2
p5=(p4+b)/2
p0 = a
p1 = (a + b) / 2
p2 = b
p4 = (a + d) / 2
p6 = c
p7 = (c + d) / 2
p8 = d
p3 = (p4 + c) / 2
p5 = (p4 + b) / 2

図15(C)は(エッジパターン1100)−(推定エッジ方向「2」)の場合に用いられる計算式を示し、3×3画像ブロック相当の画素値は、次の式によって計算される。   FIG. 15C shows a calculation formula used in the case of (edge pattern 1100) − (estimated edge direction “2”), and a pixel value corresponding to a 3 × 3 image block is calculated by the following formula.

p0=a
p1=a
p2=b
p3=a
p4=(b+c)/2
p5=(b+d)/2
p6=c
p7=(c+d)/2
p8=d
p0 = a
p1 = a
p2 = b
p3 = a
p4 = (b + c) / 2
p5 = (b + d) / 2
p6 = c
p7 = (c + d) / 2
p8 = d

図15(D)は(エッジパターン0101)−(推定エッジ方向「7」)の場合に用いられる計算式を示し、3×3画像ブロック相当の画素値は、次の式によって計算される。   FIG. 15D shows a calculation formula used in the case of (edge pattern 0101) − (estimated edge direction “7”), and pixel values corresponding to 3 × 3 image blocks are calculated by the following formula.

p0=a
p2=b
p3=(a+c)/2
p4=(a+d)/2
p5=(b+d)/2
p6=c
p8=d
p1=(p4+b)/2
p7=(p4+c)/2
p0 = a
p2 = b
p3 = (a + c) / 2
p4 = (a + d) / 2
p5 = (b + d) / 2
p6 = c
p8 = d
p1 = (p4 + b) / 2
p7 = (p4 + c) / 2

なお、他のエッジパターンの場合にも、同様にそれぞれのエッジパターンに対応した計算式に従って計算を行うことによって、3×3画像ブロック相当の画素値が計算されることができる。   In the case of other edge patterns as well, pixel values corresponding to 3 × 3 image blocks can be calculated by performing calculation according to the calculation formula corresponding to each edge pattern.

次に、高画質画像ブロック生成部442は、前述のように計算された3×3画像ブロック相当の画素値と、注目領域の推定エッジ方向に基づいて選択された周辺領域内の複数の参照画素とを用いて4×4画像ブロックを生成する。   Next, the high-quality image block generation unit 442 generates a plurality of reference pixels in the peripheral area selected based on the pixel value equivalent to the 3 × 3 image block calculated as described above and the estimated edge direction of the attention area. Are used to generate 4 × 4 image blocks.

図16は、注目領域における推定エッジ方向に基づく参照画素r0〜r13の選択方法の説明図である。注目領域の推定エッジ方向が方向1(22.5°)から方向3(67.5°)の場合には、図16(A)に示したように、参照画素r0〜r5は、図16(A)に太線枠で囲んだように左上から下へ3画素と右下から上へ3画素となるように選択される。また、注目領域の推定エッジ方向が方向5(112.5°)から方向7(157.5°)の場合には、図16(B)に示したように、参照画素r0〜r5は、左下から上へ3画素と右上から下へ3画素となるように選択される。参照画素r6〜r13は、推定エッジ方向に拠らず、図16(A)及び図16(B)に示すように、上下それぞれ4画素を選択される。このように、参照画素は、注目領域における推定エッジ方向に基づいて選択される。もちろん、参照画素の選択は、図16に示すように2パターンからの選択に限定されず、推定エッジ方向に従い、より多くの参照画素選択パターンが用意されてもよい。また、選択する参照画素は、推定エッジ方向に応じて変更されてもよい。   FIG. 16 is an explanatory diagram of a method of selecting the reference pixels r0 to r13 based on the estimated edge direction in the attention area. When the estimated edge direction of the attention area is from direction 1 (22.5 °) to direction 3 (67.5 °), as shown in FIG. 16A, reference pixels r0 to r5 are shown in FIG. A) is selected so that there are 3 pixels from the upper left to the lower and 3 pixels from the lower right to the upper as surrounded by a thick line frame. Further, when the estimated edge direction of the attention area is from the direction 5 (112.5 °) to the direction 7 (157.5 °), as shown in FIG. 3 pixels from the top to the top and 3 pixels from the top right to the bottom. As shown in FIGS. 16A and 16B, four reference pixels r6 to r13 are selected on the upper and lower sides, respectively, regardless of the estimated edge direction. In this way, the reference pixel is selected based on the estimated edge direction in the attention area. Of course, the selection of reference pixels is not limited to selection from two patterns as shown in FIG. 16, and more reference pixel selection patterns may be prepared according to the estimated edge direction. The reference pixel to be selected may be changed according to the estimated edge direction.

図17は、4×4画素の拡大画像ブロックの生成処理の具体例の説明図である。図17に示すように、計算された3×3画像ブロック相当の画素値p0〜p8、及び注目領域における推定エッジ方向に基づいて選択された参照画素r0〜r13を用いて、次の計算式に従って、4×4画素の拡大画像ブロックに相当する画素値(s0〜s15)が計算されて、4x4拡大画像ブロックが生成される。   FIG. 17 is an explanatory diagram of a specific example of the process of generating a 4 × 4 pixel enlarged image block. As shown in FIG. 17, using the calculated pixel values p0 to p8 corresponding to the 3 × 3 image block and the reference pixels r0 to r13 selected based on the estimated edge direction in the attention area, the following calculation formula is used. Pixel values (s0 to s15) corresponding to the 4 × 4 pixel enlarged image block are calculated to generate a 4 × 4 enlarged image block.

s0=0.2×r6+0.16×r0+0.64×p0
s1=0.2×r7+0.32×p0+0.48×p1
s2=0.2×r8+0.48×p1+0.32×p2
s3=0.2×r9+0.64×p2+0.16×r1
s4=0.08×r0+0.32×p0+0.12×r2+0.48×p3
s5=0.16×p0+0.24×p1+0.24×p3+0.36×p4
s6=0.24×p1+0.16×p2+0.36×p4+0.24×p5
s7=0.32×p2+0.08×r1+0.48×p5+0.12×r3
s8=0.12×r2+0.48×p3+0.08×r4+0.32×p6
s9=0.24×p3+0.36×p4+0.16×p6+0.24×p7
s10=0.36×p4+0.24×p5+0.24×p7+0.16×p8
s11=0.48×p5+0.12×r3+0.32×p8+0.08×r5
s12=0.16×r4+0.64×p6+0.2×r10
s13=0.32×p6+0.48×p7+0.2×r11
s14=0.48×p7+0.32×p8+0.2×r12
s15=0.64×p8+0.16×r5+0.2×r13
s0 = 0.2 × r6 + 0.16 × r0 + 0.64 × p0
s1 = 0.2 × r7 + 0.32 × p0 + 0.48 × p1
s2 = 0.2 × r8 + 0.48 × p1 + 0.32 × p2
s3 = 0.2 × r9 + 0.64 × p2 + 0.16 × r1
s4 = 0.08 * r0 + 0.32 * p0 + 0.12 * r2 + 0.48 * p3
s5 = 0.16 × p0 + 0.24 × p1 + 0.24 × p3 + 0.36 × p4
s6 = 0.24 × p1 + 0.16 × p2 + 0.36 × p4 + 0.24 × p5
s7 = 0.32 × p2 + 0.08 × r1 + 0.48 × p5 + 0.12 × r3
s8 = 0.12 * r2 + 0.48 * p3 + 0.08 * r4 + 0.32 * p6
s9 = 0.24 × p3 + 0.36 × p4 + 0.16 × p6 + 0.24 × p7
s10 = 0.36 × p4 + 0.24 × p5 + 0.24 × p7 + 0.16 × p8
s11 = 0.48 × p5 + 0.12 × r3 + 0.32 × p8 + 0.08 × r5
s12 = 0.16 × r4 + 0.64 × p6 + 0.2 × r10
s13 = 0.32 × p6 + 0.48 × p7 + 0.2 × r11
s14 = 0.48 × p7 + 0.32 × p8 + 0.2 × r12
s15 = 0.64 × p8 + 0.16 × r5 + 0.2 × r13

このようにして、4×4画素の拡大画像ブロック(s0〜s15)は、画像ブロック特徴量算出部430により特徴ブロックと判断された注目領域に対して生成される。   In this way, 4 × 4 pixel enlarged image blocks (s0 to s15) are generated for the attention area determined as the feature block by the image block feature amount calculation unit 430.

以上説明したように、拡大画像ブロック生成部440が、画像ブロック判定部420による画像ブロックの判定結果、及び画像ブロック特徴量算出部430により算出された画像特徴量に従って、拡大処理を選択することにより、ジャギーを抑えた高画質の拡大処理、及び処理負荷が削減された拡大処理が可能となる。具体的には、高速画像ブロック生成部444が高画質画像ブロック生成部442よりも処理負荷の軽い拡大手法を用いることによって、拡大処理全体の処理負荷が軽減され、処理時間が短縮されて、高速な拡大処理が実現されることができる。   As described above, the enlarged image block generation unit 440 selects the enlargement process according to the image block determination result by the image block determination unit 420 and the image feature amount calculated by the image block feature amount calculation unit 430. Thus, high-quality enlargement processing with reduced jaggies and enlargement processing with reduced processing load are possible. Specifically, the high-speed image block generation unit 444 uses an enlargement method with a lighter processing load than the high-quality image block generation unit 442, thereby reducing the processing load of the entire enlargement process, reducing the processing time, Enlargement processing can be realized.

[画像ブロック配置部]
画像ブロック配置部450を、より詳細に説明する。
画像ブロック配置部450は、拡大画像ブロック生成部440により生成された注目領域に対する拡大画像ブロックを、所定の方法により順次配置する。画像ブロック配置部450は、拡大画像ブロック生成部440により生成された複数の拡大画像ブロックの境界部分を補正して、補正手段を構成する。
図18は、拡大画像ブロック生成部440により生成された4×4画素の拡大画像ブロックを配置する具体例の説明図である。図18に示す例では、画像ブロック配置部450は、順次生成された拡大画像ブロック0及び拡大画像ブロック1を、オーバーラップさせるように配置する。オーバーラップする画素は、各々前画素値との平均をとるようにして配置される。また、オーバーラップする画素は、オーバーラップする画素の総和を計算し、前記画素値の総和をオーバーラップした数で割ることにより算出されてもよい。この場合、注目画素は、例えば1画素づつずらしながら選択され、拡大処理が行われる。あるいは、拡大画像ブロックは、オーバーラップさせずに並べられることもできる。この場合、注目領域は、重ならないように選択される。
[Image block placement section]
The image block arrangement unit 450 will be described in more detail.
The image block arrangement unit 450 sequentially arranges the enlarged image blocks for the region of interest generated by the enlarged image block generation unit 440 by a predetermined method. The image block arrangement unit 450 corrects the boundary portions of the plurality of enlarged image blocks generated by the enlarged image block generation unit 440 and constitutes a correction unit.
FIG. 18 is an explanatory diagram of a specific example in which the 4 × 4 pixel enlarged image blocks generated by the enlarged image block generation unit 440 are arranged. In the example illustrated in FIG. 18, the image block arrangement unit 450 arranges the enlarged image block 0 and the enlarged image block 1 that are sequentially generated so as to overlap each other. The overlapping pixels are arranged so as to average each of the previous pixel values. The overlapping pixels may be calculated by calculating the sum of the overlapping pixels and dividing the sum of the pixel values by the number of overlaps. In this case, the target pixel is selected while being shifted by one pixel, for example, and the enlargement process is performed. Alternatively, the enlarged image blocks can be arranged without overlapping. In this case, the attention areas are selected so as not to overlap.

[全体動作]
画像処理装置2の全体動作(画像拡大処理)を説明する。
図19は、画像処理装置2の全体動作を示すフローチャート(S30)である。
図19に示すように、ステップ300(S300)において、画像ブロック設定部410は、画像ブロック判定部420、画像ブロック特徴量算出部430及び拡大画像ブロック生成部440により必要とされる既定の画像ブロックのサイズをそれぞれ設定し、記憶部400により記憶されている処理対象画像データから、設定されたブロックサイズの画像ブロックを順次(例えばラスタスキャン順に)切り出し、切り出された各画像ブロックを画像ブロック判定部420、画像ブロック特徴量算出部430及び拡大画像ブロック生成部440それぞれに対して出力する。
[Overall operation]
The overall operation (image enlargement process) of the image processing apparatus 2 will be described.
FIG. 19 is a flowchart (S30) showing the overall operation of the image processing apparatus 2.
As shown in FIG. 19, in step 300 (S300), the image block setting unit 410 is a default image block required by the image block determination unit 420, the image block feature amount calculation unit 430, and the enlarged image block generation unit 440. Are set, the image blocks having the set block size are sequentially cut out from the processing target image data stored in the storage unit 400 (for example, in raster scan order), and the cut out image blocks are set as image block determination units. 420, and output to each of the image block feature value calculation unit 430 and the enlarged image block generation unit 440.

ステップ302(S302)において、画像ブロック判定部420は、画像ブロック設定部410により切り出された画像ブロックの中の注目領域を含む周辺領域が、多階調画像ブロックであるのか、限定階調画像ブロックであるのか、又は、境界画像ブロックであるのかを判定する。具体的には、画像ブロック判定部420は、注目領域を含む周辺領域のブロック階調数を計数し、所定の基準階調数と比較して、周辺領域が多階調画像ブロックであるのか限定階調画像ブロックであるのか判別する。さらに、画像ブロック判定部420は、多階調画像ブロックであると判別された画像ブロックのうち、ある特定の画素値を持つ画素(背景画素)を含む画像ブロックを、境界画像ブロックと判別する。   In step 302 (S302), the image block determination unit 420 determines whether the peripheral region including the region of interest in the image block cut out by the image block setting unit 410 is a multi-tone image block or a limited-tone image block. Or a boundary image block. Specifically, the image block determination unit 420 counts the number of block gradations in the peripheral area including the attention area and compares it with a predetermined reference gradation number to determine whether the peripheral area is a multi-gradation image block. It is determined whether it is a gradation image block. Further, the image block determination unit 420 determines an image block including a pixel (background pixel) having a specific pixel value among the image blocks determined to be a multi-tone image block as a boundary image block.

ステップ304(S304)において、画像ブロック特徴量算出部430は、画像ブロック判定部420による画像ブロックの判別結果に基づいて、注目領域を含む周辺領域が多階調画像ブロックである画像ブロックを選択する。
画像処理装置2は、注目領域を含む周辺領域が多階調画像ブロックであると判定された場合に、この注目領域の画像特徴を保存する拡大処理を行うべくS306の処理に移行し、多階調画像ブロック以外(限定階調画像ブロック及び境界画像ブロック)であると判定された場合に、この注目領域に対して最近傍補間法による拡大画像ブロックの生成処理を行うべくS318の処理に移行する。
In step 304 (S304), the image block feature amount calculation unit 430 selects an image block whose peripheral region including the attention region is a multi-tone image block based on the image block determination result by the image block determination unit 420. .
When it is determined that the peripheral area including the attention area is a multi-tone image block, the image processing apparatus 2 proceeds to the process of S306 to perform an enlargement process for storing the image feature of the attention area. If it is determined that the block is other than the tonal image block (limited gradation image block and boundary image block), the process proceeds to the process of S318 so as to perform the process of generating the enlarged image block by the nearest neighbor interpolation method for this attention area. .

ステップ306(S306)において、画像ブロック特徴量算出部430は、入力された画像ブロックの中の注目領域のエッジ強度Gを式(1)を用いて算出する。
なお、{a,b,c,d}は図7に例示するように注目領域内の各画素値である。入力画像データがグレースケール画像でなく、例えばRGB色空間のカラー画像である場合には、画像ブロック特徴量算出部430は、注目領域に関してR,G,Bの各色空間の色成分毎の画像ブロックそれぞれについて、式(1)を用いてエッジ強度Gr、Gg、Gbを計算し、Gr、Gg、Gbの中で最大のエッジ強度である色成分の画像ブロックを選択し、そのエッジ強度を注目領域の(すべての色成分に共通の)エッジ強度とする。
In step 306 (S306), the image block feature amount calculation unit 430 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 430 performs image blocks for each color component in 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 region of interest. Edge strength (common to all color components).

ステップ308(S308)において、画像ブロック特徴量算出部430は、注目領域のエッジ強度Gに基づいて、この注目領域が特徴ブロックであるか非特徴ブロックであるかを判定する。具体的には、画像ブロック特徴量算出部430は、算出されたエッジ強度Gが既定の閾値Th以上である場合(すなわち、注目領域内の階調変化量が大きい場合)に、この注目領域を特徴ブロックとし、算出されたエッジ強度Gが既定の閾値Th未満である場合(すなわち、注目領域内の階調変化量が小さい場合)に、この注目領域を非特徴ブロックとする。
画像処理装置2は、注目領域が特徴ブロックであると判定された場合に、この注目領域の画像特徴を保存するような拡大処理行うべくS310の処理に移行し、注目領域が非特徴ブロックであると判定された場合に、処理負荷の小さい拡大画像ブロックの生成処理を行うべくS318の処理に移行する。
In step 308 (S308), the image block feature quantity calculation unit 430 determines whether the attention area is a feature block or a non-feature block based on the edge strength G of the attention area. Specifically, the image block feature amount calculation unit 430 determines the region of interest when the calculated edge strength G is greater than or equal to a predetermined threshold Th (that is, when the amount of gradation change in the region of interest is large). When the calculated edge strength G is less than a predetermined threshold Th (that is, when the gradation change amount in the attention area is small), the attention area is determined as a non-feature block.
When it is determined that the attention area is a feature block, the image processing apparatus 2 proceeds to the process of S310 to perform an enlargement process for storing the image feature of the attention area, and the attention area is a non-feature block. If it is determined, the process proceeds to S318 so as to perform a process of generating an enlarged image block with a small processing load.

ステップ310(S310)において、画像ブロック特徴量算出部430は、注目領域(特徴ブロック)及びその注目領域を含む1以上の周辺領域の中の参照領域のエッジ角度Θを、式(3)を用いて計算する。
なお、gx、gyは、式(1)において各々算出される値である。画像ブロック特徴量算出部430は、算出された複数のエッジ角度Θから注目領域のエッジ方向θを推定する。例えば、画像ブロック特徴量算出部430は、得られた複数のエッジ角度Θの平均値を算出し、算出された平均値を推定エッジ方向θとする。
In step 310 (S310), the image block feature quantity calculation unit 430 uses the equation (3) for the edge angle Θ of the reference region in the attention region (feature block) and one or more peripheral regions including the attention region. To calculate.
Note that gx and gy are values calculated in the equation (1). The image block feature quantity calculation unit 430 estimates the edge direction θ of the region of interest from the calculated plurality of edge angles Θ. For example, the image block feature quantity calculation unit 430 calculates the average value of the obtained plurality of edge angles Θ, and sets the calculated average value as the estimated edge direction θ.

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

ステップ314(S314)において、拡大画像ブロック生成部440の高画質画像ブロック生成部442は、拡大率に応じてサイズ及び重み付け係数が設定された強調カーネル446(図13)を用いて、画像ブロック設定部410により切り出された画像ブロックの中の注目領域(特徴ブロック)及びその周辺領域の画像データに対して、コントラスト強調処理を施す。   In step 314 (S314), the high-quality image block generation unit 442 of the enlarged image block generation unit 440 uses the enhancement kernel 446 (FIG. 13) in which the size and the weighting coefficient are set according to the enlargement ratio. Contrast enhancement processing is performed on the image data of the region of interest (feature block) in the image block cut out by the unit 410 and its peripheral region.

ステップ316(S316)において、拡大画像ブロック生成部440の高画質画像ブロック生成部442は、画像ブロック特徴量算出部430により得られた注目領域のエッジパターン及び前記注目領域の推定エッジ方向θと、S314の処理においてコントラスト強調が施された注目領域及び周辺領域内の画素値とを用いて、エッジパターンと推定エッジ方向θとに対応する算出式(図14、図15)により、3×3画像ブロックに相当する画素値(p0〜p8)を生成する。さらに、高画質画像ブロック生成部442は、前記生成された画素値(p0〜p8)と推定エッジ方向θとに基づいて選択された参照画素(r0〜r13)を用いて、図17に示す算出式により、注目領域に対する拡大画像ブロックを生成する。   In step 316 (S316), the high-quality image block generation unit 442 of the enlarged image block generation unit 440 includes the edge pattern of the attention area and the estimated edge direction θ of the attention area obtained by the image block feature amount calculation section 430. The 3 × 3 image is calculated by the calculation formulas (FIGS. 14 and 15) corresponding to the edge pattern and the estimated edge direction θ using the attention area and the pixel values in the peripheral area subjected to contrast enhancement in the process of S314. Pixel values (p0 to p8) corresponding to the blocks are generated. Further, the high-quality image block generation unit 442 uses the reference pixels (r0 to r13) selected based on the generated pixel values (p0 to p8) and the estimated edge direction θ to perform the calculation illustrated in FIG. An enlarged image block for the attention area is generated by the equation.

ステップ318(S318)において、拡大画像ブロック生成部440の高速画像ブロック生成部444は、画像ブロック判定部420により限定階調画像ブロックもしくは境界画像ブロックと判別された注目領域、又は、画像ブロック特徴量算出部430により非特徴ブロックと判断された注目領域に対する拡大画像ブロックを、最近傍補間法を用いて生成する。   In step 318 (S318), the high-speed image block generation unit 444 of the enlarged image block generation unit 440 recognizes the attention area or the image block feature amount determined as the limited gradation image block or the boundary image block by the image block determination unit 420. An enlarged image block for the attention area determined as a non-feature block by the calculation unit 430 is generated using the nearest neighbor interpolation method.

ステップ320(S320)において、画像ブロック配置部450は、拡大画像ブロック生成部440により生成された拡大画像ブロックを順次配置する。
なお、配置する方法として、拡大画像ブロック生成部440により生成された拡大画像ブロックをオーバーラップするように順次配置する方法などが考えられる。オーバーラップする場合には、順次前画素値との平均を取るようにする方法や、オーバーラップする前画素値の総和をオーバーラップ数で割るという方法が考えられる。ただし、処理速度や画質を勘案し、配置する方法は、拡大画像ブロック生成部440における拡大画像ブロックを用いる方法であれば、どのような手法であってもよい。
In step 320 (S320), the image block arrangement unit 450 sequentially arranges the enlarged image blocks generated by the enlarged image block generation unit 440.
In addition, as a method of arrangement, a method of sequentially arranging the enlarged image blocks generated by the enlarged image block generation unit 440 so as to overlap can be considered. In the case of overlapping, a method of sequentially taking an average with the previous pixel value or a method of dividing the sum of the overlapping previous pixel values by the number of overlaps can be considered. However, as long as the processing speed and the image quality are taken into consideration, any arrangement method may be used as long as the method uses the enlarged image block in the enlarged image block generation unit 440.

ステップ322(S322)において、全ての入力画像データについて、S300からS320までの処理が完了したか否かを判定し、処理が完了していないと判定された場合に、S300の処理に戻って次の画素ブロックに対する処理が行われ、全ての入力画像データについて処理が完了していると判定された場合に、拡大処理は終了する。   In step 322 (S322), it is determined whether or not the processing from S300 to S320 has been completed for all input image data. If it is determined that the processing has not been completed, the processing returns to S300 and the next. When the process for the pixel block is performed and it is determined that the process is completed for all input image data, the enlargement process ends.

以上説明したように、本実施形態における画像処理装置2は、注目画素を含む所定の大きさの画像領域が多階調を有する画像領域かそうでないかを判別し、判別された多階調画像領域の特徴量を算出し、画像領域の判別結果及び算出された多階調画像領域の特徴量に従って、注目画素を含む所定の大きさの画像領域を拡大する複数の拡大手法を切り替えて拡大画像領域を生成し、得られた拡大画像領域を所定の方法で配置して、拡大された出力画像を生成している。このような拡大処理によって、画像合成時のマスク画像との境界部分における不具合が抑えられることができる。
また、本実施形態における画像処理装置2は、高画質拡大処理を特徴的な部分(特徴ブロック)にのみ適用することにより、全体としての処理負荷を抑え、かつ、特徴的な部分について高画質拡大処理を適用するので、特徴的な部分の特徴量を保存して、ボケやジャギーなどの画質欠陥を抑制した高画質な拡大画像が得ることができる。
As described above, the image processing apparatus 2 according to the present embodiment determines whether an image area having a predetermined size including the target pixel is an image area having multiple gradations or not, and determines the determined multi-gradation image. A feature amount of the region is calculated, and an enlarged image is switched by switching a plurality of enlargement methods for enlarging the image region of a predetermined size including the target pixel according to the determination result of the image region and the calculated feature amount of the multi-tone image region. An area is generated, and the obtained enlarged image area is arranged by a predetermined method to generate an enlarged output image. By such enlargement processing, it is possible to suppress problems at the boundary with the mask image at the time of image composition.
In addition, the image processing apparatus 2 according to the present embodiment applies high-quality enlargement processing only to characteristic portions (feature blocks), thereby suppressing the overall processing load and enlarging high-quality images for characteristic portions. Since the processing is applied, it is possible to save the feature amount of the characteristic part and obtain a high-quality enlarged image in which image quality defects such as blur and jaggy are suppressed.

[第2実施形態]
本発明にかかる画像処理装置の第2の実施形態を説明する。
[Second Embodiment]
A second embodiment of the image processing apparatus according to the present invention will be described.

[画像拡大プログラム]
図20は、制御装置20(図4)により実行され、本発明にかかる画像処理方法を実現する画像拡大プログラム6の機能構成を例示する図である。
図20に例示するように、画像拡大プログラム6は、記憶部400、スキャンライン判定部600、画像ブロック設定部410、画像ブロック判定部420、画像ブロック特徴量算出部430、高画質画像ブロック生成部442、高速拡大処理部650及び拡大画像統合部660を有する。画像ブロック判定部420は、階調数計数部422及び境界ブロック判別部424を有し、画像ブロック特徴量算出部430は、エッジ強度算出部432、エッジ方向推定部434及びエッジパターン選択部436を有する。
なお、図20に示された各構成のうち、図5に示された構成と実質的に同一のものには同一の符号が付されている。
[Image enlargement program]
FIG. 20 is a diagram illustrating a functional configuration of the image enlargement program 6 which is executed by the control device 20 (FIG. 4) and implements the image processing method according to the present invention.
As illustrated in FIG. 20, the image enlargement program 6 includes a storage unit 400, a scan line determination unit 600, an image block setting unit 410, an image block determination unit 420, an image block feature amount calculation unit 430, and a high quality image block generation unit. 442, a high-speed enlargement processing unit 650, and an enlarged image integration unit 660. The image block determination unit 420 includes a gradation number counting unit 422 and a boundary block determination unit 424, and the image block feature amount calculation unit 430 includes an edge strength calculation unit 432, an edge direction estimation unit 434, and an edge pattern selection unit 436. Have.
20 that are substantially the same as those shown in FIG. 5 are denoted by the same reference numerals.

スキャンライン判定部600は、記憶部400により記憶されている入力画像データから、ライン単位毎に入力画像データを順次切り出し、それらライン単位の画像データ中に異なる画素値がいくつあるか(以下ではこれをライン階調数と称する)を計数する。さらに、スキャンライン判定部600は、ライン階調数に従って、入力画像データから切り出したライン単位の画像データの切り分けを行う。   The scan line determination unit 600 sequentially cuts out input image data for each line unit from the input image data stored in the storage unit 400, and how many different pixel values are in the image data for each line unit (hereinafter referred to as this). (Referred to as the number of line gradations). Further, the scan line determination unit 600 separates line-based image data cut out from the input image data according to the number of line gradations.

画像ブロック設定部410は、スキャンライン判定部600によりライン階調数が所定の基準値以上であると判定され、かつ、設定された画像ブロックサイズが切り出し可能である、数ライン単位の入力画像データから、設定されたブロックサイズの画像ブロックを順次(例えばラスタスキャン順に)切り出し、このブロックサイズの画像ブロックそれぞれを、画像ブロック判定部420、画像ブロック特徴量算出部430及び高画質画像ブロック生成部442に対してそれぞれ出力する。   The image block setting unit 410 is input image data in units of several lines, in which the scan line determination unit 600 determines that the number of line gradations is equal to or greater than a predetermined reference value, and the set image block size can be cut out. Then, image blocks having the set block size are sequentially cut out (for example, in raster scan order), and each of the image blocks having the block size is extracted as an image block determination unit 420, an image block feature value calculation unit 430, and a high-quality image block generation unit 442. Respectively.

高画質画像ブロック生成部442は、画像ブロック特徴量算出部430により算出された画像特徴量を用いて、注目領域に対応する拡大画像ブロックを生成する。高画質画像ブロック生成部442における拡大処理は、注目領域に含まれる特徴を保持するような拡大手法を適用するのが望ましい。
また、高画質画像ブロック生成部442は、画像ブロック特徴量算出部430により算出された特徴量が基準値以上である画像ブロック(すなわち、特徴ブロック)についてのみ、拡大処理を行う。
The high-quality image block generation unit 442 uses the image feature amount calculated by the image block feature amount calculation unit 430 to generate an enlarged image block corresponding to the attention area. For the enlargement process in the high-quality image block generation unit 442, it is desirable to apply an enlargement method that retains the features included in the region of interest.
In addition, the high-quality image block generation unit 442 performs the enlargement process only on an image block (that is, a feature block) in which the feature amount calculated by the image block feature amount calculation unit 430 is equal to or greater than a reference value.

高速拡大処理部650は、記憶部400により記憶されている入力画像データを拡大する。高速拡大処理部650は、高画質画像ブロック生成部442による拡大処理より処理負荷の小さい拡大アルゴリズムを適用する。具体的には、高速拡大処理部650は、例えば、最近傍補間拡大法を適用して入力画像データを拡大する。また、高速拡大処理部650は、画像ブロック毎の処理ではなく、入力画像単位又は入力画像の数ライン単位で拡大処理を行うことができる。   The high-speed enlargement processing unit 650 enlarges the input image data stored in the storage unit 400. The high-speed enlargement processing unit 650 applies an enlargement algorithm that has a smaller processing load than the enlargement process performed by the high-quality image block generation unit 442. Specifically, the high-speed enlargement processing unit 650 enlarges the input image data by applying, for example, the nearest neighbor interpolation enlargement method. Also, the high-speed enlargement processing unit 650 can perform enlargement processing in units of input images or in units of several lines of input images, rather than processing for each image block.

拡大画像統合部660は、高画質画像ブロック生成部442により拡大された拡大画像ブロックと、高速拡大処理部650により拡大された拡大画像とを統合する。より具体的には、拡大画像統合部660は、画像ブロック特徴量算出部430により算出された画像特徴量が基準値以上である画像ブロック(特徴ブロック)についてのみ、高画質画像ブロック生成部442により拡大された拡大画像を適用する。また、拡大画像統合部660は、算出された画像特徴量が基準値未満である画像ブロック(非特徴ブロック)、スキャンライン判定部600によりライン階調数が基準値以下と判定された画像データ、又は、画像ブロック判定部420によりブロック階調数が基準値以下であるかもしくはある特定の値の画素を含むと判定された画像ブロックについては、高速拡大処理部650により拡大された拡大画像を適用して、1つの拡大画像を生成する。   The enlarged image integration unit 660 integrates the enlarged image block enlarged by the high-quality image block generation unit 442 and the enlarged image enlarged by the high-speed enlargement processing unit 650. More specifically, the enlarged image integration unit 660 uses the high-quality image block generation unit 442 only for image blocks (feature blocks) in which the image feature amount calculated by the image block feature amount calculation unit 430 is greater than or equal to a reference value. Apply the enlarged image. Further, the enlarged image integration unit 660 includes an image block (non-feature block) in which the calculated image feature amount is less than a reference value, image data in which the number of line gradations is determined to be equal to or less than the reference value by the scan line determination unit 600, Alternatively, an enlarged image enlarged by the high-speed enlargement processing unit 650 is applied to an image block whose block gradation number is determined to be equal to or less than the reference value by the image block determination unit 420 or includes a pixel having a specific value. Thus, one enlarged image is generated.

[スキャンライン判定部]
スキャンライン判定部600を、より詳細に説明する。
スキャンライン判定部600は、ライン単位の画像データが何階調で構成されているかを計数する。例えば、1ライン内すべての画素値が同じ値ならば、ライン階調数は1階調である。さらに、スキャンライン判定部600は、計数されたライン階調数と基準階調数(既定のライン階調数Tl)との比較により、ライン単位の画像データを判別する。本例では、基準階調数をTl=2とすることにより、スキャンライン判定部600は、ライン毎の画像データが自然画像のような多階調画像データであるか、又はマスク画像などのような2値画像データのいずれであるかを判別する。つまり、スキャンライン判定部600は、計数されたライン階調数が基準階調数Tlより大きければ多階調画像データであると判別し、基準階調数Trより小さければ2値画像データと判別する。なお、画像データのライン階調数が基準階調数Tlよりも小さい場合(つまり、2値画像データの場合)は、高速拡大処理部650による拡大処理が行われる。
また、本例では、入力画像データは、1画素につき1色要素であるグレースケール画像であることを想定して説明されているが、このような画像に限定されない。例えば、1画素につき3色要素のRGB色空間のカラー画像データが入力される場合は、スキャンライン判定部600は、各々の色成分のデータにおけるライン階調数を計数し、すべての色成分データのライン階調数がTl(=2)より小さい場合のみ、2値画像データとして判別すればよい。
[Scanline determination unit]
The scan line determination unit 600 will be described in more detail.
The scan line determination unit 600 counts how many gradations the image data for each line is composed of. For example, if all pixel values in one line are the same value, the number of line gradations is one gradation. Further, the scan line determination unit 600 determines image data for each line by comparing the counted number of line gradations with a reference gradation number (a predetermined line gradation number Tl). In this example, by setting the number of reference gradations to Tl = 2, the scan line determination unit 600 determines that the image data for each line is multi-tone image data such as a natural image or a mask image. Which binary image data is selected. In other words, the scan line determination unit 600 determines that the counted line gradation number is multi-gradation image data if it is larger than the reference gradation number Tl, and determines that it is binary image data if it is smaller than the reference gradation number Tr. To do. When the number of line gradations of the image data is smaller than the reference gradation number Tl (that is, in the case of binary image data), enlargement processing by the high-speed enlargement processing unit 650 is performed.
Further, in this example, the input image data is described on the assumption that the input image data is a grayscale image that is one color element per pixel, but is not limited to such an image. For example, when color image data in the RGB color space of three color elements per pixel is input, the scan line determination unit 600 counts the number of line gradations in each color component data, and all the color component data Only when the number of line tones is smaller than Tl (= 2), it may be determined as binary image data.

[拡大画像統合部]
拡大画像統合部660をより詳細に説明する。
拡大画像統合部660は、高画質画像ブロック生成部442により生成された注目領域に対する拡大画像ブロックと、高速拡大処理部650から出力された拡大画像とを統合する。
図21は、高画質画像ブロック生成部442により生成された4×4画素の拡大画像ブロックと、高速拡大処理部650から出力された拡大画像とを統合する具体例の説明図である。
図21に示すように、拡大画像統合部660は、順次生成された拡大画像ブロック0及び拡大画像ブロック1を、高速拡大処理部650から出力された拡大画像上の対応する位置に順次配置して統合する。このとき、拡大画像統合部660は、拡大画像上の各画素値を、拡大ブロックの各画素値(S0〜S15)で置き換えるように配置してもよいし、拡大画像上の各画素値と拡大ブロックの各画素値(S0〜S15)とを重畳するように配置してもよい。
また、拡大画像ブロック同士(図21における拡大画像ブロック0と拡大画像ブロック1)の拡大画像上の対応位置がオーバーラップする場合は、拡大画像統合部660は、各拡大画像ブロックのオーバーラップする画素の平均をとってもよいし、又は、オーバーラップする画素の総和を計算し、前記画素値の総和をオーバーラップした数で割ることにより各画素値を算出するようにしてもよい。
[Enlarged image integration section]
The enlarged image integration unit 660 will be described in more detail.
The enlarged image integration unit 660 integrates the enlarged image block for the region of interest generated by the high-quality image block generation unit 442 and the enlarged image output from the high-speed enlargement processing unit 650.
FIG. 21 is an explanatory diagram of a specific example in which the enlarged image block of 4 × 4 pixels generated by the high-quality image block generation unit 442 and the enlarged image output from the high-speed enlargement processing unit 650 are integrated.
As illustrated in FIG. 21, the enlarged image integration unit 660 sequentially arranges the enlarged image block 0 and the enlarged image block 1 that are sequentially generated at corresponding positions on the enlarged image output from the high-speed enlargement processing unit 650. Integrate. At this time, the enlarged image integration unit 660 may be arranged so as to replace each pixel value on the enlarged image with each pixel value (S0 to S15) of the enlarged block, or each pixel value on the enlarged image and the enlarged image. You may arrange | position so that each pixel value (S0-S15) of a block may overlap.
When the corresponding positions on the enlarged image of the enlarged image blocks (enlarged image block 0 and enlarged image block 1 in FIG. 21) overlap, the enlarged image integration unit 660 overlaps each enlarged image block. Alternatively, the sum of the overlapping pixels may be calculated, and each pixel value may be calculated by dividing the sum of the pixel values by the number of overlaps.

[全体動作]
画像処理装置2の全体動作(画像拡大処理)を説明する。
図22は、本実施形態における画像処理装置2の全体動作を示すフローチャート(S40)である。
図22に示すように、ステップ400(S400)において、スキャンライン判定部600は、記憶部400により記憶されている入力画像データから、ライン単位毎に入力画像データを順次切り出し、それらライン単位の画像データのライン階調数を計数する。
[Overall operation]
The overall operation (image enlargement process) of the image processing apparatus 2 will be described.
FIG. 22 is a flowchart (S40) showing the overall operation of the image processing apparatus 2 in the present embodiment.
As shown in FIG. 22, in step 400 (S400), the scan line determination unit 600 sequentially cuts out the input image data for each line unit from the input image data stored in the storage unit 400, and the image for each line unit. Count the number of line tones in the data.

ステップ402(S402)において、スキャンライン判定部600は、ライン単位毎の入力画像データが、多階調画像データであるのか、2値画像データであるのかを判定する。具体的には、ステップ400(S400)において計数されたライン階調数と、所定の基準階調数Tl(例えばTl=2)との比較により多階調画像データであるのか2値画像データであるのか判別する。
画像処理装置2は、ライン単位毎の画像データが2値画像データであると判定された場合に、画像データを高速に拡大処理行うべくS424の処理に移行し、ライン単位毎の画像データが多階調画像データであると判定された場合に、ブロック単位の拡大処理を行うべくS404の処理に移行する。
In step 402 (S402), the scan line determination unit 600 determines whether the input image data for each line unit is multi-tone image data or binary image data. Specifically, whether the image data is multi-gradation image data or binary image data by comparing the line gradation number counted in step 400 (S400) with a predetermined reference gradation number Tl (eg, Tl = 2). Determine if it exists.
When the image processing apparatus 2 determines that the image data for each line unit is binary image data, the image processing apparatus 2 proceeds to the process of S424 in order to enlarge the image data at high speed, and the image data for each line unit is large. If it is determined that the image data is gradation image data, the process proceeds to S404 to perform block-unit enlargement processing.

ステップ404(S404)において、画像ブロック設定部410は、画像ブロック判定部420、画像ブロック特徴量算出部430及び高画質画像ブロック生成部442により必要とされる既定の画像ブロックのサイズをそれぞれ設定し、スキャンライン判定部600により多階調画像データと判定されたライン単位の画像データから、設定されたブロックサイズの画像ブロックを順次(例えばラスタスキャン順に)切り出し、切り出された各画像ブロックを画像ブロック判定部420、画像ブロック特徴量算出部430及び高画質画像ブロック生成部442に対してそれぞれ出力する。   In step 404 (S404), the image block setting unit 410 sets the default image block sizes required by the image block determination unit 420, the image block feature amount calculation unit 430, and the high-quality image block generation unit 442, respectively. The image block of the set block size is cut out sequentially (for example, in raster scan order) from the line-by-line image data determined as multi-gradation image data by the scan line determination unit 600, and each cut out image block is converted into an image block. The data are output to the determination unit 420, the image block feature value calculation unit 430, and the high-quality image block generation unit 442, respectively.

ステップ406(S406)において、画像ブロック判定部420は、画像ブロック設定部410により切り出された画像ブロックの中の注目領域を含む周辺領域が、多階調画像ブロックであるのか、限定階調画像ブロックであるのか、又は、境界画像ブロックであるのかを判定する。具体的には、画像ブロック判定部420は、注目領域を含む周辺領域のブロック階調数を計数し、所定の基準階調数との比較により、多階調画像ブロックであるのか限定階調画像ブロックであるのか判別する。さらに、画像ブロック判定部420は、多階調画像ブロックであると判別された画像ブロックのうち、ある特定の画素値を持つ画素(背景画素)を含むものを境界画像ブロックと判別する。   In step 406 (S406), the image block determination unit 420 determines whether the peripheral region including the attention region in the image block cut out by the image block setting unit 410 is a multi-tone image block or a limited-tone image block. Or a boundary image block. Specifically, the image block determination unit 420 counts the number of block gradations in the peripheral area including the attention area and compares it with a predetermined reference gradation number to determine whether it is a multi-gradation image block or a limited gradation image. Determine if it is a block. Further, the image block determination unit 420 determines a block including a pixel (background pixel) having a specific pixel value from among the image blocks determined to be a multi-tone image block as a boundary image block.

ステップ408(S408)において、画像ブロック特徴量算出部430は、画像ブロック判定部420による画像ブロックの判別結果に基づいて、注目領域を含む周辺領域が多階調画像ブロックである画像ブロックを選択する。
画像処理装置2は、多階調画像ブロックであると判定された場合に、この注目領域の画像特徴を保存する拡大処理を行うべくS410の処理に移行し、多階調画像ブロック以外(限定階調画像ブロック及び境界画像ブロック)であると判定された場合に、S404の処理に戻り、次の画像ブロックを処理する。
In step 408 (S408), the image block feature quantity calculation unit 430 selects an image block whose peripheral region including the region of interest is a multi-tone image block based on the image block determination result by the image block determination unit 420. .
When it is determined that the image processing device 2 is a multi-tone image block, the image processing apparatus 2 proceeds to the processing of S410 to perform an enlargement process for storing the image feature of the region of interest, and other than the multi-tone image block (limited floor). If it is determined that the block is a toned image block and a boundary image block), the process returns to S404 and the next image block is processed.

ステップ410(S410)において、画像ブロック特徴量算出部430は、入力された画像ブロックの中の注目領域のエッジ強度Gを、式(1)を用いて算出する。なお、{a,b,c,d}は、図7に例示するように、注目領域内の各画素値である。入力画像データがグレースケール画像でなく、例えばRGB色空間のカラー画像である場合には、画像ブロック特徴量算出部430は、注目領域に関してR,G,Bの各色空間の色成分毎の画像ブロックそれぞれについて、式(1)を用いてエッジ強度Gr、Gg、Gbを計算し、Gr、Gg、Gbの中で最大のエッジ強度である色成分の画像ブロックを選択し、そのエッジ強度を注目領域の(すべての色成分に共通の)エッジ強度とする。   In step 410 (S410), the image block feature quantity calculation unit 430 calculates the edge strength G of the attention area in the input image block using Expression (1). In addition, {a, b, c, d} is each pixel value in the attention area 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 430 performs image blocks for each color component in 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).

ステップ412(S412)において、画像ブロック特徴量算出部430は、注目領域のエッジ強度Gに基づいて、この注目領域が特徴ブロックであるか非特徴ブロックであるかを判定する。具体的には、画像ブロック特徴量算出部430は、算出されたエッジ強度Gが既定の閾値Th以上である場合(すなわち、注目領域内の階調変化量が大きい場合)に、この注目領域を特徴ブロックとし、算出されたエッジ強度Gが既定の閾値Th未満である場合(すなわち、注目領域内の階調変化量が小さい場合)に、この注目領域を非特徴ブロックとする。
画像処理装置2は、注目領域が特徴ブロックであると判定された場合に、この注目領域の画像特徴を保存する拡大処理行うべくS414の処理に移行し、注目領域が非特徴ブロックであると判定された場合に、S404の処理に戻り、次の画像ブロックを処理する。
In step 412 (S412), the image block feature quantity calculation unit 430 determines whether the attention area is a feature block or a non-feature block based on the edge strength G of the attention area. Specifically, the image block feature amount calculation unit 430 determines the region of interest when the calculated edge strength G is greater than or equal to a predetermined threshold Th (that is, when the amount of gradation change in the region of interest is large). When the calculated edge strength G is less than a predetermined threshold Th (that is, when the gradation change amount in the attention area is small), the attention area is determined as a non-feature block.
When it is determined that the attention area is a feature block, the image processing apparatus 2 proceeds to the processing of S414 to perform an enlargement process for storing the image feature of the attention area, and determines that the attention area is a non-feature block. If so, the process returns to S404 to process the next image block.

ステップ414(S414)において、画像ブロック特徴量算出部430は、注目領域(特徴ブロック)及びその注目領域を含む1以上の周辺領域の中の参照領域のエッジ角度Θを、式(3)を用いて計算する。なお、gx、gyは、式(1)において各々算出される値である。画像ブロック特徴量算出部430は、算出された複数のエッジ角度Θから、注目領域のエッジ方向θを推定する。例えば、画像ブロック特徴量算出部430は、得られた複数のエッジ角度Θの平均値を算出し、算出された平均値を推定エッジ方向θとする。   In step 414 (S414), the image block feature value calculation unit 430 uses the expression (3) for the edge angle Θ of the reference area in the attention area (feature block) and one or more peripheral areas including the attention area. To calculate. Note that gx and gy are values calculated in the equation (1). The image block feature quantity calculation unit 430 estimates the edge direction θ of the attention area from the calculated plurality of edge angles Θ. For example, the image block feature quantity calculation unit 430 calculates the average value of the obtained plurality of edge angles Θ, and sets the calculated average value as the estimated edge direction θ.

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

ステップ418(S418)において、高画質画像ブロック生成部442は、拡大率に応じてサイズ及び重み付け係数が設定された強調カーネル446(図13)を用いて、画像ブロック設定部410により切り出された画像ブロックの中の注目領域(特徴ブロック)及びその周辺領域の画像データに対して、コントラスト強調処理を施す。   In step 418 (S418), the high-quality image block generation unit 442 uses the enhancement kernel 446 (FIG. 13) in which the size and the weighting coefficient are set according to the enlargement ratio, and the image cut out by the image block setting unit 410 Contrast enhancement processing is performed on the image data of the attention area (feature block) in the block and its peripheral area.

ステップ420(S420)において、高画質画像ブロック生成部442は、画像ブロック特徴量算出部430により得られた注目領域のエッジパターン及び前記注目領域の推定エッジ方向θと、S418の処理においてコントラスト強調が施された注目領域及び周辺領域内の画素値とを用いて、エッジパターンと推定エッジ方向θとに対応する算出式(図14、図15)を用いて、3×3画像ブロックに相当する画素値(p0〜p8)を生成する。さらに、高画質画像ブロック生成部442は、前記生成された画素値(p0〜p8)と推定エッジ方向θとに基づいて選択された参照画素(r0〜r13)を用いて、図17に示す算出式により、注目領域に対する拡大画像ブロックを生成する。   In step 420 (S420), the high-quality image block generation unit 442 performs contrast enhancement in the processing of S418 and the edge pattern of the attention area and the estimated edge direction θ of the attention area obtained by the image block feature value calculation section 430. Pixels corresponding to a 3 × 3 image block using a calculation formula (FIGS. 14 and 15) corresponding to the edge pattern and the estimated edge direction θ using the pixel values in the applied attention area and the surrounding area Generate values (p0-p8). Further, the high-quality image block generation unit 442 uses the reference pixels (r0 to r13) selected based on the generated pixel values (p0 to p8) and the estimated edge direction θ to perform the calculation illustrated in FIG. An enlarged image block for the attention area is generated by the equation.

ステップ422(S422)において、画像処理装置2は、ライン単位毎の画像データについてS404からS420までの処理が完了したか否かを判定し、処理が完了していないと判定された場合に、S404の処理に戻って次の画素ブロックに対する処理を行い、ライン単位毎の入力画像データについて処理が完了していると判定された場合に、S424の処理に移行する。   In step 422 (S422), the image processing apparatus 2 determines whether or not the processing from S404 to S420 has been completed for the image data for each line unit, and if it is determined that the processing has not been completed, S404. Returning to the process, the process for the next pixel block is performed, and if it is determined that the process is completed for the input image data for each line unit, the process proceeds to S424.

ステップ424(S424)において、高速拡大処理部650は、記憶部400に記憶されている入力画像データを画像毎又は数ライン毎に入力し、最近傍補間法により拡大処理を行う。なお、高速拡大処理部650は、高画質画像ブロック生成部442による拡大処理(S404〜S420までの処理)が終了した後に拡大処理を行っているが、高画質画像ブロック生成部442による拡大処理と並行して拡大処理を行ってもよいし、高画質画像ブロック生成部442による拡大処理の前に拡大処理を行ってもよい。   In step 424 (S424), the high-speed enlargement processing unit 650 inputs the input image data stored in the storage unit 400 for each image or every several lines, and performs enlargement processing by the nearest neighbor interpolation method. The high-speed enlargement processing unit 650 performs enlargement processing after the enlargement processing (processing from S404 to S420) by the high-quality image block generation unit 442 is completed. The enlargement process may be performed in parallel, or the enlargement process may be performed before the enlargement process by the high-quality image block generation unit 442.

ステップ426(S426)において、拡大画像統合部660は、高画質画像ブロック生成部442により生成された拡大画像と、高速拡大処理部650により拡大された拡大画像を統合する。
なお、拡大画像統合部660は、拡大画素の統合方法として、高画質画像ブロック生成部442により生成された拡大画像で単純に置き換える方法、又は、高画質画像ブロック生成部442により生成された拡大画像と高速拡大処理部650により生成された拡大画像との平均化処理を行う方法などを適用してもよい。すなわち、拡大画像統合部660は、高画質画像ブロック生成部442により生成された拡大画像を用いるのであれば、処理速度及び画質を勘案し、種々の統合方法を適用しうる。
In step 426 (S426), the enlarged image integration unit 660 integrates the enlarged image generated by the high-quality image block generation unit 442 and the enlarged image enlarged by the high-speed enlargement processing unit 650.
Note that the enlarged image integration unit 660 simply replaces with the enlarged image generated by the high-quality image block generation unit 442 as the integration method of the enlarged pixels, or the enlarged image generated by the high-quality image block generation unit 442. And a method of performing an averaging process on the enlarged image generated by the high-speed enlargement processing unit 650 may be applied. That is to say, if the enlarged image integration unit 660 uses the enlarged image generated by the high-quality image block generation unit 442, various integration methods can be applied in consideration of the processing speed and the image quality.

以上説明したように、本実施形態における画像処理装置2は、ライン単位毎の画像データが多階調を有する画像データか2値データであるかを判定し、多階調を有する画像データに対して、注目画素を含む所定の大きさの画像領域が基準値以上の階調を有する画像領域の特徴量を算出し、算出された特徴量と入力画像データの画素値とを用いて拡大画像を生成している。さらに、画像処理装置2は、入力画像データを階調数及び特徴量と関係なく、上記の特徴量に基づく拡大手法ではなく最近傍法に基づいて拡大して拡大画像を生成し、特徴量に基づく拡大手法により生成された拡大画像を、この拡大画像上の対応する位置に所定の方法で配置して、拡大された出力画像を得る。
このようにして、画像処理装置2は、画像合成時のマスク画像との境界部分における不具合を抑えることができる。また、本実施形態における画像処理装置2は、高画質拡大処理を特徴的な部分(特徴ブロック)にのみ適用するので、全体としての処理負荷を抑えることができる。さらに、画像処理装置2は、特徴的な部分について高画質拡大処理を適用するので、特徴的な部分の特徴量を保存して、ボケやジャギーなどの画質欠陥を抑制した高画質な拡大画像を得ることができる。
As described above, the image processing apparatus 2 in this embodiment determines whether the image data for each line unit is image data having multiple gradations or binary data, and for image data having multiple gradations. Calculating a feature amount of an image region in which an image region having a predetermined size including the target pixel has a gradation equal to or higher than a reference value, and using the calculated feature amount and the pixel value of the input image data, an enlarged image is calculated. Is generated. Further, the image processing device 2 generates an enlarged image by enlarging the input image data based on the nearest neighbor method, not the above-described enlargement method, regardless of the number of gradations and the feature amount, An enlarged image generated by the enlargement method based on the image is arranged at a corresponding position on the enlarged image by a predetermined method to obtain an enlarged output image.
In this way, the image processing apparatus 2 can suppress problems at the boundary with the mask image at the time of image composition. In addition, since the image processing apparatus 2 in the present embodiment applies the high-quality enlargement process only to the characteristic part (feature block), the overall processing load can be suppressed. Furthermore, since the image processing apparatus 2 applies the high-quality enlargement process to the characteristic part, the characteristic amount of the characteristic part is stored, and a high-quality enlarged image in which image quality defects such as blurring and jaggy are suppressed is stored. Obtainable.

画像データの構成を例示する図である。It is a figure which illustrates the composition of image data. ソース画像とマスク画像とを用いてマスク処理を行う方法を例示する図である。It is a figure which illustrates the method of performing a mask process using a source image and a mask image. 図1で示した構成要素画像であるソース画像およびマスク画像を、それぞれ線形補間法および最近傍法で拡大した具体例を示している。The specific example which expanded the source image and mask image which are the component image shown in FIG. 1 with the linear interpolation method and the nearest neighbor method, respectively is shown. 本発明にかかる画像処理方法が適応される画像処理装置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(図4)により実行され、本発明にかかる画像処理方法を実現する画像拡大プログラム4の機能構成を例示する図である。It is a figure which illustrates the functional structure of the image expansion program 4 which is performed by the control apparatus 20 (FIG. 4) and implement | achieves the image processing method concerning this invention. 画像ブロック判定部420による画像ブロック判定処理を示すフローチャート(S10)である。It is a flowchart (S10) which shows the image block determination process by the image block determination part 420. FIG. 注目領域及び周辺領域の具体例と、注目領域のエッジ方向の一例の説明図である。It is explanatory drawing of the example of an attention area and a peripheral area, and an example of the edge direction of an attention area. エッジ方向推定部434によるエッジ方向推定処理(S20)を示すフローチャートである。It is a flowchart which shows the edge direction estimation process (S20) by the edge direction estimation part 434. FIG. エッジ方向推定処理(S20)のS202の処理において選択される参照領域を例示する図である。It is a figure which illustrates the reference field selected in processing of S202 of edge direction presumption processing (S20). 図7に示した注目領域における推定エッジ方向の一例の説明図である。It is explanatory drawing of an example of the estimated edge direction in the attention area | region shown in FIG. エッジパターン選択部436により用いられるエッジパターンテーブルを例示する図である。It is a figure which illustrates the edge pattern table used by the edge pattern selection part 436. 図10に示した注目領域に対応するエッジパターンの選択方法を説明する図である。It is a figure explaining the selection method of the edge pattern corresponding to the attention area shown in FIG. 高画質画像ブロック生成部442により用いられる強調カーネル446(エッジ強調カーネル)を例示する図である。It is a figure which illustrates the emphasis kernel 446 (edge emphasis kernel) used by the high quality image block generation part 442. 高画質画像ブロック生成部442における拡大画像ブロックの生成処理の具体例の説明図である。It is explanatory drawing of the specific example of the production | generation process of the enlarged image block in the high quality image block production | generation part 442. FIG. (エッジパターン)−(推定エッジ方向)の組み合わせの場合に用いられる計算式の一例の説明図である。It is explanatory drawing of an example of the calculation formula used in the case of the combination of (edge pattern)-(estimated edge direction). 注目領域における推定エッジ方向に基づく参照画素r0〜r13の選択方法の説明図である。It is explanatory drawing of the selection method of the reference pixels r0-r13 based on the estimated edge direction in an attention area. 4×4画素の拡大画像ブロックの生成処理の具体例の説明図である。It is explanatory drawing of the specific example of a production | generation process of the enlarged image block of 4x4 pixel. 拡大画像ブロック生成部440で生成された4×4画素の拡大画像ブロックを配置する具体例の説明図である。It is explanatory drawing of the specific example which arrange | positions the 4x4 pixel enlarged image block produced | generated by the enlarged image block production | generation part 440. FIG. 第1の実施形態における画像処理装置2の全体動作を示すフローチャート(S30)である。It is a flowchart (S30) which shows the whole operation | movement of the image processing apparatus 2 in 1st Embodiment. 制御装置20(図4)により実行され、本発明にかかる画像処理方法を実現する画像拡大プログラム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. 4) and implement | achieves the image processing method concerning this invention. 高画質画像ブロック生成部442により生成された4×4画素の拡大画像ブロックと、高速拡大処理部650から出力された拡大画像とを統合する具体例の説明図である。It is explanatory drawing of the specific example which integrates the 4x4 pixel enlarged image block produced | generated by the high quality image block production | generation part 442, and the enlarged image output from the high-speed expansion process part 650. FIG. 第2の実施形態における画像処理装置2の全体動作を示すフローチャート(S40)である。It is a flowchart (S40) which shows the whole operation | movement of the image processing apparatus 2 in 2nd Embodiment.

符号の説明Explanation of symbols

2・・・画像処理装置
10・・・プリンタ装置
20・・・制御装置
202・・・CPU
204・・・メモリ
22・・・通信装置
24・・・記憶装置
26・・・UI装置
4・・・画像拡大プログラム
400・・・記憶部
410・・・画像ブロック設定部
420・・・画像ブロック判定部
422・・・階調数計数部
424・・・境界ブロック判別部
430・・・画像ブロック特徴量算出部
432・・・エッジ強度算出部
434・・・エッジ方向推定部
436・・・エッジパターン選択部
440・・・拡大画像ブロック生成部
442・・・高画質画像ブロック生成部
444・・・高速画像ブロック生成部
446a、446b・・・強調カーネル
450・・・画像ブロック配置部
2 ... Image processing device 10 ... Printer device 20 ... Control device 202 ... CPU
204 ... Memory 22 ... Communication device 24 ... Storage device 26 ... UI device 4 ... Image enlargement program 400 ... Storage unit 410 ... Image block setting unit 420 ... Image block Judgment unit 422 ... gradation number counting unit 424 ... boundary block discrimination unit 430 ... image block feature quantity calculation unit 432 ... edge strength calculation unit 434 ... edge direction estimation unit 436 ... edge Pattern selection unit 440 ... enlarged image block generation unit 442 ... high quality image block generation unit 444 ... high speed image block generation unit 446a, 446b ... enhanced kernel 450 ... image block arrangement unit

Claims (22)

入力画像の拡大処理を行う画像処理装置であって、
入力画像に含まれる注目画素について、この注目画素を含む所定の大きさの画像領域を、この画像領域の特徴に基づいて判別する領域判別手段と、
前記領域判別手段により判別された画像領域の特徴量を算出する領域特徴量算出手段と、
前記領域判別手段による判別された画像領域について、前記領域特徴量算出手段により算出された特徴量に基づいて選択された、複数の拡大手法のうち1つの拡大手法を適用して、画像領域に対応する拡大画像領域を生成する拡大画像領域生成手段と、
前記拡大画像領域生成手段により生成された拡大画像領域を出力画像に配置する画像配置手段と
を有する画像処理装置。
An image processing apparatus for enlarging an input image,
Area discriminating means for discriminating an image area of a predetermined size including the target pixel with respect to the target pixel included in the input image;
Area feature amount calculating means for calculating the feature amount of the image area determined by the area determining means;
The image area determined by the area determining means is applied to one of the plurality of enlargement techniques selected based on the feature amount calculated by the area feature value calculating means to correspond to the image area. An enlarged image area generating means for generating an enlarged image area to be
An image processing apparatus comprising: an image arrangement unit that arranges an enlarged image region generated by the enlarged image region generation unit in an output image.
前記領域判別手段は、画像領域内の階調数を計数し、この階調数と所定の基準値とを比較することにより画像領域を判別する
請求項1に記載の画像処理装置。
The image processing apparatus according to claim 1, wherein the region determination unit determines the image region by counting the number of gradations in the image region and comparing the number of gradations with a predetermined reference value.
前記領域判別手段は、所定値を有する画素が、画像領域内に含まれるか否かにより、画像領域を判別する
請求項1に記載の画像処理装置。
The image processing apparatus according to claim 1, wherein the area determination unit determines an image area based on whether or not a pixel having a predetermined value is included in the image area.
前記領域特徴量算出手段は、前記領域判別手段により判別された画像領域が、所定の条件を満たす場合に、この画像領域の特徴量を算出する
請求項1に記載の画像処理装置。
The image processing apparatus according to claim 1, wherein the area feature amount calculation unit calculates a feature amount of the image area when the image area determined by the area determination unit satisfies a predetermined condition.
前記領域特徴量算出手段は、画像領域内の各画素値に基づいて、この画像領域における階調変化量を算出し、この階調変化量を特徴量とする
請求項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 based on each pixel value in the image region, and uses the gradation change amount as a feature amount. .
前記領域特徴量算出手段は、画像領域内の各画素値に基づいて、この画像領域における階調変化方向を算出し、この階調変化方向を特徴量とする
請求項1に記載の画像処理装置。
The image processing apparatus according to claim 1, wherein the region feature amount calculating unit calculates a gradation change direction in the image region based on each pixel value in the image region, and uses the gradation change direction as a feature amount. .
前記領域特徴量算出手段は、画像領域内の各画素値に基づいて、この画像領域における階調変化を算出し、この階調変化が既定の画素値パターンに対応する場合に、この画素値パターンを特徴量として選択する
請求項1に記載の画像処理装置。
The area feature amount calculating means calculates a gradation change in the image area based on each pixel value in the image area, and when the gradation change corresponds to a predetermined pixel value pattern, the pixel value pattern The image processing device according to claim 1, wherein the image processing device is selected as a feature amount.
前記領域特徴量算出手段は、色空間における色成分それぞれについて特徴量を算出し、算出された特徴量に基づいて1つの色成分を選択し、この色成分について算出された特徴量を画像領域の特徴量とする
請求項1に記載の画像処理装置。
The area feature quantity calculating means calculates a feature quantity for each color component in the color space, selects one color component based on the calculated feature quantity, and calculates the feature quantity calculated for the color component in the image area. The image processing apparatus according to claim 1, wherein the image processing apparatus is a feature amount.
前記拡大画像領域生成手段は、前記領域特徴量算出手段により算出された特徴量が所定の条件を満たす画像領域に対して、画像領域の特徴量、画像領域の近傍領域の特徴量、及び近傍領域内の画素値に基づいて選択された、拡大画像領域を生成する拡大手法を適用して、拡大画像領域を生成する
請求項1に記載の画像処理装置。
The enlarged image area generation unit is configured to determine, for an image area in which the feature quantity calculated by the area feature quantity calculation unit satisfies a predetermined condition, a feature quantity of the image area, a feature quantity of a neighborhood area of the image area, and a neighborhood area The image processing apparatus according to claim 1, wherein an enlarged image region is generated by applying an enlargement method for generating an enlarged image region selected based on a pixel value in the image.
前記拡大画像領域生成手段は、エッジ強調処理を拡大率に応じて行って、画像領域内の画素値を補正し、補正された画素値を用いて拡大画像領域を生成する拡大手法を適用して、拡大画像領域を生成する
請求項1乃至9のいずれかに記載の画像処理装置。
The enlarged image area generation means applies an enlargement method that performs edge enhancement processing according to an enlargement ratio, corrects a pixel value in the image area, and generates an enlarged image area using the corrected pixel value. The image processing apparatus according to claim 1, wherein an enlarged image area is generated.
前記拡大画像領域生成手段は、前記領域特徴量算出手段により算出された階調変化の方向に応じて近傍領域内の画素値を選択し、選択された画素値を用いて拡大画像領域を生成する拡大手法を適用して、拡大画像領域を生成する
請求項1乃至9のいずれかに記載の画像処理装置。
The enlarged image region generation unit selects a pixel value in a neighboring region according to the direction of gradation change calculated by the region feature amount calculation unit, and generates an enlarged image region using the selected pixel value. The image processing apparatus according to claim 1, wherein an enlarged image region is generated by applying an enlargement method.
前記拡大画像領域生成手段は、前記領域特徴量算出手段により算出された特徴量に対応する既定の演算式を用いて拡大画像領域を生成する拡大手法を適用して、拡大画像領域を生成する
請求項1乃至9のいずれかに記載の画像処理装置。
The enlarged image region generation unit generates an enlarged image region by applying an enlargement method for generating an enlarged image region using a predetermined arithmetic expression corresponding to the feature amount calculated by the region feature amount calculation unit. Item 10. The image processing device according to any one of Items 1 to 9.
前記拡大画像領域生成手段は、前記領域判別手段により判別された画像領域が既定の条件を満たす場合、及び前記領域特徴量算出手段により算出された画像領域の特徴量が所定の条件を満たす場合に、画像領域に対して、複数の拡大手法のうち処理負荷の小さい拡大手法を適用して、拡大画像領域を生成する
請求項1に記載の画像処理装置。
The enlarged image region generation unit is configured when the image region determined by the region determination unit satisfies a predetermined condition and when the feature amount of the image region calculated by the region feature amount calculation unit satisfies a predetermined condition. The image processing apparatus according to claim 1, wherein an enlarged image region is generated by applying an enlargement method with a small processing load among a plurality of enlargement methods to the image region.
前記拡大画像領域生成手段は、処理負荷の小さい拡大手法として、少なくとも最近傍補間法に基づいた拡大手法を適用する
請求項13に記載の画像処理装置。
The image processing apparatus according to claim 13, wherein the enlarged image region generation unit applies an enlargement method based on at least a nearest neighbor interpolation method as an enlargement method with a small processing load.
前記画像配置手段は、前記領域特徴量算出手段により算出された特徴量が所定の条件を満たす場合に、前記拡大画像領域生成手段により生成される拡大画像領域を重なり合うように配置する
請求項1乃至14のいずれかに記載の画像処理装置。
The image arranging unit arranges the enlarged image regions generated by the enlarged image region generating unit so as to overlap when the feature amount calculated by the region feature amount calculating unit satisfies a predetermined condition. The image processing apparatus according to any one of 14.
前記画像配置手段は、前記拡大画像領域生成手段により生成される複数の拡大画像領域が互いに重なり合う場合に、これらの拡大画像領域の重複部分について、同一画素に対応する複数の画素値の平均値を算出する
請求項15に記載の画像処理装置。
When the plurality of enlarged image regions generated by the enlarged image region generating unit overlap each other, the image placement unit calculates an average value of a plurality of pixel values corresponding to the same pixel with respect to an overlapping portion of these enlarged image regions. The image processing apparatus according to claim 15.
前記画像配置手段は、前記領域特徴量算出手段により算出された特徴量が所定の条件を満たす場合に、前記拡大画像領域生成手段により生成される拡大画像領域を重なり合わないように配置する
請求項1乃至14のいずれかに記載の画像処理装置。
The image arranging unit arranges the enlarged image regions generated by the enlarged image region generating unit so as not to overlap when the feature amount calculated by the region feature amount calculating unit satisfies a predetermined condition. The image processing apparatus according to any one of 1 to 14.
入力画像の拡大処理を行う画像処理装置であって、
入力画像に含まれる注目画素について、この注目画素を含む所定の大きさの画像領域が、ソース部分であるか、又はマスク部分であるかを判別する判別手段と、
前記判別手段による判別結果に応じた拡大手法を適用して、前記判別手段により判別された画像領域に対応する拡大画像領域を生成する拡大画像領域生成手段と、
前記拡大画像領域生成手段により生成された複数の拡大画像領域の境界部分を補正する補正手段と
を有する画像処理装置。
An image processing apparatus for enlarging an input image,
A discriminating means for discriminating whether an image area of a predetermined size including the target pixel is a source part or a mask part for the target pixel included in the input image;
Applying an enlargement method according to the determination result by the determination unit, an enlarged image region generation unit that generates an enlarged image region corresponding to the image region determined by the determination unit;
An image processing apparatus comprising: correction means for correcting boundary portions of a plurality of enlarged image areas generated by the enlarged image area generating means.
入力画像の拡大処理を行う画像処理方法であって、
入力画像に含まれる注目画素について、この注目画素を含む所定の大きさの画像領域を、この画像領域の特徴に基づいて判別し、
前記判別された画像領域の特徴量を算出し、
前記判別された画像領域について、前記算出された特徴量に基づいて選択された、複数の拡大手法のうち1つの拡大手法を適用して、画像領域に対応する拡大画像領域を生成し、
前記生成された前記拡大画像領域を出力画像に配置する
画像処理方法。
An image processing method for enlarging an input image,
For a target pixel included in the input image, an image area having a predetermined size including the target pixel is determined based on the characteristics of the image area,
Calculating a feature amount of the determined image region;
Applying one enlargement method among a plurality of enlargement methods selected based on the calculated feature amount for the determined image region, and generating an enlarged image region corresponding to the image region,
An image processing method for arranging the generated enlarged image area in an output image.
入力画像の拡大処理を行う画像処理方法であって、
入力画像に含まれる注目画素について、この注目画素を含む所定の大きさの画像領域が、ソース部分であるか、又はマスク部分であるかを判別し、
前記判別結果に応じた拡大手法を適用して、前記判別された画像領域に対応する拡大画像領域を生成し、
前記生成された複数の拡大画像領域の境界部分を補正する
画像処理方法。
An image processing method for enlarging an input image,
For the target pixel included in the input image, it is determined whether the image area of a predetermined size including the target pixel is a source part or a mask part,
Applying an enlargement method according to the determination result to generate an enlarged image region corresponding to the determined image region,
An image processing method for correcting boundary portions of the generated plurality of enlarged image regions.
コンピュータを含み、入力画像の拡大処理を行う画像処理装置において、
入力画像に含まれる注目画素について、この注目画素を含む所定の大きさの画像領域を、この画像領域の特徴に基づいて判別する領域判別ステップと、
前記判別された画像領域の特徴量を算出する領域特徴量算出ステップと、
前記判別された画像領域について、前記算出された特徴量に基づいて選択された、複数の拡大手法のうち1つの拡大手法を適用して、画像領域に対応する拡大画像領域を生成する拡大画像領域生成ステップと、
前記生成された拡大画像領域を出力画像に配置する画像配置ステップと
を前記画像処理装置のコンピュータに実行させるプログラム。
In an image processing apparatus that includes a computer and performs an enlargement process of an input image,
An area determination step of determining an image area of a predetermined size including the target pixel for the target pixel included in the input image based on the characteristics of the image area;
A region feature amount calculating step for calculating a feature amount of the determined image region;
An enlarged image region that generates an enlarged image region corresponding to the image region by applying one of the plurality of enlargement methods selected based on the calculated feature amount for the determined image region Generation step;
A program that causes a computer of the image processing apparatus to execute an image placement step of placing the generated enlarged image region on an output image.
コンピュータを含み、入力画像の拡大処理を行う画像処理装置において、
入力画像に含まれる注目画素について、この注目画素を含む所定の大きさの画像領域が、ソース部分であるか、又はマスク部分であるかを判別する判別ステップと、
前記判別結果に応じた拡大手法を適用して、前記判別された画像領域に対応する拡大画像領域を生成する拡大画像領域生成ステップと、
前記生成された複数の拡大画像領域の境界部分を補正する補正ステップと
を前記画像処理装置のコンピュータに実行させるプログラム。
In an image processing apparatus that includes a computer and performs an enlargement process of an input image,
A determination step for determining whether the image area of a predetermined size including the target pixel is a source part or a mask part for the target pixel included in the input image;
Applying an enlargement method according to the determination result, an enlarged image region generation step for generating an enlarged image region corresponding to the determined image region;
A program that causes a computer of the image processing apparatus to execute a correction step of correcting boundary portions of the plurality of generated enlarged image regions.
JP2005066830A 2005-03-10 2005-03-10 Image processing device, image processing method, and its program Pending JP2006252107A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2005066830A JP2006252107A (en) 2005-03-10 2005-03-10 Image processing device, image processing method, and its program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2005066830A JP2006252107A (en) 2005-03-10 2005-03-10 Image processing device, image processing method, and its program

Publications (1)

Publication Number Publication Date
JP2006252107A true JP2006252107A (en) 2006-09-21

Family

ID=37092544

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2005066830A Pending JP2006252107A (en) 2005-03-10 2005-03-10 Image processing device, image processing method, and its program

Country Status (1)

Country Link
JP (1) JP2006252107A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018159052A1 (en) * 2017-03-01 2018-09-07 株式会社日立製作所 Image processing device, image processing method, and image processing program

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH1020422A (en) * 1996-07-09 1998-01-23 Fuji Photo Film Co Ltd Image constitution deciding device
JP2004180171A (en) * 2002-11-28 2004-06-24 Fuji Xerox Co Ltd Device, method and program for processing image, and storage medium

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH1020422A (en) * 1996-07-09 1998-01-23 Fuji Photo Film Co Ltd Image constitution deciding device
JP2004180171A (en) * 2002-11-28 2004-06-24 Fuji Xerox Co Ltd Device, method and program for processing image, and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018159052A1 (en) * 2017-03-01 2018-09-07 株式会社日立製作所 Image processing device, image processing method, and image processing program
JP2018147044A (en) * 2017-03-01 2018-09-20 株式会社日立製作所 Image processing device, image processing method, and image processing program

Similar Documents

Publication Publication Date Title
JP3915563B2 (en) Image processing apparatus and image processing program
US7227990B2 (en) Color image processing device and color image processing method
JPH0750752A (en) Method and device for converting picture density
US7885486B2 (en) Image processing system, method for processing image and computer readable medium
JP2007036560A (en) Image processor, image processing method, and its program
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
US8363263B2 (en) Image processing apparatus and image processing method
JP3026706B2 (en) Image processing device
JP4857975B2 (en) Image processing system and image processing program
JP4730525B2 (en) Image processing apparatus and program thereof
JP2006252108A (en) Image processing device, image processing method, and its program
JP2006252107A (en) Image processing device, image processing method, and its program
JP2006050481A (en) Image processing apparatus, image processing method and program thereof
JP4265363B2 (en) Image processing device
KR102470242B1 (en) Image processing device, image processing method and program
KR100587979B1 (en) Interpolation method for image enlargement based on edge and corner
US9584699B2 (en) Image processing apparatus, image processing method and computer-readable storage medium with improved character display
JP4517288B2 (en) Image processing apparatus, image processing method, and program thereof
JP5013243B2 (en) Image processing apparatus, image processing method, image processing program, and recording medium recording the same
JP3669081B2 (en) Image processing device
JP2006050480A (en) Image processing apparatus, image processing method and program thereof
JP3783815B2 (en) Image processing device
US6903745B2 (en) Image processing apparatus and image processing method
JP4517287B2 (en) Image processing apparatus, image processing method, and program thereof

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20080221

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20101110

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20101116

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20110113

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20110209