JP5175820B2 - Image compression apparatus, image compression decoding apparatus, image compression program, and image compression decoding program - Google Patents

Image compression apparatus, image compression decoding apparatus, image compression program, and image compression decoding program Download PDF

Info

Publication number
JP5175820B2
JP5175820B2 JP2009226313A JP2009226313A JP5175820B2 JP 5175820 B2 JP5175820 B2 JP 5175820B2 JP 2009226313 A JP2009226313 A JP 2009226313A JP 2009226313 A JP2009226313 A JP 2009226313A JP 5175820 B2 JP5175820 B2 JP 5175820B2
Authority
JP
Japan
Prior art keywords
pixel
scanning direction
peak
image
encoding
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.)
Expired - Fee Related
Application number
JP2009226313A
Other languages
Japanese (ja)
Other versions
JP2011077766A (en
Inventor
信二 林
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Kyocera Document Solutions Inc
Original Assignee
Kyocera Document Solutions Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Kyocera Document Solutions Inc filed Critical Kyocera Document Solutions Inc
Priority to JP2009226313A priority Critical patent/JP5175820B2/en
Publication of JP2011077766A publication Critical patent/JP2011077766A/en
Application granted granted Critical
Publication of JP5175820B2 publication Critical patent/JP5175820B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)
  • Compression Of Band Width Or Redundancy In Fax (AREA)
  • Compression, Expansion, Code Conversion, And Decoders (AREA)

Description

本発明は、画像データを圧縮・復号するための画像圧縮装置、画像圧縮復号装置、画像圧縮プログラム及び画像圧縮復号プログラムに関するものである。   The present invention relates to an image compression apparatus, an image compression / decoding apparatus, an image compression program, and an image compression / decoding program for compressing / decoding image data.

近年、デジタル機器の発展に伴って、画像データ等の様々な圧縮方式が提案されているが、圧縮方式の1つとしてJPEG(Joint Photographic Experts Group)2000が知られている。JPEG2000は画像の圧縮・展開の方法を規定したもので、JPEGを発展させたものである。JPEG2000は、画像データを複数のタイルに分割し、タイル毎にウェーブレット変換、量子化、そしてビットプレーン毎に算術符号化による圧縮処理を行っている。   In recent years, with the development of digital devices, various compression methods for image data and the like have been proposed, and JPEG (Joint Photographic Experts Group) 2000 is known as one of the compression methods. JPEG2000 defines an image compression / decompression method, and is an extension of JPEG. JPEG2000 divides image data into a plurality of tiles, and performs compression processing by wavelet transform, quantization for each tile, and arithmetic coding for each bit plane.

通常、ウェーブレット変換後の画像では高周波成分が少なく、ほぼ均一なデータ(変換係数)が得られるため、符号化効率が向上する。しかし、網点画像においては、ウェーブレット変換後に多くの高周波成分が残ることになり、このような状態で通常の順序で算術符号化処理を行うと、符号化効率が悪くなる傾向にあった。   Usually, an image after wavelet transform has few high-frequency components and almost uniform data (transform coefficient) can be obtained, so that the coding efficiency is improved. However, in a halftone image, many high-frequency components remain after wavelet transform, and when arithmetic coding processing is performed in a normal order in such a state, the coding efficiency tends to deteriorate.

そこで、特許文献1には、画像内における文字、網点、グレー画像等を判別し、網点領域は2値化して符号化を行う方法について記載されている。   Therefore, Patent Document 1 describes a method of performing encoding by discriminating characters, halftone dots, gray images, and the like in an image and binarizing the halftone area.

特開2007−189275号公報JP 2007-189275 A

しかし、特許文献1に記載されているような方法の場合、網点の細部が保存されず、復号後の画質が落ちてしまう問題があった。   However, in the case of the method described in Patent Document 1, there is a problem that details of halftone dots are not preserved and the image quality after decoding deteriorates.

本発明は、上記の問題を解決するためになされたもので、符号化処理を行う際の画素値の読み出し順序を適宜変更して、復号後の画質を落とすことなく符号化効率を改善させる画像圧縮装置、画像圧縮復号装置、画像圧縮プログラム及び画像圧縮復号プログラムを提供することを目的とするものである。   The present invention has been made to solve the above-described problem, and an image that improves the coding efficiency without degrading the image quality after decoding by appropriately changing the reading order of pixel values when performing the coding process. It is an object of the present invention to provide a compression device, an image compression / decoding device, an image compression program, and an image compression / decoding program.

請求項1に記載の発明の画像圧縮装置は、入力された網点画像の画像データを輝度成分と色差成分からなる表色系に変換する変換手段と、前記変換された画像データを複数のタイルに分割する分割手段と、前記タイル毎にウェーブレット変換を施して前記タイルをLL、HL、LH及びHHサブバンドに分解し、かつ、前記ウェーブレット変換を施して得られた係数データをサブバンド毎の画像をそれぞれ表す複数の画素値として主走査方向成分と副走査方向成分とからなる画素マトリクスに配置するウェーブレット変換手段と、前記各画素マトリクスに配置された前記複数の各画素値を量子化する量子化手段と、前記量子化手段で量子化された前記画素値を前記画素マトリクスから順次読み出して符号化を行い、符号化データを出力する符号化手段と、前記符号化手段が前記サブバンドの符号化を行う際の前記画素値の前記画素マトリクスからの読み出し順序として、ウエーブレット変換後のHLサブバンドの領域では主走査方向に連続して読み出し、ウエーブレット変換後のLHサブバンドの領域では副走査方向に連続して読み出し、ウエーブレット変換後のLLサブバンドの領域では、1行目の一番左の画素より主走査方向に2画素連続して画素値を読み出し、次に2行目の一番左の画素より主走査方向に2画素連続して画素値を読み出し、次に1行目の左から3画素目の画素より主走査方向に2画素連続して画素値を読み出し、次に2行目の左から3画素目の画素より主走査方向に2画素連続して画素値を読み出し、ウエーブレット変換後のHHサブバンドの領域では、1列目の一番上の画素より副走査方向に2画素連続して画素値を読み出し、次に2列目の一番上の画素より副走査方向に2画素連続して画素値を読み出し、次に3列目の一番上の画素より副走査方向に2画素連続して画素値を読み出し、次に4列目の一番上の画素より副走査方向に2画素連続して画素値を読み出す順序を前記サブバンド毎に記憶する記憶手段と、を備え、前記符号化手段は、前記記憶手段に記憶された読み出し順序に従って前記サブバンドに含まれる前記画素値を読み出して符号化を行うものである。 The image compression apparatus according to claim 1 is a conversion means for converting the image data of the input halftone image into a color system comprising a luminance component and a color difference component; and the converted image data is converted into a plurality of tiles. A division means for dividing the tile into LL, HL, LH and HH subbands by performing wavelet transform for each tile, and the coefficient data obtained by performing the wavelet transform for each subband Wavelet transform means arranged in a pixel matrix comprising a main scanning direction component and a sub-scanning direction component as a plurality of pixel values respectively representing an image, and a quantum for quantizing the plurality of pixel values arranged in each pixel matrix and means, each of said pixel values quantized by the quantization means performs sequentially reads coded from the pixel matrix, and outputs the encoded data Continuous and Goka unit, as readout order from the pixel matrix of the pixel values when performing encoding of the encoding means the sub-band, in the main scanning direction in the region of the HL subband after wavelet transform Then, in the LH subband region after wavelet conversion, reading is continuously performed in the sub-scanning direction, and in the LL subband region after wavelet conversion, in the main scanning direction from the leftmost pixel in the first row. Read the pixel value continuously for two pixels, then read the pixel value continuously for two pixels in the main scanning direction from the leftmost pixel in the second row, and then from the third pixel from the left in the first row Read out the pixel values of 2 pixels in the main scanning direction, then read out the pixel values of 2 pixels in the main scanning direction from the 3rd pixel from the left in the second row, and the HH subband after wavelet conversion In the area of Read out pixel values from the top pixel in the first column in the sub-scanning direction, and then read out pixel values from the top pixel in the second column in the sub-scanning direction. Next, the pixel values are continuously read out in the sub-scanning direction from the top pixel in the third column, and then the pixel values are successively read out in the sub-scanning direction from the top pixel in the fourth column. Storage means for storing the reading order for each subband, and the encoding means reads and encodes the pixel values included in the subband according to the reading order stored in the storage means It is.

また、請求項に記載の発明の画像圧縮プログラムは、コンピュータを、入力された網点画像の画像データを輝度成分と色差成分からなる表色系に変換する変換手段、前記変換された画像データを複数のタイルに分割する分割手段、前記タイル毎にウェーブレット変換を施して前記タイルをLL、HL、LH及びHHサブバンドに分解し、かつ、前記ウェーブレット変換を施して得られた係数データをサブバンド毎の画像をそれぞれ表す複数の画素値として主走査方向成分と副走査方向成分とからなる画素マトリクスに配置するウェーブレット変換手段、前記各画素マトリクスに配置された前記複数の画素値を量子化する量子化手段、前記量子化手段で量子化された前記各画素値を前記画素マトリクスから読み出して符号化を行い、符号化データを出力する符号化手段、として機能させ前記符号化手段が前記サブバンドの符号化を行う際の前記画素値の前記画素マトリクスからの読み出し順序として、ウエーブレット変換後のHLサブバンドの領域では主走査方向に連続して読み出し、ウエーブレット変換後のLHサブバンドの領域では副走査方向に連続して読み出し、ウエーブレット変換後のLLサブバンドの領域では、1行目の一番左の画素より主走査方向に2画素連続して画素値を読み出し、次に2行目の一番左の画素より主走査方向に2画素連続して画素値を読み出し、次に1行目の左から3画素目の画素より主走査方向に2画素連続して画素値を読み出し、次に2行目の左から3画素目の画素より主走査方向に2画素連続して画素値を読み出し、ウエーブレット変換後のHHサブバンドの領域では、1列目の一番上の画素より副走査方向に2画素連続して画素値を読み出し、次に2列目の一番上の画素より副走査方向に2画素連続して画素値を読み出し、次に3列目の一番上の画素より副走査方向に2画素連続して画素値を読み出し、次に4列目の一番上の画素より副走査方向に2画素連続して画素値を読み出すものである。 According to a fifth aspect of the present invention, there is provided an image compression program for converting a computer image data of an input halftone image into a color system comprising a luminance component and a color difference component, and the converted image data. Dividing means for dividing the tile into a plurality of tiles, wavelet transform is performed for each tile to decompose the tiles into LL, HL, LH and HH subbands, and the coefficient data obtained by performing the wavelet transform is sub- Wavelet transform means arranged in a pixel matrix composed of main scanning direction components and sub-scanning direction components as a plurality of pixel values respectively representing an image for each band, and the plurality of pixel values arranged in each pixel matrix are quantized performs coding quantization means, each of said pixel values quantized by the quantization means reads from the pixel matrix, codes Cadet Coding means for outputting data, to function as the encoding means as a reading order from the pixel matrix of the pixel values when performing encoding of the sub-bands, the HL sub-band after wavelet transformation In the area, continuous reading is performed in the main scanning direction, in the LH subband area after wavelet conversion, continuous reading is performed in the subscanning direction, and in the LL subband area after wavelet conversion, the leftmost line in the first row The pixel value is read out continuously from the pixel in the main scanning direction by two pixels, then the pixel value is read out continuously from the leftmost pixel of the second row in the main scanning direction, and then the left side of the first row. 2 pixel values are read out continuously from the 3rd pixel in the main scanning direction from the 3rd pixel, and then 2 pixel values are read out continuously from the 3rd pixel from the left in the 2nd row in the main scanning direction. Let transform In the HH sub-band region, the pixel value is read in succession in the sub-scanning direction from the top pixel in the first column, and then in the sub-scanning direction from the top pixel in the second column. Read out pixel values continuously, then read out the pixel values in succession in the sub-scanning direction from the top pixel in the third column, and then in the sub-scanning direction from the top pixel in the fourth column The pixel value is read out continuously for two pixels .

これらの構成によれば、記憶手段に記憶させるサブバンド毎の読み出し順序をできるだけ特定の周波数成分(例えば高周波成分)が連続して読み出されるように設定することにより、符号化手段は特定の周波数成分を連続して読み出して符号化することになる。従って、符号化効率を改善することができる。   According to these configurations, the encoding unit sets the specific frequency component by setting the reading order for each subband stored in the storage unit so that a specific frequency component (for example, a high frequency component) is continuously read as much as possible. Are continuously read and encoded. Therefore, encoding efficiency can be improved.

網点画像においては、離散ウェーブレット変換後のサブバンドの高周波成分に特定の周波数成分が残り、符号化効率を悪化させる原因となっていた。その特定の周波数成分は、サブバンドのHL領域では主走査方向に連続するパターンとなり、LH領域では副走査方向に連続したパターンとして表れる。そこで、記憶手段は、各サブバンドの画素値の読み出し順序としてLL及びHLサブバンドは主走査方向に連続する順序、LH及びHHサブバンドは副走査方向に連続する順序を記憶することによって、符号化手段はサブバンドの特徴に応じて画素値の読み出し順序を変更することができ、符号化効率を改善することができる。   In the halftone image, a specific frequency component remains in the high-frequency component of the subband after the discrete wavelet transform, which causes the encoding efficiency to deteriorate. The specific frequency component becomes a pattern continuous in the main scanning direction in the HL region of the subband, and appears as a pattern continuous in the sub-scanning direction in the LH region. Therefore, the storage means stores the order in which the LL and HL subbands are continuous in the main scanning direction and the order in which the LH and HH subbands are continuous in the sub-scanning direction as the reading order of the pixel values of each subband. The encoding unit can change the reading order of the pixel values according to the characteristics of the subband, and can improve the encoding efficiency.

請求項に記載の発明の画像圧縮装置は、入力された網点画像の画像データを輝度成分と色差成分からなる表色系に変換する変換手段と、前記変換された画像データを複数のタイルに分割する分割手段と、前記タイル毎にウェーブレット変換を施して前記タイルをLL、HL、LH及びHHサブバンドに分解し、かつ、前記ウェーブレット変換を施して得られた係数データをサブバンド毎の画像をそれぞれ表す複数の画素値として主走査方向成分と副走査方向成分とからなる画素マトリクスに配置するウェーブレット変換手段と、前記各画素マトリクスに配置された前記複数の画素値を量子化する量子化手段と、前記量子化手段で量子化された前記画素値を前記画素マトリクスから順次読み出して符号化を行い、符号化データを出力する符号化手段と、前記サブバンドを構成する画素のうち濃度がピークとなっているピーク画素を検出する検出手段と、前記検出されたピーク画素の周辺画素の画素値を用いて当該ピーク画素内における濃度のピーク位置を求める決定手段と、前記符号化手段が前記サブバンドの符号化を行う際の前記各画素値を前記画素マトリクスから読み出すための順序であって、前記ピーク画素の位置及び当該ピーク画素内における濃度のピーク位置に応じてそれぞれ異なる順序を読み出し順序として記憶する記憶手段と、を備え、前記符号化手段は、前記検出手段が検出したピーク画素の位置及び前記決定手段が求めた当該ピーク画素内における濃度のピーク位置に応じて前記記憶手段から前記読み出し順序を読み出し、当該読み出された読み出し順序に従って前記サブバンドの画素値を読み出して符号化を行うものである。 According to a second aspect of the present invention, there is provided an image compressing apparatus according to a second aspect of the present invention, comprising: converting means for converting input image data of a halftone image into a color system comprising a luminance component and a color difference component; and converting the converted image data into a plurality of tiles. A division means for dividing the tile into LL, HL, LH and HH subbands by performing wavelet transform for each tile, and the coefficient data obtained by performing the wavelet transform for each subband Wavelet transform means arranged in a pixel matrix comprising a main scanning direction component and a sub-scanning direction component as a plurality of pixel values each representing an image, and quantization for quantizing the plurality of pixel values arranged in each pixel matrix means and, each of said pixel values quantized by the quantization means performs sequentially reads coded from the pixel matrix, marks and outputs the encoded data A detecting means for detecting a peak pixel having a peak density among the pixels constituting the subband, and a density in the peak pixel using pixel values of pixels around the detected peak pixel. Determining means for obtaining a peak position of the pixel, and an order for reading out each pixel value from the pixel matrix when the encoding means performs encoding of the subband, the position of the peak pixel and the peak pixel Storage means for storing a different order as a reading order depending on the peak position of the density in the image, and the encoding means includes the peak pixel position detected by the detection means and the peak obtained by the determination means. reading the reading sequence from the storage means in accordance with the peak position of the density in a pixel, follow the corresponding read read order And it performs coding reads each pixel value of the sub-band Te.

また、請求項に記載の発明の画像圧縮プログラムは、コンピュータを、入力された網点画像の画像データを輝度成分と色差成分からなる表色系に変換する変換手段、前記変換された画像データを複数のタイルに分割する分割手段、前記タイル毎にウェーブレット変換を施して前記タイルをLL、HL、LH及びHHサブバンドに分解し、かつ、前記ウェーブレット変換を施して得られた係数データをサブバンド毎の画像をそれぞれ表す複数の画素値として主走査方向成分と副走査方向成分とからなる画素マトリクスに配置するウェーブレット変換手段、前記各画素マトリクスに配置された前記複数の画素値を量子化する量子化手段、前記量子化手段で量子化された前記各画素値を前記画素マトリクスから順次読み出して符号化を行い、符号化データを出力する符号化手段、前記サブバンドを構成する画素のうち濃度がピークとなっているピーク画素を検出する検出手段、前記検出されたピーク画素の周辺画素の画素値を用いて当該ピーク画素内における濃度のピーク位置を求める決定手段、として機能させ、前記検出手段が検出したピーク画素の位置及び前記決定手段が求めた当該ピーク画素内における濃度のピーク位置に応じてそれぞれ異なる読み出し順序で前記サブバンドに含まれる前記各画素値を前記画素マトリクスから読み出して符号化を行うものである。 According to a sixth aspect of the present invention, there is provided an image compression program for converting a computer image data of an input halftone image into a color system comprising a luminance component and a color difference component, and the converted image data. Dividing means for dividing the tile into a plurality of tiles, wavelet transform is performed for each tile to decompose the tiles into LL, HL, LH and HH subbands, and the coefficient data obtained by performing the wavelet transform is sub- Wavelet transform means arranged in a pixel matrix composed of main scanning direction components and sub-scanning direction components as a plurality of pixel values respectively representing an image for each band, and the plurality of pixel values arranged in each pixel matrix are quantized performs encoding sequentially reads quantization means, each of said pixel values quantized by the quantization means from said pixel matrix, code Coding means for outputting data, detecting means for detecting a peak pixel density is in the peak of the pixels constituting the sub-band, the peak pixel using the pixel values of the peripheral pixels of the detected peak pixels Functioning as a determining means for determining the peak position of the density within, and in the reading order different according to the position of the peak pixel detected by the detecting means and the peak position of the density within the peak pixel determined by the determining means the included in the sub-band and performs coding by reading the pixel values from the pixel matrix.

これらの構成によれば、符号化の際に画素値を読み出す順序を、ピーク画素及びピーク画素内のピーク位置に応じて予め設定し、記憶手段に記憶させる。ここで、画素値の読み出し順序をピーク位置より近い画素順とすることによって濃度順に画素値を読み出すことができる。つまり、読み出した画素値の順序に単調増又は単調減の傾向を持たせることができ、例えば連続するデータにおいて前データに対する増加や減少を示す正負の情報が不要となって差分データのみを持っておけば良いため、符号化効率を高めることができる。   According to these configurations, the order of reading out pixel values at the time of encoding is set in advance according to the peak pixel and the peak position in the peak pixel, and stored in the storage unit. Here, the pixel values can be read in the order of density by setting the pixel value reading order to the pixel order closer to the peak position. In other words, the order of the read pixel values can have a monotonous increase or monotonic decrease tendency. For example, in continuous data, there is no need for positive / negative information indicating an increase or decrease with respect to the previous data, and only the difference data is included. Therefore, the encoding efficiency can be increased.

請求項に記載の発明は、請求項に記載の画像圧縮装置であって、前記記憶手段は、前記ピーク画素内における濃度のピーク位置から近い画素から順番に画素値を読み出すための順序を、前記ピーク画素の位置及び当該ピーク画素内における濃度のピーク位置毎にそれぞれ記憶するものである。 The invention according to claim 3, an image compression apparatus according to claim 2, wherein the storage unit, the order for reading the pixel values in order from the pixels close to the peak position of the density in the peak a pixel The peak pixel position and the density peak position in the peak pixel are stored respectively.

この構成によれば、画素値の読み出し順序をピーク位置より近い画素から順番とすることによって、濃度順に画素値を読み出すことができる。つまり、読み出した画素値の順序に単調増又は単調減の傾向を持たせることができ、例えば連続するデータにおいて前データに対する増加や減少を示す正負の情報が不要となって差分データのみを持っておけば良いため、符号化効率を高めることができる。   According to this configuration, the pixel values can be read in the order of density by setting the pixel value reading order from the pixels closer to the peak position. In other words, the order of the read pixel values can have a monotonous increase or monotonic decrease tendency. For example, in continuous data, there is no need for positive / negative information indicating an increase or decrease with respect to the previous data, and only the difference data is included. Therefore, the encoding efficiency can be increased.

請求項に記載の発明の画像圧縮復号装置は、請求項1〜3の何れか一項に記載の画像圧縮装置と、前記符号化データを前記記憶手段に記憶された読み出し順序の内、前記符号化手段が符号化を行う際に用いた読み出し順序と逆の順序で読み出して逆符号化を行い、量子化データを出力する逆符号化手段と、前記量子化データを逆量子化して変換係数を出力する逆量子化手段と、前記変換係数に逆ウェーブレット変換を施してタイル画像を出力する逆ウェーブレット変換手段と、前記タイル画像を組み合わせた画像の表色系の変換を行って復号画像を取得する復号手段と、を更に備えたものである。 An image compression / decoding device according to a fourth aspect of the present invention is the image compression device according to any one of the first to third aspects, and the read order in which the encoded data is stored in the storage unit. A reverse encoding means for reading out and performing reverse encoding in the reverse order to the read order used when encoding is performed by the encoding means, and outputting quantized data; and dequantizing the quantized data to transform coefficients The inverse quantization means for outputting the image, the inverse wavelet transform means for outputting the tile image by performing inverse wavelet transform on the transform coefficient, and obtaining the decoded image by performing the color system conversion of the image obtained by combining the tile images And a decoding means.

この構成によれば、請求項1〜3の効果と同様の効果を奏することができる。 According to this structure, there can exist an effect similar to the effect of Claims 1-3 .

請求項に記載の発明の画像圧縮復号プログラムは、請求項5又は6に記載された画像圧縮プログラムを含み、更にコンピュータを、前記符号化手段が前記符号化を行う際の前記画素値の読み出し順序と逆の順序で前記符号化データを読み出して逆符号化を行い、量子化データを出力する逆符号化手段、前記量子化データを逆量子化して変換係数を出力する逆量子化手段、前記変換係数に逆ウェーブレット変換を施してタイル画像を出力する逆ウェーブレット変換手段、前記タイル画像を組み合わせた画像の表色系の変換を行って復号画像を取得する復号手段、として機能させるものである。 An image compression decoding program according to a seventh aspect of the present invention includes the image compression program according to the fifth or sixth aspect , and further reads out the pixel value when the encoding means performs the encoding. The encoded data is read out in the reverse order to perform the reverse encoding, the inverse encoding means for outputting the quantized data, the inverse quantization means for inversely quantizing the quantized data and outputting the transform coefficient, It functions as an inverse wavelet transform unit that performs inverse wavelet transform on the transform coefficient and outputs a tile image, and a decoding unit that performs a color system conversion of an image obtained by combining the tile images to obtain a decoded image.

これらの構成によれば、請求項5又は6と同様の効果を奏することができる。 According to these configurations, the same effect as in the fifth or sixth aspect can be obtained.

この発明によれば、記憶手段に記憶させるサブバンド毎の読み出し順序をできるだけ特定の周波数成分(例えば高周波成分)が連続して読み出されるように設定することにより、符号化手段は特定の周波数成分を連続して読み出して符号化することになる。従って、符号化効率を改善することができる。更に、符号化の際に画素値を読み出す順序を、ピーク画素及びピーク画素内のピーク位置に応じて予め設定し、記憶手段に記憶させる。ここで、画素値の読み出し順序をピーク位置より近い画素順とすることによって濃度順に画素値を読み出すことができる。つまり、読み出した画素値の順序に単調増又は単調減の傾向を持たせることができ、例えば連続するデータにおいて前データに対する増加や減少を示す正負の情報が不要となって差分データのみを持っておけば良いため、符号化効率を高めることができる。   According to the present invention, the encoding means sets the specific frequency component by setting the reading order for each subband stored in the storage means so that a specific frequency component (for example, a high frequency component) is continuously read out as much as possible. It will be read and encoded continuously. Therefore, encoding efficiency can be improved. Further, the order of reading out the pixel values at the time of encoding is set in advance according to the peak pixel and the peak position in the peak pixel, and is stored in the storage means. Here, the pixel values can be read in the order of density by setting the pixel value reading order to the pixel order closer to the peak position. In other words, the order of the read pixel values can have a monotonous increase or monotonic decrease tendency. For example, in continuous data, there is no need for positive / negative information indicating an increase or decrease with respect to the previous data, and only the difference data is included. Therefore, the encoding efficiency can be increased.

画像圧縮復号装置の電気的構成を示すブロック図。The block diagram which shows the electric constitution of an image compression decoding apparatus. JPEG2000方式による画像圧縮の流れを示す図。The figure which shows the flow of the image compression by a JPEG2000 system. タイル分割について説明するための図。The figure for demonstrating tile division | segmentation. 離散ウェーブレット変換について示した模式図。The schematic diagram shown about discrete wavelet transform. エントロピー符号化の流れを示す図。The figure which shows the flow of entropy encoding. プレシンクト分割を模式的に示した図。The figure which showed the precinct division | segmentation typically. コードブロック分割を模式的に示した図。The figure which showed code block division | segmentation typically. ビットプレーン分割を模式的に示した図。The figure which showed bit-plane division | segmentation typically. コーディングパスへの分割を模式的に示した図。The figure which showed the division | segmentation to a coding pass typically. 離散ウェーブレット変換後の画像を示した図。The figure which showed the image after discrete wavelet transform. 通常のサブバンドの画素値の読み出し順序を示した図。The figure which showed the reading order of the pixel value of a normal subband. 第1の実施例におけるサブバンド毎の画素値の読み出し順序を示した図。The figure which showed the read-out order of the pixel value for every subband in a 1st Example. サブバンドが分割されて4×4画素となった状態を示した図。The figure which showed the state which the subband was divided | segmented and became 4x4 pixel. ピーク画素及びピーク位置を説明するための図。The figure for demonstrating a peak pixel and a peak position. 第2の実施例におけるピーク画素及びピーク位置に基づいた各画素の読み出し順序の設定方法を説明するための図。The figure for demonstrating the setting method of the reading order of each pixel based on the peak pixel and peak position in a 2nd Example. 第2の実施例におけるピーク画素及びピーク位置に基づいた各画素の読み出し順序の設定方法を説明するための図。The figure for demonstrating the setting method of the reading order of each pixel based on the peak pixel and peak position in a 2nd Example. 第2の実施例における画像圧縮処理の流れを示したフローチャート。10 is a flowchart showing a flow of image compression processing in the second embodiment.

本発明における画像圧縮装置、画像圧縮復号装置、画像圧縮プログラム及び画像圧縮復号プログラムの実施の形態について図面を参照して説明する。図1は、本実施の形態における画像圧縮復号装置1の電気的構成を示すブロック図である。尚、画像圧縮復号装置1は、パーソナルコンピュータ(パソコン)やワークステーション、携帯情報端末等の情報処理装置で実現され、図1のブロック図は画像圧縮復号装置1がこれらの情報処理装置によって実現された場合を例に図示している。この他、コピー機やスキャナ等の画像読取装置や、デジタルカメラやデジタルビデオカメラ、デジタルカメラを搭載した携帯電話等の撮像装置に組み込まれて用いられてもよい。   Embodiments of an image compression apparatus, an image compression / decoding apparatus, an image compression program, and an image compression / decoding program according to the present invention will be described with reference to the drawings. FIG. 1 is a block diagram showing an electrical configuration of an image compression decoding apparatus 1 according to the present embodiment. The image compression / decoding device 1 is realized by an information processing device such as a personal computer (personal computer), a workstation, or a portable information terminal, and the block diagram of FIG. 1 is realized by these information processing devices. The case is shown as an example. In addition, it may be used by being incorporated in an image reading apparatus such as a copying machine or a scanner, or an imaging apparatus such as a digital camera, a digital video camera, or a mobile phone equipped with a digital camera.

図1に示すように、画像圧縮復号装置1は制御部11、記憶部12、入力操作部13、表示部14、I/F部15、ネットワークI/F部16及び画像圧縮復号部17等を備えて構成される。制御部11は、CPU(Central Processing Unit:中央処理装置)等によって構成され、入力された指示信号等に応じて記憶部12に記憶されたプログラムを読み出して処理を実行し、各機能部への指示信号の出力、データ転送等を行って画像圧縮復号装置1を統括的に制御する。   As shown in FIG. 1, the image compression decoding apparatus 1 includes a control unit 11, a storage unit 12, an input operation unit 13, a display unit 14, an I / F unit 15, a network I / F unit 16, an image compression decoding unit 17, and the like. It is prepared for. The control unit 11 is configured by a CPU (Central Processing Unit) or the like, reads a program stored in the storage unit 12 in accordance with an input instruction signal or the like, executes a process, and sends the processing to each functional unit. The image compression / decoding device 1 is comprehensively controlled by outputting an instruction signal, transferring data, and the like.

記憶部12は、画像圧縮復号装置1の備える種々の機能を実現するためのプログラムやデータ等を記憶する。本実施の形態では、記憶部12は画像圧縮復号プログラム121を記憶し、パターンデータ記憶部122として機能する。画像圧縮復号プログラム121は、I/F部15又はネットワークI/F部16が入力した画像データをJPEG2000方式で圧縮して符号化データを生成するためのプログラムである。   The storage unit 12 stores programs, data, and the like for realizing various functions provided in the image compression decoding apparatus 1. In the present embodiment, the storage unit 12 stores an image compression / decoding program 121 and functions as the pattern data storage unit 122. The image compression / decoding program 121 is a program for generating encoded data by compressing image data input by the I / F unit 15 or the network I / F unit 16 using the JPEG2000 system.

入力操作部13は、各種操作ボタンやマウス等のポインティングデバイスを備え、ユーザによって操作がなされると、操作信号を制御部11へ出力する。またユーザは入力操作部13を介して圧縮率の設定を行う。表示部14は、液晶ディスプレイ等の表示画面であり、入力操作部13から入力された内容に応じた表示を行ったり、制御部11による処理内容や処理結果を表示したりする。   The input operation unit 13 includes various operation buttons and a pointing device such as a mouse, and outputs an operation signal to the control unit 11 when operated by a user. The user also sets the compression rate via the input operation unit 13. The display unit 14 is a display screen such as a liquid crystal display, and displays according to the content input from the input operation unit 13 or displays the processing content and processing result by the control unit 11.

I/F部15はIEEE1394やUSB等のインターフェイスであり、外部装置と直接データの送受信を行うことができる。ネットワークI/F部16は、LANボード等の通信モジュールから構成され、ネットワークI/F部16と接続されたネットワーク(不図示)を介して外部装置と種々のデータの送受信を行う。   The I / F unit 15 is an interface such as IEEE1394 or USB, and can directly transmit / receive data to / from an external device. The network I / F unit 16 includes a communication module such as a LAN board, and transmits / receives various data to / from an external device via a network (not shown) connected to the network I / F unit 16.

画像圧縮復号部17は、I/F部15やネットワークI/F部16を介して入力された画像データをJPEG2000方式で圧縮して圧縮データを生成し、圧縮データを復号して復号データを取得する。   The image compression / decoding unit 17 generates compressed data by compressing image data input via the I / F unit 15 or the network I / F unit 16 using the JPEG2000 method, and acquires the decoded data by decoding the compressed data. To do.

また、画像圧縮復号部17は、読み取り順序記憶部171を有する。画素値読み出し順序記憶部171は、画像圧縮復号部17が画像データを圧縮する際に行う処理である算術符号化を行うときの画素値の読み出し順序をサブバンド毎に記憶するものである。この読み取り順序記憶部171の記憶内容については、後ほど詳しく説明する。   In addition, the image compression decoding unit 17 includes a reading order storage unit 171. The pixel value readout order storage unit 171 stores the readout order of pixel values for each subband when performing arithmetic coding, which is processing performed when the image compression / decoding unit 17 compresses image data. The contents stored in the reading order storage unit 171 will be described in detail later.

図2は、本実施の形態におけるJPEG2000方式による画像圧縮の流れを示す図である。まず画像圧縮復号部17は、入力された画像データの表色系を例えばRGB方式からYCbCr方式へコンポーネント変換して(色空間変換21)、表色系が変換された画像データを図3に示すように複数のタイルに分割する(タイル分割22)。   FIG. 2 is a diagram showing a flow of image compression according to the JPEG2000 system in the present embodiment. First, the image compression / decoding unit 17 performs component conversion of the color system of the input image data from, for example, the RGB system to the YCbCr system (color space conversion 21), and the image data obtained by converting the color system is shown in FIG. In this way, it is divided into a plurality of tiles (tile division 22).

そして、画像圧縮復号部17は1つのバンドの各タイルに対して離散ウェーブレット変換を施して係数データを出力する(離散ウェーブレット変換23)。図4は、離散ウェーブレット変換について示した模式図である。図4(a)のタイル画像(0LL)に対して、離散ウェーブレット変換を施し、図4(b)に示すようにサブバンド1LL、1HL、1LH及び1HHに分解する。続いて、低周波成分1LLに対して離散ウェーブレット変換を施し、図4(c)に示すようにサブバンド2LL、2HL、2LH及び2HHに分解する。尚、図4では2レベル変換について図示しているが、離散ウェーブレット変換の回数は特に制限されるものではない。   Then, the image compression decoding unit 17 performs discrete wavelet transform on each tile of one band and outputs coefficient data (discrete wavelet transform 23). FIG. 4 is a schematic diagram showing the discrete wavelet transform. Discrete wavelet transform is applied to the tile image (0LL) in FIG. 4A, and is decomposed into subbands 1LL, 1HL, 1LH, and 1HH as shown in FIG. 4B. Subsequently, a discrete wavelet transform is performed on the low frequency component 1LL, and it is decomposed into subbands 2LL, 2HL, 2LH and 2HH as shown in FIG. Although FIG. 4 illustrates two-level conversion, the number of discrete wavelet conversions is not particularly limited.

次に、画像圧縮復号部17は離散ウェーブレット変換された係数データに対して線形量子化を行い(量子化24)、ユーザ等によって設定された圧縮率(以下「設定圧縮率」という)で量子化された量子化データに対してエントロピー符号化を行う(エントロピー符号化25)。ここで、エントロピー符号化25の処理手順について説明する。図5は、エントロピー符号化の流れを示す図である。画像圧縮復号部17は、まず各サブバンドの係数をプレシンクトと呼ばれる領域に分割する(プレシンクト分割251)。図6はプレシンクト分割を模式的に示した図である。図6において、51の部分は元の画像において同領域の部分を周波数変換したものであり、これらの部分は同じプレシンクトに属しているという。   Next, the image compression decoding unit 17 performs linear quantization on the coefficient data subjected to the discrete wavelet transform (quantization 24), and quantizes it with a compression rate (hereinafter referred to as “set compression rate”) set by the user or the like. Entropy coding is performed on the quantized data (entropy coding 25). Here, the processing procedure of the entropy encoding 25 will be described. FIG. 5 is a diagram showing a flow of entropy encoding. The image compression decoding unit 17 first divides each subband coefficient into areas called precincts (precinct division 251). FIG. 6 is a diagram schematically showing precinct division. In FIG. 6, a portion 51 is obtained by frequency-converting a portion of the same region in the original image, and these portions belong to the same precinct.

次に、画像圧縮復号部17はプレシンクトをコードブロックという更に小さな領域に分割する(コードブロック分割252)。図7はコードブロック分割を模式的に示した図である。このコードブロック単位がエントロピー符号化を行う際の基本単位となる。   Next, the image compression decoding unit 17 divides the precinct into smaller areas called code blocks (code block division 252). FIG. 7 is a diagram schematically showing code block division. This code block unit is a basic unit when entropy encoding is performed.

そして、画像圧縮復号部17は各コードブロックについて線形量子化された離散ウェーブレット変換の変換係数をビットプレーンに展開する。図8はビットプレーン展開253を模式的に示した図である。図8において、61はあるコードブロックにおける線形量子化された離散ウェーブレット変換の係数データを例示したものである。62は、係数データ61の符号を表すビット列であり、値0は正値、値1は負値を意味する。63は係数データ61の絶対値をMSB(Most Significant Bit)からLSB(Least Significant Bit)に2値展開したビットプレーンである。   Then, the image compression decoding unit 17 expands the transform coefficient of the discrete wavelet transform linearly quantized for each code block into a bit plane. FIG. 8 is a diagram schematically showing the bit plane development 253. In FIG. 8, 61 is an example of coefficient data of the linearly quantized discrete wavelet transform in a certain code block. 62 is a bit string representing the sign of the coefficient data 61, where value 0 means a positive value and value 1 means a negative value. 63 is a bit plane in which the absolute value of the coefficient data 61 is binary-developed from MSB (Most Significant Bit) to LSB (Least Significant Bit).

例えば、値が+12の係数データ64は正値であるため、対応する符号ビット65は‘0’である。また、+12の絶対値の2進数表現は(1100)であるため、ビットプレーンに対応する箇所66a、66b、66c及び66dの値はそれぞれ‘1’、‘1’、‘0’、‘0’となる。同様に、値が−6の係数データ67は負値であるため、対応する符号ビット68は‘1’である。また、−6の絶対値の2進数表現は(0110)であるため、ビットプレーンの対応する箇所69a、69b、69c及び69dの値はそれぞれ‘0’、‘1’、‘1’、‘0’となる。MSB側で全て0であるビットプレーンをゼロビットプレーンといい、データは保存されない一方、コードブロック毎に後述のゼロビットプレーン枚数がカウントされる。   For example, since the coefficient data 64 having a value of +12 is a positive value, the corresponding sign bit 65 is “0”. Also, since the binary representation of the absolute value of +12 is (1100), the values of the locations 66a, 66b, 66c and 66d corresponding to the bit plane are “1”, “1”, “0”, “0”, respectively. It becomes. Similarly, since the coefficient data 67 having a value of −6 is a negative value, the corresponding sign bit 68 is “1”. Since the binary representation of the absolute value of −6 is (0110), the values of the corresponding portions 69a, 69b, 69c, and 69d of the bit plane are “0”, “1”, “1”, “0”, respectively. 'Become. Bit planes that are all zero on the MSB side are called zero bit planes, and no data is stored, while the number of zero bit planes described later is counted for each code block.

続いて、画像圧縮復号部17は、ビットプレーンを更にsignificance propagationパスと、magnitude refinementパスと、cleanupパスに分割する(コーディングパスへの分割254)。図9はコーディングパスへの分割を模式的に示した図である。図9に示すように、各ビットプレーン71a〜71d(以下、これらをまとめて「ビットプレーン71」という)は、コーディングパスへの分割により次のように分割される。つまり、それぞれsignificance propagationパス72b〜72d(以下、これらをまとめて「significance propagationパス72」という)、magnitude refinementパス73b〜73d(以下、これらをまとめて「magnitude refinementパス73」という)、cleanupパス74b〜74dに分割される。ただし、最上位ビット(MSB側)のビットプレーン71aはcleanupパス74aにのみ対応させる。以下、cleanupパス74a〜74dをまとめて「cleanupパス74」という。   Subsequently, the image compression decoding unit 17 further divides the bit plane into a significance propagation pass, a magnitude refinement pass, and a cleanup pass (division 254 into coding passes). FIG. 9 is a diagram schematically showing division into coding passes. As shown in FIG. 9, the bit planes 71a to 71d (hereinafter collectively referred to as “bit plane 71”) are divided as follows by division into coding paths. That is, significance propagation paths 72b to 72d (hereinafter collectively referred to as “significance propagation path 72”), magnitude refinement paths 73b to 73d (hereinafter collectively referred to as “magnitude refinement path 73”), and cleanup path 74b. Divided into ~ 74d. However, the most significant bit (MSB side) bit plane 71a is made to correspond only to the cleanup path 74a. Hereinafter, the cleanup paths 74a to 74d are collectively referred to as “cleanup path 74”.

各ビットプレーン71及び各コーディングパス72〜74は、全て縦横方向の座標長によるサイズが等しい。また、各コーディングパス72〜74にはビット値が定義された位置と定義されていない位置とが存在する。図9において、例えば76や77のように、ビット値が定義された位置には網掛け(斜線)が施されている。そして、コーディングパス72〜74(例えば、コーディングパス72b〜74b)の網掛け部分に定義されたビット値は、分割前のビットプレーン71(例えば、ビットプレーン71b)上の対応する位置におけるビット値と等しい。ビットプレーンをコーディングパスに分割する処理方法については、各文献により周知のものであるため説明を省略する。   Each bit plane 71 and each coding pass 72 to 74 are all equal in size according to the coordinate length in the vertical and horizontal directions. Each coding pass 72 to 74 has a position where a bit value is defined and a position where it is not defined. In FIG. 9, for example, 76 and 77, the positions where bit values are defined are shaded (hatched). The bit values defined in the shaded portions of the coding paths 72 to 74 (for example, the coding paths 72b to 74b) are the bit values at the corresponding positions on the bit plane 71 (for example, the bit plane 71b) before the division. equal. Since the processing method for dividing the bit plane into coding passes is well known in each document, description thereof is omitted.

最後に画像圧縮復号部17は、コーディングパス分割後のデータを算術符号化する(二値算術符号化255)。以上のようにしてエントロピー符号化25を行った後、画像圧縮復号部17は圧縮率の調整を行い(圧縮率調整26)、画像圧縮復号部17はファイルにデータを書き込むための符号ストリームの形成を行う(符号ストリーム27)。この符号ストリーム処理については、各文献により周知のものであるため説明を省略する。   Finally, the image compression decoding unit 17 arithmetically encodes the data after the coding pass division (binary arithmetic encoding 255). After performing the entropy encoding 25 as described above, the image compression / decoding unit 17 adjusts the compression rate (compression rate adjustment 26), and the image compression / decoding unit 17 forms a code stream for writing data to the file. (Code stream 27). Since this code stream processing is well known from each document, the description thereof is omitted.

通常、離散ウェーブレット変換後の画像では高周波成分が少なく、ほぼ均一なデータ(変換係数)が得られるため、その後の算術符号化処理における符号化効率が向上する。しかし、網点画像においては、図10に示すように、離散ウェーブレット変換後に多くの高周波成分が残ることになり、このような状態で通常の読み出し順序でサブバンドの画素値を読み出して算術符号化処理を行うと、符号化効率が悪くなる傾向にあった。   Usually, an image after discrete wavelet transform has few high-frequency components and almost uniform data (transform coefficient) can be obtained, so that the coding efficiency in the subsequent arithmetic coding process is improved. However, in the halftone image, as shown in FIG. 10, many high-frequency components remain after the discrete wavelet transform. In such a state, subband pixel values are read out in the normal reading order and arithmetic coding is performed. When the processing is performed, the encoding efficiency tends to deteriorate.

そこで、符号化処理を行う際の画素値の読み出し順序を符号化効率が向上するように適宜変更することによって、網点画像であっても符号化効率を向上させると共に、復号後の画像の画質劣化を抑える方法を第1及び第2の実施例を用いて説明する。   Therefore, by appropriately changing the reading order of the pixel values when performing the encoding process so as to improve the encoding efficiency, the encoding efficiency is improved even for a halftone image, and the image quality of the image after decoding is improved. A method for suppressing deterioration will be described with reference to the first and second embodiments.

<第1の実施例>
本実施例では、符号化の際、サブバンド毎に異なる読み出し順序で画素値の読み出しを行うことによって、符号化効率を改善する方法について説明する。
<First embodiment>
In this embodiment, a method for improving encoding efficiency by reading pixel values in a different reading order for each subband during encoding will be described.

通常、離散ウェーブレット変換によって生成された各サブバンドは、副走査方向に4画素を単位とした順序で画素値が読み出されて符号化処理が行われる。図11は、通常のサブバンドの画素値の読み出し順序を示した図であり、矢印で示した順序で画素値の読み出しが行われる。ここで、主走査方向とは、図11に示す画素マトリクスにおける紙面に向かって左から右の方向を示し、副走査方向とは紙面に向かって上から下の方向を示す。   Usually, for each subband generated by the discrete wavelet transform, pixel values are read out in the order of four pixels as a unit in the sub-scanning direction and subjected to encoding processing. FIG. 11 is a diagram illustrating a reading order of pixel values of a normal subband, and reading of pixel values is performed in the order indicated by arrows. Here, the main scanning direction indicates a direction from left to right toward the paper surface in the pixel matrix shown in FIG. 11, and the sub-scanning direction indicates a direction from top to bottom toward the paper surface.

しかし、網点画像においては、離散ウェーブレット変換後のサブバンドの高周波成分に特定の周波数成分が残り、符号化効率を悪化させる原因となっていた。その特定の周波数成分は、HL領域では主走査方向に連続するパターンとなり、LH領域では副走査方向に連続したパターンとして表れることが知られている。そこで、本実施例ではサブバンド毎に画素値の読み出し順序を変更し、できるだけ高周波成分を連続して読み出すことによって復号後の画質を落とすことなく符号化効率を改善する方法について説明する。   However, in the halftone image, a specific frequency component remains in the high-frequency component of the subband after the discrete wavelet transform, causing deterioration in encoding efficiency. It is known that the specific frequency component becomes a pattern continuous in the main scanning direction in the HL region and appears as a pattern continuous in the sub-scanning direction in the LH region. Therefore, in this embodiment, a method for improving the coding efficiency without degrading the image quality after decoding by changing the reading order of the pixel values for each subband and continuously reading out the high frequency components as much as possible will be described.

図12は、サブバンド別の画素値の読み出し順序の一例を示した図である。サブバンド2LLは、1行目の一番左の画素より主走査方向に2画素連続して画素値を読み出し、次に2行目の一番左の画素より主走査方向に2画素連続して画素値を読み出す。次に、1行目の左から3画素目の画素より主走査方向に2画素連続して画素値を読み出し、次に2行目の左から3画素目の画素より主走査方向に2画素連続して画素値を読み出す順序とする。3行目及び4行目も同様の読み出し順序とする。   FIG. 12 is a diagram illustrating an example of the reading order of pixel values for each subband. In the subband 2LL, pixel values are continuously read out from the leftmost pixel in the first row in the main scanning direction, and then two pixels are successively read out from the leftmost pixel in the second row in the main scanning direction. Read the pixel value. Next, two consecutive pixels are read in the main scanning direction from the third pixel from the left in the first row, and then two consecutive pixels in the main scanning direction from the third pixel from the left in the second row. Thus, the pixel values are read out in the order. The same reading order is used for the third and fourth rows.

サブバンド2HLは、1→2→3→4行目の順番で一番左の画素より主走査方向に4画素連続して画素値を読み出す順序とする。   The subband 2HL has an order in which pixel values are successively read out in the main scanning direction from the leftmost pixel in the order of 1 → 2 → 3 → 4th row.

サブバンド1HLは、1行目は一番左の画素より主走査方向に4画素連続して画素値を読み出し、2行目は一番右の画素より主走査方向と逆方向に4画素連続して画素値を読み出し、3行目は一番左の画素より主走査方向に4画素連続して画素値を読み出し、4行目は一番右の画素より主走査方向と逆方向に4画素連続して画素値を読み出す順序とする。   In the sub-band 1HL, the pixel values in the first row are continuously read from the leftmost pixel in the main scanning direction by four pixels, and the second row is read from the rightmost pixel in the direction opposite to the main scanning direction by four pixels. The pixel value is read out in the third row, and the pixel value is read continuously in the main scanning direction from the leftmost pixel. In the fourth row, the pixel value is continuous in the direction opposite to the main scanning direction from the rightmost pixel. Thus, the pixel values are read out in the order.

サブバンド2LHは、1→2→3→4行目の順番で一番上の画素より副走査方向に4画素連続して画素値を読み出す順序とする。   The subband 2LH is an order in which pixel values are read continuously in the sub-scanning direction from the top pixel in the order of 1 → 2 → 3 → 4th row.

サブバンド1LHは、1列目は一番上の画素より副走査方向に4画素連続して画素値を読み出し、2列目は一番下の画素より副走査方向と逆方向に4画素連続して画素値を読み出し、3列目は一番上の画素より副走査方向に4画素連続して画素値を読み出し、4列目は一番下の画素より副走査方向と逆方向に4画素連続して画素値を読み出す順序とする。   In the subband 1LH, the pixel values in the first column are continuously read out from the top pixel in the sub-scanning direction, and the pixel values are continuously read out from the bottom pixel in the direction opposite to the sub-scanning direction. The pixel value is read out in the third column, and the pixel value is read continuously in the sub-scanning direction from the top pixel. The fourth column is continuously read in the direction opposite to the sub-scanning direction from the bottom pixel. Thus, the pixel values are read out in the order.

サブバンド1HH及び2HHは、1列目の一番上の画素より副走査方向に2画素連続して画素値を読み出し、次に2列目の一番上の画素より副走査方向に2画素連続して画素値を読み出す。次に、3列目の一番上の画素より副走査方向に2画素連続して画素値を読み出し、4列目の一番上の画素より副走査方向に2画素連続して画素値を読み出す順序とする。3行目及び4行目も同様の読み出し順序とする。   In subbands 1HH and 2HH, pixel values are continuously read out in the sub-scanning direction from the top pixel in the first column, and then in the sub-scanning direction from the top pixel in the second column. The pixel value is read out. Next, the pixel values are continuously read in the sub-scanning direction from the top pixel in the third column, and the pixel values are successively read out in the sub-scanning direction from the top pixel in the fourth column. Order. The same reading order is used for the third and fourth rows.

各サブバンドの画素値の読み出し順序は、画像圧縮復号部17の読み出し順序記憶部171に予め記憶されている。画像圧縮復号部17は、符号化を行う際に読み出し順序記憶部171に記憶されている読み出し順序に従って各サブバンドの画素値を読み出し、圧縮データを生成する。   The reading order of the pixel values of each subband is stored in advance in the reading order storage unit 171 of the image compression decoding unit 17. The image compression / decoding unit 17 reads the pixel value of each subband in accordance with the reading order stored in the reading order storage unit 171 when encoding, and generates compressed data.

次に、圧縮データの復号処理の流れについて説明する。まず画像圧縮復号部17は圧縮データに対して逆エントロピー符号化を行い、量子化データを取得する。この逆エントロピー符号化を行う際、画像圧縮復号部17は算術符号の復号を行った値を読み出し順序記憶部171に記憶されている読み出し順序の内、符号化を行ったときに用いた読み出し順序とは逆の順序で配置する。続いて画像圧縮復号部17は量子化データに対して逆量子化を行い、離散ウェーブレット変換された係数データを取得する。そして画像圧縮復号部17は係数データに対して逆離散ウェーブレット変換を行い、タイル画像に復元し、タイル画像を組み合わせた画像の表色系のコンポーネント変換を行って復号データを取得し、復号処理を終了する。   Next, the flow of the compressed data decoding process will be described. First, the image compression decoding unit 17 performs inverse entropy coding on the compressed data to obtain quantized data. When performing this inverse entropy coding, the image compression decoding unit 17 reads out the values obtained by decoding the arithmetic codes from among the reading orders stored in the reading order storage unit 171 and performing the reading order. Place them in the reverse order. Subsequently, the image compression decoding unit 17 performs inverse quantization on the quantized data, and obtains coefficient data subjected to discrete wavelet transform. Then, the image compression decoding unit 17 performs inverse discrete wavelet transform on the coefficient data, restores the tile image, performs colorimetric component conversion of the image obtained by combining the tile images, acquires the decoded data, and performs the decoding process. finish.

以上、説明したように、符号化の際にできるだけ高周波成分が連続して読み出されるように画素値の読み出し順序をサブバンド毎に設定することにより、復号後の画質を落とすことなく符号化効率を改善することができる。   As described above, by setting the pixel value reading order for each subband so that high-frequency components are continuously read as much as possible during encoding, the encoding efficiency can be improved without degrading the image quality after decoding. Can be improved.

<第2の実施例>
本実施例では、離散ウェーブレット変換によって生成されたサブバンドの所定の領域毎において画素値のピーク値の位置を検出し、その位置に基づいて画素値の読み出し順序を変更することによって符号化効率を改善する方法について説明する。
<Second embodiment>
In this embodiment, the position of the peak value of the pixel value is detected for each predetermined region of the subband generated by the discrete wavelet transform, and the encoding efficiency is improved by changing the reading order of the pixel value based on the position. A method for improvement will be described.

通常、離散ウェーブレット変換によって生成された各サブバンドは、副走査方向に4画素を単位とした順序で画素値が読み出されて符号化処理が行われる。図13は、サブバンドが分割されて4×4画素となった状態を示した図である。まず画像圧縮復号部17は、この4×4画素の各画素のうち濃度が最も高い又は最も低い(即ち、画素値が最も大きい又は最も小さい)画素を検出する。以下、濃度が最も高い又は最も低い画素の画素値を「ピーク値」と言い、そのピーク値を持つ画素を「ピーク画素」と言う。   Usually, for each subband generated by the discrete wavelet transform, pixel values are read out in the order of four pixels as a unit in the sub-scanning direction and subjected to encoding processing. FIG. 13 is a diagram illustrating a state in which the subband is divided into 4 × 4 pixels. First, the image compression decoding unit 17 detects a pixel having the highest density or the lowest density (that is, the largest or smallest pixel value) among the 4 × 4 pixels. Hereinafter, the pixel value of the pixel having the highest or lowest density is referred to as “peak value”, and the pixel having the peak value is referred to as “peak pixel”.

ピーク値の検出方法は、4×4画素の全画素値から平均値を算出し、その平均値が所定値(例えば、画像の階調数が256なら所定値は256÷2=128とする)以上であれば、最も画素値の大きいものをピーク値とし、平均値が所定値より小さければ最も画素値の小さいものをピーク値とする。   In the peak value detection method, an average value is calculated from all pixel values of 4 × 4 pixels, and the average value is a predetermined value (for example, if the number of gradations of an image is 256, the predetermined value is 256/2 = 128). If it is above, the largest pixel value is the peak value, and if the average value is smaller than the predetermined value, the smallest pixel value is the peak value.

このようにして、画像圧縮復号部17は4×4画素の中からピーク画素を求める。本実施例では、画素G32をピーク画素として以下説明する。   In this way, the image compression decoding unit 17 obtains a peak pixel from 4 × 4 pixels. In the present embodiment, the pixel G32 will be described below as a peak pixel.

次に画像圧縮復号部17は、画素G32を更に3×3の領域に分割して、この3×3の各領域のうちどこがピーク位置であるかを検出する。ここで、画像圧縮復号部17が4×4画素におけるピーク画素を求める際に、濃度が最も高い画素値を持つ画素をピーク画素とした場合、「ピーク位置」とはピーク画素(画素G32)内における最も濃度の高い位置となる。逆に、画像圧縮復号部17が4×4画素におけるピーク画素を求める際に、濃度が最も低い画素値を持つ画素をピーク画素とした場合、「ピーク位置」とはピーク画素内における最も濃度の低い位置となる。以下に示す「ピーク位置」は、画素G32内における最も濃度の高い位置として説明する。   Next, the image compression decoding unit 17 further divides the pixel G32 into 3 × 3 regions, and detects which of the 3 × 3 regions is the peak position. Here, when the image compression decoding unit 17 obtains the peak pixel in the 4 × 4 pixels, when the pixel having the highest pixel value is the peak pixel, the “peak position” is within the peak pixel (pixel G32). This is the position with the highest density. On the contrary, when the image compression decoding unit 17 obtains the peak pixel in the 4 × 4 pixels, when the pixel having the lowest pixel value is the peak pixel, the “peak position” is the highest density in the peak pixel. Lower position. The “peak position” shown below will be described as the position with the highest density in the pixel G32.

図14はピーク画素及びピーク位置を説明するための図である。画像圧縮復号部17は以下を条件式として、画素G32内における主走査方向のピーク位置を検出する。
|画素値G31−画素値G33|<閾値・・ピーク位置は画素G32の中央部
画素値G31−画素値G33<0 ・・ピーク位置は画素G32内の右側(画素G33寄り)
画素値G31−画素値G33>0 ・・ピーク位置は画素G32内の左側(画素G31寄り)
例えば、画素値G32=200、画素値G31=150、画素値G33=50とし、閾値=10とすると、
|150−50|=100>閾値
150−50=100>0
となるため、画素G32内におけるピーク位置は画素G31寄りの左側にあることになる。
FIG. 14 is a diagram for explaining a peak pixel and a peak position. The image compression decoding unit 17 detects the peak position in the main scanning direction in the pixel G32 using the following as a conditional expression.
| Pixel value G31−Pixel value G33 | <Threshold value ·· The peak position is the central pixel value G31 of the pixel G32−Pixel value G33 <0 ··· The peak position is the right side in the pixel G32 (closer to the pixel G33).
Pixel value G31-Pixel value G33> 0 ..The peak position is the left side of the pixel G32 (closer to the pixel G31)
For example, if pixel value G32 = 200, pixel value G31 = 150, pixel value G33 = 50, and threshold = 10,
| 150-50 | = 100> threshold 150-50 = 100> 0
Therefore, the peak position in the pixel G32 is on the left side near the pixel G31.

次に、画像圧縮復号部17は以下を条件式として、画素G32内における副走査方向のピーク位置を検出する。
|画素値G22−画素値G42|<閾値・・ピーク位置は画素G32の中央部
画素値G22−画素値G42<0 ・・ピーク位置は画素G32内の下側(画素G42寄り)
画素値G22−画素値G42>0 ・・ピーク位置は画素G32内の上側(画素G22寄り)
例えば、画素値G22=180、画素値G42=40とすると、
|180−40|=140>閾値
180−40=140>0
となるため、画素G32内における副走査方向のピーク位置は画素G22寄りの上側にあることになる。
Next, the image compression decoding unit 17 detects the peak position in the sub-scanning direction in the pixel G32 using the following as a conditional expression.
| Pixel value G22−Pixel value G42 | <Threshold value ·· The peak position is the central pixel value G22 of the pixel G32−Pixel value G42 <0 ··· The peak position is below the pixel G32 (closer to the pixel G42).
Pixel value G22−Pixel value G42> 0 ..The peak position is the upper side in the pixel G32 (closer to the pixel G22).
For example, if pixel value G22 = 180 and pixel value G42 = 40,
| 180-40 | = 140> threshold 180-40 = 140> 0
Therefore, the peak position in the sub-scanning direction in the pixel G32 is on the upper side near the pixel G22.

従って、主走査方向及び副走査方向における画素G32内におけるピーク位置の検出をまとめると、画素G32内におけるピーク位置は画素G31寄りで画素22寄り、つまり3×3の領域の中の左上に位置することになる。従って、画素G32のピーク位置は図14(b)に示すGxの位置となる。   Therefore, when the detection of the peak position in the pixel G32 in the main scanning direction and the sub-scanning direction is put together, the peak position in the pixel G32 is located closer to the pixel G31 and closer to the pixel 22, that is, the upper left in the 3 × 3 region. It will be. Therefore, the peak position of the pixel G32 is the position of Gx shown in FIG.

画像圧縮復号部17は、この画素G32内におけるピーク位置Gxに基づいて、4×4画素の読み出し順序を読み出し順序記憶部171から読み出して、その順序に従って算術符号化を行う。次に、読み出し順序記憶部171に予め記憶されているピーク画素及びピーク位置に基づいた各画素の読み出し順序の設定方法について説明する。   The image compression decoding unit 17 reads out the reading order of 4 × 4 pixels from the reading order storage unit 171 based on the peak position Gx in the pixel G32, and performs arithmetic coding according to the order. Next, a method for setting the readout order of each pixel based on the peak pixels and peak positions stored in advance in the readout order storage unit 171 will be described.

図15及び16は、読み出し順序記憶部171に記憶されているピーク画素及びピーク位置に基づいた各画素の読み出し順序の設定方法を説明するための図である。上記と同様に、4×4画素のうちピーク画素を画素G32、画素G32を3×3の領域に分けたときのピーク位置をGxとする。そして、画素G32以外の各画素について、このピーク位置Gxより近い画素から順番に画素値を読み出す順序を設定していく。   FIGS. 15 and 16 are diagrams for explaining a method for setting the readout order of each pixel based on the peak pixels and peak positions stored in the readout order storage unit 171. FIG. Similarly to the above, the peak position when the peak pixel of the 4 × 4 pixels is divided into the pixel G32 and the pixel G32 into the 3 × 3 region is Gx. Then, for each pixel other than the pixel G32, the order in which pixel values are read in order from the pixel closer to the peak position Gx is set.

ピーク位置Gxより近い画素から順番に画素値を読み出す理由は以下の通りである。一般的に画像の濃度は、ピーク位置を中心として濃→淡、又は淡→濃と変化しているケースが多く、ピーク位置Gxより近い画素から順番に画素値を読み出すことによって濃度順に画素値を読み出すことになる。これにより、読み出した画素値の順序に単調増又は単調減の傾向を持たせることができる。この場合、例えば連続するデータにおいて前データに対する増加や減少を示す正負の情報が不要となって差分データのみを持っておけば良いため、符号化効率を高めることができる。   The reason why pixel values are read in order from pixels closer to the peak position Gx is as follows. In general, the density of an image often changes from dark to light or light to dark with the peak position as the center, and the pixel values are read in order of density from pixels closer to the peak position Gx. Will be read. As a result, the order of the read pixel values can have a monotonous increase or monotonic decrease tendency. In this case, for example, positive and negative information indicating an increase or decrease with respect to the previous data is unnecessary in the continuous data, and it is only necessary to have the difference data, so that the encoding efficiency can be improved.

図15(a)の左側の図は、4×4画素の各画素を3×3の領域に分割したものであり、分割した領域に示す数字は、ピーク位置Gxからの距離を示している。例えば画素G31の場合、ピーク位置Gxから最も近い3×3の領域は画素G31内の右上の領域であり、ピーク位置Gxからの距離は主走査方向と逆方向に分割された領域を「1」進んだ距離となる。従って、図15(a)の画素G31内には「1」と示されている。   The diagram on the left side of FIG. 15A is obtained by dividing each pixel of 4 × 4 pixels into 3 × 3 regions, and the numbers shown in the divided regions indicate the distance from the peak position Gx. For example, in the case of the pixel G31, the 3 × 3 region closest to the peak position Gx is the upper right region in the pixel G31, and the distance from the peak position Gx is “1” for the region divided in the direction opposite to the main scanning direction. It is the distance advanced. Therefore, “1” is indicated in the pixel G31 of FIG.

同様に、画素G22の場合、ピーク位置Gxから最も近い領域は画素G22内の左下の領域であり、ピーク位置Gxからの距離は副走査方向と逆方向に分割された領域を「1」進んだ距離となる。従って、図15(a)の画素G22内には「1」と示されている。また、画素G33の場合、ピーク位置Gxから最も近い領域は画素G33内の左上の領域であり、ピーク位置Gxからの距離は主走査方向に分割された領域を「3」進んだ距離となる。従って、図15(a)の画素G33内には「3」と示されている。このような方法で、各画素についてピーク位置Gxからの距離を決定する。   Similarly, in the case of the pixel G22, the region closest to the peak position Gx is the lower left region in the pixel G22, and the distance from the peak position Gx advances “1” in the region divided in the direction opposite to the sub-scanning direction. Distance. Accordingly, “1” is indicated in the pixel G22 of FIG. In the case of the pixel G33, the region closest to the peak position Gx is the upper left region in the pixel G33, and the distance from the peak position Gx is a distance advanced by “3” in the region divided in the main scanning direction. Accordingly, “3” is indicated in the pixel G33 of FIG. In this way, the distance from the peak position Gx is determined for each pixel.

そして、この距離が近い画素から順番に画素値を読み出す順序を設定していく。ここで、画素G31や画素G22のように、距離が「1」で同じ画素に関しては、ピーク画素から見て「上、左、右、下」の順序で優先的に読み出す順序を予め設定しておく。尚、この優先順序はあくまで例であり、変更可能である。上記の優先順序に従うと、先に画素G22を読み出して、次に画素G31を読み出すという順序になる。   And the order which reads a pixel value in an order from the pixel with this near distance is set. Here, like the pixel G31 and the pixel G22, with respect to the same pixel having a distance of “1”, an order of preferential reading in the order of “upper, left, right, lower” is set in advance when viewed from the peak pixel. deep. This priority order is only an example and can be changed. According to the above priority order, the pixel G22 is read first, and then the pixel G31 is read.

図15(a)の右側の図は、上記の方法に従って画素値の読み出し順序を決定した場合の読み出し順序を示しており、画素内に示された数字の小さい順から画素値を読み出すことになる。つまり、画素G32→G22→G31→G21→G33→G42→・・・という順序になる。   The diagram on the right side of FIG. 15A shows the readout order when the readout order of the pixel values is determined according to the above method, and the pixel values are read out in ascending order of the numbers indicated in the pixels. . That is, the order of the pixels G32 → G22 → G31 → G21 → G33 → G42 →.

図15(b)は画素G32のピーク位置が***にある場合、図15(c)は画素G32のピーク位置が右上にある場合、図15(d)は画素G32のピーク位置が左中央にある場合、図16(a)は画素G32のピーク位置が真ん中(中央)にある場合、図16(b)は画素G32のピーク位置が右中央にある場合、図16(c)は画素G32のピーク位置が左下にある場合、図16(d)は画素G32のピーク位置が下中央にある場合、図16(e)は画素G32のピーク位置が右下にある場合の画素値の読み出し順序を、上記の方法に従って決定した結果を示している。   15B shows the case where the peak position of the pixel G32 is in the upper center, FIG. 15C shows the case where the peak position of the pixel G32 is in the upper right, and FIG. 16A, the peak position of the pixel G32 is in the middle (center), FIG. 16B is the case where the peak position of the pixel G32 is in the right center, and FIG. When the peak position is at the lower left, FIG. 16D shows the pixel value readout order when the peak position of the pixel G32 is at the lower center, and FIG. 16E shows the pixel value readout order when the peak position of the pixel G32 is at the lower right. The results determined according to the above method are shown.

このように、各画素におけるピーク位置に対応した画素値の読み出し順序を予め決定し、この読み出し順序を読み出し順序記憶部171が記憶する。尚、上記で説明した画素値の読み出し順序はピーク画素がG32の場合のみを示したものであり、その読み出しパターンは9パターン存在する。このようにピーク画素が4×4画素における中央部に位置する場合、つまりピーク画素がG22、G23、G32又はG33である場合は画素値の読み出しパターンは9パターン存在することになり、読み出し順序記憶部171は中央部の各画素に対して9パターンの読み出し順序を記憶する(つまり、4画素×9パターン=36パターン)。   In this way, the reading order of pixel values corresponding to the peak position in each pixel is determined in advance, and the reading order storage unit 171 stores this reading order. The pixel value reading order described above shows only the case where the peak pixel is G32, and there are nine reading patterns. Thus, when the peak pixel is located in the center of 4 × 4 pixels, that is, when the peak pixel is G22, G23, G32 or G33, there are nine pixel value readout patterns, and the readout order is stored. The unit 171 stores the reading order of nine patterns for each pixel in the center (that is, 4 pixels × 9 patterns = 36 patterns).

一方、ピーク画素が4×4画素における角に位置する、つまりピーク画素がG11、G14、G41又はG44である場合、読み出しパターンはそれぞれ4パターン存在する。従って、読み出し順序記憶部171は角に位置する各画素に対して4パターンの読み出し順序を記憶する(つまり、4画素×4パターン=16パターン)。また、ピーク画素がピーク画素が4×4画素における角でない側部に位置する場合、つまりピーク画素がG12、G13、G21、G24、G31、G34、G42又はG43である場合、読み出しパターンはそれぞれ6パターン存在する。従って、読み出し順序記憶部171は側部に位置する各画素に対して6パターンの読み出し順序を記憶する(つまり、8画素×6パターン=48パターン)。これら各画素におけるパターン数を加算すると、読み出し順序記憶部171は36パターン+16パターン+48パターン=100パターンの画素値の読み出し順序を記憶することとなる。   On the other hand, when the peak pixel is located at a corner of 4 × 4 pixels, that is, when the peak pixel is G11, G14, G41, or G44, there are four read patterns. Accordingly, the readout order storage unit 171 stores the readout order of 4 patterns for each pixel located at the corner (that is, 4 pixels × 4 patterns = 16 patterns). Further, when the peak pixel is located on a side other than the corner of the 4 × 4 pixel, that is, when the peak pixel is G12, G13, G21, G24, G31, G34, G42 or G43, the readout pattern is 6 There is a pattern. Accordingly, the readout order storage unit 171 stores the readout order of 6 patterns for each pixel located on the side (that is, 8 pixels × 6 patterns = 48 patterns). When the number of patterns in each pixel is added, the readout order storage unit 171 stores the readout order of pixel values of 36 patterns + 16 patterns + 48 patterns = 100 patterns.

尚、上記にて説明したように、ピーク画素が中央部に位置(ピーク画素がG22、G23、G32又はG33)し、更にピーク位置が3×3に分割した領域の中央に位置するとき(つまり、図16(a)のとき)、このピーク位置を左右上下何れかにずらすことにより、パターン数を9パターンから8パターンに省略してもよい。   As described above, when the peak pixel is located at the center (the peak pixel is G22, G23, G32 or G33), and the peak position is located at the center of the 3 × 3 divided area (that is, In the case of FIG. 16A, the number of patterns may be omitted from 9 patterns to 8 patterns by shifting the peak position to the left, right, up or down.

図16(a)を用いて具体的に説明する。画素G32の中央にピーク位置Gxがある場合、このピーク位置をGy又はGz等の両隣や上下位置の何れかに置き換える。こうすることで中央にピーク位置Gxがある場合は図15(d)又は図16(b)等に示した画素値の読み出し順序を用いることができる。従って、ピーク画素がG22、G23、G32又はG33である場合は画素値の読み出しパターンは8パターンとなり、読み出し順序記憶部171は中央部(画素G22、G23、G33及びG33)の各画素に対して8パターンの読み出し順序を記憶することになる(つまり、4画素×8パターン=32パターン)。各画素におけるパターン数を加算すると、読み出し順序記憶部171は32パターン+16パターン+48パターン=96パターンの画素値の読み出し順序を記憶すればよく、上記の100パターンよりもパターン数を減らすことができる。   This will be specifically described with reference to FIG. When the peak position Gx is in the center of the pixel G32, the peak position is replaced with either the adjacent side such as Gy or Gz or the vertical position. In this way, when the peak position Gx is at the center, the pixel value reading order shown in FIG. 15D or FIG. 16B can be used. Therefore, when the peak pixel is G22, G23, G32, or G33, the pixel value readout pattern is 8 patterns, and the readout order storage unit 171 applies to each pixel in the central portion (pixels G22, G23, G33, and G33). The reading order of 8 patterns is stored (that is, 4 pixels × 8 patterns = 32 patterns). When the number of patterns in each pixel is added, the readout order storage unit 171 only needs to store the readout order of pixel values of 32 patterns + 16 patterns + 48 patterns = 96 patterns, and the number of patterns can be reduced as compared with the above 100 patterns.

図17は、本実施例における4×4画素の画素値の読み出し処理の流れを示したフローチャートである。まず画像圧縮復号部17は、離散ウェーブレット変換によって生成されたサブバンドを4×4画素に分割し(ステップS11)、分割した各画素の画素値からピーク画素を検出する(ステップS12)。更に、画像圧縮復号部17は、検出したピーク画素を3×3の領域に分割し、そのピーク画素内におけるピーク位置を検出する(ステップS13)。そして、画像圧縮復号部17は、ピーク画素及びピーク位置に基づいて画素値の読み出し順序を読み出し順序記憶部171から読み出し、その読み出し順序に基づいて4×4画素の各画素を読み出して、算術符号化を行う(ステップS14)。   FIG. 17 is a flowchart showing a flow of reading processing of pixel values of 4 × 4 pixels in the present embodiment. First, the image compression decoding unit 17 divides the subband generated by the discrete wavelet transform into 4 × 4 pixels (step S11), and detects a peak pixel from the pixel value of each divided pixel (step S12). Further, the image compression decoding unit 17 divides the detected peak pixel into 3 × 3 regions, and detects a peak position in the peak pixel (step S13). Then, the image compression decoding unit 17 reads out the reading order of the pixel values from the reading order storage unit 171 based on the peak pixel and the peak position, reads out each pixel of 4 × 4 pixels based on the reading order, and performs arithmetic coding. (Step S14).

ここで、作成された圧縮データを復号する際は、ピーク画素及びピーク位置に基づいた読み出し順序とは逆順で値を読み出す必要があるため、読み出し順序記憶部171に記憶された読み出し順序の内、何れの順序を用いたかが復号する際に識別できるように、画像圧縮復号部17は圧縮データに対して読み出し順序の識別情報を付加する。以下、圧縮データの復号処理の流れについて説明する。   Here, when decoding the generated compressed data, since it is necessary to read values in the reverse order to the reading order based on the peak pixel and the peak position, among the reading orders stored in the reading order storage unit 171, The image compression decoding unit 17 adds the identification information of the reading order to the compressed data so that it can be identified when decoding which order is used. The flow of the compressed data decoding process will be described below.

まず画像圧縮復号部17は、圧縮データに対して逆エントロピー符号化を行い、量子化データを取得する。この逆エントロピー符号化を行う際、画像圧縮復号部17は圧縮データに付加されている識別情報を用いて読み出し順序記憶部171から符号化の際に用いられた読み出し順序を読み出し、この順序と逆の順序で算術符号の復号を行った値を配置する。続いて画像圧縮復号部17は量子化データに対して逆量子化を行い、離散ウェーブレット変換された係数データを取得する。そして画像圧縮復号部17は係数データに対して逆離散ウェーブレット変換を行い、タイル画像に復元し、タイル画像を組み合わせた画像の表色系のコンポーネント変換を行って復号データを取得し、復号処理を終了する。   First, the image compression decoding unit 17 performs inverse entropy coding on the compressed data to obtain quantized data. When performing this reverse entropy encoding, the image compression / decoding unit 17 reads the reading order used for encoding from the reading order storage unit 171 using the identification information added to the compressed data, and reverses this order. The values obtained by decoding the arithmetic codes are arranged in this order. Subsequently, the image compression decoding unit 17 performs inverse quantization on the quantized data, and obtains coefficient data subjected to discrete wavelet transform. Then, the image compression decoding unit 17 performs inverse discrete wavelet transform on the coefficient data, restores the tile image, performs colorimetric component conversion of the image obtained by combining the tile images, acquires the decoded data, and performs the decoding process. finish.

以上、説明したように、ピーク位置Gxより近い画素から順番に画素値を読み出すことによって濃度順に画素値を読み出すことができる。これにより、読み出した画素値の順序に単調増又は単調減の傾向を持たせることができ、例えば連続するデータにおいて前データに対する増加や減少を示す正負の情報が不要となって差分データのみを持っておけば良いため、復号後の画質を落とすことなく符号化効率を高めることができる。   As described above, the pixel values can be read in order of density by reading the pixel values in order from the pixels closer to the peak position Gx. As a result, the order of the read pixel values can have a monotonous increase or monotonic decrease tendency. For example, in continuous data, there is no need for positive / negative information indicating an increase or decrease with respect to the previous data, and only the difference data is included. Therefore, the encoding efficiency can be increased without degrading the image quality after decoding.

1 画像圧縮復号装置
11 制御部
12 記憶部
121 画像圧縮プログラム
13 入力操作部
14 表示部
15 I/F部
16 ネットワークI/F部
17 画像圧縮部(変換手段、分割手段、ウェーブレット変換手段、量子化手段、符号化手段、検出手段、決定手段、逆符号化手段、逆量子化手段、逆ウェーブレット手段、復号手段
171 読み出し順序記憶部(記憶手段)
DESCRIPTION OF SYMBOLS 1 Image compression decoding apparatus 11 Control part 12 Memory | storage part 121 Image compression program 13 Input operation part 14 Display part 15 I / F part 16 Network I / F part 17 Image compression part (Conversion means, division | segmentation means, wavelet transformation means, quantization) Means, encoding means, detection means, determination means, inverse encoding means, inverse quantization means, inverse wavelet means, decoding means 171 Reading order storage section (storage means)

Claims (7)

入力された網点画像の画像データを輝度成分と色差成分からなる表色系に変換する変換手段と、
前記変換された画像データを複数のタイルに分割する分割手段と、
前記タイル毎にウェーブレット変換を施して前記タイルをLL、HL、LH及びHHサブバンドに分解し、かつ、前記ウェーブレット変換を施して得られた係数データをサブバンド毎の画像をそれぞれ表す複数の画素値として主走査方向成分と副走査方向成分とからなる画素マトリクスに配置するウェーブレット変換手段と、
前記各画素マトリクスに配置された前記複数の各画素値を量子化する量子化手段と、
前記量子化手段で量子化された前記画素値を前記画素マトリクスから順次読み出して符号化を行い、符号化データを出力する符号化手段と、
前記符号化手段が前記サブバンドの符号化を行う際の前記画素値の前記画素マトリクスからの読み出し順序として、ウエーブレット変換後のHLサブバンドの領域では主走査方向に連続して読み出し、ウエーブレット変換後のLHサブバンドの領域では副走査方向に連続して読み出し、ウエーブレット変換後のLLサブバンドの領域では、1行目の一番左の画素より主走査方向に2画素連続して画素値を読み出し、次に2行目の一番左の画素より主走査方向に2画素連続して画素値を読み出し、次に1行目の左から3画素目の画素より主走査方向に2画素連続して画素値を読み出し、次に2行目の左から3画素目の画素より主走査方向に2画素連続して画素値を読み出し、ウエーブレット変換後のHHサブバンドの領域では、1列目の一番上の画素より副走査方向に2画素連続して画素値を読み出し、次に2列目の一番上の画素より副走査方向に2画素連続して画素値を読み出し、次に3列目の一番上の画素より副走査方向に2画素連続して画素値を読み出し、次に4列目の一番上の画素より副走査方向に2画素連続して画素値を読み出す順序を前記サブバンド毎に記憶する記憶手段と、
を備え、前記符号化手段は、前記記憶手段に記憶された読み出し順序に従って前記サブバンドに含まれる前記画素値を読み出して符号化を行うものである画像圧縮装置。
Conversion means for converting the image data of the input halftone dot image into a color system comprising a luminance component and a color difference component;
Dividing means for dividing the converted image data into a plurality of tiles;
A plurality of pixels that perform wavelet transform for each tile to decompose the tile into LL, HL, LH, and HH subbands, and the coefficient data obtained by performing the wavelet transform represents an image for each subband. Wavelet transform means arranged in a pixel matrix comprising a main scanning direction component and a sub-scanning direction component as values ;
Quantization means for quantizing each of the plurality of pixel values arranged in each pixel matrix ;
Encoding means for sequentially reading out and encoding each pixel value quantized by the quantization means from the pixel matrix and outputting encoded data;
Examples reading order from the pixel matrix of each pixel value when encoding means perform encoding of the sub-band, read in succession in the main scanning direction in the region of the HL subband after wavelet transform, wave In the area of the LH subband after the let transform, the pixels are continuously read out in the sub-scanning direction, and in the area of the LL subband after the wavelet transform, two pixels are successively consecutive in the main scanning direction from the leftmost pixel in the first row. The pixel value is read out, then the pixel value is read in succession in the main scanning direction from the leftmost pixel in the second row, and then 2 in the main scanning direction from the third pixel from the left in the first row. Pixel values are read out continuously, then pixel values are read out continuously in the main scanning direction from the third pixel from the left in the second row, and in the HH subband region after wavelet conversion, 1 First in row The pixel values are continuously read out from the first pixel in the sub-scanning direction, and then the pixel values are read out continuously from the uppermost pixel in the second column in the sub-scanning direction. The order of reading out pixel values from the top pixel in the sub-scanning direction for two pixels, and then reading out pixel values from the topmost pixel in the fourth column in the sub-scanning direction is determined for each subband. Storage means for storing in,
And the encoding means reads and encodes the pixel values included in the subbands in accordance with the reading order stored in the storage means.
入力された網点画像の画像データを輝度成分と色差成分からなる表色系に変換する変換手段と、
前記変換された画像データを複数のタイルに分割する分割手段と、
前記タイル毎にウェーブレット変換を施して前記タイルをLL、HL、LH及びHHサブバンドに分解し、かつ、前記ウェーブレット変換を施して得られた係数データをサブバンド毎の画像をそれぞれ表す複数の画素値として主走査方向成分と副走査方向成分とからなる画素マトリクスに配置するウェーブレット変換手段と、
前記各画素マトリクスに配置された前記複数の画素値を量子化する量子化手段と、
前記量子化手段で量子化された前記画素値を前記画素マトリクスから順次読み出して符号化を行い、符号化データを出力する符号化手段と、
前記サブバンドを構成する画素のうち濃度がピークとなっているピーク画素を検出する検出手段と、
前記検出されたピーク画素の周辺画素の画素値を用いて当該ピーク画素内における濃度のピーク位置を求める決定手段と、
前記符号化手段が前記サブバンドの符号化を行う際の前記各画素値を前記画素マトリクスから読み出すための順序であって、前記ピーク画素の位置及び当該ピーク画素内における濃度のピーク位置に応じてそれぞれ異なる順序を読み出し順序として記憶する記憶手段と、
を備え、前記符号化手段は、前記検出手段が検出したピーク画素の位置及び前記決定手段が求めた当該ピーク画素内における濃度のピーク位置に応じて前記記憶手段から前記読み出し順序を読み出し、当該読み出された読み出し順序に従って前記サブバンドの画素値を読み出して符号化を行うものである画像圧縮装置。
Conversion means for converting the image data of the input halftone dot image into a color system comprising a luminance component and a color difference component;
Dividing means for dividing the converted image data into a plurality of tiles;
A plurality of pixels that perform wavelet transform for each tile to decompose the tile into LL, HL, LH, and HH subbands, and the coefficient data obtained by performing the wavelet transform represents an image for each subband. Wavelet transform means arranged in a pixel matrix comprising a main scanning direction component and a sub-scanning direction component as values ;
Quantization means for quantizing the plurality of pixel values arranged in each pixel matrix ;
Encoding means for sequentially reading out and encoding each pixel value quantized by the quantization means from the pixel matrix and outputting encoded data;
Detecting means for detecting a peak pixel having a peak density among the pixels constituting the subband;
Determining means for obtaining a peak position of density in the peak pixel using a pixel value of a peripheral pixel of the detected peak pixel;
The order for reading out the pixel values from the pixel matrix when the encoding means performs the encoding of the subband, depending on the position of the peak pixel and the peak position of the density within the peak pixel. Storage means for storing each different order as a reading order ;
The encoding means reads the reading order from the storage means according to the position of the peak pixel detected by the detecting means and the peak position of the density in the peak pixel determined by the determining means, and reads the reading An image compression apparatus that reads out and encodes each pixel value of the subband in accordance with the read out order.
前記記憶手段は、前記ピーク画素内における濃度のピーク位置から近い画素から順番に画素値を読み出すための順序を、前記ピーク画素の位置及び当該ピーク画素内における濃度のピーク位置毎にそれぞれ記憶するものである請求項に記載の画像圧縮装置。 The storage means stores the order for reading out pixel values in order from the pixel closest to the density peak position in the peak pixel for each peak pixel position and density peak position in the peak pixel, respectively. The image compression apparatus according to claim 2 . 請求項1〜3の何れか一項に記載の画像圧縮装置と、
前記符号化データを前記記憶手段に記憶された読み出し順序の内、前記符号化手段が符号化を行う際に用いた読み出し順序と逆の順序で読み出して逆符号化を行い、量子化データを出力する逆符号化手段と、
前記量子化データを逆量子化して変換係数を出力する逆量子化手段と、
前記変換係数に逆ウェーブレット変換を施してタイル画像を出力する逆ウェーブレット変換手段と、
前記タイル画像を組み合わせた画像の表色系の変換を行って復号画像を取得する復号手段と、
を更に備えた画像圧縮復号装置。
The image compression apparatus according to any one of claims 1 to 3 ,
The coded data is read out in the reverse order to the reading order used when the coding means performs the coding, and the quantized data is output. Decoding means for
Inverse quantization means for inversely quantizing the quantized data and outputting transform coefficients;
Inverse wavelet transform means for performing inverse wavelet transform on the transform coefficient and outputting a tile image;
Decoding means for obtaining a decoded image by performing a color system conversion of an image obtained by combining the tile images;
An image compression decoding apparatus further comprising:
コンピュータを、
入力された網点画像の画像データを輝度成分と色差成分からなる表色系に変換する変換手段、
前記変換された画像データを複数のタイルに分割する分割手段、
前記タイル毎にウェーブレット変換を施して前記タイルをLL、HL、LH及びHHサブバンドに分解し、かつ、前記ウェーブレット変換を施して得られた係数データをサブバンド毎の画像をそれぞれ表す複数の画素値として主走査方向成分と副走査方向成分とからなる画素マトリクスに配置するウェーブレット変換手段、
前記各画素マトリクスに配置された前記複数の画素値を量子化する量子化手段、
前記量子化手段で量子化された前記各画素値を前記画素マトリクスから読み出して符号化を行い、符号化データを出力する符号化手段、
として機能させ
前記符号化手段が前記サブバンドの符号化を行う際の前記画素値の前記画素マトリクスからの読み出し順序として、ウエーブレット変換後のHLサブバンドの領域では主走査方向に連続して読み出し、ウエーブレット変換後のLHサブバンドの領域では副走査方向に連続して読み出し、ウエーブレット変換後のLLサブバンドの領域では、1行目の一番左の画素より主走査方向に2画素連続して画素値を読み出し、次に2行目の一番左の画素より主走査方向に2画素連続して画素値を読み出し、次に1行目の左から3画素目の画素より主走査方向に2画素連続して画素値を読み出し、次に2行目の左から3画素目の画素より主走査方向に2画素連続して画素値を読み出し、ウエーブレット変換後のHHサブバンドの領域では、1列目の一番上の画素より副走査方向に2画素連続して画素値を読み出し、次に2列目の一番上の画素より副走査方向に2画素連続して画素値を読み出し、次に3列目の一番上の画素より副走査方向に2画素連続して画素値を読み出し、次に4列目の一番上の画素より副走査方向に2画素連続して画素値を読み出す
画像圧縮プログラム。
Computer
Conversion means for converting the image data of the input halftone image into a color system comprising a luminance component and a color difference component;
A dividing unit for dividing the converted image data into a plurality of tiles;
A plurality of pixels that perform wavelet transform for each tile to decompose the tile into LL, HL, LH, and HH subbands, and the coefficient data obtained by performing the wavelet transform represents an image for each subband. Wavelet transform means arranged in a pixel matrix comprising a main scanning direction component and a sub-scanning direction component as values ,
Quantization means for quantizing the plurality of pixel values arranged in each pixel matrix ;
Encoding means for reading out each pixel value quantized by the quantization means from the pixel matrix , performing encoding, and outputting encoded data;
To function as,
Examples reading order from the pixel matrix of each pixel value when encoding means perform encoding of the sub-band, read in succession in the main scanning direction in the region of the HL subband after wavelet transform, wave In the area of the LH subband after the let transform, the pixels are continuously read out in the sub-scanning direction, and in the area of the LL subband after the wavelet transform, two pixels are successively consecutive in the main scanning direction from the leftmost pixel in the first row. The pixel value is read out, then the pixel value is read in succession in the main scanning direction from the leftmost pixel in the second row, and then 2 in the main scanning direction from the third pixel from the left in the first row. Pixel values are read out continuously, then pixel values are read out continuously in the main scanning direction from the third pixel from the left in the second row, and in the HH subband region after wavelet conversion, 1 First in row The pixel values are continuously read out from the first pixel in the sub-scanning direction, and then the pixel values are read out continuously from the uppermost pixel in the second column in the sub-scanning direction. Read out pixel values in the sub-scanning direction from the top pixel, and then read out pixel values in the sub-scanning direction from the top pixel in the fourth column. Image compression program.
コンピュータを、
入力された網点画像の画像データを輝度成分と色差成分からなる表色系に変換する変換手段、
前記変換された画像データを複数のタイルに分割する分割手段、
前記タイル毎にウェーブレット変換を施して前記タイルをLL、HL、LH及びHHサブバンドに分解し、かつ、前記ウェーブレット変換を施して得られた係数データをサブバンド毎の画像をそれぞれ表す複数の画素値として主走査方向成分と副走査方向成分とからなる画素マトリクスに配置するウェーブレット変換手段、
前記各画素マトリクスに配置された前記複数の画素値を量子化する量子化手段、
前記量子化手段で量子化された前記各画素値を前記画素マトリクスから順次読み出して符号化を行い、符号化データを出力する符号化手段
前記サブバンドを構成する画素のうち濃度がピークとなっているピーク画素を検出する検出手段、
前記検出されたピーク画素の周辺画素の画素値を用いて当該ピーク画素内における濃度のピーク位置を求める決定手段、
として機能させ、
前記検出手段が検出したピーク画素の位置及び前記決定手段が求めた当該ピーク画素内における濃度のピーク位置に応じてそれぞれ異なる読み出し順序で前記サブバンドに含まれる前記各画素値を前記画素マトリクスから読み出して符号化を行う
画像圧縮プログラム。
Computer
Conversion means for converting the image data of the input halftone image into a color system comprising a luminance component and a color difference component;
A dividing unit for dividing the converted image data into a plurality of tiles;
A plurality of pixels that perform wavelet transform for each tile to decompose the tile into LL, HL, LH, and HH subbands, and the coefficient data obtained by performing the wavelet transform represents an image for each subband. Wavelet transform means arranged in a pixel matrix comprising a main scanning direction component and a sub-scanning direction component as values ,
Quantization means for quantizing the plurality of pixel values arranged in each pixel matrix ;
Encoding means for sequentially reading out and encoding each pixel value quantized by the quantization means from the pixel matrix and outputting encoded data ;
Detecting means for detecting a peak pixel having a peak density among the pixels constituting the subband;
Determining means for obtaining a peak position of density in the peak pixel using a pixel value of a peripheral pixel of the detected peak pixel;
Function as
Reads the pixel value the detection means included in said subband, respectively in different reading order in accordance with the peak position of the concentration at the position and the determining means within the peak pixel determined peak pixels detected from the pixel matrix An image compression program that performs encoding.
請求項5又は6に記載された画像圧縮プログラムを含み、更にコンピュータを、
前記符号化手段が前記符号化を行う際の前記画素値の読み出し順序と逆の順序で前記符号化データを読み出して逆符号化を行い、量子化データを出力する逆符号化手段、
前記量子化データを逆量子化して変換係数を出力する逆量子化手段、
前記変換係数に逆ウェーブレット変換を施してタイル画像を出力する逆ウェーブレット変換手段、
前記タイル画像を組み合わせた画像の表色系の変換を行って復号画像を取得する復号手段、
として機能させる画像圧縮復号プログラム。
An image compression program according to claim 5 or 6 , further comprising a computer,
Decoding means for reading out the encoded data in the reverse order to the reading order of the pixel values when the encoding means performs the encoding, performing reverse encoding, and outputting quantized data;
Inverse quantization means for inversely quantizing the quantized data and outputting transform coefficients;
Inverse wavelet transform means for applying an inverse wavelet transform to the transform coefficient and outputting a tile image;
Decoding means for obtaining a decoded image by performing a color system conversion of an image obtained by combining the tile images;
An image compression decoding program that functions as
JP2009226313A 2009-09-30 2009-09-30 Image compression apparatus, image compression decoding apparatus, image compression program, and image compression decoding program Expired - Fee Related JP5175820B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2009226313A JP5175820B2 (en) 2009-09-30 2009-09-30 Image compression apparatus, image compression decoding apparatus, image compression program, and image compression decoding program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2009226313A JP5175820B2 (en) 2009-09-30 2009-09-30 Image compression apparatus, image compression decoding apparatus, image compression program, and image compression decoding program

Publications (2)

Publication Number Publication Date
JP2011077766A JP2011077766A (en) 2011-04-14
JP5175820B2 true JP5175820B2 (en) 2013-04-03

Family

ID=44021285

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2009226313A Expired - Fee Related JP5175820B2 (en) 2009-09-30 2009-09-30 Image compression apparatus, image compression decoding apparatus, image compression program, and image compression decoding program

Country Status (1)

Country Link
JP (1) JP5175820B2 (en)

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2933457B2 (en) * 1993-02-18 1999-08-16 日本電気株式会社 Wavelet transform coding method
JP3278579B2 (en) * 1996-09-19 2002-04-30 沖電気工業株式会社 Scanning method for wavelet transform coding

Also Published As

Publication number Publication date
JP2011077766A (en) 2011-04-14

Similar Documents

Publication Publication Date Title
JP4365957B2 (en) Image processing method and apparatus and storage medium
US7277596B2 (en) Apparatus configured to eliminate image data show-through
JP4773678B2 (en) Document system
US9414068B2 (en) Image processing apparatus and method
JP2011049923A (en) Image compression apparatus and image compression program
US20240080481A1 (en) Sparse matrix representation using a boundary of non-zero coefficients
JP2017192078A (en) Picture encoder and control method thereof
Kim et al. A lossless color image compression method based on a new reversible color transform
JP2004040429A (en) Digital image encoder, digital image encoding method used therefor, and program therefor
JP4918026B2 (en) Image coding apparatus, image coding method, computer program, and information recording medium
JP5175820B2 (en) Image compression apparatus, image compression decoding apparatus, image compression program, and image compression decoding program
JP2004048607A (en) Digital image coding device and method thereof
JP4966263B2 (en) Image processing apparatus and image processing program
JP2010004279A (en) Image processor and image forming apparatus including the same
JP5560172B2 (en) Image processing apparatus, image processing method, and image processing program
US20070253629A1 (en) Image Processing Device and Image Forming Device Provided therewith
JP4978934B2 (en) Image compression apparatus and program
JP5017198B2 (en) Image processing apparatus and image processing program
JP5244841B2 (en) Image processing apparatus, image processing method, and image processing program
JP2011077760A (en) Image compression device and image compression program
JP4194311B2 (en) Moving picture encoding apparatus, moving picture decoding apparatus, and methods thereof
JP3867857B2 (en) Color image processing device
Li et al. Image compression standards
JP2010220126A (en) Image encoder, image encoding method, image decoder, computer program and information recording medium
Ethiraj et al. Hierarchical Prediction and Context Adaptive Coding for Lossless Color Image Compression

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20111025

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20120911

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20120918

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20121109

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20121211

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20130107

R150 Certificate of patent or registration of utility model

Ref document number: 5175820

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

LAPS Cancellation because of no payment of annual fees