JP2001128182A - Image encoding method and computer-readable recording medium storing image encoding program - Google Patents

Image encoding method and computer-readable recording medium storing image encoding program

Info

Publication number
JP2001128182A
JP2001128182A JP30986199A JP30986199A JP2001128182A JP 2001128182 A JP2001128182 A JP 2001128182A JP 30986199 A JP30986199 A JP 30986199A JP 30986199 A JP30986199 A JP 30986199A JP 2001128182 A JP2001128182 A JP 2001128182A
Authority
JP
Japan
Prior art keywords
pixel
image
image data
pixels
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.)
Pending
Application number
JP30986199A
Other languages
Japanese (ja)
Inventor
Masaaki Touhou
聖朝 東方
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujifilm Business Innovation Corp
Original Assignee
Fuji Xerox Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fuji Xerox Co Ltd filed Critical Fuji Xerox Co Ltd
Priority to JP30986199A priority Critical patent/JP2001128182A/en
Publication of JP2001128182A publication Critical patent/JP2001128182A/en
Pending legal-status Critical Current

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)

Abstract

PROBLEM TO BE SOLVED: To perform reversible encoding on image data indicating multi-valued images at a high compression factor. SOLUTION: In the image encoding method in which image data are encoded by predicting the picture element value of a noticed picture element X in the image data from the picture element values of a plurality of reference picture elements A-E which are different from the noticed picture element X, the picture elements A-E which are not directly adjoined to the noticed picture element X or indirectly adjoined to the picture element X through other reference picture elements are provided at separate positions.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、画像データを圧縮
するための画像符号化方法に関し、特に多値画像を表す
画像データに対する画像符号化方法に関するものであ
る。また、本発明は、プログラムに従って処理を実行す
るコンピュータに画像データを圧縮させるための画像符
号化プログラムを格納したコンピュータ読取可能な記録
媒体に関するものである。
The present invention relates to an image encoding method for compressing image data, and more particularly to an image encoding method for image data representing a multi-valued image. Further, the present invention relates to a computer-readable recording medium storing an image encoding program for compressing image data by a computer that executes processing according to the program.

【0002】[0002]

【従来の技術】一般に、フルカラー画像を表す画像デー
タは、非常に大量のデータ量を持つことが知られてい
る。例えば、300SPI(Spot per inch)、A4サイ
ズ4色フルカラー(Red,Green,Blue各色8bit,計24bit)
の画像は、約24MBのデータ量である。そのため、画
像データを蓄積、伝送する際には、圧縮処理を行うこと
が多い。
2. Description of the Related Art It is generally known that image data representing a full-color image has a very large amount of data. For example, 300 SPI (Spot per inch), A4 size 4 colors full color (Red, Green, Blue 8 bits each color, total 24 bits)
Image has a data amount of about 24 MB. Therefore, when storing and transmitting image data, compression processing is often performed.

【0003】従来、画像データを圧縮処理する方法とし
ては、例えばJPEG(Joint Photographic Expert Gr
oup)で定められたベースラインプロセスと呼ばれる非可
逆符号化が広く知られている。このJPEGベースライ
ン方式では、図12に示すように、画像データを縦横8
×8画素のブロックに分割し、各ブロック毎にDCT
(Discrete Cosine Transform)と呼ばれる変換を施し、
DCT変換データを量子化マトリックスを用いてDCT
係数毎に量子化して高周波成分を圧縮し、最後に量子化
データをエントロピ符号化(ハフマン符号化)して出力
するようになっている。
Conventionally, as a method of compressing image data, for example, JPEG (Joint Photographic Expert Gr
Oup), a lossy coding called a baseline process is widely known. In this JPEG baseline method, as shown in FIG.
Divided into × 8 pixel blocks, DCT for each block
(Discrete Cosine Transform)
DCT transforms DCT data using a quantization matrix.
Quantization is performed for each coefficient to compress high-frequency components, and finally, quantized data is entropy-coded (Huffman-coded) and output.

【0004】ただし、JPEGベースライン方式では、
DCT変換が2回の8×8画素サイズの行列演算であ
り、量子化が行列の要素同士の除算であるので、1色の
1画素を処理するのに、16回の乗算と14回の加算、
さらに1回の除算が必要となる。したがって、300S
PIの画像データ全体であれば、約8百万画素で4色で
あるので、総計で5億千2百万回の乗算と4億4千8百
万回の加算それに3千2百万回の除算が必要となる。こ
れに加えて、ハフマン符号化や画像の読み込みその他の
オーバーヘッドなどがあり、最新鋭のワークステーショ
ンを用いても、300SPI、A4サイズの4色フルカ
ラーの画像データを圧縮するには、1分以上の時間を費
やしてしまう。また、JPEGベースライン方式による
圧縮は、非可逆圧縮であり、どのような符号化を行って
も符号化前の画像が復元できないという難点もある。
However, in the JPEG baseline method,
Since the DCT transform is two times of matrix operation of 8 × 8 pixels and the quantization is division of elements of the matrix, processing one pixel of one color requires 16 multiplications and 14 additions. ,
One more division is required. Therefore, 300S
Since the entire image data of the PI is about 8 million pixels and 4 colors, a total of 522 million multiplications, 448 million additions, and 32 million times are used. Is required. In addition to this, there is Huffman coding, image reading, and other overhead. Even with a state-of-the-art workstation, it takes more than one minute to compress four full-color image data of 300 SPI, A4 size. Spend time. Further, the compression by the JPEG baseline method is lossy compression, and there is a disadvantage that an image before encoding cannot be restored even if any encoding is performed.

【0005】これらのことから、近年では、比較的少な
い演算量で圧縮が行える可逆圧縮方法として種々の予測
符号化によるものが提案されている。例えば、特開平9
−200774号公報には、注目画素周辺の複数の画素
値を予測値として用い、その中から最も予測誤差の小さ
かった予測値を用いて可逆符号化するものが開示されて
いる。詳しくは、図13に示すように、注目画素Pの値
をその直左画素Xまたは直上画素Yの値から各々異なる
パラメータに基づいて予測し、それぞれの予測値と注目
画素値との差分(予測誤差)を算出し、その予測誤差の
大きさと所定の優先度とに基づいて一つの予測値を選択
し、選択した予測値に基づいて注目画素Pの値を符号化
することで、効率よく画像データを圧縮できるようにし
たものが開示されている。
[0005] For these reasons, in recent years, various predictive coding methods have been proposed as a reversible compression method capable of performing compression with a relatively small amount of calculation. For example, JP-A-9
Japanese Patent Application Laid-Open No. 2007-774 discloses a method in which a plurality of pixel values around a target pixel are used as prediction values, and lossless encoding is performed using a prediction value with the smallest prediction error among them. More specifically, as shown in FIG. 13, the value of the target pixel P is predicted from the value of the pixel X or Y immediately above it based on different parameters, and the difference between each predicted value and the target pixel value (prediction) Error) is calculated, one prediction value is selected based on the magnitude of the prediction error and a predetermined priority, and the value of the pixel of interest P is encoded based on the selected prediction value, so that the image is efficiently processed. A system that can compress data is disclosed.

【0006】また、例えば特開平9−224253号公
報には、コンピュータグラフィックス(Computer Graph
ics;CG)やページ記述言語(Page Description Langu
age;PDL)処理系で生成した画像データを可逆圧縮す
るのに好適なものが開示されている。詳しくは、図14
に示すように、注目画素Xの値をその直左、直上などの
画素a〜dの値からそれぞれ異なる予測手法で予測し、
それぞれの予測値と注目画素値との予測誤差を算出し、
その予測誤差が「0」であるか否かを判断し、予測誤差
が「0」であればこれに対応する予測値に基づいて注目
画素Xの値を符号化することで、CG画像のような予測
的中率の高い画像に対して高い圧縮率を実現できるよう
にしたものが開示されている。
For example, Japanese Patent Application Laid-Open No. 9-224253 discloses a computer graphic (Computer Graph).
ics; CG) and page description language (Page Description Langu)
An image suitable for reversibly compressing image data generated by an age (PDL) processing system is disclosed. For details, see FIG.
, The value of the pixel of interest X is predicted by different prediction methods from the values of the pixels a to d such as immediately to the left and immediately above,
Calculate the prediction error between each predicted value and the pixel value of interest,
It is determined whether or not the prediction error is “0”, and if the prediction error is “0”, the value of the pixel of interest X is encoded based on the prediction value corresponding to the prediction error. There is disclosed an image capable of realizing a high compression ratio for an image having a high predictive accuracy.

【0007】さらに、例えば特開平11−234683
号公報には、CGやPDL処理系で生成した画像データ
に対し、圧縮率の高い可逆符号化を高速に行う画像符号
化方法が開示されている。この画像符号化方法によれ
ば、圧縮対象となる画像データのライン毎に以下の処理
を行うようになっている。先ず、図14に示すように、
注目画素Xの値をその直前、直上、左上、右上の画素
a,b,c,dの値から第1の予測手法で予測し、その
予測値が注目画素Xの値と一致すれば、第1の予測手法
を表す符号を出力する。第1の予測手法の予測値が注目
画素Xの値と一致しない場合、初めて、第2以降の予測
手法の予測値を求め、これらと注目画素Xの値とを比較
する。そして、一致した予測値があれば、対応する予測
手法を表す符号を出力し、いずれも一致しなければ予測
誤差を出力する。これにより、CG画像のような予測的
中率の高い画像に対して高い圧縮率を実現するのみなら
ず、その圧縮符号化を高速に行うことを可能にしてい
る。
Further, for example, Japanese Patent Application Laid-Open No. H11-234683
Japanese Patent Application Laid-Open Publication No. H11-163873 discloses an image encoding method that performs high-speed lossless encoding with a high compression ratio on image data generated by a CG or PDL processing system. According to this image encoding method, the following processing is performed for each line of image data to be compressed. First, as shown in FIG.
The value of the target pixel X is predicted from the values of the pixels a, b, c, and d immediately before, immediately above, at the upper left, and at the upper right by the first prediction method, and if the predicted value matches the value of the target pixel X, A code representing the prediction method 1 is output. When the predicted value of the first prediction method does not match the value of the target pixel X, the predicted values of the second and subsequent prediction methods are obtained for the first time, and these are compared with the value of the target pixel X. Then, if there is a matching predicted value, a code indicating the corresponding prediction method is output, and if none of them match, a prediction error is output. This not only realizes a high compression rate for an image having a high predictive accuracy, such as a CG image, but also enables high-speed compression encoding.

【0008】[0008]

【発明が解決しようとする課題】しかしながら、上述し
た従来の予測符号化による可逆画像符号化方法では、い
ずれも注目画素の値をその周囲、さらに詳しくは注目画
素に隣接する画素の値から予測しているため、圧縮処理
の対象となる画像データによっては高い圧縮率を得られ
ないことがある。
However, in the above-described conventional lossless image coding method using predictive coding, in each case, the value of a target pixel is predicted from its surroundings, more specifically, from the values of pixels adjacent to the target pixel. Therefore, a high compression ratio may not be obtained depending on image data to be subjected to compression processing.

【0009】これまでの画像符号化方法で効率よく圧縮
できない画像データを調査したところ、これらの画像デ
ータの多くが網かけされた画像を表すものであることが
判明した。ここでいう網かけ画像とは、多階調の画像、
すなわち1画素当たりのビット数の多い画像から、より
低階調の画像、すなわち1画素当たりのビット数の少な
い画像に変換するための処理が施されたものである。
Examination of image data that cannot be efficiently compressed by the conventional image encoding method has revealed that most of these image data represent shaded images. The shaded image here is a multi-tone image,
That is, a process for converting an image having a large number of bits per pixel into an image having a lower gradation, that is, an image having a small number of bits per pixel, has been performed.

【0010】このような網かけ画像は、パーソナルコン
ピュータ上にて利用されることが多い。例えば、パーソ
ナルコンピュータ用のオペレーティングシステムとして
広く普及しているウィンドウズ(Windows;米国マイクロ
ソフト社の登録商標)においては、1画素がR,G,B
各色8bitの計24bit で表されるフルカラー画像を、より
少ないビット数、例えば1画素を8bitのみで表す限定色
カラーの画像に変換するために、網かけ処理を施すこと
がある。これは、例えば画像表示の際に使用できるメモ
リ容量に制限がある場合などに行われることが多い。
Such a shaded image is often used on a personal computer. For example, in Windows (Windows; registered trademark of Microsoft Corporation) widely used as an operating system for personal computers, one pixel is composed of R, G, and B.
In order to convert a full-color image represented by a total of 24 bits of 8 bits for each color into a limited color image in which the number of bits is smaller, for example, one pixel is represented only by 8 bits, a shading process is sometimes performed. This is often performed, for example, when there is a limit on the memory capacity that can be used for displaying images.

【0011】ただし、網かけ画像は、フルカラー画像と
異なり、中間調の色を直接表現することができない。こ
れは、例えば、フルカラー画像であれば1画素あたり24
bitであるため224階調表現可能であったものが、網か
け処理によって1画素あたり8bitとなり28 階調しか表
現できなくなるためである。そのため、網かけ画像で
は、複数の連続する画素を1ブロックとすることで、疑
似的に中間調の色を表現するようになっている。
However, unlike a full-color image, a halftone image cannot directly express a halftone color. This is, for example, 24 pixels per pixel for a full-color image.
what was possible 2 24 gradation for a bit is because only 8bit next 2 8 gradations per pixel by shading treatment can not be expressed. For this reason, in a shaded image, a plurality of continuous pixels are regarded as one block, so that a halftone color is simulated.

【0012】このことから、網かけ画像の画素構造は、
縦、横、斜めの一定周期毎に同じ画素値が出現する確率
が高い。例えば、上述したウィンドウズにおいては、図
15に示すように、縦横8画素のブロックを単位として
網かけ処理を行っているため、8画素ずつ離れた位置に
同一の画素値が現れ、網の周期が主走査、副走査方向と
も8画素となる場合が多い。また、この8画素周期の網
は、4画素周期のサブスクリーン4個からなっているの
で、4画素毎に同じ画素値が出現する確率も高い。
From this, the pixel structure of the shaded image is
There is a high probability that the same pixel value will appear in each of the vertical, horizontal, and oblique fixed periods. For example, in the above-described Windows, as shown in FIG. 15, since the shading process is performed in units of blocks of 8 pixels in length and width, the same pixel value appears at positions separated by 8 pixels, and the period of the mesh is In many cases, the number of pixels is 8 in both the main scanning direction and the sub-scanning direction. In addition, since the eight-pixel cycle network includes four sub-screens with four pixel cycles, the probability that the same pixel value appears every four pixels is high.

【0013】したがって、網かけ画像を表す画像データ
については、特に網かけ前の画像が一定の中間調であっ
た場合に、隣接する画素同士の画素値が連続しなくなる
ので、上述した従来の予測符号化による可逆画像符号化
方法を用いて圧縮処理を行っても、高い圧縮率を得られ
ない可能性が高くなる。
Therefore, regarding image data representing a shaded image, especially when the image before shading has a fixed halftone, the pixel values of adjacent pixels are not continuous. Even if a compression process is performed using a reversible image encoding method based on encoding, there is a high possibility that a high compression rate cannot be obtained.

【0014】そこで、本発明は、上述した事情に鑑み、
多値画像を表す画像データに対して圧縮率の高い可逆符
号化を可能にする画像符号化方法を提供することを目的
とするものである。また、本発明は、多値画像を表す画
像データに対して圧縮率の高い可逆符号化を可能にする
画像符号化プログラムを格納したコンピュータ読取可能
な記録媒体を提供することを目的とする。
Therefore, the present invention has been made in view of the above situation,
An object of the present invention is to provide an image encoding method that enables lossless encoding with a high compression ratio to image data representing a multi-valued image. Another object of the present invention is to provide a computer-readable recording medium that stores an image encoding program that enables lossless encoding with high compression ratio for image data representing a multi-valued image.

【0015】[0015]

【課題を解決するための手段】本発明の請求項1に記載
の画像符号化方法は、画像データ中における注目画素の
画素値を当該注目画素とは別の参照画素の画素値から予
測して符号化する画像符号化方法において、前記注目画
素と直接的または他の参照画素を介して間接的に隣接し
ない参照画素を互いに離れた位置に複数設けたことを特
徴とする。
An image encoding method according to a first aspect of the present invention predicts a pixel value of a target pixel in image data from a pixel value of a reference pixel different from the target pixel. In an image encoding method for encoding, a plurality of reference pixels which are not directly adjacent to the target pixel or indirectly adjacent to the reference pixel via another reference pixel are provided at positions apart from each other.

【0016】請求項1記載の発明に係る画像符号化方法
によれば、参照画素を注目画素と直接的または他の参照
画素を介して間接的に隣接しない位置に複数設けるの
で、例えば隣接する画素同士の画素値が連続せず、しか
も一定周期毎に同じ画素値が出現するような画素構造の
画像データであっても、各参照画素を基に注目画素を予
測することができ、効率の良い符号化が行えるようにな
る。
According to the image encoding method of the present invention, a plurality of reference pixels are provided at positions not directly adjacent to the target pixel or indirectly via another reference pixel. Even in the case of image data having a pixel structure in which the pixel values of the pixels are not continuous and the same pixel value appears at regular intervals, the target pixel can be predicted based on each reference pixel. Encoding can be performed.

【0017】また、請求項2に記載の画像符号化方法
は、画像データ中における注目画素の画素値を当該注目
画素とは別の参照画素の画素値から予測して符号化する
画像符号化方法において、前記画像データが所定の限定
色カラーに対応して所定数の画素からなるブロック単位
に同じ画像データを有するものである場合に、前記参照
画素を前記注目画素から前記ブロックのサイズを単位と
する距離離れた位置に設定することを特徴とする。
According to a second aspect of the present invention, there is provided an image encoding method for predicting and encoding a pixel value of a target pixel in image data from a pixel value of a reference pixel different from the target pixel. In the above, when the image data has the same image data in a block unit consisting of a predetermined number of pixels corresponding to a predetermined limited color color, the reference pixel and the target pixel the size of the block from the target pixel The distance is set at a distance.

【0018】請求項2記載の発明に係る画像符号化方法
によれば、圧縮処理の対象となる画像データが所定の限
定色カラーに対応したもの、例えばパーソナルコンピュ
ータ上にて利用される網かけ画像を表すものである場合
には、参照画素を注目画素から所定数の画素からなるブ
ロックのサイズを単位とする距離離れた位置に設定する
ので、例えば隣接する画素同士の画素値が連続せず、し
かも一定周期毎に同じ画素値が出現するような画素構造
の網かけ画像を表す画像データであっても、参照画素を
基に注目画素を予測することができ、効率の良い符号化
が行えるようになる。
According to the image encoding method of the present invention, the image data to be subjected to the compression processing corresponds to a predetermined limited color, for example, a shaded image used on a personal computer. In the case of representing, the reference pixel is set at a position apart from the target pixel by a distance in units of the size of a block composed of a predetermined number of pixels, for example, the pixel values of adjacent pixels are not continuous, Moreover, even in the case of image data representing a shaded image having a pixel structure in which the same pixel value appears at regular intervals, the target pixel can be predicted based on the reference pixel, so that efficient encoding can be performed. become.

【0019】また、請求項3に記載の画像符号化プログ
ラムを格納したコンピュータで読取可能な記録媒体は、
プログラムに従って処理を実行するコンピュータに、画
像データ中における注目画素の画素値を当該注目画素と
は別の参照画素の画素値から予測して符号化処理を行わ
せるための画像符号化プログラムであって、前記符号化
処理に際し、前記注目画素と直接的または他の参照画素
を介して間接的に隣接しない参照画素を互いに離れた位
置に複数設けることを特徴とする画像符号化プログラム
を格納したものである。
Further, a computer-readable recording medium storing the image encoding program according to claim 3 is:
An image encoding program for causing a computer that executes processing according to a program to predict a pixel value of a target pixel in image data from a pixel value of a reference pixel different from the target pixel and perform an encoding process. In the encoding process, a plurality of reference pixels that are not indirectly adjacent to the target pixel directly or indirectly via another reference pixel are provided at a position apart from each other, and an image encoding program is stored. is there.

【0020】請求項3記載の発明に係る記録媒体に格納
された画像符号化プログラムをコンピュータに実行させ
れば、符号化処理に際して、参照画素を注目画素と直接
的または他の参照画素を介して間接的に隣接しない位置
に複数設けるので、例えば隣接する画素同士の画素値が
連続せず、しかも一定周期毎に同じ画素値が出現するよ
うな画素構造の画像データであっても、各参照画素を基
に注目画素を予測することができ、効率の良い符号化処
理が行えるようになる。
According to the third aspect of the present invention, when the computer executes the image encoding program stored in the recording medium, the reference pixel is directly connected to the target pixel or via another reference pixel during the encoding process. Since a plurality of pixels are provided at positions that are not indirectly adjacent to each other, for example, even if the image data has a pixel structure in which the pixel values of adjacent pixels are not continuous and the same pixel value appears at regular intervals, each reference pixel , The pixel of interest can be predicted, and efficient coding processing can be performed.

【0021】また、請求項4に記載の画像符号化プログ
ラムを格納したコンピュータで読取可能な記録媒体は、
プログラムに従って処理を実行するコンピュータに、画
像データ中における注目画素の画素値を当該注目画素と
は別の参照画素の画素値から予測して符号化処理を行わ
せるための画像符号化プログラムであって、前記画像デ
ータが所定の限定色カラーに対応して所定数の画素から
なるブロック単位に同じ画像データを有するものである
場合に、前記参照画素を前記注目画素から前記ブロック
のサイズを単位とする距離離れた位置に設定させること
を特徴とする画像符号化プログラムを格納したものであ
る。
Further, a computer-readable recording medium storing the image encoding program according to claim 4 is:
An image encoding program for causing a computer that executes processing according to a program to predict a pixel value of a target pixel in image data from a pixel value of a reference pixel different from the target pixel and perform an encoding process. In the case where the image data has the same image data in a block unit composed of a predetermined number of pixels corresponding to a predetermined limited color, the reference pixel is set in units of the size of the block from the target pixel. It stores an image encoding program characterized by being set at a distance.

【0022】請求項4記載の発明に係る記録媒体に格納
された画像符号化プログラムをコンピュータに実行させ
れば、符号化処理に際して、圧縮処理の対象となる画像
データが所定の限定色カラーに対応したもの、例えばパ
ーソナルコンピュータ上にて利用される網かけ画像を表
すものである場合には、参照画素を注目画素から所定数
の画素からなるブロックのサイズを単位とする距離離れ
た位置に設定させるので、例えば隣接する画素同士の画
素値が連続せず、しかも一定周期毎に同じ画素値が出現
するような画素構造の網かけ画像を表す画像データであ
っても、参照画素を基に注目画素を予測することがで
き、効率の良い符号化が行えるようになる。
If the computer executes the image encoding program stored in the recording medium according to the fourth aspect of the present invention, the image data to be compressed corresponds to a predetermined limited color in the encoding process. In this case, for example, in the case of representing a shaded image used on a personal computer, the reference pixel is set at a position away from the target pixel by a unit of the size of a block composed of a predetermined number of pixels. Therefore, for example, even if the image data represents a shaded image having a pixel structure in which the pixel values of adjacent pixels are not continuous and the same pixel value appears at regular intervals, the pixel of interest based on the reference pixel Can be predicted, and efficient coding can be performed.

【0023】[0023]

【発明の実施の形態】以下、図面に基づき本発明に係る
画像符号化方法および画像符号化プログラムを格納した
コンピュータ読取可能な記録媒体について説明する。
BRIEF DESCRIPTION OF THE DRAWINGS FIG. 1 is a block diagram showing an image encoding method and an image encoding program according to the present invention.

【0024】本発明に係る画像符号化方法は、例えば、
コンピュータ・システムまたはそのサブシステムで実行
されるプログラムとして実現される。具体的には、コン
ピュータ・システムで実行される画像符号化用アプリケ
ーションとして実現したり、上位アプリケーションが利
用するサポートプログラム(ライブラリ)として実現す
ることが考えられる。したがって、本発明に係る画像符
号化方法は、画像符号化プログラムとして、プログラム
に従って処理を実行するコンピュータにて読み取り可能
な記録媒体(具体的にはCD−ROM等)に格納するよ
うにしてもよい。ただし、本発明はこれに限られず、回
路要素をディスクリートに組み上げて画像符号化装置ま
たはその一部を構成するようにしても、あるいはASI
C(特殊用途向けIC)や専用ボードの一部として構成
してもよいことは勿論である。
The image encoding method according to the present invention includes, for example,
It is realized as a program executed by a computer system or a subsystem thereof. Specifically, it can be realized as an image coding application executed by a computer system, or as a support program (library) used by a host application. Therefore, in the image encoding method according to the present invention, the image encoding program may be stored in a computer-readable recording medium (specifically, a CD-ROM or the like) that executes processing according to the program. . However, the present invention is not limited to this. Even if circuit components are discretely assembled to constitute an image encoding device or a part thereof,
Needless to say, it may be configured as a part of C (special purpose IC) or a dedicated board.

【0025】〔第1の実施の形態〕図1は本発明に係る
画像符号化方法の第1の実施の形態における特徴点を説
明する模式図であり、図2〜図4は画像符号化方法の手
順の一例を示すフローチャートである。
[First Embodiment] FIG. 1 is a schematic diagram for explaining features of a first embodiment of an image encoding method according to the present invention, and FIGS. 6 is a flowchart showing an example of the procedure of FIG.

【0026】図1に示すように、本実施形態における画
像符号化方法は、符号化対象である注目画素Xの直前画
素A、直上画像B、左上画素Cおよび右上画素Dの他
に、注目画素Xの8画素前の画素Eの画素値をも、その
まま予測値とする点に特徴がある。すなわち、本実施形
態では、各画素A〜Eの画素値をそれぞれ基にする5種
類の予測器を用いて、注目画素Xに対する予測符号化を
行う。
As shown in FIG. 1, in the image encoding method according to the present embodiment, in addition to the pixel A immediately before the pixel X of interest to be encoded, the image B directly above, the pixel C at the upper left and the pixel D at the upper right, the pixel A feature is that the pixel value of the pixel E eight pixels before X is also used as a prediction value as it is. That is, in the present embodiment, the prediction encoding for the target pixel X is performed using five types of predictors based on the pixel values of the pixels A to E, respectively.

【0027】予測符号化の手順自体は公知技術を用いて
行えばよいが、その一例として図2〜図4に示した手順
に従って行うことが考えられる。なお、図2〜図4に示
す手順は、特開平11−234683号公報に開示され
たものと略同様である。詳しくは、例えば図2に示すよ
うに、予測符号化にあたって、所定の初期設定の後(ス
テップ11、以下ステップをSと略す)、処理すべき画
像データの全ての画素について符号化処理が終了したか
どうか判断する(S12)。そして、最後の画素の符号
化処理が終了していれば終了ルーチンに移るが、未処理
の画素があれば、全ての画素について処理が終了するま
で以下の処理を繰り返す。すなわち、先ず、画像1ライ
ン分の画素を読み込み(S13)、その1ライン分につ
いて、後述するようにして符号化処理(圧縮処理)を行
う(S14)。この1ライン分の符号化処理が終了する
と、所定の後処理を行った後に(S15)、次のライン
以降についても同様の処理を繰り返す(S13〜S1
5)。
The procedure of the predictive encoding may be performed by using a known technique. As an example, the procedure may be performed according to the procedure shown in FIGS. The procedure shown in FIGS. 2 to 4 is substantially the same as that disclosed in Japanese Patent Application Laid-Open No. H11-234683. More specifically, as shown in FIG. 2, for example, in the predictive coding, after a predetermined initial setting (step 11, hereinafter, step is abbreviated as S), the coding process is completed for all the pixels of the image data to be processed. It is determined whether or not (S12). If the encoding process for the last pixel has been completed, the process proceeds to an end routine. If there is an unprocessed pixel, the following process is repeated until the process is completed for all pixels. That is, first, pixels for one line of the image are read (S13), and encoding processing (compression processing) is performed on the one line as described later (S14). When the encoding process for one line is completed, after performing a predetermined post-process (S15), the same process is repeated for the next and subsequent lines (S13 to S1).
5).

【0028】1ライン分の画素に対する圧縮処理(上述
したS14)は、例えば図3に示すようにして行えばよ
い。先ず、注目画素ポインタpをラインの先頭に設定す
る(S21)。そして、ポインタpの値とラインの最後
の画素のアドレスとを比較し、当該1ライン分について
の処理が終了したか否かを判断する(S22)。ここ
で、1ライン分の処理が終了していなければ、当該1ラ
イン分の処理が終了するまで以下の処理を繰り返す。す
なわち、注目画素について、第1の予測手法に基づいて
予測を行い、第1の予測値を得る(S23)。この予測
は、注目画素の周辺の画素値あるいはそれらの値を演算
した結果を用いる。例えば、図1に示すように、注目画
素Xに対して直前画素A、直上画像B、左上画素C、右
上画素Dまたは8画素前画素Eのいずれかを用いる。な
お、どの画素値を用いるかは、各予測器ごとに固定して
もよいし、適合的に変化させてもよい。また、複数の画
素値に基づいて予測する予測器であってもよい。そし
て、第1の予測値を得ると、これが注目画素の画素値と
一致するか否かを判別し(S24)、これらが一致すれ
ば第1の予測手法を示す符号を出力する(S25)。一
方、これらが一致しなければ、後述するように、第2の
予測およびそれ以降の予測を行う(S26)。その後、
注目画素ポインタpを1画素分進めて(S27)、次画
素以降についても同様の処理を繰り返す(S22〜S2
7)。
The compression process (S14 described above) for one line of pixels may be performed, for example, as shown in FIG. First, the target pixel pointer p is set at the head of the line (S21). Then, the value of the pointer p is compared with the address of the last pixel of the line, and it is determined whether or not the processing for the one line is completed (S22). If the processing for one line is not completed, the following processing is repeated until the processing for one line is completed. That is, prediction is performed on the pixel of interest based on the first prediction method, and a first predicted value is obtained (S23). This prediction uses the pixel values around the pixel of interest or the result of computing those values. For example, as shown in FIG. 1, one of the immediately preceding pixel A, the image immediately above, the upper left pixel C, the upper right pixel D, and the pixel E eight pixels before is used for the target pixel X. Note that which pixel value is used may be fixed for each predictor or may be changed adaptively. Further, a predictor that performs prediction based on a plurality of pixel values may be used. When the first prediction value is obtained, it is determined whether or not the first prediction value matches the pixel value of the target pixel (S24). If they match, a code indicating the first prediction method is output (S25). On the other hand, if they do not match, the second and subsequent predictions are performed as described below (S26). afterwards,
The target pixel pointer p is advanced by one pixel (S27), and the same processing is repeated for the next and subsequent pixels (S22 to S2).
7).

【0029】第2の予測およびそれ以降の処理(上述し
たS26)は、例えば図4に示すようにして行えばよ
い。先ず、第2の予測手法およびそれ以降の予測手法に
基づいて予測を行い、複数の予測値を得る(S31)。
この予測は、第1の予測値を得る場合と同様にして行う
が、第1の予測値の場合とはそれぞれ異なるパラメータ
(画素値)を用いる。そして、第2以降の予測値を得る
と、注目画素の画素値と一致するものがあるか否かを判
別し(S32)、一致するものがあれば、その一致した
予測手法を示す符号を出力する(S33)。第3の予測
器等の他の予測器を加える場合も同様に行うことができ
る。一方、これら予測器で一致するものがなければ、前
画素の画素値と注目画素の画素値との間の誤差を算出し
(S34)、その誤差を符号化して出力する(S3
5)。その後、1画素の符号化が終了すると、注目画素
値を示すポインタpを進め、ループの先頭に戻る(図3
におけるS22)。
The second prediction and subsequent processing (S26 described above) may be performed, for example, as shown in FIG. First, prediction is performed based on the second prediction method and subsequent prediction methods to obtain a plurality of predicted values (S31).
This prediction is performed in the same manner as in the case of obtaining the first predicted value, but using different parameters (pixel values) from those in the case of the first predicted value. When the second and subsequent predicted values are obtained, it is determined whether or not there is one that matches the pixel value of the pixel of interest (S32). If there is one that matches, a code indicating the matching prediction method is output. (S33). The same can be applied to the case where another predictor such as the third predictor is added. On the other hand, if there is no match between these predictors, an error between the pixel value of the previous pixel and the pixel value of the target pixel is calculated (S34), and the error is encoded and output (S3).
5). Thereafter, when the encoding of one pixel is completed, the pointer p indicating the pixel value of interest is advanced, and the process returns to the beginning of the loop (FIG. 3).
S22).

【0030】このような手順で処理すべき画像データの
全画素について予測符号化を行えば、第1の予測手法の
予測値が注目画素の画素値と一致している限り、その他
の予測手法による予測を行わないので、その分、処理が
高速化される。
By performing predictive encoding for all pixels of image data to be processed in such a procedure, as long as the predicted value of the first prediction method matches the pixel value of the pixel of interest, the other prediction methods are used. Since no prediction is performed, the processing is speeded up accordingly.

【0031】ところで、本実施形態の画像符号化方法で
は、各画素についての予測符号化にあたって、既に述べ
たように、注目画素Xの直前画素A、直上画像B、左上
画素Cおよび右上画素Dの他に、注目画素Xの8画素前
の画素Eの画素値をも、参照画素とするようになってい
る。つまり、図1からも明らかなように、画像データ中
の主走査および副走査の各方向に形成される平面上、す
なわち図中におけるXY平面上で、注目画素に直接隣接
するか他の参照画素を介して間接的に隣接する参照画素
の群とは所定距離離れた位置に参照画素を設ける。
In the image coding method according to the present embodiment, when predictive coding of each pixel is performed, as described above, the pixel A immediately before the pixel X of interest, the image B immediately above, the pixel C above left, and the pixel D above right are used. In addition, the pixel value of the pixel E eight pixels before the target pixel X is also set as the reference pixel. That is, as is clear from FIG. 1, on a plane formed in each of the main scanning and sub-scanning directions in the image data, that is, on the XY plane in the drawing, the pixel directly adjacent to the target pixel or another reference pixel is displayed. A reference pixel is provided at a position separated by a predetermined distance from a group of reference pixels that are indirectly adjacent to the reference pixel.

【0032】したがって、本実施形態の画像符号化方法
によれば、例えば隣接する画素同士の画素値が連続せ
ず、しかも一定周期毎に同じ画素値が出現するような画
素構造の画像データであっても、各参照画素A〜Eを基
に注目画素Xを予測することができるので、効率の良い
可逆符号化が行えるようになる。つまり、かかる画像デ
ータであっても、従来のように注目画素Xに隣接する画
素A〜Dのみから当該注目画素Xを予測するのではない
ため、高い圧縮率が得られる。
Therefore, according to the image encoding method of the present embodiment, for example, image data having a pixel structure in which the pixel values of adjacent pixels are not continuous and the same pixel value appears at regular intervals. However, since the target pixel X can be predicted based on each of the reference pixels A to E, efficient lossless encoding can be performed. In other words, even with such image data, the target pixel X is not predicted from only the pixels A to D adjacent to the target pixel X as in the related art, so that a high compression rate can be obtained.

【0033】また、1画素を8bitのみで表す限定色カラ
ーの画像に変換する網かけ処理を施した後の画像データ
に対しては、一定周期毎に同じ画素値が出現する確率が
高いため、参照画素Eを注目画素Xから一定距離(8画
素分)離れた位置に設定することで、その参照画素Eを
基に注目画素Xを予測することができ、効率の良い可逆
符号化が行えるようになる。特に、例えばウィンドウズ
においては、縦横8画素のブロックを単位として網かけ
処理を行っているため、8画素ずつ離れた位置に同一の
画素値が現れることから、参照画素Eを注目画素Xから
8画素前に設定することで、従来よりも高い圧縮率が得
られるようになる。つまり、本実施形態の画像符号化方
法は、パーソナルコンピュータ上にて利用される網かけ
画像に対応した画像データに用いて非常に好適なものと
なる。
In addition, for image data that has been subjected to a shading process of converting one pixel into a limited color image represented by only 8 bits, there is a high probability that the same pixel value appears at regular intervals. By setting the reference pixel E at a position away from the target pixel X by a certain distance (eight pixels), the target pixel X can be predicted based on the reference pixel E, and efficient lossless encoding can be performed. become. In particular, for example, in Windows, halftone processing is performed in units of blocks of 8 pixels in length and width, and the same pixel value appears at a position separated by 8 pixels. By setting beforehand, a higher compression ratio than before can be obtained. That is, the image encoding method according to the present embodiment is very suitable for use with image data corresponding to a shaded image used on a personal computer.

【0034】なお、本実施形態では、各参照画素A〜E
の値そのものを予測値として用いる場合を例に挙げた
が、これらの値に所定の定数を加えたものを用いるよう
にしてもよい。特に、画素値が徐々に変化していく場合
には、所定の定数を加えることが好ましい。この場合の
定数としては、「1」,「−1」等を使うのが特に有効
である。
In this embodiment, each of the reference pixels A to E
Is used as an example of the predicted value, but a value obtained by adding a predetermined constant to these values may be used. In particular, when the pixel value changes gradually, it is preferable to add a predetermined constant. It is particularly effective to use "1", "-1" or the like as the constant in this case.

【0035】〔第2の実施の形態〕次に、本発明の第2
の実施の形態について説明する。図5は本発明に係る画
像符号化方法の第2の実施の形態における特徴点を説明
する模式図であり、図6はその変形例の特徴点を説明す
る模式図である。
[Second Embodiment] Next, a second embodiment of the present invention will be described.
An embodiment will be described. FIG. 5 is a schematic diagram for explaining the features of the image encoding method according to the second embodiment of the present invention, and FIG. 6 is a schematic diagram for explaining the features of the modification.

【0036】図5に示すように、本実施形態における画
像符号化方法は、符号化対象である注目画素Xの直前画
素A、直上画像B、左上画素Cおよび右上画素Dの他
に、注目画素Xの4画素前の画素Fの画素値をも、その
まま予測値とする点に特徴がある。
As shown in FIG. 5, in the image encoding method according to the present embodiment, in addition to the pixel A immediately before the pixel X of interest to be coded, the image B immediately above, the pixel C at the upper left and the pixel D at the upper right, the pixel The feature is that the pixel value of the pixel F four pixels before X is also used as the prediction value as it is.

【0037】したがって、本実施形態の画像符号化方法
においても、上述した第1の実施の形態の場合と同様
に、注目画素と同一ライン上に所定距離離れた参照画素
を設けたので、例えば隣接する画素同士の画素値が連続
せず、しかも一定周期毎に同じ画素値が出現するような
画素構造の画像データであっても、従来よりも効率の良
い可逆符号化が行えるようになる。
Therefore, in the image encoding method of the present embodiment, similarly to the case of the above-described first embodiment, since the reference pixels separated by a predetermined distance on the same line as the pixel of interest are provided, for example, Even in the case of image data having a pixel structure in which the pixel values of pixels to be executed are not continuous and the same pixel value appears at regular intervals, lossless encoding can be performed more efficiently than in the past.

【0038】また、例えばウィンドウズにおいては、網
かけ画像に対応する場合に、縦横8画素周期の網が4画
素周期のサブスクリーン4個からなっているので、4画
素毎に同じ画素値が出現する確率も高く、参照画素Fを
注目画素Xから一定距離(4画素分)離れた位置に設定
することで、その参照画素Fを基に注目画素Xを予測す
ることができ、従来よりも効率の良い可逆符号化が行え
るようになる。
Also, for example, in Windows, in the case of a shaded image, the same pixel value appears every four pixels since a half screen of eight pixels vertically and horizontally consists of four sub-screens of four pixels. The probability is high, and by setting the reference pixel F at a position separated from the target pixel X by a certain distance (for four pixels), the target pixel X can be predicted based on the reference pixel F, which is more efficient than in the past. Good lossless encoding can be performed.

【0039】しかも、本実施形態の画像符号化方法は、
上述した第1の実施の形態の場合と比べて、8画素前で
はなく4画素前といった狭い範囲を参照すればよいの
で、予測符号化を行うのにあたって使用するメモリ容量
が少なくて済むという利点もある。また、比較的急激に
画像濃度が変化する場合、特に主走査方向にグラデーシ
ョンが発生している場合や、画像中に縦線が多く引かれ
ている場合などには、4画素前に参照画素Fを設定する
ことで、第1の実施の形態の場合より一層圧縮率が高く
なるという利点もある。
Moreover, the image encoding method of the present embodiment
Compared with the case of the above-described first embodiment, since it is only necessary to refer to a narrow range such as four pixels before instead of eight pixels before, there is also an advantage that a memory capacity used for performing predictive coding can be reduced. is there. Also, when the image density changes relatively sharply, particularly when gradation occurs in the main scanning direction or when many vertical lines are drawn in the image, the reference pixel F Is advantageous in that the compression ratio is further increased as compared with the case of the first embodiment.

【0040】なお、本実施形態では、4画素前に参照画
素Fを設定した場合について説明したが、図6に示すよ
うに、注目画素Xの4画素前の参照画素Fの画素値と、
注目画素Xの8画素前の参照画素Eの画素値とを、それ
ぞれ併用するようにしてもよい。さらには、注目画素X
から4の整数倍分だけ前の画素を参照画素とすることも
考えられる。これらの場合であっても、上述した第1ま
たは第2の実施の形態の場合と同様に、従来よりも効率
の良い可逆符号化が行えることはいうまでもない。
In this embodiment, the case where the reference pixel F is set four pixels before is described. However, as shown in FIG.
The pixel value of the reference pixel E eight pixels before the target pixel X may be used together. Further, the target pixel X
It is also conceivable to set a pixel preceding by an integer multiple of 4 as a reference pixel. Even in these cases, it is needless to say that lossless encoding can be performed more efficiently than in the conventional case, as in the case of the above-described first or second embodiment.

【0041】〔第3の実施の形態〕次に、本発明の第3
の実施の形態について説明する。図7は、本発明に係る
画像符号化方法の第3の実施の形態における特徴点を説
明する模式図であり、図8はその変形例の特徴点を説明
する模式図である。
[Third Embodiment] Next, a third embodiment of the present invention will be described.
An embodiment will be described. FIG. 7 is a schematic diagram for explaining the features of the third embodiment of the image encoding method according to the present invention, and FIG. 8 is a schematic diagram for explaining the features of the modification.

【0042】図7に示すように、本実施形態における画
像符号化方法は、注目画素Xの8画素前の画素Eの画素
値に加えて、注目画素Xの8ライン前の画素Gの画素値
をも、そのまま予測値とする点に特徴がある。すなわ
ち、注目画素Xの直前画素A、直上画像B、左上画素C
および右上画素Dの他に、注目画素Xの8画素前の画素
Eの画素値および注目画素Xの8ライン前の画素Gの画
素値を予測に用いる。
As shown in FIG. 7, in the image coding method according to the present embodiment, the pixel value of the pixel G eight lines before the pixel X of interest is added to the pixel value of the pixel E eight pixels before the pixel X of interest. Is also characterized in that it is used as it is as a predicted value. That is, the pixel A immediately before the pixel X of interest, the image B directly above, and the pixel C
In addition to the pixel D and the upper right pixel, the pixel value of the pixel E eight pixels before the pixel of interest X and the pixel value of the pixel G eight lines before the pixel of interest X are used for prediction.

【0043】したがって、本実施形態の画像符号化方法
においては、隣接する画素同士の画素値が連続せず、し
かも一定周期毎に同じ画素値が出現するような画素構造
の画像データであっても、従来よりも効率の良い可逆符
号化が行えるようになる。
Therefore, in the image encoding method of this embodiment, even if the image data has a pixel structure in which the pixel values of adjacent pixels are not continuous and the same pixel value appears at regular intervals. Thus, lossless encoding with higher efficiency than before can be performed.

【0044】また、例えばウィンドウズにおいては、縦
横8画素のブロックを単位として網かけ処理を行ってい
るため、8画素ずつ離れた位置に同一の画素値が現れる
ことから、参照画素Eおよび参照画素Gをそれぞれ注目
画素Xから一定距離(8画素分または8ライン分)離れ
た位置に設定することで、その参照画素Eまたは参照画
素Gを基に注目画素Xを予測することができ、従来より
も効率の良い可逆符号化が行えるようになる。
In Windows, for example, since the halftone processing is performed in blocks of 8 pixels in length and width, the same pixel value appears at positions separated by 8 pixels, so that the reference pixels E and G Are set at positions separated by a fixed distance (8 pixels or 8 lines) from the target pixel X, the target pixel X can be predicted on the basis of the reference pixel E or the reference pixel G. Efficient lossless encoding can be performed.

【0045】特に、本実施形態の画像符号化方法によれ
ば、副走査方向に比較的急激に画像濃度が変化する場
合、具体的には副走査方向にグラデーションが発生して
いる場合や、画像中に横線が多く引かれている場合など
には、8ライン前に参照画素Gを設定することで、第1
または第2の実施の形態の場合より一層圧縮率が高くな
るという利点もある。
In particular, according to the image encoding method of the present embodiment, when the image density changes relatively sharply in the sub-scanning direction, specifically when gradation occurs in the sub-scanning direction, In the case where many horizontal lines are drawn, for example, by setting the reference pixel G eight lines earlier,
Alternatively, there is an advantage that the compression ratio is higher than in the case of the second embodiment.

【0046】なお、本実施形態では、8ライン前に参照
画素Gを設定した場合について説明したが、図8に示す
ように、注目画素Xの4ライン前に参照画素Hを設定し
てもよく、この場合であっても本実施形態の場合と同様
に従来よりも効率の良い可逆符号化が行えることはいう
までもない。しかも、4ライン前に参照画素Hした場合
には、本実施形態の場合と比べて、8ライン前ではなく
4ライン前といった狭い範囲を参照すればよいので、予
測符号化を行うのにあたって使用するメモリ容量を大幅
に削減することができるようになる。また、参照画素は
注目画素Xから8ライン前または4ライン前に限らず
に、4の整数倍分だけ前のラインの画素を参照画素とす
ることも考えられる。
In this embodiment, the case where the reference pixel G is set eight lines before is described. However, the reference pixel H may be set four lines before the target pixel X as shown in FIG. However, even in this case, it is needless to say that lossless encoding can be performed more efficiently than in the prior art, as in the case of the present embodiment. Moreover, when the reference pixel H is set four lines before, compared to the case of the present embodiment, a narrow range such as four lines before rather than eight lines may be referred to, so that it is used in performing predictive coding. The memory capacity can be significantly reduced. The reference pixel is not limited to eight or four lines before the target pixel X, but may be a pixel on a line that is an integral multiple of four as a reference pixel.

【0047】〔第4の実施の形態〕次に、本発明の第4
の実施の形態について説明する。図9は、本発明に係る
画像符号化方法の第4の実施の形態における特徴点を説
明する模式図であり、図10はその画像符号化方法にて
処理される画像構造の一例を示す説明図である。
[Fourth Embodiment] Next, a fourth embodiment of the present invention will be described.
An embodiment will be described. FIG. 9 is a schematic diagram for explaining features of the image encoding method according to the fourth embodiment of the present invention, and FIG. 10 is a diagram showing an example of an image structure processed by the image encoding method. FIG.

【0048】図9に示すように、本実施形態における画
像符号化方法は、注目画素Xの2ライン上の2画素前の
画素Iの画素値をそのまま予測値とする点に特徴があ
る。すなわち、注目画素Xの直前画素A、直上画像B、
左上画素Cおよび右上画素Dの他に、注目画素Xの2ラ
イン上2画素前の画素Iの画素値を予測に用いる。これ
により、各参照画素A〜D,Iと注目画素Xとを結ぶ線
は、図中におけるXY平面上で一定面積(3ライン分×
4画素分)を有する矩形を形成する。
As shown in FIG. 9, the image coding method according to the present embodiment is characterized in that the pixel value of the pixel I two pixels before on the two lines of the target pixel X is directly used as the predicted value. That is, the pixel A immediately before the pixel X of interest, the image B immediately above,
In addition to the upper left pixel C and the upper right pixel D, the pixel value of the pixel I two pixels before two pixels on the line of interest X is used for prediction. As a result, the line connecting each of the reference pixels A to D and I and the target pixel X has a fixed area (3 lines × 3) on the XY plane in the drawing.
(For four pixels).

【0049】本実施形態の画像符号化方法においては、
例えば隣接する画素同士の画素値が連続せず、しかも一
定周期毎に同じ画素値が出現するような画素構造の画像
データであっても、従来よりも効率の良い可逆符号化が
行えるようになる。
In the image encoding method according to the present embodiment,
For example, even in the case of image data having a pixel structure in which pixel values of adjacent pixels are not continuous and the same pixel value appears at regular intervals, lossless encoding can be performed more efficiently than in the past. .

【0050】また、特に、本実施形態の画像符号化方法
では、上述した第1〜第3の実施の形態の場合とは異な
り、対応すべき網かけ画像の処理角度が0度でない場合
に用いて有効なものとなる。例えば、主走査方向および
副走査方向に沿って網かけ処理を行うのではなく、ある
一定の角度をもって網かけ処理を行う場合もある。例え
ば、図10に示すように、45度の角度をもって網かけ
処理を施された場合には、斜め45度方向の一定周期毎
に同じ画素値が出現する可能性が高い。したがって、参
照画素Iを注目画素Xから一定距離(2ライン上かつ2
画素前)離れた位置に設定することで、その参照画素I
を基に注目画素Xを予測することができ、従来よりも効
率の良い可逆符号化が行えるようになる。
In particular, the image encoding method of this embodiment is different from the first to third embodiments described above in that the method is used when the processing angle of the corresponding shaded image is not 0 degree. Will be effective. For example, instead of performing the shading process along the main scanning direction and the sub-scanning direction, the shading process may be performed at a certain angle. For example, as shown in FIG. 10, when the shading process is performed at an angle of 45 degrees, there is a high possibility that the same pixel value appears at regular intervals in the diagonal 45 degrees direction. Therefore, the reference pixel I is set at a certain distance (two lines and
By setting the pixel at a position farther away from the pixel, the reference pixel I
, The target pixel X can be predicted, and lossless encoding can be performed more efficiently than before.

【0051】なお、本実施形態では、説明を簡単にする
ため、小さい網かけの周期で図示したが、網の周期が大
きい場合には、ライン数、画素数を大きくすることによ
って対応すればよい。また、網の角度が45度でない場
合には、注目画素からのライン数と画素数を相違させ
て、網点周期と一致する距離だけ離れた画素の画素値を
予測に用いればよい。すなわち、参照画素Iの位置は、
網かけ処理の周期や角度等に応じて任意に設定すればよ
い。
In this embodiment, for the sake of simplicity, a small shading period is used for illustration. However, if the shading period is large, it is sufficient to increase the number of lines and pixels. . If the angle of the halftone is not 45 degrees, the number of lines and the number of pixels from the target pixel may be different, and the pixel value of a pixel separated by a distance matching the halftone period may be used for prediction. That is, the position of the reference pixel I is
What is necessary is just to set arbitrarily according to the period, angle, etc. of the shading process.

【0052】〔第5の実施の形態〕次に、本発明の第5
の実施の形態について説明する。図11は、本発明に係
る画像符号化方法の第5の実施の形態における特徴点を
説明する模式図である。
[Fifth Embodiment] Next, a fifth embodiment of the present invention will be described.
An embodiment will be described. FIG. 11 is a schematic diagram illustrating the features of the fifth embodiment of the image encoding method according to the present invention.

【0053】図例のように、本実施形態における画像符
号化方法は、第1の実施の形態で説明した画像符号化方
法と、従来の画像符号化方法とを、処理すべき画像デー
タに応じて使い分ける点に特徴がある。詳しくは、本実
施形態では、処理すべき画像データが、1画素あたり8b
itの限定色カラーの画像に対応したものか、あるいは1
画素あたり24bit のフルカラー画像に対応したものかに
よって、図11(a)に示すように注目画素Xの8画素
前の画素Eの画素値をも予測に用いるか、あるいは図1
1(b)に示すように注目画素Xに隣接する画素A〜D
のみを予測に用いるかを切り替えるようになっている。
As shown in the figure, the image encoding method according to the present embodiment differs from the image encoding method described in the first embodiment with the conventional image encoding method according to the image data to be processed. There is a characteristic in that they are properly used. Specifically, in the present embodiment, the image data to be processed is 8b per pixel.
Whether it corresponds to the limited color image of it or 1
As shown in FIG. 11A, the pixel value of the pixel E eight pixels before the pixel of interest X is also used for prediction, depending on whether the pixel corresponds to a full-color image of 24 bits per pixel, or FIG.
As shown in FIG. 1B, pixels A to D adjacent to the pixel X of interest
Whether only the prediction is used or not is switched.

【0054】これは、1画素あたり24bit のフルカラー
画像に対応した画像データであれば、網かけ処理が施さ
れていないことが多いため、第1〜第4の実施の形態で
説明したような網パターン予測を行わずに、注目画素X
に隣接する画素A〜Dのみを基にしても効率の良い可逆
符号化が行えるからであり、さらには網パターン予測を
行わないことで迅速な可逆符号化を実現できるからであ
る。
This is because image data corresponding to a full-color image of 24 bits per pixel has not been subjected to shading processing in many cases, so that the network data described in the first to fourth embodiments is used. Without performing pattern prediction, the target pixel X
This is because efficient lossless encoding can be performed based only on the pixels A to D adjacent to the image data, and quick lossless encoding can be realized by not performing halftone pattern prediction.

【0055】処理すべき画像データが、限定色カラー対
応のものか、あるいはフルカラー対応のものかは、処理
すべき画像データにおける1画素あたりのbit 数を認識
することで判断すればよい。ただし、この判断は、処理
すべき画像データが網かけ画像を表すものであるか否か
を基に行うようにしてもよい。網かけ画像であるか否か
は、網点周期、例えば8画素毎に同じ画素が生じる頻度
が高いかどうかで、容易に判定することができる。
Whether the image data to be processed corresponds to the limited color or the full color may be determined by recognizing the number of bits per pixel in the image data to be processed. However, this determination may be made based on whether or not the image data to be processed represents a shaded image. Whether or not the image is a halftone image can be easily determined based on a halftone dot period, for example, whether or not the same pixel is frequently generated every eight pixels.

【0056】また、網パターン予測を行うか否かは、図
11(a)および(b)に示すように、予め設定の異な
る予測器(8bit画像用予測器および24bit 画像用予測
器)をそれぞれ用意しておき、上述した処理すべき画像
データに対する判断結果に応じて、どの予測器を使用す
るかを切り替えることで行うようにすればよい。
As shown in FIGS. 11 (a) and 11 (b), it is determined whether or not to perform the halftone pattern prediction by using different preset predictors (an 8-bit image predictor and a 24-bit image predictor). It may be prepared by switching which predictor to use in accordance with the above-described determination result for the image data to be processed.

【0057】このように、本実施形態における画像符号
化方法では、処理すべき画像データが限定色カラー対応
のものであれば、第1の実施の形態の場合と同様にして
予測符号化を行うので従来よりも効率の良い可逆符号化
が行える一方、処理すべき画像データがフルカラー対応
のものであれば、従来における場合と同様にして予測符
号化を行うので迅速な可逆符号化が可能になる。つま
り、本実施形態の画像符号化方法によれば、処理すべき
画像データに対する汎用性および柔軟性を高めて、限定
色カラー対応データとフルカラー対応データとの双方に
ついてそれぞれ好適な可逆符号化を実現できる。
As described above, in the image encoding method according to the present embodiment, if the image data to be processed corresponds to the limited color, the predictive encoding is performed in the same manner as in the first embodiment. Therefore, lossless encoding can be performed more efficiently than before, but if the image data to be processed is full-color compatible, predictive encoding is performed in the same manner as in the past, so that quick lossless encoding is possible. . That is, according to the image encoding method of the present embodiment, versatility and flexibility for the image data to be processed are enhanced, and suitable lossless encoding is realized for both the limited-color-compatible data and the full-color-compatible data. it can.

【0058】なお、本実施形態では、処理すべき画像デ
ータが限定色カラー対応の場合に、第1の実施の形態で
説明したようにして可逆符号化を行うことを例に挙げた
が、例えば第2〜第4の実施の形態で説明したようにし
て可逆符号化を行ってもよいことは勿論であり、その場
合であっても上述したような汎用性および柔軟性を確保
し得ることはいうまでもない。
In this embodiment, lossless encoding is performed as described in the first embodiment when image data to be processed corresponds to a limited color color. It goes without saying that lossless encoding may be performed as described in the second to fourth embodiments, and even in such a case, it is not possible to secure the versatility and flexibility as described above. Needless to say.

【0059】[0059]

【発明の効果】以上に説明したように、本発明の請求項
1に記載した画像符号化方法および請求項3に記載した
画像符号化プログラムを格納したコンピュータ読取可能
な記録媒体によれば、参照画素を注目画素と直接的また
は他の参照画素を介して間接的に隣接しない位置に複数
設けるので、例えば隣接する画素同士の画素値が連続せ
ず、しかも一定周期毎に同じ画素値が出現するような画
素構造の画像データであっても、各参照画素を基に注目
画素を予測することができ、効率の良い符号化が行える
ようになる。したがって、多値画像を表す画像データに
対して、例えば限定色カラーへの変換(網かけ処理等)
が施されている場合であっても、従来のように注目画素
に隣接する画素のみから当該注目画素を予測するのでは
ないため、高い圧縮率が得られる。
As described above, according to the image encoding method described in claim 1 of the present invention and the computer-readable recording medium storing the image encoding program described in claim 3, Since a plurality of pixels are provided at positions that are not directly adjacent to the target pixel or indirectly via another reference pixel, for example, the pixel values of adjacent pixels are not continuous, and the same pixel value appears at regular intervals. Even with image data having such a pixel structure, the target pixel can be predicted based on each reference pixel, and efficient encoding can be performed. Therefore, the image data representing the multi-valued image is converted into, for example, a limited color color (shading processing or the like).
Is performed, the pixel of interest is not predicted only from pixels adjacent to the pixel of interest as in the related art, so that a high compression rate can be obtained.

【0060】また、本発明の請求項2に記載した画像符
号化方法および請求項4に記載した画像符号化プログラ
ムを格納したコンピュータ読取可能な記録媒体によれ
ば、圧縮処理の対象となる画像データが限定色カラーに
対応したもの(例えば網かけ画像を表すもの)である場
合に、参照画素を注目画素から所定数の画素からなるブ
ロックのサイズを単位とする距離離れた位置に設定する
ので、例えば隣接する画素同士の画素値が連続せず、し
かも一定周期毎に同じ画素値が出現するような画素構造
の網かけ画像を表す画像データであっても、参照画素を
基に注目画素を予測することができ、効率の良い符号化
が行えるようになる。したがって、多値画像を表す画像
データに対して、例えば限定色カラーへの変換(網かけ
処理等)が施されている場合であっても、従来のように
注目画素に隣接する画素のみから当該注目画素を予測す
るのではないため、高い圧縮率が得られる。
According to the image encoding method of the present invention and the computer-readable recording medium storing the image encoding program of the present invention, image data to be subjected to compression processing Is a color corresponding to a limited color (for example, a color representing a shaded image), the reference pixel is set at a position away from the target pixel by a unit of the size of a block of a predetermined number of pixels. For example, even for image data representing a shaded image having a pixel structure in which the pixel values of adjacent pixels are not continuous and the same pixel value appears at regular intervals, the target pixel is predicted based on the reference pixel. And efficient coding can be performed. Therefore, even if the image data representing the multi-valued image is subjected to, for example, conversion to a limited color (shading processing or the like), only the pixel adjacent to the pixel of interest is used as in the related art. Since the target pixel is not predicted, a high compression ratio can be obtained.

【図面の簡単な説明】[Brief description of the drawings]

【図1】 本発明に係る画像符号化方法の第1の実施の
形態における特徴点を説明する模式図である。
FIG. 1 is a schematic diagram illustrating features of a first embodiment of an image encoding method according to the present invention.

【図2】 画像符号化方法の手順の一例を示すフローチ
ャートである。
FIG. 2 is a flowchart illustrating an example of a procedure of an image encoding method.

【図3】 図2の画像符号化方法の手順の一部を詳細に
示すフローチャートである。
FIG. 3 is a flowchart showing in detail a part of the procedure of the image encoding method of FIG. 2;

【図4】 図3の画像符号化方法の手順の一部をさらに
詳細に示すフローチャートである。
4 is a flowchart showing a part of the procedure of the image encoding method of FIG. 3 in further detail.

【図5】 本発明に係る画像符号化方法の第2の実施の
形態における特徴点を説明する模式図である。
FIG. 5 is a schematic diagram for explaining features of the image encoding method according to the second embodiment of the present invention.

【図6】 本発明の第2の実施の形態の変形例の特徴点
を説明する模式図である。
FIG. 6 is a schematic diagram illustrating a feature of a modification of the second embodiment of the present invention.

【図7】 本発明に係る画像符号化方法の第3の実施の
形態における特徴点を説明する模式図である。
FIG. 7 is a schematic diagram illustrating features of a third embodiment of the image encoding method according to the present invention.

【図8】 本発明の第3の実施の形態の変形例の特徴点
を説明する模式図である。
FIG. 8 is a schematic diagram for explaining features of a modification of the third embodiment of the present invention.

【図9】 本発明に係る画像符号化方法の第4の実施の
形態における特徴点を説明する模式図である。
FIG. 9 is a schematic diagram for explaining features of a fourth embodiment of the image encoding method according to the present invention.

【図10】 本発明の第4の実施の形態において処理さ
れる画像構造の一例を示す説明図である。
FIG. 10 is an explanatory diagram illustrating an example of an image structure processed in a fourth embodiment of the present invention.

【図11】 本発明に係る画像符号化方法の第5の実施
の形態における特徴点を説明する模式図であり、(a)
は限定色カラーに対応する場合の特徴点を示す図、
(b)はフルカラーに対応する場合の特徴点を示す図で
ある。
FIG. 11 is a schematic diagram for explaining features of a fifth embodiment of the image encoding method according to the present invention, and FIG.
Is a diagram showing feature points in the case of corresponding to a limited color color,
FIG. 4B is a diagram showing characteristic points in a case where the image corresponds to full color.

【図12】 JPEGベースライン方式の画像符号化方
法における画像構造の一例を示す説明図である。
FIG. 12 is an explanatory diagram showing an example of an image structure in a JPEG baseline image coding method.

【図13】 従来の画像符号化方法の一例における特徴
点を説明する模式図(その1)であり、(a)は直前画
素を参照する場合の様子を示す図、(b)は直上画素を
参照する場合の様子を示す図、(c)は直前画素および
直上画素の双方を参照する場合の特徴点を示す図であ
る。
13A and 13B are schematic diagrams (part 1) for explaining feature points in an example of a conventional image encoding method, in which FIG. 13A illustrates a state in which an immediately preceding pixel is referred to, and FIG. FIG. 7C is a diagram illustrating a state in which reference is made, and FIG. 7C is a diagram illustrating characteristic points in a case where both the immediately preceding pixel and the immediately above pixel are referred to.

【図14】 従来の画像符号化方法の一例における特徴
点を説明する模式図(その2)である。
FIG. 14 is a schematic diagram (part 2) for explaining feature points in an example of a conventional image encoding method.

【図15】 縦横8画素のブロックを単位として網かけ
処理が行われた場合の画像構造の一例を示す説明図であ
る。
FIG. 15 is an explanatory diagram illustrating an example of an image structure in a case where shading processing is performed in blocks of eight pixels in length and width.

【符号の説明】[Explanation of symbols]

A,B,C,D,E,F,G,H,I…参照画素、X…
注目画素
A, B, C, D, E, F, G, H, I... Reference pixels, X.
Attention pixel

Claims (4)

【特許請求の範囲】[Claims] 【請求項1】 画像データ中における注目画素の画素値
を当該注目画素とは別の参照画素の画素値から予測して
符号化する画像符号化方法において、 前記注目画素と直接的または他の参照画素を介して間接
的に隣接しない参照画素を互いに離れた位置に複数設け
たことを特徴とする画像符号化方法。
1. An image encoding method for predicting and encoding a pixel value of a pixel of interest in image data from a pixel value of a reference pixel different from the pixel of interest, comprising: An image encoding method, wherein a plurality of reference pixels that are not indirectly adjacent to each other via a pixel are provided at positions apart from each other.
【請求項2】 画像データ中における注目画素の画素値
を当該注目画素とは別の参照画素の画素値から予測して
符号化する画像符号化方法において、 前記画像データが所定の限定色カラーに対応して所定数
の画素からなるブロック単位に同じ画像データを有する
ものである場合に、前記参照画素を前記注目画素から前
記ブロックのサイズを単位とする距離離れた位置に設定
することを特徴とする画像符号化方法。
2. An image encoding method for predicting and encoding a pixel value of a pixel of interest in image data from a pixel value of a reference pixel different from the pixel of interest, wherein the image data has a predetermined limited color color. Correspondingly, when the same image data is included in a block unit consisting of a predetermined number of pixels, the reference pixel is set at a position apart from the pixel of interest by a distance in units of the size of the block. Image encoding method.
【請求項3】 プログラムに従って処理を実行するコン
ピュータに、画像データ中における注目画素の画素値を
当該注目画素とは別の参照画素の画素値から予測して符
号化処理を行わせるための画像符号化プログラムであっ
て、前記符号化処理に際し、前記注目画素と直接的また
は他の参照画素を介して間接的に隣接しない参照画素を
互いに離れた位置に複数設けることを特徴とする画像符
号化プログラムを格納したコンピュータで読取可能な記
録媒体。
3. An image code for causing a computer, which executes processing according to a program, to predict a pixel value of a target pixel in image data from a pixel value of a reference pixel different from the target pixel and to perform an encoding process. An image encoding program characterized by providing a plurality of reference pixels that are not directly adjacent to the target pixel or indirectly indirectly via another reference pixel at positions apart from each other in the encoding process. A computer-readable recording medium storing a computer.
【請求項4】 プログラムに従って処理を実行するコン
ピュータに、画像データ中における注目画素の画素値を
当該注目画素とは別の参照画素の画素値から予測して符
号化処理を行わせるための画像符号化プログラムであっ
て、前記画像データが所定の限定色カラーに対応して所
定数の画素からなるブロック単位に同じ画像データを有
するものである場合に、前記参照画素を前記注目画素か
ら前記ブロックのサイズを単位とする距離離れた位置に
設定させることを特徴とする画像符号化プログラムを格
納したコンピュータで読取可能な記録媒体。
4. An image code for causing a computer, which executes processing according to a program, to predict a pixel value of a target pixel in image data from a pixel value of a reference pixel different from the target pixel and perform an encoding process. Conversion program, when the image data has the same image data in a block unit consisting of a predetermined number of pixels corresponding to a predetermined limited color, when the reference pixel from the target pixel of the block A computer-readable recording medium storing an image encoding program, wherein the recording medium is set at a position apart by a distance in units of size.
JP30986199A 1999-10-29 1999-10-29 Image encoding method and computer-readable recording medium storing image encoding program Pending JP2001128182A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP30986199A JP2001128182A (en) 1999-10-29 1999-10-29 Image encoding method and computer-readable recording medium storing image encoding program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP30986199A JP2001128182A (en) 1999-10-29 1999-10-29 Image encoding method and computer-readable recording medium storing image encoding program

Publications (1)

Publication Number Publication Date
JP2001128182A true JP2001128182A (en) 2001-05-11

Family

ID=17998191

Family Applications (1)

Application Number Title Priority Date Filing Date
JP30986199A Pending JP2001128182A (en) 1999-10-29 1999-10-29 Image encoding method and computer-readable recording medium storing image encoding program

Country Status (1)

Country Link
JP (1) JP2001128182A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006340134A (en) * 2005-06-03 2006-12-14 Fuji Xerox Co Ltd Coding device, coding method, and program
JP2007005965A (en) * 2005-06-22 2007-01-11 Fuji Xerox Co Ltd Coding apparatus, coding method, and program
JP2007028394A (en) * 2005-07-20 2007-02-01 Fuji Xerox Co Ltd Image compression apparatus, image extension apparatus, image data, image processing method, edge detection method, and program

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006340134A (en) * 2005-06-03 2006-12-14 Fuji Xerox Co Ltd Coding device, coding method, and program
JP2007005965A (en) * 2005-06-22 2007-01-11 Fuji Xerox Co Ltd Coding apparatus, coding method, and program
JP2007028394A (en) * 2005-07-20 2007-02-01 Fuji Xerox Co Ltd Image compression apparatus, image extension apparatus, image data, image processing method, edge detection method, and program

Similar Documents

Publication Publication Date Title
US8340445B2 (en) Image encoding device, image encoding method, image encoding/decoding system
US8126053B2 (en) Image encoding/decoding method and apparatus
JPH0824341B2 (en) Image data encoding method
JP2009516985A (en) Iterative correlation coding
WO2010050152A1 (en) Pixel prediction value generation procedure automatic generation method, image encoding method, image decoding method, devices using these methods, programs for these methods, and recording medium on which these programs are recorded
JP5158096B2 (en) Encoding data generation apparatus, encoding data generation method, decoding apparatus, and decoding method
US8396308B2 (en) Image coding based on interpolation information
JP3087835B2 (en) Image encoding method and apparatus and image decoding method and apparatus
US6614942B1 (en) Constant bitrate algorithm for block based image compression
JP2010098352A (en) Image information encoder
JPH09327019A (en) Object area encoding device
JP4756665B2 (en) Image compression apparatus, restoration apparatus, compression method, restoration method, and program
Babu et al. Efficient lossless image compression using modified hierarchical prediction and context adaptive coding
US8428381B2 (en) Image compression method with variable quantization parameter
JP2001128182A (en) Image encoding method and computer-readable recording medium storing image encoding program
JP3432039B2 (en) Image encoding method and apparatus
CN113473139A (en) Image processing method and image processing device
JPH10327418A (en) Image coder
JPH11103463A (en) Picture encoding method and storage medium
JPH1098620A (en) Picture processor
JP2000299866A (en) Method for encoding image
JPH11136674A (en) Image coding method and storage medium
JP4771541B2 (en) Image encoding apparatus and method, computer program, and computer-readable storage medium
JP2009038740A (en) Image encoding device
JPH11146394A (en) Image analyzer and image coding decoder

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20040519

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20060801

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20061212