【0001】
【発明の属する技術分野】
本発明は、電子写真装置に関するものである。
【0002】
【従来の技術】
従来、プリンタにおけるイメージ画像の描画はホストよりイメージ画像を受信し受信したデータをそのまま描画データとして扱っている。
【0003】
またはそのままではデータ容量が大きすぎるためプリンタ側にてPackbits圧縮をおこない元データよりデータ量が小さくなるときには圧縮したデータを使用し描画している。
【0004】
【発明が解決しようとする課題】
しかしながら隣の画素の階調が同一となりやすいコンピュータグラフィック画像ではPackbits圧縮はよく効くが、自然画のように隣の画素との階調が同一なものがほとんどないものではPackbits圧縮ではほとんど圧縮率が上がらず逆に元データよりデータ量が多くなることもある。
【0005】
そこで本発明が解決しようとしている問題点は自然画のイメージ描画データの効率のよい圧縮の方法についてである。
【0006】
【課題を解決するための手段】
上記目的を達成するために本出願における発明は、イメージ画像データを従来のようなPackbits圧縮にて圧縮するのではなく、隣り合った画素との階調の差分をFBE(Fast Boundary Encoding)にて圧縮することにより、より効率のよいデータ圧縮を提供する。
【0007】
【発明の実施の形態】
(実施例1)
図1は本出願の発明の説明を行うための図画であり、同図において101はホストより送られてくる幅x高さが9x5サイズの8bit/pixelイメージ画像データであり、同図における102は1画素をあらわしており、103はこのイメージデータの総ビット数をあらわしている。
【0008】
図3はFBEのコードの意味を表した図であり、同図における301は隣り合った画素との差分が0であることを示しており、302は隣り合った画素との(絶対値)差分が1であることをしめしており、303は隣り合った画素との(絶対値)差分が2であることをしめしており、304は隣り合った画素との(絶対値)差分がn(n=3〜255)であることをしめしており、305は差分が負から正あるいは正から負に変化したときかつ(絶対値)差分が1のときをあらわしており、306は差分が負から正あるいは正から負に変化したときかつ(絶対値)差分がm(m=2〜255)のときをあらわしている。
【0009】
図4は図2によりコード化された101イメージ画像を図3の方法に従い2値かしたものであり、401はコード化した際の総ビット数を表している。
【0010】
図2は本出願における特徴を最もよくあらわしている図画であり、同図における201は図1における9x5の画素の並びを(X:Y)=(0:0)、(0:1)・・・(0:8)、(1:0)、(1:1)・・・(1:8)、(2:0)、(2,1)・・・(4:9)の順に並べ替えたものであり、同図における202は並び替えられた画素201の隣り合った画素同士の差分をあらわしており、203は図3FBEコードにしたがい201画素の並びをFBEコード化したものである。
【0011】
上記構成において、ホストより101画像データが送られてくるとプリンタコントローラは従来ならそのまま描画オブジェクトデータとしてメモリに格納するかPackbits圧縮してメモリに格納するが、本発明では図2のように隣り合った画素との階調の差分を検出し、その階調の差分を図3に照らし合わせFBEコード化する(図4)。以上により、元イメージデータのデータ量が360ビットであったのが180ビット、つまり50%になる。
【0012】
【発明の効果】
以上説明したように、本出願ようにホストより送られてくるイメージ描画データの諧調の差分を正から負,負から正の傾きの概念を持ったハフマン符号化することにより、Packbits圧縮よりデータ容量が小さくなるため描画処理が行いやすくなる。
【図面の簡単な説明】
【図1】ホストより送られてくるイメージ画像の例である。
【図2】本発明を最もよくあらわす図画である。
【図3】FBEコードを説明する図画である。
【図4】本発明を説明する図画である。
【符号の説明】
101・・・9x5サイズ イメージ画像例(8bit/pixel)
102・・・1画素をあらわしている。
103・・・101画像の総ビット数
201・・・101画像を1列に並びかえたもの
202・・・(n+1)画素目の階調−n画素目の階調の値
203・・・201画素の並びをFBEコード化したもの
301〜306・・・FBEコード
401・・・FBE圧縮後の総ビット数[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to an electrophotographic apparatus.
[0002]
[Prior art]
2. Description of the Related Art Conventionally, when drawing an image in a printer, the image is received from a host and the received data is treated as drawing data as it is.
[0003]
Alternatively, since the data capacity is too large as it is, Packbits compression is performed on the printer side, and when the data amount is smaller than the original data, drawing is performed using the compressed data.
[0004]
[Problems to be solved by the invention]
However, Packbits compression works well for computer graphic images in which the gradation of neighboring pixels is likely to be the same, but the compression ratio of Packbits compression is almost uncompressed for those in which almost no gradations of neighboring pixels are the same as in natural images. On the contrary, the data amount may be larger than the original data without increasing.
[0005]
Accordingly, a problem to be solved by the present invention relates to a method for efficiently compressing image drawing data of a natural image.
[0006]
[Means for Solving the Problems]
In order to achieve the above object, the invention of the present application does not compress the image image data by the conventional Packbits compression, but uses FBE (Fast Boundary Encoding) to calculate the difference in gradation between adjacent pixels. The compression provides more efficient data compression.
[0007]
BEST MODE FOR CARRYING OUT THE INVENTION
(Example 1)
FIG. 1 is a diagram for explaining the invention of the present application. In FIG. 1, reference numeral 101 denotes 8-bit / pixel image data having a width x height of 9 × 5 and sent from a host. One pixel is represented, and 103 represents the total number of bits of the image data.
[0008]
FIG. 3 is a diagram showing the meaning of the FBE code. In FIG. 3, reference numeral 301 denotes that the difference between adjacent pixels is 0, and reference numeral 302 denotes the (absolute value) difference between adjacent pixels. Is 1; 303 indicates that the (absolute value) difference between adjacent pixels is 2; 304 indicates that the (absolute value) difference between adjacent pixels is n (n = 3 to 255), 305 indicates when the difference changes from negative to positive or from positive to negative, and the (absolute value) difference is 1, and 306 indicates that the difference changes from negative to positive. Alternatively, it represents the case where the value changes from positive to negative and the (absolute value) difference is m (m = 2 to 255).
[0009]
FIG. 4 is a diagram in which the 101 image image coded according to FIG. 2 is binarized according to the method of FIG. 3, and 401 indicates the total number of bits when coded.
[0010]
FIG. 2 is a drawing that best illustrates the features of the present application. In FIG. 2, reference numeral 201 denotes the arrangement of 9 × 5 pixels in FIG. 1 as (X: Y) = (0: 0), (0: 1). -(0: 8), (1: 0), (1: 1) ... (1: 8), (2: 0), (2,1) ... (4: 9) In FIG. 3, reference numeral 202 denotes a difference between adjacent pixels of the rearranged pixels 201, and reference numeral 203 denotes an FBE code obtained by converting the arrangement of 201 pixels according to the FBE code shown in FIG.
[0011]
In the above configuration, when the 101 image data is sent from the host, the printer controller conventionally stores it as it is in the memory as drawing object data or compresses and stores it in the memory as a drawing object data. Then, a difference between the gradations of the pixel and the detected gradation is detected, and the difference between the gradations is compared with FIG. 3 to form an FBE code (FIG. 4). As described above, the data amount of the original image data is 360 bits instead of 360 bits, that is, 50%.
[0012]
【The invention's effect】
As described above, as described in the present application, the gradation difference of the image drawing data sent from the host is Huffman-encoded with the concept of positive to negative and negative to positive slope, so that the data capacity can be reduced by Packbits compression. Is smaller, so that the drawing process can be easily performed.
[Brief description of the drawings]
FIG. 1 is an example of an image sent from a host.
FIG. 2 is a drawing that best illustrates the invention.
FIG. 3 is a diagram illustrating an FBE code.
FIG. 4 is a diagram illustrating the present invention.
[Explanation of symbols]
101 ... 9x5 size image image example (8bit / pixel)
102... Represents one pixel.
103... 101 total bit number of image 201... 101 images arranged in one row 202... (N + 1) th pixel grayscale−nth pixel grayscale value 203. FBE code 301 to 306... FBE code 401... Total number of bits after FBE compression