JP2004159246A - Device and method for generating prediction error and storage medium therefor - Google Patents

Device and method for generating prediction error and storage medium therefor Download PDF

Info

Publication number
JP2004159246A
JP2004159246A JP2002325177A JP2002325177A JP2004159246A JP 2004159246 A JP2004159246 A JP 2004159246A JP 2002325177 A JP2002325177 A JP 2002325177A JP 2002325177 A JP2002325177 A JP 2002325177A JP 2004159246 A JP2004159246 A JP 2004159246A
Authority
JP
Japan
Prior art keywords
block
prediction
pixel block
prediction error
pixel
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2002325177A
Other languages
Japanese (ja)
Inventor
Takeshi Kondo
健 近藤
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.)
Panasonic Holdings Corp
Original Assignee
Matsushita Electric Industrial Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Matsushita Electric Industrial Co Ltd filed Critical Matsushita Electric Industrial Co Ltd
Priority to JP2002325177A priority Critical patent/JP2004159246A/en
Publication of JP2004159246A publication Critical patent/JP2004159246A/en
Pending legal-status Critical Current

Links

Images

Landscapes

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

Abstract

<P>PROBLEM TO BE SOLVED: To provide a prediction error generating device with high prediction accuracy. <P>SOLUTION: This prediction error generating device is provided with a block shift register means for shifting and inputting binary image data in each pixel block composed of a plurality of pixels, a block exclusive OR means for performing exclusive OR between each of pixel blocks of the block shift register means and a pixel block under consideration, a block prediction counting means for using an output of the block exclusive OR means to perform counting in each of the pixel blocks, a reference pixel block position updating means for using an output of the block prediction counting means to update a block position of a reference pixel block, and a prediction error outputting means for outputting exclusive OR between the reference pixel block of the reference pixel block position updating means and the pixel block under consideration as a prediction error. <P>COPYRIGHT: (C)2004,JPO

Description

【0001】
【発明の属する技術分野】
本発明は画像データを高能率に圧縮伸長する画像符号化に用いられる予測誤差生成装置、予測誤差生成方法、及びその記憶媒体に関するものである。
【0002】
【従来の技術】
プリンタ、スキャナ、複写機、ファクシミリ等の高解像度化、カラー化に伴って、プリンタ、スキャナ等のデータ入出力装置、データ蓄積装置、ネットワーク通信装置などの記憶容量、伝送時間削減のためのデータ圧縮技術が重要となってきている。
【0003】
プリンタ、複写機等のデータ出力装置で用いる一般的な画像データは2値画像である。従ってこのような2値画像に対して効率的に圧縮を行うことが重要である。2値画像としては、ディザ画像等があり、自然画像等の中間調画像に対してこのような方式で階調変換した2値画像は、ドットの白/黒の変化が頻繁に発生する。そのためロスレス圧縮する場合そのままのデータを符号化するのでなく、スクリーンによる2値画像データやディザ画像は周期的に相関の強い画素が出現することを用い、相関の強い画素を用いて現画素の白/黒の予測を行い(以下、予測符号化と呼ぶ)、予測の当り外れを表す予測誤差データ系列に対してランレングス符号などによる符号化を行って圧縮率の向上を図っている(例えば特許文献1参照)。
【0004】
以下にスクリーンによる2値画像やディザ画像に対する従来の予測誤差生成手法を説明する。図10は従来の予測誤差生成装置の構成図である。従来の予測誤差生成装置においては予め発生される可能性のあるスクリーンに対してそのスクリーン間隔およびスクリーン角度に対応する画素a,b,c,dを観測画素として設定し、xを注目画素として注目画素xと観測画素のそれぞれとの排他的論理和を行いその結果を観測画素毎にカウントし、判断回路においてスクリーン間隔およびスクリーン角度を求めそれを用いて予測部において予測誤差データを生成している。ここで注目画素xおよび観測画素a,b,c,dはイメージデータの入力に従いシフト方向へと画素データをシフトしていく。図11は観測画素に合った画像データ例を示す図である。すなわち、図11は画像スクリーンを用いて生成された入力であり注目ラインを見ると注目画素xと観測画素cとの相関が見られる。このデータの場合に判断回路は観測画素cの位置を相関の最大点としてスクリーン間隔およびスクリーン角度を出力し、予測部はそれを元に予測誤差生成を行う。図11の例で観測画素cをもとに予測誤差を求めた場合は全て一致して予測誤差データとしては全て一致したデータ例えば全て“0”のデータ出力が行われる。
【0005】
【特許文献1】
特許第2797950号公報(図1)
【0006】
【発明が解決しようとする課題】
しかしながら、上記従来の方法では、予め相関の強い画素の数画素を観測画素として固定しており、画像スクリーンの相関に対しては予測精度が良いが、ビジネス文書等に良く見られる画像スクリーンと異なる相関間隔を持つパターンによる描画、例えば斜線等の背景など、に対しては例えば図12の観測画素の合わない画像データ例を示す図に示すように、画像データが入力された場合に観測画素a,b,c,dとは相関が取れずに予測精度が悪化するという問題点を有していた。この場合には図12において更にeの位置を観測画素として予め用意しておけばいいが、このような観測画素がパターン描画画像においては様々な観測位置が必要とされて観測画素が多数必要となり判断回路の判断も複雑化してしまうという問題点がある。
【0007】
本発明は上記従来の問題点を解決するもので、画像スクリーンおよび画像スクリーンと異なる相関間隔を持つパターン描画部の双方に対して予測精度の良い予測誤差生成装置を提供することを目的としている。
【0008】
【課題を解決するための手段】
上記課題を解決するために、本発明は画素ブロック毎に注目画素ブロックとの排他的論理和を行い、その結果により画素ブロック毎にブロック予測カウントを行うことにより1画素毎に予測カウントを行う場合に比べ注目画素より遠くの画素に対する相関をより少ないカウンタで検出でき、また処理が画素ブロック毎に行われる為により高速な予測誤差生成が行え、参照画素ブロック位置を任意に決定できるため、画像スクリーンだけでなくスクリーン間隔とは異なるパターン描画部でも予測精度の良い予測誤差生成装置が得られる。
【0009】
【発明の実施の形態】
本発明の請求項1に記載の発明は、周辺画素を用いて画素値の予測を行い、予測値の当り外れを表す予測誤差データ系列を作成する予測誤差生成装置において、2値イメージデータを複数の画素からなる画素ブロック毎にシフトし入力するブロックシフトレジスタ手段と、該ブロックシフトレジスタ手段の各々の画素ブロックと注目画素ブロックとの排他的論理和を行うブロック排他的論理和手段と、該ブロック排他的論理和手段の出力を用い画素ブロック毎のカウントを行うブロック予測カウント手段と、該ブロック予測カウント手段の出力を用いて参照画素ブロックのブロック位置更新を行うを参照画素ブロック位置更新手段と、該参照画素ブロック位置更新手段出力の参照画素ブロックと注目画素ブロックとの排他的論理和を予測誤差として出力を行う予測誤差出力手段とを備えたことにより、画像スクリーンおよびパターン描画部の双方に対して予測精度の良い予測誤差生成を行うことができるという作用を有する。
【0010】
請求項2に記載の発明は、ブロック予測カウント手段において注目画素ブロックの画素値が全て0の場合にはカウントを行わないことにより白背景部等での参照画素変更が行われずに予測精度の良い予測誤差生成を行うことができるという作用を有する。
【0011】
請求項3に記載の発明は、参照画素ブロック位置更新手段においてある画素ブロックに対するブロック予測カウント値が第1の閾値に達しても、現在の参照画素ブロックに対するブロック予測カウント値が第2の閾値を越えている場合には参照画素ブロック位置の更新を行わないことにより頻繁な参照画素ブロック位置変更が行われない予測誤差生成を行うことができるという作用を有する。
【0012】
(実施の形態1)
以下、本発明の実施の形態1について説明する。図1は本発明の実施の形態1における予測誤差生成装置を用いた画像符合化装置のブロック図を表している。
【0013】
図1において1は本発明の予測誤差生成装置全体を示す。1の予測誤差生成装置は2のブロックシフトレジスタ手段、3のブロック排他的論理和手段、4のブロック予測カウント手段、5の参照画素ブロック位置更新手段、および6の予測誤差出力手段から構成される。
【0014】
図2に本発明の実施の形態1におけるブロックシフトレジスタ手段構成図を示す。図2において8は画素ブロックを示す。図3は本発明の実施の形態1における画素ブロック図であり、画素10の1画素を8画素分をまとめたもので構成される。またブロックシフトレジスタ手段2は観測画素ブロックとなる32個の画素ブロック8のおよび注目画素ブロック9から構成され、図2のように画素ブロック毎にシフト方向へとシフトする。
【0015】
図4は本発明の実施の形態1におけるブロック排他的論理和手段構成図を表している。ブロックシフトレジスタ手段2における観測画素ブロックと注目画素ブロック9とをビット毎に排他的論理和をとり、8ビットから構成される画素ブロック排他的論理和出力11を生成する。これを観測画素ブロックの32ブロックに対して行い、ブロック排他的論理和手段の出力とする。
【0016】
図5は本発明の実施の形態1におけるブロック予測カウント手段フローチャートである。ブロック予測カウント手段においてはS100において観測画素ブロックにおける図4のブロック排他的論理和手段により得られた画素ブロック排他的論理和11の出力値が0であればS101へ進み、0でなければカウントを行わずに終了する。またS101で9の注目画素ブロックの8画素が全て0であるかを判断し、0であればカウントを行わずに終了し、0でなければS102においてその観測画素ブロックにおけるブロック予測カウント値を1だけインクリメントして終了する。
【0017】
図6は本発明の実施の形態1における参照画素ブロック位置更新手段フローチャート、図7は予測誤差データ生成例を示す図である。まずS103においてブロック予測カウント手段4から出力された各々のブロック予測カウント値の中でいずれかのブロック予測カウント値が第1の閾値に達しているかどうかを判定し、達していなければ参照ブロック位置の更新を行わずに終了し、達していればS104へと進む。S104においては現在の参照ブロック位置に対応するブロック予測カウント値が第2の閾値以上であるかどうかを判定し、閾値以上であればS106へ進み全ての観測画素ブロックに対応するブロック予測カウント値を0にして終了し、そうでなければS105へと進む。S105においては予測誤差出力手段6による予測誤差出力を行った後に参照ブロック位置をS103で検出したブロック予測カウント値が第1の閾値に達した画素ブロックの1つへと更新を行い、S106において全ての観測画素ブロックに対応するブロック予測カウント値を0にして終了する。
【0018】
図1の予測誤差出力手段6は図2の注目画素ブロック9と現在の参照画素ブロックとの排他的論理和をとり、8ビットのデータを予測誤差データとして出力を行う。例としては図7のような参照画素ブロックデータと注目画素ブロックデータの場合には予測誤差データとしては1ビットのみが1となる予測誤差データが得られる。
【0019】
本発明の実施の形態1の画像符号化装置では、本発明の図1の予測誤差生成装置1の予測誤差データ出力を用いて、図1のランレングス符号化器7を用いることにより、符号化を行っている。ランレングス符号化器7は組織的な符号であるWyle符号を用いて符合化を行う。図8は本発明の実施の形態1におけるランレングス符号化器のラン長カウント例を示す図である。図9は本発明の実施の形態1におけるランレングス符号化器のWyle符号テーブルを示す図である。図8は予測誤差生成装置出力3画素ブロック分のデータ24ビットで、ラン長としてはビット値“1”から次のビット値“1”までのビット値“0”の個数を計数してラン長とする。図8の例では{6,0,6,8}となる。そのラン長に対して図9のWyle符号の割り当てを行い符号化を行う。図9でWyle符号の*の部分には0〜3のラン長以外ではラン長から図9の当てはまるラン長範囲の最小値を引いたものをビット表現で置き換え、ラン長0〜3の場合にはラン長そのものをビット表現で置き換える。図8の例ではラン長6に対しては“10”と6−4=2をビット表現した“10”、ラン長0に対しては“0”と0をビット表現した“00”、ラン長8に対しては“110”と8−8=0をビット表現した“000”が符号として割り当てられ、“1010000110000”13ビットの符号がランレングス符号化器の符号出力として出力される。
【0020】
以上のようにして本発明の予測誤差生成装置を用いた画像符号化装置の画像符号化が行われる。
【0021】
以上のように、前述した実施の形態の機能を実現するソフトウェアのプログラムコードを記録した記憶媒体を、システムあるいは装置に供給し、そのシステムあるいは装置のコンピュータ(またはCPUやMPU)が記憶媒体に格納されたプログラムコードを読み出し実行することによっても、本発明の目的が達成されることは言うまでもない。
【0022】
この場合、記憶媒体から読み出されたプログラムコード自体が本発明の新規な機能を実現することになり、そのプログラムコードを記憶した記憶媒体は本発明を構成することになる。
【0023】
プログラムコードを供給するための記憶媒体としては、例えば、フロッピー(R)ディスク、ハードディスク、光ディスク、光磁気ディスク、CD−ROM、CD−R、磁気テープ、不揮発性のメモリカード、ROM、EEPROM等を用いることができる。
【0024】
また、コンピュータが読み出したプログラムコードを実行することにより、前述した実施の形態の機能が実現されるだけでなく、そのプログラムコードの指示に基づき、コンピュータ上で稼動しているOS(オペレーティングシステム)等が実際の処理の一部または全部を行い、その処理によって前述した実施の形態の機能が実施される場合も含まれることは言うまでもない。
【0025】
さらに、記憶媒体から読み出されたプログラムコードが、コンピュータに挿入された機能拡張ボードやコンピュータに接続された機能拡張ユニットに備わるメモリに書き込まれた後、そのプログラムコードの指示に基づき、その機能拡張ボードや機能拡張ユニットに備わるCPU等が実際の処理の一部または全部を行い、その処理によって前述した実施の形態の機能が実現される場合も含まれることは言うまでもない。
【0026】
【発明の効果】
以上のように本発明によれば、周辺画素を用いて画素値の予測を行い、予測値の当り外れを表す予測誤差データ系列を作成する予測誤差生成装置において、2値イメージデータを複数の画素からなる画素ブロック毎にシフトし入力するブロックシフトレジスタ手段と、該ブロックシフトレジスタ手段の各々の画素ブロックと注目画素ブロックとの排他的論理和を行うブロック排他的論理和手段と、該ブロック排他的論理和手段の出力を用い画素ブロック毎のカウントを行うブロック予測カウント手段と、該ブロック予測カウント手段の出力を用いて参照画素ブロックのブロック位置更新を行うを参照画素ブロック位置更新手段と、該参照画素ブロック位置更新手段出力の参照画素ブロックと注目画素ブロックとの排他的論理和を予測誤差として出力を行う予測誤差出力手段とを備えたことを特徴とする予測誤差生成装置であって、観測画素ブロックと注目画素ブロックとの排他的論理和出力を用いたカウンタを備え参照画素ブロックを逐次更新することにより、様々な画像スクリーンおよびパターン描画画像において良好な予測誤差を生成できる予測誤差生成装置を実現することができる。
【0027】
また、前記ブロック予測カウント手段において注目画素ブロックの画素値が全て0の場合にはカウントを行わないことにより白背景部等でのカウントを行わないので、予測精度の良い予測誤差生成を行う予測誤差生成装置を実現することができる。
【0028】
また、前記参照画素ブロック位置更新手段においてある画素ブロックに対するブロック予測カウント値が第1の閾値に達しても、現在の参照画素ブロックに対するブロック予測カウント値が第2の閾値を越えている場合には参照画素ブロック位置の更新を行わないことにより頻繁な参照画素ブロック位置の更新を行わない予測誤差生成装置を実現することができる。
【図面の簡単な説明】
【図1】本発明の実施の形態1における予測誤差生成装置を用いた画像符号化装置のブロック図
【図2】本発明の実施の形態1におけるブロックシフトレジスタ手段構成図
【図3】本発明の実施の形態1における画素ブロック図
【図4】本発明の実施の形態1におけるブロック排他的論理和手段構成図
【図5】本発明の実施の形態1におけるブロック予測カウント手段フローチャート
【図6】本発明の実施の形態1における参照画素ブロック位置更新手段フローチャート
【図7】予測誤差データ生成例を示す図
【図8】本発明の実施の形態1におけるランレングス符号化器のラン長カウント例を示す図
【図9】本発明の実施の形態1におけるランレングス符号化器のWyle符号テーブルを示す図
【図10】従来の予測誤差生成装置の構成図
【図11】観測画素に合った画像データ例を示す図
【図12】観測画素の合わない画像データ例を示す図
【符号の説明】
1 予測誤差生成装置
2 ブロックシフトレジスタ手段
3 ブロック排他的論理和手段
4 ブロック予測カウント手段
5 参照画素ブロック位置更新手段
6 予測誤差出力手段
7 ランレングス符号化器
8 画素ブロック
9 注目画素ブロック
10 画素
11 画素ブロック排他的論理和出力
[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to a prediction error generation device, a prediction error generation method, and a storage medium used for image encoding for compressing and expanding image data with high efficiency.
[0002]
[Prior art]
As the resolution, color, and the like of printers, scanners, copiers, and facsimile machines increase, data compression to reduce the storage capacity and transmission time of data input / output devices such as printers and scanners, data storage devices, and network communication devices. Technology is becoming important.
[0003]
General image data used in data output devices such as printers and copiers are binary images. Therefore, it is important to efficiently compress such a binary image. As a binary image, there is a dither image or the like. In a binary image obtained by performing gradation conversion on a halftone image such as a natural image by such a method, white / black changes of dots frequently occur. Therefore, in the case of lossless compression, instead of encoding the data as it is, binary image data or a dither image on the screen uses the fact that pixels with strong correlation appear periodically, and the white pixels of the current pixel are used using pixels with strong correlation. / Black prediction (hereinafter, referred to as prediction encoding), and a compression error rate is improved by encoding a prediction error data sequence indicating a hit or miss of the prediction by a run length code or the like (for example, see Patent Reference 1).
[0004]
A conventional prediction error generation method for a binary image or dither image on a screen will be described below. FIG. 10 is a configuration diagram of a conventional prediction error generation device. In a conventional prediction error generation device, pixels a, b, c, and d corresponding to the screen interval and the screen angle are set as observation pixels for a screen which may be generated in advance, and x is set as a target pixel. The exclusive OR of the pixel x and each of the observation pixels is performed, and the result is counted for each observation pixel. A screen interval and a screen angle are obtained in the determination circuit, and the prediction error data is generated in the prediction unit using the obtained screen intervals and screen angles. . Here, the target pixel x and the observed pixels a, b, c, and d shift the pixel data in the shift direction according to the input of the image data. FIG. 11 is a diagram showing an example of image data suitable for an observation pixel. That is, FIG. 11 is an input generated using the image screen, and when the target line is viewed, the correlation between the target pixel x and the observation pixel c is seen. In the case of this data, the judgment circuit outputs the screen interval and the screen angle using the position of the observation pixel c as the maximum point of the correlation, and the prediction unit generates a prediction error based on the screen interval and the screen angle. In the example of FIG. 11, when the prediction errors are obtained based on the observation pixels c, all the data coincide with each other, and as the prediction error data, all data, for example, all “0” data are output.
[0005]
[Patent Document 1]
Japanese Patent No. 2797950 (FIG. 1)
[0006]
[Problems to be solved by the invention]
However, in the above-described conventional method, several pixels having a strong correlation are fixed as observation pixels in advance, and the prediction accuracy is good for the correlation of the image screen, but is different from the image screen often seen in business documents and the like. For drawing by a pattern having a correlation interval, for example, a background such as a diagonal line, for example, as shown in FIG. , B, c, and d, there is a problem that the prediction accuracy is deteriorated because the correlation is not obtained. In this case, the position of e may be prepared in advance as an observation pixel in FIG. 12, but such observation pixels require various observation positions in a pattern drawing image, and a large number of observation pixels are required. There is a problem that the judgment of the judgment circuit is complicated.
[0007]
An object of the present invention is to solve the above-mentioned conventional problems, and an object of the present invention is to provide a prediction error generation device with high prediction accuracy for both an image screen and a pattern drawing unit having a different correlation interval from the image screen.
[0008]
[Means for Solving the Problems]
In order to solve the above-mentioned problem, the present invention performs an exclusive OR operation with a target pixel block for each pixel block, and performs a block prediction count for each pixel block based on the result, thereby performing a prediction count for each pixel. Since the correlation for pixels farther than the pixel of interest can be detected with a smaller number of counters, the processing is performed for each pixel block, a faster prediction error can be generated, and the reference pixel block position can be determined arbitrarily. In addition, a prediction error generation device with high prediction accuracy can be obtained even in a pattern drawing unit different from the screen interval.
[0009]
BEST MODE FOR CARRYING OUT THE INVENTION
According to a first aspect of the present invention, there is provided a prediction error generating apparatus for predicting a pixel value using a peripheral pixel and generating a prediction error data sequence representing a deviation of a prediction value from a plurality of binary image data. A block shift register means for shifting and inputting for each pixel block composed of pixels of the above, a block exclusive OR means for performing an exclusive OR operation of each pixel block of the block shift register means and the pixel block of interest, A block prediction counting unit that performs counting for each pixel block by using an output of the exclusive OR unit; and a reference pixel block position updating unit that performs block position updating of a reference pixel block by using an output of the block prediction counting unit; The exclusive OR of the reference pixel block and the pixel block of interest output from the reference pixel block position update means is calculated as a prediction error. By having the prediction error output means to perform output, an effect that it is possible to perform good prediction error generating predictive accuracy for both the image screen and the pattern drawing unit.
[0010]
According to the second aspect of the present invention, when the pixel values of the target pixel block are all 0 in the block prediction counting means, the counting is not performed, so that the reference pixel is not changed in a white background portion or the like, and the prediction accuracy is high. This has the effect that a prediction error can be generated.
[0011]
According to a third aspect of the present invention, even if the block prediction count value for a certain pixel block reaches the first threshold value in the reference pixel block position updating means, the block prediction count value for the current reference pixel block does not exceed the second threshold value. When it exceeds, there is an effect that by not updating the reference pixel block position, it is possible to generate a prediction error without frequent change of the reference pixel block position.
[0012]
(Embodiment 1)
Hereinafter, Embodiment 1 of the present invention will be described. FIG. 1 is a block diagram of an image encoding device using a prediction error generating device according to Embodiment 1 of the present invention.
[0013]
In FIG. 1, reference numeral 1 denotes the whole prediction error generation device of the present invention. The prediction error generating device includes two block shift register means, three block exclusive OR means, four block prediction counting means, five reference pixel block position updating means, and six prediction error output means. .
[0014]
FIG. 2 shows a block diagram of the block shift register means according to the first embodiment of the present invention. In FIG. 2, reference numeral 8 denotes a pixel block. FIG. 3 is a pixel block diagram according to the first embodiment of the present invention, which is configured by combining one pixel of pixel 10 for eight pixels. The block shift register means 2 is composed of 32 pixel blocks 8 to be observed pixel blocks and a target pixel block 9, and shifts in the shift direction for each pixel block as shown in FIG.
[0015]
FIG. 4 shows a block diagram of the block exclusive OR means according to the first embodiment of the present invention. An exclusive OR of the observed pixel block and the target pixel block 9 in the block shift register means 2 is calculated for each bit, and a pixel block exclusive OR output 11 composed of 8 bits is generated. This is performed for the 32 observation pixel blocks, and is output from the block exclusive OR means.
[0016]
FIG. 5 is a flowchart of the block prediction counting means according to the first embodiment of the present invention. In the block prediction counting means, if the output value of the pixel block exclusive OR 11 of the observed pixel block obtained by the block exclusive OR means in FIG. 4 is 0 in S100, the process proceeds to S101. Exit without doing. In step S101, it is determined whether all eight pixels of the pixel block of interest 9 are 0. If 0, the process ends without counting. If not 0, the block prediction count value of the observed pixel block is set to 1 in step S102. Increments and ends.
[0017]
FIG. 6 is a flowchart of a reference pixel block position updating unit according to Embodiment 1 of the present invention, and FIG. 7 is a diagram illustrating an example of generating prediction error data. First, in S103, it is determined whether any one of the block prediction count values among the block prediction count values output from the block prediction count means 4 has reached the first threshold value. The process ends without updating, and if it has reached, the process proceeds to S104. In S104, it is determined whether or not the block prediction count value corresponding to the current reference block position is equal to or larger than the second threshold value. If the block prediction count value is equal to or larger than the threshold value, the process proceeds to S106 and the block prediction count values corresponding to all observed pixel blocks are set. The process ends with 0, and otherwise proceeds to S105. In S105, after the prediction error output by the prediction error output means 6 is performed, the reference block position is updated to one of the pixel blocks in which the block prediction count value detected in S103 has reached the first threshold value. Then, the block prediction count value corresponding to the observation pixel block is set to 0, and the process ends.
[0018]
The prediction error output means 6 in FIG. 1 performs an exclusive OR operation on the target pixel block 9 in FIG. 2 and the current reference pixel block, and outputs 8-bit data as prediction error data. For example, in the case of the reference pixel block data and the target pixel block data as shown in FIG. 7, prediction error data in which only one bit is 1 is obtained as prediction error data.
[0019]
The image coding apparatus according to the first embodiment of the present invention uses the prediction error data output of the prediction error generating apparatus 1 of FIG. 1 of the present invention to perform coding by using the run-length encoder 7 of FIG. It is carried out. The run-length encoder 7 performs encoding using a Wyle code which is a systematic code. FIG. 8 is a diagram showing an example of the run length count of the run length encoder according to Embodiment 1 of the present invention. FIG. 9 is a diagram showing a Wyle code table of the run-length encoder according to Embodiment 1 of the present invention. FIG. 8 shows data of 24 bits corresponding to three pixel blocks output from the prediction error generator. The run length is calculated by counting the number of bit values “0” from a bit value “1” to the next bit value “1”. And In the example of FIG. 8, it is {6, 0, 6, 8}. The Wyle code shown in FIG. 9 is assigned to the run length and coding is performed. In FIG. 9, the * portion of the Wyle code replaces the run length minus the minimum value of the applicable run length range of FIG. 9 with a bit expression for run lengths other than 0 to 3 in the case of run lengths 0 to 3. Replaces the run length itself with a bit representation. In the example of FIG. 8, “10” representing “10” and 6−4 = 2 as bits for run length 6, “00” representing “0” and 0 as bits for run length 0, For the length 8, "000" which represents "110" and 8-8 = 0 as bits is assigned as a code, and a 13-bit code "1010000110000" is output as a code output of the run-length encoder.
[0020]
As described above, the image encoding of the image encoding device using the prediction error generation device of the present invention is performed.
[0021]
As described above, the storage medium storing the program codes of the software for realizing the functions of the above-described embodiments is supplied to the system or the apparatus, and the computer (or CPU or MPU) of the system or the apparatus stores the storage medium in the storage medium. It goes without saying that the object of the present invention is also achieved by reading and executing the program code thus set.
[0022]
In this case, the program code itself read from the storage medium implements the novel function of the present invention, and the storage medium storing the program code constitutes the present invention.
[0023]
Examples of a storage medium for supplying the program code include a floppy (R) disk, hard disk, optical disk, magneto-optical disk, CD-ROM, CD-R, magnetic tape, nonvolatile memory card, ROM, and EEPROM. Can be used.
[0024]
When the computer executes the readout program code, not only the functions of the above-described embodiments are realized, but also an OS (Operating System) or the like running on the computer based on the instructions of the program code. Does a part or all of the actual processing, and the processing implements the functions of the above-described embodiments.
[0025]
Further, after the program code read from the storage medium is written into a memory provided on a function expansion board inserted into the computer or a function expansion unit connected to the computer, the function expansion is performed based on the instruction of the program code. It goes without saying that a CPU or the like provided in the board or the function expansion unit performs part or all of the actual processing, and the processing realizes the functions of the above-described embodiments.
[0026]
【The invention's effect】
As described above, according to the present invention, in a prediction error generation device that performs prediction of a pixel value using peripheral pixels and creates a prediction error data sequence representing a deviation of a prediction value, binary image data is converted into a plurality of pixels. A block shift register means for shifting and inputting for each pixel block, a block exclusive OR means for performing an exclusive OR operation between each pixel block of the block shift register means and a pixel block of interest, Block prediction counting means for performing a count for each pixel block using the output of the logical sum means; and reference pixel block position updating means for performing the block position update of the reference pixel block using the output of the block prediction counting means; The exclusive OR of the reference pixel block and the pixel block of interest output from the pixel block position update means is used as the prediction error. A prediction error output unit for performing output, comprising: a counter using an exclusive OR output of an observed pixel block and a target pixel block; and sequentially updating a reference pixel block. By doing so, it is possible to realize a prediction error generation device that can generate a good prediction error in various image screens and pattern drawing images.
[0027]
In addition, when the pixel value of the target pixel block is all 0 in the block prediction counting means, the counting is not performed, so that the counting is not performed in the white background portion or the like. A generation device can be realized.
[0028]
Further, even if the block prediction count value for a certain pixel block reaches the first threshold value in the reference pixel block position updating means, if the block prediction count value for the current reference pixel block exceeds the second threshold value, By not updating the reference pixel block position, it is possible to realize a prediction error generation device that does not frequently update the reference pixel block position.
[Brief description of the drawings]
FIG. 1 is a block diagram of an image encoding device using a prediction error generation device according to a first embodiment of the present invention; FIG. 2 is a block diagram of a block shift register means according to the first embodiment of the present invention; FIG. 4 is a block diagram of a block exclusive OR means according to the first embodiment of the present invention; FIG. 5 is a flowchart of a block predictive counting means according to the first embodiment of the present invention; FIG. 7 is a flowchart illustrating an example of generating prediction error data according to the first embodiment of the present invention. FIG. 8 is a diagram illustrating an example of a run length count of a run-length encoder according to the first embodiment of the present invention. FIG. 9 is a diagram showing a Wyle code table of a run-length encoder according to the first embodiment of the present invention. FIG. 10 is a configuration diagram of a conventional prediction error generation device. Figure 11 shows an exemplary image data does not fit the Figure [12] observed pixel illustrating an exemplary image data that matches the observed pixel EXPLANATION OF REFERENCE NUMERALS
DESCRIPTION OF SYMBOLS 1 Prediction error generation device 2 Block shift register means 3 Block exclusive OR means 4 Block prediction count means 5 Reference pixel block position updating means 6 Prediction error output means 7 Run length encoder 8 Pixel block 9 Target pixel block 10 Pixel 11 Pixel block exclusive OR output

Claims (3)

周辺画素を用いて画素値の予測を行い、予測値の当り外れを表す予測誤差データ系列を作成する予測誤差生成装置において、2値イメージデータを複数の画素からなる画素ブロック毎にシフトし入力するブロックシフトレジスタ手段と、該ブロックシフトレジスタ手段の各々の画素ブロックと注目画素ブロックとの排他的論理和を行うブロック排他的論理和手段と、該ブロック排他的論理和手段の出力を用い画素ブロック毎のカウントを行うブロック予測カウント手段と、該ブロック予測カウント手段の出力を用いて参照画素ブロックのブロック位置更新を行うを参照画素ブロック位置更新手段と、該参照画素ブロック位置更新手段出力の参照画素ブロックと注目画素ブロックとの排他的論理和を予測誤差として出力を行う予測誤差出力手段とを備えたことを特徴とする予測誤差生成装置。In a prediction error generation device that performs prediction of a pixel value using peripheral pixels and creates a prediction error data sequence indicating a hit or miss of a prediction value, binary image data is shifted and input for each pixel block including a plurality of pixels. A block shift register means, a block exclusive OR means for performing an exclusive OR operation between each pixel block of the block shift register means and the pixel block of interest, and a pixel block using an output of the block exclusive OR means for each pixel block. Prediction block means for counting the number of pixels, reference pixel block position update means for updating the block position of the reference pixel block using the output of the block prediction count means, and reference pixel block output from the reference pixel block position update means Prediction error output means for outputting an exclusive OR of a pixel block and a target pixel block as a prediction error Prediction error generation device characterized by comprising a. 前記ブロック予測カウント手段において注目画素ブロックの画素値が全て0の場合にはカウントを行わないことを特徴とする請求項1記載の予測誤差生成装置。2. The prediction error generating apparatus according to claim 1, wherein the block prediction counting means does not perform counting when all pixel values of the target pixel block are 0. 前記参照画素ブロック位置更新手段においてある画素ブロックに対するブロック予測カウント値が第1の閾値に達しても、現在の参照画素ブロックに対するブロック予測カウント値が第2の閾値を越えている場合には参照画素ブロック位置の更新を行わないことを特徴とする請求項1記載の予測誤差生成装置。Even if the block prediction count value for a certain pixel block reaches the first threshold value in the reference pixel block position updating unit, if the block prediction count value for the current reference pixel block exceeds the second threshold value, 2. The prediction error generating device according to claim 1, wherein the block position is not updated.
JP2002325177A 2002-11-08 2002-11-08 Device and method for generating prediction error and storage medium therefor Pending JP2004159246A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2002325177A JP2004159246A (en) 2002-11-08 2002-11-08 Device and method for generating prediction error and storage medium therefor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2002325177A JP2004159246A (en) 2002-11-08 2002-11-08 Device and method for generating prediction error and storage medium therefor

Publications (1)

Publication Number Publication Date
JP2004159246A true JP2004159246A (en) 2004-06-03

Family

ID=32804486

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002325177A Pending JP2004159246A (en) 2002-11-08 2002-11-08 Device and method for generating prediction error and storage medium therefor

Country Status (1)

Country Link
JP (1) JP2004159246A (en)

Similar Documents

Publication Publication Date Title
US6560365B1 (en) Decoding apparatus and method
EP0772364B1 (en) Image processing apparatus and method
US6549676B1 (en) Encoding device
JP3108479B2 (en) Encoding / decoding method and apparatus therefor
EP1318665A2 (en) Image processing apparatus and method, program, and storage medium
US20130039596A1 (en) Optimized method and system for entropy coding
JP2008022215A (en) Image encoding device, image encoding method, and storage medium therefor
JP3694999B2 (en) Image encoding apparatus, image decoding apparatus, and methods thereof
JP3872217B2 (en) Dither image binary expression processing method, dither image compression binary expression decompression method, and dither image compression and decompression system
JP4164257B2 (en) Image processing apparatus, image processing method, program, and storage medium
JP2007306513A (en) Method and device for image data compression
JP2004159246A (en) Device and method for generating prediction error and storage medium therefor
JP2006100977A (en) Printing system and printer
JP5842357B2 (en) Image processing apparatus and image processing program
JPH104557A (en) Unit, and method for image processing and storage medium storing the method
JP2000217003A (en) Coding system and decoding system
JP3871995B2 (en) Encoding device and decoding device
JPH104551A (en) Image processing unit, method for the unit and storage medium storing the method
US6339659B1 (en) Fractal coding/decoding of picture data using memory capacity information
JPH10341437A (en) Image processing method and device therefor
JP3943634B2 (en) Information processing apparatus and method
JP2005252337A (en) Image coding apparatus, image coding method, and storage medium therefor
JP2010074444A (en) Image compression apparatus and method, image decoding apparatus and method, and computer program
Denecker et al. Design of an improved lossless halftone image compression codec
JP2002354233A (en) Method and device for picture size reduction and storage medium