JP2005295307A - Image compression method,image compression device, image expanding device, and program - Google Patents

Image compression method,image compression device, image expanding device, and program Download PDF

Info

Publication number
JP2005295307A
JP2005295307A JP2004108995A JP2004108995A JP2005295307A JP 2005295307 A JP2005295307 A JP 2005295307A JP 2004108995 A JP2004108995 A JP 2004108995A JP 2004108995 A JP2004108995 A JP 2004108995A JP 2005295307 A JP2005295307 A JP 2005295307A
Authority
JP
Japan
Prior art keywords
pixel
pixels
binary image
image
unit
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
JP2004108995A
Other languages
Japanese (ja)
Inventor
Kazutomi Sakatani
一臣 坂谷
Tetsuya Ito
哲也 伊藤
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.)
Konica Minolta Business Technologies Inc
Original Assignee
Konica Minolta Business Technologies 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 Konica Minolta Business Technologies Inc filed Critical Konica Minolta Business Technologies Inc
Priority to JP2004108995A priority Critical patent/JP2005295307A/en
Publication of JP2005295307A publication Critical patent/JP2005295307A/en
Pending legal-status Critical Current

Links

Images

Landscapes

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

Abstract

<P>PROBLEM TO BE SOLVED: To provide a technology which is possible to realize a better compression ratio in a reversible compression processing of a two-valued image. <P>SOLUTION: In the two-valued image compressing method, concretely, the two-valued image is divided into a unit pixel block B of a predetermined size (for example, 4×2 pixel). Further, each unit pixel block B has a pixel string composed of a plurality of pixels in a sub-scanning direction. And, rearrangement of pixel values in the two-valued image is performed by repeating operations to read out pixel values of a plurality of pixels in the unit pixel block B in a predetermined order for the plurality of unit pixel blocks arranged in the main scanning direction in the two-valued image, and the compression is made applied to the predetermined reversible compression method for arrangement of pixel values after rearrangement. Moreover, at the time of expanding (defrosting), expanding processing and rearrangement processing are performed in the reverse procedure. <P>COPYRIGHT: (C)2006,JPO&NCIPI

Description

本発明は、二値画像の圧縮技術および伸張技術に関する。   The present invention relates to a binary image compression technique and decompression technique.

画像の圧縮処理方式としては、可逆方式(ロスレス)と非可逆方式(ロッシー)とが存在する。   As image compression processing methods, there are a reversible method (lossless) and an irreversible method (lossy).

可逆方式は、圧縮された情報を復元する際に、完全に元の情報と同一の情報を得ることができる方式である。可逆方式としては、ランレングス法、ユニバーサル符号化法(LZSS法、LZW法)、部分一致予測法、ブロックソーティング法などが知られている。   The reversible method is a method that can completely obtain the same information as the original information when decompressing the compressed information. As the reversible method, a run length method, a universal coding method (LZSS method, LZW method), a partial match prediction method, a block sorting method, and the like are known.

一方、非可逆方式は、圧縮された情報を復元する際に、完全に元の情報と同一の情報を得ることができない方式である。非可逆方式では、視覚特性を利用して見た目に影響の少ない情報を削減することなどによって、良好な圧縮率が実現される。この非可逆方式としては、DCT(離散コサイン変換)等を利用したJPEG、ウェーブレット変換等を利用したJPEG2000などが知られている。   On the other hand, the irreversible method is a method that cannot completely obtain the same information as the original information when decompressing the compressed information. In the irreversible method, a good compression rate is realized by reducing information that has less visual effect using visual characteristics. As this irreversible method, JPEG using DCT (discrete cosine transform) or the like, JPEG2000 using wavelet transform or the like are known.

これら両方式は、圧縮対象ファイル等の性質に応じて適宜に選択されて用いられる。たとえば、画像圧縮処理においては、圧縮率の点で有利な非可逆方式が用いられることが多い。しかしながら、伸張処理後の復元情報として、圧縮前の情報(元の情報)と完全に一致する情報を得ることが要請される場合には、画像圧縮処理においても可逆方式が用いられる。   Both of these methods are appropriately selected and used according to the properties of the file to be compressed. For example, in image compression processing, an irreversible method that is advantageous in terms of compression rate is often used. However, when it is required to obtain information that completely matches information before compression (original information) as decompression information after decompression processing, the lossless method is also used in image compression processing.

ところで、「可逆方式」は、復元時に元の情報と同一の情報を得ることが可能であるという利点がある一方で、非可逆方式に比べて一般的に圧縮の度合いが小さい。   By the way, the “reversible method” has an advantage that the same information as the original information can be obtained at the time of restoration, but the degree of compression is generally smaller than that of the irreversible method.

そこで、復元時に元の情報と同一の情報を得ることが可能であるという利点を得つつさらに良好な圧縮率を実現するため、様々な工夫を施した可逆圧縮技術が存在する。   Therefore, there are reversible compression techniques that have been devised in various ways to achieve a better compression ratio while obtaining the advantage that the same information as the original information can be obtained at the time of restoration.

たとえば、対象画像が多値画像の場合に、多値画像固有の特徴を利用してその圧縮度合いをさらに高める技術が存在する(例えば、特許文献1参照)。多値画像では、隣接する画素間の相関が高く、特に各画素値の上位のビット位ほど、隣接する画素間でそのビット値が同一である確率が高いという性質がある。この技術においては、このような性質を利用して、画像圧縮処理を行う前処理として、隣接する画素の同じビット位を連続させるように、多値画像データのビット列を並べ換えることによって、圧縮率を改善することが行われている。   For example, when the target image is a multi-valued image, there is a technique for further increasing the degree of compression using a characteristic unique to the multi-valued image (see, for example, Patent Document 1). A multi-valued image has a property that the correlation between adjacent pixels is high, and in particular, the higher the bit position of each pixel value, the higher the probability that the bit values are the same between adjacent pixels. In this technique, by using such a property, as a pre-process for performing the image compression process, the bit rate of the multi-valued image data is rearranged so that the same bit positions of adjacent pixels are continuous, thereby compressing the compression rate. Has been made to improve.

特開2001−309185号公報JP 2001-309185 A

ところで、画像には、各画素の階調値(画素値)を3段階以上の値(たとえば256段階)で表現する「多値画像」だけでなく、各画素の階調値を2段階の値(たとえば、「0」および「1」)で表現する「二値画像」も存在する。   By the way, the image includes not only a “multi-valued image” in which the gradation value (pixel value) of each pixel is expressed in three or more levels (for example, 256 levels) but also the gradation value of each pixel in two levels. There is also a “binary image” expressed by (for example, “0” and “1”).

そして、このような二値画像を、非可逆方式ではなく可逆方式で圧縮したいという要請も存在する。   There is also a demand for compressing such a binary image by a reversible method rather than an irreversible method.

しかしながら、上述の技術は、対象画像が多値画像であることを前提としており、多値画像の性質を利用して圧縮率の改善を図るものであるため、二値画像の可逆圧縮を行う際にそのまま適用することができない。   However, the above-described technique is based on the premise that the target image is a multi-valued image, and uses the properties of the multi-valued image to improve the compression ratio. Therefore, when performing reversible compression of a binary image. It cannot be applied as it is.

そこで、この発明の課題は、二値画像の可逆圧縮処理において、より良好な圧縮率を実現することが可能な技術を提供することにある。   Therefore, an object of the present invention is to provide a technique capable of realizing a better compression rate in the reversible compression processing of a binary image.

上記課題を解決すべく、請求項1の発明は、コンピュータに、(a)二値画像における各単位画素ブロック内の複数の画素の画素値を所定の順序で読み出す動作を、前記二値画像において第1の方向に配列された複数の単位画素ブロックについて繰り返すことによって、前記二値画像における画素値の並べ換えを行う手順と、(b)前記手順(a)で並べ換えられた画素値の配列に対して、所定の可逆圧縮手法を適用して圧縮を行う手順とを含む画像圧縮方法を実行させるためのプログラムであって、前記単位画素ブロックは、前記第1の方向に直交する第2の方向において、複数の画素で構成される画素列を有することを特徴とする。   In order to solve the above-mentioned problem, the invention of claim 1 is directed to a computer for performing (a) an operation of reading pixel values of a plurality of pixels in each unit pixel block in a binary image in a predetermined order in the binary image. A procedure for rearranging pixel values in the binary image by repeating for a plurality of unit pixel blocks arranged in the first direction, and (b) for the array of pixel values rearranged in the step (a) A program for executing an image compression method including a procedure for performing compression by applying a predetermined lossless compression method, wherein the unit pixel block is in a second direction orthogonal to the first direction. And having a pixel column composed of a plurality of pixels.

請求項2の発明は、二値画像を圧縮する画像圧縮方法であって、(a)二値画像における各単位画素ブロック内の複数の画素の画素値を所定の順序で読み出す動作を、前記二値画像において第1の方向に配列された複数の単位画素ブロックについて繰り返すことによって、前記二値画像における画素値の並べ換えを行うステップと、(b)前記ステップ(a)で並べ換えられた画素値の配列に対して、所定の可逆圧縮手法を適用して圧縮を行うステップとを含み、前記単位画素ブロックは、前記第1の方向に直交する第2の方向において、複数の画素で構成される画素列を有することを特徴とする。   The invention of claim 2 is an image compression method for compressing a binary image, wherein (a) an operation of reading out pixel values of a plurality of pixels in each unit pixel block in the binary image in a predetermined order A step of reordering pixel values in the binary image by repeating for a plurality of unit pixel blocks arranged in the first direction in the value image; and (b) the pixel value reordered in step (a). Compressing the array by applying a predetermined lossless compression technique, and the unit pixel block is a pixel composed of a plurality of pixels in a second direction orthogonal to the first direction. It has a row.

請求項3の発明は、二値画像を圧縮する画像圧縮装置であって、二値画像における各単位画素ブロック内の複数の画素の画素値を所定の順序で読み出す動作を、前記二値画像において第1の方向に配列された複数の単位画素ブロックについて繰り返すことによって、前記二値画像における画素値の並べ換えを行う並べ換え手段と、前記並べ換え手段によって並べ換えられた画素値の配列に対して、所定の可逆圧縮手法を適用して圧縮を行う圧縮手段と、を備え、前記単位画素ブロックは、前記第1の方向に直交する第2の方向において、複数の画素で構成される画素列を有することを特徴とする。   The invention according to claim 3 is an image compression apparatus for compressing a binary image, wherein an operation for reading out pixel values of a plurality of pixels in each unit pixel block in the binary image in a predetermined order is performed in the binary image. By repeating for a plurality of unit pixel blocks arranged in the first direction, a rearrangement unit that rearranges pixel values in the binary image, and an array of pixel values rearranged by the rearrangement unit, Compression means for applying a lossless compression method, and the unit pixel block has a pixel column composed of a plurality of pixels in a second direction orthogonal to the first direction. Features.

請求項4の発明は、所定の可逆圧縮手法で圧縮された二値画像を伸張する画像伸張装置であって、(a)前記所定の可逆圧縮手法に対応する伸張手法を用いて、前記圧縮された二値画像に対する伸張処理を行い、伸張処理後の画素列を生成する伸張手段と、(b)前記伸張処理後の画素列を前記二値画像における各単位画素ブロック内の各所定位置に配置して並べ換える動作を繰り返すことによって、前記二値画像において第1の方向に配列された複数の単位画素ブロックを復元する並べ換え手段とを備え、前記単位画素ブロックは、前記第1の方向に直交する第2の方向において、複数の画素で構成される画素列を有することを特徴とする。   The invention according to claim 4 is an image decompression device for decompressing a binary image compressed by a predetermined lossless compression technique, and (a) the image is compressed by using a decompression technique corresponding to the predetermined lossless compression technique. A decompression means for performing a decompression process on the binary image and generating a pixel string after the decompression process; and (b) arranging the pixel array after the decompression process at each predetermined position in each unit pixel block in the binary image. And rearranging means for restoring a plurality of unit pixel blocks arranged in the first direction in the binary image by repeating the rearrangement operation, wherein the unit pixel block is orthogonal to the first direction. In the second direction, a pixel column including a plurality of pixels is provided.

請求項1から請求項3に記載の発明によれば、二値画像の第2の方向における画素列の規則性を利用して、圧縮率の更なる改善を図ることができる。   According to the first to third aspects of the present invention, the compression ratio can be further improved by utilizing the regularity of the pixel columns in the second direction of the binary image.

請求項4に記載の発明によれば、高効率に圧縮された状態の二値画像を元の状態に復号することが可能である。   According to the fourth aspect of the present invention, it is possible to decode a binary image in a highly compressed state to the original state.

以下、本発明の実施形態を図面に基づいて説明する。   Hereinafter, embodiments of the present invention will be described with reference to the drawings.

<A.システム構成>
<概要>
図1は、本発明の実施形態に係るプリントシステム1を示す図である。図1に示すように、プリントシステム1は、コントローラ10とプリンタ20とを備えている。コントローラ10とプリンタ20とは、LANなどのネットワークNWを介して接続されている。
<A. System configuration>
<Overview>
FIG. 1 is a diagram illustrating a print system 1 according to an embodiment of the present invention. As shown in FIG. 1, the print system 1 includes a controller 10 and a printer 20. The controller 10 and the printer 20 are connected via a network NW such as a LAN.

コントローラ10は、ユーザによって指定されたファイルについての印刷出力用のデータを作成して、当該データをプリンタ20に向けてネットワークNWを介して送信する機能を有している。   The controller 10 has a function of creating print output data for a file designated by the user and transmitting the data to the printer 20 via the network NW.

この印刷出力用のデータは、ユーザによって指定されたファイルに基づいて、二値画像を表すデータとして生成される。具体的には、印刷対象のファイルが二値画像ではなく多値画像を含む場合においても、当該多値画像を表現するデータに対してハーフトーン処理等を施す変換処理を経ることによって、二値画像を表現するデータが生成される。また、印刷対象のファイルとしては、画像ファイルに限定されず、文字等を含むファイルであっても良い。これらの文字等を含むファイルは、印刷出力のため、直接若しくは一旦多値画像への変換を経由した後に二値画像に変換される。   The print output data is generated as data representing a binary image based on a file designated by the user. Specifically, even when the file to be printed includes a multi-valued image instead of a binary image, the binary data can be converted by performing a halftone process or the like on the data representing the multi-valued image. Data representing the image is generated. Further, the file to be printed is not limited to an image file, and may be a file including characters and the like. A file containing these characters and the like is converted into a binary image directly or once after being converted into a multi-valued image for printing output.

二値画像を表す変換後のデータが、後述する圧縮処理での処理対象データとなる。言い換えれば、印刷出力用の二値画像データが圧縮されてプリンタ20へと送信される。なお、印刷対象ファイルが元々二値画像を表すものである場合には、その二値画像のデータをそのまま圧縮処理の対象データとするようにしてもよい。   The converted data representing the binary image becomes the processing target data in the compression processing described later. In other words, the binary image data for print output is compressed and transmitted to the printer 20. If the print target file originally represents a binary image, the binary image data may be used as compression processing target data as it is.

また、プリンタ20は、コントローラ10から送信されてきたデータに基づいて印刷出力を行う装置である。プリンタ20は、コントローラ10からの二値画像のデータ(圧縮データ)に対して伸張処理および並べ換え処理(後述)を施して元のデータを復元し、当該復元されたデータに基づいて印刷出力を行う。   The printer 20 is a device that performs print output based on data transmitted from the controller 10. The printer 20 performs decompression processing and rearrangement processing (described later) on the binary image data (compressed data) from the controller 10 to restore the original data, and performs print output based on the restored data. .

なお、印刷出力は、モノクロ画像であってもよく、カラー画像であってもよい。モノクロ画像を印刷する際には、単一の二値画像データに基づいて印刷出力が行われる。一方、カラー画像を印刷する際には、複数(例えば3つ)の基本色(例えば、Y(イエロー)、M(マゼンタ)、C(シアン))毎に生成された二値画像を重ね合わせて出力することによって、カラー画像を印刷出力することができる。以下では、簡単化のためモノクロ画像の印刷について説明するが、カラー画像についても、基本色成分ごとの二値画像に対してそれぞれ圧縮処理を施すことが可能である。   The print output may be a monochrome image or a color image. When a monochrome image is printed, print output is performed based on a single binary image data. On the other hand, when printing a color image, binary images generated for each of a plurality of (for example, three) basic colors (for example, Y (yellow), M (magenta), and C (cyan)) are superimposed. By outputting, a color image can be printed out. Hereinafter, for the sake of simplification, printing of a monochrome image will be described. However, for a color image, it is possible to perform compression processing on each binary image for each basic color component.

また、後述するように、本システム1において、コントローラ10は画像圧縮装置として機能し、プリンタ20は画像伸張装置として機能する。   As will be described later, in the present system 1, the controller 10 functions as an image compression device, and the printer 20 functions as an image expansion device.

<コントローラ10>
コントローラ10は、図1に示すように、CPU2と、RAM(および/またはROM)などの半導体メモリにより構成される主記憶部3aおよびハードディスクドライブ(HDD)などの補助記憶部3bを有する記憶部3と、メディアドライブ(ここではDVDドライブ)4と、液晶ディスプレイなどの表示部5と、キーボード6aおよびマウス6bなどの入力部6と、ネットワークカードなどの通信部7とを備えるコンピュータシステム(以下、単に「コンピュータ」とも称する)として構成される。
<Controller 10>
As shown in FIG. 1, the controller 10 includes a CPU 2, a main storage unit 3 a configured by a semiconductor memory such as a RAM (and / or ROM), and a storage unit 3 having an auxiliary storage unit 3 b such as a hard disk drive (HDD). A computer system (hereinafter simply referred to simply as a DVD drive) 4, a display unit 5 such as a liquid crystal display, an input unit 6 such as a keyboard 6a and a mouse 6b, and a communication unit 7 such as a network card. Also referred to as “computer”.

メディアドライブ4は、CD−ROM、DVD(Digital Versatile Disk)、フレキシブルディスク、メモリカードなどの可搬性の記録媒体9からその中に記録されている情報を読み出す。   The media drive 4 reads information recorded in a portable recording medium 9 such as a CD-ROM, DVD (Digital Versatile Disk), flexible disk, or memory card.

コントローラ10は、記録媒体9に記録されたソフトウエアプログラム(以下、単に「プログラム」とも称する)を読み込み、そのプログラムをCPU2等を用いて実行することによって、各種の機能を実現する。なお、各機能を有するプログラムは、記録媒体9を介して供給される場合に限定されず、LANおよびインターネットなどのネットワークを介して、このコンピュータに対して供給されてもよい。   The controller 10 implements various functions by reading a software program (hereinafter simply referred to as “program”) recorded on the recording medium 9 and executing the program using the CPU 2 or the like. Note that the program having each function is not limited to being supplied via the recording medium 9, and may be supplied to this computer via a network such as a LAN and the Internet.

図2は、コントローラ10におけるソフトウエア構成および機能部ブロックを示す図である。図2(a)は、コントローラ10におけるソフトウエア構成を示し、図2(b)は、コントローラ10における機能的構成を示している。   FIG. 2 is a diagram illustrating a software configuration and a functional unit block in the controller 10. FIG. 2A shows a software configuration in the controller 10, and FIG. 2B shows a functional configuration in the controller 10.

図2(a)に示すように、コントローラ10上では、所定のオペレーションシステム(基本ソフトウエア)OSとアプリケーションソフトウエアプログラム(以下、単に「アプリケーションソフト」とも略称する)ASとプリンタドライバPDとが動作する。なお、これらのオペレーションシステムOS、アプリケーションソフトAS、およびプリンタドライバPDは、各階層でそれぞれ固有の機能を実現するためのプログラムである。   As shown in FIG. 2A, on the controller 10, a predetermined operation system (basic software) OS, an application software program (hereinafter also simply referred to as “application software”) AS, and a printer driver PD operate. To do. Note that these operation system OS, application software AS, and printer driver PD are programs for realizing unique functions in each layer.

オペレーションシステムOS上で呼び出されたアプリケーションソフトAS(たとえばワードプロセッシングソフトウエア)において、印刷対象のファイルが選択され、そのファイルに対する印刷出力操作が受け付けられると、アプリケーションソフトASはそのファイルに対する印刷出力処理を開始する。そして、アプリケーションソフトASは、プリンタ20に対応するプリンタドライバPDを用いて、プリンタ20に適合する印刷出力用データを生成し、当該印刷出力用データをプリンタ20に向けてネットワークを介して送信する。プリンタドライバPD内には、並べ換え処理を含む画像圧縮機能(後述)が実装されており、圧縮された二値画像データ(印刷出力用データ)がコントローラ10からプリンタ20へ向けて送信される。   When a file to be printed is selected in an application software AS (for example, word processing software) called on the operation system OS and a print output operation for the file is accepted, the application software AS performs a print output process for the file. Start. Then, the application software AS uses the printer driver PD corresponding to the printer 20 to generate print output data suitable for the printer 20 and transmits the print output data to the printer 20 via the network. An image compression function (described later) including rearrangement processing is implemented in the printer driver PD, and compressed binary image data (print output data) is transmitted from the controller 10 to the printer 20.

また、図2(b)の機能ブロック図に示すように、コントローラ10は、並べ換え処理部11と圧縮部12と送信部13とを備えている。並べ換え処理部11は、二値画像のデータを所定の規則(ルール)に従って並べ換える処理(後に詳述)を行う処理部であり、圧縮部12は並べ換え後の二値画像のデータを圧縮する処理部である。また、送信部13は、圧縮状態のデータをコントローラ10に向けて送信する処理部である。   Further, as shown in the functional block diagram of FIG. 2B, the controller 10 includes a rearrangement processing unit 11, a compression unit 12, and a transmission unit 13. The rearrangement processing unit 11 is a processing unit that performs processing (described later in detail) to rearrange binary image data according to a predetermined rule, and the compression unit 12 performs processing to compress the rearranged binary image data. Part. The transmission unit 13 is a processing unit that transmits the compressed data to the controller 10.

<プリンタ20>
プリンタ20は、図1に示すように、受信部21と伸張部22と並べ換え処理部23と出力制御部24と印刷出力部25とを備えている。受信部21は、コントローラ10から送信されてくる二値画像のデータ(圧縮状態)を受信する処理部である。伸張部22は、圧縮状態の二値画像のデータを伸張(「解凍」ないし「復号」とも称する)する処理部であり、並べ換え処理部23は、伸張部22によって伸張されたデータを所定の規則(ルール)に従って並べ換える処理(後に詳述)を行う処理部である。また、印刷出力部25は、復元されたデータに基づいて印刷出力を行う処理部であり、出力制御部24は、この印刷出力を制御する処理部である。
<Printer 20>
As shown in FIG. 1, the printer 20 includes a reception unit 21, an expansion unit 22, a rearrangement processing unit 23, an output control unit 24, and a print output unit 25. The receiving unit 21 is a processing unit that receives binary image data (compressed state) transmitted from the controller 10. The decompression unit 22 is a processing unit that decompresses data of a binary image in a compressed state (also referred to as “decompression” or “decoding”). It is a processing unit that performs a process of rearranging according to (rule) (detailed later). The print output unit 25 is a processing unit that performs print output based on the restored data, and the output control unit 24 is a processing unit that controls the print output.

<B.動作概要>
つぎに、図3を参照しながら、二値画像の並べ換えを含む圧縮動作について説明する。図3は、コントローラ10で行われる動作を示すフローチャートである。
<B. Outline of operation>
Next, a compression operation including rearrangement of binary images will be described with reference to FIG. FIG. 3 is a flowchart showing an operation performed by the controller 10.

図3に示すように、まず、ステップSP11において二値画像が取得される。   As shown in FIG. 3, first, a binary image is acquired in step SP11.

より詳細には、上述したように、コントローラ10上のアプリケーションソフトASにおいて、印刷対象のファイルに対する印刷出力操作が受け付けられると、アプリケーションソフトASは、プリンタドライバPDに印刷対象ファイルを引き渡す。プリンタドライバPDは、印刷対象ファイルに関して、ビットマップ展開あるいはハーフトーン処理等を施すことによって、二値画像を生成する。   More specifically, as described above, when the application software AS on the controller 10 receives a print output operation for a file to be printed, the application software AS delivers the file to be printed to the printer driver PD. The printer driver PD generates a binary image by performing bitmap development or halftone processing on the print target file.

次に、ステップSP12において、この二値画像に対する並べ換え処理(後に詳述)を行う。この並べ換え処理は、並べ換え処理部11によって行われる。なお、この並べ換え処理は、次のステップSP13における圧縮処理の前段階で行われる前処理であるとも表現される。   Next, in step SP12, rearrangement processing (detailed later) is performed on the binary image. This rearrangement process is performed by the rearrangement processing unit 11. Note that this rearrangement process is also expressed as a preprocess performed in the previous stage of the compression process in the next step SP13.

そして、ステップSP13では所定の可逆圧縮手法を用いて並べ換え後の二値画像データを圧縮する。この圧縮処理は、圧縮部12によって、ユニバーサル符号化法(例えばLZ法)などの可逆圧縮手法を用いて行われる。   In step SP13, the rearranged binary image data is compressed using a predetermined lossless compression method. This compression processing is performed by the compression unit 12 using a lossless compression method such as a universal encoding method (for example, LZ method).

なお、後述するように、二値画像に対して所定の可逆圧縮手法を適用する前に、ステップSP12で予め並べ換え処理を行っておくことによって、繰り返しパターンの出現回数を増加させて、圧縮符号化における圧縮率の改善を図ることができる。   As will be described later, before applying a predetermined lossless compression method to a binary image, a reordering process is performed in advance in step SP12, thereby increasing the number of appearances of a repetitive pattern and compressing and encoding. The compression rate can be improved.

その後、ステップSP14において、圧縮後のデータが送信部13によってプリンタ20に向けてネットワークNWを介して送信される。   Thereafter, in step SP14, the compressed data is transmitted to the printer 20 by the transmission unit 13 via the network NW.

つぎに、図4を参照しながら、二値画像の伸張動作等について説明する。図4は、プリンタ20で行われる動作を示すフローチャートである。   Next, a binary image expansion operation and the like will be described with reference to FIG. FIG. 4 is a flowchart showing operations performed by the printer 20.

図4に示すように、まず、プリンタ20の受信部21(図1)が、圧縮状態の二値画像データを取得する(ステップSP21)と、伸張部22がこの圧縮状態の二値画像データに対して伸張処理を施す(ステップSP22)。この伸張処理によって、ステップSP13の圧縮処理直前のデータと完全に同一のデータが得られる。その後、並べ換え処理部23は、画素列の並べ換え処理を施す(ステップSP23)。このステップSP23での並べ換え処理は、ステップSP12での並べ換えの手法に対応するものであり、この並べ換え処理によって、ステップSP11における二値画像データ、言い換えればステップSP12の並べ換え処理直前の二値画像データ、が完全に復元される。なお、この並べ換え処理は、ステップSP22における伸張処理の後段階で行われる後処理であるとも表現される。   As shown in FIG. 4, first, when the receiving unit 21 (FIG. 1) of the printer 20 acquires binary image data in a compressed state (step SP21), the decompressing unit 22 converts the binary image data into a compressed state. The expansion process is performed on the area (step SP22). By this decompression processing, data that is completely the same as the data immediately before the compression processing in step SP13 is obtained. Thereafter, the rearrangement processing unit 23 performs a rearrangement process of the pixel columns (step SP23). The rearrangement process in step SP23 corresponds to the rearrangement method in step SP12. By this rearrangement process, binary image data in step SP11, in other words, binary image data immediately before the rearrangement process in step SP12, Is fully restored. This rearrangement process is also expressed as a post process performed at a later stage of the decompression process in step SP22.

その後、復元されたデータに基づいて、出力制御部24の制御下において、印刷出力部25を用いた印刷出力が行われる(ステップSP24)。これによって、二値画像が印刷用紙上に出力される。   Thereafter, based on the restored data, printing output using the printing output unit 25 is performed under the control of the output control unit 24 (step SP24). As a result, a binary image is output on the printing paper.

<C.圧縮時の処理>
<概要>
つぎに、上記ステップSP12での並べ換え処理を中心に、当該並べ換え処理を含む画像圧縮処理について詳細に説明する。
<C. Processing during compression>
<Overview>
Next, the image compression process including the rearrangement process will be described in detail with a focus on the rearrangement process in step SP12.

図5は、文字ファイルの印刷出力結果の一例を示す図である。このような印刷出力結果も、上述したように、ハーフトーン処理等を経た二値画像として実現される。   FIG. 5 is a diagram illustrating an example of a print output result of a character file. As described above, such a print output result is also realized as a binary image that has undergone halftone processing or the like.

図6(a)は、この二値画像の一部を拡大した状態を示す図に相当する。図6(a)では、各画素がそれぞれ最小正方形で表されており、複数の画素が、互いに直交する2つの方向(水平方向および垂直方向)に並べられて2次元的に配列されている。なお、二値画像はその構成画素が2次元的に配置されたものとして形成されるが、当該二値画像を表現するデータは1次元の配列として構成されるようにしてもよい。その場合でも、水平方向の総画素数(幅)に基づいて1次元配列の画素列を(仮想的に)折り返すことによって、各画素の水平方向および垂直方向における位置(x,y)を特定することが可能である。   FIG. 6A corresponds to a diagram illustrating a state in which a part of the binary image is enlarged. In FIG. 6A, each pixel is represented by a minimum square, and a plurality of pixels are two-dimensionally arranged in two directions (horizontal direction and vertical direction) orthogonal to each other. Note that the binary image is formed with its constituent pixels arranged two-dimensionally, but the data representing the binary image may be configured as a one-dimensional array. Even in that case, the position (x, y) of each pixel in the horizontal direction and the vertical direction is specified by (virtually) folding back the pixel row of the one-dimensional array based on the total number of pixels (width) in the horizontal direction. It is possible.

また、二値画像は、図6(a)にも示すように、画像内の各画素の画素値(階調値)を2段階の値で表現するものである。図中においては、二値画像の各画素の画素値(階調値)は、「0」および「1」のいずれかの値であり、画素値「0」の画素が白色正方形で示され、画素値「1」の画素が斜線付きの正方形で示されている。ここでは、説明の簡易化のため、水平方向(X方向)に16画素、垂直方向(Y方向)に8画素並べられた合計128画素を対象として、並べ換え処理および圧縮処理等を行う場合について説明する。なお、実際の画像は、水平方向および垂直方向にさらに広がりを有していることが多いが、同様の処理を適宜繰り返して適用すればよい。   Further, as shown in FIG. 6A, the binary image expresses the pixel value (gradation value) of each pixel in the image with two-stage values. In the figure, the pixel value (gradation value) of each pixel of the binary image is either “0” or “1”, and the pixel value “0” is indicated by a white square. A pixel having a pixel value “1” is indicated by a hatched square. Here, for simplification of description, a case where rearrangement processing, compression processing, and the like are performed on a total of 128 pixels arranged in 16 pixels in the horizontal direction (X direction) and 8 pixels in the vertical direction (Y direction) will be described. To do. An actual image often has a further spread in the horizontal direction and the vertical direction, but the same processing may be repeated as appropriate.

さて、仮に並べ換えを行わない場合には、水平方向(X方向)を主走査方向とし垂直方向(Y方向)を副走査方向とすると、図6(b)に示されるような順序で各画素の画素値が読み出されて合計128画素の画素値の1次元配列が生成される。図6における各画素に付された数字0,1,2,...は、1次元配列変換後の配列順序を示す番号である。   If rearrangement is not performed, assuming that the horizontal direction (X direction) is the main scanning direction and the vertical direction (Y direction) is the sub-scanning direction, the pixels are arranged in the order shown in FIG. Pixel values are read out to generate a one-dimensional array of pixel values totaling 128 pixels. Numbers 0, 1, 2,... Attached to each pixel in FIG. 6 are numbers indicating the arrangement order after the one-dimensional array conversion.

そして、このような画素値の1次元配列に対して所定の可逆圧縮手法で圧縮処理を施すことによって、二値画像を圧縮することが考えられる。この場合には、結果的に、二値画像の水平方向(X方向)における画素列の規則性に起因して出現する画素の繰り返しパターンが利用されて、効率的に圧縮される。しかしながら、二値画像の垂直方向(Y方向)における画素列の規則性はほとんど利用されない。   Then, it is conceivable to compress the binary image by applying compression processing to the one-dimensional array of pixel values by a predetermined lossless compression method. In this case, as a result, a repetitive pattern of pixels appearing due to the regularity of the pixel column in the horizontal direction (X direction) of the binary image is used and compressed efficiently. However, the regularity of the pixel columns in the vertical direction (Y direction) of the binary image is hardly used.

これに対して、以下のような技術によれば、垂直方向の画素列の規則性を利用して、圧縮率の更なる改善を図ることが可能になる。以下では、このような技術について説明する。   On the other hand, according to the following technique, it is possible to further improve the compression rate by utilizing the regularity of the pixel columns in the vertical direction. Below, such a technique is demonstrated.

具体的には、まず、(i)二値画像を、所定の画素サイズを有する単位画素ブロックBで区分する。この単位画素ブロックBは、次述するように、二値画像の副走査方向(ここではY方向)において、複数の画素で構成される画素列を有している(図7〜図9等を参照)。そして、(ii)二値画像における単位画素ブロック内の複数(ここでは8つ)の画素の画素値を所定の順序で読み出す動作を、二値画像において主走査方向(ここではX方向)に配列された複数の単位画素ブロックについて繰り返すことによって、二値画像における画素の並べ換えを行い、(iii)並べ換え後の画素列に対して、所定の可逆圧縮手法を適用して圧縮処理を行う。   Specifically, first, (i) a binary image is divided into unit pixel blocks B having a predetermined pixel size. As will be described below, the unit pixel block B has a pixel column composed of a plurality of pixels in the sub-scanning direction (Y direction in this case) of the binary image (see FIGS. 7 to 9 and the like). reference). Then, (ii) an operation of reading pixel values of a plurality of (here, eight) pixels in the unit pixel block in the binary image in a predetermined order is arranged in the main scanning direction (here, the X direction) in the binary image. By repeating for a plurality of unit pixel blocks, the pixels in the binary image are rearranged, and (iii) a predetermined lossless compression technique is applied to the rearranged pixel columns to perform compression processing.

以下では、この並べ換え処理等について更に詳細に説明する。なお、単位画素ブロックとしては、様々なタイプのものを用いることが可能であるが、ここでは、単位画素ブロックBとして、次の3種類のサイズの矩形形状、すなわち、((水平方向の画素数P)×(垂直方向の画素数Q))=(4×2)、(2×4)、(1×8)を有する場合について、順次に例示する。   Below, this rearrangement process etc. are demonstrated in detail. Various types of unit pixel blocks can be used, but here, the unit pixel block B has the following three types of rectangular shapes, that is, ((number of pixels in the horizontal direction). P) × (number of pixels Q in the vertical direction)) = (4 × 2), (2 × 4), and (1 × 8) are sequentially illustrated as examples.

<その1>
図7は、上記システム1における並べ換え処理の一例について説明する図である。図7も図6と同様の図であり、図7(a)は二値画像の一部拡大図を示しており、図7(b)は並べ換え後の画素列を示している。ただし、図6(a)と図7(a)とでは画素内の数字が異なっている。このことは、並べ換え後の画素列に関する、図6(b)と図7(b)との相違点としても表れている。
<Part 1>
FIG. 7 is a diagram for explaining an example of the rearrangement process in the system 1. FIG. 7 is also the same diagram as FIG. 6, FIG. 7A shows a partially enlarged view of a binary image, and FIG. 7B shows a pixel column after rearrangement. However, the numbers in the pixels are different between FIG. 6A and FIG. This also appears as a difference between FIG. 6B and FIG. 7B regarding the pixel row after rearrangement.

図7(a)に示すように、まず、単位画素ブロックBとして、4画素(水平方向)×2画素(垂直方向)のサイズの8つの画素を含む画素ブロック(図中において黒太枠で囲まれた領域)を想定する。図7(a)の単位画素ブロックBは、副走査方向の画素サイズは2であり、2つの画素で構成される画素列を副走査方向に有している。   As shown in FIG. 7A, first, as a unit pixel block B, a pixel block including eight pixels having a size of 4 pixels (horizontal direction) × 2 pixels (vertical direction) (enclosed by a thick black frame in the drawing). Area). The unit pixel block B in FIG. 7A has a pixel size of 2 in the sub-scanning direction, and has a pixel column composed of two pixels in the sub-scanning direction.

そして、並べ換え処理部11は、最初の単位画素ブロックB内の8つの画素の画素値を所定の順序で読み出す。ここでは、まず、二値画像(図7(a)参照)において水平方向に並んだ上段の4つの画素を左から右に順次に読み出した後、その下側に並んだ下段の4つの画素を左から右に順次に読み出す場合が例示されている。このように、番号0〜7の8つの画素がこの順序で読み出される。この結果、図7(b)に示すような、番号0〜7の8つの画素の画素値に関する1次元配列が形成される。   Then, the rearrangement processing unit 11 reads out the pixel values of the eight pixels in the first unit pixel block B in a predetermined order. Here, first, the upper four pixels arranged in the horizontal direction in the binary image (see FIG. 7A) are sequentially read from left to right, and then the lower four pixels arranged on the lower side are read. The case of reading sequentially from left to right is illustrated. Thus, the eight pixels of numbers 0 to 7 are read in this order. As a result, as shown in FIG. 7B, a one-dimensional array relating to the pixel values of the eight pixels numbered 0 to 7 is formed.

つぎに、二値画像において主走査方向(X方向)に連続的に配列された複数の単位画素ブロックBについて、同様の読出し動作が繰り返される。   Next, the same readout operation is repeated for a plurality of unit pixel blocks B arranged continuously in the main scanning direction (X direction) in the binary image.

具体的には、次の(右隣の)単位画素ブロック内の8つの画素を同様にして読み出すことによって、番号8〜15の8つの画素がこの順序で読み出される。さらに、次の単位画素ブロック内の8つの画素を同様にして読み出すことによって、番号16〜23の画素がこの順序で読み出される。   Specifically, the eight pixels in the numbers 8 to 15 are read in this order by similarly reading the eight pixels in the next (right adjacent) unit pixel block. Further, by reading out the eight pixels in the next unit pixel block in the same manner, the pixels of numbers 16 to 23 are read out in this order.

また、主走査方向における終端位置の単位画素ブロック(例えば番号24〜31の画素を含むもの)についての読出しが完了したときには、副走査方向(Y方向)に1ブロック移動して同様の動作が繰り返される。具体的には、主走査方向における開始位置の読出し済み単位画素ブロックの直下の単位画素ブロック(例えば番号32〜39の画素を含むもの)に進んで、主走査方向における各単位画素ブロックについての同様の読出し動作を続行すればよい。   Further, when the reading of the unit pixel block at the end position in the main scanning direction (for example, including the pixels of numbers 24 to 31) is completed, the same operation is repeated by moving one block in the sub scanning direction (Y direction). It is. Specifically, the process proceeds to the unit pixel block immediately below the read unit pixel block at the start position in the main scanning direction (for example, including the pixels of numbers 32 to 39), and the same applies to each unit pixel block in the main scanning direction. The reading operation may be continued.

以降同様に、単位画素ブロックごとの読出し動作を繰り返すことによって、全ての画素(ここでは128画素)が番号0から番号127に至る1次元画素配列(データ列)として読み出される。   Similarly, by repeating the reading operation for each unit pixel block, all the pixels (128 pixels in this case) are read out as a one-dimensional pixel array (data string) from number 0 to number 127.

以上の処理がステップSP12において実行される。   The above process is executed in step SP12.

その後、ステップSP13の圧縮処理が実行される。具体的には、並べ換え後のデータ列に対して、予め定められた可逆圧縮手法を用いた圧縮処理が施される。各画素の画素値をそのまま1ビット単位で取り扱って圧縮処理を施すようにしても良いが、ここでは、各1ビットで表現される各画素の画素値を8つずつまとめて、1バイト(8ビット)単位の情報として取り扱い、圧縮処理を施すものとする。   Thereafter, the compression process of step SP13 is executed. Specifically, a compression process using a predetermined lossless compression method is performed on the rearranged data string. The pixel value of each pixel may be handled as it is in 1-bit units, and compression processing may be performed. However, here, the pixel values of each pixel represented by each 1-bit are grouped by 8 one byte (8 It is handled as information in bits) and is subjected to compression processing.

より詳細には、(1)番号0〜7までの画素の画素値をまとめた最初の1バイト文字(二進数表現で「10011001」)、(2)番号8〜15までの画素の画素値をまとめた次の1バイト文字(二進数表現で「00000000」)、(3)番号16〜23までの画素の画素値をまとめた次の1バイト文字(二進数表現で「00000000」)、(4)番号24〜31までの画素の画素値をまとめた次の1バイト文字(二進数表現で「00010010」)、(5)番号32〜39までの画素の画素値をまとめた次の1バイト文字(二進数表現で「10111101」)、...(以下、同様)を含む複数の1バイト文字からなる文字列を圧縮する。   More specifically, (1) the first one-byte character (“10011001” in binary notation) that summarizes the pixel values of pixels numbered 0 to 7, and (2) the pixel values of pixels numbered 8 to 15 Next 1 byte character (“00000000” in binary notation), (3) Next 1 byte character (“00000000” in binary notation) that summarizes the pixel values of numbers 16 to 23, (4 ) The next 1-byte character that summarizes the pixel values of the pixels of numbers 24 to 31 (binary representation “00010010”), (5) The next 1-byte character that summarizes the pixel values of the pixels of numbers 32 to 39 A character string composed of a plurality of 1-byte characters including (1011101 in binary notation),...

可逆圧縮手法としては、例えば、エイブラハム・レンペル(Abraham Lempel)およびヤコブ・チフ(Jacob Ziv)らによって開発されたLZ法を用いればよい。LZ法には、LZ77,LZ78、およびそれらの各種の改良手法(例えばLZSS法、LZW法等)が含まれる。また、可逆圧縮手法としては、LZ法に限定されず、ランレングス法、部分一致予測法、ブロックソーティング法などの各種の手法を用いることが可能である。   As the lossless compression method, for example, the LZ method developed by Abraham Lempel and Jacob Ziv et al. May be used. The LZ method includes LZ77, LZ78, and various improved methods thereof (for example, LZSS method, LZW method, etc.). Further, the lossless compression method is not limited to the LZ method, and various methods such as a run length method, a partial match prediction method, and a block sorting method can be used.

上記において、二値画像の副走査方向において近い位置に存在する画素は、この並べ換え後の一次元配列において近い位置に配されることになる。   In the above, pixels existing at a position close in the sub-scanning direction of the binary image are arranged at a position close in the one-dimensional array after the rearrangement.

たとえば、番号8〜11の各画素と、その下側の番号12〜15の各画素とは並べ換え後に近接して配置される(図7参照)。このことは、図6において番号4〜7の各画素とその下側の番号20〜23の各画素とが並べ換え後に離れて配置されることと、対照的である。   For example, the pixels of numbers 8 to 11 and the pixels of numbers 12 to 15 below the pixels are arranged close to each other after rearrangement (see FIG. 7). This is in contrast to the fact that each pixel numbered 4-7 in FIG. 6 and each pixel numbered 20-23 below are arranged apart from each other after rearrangement.

言い換えれば、図7(b)の並べ換え後の1次元配列は、二値画像における副走査方向の相関ないし規則性(特にここでは二値画像における垂直方向への連続性)が反映されたものとなっている。より詳細には、図7(b)の番号0〜31の画素列(b)を、図6の同画素列と比較すると判るように、「0」が連続する所定の繰り返しパターン「00000000」が、より多く出現するように並べ換えられている。詳細には、番号8〜15の画素列、番号16〜23の画素列、および番号40〜47の画素列等は、いずれも「00000000」となっている。端的に言えば、二値画像において、黒色部分(例えば文字部分)で分断されていた白色領域(例えば背景部分)が、並べ換え処理によって纏めて配列されることになるとも表現できる。このように、並べ換え後の一次元データは、圧縮されやすい状態となっていることが判る。   In other words, the one-dimensional array after rearrangement in FIG. 7B reflects the correlation or regularity in the sub-scanning direction in the binary image (in particular, the continuity in the vertical direction in the binary image here). It has become. More specifically, a predetermined repetitive pattern “00000000” in which “0” continues is understood as compared with the pixel row (b) of numbers 0 to 31 in FIG. 7B and the same pixel row in FIG. , Have been rearranged to appear more. Specifically, the pixel columns of Nos. 8 to 15, the pixel columns of Nos. 16 to 23, the pixel columns of Nos. 40 to 47, and the like are all “00000000”. In short, in a binary image, it can also be expressed that white areas (for example, background portions) divided by black portions (for example, character portions) will be arranged together by the rearrangement process. Thus, it can be seen that the one-dimensional data after rearrangement is in a state of being easily compressed.

このように、並べ換え後の一次元データは、二値画像の「副走査方向」における画素列の規則性を利用して(言い換えれば、二値画像が2次元的広がりを有するという幾何学的性質を利用して)、圧縮率の更なる改善を図ることが可能となるように並べ換えられている。   Thus, the one-dimensional data after the rearrangement uses the regularity of the pixel columns in the “sub-scanning direction” of the binary image (in other words, the geometric property that the binary image has a two-dimensional spread). The compression ratio is rearranged so that the compression rate can be further improved.

<その2>
図8は、別の並べ換え処理について説明する図である。図8も図6、図7と同様の図であり、図8(a)は二値画像の一部拡大図を示しており、図8(b)は並べ換え後の画素列を示している。ただし、図8(a)と図7(a)とでは画素内の数字が異なっている。このことは、並べ換え後の画素列に関する、図8(b)と図7(b)との相違点としても表れている。
<Part 2>
FIG. 8 is a diagram illustrating another rearrangement process. 8 is also a view similar to FIGS. 6 and 7, FIG. 8A shows a partially enlarged view of a binary image, and FIG. 8B shows a pixel row after rearrangement. However, the numbers in the pixels are different between FIG. 8A and FIG. This also appears as a difference between FIG. 8B and FIG. 7B regarding the pixel column after rearrangement.

図8においては、単位画素ブロックBとして、2画素(水平方向)×4画素(垂直方向)の8つの画素を含む画素ブロック(図中において黒太枠で囲まれた領域)を想定する。図8(a)の単位画素ブロックBは、副走査方向の画素サイズは4であり、4つの画素で構成される画素列を副走査方向に有している。   In FIG. 8, as the unit pixel block B, a pixel block including 8 pixels of 2 pixels (horizontal direction) × 4 pixels (vertical direction) (a region surrounded by a thick black frame in the drawing) is assumed. The unit pixel block B in FIG. 8A has a pixel size of 4 in the sub-scanning direction, and has a pixel column composed of four pixels in the sub-scanning direction.

そして、この単位画素ブロックB内の8つの画素の画素値を所定の順序で読み出す。ここでは、まず水平方向に並んだ最上段の2つの画素を連続的に読み出した後、その直下の2段目の2つの画素、さらに3段目の2つの画素、そして最後に4段目の2つの画素を順次に読み出す場合が例示されている。このように、番号0〜7の8つの画素がこの順序で読み出される。   Then, the pixel values of the eight pixels in the unit pixel block B are read in a predetermined order. Here, first, the top two pixels arranged in the horizontal direction are continuously read out, then the two pixels in the second row immediately below it, two pixels in the third row, and finally the fourth pixel in the fourth row The case where two pixels are read sequentially is illustrated. Thus, the eight pixels of numbers 0 to 7 are read in this order.

つぎに、二値画像において主走査方向(X方向)に繰り返し配列された複数の単位画素ブロックBについて、同様の読出し動作が繰り返される。さらに、主走査方向の読出しが終端位置まで終了すると、Y方向に単位画素ブロックのY方向長さ(ここでは4画素分)移動して、同様の動作を繰り返す。これによって、全ての画素(ここでは128画素)が番号0から番号127に至る1次元画素配列として読み出される。   Next, the same readout operation is repeated for a plurality of unit pixel blocks B arranged repeatedly in the main scanning direction (X direction) in the binary image. Further, when the reading in the main scanning direction is completed to the end position, the unit pixel block is moved in the Y direction length (here, 4 pixels) in the Y direction, and the same operation is repeated. As a result, all pixels (128 pixels in this case) are read out as a one-dimensional pixel array from number 0 to number 127.

ここにおいて、並べ換え後の1次元配列は、二値画像における垂直方向への連続性が反映されたものとなっている。例えば、番号16〜23の画素列、番号24〜31の画素列、および番号32〜39の画素列等は、いずれも「00000000」となっている。言い換えれば、「0」が連続する所定の繰り返しパターンがより多く出現するように並べ換えられている。したがって、並べ換え後の一次元データは、圧縮されやすい状態となっていることが判る。   Here, the one-dimensional array after the rearrangement reflects the continuity in the vertical direction in the binary image. For example, the pixel column numbered 16 to 23, the pixel column numbered 24 to 31, and the pixel column numbered 32 to 39 are all “00000000”. In other words, rearrangement is performed so that more predetermined repeated patterns with consecutive “0” appear. Therefore, it can be seen that the one-dimensional data after rearrangement is easily compressed.

以上の処理がステップSP12において実行された後、予め定められた可逆圧縮手法で並べ換え後のデータ列が圧縮される(ステップSP13)。   After the above processing is executed in step SP12, the rearranged data string is compressed by a predetermined lossless compression method (step SP13).

ここでは、各1ビットで表現される各画素の画素値を8つずつまとめて、1バイト(8ビット)単位の情報として取り扱い、圧縮処理を施すものとする。より詳細には、(1)番号0〜7までの画素の画素値をまとめた最初の1バイト文字(二進数表現で「10101011」)、(2)番号8〜15までの画素の画素値をまとめた次の1バイト文字(二進数表現で「01011101」)、(3)番号16〜23までの画素の画素値をまとめた次の1バイト文字(二進数表現で「00000000」)、(4)番号24〜31までの画素の画素値をまとめた次の1バイト文字(二進数表現で「00000000」)、(5)番号32〜39までの画素の画素値をまとめた次の1バイト文字(二進数表現で「00000000」)、...(以下、同様)を含む複数の1バイト文字からなる文字列を圧縮する。   Here, it is assumed that eight pixel values of each pixel represented by each 1 bit are collected and handled as 1-byte (8-bit) information and subjected to compression processing. More specifically, (1) the first one-byte character (“10101011” in binary notation) that summarizes the pixel values of pixels numbered 0 to 7, and (2) the pixel values of pixels numbered 8 to 15 The next single byte character (“01011011” in binary representation), (3) the next single byte character (“00000000” in binary representation) that summarizes the pixel values of numbers 16 to 23, (4 ) Next 1-byte character that summarizes the pixel values of the pixels numbered 24 to 31 (binary representation “00000000”), (5) Next 1-byte character that summed the pixel values of the pixels numbered 32 to 39 (Binary representation “00000000”),... (Hereinafter the same), a character string composed of a plurality of 1-byte characters is compressed.

<その3>
図9は、さらに別の並べ換え処理について説明する図である。図9も図6〜8と同様の図であり、図9(a)は二値画像の一部拡大図を示しており、図9(b)は並べ換え後の画素列を示している。ただし、図9(a)と図7(a)とでは画素内の数字が異なっている。このことは、並べ換え後の画素列に関する、図9(b)と図7(b)との相違点としても表れている。
<Part 3>
FIG. 9 is a diagram for explaining still another rearrangement process. FIG. 9 is also a view similar to FIGS. 6 to 8, FIG. 9A shows a partially enlarged view of a binary image, and FIG. 9B shows a pixel row after rearrangement. However, the numbers in the pixels are different between FIG. 9A and FIG. This also appears as a difference between FIG. 9B and FIG. 7B regarding the pixel column after rearrangement.

図9においては、単位画素ブロックBとして、1画素(水平方向)×8画素(垂直方向)の8つの画素を含む画素ブロック(図中において黒太枠で囲まれた領域)を想定する。図9(a)の単位画素ブロックBは、副走査方向の画素サイズは8であり、8つの画素で構成される画素列を副走査方向に有している。   9, a unit pixel block B is assumed to be a pixel block including eight pixels of 1 pixel (horizontal direction) × 8 pixels (vertical direction) (a region surrounded by a thick black frame in the drawing). The unit pixel block B in FIG. 9A has a pixel size of 8 in the sub-scanning direction, and has a pixel column composed of 8 pixels in the sub-scanning direction.

そして、この単位画素ブロックB内の8つの画素の画素値を所定の順序で読み出す。ここでは、垂直方向に一列に並んだ順序に従って上から下へと順次に読み出す場合が例示されている。このように、番号0〜7の8つの画素がこの順序で読み出される。   Then, the pixel values of the eight pixels in the unit pixel block B are read in a predetermined order. Here, a case where reading is sequentially performed from the top to the bottom according to the order arranged in a line in the vertical direction is illustrated. Thus, the eight pixels of numbers 0 to 7 are read in this order.

つぎに、二値画像において主走査方向(X方向)に繰り返し配列された複数の単位画素ブロックBについて、同様の読出し動作が繰り返される。これによって、全ての画素(ここでは128画素)が番号0から番号127に至る1次元画素配列として読み出される。   Next, the same readout operation is repeated for a plurality of unit pixel blocks B arranged repeatedly in the main scanning direction (X direction) in the binary image. As a result, all pixels (128 pixels in this case) are read out as a one-dimensional pixel array from number 0 to number 127.

ここにおいて、並べ換え後の1次元配列は、二値画像における垂直方向への連続性が反映されたものとなっている。例えば、番号32〜39の画素列、番号40〜47の画素列、および番号48〜55の画素列等は、いずれも「00000000」となっている。言い換えれば、「0」が連続する所定の繰り返しパターンがより多く出現するように並べ換えられている。したがって、並べ換え後の一次元データは、圧縮されやすい状態となっていることが判る。   Here, the one-dimensional array after the rearrangement reflects the continuity in the vertical direction in the binary image. For example, the pixel column numbered 32 to 39, the pixel column numbered 40 to 47, the pixel column numbered 48 to 55, etc. are all “00000000”. In other words, rearrangement is performed so that more predetermined repeated patterns with consecutive “0” appear. Therefore, it can be seen that the one-dimensional data after rearrangement is easily compressed.

以上の処理がステップSP12において実行された後、予め定められた可逆圧縮手法で並べ換え後のデータ列が圧縮される(ステップSP13)。   After the above processing is executed in step SP12, the rearranged data string is compressed by a predetermined lossless compression method (step SP13).

ここでは、各1ビットで表現される各画素の画素値を8つずつまとめて、1バイト(8ビット)単位の情報として取り扱い、圧縮処理を施すものとする。より詳細には、(1)番号0〜7までの画素の画素値をまとめた最初の1バイト文字(二進数表現で「11111111」)、(2)番号8〜15までの画素の画素値をまとめた次の1バイト文字(二進数表現で「00010000」)、(3)番号16〜23までの画素の画素値をまとめた次の1バイト文字(二進数表現で「00100000」)、(4)番号24〜31までの画素の画素値をまとめた次の1バイト文字(二進数表現で「11111111」)、(5)番号32〜39までの画素の画素値をまとめた次の1バイト文字(二進数表現で「00000000」)、...(以下、同様)を含む複数の1バイト文字からなる文字列を圧縮する。   Here, it is assumed that eight pixel values of each pixel represented by each 1 bit are collected and handled as 1-byte (8-bit) information and subjected to compression processing. More specifically, (1) the first 1-byte character (“11111111” in binary notation) that summarizes the pixel values of pixels numbered 0 to 7, and (2) the pixel values of pixels numbered 8 to 15 The next single byte character (binary representation “00010000”), (3) the next single byte character summarizing the pixel values of numbers 16 to 23 (binary representation “00100000”), (4 ) Next 1-byte character that summarizes the pixel values of the pixels numbered 24 to 31 (binary expression “11111111”), (5) Next 1-byte character that summed the pixel values of the pixels numbered 32 to 39 (Binary representation “00000000”),... (Hereinafter the same), a character string composed of a plurality of 1-byte characters is compressed.

<総括>
図10は、上述の並べ換え処理を概念的に示す図である。上述の3種類の単位画素ブロックB(図7〜図9)は、それぞれ、水平方向にZ画素、垂直方向に(8/Z)画素並べられた矩形状の画素配列で構成されている(Z=4,2,1)。そして、この単位ブロック内の各画素の画素値が所定の順序で読み出されることによって、並べ換え後に連続する8ビット(1バイト)のデータが生成されることになる。
<Summary>
FIG. 10 is a diagram conceptually showing the above-described rearrangement process. Each of the three types of unit pixel blocks B (FIGS. 7 to 9) is configured by a rectangular pixel array in which Z pixels are arranged in the horizontal direction and (8 / Z) pixels are arranged in the vertical direction (Z = 4, 2, 1). Then, by reading the pixel values of the respective pixels in the unit block in a predetermined order, continuous 8-bit (1 byte) data is generated after the rearrangement.

図10に示すように、最初の例(図7参照、Z=4)では、元の二値画像を水平方向に2倍に引き延ばし且つ垂直方向に半分に縮めるように画素を並べ換えることに相当する。次の例(図8参照、Z=2)では、元の二値画像を水平方向に4倍に引き延ばし且つ垂直方向に1/4に縮めるように画素を並べ換えることに相当する。また、最後の例(図9参照、Z=1)では、元の二値画像を水平方向に8倍に引き延ばし且つ垂直方向に1/8に圧縮するように画素を並べ換えることに相当する。なお、いずれの場合も、総画素数は画素の並べ換え前後で同一である。   As shown in FIG. 10, in the first example (see FIG. 7, Z = 4), this corresponds to rearranging the pixels so that the original binary image is stretched twice in the horizontal direction and half in the vertical direction. To do. In the next example (see FIG. 8, Z = 2), this corresponds to rearranging the pixels so that the original binary image is expanded four times in the horizontal direction and reduced to ¼ in the vertical direction. In the last example (see FIG. 9, Z = 1), this corresponds to rearranging the pixels so that the original binary image is stretched 8 times in the horizontal direction and compressed to 1/8 in the vertical direction. In any case, the total number of pixels is the same before and after the pixel rearrangement.

このように、垂直方向の画素情報を水平方向に展開することができるので、二値画像の垂直方向における規則性を利用して、同一パターンの繰り返しをより多く出現させることが可能になる。したがって、その後の圧縮段階における圧縮の度合いをさらに大きくすること(圧縮率を改善すること)が可能になる。   Thus, since the pixel information in the vertical direction can be expanded in the horizontal direction, it is possible to make more repetitions of the same pattern appear using the regularity in the vertical direction of the binary image. Therefore, it is possible to further increase the degree of compression in the subsequent compression stage (improve the compression rate).

<D.伸張時の処理>
つぎに、プリンタ20における画像伸張処理について説明する。
<D. Processing during expansion>
Next, image expansion processing in the printer 20 will be described.

まず、ステップSP22においては、所定の可逆画像圧縮手法に対応する伸張手法を適用して伸張を行う。たとえば、LZSS法で圧縮処理が行われている場合には、LZSS法での伸張処理が行われる。いずれの手法を用いるかは、予め取り決めておけばよい。このステップSP22の伸張処理によって、ステップSP13の圧縮処理直前のデータと完全に同一のデータが得られる。   First, in step SP22, decompression is performed by applying a decompression method corresponding to a predetermined lossless image compression method. For example, when compression processing is performed using the LZSS method, decompression processing using the LZSS method is performed. Which method should be used may be determined in advance. By the decompression process in step SP22, data completely identical to the data immediately before the compression process in step SP13 is obtained.

つぎに、ステップSP23において、並べ換え処理部23は、伸張後の画素列を所定の配置ルールに基づいて単位画素ブロック内の各所定位置に配置し並べ換える動作、を繰り返すことによって、二値画像において水平方向に配列された複数の単位画素ブロックを復元する。この並べ換え処理によって、コントローラ10での圧縮処理前の二値画像データ(ステップSP12の並べ換え処理直前の二値画像データ)が完全に復元される。   Next, in step SP23, the rearrangement processing unit 23 repeats the operation of arranging and rearranging the expanded pixel columns at respective predetermined positions in the unit pixel block based on a predetermined arrangement rule, thereby repeating the binary image. A plurality of unit pixel blocks arranged in the horizontal direction are restored. By this rearrangement process, the binary image data before the compression process in the controller 10 (binary image data immediately before the rearrangement process in step SP12) is completely restored.

より詳細には、並べ換え処理部23は、予め定められた単位画素ブロック種類とその内部での配置順序とに従って、伸張後の画素列を並べ換えて、元の画素列を復元する。   More specifically, the rearrangement processing unit 23 rearranges the expanded pixel columns in accordance with a predetermined unit pixel block type and the arrangement order in the unit pixel block type to restore the original pixel columns.

たとえば、単位画素ブロック種類とその単位画素ブロック内部での配置順序とについて図7のものを採用することを予め取り決めておく場合には、プリンタ20は、その取り決め(配置ルール)に従って、図7(b)のような伸張後の画素列を図7(a)の配置順序で、並べ換えればよい。これによって、番号0〜3、8〜11、16〜19、24〜27の画素で最上段の画素列を構成し、番号4〜7、12〜15、20〜23、28〜31の画素で次の段の画素列を構成することができる。その後同様にして、画素列全体を復元することができる。   For example, when it is determined in advance that the unit pixel block type and the arrangement order in the unit pixel block are those shown in FIG. 7, the printer 20 follows FIG. 7 ( The expanded pixel columns as shown in b) may be rearranged in the arrangement order of FIG. As a result, the uppermost pixel row is composed of pixels of numbers 0 to 3, 8 to 11, 16 to 19, and 24 to 27, and pixels of numbers 4 to 7, 12 to 15, 20 to 23, and 28 to 31 are formed. A pixel row in the next stage can be configured. Thereafter, in the same manner, the entire pixel column can be restored.

このような処理によれば、高効率に圧縮された状態の二値画像を元の状態に戻すことが可能である。   According to such processing, it is possible to return a binary image in a highly compressed state to its original state.

なお、ここでは予め定められた並べ換え順序等に従って元の二値画像を復元する場合を例示しているが、これに限定されず、圧縮時に使用された単位画素ブロックの種類などを圧縮ファイルのヘッダ情報に格納しておき、プリンタ20がそのヘッダ情報の内容に応じた並べ換え処理(ステップSP23)等を行うようにしてもよい。   Here, the case where the original binary image is restored according to a predetermined rearrangement order or the like is illustrated, but the present invention is not limited to this, and the type of unit pixel block used at the time of compression is determined as the header of the compressed file. The information may be stored in the information, and the printer 20 may perform rearrangement processing (step SP23) according to the contents of the header information.

<E.その他>
以上のように、このシステム1のコントローラ10は、(i)二値画像を区分する単位画素ブロックとして、副走査方向(Y方向)の画素サイズが2以上の単位画素ブロックを想定し、(ii)各単位画素ブロック内の複数(8つ)の画素の画素値を所定の順序で読み出す動作を、二値画像において主走査方向に配列された複数の単位画素ブロックについて繰り返すことによって、二値画像における画素の並べ換えを行い、(iii)並べ換え後の画素列に対して、所定の可逆圧縮手法を適用して圧縮処理を行う。したがって、垂直方向の画素列の規則性を考慮した並べ換えを行った上で圧縮処理が施されるので、圧縮率を更に改善することが可能である。
<E. Other>
As described above, the controller 10 of the system 1 assumes that (i) a unit pixel block having a pixel size of 2 or more in the sub-scanning direction (Y direction) as a unit pixel block that classifies a binary image, (ii) ) By repeating the operation of reading the pixel values of a plurality (eight) pixels in each unit pixel block in a predetermined order for a plurality of unit pixel blocks arranged in the main scanning direction in the binary image, a binary image is obtained. (Iii) A predetermined lossless compression technique is applied to the rearranged pixel column to perform compression processing. Therefore, the compression processing is performed after rearranging in consideration of the regularity of the pixel columns in the vertical direction, so that the compression rate can be further improved.

なお、LZ法のうちのLZSS法とLZW法とを比較した場合、(対象画像の相違およびハーフトーン処理内容の相違にも依存するが)一般的には、並べ換えを伴う上記思想をLZSS法に適用する場合の方が、上記思想をLZW法に適用する場合に比べて、並べ換えの実施による圧縮率の改善効果が高い。これは、LZW法では広域的な辞書を作成するのに対して、LZSS法では直近のデータ列を辞書として用いるという、辞書構造の相違に基づくものであると考えられる。   In addition, when comparing the LZSS method and the LZW method of the LZ method, the above concept involving rearrangement is generally applied to the LZSS method (although depending on the difference in the target image and the content of the halftone processing). When applied, the compression rate improvement effect due to the rearrangement is higher than when the above idea is applied to the LZW method. This is considered to be based on a difference in dictionary structure in which the LZW method creates a wide-area dictionary while the LZSS method uses the latest data string as a dictionary.

また、並べ換え時の単位画素ブロックの縦横比(言い換えれば、上記Zの値)は、圧縮手法に応じた適宜の値を採用することが好ましい。たとえば、或る幾つかの画像に対しては、LZSS法ではZ=1あるいはZ=2とした場合に圧縮率の改善効果が高くなり、LZW法ではZ=2あるいはZ=4とした場合に圧縮率の改善効果が高くなるという傾向がある。なお、圧縮率の改善効果は、対象画像の相違およびハーフトーン処理内容の相違によっても異なるため、対象画像および/またはハーフトーン処理内容等に応じて、適宜の値(単位画素ブロックの縦横比)を選ぶことが好ましい。   Moreover, it is preferable to adopt an appropriate value according to the compression method as the aspect ratio (in other words, the value of Z) of the unit pixel block at the time of rearrangement. For example, for some images, the effect of improving the compression ratio is enhanced when Z = 1 or Z = 2 in the LZSS method, and when Z = 2 or Z = 4 in the LZW method. There is a tendency that the effect of improving the compression ratio is increased. Note that the improvement effect of the compression ratio also varies depending on the difference in the target image and the difference in the halftone processing content. Is preferred.

また、上記実施形態においては、単位画素ブロック内の読出し順序として、図7〜図10に示すケースを例示したが、これに限定されない。具体的には、図11および図12のような読出し順序を用いても良い。なお、図11および図12は、図7(a)等と同様の一部拡大図を様々な変形例について示す図であり、各画素に付された数字は単位画素ブロック内での各画素の読出し順序を表している。   Moreover, in the said embodiment, although the case shown in FIGS. 7-10 was illustrated as a reading order in a unit pixel block, it is not limited to this. Specifically, the reading order as shown in FIGS. 11 and 12 may be used. FIG. 11 and FIG. 12 are diagrams showing partially enlarged views similar to FIG. 7A and the like for various modified examples. The numbers given to the respective pixels are the numbers of the respective pixels in the unit pixel block. Indicates the reading order.

図11は、Z=4に対応する単位画素ブロックBについて、図7と異なる順序で各画素値を読み出す様々な変形例を示す図である。   FIG. 11 is a diagram illustrating various modified examples of reading out pixel values in a different order from FIG. 7 for the unit pixel block B corresponding to Z = 4.

詳細には、図11(a)は、上下2段にわたる単位画素ブロックB内の画素のうち、上段の画素と下段の画素とをこの順序で垂直画素列ごとに交互に読出して水平方向(X方向)に順次移動しながら全ての画素列の画素値を読み出す場合を例示する。また、図11(b)は、単位画素ブロックB内の所定位置に在る0番の画素の画素値からはじめて、所定方向回りに(ここでは反時計回りに)、8つの画素の画素値を読み出す場合を例示する。   Specifically, in FIG. 11A, among the pixels in the unit pixel block B extending in the upper and lower two stages, the upper pixel and the lower pixel are alternately read out in this order for each vertical pixel column in the horizontal direction (X An example in which the pixel values of all the pixel columns are read while sequentially moving in the direction). FIG. 11B shows the pixel values of eight pixels starting from the pixel value of the 0th pixel at a predetermined position in the unit pixel block B and rotating around the predetermined direction (counterclockwise here). An example of reading is illustrated.

また、図12は、Z=2に対応する単位画素ブロックBについて、図8と異なる順序で各画素値を読み出す様々な変形例を示す図である。   FIG. 12 is a diagram showing various modifications for reading out pixel values in a different order from FIG. 8 for the unit pixel block B corresponding to Z = 2.

詳細には、図12(a)は、垂直方向(Y方向)4段にわたる2つの垂直画素列のうち、まず左側の垂直画素列内の4つの画素の画素値を最上段から最下段へ向けてその配列順序に従って読出し、次に右側の垂直画素列内の4つの画素を最上段から最下段へ向けてその配列順序に従って読出す場合を例示する。また、図12(b)は、4段に並んだ2画素ずつの水平画素列を、最上段から最下段に向けて、段ごとに読出し順序を(左から右へ、右から左へと)交互に変更しつつ読み出す場合を例示する。さらに、図12(c)は、単位画素ブロックB内の所定位置に在る0番の画素の画素値からはじめて、所定方向回りに(ここでは時計回りに)8つの画素の画素値を読み出す場合を例示する。   Specifically, in FIG. 12A, among the two vertical pixel columns extending in four stages in the vertical direction (Y direction), first, the pixel values of the four pixels in the left vertical pixel line are directed from the top to the bottom. An example will be described in which reading is performed in accordance with the arrangement order, and then four pixels in the right vertical pixel column are read out in accordance with the arrangement order from the top to the bottom. FIG. 12B shows a horizontal pixel row of two pixels arranged in four stages from the top to the bottom, and the reading order for each stage (from left to right, from right to left). An example of reading while changing alternately will be described. Further, FIG. 12C shows a case where pixel values of eight pixels are read out in a predetermined direction (clockwise in this case) starting from the pixel value of the 0th pixel located at a predetermined position in the unit pixel block B. Is illustrated.

さらに、これ以外の読出し順序を用いて、単位画素ブロックB内の各画素の画素値を読み出すようにしてもよい。   Furthermore, the pixel value of each pixel in the unit pixel block B may be read using a reading order other than this.

また、上記実施形態においては、8個の画素で単位画素ブロックBを構成する場合を例示したが、これに限定されず、たとえば16個の画素で単位画素ブロックBを構成するようにしてもよい。   In the above embodiment, the unit pixel block B is configured by 8 pixels. However, the present invention is not limited to this. For example, the unit pixel block B may be configured by 16 pixels. .

さらに、上記実施形態においては、並べ換え後の一次元配列を、8個の画素ずつまとめて1バイト単位の文字として取り扱った上で、圧縮処理を施す場合について例示したが、これに限定されない。たとえば、16個の画素をまとめて2バイト(16ビット)単位で取り扱って圧縮処理を施すようにしてもよい。あるいは、4個の画素をまとめて4ビット単位で取り扱って圧縮処理を施すようにしてもよい。さらには、上述したように、各画素の画素値をそのまま1ビット単位で取り扱って圧縮処理を施すようにしてもよい。   Further, in the above-described embodiment, the case where the one-dimensional array after the rearrangement is subjected to the compression process after the pixels are collectively treated as one-byte characters is illustrated, but the present invention is not limited to this. For example, 16 pixels may be collectively handled in units of 2 bytes (16 bits) and subjected to compression processing. Alternatively, the compression processing may be performed by collectively handling four pixels in units of 4 bits. Furthermore, as described above, the pixel value of each pixel may be handled as it is in 1-bit units and subjected to compression processing.

また、上記実施形態においては、水平方向(X方向)を主走査方向とする場合を例示しているが、これに限定されない。たとえば、上記とは逆に、垂直方向(Y方向)を主走査方向とし、水平方向(X方向)を副走査方向としてもよい。言い換えれば、複数の単位画素ブロックをまず垂直方向に順次に読み出していくようにしてもよい。なお、その場合には、各単位画素ブロックは、二値画像の副走査方向(X方向)において、複数の画素で構成される画素列を有するように構成すればよい。端的に言えば、各単位画素ブロックにおける副走査方向(X方向)の画素サイズが2以上となるようにすればよい。   Moreover, although the case where the horizontal direction (X direction) is the main scanning direction is illustrated in the above embodiment, the present invention is not limited to this. For example, contrary to the above, the vertical direction (Y direction) may be the main scanning direction and the horizontal direction (X direction) may be the sub-scanning direction. In other words, a plurality of unit pixel blocks may be read sequentially in the vertical direction first. In this case, each unit pixel block may be configured to have a pixel column composed of a plurality of pixels in the sub-scanning direction (X direction) of the binary image. In short, the pixel size in the sub-scanning direction (X direction) in each unit pixel block may be 2 or more.

さらに、上記実施形態においては、ネットワークNWを用いてデータを転送する場合を例示したが、これに限定されず、パラレルポートを経由したデータ転送など、様々なデータ転送を行うためのデータ圧縮に上記思想を適用してもよい。この場合でも、圧縮率の改善によって、データ転送の効率化を図ることが出来る。   Furthermore, in the above-described embodiment, the case where data is transferred using the network NW has been exemplified. However, the present invention is not limited to this, and the data compression for performing various data transfer such as data transfer via a parallel port is described above. Thoughts may be applied. Even in this case, it is possible to improve the efficiency of data transfer by improving the compression rate.

また、上記実施形態においては、印刷出力用二値画像の圧縮に上記思想を適用する場合について説明したが、これに限定されず、その他の用途の二値画像に対して上記思想を適用してもよい。これによれば、圧縮率の改善によってデータの保管効率の向上(例えば、メモリ領域の節約あるいはハードディスク領域の節約など)等を図ることができる。   In the above embodiment, the case where the above idea is applied to the compression of the binary image for print output has been described. However, the invention is not limited to this, and the above idea is applied to a binary image for other purposes. Also good. According to this, it is possible to improve data storage efficiency (for example, save memory area or save hard disk area) by improving the compression rate.

プリントシステムの概略構成を示す図である。1 is a diagram illustrating a schematic configuration of a print system. コントローラのソフトウエア構成および機能ブロックを示す図である。It is a figure which shows the software configuration and functional block of a controller. コントローラの動作を示すフローチャートである。It is a flowchart which shows operation | movement of a controller. プリンタの動作を示すフローチャートである。3 is a flowchart illustrating an operation of a printer. 文字ファイルの印刷出力結果の一例を示す図である。It is a figure which shows an example of the print output result of a character file. 二値画像の一部を拡大した状態等(比較例)を示す図である。It is a figure which shows the state etc. (comparative example) which expanded a part of binary image. 並べ換え処理の一例について説明する図である。It is a figure explaining an example of a rearrangement process. 別の並べ換え処理について説明する図である。It is a figure explaining another rearrangement process. さらに別の並べ換え処理について説明する図である。It is a figure explaining another rearrangement process. 並べ換え処理を概念的に示す図である。It is a figure which shows the rearrangement process notionally. 並べ換え順序の変形例を示す図である。It is a figure which shows the modification of a rearrangement order. 並べ換え順序の変形例を示す図である。It is a figure which shows the modification of a rearrangement order.

符号の説明Explanation of symbols

1 プリントシステム
4 メディアドライブ
9 記録媒体
10 コントローラ
20 プリンタ
B 単位画素ブロック
NW ネットワーク
1 Print System 4 Media Drive 9 Recording Medium 10 Controller 20 Printer B Unit Pixel Block NW Network

Claims (4)

コンピュータに、
(a)二値画像における各単位画素ブロック内の複数の画素の画素値を所定の順序で読み出す動作を、前記二値画像において第1の方向に配列された複数の単位画素ブロックについて繰り返すことによって、前記二値画像における画素値の並べ換えを行う手順と、
(b)前記手順(a)で並べ換えられた画素値の配列に対して、所定の可逆圧縮手法を適用して圧縮を行う手順と、
を含む画像圧縮方法を実行させるためのプログラムであって、
前記単位画素ブロックは、前記第1の方向に直交する第2の方向において、複数の画素で構成される画素列を有することを特徴とするプログラム。
On the computer,
(a) By repeating an operation of reading pixel values of a plurality of pixels in each unit pixel block in the binary image in a predetermined order for a plurality of unit pixel blocks arranged in the first direction in the binary image. Reordering the pixel values in the binary image;
(b) a procedure for compressing the array of pixel values rearranged in the procedure (a) by applying a predetermined lossless compression method;
A program for executing an image compression method including:
The unit pixel block has a pixel column composed of a plurality of pixels in a second direction orthogonal to the first direction.
二値画像を圧縮する画像圧縮方法であって、
(a)二値画像における各単位画素ブロック内の複数の画素の画素値を所定の順序で読み出す動作を、前記二値画像において第1の方向に配列された複数の単位画素ブロックについて繰り返すことによって、前記二値画像における画素値の並べ換えを行うステップと、
(b)前記ステップ(a)で並べ換えられた画素値の配列に対して、所定の可逆圧縮手法を適用して圧縮を行うステップと、
を含み、
前記単位画素ブロックは、前記第1の方向に直交する第2の方向において、複数の画素で構成される画素列を有することを特徴とする画像圧縮方法。
An image compression method for compressing a binary image,
(a) By repeating an operation of reading pixel values of a plurality of pixels in each unit pixel block in the binary image in a predetermined order for a plurality of unit pixel blocks arranged in the first direction in the binary image. Reordering pixel values in the binary image;
(b) compressing the array of pixel values rearranged in step (a) by applying a predetermined lossless compression technique;
Including
2. The image compression method according to claim 1, wherein the unit pixel block has a pixel row composed of a plurality of pixels in a second direction orthogonal to the first direction.
二値画像を圧縮する画像圧縮装置であって、
二値画像における各単位画素ブロック内の複数の画素の画素値を所定の順序で読み出す動作を、前記二値画像において第1の方向に配列された複数の単位画素ブロックについて繰り返すことによって、前記二値画像における画素値の並べ換えを行う並べ換え手段と、
前記並べ換え手段によって並べ換えられた画素値の配列に対して、所定の可逆圧縮手法を適用して圧縮を行う圧縮手段と、
を備え、
前記単位画素ブロックは、前記第1の方向に直交する第2の方向において、複数の画素で構成される画素列を有することを特徴とする画像圧縮装置。
An image compression device for compressing a binary image,
By repeating the operation of reading the pixel values of a plurality of pixels in each unit pixel block in the binary image in a predetermined order for the plurality of unit pixel blocks arranged in the first direction in the binary image, Rearrangement means for rearranging pixel values in the value image;
Compression means for compressing an array of pixel values rearranged by the rearrangement means by applying a predetermined lossless compression technique;
With
The image compressing apparatus according to claim 1, wherein the unit pixel block includes a pixel column composed of a plurality of pixels in a second direction orthogonal to the first direction.
所定の可逆圧縮手法で圧縮された二値画像を伸張する画像伸張装置であって、
(a)前記所定の可逆圧縮手法に対応する伸張手法を用いて、前記圧縮された二値画像に対する伸張処理を行い、伸張処理後の画素列を生成する伸張手段と、
(b)前記伸張処理後の画素列を前記二値画像における各単位画素ブロック内の各所定位置に配置して並べ換える動作を繰り返すことによって、前記二値画像において第1の方向に配列された複数の単位画素ブロックを復元する並べ換え手段と、
を備え、
前記単位画素ブロックは、前記第1の方向に直交する第2の方向において、複数の画素で構成される画素列を有することを特徴とする画像伸張装置。
An image expansion device that expands a binary image compressed by a predetermined lossless compression method,
(a) using a decompression technique corresponding to the predetermined lossless compression technique, decompression means for performing a decompression process on the compressed binary image and generating a pixel string after the decompression process;
(b) The pixel row after the decompression process is arranged in the first direction in the binary image by repeating the operation of arranging and rearranging the pixel row at each predetermined position in each unit pixel block in the binary image. Reordering means for restoring a plurality of unit pixel blocks;
With
The image expansion apparatus according to claim 1, wherein the unit pixel block has a pixel column composed of a plurality of pixels in a second direction orthogonal to the first direction.
JP2004108995A 2004-04-01 2004-04-01 Image compression method,image compression device, image expanding device, and program Pending JP2005295307A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2004108995A JP2005295307A (en) 2004-04-01 2004-04-01 Image compression method,image compression device, image expanding device, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2004108995A JP2005295307A (en) 2004-04-01 2004-04-01 Image compression method,image compression device, image expanding device, and program

Publications (1)

Publication Number Publication Date
JP2005295307A true JP2005295307A (en) 2005-10-20

Family

ID=35327736

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2004108995A Pending JP2005295307A (en) 2004-04-01 2004-04-01 Image compression method,image compression device, image expanding device, and program

Country Status (1)

Country Link
JP (1) JP2005295307A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015154363A (en) * 2014-02-17 2015-08-24 株式会社リコー Image processing device, image processing method and image formation device
CN107026653A (en) * 2016-01-29 2017-08-08 松下知识产权经营株式会社 Compressed data structure and using its printed data compression method, printing process
CN117649420A (en) * 2023-11-14 2024-03-05 北京医百科技有限公司 Method and device for determining expansion domain of target area in image and electronic equipment

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015154363A (en) * 2014-02-17 2015-08-24 株式会社リコー Image processing device, image processing method and image formation device
CN107026653A (en) * 2016-01-29 2017-08-08 松下知识产权经营株式会社 Compressed data structure and using its printed data compression method, printing process
CN107026653B (en) * 2016-01-29 2021-03-23 松下知识产权经营株式会社 Compressed data structure, and print data compression method and print method using the same
CN117649420A (en) * 2023-11-14 2024-03-05 北京医百科技有限公司 Method and device for determining expansion domain of target area in image and electronic equipment

Similar Documents

Publication Publication Date Title
JP5432450B2 (en) Lossless color image data compression using entropy coding
JP4033836B2 (en) Compression of paletted color images using variable-length color codes
JP2949066B2 (en) Compression method, decompression method, parallel context modeler, parallel entropy coder, parallel entropy decoder, image compression device and image decompression device
JP4689545B2 (en) Data compression apparatus and data compression program
JP3814456B2 (en) Image processing apparatus and method
EP0260139A1 (en) Image processing
JP2005516554A6 (en) Compression of paletted color images using variable-length color codes
JPH10229492A (en) Method for image-processing operation for run length coding bit map and image processor to execute the method
US20110305385A1 (en) Image processing apparatus, image processing method, and computer-readable medium
JP3461309B2 (en) Huffman coded data compression device
JP3661520B2 (en) Image processing apparatus, image processing method, image forming apparatus, and recording medium recording program
JP2000138836A (en) Compressor for digital image including background pixels
JP4633576B2 (en) Data compression apparatus and data compression program
JP4610450B2 (en) Image processing apparatus for processing fixed length compressed image and packing data of attribute information
JP2005295307A (en) Image compression method,image compression device, image expanding device, and program
JP4173498B2 (en) Data compression apparatus and data compression program
JP3459704B2 (en) Image processing apparatus and method
JP4377351B2 (en) Data compression apparatus and data compression program
JP3559419B2 (en) Method and apparatus for decompressing compressed image data
JP4741317B2 (en) Data compression apparatus and data compression program
JP4629512B2 (en) Data compression apparatus and data compression program
JP4181147B2 (en) Data compression apparatus and data compression program
JP4633577B2 (en) Data compression apparatus and data compression program
JP4435586B2 (en) Data compression apparatus and data compression program
JP4131970B2 (en) Data compression apparatus and data compression program