JP3308940B2 - Encoding method and decoding method - Google Patents
Encoding method and decoding methodInfo
- Publication number
- JP3308940B2 JP3308940B2 JP23083999A JP23083999A JP3308940B2 JP 3308940 B2 JP3308940 B2 JP 3308940B2 JP 23083999 A JP23083999 A JP 23083999A JP 23083999 A JP23083999 A JP 23083999A JP 3308940 B2 JP3308940 B2 JP 3308940B2
- Authority
- JP
- Japan
- Prior art keywords
- symbols
- encoding
- symbol
- decoding
- processing
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Fee Related
Links
Landscapes
- Compression Or Coding Systems Of Tv Signals (AREA)
- Compression Of Band Width Or Redundancy In Fax (AREA)
Description
【0001】[0001]
【発明の属する技術分野】本発明は、符号化方法および
復号化方法に関する。[0001] The present invention relates to an encoding method and a decoding method.
【0002】[0002]
【従来の技術】2値画像をマルコフ情報源でモデル化
し、符号化シンボルをその周辺画素の状態によって予測
し、予測結果を算術符号化する方式が圧縮率の点から最
も優れた特性を示すことが知られている。JBIG (ITU勧
告T.82) に採用されているQM-coder(算術符号復号器)
がその例である。2. Description of the Related Art A method in which a binary image is modeled by a Markov information source, a coded symbol is predicted according to the state of surrounding pixels, and a prediction result is arithmetically coded exhibits the best characteristics in terms of compression ratio. It has been known. QM-coder (arithmetic code decoder) adopted in JBIG (ITU recommendation T.82)
Is an example.
【0003】このような方式は、コンテクストの生成,
シンボルの生起確率情報の推定,算術符号化演算を1シ
ンボル毎に繰り返して符号化,復号化を行なうものであ
り、効率的な圧縮を行なえる。[0003] Such a method is based on context generation,
Estimation of symbol occurrence probability information and arithmetic coding operation are repeated for each symbol to perform coding and decoding, and efficient compression can be performed.
【0004】図16にQM-coderの主要な構成を示す。FIG. 16 shows a main configuration of the QM-coder.
【0005】図示されるように、QM-coderは、コンテク
スト生成部200と、コンテクストテーブル(RAM)210
と、確率推定部220と、算術符号器230とで構成されてお
り、次のように動作する。As shown in the figure, a QM-coder includes a context generation unit 200 and a context table (RAM) 210.
, A probability estimating unit 220, and an arithmetic encoder 230, and operate as follows.
【0006】まず、コンテクスト生成部200において、
符号化画素の周辺10画素によって作られる1024個の状態
を検出する。各状態をコンテクスト(s)と呼び、コンテ
クスト毎に優勢シンボルの予測値MPS(s)と確率推定部22
0の状態番号がコンテクストテーブル210から読み出さ
れ、確率推定部220に出力される。確率推定部220は、こ
れらの情報から領域幅Qe(s)を算術符号器230に出力す
る。算術符号器230は、符号化シンボル値と、優勢シン
ボルの予測値MPS(s)と、劣勢シンボルの生成確率に対応
する領域幅Qe(s)とから算術符号化演算を実行する。First, in the context generation unit 200,
1024 states created by the 10 surrounding pixels of the encoded pixel are detected. Each state is called a context (s), and a predicted value MPS (s) of a dominant symbol and a probability estimating unit 22 for each context.
A state number of 0 is read from the context table 210 and output to the probability estimation unit 220. Probability estimating section 220 outputs region width Qe (s) to arithmetic encoder 230 from these pieces of information. Arithmetic encoder 230 performs an arithmetic encoding operation from the encoded symbol value, predicted value MPS (s) of the superior symbol, and region width Qe (s) corresponding to the generation probability of the inferior symbol.
【0007】次に、算術符号演算について図17を参照し
て説明する。Next, the arithmetic code operation will be described with reference to FIG.
【0008】算術符号化では、初期値0〜1の数直線を優
勢シンボル(MPS)の領域幅と劣性シンボル(LPS)の領域幅
に分ける。QM-coderでは、数直線の上側にLPS幅,下側
にMPS幅が割り当てられている。2つの領域幅を足した
幅をオージェントとよび、以下、「Areg」と記載する。In arithmetic coding, a number line having an initial value of 0 to 1 is divided into an area width of a dominant symbol (MPS) and an area width of a recessive symbol (LPS). In the QM-coder, the LPS width is assigned above the number line, and the MPS width is assigned below. The width obtained by adding the two region widths is called an agent, and is hereinafter referred to as “Areg”.
【0009】図17は、”0100”に対する領域分割の様子
を示している。図中、A(X)はシンボル系列Xに対応
した領域の幅を表す。例えば、部分区間A(0100)は、
シンボル系列”0100”及び生成確率に対応する。符号化
対象シンボル系列は、分割された領域内の代表点に対応
させる。代表点は、部分区間内の一番下にとられる。こ
の代表点を示すレジスタを符号レジスタといい、以下、
「Creg」と記載する。FIG. 17 shows a state of area division for "0100". In the figure, A (X) represents the width of the area corresponding to the symbol sequence X. For example, the subsection A (0100) is
It corresponds to the symbol sequence “0100” and the generation probability. The encoding target symbol sequence is made to correspond to a representative point in the divided area. The representative point is set at the bottom of the partial section. The register indicating this representative point is called a code register.
Described as "Creg".
【0010】符号化シンボルと予測値が同じ時は、次の
シンボルの符号化にはMPS幅が選ばれ、そうでなければL
PS幅が選ばれる。上述のとおり、この領域幅の中に代表
点を設けて、その2進少数点が符号を表す。When the coded symbol and the predicted value are the same, the MPS width is selected for coding the next symbol;
PS width is selected. As described above, a representative point is provided in this area width, and the binary decimal point represents a code.
【0011】算術符号化演算では、領域幅が「所定値」
未満になった時には、小数点の精度の低下を防ぐため
に、所定値以上になるまで2倍処理を繰り返す(この処
理を正規化処理という)。ここで、「所定値」は初期値
の1/2である。In the arithmetic coding operation, the area width is "predetermined value".
When the value is less than 2, the doubling process is repeated until the value becomes equal to or more than a predetermined value in order to prevent a decrease in precision of the decimal point (this process is called a normalization process). Here, the “predetermined value” is 1/2 of the initial value.
【0012】正規化処理はLPSを符号化したときにも行
われる。正規化処理では確率推定部の状態遷移が更新さ
れ、次のシンボルからQe(s)の値が異なり、これによっ
て、より情報源の確率分布に適した値が選択されるよう
になる。The normalization process is also performed when LPS is encoded. In the normalization processing, the state transition of the probability estimating unit is updated, and the value of Qe (s) differs from the next symbol, whereby a value more suitable for the probability distribution of the information source is selected.
【0013】MPS幅は大きく、LPS幅Qe(s)はMPS幅よりも
小さな値が割り当てられている。MPSの符号化では、1
シンボルの符号化後のオージェント(Areg)の値は、符
号化前のオージェント(Areg)からLPS幅Qe(s)を減算し
た値(すなわち、Areg-Qe(s))となる。この値が初期値
の1/2になるまで正規化処理は行われない。The MPS width is large, and the LPS width Qe (s) is assigned a value smaller than the MPS width. In MPS encoding, 1
The value of the agent (Areg) after encoding the symbol is a value obtained by subtracting the LPS width Qe (s) from the agent (Areg) before encoding (that is, Areg-Qe (s)). Normalization processing is not performed until this value becomes 1/2 of the initial value.
【0014】コンテクストが同一でMPSが連続するとき
には、各シンボルの予測条件には変化がないため、Areg
- n×Qe(s)のように予め定めたnシンボル分、一括し
て演算することができる。このような一括符号化方式
は、特公平7-95693号公報(符号化復号化装置)に開示
されている。When the MPS is continuous and the context is the same, the prediction condition of each symbol does not change.
-Computation can be performed collectively for a predetermined n symbols such as n × Qe (s). Such a collective encoding system is disclosed in Japanese Patent Publication No. Hei 7-95693 (encoding / decoding device).
【0015】[0015]
【発明が解決しようとする課題】しかし、上述の一括符
号化方式(特公平7-95693号公報)は、予め定めたシン
ボル数に対して一括処理の条件が満たされた場合に限っ
て一括処理を行なうものであり、特定の条件の下でのみ
高速化が可能である。実際には、そのような条件を満た
す可能性のある画像パターンは、画素配置の水平移動に
よってコンテクストが同一となることから、参照画素と
MPSが全て白、全て黒、および横方向のストライプに限
られる。横方向のストライプパターンや全黒パターンの
発生頻度は低いので、現実的には、画像中の全白の部分
を符号化する際に効果があると考えられる。However, the above-described batch encoding method (Japanese Patent Publication No. Hei 7-95693) discloses that the batch coding is performed only when the condition of the batch processing is satisfied for a predetermined number of symbols. And speeding up is possible only under specific conditions. Actually, an image pattern that may satisfy such a condition has the same context due to the horizontal movement of the pixel arrangement, and therefore, is different from the reference pixel.
MPS is limited to all white, all black, and horizontal stripes. Since the occurrence frequency of the horizontal stripe pattern and the all-black pattern is low, it is considered that it is practically effective to encode the all-white portion in the image.
【0016】しかし、画像の中の全白部分は文字間、行
間、左右の余白などであり、解像度や画像の種類によっ
て全白部分の大きさは大きく変化する。また、誤差拡散
画像では一括処理シンボル数を大きくすると、一括処理
条件を満足する頻度は極めて小さくなり、高速化の効果
はほとんど認められなくなる。However, the whole white portion in the image is the space between characters, the space between lines, left and right margins, and the like, and the size of the whole white portion greatly changes depending on the resolution and the type of the image. Also, when the number of collective processing symbols is increased in the error diffusion image, the frequency of satisfying the collective processing condition becomes extremely low, and the effect of speeding up is hardly recognized.
【0017】本発明はこのような考察に基づいてなされ
たものであり、各種の画像や画像の局所状態に柔軟に対
応して高速処理を行なうことができる符号化・復号化方
法および装置を提供することを目的とする。The present invention has been made based on such considerations, and provides an encoding / decoding method and apparatus capable of performing high-speed processing flexibly in response to various images and local states of the images. The purpose is to do.
【0018】[0018]
【課題を解決するための手段】本発明は上記の問題を解
消するためになされたもので、画像の局所局所の状況に
適応して連続処理シンボル数を可変とし、画像の複雑さ
に応じて高速化の効果が得られるように構成したもので
ある。SUMMARY OF THE INVENTION The present invention has been made in order to solve the above-mentioned problem, and the number of consecutively processed symbols is variable in accordance with the local situation of an image. The configuration is such that the effect of speeding up can be obtained.
【0019】すなわち、本発明では、文字画像では、必
ず行間の余白が存在することに着目し、文字情報の部分
と行間部分とを区別し、行間部分では、連続処理シンボ
ル数を充分大きく設定し、符号化処理の大幅な高速化を
図るようにする。文書画像では、行間の白ラインが全体
に占める割合がかなり高いため、この部分を高速処理す
ることで全体の処理速度を上げることができる。That is, in the present invention, attention is paid to the fact that there is always blank space between lines in a character image, the character information portion is distinguished from the line space portion, and the number of consecutively processed symbols is set sufficiently large in the line space portion. In this case, the speed of the encoding process is greatly increased. In a document image, the proportion of white lines between lines in the entire image is considerably high. Therefore, by processing this portion at high speed, the overall processing speed can be increased.
【0020】また、文字情報(あるいはハーフトーン)
の部分についても、複数の連続処理シンボル数の判定手
段によって、シンボル符号化毎に予め定めたシンボル数
の範囲内で最大のシンボル数を選択できるように構成
し、画像の局所的性質に応じて、連続処理シンボル数を
柔軟に変化させることにより、処理効率をさらに向上さ
せることができる。In addition, character information (or halftone)
Is configured so that the maximum number of symbols can be selected within the range of the number of symbols predetermined for each symbol encoding by the plurality of consecutive processing symbol number determination means, and according to the local property of the image. The processing efficiency can be further improved by flexibly changing the number of consecutive processing symbols.
【0021】[0021]
【発明の実施の形態】本発明の符号化方法の第1の態様
では、符号化ラインと参照ラインが共に白ラインである
ことが検出された場合には、非白ラインに対して一括し
た符号復号化を行なう場合のシンボル数よりも大きなシ
ンボル数にて、前記符号化ラインを一括して符号化す
る。DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS In a first embodiment of the encoding method of the present invention, if it is detected that both an encoding line and a reference line are white lines, the non-white lines are collectively encoded. The coding lines are collectively coded with a larger number of symbols than the number of symbols used for decoding.
【0022】符号化を行なう前に全白ラインを検出する
ことによって行間と文字ラインとを区別し、行間につい
ては、全白であることがわかっているため、通常の符号
化を行なうことなく、十分に大きな数の連続するシンボ
ルについて、一括(連続)して符号化を実施し、処理の
高速化を図るものである。By detecting all white lines before encoding, line spacing and character lines are distinguished, and since the line spacing is known to be entirely white, normal encoding is performed without performing. The encoding is performed collectively (continuously) on a sufficiently large number of continuous symbols to speed up the processing.
【0023】また、本発明の符号化方法の第2の態様で
は、第1の態様において、非白ラインについては、白ラ
インの一括符号化を行なう場合のシンボル数よりも小さ
い値をもつ複数のシンボル数の中から、符号化の対象の
画像の局所的性質に応じて一つを選択して、適応的に符
号化を行なうようにした。According to a second aspect of the encoding method of the present invention, in the first aspect, for the non-white line, a plurality of symbols having a value smaller than the number of symbols when collectively encoding white lines are performed. From the number of symbols, one is selected according to the local property of the image to be encoded, and encoding is performed adaptively.
【0024】非白ラインについても、画像の局所的性質
に対応した、適応的な一括符号化を実施し、処理効率を
さらに向上させるものである。For non-white lines, adaptive batch encoding corresponding to the local properties of the image is performed to further improve the processing efficiency.
【0025】また、本発明の復号化方法の第1の態様で
は、参照ラインが白ラインであることが検出された場合
には、非白ラインに対して一括した復号化を行なう場合
のシンボル数よりも大きなシンボル数にて、前記復号化
ラインを一括して復号化するようにした。これにより、
復号処理の大幅な高速化が実現される。Further, in the first aspect of the decoding method of the present invention, when it is detected that the reference line is a white line, the number of symbols for performing the collective decoding on the non-white line The decoding lines are collectively decoded with a larger number of symbols. This allows
Significant speed-up of the decoding process is realized.
【0026】また、本発明の復号化方法の第2の態様で
は、非白ラインについては、白ラインの一括復号化を行
なう場合のシンボル数よりも小さい値をもつ複数のシン
ボル数の中から、復号化の対象の画像の局所的性質に応
じて一つを選択して、適応的に復号化を行なう。非白ラ
インについても、画像の局所的性質に対応した、適応的
な一括復号化を実施し、処理効率をさらに向上させるも
のである。Further, in the second aspect of the decoding method of the present invention, for the non-white line, the number of symbols having a value smaller than the number of symbols when the white line is collectively decoded is selected from the plurality of symbols. One is selected according to the local property of the image to be decoded, and decoding is performed adaptively. Even for non-white lines, adaptive batch decoding corresponding to the local property of the image is performed to further improve the processing efficiency.
【0027】また、本発明の符号化装置の第1の態様
は、符号化ラインと参照ラインが共に白ラインであるこ
とを検出する白ライン検出部と、この白ライン検出手段
によって白ラインが検出された場合に、非白ラインに対
して一括した符号化を行なう場合のシンボル数よりも大
きなシンボル数にて、その白ラインを一括符号化するこ
とが可能か否かを判定する第1の複数シンボル処理判定
部と、前記白ラインについて一括符号化を行なう場合よ
りも小さな値をもつ、予め定められている複数のシンボ
ル数のうち、一括符号化が現実に可能なシンボル数を検
出し、検出されたシンボル数のうちの最大のものを選択
して出力する第2の複数シンボル処理判定部と、前記第
1の複数シンボル処理判定部によって一括処理可能であ
ると判定された場合には、白ラインの一括処理用のシン
ボル数を選択し、前記第1の複数シンボル処理判定部に
よって一括処理不可であると判定された場合あるいは非
白ラインの符号化の場合には、前記第2の複数シンボル
処理判定部から出力されるシンボル数を選択する一括処
理シンボル数選択部と、この一括処理シンボル数選択部
によって選択されたシンボル数にて、予測符号化を行な
う符号化部と、を有する構成とした。In a first aspect of the encoding apparatus of the present invention, a white line detecting section for detecting that both an encoded line and a reference line are white lines, and a white line is detected by the white line detecting means. In this case, it is determined whether or not the white line can be collectively encoded with a larger number of symbols than when collectively encoding a non-white line. A symbol processing determination unit that detects the number of symbols that can actually be collectively encoded among a plurality of predetermined symbol numbers having a smaller value than when performing the collective encoding on the white line, and detects When the second plurality of symbol processing determination units that select and output the largest one of the determined symbol numbers and the first plurality of symbol processing determination units determine that batch processing is possible. Selects the number of symbols for batch processing of white lines, and when the first multiple-symbol processing determination unit determines that batch processing is not possible or when encoding a non-white line, the second symbol And a coding unit for performing predictive coding with the number of symbols selected by the batch processing symbol number selection unit. Configuration.
【0028】白ラインが検出されると、一括処理が可能
かどうかの判定を行なった後に白ライン専用の一括処理
を実行し、一括処理ができなかった場合や非白ラインの
場合については、画像に対応した適応的な一括処理を実
行し、これにより、きわめて効率的な符号化を実現する
ものである。When a white line is detected, it is determined whether batch processing is possible. Then, a batch processing dedicated to white lines is executed. , An adaptive batch process corresponding to the above is executed, thereby achieving extremely efficient encoding.
【0029】また、本発明の符号化装置の第2の態様で
は、第1の態様において、前記白ライン検出手段による
検出処理と、前記符号化部による符号化処理とを並列に
実行する。According to a second aspect of the encoding apparatus of the present invention, in the first aspect, the detection processing by the white line detection means and the encoding processing by the encoding unit are executed in parallel.
【0030】白ラインの検出処理を、符号化処理とは独
立に行なう(前処理として行なう)ことにより、白ライ
ン検出に起因して符号化処理の速度が低下するような事
態が生じない。By performing the white line detection process independently of the encoding process (performed as a pre-process), a situation where the speed of the encoding process is reduced due to the white line detection does not occur.
【0031】また、本発明の復号化装置では、符号化装
置と同様に、白ライン専用の一括処理または非白ライン
に対する適応処理を行なって処理効率を向上させ、ま
た、白ラインの検出処理を、符号化処理とは独立に行な
って、符号化処理の遅延を防止する。Further, in the decoding apparatus of the present invention, similar to the encoding apparatus, the processing efficiency is improved by performing the batch processing dedicated to the white line or the adaptive processing for the non-white line, and the detection processing of the white line is performed. , Is performed independently of the encoding process to prevent delay in the encoding process.
【0032】本発明の符号復号化装置は高速処理が可能
であるため、原稿を高速に読み取って圧縮する必要があ
るファクシミリ複合機などの通信装置に搭載するのに適
しており、通信装置の高機能化に寄与するものである。The encoding / decoding device of the present invention is capable of high-speed processing, and is suitable for mounting on a communication device such as a multifunction facsimile machine that needs to read and compress a document at high speed. It contributes to functionalization.
【0033】以下、本発明の実施の形態について、図面
を参照して具体的に説明する。Hereinafter, embodiments of the present invention will be specifically described with reference to the drawings.
【0034】図1(a)は、本発明の一実施の形態にか
かる画像コーディック(2値画像用の算術符号復号器)
の構成を示すブロック図である。FIG. 1A shows an image codec (arithmetic code decoder for binary image) according to an embodiment of the present invention.
FIG. 3 is a block diagram showing the configuration of FIG.
【0035】図示されるように、画像コーディック102
は、画像入出力インタフェース1000と、ラインメモリ20
00と、算術符号復号部3000と、各部の動作を統括的に制
御するシーケンス制御部4000とで構成される。As shown, the image codec 102
The image input / output interface 1000 and the line memory 20
00, an arithmetic code decoding unit 3000, and a sequence control unit 4000 that controls the operation of each unit as a whole.
【0036】画像入出力インタフェース1000は、画像メ
モリ104に対してリード/ライト(R/W)の制御信号
を出力して、符号化時には、ラインメモリ2000に画像デ
ータを格納する。一方、復号化時には、復号データを画
像メモリ104に転送する。The image input / output interface 1000 outputs a read / write (R / W) control signal to the image memory 104, and stores the image data in the line memory 2000 at the time of encoding. On the other hand, at the time of decoding, the decoded data is transferred to the image memory 104.
【0037】また、この画像入出力インタフェース1000
は、データバッファ1100と、1ライン分の画像データが
すべて白データであることを検出する白ライン検出部11
10と、白ラインが検出された場合に、そのことを示すヘ
ッダ情報を作成し、画像データに付加するヘッダ情報作
成部1500とを有する。The image input / output interface 1000
Is a data buffer 1100 and a white line detecting unit 11 for detecting that all image data for one line is white data.
10, and a header information creation unit 1500 that creates header information indicating that a white line is detected and adds the header information to the image data.
【0038】図1(b)は、1ラインの画像データにヘ
ッダ情報が付加されたデータ形式を示している。すなわ
ち、1ライン分の画像データ1112について、全白である
か否かを示すヘッダ情報1111が付加される。このような
データが、画像入出力インタフェース1000からラインメ
モリ2000に送られる。FIG. 1B shows a data format in which header information is added to one line of image data. That is, header information 1111 indicating whether or not the image data 1112 for one line is all white is added. Such data is sent from the image input / output interface 1000 to the line memory 2000.
【0039】ラインメモリ2000は、符号化・復号化処理
に必要とされるだけの充分な容量を有する。The line memory 2000 has a sufficient capacity required for the encoding / decoding processing.
【0040】システムの動作を統括的に制御するシーケ
ンス制御部4000は、ラインメモリ2000に格納されている
画像データに付加されているヘッダ情報を読み、そのヘ
ッダ情報から所定のライン(具体的には、2本の参照ラ
インと、符号化対象の1ラインの合計3ライン)の全デ
ータが白データ(すなわち、全白ライン:行間部分)で
あることがわかると、白ライン識別信号を算術符号復号
部3000に送出して、そのことを通知する。A sequence control unit 4000 for controlling the overall operation of the system reads the header information added to the image data stored in the line memory 2000, and reads a predetermined line (specifically, from the header information). If it is found that all data of two reference lines and one line to be encoded (total three lines) are white data (that is, all white lines: inter-line portions), the white line identification signal is arithmetically decoded. It sends it to the unit 3000 to notify it.
【0041】算術符号復号部3000は、白ライン識別信号
によって参照ラインおよび符号化対象ラインがいずれも
全白であることがわかると、多数のシンボルの一括符号
化(白ラインの符号化用の特別処理)を行ない、高速な
符号化を実現する。これにより、文字画像における行間
の白ラインをきわめて高速に処理することが可能とな
る。なお、復号化時の白ライン検出は、後述するよう
に、算術符号復号部3000の内部で行う。When the white line identification signal indicates that both the reference line and the line to be encoded are all white, the arithmetic code decoding unit 3000 collectively encodes a large number of symbols (special code for encoding a white line). Processing) to realize high-speed encoding. This makes it possible to process a white line between lines in a character image at extremely high speed. The white line detection at the time of decoding is performed inside the arithmetic code decoding unit 3000, as described later.
【0042】画像入出力インタフェース1000における白
ラインの検出と、算術符号復号部3000における処理とは
並列に実行される。画像入出力インタフェース1000で白
ラインの検出を行なうのは、これを算術符号復号部3000
にて行なうとすると、符号復号処理スピードが低下する
ためである。よって、算術符号復号部3000に入力される
前の段階で、白ラインの情報を事前に取得する構成をと
っている。The detection of a white line in the image input / output interface 1000 and the processing in the arithmetic code decoder 3000 are executed in parallel. The detection of a white line by the image input / output interface 1000 is performed by the arithmetic code decoding unit 3000.
This is because if it is performed, the speed of the code decoding process is reduced. Therefore, a configuration is adopted in which information on the white line is acquired in advance before being input to the arithmetic code decoding unit 3000.
【0043】このように、算術符号復号部3000では、全
白ライン(すなわち文字と文字の間の行間領域)と、文
字領域(ハーフトーン画像の領域を含む)とを区別し、
全白ラインについては特別な処理を行なう。As described above, the arithmetic code decoding unit 3000 distinguishes an all white line (that is, an area between lines between characters) from a character area (including a halftone image area),
Special processing is performed for all white lines.
【0044】さらに、文字領域についても、その画像の
局所的な性質に応じて、一括処理するべきシンボル数を
適宜、変化させながら適応的に符号化(符号化)処理を
行なう。このようにして、入力画像に適応した、高速な
算術符号化(復号化)が実現される。Further, the character area is adaptively coded (encoded) while appropriately changing the number of symbols to be collectively processed according to the local properties of the image. In this way, high-speed arithmetic coding (decoding) adapted to the input image is realized.
【0045】すなわち、図2に示すような2値画像を符
号化する場合、行間部分(領域B,D)では一括処理す
るシンボル数を格段に増やして高速に符号化し、一方、
文字やハーフトーン画像の部分(領域A,C,E,F)
では、それぞれの局所的な性質に応じて一括処理するシ
ンボル数を適宜、変更しながら、適応的な符号化を実行
するものである。That is, when encoding a binary image as shown in FIG. 2, the number of symbols to be collectively processed in the space between lines (areas B and D) is greatly increased, and encoding is performed at high speed.
Character or halftone image part (areas A, C, E, F)
Then, adaptive encoding is executed while appropriately changing the number of symbols to be collectively processed according to each local property.
【0046】すなわち、本実施の形態では、一括処理す
るべきシンボル数は、図3のようなフローにしたがって
決定される。すなわち、まず、白ライン(行間)の領域
であるかを判定し(ステップ12)、そうであるならば、
白ラインの処理用に予め定められている256シンボル分
の一括処理が可能であるか(正規化処理が発生するのな
らば一括処理不可となる)を判定する(ステップ14)。
一括処理可能と判定されると256シンボルが一挙に符号
化されることになる。That is, in the present embodiment, the number of symbols to be collectively processed is determined according to the flow as shown in FIG. That is, first, it is determined whether or not the area is a white line (between lines) (step 12).
It is determined whether batch processing for 256 symbols predetermined for white line processing is possible (batch processing is not possible if normalization processing occurs) (step 14).
If it is determined that batch processing is possible, 256 symbols will be encoded at once.
【0047】一方、白ラインではない場合、あるいは、
256シンボルの一括処理が不可と判定された場合には、
算術符号復号部3000が内蔵する一括処理シンボル数判定
回路(後述)により、一括処理するべきシンボル数を適
応的に決定する(ステップ16)。この場合、シンボル
数「2」,「4」,「8」,「16」のいずれかが選択さ
れる。On the other hand, if it is not a white line, or
If it is determined that batch processing of 256 symbols is not possible,
The number of symbols to be collectively processed is adaptively determined by a collectively processed symbol number determination circuit (described later) incorporated in arithmetic code decoding section 3000 (step 16). In this case, one of the symbol numbers “2”, “4”, “8”, and “16” is selected.
【0048】以下、図1(a)に示す画像コーディック
102の各部の構成を具体的に説明する。The image codec shown in FIG.
The configuration of each unit of 102 will be specifically described.
【0049】図4は、画像入出力インタフェース1000の
構成を示すブロック図である。FIG. 4 is a block diagram showing the configuration of the image input / output interface 1000.
【0050】図示されるように、画像入出力インタフェ
ース1000は、アドレス制御部1102,1104と、タイミング
制御部1106,1108と、データバッファ1100と、白ライン
検出部1110と、ヘッダ情報作成部1500とを有する。As shown, the image input / output interface 1000 includes an address control unit 1102, 1104, a timing control unit 1106, 1108, a data buffer 1100, a white line detection unit 1110, and a header information creation unit 1500. Having.
【0051】また、白ライン検出部1110は、比較器1200
と、カウンタ1300と、白ライン判定回路1400と、ヘッダ
情報作成部1500とを具備する。すなわち、白ラインの検
出は、16ビット等1ワードのデータを読み込む毎に、そ
れを比較器1200でゼロ(白の画素値)と比較し、カウン
タ1300でその回数を数え、その値が予め定めた1ライン
のワード数に等しいかどうかを白ライン判定回路1400で
判定することにより、容易に行うことができる。The white line detector 1110 is provided with a comparator 1200
, A counter 1300, a white line determination circuit 1400, and a header information creation unit 1500. That is, every time one line of data such as 16 bits is read, the white line is detected by comparing it with zero (white pixel value) by the comparator 1200, counting the number of times by the counter 1300, and determining the value in advance. The white line determination circuit 1400 determines whether or not the number of words is equal to the number of words in one line.
【0052】ヘッダ情報作成部1500は、白ラインである
ことが分かれば、そのことを示すビットをヘッダに付加
し、ラインメモリ2000上の所定の領域にライトする。If it is determined that the line is a white line, the header information creating unit 1500 adds a bit indicating this to the header and writes the bit in a predetermined area on the line memory 2000.
【0053】図5は、算術符号復号部3000の構成を示す
ブロック図である。FIG. 5 is a block diagram showing a configuration of arithmetic code decoding section 3000.
【0054】図示されるように、算術符号復号部3000
は、コンテクスト生成器3200と、複数シンボル処理判定
器3300と、コンテクストメモリ3400と、白ライン検出回
路3100と、確率推定器3600と、算術符号器3500とを有す
る。As shown, the arithmetic code decoding unit 3000
Has a context generator 3200, a multiple symbol processing determiner 3300, a context memory 3400, a white line detection circuit 3100, a probability estimator 3600, and an arithmetic encoder 3500.
【0055】ラインメモリ2000から読み出された画像デ
ータは、コンテクスト生成器3200に入力され、そこで定
められた配置の参照画素の値によって、インデックス
(s)を出力する。コンテクスト生成器3200からは、さら
に、複数シンボル処理判定器3300に対して符号化シンボ
ルの周辺画素データが出力される。コンテクストメモリ
3400は、1024バイトのRAMで構成されている。このコ
ンテクストメモリ3400では、一つのコンテクストに1バ
イトが割り当てられ、各バイト内には、1ビットで表さ
れた符号化シンボルの予測値MPS(s)と確率推定器3600の
状態番号7ビットが記憶されている。The image data read from the line memory 2000 is input to the context generator 3200, and the index is determined by the value of the reference pixel having a predetermined arrangement.
Output (s). The context generator 3200 further outputs peripheral pixel data of the encoded symbol to the multiple symbol processing determiner 3300. Context memory
The 3400 is configured with 1024 bytes of RAM. In this context memory 3400, one byte is allocated to one context, and in each byte, the predicted value MPS (s) of the coded symbol represented by one bit and the state number 7 bits of the probability estimator 3600 are stored. Have been.
【0056】確率推定器3600は、ROMで構成された状
態遷移テーブルである。確率推定器3600は、LPSの領域
幅Qe(s)を算術符号器に出力する。The probability estimator 3600 is a state transition table composed of a ROM. Probability estimator 3600 outputs the region width Qe (s) of the LPS to the arithmetic encoder.
【0057】算術符号器3500は、符号化シンボル、MPS
(s)、Qe(s)および連続シンボル処理判定器3300の出力信
号である連続処理シンボル数を用いて、複数シンボルを
一括して算術符号化し、符号データ系列を出力する。Arithmetic encoder 3500 is used for encoding symbols, MPS
Using (s), Qe (s) and the number of consecutively processed symbols, which is the output signal of continuous symbol processing decision unit 3300, a plurality of symbols are collectively arithmetically encoded and a code data sequence is output.
【0058】複数シンボル処理判定器3300は、符号化シ
ンボルの周辺画素データ,算術符号器のAレジスタ値Ar
egおよびQe(s)を使って、そのシンボルから予め定めた
範囲内で連続処理可能なシンボル数の最大値を算出す
る。本実施の形態では、「2シンボル」、「4シンボ
ル」、「8シンボル」、「16シンボル」、「256シンボ
ル」の中から最大値を選ぶ構成となっている(後述)。The multi-symbol processing decision unit 3300 calculates the peripheral pixel data of the encoded symbol, the A register value Ar of the arithmetic encoder,
Using eg and Qe (s), the maximum value of the number of symbols that can be continuously processed within a predetermined range from the symbol is calculated. In the present embodiment, the maximum value is selected from “2 symbols”, “4 symbols”, “8 symbols”, “16 symbols”, and “256 symbols” (described later).
【0059】また、白ライン検出回路3100は、復号化時
に復元したラインが白ラインであることを検出し、ヘッ
ダにその情報を付加し、そのデータをラインメモリ2000
にライトする。白ライン検出回路3100の構成は、図1の
画像入出力インタフェース1000内の白ライン検出部1110
と同様であり、1ワード復元する毎にそれが白データか
どうかをカウントする。図6は、コンテクスト生成器32
00の構成を示すブロック図である。The white line detection circuit 3100 detects that the line restored at the time of decoding is a white line, adds the information to the header, and stores the data in the line memory 2000.
Write to The configuration of the white line detection circuit 3100 is the same as that of the white line detection unit 1110 in the image input / output interface 1000 shown in FIG.
Each time one word is restored, whether or not it is white data is counted. FIG. 6 shows the context generator 32.
It is a block diagram which shows the structure of 00.
【0060】図示されるように、コンテクスト生成器32
00は、3本のシフトレジスタ3201〜3203と、インデック
ス生成器3204と、全体を制御するタイミング制御回路32
05とで構成される。As shown, the context generator 32
00 denotes three shift registers 3201 to 3203, an index generator 3204, and a timing control circuit 32 for controlling the whole.
It consists of 05.
【0061】シフトレジスタは4バイトで構成され、シ
フトレジスタ3201は符号化/復号化ライン用であり、シ
フトレジスタ3202,3203は、参照ライン用である。符号
化のときは、画像データは、ラインメモリ2000から読み
出され、シフトレジスタの最下位バイトに順次入力され
る。シフトレジスタのビット位置は図示したようにc-7
〜c23、b-7〜b23、a-7〜a23の記号で識別することにす
る。The shift register is composed of 4 bytes. The shift register 3201 is for encoding / decoding lines, and the shift registers 3202 and 3203 are for reference lines. At the time of encoding, image data is read from the line memory 2000 and sequentially input to the least significant byte of the shift register. The bit position of the shift register is c-7 as shown.
It will be identified by symbols c23, b-7 to b23, and a-7 to a23.
【0062】まず、符号化時の動作を説明する。First, the operation at the time of encoding will be described.
【0063】初期状態で全てのレジスタはクリアする。
画像データはラインメモリから読み出され、最下位バイ
トに順次入力される。その後、符号化対象のライン第1
画素がa0の位置にくるまで左にシフトし、更に下位バイ
トをメモリから読み出し3バイトの画像データを詰め
る。参照ラインも同様に、ラインの第1画素がb0、c0に
来るようにする。In the initial state, all registers are cleared.
Image data is read from the line memory and sequentially input to the least significant byte. Then, the first line to be encoded
The pixel is shifted to the left until the pixel is at the position of a0, and the lower byte is read from the memory and 3 bytes of image data are packed. Similarly, the first line of the reference line is located at b0 and c0.
【0064】こうした時に、a0が符号化シンボル(図中
?で示される)であり、a-2、a-1、b-2、b-1、b0、b1、
b2、c-1、c0の位置にある10画素が参照画素である。以
上の部分は、図6で太線で囲んで示されている。At this time, a0 is a coded symbol (indicated by? In the figure), and a-2, a-1, b-2, b-1, b0, b1,.
The ten pixels at positions b2, c-1, and c0 are reference pixels. The above parts are shown by thick lines in FIG.
【0065】インデックス生成器3204は参照画素をa-
2、a-1、b-2、b-1、b0、b1、b2、c-1、c0の順に並べ
る。この10ビットデータが、コンテクストを識別するイ
ンデックス「s」となる。 符号化シンボル“?”を符
号化した後は逐次処理であれば、シフトレジスタ全体を
左に1ビットシフトして新しいコンテクストを作る(図
10)。The index generator 3204 converts the reference pixel into a-
2, a-1, b-2, b-1, b0, b1, b2, c-1, c0. This 10-bit data becomes the index “s” for identifying the context. After the encoding of the encoded symbol "?", In the case of sequential processing, the entire shift register is shifted left by one bit to create a new context (FIG. 10).
【0066】復号化のときは、復号シンボルはa0の位置
に書き込まれる。1シンボル毎の逐次処理では1シンボ
ル復号する毎にシフトレジスタを左に1ビットシフトす
る。復号データは8ビット毎にメモリに書き込む。At the time of decoding, the decoded symbol is written at the position of a0. In the sequential processing for each symbol, the shift register is shifted one bit to the left each time one symbol is decoded. The decoded data is written to the memory every 8 bits.
【0067】このデータは、シフトレジスタのa-7〜a-1
のバイトデータである。画像データの入出力、ビットシ
フトなど全体の動作タイミングはタイミング制御回路32
05によって制御する。This data is stored in the shift registers a-7 to a-1.
Byte data. The overall operation timing such as input / output of image data and bit shift is controlled by the timing control circuit 32.
Controlled by 05.
【0068】同一コンテクストとMPSが連続しているか
どうかを判定するために、画像データ3206が複数シンボ
ル処理判定器3300に出力される。出力される画像データ
は、a-2〜a15、 b-2〜b17、 c-1〜c16である。図7は、
複数シンボル処理判定器3300の構成を示すブロック図で
ある。Image data 3206 is output to multi-symbol processing determiner 3300 to determine whether the same context and MPS are continuous. The output image data is a-2 to a15, b-2 to b17, and c-1 to c16. FIG.
35 is a block diagram illustrating a configuration of a multiple symbol processing determiner 3300. FIG.
【0069】本実施の形態では、参照画素がすべて白の
コンテクストのみを連続処理の対象にしている。図示さ
れるように、複数シンボル処理判定器3300は、文字(も
しくはハーフトーン)部分における一括処理シンボル数
を決定するための第1の連続処理シンボル数判定部3340
と、白ライン(行間)部分に対する256シンボルの一括
処理が可能か否かを判定するための第2の連続処理シン
ボル数判定部3310(および判定回路3320)と、を有して
いる。In this embodiment, only contexts in which the reference pixels are all white are subjected to continuous processing. As shown in the figure, the multiple-symbol processing determination unit 3300 includes a first consecutively processed symbol number determination unit 3340 for determining the number of collectively processed symbols in a character (or halftone) portion.
And a second consecutively processed symbol number determination unit 3310 (and a determination circuit 3320) for determining whether or not batch processing of 256 symbols for a white line (line-to-line) portion is possible.
【0070】すなわち、文字ラインに関しては、第1の
連続処理シンボル数判定部3340で連続処理シンボル数を
判定する。白ライン(行間)については、第2の連続シ
ンボル数判定部3310と判定回路3320によって、予め定め
たシンボル数の連続処理が可能かどうかを判定する。第
2の連続処理シンボル数判定部3310は、8ビットシフタ
3311と、減算器3312と、比較器3313,3314と、を有す
る。That is, for the character line, the number of consecutively processed symbols is determined by the first continuously processed symbol number determination unit 3340. For the white line (between lines), the second continuous symbol number determination unit 3310 and the determination circuit 3320 determine whether or not continuous processing of a predetermined number of symbols is possible. The second consecutive processing symbol number determination unit 3310 includes an 8-bit shifter
3311, a subtractor 3312, and comparators 3313 and 3314.
【0071】第2の連続処理シンボル数判定部3310にお
いて、白ライン(符号化ラインと参照ラインが白画素で
あることは、図1の画像入出力インタフェース1000の働
きによって既に分かっているので、コンテクストの連続
性は検出済みである)についての、256シンボルの一括
処理が可能かどうかは、下記の式(1)および式(2)
が同時に満足されるか否かで判定される。 Areg 256*Qe(s) >= 0x8000 ……(1) 符号化シンボル= MPS(s)…………(2) なお、(1)式における0x8000は、Aregの初期値0x100
00(16進表記)の1/2である(図9参照)。Areg 256*Q
e(s)が、この値より小さくなると正規化処理が必要とな
るため、正規化処理の発生を避ける必要から(1)式が
満たされる必要がある。また、(2)式は、MPS(すな
わち予測値)の連続性も一括処理の条件となることを意
味する。In the second continuous processing symbol number determination section 3310, the white line (the fact that the coding line and the reference line are white pixels is already known by the operation of the image input / output interface 1000 in FIG. Continuity has already been detected), the following equations (1) and (2) determine whether or not batch processing of 256 symbols is possible.
Are determined at the same time. Areg 256 * Qe (s)> = 0x8000 (1) Coded symbol = MPS (s) ... (2) Note that 0x8000 in equation (1) is the initial value of Areg 0x100
It is 1/2 of 00 (hexadecimal notation) (see FIG. 9). Areg 256 * Q
If e (s) is smaller than this value, a normalization process is required. Therefore, it is necessary to satisfy Expression (1) to avoid the occurrence of the normalization process. Equation (2) means that the continuity of the MPS (that is, the predicted value) is also a condition for the batch processing.
【0072】第2の連続処理シンボル数判定部3310の8
ビットシフタ3311は、256*Qe(s)を計算し、減算器3312
にて、Areg 256*Qe(s)を計算する。そして、比較器331
3にて、減算器3312の出力値が0x8000以上であるかを判
定する。The second continuous processing symbol number determination section 3310
The bit shifter 3311 calculates 256 * Qe (s), and subtracts
Calculates Areg 256 * Qe (s). And the comparator 331
At 3, it is determined whether the output value of the subtractor 3312 is 0x8000 or more.
【0073】上述の(2)の条件は、符号化シンボルの
値がゼロであることは分かっているので(白の画素値を
ゼロとする)、MPS(s)を見れば判定できる。これらの
判定を行うのが判定回路3320である。Since it is known that the value of the encoded symbol is zero (the white pixel value is zero), the condition (2) can be determined by looking at MPS (s). The determination circuit 3320 performs these determinations.
【0074】判定回路3320には制御信号として“判定イ
ネーブル信号”が入力し、この信号がオン状態であれば
判定回路3320が機能する。ライン端の画素数が256画素
に満たない状態では、この判定イネーブル信号はオフ状
態になる。判定イネーブル信号は図1のシーケンス制御
部4000から出力される(不図示)。また、復号化時にお
いて、256シンボルの一括処理が可能か否かは、下記
(3)式および(4)式が同時に満足されるか否かで判
定される。 Areg 256*Qe(s) >= 0x8000 ……(3) Creg < Areg 256*Qe(s)……………(4) 参照ラインは白なので、コンテクストの連続性は検出済
みである。式(3)の条件は、符号化時と同様に判定す
る。式(4)の条件は、8ビットシフタ3311で256*Qe(s)
を計算し、減算器3312でAreg 256*Qe(s)を計算し、比
較器3314にて、減算器3312の出力がCレジスタの値(Cr
eg)より大きいかを判定する。A "judgment enable signal" is input as a control signal to the judging circuit 3320. If this signal is in the ON state, the judging circuit 3320 functions. When the number of pixels at the line end is less than 256, the determination enable signal is turned off. The determination enable signal is output from the sequence control unit 4000 in FIG. 1 (not shown). Also, at the time of decoding, whether or not batch processing of 256 symbols is possible is determined by whether or not the following equations (3) and (4) are simultaneously satisfied. Areg 256 * Qe (s)> = 0x8000 (3) Creg <Areg 256 * Qe (s) ... (4) Since the reference line is white, the continuity of the context has been detected. The condition of Expression (3) is determined in the same manner as in encoding. The condition of equation (4) is 256 * Qe (s) with 8-bit shifter 3311.
Is calculated, Areg 256 * Qe (s) is calculated by the subtractor 3312, and the output of the subtractor 3312 is calculated by the comparator 3314 as the value of the C register (Cr
eg) Determine if greater than.
【0075】白ライン(行間部分)についての256シン
ボルの一括処理が可能であると判定されると、判定回路
3320から出力される、白ラインの一括処理イネーブル信
号S1がアクティブとなる。If it is determined that 256 symbols can be collectively processed for a white line (inter-line portion), a determination circuit
The batch processing enable signal S1 for the white line output from the 3320 becomes active.
【0076】選択回路3330には、第1の連続処理シンボ
ル数判定部3340から出力されるシンボル数(2,4,
8,16のいずれか)と、白ライン用のシンボル256とが
並列に入力される。The selection circuit 3330 has the number of symbols (2, 4, 4) output from the first consecutively processed symbol number determination section 3340.
8 or 16) and a white line symbol 256 are input in parallel.
【0077】白ラインの一括処理イネーブル信号S1が
アクティブとなっているとときは、一括処理シンボル数
として「256」が採用され、それ以外のときは、第1の
連続処理シンボル数判定部3340から出力されるシンボル
数(2,4,8,16のいずれか)が採用される。このよ
うにして、図3の示したような適応的な一括符号化・復
号化処理が実現される。When the collective processing enable signal S1 for the white line is active, "256" is adopted as the collective processing symbol number, otherwise, the first consecutive processing symbol number determination unit 3340 The number of symbols to be output (any one of 2, 4, 8, and 16) is adopted. In this way, adaptive batch encoding / decoding processing as shown in FIG. 3 is realized.
【0078】次に、文字ラインにおける一括処理シンボ
ル数を決定するための第1の判定部3340の具体的な構成
について説明する。図8は、第1の連続処理シンボル数
判定部3340の構成を示すブロック図である。Next, a specific configuration of the first determination unit 3340 for determining the number of collectively processed symbols on a character line will be described. FIG. 8 is a block diagram showing a configuration of the first continuously processed symbol number determination section 3340.
【0079】本実施の形態では、連続処理可能な複数シ
ンボルの候補を、2シンボル,4シンボル,8シンボル
および16シンボルとし、各シンボル数について一括処理
(連続処理)が可能かどうかを同時に判定し、一括処理
可能と判定されたシンボル数の中から、同時に判定しそ
の中から最大値を選ぶ構成を採用している。In the present embodiment, the candidates for a plurality of symbols that can be continuously processed are 2, 4, 8, and 16 symbols, and it is simultaneously determined whether or not batch processing (continuous processing) is possible for each number of symbols. , The number of symbols determined to be batch-processable is determined at the same time, and the maximum value is selected therefrom.
【0080】図示されるように、第1の連続処理シンボ
ル数判定部3340は、1ビットシフタ3341〜4ビットシフ
タ3344と、減算器3345〜3348と、比較器3349〜3356と、
連続処理シンボル数判定回路3357と、コンテキスト/MP
Sの2連続判定回路3358〜16連続判定回路3361と、を
有している。As shown in the figure, the first consecutive processing symbol number determination unit 3340 includes 1-bit shifters 3341 to 4 bit shifters 3344, subtractors 3345 to 3348, comparators 3349 to 3356,
Continuous processing symbol number judgment circuit 3357 and context / MP
S continuation determination circuit 3358 to 16 continuation determination circuit 3361 of S.
【0081】シフタ3341〜3344,減算器3345〜3348,比
較器3349〜3356は、白ライン用の第2の連続処理判定回
路3310(図7)と同様の構成である。第1の連続処理シ
ンボル数判定回路3340では、コンテキスト/MPSの判定
回路3358〜3361が設けられていて、コンテキスト(参照
画素)の連続性も随時、判定するようになっている。第
2の連続処理シンボル数判定回路3310の場合には、図1
の画像入出力インタフェース1000で白の連続(つまり、
コンテクストの連続性)が既に判定されていたが、文字
ラインについては、前もって取得された情報がないた
め、コンテキストの連続性も随時、判定する必要がある
からである。The shifters 3341 to 3344, the subtracters 3345 to 3348, and the comparators 3349 to 3356 have the same configuration as the second continuous processing determination circuit 3310 (FIG. 7) for the white line. In the first continuous processing symbol number determination circuit 3340, context / MPS determination circuits 3358 to 3361 are provided, and the continuity of the context (reference pixel) is determined at any time. In the case of the second consecutively processed symbol number determination circuit 3310, FIG.
White continuous (that is,
This is because the continuity of the context has already been determined, but the continuity of the context needs to be determined from time to time as there is no information previously obtained for the character line.
【0082】以下、16シンボルの一括処理が可能である
かを判定する場合について、説明する。2,4,8の各
シンボル数分の一括処理判定の場合も同様である。Hereinafter, a case will be described in which it is determined whether batch processing of 16 symbols is possible. The same applies to the case of batch processing determination for each of 2, 4, and 8 symbols.
【0083】4ビットシフタ3341,減算器3342,比較器3
343,比較器3344,コンテクスト/MPS 16連続判定回路3
345では、16シンボルの連続処理が可能かどうかの判定
情報を作り、連続処理シンボル数判定回路3357に入力す
る。The 4-bit shifter 3341, the subtractor 3342, and the comparator 3
343, comparator 3344, context / MPS 16 continuous judgment circuit 3
At 345, determination information as to whether or not continuous processing of 16 symbols is possible is generated and input to the continuous processing symbol number determination circuit 3357.
【0084】すなわち、一括(連続)の符号化処理を行
なう場合には、コンテクスト(参照画素の状態)が所定
のパターンであること(例えば、全部の画素が白である
状態が続いていること)と、符号化シンボルについての
優勢シンボル値(MPS)が所定パターンであること(つ
まり、連続していること)の双方を判定する必要があ
る。MPSの連続も判定するのは、参照画素が同じであっ
ても、符号化対象の画素の値によってMPSが変化し、こ
の場合には一括した処理ができないからである。That is, when performing a batch (continuous) encoding process, the context (state of the reference pixel) is a predetermined pattern (for example, a state where all the pixels are white). And that the dominant symbol value (MPS) for the coded symbol is a predetermined pattern (that is, continuous). The reason for determining the continuity of MPS is that even if the reference pixels are the same, the MPS changes depending on the value of the pixel to be encoded, and in this case, batch processing cannot be performed.
【0085】図6で説明したコンテクスト生成器3200に
蓄積された画像データは、同一コンテクストとMPSが連
続しているかどうかを判定するために、第1の連続処理
シンボル数判定部3340に出力される。ここで、出力され
る画像データは、図6のa-2〜a15,b-2〜b17,c-1〜c16
の各ビット位置のデータであるものとする。The image data stored in the context generator 3200 described with reference to FIG. 6 is output to the first consecutive processing symbol number determination section 3340 to determine whether the same context and the MPS are continuous. . Here, the output image data is a-2 to a15, b-2 to b17, and c-1 to c16 in FIG.
Is the data at each bit position.
【0086】16シンボルの一括処理に対応した検出器
は、4ビットシフタ3344,減算器3348,比較器3355,比
較器3356と、コンテクスト/MPSの16連続判定回路3361
と、を有している。A detector corresponding to batch processing of 16 symbols includes a 4-bit shifter 3344, a subtractor 3348, a comparator 3355, a comparator 3356, and a 16-continuation determination circuit 3361 of context / MPS.
And
【0087】4ビットシフタ3344,減算器3348,比較器3
355,比較器3356は、一括の符号化処理を行なった場合
に正規化処理が必要となるかを判断するための判定情報
を取得する部分を構成する。なお、比較器3356は復号化
時に使用するものである。また、コンテクスト/MPSの1
6連続判定回路3361は、所定パターンの連続を検出する
部分である。The 4-bit shifter 3344, subtractor 3348, comparator 3
355 and the comparator 3356 constitute a part for acquiring determination information for determining whether or not normalization processing is required when performing collective encoding processing. The comparator 3356 is used at the time of decoding. In addition, context / MPS 1
The six continuation determination circuit 3361 is a part that detects continuation of a predetermined pattern.
【0088】4ビットシフタ3344は、LPSの領域幅Qe(s)
を左に4ビットシフトして16倍する。シフタ出力は16*Qe
(s)である。減算器3348ではAreg 16*Qe(s)を計算す
る。比較器3355は、その値と0x8000を比較する。0x8000
はAregの初期値0x10000の1/2である。The 4-bit shifter 3344 has a region width Qe (s) of the LPS.
Is shifted 4 bits to the left and multiplied by 16. 16 * Qe shifter output
(s). The subtractor 3348 calculates Areg 16 * Qe (s). The comparator 3355 compares the value with 0x8000. 0x8000
Is 1/2 of the initial value of Areg 0x10000.
【0089】比較器3355の出力は、 Areg 16*Qe(s) >=
0x8000 であれば、"1"、 そうでなければ"0"となる。
ここで、Areg 16*Qe(s) >= 0x8000であれば、正規化処
理は起こらないので、連続処理可能な条件の一つが満た
される。例えば、図9において、Aregの初期値Qe(s)
を16回連続して減算したとき、オージェントの値が0x80
00を上回る場合(図9中の状態P1)には一括処理が可
能と判定され、0x8000を下回る場合(図9中の状態P
2)には一括処理不可と判定される。The output of the comparator 3355 is Areg 16 * Qe (s)> =
If it is 0x8000, it is "1", otherwise it is "0".
Here, if Areg 16 * Qe (s)> = 0x8000, normalization processing does not occur, and one of the conditions for continuous processing is satisfied. For example, in FIG. 9, the initial value Qe (s) of Areg
Is subtracted 16 times consecutively, the value of the agent is 0x80
When the value exceeds 00 (state P1 in FIG. 9), it is determined that batch processing is possible, and when the value is less than 0x8000 (state P1 in FIG. 9).
In 2), it is determined that batch processing is not possible.
【0090】一方、コンテクスト/MPS 16連続判定回路
3361は、画像データを参照して、同一コンテクストとMP
S(s)が16連続しているかどうかを判定する。このために
参照する画像データは、図6のa-2〜a15,b-2〜b17,c-
1〜c16の各位置にある画像データである。On the other hand, the context / MPS 16 continuous judgment circuit
3361 refers to the image data and
It is determined whether S (s) is continuous 16 times. The image data referred to for this purpose is a-2 to a15, b-2 to b17, and c- in FIG.
Image data at each position of 1 to c16.
【0091】本実施例では、これらの画素が全て「白」
または全て「黒」を判定する。MPSの符号化を前提とす
るので、MPS(s)と画素の値が一致していることも判定条
件である。コンテクストが連続するということは、図10
に示すように、一画素分だけ右にシフトした場合でも、
参照画素(X)に変化が生じないことをいう。また、MP
S(s)が連続しているということは、図10に示すよう
に、予測値(?)も1画素分だけ右にシフトした場合に
も変化が生じないことをいう。In this embodiment, these pixels are all “white”.
Alternatively, all are determined to be “black”. Since encoding of MPS is assumed, it is also a determination condition that MPS (s) matches the pixel value. Continuity of context means that
As shown in the figure, even if it is shifted right by one pixel,
This means that no change occurs in the reference pixel (X). Also MP
The fact that S (s) is continuous means that no change occurs even when the predicted value (?) Is also shifted right by one pixel as shown in FIG.
【0092】判定条件が全て満たされると、コンテキス
ト/MPS 16連続判定回路3361の出力信号は"1"となり、
そうでなければ"0"となる。比較器3355の出力信号が"1"
であり、かつ、コンテキスト/MPS 16連続判定回路3361
の出力が"1"のときに、連続処理シンボル数判定回路335
7は、16シンボルの連続処理が可能であると判断する。When all the judgment conditions are satisfied, the output signal of the context / MPS 16 continuation judgment circuit 3361 becomes "1",
Otherwise, it is "0". Output signal of comparator 3355 is "1"
And the context / MPS 16 continuation determination circuit 3361
Is "1", the number of consecutively processed symbols determination circuit 335
7 determines that continuous processing of 16 symbols is possible.
【0093】8シンボル,4シンボルおよび2シンボル
の連続処理の判断も同様である。これらの異なるシンボ
ル数の判定は同時に(並行して)実行する。The same applies to the determination of continuous processing of 8, 4, and 2 symbols. The determination of these different symbol numbers is performed simultaneously (in parallel).
【0094】連続処理シンボル数判定回路3357は、4つ
の判定結果から連続処理できるシンボル数の最大値を選
択する。このような選択を実行する論理回路は、入力信
号の組み合わせで容易に実現できる。選択された連続処
理シンボル数は、算術符号器3500とコンテクスト生成器
3200に出力される。The continuous processing symbol number determination circuit 3357 selects the maximum value of the number of symbols that can be continuously processed from the four determination results. A logic circuit for performing such selection can be easily realized by a combination of input signals. The number of consecutive processing symbols selected is determined by the arithmetic encoder 3500 and the context generator.
Output to 3200.
【0095】以上説明した、一括処理シンボル数の適応
的可変処理をまとめると、図11のようになる。FIG. 11 summarizes the adaptive variable processing of the number of symbols to be collectively processed as described above.
【0096】すなわち、まず、一括してQeを減算した場
合に、中央値(0x8000)以上となるかを判定する(ステ
ップ10)。YESであるならば、続いて、コンテクスト/M
PSの連続を判定し(ステップ20)、連続性がある場合に
は、一括処理を行なう(ステップ30)。一方、ステップ
10またはステップ20において、Noである場合には、逐次
処理(一シンボル毎の処理)を行なう(ステップ40)。That is, first, it is determined whether or not the Qe is subtracted from the median (0x8000) or more when the Qe is subtracted in a lump (step 10). If yes, then context / M
The continuity of PS is determined (step 20), and if there is continuity, batch processing is performed (step 30). Meanwhile, step
If the answer is No in 10 or 20, sequential processing (processing for each symbol) is performed (step 40).
【0097】次に、算術符号器3500について説明する。
図12は算術符号器3500の構成を示すブロック図である。Next, the arithmetic encoder 3500 will be described.
FIG. 12 is a block diagram showing a configuration of the arithmetic encoder 3500.
【0098】図示されるように、算術復号器3500は、動
作を統括的に制御するシーケンス制御部3501と、Aレジ
スタ3502と、Cレジスタ3508と、シフタ3506と、Qeレジ
スタ3507と、ALU3503と、シフタ3504と、シリアルパ
ラレル変換器3505と、を具備している。As shown in the figure, the arithmetic decoder 3500 includes a sequence control section 3501 for controlling the operation in general, an A register 3502, a C register 3508, a shifter 3506, a Qe register 3507, an ALU 3503, A shifter 3504 and a serial / parallel converter 3505 are provided.
【0099】算術符号化演算は、加算,減算,シフト演
算の組み合わせで実行できる。符号化シンボルとMPS(s)
はシーケンス制御部3501に入力され、ここで、符号化シ
ンボルとMPS(s)が一致するかが比較,判定される。一致
した場合はMPSシンボルの符号化が行われ、そうでなけ
れば、LPSシンボルの符号化が行われる。The arithmetic coding operation can be executed by a combination of addition, subtraction, and shift operation. Coded symbols and MPS (s)
Is input to the sequence control unit 3501, where it is determined whether the coded symbol matches MPS (s). If they match, encoding of the MPS symbol is performed; otherwise, encoding of the LPS symbol is performed.
【0100】MPS(s)の符号化の手順が図13に示され
る。すなわち、MPSの符号化では、 Aレジスタ3502の値A
regを、Areg = Areg Qe(s)とし(ステップ300)、 Areg
>= 0x8000 であれば(ステップ310)、処理を終了す
る。そうでなければ、AregとQe(s)を比較し(ステップ3
20)、Areg < Qe(s)であれば、A= Qe(s)、Creg = Creg
+ Aregとする(ステップ330)。FIG. 13 shows the procedure for encoding MPS (s). That is, in MPS encoding, the value A of the A register 3502
Let reg be Areg = Areg Qe (s) (step 300) and Areg
If> = 0x8000 (step 310), the process ends. Otherwise, compare Areg with Qe (s) (step 3
20) If Areg <Qe (s), then A = Qe (s), Creg = Creg
+ Areg (step 330).
【0101】その後、正規化処理によってAreg >= 0x80
00になるまで左シフトを行う(ステップ340)。このと
き、図12のCレジスタ(Creg)3508も同じビット数分だ
け左シフトする。これらの演算はALU(算術論理演算回
路)3503やシフタ3504で実行できる。Then, Areg> = 0x80 by normalization processing
The left shift is performed until it becomes 00 (step 340). At this time, the C register (Creg) 3508 in FIG. 12 also shifts to the left by the same number of bits. These operations can be executed by an ALU (arithmetic logic operation circuit) 3503 and a shifter 3504.
【0102】このときCレジスタ(Creg)3508から、左
にあふれるビットデータをシリアルパラレル変換器3505
で変換したものが符号データバイトとなる。図13のステ
ップ310のおいて、”No”であれば、符号は生成され
ず、ステップ320,330,340を実行する場合だけ符号が
出力されることになる。LPSの符号化も、MPS同様の算術
論理演算の組み合わせで実行できる。At this time, the bit data overflowing to the left is converted from the C register (Creg) 3508 to the serial / parallel converter 3505.
The code data bytes are converted into code data bytes. In step 310 of FIG. 13, if "No", no code is generated, and the code is output only when steps 320, 330, and 340 are executed. LPS encoding can also be performed by a combination of arithmetic and logical operations similar to MPS.
【0103】図12に示されるように、連続シンボル数は
シフタ3506に入力し、これがシフトビット数となる。同
じくデータとして、シフタ3506にはQe(s)が入力し、 シ
ンボル数分の左シフトを行った値がQeレジスタ3507に入
る。符号化演算は上記の説明でQe(s)をQeレジスタの値
で置き換える以上、符号化について説明した。次に復号
化について説明する。但し、符号化と共通する説明は省
略する。As shown in FIG. 12, the number of consecutive symbols is input to shifter 3506, which becomes the number of shift bits. Similarly, Qe (s) is input to shifter 3506 as data, and a value obtained by performing a left shift by the number of symbols is input to Qe register 3507. The encoding operation has been described above by replacing Qe (s) with the value of the Qe register in the above description. Next, decoding will be described. However, description common to encoding will be omitted.
【0104】図14は、逐次処理の場合のシンボル復号化
フローである。この図を用いてMPSの一括復号条件を説
明する。FIG. 14 is a symbol decoding flow in the case of sequential processing. The batch decoding condition of the MPS will be described with reference to FIG.
【0105】このフローで必ずMPS(s)として復号される
のは、 Creg < Aregの比較(ステップ410)でYesとな
り、更にAreg < 0x8000(ステップ420)でNoとなる場合
である。その他のケースでは、 Cond_MPS_exchage(ス
テップ430)やCond_LPS_exchage(ステップ450)の処理
ルーチン(図示せず)で、復号シンボルDは、MPS(s)に
も1 MPS(s)にもなる。In this flow, MPS (s) is always decoded when Creg <Areg is compared (step 410), and when Areg <0x8000 (step 420), no. In other cases, in the processing routine (not shown) of Cond_MPS_exchage (Step 430) or Cond_LPS_exchage (Step 450), the decoded symbol D becomes either MPS (s) or 1 MPS (s).
【0106】連続して復号化するシンボル数を16とする
と、 D = MPS(s)となるルートを16回通る条件は次の通
りである。 Creg < Areg 16*Qe(s) かつ Areg 16*Qe(s) < 0x8000…(5) コンテクストが16シンボル分同じで、上記の条件が満足
されれば、16シンボルをMPS(s)として復元できる。これ
は図6のシフトレジスタのa0の位置にMPS(s)を設定した
まま16ビット左シフトを行うことで実行できる。Assuming that the number of symbols to be decoded continuously is 16, the condition for passing the route where D = MPS (s) 16 times is as follows. Creg <Areg 16 * Qe (s) and Areg 16 * Qe (s) <0x8000 ... (5) If the context is the same for 16 symbols and the above condition is satisfied, 16 symbols can be restored as MPS (s) . This can be performed by performing a 16-bit left shift with MPS (s) set at the position of a0 in the shift register in FIG.
【0107】図12においてシンボルの復号化は、外部の
符号メモリ(図示せず)から1バイトのデータをCレジ
スタ3508に入力し、Aレジスタ3502の値との比較によっ
て行われる。演算の詳細は省略するが、復元されたシン
ボルはシーケンス制御部3501からコンテクスト生成器32
00に出力される。図8における連続処理シンボル数の判
定動作は符号化時とほぼ同様であるが、復号化のときに
は上述の式(5)の第一条件の判定が加わる。この判定は
比較器3356によってCregとAreg 16*Qe(s)の比較をする
ことによって行われる。In FIG. 12, decoding of a symbol is performed by inputting 1-byte data from an external code memory (not shown) to a C register 3508 and comparing it with the value of an A register 3502. Although the details of the calculation are omitted, the restored symbol is sent from the sequence generator 3501 to the context generator 32.
Output to 00. The operation of determining the number of consecutively processed symbols in FIG. 8 is almost the same as that at the time of encoding. This determination is made by comparing Creg with Areg 16 * Qe (s) by the comparator 3356.
【0108】2シンボル,4シンボル,8シンボルの判
定も16シンボルの場合と同様に、またこれらは符号化時
同様に同時に実行される。これらの判定結果をもとに連
続処理シンボル数判定回路3357で、最大処理シンボル数
が選択され算術符号器に出力される。The determination of 2 symbols, 4 symbols, and 8 symbols is performed at the same time as in the case of 16 symbols, and at the same time at the time of encoding. The maximum number of symbols to be processed is selected by the continuous processing symbol number determination circuit 3357 based on these determination results and output to the arithmetic encoder.
【0109】以上のように、文字ラインについては、符
号化時、復号化時に予め定めた範囲内で連続処理できる
シンボルの最大値が選択できる。したがって、画像パタ
ーンや解像度の変化に適応して高速化処理が可能とな
る。また、複数の検出器の各々に連続シンボル数を割り
当てて並列に検出させ、各々の出力の中から最大値を選
択するというハードウエアによる手法を採用するので、
高速な処理が容易に実現されるというメリットもある。As described above, for a character line, the maximum value of symbols that can be continuously processed within a predetermined range during encoding and decoding can be selected. Therefore, high-speed processing can be performed in accordance with changes in the image pattern and the resolution. In addition, since the number of consecutive symbols is assigned to each of the plurality of detectors and detected in parallel, and a maximum value is selected from each output, a hardware method is adopted.
There is also an advantage that high-speed processing is easily realized.
【0110】なお、本実施の形態では、「正規化処理を
発生させないこと」を一括処理を行なう条件の一つとし
ているが、必ず、これを条件としなければならないとい
うものではない。上述のとおり、正規化処理をすると計
算が複雑化するので、正規化処理が発生しない範囲で一
括処理を行なうのが望ましい、ということである。In the present embodiment, “no normalization processing” is one of the conditions for performing the batch processing, but this is not necessarily a condition. As described above, since the normalization process complicates the calculation, it is desirable to perform the batch process within a range where the normalization process does not occur.
【0111】ちなみに、正規化処理が発生しても一括処
理をする場合には、以下のような処理をすることにな
る。By the way, when batch processing is performed even if normalization processing occurs, the following processing is performed.
【0112】上述の説明のとおり、一括処理では、コン
テクスト(s)に対して、Aregの値をAreg−n*Qe(s)
とnシンボル分まとめて計算する。ここで、nシンボル
の符号化,復号化中に正規化が発生すると、Qe(s)の値
はあらかじめ定められた確率推定器の状態遷移によって
更新され、Qe'(s)となる。このような場合には,Areg−
n*Qe(s)と単純に計算することはできない。As described above, in the batch processing, the value of Areg is changed to Areg−n * Qe (s) for the context (s).
And n symbols are calculated together. Here, when normalization occurs during encoding and decoding of n symbols, the value of Qe (s) is updated by a predetermined state transition of the probability estimator, and becomes Qe ′ (s). In such a case, Areg-
It cannot be simply calculated as n * Qe (s).
【0113】したがって、この場合には、正規化が起こ
るまでのシンボル数を、Areg,Qe(s),0x8000を使って計
算し、それをn1とすると、Aregは、次のように計算され
ることになる。 Areg−{n1*Qe(s)+(n−n1)*Qe'(s)} この場合、n1と(n-n1)が2のべき乗であれば計算は
容易であるが、一般的にはそうでないので、シフタに代
わって乗算器が必要となる。したがって、装置構成に余
裕があるのであれば、このような場合にも、本発明を適
用して一括処理(連続処理)を行なえる。Therefore, in this case, the number of symbols until normalization occurs is calculated using Areg, Qe (s), 0x8000, and when it is set to n1, Areg is calculated as follows. Will be. Areg− {n1 * Qe (s) + (n−n1) * Qe ′ (s)} In this case, if n1 and (n−n1) are powers of 2, calculation is easy, but generally, Otherwise, a multiplier is needed instead of the shifter. Therefore, if there is room in the device configuration, the present invention can be applied to perform batch processing (continuous processing) even in such a case.
【0114】図15は、前掲の2つの実施の形態にかかる
QM符号/復号化回路を搭載したファクシミリ装置のハー
ドウエア構成を示すブロック図である。FIG. 15 relates to the above two embodiments.
FIG. 3 is a block diagram illustrating a hardware configuration of a facsimile apparatus equipped with a QM encoding / decoding circuit.
【0115】図示されるように、このファクシミリ装置
は、ホストプロセッサ102と、MH/MR/MMR符号
/復号化回路103と、解像度変換や拡大・縮小等の処理
を行なう画像処理回路104と、QM符号/復号化回路105
と、画像ラインメモリ106と、符号メモリ107と、モデム
などの通信インタフェース(電話回線113等を用いた有
線伝送のためのインタフェースとして機能する)108
と、スキャナ等の画像入力装置111と、プリンタなどの
画像記録/表示装置112と、を具備し、各ブロックは内
部バス109,110を介して相互に情報の授受を行うことが
できる。上述の本発明の回路構成は、QM符号/復号化回
路105に搭載されている。As shown, the facsimile apparatus includes a host processor 102, an MH / MR / MMR encoding / decoding circuit 103, an image processing circuit 104 for performing processing such as resolution conversion and enlargement / reduction, and a QM Encoding / decoding circuit 105
, An image line memory 106, a code memory 107, and a communication interface such as a modem (which functions as an interface for wired transmission using the telephone line 113 or the like) 108
, An image input device 111 such as a scanner, and an image recording / display device 112 such as a printer. Each block can exchange information with each other via internal buses 109 and 110. The above-described circuit configuration of the present invention is mounted on the QM encoding / decoding circuit 105.
【0116】本発明の適用によって、画像の種類に柔軟
に適応して高速な算術符号化・復号化が実現され、この
点でファクシミリ装置(通信装置)の高機能化を図るこ
とができる。特に、ファクシミリ複合機等では、原稿を
高速によみとって圧縮する必要があり、その読取り速度
に圧縮処理の速度が追従する必要があり、本発明を適用
する効果が大きい。By applying the present invention, high-speed arithmetic coding / decoding can be realized flexibly by adapting to the type of image, and in this respect, the function of the facsimile apparatus (communication apparatus) can be enhanced. In particular, in a facsimile multifunction peripheral or the like, it is necessary to compress a document at a high speed, and it is necessary for the speed of the compression process to follow the reading speed, and the effect of applying the present invention is great.
【0117】以上の説明では、余白部分を「白ライン
(あるいは全白)」であるとして記載しているが、「黒
ライン(全黒)」でも同様である。また、行間と文字ラ
インとを区別し、それぞれの部分で独自の処理(適応処
理)を施すという技術思想は、算術符号復号化だけでな
く、その他の符号復号化の場合にも変形,応用して適用
することができる。In the above description, the blank portion is described as “white line (or all white)”, but the same applies to “black line (all black)”. In addition, the technical idea of distinguishing line spacing from character lines and performing unique processing (adaptive processing) in each part is not only applied to arithmetic code decoding, but is modified and applied to other code decoding. Can be applied.
【0118】[0118]
【発明の効果】以上説明したように、本発明では文字ラ
インと行間の白ラインを識別し、白ラインは文字ライン
よりも充分大きなシンボル数で一括処理することによ
り、符号化・復号化を大幅に高速化することができる。
白ラインの適応処理により、行間の多い画像では20%程
度の高速化が図れる。また、文字ラインについては、予
め定めた範囲内で最大のシンボル数を選択することによ
り、画像の局所状態に適応した一括処理が可能となる。
そして、これらの相乗効果によって、従来にない、柔軟
かつ高速な適応符号化・復号化処理が実現される。As described above, in the present invention, character lines and white lines between lines are identified, and the white lines are collectively processed with a sufficiently large number of symbols as compared to the character lines, so that encoding / decoding is greatly improved. Can be faster.
The white line adaptive processing can speed up the image by about 20% for an image with many lines. For character lines, by selecting the maximum number of symbols within a predetermined range, batch processing adapted to the local state of the image can be performed.
By these synergistic effects, a flexible and high-speed adaptive encoding / decoding process, which has not been achieved in the past, is realized.
【図1】(a)本発明の画像コーディックの全体構成を
示すブロック図 (b)1ラインの画像データにヘッダ情報が付加された
データ形式を示す図FIG. 1A is a block diagram illustrating an entire configuration of an image codec according to the present invention. FIG. 1B is a diagram illustrating a data format in which header information is added to one line of image data.
【図2】符号化対象の画像の一例を示す図FIG. 2 is a diagram showing an example of an image to be encoded.
【図3】図1の画像コーディックにおける特徴的な動作
手順を示すフロー図FIG. 3 is a flowchart showing a characteristic operation procedure in the image codec of FIG. 1;
【図4】画像入出力インタフェースの具体的構成を示す
ブロック図FIG. 4 is a block diagram showing a specific configuration of an image input / output interface;
【図5】算術符号復号部の具体的構成を示すブロック図FIG. 5 is a block diagram showing a specific configuration of an arithmetic code decoder.
【図6】コンテクスト生成器の構成を示すブロック図FIG. 6 is a block diagram showing a configuration of a context generator.
【図7】複数シンボル処理判定器の構成を示すブロック
図FIG. 7 is a block diagram showing a configuration of a multi-symbol processing determination unit.
【図8】第1の連続処理シンボル数判定部の構成を示す
ブロック図FIG. 8 is a block diagram showing a configuration of a first continuously processed symbol number determination unit.
【図9】一括した算術符号化の条件を説明するための図FIG. 9 is a diagram for explaining conditions for batch arithmetic coding;
【図10】コンテクストおよびMPSが連続している状態
を説明するための図FIG. 10 is a diagram for explaining a state in which a context and MPS are continuous.
【図11】文字ラインに対する符号化処理の手順を示す
フロー図FIG. 11 is a flowchart showing a procedure of an encoding process for a character line;
【図12】算術符号器の構成を示すブロック図FIG. 12 is a block diagram illustrating a configuration of an arithmetic encoder.
【図13】QM-coderのMPS処理(シンボル逐次処理)の
手順を示すフロー図FIG. 13 is a flowchart showing the procedure of MPS processing (symbol sequential processing) of the QM-coder.
【図14】QM-coderのシンボル復号化処理(シンボル逐
次処理)の手順を示すフロー図FIG. 14 is a flowchart showing the procedure of symbol decoding processing (symbol sequential processing) of the QM-coder.
【図15】本発明の符号化・復号化装置を搭載したファ
クシミリ装置の構成を示すブロック図FIG. 15 is a block diagram showing a configuration of a facsimile device equipped with the encoding / decoding device of the present invention.
【図16】QMコーダーの基本的な構成を示すブロック
図FIG. 16 is a block diagram showing a basic configuration of a QM coder.
【図17】算術符号化の概念を説明するための図FIG. 17 is a diagram for explaining the concept of arithmetic coding;
104 画像メモリ 102 画像コーディック 1000 画像入出力インタフェース 1100 データバッファ 1110 白ライン検出部 1111 ヘッダ情報 1112 1ラインの画像データ 1500 ヘッダ情報作成部 2000 ラインメモリ 3000 算術符号復号部 4000 シーケンス制御部 104 Image memory 102 Image codec 1000 Image input / output interface 1100 Data buffer 1110 White line detection unit 1111 Header information 1112 One line image data 1500 Header information creation unit 2000 Line memory 3000 Arithmetic code decoding unit 4000 Sequence control unit
───────────────────────────────────────────────────── フロントページの続き (58)調査した分野(Int.Cl.7,DB名) H04N 1/41 - 1/419 ──────────────────────────────────────────────────続 き Continued on the front page (58) Field surveyed (Int.Cl. 7 , DB name) H04N 1/41-1/419
Claims (10)
って符号化シンボルを予測し、その予測結果を符号化す
る符号化方法において、符号化ラインと参照ラインが共
に白ラインであることが検出された場合には、非白ライ
ンに対して一括した符号復号化を行なう場合のシンボル
数よりも大きなシンボル数にて、前記符号化ラインを一
括して符号化することを特徴とする符号化方法。In an encoding method for predicting an encoded symbol based on a value of a reference pixel around the encoded symbol and encoding the prediction result, it is detected that both the encoded line and the reference line are white lines. In this case, the coding line is collectively coded with a larger number of symbols than the number of symbols used when performing collective decoding of non-white lines.
符号化を行なう場合のシンボル数よりも小さい値をもつ
複数のシンボル数の中から、符号化の対象の画像の局所
的性質に応じて一つを選択して、適応的に符号化を行な
うことを特徴とする請求項1記載の符号化方法。2. The method according to claim 1, wherein the non-white line is selected from a plurality of symbols having a value smaller than the number of symbols when collective encoding of white lines is performed, according to a local property of an image to be encoded. 2. The encoding method according to claim 1, wherein one of them is selected and encoding is performed adaptively.
って復号化シンボルを予測し、その予測結果を復号化す
る復号化方法において、参照ラインが白ラインであるこ
とが検出された場合には、非白ラインに対して一括した
復号化を行なう場合のシンボル数よりも大きなシンボル
数にて、前記復号化ラインを一括して復号化することを
特徴とする復号化方法。3. A decoding method for predicting a decoded symbol based on a value of a reference pixel around the decoded symbol and decoding a result of the prediction, when it is detected that the reference line is a white line, A decoding method, wherein the decoding lines are collectively decoded with a larger number of symbols than when collectively decoding non-white lines.
復号化を行なう場合のシンボル数よりも小さい値をもつ
複数のシンボル数の中から、復号化の対象の画像の局所
的性質に応じて一つを選択して、適応的に復号化を行な
うことを特徴とする請求項3記載の復号化方法。4. A non-white line is selected from a plurality of symbols having a value smaller than the number of symbols when performing white line batch decoding according to the local property of an image to be decoded. 4. The decoding method according to claim 3, wherein one is selected and decoding is performed adaptively.
って符号化シンボルを予測し、その予測結果を符号化す
る符号化装置において、 符号化ラインと参照ラインが共に白ラインであることを
検出する白ライン検出部と、 この白ライン検出手段によって白ラインが検出された場
合に、非白ラインに対して一括した符号化を行なう場合
のシンボル数よりも大きなシンボル数にて、その白ライ
ンを一括符号化することが可能か否かを判定する第1の
複数シンボル処理判定部と、 前記白ラインについて一括符号化を行なう場合よりも小
さな値をもつ、予め定められている複数のシンボル数の
うち、一括符号化が現実に可能なシンボル数を検出し、
検出されたシンボル数のうちの最大のものを選択して出
力する第2の複数シンボル処理判定部と、 前記第1の複数シンボル処理判定部によって一括処理可
能であると判定された場合には、白ラインの一括処理用
のシンボル数を選択し、前記第1の複数シンボル処理判
定部によって一括処理不可であると判定された場合ある
いは非白ラインの符号化の場合には、前記第2の複数シ
ンボル処理判定部から出力されるシンボル数を選択する
一括処理シンボル数選択部と、 この一括処理シンボル数選択部によって選択されたシン
ボル数にて、予測符号化を行なう符号化部と、を有する
ことを特徴とする符号化装置。5. An encoding apparatus for predicting an encoded symbol based on a value of a reference pixel around the encoded symbol and encoding the prediction result, detects that both the encoded line and the reference line are white lines. When a white line is detected by the white line detection unit and the white line detection unit, the white lines are collectively collected with a larger number of symbols than the number of symbols when collectively encoding non-white lines. A first plurality of symbol processing determination unit that determines whether encoding is possible or not; and a predetermined number of symbols having a smaller value than when collective encoding is performed on the white line. , Detect the number of symbols that can be collectively encoded,
A second plural-symbol processing determination unit that selects and outputs the largest one of the detected number of symbols; and if the first multiple-symbol processing determination unit determines that batch processing is possible, The number of symbols for batch processing of white lines is selected, and when the first multiple symbol processing determination unit determines that batch processing is not possible or in the case of non-white line encoding, the second plurality of symbols are selected. A batch processing symbol number selection unit that selects the number of symbols output from the symbol processing determination unit; and an encoding unit that performs predictive encoding using the symbol number selected by the batch processing symbol number selection unit. An encoding device characterized by the above-mentioned.
と、前記符号化部による符号化処理は並列に行われるこ
とを特徴とする請求項5記載の符号化装置。6. The encoding apparatus according to claim 5, wherein the detection processing by the white line detection unit and the encoding processing by the encoding unit are performed in parallel.
って復号化シンボルを予測し、その予測結果を符号化す
る復号化装置において、 参照ラインが白ラインであることを検出する白ライン検
出部と、 この白ライン検出手段によって白ラインが検出された場
合に、非白ラインに対して一括した復号化を行なう場合
のシンボル数よりも大きなシンボル数にて、その白ライ
ンを一括復号化することが可能か否かを判定する第1の
複数シンボル処理判定部と、 前記白ラインについて一括復号化を行なう場合よりも小
さな値をもつ、予め定められている複数のシンボル数の
うち、一括復号化が現実に可能なシンボル数を検出し、
検出されたシンボル数のうちの最大のものを選択して出
力する第2の複数シンボル処理判定部と、 前記第1の複数シンボル処理判定部によって一括処理可
能であると判定された場合には、白ラインの一括処理用
のシンボル数を選択し、前記第1の複数シンボル処理判
定部によって一括処理不可であると判定された場合ある
いは非白ラインの符号化の場合には、前記第2の複数シ
ンボル処理判定部から出力されるシンボル数を選択する
一括処理シンボル数選択部と、 この一括処理シンボル数選択部によって選択されたシン
ボル数にて、予測復号化を行なう復号化部と、を有する
ことを特徴とする復号化装置。7. A decoding apparatus for predicting a decoded symbol based on a value of a reference pixel around the decoded symbol and encoding the prediction result, comprising: a white line detecting unit for detecting that a reference line is a white line; When a white line is detected by the white line detection means, the white line can be collectively decoded with a larger number of symbols than the number of symbols when collectively decoding non-white lines. A first plural-symbol processing determination unit that determines whether or not it is possible; and, among the predetermined number of symbols having a smaller value than when performing the collective decoding for the white line, the collective decoding is performed. Detect the number of symbols that are actually possible,
A second plural-symbol processing determination unit that selects and outputs the largest one of the detected number of symbols; and if the first multiple-symbol processing determination unit determines that batch processing is possible, The number of symbols for batch processing of white lines is selected, and when the first multiple symbol processing determination unit determines that batch processing is not possible or in the case of non-white line encoding, the second plurality of symbols are selected. A batch processing symbol number selection unit for selecting the number of symbols output from the symbol processing determination unit; and a decoding unit for performing predictive decoding with the number of symbols selected by the batch processing symbol number selection unit. A decoding device characterized by the above-mentioned.
と、前記復号化部による符号化処理は並列に行われるこ
とを特徴とする請求項7記載の復号化装置。8. The decoding apparatus according to claim 7, wherein the detection processing by the white line detection unit and the encoding processing by the decoding unit are performed in parallel.
装置を具備する通信装置。9. A communication device comprising the encoding device according to claim 5 or 6.
化装置を具備する通信装置。10. A communication device comprising the decoding device according to claim 7.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP23083999A JP3308940B2 (en) | 1999-08-17 | 1999-08-17 | Encoding method and decoding method |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP23083999A JP3308940B2 (en) | 1999-08-17 | 1999-08-17 | Encoding method and decoding method |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2001057638A JP2001057638A (en) | 2001-02-27 |
| JP3308940B2 true JP3308940B2 (en) | 2002-07-29 |
Family
ID=16914101
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP23083999A Expired - Fee Related JP3308940B2 (en) | 1999-08-17 | 1999-08-17 | Encoding method and decoding method |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP3308940B2 (en) |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP3457269B2 (en) | 2000-07-18 | 2003-10-14 | パナソニック コミュニケーションズ株式会社 | Arithmetic encoding / decoding method and arithmetic encoding / decoding device |
Families Citing this family (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2006049987A (en) * | 2004-07-30 | 2006-02-16 | Sony Corp | Code insertion device and code insertion method |
Citations (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2000224426A (en) | 1999-01-28 | 2000-08-11 | Nec Ic Microcomput Syst Ltd | Encoding method by jbig and recording medium recording jbig program |
| JP2000350043A (en) | 1999-06-04 | 2000-12-15 | Matsushita Graphic Communication Systems Inc | Arithmetic coder and arithmetic decoder |
Family Cites Families (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US5185820A (en) * | 1990-10-10 | 1993-02-09 | Fuji Xerox Co., Ltd. | System for compressing image data having blank lines |
-
1999
- 1999-08-17 JP JP23083999A patent/JP3308940B2/en not_active Expired - Fee Related
Patent Citations (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2000224426A (en) | 1999-01-28 | 2000-08-11 | Nec Ic Microcomput Syst Ltd | Encoding method by jbig and recording medium recording jbig program |
| JP2000350043A (en) | 1999-06-04 | 2000-12-15 | Matsushita Graphic Communication Systems Inc | Arithmetic coder and arithmetic decoder |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP3457269B2 (en) | 2000-07-18 | 2003-10-14 | パナソニック コミュニケーションズ株式会社 | Arithmetic encoding / decoding method and arithmetic encoding / decoding device |
Also Published As
| Publication number | Publication date |
|---|---|
| JP2001057638A (en) | 2001-02-27 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP3332619B2 (en) | Decoding device and method thereof | |
| US5297220A (en) | Image processing system for image compression and decompression | |
| US6243416B1 (en) | Image coding and decoding methods, image coder, and image decoder | |
| US5363219A (en) | Image processing method and apparatus | |
| US5317428A (en) | Image encoding method and apparatus providing variable length bit stream signals | |
| US5151949A (en) | System and method employing multiple predictor sets to compress image data having different portions | |
| US5655032A (en) | Coding method and apparatus therefor | |
| US5404138A (en) | Apparatus for decoding variable length codes | |
| JPWO2009050766A1 (en) | Video compression encoding / restoration device, video compression encoding / restoration program, and video generation / output device | |
| JP3350482B2 (en) | Arithmetic encoding device and arithmetic decoding device | |
| JP2002033925A (en) | Method arithmetic encoding and decoding, and apparatus for arithmetic encoding and decoding | |
| JP3308940B2 (en) | Encoding method and decoding method | |
| US6167160A (en) | Encoding and decoding methods and devices, and image processing apparatus using the same | |
| JPH0460391B2 (en) | ||
| JPH10271013A (en) | Compression method for data, compression method for picture data and compression device | |
| JPH04270564A (en) | Serial picture data compression system having color information | |
| US6058216A (en) | Apparatus for encoding image data | |
| US5185820A (en) | System for compressing image data having blank lines | |
| JP3139460B2 (en) | Method and apparatus for encoding binary document image | |
| JPH05151349A (en) | Image data compression method and encoding circuit | |
| JP3855376B2 (en) | Image encoding device | |
| JP3622042B2 (en) | Encoder, decoder and encoder / decoder | |
| JP3862590B2 (en) | Image processing apparatus and method, computer program, and computer-readable storage medium | |
| JP3255808B2 (en) | Compression / expansion device | |
| JP3223118B2 (en) | Image encoding device, image decoding device, and image encoding / decoding device |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20090517 Year of fee payment: 7 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20090517 Year of fee payment: 7 |
|
| S111 | Request for change of ownership or part of ownership |
Free format text: JAPANESE INTERMEDIATE CODE: R313111 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20090517 Year of fee payment: 7 |
|
| R350 | Written notification of registration of transfer |
Free format text: JAPANESE INTERMEDIATE CODE: R350 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20100517 Year of fee payment: 8 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20110517 Year of fee payment: 9 |
|
| LAPS | Cancellation because of no payment of annual fees |