JP4722681B2 - Compression processing device, compression processing device control method, compression processing control program, and computer-readable recording medium - Google Patents

Compression processing device, compression processing device control method, compression processing control program, and computer-readable recording medium Download PDF

Info

Publication number
JP4722681B2
JP4722681B2 JP2005342765A JP2005342765A JP4722681B2 JP 4722681 B2 JP4722681 B2 JP 4722681B2 JP 2005342765 A JP2005342765 A JP 2005342765A JP 2005342765 A JP2005342765 A JP 2005342765A JP 4722681 B2 JP4722681 B2 JP 4722681B2
Authority
JP
Japan
Prior art keywords
cell
cells
data
compression
address
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.)
Active
Application number
JP2005342765A
Other languages
Japanese (ja)
Other versions
JP2007150754A (en
Inventor
行雄 松田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Sharp Corp
Original Assignee
Sharp Corp
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 Sharp Corp filed Critical Sharp Corp
Priority to JP2005342765A priority Critical patent/JP4722681B2/en
Publication of JP2007150754A publication Critical patent/JP2007150754A/en
Application granted granted Critical
Publication of JP4722681B2 publication Critical patent/JP4722681B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、2次元に配列されたデータを圧縮処理する圧縮処理装置、圧縮処理方法、圧縮処理プログラム、およびコンピュータ読み取り可能な記録媒体に関するものである。   The present invention relates to a compression processing apparatus, a compression processing method, a compression processing program, and a computer-readable recording medium for compressing data arranged two-dimensionally.

プリンタドライバ等の画像処理システムにおいて、2次元画像データ(画像データ)を圧縮する際、注目画素をその周辺画素の状態によって予測し、予測結果に応じて算術符号化する方式がある。このような2次元画像データを圧縮するアルゴリズムとして、例えばJBIG(Joint Bi-level Image coding experts Group)圧縮が知られている(例えば、非特許文献1、2参照)。JBIG圧縮においては、2次元画像データを上から横1ラインずつ、左から右に走査して符号化対象となる単位であるセル(画素)を選択し、セルを一つずつ符号化して画像データの圧縮を行う。各セルを符号化する際には、符号化対象セル(対象セル)の付近にある幾つかの近傍セル(コンテクスト)を参照し、この近傍セルに対して、対象セルが出現する確率を用いて符号化を行う。コンテクストとは、所定の形状のテンプレートにより指定される、対象セルと所定の相対位置にある、対象セルの符号化に用いられる近傍セルのことである。図11は、JBIG方式の圧縮における2ラインの形状のテンプレート(2ラインテンプレート)の図である。図11では、太枠で囲まれたセルが対象セルであり、その周辺の斜線が記されたセルが近傍セル(コンテクスト)である。なお、図11のように、対象セルを太線で囲い、近傍セルには斜線を付ける記載の仕方は、本明細書中で説明する他の図でも同様に用いるものとする。   When compressing two-dimensional image data (image data) in an image processing system such as a printer driver, there is a method of predicting a target pixel according to the state of its surrounding pixels and performing arithmetic coding according to the prediction result. As an algorithm for compressing such two-dimensional image data, for example, JBIG (Joint Bi-level Image coding experts Group) compression is known (for example, see Non-Patent Documents 1 and 2). In JBIG compression, two-dimensional image data is scanned from left to right one line at a time from the top, cells (pixels) that are units to be encoded are selected, and the cells are encoded one by one. Perform compression. When encoding each cell, refer to several neighboring cells (contexts) in the vicinity of the encoding target cell (target cell), and use the probability that the target cell appears for this neighboring cell. Encoding is performed. The context is a neighboring cell that is specified by a template having a predetermined shape and is used for encoding the target cell at a predetermined relative position with respect to the target cell. FIG. 11 is a diagram of a 2-line template (2-line template) in JBIG compression. In FIG. 11, a cell surrounded by a thick frame is a target cell, and a cell with a diagonal line around it is a neighboring cell (context). Note that, as shown in FIG. 11, the description method in which the target cell is surrounded by a thick line and the neighboring cells are hatched is similarly used in other drawings described in this specification.

JBIG圧縮では、2ラインテンプレート又は3ラインテンプレートに基づいて読み取りを行うが、コンテクストが画像データの外側にはみ出して、近傍セルとして画像データの外にあるセルを参照しなければならない場合がある。図11に示す2ラインテンプレートを用いると、対象セルが、画像データの右端から2セル以内にある場合(図12(a))や、左端から4セル以内にある場合(図12(b))、あるいは画像の上端にある場合(図12(c))にはコンテクストが画像データの外側にはみ出してしまう。なお、図12(a)〜(c)において、Xが記載されたセルがデータが格納されたセル、「?」が記載されたセルが画像データから、はみ出してしまうセルである。また、太枠で囲まれたセルが対象セル、斜線のセルがコンテクストを成す近傍セルである。   In JBIG compression, reading is performed based on a two-line template or a three-line template, but there are cases where the context protrudes outside the image data and a cell outside the image data must be referred to as a neighboring cell. When the 2-line template shown in FIG. 11 is used, the target cell is within 2 cells from the right end of the image data (FIG. 12A), or is within 4 cells from the left end (FIG. 12B). Or, if it is at the upper end of the image (FIG. 12C), the context protrudes outside the image data. In FIGS. 12A to 12C, a cell in which X is written is a cell in which data is stored, and a cell in which “?” Is written is a cell that protrudes from the image data. Further, a cell surrounded by a thick frame is a target cell, and a hatched cell is a neighboring cell forming a context.

このように、コンテクストが画像データの外側にはみ出してしまい、近傍セルとして画像データの外にあるセルを参照しなければならない場合には、JBIG圧縮では画像データの外にある近傍セルを空白(0、ゼロ)であるとみなして圧縮を行う。例えば、対象セルの符号化において、コンテクストを参照する(読み取る)際に、図13に示すような処理が行われる。コンテクストが画像データからはみ出すか否かを検出し(S101)、はみ出さない場合(S101においてNO)、対象セルとコンテクストである近傍セルを読み出す(S102)。はみ出す場合には(S101においてYES)、対象セルの読み取りを行い(S103)、コンテクストである近傍セルのうち画像データからはみ出さないものを読み取り(S104)、コンテクストである近傍セルのうち画像データからはみ出す部分にゼロを代入する(S105)。   In this way, when the context protrudes outside the image data and a cell outside the image data must be referred to as a neighbor cell, JBIG compression leaves the neighbor cell outside the image data blank (0 , Zero), and compression is performed. For example, in encoding the target cell, when referring to (reading) the context, processing as shown in FIG. 13 is performed. It is detected whether or not the context protrudes from the image data (S101). If the context does not protrude (NO in S101), the neighboring cell that is the context with the target cell is read (S102). In the case of protruding (YES in S101), the target cell is read (S103), and the neighboring cells that are contexts that do not protrude from the image data are read (S104), and the neighboring cells that are contexts are read from the image data. Zero is substituted for the protruding portion (S105).

このように、画像データの外にある近傍セルを参照しなければならない場合には、上記のような処理が行われるため、JBIG圧縮をコンピュータ上で実行しようとすると、近傍セルが画像データの外にはみ出すかどうかを判定しながら符号化して圧縮を行なければならないため、圧縮速度が低下するという問題があった。   As described above, when it is necessary to refer to a neighboring cell outside the image data, the above processing is performed. Therefore, when JBIG compression is performed on the computer, the neighboring cell is outside the image data. There is a problem in that the compression speed decreases because it is necessary to encode and compress while determining whether or not to protrude.

上記問題を解決する方法として、圧縮しようとしている2次元画像データの両端に空白領域を設ける圧縮処理装置が知られている(例えば、特許文献1参照)。この装置では、図14(a)〜(c)に示すように、画像データの上側に横1ライン、左側に縦4ライン、右側に縦2ライン分のメモリを確保し、それらのメモリに0を入れる。換言すれば、像データの上側に横1ライン、左側に縦4ライン、右側に縦2ライン分の空白セルを設ける。このようにすることによって、対象セルが、画像データの右端から2セル以内にある場合(図14(a))や、左端から4セル以内にある場合(図14(b))や、画像の上端にある場合(図14(c))でも、特別な処理を行うことなく画像データの端のセルを符号化することができる。近傍をそのまま参照すれば、2次元画像データの両端に空白セルが設けられているために、特殊な処理をすることなく、正常に符号化を行うことができる。   As a method for solving the above problem, there is known a compression processing apparatus in which blank areas are provided at both ends of two-dimensional image data to be compressed (see, for example, Patent Document 1). In this apparatus, as shown in FIGS. 14A to 14C, memory for one horizontal line, four vertical lines on the left side, and two vertical lines on the right side is secured on the upper side of the image data. Insert. In other words, blank cells for one horizontal line, four vertical lines on the left side, and two vertical lines on the right side are provided above the image data. In this way, when the target cell is within 2 cells from the right end of the image data (FIG. 14A), within 4 cells from the left end (FIG. 14B), Even in the case of being at the upper end (FIG. 14C), the end cell of the image data can be encoded without performing special processing. If the neighborhood is referred to as it is, since blank cells are provided at both ends of the two-dimensional image data, encoding can be performed normally without performing special processing.

他方で、3次元セル構造を一筆書きで空間充填走査を行って、1次元的データに変換し、その空間上で他のセルを参照して圧縮を行う方法がある(例えば、特許文献2参照)。
特許第3622043号(2004年12月3日登録) 特開2002−122537号公報(2002年4月26日公開) ITU-T(International Telecommunication Union Telecommunication standardization sector) WHITE BOOK ディジタル静止画像圧縮符号化関連勧告書(財団法人 新日本ITU協会) 勧告T.82 WTSC-93 (WORLD TELECOMMUNICATION STANDARDIZATION CONFERENCE), Helsinki, 1-12 MARCH 1993
On the other hand, there is a method in which a three-dimensional cell structure is subjected to space-filling scanning with a single stroke, converted into one-dimensional data, and compressed by referring to other cells in the space (see, for example, Patent Document 2). ).
Patent No. 3622043 (Registered December 3, 2004) JP 2002-122537 A (published April 26, 2002) ITU-T (International Telecommunication Union Telecommunication standardization sector) WHITE BOOK Digital still image compression coding related recommendation (New Japan ITU Association) Recommendation T.82 WTSC-93 (WORLD TELECOMMUNICATION STANDARDIZATION CONFERENCE), Helsinki, 1-12 MARCH 1993

しかしながら、メモリに格納された2元画像データの端に空白領域を設ける場合、メモリ空間上に格納された画像データの横ライン毎に該ラインを挟むように空白セルを挿入しなければならない。そのためには、元の2次元画像を格納していたものとは別のメモリ領域を確保し、そのメモリ領域に対して、画像データの横ラインの両端を空白セル部分で挟みながら画像を1ラインずつコピーしていくなどの方法を取らなければならない。そのため、時間とメモリの無駄となる。さらに、画像を圧縮する際には、メモリ上の空白セルを圧縮しないように読み飛ばす必要があるため、これも時間の無駄となる。   However, when a blank area is provided at the end of the binary image data stored in the memory, a blank cell must be inserted so as to sandwich the line for each horizontal line of the image data stored in the memory space. For this purpose, a memory area different from the one storing the original two-dimensional image is secured, and one line of the image is stored in the memory area while sandwiching both ends of the horizontal line of the image data between blank cells. You must take a method such as copying one by one. This wastes time and memory. Further, when compressing an image, it is necessary to skip blank cells in the memory without being compressed, and this also wastes time.

また他方で、一筆書きにして空間充填走査を行う場合には、走査に時間がかかり、また、空間充填走査を行ったデータを格納するメモリ領域が必要になる。その上、空間充填走査によって作られた1次元データ上では、近傍セルの決定に複雑な計算が必要となる。具体的に説明すると、セルの符号化を行う前に、図15に示すように、2次元画像データが与えられると(S111)、空間補充アルゴリズムに沿って画像データのセルの再配置(空間補充走査)を行う(S112)。この空間補充走査は、画像データの全セルが一筆書きとなるように、例えば、図16(a)の点線で示すようにセルを連続させて配置させる。つまり、図16(b)に示すように、図16(a)に示す2次元画像データにおける奇数行の横ライン(図16(a)では右から左への連続したセル、つまり、白抜きの矢印に対応するセルで)の次に、偶数行の横ライン(図16(a)では右から左への連続したセル)を逆に(左から右へ連続させて)なるよう格納させて1次元のデータにする。なお、図16(a)の四角いマス目ひとつひとつがセルである。図16(a)では、横ラインは4セルからなるが、図16(b)では1ラインが7セルからなっている。   On the other hand, when space filling scanning is performed with a single stroke, scanning takes time, and a memory area for storing the data subjected to space filling scanning is required. In addition, on one-dimensional data created by space-filling scanning, complicated calculations are required to determine neighboring cells. More specifically, prior to cell coding, as shown in FIG. 15, when two-dimensional image data is provided (S111), the rearrangement of image data cells (spatial replenishment) is performed according to a space replenishment algorithm. Scanning) is performed (S112). In this space supplement scanning, for example, the cells are continuously arranged as shown by the dotted line in FIG. 16A so that all the cells of the image data are drawn with one stroke. That is, as shown in FIG. 16B, the odd-numbered horizontal lines in the two-dimensional image data shown in FIG. 16A (continuous cells from right to left in FIG. 16A, ie, white lines) Next to even lines (in the cell corresponding to the arrow), the horizontal lines (continuous cells from right to left in FIG. 16A) are stored so as to be reversed (continuous from left to right). Dimensional data. Note that each square cell in FIG. 16A is a cell. In FIG. 16A, the horizontal line consists of 4 cells, whereas in FIG. 16B, one line consists of 7 cells.

このように空間補充走査が行われて1次元データとなったデータについて、符号化するときには、次のようにしなければならない。ここでは、図17(a)に示す2次元画像データについて空間補充走査が行われ、図17(b)に示す1次元データになったものとする。図17(a)〜(d)において、各四角いマス目ひとつひとつがセルである。図17(b)に示す1次元データにおいて、あるアドレスxの対象セルを符号化する際に参照する近傍セルのアドレスは、次にように決める。対象セルが図17(a)に示すように、元の画像データでは偶数行の横ラインの右端セルである場合には、コンテクストを成す近傍セルのアドレスは、それぞれ、x+1、x+2、x+3、x+4、x+((元の画像データ横ラインのセル数)−1)、x+((元の画像データ横ラインのセル数)−2)、x−1、x−2、x−3、x−4となる。ここでは、図7(a)に示すように、元の画像データの横ラインのセル数(ライン幅)は12である。   Thus, when encoding the data which has been subjected to the spatial supplement scanning and becomes one-dimensional data, the following must be performed. Here, it is assumed that the spatial supplement scanning is performed on the two-dimensional image data shown in FIG. 17A to become one-dimensional data shown in FIG. In FIGS. 17A to 17D, each square cell is a cell. In the one-dimensional data shown in FIG. 17B, the address of a neighboring cell to be referred to when the target cell at a certain address x is encoded is determined as follows. As shown in FIG. 17A, when the target cell is the rightmost cell of the horizontal line of the even row in the original image data, the addresses of neighboring cells forming the context are x + 1, x + 2, x + 3, and x + 4, respectively. , X + ((number of cells in original image data horizontal line) -1), x + ((number of cells in original image data horizontal line) -2), x-1, x-2, x-3, x-4. It becomes. Here, as shown in FIG. 7A, the number of cells (line width) of the horizontal lines of the original image data is 12.

また、図17(c)に示す2次元画像データについて空間補充走査が行われ、図17(d)に示す1次元データになったものとする。図17(d)に示す1次元データにおいて、あるアドレスxの対象セルを符号化する際に参照する近傍セルのアドレスは、次にように決める。対象セルが図17(c)に示すように、元の画像データの偶数行の横ライン上であり、右端から2セルより内側かつ、左端から4セルより内側にある場合には、次のようになる。つまり、コンテクストを成す近傍セルのアドレスは、x+1、x+2、x+3、x+4、x−(元の画像データにおいて、対象セルが存在する横ラインの右端セルから対象セル右隣のセルまでのセル数(右端セルと右隣のセルを含む)、図17(c)を用いて説明すると、ライン2と記載された白抜き矢印の先頭のセルから対象セル右隣のセルまでのセル数、以降では右端セルから右隣セルまでのセル数と呼ぶ)×2+1、x−(右端のセルから右隣セルまでのセル数)×2、x−(右端のセルから右隣セルまでのセル数)×2−1、x−(右端のセルから右隣セルまでのセル数)×2−2、x−(右端のセルから右隣セルまでのセル数)×2−3、x−(右端のセルから右隣セルまでのセル数)×2−4となる。図17(c)では、右端セルから右隣セルまでのセル数は、3である。   Further, it is assumed that the spatial supplement scanning is performed on the two-dimensional image data shown in FIG. 17C, and the one-dimensional data shown in FIG. In the one-dimensional data shown in FIG. 17D, the address of the neighboring cell to be referred to when the target cell at a certain address x is encoded is determined as follows. As shown in FIG. 17C, when the target cell is on the horizontal line of the even-numbered row of the original image data and is located inside the 2 cells from the right end and inside the 4 cells from the left end, the following is performed. become. That is, the addresses of neighboring cells forming the context are x + 1, x + 2, x + 3, x + 4, x− (in the original image data, the number of cells from the right end cell of the horizontal line where the target cell exists to the cell right next to the target cell ( 17 (c), the number of cells from the head cell of the white arrow described as line 2 to the cell to the right of the target cell, and the right edge thereafter. (Referred to as the number of cells from the cell to the right adjacent cell) × 2 + 1, x− (the number of cells from the rightmost cell to the right adjacent cell) × 2, x− (the number of cells from the rightmost cell to the right adjacent cell) × 2 −1, x− (the number of cells from the rightmost cell to the right neighbor cell) × 2-2, x− (the number of cells from the rightmost cell to the right neighbor cell) × 2−3, x− (from the rightmost cell) The number of cells up to the right adjacent cell) × 2−4. In FIG. 17C, the number of cells from the right end cell to the right adjacent cell is three.

このように、一筆書きの空間充填走査によって作られた一次元データ上で、JBIGの2ラインテンプレートのような固定されたコンテクストの参照を行おうとした場合には、元の2次元画像データにおいてどこにあるセル(例えば右端セル)であるかを認識して近傍セルを決定する必要がある。対象セルが元の2次元画像データにおける位置によって、近傍セルのアドレスの決め方が異なるため、複雑な計算をおこなわなければならない。これらのことから、一筆書きの空間充填走査を用いた符号化圧縮処理では、符号化処理の時間がかかり、圧縮速度が遅くなる。   Thus, when trying to refer to a fixed context such as JBIG's two-line template on one-dimensional data created by space-filling scanning with a single stroke, where in the original two-dimensional image data? It is necessary to determine a neighboring cell by recognizing whether it is a certain cell (for example, the rightmost cell). Since the method of determining the address of the neighboring cell differs depending on the position of the target cell in the original two-dimensional image data, a complicated calculation must be performed. For these reasons, in the encoding compression processing using the one-stroke space filling scan, it takes time for the encoding processing, and the compression speed becomes slow.

本発明は、上記の問題点に鑑みてなされたものであり、その目的は、少ない記憶容量にて高速で符号化圧縮処理できる圧縮処理装置、圧縮処理方法、圧縮処理装置制御プログラム、およびコンピュータ読み取り可能な記録媒体を実現することにある。   The present invention has been made in view of the above-described problems, and an object of the present invention is to provide a compression processing apparatus, a compression processing method, a compression processing apparatus control program, and a computer reading that can perform high-speed encoding / compression processing with a small storage capacity. It is to realize a possible recording medium.

本発明に係る圧縮処理装置は、上記課題を解決するために、セルが2次元に配列されている圧縮対象データを、符号化対象セルを順次選択しながら符号化することによって圧縮する圧縮処理装置において、上記圧縮対象データでのセルが成す各行では同一方向に連続し、かつ、隣接する各2行では一方の行の末尾のセルが他方の行の先頭のセルと連続するようにセルのアドレスを管理する、アドレス管理手段と、符号化対象セルを、アドレス順に、当該符号化対象セルのアドレスにより決定される所定の相対アドレス位置にある複数の近傍セルに基づき符号化する符号化手段と、を備えたことを特徴としている。   In order to solve the above-described problem, a compression processing apparatus according to the present invention compresses compression target data in which cells are two-dimensionally arranged by encoding while sequentially selecting encoding target cells. The cell addresses are such that each row of cells in the data to be compressed is continuous in the same direction, and in each adjacent two rows, the last cell in one row is continuous with the first cell in the other row. Address management means, and encoding means for encoding the encoding target cell based on a plurality of neighboring cells at a predetermined relative address position determined by the address of the encoding target cell in the address order, It is characterized by having.

本発明に係る圧縮処理装置の制御方法は、上記課題を解決するために、セルが2次元に配列されている圧縮対象データを、符号化対象セルを順次選択しながら符号化することによって圧縮する圧縮処理装置の制御方法において、上記圧縮対象データでのセルが成す各行では同一方向に連続し、かつ、隣接する各2行では一方の行の末尾のセルが他方の行の先頭のセルと連続するようにセルのアドレスを管理する、アドレス管理ステップと、符号化対象セルを、アドレス順に、当該符号化対象セルのアドレスにより決定される所定の相対アドレス位置にある複数の近傍セルに基づき符号化する符号化ステップと、を含むことを特徴としている。   In order to solve the above-described problem, the compression processing apparatus control method according to the present invention compresses the compression target data in which the cells are arranged in two dimensions by sequentially selecting the encoding target cells. In the control method of the compression processing apparatus, each row formed by the cells of the compression target data is continuous in the same direction, and in each adjacent two rows, the last cell of one row is continuous with the first cell of the other row. An address management step for managing the address of the cell, and encoding the encoding target cell based on a plurality of neighboring cells at a predetermined relative address position determined by the address of the encoding target cell in the address order And an encoding step.

上記構成および上記方法によると、セルを単位とし当該セルが2次元に配列されている圧縮対象データでは、セルが成す各行では同一方向に連続し、かつ、隣接する各2行では一方の行の末尾のセルが他方の行の先頭のセルと連続するようセルのアドレスが管理される。これは、圧縮処理装置において、セルが2次元に配列されているデータを受領するモジュールで、2次元に配列されたデータの受け取り順通りに記憶領域に格納して作成したデータにおいて(ページデータなど)、元の2次元に配列されたデータのセルが、各行では同一方向に連続し、かつ、隣接する各2行では一方の行の末尾のセルが他方の行の先頭のセルと連続するようセルのアドレスを管理する、つまり、1次元的に記憶領域上で管理する、ことを利用している。   According to the above configuration and the above method, in compression target data in which cells are arranged in units of cells, the rows formed by the cells are continuous in the same direction, and each of the two adjacent rows has one row. The cell address is managed so that the last cell is continuous with the first cell in the other row. This is a module that receives data in which cells are arranged two-dimensionally in a compression processing device. In data created by storing data in a storage area in the order in which data arranged in two dimensions is received (such as page data) ) The original two-dimensionally arranged data cells are continuous in the same direction in each row, and in each adjacent two rows, the last cell in one row is continuous with the first cell in the other row. It uses the management of cell addresses, that is, management in a one-dimensional storage area.

そして、符号化対象セルを圧縮する際には、符号化対象セルを、アドレス順に、符号化対象セルのアドレスにより決定される所定の相対アドレス位置にある複数の近傍セルに基づいて符号化する。ここで、「所定の相対アドレス位置」とは、符号化対象セルのアドレスに対して、一意に決まるアドレスの位置のことである。具体的に説明すると、例えば、符号化対象セルのアドレスがnであるとする。そして、近傍セルのアドレスは、例えば、n−1、n−2、n−3、n−4、n−(圧縮対象データの1行におけるセル数)+2、n−(圧縮対象データの1行におけるセル数)+1、n−(圧縮対象データの1行におけるセル数)、n−(圧縮対象データの1行におけるセル数)−1、n−(圧縮対象データの1行におけるセル数)−2、n−(圧縮対象データの1行におけるセル数)−3、で求められるものとする。圧縮対象データの1行におけるセル数は、圧縮対象データで一つに決まっている。この場合、nとは別のアドレスの符号化対象セルであっても、そのアドレスを上記nに当てはめることで、別のアドレスの符号化対象セルの近傍セルのアドレスを求めることができる。このように、符号化対象セルがどのアドレスを有するセルであっても、常に同じ計算により求まるセルを、当該符号化対象セルのアドレスにより決定される所定の相対アドレス位置にある近傍セル、という。   When the encoding target cell is compressed, the encoding target cell is encoded based on a plurality of neighboring cells at a predetermined relative address position determined by the address of the encoding target cell in the order of addresses. Here, the “predetermined relative address position” is an address position uniquely determined with respect to the address of the encoding target cell. Specifically, for example, it is assumed that the address of the encoding target cell is n. The addresses of neighboring cells are, for example, n-1, n-2, n-3, n-4, n- (number of cells in one row of compression target data) +2, n- (one row of compression target data). Number of cells) +1, n- (number of cells in one row of compression target data), n- (number of cells in one row of compression target data) -1, n- (number of cells in one row of compression target data)- 2, n− (number of cells in one row of compression target data) −3. The number of cells in one row of the compression target data is determined to be one for the compression target data. In this case, even if the encoding target cell has an address different from n, the address of a neighboring cell of the encoding target cell having another address can be obtained by applying the address to the above-described n. In this way, a cell that is always obtained by the same calculation regardless of which address the encoding target cell has is called a neighboring cell at a predetermined relative address position determined by the address of the encoding target cell.

従来では、JBIG圧縮での2ラインテンプレートを使用するように、符号化対象セルの相対位置にある近傍セルを用いて符号化する場合には、圧縮対象データの例えば右端を越えてアクセスを行う場合があったので、画像データの左右に空白のセルが必要であった。この場合、画像データに対して、空白セルを追加しようとすると、一度受け取った画像データをコピーしながら空白セルを追加していくか、もしくは、受け取るときに1ラインずつデータを受け取り空白セルを追加しなければならない。空白セルを追加するためには、最初に画像データを記憶領域に格納する際に行わなければならず、圧縮を行うモジュール単独で行うことはできない。   Conventionally, when encoding is performed using a neighboring cell at a relative position of the encoding target cell so as to use a two-line template in JBIG compression, when the data to be compressed is accessed beyond the right end, for example. Therefore, blank cells were necessary on the left and right of the image data. In this case, when trying to add a blank cell to the image data, the blank cell is added while copying the received image data, or when receiving, the data is received line by line and a blank cell is added. Must. In order to add a blank cell, it must be performed when image data is first stored in a storage area, and cannot be performed by a module that performs compression alone.

しかし、本発明では、空白セルが不要である。そして、本発明の上記構成および上記方法では、近傍セルに基づいて符号化を行う際に、符号化対象セルのアドレスに基づき決定される所定の相対アドレス位置にある複数の近傍セルを読み出すので、近傍セルが画像データからはみ出すようなことはない。これは、本発明では、例えば、セルを単位とし当該セルが2次元に配列されている圧縮対象データにおける右端のセルのアドレスは、次の行の先頭である左端のセルのアドレスに連続して管理される。そのため、セルが2次元に配列された圧縮対象データにおいて、近傍セルとしてアクセスする部分が圧縮対象データの右端のセルよりはみ出す場合には、はみ出してアクセスしようとしている行より一つ下の行の左端にあるセルにアクセスして、近傍セルとして読み出することができる。そのため、圧縮対象データが格納されるだけの少ない記憶容量でも、不正なアクセスを行ったり、本来の圧縮結果とは異なる圧縮結果になってしまうといった、不具合は発生しない。   However, the present invention does not require a blank cell. In the configuration and the method of the present invention, when performing encoding based on neighboring cells, a plurality of neighboring cells at a predetermined relative address position determined based on the address of the encoding target cell are read. Neighboring cells do not protrude from the image data. In the present invention, for example, the address of the rightmost cell in the compression target data in which the cell is two-dimensionally arranged as a unit is continuous with the address of the leftmost cell that is the head of the next row. Managed. Therefore, in the data to be compressed in which cells are arranged two-dimensionally, if the part accessed as a neighbor cell protrudes from the rightmost cell of the data to be compressed, the left end of the line immediately below the line to be accessed by protruding. Can be read out as neighboring cells. For this reason, even if the storage capacity is small enough to store the compression target data, there is no problem such as illegal access or a compression result different from the original compression result.

このように、本発明の上記構成および上記方法によると、符号化に使用する記憶容量を削減できるとともに、空白セルを符号化しないように空白セルを読み飛ばす処理が不要となるため、その分の高速化を図ることができる。   As described above, according to the configuration and the method of the present invention, it is possible to reduce the storage capacity used for encoding, and it is not necessary to skip blank cells so as not to encode blank cells. The speed can be increased.

また、従来で、2次元データを一筆書きにして空間充填走査をして1次元データに変換してから符号化を行う場合には、走査に時間がかかり、また、空間充填走査を行ってできた1次元データを格納するメモリ領域が必要であった。その上、空間充填走査によって作られた1次元データ上では、近傍セルの決定に複雑な計算が必要であった。これは、一筆書きの空間充填走査によって作られた1次元データ上で、JBIGの2ラインテンプレートのような固定された近傍形の参照を行おうとした場合には、元の2次元画像データにおいて画像端であることを認識する必要があったからである。   Conventionally, when encoding is performed after two-dimensional data is written in one stroke and space-filled scanning is performed and converted into one-dimensional data, scanning takes time, and space-filling scanning can be performed. In addition, a memory area for storing one-dimensional data is necessary. In addition, on one-dimensional data created by space-filling scanning, complicated calculations are required for determining neighboring cells. This is because, when one-dimensional data created by one-stroke space-filling scanning is to be referred to a fixed neighborhood shape such as JBIG's two-line template, the image in the original two-dimensional image data is used. It was because it was necessary to recognize that it was an end.

しかし、上記本発明によると、符号化には、符号化対象セルに対して上記のように、符号化対象セルのアドレスに基づき決定される所定の相対アドレス位置にある複数の近傍セルを用いるだけでよく、元のセルを単位として当該セルが2次元に配列されている圧縮対象データにおける符号化対象セルの位置を認識して、位置毎にセルのアドレスを求める計算を変える、といった必要はない。よって、近傍セルのアドレスを容易に求めることができ近傍セルの読み出しが容易になる。また、空間充填走査も必要ない。そのため、これらの分、圧縮処理の高速化を図ることができる。本発明においては、一筆書きでの空間充填走査を行う必要が無く、また、空間充填走査を行ってできた1次元データを格納する必要も無く、圧縮モジュールのみで対応することができる。   However, according to the present invention, for encoding, only a plurality of neighboring cells at predetermined relative address positions determined based on the address of the encoding target cell are used for the encoding target cell as described above. There is no need to recognize the position of the encoding target cell in the compression target data in which the cell is two-dimensionally arranged in units of the original cell and change the calculation for obtaining the cell address for each position. . Therefore, the address of the neighboring cell can be easily obtained, and reading of the neighboring cell is facilitated. Also, no space filling scan is required. Therefore, the speed of the compression process can be increased by these amounts. In the present invention, it is not necessary to perform space-filling scanning with a single stroke, and it is not necessary to store one-dimensional data obtained by performing space-filling scanning.

以上のように、上記構成および上記方法によると、セルを単位とし当該セルが2次元に配列されている圧縮対象データを圧縮する際に、圧縮対象データの左右端において近傍セルが圧縮対象データ外にはみ出すかどうかの判定をする必要もなければ、画像データの左右端どちらにも空白セル領域を設ける必要もない。そのため、このような操作の必要がなく、与えられたセルを単位とし当該セルが2次元に配列されているデータをそのまま圧縮することが可能である。よって、少ない記憶容量で、高速で圧縮処理することができる。   As described above, according to the configuration and the method described above, when compressing compression target data in which the cell is a unit and the cell is arranged two-dimensionally, neighboring cells are excluded from the compression target data at the left and right ends of the compression target data. It is not necessary to determine whether or not to protrude, and it is not necessary to provide blank cell regions on both the left and right ends of the image data. Therefore, there is no need for such an operation, and it is possible to compress the data in which the given cell is arranged in two dimensions in units of a given cell as it is. Therefore, compression processing can be performed at high speed with a small storage capacity.

本発明に係る圧縮処理装置では、上記構成に加え、空白セルからなる空白データに続けて上記圧縮対象データを記録領域に格納するデータ格納手段を備え、上記アドレス管理手段は、空白データの各セルが連続し、かつ、空白データの末尾のセルが上記圧縮対象データの先頭のセルに続くようにセルのアドレスを管理してもよい。   In addition to the above configuration, the compression processing apparatus according to the present invention further comprises data storage means for storing the compression object data in a recording area following the blank data consisting of blank cells, and the address management means includes each cell of blank data. And the address of the cell may be managed so that the last cell of the blank data follows the first cell of the compression target data.

上記構成によると、圧縮対象データの前に、空白セルよりなる空白データが記憶領域に格納される。このとき、空白データは、各セルが連続し、かつ、空白データの末尾のセルが圧縮対象データの先頭のセルと連続するように、アドレスが管理される。そのため、圧縮対象データの最上部の行を成すセルを符号化するときに、近傍セルが空白セルを超えた外にはみ出すことがない。よって、圧縮対象データの最上部の符号化対象セルであっても、容易に近傍セルの取得を行いこの近傍セルに基づき符号化を行うことができ、特殊な処理をする必要がない。   According to the above configuration, blank data composed of blank cells is stored in the storage area before the data to be compressed. At this time, the address of blank data is managed so that each cell is continuous and the last cell of the blank data is continuous with the first cell of the compression target data. For this reason, when the cell forming the uppermost row of the compression target data is encoded, the neighboring cell does not protrude beyond the blank cell. Therefore, even in the uppermost encoding target cell of the compression target data, a neighboring cell can be easily obtained and encoded based on this neighboring cell, and there is no need for special processing.

本発明に係る圧縮処理装置では、上記構成に加え、上記データ格納手段は、上記符号化手段が、上記圧縮対象データにおける最初に符号化する符号化対象セルの符号化に用いる近傍セルを確保できる数だけ、上記空白セルを格納してもよい。   In the compression processing apparatus according to the present invention, in addition to the above configuration, the data storage means can secure a neighboring cell used for encoding the encoding target cell to be encoded first in the compression target data. The blank cells may be stored in the number.

上記構成によると、空白セルの数が、上記符号化手段が上記圧縮対象データにおける最初に符号化する符号化対象セルの符号化に用いる近傍セルを確保できる数だけ、あるということは、符号化時に少なくとも1度は読み出される空白セルのみがあるということである。そのため、符号化に必要な記憶容量だけを最小限に留めて記憶領域に格納することができる。よって、符号化に使用する記憶容量を抑えることができる。   According to the above configuration, the number of blank cells is the same as the number of neighboring cells that can be used for encoding the encoding target cell to be encoded first in the compression target data by the encoding means. Sometimes there are only blank cells that are read at least once. For this reason, only the storage capacity necessary for encoding can be stored in the storage area while minimizing the storage capacity. Therefore, the storage capacity used for encoding can be suppressed.

本発明に係る圧縮処理装置では、上記構成に加え、上記圧縮対象データは画像データであり、上記アドレス管理手段は、上記セルとして当該画像データの画素のアドレスを管理してもよい。   In the compression processing apparatus according to the present invention, in addition to the above configuration, the compression target data may be image data, and the address management unit may manage the address of the pixel of the image data as the cell.

上記構成によると、画素からなる画像データを、各行では同一方向に連続し、かつ、隣接する各2行では一方の行の末尾の画素が他方の行の先頭の画素と連続するよう画素のアドレスを管理し、符号化対象画素を、アドレス順に、それぞれ、符号化対象画素のアドレスに基づき決定される所定の相対アドレス位置にある複数の近傍画素を参照に符号化して、画像データを圧縮する。よって、少ない記憶容量で高速に画像データを圧縮することができる。   According to the above configuration, the pixel address is such that image data consisting of pixels is continuous in the same direction in each row, and in each adjacent two rows, the last pixel in one row is continuous with the first pixel in the other row. The encoding target pixel is encoded with reference to a plurality of neighboring pixels at predetermined relative address positions determined based on the address of the encoding target pixel in the order of addresses, and the image data is compressed. Therefore, image data can be compressed at high speed with a small storage capacity.

ここで、セルは、1画素に対応するのではなく、例えば2画素に対応してもよい。もちろん、圧縮対象データは、画像データに限定されず、セルを単位とし当該セルが2次元に配列されているデータであれば、どのようなものであってもかまわない。また、セルは、圧縮対象データを符号化対象の単位に分けられるものであればどのようなものであってもかまわない。   Here, the cell may not correspond to one pixel but may correspond to, for example, two pixels. Of course, the compression target data is not limited to image data, and any data may be used as long as the data is obtained by arranging the cells in units of cells in two dimensions. The cell may be any cell as long as the data to be compressed can be divided into units to be encoded.

また、本発明に係る圧縮処理装置は、コンピュータによって実現してもよく、この場合には、コンピュータを上記圧縮処理装置における上記各手段として動作させることにより上記圧縮処理装置をコンピュータにて実現させる圧縮処理装置制御プログラム、及びその圧縮処理装置制御プログラムを記録したコンピュータ読み取り可能な記録媒体も、本発明の範疇に入る。   In addition, the compression processing apparatus according to the present invention may be realized by a computer. In this case, the compression processing apparatus is realized by the computer by causing the computer to operate as each unit in the compression processing apparatus. A processing apparatus control program and a computer-readable recording medium recording the compression processing apparatus control program also fall within the scope of the present invention.

これらの構成によれば、圧縮処理装置制御プログラムを、コンピュータに読み取り実行させることによって、上記圧縮処理装置と同一の作用効果を実現することができる。   According to these configurations, the same operational effects as those of the compression processing device can be realized by causing the computer to read and execute the compression processing device control program.

本発明に係る圧縮処理装置は、以上のように、上記圧縮対象データでのセルが成す各行では同一方向に連続し、かつ、隣接する各2行では一方の行の末尾のセルが他方の行の先頭のセルと連続するようにセルのアドレスを管理する、アドレス管理手段と、符号化対象セルを、アドレス順に、当該符号化対象セルのアドレスに基づき決定される所定の相対アドレス位置にある複数の近傍セルを用いて符号化する符号化手段とを備えている。   As described above, the compression processing apparatus according to the present invention is continuous in the same direction in each row formed by the cells of the compression target data, and the last cell in one row is the other row in each of two adjacent rows. Address management means for managing the address of the cell so as to be continuous with the first cell of the cell, and a plurality of encoding target cells in a predetermined relative address position determined based on the address of the encoding target cell in the address order Encoding means for encoding using the neighboring cells.

上記構成によると、セルを単位とし当該セルが2次元に配列されている圧縮対象データでは、セルが成す各行では同一方向に連続し、かつ、隣接する各2行では一方の行の末尾のセルが他方の行の先頭のセルと連続するようセルのアドレスが管理される。これは、圧縮処理装置において、セルが2次元に配列されているデータを受領するモジュールで、2次元に配列されたデータの受け取り順通りに記憶領域に格納して作成したデータにおいて(ページデータなど)、元の2次元に配列されたデータのセルが、各行では同一方向に連続し、かつ、隣接する各2行では一方の行の末尾のセルが他方の行の先頭のセルと連続するようセルのアドレスを管理する、つまり、1次元的に記憶領域上で管理する、ことを利用している。   According to the above configuration, in data to be compressed in which cells are arranged in two dimensions in units of cells, each row formed by the cells is continuous in the same direction, and each adjacent two rows are cells at the end of one row. Cell addresses are managed so that is continuous with the first cell in the other row. This is a module that receives data in which cells are arranged two-dimensionally in a compression processing device. In data created by storing data in a storage area in the order in which data arranged in two dimensions is received (such as page data) ) The original two-dimensionally arranged data cells are continuous in the same direction in each row, and in each adjacent two rows, the last cell in one row is continuous with the first cell in the other row. It uses the management of cell addresses, that is, management in a one-dimensional storage area.

そして、符号化対象セルを圧縮する際には、符号化対象セルを、アドレス順に、符号化対象セルのアドレスに基づき決定される所定の相対アドレス位置にある複数の近傍セルに基づいて符号化する。ここで、「所定の相対アドレス位置」とは、符号化対象セルのアドレスに対して、一意に決まるアドレスの位置のことである。このように、符号化対象セルがどのアドレスを有するセルであっても、常に同じ計算により求まるセルを、当該符号化対象セルのアドレスにより決定される所定の相対アドレス位置にある近傍セル、という。   When the encoding target cell is compressed, the encoding target cell is encoded based on a plurality of neighboring cells at predetermined relative address positions determined based on the address of the encoding target cell in the order of addresses. . Here, the “predetermined relative address position” is an address position uniquely determined with respect to the address of the encoding target cell. In this way, a cell that is always obtained by the same calculation regardless of which address the encoding target cell has is called a neighboring cell at a predetermined relative address position determined by the address of the encoding target cell.

上記構成では、空白セルが不要である。そして、上記構成では、近傍セルに基づいて符号化を行う際に、符号化対象セルのアドレスに基づき決定される所定の相対アドレス位置にある複数の近傍セルを読み出すので、近傍セルが画像データからはみ出すようなことはない。これは、本発明の上記構成では、例えば、セルを単位とし当該セルが2次元に配列されている圧縮対象データにおける右端のセルのアドレスは、次の行の先頭である左端のセルのアドレスに連続して管理される。そのため、セルを単位とし当該セルが2次元に配列されている圧縮対象データにおいて、近傍セルとしてアクセスする部分が圧縮対象データの右端のセルよりはみ出す場合には、はみ出してアクセスしようとしている行より一つ下の行の左端にあるセルにアクセスして、近傍セルとして読み出することができる。そのため、圧縮対象データが格納されるだけの少ない記憶容量でも、不正なアクセスを行ったり、本来の圧縮結果とは異なる圧縮結果になってしまうといった、不具合は発生しない。   In the above configuration, no blank cell is required. In the above configuration, when encoding is performed based on the neighboring cell, a plurality of neighboring cells at a predetermined relative address position determined based on the address of the encoding target cell are read, so the neighboring cell is read from the image data. There is no such thing as protruding. This is because, in the above configuration of the present invention, for example, the address of the rightmost cell in the compression target data in which the cell is arranged in two dimensions is the address of the leftmost cell that is the head of the next row. Managed continuously. For this reason, in the compression target data in which the cells are arranged in two dimensions in units of cells, if the part accessed as a neighboring cell protrudes from the rightmost cell of the compression target data, it is one more than the line that is to be accessed. The cell at the left end of the next row can be accessed and read as a neighbor cell. For this reason, even if the storage capacity is small enough to store the compression target data, there is no problem such as illegal access or a compression result different from the original compression result.

このように、本発明の上記構成によると、符号化に使用する記憶容量を削減できるとともに、空白セルを符号化しないように空白セルを読み飛ばす処理が不要となるため、その分の高速化を図ることができる。   As described above, according to the above configuration of the present invention, the storage capacity used for encoding can be reduced, and the process of skipping blank cells so as not to encode blank cells is not required. Can be planned.

また、本発明の上記構成によると、符号化には、符号化対象セルに対して上記のように、符号化対象セルのアドレスに基づき決定される所定の相対アドレス位置にある複数の近傍セルを用いるだけでよく、元のセルを単位として当該セルが2次元に配列されている圧縮対象データにおける符号化対象セルの位置を認識して、位置毎にセルのアドレスを求める計算を変える、といった必要はない。よって、近傍セルのアドレスを容易に求めることができ近傍セルの読み出しが容易になる。また、空間充填走査も必要ない。そのため、これらの分、圧縮処理の高速化を図ることができる。本発明においては、一筆書きでの空間充填走査を行う必要が無く、また、空間充填走査を行ってできた1次元データを格納する必要も無く、圧縮モジュールのみで対応することができる。   Further, according to the above configuration of the present invention, for the encoding, a plurality of neighboring cells at a predetermined relative address position determined based on the address of the encoding target cell as described above are encoded. It is only necessary to use it, and it is necessary to recognize the position of the encoding target cell in the compression target data in which the cell is arranged in two dimensions with the original cell as a unit, and to change the calculation for obtaining the cell address for each position. There is no. Therefore, the address of the neighboring cell can be easily obtained, and reading of the neighboring cell is facilitated. Also, no space filling scan is required. Therefore, the speed of the compression process can be increased by these amounts. In the present invention, it is not necessary to perform space-filling scanning with a single stroke, and it is not necessary to store one-dimensional data obtained by performing space-filling scanning.

以上のように、本発明の上記構成によると、セルを単位とし当該セルが2次元に配列されている圧縮対象データを圧縮する際に、圧縮対象データの左右端において近傍セルが圧縮対象データ外にはみ出すかどうかの判定をする必要もなければ、画像データの左右端どちらにも空白セル領域を設ける必要もない。そのため、このような操作の必要がなく、与えられたセルを単位とし当該セルが2次元に配列されているデータをそのまま圧縮することが可能である。よって、少ない記憶容量で、高速で圧縮処理することができる。   As described above, according to the above configuration of the present invention, when compressing the compression target data in which the cell is arranged in units of two cells, neighboring cells are excluded from the compression target data at the left and right ends of the compression target data. It is not necessary to determine whether or not to protrude, and it is not necessary to provide blank cell regions on both the left and right ends of the image data. Therefore, there is no need for such an operation, and it is possible to compress the data in which the given cell is arranged in two dimensions in units of a given cell as it is. Therefore, compression processing can be performed at high speed with a small storage capacity.

本発明の一実施形態について図1〜図10に基づいて説明すると以下の通りである。   One embodiment of the present invention is described below with reference to FIGS.

本実施形態の圧縮処理装置1は、2次元で示される画像データ(圧縮対象データ)について、各セル(画素)を算術符号化することで、圧縮し、それによって得られた圧縮画像データ(符号化データ)を出力する。ここで、セルは、1画素に対応するのではなく、例えば2画素に対応してもよい。もちろん、圧縮対象データは、2次元画像データに限定されず、セルを単位とし当該セルが2次元に配列されているデータであれば、どのようなものであってもかまわない。また、セルは、圧縮対象データを符号化対象の単位に分けられるものであればどのようなものであってもかまわない。   The compression processing apparatus 1 according to the present embodiment compresses each cell (pixel) by arithmetically encoding each cell (pixel) with respect to image data (compression target data) shown in two dimensions, and compressed image data (code) obtained thereby. Output). Here, the cell may not correspond to one pixel but may correspond to, for example, two pixels. Of course, the compression target data is not limited to two-dimensional image data, and any data may be used as long as the data is obtained by arranging the cells in units of cells. The cell may be any cell as long as the data to be compressed can be divided into units to be encoded.

圧縮処理装置1は、符号化対象セルを、コンテクストを成す近傍セルを参照して(読み出して)符号化を行う。読み出す近傍セルの決定については、後段に詳細に説明する。本実施形態の圧縮処理装置1における圧縮処理では、算術符号化が行われる。算術符号化では、符号化結果を0から1までの少数で表す。優勢確率シンボルとは、符号化対象セルの近傍形から予測されるシンボルであり、劣勢確率シンボルとは、予測結果と異なるシンボルである。図8に示すように0から1までの領域を最初のインターバルとして優勢確率シンボルの出現確率(MPS出現確率)と劣勢確率シンボルの出現確率(LPS出現確率)とに分け、優勢確率シンボルが出現した場合には、MPSの出現確率を次のインターバルとし、劣勢確率シンボルが出現した場合にはLPSの出現確率を次のインターバルとする操作を繰り返す。全ての入力ビットに対してこの操作が完了したときの優勢確率シンボルの出現確率の下端が圧縮結果となる。   The compression processing apparatus 1 encodes (reads out) the encoding target cell with reference to the neighboring cells forming the context. The determination of neighboring cells to be read will be described in detail later. In the compression processing in the compression processing apparatus 1 of the present embodiment, arithmetic coding is performed. In arithmetic encoding, the encoding result is represented by a small number from 0 to 1. The dominant probability symbol is a symbol predicted from the vicinity of the encoding target cell, and the inferior probability symbol is a symbol different from the prediction result. As shown in FIG. 8, the dominant probability symbol has appeared by dividing the region from 0 to 1 into the probability of appearance of the dominant probability symbol (MPS appearance probability) and the appearance probability of the inferior probability symbol (LPS appearance probability) as the first interval. In this case, the operation is repeated with the appearance probability of MPS as the next interval, and when the inferior probability symbol appears, the appearance probability of LPS as the next interval. The compression result is the lower end of the appearance probability of the dominant probability symbol when this operation is completed for all input bits.

圧縮処理装置1は、図1に示すように、データ格納部(アドレス管理手段、データ格納手段)2、メモリ(記憶領域)3、コンテクスト生成部22、取得部23、算術符号部(符号化手段)24、記録部25、およびレジスタ26を備えている。   As shown in FIG. 1, the compression processing apparatus 1 includes a data storage unit (address management unit, data storage unit) 2, a memory (storage area) 3, a context generation unit 22, an acquisition unit 23, an arithmetic coding unit (encoding unit). ) 24, a recording unit 25, and a register 26.

データ格納部2は、圧縮処理装置1に画像データ(2次元画像データ)が入力されると、メモリ3に2次元画像データを格納する。このとき、元の2次元画像データのセルが成す各行では同一方向に連続し、かつ、隣接する各2行では一方の行の末尾のセルが他方の行の先頭のセルと連続するようにセルのアドレスを管理する。これは、2次元画像データを、連続したアドレスを持つ1次元的なメモリに格納したということになる。なお、本実施形態では、セルは2次元画像データの画素に対応させる。セルは、1画素に対応するのではなく、例えば2画素に対応させてもかまわない。また、データ格納部2は、入力されてメモリ3格納するデータだけでなく、元々圧縮処理装置1内にある圧縮対象データについても上記のようにアドレスを管理する。   When image data (two-dimensional image data) is input to the compression processing device 1, the data storage unit 2 stores the two-dimensional image data in the memory 3. At this time, in each row formed by the cells of the original two-dimensional image data, cells are continuous in the same direction, and in each adjacent two rows, the cell at the end of one row is continuous with the head cell of the other row. Manage addresses. This means that the two-dimensional image data is stored in a one-dimensional memory having continuous addresses. In the present embodiment, the cell corresponds to the pixel of the two-dimensional image data. A cell does not correspond to one pixel, but may correspond to, for example, two pixels. Further, the data storage unit 2 manages the addresses not only of the input data stored in the memory 3 but also the compression target data originally in the compression processing apparatus 1 as described above.

また、データ格納部2は、空白セルからなる空白データを、画像データの前にメモリ3に格納する。そして、空白データの各セルが連続し、かつ、空白データの末尾のセルが上記圧縮対象データの先頭のセルに続くようにセルのアドレスを管理する。   The data storage unit 2 stores blank data composed of blank cells in the memory 3 before the image data. Then, the cell addresses are managed so that the cells of the blank data are continuous and the last cell of the blank data follows the first cell of the compression target data.

このように空白セルを格納すると、2次元画像の最上部の行を成すセルを符号化するときに、近傍セルが空白セルを超えた外にはみ出すことがない。よって、2次元画像の最上部であっても、容易に近傍セルの取得を行うことができ、特殊な処理をする必要なく、符号化を行うことができる。なお、2次元画像の横ライン1行目のみ、従来と同様に近傍セルを空白とみなす処理を行うのであれば、空白セルを用意する必要はない。   When blank cells are stored in this way, when the cells forming the uppermost row of the two-dimensional image are encoded, neighboring cells do not protrude beyond the blank cells. Therefore, even in the uppermost part of the two-dimensional image, neighboring cells can be easily obtained, and encoding can be performed without the need for special processing. Note that it is not necessary to prepare a blank cell for the first line of the horizontal line of a two-dimensional image, if the process of considering a neighboring cell as a blank is performed as in the conventional case.

このように格納された画像データの状態を図2に示す。図2においてXと書かれたセルには画像データが格納されており、0と書かれたセルは空白セルである。このとき追加された空白セル領域は圧縮結果には影響しない。図2では「?」には空白セルを用意してもしなくてもよい。図2の「?」に空白セルを用意せずに、下記の算術符号部24が、2次元画像データにおける最初に符号化する符号化対象セルの符号化に用いる近傍セルを確保できる数だけ、空白セルをメモリに格納すると、符号化時に少なくとも1度は読み出される空白セルのみ用意されるということになる。そのため、符号化に必要な記憶容量だけを最小限に留めて確保することができる。よって、符号化に使用する記憶容量を抑えることができる。   The state of the image data stored in this way is shown in FIG. In FIG. 2, image data is stored in a cell written as X, and a cell written as 0 is a blank cell. The blank cell area added at this time does not affect the compression result. In FIG. 2, a blank cell may or may not be prepared for “?”. Without preparing blank cells in “?” In FIG. 2, the following arithmetic coding unit 24 can secure the number of neighboring cells used for coding the coding target cell to be coded first in the two-dimensional image data, When blank cells are stored in the memory, only blank cells that are read at least once during encoding are prepared. Therefore, only the storage capacity necessary for encoding can be kept to a minimum. Therefore, the storage capacity used for encoding can be suppressed.

次にデータ格納部2のアドレスを管理について説明する。2次元画像データにおいて、各行では同一方向に連続し、かつ、隣接する各2行では一方の行の末尾のセルが他方の行の先頭のセルと連続するように、アドレスを管理する。これを具体例を用いて説明する。   Next, management of the address of the data storage unit 2 will be described. In the two-dimensional image data, addresses are managed so that each row is continuous in the same direction, and in each adjacent two rows, the last cell of one row is continuous with the first cell of the other row. This will be described using a specific example.

例えば、図3(a)に示す2次元画像データがあるとする。ここで、図3(a)の四角いマス目ひとつひとつがセルである。また、1つの行は、図3(a)の横ラインであり、右から左への連続したセル、つまり、白抜きの矢印で表されるセルに対応している。データ格納部2は、図3(b)に示すように、図3(a)に示す2次元画像データにおける1つ目の行(ライン1)のセルが左から右に順に並ぶように、かつ、その次に、次の行(ライン2)のセルが左から右に順に並ぶようにアドレスを管理する。3つ目の行以降も同様である。このように、各行では同一方向に連続し、かつ、ある行の右端のセルに続けて、次の行の左端のセルが連続するように、アドレスを管理する。なお、図3(a)では、横ラインは4セルからなるが、図3(b)では1ラインが7セルからなっている。2次元に配列されたデータが、各行では同一方向に連続し、かつ、隣接する各2行では一方の行の末尾のセルが他方の行の先頭のセルと連続するようセルのアドレスがなっている。   For example, assume that there is two-dimensional image data shown in FIG. Here, each square cell in FIG. 3A is a cell. One row is a horizontal line in FIG. 3A and corresponds to continuous cells from right to left, that is, cells represented by white arrows. As shown in FIG. 3B, the data storage unit 2 is arranged so that the cells in the first row (line 1) in the two-dimensional image data shown in FIG. Then, the addresses are managed so that the cells in the next row (line 2) are arranged in order from left to right. The same applies to the third and subsequent rows. In this way, addresses are managed so that each row continues in the same direction, and the leftmost cell of the next row continues after the rightmost cell of a certain row. In FIG. 3A, the horizontal line consists of 4 cells, whereas in FIG. 3B, one line consists of 7 cells. The two-dimensionally arranged data is continuous in the same direction in each row, and in each adjacent two rows, the cell address is such that the last cell in one row is continuous with the first cell in the other row. Yes.

メモリ3は、入力された画像データを格納する記憶手段である。   The memory 3 is a storage means for storing input image data.

コンテクスト生成部22は、メモリ3に格納された画像データから、符号化対象となる画素(符号化対象セル)およびその周辺(近傍)の複数の画素の配列であるコンテクスト(近傍セル)を抽出する。圧縮処理装置1では、予測の際に、前回の入力信号までの入力ビット列だけでなく、近傍セルの状態をも用いるようになっている。すなわち、圧縮処理装置1は、予測の際に、周辺の複数の近傍セルがとりうる状態の組み合わせそれぞれに対して、優勢確率シンボルおよび劣勢シンボルの出現確率を推定する機能を持つ。   The context generation unit 22 extracts, from the image data stored in the memory 3, a pixel (encoding target cell) to be encoded and a context (neighboring cell) that is an array of a plurality of pixels in the vicinity (neighboring). . In the compression processing apparatus 1, not only the input bit string up to the previous input signal but also the state of neighboring cells is used for prediction. That is, the compression processing apparatus 1 has a function of estimating the appearance probability of the dominant probability symbol and the inferior symbol for each combination of states that can be taken by a plurality of neighboring cells in the prediction.

コンテクスト生成部22は、符号化対象セルを選択して読み取る。この符号化対象セルの選択は、メモリ3に格納されている画像データの各セルのアドレスの順に順次行う。また、コンテクスト生成部22は、入力された画像データから、対象セルの近傍セルであるコンテクストを読み取る。このコンテクストの読み取りの際には、アドレスが上記のように管理されて格納された画像データにおいて、符号化対象セルのアドレスにより決定される所定の相対アドレス位置にある複数の近傍セルを読み取る。   The context generation unit 22 selects and reads the encoding target cell. The selection of the encoding target cell is sequentially performed in the order of the address of each cell of the image data stored in the memory 3. Further, the context generation unit 22 reads a context that is a neighboring cell of the target cell from the input image data. When reading this context, in the image data in which the addresses are managed and stored as described above, a plurality of neighboring cells at a predetermined relative address position determined by the address of the encoding target cell are read.

ここで、「所定の相対アドレス位置」とは、符号化対象セルのアドレスに対して、一意に決まるアドレスの位置のことである。具体的に説明すると、例えば、符号化対象セルのアドレスがnであるとする。近傍セルのアドレスは、n−1、n−2、n−3、n−4、n−(圧縮対象データの1行におけるセル数)+2、n−(圧縮対象データの1行におけるセル数)+1、n−(圧縮対象データの1行におけるセル数)、n−(圧縮対象データの1行におけるセル数)−1、n−(圧縮対象データの1行におけるセル数)−2、n−(圧縮対象データの1行におけるセル数)−3、で求められる。ここで、2次元画像データの1行におけるセル数は、2次元画像データで一つに決まっているものである。この場合、nとは別のアドレスの符号化対象セルであっても、そのアドレスを上記nに当てはめることで、別のアドレスの符号化対象セルの近傍セルのアドレスを求めることができる。このように、符号化対象セルがどのアドレスを有するセルであっても、常に同じ計算により求まるセルを、当該符号化対象セルに対して所定の相対アドレス位置にある近傍セル、という。   Here, the “predetermined relative address position” is an address position uniquely determined with respect to the address of the encoding target cell. Specifically, for example, it is assumed that the address of the encoding target cell is n. The addresses of neighboring cells are n-1, n-2, n-3, n-4, n- (number of cells in one row of compression target data) +2, n- (number of cells in one row of compression target data). +1, n- (number of cells in one row of compression target data), n- (number of cells in one row of compression target data) -1, n- (number of cells in one row of compression target data) -2, n- (Number of cells in one row of data to be compressed) -3. Here, the number of cells in one row of the two-dimensional image data is determined as one in the two-dimensional image data. In this case, even if the encoding target cell has an address different from n, the address of a neighboring cell of the encoding target cell having another address can be obtained by applying the address to the above-described n. In this way, a cell that is always obtained by the same calculation regardless of which address the encoding target cell has is called a neighboring cell at a predetermined relative address position with respect to the encoding target cell.

よって、図5に示すように、対象セルが、例えば、元の2次元画像データの右端にある場合(図5(a))でも、左端から4セル目にある場合(図5(b))、あるいは画像の上端にある場合(図5(c))でも、対象セルのアドレスをnとすると、近傍セルのアドレスは、n−1、n−2、n−3、n−4、n−(圧縮対象データの1行におけるセル数=8)+2、n−8+1、n−8、n−8−1、n−8−2、n−8−3、で、全て求められる。   Therefore, as shown in FIG. 5, for example, even when the target cell is at the right end of the original two-dimensional image data (FIG. 5A), it is in the fourth cell from the left end (FIG. 5B). Or even at the top of the image (FIG. 5C), if the address of the target cell is n, the addresses of neighboring cells are n-1, n-2, n-3, n-4, n- (Number of cells in one row of compression target data = 8) +2, n-8 + 1, n-8, n-8-1, n-8-2, n-8-3, all are obtained.

そして、コンテクスト生成部22は、抽出した符号化対象セルおよびコンテクストを成す近傍セルを取得部23に出力する。また、コンテクスト生成部22は、算術符号部24の符号処理部29からのセルインクリメント指示を受信すると、メモリに格納された画像データから、次の符号化対象セルおよびコンテクストを抽出する。   Then, the context generation unit 22 outputs the extracted encoding target cell and neighboring cells forming the context to the acquisition unit 23. Further, when receiving the cell increment instruction from the code processing unit 29 of the arithmetic coding unit 24, the context generation unit 22 extracts the next encoding target cell and context from the image data stored in the memory.

次に、取得部23について説明する。取得部23は、予測値としての優勢確率シンボル(MPS)を、周辺画素の配列(コンテクスト)に対する優勢確率シンボルを記録した記録部25の確率推定テーブル27から取得する。   Next, the acquisition unit 23 will be described. The acquisition unit 23 acquires a dominance probability symbol (MPS) as a predicted value from the probability estimation table 27 of the recording unit 25 that records the dominance probability symbol for the arrangement (context) of surrounding pixels.

ここで、確率推定テーブル27は、図6に示すように、コンテクストと、そのコンテクストから予想されるMPSの値との関係を含んでいる。また、確率推定テーブル27は、コンテクストと、このコンテクストに応じたLPSインターバルの推定値(LSZ)のインデックスSTとの関係も含んでいる。LSZについては後述する。取得部23は、入力されるコンテクストを用いて、記録部25の確率推定テーブル27にアクセスして、インデックスSTを得る。取得部23は、MPSとインデックスSTとを得ると、画素の値(入力ビットの値;入力シンボル)、MPS、インデックスSTを算術符号部24に出力する。以上のように、符号化対象画素(符号化対象セル、符号化対象のビットに対応する画素)の近傍画素(近傍セル、コンテクスト)の値から符号化対象のビット(シンボル)のLPSインターバル(この場合にはLPSインターバルの推定値)を推定する推定ステップが、取得部23と確率推定テーブル27とによって実行される。すなわち、取得部23および確率推定テーブル7は、上記推定ステップを実行する推定部として機能する。   Here, the probability estimation table 27 includes the relationship between the context and the MPS value expected from the context, as shown in FIG. The probability estimation table 27 also includes the relationship between the context and the index ST of the LPS interval estimated value (LSZ) corresponding to this context. The LSZ will be described later. Using the input context, the acquisition unit 23 accesses the probability estimation table 27 of the recording unit 25 to obtain the index ST. When obtaining the MPS and the index ST, the acquiring unit 23 outputs the pixel value (input bit value; input symbol), MPS, and index ST to the arithmetic coding unit 24. As described above, the LPS interval of the encoding target bit (symbol) from the value of the neighboring pixel (neighboring cell, context) of the encoding target pixel (encoding target cell, pixel corresponding to the encoding target bit) (this) In this case, an estimation step for estimating the estimated value of the LPS interval is executed by the acquisition unit 23 and the probability estimation table 27. That is, the acquisition unit 23 and the probability estimation table 7 function as an estimation unit that executes the estimation step.

算術符号部24は、入力される画素の値、MPS、インデックスSTから、符号化データである実数xを生成する。この算術符号部24は、符号処理部29および前処理部30を含んでいる。   The arithmetic code unit 24 generates a real number x as encoded data from the input pixel value, MPS, and index ST. The arithmetic code unit 24 includes a code processing unit 29 and a preprocessing unit 30.

符号処理部29は、前処理部30から入力される選択信号に応じて、各処理部29a〜29cのうちから適切な処理部を選択する。また入力された画素の値、MPS、STを用いて、選択した処理部によって符号化データを生成する。符号処理部29は、優勢確率シンボルの符号化を行うMPS処理部9a、劣勢確率シンボルの符号化を行うLPS処理部9b、正規化処理を実行するRENORM処理部9cを含んでいる。   The code processing unit 29 selects an appropriate processing unit from among the processing units 29 a to 29 c in accordance with the selection signal input from the preprocessing unit 30. Also, encoded data is generated by the selected processing unit using the input pixel value, MPS, and ST. The code processing unit 29 includes an MPS processing unit 9a that encodes a dominant probability symbol, an LPS processing unit 9b that encodes an inferior probability symbol, and a RENORM processing unit 9c that performs a normalization process.

前処理部30は、取得部23から入力される画素の値、MPS、STに応じて、選択信号を生成して、符号処理部29に出力する。前処理部30は、選択部30aを含んでいる。   The preprocessing unit 30 generates a selection signal according to the pixel value, MPS, and ST input from the acquisition unit 23 and outputs the selection signal to the code processing unit 29. The preprocessing unit 30 includes a selection unit 30a.

選択部30aは、選択信号を生成するために、入力される画素の値(符号化対象のシンボル)と、そのコンテクストから予想されるMPSとを比較し、符号化対象のシンボルが優勢確率シンボルか劣勢確率シンボルかを判断する。選択部30aは、入力に応じて選択信号を生成して、符号処理部29に出力する。   In order to generate a selection signal, the selection unit 30a compares the input pixel value (encoding target symbol) with the MPS expected from the context, and determines whether the encoding target symbol is a dominant probability symbol. Determine whether it is an inferior probability symbol. The selection unit 30 a generates a selection signal according to the input and outputs the selection signal to the code processing unit 29.

記録部25には、確率推定テーブル27と確率推定表28とが記録されている。なお、確率推定テーブル27と確率推定表28とは、全く別のものである。テーブルは表とも訳し得るが、ITU-T T.82の日本語訳(ITU-T WHITE BOOK ディジタル静止画像圧縮符号化関連勧告書 勧告T.82)でこのようになっているため、その語句をそのまま用いることとする。   In the recording unit 25, a probability estimation table 27 and a probability estimation table 28 are recorded. Note that the probability estimation table 27 and the probability estimation table 28 are completely different. The table can also be translated into a table, but in the Japanese translation of ITU-T T.82 (ITU-T WHITE BOOK Digital Still Image Compression Encoding Recommendation Recommendation T.82). It will be used as it is.

確率推定テーブル27は、コンテクストごとの優勢確率シンボルMPSと、LSZのインデックスSTとを保存するテーブルである。   The probability estimation table 27 is a table for storing the dominant probability symbol MPS for each context and the index ST of the LSZ.

なお、優勢確率シンボルは、0または1の値を取る。LSZのインデックスSTは、JBIGにおいては、0から112までのどれかの値を取る。また、コンテクストが10ビットである一方で、インデックスは7ビットであるので、同じインデックスをもつ異なるコンテクストが存在することになる。例えばコンテクスト“0000000000”のLSZのインデックスSTと、“0000000001”のLSZのインデックスSTとが共に13というようなことも起こり得る。このLSZのインデックスSTは、後述するJBIGの確率推定表8において、近傍セルに出現した0または1の値(シンボル)の組合せ状況(コンテクスト)ごとに、これまで注目画素の位置に出現した値(シンボル)の履歴から注目画素に出現するであろう値(シンボル)の出現確率の予測を表すために用いられる。   The dominant probability symbol takes a value of 0 or 1. The index ST of LSZ takes any value from 0 to 112 in JBIG. In addition, since the context is 10 bits while the index is 7 bits, there are different contexts having the same index. For example, the LSZ index ST of the context “00000000” and the LSZ index ST of “0000000001” may both be 13. This LSZ index ST is a value that has appeared so far at the position of the pixel of interest for each combination status (context) of 0 or 1 values (symbols) that appear in neighboring cells in the JBIG probability estimation table 8 described later ( This is used to represent the prediction of the appearance probability of a value (symbol) that will appear at the target pixel from the history of the symbol.

確率推定表28は、図7(a),(b)に示す非特許文献1の表24のように、LSZのインデックスSTから、LSZや次のSTなどを求めるための表である。確率推定表8からLSZを求めるために、確率推定テーブル7から得たLSZのインデックスSTが使用される。この確率推定表8は、符号化処理の際にも書き換えられることはない。すなわち、確率推定表8は、参照されるだけで、書き換えられることはない。   The probability estimation table 28 is a table for obtaining the LSZ, the next ST, and the like from the LSZ index ST as shown in Table 24 of Non-Patent Document 1 shown in FIGS. In order to obtain LSZ from the probability estimation table 8, the index ST of the LSZ obtained from the probability estimation table 7 is used. This probability estimation table 8 is not rewritten even during the encoding process. That is, the probability estimation table 8 is only referred to and is not rewritten.

また、圧縮処理装置1は、作業用メモリとしてのレジスタ26を備えている。このレジスタ26は、高速アクセス可能なメモリである。レジスタ26は、Areg26a、Creg26bを含んでいる。   Further, the compression processing apparatus 1 includes a register 26 as a working memory. The register 26 is a memory that can be accessed at high speed. The register 26 includes an Areg 26a and a Creg 26b.

Areg26aは、インターバルの大きさの値Aregを保持(蓄積)するための記憶領域である。また、Creg26bは、インターバルの低数の値Cregを保持する記憶領域である。Areg26aおよびCreg26bは、整数で固定精度である。   The Areg 26a is a storage area for holding (accumulating) the value Areg of the interval size. Further, Creg 26b is a storage area for holding a low value Creg of the interval. Areg 26a and Creg 26b are integers and have fixed precision.

なお、コンテクスト生成部22と取得部23とが、算術符号部24に含まれていてもよい。算術符号部24における符号化の処理は上記したものに限定されず、符号化対象セルを、近傍セルを用いて符号化するような処理ものであれば、どのようなものであってもかまわない。   Note that the context generation unit 22 and the acquisition unit 23 may be included in the arithmetic code unit 24. The encoding process in the arithmetic coding unit 24 is not limited to the above, and any process may be used as long as the encoding target cell is encoded using a neighboring cell. .

次に、圧縮処理装置1における圧縮処理について、図9のフローチャートに基づいて説明する。圧縮処理装置1に2次元画像データ(ページデータ)が入力されると、入力された画像データをデータ格納部2がメモリに図2に示すのように、空白セルからなる空白データに続けて、2次元画像データを格納する(S149)。このとき、2次元画像データの各行では同一方向に連続し、かつ、隣接する各2行では一方の行の末尾のセルが他方の行の先頭のセルと連続するようにセルのアドレスが管理される。図2においてXと記載されたセルは画像データが格納される領域であり、0と書かれたセルは画像データが格納されない空白セルである。このとき追加された空白セルは圧縮結果には影響しない。本実施形態の圧縮処理では、S149では、図10(a)で示すように、単に2次元的な画像データが与えられる。しかし、従来の空白セルを用いた圧縮処理では、画像データの左右に空白セルが挿入されたデータが入力されていた。あるいは、従来の一筆書きにして空間充填走査を行う場合には、図15に示すように、2次元画像データが与えられると、空間補充アルゴリズムに沿って画像データのセルの再配置(空間補充走査)を行う必要があった。   Next, compression processing in the compression processing apparatus 1 will be described based on the flowchart of FIG. When the two-dimensional image data (page data) is input to the compression processing device 1, the data storage unit 2 stores the input image data in the memory, as shown in FIG. Two-dimensional image data is stored (S149). At this time, the cell addresses are managed so that each row of the two-dimensional image data is continuous in the same direction, and in each adjacent two rows, the last cell of one row is continuous with the first cell of the other row. The In FIG. 2, a cell described as X is an area in which image data is stored, and a cell written as 0 is a blank cell in which image data is not stored. The blank cell added at this time does not affect the compression result. In the compression processing of the present embodiment, as shown in FIG. 10A, only two-dimensional image data is given in S149. However, in the conventional compression processing using blank cells, data in which blank cells are inserted on the left and right sides of image data is input. Alternatively, in the case of performing the space filling scan in the conventional one-stroke drawing, as shown in FIG. 15, when the two-dimensional image data is given, the rearrangement of the cells of the image data (the space supplement scanning is performed according to the space supplement algorithm. ) Had to be done.

次に、メモリ3に格納された画像データを少なくとも1つ以上のストライプに分ける(S150)。このストライプとは、圧縮処理を行う単位であり、元の2次元画像データ中の1ライン以上の横ライン(行)からなる。   Next, the image data stored in the memory 3 is divided into at least one stripe (S150). This stripe is a unit for performing compression processing, and consists of one or more horizontal lines (rows) in the original two-dimensional image data.

次に、S150〜S164のストライプのループ(LOOP_A)の内部では個々のストライプの処理を行う。S150から一つのストライプについての処理を開始し、S150〜S164のストライプのループ(LOOP_A)においてそのストライプの処理(セルの符号化を繰り返す処理)が完了すると、S150〜S164のストライプのループ(LOOP_A)の先頭のS150に戻って、次のストライプの処理をS151から開始する。S150〜S164までのループによって全てのストライプに対して処理が完了すると、画像データ全体の符号化が完了する。ここで、従来の圧縮処理では、ストライプに分け、ストライプのループでの処理を行う必要があったが、本実施形態の圧縮処理装置1では、アドレスが連続した1次元のデータとみなすことができるので、ストライプに分ける必要はない。もちろん分けてもかまわない。   Next, individual stripe processing is performed inside the stripe loop (LOOP_A) of S150 to S164. The processing for one stripe is started from S150, and when the stripe processing (processing for repeating cell encoding) in S150-S164 stripe loop (LOOP_A) is completed, the stripe loop (LOOP_A) in S150-S164 is completed. Returning to step S150, the processing of the next stripe starts from step S151. When the processing for all stripes is completed by the loop from S150 to S164, encoding of the entire image data is completed. Here, in the conventional compression processing, it was necessary to divide into stripes and perform processing in a stripe loop. However, in the compression processing apparatus 1 of this embodiment, it can be regarded as one-dimensional data with continuous addresses. So it is not necessary to divide into stripes. Of course, it can be divided.

ストライプのループ(LOOP_A)の中にセルのループ(LOOP_B)がある。セルのループ(LOOP_B)では、S151〜S162において各セルの符号化処理が行われる。1つのセルの処理が完了すると、セルのループ(LOOP_B)の先頭S151に戻って次のセルの符号化がS152から行われる。   There is a cell loop (LOOP_B) in the stripe loop (LOOP_A). In the cell loop (LOOP_B), the encoding process of each cell is performed in S151 to S162. When the processing of one cell is completed, the process returns to the beginning S151 of the cell loop (LOOP_B), and the next cell is encoded from S152.

そして、S151〜S162のセルのループ(LOOP_B)にて符号化対象セルについての符号化を行い、1つのストライプにおける全ての画素の処理が完了すると1つのストライプの処理が完了したことになる。次に、S152〜S164の処理について説明する。   Then, encoding is performed for the encoding target cell in the cell loop (LOOP_B) of S151 to S162, and when processing of all the pixels in one stripe is completed, processing of one stripe is completed. Next, the processing of S152 to S164 will be described.

S152で、コンテクスト生成部22は、セルのアドレスを管理されてメモリ3に格納された画像データから、符号化対象セル(対象セル)を選択する。この符号化対象セルの選択は、アドレスに従って順次行われる。また、S152ではコンテクスト生成部22は、セルのアドレスを管理されてメモリ3に格納された画像データから、近傍セル(コンテクスト)を読み取る。この近傍セルは、符号化対象セルに対して所定の相対アドレス位置にあるものである。よって、符号化対象セルがどのアドレスを有するセルであっても、常に同じ計算により、当該符号化セルに対する近傍セルのアドレスが決まる。そして、取得部23に送信する(S152)。また、コンテクスト生成部22は、読み取った対象セルと近傍セルとを取得部23に送信する。本実施形態の圧縮処理では、S152では、図10(b)で示すように、単に対象セルと近傍セルとを読み取ればよい。しかし、従来の圧縮処理では、図13に示したように、近傍セルが画像からはみ出すか否かを判断してからそれぞれの処理を行う必要があった。   In step S152, the context generation unit 22 selects an encoding target cell (target cell) from the image data managed in the cell address and stored in the memory 3. The selection of the encoding target cell is sequentially performed according to the address. In S <b> 152, the context generation unit 22 reads neighboring cells (contexts) from the image data whose cell addresses are managed and stored in the memory 3. This neighboring cell is located at a predetermined relative address position with respect to the encoding target cell. Therefore, regardless of which address the encoding target cell has, the address of a neighboring cell with respect to the encoding cell is always determined by the same calculation. And it transmits to the acquisition part 23 (S152). In addition, the context generation unit 22 transmits the read target cell and neighboring cells to the acquisition unit 23. In the compression processing of this embodiment, in S152, as shown in FIG. However, in the conventional compression processing, as shown in FIG. 13, it is necessary to perform each processing after determining whether or not a neighboring cell protrudes from the image.

S153では、取得部23が、コンテクスト生成部22から送信された対象セルおよびコンテクストに応じて、記録部25の確率推定テーブル27にアクセスして、コンテクストについての優勢確率シンボルおよび劣勢確率シンボルの確率推定値のインデックスSTを取得する。   In S153, the acquisition unit 23 accesses the probability estimation table 27 of the recording unit 25 according to the target cell and context transmitted from the context generation unit 22, and estimates the probability of the dominant probability symbol and the inferior probability symbol for the context. Gets the value index ST.

S154では、算術符号部24の前処理部30において、選択部30aが、入力される符号化対象セルの値とMPSとに応じて、符号化対象セルがMPSであるか否かを判別する。S154において対象セルがMPSであると判別された場合には、算術符号部24の符号処理部29において、MPS処理部29aがMPS処理(CODEMPS:S155〜S158)を行う。一方、S154において対象セルがLPSであると判別された場合には、算術符号部24の符号処理部
29において、LPS処理部29bがLPS処理(CODELPS:S159〜S161)を行
う。
In S154, in the preprocessing unit 30 of the arithmetic coding unit 24, the selection unit 30a determines whether or not the coding target cell is an MPS according to the input coding target cell value and the MPS. When it is determined in S154 that the target cell is MPS, the MPS processing unit 29a performs MPS processing (CODEMPS: S155 to S158) in the code processing unit 29 of the arithmetic coding unit 24. On the other hand, when it is determined in S154 that the target cell is LPS, in the code processing unit 29 of the arithmetic coding unit 24, the LPS processing unit 29b performs LPS processing (CODELPS: S159 to S161).

S155では、MPS処理部29aは、記録部25の確率推定表28にアクセスして、劣勢確率シンボルの確率推定値のインデックスSTを用いて、劣勢確率シンボルの確率推定値を取得し、これに応じてレジスタ26のAreg26a、Creg26bを書き換える。S156では、MPS処理部29aは、Areg26aの値が0.5未満であるか否かを判別して、0.5未満である場合にはS157に進み、0.5以上の場合にはS162に進む。S157ではMPS処理部29aがRENORM処理部29cに指示して、RENORM処理部29cがレジスタ26のAreg26a、Creg26bに対して正規化処理をして、得られた符号化データを必要に応じて出力する。S158では、MPS処理部29aは、記録部25の確率推定表28を更新し、S162に進む。   In S155, the MPS processing unit 29a accesses the probability estimation table 28 of the recording unit 25, acquires the probability estimation value of the inferior probability symbol using the index ST of the probability estimation value of the inferior probability symbol, and according to this Then, Areg 26a and Creg 26b of the register 26 are rewritten. In S156, the MPS processing unit 29a determines whether or not the value of Areg 26a is less than 0.5. If it is less than 0.5, the process proceeds to S157, and if it is 0.5 or more, the process proceeds to S162. In S157, the MPS processing unit 29a instructs the RENORM processing unit 29c, and the RENORM processing unit 29c normalizes the Areg 26a and Creg 26b of the register 26, and outputs the obtained encoded data as necessary. . In S158, the MPS processing unit 29a updates the probability estimation table 28 of the recording unit 25, and proceeds to S162.

一方、S159では、LPS処理部29bが、記録部25の確率推定表28にアクセスして、劣勢確率シンボルの確率推定値のインデックスSTを用いて、劣勢確率シンボルの確率推定値を取得し、これに応じてレジスタ26のAreg26a、Creg26bを書き換える。S160では、LPS処理部29bが、レジスタ26のAreg26a、Creg26bに対して、確率推定表のSWITCHの値に応じて、LPSとMPSの入れ替えと符号出力を行う。すなわち、LPS処理部29bは、LSZのインデックスに対応する確率推定表
のSWITCHの値が1か否かによって、入れ替えを行うかどうかを判断する。S161では、LPS処理部29bは、記録部25の確率推定表28を更新し、S162に進む。
On the other hand, in S159, the LPS processing unit 29b accesses the probability estimation table 28 of the recording unit 25, acquires the probability estimation value of the inferior probability symbol using the index ST of the probability estimation value of the inferior probability symbol, In response, Areg 26a and Creg 26b of the register 26 are rewritten. In S160, the LPS processing unit 29b performs LPS and MPS switching and code output for Areg 26a and Creg 26b of the register 26 according to the value of SWITCH in the probability estimation table. That is, the LPS processing unit 29b determines whether or not to perform the replacement depending on whether or not the SWITCH value of the probability estimation table corresponding to the index of the LSZ is 1. In S161, the LPS processing unit 29b updates the probability estimation table 28 of the recording unit 25, and proceeds to S162.

S162では、符号処理部29がコンテクスト生成部22に対してセルインクリメントの指示を行い、セルについてのループを終了する。このような手順をストライプの全てのセルに対して行うことで、ストライプの圧縮を行う。S163では、ストライプについての処理が終了したか否かを判別し、終了していた場合にはレジスタ26から符号化データを出力する(フラッシュ処理:S163)。このように、次のストライプの圧縮に進む前に、ここまでの圧縮結果のうちで、まだ出力されていない部分を出力する。S164では、コンテクスト生成部22が新たなストライプを選択する。全てのストライプの圧縮が完了すれば画像全体の圧縮が完了したことになり、入力画像データの全てを符号化した場合には、処理を終了する。   In S162, the code processing unit 29 instructs the context generation unit 22 to increment the cell, and the loop for the cell ends. By performing such a procedure on all the cells of the stripe, the stripe is compressed. In S163, it is determined whether or not the processing for the stripe has been completed. If the processing has been completed, the encoded data is output from the register 26 (flash processing: S163). In this way, before proceeding to compression of the next stripe, a portion of the compression result so far that has not been output is output. In S164, the context generation unit 22 selects a new stripe. If compression of all stripes is complete, compression of the entire image is complete. If all of the input image data has been encoded, the process ends.

圧縮処理装置1は、上記した構成を備えており、データ格納部2は、元の2次元画像データのセル(画素)がなす各行では同一方向に連続し、かつ、隣接する各2行では一方の行の末尾のセル(画素)が他方の行の先頭のセル(画素)と連続するようセル(画素)のアドレスを管理する。また、算術符号部24は、符号化対象セルを、上記アドレス順に、当該符号化対象セルにより決定される所定の相対アドレス位置にある複数の近傍セルに基づいて符号化する。   The compression processing apparatus 1 has the above-described configuration, and the data storage unit 2 is continuous in the same direction in each row formed by cells (pixels) of the original two-dimensional image data, and one in each of the two adjacent rows. The address of the cell (pixel) is managed so that the cell (pixel) at the end of the row is continuous with the cell (pixel) at the beginning of the other row. The arithmetic encoding unit 24 encodes the encoding target cell based on a plurality of neighboring cells at predetermined relative address positions determined by the encoding target cell in the order of the addresses.

圧縮処理装置1では、メモリ3には、元の2次元画像データのセルが成す各行では同一方向に連続し、かつ、隣接する各2行では一方の行の末尾のセルが他方の行の先頭のセルと連続するようセルのアドレスが管理されて、圧縮対象データが格納される。これは、圧縮処理装置において、2次元画像データを受領するモジュールで、2次元画像データの受け取り順通りに記憶領域に格納して作成したデータにおいて(ページデータなど)、2次元画像データのセルが成す各行では同一方向に連続し、かつ、隣接する各2行では一方の行の末尾のセルが他方の行の先頭のセルと連続するようセルのアドレスがなっている、つまり、1次元的にメモリ3上に格納される、ことを利用している。   In the compression processing apparatus 1, the memory 3 includes a row of original two-dimensional image data cells that are continuous in the same direction, and in each adjacent two rows, the last cell of one row is the head of the other row. The address of the cell is managed so as to be continuous with the other cell, and the compression target data is stored. This is a module for receiving two-dimensional image data in a compression processing device. In data created by storing in a storage area in the order of reception of two-dimensional image data (such as page data), a cell of two-dimensional image data Each row is continuous in the same direction, and in each adjacent two rows, the cell address is such that the last cell of one row is continuous with the first cell of the other row, that is, one-dimensionally It is stored in the memory 3.

そして、符号化対象セルを圧縮する際には、アドレスが管理されている2次元画像データの符号化対象セルに対して、アドレス順に、符号化対象セルのアドレスにより決定される所定の相対アドレス位置にある複数の近傍セルに基づいた符号化が行われる。ここで、「所定の相対アドレス位置」とは、符号化対象セルのアドレスに対して一意に決まるアドレスの位置のことである。つまり、どのようなアドレスの符号化対象セルでに対しても、同じ計算によりアドレスが決まるセルを、符号化対象セルのアドレスにより決定される所定の相対アドレス位置にある近傍セル、という。   And when compressing an encoding object cell, with respect to the encoding object cell of the two-dimensional image data in which the address is managed, a predetermined relative address position determined by the address of the encoding object cell in the address order Are encoded based on a plurality of neighboring cells. Here, the “predetermined relative address position” is an address position uniquely determined with respect to the address of the encoding target cell. That is, for any encoding target cell at any address, a cell whose address is determined by the same calculation is called a neighboring cell at a predetermined relative address position determined by the address of the encoding target cell.

また圧縮処理装置1では、上記のように空白セルが不要である。そして、圧縮処理装置1では、近傍セルに基づいて符号化を行う際に、所定の相対アドレス位置にある複数の近傍セルを読み出すので、近傍セルが画像データからはみ出すようなことはない。これは、圧縮処理装置1では、例えば、セルを単位とし当該セルが2次元に配列されている2次元画像データにおける右端のセルのアドレスは、次の行の先頭である左端のセルのアドレスに連続して管理されている。そのため、セルを単位とし当該セルにより2次に配列されている2次元画像データにおいて、近傍セルとしてアクセスする部分が圧縮対象データの右端のセルよりはみ出す場合には、はみ出してアクセスしようとしている行より一つ下の行の左端にあるセルにアクセスして、近傍セルとして読み出することができる。そのため、圧縮対象データが格納されるだけの少ない記憶容量でも、記憶領域に対して不正なアクセスを行ったり、本来の圧縮結果とは異なる圧縮結果になってしまうといった、不具合は発生しない。このように、本発明の上記構成および上記方法によると、記憶容量を削減できるとともに、空白セルを符号化しないように空白セルを読み飛ばす処理が不要となるため、その分の高速化を図ることができる。   Further, the compression processing apparatus 1 does not require a blank cell as described above. In the compression processing apparatus 1, when encoding is performed based on neighboring cells, a plurality of neighboring cells at a predetermined relative address position are read, so that the neighboring cells do not protrude from the image data. In the compression processing apparatus 1, for example, the address of the rightmost cell in the two-dimensional image data in which the cell is two-dimensionally arranged in units of cells is the address of the leftmost cell that is the head of the next row. Managed continuously. Therefore, in the two-dimensional image data that is arranged in units of cells and is secondarily arranged by the cells, if the part accessed as a neighboring cell extends beyond the rightmost cell of the data to be compressed, the line that is to be accessed by protruding is used. The cell at the left end of the next lower row can be accessed and read as a neighbor cell. For this reason, even if the storage capacity is small enough to store the compression target data, there is no problem that the storage area is illegally accessed or the compression result is different from the original compression result. As described above, according to the configuration and the method of the present invention, it is possible to reduce the storage capacity and to eliminate the process of skipping blank cells so as not to encode blank cells. Can do.

また圧縮処理装置1では、符号化には、符号化対象セルに対して上記のような符号化対象セルのアドレスにより決定される所定の相対アドレス位置にある複数の近傍セルを用いるだけでよく、元のセル単位で2次元に配列された圧縮対象データにおける符号化対象セルの位置を認識して、位置毎にセルのアドレスを求める計算を変える、といった必要はない。よって、近傍セルのアドレスを容易に求めることができ近傍セルの読み出しが容易である。また、空間充填走査も必要ない。そのため、これらの分、圧縮処理の高速化を図ることができる。本発明においては、一筆書きでの空間充填走査を行う必要が無く、また、空間充填走査を行う必要がないので、空間充填走査を行ってできた1次元データを格納する必要もなく、圧縮モジュールのみで対応することができる。   Further, in the compression processing apparatus 1, for encoding, it is only necessary to use a plurality of neighboring cells at a predetermined relative address position determined by the address of the encoding target cell as described above with respect to the encoding target cell. There is no need to recognize the position of the encoding target cell in the compression target data arranged two-dimensionally in the original cell unit and change the calculation for obtaining the cell address for each position. Therefore, the address of the neighboring cell can be easily obtained, and reading of the neighboring cell is easy. Also, no space filling scan is required. Therefore, the speed of the compression process can be increased by these amounts. In the present invention, it is not necessary to perform space filling scanning with a single stroke, and it is not necessary to perform space filling scanning, so it is not necessary to store one-dimensional data obtained by performing space filling scanning, and a compression module. It can be dealt with only.

以上のように、圧縮処理装置1によると、セルを単位とし当該セルが2次元に配列されている2次元画像データを圧縮する際に、2次元画像データの左右端において近傍セルが画像データ外にはみ出すかどうかの判定をする必要もなければ、2次元画像データの左右端どちらにも空白セル領域を設ける必要もない。そのため、このような操作の必要がなく、与えられた2次元画像データをそのまま圧縮することが可能である。よって、少ない記憶容量で、高速で圧縮処理することができる。   As described above, according to the compression processing apparatus 1, when compressing two-dimensional image data in which the cells are arranged in units of cells, neighboring cells are outside the image data at the left and right ends of the two-dimensional image data. It is not necessary to determine whether or not to protrude, and it is not necessary to provide blank cell regions on either the left or right end of the two-dimensional image data. Therefore, there is no need for such an operation, and the given two-dimensional image data can be compressed as it is. Therefore, compression processing can be performed at high speed with a small storage capacity.

なお、本実施形態では圧縮処理装置1を上記のように、2値画像データをマルコフ情報源でモデル化し、符号化シンボルをその周辺画素の状態によって予測し、予測結果に応じて算術符号化する方式を用いるものとして説明した。しかし、本発明は、セルを単位として2次元に配列されたデータに対して、符号化対象セルの近傍から予測される値と符号化対象セルの値との差分を圧縮するようなあらゆる圧縮形式に適用することができる。このように、本発明は上述した実施形態に限定されるものではなく、請求項に示した範囲で種々の変更が可能である。すなわち、請求項に示した範囲で適宜変更した技術的手段を組み合わせて得られる実施形態についても本発明の技術的範囲に含まれる。   In the present embodiment, as described above, the compression processing apparatus 1 models binary image data with a Markov information source, predicts an encoded symbol according to the state of its surrounding pixels, and performs arithmetic encoding according to the prediction result. It was described as using a method. However, the present invention is not limited to any compression format that compresses the difference between the value predicted from the vicinity of the encoding target cell and the value of the encoding target cell for data arranged in two dimensions in units of cells. Can be applied to. As described above, the present invention is not limited to the above-described embodiment, and various modifications can be made within the scope of the claims. That is, embodiments obtained by combining technical means appropriately changed within the scope of the claims are also included in the technical scope of the present invention.

また、圧縮処理装置1の各ブロックは、ハードウェアロジックによって構成してもよいし、次のようにCPUを用いてソフトウェアによって実現してもよい。   Each block of the compression processing apparatus 1 may be configured by hardware logic, or may be realized by software using a CPU as follows.

すなわち、圧縮処理装置1は、各機能を実現する制御プログラムの命令を実行するCPU(central processing unit)、上記プログラムを格納したROM(read only memory)、上記プログラムを展開するRAM(random access memory)、上記プログラムおよび各種データを格納するメモリ等の記憶装置(記録媒体)などを備えている。そして、本発明の目的は、上述した機能を実現するソフトウェアである圧縮処理装置1の制御プログラムのプログラムコード(実行形式プログラム、中間コードプログラム、ソースプログラム)をコンピュータで読み取り可能に記録した記録媒体を、上記圧縮処理装置1に供給し、そのコンピュータ(またはCPUやMPU)が記録媒体に記録されているプログラムコードを読み出し実行することによっても、達成可能である。   That is, the compression processing apparatus 1 includes a CPU (central processing unit) that executes instructions of a control program that realizes each function, a ROM (read only memory) that stores the program, and a RAM (random access memory) that expands the program. And a storage device (recording medium) such as a memory for storing the program and various data. An object of the present invention is a recording medium on which a program code (execution format program, intermediate code program, source program) of a control program of the compression processing apparatus 1 which is software that realizes the functions described above is recorded so as to be readable by a computer. This can also be achieved by supplying to the compression processing apparatus 1 and reading and executing the program code recorded on the recording medium by the computer (or CPU or MPU).

上記記録媒体としては、例えば、磁気テープやカセットテープ等のテープ系、フロッピー(登録商標)ディスク/ハードディスク等の磁気ディスクやCD−ROM/MO/MD/DVD/CD−R等の光ディスクを含むディスク系、ICカード(メモリカードを含む)/光カード等のカード系、あるいはマスクROM/EPROM/EEPROM/フラッシュROM等の半導体メモリ系などを用いることができる。   Examples of the recording medium include a tape system such as a magnetic tape and a cassette tape, a magnetic disk such as a floppy (registered trademark) disk / hard disk, and an optical disk such as a CD-ROM / MO / MD / DVD / CD-R. Card system such as IC card, IC card (including memory card) / optical card, or semiconductor memory system such as mask ROM / EPROM / EEPROM / flash ROM.

また、圧縮処理装置1を通信ネットワークと接続可能に構成し、上記プログラムコードを通信ネットワークを介して供給してもよい。この通信ネットワークとしては、特に限定されず、例えば、インターネット、イントラネット、エキストラネット、LAN、ISDN、VAN、CATV通信網、仮想専用網(virtual private network)、電話回線網、移動体通信網、衛星通信網等が利用可能である。また、通信ネットワークを構成する伝送媒体としては、特に限定されず、例えば、IEEE1394、USB、電力線搬送、ケーブルTV回線、電話線、ADSL回線等の有線でも、IrDAやリモコンのような赤外線、Bluetooth(登録商標)、802.11無線、HDR、携帯電話網、衛星回線、地上波ディジタル網等の無線でも利用可能である。なお、本発明は、上記プログラムコードが電子的な伝送で具現化された、搬送波に埋め込まれたコンピュータデータ信号の形態でも実現され得る。   The compression processing apparatus 1 may be configured to be connectable to a communication network, and the program code may be supplied via the communication network. The communication network is not particularly limited. For example, the Internet, intranet, extranet, LAN, ISDN, VAN, CATV communication network, virtual private network, telephone line network, mobile communication network, satellite communication. A net or the like is available. Further, the transmission medium constituting the communication network is not particularly limited. For example, even in the case of wired such as IEEE 1394, USB, power line carrier, cable TV line, telephone line, ADSL line, etc., infrared rays such as IrDA and remote control, Bluetooth ( (Registered trademark), 802.11 wireless, HDR, mobile phone network, satellite line, terrestrial digital network, and the like can also be used. The present invention can also be realized in the form of a computer data signal embedded in a carrier wave in which the program code is embodied by electronic transmission.

なお、本発明は、以下に記す画像圧縮方法として表現してもよい。すなわち、圧縮対象となる画素の近傍画素を参照しながら2次元画像を圧縮する方法であって、前記2次元画像のデータを連続したアドレスを持つ1次元的な記憶領域に格納し、画像の左端部分又は右端部分の画素を圧縮する際に、前記2次元画像における反対側の端部分にある画素を前記近傍画素として参照して圧縮を行なう画像圧縮方法、と表現してもよい。   The present invention may be expressed as an image compression method described below. That is, a method of compressing a two-dimensional image while referring to a neighboring pixel of a pixel to be compressed, wherein the data of the two-dimensional image is stored in a one-dimensional storage area having continuous addresses, and the left end of the image It may be expressed as an image compression method in which compression is performed by referring to pixels in the opposite end portion of the two-dimensional image as the neighboring pixels when compressing the pixels in the portion or the right end portion.

また、上記画像圧縮方法では、さらに、2次元画像のデータを連続したアドレスを持つ1次元的な記憶領域に格納する際に、空白データに続いて2次元画像を格納してもよい。   Further, in the image compression method, when storing the two-dimensional image data in a one-dimensional storage area having continuous addresses, the two-dimensional image may be stored following the blank data.

また、上記画像圧縮方法では、さらに、2次元画像のデータを連続したアドレスを持つ1次元的な記憶領域に格納する際に、2次元画像の前に確保する空白データの領域の大きさは前記2次元画像の横1ライン分に画素3つ分のデータを加えたものであってもよい。   In the image compression method, when the data of the two-dimensional image is stored in a one-dimensional storage area having continuous addresses, the size of the blank data area secured before the two-dimensional image is Data obtained by adding three pixels of data to one horizontal line of a two-dimensional image may be used.

本発明は、2次元に配列されたデータの圧縮に利用することができ、例えば、ファクシミリ装置(FAX)やプリンタ、パーソナルコンピュータのプリンタドライバ等における画像データの圧縮に有効である。   The present invention can be used for compression of data arranged two-dimensionally, and is effective for compression of image data in, for example, a facsimile machine (FAX), a printer, a printer driver of a personal computer, and the like.

本実施形態の圧縮処理装置の要部構成を示すブロック図である。It is a block diagram which shows the principal part structure of the compression processing apparatus of this embodiment. 上記圧縮処理装置における記憶領域の状態を示す図である。It is a figure which shows the state of the storage area in the said compression processing apparatus. (a)は2次元画像データの図であり、(b)は上記圧縮処理装置における各セルのアドレスの管理を説明するための図である。(A) is a figure of two-dimensional image data, (b) is a figure for demonstrating management of the address of each cell in the said compression processing apparatus. (a)は2次元画像データにおける符号化対象セルと近傍セルの位置を現す図であり、(b)は上記圧縮処理装置が管理する同図(a)の符号化対象セルと近傍セルの1次元でのアドレスを説明する図である。(A) is a diagram showing the positions of the encoding target cell and neighboring cells in the two-dimensional image data, and (b) is one of the encoding target cell and neighboring cells of FIG. (A) managed by the compression processing apparatus. It is a figure explaining the address in a dimension. (a)〜(c)は、上記圧縮処理装置にて、読み出す近傍セルを説明する図である。(A)-(c) is a figure explaining the neighbor cell read in the said compression processing apparatus. 上記圧縮処理装置にて用いる確率推定テーブルの一例を示す図である。It is a figure which shows an example of the probability estimation table used with the said compression processing apparatus. (a)は上記圧縮処理装置にて用いる確率推定表の一例の一部を示す図であり、(b)は、確率推定表の他の一部を示す図である。(A) is a figure which shows a part of example of the probability estimation table used with the said compression processing apparatus, (b) is a figure which shows another part of probability estimation table. 上記圧縮処理装置にて行う算術符号化を説明するための概念図である。It is a conceptual diagram for demonstrating the arithmetic encoding performed with the said compression processing apparatus. 上記圧縮処理装置にて行う符号化処理の動作を示すフローチャートである。It is a flowchart which shows the operation | movement of the encoding process performed with the said compression processing apparatus. (a)、(b)は図9のフォローチャートにおける処理の一部を説明する図である。(A), (b) is a figure explaining a part of process in the follow chart of FIG. テンプレートを説明するための図である。It is a figure for demonstrating a template. 従来の通常の圧縮処理装置における、テンプレートの指定する領域を示す図である。It is a figure which shows the area | region which the template designates in the conventional normal compression processing apparatus. 従来の通常の圧縮処理装置における、近傍セルの読み出しの処理の流れを示す図である。It is a figure which shows the flow of a read-out process of the neighbor cell in the conventional normal compression processing apparatus. データの両側に空白セル領域を設けた従来の圧縮処理装置における、テンプレートの指定する領域を示す図である。It is a figure which shows the area | region which the template designates in the conventional compression processing apparatus which provided the blank cell area | region on the both sides of data. 従来の空間充填走査を用いた圧縮処理での空間充填走査の処理の流れを示す図である。It is a figure which shows the flow of the process of the space filling scan in the compression process using the conventional space filling scan. (a)は2次元画像データの図であり、(b)は従来の空間充填走査を用いた圧縮処理における各セルのアドレスの管理を説明するための図である。(A) is a figure of two-dimensional image data, (b) is a figure for demonstrating management of the address of each cell in the compression process using the conventional space filling scanning. (a)は2次元画像データにおける符号化対象セルと近傍セルの位置を現す図であり、(b)は従来の空間充填走査を用いた圧縮処理における同図(a)の符号化対象セルと近傍セルの1次元でのアドレスを説明する図であり、(c)は2次元画像データにおける符号化対象セルと近傍セルの位置を現す図であり、(d)は従来の空間充填走査を用いた圧縮処理における同図(d)の符号化対象セルと近傍セルの1次元でのアドレスを説明する図である。(A) is a diagram showing the positions of the encoding target cell and neighboring cells in the two-dimensional image data, and (b) is the encoding target cell of FIG. (A) in the compression processing using the conventional space filling scan. It is a figure explaining the one-dimensional address of a neighboring cell, (c) is a figure showing the position of the encoding object cell and neighboring cell in two-dimensional image data, (d) uses the conventional space filling scanning. It is a figure explaining the address in the one dimension of the encoding object cell of FIG.

符号の説明Explanation of symbols

1 圧縮処理装置
2 データ格納部(アドレス管理手段、データ格納手段)
3 メモリ(記憶領域)
22 コンテクスト生成部
23 取得部
24 算術符号部(符号化手段)
25 記録部
26 レジスタ
26a Creg
26b Creg
27 確率推定テーブル
28 確率推定表
29 符号化処理部
29a MPS処理部
29b LPS処理部
30 前処理部
30a 選択部
DESCRIPTION OF SYMBOLS 1 Compression processing apparatus 2 Data storage part (address management means, data storage means)
3 Memory (storage area)
22 Context Generation Unit 23 Acquisition Unit 24 Arithmetic Code Unit (Encoding Unit)
25 Recording unit 26 Register 26a Creg
26b Creg
27 Probability estimation table 28 Probability estimation table 29 Encoding processing unit 29a MPS processing unit 29b LPS processing unit 30 Preprocessing unit 30a Selection unit

Claims (7)

セルを単位とし当該セルが2次元に配列されている圧縮対象データを、符号化対象セルを順次選択しながら符号化することによって圧縮する圧縮処理装置において、
上記圧縮対象データでのセルが成す各行では同一方向に連続し、かつ、隣接する各2行では一方の行の末尾のセルが他方の行の先頭のセルと連続するようにセルのアドレスを1次元で管理する、アドレス管理手段と、
符号化対象セルを、アドレス順に、当該符号化対象セルのアドレスに対して、上記アドレス管理手段によって管理された1次元のアドレスにおける所定の相対アドレス位置にある複数の近傍セルに基づき符号化する符号化手段と、
を備えたことを特徴とする圧縮処理装置。
In a compression processing apparatus that compresses compression target data in which cells are arranged in two dimensions in units of cells by sequentially selecting the encoding target cells,
The cell addresses are set to 1 so that each row of cells in the compression target data is continuous in the same direction, and in each adjacent two rows, the last cell of one row is continuous with the first cell of the other row. Address management means to manage by dimension ,
Encoding target cells, in order of address, for the address of the coding target cell, encoding based on the plurality of neighboring cells in a predetermined relative address position that put into a one-dimensional address managed by the address management means Encoding means for
A compression processing apparatus comprising:
空白セルからなる空白データに続けて上記圧縮対象データを記録領域に格納するデータ格納手段を備え、
上記アドレス管理手段は、空白データの各セルが連続し、かつ、空白データの末尾のセルが上記圧縮対象データの先頭のセルに続くようにセルのアドレスを管理することを特徴とする請求項1に記載の圧縮処理装置。
Data storage means for storing the compression target data in the recording area following the blank data consisting of blank cells,
2. The address management means manages cell addresses so that cells of blank data are continuous and a cell at the end of blank data follows a head cell of the compression target data. The compression processing apparatus according to 1.
上記データ格納手段は、上記符号化手段が、上記圧縮対象データにおける最初に符号化する符号化対象セルの符号化に用いる近傍セルを確保できる数だけ、上記空白セルを格納することを特徴とする請求項2に記載の圧縮処理装置。   The data storage means stores the blank cells as many as the number of neighboring cells that can be used for encoding the encoding target cell to be encoded first in the compression target data. The compression processing apparatus according to claim 2. 上記圧縮対象データは画像データであり、
上記アドレス管理手段は、上記セルとして当該画像データの画素のアドレスを管理することを特徴とする請求項1〜3の何れか1項に記載の圧縮処理装置。
The compression target data is image data,
The compression processing apparatus according to claim 1, wherein the address management unit manages an address of a pixel of the image data as the cell.
セルが2次元に配列されている圧縮対象データを、符号化対象セルを順次選択しながら符号化することによって圧縮する圧縮処理装置の制御方法において、
上記圧縮対象データでのセルが成す各行では同一方向に連続し、かつ、隣接する各2行では一方の行の末尾のセルが他方の行の先頭のセルと連続するようにセルのアドレスを1次元で管理する、アドレス管理ステップと、
符号化対象セルを、アドレス順に、当該符号化対象セルのアドレスに対して、上記アドレス管理ステップで管理された1次元のアドレスにおける所定の相対アドレス位置にある複数の近傍セルに基づき符号化する符号化ステップと、
を含むことを特徴とする圧縮処理装置の制御方法。
In a control method for a compression processing apparatus that compresses data to be compressed in which cells are arranged in a two-dimensional manner by sequentially selecting encoding target cells,
The cell addresses are set to 1 so that each row of cells in the compression target data is continuous in the same direction, and in each adjacent two rows, the last cell of one row is continuous with the first cell of the other row. Address management step to manage by dimension ,
Encoding target cells, in order of address, for the address of the coding target cell, encoding based on the plurality of neighboring cells in a predetermined relative address position that put into a one-dimensional address managed by the address management step An encoding step,
A control method for a compression processing apparatus, comprising:
請求項1〜4の何れか1項に記載の圧縮処理装置を動作させるための制御プログラムであって、コンピュータを上記圧縮処理装置における上記各手段として機能させるための圧縮処理制御プログラム。   A control program for operating the compression processing apparatus according to claim 1, wherein the computer functions as each unit in the compression processing apparatus. 請求項6に記載の圧縮処理制御プログラムが記録されたコンピュータ読み取り可能な記録媒体。
A computer-readable recording medium on which the compression processing control program according to claim 6 is recorded.
JP2005342765A 2005-11-28 2005-11-28 Compression processing device, compression processing device control method, compression processing control program, and computer-readable recording medium Active JP4722681B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2005342765A JP4722681B2 (en) 2005-11-28 2005-11-28 Compression processing device, compression processing device control method, compression processing control program, and computer-readable recording medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2005342765A JP4722681B2 (en) 2005-11-28 2005-11-28 Compression processing device, compression processing device control method, compression processing control program, and computer-readable recording medium

Publications (2)

Publication Number Publication Date
JP2007150754A JP2007150754A (en) 2007-06-14
JP4722681B2 true JP4722681B2 (en) 2011-07-13

Family

ID=38211622

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2005342765A Active JP4722681B2 (en) 2005-11-28 2005-11-28 Compression processing device, compression processing device control method, compression processing control program, and computer-readable recording medium

Country Status (1)

Country Link
JP (1) JP4722681B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5305806B2 (en) * 2008-09-25 2013-10-02 株式会社東芝 3D integrated circuit design method and 3D integrated circuit design program

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH1079846A (en) * 1996-09-03 1998-03-24 Ricoh Co Ltd Facsimile equipment
JPH10301490A (en) * 1997-04-24 1998-11-13 Fuji Xerox Co Ltd Method of encipherment
JPH10336460A (en) * 1997-05-30 1998-12-18 Murata Mach Ltd Coder and recording medium
JPH10336462A (en) * 1997-05-30 1998-12-18 Murata Mach Ltd Coder, decoder and coding decoding device
JPH11220629A (en) * 1998-02-02 1999-08-10 Canon Inc Image encoding method/device and image processor
JP2001292327A (en) * 2000-04-07 2001-10-19 Fuji Xerox Co Ltd Image processing apparatus
JP2003134346A (en) * 2001-10-26 2003-05-09 Nec Microsystems Ltd Coding/decoding method an apparatus thereof

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH1079846A (en) * 1996-09-03 1998-03-24 Ricoh Co Ltd Facsimile equipment
JPH10301490A (en) * 1997-04-24 1998-11-13 Fuji Xerox Co Ltd Method of encipherment
JPH10336460A (en) * 1997-05-30 1998-12-18 Murata Mach Ltd Coder and recording medium
JPH10336462A (en) * 1997-05-30 1998-12-18 Murata Mach Ltd Coder, decoder and coding decoding device
JPH11220629A (en) * 1998-02-02 1999-08-10 Canon Inc Image encoding method/device and image processor
JP2001292327A (en) * 2000-04-07 2001-10-19 Fuji Xerox Co Ltd Image processing apparatus
JP2003134346A (en) * 2001-10-26 2003-05-09 Nec Microsystems Ltd Coding/decoding method an apparatus thereof

Also Published As

Publication number Publication date
JP2007150754A (en) 2007-06-14

Similar Documents

Publication Publication Date Title
JP4878262B2 (en) Entropy encoding device
Memon et al. An analysis of some common scanning techniques for lossless image coding
KR20120065394A (en) Image processing apparatus and processing method therefor
US20060269151A1 (en) Encoding method and encoding apparatus
JP6212890B2 (en) Moving picture coding apparatus, moving picture coding method, and moving picture coding program
TWI250787B (en) Compression of bi-level images with explicit representation of ink clusters
JPH053184B2 (en)
JP4712885B2 (en) Image processing apparatus and image processing method
JP4722681B2 (en) Compression processing device, compression processing device control method, compression processing control program, and computer-readable recording medium
JP4871822B2 (en) Image coding apparatus and control method thereof
JP4918026B2 (en) Image coding apparatus, image coding method, computer program, and information recording medium
JP6188344B2 (en) Scanning order generation apparatus, moving picture encoding apparatus, moving picture decoding apparatus, scanning order generation method, and program
JP4694462B2 (en) Encoding apparatus, encoding method, program, and recording medium thereof
JP4194472B2 (en) Image processing method and apparatus
He et al. Reversible data hiding based on multi‐predictor and adaptive expansion
US6339659B1 (en) Fractal coding/decoding of picture data using memory capacity information
JP5612965B2 (en) Image processing apparatus and image processing method
JP3563838B2 (en) Image encoding / decoding device
JP6635751B2 (en) Image encoding apparatus and control method thereof, program and storage medium
JP2007067965A (en) Compression processor, compression processing method, compression processor control program and computer readable recording medium
JP4878040B2 (en) Image encoding apparatus, image encoding method, image encoding program, and recording medium
JP2009159105A (en) Compression processing apparatus, compression processing method, compression processing control program, and computer-readable recording medium
JP4526069B2 (en) Image information arithmetic coding apparatus and image information arithmetic decoding apparatus
JP4875649B2 (en) Image processing apparatus, image processing method, and image processing program
JP2003179761A (en) Adaptive prediction coding and decoding method, device thereof and recording medium with adaptive prediction coding and decoding program recorded thereon

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20080220

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20100607

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20100907

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20101028

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20110405

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20110406

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20140415

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Ref document number: 4722681

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150