JP2006252107A - Image processing device, image processing method, and its program - Google Patents
Image processing device, image processing method, and its program Download PDFInfo
- 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
Links
Images
Landscapes
- Image Processing (AREA)
- Editing Of Facsimile Originals (AREA)
Abstract
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
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
In the technique described in
特許文献3に記載されている技術では、画像の性質を予めブロック毎の濃度ヒストグラムで測り、その結果に基づいて第1補間(パターンマッチング法又はニアレストネイバー法(NN法))と第2補間(キュービック・コンボリューション法あるいはM−キュービック法)の結果を重畳する。第1補間処理の1つであるパターンマッチング法では、予め定めた角度パターンに現画像ブロックから生成したパターン(2値化パターン)が一致した場合、現画像ブロックを含む参照ブロックを用いて所定のルールで注目画素に対する補間画素ブロックを生成する。しかし特許文献3においても、M−キュービック法との重畳であるのでジャギーの発生やノイズ成分が強調される問題がある。
In the technique described in
本発明は、上述した背景からなされたものであり、画像を高画質に拡大する画像処理装置を提供することを目的とする。 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
FIG. 4 is a diagram illustrating the hardware configuration of the
As illustrated in FIG. 4, the
The
[画像拡大プログラム]
図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
As illustrated in FIG. 5, the
Note that all or part of the
記憶部400は、画像データが拡大処理されるまで画像データを一時的に記憶し、解像度変換又は拡大処理された拡大画像データが出力装置(不図示)に出力されるまで一時的に記憶する。なお、画像データは、画像処理装置2により処理可能である画像フォーマット(例えば、BMP、TIFF、PNGなど)で記述されたデータであり、デジタルカメラ(不図示)又はスキャナ(不図示)などにより取り込まれた画像データ、又は、パーソナルコンピュータ(画像処理装置2など)等において作成又は編集等を行うアプリケーションプログラムにより作成された画像データ等である。拡大画像データ(拡大された後の画像データ)もまた、同様の画像フォーマットのデータである。
The
画像ブロック設定部410は、画像ブロック判定部420、画像ブロック特徴量算出部430及び拡大画像ブロック生成部440の処理において必要とされる既定の画像ブロックサイズをそれぞれ設定する。また、画像ブロック設定部410は、記憶部400により記憶されている入力画像データから、設定されたブロックサイズの画像ブロックを順次(例えばラスタスキャン順に)切り出し、このブロックサイズの画像ブロックそれぞれを、画像ブロック判定部420、画像ブロック特徴量算出部430及び拡大画像ブロック生成部440それぞれに対して出力する。
The image
画像ブロック判定部420は、画像ブロック設定部410から順次入力される画像ブロックの少なくとも一部(例えば中心部近傍の矩形部分)を注目領域とし、この注目領域とその周辺部とを含む画像ブロック内に、異なる画素値がいくつあるか(以下、これをブロック階調数と称する)を計数する。また、画像ブロック判定部420は、ある特定の値の画素が存在するかどうかを判別する。さらに、画像ブロック判定部420は、注目領域とその周辺部とを含む画像ブロックのブロック階調数、及び特定の値の画素を含むか否かの判別結果によって、それらの画像ブロックの切り分けを行う。
The image
画像ブロック特徴量算出部430は、画像ブロック判定部420においてブロック階調数が所定の閾値以上であって、かつ、ある特定の値の画素を含まない画像ブロックと判定されたブロックに関して、その画像ブロックの少なくとも一部である注目領域における画像特徴量を、注目領域又はこの注目領域の周辺部を含む画像ブロック内の各画素値に基づいて算出する。画像特徴量は、例えば、注目領域のエッジ強度(階調変化量)又はエッジ角度(階調変化の方向)である。しかし、画像特徴量はこれらに限られず、画像ブロック特徴量算出部430は、例えば注目領域の各画素値の平均値を算出し、この平均値に対する注目領域の各画素値のばらつきを表す値(例えば標準偏差又は分散)を画像特徴量として算出してもよい。
The image block feature
また、画像ブロック特徴量算出部430は、それぞれの注目領域について算出された画像特徴量と基準値とを比較し、注目領域の切り分けを行う。注目領域の切り分けにより、特徴のある画像ブロック(例えば、エッジを含んだ画像ブロックなど)と、特徴の少ない画像ブロック(例えば、画素値変化の少ない画像ブロックなど)とが切り分けられる。より具体的には、画像ブロック特徴量算出部430は、算出された画像特徴量が基準値以上である画像ブロックを特徴ブロックと判定し、算出された画像特徴量が基準値未満である画像ブロックを非特徴ブロックと判定する。本例では、画像ブロック特徴量算出部430は、画像特徴量の1つとして画像ブロックのエッジ強度(数値)を算出し、算出されたエッジ強度が基準値以上である画像ブロックを特徴ブロックであると判定し、エッジ強度が基準値未満である画像ブロックを非特徴ブロックであると判定する。なお、特徴ブロックの切り分けに用いられる特徴量は、エッジ強度に限られず、上述の標準偏差、分散又はその他の特徴量であってもよい。
Further, the image block feature
拡大画像ブロック生成部440は、複数の拡大手段、例えば高画質画像ブロック生成部442及び高速画像ブロック生成部444を有する。拡大画像ブロック生成部440は、画像ブロック判定部420による画像ブロックの判定結果、及び画像ブロック特徴量算出部430により算出された画像特徴量に従って、複数の拡大手段を切り替えて、注目領域に対応する拡大画像ブロックを生成する。例えば、画像ブロック判定部420により、ブロック階調数の計数とある特定の画素値を有する画素の有無とが判別される場合においては、ブロック階調数が所定の閾値以下である場合、又は、ある特定の画素値を有する画素が注目領域とその周辺部とを含む画像ブロック内に存在する場合には、拡大画像ブロック生成部440は、その注目領域に対して、拡大手段を高速画像ブロック生成部444による拡大処理に切り替えて、拡大画像ブロックを生成する。
The enlarged image
さらに、例えば、画像ブロック特徴量算出部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
画像ブロック配置部450は、拡大画像ブロック生成部440により生成された拡大画像ブロックを順次配置し、解像度変換あるいは拡大された拡大画像データを、記憶部400に対して出力する。なお、拡大画像ブロックの配置方法は後述されるが、例えば順次並べてゆく方法の他、拡大画像ブロックを重なり合うように順次配置して重畳させ、重なる画素値の総和を重なった数で割ることにより画素値を算出する方法も採用されることができる。
The image
[画像ブロック判定部]
画像ブロック判定部420を、より詳細に説明する。なお、注目領域が2×2画素サイズブロックであり、注目領域を含む周辺領域が4×4画素サイズブロックである場合を具体例として説明する。
階調数計数部422は、注目領域を含む周辺領域が、何階調で構成されているかを計数する。例えば4×4画素サイズブロックの場合、ブロック内すべての画素値が異なれば、ブロック階調数は16階調であり、ブロック内すべての画素値が同じ値ならば、ブロック階調数は1階調である。さらに、階調数計数部422は、計数されたブロック階調数と基準階調数(既定のブロック階調数Tr)との比較を行い、注目領域を含む周辺領域が、自然画像のような多階調画像ブロック、又は、パターン画像やマスク画像のような限定階調画像ブロックのいずれであるかを判別する。つまり、階調数計数部422は、計数されたブロック階調数が基準階調数Trより大きければ、多階調画像ブロックであると判別し、基準階調数Trより小さければ、限定階調画像ブロックと判別する。
なお、境界ブロック判別部424は、注目領域を含む周辺領域のブロック階調数が基準階調数Trよりも小さい場合は、この領域については処理を行わない。
[Image block determination unit]
The image
The gradation
Note that the boundary
境界ブロック判別部424は、階調数計数部422において注目領域を含む周辺領域のブロック階調数が基準階調数Trよりも大きいと判断された領域に対して、その領域が、前景画素と背景画素とが混在する境界ブロック(境界領域)であるのかどうかを判定する。つまり、境界ブロック判別部424は、画像ブロックが、ある特定な値を持つ画素が1つでも存在する画像ブロックであるか又は全く存在しない画像ブロックであるかを判別し、その判断結果を画像ブロック特徴量算出部430等に対して出力する。
The boundary
画像ブロック判定部420の全体動作を説明する。
図6は、画像ブロック判定部420による画像ブロック判定処理を示すフローチャート(S10)である。
図6に示すように、ステップ100(S100)において、階調数計数部422は、注目領域を含む周辺領域のブロック階調数を計数する。
The overall operation of the image
FIG. 6 is a flowchart (S10) showing an image block determination process by the image
As shown in FIG. 6, in step 100 (S100), the gradation
ステップ102(S102)において、階調数計数部422は、計数されたブロック階調数と所定の基準階調数Trとの比較を行い、この領域が多階調画像ブロックであるか限定階調画像ブロックであるかを判別する。
注目領域を含む周辺領域が多階調画像ブロックであると判別された場合は、境界ブロックであるかどうかの判定を行うべくステップ104(S104)の処理に移行し、注目領域を含む周辺領域が限定階調画像ブロックであると判別された場合は、ステップ106(S106)に処理を移行し、画像ブロック判定部420は、その判定結果を画像ブロック特徴量算出部430に出力する。
In step 102 (S102), the gradation
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
ステップ104(S104)において、境界ブロック判別部424は、注目領域を含む周辺領域に背景画素が存在するかどうかを検索し、この領域が境界ブロックであるかどうかを判別する。境界ブロック判別部424は、注目領域を含む周辺領域内に背景画素が1つでも存在した場合は、この領域を境界ブロックと判別し、背景画素が全く存在しない場合は、ステップ102(S102)において、階調数計数部422が判別したとおり多階調画像ブロックとして判別する。さらに、ステップ106(S106)に処理を移行し、画像ブロック判定部420は、その判定結果を画像ブロック特徴量算出部430に出力する。
このようにして、画像ブロック判定部420は、注目領域を含む周辺領域が、多階調画像ブロック、限定階調画像ブロック及び境界ブロックのいずれであるか判定する。
In step 104 (S104), the boundary
In this way, the image
[画像ブロック特徴量算出部]
画像ブロック特徴量算出部430を、より詳細に説明する。なお、前述の画像ブロック判定部420の説明と同様に、注目領域が2×2画素サイズブロックであり、注目領域を含む周辺領域が4×4画素サイズブロックである場合を具体例として説明する。
エッジ強度算出部432は、画像ブロック設定部410により切り出され、画像ブロック判定部420において多階調画像ブロックと判定された画像ブロックの中の注目領域のエッジ強度Gを、次の式(1)により算出する。
[Image block feature value calculation unit]
The image block feature
The edge
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
When the edge strength G of the attention area is smaller than the threshold value Th, the edge
エッジ方向推定部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
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
図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
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
Θ = 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
ステップ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
For example, when the edge angle calculated for the attention area is included in “direction 0”, the edge
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
In step 206 (S206), the edge
ステップ208(S208)において、エッジ方向推定部434は、角度参照数をインクリメントする。すなわち、エッジ方向推定部434は、参照領域について算出されたエッジ角度が適正なエッジ角度であると判断された場合にのみ、角度参照数をインクリメントする。
なお、角度参照数は、エッジ角度の参照数をカウントするための変数であり、注目領域ごとに「角度参照数1」に初期化される。
In step 208 (S208), the edge
The angle reference number is a variable for counting the reference number of the edge angle, and is initialized to “
ステップ210(S210)において、エッジ方向推定部434は、選択した全ての参照領域についてエッジ角度を算出したか否かを判断し、全ての参照領域についてエッジ角度が算出された場合には、S212の処理に移行し、これ以外の場合には、S204の処理に戻って次の参照領域についてエッジ角度を算出する。
ステップ212(S212)において、エッジ方向推定部434は、注目領域のエッジ角度と、適正なエッジ角度として判定された参照領域のエッジ角度との総和を計算し、算出されたエッジ角度の総和を角度参照数で割った平均エッジ角度を注目領域の推定エッジ方向とする。
In step 210 (S210), the edge
In step 212 (S212), the edge
なお、図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
なお、本実施形態では、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
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
FIG. 11 is a diagram illustrating an edge pattern table used by the edge
As illustrated in FIG. 11, the edge
The edge
In this example, as illustrated in FIG. 10, since the estimated edge direction with respect to the attention area is estimated to be “
エッジパターン選択部436は、注目領域の画素値に基づいて、エッジパターンの候補となった1つ以上のエッジパターンの中から、1つのエッジパターンを選択する。エッジパターンの具体的な選択方法について、図12を参照しながら説明する。
図12は、図11に示した注目領域に対応するエッジパターンの選択方法を説明する図である。
本例では、推定エッジ方向が「方向1」であったため、図12(A)に例示するように、エッジパターンの候補として、「パターン0」から「パターン3」までの4つのエッジパターンが選択されている。これらのエッジパターンは、図12(B)に例示するように、ビットパターンとして表現される。具体的には、エッジパターンは、白部分を0、それ以外を1としてビットパターン化され、「ビットパターン0」から「ビットパターン3」までのビットパターンが生成される。なお、これらのビットパターンは、図11に示すエッジパターンテーブルにビットテーブルとして予め登録されていてもよい。
The edge
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 “
エッジパターン選択部436は、注目領域に相当するビットパターンを判定する。具体的には、エッジパターン選択部436は、以下に示す式(4)に従い、注目領域中の平均画素値を計算し、注目領域内の各々の画素値から平均値を引き、その符号を以て注目領域の画素値パターンとする。
The edge
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
The edge
なお、エッジパターンは、図11に示したエッジパターンに限定されず、例えば、エッジパターン選択部436は、入力画像データの種類に応じて、エッジパターンテーブルを切り替えて、異なるエッジパターンを適用してもよい。また、エッジパターン選択部436は、各角度におけるエッジパターン候補数を増減させてもよい。
The edge pattern is not limited to the edge pattern shown in FIG. 11. For example, the edge
[拡大画像ブロック生成部]
拡大画像ブロック生成部440を、より詳細に説明する。
高画質画像ブロック生成部442は、画像ブロック特徴量算出部430において、特徴ブロックであると判定された注目領域に対して、画像ブロック特徴量算出部430で得られた注目領域に対するエッジパターン及び推定エッジ方向に基づいて、拡大画像ブロック生成処理を行う。詳細は後述する。
[Enlarged image block generator]
The enlarged image
The high-quality image
高速画像ブロック生成部444は、画像ブロック判定部420において、限定階調画像ブロック及び境界ブロックであると判別された注目領域、また画像ブロック特徴量算出部430において、非特徴ブロックであると判定された注目領域に対して、高画質画像ブロック生成部442における拡大画像ブロック生成処理より処理負荷が軽く、高速に処理できる最近傍補間によって拡大画像ブロック生成処理を行う。
The high-speed image
[高画質画像ブロック生成部]
高画質画像ブロック生成部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
First, the high-quality image
FIG. 13 is a diagram illustrating an enhancement kernel 446 (edge enhancement kernel) used by the high-quality image
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
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
次に、高画質画像ブロック生成部442は、画像ブロック特徴量算出部430により得られた注目領域に対するエッジパターン及び推定エッジ方向と、前述したようにコントラスト強調処理が行われた注目領域とその周辺領域との画素値とを用いて、注目領域に対する拡大画像ブロックを生成する。
Next, the high-quality image
図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
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
図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
以上説明したように、拡大画像ブロック生成部440が、画像ブロック判定部420による画像ブロックの判定結果、及び画像ブロック特徴量算出部430により算出された画像特徴量に従って、拡大処理を選択することにより、ジャギーを抑えた高画質の拡大処理、及び処理負荷が削減された拡大処理が可能となる。具体的には、高速画像ブロック生成部444が高画質画像ブロック生成部442よりも処理負荷の軽い拡大手法を用いることによって、拡大処理全体の処理負荷が軽減され、処理時間が短縮されて、高速な拡大処理が実現されることができる。
As described above, the enlarged image
[画像ブロック配置部]
画像ブロック配置部450を、より詳細に説明する。
画像ブロック配置部450は、拡大画像ブロック生成部440により生成された注目領域に対する拡大画像ブロックを、所定の方法により順次配置する。画像ブロック配置部450は、拡大画像ブロック生成部440により生成された複数の拡大画像ブロックの境界部分を補正して、補正手段を構成する。
図18は、拡大画像ブロック生成部440により生成された4×4画素の拡大画像ブロックを配置する具体例の説明図である。図18に示す例では、画像ブロック配置部450は、順次生成された拡大画像ブロック0及び拡大画像ブロック1を、オーバーラップさせるように配置する。オーバーラップする画素は、各々前画素値との平均をとるようにして配置される。また、オーバーラップする画素は、オーバーラップする画素の総和を計算し、前記画素値の総和をオーバーラップした数で割ることにより算出されてもよい。この場合、注目画素は、例えば1画素づつずらしながら選択され、拡大処理が行われる。あるいは、拡大画像ブロックは、オーバーラップさせずに並べられることもできる。この場合、注目領域は、重ならないように選択される。
[Image block placement section]
The image
The image
FIG. 18 is an explanatory diagram of a specific example in which the 4 × 4 pixel enlarged image blocks generated by the enlarged image
[全体動作]
画像処理装置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
FIG. 19 is a flowchart (S30) showing the overall operation of the
As shown in FIG. 19, in step 300 (S300), the image
ステップ302(S302)において、画像ブロック判定部420は、画像ブロック設定部410により切り出された画像ブロックの中の注目領域を含む周辺領域が、多階調画像ブロックであるのか、限定階調画像ブロックであるのか、又は、境界画像ブロックであるのかを判定する。具体的には、画像ブロック判定部420は、注目領域を含む周辺領域のブロック階調数を計数し、所定の基準階調数と比較して、周辺領域が多階調画像ブロックであるのか限定階調画像ブロックであるのか判別する。さらに、画像ブロック判定部420は、多階調画像ブロックであると判別された画像ブロックのうち、ある特定の画素値を持つ画素(背景画素)を含む画像ブロックを、境界画像ブロックと判別する。
In step 302 (S302), the image
ステップ304(S304)において、画像ブロック特徴量算出部430は、画像ブロック判定部420による画像ブロックの判別結果に基づいて、注目領域を含む周辺領域が多階調画像ブロックである画像ブロックを選択する。
画像処理装置2は、注目領域を含む周辺領域が多階調画像ブロックであると判定された場合に、この注目領域の画像特徴を保存する拡大処理を行うべくS306の処理に移行し、多階調画像ブロック以外(限定階調画像ブロック及び境界画像ブロック)であると判定された場合に、この注目領域に対して最近傍補間法による拡大画像ブロックの生成処理を行うべくS318の処理に移行する。
In step 304 (S304), the image block feature
When it is determined that the peripheral area including the attention area is a multi-tone image block, the
ステップ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
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
ステップ308(S308)において、画像ブロック特徴量算出部430は、注目領域のエッジ強度Gに基づいて、この注目領域が特徴ブロックであるか非特徴ブロックであるかを判定する。具体的には、画像ブロック特徴量算出部430は、算出されたエッジ強度Gが既定の閾値Th以上である場合(すなわち、注目領域内の階調変化量が大きい場合)に、この注目領域を特徴ブロックとし、算出されたエッジ強度Gが既定の閾値Th未満である場合(すなわち、注目領域内の階調変化量が小さい場合)に、この注目領域を非特徴ブロックとする。
画像処理装置2は、注目領域が特徴ブロックであると判定された場合に、この注目領域の画像特徴を保存するような拡大処理行うべくS310の処理に移行し、注目領域が非特徴ブロックであると判定された場合に、処理負荷の小さい拡大画像ブロックの生成処理を行うべくS318の処理に移行する。
In step 308 (S308), the image block feature
When it is determined that the attention area is a feature block, the
ステップ310(S310)において、画像ブロック特徴量算出部430は、注目領域(特徴ブロック)及びその注目領域を含む1以上の周辺領域の中の参照領域のエッジ角度Θを、式(3)を用いて計算する。
なお、gx、gyは、式(1)において各々算出される値である。画像ブロック特徴量算出部430は、算出された複数のエッジ角度Θから注目領域のエッジ方向θを推定する。例えば、画像ブロック特徴量算出部430は、得られた複数のエッジ角度Θの平均値を算出し、算出された平均値を推定エッジ方向θとする。
In step 310 (S310), the image block feature
Note that gx and gy are values calculated in the equation (1). The image block feature
ステップ312(S312)において、画像ブロック特徴量算出部430は、推定されたエッジ方向θ及び注目領域(特徴ブロック)の画素分布パターンを用いて、エッジパターンを選択する。エッジパターンは、エッジ方向及び画素分布パターンに応じて、予め用意されたパターンテーブル(図11)の中から選択される。
In step 312 (S312), the image block feature
ステップ314(S314)において、拡大画像ブロック生成部440の高画質画像ブロック生成部442は、拡大率に応じてサイズ及び重み付け係数が設定された強調カーネル446(図13)を用いて、画像ブロック設定部410により切り出された画像ブロックの中の注目領域(特徴ブロック)及びその周辺領域の画像データに対して、コントラスト強調処理を施す。
In step 314 (S314), the high-quality image
ステップ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
ステップ318(S318)において、拡大画像ブロック生成部440の高速画像ブロック生成部444は、画像ブロック判定部420により限定階調画像ブロックもしくは境界画像ブロックと判別された注目領域、又は、画像ブロック特徴量算出部430により非特徴ブロックと判断された注目領域に対する拡大画像ブロックを、最近傍補間法を用いて生成する。
In step 318 (S318), the high-speed image
ステップ320(S320)において、画像ブロック配置部450は、拡大画像ブロック生成部440により生成された拡大画像ブロックを順次配置する。
なお、配置する方法として、拡大画像ブロック生成部440により生成された拡大画像ブロックをオーバーラップするように順次配置する方法などが考えられる。オーバーラップする場合には、順次前画素値との平均を取るようにする方法や、オーバーラップする前画素値の総和をオーバーラップ数で割るという方法が考えられる。ただし、処理速度や画質を勘案し、配置する方法は、拡大画像ブロック生成部440における拡大画像ブロックを用いる方法であれば、どのような手法であってもよい。
In step 320 (S320), the image
In addition, as a method of arrangement, a method of sequentially arranging the enlarged image blocks generated by the enlarged image
ステップ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
In addition, the
[第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
As illustrated in FIG. 20, the
20 that are substantially the same as those shown in FIG. 5 are denoted by the same reference numerals.
スキャンライン判定部600は、記憶部400により記憶されている入力画像データから、ライン単位毎に入力画像データを順次切り出し、それらライン単位の画像データ中に異なる画素値がいくつあるか(以下ではこれをライン階調数と称する)を計数する。さらに、スキャンライン判定部600は、ライン階調数に従って、入力画像データから切り出したライン単位の画像データの切り分けを行う。
The scan
画像ブロック設定部410は、スキャンライン判定部600によりライン階調数が所定の基準値以上であると判定され、かつ、設定された画像ブロックサイズが切り出し可能である、数ライン単位の入力画像データから、設定されたブロックサイズの画像ブロックを順次(例えばラスタスキャン順に)切り出し、このブロックサイズの画像ブロックそれぞれを、画像ブロック判定部420、画像ブロック特徴量算出部430及び高画質画像ブロック生成部442に対してそれぞれ出力する。
The image
高画質画像ブロック生成部442は、画像ブロック特徴量算出部430により算出された画像特徴量を用いて、注目領域に対応する拡大画像ブロックを生成する。高画質画像ブロック生成部442における拡大処理は、注目領域に含まれる特徴を保持するような拡大手法を適用するのが望ましい。
また、高画質画像ブロック生成部442は、画像ブロック特徴量算出部430により算出された特徴量が基準値以上である画像ブロック(すなわち、特徴ブロック)についてのみ、拡大処理を行う。
The high-quality image
In addition, the high-quality image
高速拡大処理部650は、記憶部400により記憶されている入力画像データを拡大する。高速拡大処理部650は、高画質画像ブロック生成部442による拡大処理より処理負荷の小さい拡大アルゴリズムを適用する。具体的には、高速拡大処理部650は、例えば、最近傍補間拡大法を適用して入力画像データを拡大する。また、高速拡大処理部650は、画像ブロック毎の処理ではなく、入力画像単位又は入力画像の数ライン単位で拡大処理を行うことができる。
The high-speed
拡大画像統合部660は、高画質画像ブロック生成部442により拡大された拡大画像ブロックと、高速拡大処理部650により拡大された拡大画像とを統合する。より具体的には、拡大画像統合部660は、画像ブロック特徴量算出部430により算出された画像特徴量が基準値以上である画像ブロック(特徴ブロック)についてのみ、高画質画像ブロック生成部442により拡大された拡大画像を適用する。また、拡大画像統合部660は、算出された画像特徴量が基準値未満である画像ブロック(非特徴ブロック)、スキャンライン判定部600によりライン階調数が基準値以下と判定された画像データ、又は、画像ブロック判定部420によりブロック階調数が基準値以下であるかもしくはある特定の値の画素を含むと判定された画像ブロックについては、高速拡大処理部650により拡大された拡大画像を適用して、1つの拡大画像を生成する。
The enlarged
[スキャンライン判定部]
スキャンライン判定部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
The scan
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
[拡大画像統合部]
拡大画像統合部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
The enlarged
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
As illustrated in FIG. 21, the enlarged
When the corresponding positions on the enlarged image of the enlarged image blocks (enlarged image block 0 and
[全体動作]
画像処理装置2の全体動作(画像拡大処理)を説明する。
図22は、本実施形態における画像処理装置2の全体動作を示すフローチャート(S40)である。
図22に示すように、ステップ400(S400)において、スキャンライン判定部600は、記憶部400により記憶されている入力画像データから、ライン単位毎に入力画像データを順次切り出し、それらライン単位の画像データのライン階調数を計数する。
[Overall operation]
The overall operation (image enlargement process) of the
FIG. 22 is a flowchart (S40) showing the overall operation of the
As shown in FIG. 22, in step 400 (S400), the scan
ステップ402(S402)において、スキャンライン判定部600は、ライン単位毎の入力画像データが、多階調画像データであるのか、2値画像データであるのかを判定する。具体的には、ステップ400(S400)において計数されたライン階調数と、所定の基準階調数Tl(例えばTl=2)との比較により多階調画像データであるのか2値画像データであるのか判別する。
画像処理装置2は、ライン単位毎の画像データが2値画像データであると判定された場合に、画像データを高速に拡大処理行うべくS424の処理に移行し、ライン単位毎の画像データが多階調画像データであると判定された場合に、ブロック単位の拡大処理を行うべくS404の処理に移行する。
In step 402 (S402), the scan
When the
ステップ404(S404)において、画像ブロック設定部410は、画像ブロック判定部420、画像ブロック特徴量算出部430及び高画質画像ブロック生成部442により必要とされる既定の画像ブロックのサイズをそれぞれ設定し、スキャンライン判定部600により多階調画像データと判定されたライン単位の画像データから、設定されたブロックサイズの画像ブロックを順次(例えばラスタスキャン順に)切り出し、切り出された各画像ブロックを画像ブロック判定部420、画像ブロック特徴量算出部430及び高画質画像ブロック生成部442に対してそれぞれ出力する。
In step 404 (S404), the image
ステップ406(S406)において、画像ブロック判定部420は、画像ブロック設定部410により切り出された画像ブロックの中の注目領域を含む周辺領域が、多階調画像ブロックであるのか、限定階調画像ブロックであるのか、又は、境界画像ブロックであるのかを判定する。具体的には、画像ブロック判定部420は、注目領域を含む周辺領域のブロック階調数を計数し、所定の基準階調数との比較により、多階調画像ブロックであるのか限定階調画像ブロックであるのか判別する。さらに、画像ブロック判定部420は、多階調画像ブロックであると判別された画像ブロックのうち、ある特定の画素値を持つ画素(背景画素)を含むものを境界画像ブロックと判別する。
In step 406 (S406), the image
ステップ408(S408)において、画像ブロック特徴量算出部430は、画像ブロック判定部420による画像ブロックの判別結果に基づいて、注目領域を含む周辺領域が多階調画像ブロックである画像ブロックを選択する。
画像処理装置2は、多階調画像ブロックであると判定された場合に、この注目領域の画像特徴を保存する拡大処理を行うべくS410の処理に移行し、多階調画像ブロック以外(限定階調画像ブロック及び境界画像ブロック)であると判定された場合に、S404の処理に戻り、次の画像ブロックを処理する。
In step 408 (S408), the image block feature
When it is determined that the
ステップ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
ステップ412(S412)において、画像ブロック特徴量算出部430は、注目領域のエッジ強度Gに基づいて、この注目領域が特徴ブロックであるか非特徴ブロックであるかを判定する。具体的には、画像ブロック特徴量算出部430は、算出されたエッジ強度Gが既定の閾値Th以上である場合(すなわち、注目領域内の階調変化量が大きい場合)に、この注目領域を特徴ブロックとし、算出されたエッジ強度Gが既定の閾値Th未満である場合(すなわち、注目領域内の階調変化量が小さい場合)に、この注目領域を非特徴ブロックとする。
画像処理装置2は、注目領域が特徴ブロックであると判定された場合に、この注目領域の画像特徴を保存する拡大処理行うべくS414の処理に移行し、注目領域が非特徴ブロックであると判定された場合に、S404の処理に戻り、次の画像ブロックを処理する。
In step 412 (S412), the image block feature
When it is determined that the attention area is a feature block, the
ステップ414(S414)において、画像ブロック特徴量算出部430は、注目領域(特徴ブロック)及びその注目領域を含む1以上の周辺領域の中の参照領域のエッジ角度Θを、式(3)を用いて計算する。なお、gx、gyは、式(1)において各々算出される値である。画像ブロック特徴量算出部430は、算出された複数のエッジ角度Θから、注目領域のエッジ方向θを推定する。例えば、画像ブロック特徴量算出部430は、得られた複数のエッジ角度Θの平均値を算出し、算出された平均値を推定エッジ方向θとする。
In step 414 (S414), the image block feature
ステップ416(S416)において、画像ブロック特徴量算出部430は、推定されたエッジ方向θ及び注目領域(特徴ブロック)の画素分布パターンを用いて、エッジパターンを選択する。エッジパターンは、エッジ方向及び画素分布パターンに応じて、予め用意されたパターンテーブル(図11)の中から選択される。
In step 416 (S416), the image block feature
ステップ418(S418)において、高画質画像ブロック生成部442は、拡大率に応じてサイズ及び重み付け係数が設定された強調カーネル446(図13)を用いて、画像ブロック設定部410により切り出された画像ブロックの中の注目領域(特徴ブロック)及びその周辺領域の画像データに対して、コントラスト強調処理を施す。
In step 418 (S418), the high-quality image
ステップ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
ステップ422(S422)において、画像処理装置2は、ライン単位毎の画像データについてS404からS420までの処理が完了したか否かを判定し、処理が完了していないと判定された場合に、S404の処理に戻って次の画素ブロックに対する処理を行い、ライン単位毎の入力画像データについて処理が完了していると判定された場合に、S424の処理に移行する。
In step 422 (S422), the
ステップ424(S424)において、高速拡大処理部650は、記憶部400に記憶されている入力画像データを画像毎又は数ライン毎に入力し、最近傍補間法により拡大処理を行う。なお、高速拡大処理部650は、高画質画像ブロック生成部442による拡大処理(S404〜S420までの処理)が終了した後に拡大処理を行っているが、高画質画像ブロック生成部442による拡大処理と並行して拡大処理を行ってもよいし、高画質画像ブロック生成部442による拡大処理の前に拡大処理を行ってもよい。
In step 424 (S424), the high-speed
ステップ426(S426)において、拡大画像統合部660は、高画質画像ブロック生成部442により生成された拡大画像と、高速拡大処理部650により拡大された拡大画像を統合する。
なお、拡大画像統合部660は、拡大画素の統合方法として、高画質画像ブロック生成部442により生成された拡大画像で単純に置き換える方法、又は、高画質画像ブロック生成部442により生成された拡大画像と高速拡大処理部650により生成された拡大画像との平均化処理を行う方法などを適用してもよい。すなわち、拡大画像統合部660は、高画質画像ブロック生成部442により生成された拡大画像を用いるのであれば、処理速度及び画質を勘案し、種々の統合方法を適用しうる。
In step 426 (S426), the enlarged
Note that the enlarged
以上説明したように、本実施形態における画像処理装置2は、ライン単位毎の画像データが多階調を有する画像データか2値データであるかを判定し、多階調を有する画像データに対して、注目画素を含む所定の大きさの画像領域が基準値以上の階調を有する画像領域の特徴量を算出し、算出された特徴量と入力画像データの画素値とを用いて拡大画像を生成している。さらに、画像処理装置2は、入力画像データを階調数及び特徴量と関係なく、上記の特徴量に基づく拡大手法ではなく最近傍法に基づいて拡大して拡大画像を生成し、特徴量に基づく拡大手法により生成された拡大画像を、この拡大画像上の対応する位置に所定の方法で配置して、拡大された出力画像を得る。
このようにして、画像処理装置2は、画像合成時のマスク画像との境界部分における不具合を抑えることができる。また、本実施形態における画像処理装置2は、高画質拡大処理を特徴的な部分(特徴ブロック)にのみ適用するので、全体としての処理負荷を抑えることができる。さらに、画像処理装置2は、特徴的な部分について高画質拡大処理を適用するので、特徴的な部分の特徴量を保存して、ボケやジャギーなどの画質欠陥を抑制した高画質な拡大画像を得ることができる。
As described above, the
In this way, the
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 ...
204 ...
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に記載の画像処理装置。 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.
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)
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)
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 |
-
2005
- 2005-03-10 JP JP2005066830A patent/JP2006252107A/en active Pending
Patent Citations (2)
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)
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 |