JP2008017526A - Interpolation of image data - Google Patents
Interpolation of image data Download PDFInfo
- Publication number
- JP2008017526A JP2008017526A JP2007230677A JP2007230677A JP2008017526A JP 2008017526 A JP2008017526 A JP 2008017526A JP 2007230677 A JP2007230677 A JP 2007230677A JP 2007230677 A JP2007230677 A JP 2007230677A JP 2008017526 A JP2008017526 A JP 2008017526A
- Authority
- JP
- Japan
- Prior art keywords
- interpolation
- image data
- color
- tone
- pixel
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 claims abstract description 152
- 239000011159 matrix material Substances 0.000 claims abstract description 7
- 230000008569 process Effects 0.000 claims description 66
- 235000019646 color tone Nutrition 0.000 abstract description 13
- 235000012736 patent blue V Nutrition 0.000 description 16
- 230000008859 change Effects 0.000 description 10
- 238000006243 chemical reaction Methods 0.000 description 7
- 238000010586 diagram Methods 0.000 description 6
- 238000004364 calculation method Methods 0.000 description 5
- 238000012888 cubic function Methods 0.000 description 5
- 239000003086 colorant Substances 0.000 description 3
- 238000004891 communication Methods 0.000 description 3
- 238000009499 grossing Methods 0.000 description 3
- 239000000976 ink Substances 0.000 description 3
- 238000012886 linear function Methods 0.000 description 2
- 238000005070 sampling Methods 0.000 description 2
- 238000000926 separation method Methods 0.000 description 2
- 230000004913 activation Effects 0.000 description 1
- 230000008901 benefit Effects 0.000 description 1
- 239000000470 constituent Substances 0.000 description 1
- 238000007796 conventional method Methods 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 230000002265 prevention Effects 0.000 description 1
Images
Abstract
Description
本発明は、画像データの補間に関する。 The present invention relates to interpolation of image data .
コンピュータなどで画像を扱う際には、画像をドットマトリクス状の画素で表現し、各画素を階調値で表している。例えば、コンピュータの画面で水平方向に640ドット、垂直方向に480ドットの画素で写真やコンピュータグラフィックスを表示することが多い。 When an image is handled by a computer or the like, the image is expressed by a dot matrix pixel, and each pixel is expressed by a gradation value. For example, photographs and computer graphics are often displayed with pixels of 640 dots in the horizontal direction and 480 dots in the vertical direction on a computer screen.
一方、カラープリンタの性能向上がめざましく、そのドット密度は720dpiというように極めて高精度となっている。すると、640×480ドットの画像をドット単位で対応させて印刷させようとすると極めて小さくなってしまう。この場合、階調値も異なる上、解像度の意味合い自体が異なるのであるから、ドット間を補間して印刷用のデータに変換しなければならない。従来、このような場合にドットを補間する手法として、最近隣内挿法(ニアリストネイバ補間:以下、ニアリスト法と呼ぶ)や、3次たたみ込み内挿法(キュービックコンボリューション補間:以下、キュービック法と呼ぶ)などの手法が知られている。また、特許文献1にはドットを補間したときの縁部のスムージングを行うにあたり、予め縁部がスムーズとなるような拡大形態となるようにドットパターンを用意しておく技術が開示されている。
自然画の場合、一般的にはシャープな方が好まれる。特に、画素補間することによってシャープさが劣化してしまうのは好ましくない。従って、基本的にはシャープにする処理を実行している。しかしながら、必ずしも全てがシャープであればよいわけではなく、シャープにする修整をかけることによってざらついた感じが現れてしまい、好ましくない。上述した従来の手法においては、それぞれにシャープさへの影響度が異なり、ある画像データに対して補間処理を実行することにより、一律に特定のシャープさを調整することになる。従って、画像によっては好ましい場合もあるし好ましくない場合も生じてしまい、これを避けるには操作する側で補間処理を選択する必要があるという課題があった。また、補間処理を選択したとしても画像の部分部分によって望ましいシャープさが異なるため、結局は妥協しなければならなかった。 In the case of a natural picture, a sharper one is generally preferred. In particular, it is not preferable that the sharpness deteriorates due to pixel interpolation. Therefore, the sharpening process is basically executed. However, it is not always necessary that everything is sharp, and a rough feeling appears by applying sharpening, which is not preferable. In the above-described conventional method, the degree of influence on the sharpness is different, and specific sharpness is uniformly adjusted by executing interpolation processing on certain image data. Therefore, depending on the image, there are cases where it is preferable or not preferable, and in order to avoid this, there is a problem that it is necessary to select an interpolation process on the operation side. Even if the interpolation process is selected, the desired sharpness differs depending on the portion of the image, so that a compromise has to be made after all.
本発明は、上記課題にかんがみてなされたもので、画像の種類や被写体にかかわらずシャープさを良好にして補間することが可能な画像データの補間の提供を目的とする。 The present invention has been made in view of the above problems, and an object of the present invention is to provide interpolation of image data that can be interpolated with good sharpness regardless of the type of image or subject.
上記目的を達成するため、請求項1にかかる発明は、複数の画素で画像を表す画像データを取得する画像データ取得手段と、上記画像における所定の色領域のざらつきを防止するか否かを選択させる選択手段と、上記選択手段にて選択された結果、上記所定の色領域のざらつきを防止することが選択された場合は、上記所定の色領域を滑らかにする第1の画素補間処理を実行するとともに、上記所定の色領域以外の色領域をシャープにする第2の画素補間処理を実行し、上記所定の色領域のざらつきを防止することが選択されない場合は、上記所定の色領域および上記所定の色領域以外の色領域に対して上記第2の画素補間処理を実行する色調対応画素補間手段と、上記色調対応画素補間手段により画素補間処理が実行された画像データを出力する画像データ出力手段と、を有する構成としてある。 In order to achieve the above object, the invention according to claim 1 selects image data acquisition means for acquiring image data representing an image with a plurality of pixels, and whether to prevent roughness of a predetermined color area in the image. And a first pixel interpolation process for smoothing the predetermined color area is executed when it is selected as a result of the selection by the selection means to prevent roughness of the predetermined color area. In addition, when the second pixel interpolation process for sharpening the color area other than the predetermined color area is performed and it is not selected to prevent the predetermined color area from being roughened, the predetermined color area and the predetermined color area and color corresponding pixel interpolating means for executing the second pixel interpolation process on predetermined color region other than the color areas, leaving the image data pixel interpolation processing is executed by the tone corresponding pixel interpolation means An image data output means for, is configured to have a.
また、請求項2にかかる発明は、上記請求項1に記載の画像データ補間装置において、上記第1および第2の画素補間処理は、上記画像をシャープにする度合いが異なる複数の画素補間処理を複数回実行し、上記複数回実行する画素補間処理のそれぞれの補間倍率を調整して上記所定の色領域および上記所定の色領域以外の色領域を所望のシャープさとする構成としてある。According to a second aspect of the present invention, in the image data interpolation apparatus according to the first aspect, the first and second pixel interpolation processes include a plurality of pixel interpolation processes having different degrees of sharpening the image. This is executed a plurality of times, and the respective interpolation magnifications of the pixel interpolation processing executed a plurality of times are adjusted so that the predetermined color region and the color region other than the predetermined color region have a desired sharpness.
さらに、請求項3にかかる発明は、上記請求項1または請求項2に記載の画像データ補間装置において、上記第1および第2の画素補間処理は、パラメータによって上記画像をシャープにする度合いが異なる画素補間処理を実行し、上記パラメータを調整して上記所定の色領域および上記所定の色領域以外の色領域を所望のシャープさとする構成としてある。Furthermore, the invention according to claim 3 is the image data interpolation device according to
また、請求項4にかかる発明は、上記請求項1に記載の画像データ補間装置において、上記第1の画素補間処理は、共1次内挿法を用いた画素補間処理であり、上記第2の画素補間処理は、3次たたみ込み内挿法を用いた画素補間処理である構成としてある。According to a fourth aspect of the present invention, in the image data interpolating apparatus according to the first aspect, the first pixel interpolation process is a pixel interpolation process using a bilinear interpolation, and the second This pixel interpolation processing is configured as pixel interpolation processing using a cubic convolution interpolation method.
さらに、請求項5にかかる発明は、上記請求項1から請求項4のいずれか一項に記載の画像データ補間装置において、上記所定の色領域は肌色の色領域および空色の色領域の少なくともいずれかである構成としてある。Further, the invention according to claim 5 is the image data interpolation device according to any one of
また、請求項6にかかる発明は、上記請求項1から請求項5のいずれか一項に記載の画像データ補間装置において、上記色調対応画素補間手段は、補間画素を生成するときに用いる領域画素の色度および輝度の平均値に基づいて、上記所定の色領域か否かを判定する構成としてある。 According to a sixth aspect of the present invention, in the image data interpolating apparatus according to any one of the first to fifth aspects, the tone-corresponding pixel interpolating means uses a region pixel used when generating an interpolated pixel. Based on the average value of the chromaticity and luminance, it is determined whether or not it is the predetermined color region .
さらに、請求項7にかかる発明は、上記請求項1から請求項5のいずれか一項に記載の画像データ補間装置において、上記色調対応画素補間手段は、所定の注目画素の色度および輝度に基づいて、上記所定の色領域か否かを判定する構成としてある。Furthermore, the invention according to claim 7 is the image data interpolation device according to any one of
このような画像データ補間装置は単独で実施される場合もあるし、画像出力装置等の他の機器に組み込まれた状態で他の方法とともに実施されることもあるなど、発明の思想としてはこれに限らず、各種の態様を含むものである。従って、ソフトウェアであったりハードウェアであったりするなど、適宜、変更可能である。発明の思想の具現化例として画像データ補間方法を実施するソフトウェアとなる場合には、かかるソフトウェアを記録した記録媒体上においても当然に存在し、利用されるといわざるをえない。むろん、その記録媒体は、磁気記録媒体であってもよいし光磁気記録媒体であってもよいし、今後開発されるいかなる記録媒体においても全く同様に考えることができる。また、一次複製品、二次複製品などの複製段階については全く問う余地無く同等である。その他、供給方法として通信回線を利用して行なう場合でも本発明が利用されていることにはかわりない。さらに、一部がソフトウェアであって、一部がハードウェアで実現されている場合においても発明の思想において全く異なるものではなく、一部を記録媒体上に記憶しておいて必要に応じて適宜読み込まれるような形態のものとしてあってもよい。 Such an image data interpolating apparatus may be implemented independently, or may be implemented together with other methods in a state of being incorporated in another apparatus such as an image output apparatus. The present invention is not limited to this and includes various aspects. Therefore, it can be changed as appropriate, such as software or hardware. In the case of software that implements the image data interpolation method as an embodiment of the idea of the invention, it naturally exists on a recording medium that records such software, and it must be used. Of course, the recording medium may be a magnetic recording medium, a magneto-optical recording medium, or any recording medium that will be developed in the future. In addition, the duplication stages such as the primary duplication product and the secondary duplication product are equivalent without any question. In addition, even when the communication method is used as a supply method, the present invention is not changed. Further, even when a part is software and a part is realized by hardware, the idea of the invention is not completely different, and a part is stored on a recording medium and is appropriately changed as necessary. It may be in the form of being read.
以上説明したように本発明は、色調を参照して補間処理を選択することにより画像全体としてはシャープにしつつも部分に応じて適度にシャープさを調整し、良好な画像を得ることが可能な画像データ補間方法を提供することができる。 As described above, according to the present invention, it is possible to obtain a good image by appropriately adjusting the sharpness according to the portion while making the whole image sharp by selecting the interpolation processing with reference to the color tone. An image data interpolation method can be provided.
図1は、本発明の画像データ補間方法をフローチャートにより示しており、図2はこの画像データ補間方法を実行するコンピュータシステム10をブロック図により示している。 FIG. 1 is a flowchart showing the image data interpolation method of the present invention, and FIG. 2 is a block diagram showing a computer system 10 for executing the image data interpolation method.
本コンピュータシステム10は、画像入力デバイスとして、スキャナ11aとデジタルスチルカメラ11bとビデオカメラ11cとを備えており、コンピュータ本体12に接続されている。それぞれの入力デバイスは画像をドットマトリクス状の画素で表現した画像データを生成してコンピュータ本体12に出力可能となっており、ここで同画像データはRGBの三原色においてそれぞれ256階調表示することにより、約1670万色を表現可能となっている。
The computer system 10 includes a
コンピュータ本体12には、外部補助記憶装置としてのフレキシブルディスクドライブ13aとハードディスク13bとCD−ROMドライブ13cとが接続されており、ハードディスク13bにはシステム関連の主要プログラムが記録されており、フレキシブルディスクやCD−ROMなどから適宜必要なプログラムなどを読み込み可能となっている。また、コンピュータ本体12を外部のネットワークなどに接続するための通信デバイスとしてモデム14aが接続されており、外部のネットワークに同公衆通信回線を介して接続し、ソフトウェアやデータをダウンロードして導入可能となっている。この例ではモデム14aにて電話回線を介して外部にアクセスするようにしているが、LANアダプタを介してネットワークに対してアクセスする構成とすることも可能である。この他、コンピュータ本体12の操作用にキーボード15aやマウス15bも接続されている。
The computer
さらに、画像出力デバイスとして、ディスプレイ17aとカラープリンタ17bとを備えている。ディスプレイ17aについては水平方向に800画素と垂直方向に600画素の表示エリアを備えており、各画素毎に上述した1670万色の表示が可能となっている。むろん、この解像度は一例に過ぎず、640×480画素であったり、1024×768画素であるなど、適宜、変更可能である。
Furthermore, a
また、カラープリンタ17bはインクジェットプリンタであり、CMYKの四色の色インクを用いて記録媒体たる印刷用紙上にドットを付して画像を印刷可能となっている。画像密度は360×360DPIや720×720DPIといった高密度印刷が可能となっているが、諧調表限については色インクを付すか否かといった2階調表現となっている。一方、このような画像入力デバイスを使用して画像を入力しつつ、画像出力デバイスに表示あるいは出力するため、コンピュータ本体12内では所定のプログラムが実行されることになる。そのうち、基本プログラムとして稼働しているのはオペレーティングシステム(OS)12aであり、このオペレーティングシステム12aにはディスプレイ17aでの表示を行わせるディスプレイドライバ(DSP DRV)12bとカラープリンタ17bに印刷出力を行わせるプリンタドライバ(PRT DRV)12cが組み込まれている。これらのドライバ12b,12cの類はディスプレイ17aやカラープリンタ17bの機種に依存しており、それぞれの機種に応じてオペレーティングシステム12aに対して追加変更可能である。また、機種に依存して標準処理以上の付加機能を実現することもできるようになっている。すなわち、オペレーティングシステム12aという標準システム上で共通化した処理体系を維持しつつ、許容される範囲内での各種の追加的処理を実現できる。
The
この基本プログラムとしてのオペレーティングシステム12a上でアプリケーション12dが実行される。アプリケーション12dの処理内容は様々であり、操作デバイスとしてのキーボード15aやマウス15bの操作を監視し、操作された場合には各種の外部機器を適切に制御して対応する演算処理などを実行し、さらには、処理結果をディスプレイ17aに表示したり、カラープリンタ17bに出力したりすることになる。
The
かかるコンピュータシステム10では、画像入力デバイスであるスキャナ11aなどで画像データを取得し、アプリケーション12dによる所定の画像処理を実行した後、画像出力デバイスとしてのディスプレイ17aやカラープリンタ17bに表示出力することが可能である。この場合、単に画素同士の対応に着目すると、カラープリンタ17bにおける画素密度とスキャナ11aの画素密度が一致する場合にはスキャンした元画像の大きさと印刷される画像の大きさとが一致するが、両者にずれがあれば画像の大きさが異なることになる。スキャナ11aの場合はカラープリンタ17bの画素密度と近似するものも多いが、高画質化のために画素密度の向上が図られているカラープリンタ17bの画素密度の方が一般的な画像入力デバイスにおける画素密度よりも高密度であることが多い。特に、ディスプレイ17aの表示密度と比較すると各段に高密度であり、ディスプレイ17a上での表示を画素単位で一致させて印刷させるとなると極めて小さな画像になりかねない。
In such a computer system 10, image data is acquired by a
このため、オペレーティングシステム12aで基準となる画素密度を決定しつつ実際のデバイスごとの画素密度の相違を解消するために解像度変換が実施される。例えば、ディスプレイ17aの解像度が72DPIであるとするときに、オペレーティングシステム12aで360DPIを基準とするならば、ディスプレイドライバ12bが両者の間の解像度変換を実施する。また、同様の状況でカラープリンタ17bの解像度が720DPIであればプリンタドライバ12cが解像度変換を実施する。
Therefore, resolution conversion is performed in order to eliminate the difference in pixel density for each actual device while determining the reference pixel density in the
解像度変換は画像データにおける構成画素数を増やす処理にあたるので補間処理に該当し、これらのディスプレイドライバ12bやプリンタドライバ12cがその機能の一つとして補間処理を実施する。ここにおいて、ディスプレイドライバ12bやプリンタドライバ12cは上述した色調対応画素補間工程A2を実現する主体となるものであり、その入出力過程は画像データ取得工程A1や画像データ出力工程A3を実現し、以下に詳述するように色調に応じて解像度変換の手法を適宜変更して画質の向上を図るようにしている。なお、かかるディスプレイドライバ12bやプリンタドライバ12cは、ハードディスク13bに記憶されており、起動時にコンピュータ本体12にて読み込まれて稼働する。また、導入時にはCD−ROMであるとかフレキシブルディスクなどの媒体に記録されてインストールされる。従って、これらの媒体は画像データ補間プログラムを記録した媒体を構成する。
The resolution conversion corresponds to an interpolation process because it is a process of increasing the number of constituent pixels in the image data, and the
本実施形態においては、画像データ補間装置をコンピュータシステム10として実現しているが、必ずしもかかるコンピュータシステムを必要とするわけではなく、同様の画像データに対して補間処理が必要なシステムであればよい。例えば、図3に示すようにデジタルスチルカメラ11b1内に補間処理する画像データ補間装置を組み込み、補間処理した画像データを用いてディスプレイ17a1に表示させたりカラープリンタ17b1に印字させるようなシステムであっても良い。また、図4に示すように、コンピュータシステムを介することなく画像データを入力して印刷するカラープリンタ17b2においては、スキャナ11a2やデジタルスチルカメラ11b2あるいはモデム14a2等を介して入力される画像データについて自動的に解像度変換を行って印刷処理するように構成することも可能である。 In the present embodiment, the image data interpolation apparatus is realized as the computer system 10, but such a computer system is not necessarily required, and any system that requires interpolation processing for similar image data may be used. . For example, as shown in FIG. 3, an image data interpolation device for performing interpolation processing is incorporated in the digital still camera 11b1, and the interpolated image data is displayed on the display 17a1 or printed on the color printer 17b1. Also good. As shown in FIG. 4, in the color printer 17b2 that inputs and prints image data without using a computer system, the image data input through the scanner 11a2, the digital still camera 11b2, the modem 14a2, or the like is automatically processed. It is also possible to perform a print process after performing resolution conversion.
この他、図5に示すようなカラーファクシミリ装置18aや図6に示すようなカラーコピー装置18bといった画像データを扱う各種の装置においても当然に適用可能である。図1に示すフローチャートはあくまでも大概念での手順であり、実際のプログラムにおいては必ずしもこのように明確に分離されている必要はない。図7は、上述したプリンタドライバ12cが実行する解像度変換に関連するソフトウェアフローを示している。なお、ディスプレイドライバ12bにおいても同様に実行可能であるが、処理速度を優先させるなどの場合にはディスプレイドライバ12bにおいて実行する必要がない場合もある。
In addition, the present invention can naturally be applied to various apparatuses that handle image data such as a color facsimile apparatus 18a as shown in FIG. 5 and a
ステップ100は元画像データを入力する。アプリケーション12dにてスキャナ11aから画像を読み込み、所定の画像処理を行った後で印刷処理すると、所定の解像度の印刷データがオペレーティングシステム12aを介してプリンタドライバ12cに引き渡されるため、この引渡の段階が該当する。むろん、スキャナ11aにて画像を読み込むものであってもよく、いずれにしても当該処理が元画像データ取得工程A1に該当する。
Step 100 inputs original image data. When the
この読み込んだ画像データに基づいて全画像を走査し、その過程で画素補間処理を実行する。その意味で、ステップ105では注目ブロックの初期位置を設定する。そして、ステップ110以下では、図8に示すように画像の水平方向(width方向)に主走査しながら順次走査ラインを垂直方向(height方向)に移動させて副走査を実行していくことになる。画素補間処理はある一定の範囲の画素に基づいて画素を補間していくことになるため、本実施形態においては図9に示すような4×4画素の領域を1ブロックとし、一画素単位でこのブロックを移動させていく。この際の処理の対象ブロックを注目ブロックと呼んでいる。
All images are scanned based on the read image data, and pixel interpolation processing is executed in the process. In that sense, in
ステップ110ではこの注目ブロックを対象として処理を進行させていく上で、まず、当該注目ブロックに基づいて補間生成されていく画素の色度と輝度を計算する。輝度Yは、
Y=3.0R+0.59G+0.11B
として計算され、色度は、
r=R/(R+G+B)
b=B/(R+G+B)
として表される。ここで、注目領域は16画素から構成されており、この場合の上記計算は、全画素についての平均値を求めるようにしてもよいし、内周側の4画素についての平均値を求めるようにしても良いし、さらには内周側の4画素における特定の一画素について求めるようにしても良い。複数画素から平均値を求める手法は補間されて生成される画素の目安として妥当であるが、平均値を求める分だけの演算が増えることになる。これに対して、一画素を代表させたとしても補間される画素が大きくずれることは起こりにくいことを考えれば演算量を低減させるメリットがある。なお、複数画素から代表値を求める際には平均値に限られるものではなく、メジアンを代表値とするなど各種の演算手法を採用して構わない。
In
Y = 3.0R + 0.59G + 0.11B
And the chromaticity is calculated as
r = R / (R + G + B)
b = B / (R + G + B)
Represented as: Here, the attention area is composed of 16 pixels. In this case, the above calculation may be to obtain an average value for all the pixels, or to obtain an average value for the four pixels on the inner circumference side. Alternatively, it may be obtained for one specific pixel in the four pixels on the inner peripheral side. A method for obtaining an average value from a plurality of pixels is appropriate as a guideline for pixels generated by interpolation, but the number of operations increases by the amount for obtaining the average value. On the other hand, even if one pixel is represented, there is an advantage that the amount of calculation can be reduced considering that the pixel to be interpolated is unlikely to greatly deviate. Note that when obtaining a representative value from a plurality of pixels, it is not limited to the average value, and various calculation methods such as using the median as a representative value may be employed.
図10は人間の肌を表す画像データのサンプリング結果を示している。すなわち、左側の三つのデータは肌を構成する画素の(R,G,B)の値であり、その右方に(R+G+B)の合計(sum_rgb)を示し、その右方に上記計算に基づく色度r,bと輝度Yとを示している。また、図11は各画素についてrb空間にプロットした場合のグラフを示している。同図に示すように、RGBデータとしては統一性を見出しにくいようでも、色度としてグラフにプロットしてみると規則性があることが見出される。すなわち、人の肌であれば暗く写っているときも明るく写っているときもあり得るが、それにもかかわらず、図11に示すように直線状に分布しているのである。同図に示す直線状の分布は、
Y>128
0.33<r<0.51
|0.74r+b−0.57|<0.1
なる関係式が成立しているといえるから、上記のような注目ブロックの代表値についてこの関係式に当てはめて成立すれば当該注目ブロックは肌色領域に属するものといえる。この判定がステップ115の肌色領域か否かの判断に相当する。
FIG. 10 shows a sampling result of image data representing human skin. That is, the three data on the left are the values of (R, G, B) of the pixels constituting the skin, and the sum (sum_rgb) of (R + G + B) is shown on the right, and the color based on the above calculation is shown on the right. Degrees r, b and luminance Y are shown. FIG. 11 shows a graph when each pixel is plotted in the rb space. As shown in the figure, even if it is difficult to find unity as RGB data, it is found that there is regularity when plotted on a graph as chromaticity. In other words, human skin may appear dark or bright, but nevertheless, it is distributed linearly as shown in FIG. The linear distribution shown in the figure is
Y> 128
0.33 <r <0.51
| 0.74r + b−0.57 | <0.1
Therefore, if the representative value of the target block as described above is applied to this relational expression, it can be said that the target block belongs to the skin color region. This determination corresponds to the determination of whether or not the skin color region in
また、図12は同様にして青空を表す画像データのサンプリング結果を示しており、この場合は肌色の場合よりも変動幅が大きいことを考慮すると、
Y>128
0.17<r<0.30
|1.11r+b−0.70|<0.2
なる関係式が成立しているといえる。従って、ステップ115にて肌色領域でないと判断された場合にはステップ120にてこの関係式が成立しているか否かを判断する。
FIG. 12 similarly shows the sampling result of image data representing the blue sky. In this case, considering that the fluctuation range is larger than that of the skin color,
Y> 128
0.17 <r <0.30
| 1.11r + b−0.70 | <0.2
It can be said that the following relational expression holds. Therefore, if it is determined in
ステップ110〜ステップ120によって肌色や空色の領域であるか否かが分かるが、これらは補間結果があまりシャープでない方が好まれる画像の一例である。例えば、人の顔が大きく写っているときには画像がシャープになることによってざらつき感が生じることになり、好ましくない。また、青空についても多少の色の変化があるにしてもその変化をシャープにしてとげとげしく見せるよりも、却ってぼけてしまうくらいの方が好ましい。このような好みの要素に鑑みて、ステップ115とステップ120の分岐処理を経て一般的には画像をシャープにする補間処理を実行しつつ、肌色や空色の場合に限って画像をわずかにぼけた感じにする補間処理を実行することにしている。
Whether or not the region is a skin color or sky blue region can be determined by
前者の補間処理はMキュービック法を採用し、後者の補間処理はバイリニア法を採用している。ここで、これらの補間処理について説明する。補間処理のうちで最もシンプルなものはニアリスト法の補間処理であり、図14に示すように周囲の四つの格子点Pij,Pi+1j,Pij+1,Pi+1j+1と内挿したい点Puvとの距離を求め、もっとも近い格子点のデータをそのまま移行させる。これを一般式で表すと、
Puv=Pij
となる。ここで、i=[u+0.5]、j=[v+0.5]である。なお、[]はガウス記号で整数部分を取ることを示している。
The former interpolation process employs the M cubic method, and the latter interpolation process employs the bilinear method. Here, these interpolation processes will be described. The simplest of the interpolation processes is an interpolation process of the near list method. As shown in FIG. 14, the distance between the surrounding four grid points Pij, Pi + 1j, Pij + 1, Pi + 1j + 1 and the point Puv to be interpolated is obtained. The data of the nearest grid point is transferred as it is. This can be expressed as a general formula:
Puv = Pij
It becomes. Here, i = [u + 0.5] and j = [v + 0.5]. In addition, [] has shown taking an integer part with a Gauss symbol.
ニアリスト法においては、画像のエッジがそのまま保持される特徴を有するため、拡大すればジャギーが目立つもののエッジはエッジとして保持される。一方、写真のような自然画に適する一方で演算処理量が大きい補間処理が、キュービック法の補間処理である。キュービック法は図15に示すように、内挿したい点Puvを取り囲む四つの格子点のみならず、その一周り外周の格子点を含む計16の格子点のデータを利用する。3次たたみ込み関数を用いた一般式は次式のようになる。
このキュービック法では一方の格子点から他方の格子点へと近づくにつれて徐々に変化していき、その変化具合がいわゆる3次関数的になるという特徴を有している。キュービック法によれば3次関数的に表せる以上、そのカーブの形状を調整することによって補間結果の品質を左右することができる。その調整の一例として、
図16にはMキュービック法とキュービック法とにおける補間関数f(t)を示している。同図において、横軸に位置を示し、縦軸に補間関数を示している。t=0、t=1、t=2の位置に格子点が存在し、内挿点はt=0〜1の位置となる。キュービック法とMキュービック法とを比較すると、Mキュービック法の方が3次関数的なカーブがわずかに急峻となり、画像全体のイメージがよりシャープとなる。 FIG. 16 shows an interpolation function f (t) in the M cubic method and the cubic method. In the figure, the horizontal axis indicates the position, and the vertical axis indicates the interpolation function. There are lattice points at the positions of t = 0, t = 1, and t = 2, and the interpolation point is at the position of t = 0 to 1. When the cubic method and the M cubic method are compared, the cubic function curve is slightly steeper in the M cubic method, and the entire image becomes sharper.
次に、バイリニア法(共1次内挿法)の補間手法を説明すると、図16に示すように、一方の格子点から他方の格子点へと近づくにつれて徐々に変化していく点でキュービック法と共通するが、その変化が両側の格子点のデータだけに依存する一次関数的となっている。すなわち、図14に示すように内挿したい点Puvを取り囲む四つの格子点Pij,Pi+1j,Pij+1,Pi+1j+1で区画される領域を当該内挿点Puvで四つの区画に分割し、その面積比で対角位置のデータに重み付けする。これを式で表すと、
P={(i+1)−u}{(j+1)−v}Pij
+{(i+1)−u}{v−j}Pij+1
+{u−i }{(j+1)−v}Pi+1j
+{u−i }{v−j}Pi+1j+1
となる。なお、i=[u]、j=[v]である。
Next, the bilinear method (bilinear interpolation) interpolation method will be described. As shown in FIG. 16, the cubic method is such that it gradually changes from one lattice point to the other lattice point. The change is a linear function that depends only on the data of the grid points on both sides. That is, as shown in FIG. 14, an area defined by four grid points Pij, Pi + 1j, Pij + 1, and Pi + 1j + 1 surrounding a point Puv to be interpolated is divided into four sections at the interpolation point Puv, and the area ratio is Weight the corner position data. This can be expressed as an expression:
P = {(i + 1) -u} {(j + 1) -v} Pij
+ {(I + 1) -u} {v-j} Pij + 1
+ {U−i} {(j + 1) −v} Pi + 1j
+ {U−i} {v−j} Pi + 1j + 1
It becomes. Note that i = [u] and j = [v].
キュービック法とバイリニア法では、その変化状況が3次関数的であるか1次関数的であるかが異なり、画像としてみたときの差異は大きい。バイリニア法の場合、隣接する二点間(t=0〜1)で直線的に変化するだけであるので境界をスムージングすることになり、画面の印象はぼやけてしまう。すなわち、角部のスムージングと異なり、境界がスムージングされると、コンピュータグラフィックスでは、本来あるべき輪郭がなくなってしまうし、写真においてはピントが甘くなってしまう。 The cubic method and the bilinear method differ in whether the change state is a cubic function or a linear function, and the difference when viewed as an image is large. In the case of the bilinear method, since it changes only linearly between two adjacent points (t = 0 to 1), the boundary is smoothed, and the impression of the screen is blurred. That is, unlike the smoothing of the corners, when the boundary is smoothed, the outline that should be originally obtained is lost in computer graphics, and the focus is soft in the photograph.
このような差異があるので、上述したように画像をシャープにさせたい領域においてステップ125にてMキュービック法を採用した画素補間を実行するとともに、ざらつきを生じさせたくない領域においてステップ130にてバイリニア法を採用した画素補間を実行することにより、領域ごとにシャープさを変化させて好ましい画像を生じさせることになる。一つの注目ブロック内で生成すべき画素を補間したら、ステップ135にて全ブロックを終了したか判断し、終了していなければステップ140にて注目ブロックを次のブロックへ移動させるし、終了していればステップ145にて修整が完了した画像データを出力する。むろん、この出力は単にデータを所定のエリアに保存した状態で次の工程に受け渡すというだけのものであっても構わない。
Since there is such a difference, pixel interpolation using the M cubic method is performed in
ステップ105〜ステップ145の処理は、画像の色調に応じて適度なシャープさとなる補間処理を実行しているが、その前提としてステップ115とステップ120とで肌色の色調と空色の色調についてバイリニア法の補間処理を実行するように対応づけられているし、他の色調についてはステップ125にてMキュービック法の補間処理を実行するように対応づけられている。そして、この対応付けによってステップ125とステップ130とで対応すべき所定の補間処理を実行するので、かかる対応付け及び補間処理の実行が色調対応画素補間工程A2を構成しているといえる。
In
この例では、色調の判断がそのまま補間処理の選択に直結しているが、その実現手法はソフトウェアの変更によって簡単に可能となる。例えば、ステップ115やステップ120で色調を判断することによって対応関係のある補間処理を特定し、次のステップで特定結果を参照して対応する補間処理を実行するという処理を行うことにしても結果は変わらない。一方、同じ3次関数による補間処理であってもキュービック法とMキュービック法とでシャープさが異なるのは図16からも明らかである。すなわち、3次たたみ込み内挿法の画素補間であればパラメータの与え方によって補間曲線の特徴を適宜変更できるから、図17に示すようにしてS字カーブの形状を変化させてやればシャープにしたり滑らかにしたりということを設定できる。
In this example, the determination of the color tone is directly linked to the selection of the interpolation process, but the realization method can be easily achieved by changing the software. For example, it is possible to specify the interpolation process having the corresponding relationship by determining the color tone in
図18はこのようにパラメータを変化させて補間処理結果を制御する手法を示しており、ステップ215にて肌色の領域であると判断されると、ステップ223で肌色用のパラメータを、ステップ220にて空色の領域であると判断されるとステップ222で空色用のパラメータをセットすることとし、これら以外の時にステップ225にてデフォルトのパラメータをセットする。すなわち、ステップ225ではMキュービック法を実行するパラメータをセットし、ステップ222とステップ223ではキュービック法を実行するパラメータをセットした上、ステップ226ではパラメータに応じた3次たたみ込み内挿法で画素補間を実行している。
FIG. 18 shows a method of controlling the interpolation processing result by changing the parameters in this way. If it is determined in
この例では肌色領域であるか否か、あるいは空色領域であるか否かというように場合分けして補間処理を区別しているが、パラメータによってシャープさを徐々に変化させられるという場合には、肌色領域からの離れ具合いや空色領域からの離れ具合によってシャープさを増減させるということも可能である。また、シャープさを徐々に変化させうる手法は一つの補間処理に対してパラメータを与えるというものだけではなく、それぞれシャープさの異なる複数の補間処理を重ねて実行する場合に、それぞれの補間倍率の負担を変化させることも可能である。図19はこれを具体的に示しており、左方に元画像P1を示し、右方に最終的な拡大画像P2を示している。この場合の拡大率を(P2/P1)で表すものとし、補間処理はシャープさの異なる二つの補間処理を実行するものとする。この場合に第1段階の補間処理について拡大率α1,α2とするとともに、第2段階の補間処理について拡大率β1,β2とすると、
P2/P1=α1×β1=α2×β2
なる関係を維持してα1,α2,β1,β2の組み合わせを適宜変化させることができる。むろん、この補間倍率の負担割合の変化は画像におけるシャープさとなって影響を与えるから、肌色領域や空色領域の場合に滑らかになる補間処理の負担割合が大きくなるようにするし、そうでない色調の領域についてはシャープになる補間処理の負担割合が大きくなるようにすればよい。
In this example, the interpolation process is distinguished depending on whether it is a skin color area or a sky blue area, but if the sharpness can be gradually changed according to the parameters, the skin color It is also possible to increase or decrease the sharpness according to the degree of separation from the area or the degree of separation from the sky blue area. In addition, the method that can gradually change the sharpness is not only to give a parameter to one interpolation process, but when performing multiple interpolation processes with different sharpness, It is also possible to change the burden. FIG. 19 specifically shows this, showing the original image P1 on the left side and the final enlarged image P2 on the right side. The enlargement ratio in this case is represented by (P2 / P1), and the interpolation processing is performed by executing two interpolation processing with different sharpness. In this case, when the enlargement ratios α1 and α2 are set for the first stage interpolation process and the enlargement ratios β1 and β2 are set for the second stage interpolation process,
P2 / P1 = α1 × β1 = α2 × β2
Thus, the combination of α1, α2, β1, and β2 can be appropriately changed. Of course, this change in the interpolation magnification burden ratio will affect the sharpness of the image, so the smoother interpolation processing burden ratio should be increased in the case of flesh-colored areas and sky-blue areas. What is necessary is just to make it the burden ratio of the interpolation process which becomes sharp about an area | region large.
図20においてステップ321〜ステップ323では、このような観点から第1段階の補間処理であるMキュービック法の補間倍率と第2段階の補間処理であるバイリニア法の補間倍率とを決定しておき、その決定結果を参照してステップ327ではMキュービック法で第一段階の補間処理を実行し、ステップ328ではバイリニア法で残りの第二段階の補間処理を実行する。このようにして最終的な補間倍率は一定としつつも、その過程の負担割合を変化させることによって画質の調整を図ることができる。
In
ところで、この例では肌色領域や空色領域については必ず滑らかにさせるような指示を与えているが、空色の部分はあるが青空ではなく特定の物の色である場合も考えられるし、肌色ではあるが人の肌ではなく特定の他の物の色である場合も考えられる。そして、この場合には必ず滑らかにする補間処理を実行してしまうというのでは融通性に欠けるともいえる。従って、図7に示すステップ107にて、図21に示すような設定画面を利用して、ユーザーに対応関係を選択させるようにしても良い。この設定画面では、マウス15bを操作して肌色のざらつきを防止するか否かを選択したり、空色のざらつきを防止するか否かを選択する。そして、図22に示すようにステップ115にて肌色領域であるか判断する前にステップ114にて上記オプションが選択されているか否かを参照し、肌色のざらつきを防止するように選択しているときにステップ115の判断を実行する。また、同様にしてステップ120にて空色領域であるか判断する前にステップ117にて上記オプションが選択されているか否かを参照し、空色のざらつきを防止するように選択しているときにステップ120の判断を実行する。
By the way, in this example, the skin color area and sky blue area are always instructed to be smooth. However, although there is a sky blue part, it may be the color of a specific object instead of the blue sky. May be the color of certain other objects rather than human skin. In this case, it can be said that the smooth interpolation process is not flexible. Accordingly, in
むろん、これら以外にも別の色調についてざらつき防止を選択できるようにしておくことも可能であるし、また、滑らかさやシャープさの程度を選択できるようにしても良い。このように、カラーの自然画像をドットマトリクス状の画素で表現した画像データを補間する際に、画素を補間生成するために参照する領域である注目ブロックについて色度の代表値を取得し(ステップ110)、当該色度から肌色領域や空色領域であると判断すると(ステップ115,120)、バイリニア法で画素補間する(ステップ130)ので滑らかに拡大されるし、そうでない色調の領域についてはMキュービック法で画素補間する(ステップ125)のでシャープに拡大されることになり、画像全体としてはシャープさを維持しつつ人の肌や青空の部分がざらついたりすることを防止できる。
Needless to say, it is possible to make it possible to select the prevention of roughness for other color tones, and it is also possible to select the degree of smoothness or sharpness. In this way, when interpolating image data representing a color natural image with pixels in a dot matrix, a representative value of chromaticity is acquired for a target block which is an area to be referred to in order to interpolate and generate pixels (steps). 110) If it is determined from the chromaticity that the region is a skin color region or a sky blue region (
10…コンピュータシステム
11a…スキャナ
11a2…スキャナ
11b…デジタルスチルカメラ
11b1…デジタルスチルカメラ
11b2…デジタルスチルカメラ
11c…ビデオカメラ
12…コンピュータ本体
12a…オペレーティングシステム
12b…ディスプレイドライバ
12b…ドライバ
12c…プリンタドライバ
12d…アプリケーション
13a…フレキシブルディスクドライブ
13b…ハードディスク
13c…CD−ROMドライブ
14a…モデム
14a2…モデム
15a…キーボード
15b…マウス
17a…ディスプレイ
17a1…ディスプレイ
17b…カラープリンタ
17b1…カラープリンタ
17b2…カラープリンタ
18a…カラーファクシミリ装置
18b…カラーコピー装置
DESCRIPTION OF SYMBOLS 10 ...
Claims (12)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2007230677A JP2008017526A (en) | 2007-09-05 | 2007-09-05 | Interpolation of image data |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2007230677A JP2008017526A (en) | 2007-09-05 | 2007-09-05 | Interpolation of image data |
Related Parent Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP31645698A Division JP4081628B2 (en) | 1998-11-06 | 1998-11-06 | Image data interpolation method, image data interpolation device, and computer readable recording medium recording image data interpolation program |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2008017526A true JP2008017526A (en) | 2008-01-24 |
Family
ID=39074037
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2007230677A Pending JP2008017526A (en) | 2007-09-05 | 2007-09-05 | Interpolation of image data |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2008017526A (en) |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH07107314A (en) * | 1993-10-08 | 1995-04-21 | Canon Inc | Picture processing method and device |
JPH07327131A (en) * | 1994-06-02 | 1995-12-12 | Canon Inc | Image processor |
JPH0950516A (en) * | 1995-08-09 | 1997-02-18 | Fuji Photo Film Co Ltd | Method and device for interpolation operation of picture data |
JPH0993426A (en) * | 1995-07-13 | 1997-04-04 | Fuji Photo Film Co Ltd | Interpolation arithmetic operation method for image data and device using the method |
JPH09238261A (en) * | 1996-02-28 | 1997-09-09 | Minolta Co Ltd | Image forming device |
JPH1065928A (en) * | 1996-08-16 | 1998-03-06 | Fuji Photo Film Co Ltd | Image processing method and image processing unit |
-
2007
- 2007-09-05 JP JP2007230677A patent/JP2008017526A/en active Pending
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH07107314A (en) * | 1993-10-08 | 1995-04-21 | Canon Inc | Picture processing method and device |
JPH07327131A (en) * | 1994-06-02 | 1995-12-12 | Canon Inc | Image processor |
JPH0993426A (en) * | 1995-07-13 | 1997-04-04 | Fuji Photo Film Co Ltd | Interpolation arithmetic operation method for image data and device using the method |
JPH0950516A (en) * | 1995-08-09 | 1997-02-18 | Fuji Photo Film Co Ltd | Method and device for interpolation operation of picture data |
JPH09238261A (en) * | 1996-02-28 | 1997-09-09 | Minolta Co Ltd | Image forming device |
JPH1065928A (en) * | 1996-08-16 | 1998-03-06 | Fuji Photo Film Co Ltd | Image processing method and image processing unit |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP4924264B2 (en) | Image processing apparatus, image processing method, and computer program | |
EP0949585B1 (en) | Apparatus and method for image data interpolation | |
JP2001298631A (en) | Recording medium with image processing control program recorded therein and method and device for image processing | |
JP2002016818A (en) | Color correction method and device, and recording medium | |
JP3075269B2 (en) | Image data interpolation method, image data interpolation device, and medium recording image data interpolation program | |
JP2002016939A (en) | Method and apparatus for processing image as well as recording medium | |
JP2002016874A (en) | Method and apparatus for processing image as well as recording medium for recording program therefor | |
JP4877074B2 (en) | Image processing apparatus, image processing method, and computer program | |
US20050200923A1 (en) | Image generation for editing and generating images by processing graphic data forming images | |
JP4058583B2 (en) | PRINT CONTROL DEVICE, PRINT CONTROL METHOD, AND MEDIUM RECORDING PRINT CONTROL PROGRAM | |
JP2001169098A (en) | Medium recording output picture data correction program, output picture data correction method, output picture data correction device, medium recording picture data reduction program, picture data reduction method, picture data reduction device, medium recording picture data correction program and method and device for correcting picture data | |
JP4081628B2 (en) | Image data interpolation method, image data interpolation device, and computer readable recording medium recording image data interpolation program | |
JP4019239B2 (en) | Image sharpening method and image sharpening device | |
JP2008017526A (en) | Interpolation of image data | |
JP2002015314A (en) | Image outputting method, device, and storage medium | |
JP3201338B2 (en) | Image data interpolation apparatus, image data interpolation method, and medium recording image data interpolation program | |
JP2000285232A5 (en) | ||
JPH11298721A (en) | Image data interpolation device, image data interpolation method therefor and medium with image data interpolation program recorded therein | |
JP2000076430A5 (en) | ||
JP4009805B2 (en) | Image data interpolation apparatus, image data interpolation method, and medium on which image data interpolation program is recorded | |
JP2009081631A (en) | Image processing apparatus, method and program | |
JP3981785B2 (en) | Medium storing image sharpening program, image sharpening device, and image sharpening method | |
JP2008059307A (en) | Image processor and image processing program | |
JP2962310B1 (en) | Image processing apparatus, image processing method, and medium recording image processing program | |
JP2000076430A (en) | Image data interpolating device, its method, and medium having recorded image data interpolating program thereon |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20090826 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20091026 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20091118 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20100114 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20100316 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20100517 |
|
A02 | Decision of refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A02 Effective date: 20100817 |