JP2004320476A - Image processing apparatus and method - Google Patents

Image processing apparatus and method Download PDF

Info

Publication number
JP2004320476A
JP2004320476A JP2003111873A JP2003111873A JP2004320476A JP 2004320476 A JP2004320476 A JP 2004320476A JP 2003111873 A JP2003111873 A JP 2003111873A JP 2003111873 A JP2003111873 A JP 2003111873A JP 2004320476 A JP2004320476 A JP 2004320476A
Authority
JP
Japan
Prior art keywords
compression
memory
image data
image
data
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.)
Withdrawn
Application number
JP2003111873A
Other languages
Japanese (ja)
Inventor
Motohisa Ito
元久 伊藤
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Canon Inc
Original Assignee
Canon Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Canon Inc filed Critical Canon Inc
Priority to JP2003111873A priority Critical patent/JP2004320476A/en
Publication of JP2004320476A publication Critical patent/JP2004320476A/en
Withdrawn legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To provide an image processing apparatus and method for small memory capacity since a price of an image memory which stores raster data which should be printed has a big influence on the cost of a page printer, namely, it is desirable that the capacity of the image memory is small when considering the cost of the page printer. <P>SOLUTION: A compression part 21 compresses image data to be inputted and stores it in the image memory 2. A prediction/judgment part 11 predicts use quantity Y of the image memory 2 based on data quantity after compression and the number of compressed pixels to be successively supplied from the compression part 21 during execution of the compression and outputs a comparison result between the predicted use quantity Y and a preset threshold S. A CPU 501 cancels the image data stored in the image memory 2, instructs lowering of resolution of the inputted image data and makes the compression part 21 perform the compression of the image data after lowering of the resolution when the comparison result shows Y≥S. <P>COPYRIGHT: (C)2005,JPO&NCIPI

Description

【0001】
【発明の属する技術分野】
本発明は画像処理装置およびその方法に関し、例えば、画像形成用に所定単位に画像データが読み出されるメモリに画像データを格納する画像処理に関する。
【0002】
【従来の技術】
ページプリンタのエンジン(以下、単に「エンジン」という)は一定速度で動作する。そのため、エンジンの動作に遅れることなく、ラスタデータをエンジンに供給する必要がある。もし、エンジンの動作にラスタデータの供給が追いつかないと、エンジンが空回りして印刷が不能になる。
【0003】
エンジンの空回りを防止するための手法は色々ある。ある手法は、一頁分のラスタデータを画像メモリに保持してから印刷を開始する。この手法を用いる場合、例えば、A4記録紙に、600dpiの記録密度で四色フルカラーの画像を印刷する場合、135MB以上の画像メモリが必要になる。また、ページプリンタの印刷速度が速くなると、印刷完了後、次頁のラスタデータの作成を開始したのでは間に合わず、印刷中に次頁のラスタデータの作成を開始する必要が生じる。この場合、さらに画像メモリが必要になる。
【0004】
勿論、大容量の画像メモリを利用できれば上記の問題は解決する。しかし、印刷すべきラスタデータを格納する画像メモリの価格は、ページプリンタの原価に大きな影響を与える。つまり、ページプリンタの原価を考えると画像メモリの容量は小さいことが望ましい。
【0005】
そこで、ラスタデータを圧縮して画像メモリに格納する手法が広く使用されている。ラスタデータを圧縮することで、必要な画像メモリの容量は小さくなる。しかし、頁の特徴によっては、圧縮後のラスタデータのデータ量が画像メモリの容量より大きくなり、画像メモリに格納できない場合がある。この問題は、ラスタデータの解像度を下げて再圧縮すれば解決可能である。
【0006】
ラスタデータを再圧縮する最も単純な手法は、画像メモリの空きがなくなったことを検出した後、解像度を下げて再圧縮を開始する手法である。この手法は、追加するハードウェアが少なく、プリンタの原価に与える影響は小さい。しかし、画像メモリがフルになってから再圧縮を開始するため、無駄が多く、処理速度の向上は望めない。
【0007】
別の手法として、特開平4−323060号公報、特開平6−233141号公報、特開平11−88189号公報に開示しているように、複数の圧縮回路や圧縮方法を適宜切り替える方法がある。これらの方法によれば処理速度は向上する。しかし、少ないハードウェアでは実現不可能であり、プリンタの原価に与える影響は大きい。
【0008】
【特許文献】
特開平4−323060号公報、特開平6−233141号公報、特開平11−88189号公報
【0009】
【発明が解決しようとする課題】
本発明は、上述の問題を個々にまたはまとめて解決するためのもので、画像形成用に所定単位に画像データが読み出されるメモリのフルを簡単な構成で防ぐことを目的とする。
【0010】
また、上記メモリのフルを予測して、画像処理時間の増加を抑えることを他の目的とする。
【0011】
【課題を解決するための手段】
本発明は、前記の目的を達成する一手段として、以下の構成を備える。
【0012】
本発明は、画像形成用に所定単位に画像データが読み出されるメモリに画像データを格納する際に、入力される画像データを圧縮して、前記メモリに格納し、前記圧縮の実行中に逐次供給される圧縮後のデータ量および圧縮済みの画素数を基に、前記メモリの使用量を予測し、予測された使用量と予め設定された閾値との比較結果を出力し、前記比較結果が前記使用量≧前記閾値を示す場合、前記メモリに格納された画像データを破棄し、前記入力画像データの解像度低下を指示し、解像度低下後の画像データの圧縮を実行させることを特徴とする。
【0013】
【発明の実施の形態】
以下、本発明にかかる実施形態の画像処理を図面を参照して詳細に説明する。
【0014】
[構成]
図1は実施形態のデータ圧縮装置1の構成例を示すブロック図である。
【0015】
データ圧縮装置1は、画像メモリ使用量の予測・判定部11および圧縮部21からなる。
【0016】
予測・判定部11は、圧縮後のラスタデータ量103から画像メモリ2の使用量を時々刻々予測し、画像メモリ2の予測使用量が予め設定した閾値より大きくなると、画像メモリ溢れ信号110を有効にする。画像メモリ溢れ信号110は、データ圧縮装置1を含むプリンタシステム全体を制御するCPUまたはシーケンサ500に供給される。
【0017】
圧縮部21は、ラスタデータ101を後述する方法で圧縮し、圧縮後のラスタデータ102を画像メモリ2に格納する。また、圧縮後のラスタデータ量103と、処理済ピクセル数Pを予測・判定部11に出力する。
【0018】
予測・判定部11は、メモリカウンタ12、微分回路13、設定レジスタ14、予測部15および判定部16からなる。
【0019】
メモリカウンタ12は、圧縮後のラスタデータ量103を累算するカウンタである。メモリカウンタ12は、圧縮動作が開始された時点で初期化される。
【0020】
微分回路13は、メモリカウンタ12のカウント値cを圧縮処理済ピクセル数Pで微分した微分係数a=dc/dPを計算する。メモリカウンタ12のカウント値cは、画像メモリ2の使用量を示すので、微分係数aはメモリ使用量の増加率を表す。
【0021】
設定レジスタ14は、先行ピクセル数D、判定部16が使用するメモリ使用量の閾値Sを保持する。画像メモリ2の使用量を、現在のピクセル位置からどれだけ先行したピクセル位置で予測するかを指示するのが、先行ピクセル数Dである。
【0022】
予測部15は、微分回路13で得られた微分係数a、設定レジスタ14に保持された先行ピクセル数D、メモリカウンタ12の現在のカウント値cから、予測使用量Yを計算する。
【0023】
判定部16は、予測部15で得られた予測使用量Yと、設定レジスタ14に保持された閾値Sを比較して、Y≧Sならば画像メモリ2がフルになると予測し、画像メモリ溢れ信号110を有効にする。
【0024】
CPU 500は、データ圧縮装置1を含むプリンタシステム全体を制御する。
【0025】
図2は圧縮部21の構成例を示すブロック図である。圧縮部21は、バッファメモリ201、ディザ処理部202、FIFO 203、排他的論理和演算器204、ハフマン符号化部205および制御部206からなる。なお、圧縮部21の動作は制御部206によって制御される。
【0026】
入力されるラスタデータ101はバッファメモリ201に格納される。バッファメモリ201の容量は、ディザ処理部202の処理に必要なラスタデータを保持できる容量であればよい。ディザ処理部202は、バッファメモリ201にバッファされたラスタデータにディザ処理を施す。ディザ処理結果を、FIFO 203によってディザマトリクスの幅分遅延される。
【0027】
排他的論理和演算器204は、ディザ処理結果とFIFO 203の出力とを排他的論理和(XOR)演算する。ハフマン符号部205は、XOR演算の結果を符号化し、圧縮後のラスタデータ102を生成する。
【0028】
FIFO 203によって、ディザマトリクスの幅分、ディザ処理後のデータを遅延するので、FIFO 203の出力は、現在のピクセルよりディザマトリクスの幅分先行するピクセルのデータになる。ディザ処理には周期性があるので、ディザマトリクスの幅ごとにディザ処理後のデータは似通ったデータになり易い。従って、排他的論理和演算器204によるXOR演算は、同じ値同士のXORをとる確率が高くなり、その結果、排他的論理和演算器204の出力は‘0’が連続してランレングスが長くなる。
【0029】
制御部206は、圧縮部21の動作を制御するとともに、処理済のピクセル数Pを累計して出力し、圧縮後のラスタデータ量103を出力する。
【0030】
[処理の流れ]
図3はデータ圧縮装置1の動作を説明するフローチャートである。なお、データ圧縮装置1は、CPU(or シーケンサ)501によって制御される。
【0031】
CPU 501は、印刷が指示されるなどラスタデータの圧縮が必要になるとデータ圧縮装置1を起動し、メモリカウンタ12を初期化し、設定レジスタ14に先行ピクセル数Dと閾値Sを設定する(S1)。
【0032】
初期化が完了した後、データ圧縮装置1は、ラスタデータを読み込み(S2)、圧縮処理を行うと同時に、画像メモリ2の予測使用量Yを予測する(S3)。そして、予想使用量Yが更新される度に、予測使用量Yと閾値Sを比較する(S4)。比較結果がY<Sならば画像メモリ2に空きがあり、続けて圧縮動作が可能であるが、圧縮動作を継続する前に頁の終わりを判定する(S5)。一頁全体の圧縮処理が終了したならば、CPU 501に一頁分の圧縮処理が終了したことを通知し、圧縮処理を終了する。また、一頁全体の圧縮処理が未了であれば、ステップS2へ戻り、ラスタデータを読み込み圧縮する動作を繰り返す。
【0033】
一方、Y≧Sの場合は、このまま圧縮動作を続けると画像メモリ2がフルになるので、データ圧縮装置1は、画像メモリ溢れ信号110を有効にして、CPU 501に圧縮動作を継続すると画像メモリ2がフルになることを知らせる。画像メモリ溢れ信号110が有効になると、CPU 501は、画像メモリ2を初期化するなどして圧縮済みの画像データを破棄し、ラスタデータの解像度を変更し(S6)、データ圧縮装置1の処理をステップS1へ戻す。
【0034】
なお、ラスタデータの解像度変更は、CPU 501がデータ圧縮装置1へラスタデータを供給する描画部や画像処理部へ解像度の変更を通知し、ラスタデータの出力の再開を指示することで実現される。
【0035】
図4は予測・判定部11の処理例を示すフローチャートである。
【0036】
データ圧縮装置1が起動され、メモリカウンタ12が初期化され、設定レジスタ14に先行ピクセル数D、閾値Sが設定される(S11)。
【0037】
予測・判定部11は、圧縮部21が出力する圧縮後のデータ量をメモリカウンタ12で累算する(S12)。メモリカウンタ12のカウント値cは画像メモリ2の使用量に相当する。このカウント値cを微分回路13に送り、圧縮部21から供給される処理済ピクセル数Pで微分させ、微分係数a=dc/dPを計算させる。
【0038】
次に、予測・判定部11は、予測部15に微分係数a、設定レジスタ14に保持された先行ピクセル数Dおよび現在のカウント値cを供給し、予測使用量Yを計算させる(S13)。そして、判定部16に予測使用量Yおよび設定レジスタ14に保持された閾値Sを供給し、画像メモリ2のフルを判定させる(S14)。判定結果がY≧Sならば画像メモリ溢れ信号110を有効にし(S15)、判定結果がY<Sならば処理をステップS12へ戻す。
【0039】
図5は微分回路13および予測部15による画像メモリ2の使用量予測処理を示すフローチャートである。
【0040】
カウント値cを処理済ピクセル数Pで微分し微分係数a=dc/dPを計算し(S21)、微分係数a、先行ピクセル数Dおよび現在のカウント値cに基づき、予測式(1)に従い、予測使用量Yを計算し(S22)、予測使用量Yを判定部16に出力する(S024)。以上の処理は繰り返される。
Y = a×D + c …(1)
【0041】
なるべくランレングスを長くするようにラスタデータを前処理した後、ランレングス圧縮を行う場合、圧縮処理が進むに従い、圧縮データの累計はほぼ線形に増加する。本実施形態の圧縮部11は、上記の前処理を行ってランレングス圧縮を行うので、予測式(1)に示すような一次式で画像メモリ2の使用量を予測することが可能である。画像メモリ2の使用量を一次式で予測するため必要なハードウェアは少なくて済む。
【0042】
そして、画像メモリ2がフルになる前に画像メモリ2がフルになるか否かを判定することが可能であるから、画像メモリ2がフルになる前に圧縮動作を停止して、ラスタデータの解像度を落とすなどの処置を取ることができ、無駄に圧縮動作を進めることなく、処理時間の無駄をなくすことができる。とくに、先行ピクセル数D分先の圧縮データ量を予測することができるので、早めに画像メモリ2がフルになるか否かを判定することができ、解像度を低下させたラスタデータの圧縮を行うにしても、圧縮の開始から圧縮の再開までの時間を短縮することが可能になる。
【0043】
また、画像メモリ2がフルになるか否かの判定用の閾値は変更可能であるから、画像メモリ2の容量が異なるプリンタでも同一のハードウエアで対応可能である。
【0044】
とくに、小容量のページメモリを搭載したページプリンタにおいて、僅かなハードウェアの追加により、ページメモリのフルを防ぎ、画像処理時間の増加を抑えることが可能である。
【0045】
【他の実施形態】
なお、本発明は、複数の機器(例えばホストコンピュータ、インタフェイス機器、リーダ、プリンタなど)から構成されるシステムに適用しても、一つの機器からなる装置(例えば、複写機、ファクシミリ装置など)に適用してもよい。
【0046】
また、本発明の目的は、前述した実施形態の機能を実現するソフトウェアのプログラムコードを記録した記憶媒体(または記録媒体)を、システムあるいは装置に供給し、そのシステムあるいは装置のコンピュータ(またはCPUやMPU)が記憶媒体に格納されたプログラムコードを読み出し実行することによっても、達成されることは言うまでもない。この場合、記憶媒体から読み出されたプログラムコード自体が前述した実施形態の機能を実現することになり、そのプログラムコードを記憶した記憶媒体は本発明を構成することになる。また、コンピュータが読み出したプログラムコードを実行することにより、前述した実施形態の機能が実現されるだけでなく、そのプログラムコードの指示に基づき、コンピュータ上で稼働しているオペレーティングシステム(OS)などが実際の処理の一部または全部を行い、その処理によって前述した実施形態の機能が実現される場合も含まれることは言うまでもない。
【0047】
さらに、記憶媒体から読み出されたプログラムコードが、コンピュータに挿入された機能拡張カードやコンピュータに接続された機能拡張ユニットに備わるメモリに書込まれた後、そのプログラムコードの指示に基づき、その機能拡張カードや機能拡張ユニットに備わるCPUなどが実際の処理の一部または全部を行い、その処理によって前述した実施形態の機能が実現される場合も含まれることは言うまでもない。
【0048】
本発明を上記記憶媒体に適用する場合、その記憶媒体には、先に説明したフローチャートに対応するプログラムコードが格納されることになる。
【0049】
【発明の効果】
以上説明したように、本発明によれば、画像形成用に所定単位に画像データが読み出されるメモリのフルを簡単な構成で防ぐことができる。
【0050】
また、上記メモリのフルを予測して、画像処理時間の増加を抑えることができる。
【図面の簡単な説明】
【図1】データ圧縮装置の構成例を示すブロック図、
【図2】圧縮部の構成例を示すブロック図、
【図3】データ圧縮装置の動作を説明するフローチャート、
【図4】予測・判定部の処理例を示すフローチャート、
【図5】微分回路および予測部による画像メモリ2の使用量予測処理を示すフローチャートである。
[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to an image processing apparatus and a method thereof, and for example, relates to image processing for storing image data in a memory from which image data is read in a predetermined unit for image formation.
[0002]
[Prior art]
The engine of the page printer (hereinafter simply referred to as “engine”) operates at a constant speed. Therefore, it is necessary to supply raster data to the engine without delaying the operation of the engine. If the supply of raster data cannot keep up with the operation of the engine, the engine runs idle and printing becomes impossible.
[0003]
There are various methods to prevent the engine from running idle. One method starts printing after holding one page of raster data in an image memory. When this method is used, for example, when printing four-color full-color images at a recording density of 600 dpi on A4 recording paper, an image memory of 135 MB or more is required. Further, when the printing speed of the page printer increases, it is not enough to start the creation of raster data of the next page after printing is completed, and it is necessary to start the creation of raster data of the next page during printing. In this case, an additional image memory is required.
[0004]
Of course, if a large capacity image memory can be used, the above problem is solved. However, the price of an image memory for storing raster data to be printed has a great influence on the cost of a page printer. That is, considering the cost of the page printer, it is desirable that the capacity of the image memory be small.
[0005]
Therefore, a method of compressing raster data and storing it in an image memory is widely used. By compressing the raster data, the required capacity of the image memory is reduced. However, depending on the characteristics of the page, the data amount of the compressed raster data may be larger than the capacity of the image memory, and may not be stored in the image memory. This problem can be solved by lowering the resolution of the raster data and recompressing it.
[0006]
The simplest method of recompressing the raster data is a method of detecting that the image memory has run out, and then lowering the resolution and starting recompression. This approach adds little hardware and has little effect on printer cost. However, since recompression is started after the image memory becomes full, there is much waste, and improvement in processing speed cannot be expected.
[0007]
As another method, as disclosed in JP-A-4-323060, JP-A-6-233141, and JP-A-11-88189, there is a method of appropriately switching a plurality of compression circuits and compression methods. According to these methods, the processing speed is improved. However, this is not possible with a small amount of hardware, and has a great effect on the cost of the printer.
[0008]
[Patent Document]
JP-A-4-323060, JP-A-6-233141, JP-A-11-88189
[Problems to be solved by the invention]
An object of the present invention is to solve the above-mentioned problems individually or collectively, and it is an object of the present invention to prevent a memory from reading out image data in a predetermined unit for image formation with a simple configuration.
[0010]
Another object of the present invention is to predict the fullness of the memory and suppress an increase in image processing time.
[0011]
[Means for Solving the Problems]
The present invention has the following configuration as one means for achieving the above object.
[0012]
According to the present invention, when image data is stored in a memory from which image data is read out in a predetermined unit for image formation, input image data is compressed, stored in the memory, and sequentially supplied during execution of the compression. Based on the data amount after compression and the number of compressed pixels to be used, the usage amount of the memory is predicted, and a comparison result between the predicted usage amount and a preset threshold is output. When the usage amount ≧ the threshold value, the image data stored in the memory is discarded, the resolution of the input image data is reduced, and the compression of the image data after the resolution is reduced is performed.
[0013]
BEST MODE FOR CARRYING OUT THE INVENTION
Hereinafter, image processing according to an embodiment of the present invention will be described in detail with reference to the drawings.
[0014]
[Constitution]
FIG. 1 is a block diagram illustrating a configuration example of a data compression device 1 according to the embodiment.
[0015]
The data compression device 1 includes an image memory usage prediction / determination unit 11 and a compression unit 21.
[0016]
The prediction / judgment unit 11 predicts the use amount of the image memory 2 from time to time from the compressed raster data amount 103, and when the predicted use amount of the image memory 2 becomes larger than a preset threshold value, activates the image memory overflow signal 110. To The image memory overflow signal 110 is supplied to a CPU or a sequencer 500 that controls the entire printer system including the data compression device 1.
[0017]
The compression unit 21 compresses the raster data 101 by a method described later, and stores the compressed raster data 102 in the image memory 2. Further, the raster data amount 103 after compression and the number P of processed pixels are output to the prediction / determination unit 11.
[0018]
The prediction / determination unit 11 includes a memory counter 12, a differentiation circuit 13, a setting register 14, a prediction unit 15, and a determination unit 16.
[0019]
The memory counter 12 is a counter for accumulating the compressed raster data amount 103. The memory counter 12 is initialized when the compression operation starts.
[0020]
The differentiating circuit 13 calculates a differential coefficient a = dc / dP by differentiating the count value c of the memory counter 12 with the number P of pixels subjected to the compression processing. Since the count value c of the memory counter 12 indicates the usage amount of the image memory 2, the differential coefficient a indicates the rate of increase of the memory usage amount.
[0021]
The setting register 14 holds the number D of preceding pixels and the threshold S of the memory usage used by the determination unit 16. The number D of preceding pixels indicates how much the use amount of the image memory 2 is predicted at the pixel position preceding the current pixel position.
[0022]
The prediction unit 15 calculates a predicted usage amount Y from the differential coefficient a obtained by the differentiating circuit 13, the number of preceding pixels D held in the setting register 14, and the current count value c of the memory counter 12.
[0023]
The determination unit 16 compares the predicted usage amount Y obtained by the prediction unit 15 with the threshold value S held in the setting register 14, and predicts that the image memory 2 will be full if Y ≧ S, and overflows the image memory. Enable signal 110.
[0024]
The CPU 500 controls the entire printer system including the data compression device 1.
[0025]
FIG. 2 is a block diagram illustrating a configuration example of the compression unit 21. The compression unit 21 includes a buffer memory 201, a dither processing unit 202, a FIFO 203, an exclusive OR operation unit 204, a Huffman encoding unit 205, and a control unit 206. The operation of the compression unit 21 is controlled by the control unit 206.
[0026]
The input raster data 101 is stored in the buffer memory 201. The capacity of the buffer memory 201 may be a capacity that can hold raster data necessary for the processing of the dither processing unit 202. The dither processing unit 202 performs dither processing on the raster data buffered in the buffer memory 201. The dither processing result is delayed by FIFO 203 by the width of the dither matrix.
[0027]
The exclusive OR operator 204 performs an exclusive OR (XOR) operation on the dither processing result and the output of the FIFO 203. The Huffman encoding unit 205 encodes the result of the XOR operation and generates the compressed raster data 102.
[0028]
Since the data after the dither processing is delayed by the width of the dither matrix by the FIFO 203, the output of the FIFO 203 becomes the data of the pixel preceding the current pixel by the width of the dither matrix. Since the dither processing has periodicity, the data after the dither processing is likely to be similar data for each width of the dither matrix. Therefore, in the XOR operation performed by the exclusive OR operation unit 204, the probability of XORing the same value increases, and as a result, the output of the exclusive OR operation unit 204 is continuously “0” and the run length is long. Become.
[0029]
The control unit 206 controls the operation of the compression unit 21, accumulates and outputs the number of processed pixels P, and outputs the raster data amount 103 after compression.
[0030]
[Processing flow]
FIG. 3 is a flowchart illustrating the operation of the data compression device 1. The data compression device 1 is controlled by a CPU (or sequencer) 501.
[0031]
When raster data compression is required, such as when printing is instructed, the CPU 501 activates the data compression device 1, initializes the memory counter 12, and sets the preceding pixel number D and the threshold value S in the setting register 14 (S1). .
[0032]
After the initialization is completed, the data compression device 1 reads the raster data (S2), performs the compression process, and at the same time, predicts the predicted usage amount Y of the image memory 2 (S3). Then, every time the estimated usage amount Y is updated, the estimated usage amount Y is compared with the threshold value S (S4). If the comparison result is Y <S, there is space in the image memory 2 and the compression operation can be continued, but the end of the page is determined before the compression operation is continued (S5). When the compression processing for one page is completed, the CPU 501 is notified that the compression processing for one page is completed, and the compression processing is terminated. If the entire page has not been compressed, the process returns to step S2 to repeat the operation of reading and compressing the raster data.
[0033]
On the other hand, when Y ≧ S, the image memory 2 becomes full if the compression operation is continued as it is, so that the data compression device 1 enables the image memory overflow signal 110 and causes the CPU 501 to continue the compression operation. Signal that 2 is full. When the image memory overflow signal 110 becomes valid, the CPU 501 discards the compressed image data by, for example, initializing the image memory 2 and changes the resolution of the raster data (S6). Is returned to step S1.
[0034]
The resolution change of the raster data is realized by the CPU 501 notifying the drawing unit and the image processing unit that supply the raster data to the data compression device 1 of the change in the resolution and instructing the restart of the output of the raster data. .
[0035]
FIG. 4 is a flowchart illustrating a processing example of the prediction / determination unit 11.
[0036]
The data compression apparatus 1 is started, the memory counter 12 is initialized, and the number D of preceding pixels and the threshold value S are set in the setting register 14 (S11).
[0037]
The prediction / determination unit 11 accumulates the data amount after compression output from the compression unit 21 by the memory counter 12 (S12). The count value c of the memory counter 12 corresponds to the used amount of the image memory 2. The count value c is sent to the differentiating circuit 13 to be differentiated by the number of processed pixels P supplied from the compression unit 21 to calculate a differential coefficient a = dc / dP.
[0038]
Next, the prediction / judgment unit 11 supplies the differential coefficient a, the number of preceding pixels D held in the setting register 14 and the current count value c to the prediction unit 15, and causes the prediction unit 15 to calculate the predicted usage amount Y (S13). Then, the estimated use amount Y and the threshold value S held in the setting register 14 are supplied to the determination unit 16 to determine whether the image memory 2 is full (S14). If the determination result is Y ≧ S, the image memory overflow signal 110 is enabled (S15). If the determination result is Y <S, the process returns to step S12.
[0039]
FIG. 5 is a flowchart showing the use amount prediction processing of the image memory 2 by the differentiating circuit 13 and the prediction unit 15.
[0040]
The count value c is differentiated by the processed pixel number P to calculate a differential coefficient a = dc / dP (S21). Based on the differential coefficient a, the preceding pixel number D and the current count value c, according to the prediction formula (1), The predicted usage amount Y is calculated (S22), and the predicted usage amount Y is output to the determination unit 16 (S024). The above processing is repeated.
Y = a × D + c (1)
[0041]
When performing run-length compression after pre-processing raster data so as to make the run length as long as possible, the cumulative total of the compressed data increases almost linearly as the compression process proceeds. Since the compression unit 11 of the present embodiment performs the above-described pre-processing to perform the run-length compression, it is possible to predict the usage amount of the image memory 2 by a linear expression as shown in the prediction expression (1). Since the amount of use of the image memory 2 is predicted by a linear expression, the required hardware is small.
[0042]
Since it is possible to determine whether or not the image memory 2 becomes full before the image memory 2 becomes full, the compression operation is stopped before the image memory 2 becomes full, and the raster data It is possible to take measures such as lowering the resolution, and it is possible to eliminate waste of processing time without advancing the compression operation unnecessarily. In particular, since the amount of compressed data ahead of the number of preceding pixels D can be predicted, it can be determined whether or not the image memory 2 becomes full, and raster data with reduced resolution is compressed. In this case, it is possible to reduce the time from the start of compression to the restart of compression.
[0043]
Since the threshold value for determining whether or not the image memory 2 becomes full can be changed, the same hardware can cope with printers having different capacities of the image memory 2.
[0044]
In particular, in a page printer equipped with a small-capacity page memory, it is possible to prevent the page memory from being full and increase the image processing time by adding a small amount of hardware.
[0045]
[Other embodiments]
The present invention can be applied to a system including a plurality of devices (for example, a host computer, an interface device, a reader, a printer, etc.), but may be a device including one device (for example, a copying machine, a facsimile machine, etc.). May be applied.
[0046]
Further, an object of the present invention is to supply a storage medium (or a recording medium) in which a program code of software for realizing the functions of the above-described embodiments is recorded to a system or an apparatus, and a computer (or a CPU or a CPU) of the system or the apparatus. Needless to say, the present invention can also be achieved by an MPU) reading and executing a program code stored in a storage medium. In this case, the program code itself read from the storage medium realizes the function of the above-described embodiment, and the storage medium storing the program code constitutes the present invention. When the computer executes the readout program code, not only the functions of the above-described embodiments are realized, but also an operating system (OS) running on the computer based on the instruction of the program code. It goes without saying that a part or all of the actual processing is performed and the functions of the above-described embodiments are realized by the processing.
[0047]
Further, after the program code read from the storage medium is written into a memory provided in a function expansion card inserted into the computer or a function expansion unit connected to the computer, the function of the program is performed based on the instruction of the program code. It goes without saying that the CPU included in the expansion card or the function expansion unit performs part or all of the actual processing, and the processing realizes the functions of the above-described embodiments.
[0048]
When the present invention is applied to the storage medium, the storage medium stores program codes corresponding to the flowcharts described above.
[0049]
【The invention's effect】
As described above, according to the present invention, it is possible to prevent the memory from being read out from the image data in a predetermined unit for image formation with a simple configuration.
[0050]
Further, it is possible to predict the fullness of the memory and suppress an increase in the image processing time.
[Brief description of the drawings]
FIG. 1 is a block diagram showing a configuration example of a data compression device;
FIG. 2 is a block diagram illustrating a configuration example of a compression unit.
FIG. 3 is a flowchart for explaining the operation of the data compression device;
FIG. 4 is a flowchart illustrating a processing example of a prediction / determination unit;
FIG. 5 is a flowchart illustrating a process of estimating a usage amount of an image memory by a differentiating circuit and a prediction unit;

Claims (4)

画像形成用に所定単位に画像データが読み出されるメモリに画像データを格納する画像処理装置であって、
入力される画像データを圧縮して、前記メモリに格納する圧縮手段と、
圧縮を実行中の前記圧縮手段から逐次供給される圧縮後のデータ量および圧縮済みの画素数を基に、前記メモリの使用量を予測する予測手段と、
予測された使用量と予め設定された閾値との比較結果を出力する比較手段と、
前記比較結果が前記使用量≧前記閾値を示す場合、前記メモリに格納された画像データを破棄し、前記入力画像データの解像度低下を指示し、解像度低下後の画像データの圧縮を前記圧縮手段に実行させる制御手段とを有し、
前記圧縮手段は、入力画像データをディザマトリクス中の閾値と比較してディザ処理するディザ処理器、前記ディザ処理手段の処理結果と、ディザマトリクスの幅分、先行してディザ処理した結果との排他的論理和をとる論理演算器、並びに、前記排他的論理和の結果をランレングス圧縮する圧縮器を有し、
前記予測手段は、前記圧縮手段から逐次供給される圧縮後のデータ量を累算する累算器、前記累算結果を前記圧縮済みの画素数で微分する微分器、並びに、前記微分結果および前記累結果を基に、前記メモリの使用量を予測する予測器を有することを特徴とする画像処理装置。
An image processing apparatus for storing image data in a memory from which image data is read in a predetermined unit for image formation,
Compression means for compressing input image data and storing it in the memory;
Prediction means for predicting the amount of use of the memory, based on the data amount after compression and the number of compressed pixels sequentially supplied from the compression means performing compression;
A comparison unit that outputs a comparison result between the predicted usage amount and a preset threshold value,
If the comparison result indicates the usage amount ≧ the threshold value, the image data stored in the memory is discarded, the resolution of the input image data is reduced, and the compression of the image data after the resolution is reduced is performed by the compression unit. Control means to be executed,
A compression unit configured to perform dither processing by comparing the input image data with a threshold value in a dither matrix, and to exclude a processing result of the dither processing unit from a result of preceding dither processing by a width of the dither matrix; A logical operation unit for taking a logical sum, and a compressor for run-length compression of the result of the exclusive logical sum,
The prediction means is an accumulator that accumulates the compressed data amount sequentially supplied from the compression means, a differentiator that differentiates the accumulation result by the number of compressed pixels, and the differentiation result and the An image processing apparatus, comprising: a predictor for predicting the memory usage based on a cumulative result.
画像形成用に所定単位に画像データが読み出されるメモリに画像データを格納する画像処理方法であって、
入力される画像データを圧縮して、前記メモリに格納し、
前記圧縮の実行中に逐次供給される圧縮後のデータ量および圧縮済みの画素数を基に、前記メモリの使用量を予測し、
予測された使用量と予め設定された閾値との比較結果を出力し、
前記比較結果が前記使用量≧前記閾値を示す場合、前記メモリに格納された画像データを破棄し、前記入力画像データの解像度低下を指示し、解像度低下後の画像データの圧縮を実行させることを特徴とする画像処理方法。
An image processing method for storing image data in a memory from which image data is read in a predetermined unit for image formation,
Compress the input image data and store it in the memory,
Based on the data amount after compression and the number of compressed pixels that are sequentially supplied during the execution of the compression, predict the amount of memory used,
Outputting a comparison result between the predicted usage amount and a preset threshold value,
When the comparison result indicates the usage amount ≧ the threshold value, discarding the image data stored in the memory, instructing a reduction in the resolution of the input image data, and executing compression of the image data after the resolution reduction. Characteristic image processing method.
請求項2に記載された画像処理を画像処理装置に実行させることを特徴とするプログラム。A program for causing an image processing apparatus to execute the image processing according to claim 2. 請求項3に記載されたプログラムが記録されたことを特徴とする記録媒体。A recording medium on which the program according to claim 3 is recorded.
JP2003111873A 2003-04-16 2003-04-16 Image processing apparatus and method Withdrawn JP2004320476A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2003111873A JP2004320476A (en) 2003-04-16 2003-04-16 Image processing apparatus and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2003111873A JP2004320476A (en) 2003-04-16 2003-04-16 Image processing apparatus and method

Publications (1)

Publication Number Publication Date
JP2004320476A true JP2004320476A (en) 2004-11-11

Family

ID=33472312

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2003111873A Withdrawn JP2004320476A (en) 2003-04-16 2003-04-16 Image processing apparatus and method

Country Status (1)

Country Link
JP (1) JP2004320476A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010162816A (en) * 2009-01-19 2010-07-29 Seiko Epson Corp Image forming apparatus

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010162816A (en) * 2009-01-19 2010-07-29 Seiko Epson Corp Image forming apparatus

Similar Documents

Publication Publication Date Title
US7561749B2 (en) Apparatus, method, and computer-readable storage medium for lossy and lossless encoding of image data in accordance with an attribute of the image data
US7680345B2 (en) Image encoding apparatus and method, computer program, and computer-readable storage medium
US7454070B2 (en) Image encoding apparatus and method, computer program, and computer-readable storage medium
JP4047183B2 (en) Image compression encoding apparatus and control method thereof
JP2003244446A (en) Image processor and image processing method
US8373770B2 (en) Imaging device, imaging method, and program including automatically controlling an interval of continuous photographing
US8184327B2 (en) Image data processing apparatus, image data processing method, and program
US7570822B2 (en) Image processing apparatus, printer and control method of the image processing
JP2006325186A (en) Image processing apparatus
JP6191394B2 (en) Data compression apparatus, program, and computer-readable recording medium
JP2004320476A (en) Image processing apparatus and method
CN106919514B (en) Semiconductor device, data processing system, and semiconductor device control method
JP2006304243A (en) Image processor, printer and image processing method
JP5641755B2 (en) Encoding apparatus, encoding apparatus control method, and program
JP3317954B2 (en) Image data compression method, JBIG coding processing method and apparatus
JP2007030353A (en) Image forming device
JP4010139B2 (en) Print control apparatus and program
JP2004274357A (en) Method for compressing image
US11314995B2 (en) Image processing apparatus, image processing method, and storage medium
JP6985899B2 (en) Image coding device and its control method and program
JP4363291B2 (en) Image processing apparatus, printer including the same, and control method of image processing apparatus
JP2006054774A (en) Data transfer control apparatus and data transfer method
JP5947385B2 (en) Image compression apparatus, operation control method thereof, and operation control program thereof
JP3902987B2 (en) Image encoding apparatus, image encoding method, program, and storage medium
JP6223012B2 (en) Image coding apparatus and image coding method

Legal Events

Date Code Title Description
A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20060704