JP2009157449A - Image processing system, image processing method, and program for image processing - Google Patents
Image processing system, image processing method, and program for image processing Download PDFInfo
- Publication number
- JP2009157449A JP2009157449A JP2007332030A JP2007332030A JP2009157449A JP 2009157449 A JP2009157449 A JP 2009157449A JP 2007332030 A JP2007332030 A JP 2007332030A JP 2007332030 A JP2007332030 A JP 2007332030A JP 2009157449 A JP2009157449 A JP 2009157449A
- Authority
- JP
- Japan
- Prior art keywords
- pixel
- image
- class
- color
- block
- 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
- 238000003672 processing method Methods 0.000 title claims description 9
- 239000003086 colorant Substances 0.000 claims abstract description 53
- 239000000284 extract Substances 0.000 claims abstract description 21
- 238000004364 calculation method Methods 0.000 claims description 87
- 238000000605 extraction Methods 0.000 claims description 83
- 238000000034 method Methods 0.000 claims description 51
- 238000007906 compression Methods 0.000 claims description 26
- 230000006835 compression Effects 0.000 claims description 26
- 238000003708 edge detection Methods 0.000 claims description 15
- 238000005070 sampling Methods 0.000 claims description 13
- 230000005540 biological transmission Effects 0.000 claims description 11
- 239000000203 mixture Substances 0.000 abstract description 3
- 230000004048 modification Effects 0.000 description 49
- 238000012986 modification Methods 0.000 description 49
- 238000010586 diagram Methods 0.000 description 28
- 238000001514 detection method Methods 0.000 description 10
- 238000002955 isolation Methods 0.000 description 7
- 239000000470 constituent Substances 0.000 description 4
- 230000006837 decompression Effects 0.000 description 4
- 238000002156 mixing Methods 0.000 description 4
- 238000004458 analytical method Methods 0.000 description 2
- 230000006866 deterioration Effects 0.000 description 2
- 238000012886 linear function Methods 0.000 description 2
- 239000010749 BS 2869 Class C1 Substances 0.000 description 1
- 239000010750 BS 2869 Class C2 Substances 0.000 description 1
- 230000015556 catabolic process Effects 0.000 description 1
- 238000013144 data compression Methods 0.000 description 1
- 238000006731 degradation reaction Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000001914 filtration Methods 0.000 description 1
- 238000010191 image analysis Methods 0.000 description 1
Images
Landscapes
- Image Processing (AREA)
- Facsimile Image Signal Circuits (AREA)
- Color Image Communication Systems (AREA)
- Compression Of Band Width Or Redundancy In Fax (AREA)
Abstract
Description
本発明は、画像処理システム、画像処理方法、画像処理用プログラム、画像圧縮装置、画像伸張装置および画像伝送システムに関し、特に拡大された画像の品質を向上させる画像処理システム、画像処理方法、画像処理用プログラムと、その画像処理システムを適用した画像圧縮装置、画像伸張装置および画像伝送システムに関する。 The present invention relates to an image processing system, an image processing method, an image processing program, an image compression device, an image expansion device, and an image transmission system, and more particularly to an image processing system, an image processing method, and an image processing for improving the quality of an enlarged image. And an image compression apparatus, an image expansion apparatus and an image transmission system to which the image processing system is applied.
画像の拡大方法が種々提案されている。特に多く見られる方法は、画像のアップサンプリング後(あるいはアップリンクと同時に)、画像のフィルタ処理を行う方法である。また、増加させる画素の輝度を補間により求めることで画像を拡大する方法として、バイリニア補間やバイキュービック補間が知られている(例えば、非特許文献1参照)。図27は、低解像度画像を倍率縦横各2倍にアップサンプリングした画像の例である。図28は、拡大画像における画素の輝度をバイキュービック補間により補間した画像の例である。 Various methods for enlarging images have been proposed. A particularly common method is a method of performing image filtering after image upsampling (or simultaneously with uplink). Bilinear interpolation and bicubic interpolation are known as methods for enlarging an image by obtaining the luminance of the pixel to be increased by interpolation (see, for example, Non-Patent Document 1). FIG. 27 is an example of an image obtained by up-sampling a low-resolution image at a magnification of 2 times in the vertical and horizontal directions. FIG. 28 is an example of an image obtained by interpolating the luminance of the pixels in the enlarged image by bicubic interpolation.
これらの手法では、拡大後の画像がぼける傾向がある。これは、画像拡大に伴い画像の高周波成分が失われるためである。そのため、失われた高周波成分を補い、本来の輪郭を復元するために、輪郭強調処理を適用するのが一般的である。 These methods tend to blur the enlarged image. This is because high-frequency components of the image are lost as the image is enlarged. Therefore, it is common to apply contour enhancement processing to compensate for the lost high-frequency component and restore the original contour.
輪郭強調のための画像処理装置の一例が、特許文献1に記載されている。図29は、特許文献1に記載された画像処理装置を示すブロック図である。図29に示すように、特許文献1に記載された画像処理装置は、輪郭成分抽出回路901、信号レベル検出回路902、および輪郭検出回路904からなる解析回路920と、パラメータ算出回路903と、輪郭補正回路905とを備えている。
An example of an image processing apparatus for contour enhancement is described in
解析回路920には、映像信号Siと入力源判別信号Sselが入力される。入力源判別信号Sselは、入力映像信号Siの種別を示す信号であって、例えば入力映像信号SiがHDTV(High Definition Television)方式に基づく映像信号である場合にはHレベル(ハイレベル)となり、NTSC(National Television System Committee)方式に基づく映像信号である場合にはLレベル(ローレベル)となる。 The analysis circuit 920 receives the video signal Si and the input source determination signal Ssel. The input source determination signal Ssel is a signal indicating the type of the input video signal Si. For example, when the input video signal Si is a video signal based on the HDTV (High Definition Television) system, the input source determination signal Ssel is H level (high level). In the case of a video signal based on the NTSC (National Television System Committee) system, it becomes L level (low level).
上記画像処理装置において、輪郭成分抽出回路901は、入力源判別信号Sselに応じて、入力映像信号Siの示す画像における輪郭に相当する成分である輪郭成分(「エッジ成分」または「輪郭信号」とも呼ばれる)Saを入力映像信号Siから抽出する。輪郭成分抽出回路901は、高域通過フィルタで構成され、例えば2次微分フィルタを用いて入力映像信号Siの2次微分成分を抽出して輪郭成分Saとして出力する。
In the image processing apparatus, the contour
信号レベル検出回路902は、入力映像信号Siの信号レベルLbを検出し、その信号レベルLbを信号値とする信号を出力する。
The signal
パラメータ算出回路903は、外部から第1のパラメータαiと第2のパラメータβiと第3のパラメータDiとを受け取り、これらの外部パラメータαi、βi、Diに基づき、輪郭の過強調を抑制するための第1の閾値としての過強調補正閾値α、微細画像の輪郭を強調するための第2の閾値としての微細成分強調閾値β、および、輪郭検出のための第3の閾値としての輪郭検出閾値Dを算出する。
The
輪郭検出回路904は、入力映像信号Siの変化量を演算により求めた値と輪郭検出閾値Dとを比較し、その比較結果に基づき、輪郭の有無を示す輪郭検出信号Scを出力する。
The
輪郭補正回路905は、輪郭成分抽出回路901から出力される輪郭成分Saと、輪郭検出回路904から出力される輪郭検出信号Scと、パラメータ算出回路903から出力される過強調補正閾値α及び微細成分強調閾値βと、外部からゲイン調整パラメータとして与えられる係数γとを用いて、入力映像信号Siに対し輪郭強調のための信号処理を行い、この信号処理の結果として出力映像信号Soを生成する。
The
また、非特許文献1には、EMアルゴリズム(Expectation Maximizationアルゴリズム)が記載されている。
拡大画像に輪郭強調を適用しても、目的とする輪郭を復元できないという問題があった。これは、輪郭周辺では、画像圧縮に伴うブロックノイズや、輪郭を境に隣接し合う複数の色の混色などの画質劣化が生じて、輪郭の形状が変化してしまっているためである。図30は、バイキュービック補間による拡大画像に輪郭強調を適用した結果の例を示す画像である。図30に例示するように、輪郭強調処理を行っても、輪郭が十分に明瞭となった画像とはなっていない。 There is a problem that even if contour enhancement is applied to an enlarged image, the target contour cannot be restored. This is because the shape of the contour changes around the contour due to image quality degradation such as block noise accompanying image compression and a mixture of colors adjacent to the contour. FIG. 30 is an image showing an example of a result of applying contour enhancement to an enlarged image by bicubic interpolation. As illustrated in FIG. 30, even when the contour emphasis process is performed, the image does not have a sufficiently clear contour.
本発明は、拡大された画像がブロックノイズや混色により劣化している場合であっても、その拡大画像における輪郭を明瞭化し、画像を高品質化させる画像処理システム、画像処理方法、画像処理用プログラム、およびその画像処理システムを適用した画像圧縮装置、画像伸張装置および画像伝送システムを提供することを目的とする。 The present invention provides an image processing system, an image processing method, and an image processing method for clarifying an outline in an enlarged image and improving the quality of the image even when the enlarged image is deteriorated due to block noise or color mixing. It is an object of the present invention to provide a program and an image compression apparatus, an image expansion apparatus, and an image transmission system to which the image processing system is applied.
本発明の画像処理システムは、拡大前の画像の画素間に内挿された画素を含む拡大された画像である補間画像中の画素を選択し、選択した画素を中心とする画素のブロックを抽出し、前記ブロック内の画素の色を第1のクラスおよび第2のクラスにクラスタリングし、前記ブロック内の各画素の色が前記第1のクラスに属する確率と前記第2のクラスに属する確率と、前記第1のクラスおよび前記第2のクラスの代表色とを導出する代表色推定手段と、前記第1のクラスおよび第2のクラスの代表色の距離が閾値以上であるときに、代表色推定手段が抽出したブロック内の個々の画素毎に当該画素の色が第1のクラスに属する確率が第2のクラスに属する確率よりも高いという条件が満たされる場合、前記画素の色を前記第1のクラスの代表色に置換し、前記条件が満たされない場合、前記画素の色を前記第2のクラスの代表色に置換し、一つの画素が複数のブロックに属する場合に、各ブロック毎に前記画素に対して導出された置換後の色の平均を前記画素の色とする色補正手段とを備えることを特徴とする。 The image processing system of the present invention selects a pixel in an interpolated image that is an enlarged image including pixels interpolated between pixels of an image before enlargement, and extracts a block of pixels centered on the selected pixel And clustering the colors of the pixels in the block into a first class and a second class, and the probability that the color of each pixel in the block belongs to the first class and the probability of belonging to the second class, Representative color estimation means for deriving the representative colors of the first class and the second class, and when the distance between the representative colors of the first class and the second class is greater than or equal to a threshold, When the condition that the probability that the color of the pixel belongs to the first class is higher than the probability of the second class is satisfied for each individual pixel in the block extracted by the estimation unit, the color of the pixel is 1 class representative If the condition is not satisfied, the color of the pixel is replaced with the representative color of the second class, and when one pixel belongs to a plurality of blocks, the pixel is derived for each block. And color correction means for setting the average of the replaced colors to the color of the pixel.
また、本発明の画像圧縮装置は、入力画像をダウンサンプリングすることにより、前記入力画像よりも解像度の低い低解像度画像を生成するダウンサンプリング手段と、前記低解像度画像を拡大する拡大画像生成手段と、前記入力画像と前記低解像度画像の対応する画素同士の画素値の差である差分データを計算する画像減算手段とを備え、前記拡大画像生成手段が、拡大対象画像の画素間に画素を内挿することにより、前記拡大対象画像を拡大した補間画像を生成する補間画像生成手段と、前記補間画像中の画素を選択し、選択した画素を中心とする画素のブロックを抽出し、前記ブロック内の画素の色を第1のクラスおよび第2のクラスにクラスタリングし、前記ブロック内の各画素の色が前記第1のクラスに属する確率と前記第2のクラスに属する確率と、前記第1のクラスおよび前記第2のクラスの代表色とを導出する代表色推定手段と、前記第1のクラスおよび第2のクラスの代表色の距離が閾値以上であるときに、代表色推定手段が抽出したブロック内の個々の画素毎に当該画素の色が第1のクラスに属する確率が第2のクラスに属する確率よりも高いという条件が満たされる場合、前記画素の色を前記第1のクラスの代表色に置換し、前記条件が満たされない場合、前記画素の色を前記第2のクラスの代表色に置換し、一つの画素が複数のブロックに属する場合に、各ブロック毎に前記画素に対して導出された置換後の色の平均を前記画素の色とする色補正手段とを有することを特徴とする。 The image compression apparatus of the present invention includes a downsampling unit that generates a low resolution image having a lower resolution than the input image by downsampling the input image, and an enlarged image generation unit that expands the low resolution image. Image subtracting means for calculating difference data that is a difference between pixel values of corresponding pixels of the input image and the low-resolution image, and the enlarged image generating means inserts pixels between pixels of the enlargement target image. Interpolating image generating means for generating an interpolated image obtained by enlarging the image to be enlarged by inserting, selecting a pixel in the interpolated image, extracting a block of pixels centered on the selected pixel, Are clustered into a first class and a second class, and the probability that the color of each pixel in the block belongs to the first class and the second class. The representative color estimation means for deriving the probability of belonging to the first class and the representative colors of the first class and the second class, and the distance between the representative colors of the first class and the second class is greater than or equal to a threshold value When the condition that the probability that the color of the pixel belongs to the first class is higher than the probability of the second class is satisfied for each individual pixel in the block extracted by the representative color estimation unit, the pixel If the color is replaced with the representative color of the first class and the condition is not satisfied, the color of the pixel is replaced with the representative color of the second class, and one pixel belongs to a plurality of blocks And color correction means for setting the average color after replacement derived for the pixel for each block to the color of the pixel.
また、本発明の画像伸張装置は、原画像を低解像度化した低解像度画像と、前記原画像と前記低解像度画像の対応する画素同士の画素値の差である差分データとが入力され、前記低解像度画像を伸長する画像伸張装置であって、前記低解像度画像を拡大する拡大画像生成手段と、前記拡大画像生成手段が拡大した画像と前記差分データの対応する画素同士の画素値の和を計算する画像加算手段とを備え、前記拡大画像生成手段が、拡大対象画像の画素間に画素を内挿することにより、前記拡大対象画像を拡大した補間画像を生成する補間画像生成手段と、前記補間画像中の画素を選択し、選択した画素を中心とする画素のブロックを抽出し、前記ブロック内の画素の色を第1のクラスおよび第2のクラスにクラスタリングし、前記ブロック内の各画素の色が前記第1のクラスに属する確率と前記第2のクラスに属する確率と、前記第1のクラスおよび前記第2のクラスの代表色とを導出する代表色推定手段と、前記第1のクラスおよび第2のクラスの代表色の距離が閾値以上であるときに、代表色推定手段が抽出したブロック内の個々の画素毎に当該画素の色が第1のクラスに属する確率が第2のクラスに属する確率よりも高いという条件が満たされる場合、前記画素の色を前記第1のクラスの代表色に置換し、前記条件が満たされない場合、前記画素の色を前記第2のクラスの代表色に置換し、一つの画素が複数のブロックに属する場合に、各ブロック毎に前記画素に対して導出された置換後の色の平均を前記画素の色とする色補正手段とを有することを特徴とする。 The image expansion device of the present invention receives a low-resolution image obtained by reducing the resolution of the original image, and difference data that is a difference between pixel values of corresponding pixels of the original image and the low-resolution image. An image expansion device that expands a low-resolution image, comprising: an enlarged image generating unit that expands the low-resolution image; and a sum of pixel values of pixels corresponding to the image enlarged by the enlarged image generating unit and the difference data Interpolating image generating means for calculating, interpolating image generating means for generating an interpolated image obtained by enlarging the enlarging target image by interpolating pixels between pixels of the enlarging target image; and Select a pixel in the interpolated image, extract a block of pixels centered on the selected pixel, cluster the colors of the pixels in the block into a first class and a second class, Representative color estimation means for deriving the probability that the color of each pixel belongs to the first class, the probability of belonging to the second class, and the representative colors of the first class and the second class; When the distance between the representative colors of the first class and the second class is equal to or greater than the threshold, the probability that the color of the pixel belongs to the first class is the first for each individual pixel in the block extracted by the representative color estimation unit. If the condition of higher than the probability of belonging to the second class is satisfied, the color of the pixel is replaced with the representative color of the first class, and if the condition is not satisfied, the color of the pixel is changed to the second class. And a color correction unit that uses the average of the replaced colors derived for each pixel for each block when the pixel belongs to a plurality of blocks. It is characterized by that.
また、本発明の画像伝送システムは、画像圧縮装置と画像伸張装置とを備え、前記画像圧縮装置が、入力画像をダウンサンプリングすることにより、前記入力画像よりも解像度の低い低解像度画像を生成し、前記低解像度画像を前記画像伸張装置に送信するダウンサンプリング手段と、前記低解像度画像を拡大する第1の拡大画像生成手段と、前記入力画像と前記低解像度画像の対応する画素同士の画素値の差である差分データを計算し、前記差分データを前記画像伸張装置に送信する画像減算手段とを有し、前記画像伸張装置が、前記画像圧縮装置から受信した低解像度画像を拡大する第2の拡大画像生成手段と、前記第2の拡大画像生成手段が拡大した画像と、前記画像圧縮装置から受信した差分データの対応する画素同士の画素値の和を計算する画像加算手段とを有し、前記第1の拡大画像生成手段および前記第2の拡大画像生成手段が、拡大対象画像の画素間に画素を内挿することにより、前記拡大対象画像を拡大した補間画像を生成する補間画像生成手段と、前記補間画像中の画素を選択し、選択した画素を中心とする画素のブロックを抽出し、前記ブロック内の画素の色を第1のクラスおよび第2のクラスにクラスタリングし、前記ブロック内の各画素の色が前記第1のクラスに属する確率と前記第2のクラスに属する確率と、前記第1のクラスおよび前記第2のクラスの代表色とを導出する代表色推定手段と、前記第1のクラスおよび第2のクラスの代表色の距離が閾値以上であるときに、代表色推定手段が抽出したブロック内の個々の画素毎に当該画素の色が第1のクラスに属する確率が第2のクラスに属する確率よりも高いという条件が満たされる場合、前記画素の色を前記第1のクラスの代表色に置換し、前記条件が満たされない場合、前記画素の色を前記第2のクラスの代表色に置換し、一つの画素が複数のブロックに属する場合に、各ブロック毎に前記画素に対して導出された置換後の色の平均を前記画素の色とする色補正手段とを含むことを特徴とする。 The image transmission system of the present invention further includes an image compression device and an image expansion device, and the image compression device generates a low-resolution image having a lower resolution than the input image by down-sampling the input image. Downsampling means for transmitting the low resolution image to the image expansion device, first enlarged image generating means for enlarging the low resolution image, and pixel values of corresponding pixels of the input image and the low resolution image Second subtracting the low-resolution image received from the image compressing device, the image subtracting means for calculating the difference data as a difference between the image compressing device and transmitting the difference data to the image decompressing device. Of the enlarged image generating means, the image enlarged by the second enlarged image generating means, and the sum of the pixel values of corresponding pixels of the difference data received from the image compression apparatus An image adding means for calculating, and the first enlarged image generating means and the second enlarged image generating means enlarge the enlargement target image by interpolating pixels between pixels of the enlargement target image. An interpolated image generating means for generating the interpolated image, a pixel in the interpolated image is selected, a block of pixels centered on the selected pixel is extracted, and the color of the pixel in the block is set to the first class and the first Clustering into two classes, the probability that the color of each pixel in the block belongs to the first class, the probability of belonging to the second class, the representative colors of the first class and the second class, When the distance between the representative color estimation means for deriving and the representative colors of the first class and the second class is greater than or equal to a threshold value, for each individual pixel in the block extracted by the representative color estimation means, The color is first If the condition that the probability of belonging to the class is higher than the probability of belonging to the second class is satisfied, the color of the pixel is replaced with a representative color of the first class, and if the condition is not satisfied, the color of the pixel Is replaced with the representative color of the second class, and when one pixel belongs to a plurality of blocks, the average of the replaced colors derived for the pixel for each block is used as the color of the pixel. Color correction means.
また、本発明の画像処理方法は、拡大前の画像の画素間に内挿された画素を含む拡大された画像である補間画像中の画素を選択し、選択した画素を中心とする画素のブロックを抽出し、前記ブロック内の画素の色を第1のクラスおよび第2のクラスにクラスタリングし、前記ブロック内の各画素の色が前記第1のクラスに属する確率と前記第2のクラスに属する確率と、前記第1のクラスおよび前記第2のクラスの代表色とを導出する代表色推定ステップと、前記第1のクラスおよび第2のクラスの代表色の距離が閾値以上であるときに、代表色推定ステップで抽出したブロック内の個々の画素毎に当該画素の色が第1のクラスに属する確率が第2のクラスに属する確率よりも高いという条件が満たされる場合、前記画素の色を前記第1のクラスの代表色に置換し、前記条件が満たされない場合、前記画素の色を前記第2のクラスの代表色に置換し、一つの画素が複数のブロックに属する場合に、各ブロック毎に前記画素に対して導出された置換後の色の平均を前記画素の色とする色補正ステップとを含むことを特徴とする。 The image processing method of the present invention selects a pixel in an interpolated image, which is an enlarged image including pixels interpolated between pixels of the image before enlargement, and a block of pixels centered on the selected pixel. Are extracted, and the colors of pixels in the block are clustered into a first class and a second class, and the probability that each pixel color in the block belongs to the first class and the second class. A representative color estimating step for deriving a probability and representative colors of the first class and the second class, and a distance between the representative colors of the first class and the second class is equal to or greater than a threshold value, When the condition that the probability that the color of the pixel belongs to the first class is higher than the probability of the second class is satisfied for each individual pixel in the block extracted in the representative color estimation step, the color of the pixel is The first If the condition is not satisfied, the pixel color is replaced with the second class representative color, and when one pixel belongs to a plurality of blocks, the pixel is replaced for each block. And a color correction step using an average of the colors after replacement derived for the pixel as the color of the pixel.
また、本発明の画像処理プログラムは、コンピュータに、拡大前の画像の画素間に内挿された画素を含む拡大された画像である補間画像中の画素を選択し、選択した画素を中心とする画素のブロックを抽出し、前記ブロック内の画素の色を第1のクラスおよび第2のクラスにクラスタリングし、前記ブロック内の各画素の色が前記第1のクラスに属する確率と前記第2のクラスに属する確率と、前記第1のクラスおよび前記第2のクラスの代表色とを導出する代表色推定処理、および前記第1のクラスおよび第2のクラスの代表色の距離が閾値以上であるときに、代表色推定処理で抽出したブロック内の個々の画素毎に当該画素の色が第1のクラスに属する確率が第2のクラスに属する確率よりも高いという条件が満たされる場合、前記画素の色を前記第1のクラスの代表色に置換し、前記条件が満たされない場合、前記画素の色を前記第2のクラスの代表色に置換し、一つの画素が複数のブロックに属する場合に、各ブロック毎に前記画素に対して導出された置換後の色の平均を前記画素の色とする色補正処理を実行させることを特徴とする。 Also, the image processing program of the present invention selects a pixel in an interpolated image, which is an enlarged image including pixels interpolated between pixels of the image before enlargement, on the computer, and the selected pixel is the center. A block of pixels is extracted, and the colors of the pixels in the block are clustered into a first class and a second class, and the probability that the color of each pixel in the block belongs to the first class and the second class A representative color estimation process for deriving the probability of belonging to a class and the representative colors of the first class and the second class, and the distance between the representative colors of the first class and the second class is greater than or equal to a threshold value When the condition that the probability that the color of the pixel belongs to the first class is higher than the probability of the second class is satisfied for each individual pixel in the block extracted by the representative color estimation process, the pixel When a color is replaced with a representative color of the first class and the condition is not satisfied, a color of the pixel is replaced with a representative color of the second class, and one pixel belongs to a plurality of blocks, It is characterized in that a color correction process is performed in which the average of the color after replacement derived for the pixel for each block is the color of the pixel.
本発明によれば、拡大された画像がブロックノイズや混色により劣化している場合であっても、その拡大画像における輪郭を明瞭化し、画像を高品質化させることができる。 According to the present invention, even if the enlarged image is deteriorated due to block noise or color mixing, the contour in the enlarged image can be clarified and the quality of the image can be improved.
以下、本発明の実施形態を図面を参照して説明する。 Embodiments of the present invention will be described below with reference to the drawings.
実施形態1.
図1は、本発明の第1の実施形態の画像処理システムの例を示すブロック図である。第1の実施形態の画像処理システムは、例えば、プログラム制御により動作するコンピュータ100によって実現される。コンピュータ100は、中央処理装置(プロセッサ、データ処理装置でもよい。)を備える計算機である。
FIG. 1 is a block diagram showing an example of an image processing system according to the first embodiment of the present invention. The image processing system according to the first embodiment is realized by, for example, a
画像処理システムとなるコンピュータ100は、輝度勾配算出手段102と、輪郭抽出手段103と、輪郭補正手段104とを含む。
A
輝度勾配算出手段102には、補間処理(例えば、バイリニア補間やバイキュービック補間)によって拡大された画像(以下、補間画像と記す。)Saが入力される。補間画像Saは、拡大前の画像の画素間に内挿された画素を含む拡大された画像である。輝度勾配算出手段102は、補間画像Saの各画素毎に、輝度勾配の強度(以下、輝度勾配強度)、および輝度勾配の方向(以下、輝度勾配方向)を計算する。なお、ここでは、低解像度画像(拡大前の画像)から拡大後の画像への拡大率が一定である場合を例にして説明する。
An image (hereinafter referred to as an interpolated image) Sa enlarged by interpolation processing (for example, bilinear interpolation or bicubic interpolation) Sa is input to the luminance
輝度勾配とは、画素の輝度が、その画素の近傍の画素に対してどれだけ変化しているかを表す値である。例えば、座標が1変化したときの、画素の輝度の変化量である。輝度勾配が大きいほど、輝度の変化量が大きいことになる。輝度勾配は、x軸方向(水平方向)、y軸方向(垂直方向)それぞれについて計算される。図2は、輝度勾配強度および輝度勾配方向を示す説明図である。図2では、画像中の一つの画素71に着目して輝度勾配強度および輝度勾配方向を説明するが、他の各画素についても同様に輝度勾配強度および輝度勾配方向が算出される。一つの画素71における水平方向の輝度の変化量を表す値が、画素71におけるx軸方向の輝度勾配である。図2に示すベクトル72は、大きさが画素71におけるx軸方向の輝度勾配であり、x軸方向を向くベクトルである。以下、このベクトル72をx軸方向輝度勾配ベクトルと記す。また、画素71における垂直方向の輝度の変化量を表す値が、画素71におけるy軸方向の輝度勾配である。図2に示すベクトル73は、大きさが画素71におけるy軸方向の輝度勾配であり、y軸方向を向くベクトルである。以下、このベクトル73をy軸方向輝度勾配ベクトルと記す。画素71における輝度勾配強度とは、x軸方向輝度勾配ベクトル72とy軸方向輝度勾配ベクトル73の合成ベクトル74(図2参照)の大きさである。また、画素71における輝度勾配方向とは、基準となる方向(具体的にはx軸方向)と上記の合成ベクトル74の方向とのなす角度である。図2では、輝度勾配方向を“θ”として表している。輝度勾配算出手段102は、補間画像Saの各画素毎に、輝度勾配強度(合成ベクトル74の大きさ)、および輝度勾配方向(θ)を求める。
The luminance gradient is a value representing how much the luminance of a pixel changes with respect to a pixel near the pixel. For example, it is the amount of change in luminance of the pixel when the coordinate changes by one. The larger the luminance gradient, the larger the amount of change in luminance. The luminance gradient is calculated for each of the x-axis direction (horizontal direction) and the y-axis direction (vertical direction). FIG. 2 is an explanatory diagram showing luminance gradient strength and luminance gradient direction. In FIG. 2, the luminance gradient intensity and the luminance gradient direction will be described by focusing on one
輪郭抽出手段103は、各画素における輝度勾配強度および輝度勾配方向を用いて、劣化する前の本来の輪郭を表す画素を判定する。例えば、輪郭抽出手段103は、輪郭を表す画素であるか否かの判定となる画素(以下、輪郭判定対象画素)を中心として、輝度勾配方向の隣接画素と、その反対方向の隣接画素の輝度勾配強度を比較する。そして、輪郭抽出手段103は、輪郭判定対象画素の輝度勾配強度が閾値(輪郭抽出閾値)よりも大きく、また上記の2つの隣接画素における輝度勾配強度よりも大きいことを条件に、輪郭判定対象画素は輪郭上の画素(輪郭を表す画素)であると判定する。
The
輪郭補正手段104は、輪郭を境に接する2つの領域それぞれを代表する代表色を推定し、これに基づいて輪郭周辺の色を補正する。輪郭補正手段104は、輪郭を表す画素(基準画素と記す。)からその基準画素における輝度勾配方向に一定距離離れた画素(第1の隔離画素と記す。)を特定する。輪郭補正手段104は、第1の隔離画素の色を第1の代表色とし、基準画素と第1の隔離画素とを結ぶ直線上に存在する各画素を、第1の代表色に補正する。また、輪郭を表す画素(基準画素)からその基準画素における輝度勾配方向を180°回転した方向に一定距離離れた画素(第2の隔離画素と記す。)を特定する。輪郭補正手段104は、第2の隔離画素の色を、第2の代表色とし、第1の隔離画素と第2の隔離画素とを結ぶ直線上に存在する各画素のうち、第1の代表色に補正していない画素を、第2の代表色に補正する。輪郭補正手段104は、この処理を、輪郭を表す各画素毎に行う。なお、ここでは、上記の一定距離が、予め定められているものとする。
The
輪郭補正手段104が輪郭上の画素の近傍の画素の色を補正することにより、目的とする高品質な拡大画像が得られる。
The
輝度勾配算出手段102と、輪郭抽出手段103と、輪郭補正手段104は、例えば、プログラムに従って動作する中央処理装置(CPU)によって実現される。すなわち、中央処理装置が、コンピュータ100が備える記憶装置(図示せず。)から画像処理用プログラムを読み込み、画像処理用プログラムに従って、輝度勾配算出手段102、輪郭抽出手段103および輪郭補正手段104として動作してもよい。また、輝度勾配算出手段102、輪郭抽出手段103および輪郭補正手段104がそれぞれ別個の回路として実現されていてもよい。
The brightness
次に、動作について詳細に説明する。
図3は、第1の実施形態の処理経過の例を示すフローチャートである。画像処理システムには、補間処理により拡大された補間画像Sa(例えば、図28に例示する画像)が入力される。画像処理システムは、補間画像Saにおける輪郭部分の周辺の画素の色(具体的には画素値)を補正して、輪郭が明瞭な高品質の画像を生成する。
Next, the operation will be described in detail.
FIG. 3 is a flowchart illustrating an example of processing progress of the first embodiment. An interpolation image Sa (for example, an image illustrated in FIG. 28) enlarged by the interpolation processing is input to the image processing system. The image processing system corrects the color (specifically, pixel value) of pixels around the contour portion in the interpolation image Sa, and generates a high-quality image with a clear contour.
本実施形態では、輝度勾配算出手段102および輪郭補正手段104に補間画像Saが入力される。補間画像Saが入力されると、輝度勾配算出手段102は、補間画像Saの各画素毎に輝度勾配強度および輝度勾配方向を算出し、各画素の輝度勾配強度および輝度勾配方向を輪郭抽出手段103に出力する(ステップS11)。このとき、輝度勾配算出手段102は、各画素の輝度勾配方向を輪郭補正手段104にも出力する。以下、輝度勾配強度をSbと記し、輝度勾配方向をScと記す。また、座標を指定して、輝度勾配強度Sbおよび輝度勾配方向Scを表す場合もある。すなわち、座標(x,y)における輝度勾配強度をSb(x,y)と記し、座標(x,y)における輝度勾配方向ScをSc(x,y)と記す場合がある。
In the present embodiment, the interpolated image Sa is input to the brightness
ステップS11において、まず輝度勾配算出手段102は、個々の画素毎に、画素値から輝度値を特定する。画素値は、入力された画像の個々の画素に設定されている値であり、例えば、画素がRGB形式で表されている場合、画素の画素値はR,G,Bそれぞれの濃淡を表す値である。輝度値は、輝度の大きさを表す値である。例えば、画素がRGB形式で表されているとする。この場合、輝度勾配算出手段102は、個々の画素毎に以下に示す式(1)の計算を行い、各画素の輝度値を計算すればよい。
In step S11, first, the luminance
Y(x,y)=0.299・R(x,y)+0.587・G(x,y)+0.114・B(x,y)
式(1)
Y (x, y) = 0.299.R (x, y) + 0.587.G (x, y) + 0.114.B (x, y)
Formula (1)
式(1)においてY(x,y)は、座標(x,y)の画素の輝度値である。また、R(x,y)、G(x,y)、B(x,y)は、座標(x,y)の画素におけるR,G,Bの画素値である。 In equation (1), Y (x, y) is the luminance value of the pixel at coordinates (x, y). Further, R (x, y), G (x, y), and B (x, y) are R, G, and B pixel values in the pixel at coordinates (x, y).
ステップS11において、輝度勾配算出手段102は、各画素の輝度値から輝度勾配強度および輝度勾配方向を計算する。輝度勾配算出手段102が輝度勾配強度および輝度勾配方向を計算する処理の例を説明する。輝度勾配強度および輝度勾配方向の計算処理として、例えば、エッジ検出オペレータを用いる方法がある。エッジ検出オペレータを用いる方法では、予め定められn行n列に配置された値(係数)と、画像中に含まれるn行n列の画素とを対応させて、対応する係数と画素の輝度値との積を求め、その和を計算することにより、輝度勾配を計算する。この計算に用いる係数をエッジ検出オペレータの係数と呼ぶ。エッジ検出オペレータの例として、Sobelフィルタ、Robinsonのオペレータ、Prewittのオペレータ等が挙げられる。以下、Sobelフィルタの係数を用いて、輝度勾配を計算する場合を例示するが、他のエッジ検出オペレータの係数(Robinsonのオペレータの係数やPrewittのオペレータの係数等)を用いる場合の処理も同様である。
In step S11, the luminance
Sobelフィルタの係数は、3行3列、5行5列、7行7列等のように所定の数を並べたn行n列の数の並びとして予め定められている。ここで、nは奇数である。また、Sobelフィルタの係数として、水平方向の輝度勾配算出のために用いられる係数と、垂直方向の輝度勾配算出のために用いられる係数の2種類が定められる。図4は、Sobelフィルタの係数の例を示す説明図である。以下、Sobelフィルタの係数が、3行3列の数の並びである場合を例にして説明する。図4(a)は、水平方向(x軸方向)の輝度勾配算出に用いるSobelフィルタ(以下、水平方向Sobelフィルタと記す。)の係数を示している。また、図4(b)は、垂直方向(y軸方向)の輝度勾配算出に用いるSobelフィルタ(以下、垂直方向Sobelフィルタと記す。)の係数を示している。 The Sobel filter coefficients are predetermined as an array of n rows and n columns in which a predetermined number is arranged, such as 3 rows, 3 columns, 5 rows, 5 columns, 7 rows, 7 columns, and the like. Here, n is an odd number. In addition, two types of coefficients are used as coefficients for the Sobel filter: coefficients used for calculating the luminance gradient in the horizontal direction and coefficients used for calculating the luminance gradient in the vertical direction. FIG. 4 is an explanatory diagram illustrating an example of coefficients of the Sobel filter. Hereinafter, a case where the coefficients of the Sobel filter are arranged in a number of 3 rows and 3 columns will be described as an example. FIG. 4A shows coefficients of a Sobel filter (hereinafter referred to as a horizontal Sobel filter) used for calculating a luminance gradient in the horizontal direction (x-axis direction). FIG. 4B shows coefficients of a Sobel filter (hereinafter referred to as a vertical Sobel filter) used for calculating a luminance gradient in the vertical direction (y-axis direction).
輝度勾配算出手段102は、補間画像Saの各輝度値に水平方向Sobelフィルタを畳み込み、水平方向の輝度勾配画像(Dhとする。)を生成する。また、輝度勾配算出手段102は、補間画像Saに垂直方向Sobelフィルタを畳み込み、垂直方向の輝度勾配画像(Dvとする。)を生成する。水平方向の輝度勾配画像Dhは、個々の画素に対して、補間画像Saにおける対応画素の水平(x軸)方向の輝度勾配を割り当てた画像である。垂直方向の輝度勾配画像Dvは、個々の画素に対して、補間画像Saにおける対応画素の垂直(y軸)方向の輝度勾配を割り当てた画像である。
The luminance
また、Sobelフィルタの畳み込みとは、輝度勾配の計算対象とする画素を中心とする、Sobelフィルタの係数と同じ配置の複数の画素を特定し、その各画素それぞれについて、対応するSobelフィルタの係数との積を計算し、その積の和を求める処理である。ここでは、Sobelフィルタの係数が3行3列の数の並びである場合を例にしているので、輝度勾配算出手段102は、輝度勾配の計算対象画素を中心とする3行3列の画素を特定する。図5は、輝度勾配の計算対象画素を中心とするn行n列(3行3列)の各画素の輝度値を示すイメージ図である。輝度勾配算出手段102は、図5に例示する輝度値l〜tの9個の画素を特定すると、その複数の各画素毎に、輝度値と、対応するSobelフィルタの係数との積を計算する。特定したn行n列の画素の中心に位置する計算対象画素は、n行n列のSobelフィルタの係数のうち中心に配置された係数に対応する。また、計算対象画素を基準とする画素の位置が、Sobelフィルタの係数のうち中心に配置された係数を基準とする係数の位置と同じ位置になっている場合、その画素および係数は対応しているものとする。例えば、図5に例示する輝度値qの画素は、図4(a)に示すSobelフィルタの係数“2”に対応する。輝度勾配算出手段102は、対応するSobelフィルタの係数と、画素の輝度値との積を計算し、その和を求める。
Further, the convolution of the Sobel filter is to identify a plurality of pixels having the same arrangement as the Sobel filter coefficient centered on the pixel for which the luminance gradient is to be calculated, and for each pixel, the corresponding Sobel filter coefficient and Is a process of calculating the product of and calculating the sum of the products. In this example, since the Sobel filter coefficients are arranged in a number of 3 rows and 3 columns, the luminance
図4(a),(b)に示すように、Sobelフィルタの係数は水平方向、垂直方向の2種類あるので、輝度勾配算出手段102は、水平方向Sobelフィルタ、垂直方向Sobelフィルタそれぞれを用いて上記の計算を行う。水平方向Sobelフィルタの係数の並びに含まれる個々の係数をSobelh(i,j)と表すとする。iは係数の並びにおける列を表し、ここでは−1,0,1の値をとる。また、jは係数の並びにおける行を表し、ここでは−1,0,1の値をとる。補間画像Saにおける座標(x,y)の画素の輝度値をSa(x,y)と表す。このとき、輝度勾配算出手段102は、上記の積および和の計算として、以下に示す式(2)の計算を行うことにより、座標(x,y)の画素における水平方向の輝度勾配(Dh(x,y)とする。)を求めることができる。 As shown in FIGS. 4A and 4B, since there are two types of coefficients of the Sobel filter in the horizontal direction and the vertical direction, the luminance gradient calculating means 102 uses the horizontal direction Sobel filter and the vertical direction Sobel filter, respectively. Perform the above calculation. It is assumed that the individual coefficients included in the horizontal Sobel filter coefficient are represented as Sobelh (i, j). i represents a column in the coefficient sequence, and takes a value of -1, 0, 1 here. Further, j represents a row in the coefficient sequence, and takes values of -1, 0, 1 here. The luminance value of the pixel at the coordinates (x, y) in the interpolated image Sa is represented as Sa (x, y). At this time, the luminance gradient calculating means 102 performs the calculation of the following equation (2) as the above-described product and sum calculation, thereby obtaining the horizontal luminance gradient (Dh ( x, y))).
また、垂直方向Sobelフィルタの係数の並びに含まれる個々の係数をSobelv(i,j)と表すとする。このとき、輝度勾配算出手段102は、上記の積および和の計算として、以下に示す式(3)の計算を行うことにより、座標(x,y)の画素における垂直方向の輝度勾配(Dv(x,y)とする。)を求めることができる。 In addition, it is assumed that individual coefficients included in the vertical Sobel filter coefficients are represented as Sobelv (i, j). At this time, the luminance gradient calculating means 102 performs the following equation (3) as the above-mentioned product and sum calculation, thereby obtaining the vertical luminance gradient (Dv (Dv ()) in the pixel at the coordinate (x, y). x, y))).
輝度勾配算出手段102は、補間画像Sa中の各画素について、水平方向、垂直方向の輝度勾配を求める。さらに、輝度勾配算出手段102は、水平方向、垂直方向の輝度勾配を用いて、各画素毎に、輝度勾配強度および輝度勾配方向を計算する。
The luminance
座標(x,y)の輝度勾配強度Sb(x,y)は、x軸方向輝度勾配ベクトル72とy軸方向輝度勾配ベクトル73の合成ベクトルの大きさである(図2参照)。輝度勾配算出手段102は、このベクトルの大きさ(輝度勾配強度Sb(x,y))を計算する。輝度勾配算出手段102は、以下に示す式(4)の計算により、輝度勾配強度Sb(x,y)を計算してもよい。
The luminance gradient strength Sb (x, y) at the coordinates (x, y) is the magnitude of the combined vector of the x-axis direction
Sb(x,y)=abs(Dh(x,y))+abs(Dv(x,y)) 式(4) Sb (x, y) = abs (Dh (x, y)) + abs (Dv (x, y)) Equation (4)
式(4)は、合成ベクトルの大きさを求める近似式である。また、輝度勾配算出手段102は、式(4)の近似式ではなく、以下に示す式(5)の計算によって輝度勾配強度Sb(x,y)を計算してもよい。
Expression (4) is an approximate expression for obtaining the magnitude of the combined vector. In addition, the luminance
Sb(x,y)=√(Dh(x,y)2+Dv(x,y)2) 式(5) Sb (x, y) = √ (Dh (x, y) 2 + Dv (x, y) 2 ) (5)
また、輝度勾配算出手段102は、座標(x,y)の輝度勾配方向Sc(x,y)を、以下に示す式(6)の計算により求めればよい。 Moreover, the brightness | luminance gradient calculation means 102 should just obtain | require the brightness | luminance gradient direction Sc (x, y) of a coordinate (x, y) by calculation of the following formula | equation (6).
Sc(x,y)=tan−1(Dv(x,y)/Dh(x,y)) 式(6) Sc (x, y) = tan −1 (Dv (x, y) / Dh (x, y)) Equation (6)
なお、輝度勾配算出手段102は、算出した輝度勾配強度Sb、輝度勾配方向Scを適当なステップで量子化しておいてもよい。すなわち、輝度勾配算出手段102は、計算した輝度勾配強度および輝度勾配方向を、より少ないビット数で表すように変換してもよい。例えば、計算した輝度勾配強度が8ビットで表されている場合、3ビットで表すように変換してもよい。8ビットを3ビットに変換する場合、8ビットで表される輝度勾配強度を16で除算し、小数点以下を四捨五入すればよい。
Note that the luminance
次に、輪郭抽出手段103は、輝度勾配算出手段102が算出した各画素の輝度勾配強度Sb、輝度勾配方向Scと、輪郭抽出閾値Pcとを用いて、補間画像Sa中で輪郭を表している画素を判定する(ステップS12)。ここでは、輪郭抽出閾値Pcは、予め定められているものとする。図6は、輪郭を表す画素の判定処理の例を示す説明図である。図6に示す画素300は、輪郭判定対象画素である。また、図6に示す方向301は、輪郭判定対象画素の輝度勾配方向(Sc(x,y))を示している。図6に示す方向302は、輪郭判定対象画素の輝度勾配方向302をπラジアン(180°)回転させた方向(Sc(x,y)+π)を示している。輪郭抽出手段103は、輪郭判定対象画素300の輝度勾配強度が輪郭抽出閾値Pcよりも大きく、かつ、輪郭判定対象画素の輝度勾配方向301の隣接画素303の輝度勾配強度と、輝度勾配方向301を180°回転させた方向302の隣接画素304の輝度勾配強度のいずれよりも大きい場合、輪郭判定対象画素300は輪郭を表す画素であると判定する。一方、輪郭判定対象画素300の輝度勾配強度が輪郭抽出閾値Pc以下である場合には、輪郭判定対象画素300は輪郭を表す画素でないと判定する。また、輪郭判定対象画素300の輝度勾配強度が輪郭判定対象画素の輝度勾配方向301の隣接画素303の輝度勾配強度と、輝度勾配方向301を180°回転させた方向302の隣接画素304の輝度勾配強度のいずれよりも大きいという条件を満たしていない場合にも、輪郭判定対象画素300は輪郭を表す画素でないと判定する。輪郭抽出手段103は、この判定を個々の画素毎に行う。なお、輪郭上の画素の判定処理方法は上記の方法に限定されず、輪郭抽出手段103は他の方法によって、輪郭上の画素を判定してもよい。
Next, the
輪郭抽出手段103は、輪郭を表すと判定した画素に対して0以外の画素値を格納し、それ以外の画素に対して画素値“0”を格納した画像(輪郭画像Sdと記す。)を輪郭補正手段104に出力する。輪郭画像Sdにより、輪郭補正手段104は、輪郭を表すと判定された画素とその他の画素とを区別することができる。また、輪郭抽出手段103は、輪郭を表すと判定した画素の座標値を輪郭補正手段104に出力してもよい。輪郭抽出手段103は、輪郭を表すと判定された画素とその他の画素とを区別できるように、輪郭を表すと判定した画素を輪郭抽出手段103に通知すればよい。
The
ステップS12の後、輪郭補正手段104は、輪郭を境に接する2つの領域それぞれを代表する代表色を定め、補間画像Saにおける輪郭周辺の画素値を補正する(ステップS13)。図7は、輪郭周辺の画素の補正処理の例を示す説明図である。図7(a)は補正前の補間画像を表し、図7(b)は補正後の補間画像を表している。図7(a)で斜線で示した画素は、輪郭を表していると判定された画素であり、この画素の連なりが画像の輪郭となっている。ステップS13において、輪郭補正手段104は、輪郭抽出手段103によって輪郭を表すと判定された画素(基準画素)を一つ選択する。図7における画素400は、基準画素を表している。また、図7に示す方向401は、基準画素400の輝度勾配方向(Sc(x,y))を示している。図7に示す403は、基準画素の輝度勾配方向401をπラジアン(180°)回転させた方向(Sc(x,y)+π)を示している。
After step S12, the
輪郭補正手段104は、基準画素400から基準画素400における輝度勾配方向に一定距離離れた第1の隔離画素402を特定する。輪郭補正手段104は、補間画像Sa中の第1の隔離画素402の色を第1の代表色とする。そして、輪郭補正手段104は、基準画素400と第1の隔離画素402とを結ぶ直線上に存在する各画素の色を、第1の代表色と同じ色に補正する。すなわち、基準画素400と第1の隔離画素402とを結ぶ直線上に存在する各画素の画素値を、第1の隔離画素402の画素値に置換する。例えば、補間画像Saの各画素がRGB形式で表されている場合、第1の隔離画素402のR,G,Bそれぞれの値に置換すればよい。また、輪郭補正手段104は、基準画素400の画素値も、第1の隔離画素402の画素値に置換する。
The
同様に、輪郭補正手段104は、基準画素400から方向403(図7(a)参照。輝度勾配方向401を180°反転した方向)に一定距離離れた第2の隔離画素404を特定する。輪郭補正手段104は、補間画像Sa中の第2の隔離画素404の色を第2の代表色とする。そして、輪郭補正手段104は、第2の隔離画素404と第1の隔離画素402とを結ぶ直線上に存在する画素のうち、第1の隔離画素402の画素値に置換していない画素の画素値を、第2の隔離画素404の画素値に置換する。
Similarly, the
この処理の結果、図7(b)に示すように、基準画素400および画素405は第1の代表色に補正され、画素407は第2の代表色に補正される。ここでは、基準画素400の画素値を第1の隔離画素402の画素値に置換する場合を示したが、基準画素400の画素値を第2の隔離画素404の画素値で置換してもよい。
As a result of this processing, as shown in FIG. 7B, the
輪郭補正手段104は、輪郭抽出手段103によって輪郭を表すと判定された全ての画素を順次選択して、上記の処理を繰り返し、輪郭の周辺の画素値を補正する。そして、補正後の画像を出力する。輪郭補正手段104による補正処理により生成された拡大画像の例を図8に示す。図8に示すように、輪郭の明瞭な高品質の画像が得られる。
The
次に、本実施形態の効果について説明する。
本実施形態では、輪郭抽出手段103が、画像の輪郭上の画素を特定し、輪郭補正手段104がその画素を間に挟む第1の隔離画素および第2の隔離画素の間の各画素を2つの代表色で区分するように画素を補正する。そのため、輪郭が明瞭な、高品質な拡大画像を生成することができる。また、第1の隔離画素および第2の隔離画素として、基準画素から一定距離離れた画素を特定するので、混色の影響を受けていない色を代表色とすることができ、高品質な拡大画像を生成することができる。
Next, the effect of this embodiment will be described.
In the present embodiment, the
次に、第1の実施形態の変形例について説明する。上記の第1の実施形態では、Sobelフィルタの係数がn行n列(例えば3行3列)で固定であり、輪郭抽出閾値Pcは予め定められた定数である場合を例に説明した。また、ステップS13で、第1の隔離画素402および第2の隔離画素404(図7(a)参照)を特定する際に用いる一定距離も、予め定められているものとして説明した。以下に説明する第1の実施形態の変形例では、これらの値を可変とする。図9は、第1の実施形態の変形例を示すブロック図である。既に説明した構成要素と同様の構成要素については、図1と同一の符号を付す。図9に示すように、画像処理システムは、輝度勾配算出手段102、輪郭抽出手段103および輪郭補正手段104に加えて、パラメータ設定手段110を備えていてもよい。なお、図9では、コンピュータ100とは別にパラメータ設定手段110を備える場合を示しているが、コンピュータ100がパラメータ設定手段110を含んでいてもよい。そして、パラメータ設定手段110は、プログラムに従って動作する中央処理装置によって実現されてもよい。すなわち、中央処理装置が、画像処理用プログラムを読み込み、画像処理用プログラムに従って、パラメータ設定手段110、輝度勾配算出手段102、輪郭抽出手段103、輪郭補正手段104として動作してもよい。
Next, a modification of the first embodiment will be described. In the first embodiment, the case where the Sobel filter coefficient is fixed in n rows and n columns (for example, 3 rows and 3 columns) and the contour extraction threshold value Pc is a predetermined constant has been described as an example. In addition, the fixed distance used when specifying the
この第1の実施形態の変形例では、Sobelフィルタの係数としてn行n列に並べられる係数の個数は可変である。すなわち、n行n列の“n”を可変とし、3行3列、5行5列等のSobelフィルタの係数を選択可能とする。パラメータ設定手段110は、輝度勾配算出手段102がSobelフィルタの係数として何行何列の係数を選択するのかを決定するためのパラメータを算出し、輝度勾配算出手段102に出力する。以下、このパラメータを輝度勾配算出用パラメータと記し、“Pb”と表す。輝度勾配算出手段102は、予め3行3列、5行5列、7行7列等の行数列数に応じたSobelフィルタの係数を予め保持しておき、輝度勾配算出用パラメータPbに応じた行数および列数のSobelフィルタの係数を選択し、ステップS11を行う。
In the modification of the first embodiment, the number of coefficients arranged in n rows and n columns as the Sobel filter coefficients is variable. That is, “n” in n rows and n columns is variable, and Sobel filter coefficients such as 3 rows, 3 columns, and 5 rows and 5 columns can be selected. The
また、パラメータ設定手段110は、輪郭抽出閾値Pcを計算し、輪郭抽出手段103に出力する。輪郭抽出手段103は、パラメータ設定手段110が計算した輪郭抽出閾値Pcを用いて、ステップS12を行う。
Further, the
また、パラメータ設定手段110は、ステップS13において、基準画素から第1および第2の隔離画素を定めるための距離を計算し、輪郭補正手段104に出力する。この距離を、輪郭補正用パラメータと記し、“Pd”と表す。輪郭補正手段104は、ステップS13において第1および第2の隔離画素を定める際に、輪郭補正用パラメータPdが示す距離だけ基準画素から離れた画素として、第1の隔離画素および第2の隔離画素を定める。
In step S13, the
ここで、Sobelフィルタの係数の並びの大きさを表す“n(列数および行数を表すn)”、輪郭抽出閾値Pc、輪郭補正用パラメータPdの値の意味について説明する。 Here, the meanings of the values of “n (n indicating the number of columns and rows)”, the contour extraction threshold value Pc, and the contour correction parameter Pd, which represent the size of the Sobel filter coefficients, will be described.
Sobelフィルタの係数はn行n列の数の並びであるが、このnが小さい場合、狭い範囲内での輝度の起伏に対して、大きな輝度勾配を算出する。すなわちnを小さくすると、狭い範囲内で少しの輝度の起伏がある場合でも、その範囲内で輝度が極大となる箇所の画素を、輪郭を表す画素として判定しやすくなる。一方、nが大きい場合、狭い範囲内での輝度の起伏に対して大きな輝度勾配を算出しなくなる。すなわちnを大きくすると、狭い範囲内での少しの輝度の起伏は輪郭として検出しにくくし、広い範囲内で輝度の起伏がある場合に輝度が極大となる箇所の画素を、輪郭を表す画素として判定しやすくなる。nを小さくしすぎると、ノイズが輪郭として検出されやすくなる。 The coefficients of the Sobel filter are arranged in a number of n rows and n columns. When n is small, a large luminance gradient is calculated with respect to the undulation of luminance within a narrow range. In other words, when n is reduced, even when there is a slight luminance undulation within a narrow range, it becomes easy to determine a pixel at a location where the luminance is maximum within that range as a pixel representing an outline. On the other hand, when n is large, a large luminance gradient is not calculated for the undulation of the luminance within a narrow range. That is, when n is increased, a slight luminance undulation within a narrow range is difficult to detect as a contour, and a pixel at a point where the luminance becomes maximum when there is a luminance undulation within a wide range is defined as a pixel representing the contour. It becomes easy to judge. If n is too small, noise is easily detected as a contour.
輪郭抽出閾値Pcは、輪郭として判定されるための輝度勾配強度の下限を表す。輪郭抽出閾値Pcを小さくしすぎると、ノイズにより輝度勾配強度が大きくなった場合であっても、輪郭を表す画素であると誤判定しやすくなる。一方、輪郭抽出閾値Pcを大きくしすぎると、ノイズを輪郭とする誤判定はなくなるが、輪郭を表す画素を、輪郭を表していないと誤判定しやすくなる。 The contour extraction threshold value Pc represents the lower limit of the luminance gradient strength to be determined as the contour. If the contour extraction threshold value Pc is too small, it is easy to erroneously determine that the pixel represents a contour even if the luminance gradient strength is increased due to noise. On the other hand, if the contour extraction threshold value Pc is too large, erroneous determination with noise as a contour is eliminated, but it is easy to erroneously determine that a pixel representing a contour does not represent a contour.
図10は、画素毎の輝度勾配の起伏を示すイメージ図である。図10に示す輝度勾配の極大点に該当する画素が、輪郭を表す画素となる。輝度勾配算出用パラメータPbに応じて定められる“n”は、どの程度の広がりを持つ範囲内で輝度勾配強度の起伏を強調するのかを定める値である。また、輪郭抽出閾値Pcは、どの程度の大きさの輝度勾配強度であれば、輪郭を表す画素と言えるのかを定める値である。 FIG. 10 is an image diagram showing the undulation of the luminance gradient for each pixel. A pixel corresponding to the maximum point of the luminance gradient shown in FIG. 10 is a pixel representing an outline. “N” determined in accordance with the luminance gradient calculation parameter Pb is a value that determines how much the undulation of the luminance gradient intensity is to be emphasized within a wide range. The contour extraction threshold value Pc is a value that determines how large the luminance gradient intensity is to represent a pixel representing the contour.
図11は、画像の拡大前後における輪郭付近での画素値の変化を示すイメージ図である。図11(a)は画像拡大前の輪郭付近の画素値の変化を示し、図11(b)は画像拡大後の輪郭付近の画素値の変化を示している。図11(b)に示すように、画像を拡大することにより、輪郭周辺での画素値の変化は緩やかになる。輪郭補正手段104は、図11(b)に示す状態から、基準画素から輝度勾配方向の一定距離以内の画素を第1の代表色に補正し、反対方向の一定距離以内の画素を第2の代表色に補正する(図11(c)参照)。この結果、図11(c)に示すように、輪郭を境に、第1の代表色と第2の代表色とで区分され、輝度変化が急峻になり、輪郭が明確化する。輪郭補正用パラメータPdは、この基準画素からの距離を表している。
FIG. 11 is an image diagram showing changes in pixel values in the vicinity of the contour before and after image enlargement. FIG. 11A shows changes in pixel values near the contour before image enlargement, and FIG. 11B shows changes in pixel values near the contour after image enlargement. As shown in FIG. 11B, by enlarging the image, the change in the pixel value around the contour becomes moderate. From the state shown in FIG. 11B, the
また、第1の実施形態で説明したように、輝度勾配算出手段102および輪郭補正手段104には補間画像Saが入力される。また、本変形例では、低解像度画像(拡大前の画像)から補間画像Saへの拡大率(Paとする。)がパラメータ設定手段110に入力される。パラメータ設定手段110は、入力された拡大率Paから、輝度勾配算出用パラメータPb、輪郭抽出閾値Pcおよび輪郭補正用パラメータPdを計算する。
Further, as described in the first embodiment, the interpolation image Sa is input to the luminance
また、低解像度画像から補間画像Saへの拡大率Paが不変である場合、パラメータ設定手段110は、拡大率Paを定数として記憶しておき、その拡大率Paから、輝度勾配算出用パラメータPb、輪郭抽出閾値Pcおよび輪郭補正用パラメータPdを計算してもよい。
When the enlargement factor Pa from the low-resolution image to the interpolated image Sa is unchanged, the
なお、Paは、低解像度画像(拡大前の画像)の横幅(水平方向の画素数)をWlとし、補間画像Saの横幅をWhとしたときに、Wh/Wlで表される値である。また、補間画像Saの縦幅を低解像度画像の縦幅で除算した値を拡大率Paとしてもよい。 Note that Pa is a value represented by Wh / Wl, where W1 is the horizontal width (number of pixels in the horizontal direction) of the low-resolution image (image before enlargement) and Wh is the horizontal width of the interpolated image Sa. Further, a value obtained by dividing the vertical width of the interpolation image Sa by the vertical width of the low-resolution image may be used as the enlargement ratio Pa.
図12は、第1の実施形態の変形例の処理経過を示すフローチャートである。第1の実施形態で説明した処理と同様の処理については、図3と同一の符号を付す。パラメータ設定手段110は、拡大率Paが入力されると、その拡大率Paを用いて、Pb,Pc,Pdを計算する(ステップS1)。
FIG. 12 is a flowchart illustrating the processing progress of the modification of the first embodiment. The same processes as those described in the first embodiment are denoted by the same reference numerals as those in FIG. When the enlargement factor Pa is input, the
ステップS1において、パラメータ設定手段110は、以下に示す式(7)の計算を行い、輝度勾配算出用パラメータPbを算出し、そのPbを輝度勾配算出手段102に出力する。
In step S <b> 1, the
Pb=α・Pa+β 式(7) Pb = α · Pa + β Formula (7)
α,βは定数である。また、αは0より大きな値であり、Paが大きくなるほど、Pbも大きな値となる。また、βはPbの下限を表す値である。βをPbの下限値として定めることにより、拡大率Paの値が小さくとも、Pbの値は下限値以上であることが保証される。α,βは、例えば、画像処理システムの管理者等に予め設定される。画像処理システムの管理者等は、拡大率に応じたSobelフィルタの係数が選択されるように、α,βを決定すればよい。 α and β are constants. In addition, α is a value larger than 0, and as Pa increases, Pb also increases. Β is a value representing the lower limit of Pb. By defining β as the lower limit value of Pb, it is guaranteed that the value of Pb is equal to or higher than the lower limit value even if the value of the enlargement factor Pa is small. α and β are set in advance by, for example, an administrator of the image processing system. An administrator of the image processing system may determine α and β so that a Sobel filter coefficient corresponding to the enlargement ratio is selected.
また、パラメータ設定手段110は、ステップS1において、式(8)の計算を行い、輪郭抽出閾値Pcを算出し、そのPcを輪郭抽出手段103に出力する。
Further, the
Pc=γ・Pa 式(8) Pc = γ · Pa Formula (8)
γは定数であり、例えば画像処理システムの管理者等に予め設定される。画像処理システムの管理者等は、拡大率と輪郭抽出閾値Pcとの関係が所望の比例関係になるようにγを定めればよい。 γ is a constant and is set in advance by, for example, an administrator of the image processing system. An administrator of the image processing system may determine γ so that the relationship between the enlargement ratio and the contour extraction threshold value Pc is a desired proportional relationship.
また、パラメータ設定手段110は、ステップS1において、式(9)の計算を行い、輪郭補正用パラメータPdを計算し、そのPdを輪郭補正手段104に出力する。
In step S1, the
Pd=δ・Pa 式(9) Pd = δ · Pa Formula (9)
δは定数であり、例えば画像処理システムの管理者等に予め設定される。画像処理システムの管理者等は、拡大率と輪郭補正用パラメータPdとの関係が所望の比例関係になるようにδを定めればよい。 δ is a constant and is set in advance by an administrator of the image processing system, for example. An administrator of the image processing system may determine δ so that the relationship between the enlargement ratio and the contour correction parameter Pd is a desired proportional relationship.
Pb,Pc,Pdは、例えば拡大率Paを変数とする一次関数として計算される。 Pb, Pc, and Pd are calculated as linear functions with the enlargement factor Pa as a variable, for example.
上記のα,β,γ,δの例として、α=2.0、β=1.0、γ=10.0、δ=1.5等の値が挙げられるが、これらの値に限定されるわけではない。 Examples of the above α, β, γ, δ include values of α = 2.0, β = 1.0, γ = 10.0, δ = 1.5, etc., but are not limited to these values. I don't mean.
なお、Pb,Pc,Pdの一部を予め固定値として定めておき、ステップS1でパラメータ設定手段110は、Pb,Pc,Pdのうち固定値として定められていないパラメータについて計算を行ってもよい。
Note that a part of Pb, Pc, and Pd may be determined in advance as a fixed value, and the
ステップS1でパラメータ設定手段110がPb,Pc,Pdを求めた後、画像処理システムはステップS11〜S13の処理を行う。
After the
輝度勾配算出手段102は、「Pbがx1以上x2未満ならば、3行3列のSobelフィルタの係数を選択する。」等のルールを予め保持しておき、そのルールに従って、パラメータ設定手段110が計算した輝度勾配算出用パラメータPbに応じたSobelフィルタの係数を選択する。そして、選択したSobelフィルタの係数を用いて、補間画像Saの各画素毎に輝度勾配強度および輝度勾配方向を算出し、各画素の輝度勾配強度および輝度勾配方向を輪郭抽出手段103に出力する(ステップS11)。Sobelフィルタの係数を選択する点の他は、既に説明したステップS11と同様である。 The brightness gradient calculating means 102 holds in advance a rule such as “If Pb is greater than or equal to x1 and less than x2, the coefficient of the Sobel filter of 3 rows and 3 columns is selected”, and the parameter setting means 110 follows the rule. A Sobel filter coefficient corresponding to the calculated luminance gradient calculation parameter Pb is selected. Then, using the coefficient of the selected Sobel filter, the luminance gradient strength and the luminance gradient direction are calculated for each pixel of the interpolation image Sa, and the luminance gradient strength and the luminance gradient direction of each pixel are output to the contour extracting means 103 ( Step S11). Other than the selection of the Sobel filter coefficient, it is the same as step S11 already described.
輪郭抽出手段103は、パラメータ設定手段110が計算した輪郭抽出閾値Pcを用いて、補間画像Sa中で輪郭を表している画素を判定する(ステップS12)。パラメータ設定手段110が輪郭抽出閾値Pcを定める点の他は、既に説明したステップS12と同様である。
The
輪郭補正手段104は、パラメータ設定手段110が計算した輪郭補正用パラメータPdを、基準画素から第1および第2の隔離画素を定めるための距離として用い、輪郭周辺の画素値を補正する(ステップS13)。パラメータ設定手段110が基準画素から第1および第2の隔離画素を定めるための距離を定める点の他は、既に説明したステップS13と同様である。
The
この第1の実施形態の変形例によれば、低解像度画像から補間画像Saへの拡大率が一定ではない場合であっても、拡大率に応じた適切なパラメータで輪郭を明瞭化することができる。 According to the modification of the first embodiment, even when the enlargement ratio from the low resolution image to the interpolated image Sa is not constant, the contour can be clarified with appropriate parameters according to the enlargement ratio. it can.
次に、第1の実施形態の他の変形例について説明する。図13は、第1の実施形態の他の変形例を示すブロック図である。既に説明した構成要素と同様の構成要素については、図1、図9と同一の符号を付す。図13に示すように、画像処理システムは、輝度勾配算出手段102、輪郭抽出手段103、輪郭補正手段104およびパラメータ設定手段110に加えて、補間画像生成手段101を備えていてもよい。図13では、コンピュータ100が補間画像生成手段101を含む場合を示している。補間画像生成手段101は、プログラムに従って動作する中央処理装置によって実現されてもよい。すなわち、中央処理装置が、画像処理用プログラムを読み込み、画像処理用プログラムに従って、補間画像生成手段101、輝度勾配算出手段102、輪郭抽出手段103、輪郭補正手段104、パラメータ設定手段110として動作してもよい。
Next, another modification of the first embodiment will be described. FIG. 13 is a block diagram illustrating another modification of the first embodiment. Constituent elements similar to those already described are denoted by the same reference numerals as those in FIGS. As shown in FIG. 13, the image processing system may include an interpolated
補間画像生成手段101には低解像度画像(Siと記す。)が入力され、補間画像生成手段101は補間によりその低解像度画像Siを拡大して補間画像Saを生成し、補間画像Saを輝度勾配算出手段102および輪郭補正手段104に出力する。すなわち、補間画像生成手段101は、低解像度画像Siの画素間に画素を内挿して、拡大画像である補間画像Saを生成する。補間画像生成手段101は、例えば、バイリニア補間あるいはバイキュービック補間により、低解像度画像Siを拡大する。
A low resolution image (denoted as Si) is input to the interpolated image generating means 101, and the interpolated image generating means 101 enlarges the low resolution image Si by interpolation to generate an interpolated image Sa, and the interpolated image Sa is converted into a luminance gradient. It outputs to the calculation means 102 and the outline correction means 104. That is, the interpolated image generating means 101 generates an interpolated image Sa that is an enlarged image by interpolating pixels between the pixels of the low resolution image Si. The interpolation
また、パラメータ設定手段110には、生成すべき拡大画像の解像度が入力される。例えば、拡大後の補間画像Saの横幅(水平方向の画素数)が入力されてもよい。また、パラメータ設定手段110には、拡大前の低解像度画像Siの情報(例えば、低解像度画像Siの横幅)も入力される。パラメータ設定手段110は、入力された情報を用いて、拡大率Paを計算し、補間画像生成手段101に出力する。
In addition, the resolution of the enlarged image to be generated is input to the
パラメータ設定手段110に入力される情報が、拡大後の補間画像Saの横幅(水平方向の画素数)Whと、低解像度画像Siの横幅Wlであるとする。この場合、パラメータ設定手段110は、Pa=Wh/Wlを計算して、拡大率Paを求めればよい。また、パラメータ設定手段110に入力される情報は、補間画像Saの縦幅(垂直方向の画素巣)Vhと低解像度画像Siの縦幅Vlであってもよい。この場合、パラメータ設定手段110は、Pa=Vh/Vlを計算して、拡大率Paを求めればよい。
It is assumed that information input to the
パラメータ設定手段110は、拡大率Paを計算した後、既に説明したように拡大率PaからPb,Pc,Pdの各パラメータを計算してもよい。 The parameter setting means 110 may calculate each parameter of Pb, Pc, and Pd from the enlargement factor Pa as described above after calculating the enlargement factor Pa.
補間画像生成手段101は、パラメータ設定手段110が計算した拡大率Paで低解像度画像Siを補間して補間画像Saを生成する。補間画像生成手段101は、拡大率Paに応じて、低解像度画像Siにおける隣接する画素間に画素を内挿する。補間画像Saは、内挿された画素を含んでいることで、低解像度画像Siよりも拡大された画像となっている。補間画像生成手段101は、拡大率Paが大きいほど、内挿する画素の数を増加させればよい。
The interpolated image generating means 101 generates an interpolated image Sa by interpolating the low resolution image Si with the enlargement factor Pa calculated by the parameter setting means 110. The interpolated image generating means 101 interpolates pixels between adjacent pixels in the low resolution image Si according to the enlargement factor Pa. The interpolated image Sa is an image enlarged from the low-resolution image Si by including the interpolated pixels. The interpolated
図14は、本変形例の処理経過を示すフローチャートである。第1の実施形態で説明した処理と同様の処理については、図3と同一の符号を付す。パラメータ設定手段110には、例えば、低解像度画像Siの横幅Wlおよびユーザの所望の補間画像Saの横幅Whが入力される。パラメータ設定手段110は、WlおよびWhが入力されると、Wh/Wlを計算することにより、拡大率Paを計算する。ただし、ここで示した拡大率Paの計算方法は一例であり、他の方法で拡大率Paを計算してもよい。パラメータ設定手段110は、計算した拡大率Paを補間画像生成手段101に出力する。また、パラメータ設定手段110は、その拡大率Paを用いて、輝度勾配算出用パラメータPb、輪郭抽出閾値Pcおよび輪郭補正用パラメータPdを計算する(ステップS2)。パラメータ設定手段110は、Pbを輝度勾配算出手段102に出力し、Pcを輪郭抽出手段103に出力し、Pdを輪郭補正手段104に出力する。拡大率Paから、Pb,Pc,Pdを算出する動作は、既に説明したステップS1(図12参照)と同様である。
FIG. 14 is a flowchart showing the processing progress of this modification. The same processes as those described in the first embodiment are denoted by the same reference numerals as those in FIG. For example, the horizontal width Wl of the low-resolution image Si and the horizontal width Wh of the desired interpolation image Sa of the user are input to the
補間画像生成手段101には、低解像度画像Si(拡大前の画像)が入力される。ステップS2の後、補間画像生成手段101は、拡大率Paで低解像度画像Siを補間して、ユーザの所望の解像度の補間画像Saを生成する(ステップS10)。補間画像生成手段101は、低解像度画像Siにおける隣接する画素間に拡大率Paに応じた数の画素を内挿することで画像を拡大すればよい。補間画像生成手段101は、例えば、バイリニア補間またはバイキュービック補間を行って画素を補間し、画像を拡大すればよい。
The interpolated image generating means 101 receives the low resolution image Si (image before enlargement). After step S2, the interpolated image generating means 101 interpolates the low resolution image Si with the enlargement factor Pa, and generates an interpolated image Sa having the user's desired resolution (step S10). The interpolation
補間画像生成手段101がバイリニア補間を行う場合の動作について説明する。図15は、バイリニア補間の例を示すイメージ図である。図15に示す縦軸は画素値を表し、他の2軸はそれぞれx軸方向、y軸方向の座標を表している。図15に示す座標(u,v)は、補間される画素の座標である。ただし、(u,v)は低解像度画像Siにおける座標であり、小数で表される。低解像度画像Siに含まれる画素のx座標、y座標は1,2,3,・・・等の整数で表され、その座標間に画素を内挿するので、内挿される画素の座標は小数で表される。図15に示す座標(u,v)は、このような低解像度画像Siにおける座標値である。また、図15に示す各座標(k,l),(k+1,l),(k,l+1),(k+1,l+1)は、低解像度画像Siに存在する画素の座標値であり、それらの画素の画素値は既知である。また、これらの4つの画素は、補間する画素(u,v)を囲む画素であり、kはuの小数点以下を切り捨てた値であり、lはvの小数点以下を切り捨てた値である。補間画像生成手段101は、補間する座標(u,v)における画素値を算出する。 The operation when the interpolated image generating means 101 performs bilinear interpolation will be described. FIG. 15 is an image diagram illustrating an example of bilinear interpolation. The vertical axis shown in FIG. 15 represents pixel values, and the other two axes represent coordinates in the x-axis direction and the y-axis direction, respectively. The coordinates (u, v) shown in FIG. 15 are the coordinates of the pixel to be interpolated. However, (u, v) is a coordinate in the low-resolution image Si and is represented by a decimal. The x-coordinate and y-coordinate of the pixel included in the low-resolution image Si are represented by integers such as 1, 2, 3,..., And the pixel is interpolated between the coordinates. It is represented by The coordinates (u, v) shown in FIG. 15 are coordinate values in such a low resolution image Si. Also, the coordinates (k, l), (k + 1, l), (k, l + 1), and (k + 1, l + 1) shown in FIG. 15 are the coordinate values of the pixels existing in the low-resolution image Si, and these pixels The pixel values of are known. These four pixels are pixels surrounding the pixel (u, v) to be interpolated, k is a value obtained by rounding down the decimal point of u, and l is a value obtained by rounding down the decimal point of v. The interpolated image generation means 101 calculates a pixel value at the coordinates (u, v) to be interpolated.
バイリニア補間で座標(u,v)における画素値を求める場合、y座標が等しい2つの座標(k,l),(k+1,l)における画素値を用いて、座標(u,l)における画素値を線形補間する。同様に、(k,l+1),(k+1,l+1)における画素値を用いて、座標(u,l+1)における画素値を線形補間する。さらに、x座標が等しい2つの座標(u,l),(u,l+1)における画素値を用いて、座標(u,v)における画素値を線型補間する。 When the pixel value at the coordinates (u, v) is obtained by bilinear interpolation, the pixel values at the coordinates (u, l) are obtained by using the pixel values at two coordinates (k, l) and (k + 1, l) having the same y coordinate. Is linearly interpolated. Similarly, the pixel values at the coordinates (u, l + 1) are linearly interpolated using the pixel values at (k, l + 1) and (k + 1, l + 1). Further, the pixel value at the coordinates (u, v) is linearly interpolated using the pixel values at two coordinates (u, l) and (u, l + 1) having the same x coordinate.
この座標(u,v)における画素値Pは、以下に示す式(10)によって求めることができる。 The pixel value P at the coordinates (u, v) can be obtained by the following equation (10).
補間画像生成手段101は、式(10)に示す式を計算して補間する画素における画素値Pを算出すれよばい。なお、式(10)におけるP1,P2,P3,P4は、それぞれ座標(k,l),(k+1,l),(k,l+1),(k+1,l+1)における画素値である。このように画素値Pが定められた座標(u,v)の画素が、内挿される画素である。 The interpolated image generating means 101 may calculate the pixel value P in the pixel to be interpolated by calculating the equation shown in equation (10). Note that P1, P2, P3, and P4 in Expression (10) are pixel values at coordinates (k, l), (k + 1, l), (k, l + 1), and (k + 1, l + 1), respectively. A pixel having coordinates (u, v) at which the pixel value P is determined in this way is a pixel to be interpolated.
補間画像生成手段101がバイキュービック補間を行う場合の動作について説明する。図16は、バイキュービック補間の例を示すイメージ図である。図16に示す縦軸は画素値を表し、他の2軸はそれぞれx軸方向、y軸方向の座標を表している。図16に示す座標(u,v)は、補間される画素の座標である。図15に示す場合と同様に、(u,v)は低解像度画像Siにおける座標であり、小数で表される。バイキュービック補間では、(u,v)を囲む16個の画素(k−1,l−1),(k,l−1),(k+1,l−1),(k+2,l−1),(k−1,l),(k,l),(k+1,l),(k+2,l),(k−1,l+1),(k,l+1),(k+1,l+1),(k+2,l+1),(k−1,l+2),(k,l+2),(k+1,l+2),(k+2,l+2)の画素値から(u,v)における画素値を補間する。kはuの小数点以下を切り捨てた値であり、lはvの小数点以下を切り捨てた値である。
An operation when the interpolated
バイキュービック補間で座標(u,v)における画素値を求める場合、y座標が等しい4つの座標(k−1,l−1),(k,l−1),(k+1,l−1),(k+2,l−1)の画素値を用いて、(u,l−1)における画素値を補間する。同様に、y座標が等しい4つの座標を用いて、(u,l),(u,l+1),(u,l+2)における画素値をそれぞれ補間する。さらに、x座標が等しい4つの座標(u,l−1),(u,l),(u,l+1),(u,l+2)における画素値を用いて、座標(u,v)の画素値を補間する。 When obtaining pixel values at coordinates (u, v) by bicubic interpolation, four coordinates (k−1, l−1), (k, l−1), (k + 1, l−1), with the same y coordinate, The pixel value at (u, l−1) is interpolated using the pixel value at (k + 2, l−1). Similarly, pixel values at (u, l), (u, l + 1), and (u, l + 2) are interpolated using four coordinates having the same y coordinate. Further, the pixel value at the coordinates (u, v) is obtained by using the pixel values at four coordinates (u, l−1), (u, l), (u, l + 1), (u, l + 2) having the same x coordinate. Is interpolated.
この座標(u,v)における輝度Pは、以下に示す式(11)によって求めることができる。このように画素値Pが定められた座標(u,v)の画素が、内挿される画素である。 The luminance P at the coordinates (u, v) can be obtained by the following equation (11). A pixel having coordinates (u, v) at which the pixel value P is determined in this way is a pixel to be interpolated.
補間画像生成手段101は、式(11)に示す式を計算して補間する画素における画素値Pを算出すれよばい。式9におけるP1〜P16は、(k−1,l−1),(k,l−1),(k+1,l−1),(k+2,l−1),(k−1,l),(k,l),(k+1,l),(k+2,l),(k−1,l+1),(k,l+1),(k+1,l+1),(k+2,l+1),(k−1,l+2),(k,l+2),(k+1,l+2),(k+2,l+2)における画素値である。 The interpolated image generating means 101 may calculate the pixel value P in the pixel to be interpolated by calculating the equation shown in equation (11). P1 to P16 in Equation 9 are (k-1, l-1), (k, l-1), (k + 1, l-1), (k + 2, l-1), (k-1, l), (K, l), (k + 1, l), (k + 2, l), (k-1, l + 1), (k, l + 1), (k + 1, l + 1), (k + 2, l + 1), (k-1, l + 2) ), (K, l + 2), (k + 1, l + 2), and (k + 2, l + 2).
また、式(11)において、f−1(t),f0(t),f1(t),f2(t)は、それぞれ以下の式で表される。 In the equation (11), f −1 (t), f 0 (t), f 1 (t), and f 2 (t) are represented by the following equations, respectively.
f−1(t)=(−t3+2t2−t)/2 式(12) f −1 (t) = (− t 3 + 2t 2 −t) / 2 Formula (12)
f0(t)=(3t3−5t2+2)/2 式(13) f 0 (t) = (3t 3 -5t 2 +2) / 2 Formula (13)
f1(t)=(−3t3+4t2+t)/2 式(14) f 1 (t) = (− 3t 3 + 4t 2 + t) / 2 Formula (14)
f2(t)=(t3−t2)/2 式(15) f 2 (t) = (t 3 −t 2 ) / 2 Formula (15)
また、式(11)におけるu’は、u’=u−kとして計算される値である。式(11)におけるv’は、v’=v−lとして計算される値である。 Further, u ′ in the equation (11) is a value calculated as u ′ = u−k. In the formula (11), v ′ is a value calculated as v ′ = v−1.
なお、RGB形式で表される画素のように複数種類(例えばR,G,Bの3種類)の画素値が設定されている場合、R,G,B等の画素値の種類毎にそれぞれ別々に画素値を補間すればよい。 In addition, when a plurality of types of pixel values (for example, three types of R, G, and B) are set as in the pixel expressed in the RGB format, each of the pixel values such as R, G, and B is different. It is sufficient to interpolate pixel values.
ここでは、バイリニア補間やバイキュービック補間を例示したが、補間画像生成手段101は他の方法で補間を行って低解像度画像Siを拡大してもよい。 Here, bilinear interpolation and bicubic interpolation are exemplified, but the interpolated image generating means 101 may enlarge the low-resolution image Si by performing interpolation using other methods.
補間画像生成手段101は、低解像度画像Siに対して画素を補間して生成した補間画像Saを輝度勾配算出手段102および輪郭補正手段140に出力する。輝度勾配算出手段102は、パラメータ設定手段110が計算した輝度勾配算出用パラメータPbに応じたSobelフィルタの係数を選択する。輝度勾配算出手段102は、Sobelフィルタの係数を用いて、補間画像Saの各画素毎に輝度勾配強度および輝度勾配方向を算出し、各画素の輝度勾配強度および輝度勾配方向を輪郭抽出手段103に出力する(ステップS11)。輪郭抽出手段103は、パラメータ設定手段110が計算した輪郭抽出閾値Pcを用いて、補間画像Sa中で輪郭を表している画素を判定する(ステップS12)。輪郭補正手段104は、パラメータ設定手段110が計算した輪郭補正用パラメータPdを、基準画素から第1および第2の隔離画素を定めるための距離として用い、輪郭周辺の画素値を補正する(ステップS13)。ステップS11〜S13の動作は、既に説明した変形例におけるステップS11〜S13と同様である。
The interpolated
本変形例によれば、補間画像生成手段101が低解像度画像Siに補間を行い補間画像Saを生成するので、低解像度画像Siを入力すれば、高品質の拡大画像を得ることができる。 According to this modification, the interpolation image generation means 101 interpolates the low resolution image Si to generate the interpolation image Sa. Therefore, if the low resolution image Si is input, a high quality enlarged image can be obtained.
また、補間画像生成手段101を備える構成において、パラメータ設定手段110が設けられていなくてもよい。その場合、輝度勾配算出手段102において輝度勾配算出用パラメータPbを予め設定しておけばよい。あるいは、Sobelフィルタの係数を予め設定しておいてもよい。また、輪郭抽出手段103では輪郭抽出閾値Pcを予め設定しておき、輪郭補正手段104では輪郭補正用パラメータPdを予め設定しておけばよい。
In the configuration including the interpolation
実施形態2.
図17は、本発明の第2の実施形態の画像処理システムの例を示すブロック図である。第1の実施形態と同様に、本実施形態の画像処理システムは、例えば、プログラム制御により動作するコンピュータ800によって実現される。コンピュータ800は、代表色推定手段802と、色補正手段803とを含む。なお、ここでは、低解像度画像(拡大前の画像)から拡大後の画像への拡大率が一定である場合を例にして説明する。また、画素がRGB形式で表されている場合を例にして説明するが、画素の表現はRGB形式に限定されない。
FIG. 17 is a block diagram illustrating an example of an image processing system according to the second embodiment of this invention. Similar to the first embodiment, the image processing system of the present embodiment is realized by a
代表色推定手段802には、補間処理(例えば、バイリニア補間やバイキュービック補間)によって拡大された補間画像Saが入力される。代表色推定手段802は、補間画像Saに含まれる個々の画素を選択する。代表色推定手段802は、選択した画素を中心とする一定サイズの画素のブロック(例えば、5行5列のブロック)を抽出し、そのブロック内の画素の色を二つのクラスにクラスタリングする。代表色推定手段802は、その二つのクラスのそれぞれについて、クラスを代表する代表色M1,M2を特定する。また、ブロック内の各画素の色が第1のクラスに属する確率および第2のクラスに属する確率を求める。この確率や代表色は、例えばEMアルゴリズム(Expectation Maximizationアルゴリズム)によって求めればよい。代表色推定手段802は、補間画像Sa内の個々の画素を選択して、各画素毎にブロックの抽出、代表色および上記の確率の導出を行う。
The representative
図18は、クラスタリングおよび代表色を説明するイメージ図である。選択した画素を中心とする5行5列の範囲をブロックとして抽出するとする。このブロックの左上部分には、赤系の画素が存在し、右下部分には緑系の画素が存在するものとする(図18(a)参照)。赤系の画素の画素値(R,G,B)は、例えば(255,0,0)、(240,0,0)、(250,1,0)等で表され、RGB色空間では互いに近い位置に存在する(図18(b)参照)。同様に、緑系の画素の画素値は、例えば、(0,255,0)、(0,255,3)、(1,240,5)等で表され、RGB空間で互いに近い位置に存在する(図18(b)参照)。代表色推定手段802は、このような画素の色のクラスを代表する代表色を決定し、クラス毎に各画素の色がそのクラスに属する確率を求める。図18では、画素の赤系の色と緑系の色に明確に区分される場合を例示したが、ブロック内の画素が同系統の色であっても、例えばEMアルゴリズムにより代表色や上記の確率を求めることができる。 FIG. 18 is an image diagram for explaining clustering and representative colors. It is assumed that a 5 × 5 range centered on the selected pixel is extracted as a block. It is assumed that a red pixel exists in the upper left portion of the block and a green pixel exists in the lower right portion (see FIG. 18A). The pixel values (R, G, B) of red pixels are represented by, for example, (255, 0, 0), (240, 0, 0), (250, 1, 0), etc. It exists in the near position (refer FIG.18 (b)). Similarly, the pixel values of green pixels are represented by, for example, (0, 255, 0), (0, 255, 3), (1, 240, 5), etc., and exist at positions close to each other in the RGB space. (See FIG. 18B). The representative color estimation means 802 determines a representative color representing such a pixel color class, and obtains the probability that the color of each pixel belongs to that class for each class. FIG. 18 illustrates a case where the pixel is clearly divided into a red color and a green color. However, even if the pixels in the block are of the same color, for example, the representative color or the above-described color may be obtained by an EM algorithm. Probability can be obtained.
色補正手段803は、代表色M1,M2の色空間での距離が閾値以上である場合、代表色推定手段802が抽出したブロック内の画素毎に、第1のクラスに属する確率および第2のクラスに属する確率に応じて、画素の色を代表色M1,M2のいずれかに補正する。色補正手段803は、この処理を代表色推定手段802が抽出したブロック毎に行う。
When the distance in the color space of the representative colors M1 and M2 is equal to or greater than the threshold value, the
ブロックは補間画像Saの各画素を中心とする一定サイズの画素の集合であるので、一つの画素が複数のブロックに属することが生じる。この場合、色補正手段803は、各ブロックにおける補正結果の平均をその画素に設定する。
Since a block is a set of pixels having a certain size centered on each pixel of the interpolation image Sa, one pixel may belong to a plurality of blocks. In this case, the
代表色推定手段802および色補正手段803は、例えば、プログラムに従って動作する中央処理装置(CPU)によって実現される。すなわち、中央処理装置が、コンピュータ800が備える記憶装置(図示せず。)から画像処理用プログラムを読み込み、画像処理用プログラムに従って、代表色推定手段802および色補正手段803として動作してもよい。また、代表色推定手段802および色補正手段803がそれぞれ別個の回路として実現されていてもよい。
The representative
次に、動作について詳細に説明する。
図19は、第2の実施形態の処理経過の例を示すフローチャートである。本実施形態では、代表色推定手段802および色補正手段803に補間画像Saが入力される。補間画像Saが入力されると、代表色推定手段802は、補間画像Sa中の画素を一つ選択し、選択した画素を中心とする一定範囲のブロックを抽出する(ステップS51)。このブロックの範囲は、例えば5行5列等のように予め定められているものとする。
Next, the operation will be described in detail.
FIG. 19 is a flowchart illustrating an example of processing progress of the second embodiment. In this embodiment, the interpolation image Sa is input to the representative
次に、代表色推定手段802は、抽出したブロック内の各画素の色を2つのクラスC1,C2にクラスタリング(分類)し、各クラスの代表色M1,M2を特定する(ステップS52)。ステップS52において、代表色推定手段802は、抽出したブロック内の各画素について、第1のクラスC1に属する確率および第2のクラスC2に属する確率を求める。以下、EMアルゴリズムを用いる場合を例にして、ステップS52の処理について説明する。
Next, the representative
以下の説明において、μは、クラスの中心の色(代表色となる色)のR,G,Bの値を要素とするベクトルであるとする。また、ωは、混合パラメータと呼ばれる重み係数である。σは、クラスタリングされた画素の画素値が色空間においてどれだけ広がっているかを表す値である。また、jは、2つのクラスを識別するための変数であり、例えばj=0は第1のクラスを意味し、j=1は第2のクラスを意味する。このjは、記号の添え字として用いられることもある。代表色推定手段802は、任意に定めたω,μ,σの初期値の組を二組生成する。この2組は、第1のクラスおよび第2のクラスに対応している。代表色推定手段802は、各組それぞれについて、ω,μ,σそれぞれを再計算することを繰り返す。この再計算により、μ(ここでは、R,G,Bの値)を収束させ、代表色を決定する。また、θは、ω,μ,σの組を示す記号である。各記号に(t)を付加して記した場合、そのtは再計算の回数を表しているものとする。また、ステップS51で抽出されたブロック内の各画素の画素値(R,G,B)の値を要素とするベクトルをxと記し、ブロック内のn番目の画素についてのベクトルxについては添え字nを付加してxnと記す。
In the following description, it is assumed that μ is a vector whose elements are R, G, and B values of the center color of the class (a representative color). Further, ω is a weighting factor called a mixing parameter. σ is a value representing how much the pixel values of the clustered pixels are spread in the color space. J is a variable for identifying two classes. For example, j = 0 means the first class, and j = 1 means the second class. This j may be used as a subscript of a symbol. The representative
代表色推定手段802は、任意に定めたω,μ,σの初期値の組を二組生成すると、各組毎に、ブロック内の画素がその組のクラスに属している確率を計算する。この確率をP(j|xn,θ(t))と表す。代表色推定手段802は、以下に示す式(16)によりP(j|xn,θ(t))を求める。
When the representative
代表色推定手段802は、式(16)の計算を行うときに、右辺のP(xn|j)を以下の式(17)を計算することによって求める。
The representative
代表色推定手段802は、式(16)の計算を行うときに、右辺のp(xn)を以下の式(18)を計算することによって求める。
The representative
代表色推定手段802は、各jについて(すなわち各クラスについて)、式(16)によりP(j|xn,θ(t))を計算すると、各jについてωj,μj,σjを再計算する。 The representative color estimation means 802 calculates P (j | x n , θ (t) ) for each j (that is, for each class) using equation (16), and calculates ω j , μ j , σ j for each j. Recalculate.
ωjは以下に示す式(19)の左辺に相当し、代表色推定手段802は、式(19)の計算によりωjを再計算する。
ω j corresponds to the left side of the following equation (19), and the representative
μjは以下に示す式(20)の左辺に相当し、代表色推定手段802は、式(20)の計算によりμjを再計算する。
μ j corresponds to the left side of the following equation (20), and the representative
σjは以下に示す式(21)の左辺に相当し、代表色推定手段802は、式(21)の計算によりσjを再計算する。
式(19)から式(20)におけるNは、ステップS51で抽出されたブロックに属する画素の総数である。また、Mは、データ(画素値)の次元の数である。本例では、画素値は、R,G,Bの3次元のデータであるので、M=3である。 N in the equations (19) to (20) is the total number of pixels belonging to the block extracted in step S51. M is the number of dimensions of data (pixel value). In this example, since the pixel value is three-dimensional data of R, G, and B, M = 3.
代表色推定手段802は、ωj,μj,σjを再計算したら、そのωj,μj,σj
から式(16)によりP(j|xn,θ(t))を再計算し、さらに式(19)〜(21)によりωj,μj,σjを計算する。
Representative
To P (j | x n , θ (t) ) according to equation (16), and ω j , μ j , and σ j according to equations (19) to (21).
代表色推定手段802は、計算前後でのμjの変化量が閾値以下になったときに、μjが収束したと判定し、再計算を停止する。そのときに得られたμjが、代表色のR,G,Bの各成分の値となる。また、代表色推定手段802は、収束したときのωj,μj,σjからさらにP(j|xn,θ(t))を計算する。このP(j|xn,θ(t))が、画素xnの色が、クラスjに属する確率である。
The representative
以上のステップS52の処理により、ブロック内の各画素の第1のクラスに属する確率、第2のクラスに属する確率、および代表色M1,M2が得られる。以下、ブロック内の画素(x,y)の色が第1のクラスに属する確率をP1(x,y)と記し、第2のクラスに属する確率をP2(x,y)と記す。 Through the processing in step S52 described above, the probability that each pixel in the block belongs to the first class, the probability that it belongs to the second class, and the representative colors M1 and M2 are obtained. Hereinafter, the probability that the color of the pixel (x, y) in the block belongs to the first class is referred to as P1 (x, y), and the probability that the color belongs to the second class is referred to as P2 (x, y).
次に、色補正手段803は、代表色M1,M2の距離Dに応じた指標を計算する。2つの色の距離は、色を表す各成分毎に差の二乗を計算し、その計算結果の和の平方根として得られる値である。本例のように色がR,G,Bの各成分で表される場合、R成分の差の二乗、B成分の差の二乗、およびB成分の差の二乗をそれぞれ計算し、その和の平方根が距離となる。すなわち、代表色M1のR,G,B各成分を(R1,G1,B1)とし、代表色M2のR,G,B各成分を(R2,G2,B2)とすると、距離Dは以下に示す式(22)で表される。
Next, the
D=√{(R1−R2)2+(G1−G2)2+(B1−B2)2} 式(22) D = √ {(R1-R2) 2 + (G1-G2) 2 + (B1-B2) 2 } Formula (22)
色補正手段803は、距離D自体を計算してもよく、あるいは、距離Dに応じた指標を計算してもよい。ここでは、距離Dに応じた指標として、(R1−R2)2+(G1−G2)2+(B1−B2)2を計算する。色補正手段803は、距離Dに応じた指標が所定値以上であるか否かにより、代表色同士の距離が閾値以上であるか否かを判定する(ステップS53)。
The
(R1−R2)2+(G1−G2)2+(B1−B2)2の計算結果が所定値以上である場合、色補正手段803は、距離Dが閾値以上であると判定する。この場合(ステップS53のYes)、色補正手段803は、ステップS51で抽出されたブロック内の各画素毎に、第1のクラスに属する確率および第2のクラスに属する確率に応じて、画素の色を補正する(ステップS54)。
When the calculation result of (R1−R2) 2 + (G1−G2) 2 + (B1−B2) 2 is equal to or greater than a predetermined value, the
ステップS54において、色補正手段803は、ブロック内の各画素を選択し、その画素の色が第1のクラス(代表色M1のクラス)に属する確率P1(x,y)と、第2のクラス(代表色M2のクラス)に属する確率P2(x,y)とを比較する。P1(x,y)>P2(x,y)であれば、色補正手段803は、選択した画素(x、y)の色を代表色M1に置換する。すなわち、選択した画素の画素値(R,G,Bの値)を、代表色M1のR,G,Bの値に置換する。一方、P1(x,y)>P2(x,y)が成立していなければ、色補正手段803は、選択した画素(x、y)の色を代表色M2に置換する。すなわち、選択した画素の画素値(R,G,Bの値)を、代表色M2のR,G,Bの値に置換する。色補正手段803は、この置換をブロック内の各画素毎に行う。ブロック内の各画素について置換が終了したならば、ステップS55に移行する。
In step S54, the
(R1−R2)2+(G1−G2)2+(B1−B2)2の計算結果が所定値未満である場合、色補正手段803は、距離Dが閾値未満であると判定する。この場合(ステップS53のNo)、ステップS54を行わずにステップS55に移行する。
When the calculation result of (R1−R2) 2 + (G1−G2) 2 + (B1−B2) 2 is less than a predetermined value, the
ステップS55において、色補正手段803は、補間画像Sa中の各画素を中心とする各ブロックについてステップS51以降の処理を完了しているか否かを判定する。未だステップS51以降の処理が行われていないブロックがあれば、未処理のブロックについてステップS51以降の処理を行う。全ブロックについてステップS51以降の処理が完了していれば、処理を終了する。
In step S55, the
ただし、一つの画素が複数のブロックに属し、各ブロック毎にその画素の置換後の色(画素値)が導出される場合、色補正手段803は、各ブロック毎にその一つの画素に対して導出された置換後の画素値の平均値を、その画素の画素値とする。
However, when one pixel belongs to a plurality of blocks and a color (pixel value) after replacement of the pixel is derived for each block, the
本実施形態によれば、ブロック内の2つの代表色の距離が閾値以上である場合、そのブロック内の画素を代表色に置換することにより、画素を補正するので、輪郭が明瞭な、高品質な拡大画像を生成することができる。また、代表色M1,M2を特定する際に、クラスタリングによる統計的処理を用いるため、ノイズなどの影響を受けずに、安定して代表色を取得できる。 According to the present embodiment, when the distance between two representative colors in a block is greater than or equal to a threshold, the pixels are corrected by replacing the pixels in the block with the representative colors, so that the outline is clear and the quality is high. An enlarged image can be generated. Further, since the statistical processing by clustering is used when specifying the representative colors M1 and M2, the representative colors can be stably acquired without being affected by noise or the like.
次に、第2の実施形態の変形例について説明する。上記の第2の実施形態では、補間画像Saに属する個々の画素をそれぞれ選択し、その画素を中心とするブロックを抽出して、各ブロック毎にステップS51以降の処理を行う場合を示した。以下に示す変形例では、補間画像Sa中の選択対象画素を輪郭上の画素とし、その輪郭上の各画素を中心とするブロックを抽出してステップS51以降の処理を行う。図20は、第2の実施形態の変形例を示すブロック図である。既に説明した構成要素と同様の構成要素については、図17と同一の符号を付す。図20に示すように、画像処理システムは、代表色推定手段802、色補正手段803に加えて、輝度勾配算出手段102と輪郭抽出手段103とを備えていてもよい。図20では、コンピュータ800が輝度勾配算出手段102と輪郭抽出手段103とを含む場合を示している。輝度勾配算出手段102および輪郭抽出手段103は、プログラムに従って動作する中央処理装置によって実現されてもよい。すなわち、中央処理装置が、画像処理用プログラムを読み込み、画像処理用プログラムに従って、輝度勾配算出手段102、輪郭抽出手段103、代表色推定手段802および色補正手段803として動作してもよい。
Next, a modification of the second embodiment will be described. In the second embodiment described above, the individual pixels belonging to the interpolated image Sa are selected, the block centered on the pixel is extracted, and the processing after step S51 is performed for each block. In the modification shown below, the selection target pixel in the interpolated image Sa is set as a pixel on the contour, and a block centering on each pixel on the contour is extracted, and the processing from step S51 is performed. FIG. 20 is a block diagram illustrating a modification of the second embodiment. Constituent elements similar to those already described are given the same reference numerals as in FIG. As shown in FIG. 20, the image processing system may include a luminance
本変形例における輝度勾配算出手段102および輪郭抽出手段103は、第1の実施形態の画像処理システムが備える輝度勾配算出手段102および輪郭抽出手段103と同様の処理を行う。本変形例の輝度勾配算出手段102および輪郭抽出手段103には、第1の実施形態と同一の符号を付して説明する。
The luminance
輝度勾配算出手段102には、補間画像Saが入力され、輝度勾配算出手段102は、補間画像Saの各画素毎に、輝度勾配強度および輝度勾配方向を計算する。また、輪郭抽出手段103は、各画素における輝度勾配強度および輝度勾配方向を用いて、劣化する前の本来の輪郭を表す画素を判定する。
The luminance
図21は、第2の実施形態の変形例の処理経過を示すフローチャートである。第2の実施形態で説明した処理と同様の処理については、図19と同一の符号を付す。 FIG. 21 is a flowchart showing the processing progress of a modification of the second embodiment. The same processes as those described in the second embodiment are denoted by the same reference numerals as those in FIG.
輝度勾配算出手段102は、補間画像Saが入力されると、第1の実施形態と同様に、捕願画像Sa中の個々の画素毎に、画素値から輝度値を特定する。例えば、式(1)の計算により、各画素毎に輝度値を計算する。そして、輝度勾配算出手段102は、予め定められたSobelフィルタの係数の畳み込みを行い、補間画像Saの各画素毎に、水平方向の輝度勾配、垂直方向の輝度勾配を計算する。さらに、輝度勾配算出手段102は、各画素毎に、輝度勾配強度Sb(x,y)および輝度勾配方向Sc(x,y)を計算する(ステップS49)。輝度勾配強度Sb(x,y)は、例えば式(4)または式(5)によって計算すればよい。輝度勾配方向Sc(x,y)は、例えば式(6)によって計算すればよい。なお、ここでは、Sobelフィルタの係数を用いる場合を例示しているが、他の他のエッジ検出オペレータの係数(Robinsonのオペレータの係数やPrewittのオペレータの係数等)を用いる場合の処理も同様である。
When the interpolation image Sa is input, the luminance
ステップS49の後、輪郭抽出手段103は、輝度勾配算出手段102が算出した各画素の輝度勾配強度、輝度勾配方向と、予め定められた輪郭抽出閾値Pcとを用いて、補間画像Sa中で輪郭を表している画素を判定する(ステップS50)。輪郭抽出手段103は、各画素を輪郭判定対象画素として選択する。そして、輪郭判定対象画素の輝度勾配強度が輪郭抽出閾値Pcよりも大きく、かつ、輪郭判定対象画素の輝度勾配方向の隣接画素の輝度勾配強度と、輝度勾配方向を180°回転させた方向の隣接画素の輝度勾配強度のいずれよりも大きい場合、輪郭判定対象画素が輪郭上の画素であると判定する。輪郭抽出手段103は、輪郭を表す画素と判定した画素を代表色推定手段802に通知する。
After step S49, the
ステップS49,S50は、第1の実施形態におけるステップS11,S12と同様の処理である。 Steps S49 and S50 are the same processes as steps S11 and S12 in the first embodiment.
ステップS50の後、代表色推定手段802および色補正手段803は、第2の実施形態で説明したステップS51〜ステップS55の処理を行う。ただし、代表色推定手段802は、ステップS51において、輪郭抽出手段103から通知された輪郭を表す画素のみを選択対象とする。また、色補正手段803は、ステップS55において、補間画像Sa中の輪郭を表す各画素について、ステップS51以降の処理を完了しているか否かを判定する。輪郭を表す各画素のうち、ステップS51以降の処理が行われていない画素が残っていればステップS51以降の処理を繰り返す。輪郭を表す各画素についてステップS51以降の処理が完了していれば処理を終了する。その他の点については、第2の実施形態と同様である。
After step S50, the representative
この結果、輪郭を表していない画素についてはステップS51以降の処理が省略されるので、処理を簡略して処理時間を短縮することができる。 As a result, since the processing after step S51 is omitted for pixels that do not represent the contour, the processing can be simplified and the processing time can be shortened.
次に、第2の実施形態の他の変形例について説明する。以下に示す変形例では、ステップS51で抽出するブロックの範囲等を可変とする。図22は、第2の実施形態の他の変形例を示すブロック図である。既に説明した構成要素と同一の構成要素については、図20と同一の符号を付す。図22に示すように、画像処理システムは、輝度勾配算出手段102、輪郭抽出手段103、代表色推定手段802および色補正手段803に加えて、パラメータ設定手段810を備えていてもよい。図22では、コンピュータ800とは別にパラメータ設定手段810を備える場合を示しているが、コンピュータ800がパラメータ設定手段810を含んでいてもよい。そして、パラメータ設定手段810は、プログラムに従って動作する中央処理装置によって実現されてもよい。すなわち、中央処理装置が、画像処理用プログラムを読み込み、画像処理用プログラムに従って、輝度勾配算出手段102、輪郭抽出手段103、代表色推定手段802、色補正手段803、パラメータ設定手段810として動作してもよい。
Next, another modification of the second embodiment will be described. In the following modification, the range of blocks extracted in step S51 is variable. FIG. 22 is a block diagram illustrating another modification of the second embodiment. Components that are the same as those already described are given the same reference numerals as in FIG. As shown in FIG. 22, the image processing system may include a
パラメータ設定手段810は、ステップS51で抽出する画素のブロックとして何行何列のブロックを抽出するのかを定めるパラメータを算出し、代表色推定手段802および色補正手段803に出力する。以下、このパラメータをブロック決定用パラメータと記し、“Pe”と表す。代表色推定手段802は、ステップS51において、ブロック決定用パラメータPeに応じた大きさのブロックを抽出する。
The
また、パラメータ設定手段810には、低解像度画像から補間画像Saへの拡大率Paが入力される。パラメータ設定手段810は、入力された拡大率Paをからブロック決定用パラメータPeを計算する。なお、拡大率Paが不変である場合、パラメータ設定手段810は、拡大率Paを定数として記憶しておき、その拡大率Paからブロック決定用パラメータPeを計算してもよい。
The parameter setting means 810 receives an enlargement factor Pa from the low resolution image to the interpolated image Sa. The parameter setting means 810 calculates a block determination parameter Pe from the input enlargement factor Pa. When the enlargement rate Pa is unchanged, the
パラメータ設定手段810は、以下に示す式(23)の計算を行い、ブロック決定用パラメータPeを計算すればよい。
The
Pe=ε・Pa+ζ 式(23) Pe = ε · Pa + ζ Equation (23)
ε,ζは定数である。また、εは0より大きな値であり、Paが大きくなるほど、Peも大きな値となる。また、ζはPeの下限を表す値である。ζをPeの下限値として定めることにより、拡大率Peの値が小さくともPbの値は下限値以上であることが保証される。ε,ζは、例えば、画像処理システムの管理者等に予め設定される。画像処理システムの管理者等は、拡大率に応じた大きさのブロック数が選択されるように、ε,ζを決定すればよい。Peは、例えば拡大率Paを変数とする一次関数として計算される。ε,ζの例として、ε=2.0、ζ=−1.0等の値が挙げられるが、これらの値に限定されるわけではない。 ε and ζ are constants. Further, ε is a value larger than 0, and Pe increases as Pa increases. Ζ is a value representing the lower limit of Pe. By defining ζ as the lower limit value of Pe, it is ensured that the value of Pb is not less than the lower limit value even if the value of the enlargement factor Pe is small. For example, ε and ζ are set in advance by an administrator of the image processing system. An administrator of the image processing system may determine ε and ζ so that the number of blocks having a size corresponding to the enlargement ratio is selected. Pe is calculated, for example, as a linear function with the enlargement ratio Pa as a variable. Examples of ε and ζ include values such as ε = 2.0 and ζ = −1.0, but are not limited to these values.
また、パラメータ設定手段810は、第1の実施形態の変形例におけるパラメータ設定手段110と同様に、輝度勾配算出用パラメータPbおよび輪郭抽出閾値Pcを計算し、輝度勾配算出用パラメータPbを輝度勾配算出手段102に出力し、輪郭抽出閾値Pcを輪郭抽出手段103に出力する。輝度勾配算出手段102は、その輝度勾配算出用パラメータPbに応じたSobelフィルタの係数を選択し、補間画像Saの各画素毎に輝度勾配強度および輝度勾配方向を算出する。また、輪郭抽出手段103は、その輪郭抽出閾値Pcを用いて、補間画像Sa中で輪郭を表している画素を判定する。
Also, the
図23は、第2の実施形態の他の変形例の処理経過を示すフローチャートである。既に説明した処理と同様の処理については、図19および図21と同一の符号を付す。パラメータ設定手段810は、拡大率Paが入力されると、その拡大率Paを用いて、輝度勾配算出用パラメータPb、輪郭抽出閾値Pcおよびブロック決定用パラメータPeを計算する(ステップS41)。なお、Pb,Pc,Peの一部を予め固定値として定めておき、ステップS41でパラメータ設定手段810は、Pb,Pc,Peのうち固定値として定められていないパラメータについて計算を行ってもよい。
FIG. 23 is a flowchart showing the processing progress of another modification of the second embodiment. The same processes as those already described are denoted by the same reference numerals as those in FIGS. When the enlargement factor Pa is input, the
輝度勾配算出手段102は、補間画像Saが入力されると、捕願画像Sa中の個々の画素毎に、画素値から輝度値を特定する。また、「Pbがx1以上x2未満ならば、3行3列のSobelフィルタの係数を選択する。」等のルールを予め保持しておき、そのルールに従って、輝度勾配算出用パラメータPbに応じたSobelフィルタの係数を選択する。輝度勾配算出手段102は、選択したSobelフィルタの係数を用いて、補間画像Saの各画素毎に輝度勾配強度および輝度勾配方向を算出する(ステップS49)。Sobelフィルタの係数を選択する点の他は、既に説明したステップS49と同様である。
When the interpolation image Sa is input, the brightness
輪郭抽出手段103は、パラメータ設定手段810が計算した輪郭抽出閾値Pcを用いて、補間画像Sa中で輪郭を表している画素を判定する(ステップS50)。パラメータ設定手段810が輪郭抽出閾値Pcを定める点の他は、既に説明したステップS50と同様である。
The
ステップS50後、代表色推定手段802および色補正手段803は、既に説明した台の実施形態の変形例と同様に、ステップS51〜S55の処理を行う。代表色推定手段802は、ステップS51において、輪郭抽出手段103から通知された輪郭を表す画素のみを選択対象とする。また、色補正手段803は、ステップS55において、補間画像Sa中の輪郭を表す各画素について、ステップS51以降の処理を完了しているか否かを判定する。輪郭を表す各画素のうち、ステップS51以降の処理が行われていない画素が残っていればステップS51以降の処理を繰り返す。輪郭を表す各画素についてステップS51以降の処理が完了していれば処理を終了する。
After step S50, the representative
本変形例においても、輪郭を表していない画素についてはステップS51以降の処理が省略されるので、処理を簡略して処理時間を短縮することができる。また、低解像度画像から補間画像Saへの拡大率が一定ではない場合であっても、拡大率に応じた適切なパラメータで輪郭を明瞭化することができる。 Also in the present modification, the processing after step S51 is omitted for pixels that do not represent an outline, so that the processing can be simplified and the processing time can be shortened. Even when the enlargement ratio from the low resolution image to the interpolated image Sa is not constant, the contour can be clarified with an appropriate parameter corresponding to the enlargement ratio.
次に、第2の実施形態の他の変形例について説明する。図24は、第2の実施形態の他の変形例を示すブロック図である。既に説明した構成要素と同様の構成要素については、図17、図20、図22と同一の符号を付す。図24に示すように、画像処理システムは、輝度勾配算出手段102、輪郭抽出手段103、代表色推定手段802、色補正手段803、パラメータ設定手段810に加えて、補間画像生成手段101を備えていてもよい。補間画像生成手段101は、第1の実施形態の変形例で示した補間画像生成手段101(図13参照)と同様の処理を行う。図24では、コンピュータ800が補間画像生成手段101を含む場合を示している。補間画像生成手段101は、プログラムに従って動作する中央処理装置によって実現されてもよい。すなわち、中央処理装置が、画像処理用プログラムを読み込み、画像処理用プログラムに従って、補間画像生成手段101、輝度勾配算出手段102、輪郭抽出手段103、代表色推定手段802、色補正手段803、パラメータ設定手段810として動作してもよい。
Next, another modification of the second embodiment will be described. FIG. 24 is a block diagram illustrating another modification of the second embodiment. Constituent elements similar to those already described are denoted by the same reference numerals as in FIGS. 17, 20, and 22. As shown in FIG. 24, the image processing system includes an interpolation
補間画像生成手段101には低解像度画像Siが入力され、補間画像生成手段101は補間によりその低解像度画像Siを拡大して補間画像Saを生成し、補間画像Saを輝度勾配算出手段102、代表色推定手段802および色補正手段803に出力する。すなわち、補間画像生成手段101は、低解像度画像Siの画素間に画素を内挿して、拡大画像である補間画像Saを生成する。補間画像生成手段101は、例えば、バイリニア補間あるいはバイキュービック補間により、低解像度画像Siを拡大する。
The low-resolution image Si is input to the interpolated image generating means 101, and the interpolated image generating means 101 enlarges the low-resolution image Si by interpolation to generate an interpolated image Sa, and the interpolated image Sa is used as the luminance gradient calculating means 102 and the representative. The data is output to the
また、パラメータ設定手段810には、生成すべき拡大画像の解像度が入力される。例えば、拡大後の補間画像Saの横幅(水平方向の画素数)が入力されてもよい。また、パラメータ設定手段810には、拡大前の低解像度画像Siの情報(例えば、低解像度画像Siの横幅)も入力される。パラメータ設定手段810は、入力された情報を用いて、拡大率Paを計算し、補間画像生成手段101に出力する。パラメータ設定手段810は、拡大率Paを計算した後、既に説明したように拡大率PaからPb,Pc,Pdの各パラメータを計算してもよい。この動作は、第1の実施形態の変形例で示したパラメータ設定手段110(図13参照)と同様の動作である。
In addition, the resolution of the enlarged image to be generated is input to the
補間画像生成手段101は、パラメータ設定手段810が計算した拡大率Paで低解像度画像Siを補間して補間画像Saを生成する。
The interpolated
図25は、本変形例の処理経過を示すフローチャートである。既に説明した処理と同様の処理については、図19および図21と同一の符号を付す。パラメータ設定手段810には、例えば、低解像度画像Siの横幅Wlおよびユーザの所望の補間画像Saの横幅Whが入力される。パラメータ設定手段810は、WlおよびWhが入力されると、Wh/Wlを計算することにより、拡大率Paを計算する。ただし、ここで示した拡大率Paの計算方法は一例であり、他の方法で拡大率Paを計算してもよい。パラメータ設定手段810は、計算した拡大率Paを補間画像生成手段101に出力する。また、パラメータ設定手段810は、その拡大率Paを用いて、輝度勾配算出用パラメータPb、輪郭抽出閾値Pcおよびブロック決定用パラメータPeを計算する(ステップS47)。パラメータ設定手段810は、Pbを輝度勾配算出手段102に出力し、Pcを輪郭抽出手段103に出力し、ブロック決定用パラメータPeを代表色推定手段802および色補正手段803に出力する。拡大率Paから、Pb,Pc,Pdを算出する動作は、既に説明した動作と同様である。
FIG. 25 is a flowchart showing the processing progress of this modification. The same processes as those already described are denoted by the same reference numerals as those in FIGS. For example, the horizontal width Wl of the low resolution image Si and the horizontal width Wh of the desired interpolation image Sa of the user are input to the parameter setting means 810. When Wl and Wh are input, the
補間画像生成手段101には、低解像度画像Siが入力される。ステップS47の後、補間画像生成手段101は、拡大率Paで低解像度画像Siを補間して、ユーザの所望の解像度の補間画像Saを生成する(ステップS48)。この処理は、第1の実施形態の変形例で説明したステップS10(図14参照)と同様である。 The low resolution image Si is input to the interpolated image generating means 101. After step S47, the interpolated image generating means 101 interpolates the low resolution image Si with the enlargement factor Pa to generate an interpolated image Sa having the user's desired resolution (step S48). This process is the same as step S10 (see FIG. 14) described in the modification of the first embodiment.
補間画像生成手段101は、低解像度画像Siに対して画素を補間して生成した補間画像Saを輝度勾配算出手段102、代表色推定手段802および色補正手段803に出力する。輝度勾配算出手段102は、パラメータ設定手段810が計算した輝度勾配算出用パラメータPbに応じたSobelフィルタの係数を選択する。輝度勾配算出手段102は、Sobelフィルタの係数を用いて、補間画像Saの各画素毎に輝度勾配強度および輝度勾配方向を算出し、各画素の輝度勾配強度および輝度勾配方向を輪郭抽出手段103に出力する(ステップS49)。輪郭抽出手段103は、パラメータ設定手段810が計算した輪郭抽出閾値Pcを用いて、補間画像Sa中で輪郭を表している画素を判定する(ステップS50)。
The interpolated
ステップS50後、代表色推定手段802および色補正手段803は、既に説明した台の実施形態の変形例と同様に、ステップS51〜S55の処理を行う。代表色推定手段802は、ステップS51において、輪郭抽出手段103から通知された輪郭を表す画素のみを選択対象とする。また、色補正手段803は、ステップS55において、補間画像Sa中の輪郭を表す各画素について、ステップS51以降の処理を完了しているか否かを判定する。輪郭を表す各画素のうち、ステップS51以降の処理が行われていない画素が残っていればステップS51以降の処理を繰り返す。輪郭を表す各画素についてステップS51以降の処理が完了していれば処理を終了する。
After step S50, the representative
本変形例によれば、補間画像生成手段101が低解像度画像Siに補間を行い補間画像Saを生成するので、低解像度画像Siを入力すれば、高品質の拡大画像を得ることができる。 According to this modification, the interpolation image generation means 101 interpolates the low resolution image Si to generate the interpolation image Sa. Therefore, if the low resolution image Si is input, a high quality enlarged image can be obtained.
また、パラメータ設定手段810を備える構成(例えば、図22、図24に示す構成)において、画像処理システムは、輝度勾配算出手段102および輪郭抽出手段103を備えていなくともよい。この場合、パラメータ設定手段810は、Pb,Pcを計算しなくてもよい。
In the configuration including the parameter setting unit 810 (for example, the configuration illustrated in FIGS. 22 and 24), the image processing system may not include the luminance
実施形態3.
図26は、本発明の第3の実施形態を示すブロック図である。本発明の第3の実施形態は、画像を圧縮して送信する画像圧縮装置600と、その画像を受信して伸長する画像伸長装置610とを含む画像伝送システムである。画像圧縮装置600と画像伸長装置610は、伝送路620を介して画像を送受信する。
Embodiment 3. FIG.
FIG. 26 is a block diagram showing a third embodiment of the present invention. The third embodiment of the present invention is an image transmission system including an
画像圧縮装置600には、高解像度の入力画像640が入力される。画像圧縮装置600は、入力画像640をダウンサンプリングした低解像度画像605と、そのダウンサンプリング後の画像と入力画像との残差606とを併せて圧縮データ607として、伝送路620に送出する。また、画像伸長装置610は、受信した圧縮データ607に含まれる低解像度画像605を拡大し、圧縮データ607に含まれる残差606と加算して、伸長画像615を生成する。以下、画像圧縮装置600および画像伸長装置610の構成を説明する。
A high-resolution input image 640 is input to the
画像圧縮装置600は、ローパス・ダウンサンプリング手段601と、拡大画像生成手段602と、画像減算手段603とを備える。
The
ローパス・ダウンサンプリング手段601には、入力画像(高解像度画像)604が入力される。なお、入力画像604は、画像減算手段603にも入力される。ローパス・ダウンサンプリング手段601は、入力画像604に対してローパスフィルタを適用し、入力画像604を所定の解像度にダウンサンプリングする。ダウンサンプリングとは、水平方向および垂直方向に並ぶ画素を周期的に取り除き、画像を低解像度化することをいう。ローパス・ダウンサンプリング手段601は、生成した低解像度画像605を伝送路620に送信し、また、拡大画像生成手段603に出力する。
An input image (high resolution image) 604 is input to the low-pass / down-sampling means 601. Note that the
拡大画像生成手段602は、ローパス・ダウンサンプリング手段601が生成した低解像度画像605を入力として、その低解像度画像605を入力画像604と同じ解像度の画像に拡大する。また、拡大画像生成手段602は、その拡大画像中の輪郭を明瞭化する画像処理を行い、その結果得られる画像を画像減算手段603に出力する。この処理は、第1の実施形態の変形例として説明した補間画像生成手段101を備える画像処理システム、または第2の実施形態の変形例として説明した補間画像生成手段101を備える画像処理システムが実行する処理と同様の処理である。
The enlarged
拡大画像生成手段602は、例えば、第1の実施形態の変形例として説明した補間画像生成手段101を備える画像処理システム(図13参照)によって実現される。また、パラメータ設定手段110が拡大率Pa、輝度勾配算出用パラメータPb、輪郭抽出閾値Pc、輪郭補正用パラメータPdを設定してもよい。パラメータ設定手段110が拡大率Paを計算するための情報(Wh,Wl)は、例えば、予め定めておけばよい。
The enlarged
拡大画像生成手段602は、第2の実施形態の変形例として説明した補間画像生成手段101を備える画像処理システム(図24参照)によって実現されてもよい。また、パラメータ設定手段110が拡大率Pa、輝度勾配算出用パラメータPb、輪郭抽出閾値Pc、ブロック決定用パラメータPeを設定してもよい。パラメータ設定手段810が拡大率Paを計算するための情報(Wh,Wl)は、例えば、予め定めておけばよい。
The enlarged
また、図13や図24に示すパラメータ設定手段110,810を備えずに、拡大率Pa、輝度勾配算出用パラメータPb、輪郭抽出閾値Pc、輪郭補正用パラメータPd、ブロック決定用パラメータPeが予め定められていてもよい。また、輝度勾配算出用パラメータPbの代わりに、Sobelフィルタの係数が予め定められていてもよい。 Further, without including the parameter setting means 110 and 810 shown in FIGS. 13 and 24, the enlargement ratio Pa, the luminance gradient calculation parameter Pb, the contour extraction threshold value Pc, the contour correction parameter Pd, and the block determination parameter Pe are determined in advance. It may be done. Further, instead of the luminance gradient calculation parameter Pb, a Sobel filter coefficient may be determined in advance.
画像減算手段603は、入力画像604と、拡大画像生成手段602が出力した高解像度画像(入力画像604と同じ解像度の画像)との残差606を計算する。入力画像604における座標(x,y)の画素の画素値をI1(x,y)とする。また、拡大画像生成手段602が生成した高解像度画像における座標(x,y)の画素の画素値をI2(x,y)とする。画像減算手段603は、入力画像604と拡大画像生成手段602が出力した高解像度画像の対応する各画素毎に(すなわち同じ座標の画素毎に)、I2(x,y)−I1(x,y)を計算する。この計算結果が残差606である。残差は、高解像度画像および入力画像604の対応する画素同士の画素値の差を表すデータである。
The
また、画像減算手段603は、ローパス・ダウンサンプリング手段601が低解像度画像605を送信するときに、併せてその残差606を送信する。低解像度画像605と残差606をあわせたデータが圧縮データ607である。
Further, the image subtracting means 603 also transmits the residual 606 when the low-pass / down-sampling means 601 transmits the low-
画像圧縮装置600は上記のような構成であり、ローパス・ダウンサンプリング手段601および画像減算手段603に入力画像604が入力されると、ローパス・ダウンサンプリング手段601はその入力画像604をダウンサンプリングして低解像度画像605を生成する。そして、拡大画像生成手段602は、その低解像度画像605を拡大し、画像減算手段603は、その結果得られた拡大画像と入寮画像との残差606を計算する。そして、ローパス・ダウンサンプリング手段601は、低解像度画像605を画像伸張装置610に送信し、画像減算手段603は、その低解像度画像605と併せて残差606を画像伸張装置610に送信する。
The
画像伸張装置610は、拡大画像生成手段611と、画像加算手段612とを備える。
The
画像伸長装置610は、受信した圧縮データ607から低解像度画像605と残差614とを取り出す。
The
拡大画像生成手段611には、受信した圧縮データ607中の低解像度画像605が入力される。拡大画像生成手段611は、低解像度画像605を入力として、その低解像度画像605を入力画像604と同じ解像度の画像に拡大する。また、拡大画像生成手段602は、その拡大画像中の輪郭を明瞭化する画像処理を行い、その結果得られる画像を画像加算手段612に出力する。この処理は、第1の実施形態の変形例として説明した補間画像生成手段101を備える画像処理システム、または第2の実施形態の変形例として説明した補間画像生成手段101を備える画像処理システムが実行する処理と同様の処理である。
The enlarged
画像伸張装置610が備える拡大画像生成手段611は、画像圧縮装置600が備える拡大画像生成手段602と同様であり、例えば、第1の実施形態の変形例として説明した補間画像生成手段101を備える画像処理システム(図13参照)によって実現される。また、例えば、第2の実施形態の変形例として説明した補間画像生成手段101を備える画像処理システム(図24参照)によって実現されてもよい。
An enlarged
画像加算手段612には、受信した圧縮データ607中の残差606が入力される。画像加算手段612は、拡大画像生成手段611が出力した拡大画像と、残差606とを加算する。拡大画像における座標(x,y)の画素の画素値をI3(x,y)とする。また、残差606における座標(x,y)の画素の画素値をI4(x,y)とする。画像加算手段612は、拡大画像生成手段611が生成した拡大画像と残差606の対応する画素毎に(すなわち同じ座標の画素毎に)、I3(x,y)+I4(x,y)を計算することで、目的とする高解像度の伸張画像615を生成する。
The residual 606 in the received compressed data 607 is input to the image adding means 612. The
画像伸張装置610は上記のような構成であり、拡大画像生成手段611に低解像度画像605が入力されると、拡大画像生成手段611はその低解像度画像605を拡大する。画像加算手段612は、その結果得られた拡大画像と残差606とを加算し、伸長画像615を生成する。
The
なお、画像圧縮装置600は、伝送路620を介して低解像度画像605および残差606を画像伸張装置610に送信する際、その低解像度画像605および残差606(圧縮データ605)を既存のデータ圧縮方法を用いてさらに圧縮してもよい。この場合、 画像伸張装置610は、その既存のデータ圧縮方法に対応するデータ伸長方法でデータを伸長してから、上記の処理を実行すればよい。
Note that when the
第3の実施形態によれば、画像伸張装置610は、第1の実施形態または第2の実施形態で説明した画像拡大処理を行うことで、受信した低解像度画像605から高品質な拡大画像を生成することができる。従って、画像圧縮装置601は、伝送路620を介して送信する残差のデータ量を削減することができる。
According to the third embodiment, the
以上、説明した実施形態には、代表色推定手段が、EMアルゴリズムにより、ブロック内の各画素の色が第1のクラスに属する確率と第2のクラスに属する確率と、第1のクラスおよび第2のクラスの代表色とを導出する構成が記載されている。 In the embodiment described above, the representative color estimation means uses the EM algorithm to determine the probability that the color of each pixel in the block belongs to the first class, the probability that the pixel belongs to the second class, the first class, and the first class. A configuration for deriving two classes of representative colors is described.
また、代表色推定手段が、補間画像中の各画素を選択し、選択した画素を中心とする画素のブロックを抽出する構成が記載されている。 In addition, a configuration is described in which the representative color estimation unit selects each pixel in the interpolated image and extracts a block of pixels centered on the selected pixel.
また、補間画像の各画素における輝度勾配の強度と輝度勾配の方向を計算する輝度勾配算出手段と、輝度勾配の強度と輝度勾配の方向とを用いて、補間画像内で輪郭を表す画素を判定する輪郭抽出手段とを備え、代表色推定手段が、補間画像中の輪郭を表す各画素を選択し、選択した画素を中心とする画素のブロックを抽出する構成が記載されている。 In addition, the luminance gradient calculating means for calculating the luminance gradient intensity and the luminance gradient direction in each pixel of the interpolation image, and the luminance gradient intensity and the luminance gradient direction are used to determine the pixel representing the contour in the interpolation image. A configuration in which the representative color estimation unit selects each pixel representing the contour in the interpolation image and extracts a block of pixels centered on the selected pixel.
また、輝度勾配算出手段が、輝度勾配の強度および輝度勾配の方向の計算対象画素を中心としてエッジ検出オペレータの係数と同じ配置となる複数の画素を特定し、特定した各画素それぞれについて、対応するエッジ検出オペレータの係数との積を計算し、その和を求めることにより、水平方向および垂直方向の輝度勾配を計算し、大きさが水平方向の輝度勾配であるベクトルと、大きさが垂直方向の輝度勾配であるベクトルとの合成ベクトルの大きさを計算対象画素の輝度勾配の強度とし、垂直方向の輝度勾配を水平方向の輝度勾配で除算した結果のアークタンジェントを輝度勾配の方向とし、輪郭抽出手段が、輪郭を表す画素であるか否かの判定対象画素を選択し、判定対象画素の輝度勾配の強度が輪郭抽出閾値より大きく、判定対象画素の輝度勾配の方向の隣接画素およびその方向を180°回転させた方向の隣接画素それぞれの輝度勾配の強度よりも大きいときに、判定対象画素は輪郭を表す画素であると判定する構成が記載されている。 In addition, the luminance gradient calculating unit specifies a plurality of pixels having the same arrangement as the coefficient of the edge detection operator around the calculation target pixel in the intensity of the luminance gradient and the direction of the luminance gradient, and corresponds to each of the specified pixels. By calculating the product of the coefficients of the edge detection operator and calculating the sum thereof, the luminance gradient in the horizontal direction and the vertical direction is calculated, and the vector whose magnitude is the luminance gradient in the horizontal direction and the magnitude in the vertical direction are calculated. Contour extraction with the magnitude of the combined vector with the brightness gradient vector as the intensity of the intensity gradient of the pixel to be calculated, and the arc tangent obtained by dividing the vertical intensity gradient by the horizontal intensity gradient as the intensity gradient direction The means selects a determination target pixel whether or not it is a pixel representing an outline, and the intensity of the luminance gradient of the determination target pixel is larger than the contour extraction threshold, and the determination target image A configuration is described in which a determination target pixel is a pixel representing an outline when the adjacent pixel in the direction of the luminance gradient is larger than the intensity of the luminance gradient of each adjacent pixel in the direction rotated by 180 °. ing.
また、拡大前の画像から補間画像への拡大率から、抽出するブロックの大きさを定めるためのブロック決定用パラメータを定めるパラメータ設定手段を備え、代表色推定手段が、選択した画素を中心とする画素のブロックとして、パラメータ設定手段が定めたブロック決定用パラメータに応じた大きさのブロックを抽出する構成が記載されている。 Further, the image processing apparatus includes parameter setting means for determining a block determination parameter for determining the size of a block to be extracted based on an enlargement ratio from an image before enlargement to an interpolated image, and the representative color estimation means is centered on the selected pixel. As a pixel block, a configuration is described in which a block having a size corresponding to a block determination parameter determined by a parameter setting unit is extracted.
また、パラメータ設定手段が、パラメータ設定手段に入力される拡大率からブロック決定用パラメータを定める構成が記載されている。 In addition, a configuration is described in which the parameter setting means determines the block determination parameter from the enlargement ratio input to the parameter setting means.
また、パラメータ設定手段が、予め定められた拡大率からブロック決定用パラメータを定める構成が記載されている。 In addition, a configuration is described in which the parameter setting means determines block determination parameters from a predetermined enlargement ratio.
また、拡大前の画像から補間画像への拡大率から、エッジ検出オペレータの係数を選択するための輝度勾配算出用パラメータと、輪郭抽出閾値と、抽出するブロックの大きさを定めるためのブロック決定用パラメータを定めるパラメータ設定手段を備え、輝度勾配算出手段が、予め複数種類のエッジ検出オペレータの係数を保持し、輝度勾配算出用パラメータに応じたエッジ検出オペレータの係数を用いて輝度勾配の強度および輝度勾配の方向を計算し、輪郭抽出手段が、パラメータ設定手段が定めた輪郭抽出閾値を用いて、輪郭を表す画素を特定し、代表色推定手段が、選択した画素を中心とする画素のブロックとして、パラメータ設定手段が定めたブロック決定用パラメータに応じた大きさのブロックを抽出する構成が記載されている。 Also, for determining the brightness gradient calculation parameter for selecting the coefficient of the edge detection operator from the enlargement ratio from the image before enlargement to the interpolated image, the contour extraction threshold, and the block determination for determining the size of the block to be extracted Parameter setting means for determining parameters is provided, and the luminance gradient calculating means holds the coefficients of a plurality of types of edge detection operators in advance, and uses the edge detection operator coefficients corresponding to the luminance gradient calculation parameters to determine the intensity and luminance of the luminance gradient. The direction of the gradient is calculated, the contour extracting unit specifies the pixel representing the contour using the contour extraction threshold determined by the parameter setting unit, and the representative color estimating unit determines the pixel block centered on the selected pixel. A configuration is described in which a block having a size corresponding to a block determining parameter determined by the parameter setting means is extracted.
また、パラメータ設定手段が、パラメータ設定手段に入力される拡大率から、輝度勾配算出用パラメータと、輪郭抽出閾値と、ブロック決定用パラメータとを定める構成が記載されている。 In addition, a configuration is described in which the parameter setting unit determines a luminance gradient calculation parameter, a contour extraction threshold value, and a block determination parameter from an enlargement ratio input to the parameter setting unit.
また、パラメータ設定手段が、予め定められた拡大率から、輝度勾配算出用パラメータと、輪郭抽出閾値と、ブロック決定用パラメータとを定める構成が記載されている。 In addition, a configuration is described in which the parameter setting means determines a luminance gradient calculation parameter, a contour extraction threshold value, and a block determination parameter from a predetermined magnification.
また、拡大対象画像が入力され、拡大対象画像の画素間に画素を内挿することにより、拡大対象画像を拡大した補間画像を生成する補間画像生成手段を備える構成が記載されている。 Further, there is described a configuration including an interpolation image generation unit that receives an enlargement target image and generates an interpolation image obtained by enlarging the enlargement target image by interpolating pixels between pixels of the enlargement target image.
本発明は、低解像度の静止画や動画から拡大された画像中の輪郭を明瞭にする画像処理を行う画像処理システムに好適に適用され、また、高解像度の静止画、動画を圧縮して伝送したり保存したりするシステムにも適用可能である。 The present invention is suitably applied to an image processing system that performs image processing for clarifying a contour in an image enlarged from a low-resolution still image or moving image, and also compresses and transmits a high-resolution still image or moving image. It can also be applied to systems that store and store data.
101 補間画像生成手段
102 輝度勾配算出手段
103 輪郭抽出手段
104 輪郭補正手段
110 パラメータ設定手段
802 代表色推定手段
803 色補正手段
810 パラメータ設定手段
DESCRIPTION OF
Claims (21)
前記第1のクラスおよび第2のクラスの代表色の距離が閾値以上であるときに、代表色推定手段が抽出したブロック内の個々の画素毎に当該画素の色が第1のクラスに属する確率が第2のクラスに属する確率よりも高いという条件が満たされる場合、前記画素の色を前記第1のクラスの代表色に置換し、前記条件が満たされない場合、前記画素の色を前記第2のクラスの代表色に置換し、一つの画素が複数のブロックに属する場合に、各ブロック毎に前記画素に対して導出された置換後の色の平均を前記画素の色とする色補正手段とを備える
ことを特徴とする画像処理システム。 Select a pixel in an interpolated image that is an enlarged image including pixels interpolated between pixels of the image before enlargement, extract a block of pixels centered on the selected pixel, and extract the pixels in the block Clustering colors into a first class and a second class, the probability that the color of each pixel in the block belongs to the first class, the probability that the pixel belongs to the second class, the first class and the Representative color estimation means for deriving a second class of representative colors;
Probability that the color of the pixel belongs to the first class for each individual pixel in the block extracted by the representative color estimation means when the distance between the representative colors of the first class and the second class is greater than or equal to a threshold value If the condition is higher than the probability of belonging to the second class, the color of the pixel is replaced with a representative color of the first class, and if the condition is not satisfied, the color of the pixel is changed to the second class. A color correcting unit that substitutes the average color of the replaced color derived for each block for each block when one pixel belongs to a plurality of blocks. An image processing system comprising:
請求項1に記載の画像処理システム。 The representative color estimation means uses the EM algorithm to determine the probability that the color of each pixel in the block belongs to the first class, the probability that the color belongs to the second class, the representative of the first class and the second class. The image processing system according to claim 1, wherein a color is derived.
請求項1または請求項2に記載の画像処理システム。 The image processing system according to claim 1, wherein the representative color estimation unit selects each pixel in the interpolated image and extracts a block of pixels centered on the selected pixel.
前記輝度勾配の強度と前記輝度勾配の方向とを用いて、前記補間画像内で輪郭を表す画素を判定する輪郭抽出手段とを備え、
代表色推定手段は、前記補間画像中の輪郭を表す各画素を選択し、選択した画素を中心とする画素のブロックを抽出する
請求項1または請求項2に記載の画像処理システム。 A luminance gradient calculating means for calculating the intensity of the luminance gradient and the direction of the luminance gradient in each pixel of the interpolation image;
Contour extraction means for determining pixels representing the contour in the interpolated image using the intensity of the luminance gradient and the direction of the luminance gradient;
The image processing system according to claim 1, wherein the representative color estimation unit selects each pixel representing an outline in the interpolated image, and extracts a block of pixels centered on the selected pixel.
輪郭抽出手段は、輪郭を表す画素であるか否かの判定対象画素を選択し、前記判定対象画素の輝度勾配の強度が輪郭抽出閾値より大きく、前記判定対象画素の輝度勾配の方向の隣接画素および前記方向を180°回転させた方向の隣接画素それぞれの輝度勾配の強度よりも大きいときに、前記判定対象画素は輪郭を表す画素であると判定する
請求項4に記載の画像処理システム。 The luminance gradient calculation means identifies a plurality of pixels having the same arrangement as the coefficient of the edge detection operator around the pixel to be calculated in the intensity of the luminance gradient and the direction of the luminance gradient, and detects a corresponding edge for each of the identified pixels. By calculating the product of the operator's coefficient and calculating the sum, the luminance gradient in the horizontal and vertical directions is calculated, and the vector whose magnitude is the horizontal luminance gradient and the luminance in the vertical direction are calculated. The magnitude of the combined vector with the vector that is the gradient is the intensity of the luminance gradient of the pixel to be calculated, and the arc tangent as a result of dividing the vertical luminance gradient by the horizontal luminance gradient is the luminance gradient direction,
The contour extraction unit selects a pixel to be determined as to whether or not the pixel represents a contour, the intensity of the luminance gradient of the determination target pixel is greater than a contour extraction threshold, and adjacent pixels in the direction of the luminance gradient of the determination target pixel 5. The image processing system according to claim 4, wherein the determination target pixel is determined to be a pixel representing an outline when the intensity gradient is greater than an intensity of a luminance gradient of each of adjacent pixels in a direction rotated by 180 °.
代表色推定手段は、選択した画素を中心とする画素のブロックとして、パラメータ設定手段が定めたブロック決定用パラメータに応じた大きさのブロックを抽出する
請求項1から請求項3のうちのいずれか1項に記載の画像処理システム。 Parameter setting means for determining a parameter for determining a block for determining the size of a block to be extracted from an enlargement ratio from the image before enlargement to the interpolated image,
The representative color estimation unit extracts a block having a size corresponding to the block determination parameter determined by the parameter setting unit as a block of pixels centered on the selected pixel. The image processing system according to item 1.
請求項6に記載の画像処理システム。 The image processing system according to claim 6, wherein the parameter setting unit determines a block determination parameter from an enlargement ratio input to the parameter setting unit.
請求項6に記載の画像処理システム。 The image processing system according to claim 6, wherein the parameter setting means determines a block determination parameter from a predetermined enlargement ratio.
輝度勾配算出手段は、予め複数種類のエッジ検出オペレータの係数を保持し、前記輝度勾配算出用パラメータに応じたエッジ検出オペレータの係数を用いて輝度勾配の強度および輝度勾配の方向を計算し、
輪郭抽出手段は、パラメータ設定手段が定めた前記輪郭抽出閾値を用いて、輪郭を表す画素を特定し、
代表色推定手段は、選択した画素を中心とする画素のブロックとして、パラメータ設定手段が定めたブロック決定用パラメータに応じた大きさのブロックを抽出する
請求項5に記載の画像処理システム。 For determining the brightness gradient calculation parameter for selecting the coefficient of the edge detection operator, the contour extraction threshold, and the block size for determining the size of the block to be extracted from the enlargement ratio from the image before enlargement to the interpolated image Equipped with parameter setting means for determining parameters,
The brightness gradient calculating means holds coefficients of a plurality of types of edge detection operators in advance, calculates the intensity of the brightness gradient and the direction of the brightness gradient using the edge detection operator coefficients according to the brightness gradient calculation parameters,
The contour extracting means identifies the pixel representing the contour using the contour extraction threshold determined by the parameter setting means,
The image processing system according to claim 5, wherein the representative color estimation unit extracts a block having a size corresponding to a block determination parameter determined by the parameter setting unit, as a block of pixels centered on the selected pixel.
請求項9に記載の画像処理システム。 The image processing system according to claim 9, wherein the parameter setting unit determines a luminance gradient calculation parameter, a contour extraction threshold value, and a block determination parameter from an enlargement ratio input to the parameter setting unit.
請求項9に記載の画像処理システム。 The image processing system according to claim 9, wherein the parameter setting means determines a luminance gradient calculation parameter, a contour extraction threshold value, and a block determination parameter from a predetermined magnification.
請求項1から請求項11のうちのいずれか1項に記載の画像処理システム。 An interpolation image generating unit that generates an interpolation image in which the enlargement target image is enlarged by interpolating pixels between pixels of the enlargement target image is input. The image processing system according to any one of the above.
前記低解像度画像を拡大する拡大画像生成手段と、
前記入力画像と前記低解像度画像の対応する画素同士の画素値の差である差分データを計算する画像減算手段とを備え、
前記拡大画像生成手段は、
拡大対象画像の画素間に画素を内挿することにより、前記拡大対象画像を拡大した補間画像を生成する補間画像生成手段と、
前記補間画像中の画素を選択し、選択した画素を中心とする画素のブロックを抽出し、前記ブロック内の画素の色を第1のクラスおよび第2のクラスにクラスタリングし、前記ブロック内の各画素の色が前記第1のクラスに属する確率と前記第2のクラスに属する確率と、前記第1のクラスおよび前記第2のクラスの代表色とを導出する代表色推定手段と、
前記第1のクラスおよび第2のクラスの代表色の距離が閾値以上であるときに、代表色推定手段が抽出したブロック内の個々の画素毎に当該画素の色が第1のクラスに属する確率が第2のクラスに属する確率よりも高いという条件が満たされる場合、前記画素の色を前記第1のクラスの代表色に置換し、前記条件が満たされない場合、前記画素の色を前記第2のクラスの代表色に置換し、一つの画素が複数のブロックに属する場合に、各ブロック毎に前記画素に対して導出された置換後の色の平均を前記画素の色とする色補正手段とを有する
ことを特徴とする画像圧縮装置。 Downsampling means for generating a low resolution image having a lower resolution than the input image by downsampling the input image;
An enlarged image generating means for enlarging the low resolution image;
Image subtracting means for calculating difference data which is a difference between pixel values of corresponding pixels of the input image and the low-resolution image;
The enlarged image generating means includes
Interpolation image generation means for generating an interpolation image obtained by enlarging the enlargement target image by interpolating pixels between pixels of the enlargement target image;
Selecting a pixel in the interpolated image, extracting a block of pixels centered on the selected pixel, clustering the color of the pixels in the block into a first class and a second class, Representative color estimation means for deriving a probability that a pixel color belongs to the first class, a probability that the color of the pixel belongs to the second class, and a representative color of the first class and the second class;
Probability that the color of the pixel belongs to the first class for each individual pixel in the block extracted by the representative color estimation means when the distance between the representative colors of the first class and the second class is greater than or equal to a threshold value If the condition is higher than the probability of belonging to the second class, the color of the pixel is replaced with a representative color of the first class, and if the condition is not satisfied, the color of the pixel is changed to the second class. A color correcting unit that substitutes the average color of the replaced color derived for each block for each block when one pixel belongs to a plurality of blocks. An image compression apparatus comprising:
請求項13に記載の画像圧縮装置。 The representative color estimation means uses the EM algorithm to determine the probability that the color of each pixel in the block belongs to the first class, the probability that the color belongs to the second class, the representative of the first class and the second class. The image compression apparatus according to claim 13, wherein a color is derived.
前記低解像度画像を拡大する拡大画像生成手段と、
前記拡大画像生成手段が拡大した画像と前記差分データの対応する画素同士の画素値の和を計算する画像加算手段とを備え、
前記拡大画像生成手段は、
拡大対象画像の画素間に画素を内挿することにより、前記拡大対象画像を拡大した補間画像を生成する補間画像生成手段と、
前記補間画像中の画素を選択し、選択した画素を中心とする画素のブロックを抽出し、前記ブロック内の画素の色を第1のクラスおよび第2のクラスにクラスタリングし、前記ブロック内の各画素の色が前記第1のクラスに属する確率と前記第2のクラスに属する確率と、前記第1のクラスおよび前記第2のクラスの代表色とを導出する代表色推定手段と、
前記第1のクラスおよび第2のクラスの代表色の距離が閾値以上であるときに、代表色推定手段が抽出したブロック内の個々の画素毎に当該画素の色が第1のクラスに属する確率が第2のクラスに属する確率よりも高いという条件が満たされる場合、前記画素の色を前記第1のクラスの代表色に置換し、前記条件が満たされない場合、前記画素の色を前記第2のクラスの代表色に置換し、一つの画素が複数のブロックに属する場合に、各ブロック毎に前記画素に対して導出された置換後の色の平均を前記画素の色とする色補正手段とを有する
ことを特徴とする画像伸張装置。 An image expansion device that receives a low-resolution image obtained by reducing the resolution of an original image and difference data that is a difference between pixel values of corresponding pixels of the original image and the low-resolution image, and expands the low-resolution image. There,
An enlarged image generating means for enlarging the low resolution image;
The enlarged image generating means includes an enlarged image and an image adding means for calculating a sum of pixel values of corresponding pixels of the difference data,
The enlarged image generating means includes
Interpolation image generation means for generating an interpolation image obtained by enlarging the enlargement target image by interpolating pixels between pixels of the enlargement target image;
Selecting a pixel in the interpolated image, extracting a block of pixels centered on the selected pixel, clustering the color of the pixels in the block into a first class and a second class, Representative color estimation means for deriving a probability that a pixel color belongs to the first class, a probability that the color of the pixel belongs to the second class, and a representative color of the first class and the second class;
Probability that the color of the pixel belongs to the first class for each individual pixel in the block extracted by the representative color estimation means when the distance between the representative colors of the first class and the second class is greater than or equal to a threshold value If the condition is higher than the probability of belonging to the second class, the color of the pixel is replaced with a representative color of the first class, and if the condition is not satisfied, the color of the pixel is changed to the second class. A color correcting unit that substitutes the average color of the replaced color derived for each block for each block when one pixel belongs to a plurality of blocks. An image expansion apparatus characterized by comprising:
請求項15に記載の画像伸張装置。 The representative color estimation means uses the EM algorithm to determine the probability that the color of each pixel in the block belongs to the first class, the probability that the color belongs to the second class, the representative of the first class and the second class. The image expansion device according to claim 15, wherein a color is derived.
前記画像圧縮装置は、
入力画像をダウンサンプリングすることにより、前記入力画像よりも解像度の低い低解像度画像を生成し、前記低解像度画像を前記画像伸張装置に送信するダウンサンプリング手段と、
前記低解像度画像を拡大する第1の拡大画像生成手段と、
前記入力画像と前記低解像度画像の対応する画素同士の画素値の差である差分データを計算し、前記差分データを前記画像伸張装置に送信する画像減算手段とを有し、
前記画像伸張装置は、
前記画像圧縮装置から受信した低解像度画像を拡大する第2の拡大画像生成手段と、
前記第2の拡大画像生成手段が拡大した画像と、前記画像圧縮装置から受信した差分データの対応する画素同士の画素値の和を計算する画像加算手段とを有し、
前記第1の拡大画像生成手段および前記第2の拡大画像生成手段は、
拡大対象画像の画素間に画素を内挿することにより、前記拡大対象画像を拡大した補間画像を生成する補間画像生成手段と、
前記補間画像中の画素を選択し、選択した画素を中心とする画素のブロックを抽出し、前記ブロック内の画素の色を第1のクラスおよび第2のクラスにクラスタリングし、前記ブロック内の各画素の色が前記第1のクラスに属する確率と前記第2のクラスに属する確率と、前記第1のクラスおよび前記第2のクラスの代表色とを導出する代表色推定手段と、
前記第1のクラスおよび第2のクラスの代表色の距離が閾値以上であるときに、代表色推定手段が抽出したブロック内の個々の画素毎に当該画素の色が第1のクラスに属する確率が第2のクラスに属する確率よりも高いという条件が満たされる場合、前記画素の色を前記第1のクラスの代表色に置換し、前記条件が満たされない場合、前記画素の色を前記第2のクラスの代表色に置換し、一つの画素が複数のブロックに属する場合に、各ブロック毎に前記画素に対して導出された置換後の色の平均を前記画素の色とする色補正手段とを含む
ことを特徴とする画像伝送システム。 An image compression device and an image expansion device;
The image compression device includes:
Down-sampling means for generating a low-resolution image having a lower resolution than the input image by down-sampling the input image, and transmitting the low-resolution image to the image expansion device;
First enlarged image generating means for enlarging the low resolution image;
Image subtraction means for calculating difference data that is a difference between pixel values of corresponding pixels of the input image and the low-resolution image, and transmitting the difference data to the image expansion device;
The image expansion device includes:
Second enlarged image generating means for enlarging the low resolution image received from the image compression device;
An image enlarged by the second enlarged image generating means, and an image adding means for calculating a sum of pixel values of corresponding pixels of the difference data received from the image compression device;
The first enlarged image generating means and the second enlarged image generating means are:
Interpolation image generation means for generating an interpolation image obtained by enlarging the enlargement target image by interpolating pixels between pixels of the enlargement target image;
Selecting a pixel in the interpolated image, extracting a block of pixels centered on the selected pixel, clustering the color of the pixels in the block into a first class and a second class, Representative color estimation means for deriving a probability that a pixel color belongs to the first class, a probability that the color of the pixel belongs to the second class, and a representative color of the first class and the second class;
Probability that the color of the pixel belongs to the first class for each individual pixel in the block extracted by the representative color estimation means when the distance between the representative colors of the first class and the second class is greater than or equal to a threshold value If the condition is higher than the probability of belonging to the second class, the color of the pixel is replaced with a representative color of the first class, and if the condition is not satisfied, the color of the pixel is changed to the second class. A color correcting unit that substitutes the average color of the replaced color derived for each block for each block when one pixel belongs to a plurality of blocks. An image transmission system comprising:
前記第1のクラスおよび第2のクラスの代表色の距離が閾値以上であるときに、代表色推定ステップで抽出したブロック内の個々の画素毎に当該画素の色が第1のクラスに属する確率が第2のクラスに属する確率よりも高いという条件が満たされる場合、前記画素の色を前記第1のクラスの代表色に置換し、前記条件が満たされない場合、前記画素の色を前記第2のクラスの代表色に置換し、一つの画素が複数のブロックに属する場合に、各ブロック毎に前記画素に対して導出された置換後の色の平均を前記画素の色とする色補正ステップとを含む
ことを特徴とする画像処理方法。 Select a pixel in an interpolated image that is an enlarged image including pixels interpolated between pixels of the image before enlargement, extract a block of pixels centered on the selected pixel, and extract the pixels in the block Clustering colors into a first class and a second class, the probability that the color of each pixel in the block belongs to the first class, the probability that the pixel belongs to the second class, the first class and the A representative color estimation step for deriving a second class of representative colors;
Probability that the color of the pixel belongs to the first class for each individual pixel in the block extracted in the representative color estimation step when the distance between the representative colors of the first class and the second class is greater than or equal to a threshold value If the condition is higher than the probability of belonging to the second class, the color of the pixel is replaced with a representative color of the first class, and if the condition is not satisfied, the color of the pixel is changed to the second class. A color correction step in which, when one pixel belongs to a plurality of blocks, the average color of the replaced color derived for each block is used as the color of the pixel. An image processing method characterized by comprising:
請求項18に記載の画像処理方法。 In the representative color estimation step, the probability that the color of each pixel in the block belongs to the first class, the probability that the color of each pixel in the block belongs to the second class, the representative of the first class and the second class, by the EM algorithm The image processing method according to claim 18, wherein a color is derived.
拡大前の画像の画素間に内挿された画素を含む拡大された画像である補間画像中の画素を選択し、選択した画素を中心とする画素のブロックを抽出し、前記ブロック内の画素の色を第1のクラスおよび第2のクラスにクラスタリングし、前記ブロック内の各画素の色が前記第1のクラスに属する確率と前記第2のクラスに属する確率と、前記第1のクラスおよび前記第2のクラスの代表色とを導出する代表色推定処理、および
前記第1のクラスおよび第2のクラスの代表色の距離が閾値以上であるときに、代表色推定処理で抽出したブロック内の個々の画素毎に当該画素の色が第1のクラスに属する確率が第2のクラスに属する確率よりも高いという条件が満たされる場合、前記画素の色を前記第1のクラスの代表色に置換し、前記条件が満たされない場合、前記画素の色を前記第2のクラスの代表色に置換し、一つの画素が複数のブロックに属する場合に、各ブロック毎に前記画素に対して導出された置換後の色の平均を前記画素の色とする色補正処理
を実行させるための画像処理プログラム。 On the computer,
Select a pixel in an interpolated image that is an enlarged image including pixels interpolated between pixels of the image before enlargement, extract a block of pixels centered on the selected pixel, and extract the pixels in the block Clustering colors into a first class and a second class, the probability that the color of each pixel in the block belongs to the first class, the probability that the pixel belongs to the second class, the first class and the A representative color estimation process for deriving a representative color of the second class; and a distance in the block extracted by the representative color estimation process when a distance between the representative colors of the first class and the second class is greater than or equal to a threshold value If the condition that the probability that the color of the pixel belongs to the first class is higher than the probability that the pixel belongs to the second class is satisfied for each pixel, the color of the pixel is replaced with the representative color of the first class And the above conditions are met If not, the color of the pixel is replaced with the representative color of the second class, and when one pixel belongs to a plurality of blocks, the color of the replaced color derived for the pixel for each block An image processing program for executing color correction processing using an average as the color of the pixel.
代表色推定処理で、EMアルゴリズムにより、ブロック内の各画素の色が前記第1のクラスに属する確率と前記第2のクラスに属する確率と、前記第1のクラスおよび前記第2のクラスの代表色とを導出させる
請求項20に記載の画像処理プログラム。 In the computer,
In the representative color estimation process, the probability that the color of each pixel in the block belongs to the first class, the probability that the color of each pixel in the block belongs to the second class, the representative of the first class and the second class, by the EM algorithm. The image processing program according to claim 20, wherein a color is derived.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2007332030A JP2009157449A (en) | 2007-12-25 | 2007-12-25 | Image processing system, image processing method, and program for image processing |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2007332030A JP2009157449A (en) | 2007-12-25 | 2007-12-25 | Image processing system, image processing method, and program for image processing |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2009157449A true JP2009157449A (en) | 2009-07-16 |
Family
ID=40961446
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2007332030A Pending JP2009157449A (en) | 2007-12-25 | 2007-12-25 | Image processing system, image processing method, and program for image processing |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2009157449A (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2014069052A1 (en) * | 2012-10-31 | 2014-05-08 | Eizo株式会社 | Magnification factor estimation device and method for same |
JP2016038654A (en) * | 2014-08-06 | 2016-03-22 | セイコーエプソン株式会社 | Image processing apparatus, contour extraction method, and program |
US9524538B2 (en) | 2014-09-19 | 2016-12-20 | Fujitsu Ten Limited | Image processing apparatus |
CN111192285A (en) * | 2018-07-25 | 2020-05-22 | 腾讯医疗健康(深圳)有限公司 | Image segmentation method, image segmentation device, storage medium and computer equipment |
-
2007
- 2007-12-25 JP JP2007332030A patent/JP2009157449A/en active Pending
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2014069052A1 (en) * | 2012-10-31 | 2014-05-08 | Eizo株式会社 | Magnification factor estimation device and method for same |
JP2014089659A (en) * | 2012-10-31 | 2014-05-15 | Eizo Corp | Magnification estimation device and method thereof |
US9652689B2 (en) | 2012-10-31 | 2017-05-16 | Eizo Corporation | Magnification factor estimation device and method for same |
JP2016038654A (en) * | 2014-08-06 | 2016-03-22 | セイコーエプソン株式会社 | Image processing apparatus, contour extraction method, and program |
US9524538B2 (en) | 2014-09-19 | 2016-12-20 | Fujitsu Ten Limited | Image processing apparatus |
CN111192285A (en) * | 2018-07-25 | 2020-05-22 | 腾讯医疗健康(深圳)有限公司 | Image segmentation method, image segmentation device, storage medium and computer equipment |
CN111192285B (en) * | 2018-07-25 | 2022-11-04 | 腾讯医疗健康(深圳)有限公司 | Image segmentation method, image segmentation device, storage medium and computer equipment |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP5229235B2 (en) | Image processing apparatus, image processing method, image expansion apparatus, image compression apparatus, image transmission system, and image processing program | |
US9679357B2 (en) | Image processing device, and an image processing method | |
US8363985B2 (en) | Image generation method and apparatus, program therefor, and storage medium which stores the program | |
JP6164564B1 (en) | Image processing apparatus, image processing method, recording medium, program, and imaging apparatus | |
JP2017092872A (en) | Image processing apparatus and image processing method | |
JP2007213125A (en) | Image processor and processing method, recording medium, and program | |
JP5295431B2 (en) | Image processing device | |
JP6046927B2 (en) | Image processing apparatus and control method thereof | |
US8948502B2 (en) | Image processing method, and image processor | |
JP2009157449A (en) | Image processing system, image processing method, and program for image processing | |
WO2015198368A1 (en) | Image processing device and image processing method | |
JP4868249B2 (en) | Video signal processing device | |
JPWO2017203941A1 (en) | IMAGE PROCESSING APPARATUS, IMAGE PROCESSING METHOD, AND PROGRAM | |
JP5042251B2 (en) | Image processing apparatus and image processing method | |
US9589324B1 (en) | Overshoot protection of upscaled images | |
US8675998B2 (en) | Method and apparatus for high frequency component smoothing, and image display apparatus | |
KR102470242B1 (en) | Image processing device, image processing method and program | |
JPWO2015198368A1 (en) | Image processing apparatus and image processing method | |
KR101711589B1 (en) | Method and Apparatus of Dictionary Design on Super-Resolution, and Generating Super-Resolution Image based on the Dictionary | |
US9008463B2 (en) | Image expansion apparatus for performing interpolation processing on input image data, and image expansion method thereof | |
JP2005293265A (en) | Image processing device, and method | |
WO2020000333A1 (en) | Image processing method and apparatus | |
JPWO2015083502A1 (en) | Image processing apparatus, method, and program | |
JP2015106318A (en) | Image processor and image processing method | |
JP5762006B2 (en) | Image processing apparatus and image processing method |