JP2003209697A - Image processing device and method therefor computer program, and storage medium - Google Patents

Image processing device and method therefor computer program, and storage medium

Info

Publication number
JP2003209697A
JP2003209697A JP2002003894A JP2002003894A JP2003209697A JP 2003209697 A JP2003209697 A JP 2003209697A JP 2002003894 A JP2002003894 A JP 2002003894A JP 2002003894 A JP2002003894 A JP 2002003894A JP 2003209697 A JP2003209697 A JP 2003209697A
Authority
JP
Japan
Prior art keywords
data
encoding
compression
attribute
parameter
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.)
Granted
Application number
JP2002003894A
Other languages
Japanese (ja)
Other versions
JP3902954B2 (en
Inventor
Naoki Ito
直樹 伊藤
Shinichi Kato
進一 加藤
Kenichi Ota
健一 太田
Tadayoshi Nakayama
忠義 中山
Hideshi Osawa
秀史 大澤
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 JP2002003894A priority Critical patent/JP3902954B2/en
Priority to EP02255970.2A priority patent/EP1292153B1/en
Priority to CNB021422478A priority patent/CN1320809C/en
Priority to US10/230,276 priority patent/US7257264B2/en
Publication of JP2003209697A publication Critical patent/JP2003209697A/en
Application granted granted Critical
Publication of JP3902954B2 publication Critical patent/JP3902954B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

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

Abstract

<P>PROBLEM TO BE SOLVED: To enable elimination of the need for image re-input, creation of encoded data whose size can effectively fall in a set size, and an efficient compression of even attribute of an image according to a compressed image. <P>SOLUTION: Image data input from an input unit 101 is supplied to an encoder 102 to be subjected to orthogonal transform, quantization and encoding and then stored in a first memory 104. An attribute flag rewriter 120 judges an attribute of a pixel block on the basis of the data after quantized at the time of encoding the image data, compresses and encodes it, and stores it in an attribute flag memory 123. An encoding sequence controller 108, when judging that the quantity of code generated in the encoder 102 reached a set value, sets a parameter to make a compression ratio higher and continues the subsequent encoding operation. A re-encoder 109 re-encodes previously encoded data according to a new parameter and stores it in the first memory 104. At this time, even an attribute flag is re-encoded and the attribute flag memory 123 is updated. <P>COPYRIGHT: (C)2003,JPO

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【発明の属する技術分野】本発明はカラー画像データを
圧縮符号化する画像処理装置及びその制御方法及びコン
ピュータプログラム並びにコンピュータ可読記憶媒体に
関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an image processing apparatus for compressing and encoding color image data, a control method thereof, a computer program, and a computer-readable storage medium.

【0002】[0002]

【従来の技術】従来,静止画像の圧縮方式には、離散コ
サイン変換を利用したJPEG方式や、Wavelet変換を
利用した方式が多く使われている。この種の符号化方式
は、可変長符号化方式であるので、符号化対象の画像毎
に符号量が変化するものである。
2. Description of the Related Art Conventionally, as a still image compression method, a JPEG method using discrete cosine transform and a method using Wavelet transform have been widely used. Since this type of coding method is a variable length coding method, the code amount changes for each image to be coded.

【0003】国際標準化方式であるJPEG方式では,
画像に対して1組の量子化マトリクスしか定義できな
い。従って、プリスキャン無しには、符号量調整が行え
ず、限られたメモリに記憶するシステムで使用する場合
においては、メモリオーバーを起こす危険性がある。
In the JPEG method, which is an international standardization method,
Only one set of quantization matrices can be defined for an image. Therefore, the code amount cannot be adjusted without pre-scanning, and there is a risk of memory over when used in a system that stores in a limited memory.

【0004】これを防止するために、予定した符号量よ
りオーバーした場合は、圧縮率を変更して、原稿の再読
み込みを行なう方法や、予めプリスキャンによる符号量
見積もりを行ない、符号量を調整するために,量子化パ
ラメータの再設定を行なう方法などがとられていた。
In order to prevent this, when the code amount exceeds the planned code amount, the compression ratio is changed to read the original again, or the code amount is estimated in advance by prescan to adjust the code amount. In order to do so, methods such as resetting the quantization parameter have been adopted.

【0005】また、プリスキャンを行う符号量制御方式
として、例えば、プリ圧縮したデータを内部バッファメ
モリに入れ、これを伸長し、圧縮パラメータを変え、本
圧縮し、外部記憶に出力する方式がある。このとき、本
圧縮では、プリ圧縮よりも圧縮率を高めにすることにな
る。
As a code amount control system for performing prescan, for example, there is a system in which precompressed data is put into an internal buffer memory, decompressed, the compression parameter is changed, main compression is performed, and the data is output to an external storage. . At this time, in the main compression, the compression rate is higher than in the pre-compression.

【0006】また、例えば、画素ブロックごとの許容符
号量を求め、符号量を減らすために、DCT係数をn回
レベルシフトした係数をハフマン符号化する方式が知ら
れており、このシフト量nは許容符号量から決定され
る。
Further, for example, there is known a method of Huffman coding a coefficient in which a DCT coefficient is level-shifted n times in order to obtain an allowable code quantity for each pixel block and reduce the code quantity. It is determined from the allowable code amount.

【0007】[0007]

【発明が解決しようとする課題】しかしながら、従来
は、圧縮バッファとして、目標圧縮以上の圧縮バッファ
が必要となり,中間的に使うバッファのオーバーフロー
を防ぐには,原画のデータを記録できるほどの容量が必
要となることは避けられない。
However, in the past, as a compression buffer, a compression buffer more than the target compression was required, and in order to prevent the overflow of the buffer used intermediately, there is a capacity enough to record the original image data. What is needed is inevitable.

【0008】さらに、符号化処理を繰り返す方法では、
圧縮した全データに対して、復号、再圧縮を行なう処理
が入るため、連続処理のスピードがあがらないという問
題がある。
Further, in the method of repeating the encoding process,
Since a process of decoding and recompressing all the compressed data is included, there is a problem that the speed of continuous processing does not increase.

【0009】本発明は上記従来例に鑑みて成されたもの
であり、再画像入力を不要とし、効果的に設定したサイ
ズに収まる符号化データを生成でき、且つ、画像の属性
についても圧縮後の画像に合わせて効率良く圧縮するこ
とが可能な画像処理装置及びその制御方法及びコンピュ
ータプログラム及び記憶媒体を提供しようとするもので
ある。
The present invention has been made in view of the above-mentioned conventional example, does not require re-image input, can effectively generate coded data that fits in a set size, and can also compress image attributes after compression. The present invention aims to provide an image processing apparatus, a control method therefor, a computer program, and a storage medium that can be efficiently compressed in accordance with the above image.

【0010】[0010]

【課題を解決するための手段】かかる課題を解決するた
め、例えば本発明の画像処理装置は以下の構成を備え
る。すなわち、画素データを圧縮符号化する画像処理装
置であって、符号化データを記憶する記憶手段と、画像
データを画素ブロック単位に直交変換、量子化、符号化
すると共に、量子化処理における量子化ステップに関す
るパラメータを変更可能な第1の圧縮符号化手段と、該
第1の圧縮符号化手段で圧縮する際の前記量子化後のデ
ータに基づき、注目画素ブロックの属性を判定し、当該
判定結果を圧縮符号化する第1の属性データ符号化手段
と、量子化ステップに関するパラメータを変更可能で、
前記第1の圧縮符号化手段で圧縮した符号データを復号
し、再圧縮する第2の圧縮符号化手段と、該第2の圧縮
符号化手段で再圧縮する際の量子化後のデータに基づ
き、注目画素ブロックの属性を判定し、当該判定結果を
圧縮する第2の属性データ符号化手段と、前記第1の圧
縮符号化手段によって生成される符号量を監視すると共
に、当該符号データ量が所定量になったか否かを判断す
る符号量監視手段と、該符号量監視手段によって前記所
定量に達したと判断した場合、前記第1、第2の圧縮符
号化手段における、量子化ステップを大きくするようパ
ラメータを設定する設定手段と、該パラメータ設定手段
によりパラメータを変更した場合、前記第1の圧縮符号
化手段で従前に生成された符号データを、前記第2の圧
縮符号化手段によって再符号化させ、当該再符号化を済
ませた符号データを、前記第1の圧縮符号化手段のパラ
メータ変更後の符号データとして前記記憶手段に記憶
し、前記第1の属性データ符号化手段で符号化され属性
データを、前記第2の属性データ符号化手段で符号化し
た属性データで更新すると共に、パラメータ変更後の前
記第1の圧縮符号化手段で生成された符号化データを、
後続符号データとして前記記憶手段に保存させる制御手
段とを備える。
In order to solve such a problem, for example, an image processing apparatus of the present invention has the following configuration. That is, an image processing apparatus for compressing and encoding pixel data, including storage means for storing encoded data, orthogonal transformation, quantization, and encoding of image data in pixel block units, and quantization in quantization processing. The attribute of the pixel block of interest is determined based on the first compression encoding unit capable of changing the parameter relating to the step and the quantized data when compressed by the first compression encoding unit, and the determination result A first attribute data encoding means for compressing and encoding
Based on the second compression coding means for decoding and recompressing the coded data compressed by the first compression coding means, and the quantized data for recompressing by the second compression coding means. , The attribute amount of the pixel block of interest is determined, the second attribute data encoding means for compressing the determination result and the code amount generated by the first compression encoding means are monitored, and the code data amount is A code amount monitoring means for determining whether or not a predetermined amount has been reached, and when the code amount monitoring means determines that the predetermined amount has been reached, a quantization step in the first and second compression encoding means is performed. When the parameter is changed by the setting means for setting the parameter to be increased and the parameter is changed by the parameter setting means, the code data previously generated by the first compression encoding means is processed by the second compression encoding means by the second compression encoding means. Re-encoding, and the re-encoded code data is stored in the storage means as code data after parameter change of the first compression encoding means, and coded by the first attribute data encoding means. The encoded attribute data is updated with the attribute data encoded by the second attribute data encoding means, and the encoded data generated by the first compression encoding means after the parameter change,
And a control means for storing the subsequent code data in the storage means.

【0011】[0011]

【発明の実施の形態】以下、添付図面に従って本発明に
係る実施形態を説明するが、先ず、基本部分について説
明する。
BEST MODE FOR CARRYING OUT THE INVENTION Embodiments of the present invention will be described below with reference to the accompanying drawings. First, the basic part will be described.

【0012】図1は、実施形態が適用する画像処理装置
100の機能ブロック構成図である。以下、同図の各部
を簡単に説明する。
FIG. 1 is a functional block configuration diagram of an image processing apparatus 100 to which the embodiment is applied. Hereinafter, each part of the figure will be briefly described.

【0013】画像処理装置100は、イメージスキャナ
等から画像を入力する入力部101を備えている。イメ
ージスキャナには周知の像域分離処理部が含まれ、例え
ば原稿画像中の黒文字部分を構成する画素か否かを識別
するための属性フラグデータが画素単位で生成されるよ
うになっている。なお、黒文字の画素か否かの判断であ
るが、文字線画の場合、中間調画像と比較して、濃度変
化が急峻である。従って、先ず、濃度変化(隣接する画
素間の輝度もしくは濃度差)が所定閾値より大きいか否
かを判断し、その閾値よりも大きく、尚且つ、RGBの
値が互いにほぼ等しい値となっている(無彩色)場合に
黒文字の画素と判断できよう。要するに、属性フラグと
しては、無彩色/有彩色、文字線画/中間調を示す2ビ
ットで構成されるものとする(従って、色文字であるか
どうかも判断できる)。ただし、これに限らず、網点領
域か否か、ベクターグラフィックス領域か否か等を含む
ようにしても構わない。この場合、各属性毎にビットを
割り当てれば良い。
The image processing apparatus 100 has an input unit 101 for inputting an image from an image scanner or the like. The image scanner includes a well-known image area separation processing unit, and, for example, attribute flag data for identifying whether or not a pixel constitutes a black character portion in a document image is generated for each pixel. Although it is determined whether or not the pixel is a black character, in the case of a character line drawing, the change in density is steeper than in a halftone image. Therefore, first, it is determined whether or not the density change (brightness or density difference between adjacent pixels) is larger than a predetermined threshold value, and it is larger than the threshold value, and the RGB values are substantially equal to each other. If it is (achromatic), it can be determined that it is a black character pixel. In short, it is assumed that the attribute flag is composed of 2 bits indicating achromatic color / chromatic color and character line drawing / halftone (thus, it can be judged whether or not it is a color character). However, the present invention is not limited to this, and may include whether it is a halftone dot area or whether it is a vector graphics area. In this case, bits may be assigned to each attribute.

【0014】なお、上記では、入力部101はイメージ
スキャナから入力し、イメージスキャナー内部に像域分
離処理部が含まれるものとして説明したが、イメージス
キャナーがその処理部を備えていないのであれば、上記
の判断処理を本装置側に設けても構わない。また、入力
部101は、イメージスキャナからの画像に限らず、ペ
ージ記述言語レンダリングなどから画像データを入力し
ても良いし、記憶媒体に格納された画像ファイルを読込
むことで実現しても良く、場合によってはネットワーク
より受信するようにしても良い。特に、ホストコンピュ
ータよりページ記述言語データを受信してレンダリング
する際には、各画素が如何なる属性にあるのかについて
はページ記述言語で示されているので、判断は容易であ
る。更に、イメージスキャナ内に像域分離処理部が含ま
れていない場合には、本装置側で上記属性を判断する処
理部を設けても構わない。
In the above description, the input unit 101 inputs from the image scanner and the image area separation processing unit is included in the image scanner. However, if the image scanner does not have the processing unit, The above determination process may be provided on the device side. Further, the input unit 101 is not limited to an image from an image scanner, and may input image data from page description language rendering or the like, or may be realized by reading an image file stored in a storage medium. In some cases, it may be received from the network. In particular, when the page description language data is received from the host computer and rendered, what kind of attribute each pixel has is indicated by the page description language, so that the determination is easy. Furthermore, when the image scanner does not include the image area separation processing unit, a processing unit that determines the above attribute may be provided on the apparatus side.

【0015】いずれにしても、入力部101から入力し
た画像は符号化部102に、属性データは属性フラグ書
き換え部120の供給される。実施形態における符号化
部102の符号化は8×8画素単位に相当する画像デー
タを直交(DCT)変換し、後述する量子化ステップを
用いた量子化、ハフマン符号化処理を行い、出力する。
In any case, the image input from the input unit 101 is supplied to the encoding unit 102, and the attribute data is supplied to the attribute flag rewriting unit 120. In the coding of the coding unit 102 in the embodiment, image data corresponding to a unit of 8 × 8 pixels is subjected to orthogonal (DCT) transformation, and quantization and Huffman coding processing using a quantization step described later are performed and output.

【0016】第1のメモリ制御部103と第2のメモリ
制御部105は、上記符号化部102から出力されてく
る圧縮符号化済みデータを第1のメモリ104と第2の
メモリ106へ格納する様に制御する。ここで、第1の
メモリ104は、最終的に確定した(目標値以内のデー
タ量に圧縮し終わった)符号化データを、図1の基本構
成の外部に接続されるネットワーク機器、画像出力装置
や大容量記憶装置等へ出力するために、該符号化データ
を保持するためのメモリである。また、第2のメモリ1
06は、前記符号化データを第1のメモリ上に形成する
ための圧縮符号化処理を補助する作業用のメモリであ
る。
The first memory control unit 103 and the second memory control unit 105 store the compression-coded data output from the encoding unit 102 in the first memory 104 and the second memory 106. To control. Here, the first memory 104 stores the finally determined encoded data (compressed to a data amount within a target value) in a network device and an image output device connected to the outside of the basic configuration of FIG. 1. Or a memory for holding the encoded data for output to a mass storage device or the like. In addition, the second memory 1
Reference numeral 06 is a working memory that assists the compression coding processing for forming the coded data on the first memory.

【0017】カウンタ107は、符号化部102によっ
て圧縮符号化された画像データのデータ量をカウント
し、該カウント値を保持すると共に、そのカウント結果
を符号化シーケンスの制御を行なう符号化シーケンス制
御部108に出力する。
The counter 107 counts the data amount of the image data compressed and coded by the coding unit 102, holds the count value, and controls the coding sequence based on the count result. To 108.

【0018】符号化シーケンス制御部108では、カウ
ンタ107のカウント値がある設定値に達したかどうか
を検出し、その設定値に達したことを検出した時(目標
値を越えた時でも良い)にメモリ104内の格納済みの
データを廃棄するよう第1のメモリ制御部103に制御
信号を出力する。上記第1のメモリ制御部103は、こ
の制御信号に基づいて、メモリアドレスカウンタをクリ
アするか、あるいは画像データ用の符号化データ管理テ
ーブルをクリアすることにより、前記格納データを廃棄
する。また、このとき、符号化シーケンス制御部108
は、第1のカウンタ107をゼロクリアする(入力部1
01からの入力は継続している)と共に、符号化部10
2に対して今までより、高い圧縮率で符号化を行なうよ
う制御する。すなわち、本装置の符号化処理で発生する
符号化データのデータ量が最終的に例えば1/2になる
ように制御する。なお、ここでは、1/2としたが任意
に設定できることは言うまでもない。
The coding sequence control unit 108 detects whether or not the count value of the counter 107 reaches a certain set value, and when it detects that the set value has been reached (the target value may be exceeded). Then, a control signal is output to the first memory control unit 103 to discard the stored data in the memory 104. The first memory control unit 103 discards the stored data by clearing the memory address counter or the encoded data management table for image data based on the control signal. Further, at this time, the coding sequence control unit 108
Clears the first counter 107 to zero (input unit 1
The input from 01 continues) and the encoding unit 10
2 is controlled so that encoding is performed at a higher compression rate than before. That is, the data amount of the coded data generated in the coding process of the present apparatus is controlled so as to finally become, for example, 1/2. It should be noted that although it is set to 1/2 here, it can be set arbitrarily.

【0019】そして、圧縮率変更後の符号化部102か
らの符号化データも、これまでと同様、第1のメモリ制
御部103と第2のメモリ制御部105を経て、第1の
メモリ104と第2のメモリ106に夫々格納される。
The encoded data from the encoding unit 102 after changing the compression ratio is also stored in the first memory 104 via the first memory control unit 103 and the second memory control unit 105 as before. It is stored in the second memory 106, respectively.

【0020】さらに、符号化シーケンス制御部108
は、第2のメモリ制御部105に対して、これまでに第
2のメモリ106に格納した符号化データを読み出し、
符号化データ変換手段である再符号化部109に該符号
化データを出力するよう制御信号を出す。
Further, the coding sequence control unit 108
Reads the encoded data stored in the second memory 106 so far to the second memory control unit 105,
A control signal is output to the re-encoding unit 109 which is the encoded data conversion means so as to output the encoded data.

【0021】再符号化部109は、入力された符号化デ
ータを復号化し、データ量を減らすための再量子化等を
行なった後に再び符号化処理を行ない、圧縮率が変更さ
れた符号化部102と同じ圧縮率のデータ量を生成す
る。この生成された符号量は第2のカウンタ110で計
数される。
The re-encoding unit 109 decodes the input encoded data, performs re-quantization to reduce the amount of data, and then performs the encoding process again, and the encoding unit whose compression rate is changed. A data amount having the same compression ratio as 102 is generated. The generated code amount is counted by the second counter 110.

【0022】この再符号化部109から出力される符号
化データは、第1のメモリ制御部103と第2のメモリ
制御部105を経由して、それぞれ、第1のメモリ10
4と第2のメモリ106に格納される。
The encoded data output from the re-encoding unit 109 passes through the first memory control unit 103 and the second memory control unit 105, and the first memory 10 respectively.
4 and the second memory 106.

【0023】再符号化処理が終了したかどうかは、第2
のメモリ制御部が検出する。すなわち、再符号化処理す
るために読み出すデータが無くなれば、再符号化処理の
終了を符号化シーケンス制御部108に知らせる。実際
には、第2のメモリ制御部105の読みだし処理だけで
なく、再符号化部109の処理も終了した後に、符号化
処理が完了したことになる。
Whether or not the re-encoding process has been completed is determined by the second
Is detected by the memory control unit. That is, when there is no more data to read for the re-encoding process, the encoding sequence control unit 108 is notified of the end of the re-encoding process. Actually, the encoding process is completed after not only the reading process of the second memory control unit 105 but also the process of the re-encoding unit 109.

【0024】第2のカウンタ110で得られるカウント
値は、再符号化処理が完了した後、第1のカウンタ10
7で保持されているカウンタ値に加算される。この加算
結果は、再符号化処理が完了した直後における、第1の
メモリ104内のデータ量の合計を表す。即ち、1画面
分の符号化部102と再符号化部109の符号化処理が
終了した時点では、上記加算後の第1のカウンタ107
で保持されているカウンタ値は、1画面分を本装置が符
号化した場合に発生した総データ量を表す(詳細は後
述)。
The count value obtained by the second counter 110 is obtained by the first counter 10 after the re-encoding process is completed.
It is added to the counter value held in 7. This addition result represents the total amount of data in the first memory 104 immediately after the re-encoding process is completed. That is, at the time when the encoding process of the encoding unit 102 and the re-encoding unit 109 for one screen is completed, the first counter 107 after the addition is added.
The counter value stored in 1 represents the total amount of data generated when this apparatus encodes one screen (details will be described later).

【0025】符号化部102は、再符号化処理の終了/
未終了に関わらず、符号化するべき入力部101からの
画像データ(1ページ分の画像データ)が残っている限
りは符号化処理を継続して行なう。
The encoder 102 terminates the re-encoding process /
Regardless of whether it has not been completed, the encoding process is continued as long as the image data (image data for one page) from the input unit 101 to be encoded remains.

【0026】カウンタ107のカウント値がある設定値
に達したかどうかは入力部101から入力される1ペー
ジ分の画像データの符号化処理(符号化、再符号化)が
終わるまで繰り返され、上述した符号化と再符号化の処
理は、ここで得られる検出結果に応じた制御の上で実行
される。
Whether or not the count value of the counter 107 has reached a certain set value is repeated until the encoding process (encoding and re-encoding) of the image data for one page input from the input unit 101 is completed. The encoding and re-encoding processing is performed under the control according to the detection result obtained here.

【0027】次に、属性フラグ書換部120、属性フラ
グメモリ制御部121、そして属性フラグメモリ123
について説明する。
Next, the attribute flag rewriting unit 120, the attribute flag memory control unit 121, and the attribute flag memory 123.
Will be described.

【0028】属性フラグ書換部120は、符号化部10
2での直交変換したデータに基づいて書き換える(文字
・線画/中間調のフラグは変更無し)。
The attribute flag rewriting unit 120 includes an encoding unit 10.
Rewrite based on the orthogonally transformed data in 2 (character / line drawing / halftone flags are unchanged).

【0029】実施形態では、8×8画素単位に直交変換
し、量子化し、符号化するので、この8×8画素の画素
ブロックに対し代表となる属性を決定するが、この決定
は符号化部102で直交変換することで得たデータに基
づき行う一般に、JPEG符号化処理内では、周知の色
変換によって、輝度色差信号(YCbCr)に変換さ
れ、離散コサイン変換によって輝度、色差信号のそれぞ
れに空間周波数変換を行い、量子化マトリクスを用いて
DCT係数を量子化し、データ量を削減し、符号化す
る。
In the embodiment, since orthogonal transformation is performed in units of 8 × 8 pixels, quantization and encoding are performed, a representative attribute is determined for this pixel block of 8 × 8 pixels. This determination is performed by the encoding unit. Generally, based on the data obtained by performing the orthogonal transformation at 102, in the JPEG encoding process, the luminance and color difference signals (YCbCr) are converted into the luminance color difference signals (YCbCr) by the known color conversion, and the luminance and the color difference signals are spatially divided by the discrete cosine conversion. Frequency conversion is performed, DCT coefficients are quantized using a quantization matrix, the amount of data is reduced, and encoding is performed.

【0030】この際、実施形態では、量子化されたDC
T係数によって属性の書き換えを行う。書き換えとして
は、例えば色差(Cb、Cr)成分のDCT値が全て0
であれば色成分がない、すなわち、無彩色を示すことに
なる。属性フラグの無彩色/有彩色を示すビットを無彩
色ビットを示すようにセットする。或いは、閾値を設定
しておき、色成分が全て0であった場合、或いは、有意
係数が10個以下であれば無彩色にセットしても良い。
At this time, in the embodiment, the quantized DC
The attribute is rewritten by the T coefficient. For rewriting, for example, all DCT values of color difference (Cb, Cr) components are 0.
If there is no color component, that is, an achromatic color is shown. The bit indicating the achromatic / chromatic color of the attribute flag is set to indicate the achromatic color bit. Alternatively, a threshold value may be set in advance, and when all the color components are 0, or when the significant coefficient is 10 or less, it may be set to an achromatic color.

【0031】そして、書き換えた属性フラグ(8×8画
素ブロックの代表属性データ)を圧縮(ランレングス符
号)し、属性フラグデータメモリ制御部121を介して
属性フラグメモリ123に格納する。
Then, the rewritten attribute flag (representative attribute data of 8 × 8 pixel block) is compressed (run length code) and stored in the attribute flag memory 123 via the attribute flag data memory control unit 121.

【0032】図17は属性フラグ書換部120内におけ
る圧縮符号化部の構成を示している。
FIG. 17 shows the structure of the compression encoding unit in the attribute flag rewriting unit 120.

【0033】図示において、判定部310では,入力さ
れる属性フラグデータの前回の値と現在の値とが同じか
を判定し、同じ場合はRLコード生成部311に、違う
場合はLTコード生成部312にデータを送るように切
り替える。RLコード生成部311では、前データと同
じ場合の回数を違うデータが出てくるまでカウントし、
最後に、繰返したデータを出力する。LTコード生成部
312では、データが前画素と異なる場合の数をカウン
トして、カウント数に対応する符号語と、実際データの
最小構成ビット数をカウント数分だけ出力する。合成部
313では,RL部の出力データとLT部の出力データ
を合成してコード315として出力する(最終的に属性
フラグメモリ123に格納される)。なお、この構成は
その一例であって、別な構成で実現しても構わない。
In the figure, the determination unit 310 determines whether the previous value and the current value of the input attribute flag data are the same. If they are the same, the RL code generation unit 311 is used. If they are different, the LT code generation unit 311 is used. Switch to send data to 312. The RL code generation unit 311 counts the number of times the same as the previous data until different data appears,
Finally, the repeated data is output. The LT code generation unit 312 counts the number of cases where the data is different from the previous pixel, and outputs the code word corresponding to the count number and the minimum number of bits constituting the actual data for the count number. The synthesizing unit 313 synthesizes the output data of the RL unit and the output data of the LT unit and outputs it as a code 315 (finally stored in the attribute flag memory 123). It should be noted that this configuration is one example, and may be realized by another configuration.

【0034】次に、上記図1の構成における画像処理に
係る圧縮符号化処理について説明する。この処理フロー
を図8に示すが、説明を簡単にするため、簡略化した図
3のフローチャートに従って先ず説明する。
Next, the compression coding processing relating to the image processing in the configuration of FIG. 1 will be described. This processing flow is shown in FIG. 8, but for simplification of description, it will first be described according to the simplified flowchart of FIG.

【0035】既に説明したように、本発明の画像処理装
置100は、スキャナ等の入力部101から入力した1
ページの画像データを所定のデータ量以下に圧縮符号化
する装置である。該符号化処理を実現するために、前記
入力部101以外に、符号化部102、再符号化部10
9、第1のメモリ104、第2のメモリ106等を有す
る。これらの機能ブロックを用い、図3に示すフローチ
ャートに基づいて符号化処理を行なう。
As described above, the image processing apparatus 100 of the present invention uses the input unit 101 such as a scanner to input the image
This is a device that compresses and encodes page image data to a predetermined data amount or less. In order to realize the encoding process, in addition to the input unit 101, an encoding unit 102 and a re-encoding unit 10
9, a first memory 104, a second memory 106, and the like. Encoding processing is performed using these functional blocks based on the flowchart shown in FIG.

【0036】図3のフローチャートは、大別すると、下
記の3つの処理フェーズに分かれる。 (1)符号化フェーズ (2)符号化・再符号化フェーズ (3)転送フェーズ 上記それぞれの処理フェーズおいて、どのように画像デ
ータ、符号化データ等が流れて処理され、メモリにどの
ように格納されるかを視覚的に解り易く示したのが図4
乃至図7である。
The flowchart of FIG. 3 is roughly divided into the following three processing phases. (1) Encoding phase (2) Encoding / re-encoding phase (3) Transfer phase In each of the above processing phases, how image data, encoded data, etc. are processed by flow, FIG. 4 shows visually whether it is stored or not.
Through FIG. 7.

【0037】図4は、図3のフローチャートにおけるス
テップS303とS305に対応する符号化フェーズの
初期状態を表わす(ただし、属性データの符号化データ
については省略して示している)。また、図5はステッ
プS307〜S315に対応する符号化・再符号化フェ
ーズの処理状態を、図6はステップS317に対応する
転送フェーズの処理状態を、図7は転送フェーズ後の符
号化フェーズの処理状態を表わす。以下、各フェーズに
ついて説明する。
FIG. 4 shows the initial state of the encoding phase corresponding to steps S303 and S305 in the flow chart of FIG. 3 (however, the encoded data of the attribute data is omitted). 5 shows the processing state of the encoding / re-encoding phase corresponding to steps S307 to S315, FIG. 6 shows the processing state of the transfer phase corresponding to step S317, and FIG. 7 shows the processing state of the encoding phase after the transfer phase. Indicates the processing status. Each phase will be described below.

【0038】<<符号化フェーズ>>1ページ分の画像
データの符号化処理は、符号化パラメータの初期設定
(ステップS301)から始まる。ここでは符号化処理
する画像サイズ(スキャナ等の入力部101から読み取
る用紙サイズ)から一意的に定まる符号化データ量の上
限値や符号化部102(ここでは公知のJPEG符号化
方式を用いるものとする)に適用する量子化ステップ
(Q1)を設定する。
<< Encoding Phase >> The encoding process of the image data for one page starts from the initial setting of encoding parameters (step S301). Here, the upper limit value of the encoded data amount that is uniquely determined from the image size to be encoded (the paper size read from the input unit 101 such as a scanner) and the encoding unit 102 (here, a known JPEG encoding method is used). Set to the quantization step (Q1).

【0039】続くステップS303では、符号化部10
2は、この量子化ステップQ1に従い、注目画素ブロッ
ク(=8×8画素)について直交変換する。そして、そ
れを属性フラグ書換部120に出力すると共に、設定さ
れた量子化ステップ(Q1)に従って量子化し、符号化
する。この符号量は1ページについて第1のカウンタ1
07が累積カウントしていく。
In the following step S303, the encoding unit 10
2 orthogonally transforms the pixel block of interest (= 8 × 8 pixels) according to this quantization step Q1. Then, it is output to the attribute flag rewriting unit 120, and is also quantized and encoded according to the set quantization step (Q1). This code amount is the first counter 1 for one page.
07 counts cumulatively.

【0040】ステップS305では、発生した該データ
量のカウント値が予め設定した上限値をオーバーしたか
どうか(もしくは達した)を検知し、オーバーしていな
ければステップS303のJPEG符号化処理を継続す
る。これが初期状態の符号化フェーズである。
In step S305, it is detected whether or not the generated count value of the data amount exceeds (or has reached) a preset upper limit value. If not, the JPEG encoding process of step S303 is continued. . This is the initial encoding phase.

【0041】符号化部102から出力する符号化データ
は、図4に示すように第1のメモリ104と第2のメモ
リ106の両方に格納されていく。縦縞で示した領域が
該格納した符号を表現している。
The encoded data output from the encoding unit 102 is stored in both the first memory 104 and the second memory 106 as shown in FIG. The area indicated by vertical stripes represents the stored code.

【0042】<<符号化・再符号化フェーズ>>符号化
部102の符号化処理が進行し、前記データ量のカウン
ト値が設定されている上限値をオーバーすると、ステッ
プS307にて、第1のメモリ104内の符号化データ
を廃棄すると共に、ステップS309にて、符号化部1
02の量子化ステップをQ2(Q2>Q1)に変更す
る。
<< Encoding / Re-Encoding Phase >> When the encoding process of the encoding unit 102 progresses and the count value of the data amount exceeds the set upper limit value, the first step is performed in step S307. The encoded data in the memory 104 of the above is discarded, and at the same time, in step S309, the encoding unit 1
The quantization step of 02 is changed to Q2 (Q2> Q1).

【0043】符号化データのデータ量のカウント値が設
定された上限値をオーバーするという事は、圧縮後のデ
ータ量が目標値以内に収まらないことを意味する。よっ
て同じ量子化ステップを用いて符号化処理を継続しても
意味が無いので、前よりもデータ量が少なくなるよう
に、量子化ステップをQ2(Q1のときよりも量子化ス
テップは大きくなる)に変更するわけである。
The fact that the count value of the data amount of the encoded data exceeds the set upper limit value means that the data amount after compression does not fall within the target value. Therefore, it is meaningless to continue the encoding process using the same quantization step, so that the quantization step is set to Q2 (the quantization step is larger than when Q1) so that the data amount is smaller than before. To change to.

【0044】量子化ステップを変更した後、ステップS
311では符号化部102の符号化処理を再開し、図5
に示すように符号化データを第2のメモリ106のみに
格納する。それと並行して、ステップS313の再符号
化処理を行なう。再符号化処理では、第2のメモリ10
6に格納済みの符号化データ(画像の符号化データ及び
属性符号化データの両方)を読み出して、再符号化部1
09にて再符号化処理を行ない、2つのメモリ104、
106に格納する。そして、縦縞の符号を全て再符号
化するまで、該符号化処理と再符号化処理を継続する。
なお、再符号化部109は、符号化部102に対して設
定した新たな量子化ステップと同じものを用い、復号し
て得られた属性に従って、再符号化することになる具体
的にこの再符号化処理では、符号化データを一旦ハフマ
ン復号した後の各量子化値に対して、これら値を2n
割った結果と同様の結果が出るビットシフト処理を施し
た後、再度ハフマン符号化を行なうことにより実現され
る。この方法は、ビットシフトのみで量子化ステップを
変更する点と逆直交変換や再直交変換処理を行なわない
点で、高速な再符号化処理が可能である。ステップ31
5では、再符号化処理の終了検知が行なわれる。
After changing the quantization step, step S
In 311 the encoding process of the encoding unit 102 is restarted, and as shown in FIG.
The encoded data is stored only in the second memory 106 as shown in FIG. In parallel with this, the re-encoding process of step S313 is performed. In the re-encoding process, the second memory 10
The coded data (both the coded data of the image and the coded data of the attribute) stored in 6 are read out, and the re-encoding unit 1
09, re-encoding processing is performed, and the two memories 104,
It stores in 106. Then, the encoding process and the re-encoding process are continued until all the codes of the vertical stripes are re-encoded.
Note that the re-encoding unit 109 uses the same new quantization step set for the encoding unit 102 and re-encodes according to the attribute obtained by decoding. In the encoding process, each quantized value after the Huffman decoding of the encoded data is bit-shifted to produce a result similar to the result of dividing these values by 2 n , and then the Huffman encoding is performed again. It is realized by performing. This method enables high-speed re-encoding processing in that the quantization step is changed only by bit shifting and that inverse orthogonal transformation or re-orthogonal transformation processing is not performed. Step 31
At 5, the end of the re-encoding process is detected.

【0045】再符号化後のデータ量は再符号化前の符号
化データのデータ量よりも少なくなるので、図5に示す
ように、再符号化前の符号を格納していたメモリ領域に
再符号化後の符号化データを上書きするように格納する
ことができる。再符号化処理が終了した時点で、縦縞
の符号化データのデータ量は図6に示すの斜め縞の符
号化データのデータ量へと減少する。
Since the data amount after re-encoding becomes smaller than the data amount of encoded data before re-encoding, as shown in FIG. 5, data is re-encoded in the memory area where the code before re-encoding is stored. The encoded data after encoding can be stored so as to be overwritten. When the re-encoding process is completed, the data amount of the coded data of vertical stripes is reduced to the data amount of the coded data of diagonal stripes shown in FIG.

【0046】上記の如く、再符号化部109は、再符号
化する際に、量子化した状態のデータまで復号する、つ
まり、画像データにまで復号化しなくてもよくなるの
で、処理速度を高速化できる。再符号化する際には、量
子化ステップを一段階大きな値で量子化する(上記の通
り単純にするためにはビットシフトが有効)が、この
際、それまで0でなかったものが量子化ステップを大き
くすることで0になることがある。つまり、それまで有
彩色であると判断されたいた画素ブロック領域が、無彩
色として扱う必要がでてくる可能性があり、属性フラグ
データを書き換える必要がある。そこで、第2の属性フ
ラグ書換部124は新に量子化されたデータに基づき、
属性データを書き換え、属性フラグデータメモリン部1
21を介して属性フラグメモリ123に上書きする。
As described above, when the re-encoding unit 109 re-encodes, it is not necessary to decode the quantized data, that is, it is not necessary to decode the image data, so that the processing speed is increased. it can. When re-encoding, the quantization step is quantized with a value that is one step larger (bit shift is effective for simplicity as described above), but at this time, the value that was not 0 is quantized. It may become 0 by increasing the step. That is, there is a possibility that a pixel block area that has been determined to be chromatic until then needs to be treated as an achromatic color, and it is necessary to rewrite the attribute flag data. Therefore, the second attribute flag rewriting unit 124, based on the newly quantized data,
Rewriting the attribute data, attribute flag data memory unit 1
The attribute flag memory 123 is overwritten via 21.

【0047】以上で説明したステップS307〜315
が、符号化・再符号化フェーズで行なう処理である。
Steps S307 to 315 described above
Is a process performed in the encoding / re-encoding phase.

【0048】<<転送フェーズ>>再符号化処理が終了
したら、ステップS317では転送処理が行なわれる。
該転送処理では、図6に示すように、符号化・再符号化
フェーズで第2のメモリ106のみに格納した斜め縞
の符号化データを、第1のメモリ104内の斜め線の
符号化データに連結されるアドレスに転送し、格納す
る。その一方で、第2のメモリ106上で分散してしま
っている斜め縞の符号化データと斜め縞の符号化デ
ータが第1のメモリ104上で連続して格納される様
に、前記斜め縞の符号化データを第2のメモリ106
内で転送し、連結させる。これが、転送フェーズで行な
う処理である。
<< Transfer Phase >> When the re-encoding process is completed, the transfer process is performed in step S317.
In the transfer processing, as shown in FIG. 6, the diagonal stripe coded data stored in only the second memory 106 in the coding / recoding phase is converted into the diagonal line coded data in the first memory 104. Transfer to the address linked to and store. On the other hand, the diagonal stripes are coded so that the coded data of the diagonal stripes and the coded data of the diagonal stripes, which are dispersed in the second memory 106, are continuously stored in the first memory 104. The encoded data of the second memory 106
Transfer within and connect. This is the process performed in the transfer phase.

【0049】上記転送フェーズが終了したら、ステップ
S303、S305の符号化フェーズに戻り、図7に示
すように斜め縞の符号を符号化部102から出力して
2つのメモリ104,106に格納する。この符号化フ
ェーズは、初期状態の符号化フェーズ(図4)と少し異
なり、符号化部102で符号化する際の量子化ステップ
がQ1からQ2に変更されていると共に、2つのメモリ
104,106に格納されている符号化データも様々な
フェーズで処理された符号の集まりである。それらの違
いを無視すれば、転送フェーズ直後の符号化フェーズと
初期状態の符号化フェーズは、同じと見なせる。
When the transfer phase is completed, the process returns to the encoding phase of steps S303 and S305, and the code of the diagonal stripe is output from the encoding unit 102 and stored in the two memories 104 and 106 as shown in FIG. This coding phase is slightly different from the coding phase in the initial state (FIG. 4), and the quantization step at the time of coding by the coding unit 102 is changed from Q1 to Q2, and the two memories 104 and 106 are also used. The encoded data stored in is also a collection of codes processed in various phases. If these differences are ignored, the coding phase immediately after the transfer phase and the coding phase in the initial state can be regarded as the same.

【0050】よって、符号化フェーズ、符号化・再符号
化フェーズと転送フェーズの3つを繰り返すことで、最
終的に1ページの画像データをデータ量設定値以下に圧
縮した符号を第1のメモリに格納することが出来る。し
かも、入力部101は一連の処理が終わるまで、入力を
継続するだけである。すなわち、画像を再度最初から入
力し直すということが無くなる。
Therefore, by repeating the three phases of the encoding phase, the encoding / re-encoding phase and the transfer phase, the code obtained by finally compressing the image data of one page to the data amount set value or less is stored in the first memory. Can be stored in. Moreover, the input unit 101 only continues the input until the series of processing is completed. That is, it is not necessary to input the image again from the beginning.

【0051】図3に示したフローチャートは、説明が理
解しやすいように、図4、図5、及び、図6に示した各
フェーズに対応する処理のみを記述した。しかしながら
実際には、1ページの画像データの入力はどこかのフェ
ーズで終了する。従って、どのフェーズで終了したかに
よって、それ以降の対応も多少異なる。それを考慮した
流れを示したのが図8のフローチャートである。図8の
フローチャートは、1ページ分の画像データの入力完了
と図3で説明した各種処理との関係を考慮したものであ
り、ここでは図3のフローチャートに、ステップS80
1、S803、S805、S807を追加している。
The flow chart shown in FIG. 3 describes only the processing corresponding to each phase shown in FIGS. 4, 5 and 6 for easy understanding of the description. However, in reality, the input of the image data of one page ends in some phase. Therefore, depending on which phase the process is completed, the subsequent actions are slightly different. FIG. 8 is a flowchart showing the flow in consideration of this. The flow chart of FIG. 8 considers the relationship between the completion of inputting one page of image data and the various processes described in FIG. 3, and here, in the flow chart of FIG.
1, S803, S805, and S807 are added.

【0052】ステップS801、S803、S805
は、それぞれ、符号化フェーズ、符号化・再符号化フェ
ーズ、転送フェーズにおいて、入力部101からの1ペ
ージ分の画像データの入力が終了したことを検知する。
Steps S801, S803, S805
Detects that the input of the image data for one page from the input unit 101 is completed in the encoding phase, the encoding / re-encoding phase, and the transfer phase, respectively.

【0053】符号化フェーズと転送フェーズで1ページ
分の画像データの入力が終了したことを検知した場合
(ステップS801、S805)、ステップS807へ
移り、当該ページの圧縮符号化処理を終了し、次に処理
すべき1ページ以上の画像データがあれば、次の1ペー
ジ分の画像データの圧縮符号化処理を開始し、無ければ
停止状態に入る。
When it is detected that the input of the image data for one page is completed in the encoding phase and the transfer phase (steps S801 and S805), the process proceeds to step S807, the compression encoding process of the page is terminated, and If there is one or more pages of image data to be processed, the compression encoding process of the next one page of image data is started, and if there is none, the process enters the stopped state.

【0054】一方、符号化・再符号化フェーズで1ペー
ジ分の画像データの入力終了を検知した場合(ステップ
S803)には、符号化部102では再符号化処理する
画像データが無くなるまで一旦動作を止める必要がある
ので、ステップS311の符号化処理をパスし、ステッ
プS313で、今までに符号化部102で符号化済みの
画像データを所定の符号化データ量に抑える為の再符号
化処理のみを継続して行なう。再符号化処理が全て終了
して、その後の転送処理が終わらないと、1ページ分の
画像データ全体の符号化データが第1のメモリ上に集ま
らないため、1ページ分の画像データの入力終了後も再
符号化処理及びそれに続く転送処理は継続して行われる
必要がある。この場合には、ステップS315にて、再
符号化処理が全て終了したことを検知すると、符号化・
再符号化フェーズ中に、第2のメモリ106のみに格納
された符号化データを第1のメモリに転送し(ステップ
S317)た後、次のステップS805にて、1ページ
分の画像データの入力終了が検知されてステップS80
7へ移ることになる。
On the other hand, when the input end of the image data for one page is detected in the encoding / re-encoding phase (step S803), the encoding unit 102 operates once until there is no image data to be re-encoded. Therefore, the re-encoding process for passing the encoding process of step S311 and suppressing the image data already encoded by the encoding unit 102 to a predetermined encoded data amount in step S313. Only continue. If all the re-encoding processing is completed and the subsequent transfer processing is not completed, the encoded data of the entire image data for one page cannot be collected in the first memory, and the input of the image data for one page is completed. After that, the re-encoding process and the subsequent transfer process need to be continuously performed. In this case, when it is detected in step S315 that all the re-encoding processing has been completed, encoding /
During the re-encoding phase, the encoded data stored only in the second memory 106 is transferred to the first memory (step S317), and then in the next step S805, the image data for one page is input. When the end is detected, step S80
I will move to 7.

【0055】以上が動作であり、図8の動作説明でもあ
る。
The above is the operation and is also an explanation of the operation in FIG.

【0056】<メモリ格納方法の変形例>図9、図10
は図5、図6の概念図で示したメモリ格納方法の変形例
を示す図である。
<Modification of Memory Storage Method> FIGS. 9 and 10
FIG. 9 is a diagram showing a modification of the memory storage method shown in the conceptual diagrams of FIGS. 5 and 6.

【0057】図5の概念図においては、符号化・再符号
化フェーズでは、符号化部102から出力する符号化デ
ータは第2のメモリ106のみに格納していたが、図9
に示すように符号化・再符号化フェーズ中に、符号化部
102から出力する符号化データを第1、第2メモリの
両方に直接格納する。
In the conceptual diagram of FIG. 5, in the encoding / re-encoding phase, the encoded data output from the encoding unit 102 is stored only in the second memory 106.
As shown in, during the encoding / re-encoding phase, the encoded data output from the encoding unit 102 is directly stored in both the first and second memories.

【0058】符号化部102から見ると、どのフェーズ
で符号化して出力する符号化データも両方のメモリへ格
納することになる。また、図6の概念図とは異なり、図
10に示す様に、転送フェーズでメモリ間のデータ転送
が必要なくなる。またこの変形例の場合には、符号化・
再符号化フェーズにおいて、符号化データと再符号化デ
ータを第1のメモリ104へ送った順序で順次格納され
る。そのため2種類のデータが入り混じってしまうとい
う問題は有る。
From the viewpoint of the encoding unit 102, the encoded data which is encoded and output in any phase is stored in both memories. Also, unlike the conceptual diagram of FIG. 6, as shown in FIG. 10, data transfer between memories is not necessary in the transfer phase. In the case of this modification,
In the re-encoding phase, the encoded data and the re-encoded data are sequentially stored in the order sent to the first memory 104. Therefore, there is a problem that two types of data are mixed.

【0059】従って、この変形例の場合にはこれに対応
する為に符号化データをある単位で区切って、ファイル
或いはパケットとして管理する様にする。具体的には、
ファイル管理テーブル、或いは、パケット管理テーブル
等を別に作成して管理する。
Therefore, in the case of this modification, in order to cope with this, the encoded data is divided into certain units and managed as files or packets. In particular,
A file management table or a packet management table is separately created and managed.

【0060】一つの手法としては、符号化部102から
のデータを第1メモリ104に格納する際、適当な単位
(例えば前記直交変換の単位が8×8の画素ブロックで
あるので、8×i(i=1、2…の整数)ライン分のデ
ータ)毎に、画像データの先頭から管理番号を割り当
て、各管理番号に対応する符号化データの格納先頭アド
レスと該符号化データ量とを、管理番号順に格納できる
ような管理テーブルを作成する。
As one method, when the data from the encoding unit 102 is stored in the first memory 104, an appropriate unit (for example, since the unit of orthogonal transformation is a pixel block of 8 × 8, 8 × i is used). A management number is assigned from the beginning of the image data for each (i = 1, 2 ... Line data), and the storage start address of the encoded data corresponding to each management number and the encoded data amount are Create a management table that can be stored in order of management numbers.

【0061】符号化部102や再符号化部109は処理
中のデータの管理番号を保持し、該管理番号に基づい
て、符号化データ格納時の先頭アドレスと符号化データ
量とを管理テーブルに書き込む。このようにすれば、符
号化部102と再符号化部109で処理した符号化デー
タをランダムに格納したとしても、前記管理テーブルを
管理番号順にアクセスし、その時読み出させる先頭アド
レスと符号化データ量に基づいて、符号化データを第1
メモリ104から読み出せば、画像の先頭から順番に符
号化データを読み出すことができる。このような管理機
構を設ければ、画像上で連続するデータをメモリ上で連
続するように格納する必要性が無くなる。
The encoding unit 102 and the re-encoding unit 109 hold the management number of the data being processed, and based on the management number, the start address and the encoded data amount at the time of storing the encoded data are stored in the management table. Write. By doing so, even if the encoded data processed by the encoding unit 102 and the re-encoding unit 109 is stored at random, the management table is accessed in the order of the management numbers, and the start address and the encoded data to be read at that time are read. The first encoded data based on the quantity
If the data is read from the memory 104, the encoded data can be read in order from the beginning of the image. If such a management mechanism is provided, there is no need to store continuous data on the image in the memory so as to be continuous.

【0062】図10の概念図における転送フェーズ後の
符号化フェーズは、これまで説明した2つの符号化フェ
ーズ(図4、図7)とほとんど同じであり、第1のメモ
リ内における符号の格納状態が図11に示した様に若干
異なるだけである。よって、先の説明と本変形例は、3
つのフェーズを繰り返して処理することに変わりは無
い。
The encoding phase after the transfer phase in the conceptual diagram of FIG. 10 is almost the same as the two encoding phases described so far (FIGS. 4 and 7), and the storage state of the code in the first memory. Are only slightly different as shown in FIG. Therefore, the above description and this modification are 3
There is no change in processing one phase repeatedly.

【0063】以上の結果、実施形態によれば、在る原稿
を読み取って、符号化中に、目標値に達したと判断した
場合、それ以降については新たに設定された量子化ステ
ップに従って、より高い圧縮率で圧縮符号化される。ま
た、目標値に達したと判断したとき、それ以前に既に圧
縮符号化された符号データについては一旦、復号化し、
新に設定された量子化ステップに従って再度符号化す
る。従って、原稿読み取り中に、生成される符号データ
量が目標値を越えたとしても、その読み取りを継続させ
たまま目標値以内に符号量を抑えることが可能になる。
また、属性フラグデータについても、画像データの符号
化、再符号化に追従するようにして更新されていくの
で、後処理(例えば画像の加工や編集)に対して、有益
な情報を提供することが可能になる。
As a result of the above, according to the embodiment, when an existing document is read and it is determined that the target value is reached during encoding, the subsequent steps are further performed in accordance with the newly set quantization step. It is compression encoded at a high compression rate. When it is determined that the target value has been reached, the coded data that has already been compression-coded before that is temporarily decoded,
Re-encoding is performed according to the newly set quantization step. Therefore, even if the generated code data amount exceeds the target value during reading the original, the code amount can be suppressed within the target value while continuing the reading.
Further, the attribute flag data is also updated so as to follow the encoding and re-encoding of the image data, so that useful information should be provided for post-processing (eg image processing and editing). Will be possible.

【0064】<第2の実施形態>以下、本発明に係る第
2の実施形態を説明する。図2は画像処理装置の基本構
成を示している。
<Second Embodiment> The second embodiment according to the present invention will be described below. FIG. 2 shows the basic configuration of the image processing apparatus.

【0065】図1の画像処理装置100と大きく異なる
点は、最初に符号化を行なう符号化部が2つ並列に存在
する点である。また、図1では属性フラグ書換部12
0、属性フラグデータメモリ制御部121、属性フラグ
メモリ123、属性フラグ書換部124が存在し、画像
データとは独立したメモリに属性データを格納している
のに対し、本第2の実施形態では、符号化部202、2
05、再符号化部211内に属性フラグの書き換え及び
符号化処理を含め、符号化した画像データと同じメモリ
に格納するようにした点である。ただし、属性データの
符号量は、もともと実施形態では8×8画素(64画
素)についての代表属性データを割り当てていたので、
もともと情報量は少なく、全体して見たとき、生成され
るデータ量に支配的なのは画像データであるので、第1
のカウンタ208、第2のカウンタ210は画像データ
の符号量を計数するものとした。勿論、属性データも書
き換えが行われ、圧縮率は変動するので、これらを含め
てカウントしても構わない。
A major difference from the image processing apparatus 100 shown in FIG. 1 is that there are two encoding units that perform encoding first in parallel. Further, in FIG. 1, the attribute flag rewriting unit 12
0, the attribute flag data memory control unit 121, the attribute flag memory 123, and the attribute flag rewriting unit 124 exist, and the attribute data is stored in a memory independent of the image data, whereas in the second embodiment. , Coding units 202, 2
05, the re-encoding unit 211 includes the rewriting of the attribute flag and the encoding process, and stores the encoded image data in the same memory. However, with respect to the code amount of the attribute data, since the representative attribute data for 8 × 8 pixels (64 pixels) was originally assigned in the embodiment,
Originally, the amount of information is small, and when viewed as a whole, image data dominates the amount of generated data.
The counter 208 and the second counter 210 are for counting the code amount of the image data. Of course, since the attribute data is also rewritten and the compression rate fluctuates, these may be included in the count.

【0066】さて、画像処理装置200は、入力部20
1から入力される画像データを、第1の符号化部202
と第2の符号化部205で並行して符号化し、互いに圧
縮率の異なる2種類の符号化データを生成する。本例で
も、符号化方式は公知のJPEG符号化方式を用い、8
×8画素単位に相当する画像データを直交変換し、後述
する量子化ステップを用いた量子化、ハフマン符号化処
理を行なうものである。
Now, the image processing apparatus 200 has the input unit 20.
Image data input from the first encoding unit 202
And the second encoding unit 205 performs parallel encoding to generate two types of encoded data having different compression rates. Also in this example, the well-known JPEG encoding method is used as the encoding method.
The image data corresponding to a unit of × 8 pixels is orthogonally transformed, and quantization and Huffman coding processing using a quantization step described later is performed.

【0067】なお、本例では第1の符号化部202より
も、第2の符号化部205の方が適用する圧縮率を高く
設定する。具体的には、初期状態では、第1の符号化部
202に設定する量子化ステップをQ1、第2の符号化
部205へ設定する量子化ステップをQ2(Q2=Q1
×2)とする。つまり、第2の符号化部205に設定す
る量子化ステップは、常に第1の符号化部202よりも
1ランク圧縮率の高くなるパラメータを設定する。第
1、第2の符号化部202、205は設定されたパラメ
ータに従い、直交変換したデータに対して最適な量子化
処理を行い、符号化する。なお、第1の符号化部202
及び第2の符号化部205は、それぞれに設定された量
子化ステップで量子化して得た直交変換係数に従い属性
フラグについての書き換え及び圧縮符号化を行うことに
なる。属性フラグの書き換え及びその圧縮方法について
は、第1の実施形態と同様であるものとする。
In this example, the compression rate applied by the second encoder 205 is set higher than that by the first encoder 202. Specifically, in the initial state, the quantization step set in the first coding unit 202 is Q1, and the quantization step set in the second coding unit 205 is Q2 (Q2 = Q1).
X2). That is, in the quantization step set in the second coding unit 205, a parameter having a higher one-rank compression rate than that in the first coding unit 202 is always set. The first and second encoding units 202 and 205 perform optimal quantization processing on the orthogonally transformed data according to the set parameters and encode the data. The first encoding unit 202
The second encoding unit 205 rewrites and compresses and encodes the attribute flag according to the orthogonal transform coefficient obtained by the quantization in the quantization step set for each. The rewriting of the attribute flag and the compression method thereof are the same as those in the first embodiment.

【0068】第1のカウンタ208は、符号化部202
から出力される画像データの符号化データのデータ量を
カウントして、これを保持すると共に、符号化シーケン
ス制御部209にも出力する。
The first counter 208 has a coding unit 202.
The data amount of the encoded data of the image data output from is counted and held, and is also output to the encoding sequence control unit 209.

【0069】一方、符号化部205で符号化された符号
化データは、第2のメモリ制御部206を経由して、第
2のメモリ207に格納される。このとき、第2のカウ
ンタ210は、符号化部205から出力される符号化デ
ータのデータ量をカウントし、これを保持する。
On the other hand, the encoded data encoded by the encoding unit 205 is stored in the second memory 207 via the second memory control unit 206. At this time, the second counter 210 counts the data amount of the encoded data output from the encoding unit 205 and holds it.

【0070】更に、後述する第2のメモリ207に格納
している符号化データを第1のメモリ204に転送する
時には、それと同時に上記カウント値を、第1のカウン
タ208に転送する。
Further, when the coded data stored in the second memory 207, which will be described later, is transferred to the first memory 204, at the same time, the count value is transferred to the first counter 208.

【0071】さて、第1のカウンタ208が符号化部2
02から出力される符号化データのデータ量をカウント
中に、該カウント値がある設定値に達した時には、符号
化シーケンス制御部209は、先に説明した第1の実施
形態と同様、メモリ制御部203に対してメモリ204
に格納されているデータを廃棄するよう制御信号を出
す。
Now, the first counter 208 is the encoding unit 2
When the count value reaches a certain set value while counting the data amount of the encoded data output from 02, the encoding sequence control unit 209 controls the memory control as in the first embodiment described above. Memory 204 for unit 203
Issue a control signal to discard the data stored in.

【0072】そして、符号化シーケンス制御部209
は、第2のメモリ207に格納している符号化データ
(符号化画像データ及び符号化属性データ)を読み出し
て第1のメモリ204に転送し、第1のメモリ204に
格納するよう、メモリ制御部206とメモリ制御部20
3に制御信号を出力する。このとき、第2のカウンタ2
10のカウント値を第1のカウンタ208に転送され、
その値が第1のカウンタのカウント値としてロード(上
書き)される。また、この後、第2のカウンタ210は
ゼロクリアされ、それ以降に入力する画像データの符号
化データ量を計数を開始する。
Then, the coding sequence control unit 209
Memory control so that the encoded data (encoded image data and encoded attribute data) stored in the second memory 207 is read out, transferred to the first memory 204, and stored in the first memory 204. Unit 206 and memory control unit 20
The control signal is output to 3. At this time, the second counter 2
The count value of 10 is transferred to the first counter 208,
The value is loaded (overwritten) as the count value of the first counter. After that, the second counter 210 is cleared to zero, and the counting of the coded data amount of the image data input thereafter is started.

【0073】要するに、上記第2のカウンタ210のカ
ウント値は、第2のメモリ207に格納している符号化
データのデータ量を表わしているので、そのカウント値
と符号化データを、互いの対応付けが変わらない様に、
そのまま第1のカウンタと第1のメモリへコピーしたと
考えれば良い。
In short, since the count value of the second counter 210 represents the data amount of the encoded data stored in the second memory 207, the count value and the encoded data correspond to each other. So that the attachment does not change,
It may be considered that the data is copied to the first counter and the first memory as it is.

【0074】さらに、符号化シーケンス制御209は、
第1の符号化部202および、第2の符号化部205に
対して、今までよりも、符号化データが少なくなるよう
な符号化を行なうように制御信号を出す。
Further, the coding sequence control 209 is
A control signal is issued to the first encoding unit 202 and the second encoding unit 205 so that encoding is performed so that the encoded data becomes smaller than ever.

【0075】例えば、最初に設定値を越えたと判断した
場合、第1の符号化部202、及び、第2の符号化部2
05に設定する量子化ステップはQ1、Q2であったか
ら、それをQ2、Q3へと変更する。この結果、第1の
符号化部202は、その直前までの第2の符号化部20
5における量子化ステップQ2を継承することになり、
第2の符号化部205は更に大きな量子化ステップQ3
を用いて、次のオーバーフローに備えた更に高い圧縮率
の符号化処理を行うことになる。
For example, when it is determined that the set value is exceeded first, the first coding unit 202 and the second coding unit 2
Since the quantization step set to 05 was Q1 and Q2, it is changed to Q2 and Q3. As a result, the first encoding unit 202 has the second encoding unit 20 until immediately before that.
Will inherit the quantization step Q2 in 5.
The second coding unit 205 uses a larger quantization step Q3.
Is used to perform encoding processing with a higher compression rate in preparation for the next overflow.

【0076】ただし、設定値を越えたと判断したとき、
第2のメモリ207内にはそれまでの量子化ステップQ
2に従って符号化されたデータ(画像及び属性フラグ)
が格納されているので、このデータを新に設定された量
子化ステップQ3用の符号データに更新する必要があ
る。そのため、再符号化部211は、設定値を越えたと
判断したとき以前の符号データ(符号化画像データ及び
符号化属性データ)を読出し、復号化し、新に設定され
た量子化ステップQ3に従い、再度符号化し、第2のメ
モリ制御部206を介して第2のメモリ207に再度格
納する。このとき、第3のカウンタ212は再符号化部
211で再度符号化されたデータ量をカウントしてい
て、従前の符号化データの再符号化が完了すると、その
カウント値を第2カウンタ210に加算する。従って、
この加算が完了したとき、第2のカウンタ210は、第
2の符号化部205があたかも入力画像の先頭から量子
化ステップQ3で符号化したデータ量をカウントしてい
ることと等価になる。
However, when it is determined that the set value is exceeded,
In the second memory 207, the previous quantization step Q
Data encoded according to 2 (images and attribute flags)
Is stored, it is necessary to update this data to the code data for the newly set quantization step Q3. Therefore, the re-encoding unit 211 reads the previously encoded data (encoded image data and encoded attribute data) when it determines that the set value is exceeded, decodes the encoded data, and again according to the newly set quantization step Q3. It is encoded and stored again in the second memory 207 via the second memory control unit 206. At this time, the third counter 212 counts the amount of data re-encoded by the re-encoding unit 211, and when the re-encoding of the previously encoded data is completed, the count value is stored in the second counter 210. to add. Therefore,
When this addition is completed, the second counter 210 is equivalent to the second encoding unit 205 counting the amount of data encoded in the quantization step Q3 from the beginning of the input image.

【0077】そして、再符号化処理の終了/未終了に関
わらず、符号化するべき入力部201からの画像データ
が残っていれば、2つの符号化部202と205による
符号化処理を継続して行なう。そして、カウンタ208
のカウント値がある設定値に達したかどうかの監視は入
力部201から入力される1ページ分の画像データの符
号化処理(符号化、再符号化)が終わるまで繰り返さ
れ、上述した符号化と再符号化の処理は、ここで得られ
る検出結果に応じた制御の上で実行される。
If the image data from the input unit 201 to be encoded remains, the encoding process by the two encoding units 202 and 205 is continued regardless of whether the re-encoding process is completed or not. Do it. Then, the counter 208
The monitoring of whether or not the count value has reached a certain set value is repeated until the encoding process (encoding, re-encoding) of the image data for one page input from the input unit 201 is completed, and the above-described encoding is performed. The re-encoding process and the re-encoding process are executed under control according to the detection result obtained here.

【0078】上記図2の構成における処理のフローを表
わすフローチャートを図12に示す。
FIG. 12 is a flowchart showing the flow of processing in the configuration of FIG.

【0079】図2で説明したように符号化部が2つある
場合は、図12に示すフローチャートに基づいて1ペー
ジ分の画像データの符号化を行なう。なお、図12の説
明は、符号化部が1つの場合のフローチャートである図
8とは、大半は類似しており、当業者であれば上記説明
から本第2の実施形態の特徴は十分に理解できるであろ
うから、符号化部1つの場合と同じように3つのフェー
ズで処理を説明する様にし、図8と異なる点を主に説明
することとする。
As described with reference to FIG. 2, when there are two encoding units, the image data for one page is encoded based on the flowchart shown in FIG. Note that the description of FIG. 12 is mostly similar to FIG. 8 which is the flowchart in the case where there is one encoding unit, and those skilled in the art can fully understand the features of the second embodiment from the above description. Since it can be understood, the processing will be described in three phases as in the case of one encoding unit, and the points different from FIG. 8 will be mainly described.

【0080】上述した図8のフローと本実施形態のフロ
ーとの一番大きな違いは、ステップS317の転送処理
が、ステップS307とステップS309の間に移動し
ていることである。要するに、符号化・再符号化フェー
ズと転送フェーズが入れ替わったと見なせば良い(ステ
ップS307の符号化データの廃棄処理は例外であ
る)。
The biggest difference between the above-described flow of FIG. 8 and the flow of this embodiment is that the transfer process of step S317 is moved between step S307 and step S309. In short, it may be considered that the encoding / re-encoding phase and the transfer phase are exchanged (the exception is the processing of discarding encoded data in step S307).

【0081】ステップS301の符号化パラメータの初
期設定では、第1の符号化部202に量子化ステップQ
1を、第2の符号化部205には量子化ステップQ2を
設定する。
In the initial setting of the coding parameter in step S301, the quantization step Q is set in the first coding section 202.
1 and a quantization step Q2 is set in the second encoding unit 205.

【0082】符号化フェーズでは、ステップS801、
S303、S305を繰り返し実行する。ステップS8
01とステップS305は符号化部が1つの場合と同じ
処理であるが、ステップS303の符号化処理だけは図
13に示すように異なっている。
In the encoding phase, steps S801,
S303 and S305 are repeatedly executed. Step S8
01 and step S305 are the same processes as in the case where there is one encoding unit, but only the encoding process of step S303 is different as shown in FIG.

【0083】第1のメモリ204へ格納する符号化デー
タは圧縮率が段階的に高くなるようにするため、最初に
格納する符号化データは圧縮率が一番低い量子化ステッ
プQ1で符号化したデータを格納し、第2のメモリ20
7へ格納する符号化データはそれより1ランク高い圧縮
率となる量子化ステップQ2で符号化したデータを格納
する。
The encoded data stored in the first memory 204 is encoded in the quantization step Q1 having the lowest compression rate in order to increase the compression rate stepwise. Data is stored in the second memory 20.
The coded data to be stored in No. 7 stores the data coded in the quantization step Q2 having a compression rate one rank higher than that.

【0084】第1のメモリ204へ格納中のデータ量が
設定されている上限値をオーバーしたら(ステップS3
05)、直ちに、第1のメモリ204で保持していた符
号化データを廃棄し(ステップS307)、第2のメモ
リ207で保持している圧縮率の高い符号化データを、
第1のメモリ204へ転送する(ステップS317、図
14参照)。これにより、第1の実施形態(図1)で説
明した1回目の再符号化処理の終了を待たずに、速やか
に、上限値をオーバーしない適切な2番目の候補の符号
化データを第1のメモリ207内に格納出来る。これ
が、図1に対する、2つの符号器を持つ図2を適用する
ことの最大の利点である。
When the amount of data being stored in the first memory 204 exceeds the set upper limit value (step S3
05), immediately, the encoded data held in the first memory 204 is discarded (step S307), and the encoded data having a high compression rate held in the second memory 207 is
The data is transferred to the first memory 204 (step S317, see FIG. 14). As a result, the appropriate second candidate coded data that does not exceed the upper limit can be promptly obtained without waiting for the end of the first re-encoding process described in the first embodiment (FIG. 1). Can be stored in the memory 207. This is the greatest advantage of applying FIG. 2 with two encoders to FIG.

【0085】本第2の実施形態では、2つのメモリ20
4、207で同じ圧縮率の符号化データを持っているこ
とが無駄という考え方なので、第2のメモリ207に
は、第1のメモリ204に格納する符号化データよりも
圧縮率の高い符号化データを格納しておくようにしてい
る。従って、それ以降の処理もこの考え方に基づき行わ
れるものであり、第2のメモリ207内の符号化データ
を第1のメモリ204に転送する処理(転送フェーズ)
が終了した後は、第2のメモリ207の符号化データ
を、更に1段階圧縮率の高い符号化データを保持する様
に再符号化することとなる。
In the second embodiment, two memories 20 are provided.
Since it is wasteful that the coded data of 4 and 207 have the same compression rate, the second memory 207 has coded data with a higher compression rate than the coded data stored in the first memory 204. Is stored. Therefore, the subsequent processing is also performed based on this idea, and the processing of transferring the encoded data in the second memory 207 to the first memory 204 (transfer phase)
After the above, the encoded data in the second memory 207 is re-encoded so as to retain the encoded data having a higher one-step compression rate.

【0086】具体的には、まず図15に示す様に、転送
フェーズの次の符号化・再符号化フェーズでは、上記再
符号化の前に、2つの符号化部202,205に適用さ
れる各量子化ステップQ1、Q2をそれぞれQ2、Q3
へ変更し(ステップS309)、1ページの画像データ
の入力が終了せずに続いていれば(ステップS80
3)、後続の画像データは新たな量子化ステップが設定
された2つの符号化部で該入力データを符号化して(ス
テップS311)、対応する各メモリ204,207へ
格納する。そして、上記符号化処理と並行して第2のメ
モリに格納されている符号化データ(第1のメモリ20
4に転送したもの)は、第1のメモリ内の符号化データ
よりも1段階高い圧縮率の符号化データに変更するべ
く、再符号化部211にて量子化ステップQ3を用いて
符号化されたデータが得られる様な再符号化処理(S3
13)を行ない、再符号化データを第2のメモリ207
に格納し直す。
Specifically, first, as shown in FIG. 15, in the encoding / re-encoding phase subsequent to the transfer phase, it is applied to the two encoding units 202 and 205 before the re-encoding. Quantize steps Q1 and Q2 to Q2 and Q3, respectively.
(Step S309), if the input of the image data of one page continues without being completed (step S80)
3) For the subsequent image data, the input data is encoded by the two encoding units in which new quantization steps are set (step S311) and stored in the corresponding memories 204 and 207. Then, in parallel with the above-described encoding process, the encoded data stored in the second memory (the first memory 20
4) is encoded by the re-encoding unit 211 using the quantization step Q3 so as to be changed to encoded data having a compression ratio one step higher than the encoded data in the first memory. Re-encoding process (S3
13) is performed and the re-encoded data is stored in the second memory 207.
Store again.

【0087】なお、本第2の実施形態でも、第1の実施
形態と同様、再符号化処理では、符号化データを一旦ハ
フマン復号した後の各量子化値に対して、これら値を2
nで割った結果と同様の結果が出るビットシフト処理を
施した後、再度ハフマン符号化を行なうことにより実現
される。この方法は、ビットシフトのみで量子化ステッ
プを変更する点と逆直交変換や再直交変換処理を行わな
い点で、高速な再符号化処理が可能である。
In the second embodiment, as in the first embodiment, in the re-encoding process, these values are set to 2 for each quantized value after Huffman decoding the encoded data once.
It is realized by performing Huffman coding again after performing a bit shift process that produces a result similar to the result divided by n . This method enables high-speed re-encoding processing in that the quantization step is changed only by bit shifting and that inverse orthogonal transformation or re-orthogonal transformation processing is not performed.

【0088】なお、本第2の実施形態の様に符号化部が
2つ有る場合には、図15に示したように、第2のメモ
リ207に符号化データと再符号化データを混在して格
納する状況が発生する。従って、前述したように、符号
化データをある単位で区切って、ファイル或いはパケッ
トとして管理することが、第2のメモリ207に対して
も必要になる。その為には、例えば第1の例における変
形例と同様の構成を設ければ良いであろう。
When there are two encoders as in the second embodiment, the encoded data and the re-encoded data are mixed in the second memory 207 as shown in FIG. There is a situation where it is stored. Therefore, as described above, it is also necessary for the second memory 207 to divide the encoded data into certain units and manage them as files or packets. For that purpose, for example, a configuration similar to that of the modification of the first example may be provided.

【0089】図12において、再符号化処理の終了をス
テップS315で検知したら、また符号化フェーズ(ス
テップS801、S303)に移行する。なお、符号化
・再符号化フェーズ後の符号化フェーズでは、図16に
示すように、2つのメモリ204,207が保持する符
号化データは圧縮率が違うだけでなく、符号化データの
混在の仕方(アドレス)もかなり違ってくる。従って、
再度、第1のメモリ204のデータ量が設定値をオーバ
ーした場合には、第2のメモリ207で保持されている
符号化データ(+の横縞の領域の符号)が第1のメ
モリ204へ転送される必要が出てくる。これらを考慮
すると、第2のメモリ207だけでなく、第1のメモリ
204でも符号化データをファイル或いはパケットとし
て管理する必要がある。よって、第1のメモリ204に
も前述の管理テーブルを用いた管理機構が必要となる。
In FIG. 12, when the end of the re-encoding process is detected in step S315, the process proceeds to the encoding phase (steps S801 and S303). In the encoding phase after the encoding / re-encoding phase, as shown in FIG. 16, not only the encoded data held in the two memories 204 and 207 have different compression rates but also mixed encoded data. The method (address) is also quite different. Therefore,
Again, when the data amount of the first memory 204 exceeds the set value, the encoded data (the code of the + horizontal stripe area) held in the second memory 207 is transferred to the first memory 204. Will need to be done. Considering these points, it is necessary to manage the encoded data as a file or packet not only in the second memory 207 but also in the first memory 204. Therefore, the first memory 204 also needs a management mechanism using the above-mentioned management table.

【0090】図16に示された符号化フェーズの状態
は、量子化ステップと符号化データの混在の仕方が、再
符号化処理の前後で異なっていること以外は、初期状態
の符号化フェーズ(図13)と同じである。よって、符
号化フェーズ、転送フェーズと符号化・再符号化フェー
ズを繰り返すことで、最終的に、1ページ分の画像デー
タを設定した上限値以下に圧縮した符号化データを確実
に第1のメモリ204に格納することが出来る。
The state of the encoding phase shown in FIG. 16 is different from the encoding phase (in the initial state) except that the method of mixing the quantization step and the encoded data is different before and after the re-encoding process. (Fig. 13). Therefore, by repeating the encoding phase, the transfer phase, and the encoding / re-encoding phase, it is possible to ensure that the encoded data obtained by compressing the image data of one page to the set upper limit value or less is finally stored in the first memory. It can be stored in 204.

【0091】なお、第1の実施形態の説明とは、転送フ
ェーズと符号化・再符号化フェーズの配置順が逆である
ことから、図8において転送処理後に行なっていた1ペ
ージ分の画像データの入力終了検知(ステップS80
5)は、符号化・再符号化フェーズで行なう1ページ分
の画像データの入力終了検知(ステップS803)と、
ほとんど同じタイミングになってしまう。また、2つの
検知処理は、機能的にはステップS805と同じで、タ
イミング的にはステップS803と同じである、従っ
て、これら2つのステップは、新たな1ページ分の画像
データの入力終了を検知するステップとして統合し、ス
テップS1201と表記しておく。
Since the arrangement order of the transfer phase and the encoding / re-encoding phase is opposite to the description of the first embodiment, the image data for one page that was performed after the transfer processing in FIG. Input end detection (step S80
5) is the detection of the end of inputting one page of image data performed in the encoding / re-encoding phase (step S803),
The timing is almost the same. Further, the two detection processes are functionally the same as step S805 and are the same in timing as step S803. Therefore, these two steps detect the end of input of a new page of image data. Are integrated as steps to be performed, and are referred to as step S1201.

【0092】以上説明した第1、第2の実施形態では、
第1のメモリと第2のメモリは物理的に別のメモリであ
るとして説明をしてきた。これは、2つのメモリに対す
るアクセスが独立したものとすることができるので有利
なためであり、本発明の特徴となす。しかしながら、第
1のメモリと第2のメモリを、物理的に別のメモリとし
ない場合も本発明の範疇に含まれる。物理的に1つのメ
モリ上に、前記第1のメモリと第2のメモリに相当する
2つの領域を確保して、第1のメモリを第1のメモリ領
域、第2のメモリを第2のメモリ領域と言い直して、こ
れまでの説明を読み直せば、本発明は、1つのメモリで
も実現できることが分かる。
In the first and second embodiments described above,
The first memory and the second memory have been described as being physically different memories. This is advantageous because the access to the two memories can be independent, and is a feature of the present invention. However, the case where the first memory and the second memory are not physically separate memories is also included in the scope of the present invention. Two areas corresponding to the first memory and the second memory are physically secured on one memory, and the first memory is the first memory area and the second memory is the second memory. It can be understood that the present invention can be realized by a single memory, by re-reading the description given so far as a region.

【0093】また、1つのメモリで上記各実施形態を実
現する場合には、前記転送フェーズで説明したデータ転
送処理のいくつかは不要となる。その詳細はその都度容
易に想像できるので説明は省略するが、前記2つの領域
を厳密に別けて使用する場合、物理的に2つのメモリを
持つ時と同じようにデータ転送処理が必要であるが、2
つの領域間で同じデータを共有することになれば、デー
タ転送処理が不要になるだけでなく記憶容量の削減も図
れる。
When the above embodiments are implemented by one memory, some of the data transfer processing described in the transfer phase becomes unnecessary. The details are omitted because they can be easily imagined each time. However, when the two areas are strictly separated from each other, the data transfer processing is required as in the case of physically having two memories. Two
If the same data is shared between the two areas, not only the data transfer processing becomes unnecessary, but also the storage capacity can be reduced.

【0094】例えば、第2のメモリ領域で保持していた
符号化データを、第1のメモリ領域へ転送する際、該符
号化データが格納されている先頭アドレスとデータサイ
ズの2つの情報を第2のメモリ制御部から第1のメモリ
制御部へ転送するだけで、前記符号化データを転送した
のと同じ効果が得られる。
For example, when the encoded data held in the second memory area is transferred to the first memory area, two pieces of information, that is, the start address where the encoded data is stored and the data size, are stored in the second information. Only by transferring from the second memory control unit to the first memory control unit, the same effect as the transfer of the encoded data can be obtained.

【0095】前記符号化データを、ファイル形式やパケ
ット形式で格納している場合は、メモリ制御部の間で転
送する情報は少し増え、該符号化データに関連する管理
テーブル情報を転送する必要がある。それでも、符号化
データを転送するよりは、効率が良い。
When the encoded data is stored in the file format or the packet format, the information transferred between the memory control units is slightly increased, and it is necessary to transfer the management table information related to the encoded data. is there. Nevertheless, it is more efficient than transferring the encoded data.

【0096】上述した画像処理装置によると、入力した
画像データを符号化していく際に、目的とするサイズに
越えるような場合であっても、その入力を継続しつつ目
標とするサイズに収めるよう処理を継続することができ
るようになる。しかも、本第1、第2の実施形態では、
量子化ステップに対して一律同じ量子化ステップにする
のではなく、文字領域、中間調領域それぞれに適した量
子化マトリクスが用いられて符号化されるので、高い圧
縮率と、画質劣化を最低限にすることが可能になる。
According to the above-described image processing apparatus, when the input image data is encoded, even if the input size exceeds the target size, the input size is kept and the input size is kept within the target size. The process can be continued. Moreover, in the first and second embodiments,
Rather than using the same quantization step for all quantization steps, the quantization matrix suitable for each of the character area and halftone area is used for encoding, so a high compression rate and minimum deterioration of image quality are achieved. It becomes possible to

【0097】なお、第2の実施形態では、属性データを
圧縮する際に、第1、第2のメモリそれぞれに格納する
ものとして説明したが、第1の実施形態と同様に別メモ
リに格納するようにしても構わない。
In the second embodiment, when the attribute data is compressed, it is stored in each of the first and second memories, but it is stored in another memory as in the first embodiment. You may do so.

【0098】また、上記の通り、本発明は、汎用装置上
で動作するアプリケーションプログラムによって実現で
きるものであるので、本発明はコンピュータプログラム
をも含むものである。また、コンピュータプログラム
は、通常、フロッピー(登録商標)ディスクやCDRO
M等の記憶媒体を装置にセットしてコピー或いはインス
トールことで行われるので、かかる記憶媒体も本発明の
範疇に当然に含まれる。
Further, as described above, the present invention can be realized by an application program operating on a general-purpose device, and therefore the present invention also includes a computer program. The computer program is usually a floppy (registered trademark) disk or CDRO.
This is performed by setting a storage medium such as M in the apparatus and copying or installing the storage medium, and thus such a storage medium is naturally included in the scope of the present invention.

【0099】また、実施形態では、スキャナから画像デ
ータを入力するものとして説明したが、ホストコンピュ
ータ上で動作するプリンタドライバに適用しても良い。
プリンタドライバに適用する場合には、上位処理(アプ
リケーション等)から印刷対象のデータを受信したとき
に、その時点で、そのデータが中間調画像か、文字・線
画かは勿論は判別できるので、像域情報生成処理にかか
る構成を省くか、或いはより簡素なものとすることがで
きる。
Further, in the embodiments, the image data is input from the scanner, but it may be applied to a printer driver operating on a host computer.
When applied to a printer driver, when data to be printed is received from a higher-level process (application, etc.), it is of course possible to determine at that point whether the data is a halftone image or a character / line drawing. It is possible to omit the configuration related to the region information generation processing or to simplify the configuration.

【0100】また、本発明は、コンピュータプログラム
と適当なハードウェア(符号化回路等)の組み合わせに
も適用できる。
The present invention can also be applied to a combination of a computer program and appropriate hardware (encoding circuit etc.).

【0101】[0101]

【発明の効果】以上説明したように本発明によれば、再
画像入力を不要とし、効果的に設定したサイズに収まる
符号化データを生成でき、且つ、画像の属性についても
圧縮後の画像に合わせて効率良く圧縮することが可能に
なる。
As described above, according to the present invention, it is possible to generate coded data that does not require re-image input, can effectively fit in a set size, and can also be applied to the image after compression regarding the image attribute. In addition, it becomes possible to efficiently compress.

【図面の簡単な説明】[Brief description of drawings]

【図1】第1の実施形態における画像処理装置のブロッ
ク構成図である。
FIG. 1 is a block configuration diagram of an image processing apparatus according to a first embodiment.

【図2】第2の実施形態における画像処理装置のブロッ
ク構成図である。
FIG. 2 is a block configuration diagram of an image processing apparatus according to a second embodiment.

【図3】図1の構成における処理を簡略化して示したフ
ローチャートである。
3 is a flowchart showing a simplified process in the configuration of FIG.

【図4】初期状態の符号化フェーズにおけるデータフロ
ーとメモリ内容を表わす図である。
FIG. 4 is a diagram showing a data flow and a memory content in an encoding phase in an initial state.

【図5】符号化・再符号化フェーズにおけるデータフロ
ーとメモリ内容を表わす図である。
FIG. 5 is a diagram showing a data flow and a memory content in an encoding / re-encoding phase.

【図6】転送フェーズにおけるデータフローとメモリ内
容を表わす図である。
FIG. 6 is a diagram showing a data flow and a memory content in a transfer phase.

【図7】転送フェーズ後の符号化フェーズにおけるデー
タフローとメモリ内容を表わす図である。
FIG. 7 is a diagram showing a data flow and a memory content in an encoding phase after a transfer phase.

【図8】図1の構成における処理の詳細を示すフローチ
ャートである。
FIG. 8 is a flowchart showing details of processing in the configuration of FIG.

【図9】図1の構成の変形例における符号化・再符号化
フェーズにおけるデータフローとメモリ内容を表わす図
である。
9 is a diagram showing a data flow and a memory content in an encoding / re-encoding phase in the modified example of the configuration of FIG.

【図10】図9の変形例における転送フェーズにおける
データフローとメモリ内容を表わす図である。
10 is a diagram showing a data flow and a memory content in a transfer phase in the modified example of FIG.

【図11】図9の変形例における転送フェーズ後の符号
化フェーズにおけるデータフローとメモリ内容を表わす
図である。
11 is a diagram showing a data flow and a memory content in an encoding phase after a transfer phase in the modified example of FIG.

【図12】図2の構成における処理手順を示すフローチ
ャートである。
12 is a flowchart showing a processing procedure in the configuration of FIG.

【図13】図2の構成における、初期状態の符号化フェ
ーズにおけるデータフローとメモリ内容を表わす図であ
る。
13 is a diagram showing a data flow and a memory content in an encoding phase in an initial state in the configuration of FIG.

【図14】図2に構成における、転送フェーズにおける
データフローとメモリ内容を表わす図である。
14 is a diagram showing a data flow and a memory content in a transfer phase in the configuration of FIG.

【図15】図2の構成における、符号化・再符号化フェ
ーズにおけるデータフローとメモリ内容を表わす図であ
る。
15 is a diagram showing a data flow and a memory content in an encoding / re-encoding phase in the configuration of FIG.

【図16】図2の構成における、符号化・再符号化フェ
ーズ後の符号化フェーズにおけるデータフローとメモリ
内容を表わす図である。
16 is a diagram showing a data flow and a memory content in the encoding phase after the encoding / re-encoding phase in the configuration of FIG.

【図17】実施形態が適用する属性データの符号化に係
る処理部の構成を示す図である。
FIG. 17 is a diagram showing a configuration of a processing unit relating to encoding of attribute data applied by the embodiment.

───────────────────────────────────────────────────── フロントページの続き (72)発明者 太田 健一 東京都大田区下丸子3丁目30番2号 キヤ ノン株式会社内 (72)発明者 中山 忠義 東京都大田区下丸子3丁目30番2号 キヤ ノン株式会社内 (72)発明者 大澤 秀史 東京都大田区下丸子3丁目30番2号 キヤ ノン株式会社内 Fターム(参考) 5C059 KK08 KK11 MA00 MA23 MC11 MC38 ME02 ME05 PP01 PP16 PP20 RC12 RC40 SS20 TA46 TB08 TC02 TC18 TC24 TC38 TD05 TD06 TD07 TD12 TD17 UA02 UA32 UA35 UA36 UA38 UA39 5C078 AA09 BA57 CA02 CA27 DA01 DA06 DB07 5J064 AA02 BC01 BC05 BC25 BC26 BD06    ─────────────────────────────────────────────────── ─── Continued front page    (72) Inventor Kenichi Ota             3-30-2 Shimomaruko, Ota-ku, Tokyo             Non non corporation (72) Inventor Tadayoshi Nakayama             3-30-2 Shimomaruko, Ota-ku, Tokyo             Non non corporation (72) Inventor Hidefumi Osawa             3-30-2 Shimomaruko, Ota-ku, Tokyo             Non non corporation F term (reference) 5C059 KK08 KK11 MA00 MA23 MC11                       MC38 ME02 ME05 PP01 PP16                       PP20 RC12 RC40 SS20 TA46                       TB08 TC02 TC18 TC24 TC38                       TD05 TD06 TD07 TD12 TD17                       UA02 UA32 UA35 UA36 UA38                       UA39                 5C078 AA09 BA57 CA02 CA27 DA01                       DA06 DB07                 5J064 AA02 BC01 BC05 BC25 BC26                       BD06

Claims (9)

【特許請求の範囲】[Claims] 【請求項1】 画素データを圧縮符号化する画像処理装
置であって、 符号化データを記憶する記憶手段と、 画像データを画素ブロック単位に直交変換、量子化、符
号化すると共に、量子化処理における量子化ステップに
関するパラメータを変更可能な第1の圧縮符号化手段
と、 該第1の圧縮符号化手段で圧縮する際の前記量子化後の
データに基づき、注目画素ブロックの属性を判定し、当
該判定結果を圧縮符号化する第1の属性データ符号化手
段と、 量子化ステップに関するパラメータを変更可能で、前記
第1の圧縮符号化手段で圧縮した符号データを復号し、
再圧縮する第2の圧縮符号化手段と、 該第2の圧縮符号化手段で再圧縮する際の量子化後のデ
ータに基づき、注目画素ブロックの属性を判定し、当該
判定結果を圧縮する第2の属性データ符号化手段と、 前記第1の圧縮符号化手段によって生成される符号量を
監視すると共に、当該符号データ量が所定量になったか
否かを判断する符号量監視手段と、 該符号量監視手段によって前記所定量に達したと判断し
た場合、前記第1、第2の圧縮符号化手段における、量
子化ステップを大きくするようパラメータを設定する設
定手段と、 該パラメータ設定手段によりパラメータを変更した場
合、前記第1の圧縮符号化手段で従前に生成された符号
データを、前記第2の圧縮符号化手段によって再符号化
させ、当該再符号化を済ませた符号データを、前記第1
の圧縮符号化手段のパラメータ変更後の符号データとし
て前記記憶手段に記憶し、前記第1の属性データ符号化
手段で符号化され属性データを、前記第2の属性データ
符号化手段で符号化した属性データで更新すると共に、 パラメータ変更後の前記第1の圧縮符号化手段で生成さ
れた符号化データを、後続符号データとして前記記憶手
段に保存させる制御手段とを備えることを特徴とする画
像処理装置。
1. An image processing apparatus for compressing and encoding pixel data, comprising: storage means for storing the encoded data; orthogonal transformation, quantization, and encoding of the image data in pixel block units; and quantization processing. Determining the attribute of the pixel block of interest based on the first compression coding means capable of changing the parameter relating to the quantization step in, and the quantized data when compressed by the first compression coding means, A first attribute data coding means for compressing and coding the judgment result, and a parameter relating to a quantization step can be changed, and the code data compressed by the first compression coding means is decoded,
A second compression encoding means for recompressing, and an attribute of the pixel block of interest are determined based on the quantized data when recompressed by the second compression encoding means, and the determination result is compressed. A second attribute data encoding unit; a code amount monitoring unit for monitoring the code amount generated by the first compression encoding unit and determining whether or not the code data amount has reached a predetermined amount; When it is determined by the code amount monitoring means that the predetermined amount has been reached, a setting means for setting a parameter to increase the quantization step in the first and second compression encoding means, and a parameter by the parameter setting means When changing, the code data previously generated by the first compression encoding means is re-encoded by the second compression encoding means, and the code data that has been re-encoded is The first
Is stored in the storage means as coded data after parameter change of the compression coding means, and the attribute data coded by the first attribute data coding means is coded by the second attribute data coding means. An image processing, characterized by comprising: control means for updating the attribute data and storing the encoded data generated by the first compression encoding means after the parameter change in the storage means as subsequent encoded data. apparatus.
【請求項2】 前記属性は、無彩色/有彩色であること
を特徴とする請求項第1項に記載の画像処理装置。
2. The image processing apparatus according to claim 1, wherein the attribute is achromatic color / chromatic color.
【請求項3】 画素データを圧縮符号化する画像処理方
法であって、 画像データを画素ブロック単位に直交変換、量子化、符
号化すると共に、量子化処理における量子化ステップに
関するパラメータを変更可能な第1の圧縮符号化工程
と、 該第1の圧縮符号化工程で圧縮する際の前記量子化後の
データに基づき、注目画素ブロックの属性を判定し、当
該判定結果を圧縮符号化する第1の属性データ符号化工
程と、 量子化ステップに関するパラメータを変更可能で、前記
第1の圧縮符号化工程で圧縮した符号データを復号し、
再圧縮する第2の圧縮符号化工程と、 該第2の圧縮符号化工程で再圧縮する際の量子化後のデ
ータに基づき、注目画素ブロックの属性を判定し、当該
判定結果を圧縮する第2の属性データ符号化工程と、 前記第1の圧縮符号化工程によって生成される符号量を
監視すると共に、当該符号データ量が所定量になったか
否かを判断する符号量監視工程と、 該符号量監視工程によって前記所定量に達したと判断し
た場合、前記第1、第2の圧縮符号化工程における、量
子化ステップを大きくするようパラメータを設定する設
定工程と、 該パラメータ設定工程によりパラメータを変更した場
合、前記第1の圧縮符号化工程で従前に生成された符号
データを、前記第2の圧縮符号化工程によって再符号化
させ、当該再符号化を済ませた符号データを、前記第1
の圧縮符号化工程のパラメータ変更後の符号データとし
て所定の記憶手段に記憶し、前記第1の属性データ符号
化工程で符号化され属性データを、前記第2の属性デー
タ符号化工程で符号化した属性データで更新すると共
に、 パラメータ変更後の前記第1の圧縮符号化工程で生成さ
れた符号化データを、後続符号データとして前記記憶手
段に保存させる制御工程とを備えることを特徴とする画
像処理方法。
3. An image processing method for compressing and encoding pixel data, wherein the image data is orthogonally transformed, quantized, and encoded in pixel block units, and a parameter relating to a quantization step in the quantization processing can be changed. A first compression encoding step, and an attribute of the pixel block of interest is determined based on the quantized data when compressed in the first compression encoding step, and the determination result is compression encoded. Of the attribute data encoding step and the parameter relating to the quantization step can be changed, and the encoded data compressed in the first compression encoding step is decoded,
A second compression encoding step of recompressing and an attribute of the pixel block of interest are determined based on the quantized data when recompressing in the second compression encoding step, and the determination result is compressed. A second attribute data encoding step; a code amount monitoring step of monitoring the code amount generated by the first compression encoding step and determining whether or not the code data amount has reached a predetermined amount. When it is determined by the code amount monitoring step that the predetermined amount is reached, a setting step of setting a parameter to increase the quantization step in the first and second compression encoding steps, and a parameter setting step by the parameter setting step When changing, the code data previously generated in the first compression encoding step is re-encoded by the second compression encoding step, and the code data that has been re-encoded is The first
Is stored in a predetermined storage means as coded data after the parameter change in the compression coding step, and the attribute data coded in the first attribute data coding step is coded in the second attribute data coding step. And a control step of causing the storage means to store the encoded data generated in the first compression encoding step after the parameter is changed, as the subsequent encoded data. Processing method.
【請求項4】 コンピュータが読み込み実行すること
で、画素データを圧縮符号化する画像処理装置として機
能するコンピュータプログラムであって、 画像データを画素ブロック単位に直交変換、量子化、符
号化すると共に、量子化処理における量子化ステップに
関するパラメータを変更可能な第1の圧縮符号化手段
と、 該第1の圧縮符号化手段で圧縮する際の前記量子化後の
データに基づき、注目画素ブロックの属性を判定し、当
該判定結果を圧縮符号化する第1の属性データ符号化手
段と、 量子化ステップに関するパラメータを変更可能で、前記
第1の圧縮符号化手段で圧縮した符号データを復号し、
再圧縮する第2の圧縮符号化手段と、 該第2の圧縮符号化手段で再圧縮する際の量子化後のデ
ータに基づき、注目画素ブロックの属性を判定し、当該
判定結果を圧縮する第2の属性データ符号化手段と、 前記第1の圧縮符号化手段によって生成される符号量を
監視すると共に、当該符号データ量が所定量になったか
否かを判断する符号量監視手段と、 該符号量監視手段によって前記所定量に達したと判断し
た場合、前記第1、第2の圧縮符号化手段における、量
子化ステップを大きくするようパラメータを設定する設
定手段と、 該パラメータ設定手段によりパラメータを変更した場
合、前記第1の圧縮符号化手段で従前に生成された符号
データを、前記第2の圧縮符号化手段によって再符号化
させ、当該再符号化を済ませた符号データを、前記第1
の圧縮符号化手段のパラメータ変更後の符号データとし
て所定の記憶手段に記憶し、前記第1の属性データ符号
化手段で符号化され属性データを、前記第2の属性デー
タ符号化手段で符号化した属性データで更新すると共
に、 パラメータ変更後の前記第1の圧縮符号化手段で生成さ
れた符号化データを、後続符号データとして前記記憶手
段に保存させる制御手段として機能することを特徴とす
るコンピュータプログラム。
4. A computer program which, when read and executed by a computer, functions as an image processing device for compression-encoding pixel data, the image data being orthogonally transformed, quantized and encoded in pixel block units, and First compression encoding means capable of changing the parameter relating to the quantization step in the quantization processing, and the attribute of the pixel block of interest based on the quantized data when compressed by the first compression encoding means A first attribute data encoding means for making a determination and compressing and encoding the determination result, and a parameter relating to the quantization step can be changed, and the encoded data compressed by the first compression encoding means is decoded,
A second compression encoding means for recompressing, and an attribute of the pixel block of interest are determined based on the quantized data when recompressed by the second compression encoding means, and the determination result is compressed. A second attribute data encoding unit; a code amount monitoring unit for monitoring the code amount generated by the first compression encoding unit and determining whether or not the code data amount has reached a predetermined amount; When it is determined by the code amount monitoring means that the predetermined amount has been reached, a setting means for setting a parameter to increase the quantization step in the first and second compression encoding means, and a parameter by the parameter setting means When changing, the code data previously generated by the first compression encoding means is re-encoded by the second compression encoding means, and the code data that has been re-encoded is The first
Is stored in a predetermined storage means as coded data after the parameter of the compression coding means is changed, and the attribute data coded by the first attribute data coding means is coded by the second attribute data coding means. A computer that functions as a control unit that updates the encoded data generated by the first compression-encoding unit after the parameter is changed and stores the encoded data in the storage unit as subsequent encoded data. program.
【請求項5】 請求項第4項に記載のコンピュータプロ
グラムを格納することを特徴とするコンピュータ可読記
憶媒体。
5. A computer-readable storage medium storing the computer program according to claim 4.
【請求項6】 画像データを圧縮符号化する画像処理装
置であって、 圧縮符号化データを記憶する記憶手段と、 画像データを画素ブロック単位に直交変換、量子化、符
号化すると共に、量子化処理における量子化ステップに
関するパラメータを変更可能な第1の圧縮符号化手段
と、 該第1の圧縮符号化手段で圧縮する際の前記量子化後の
データに基づき、注目画素ブロックの属性を判定し、当
該判定結果を圧縮符号化する第1の属性データ符号化手
段と、 量子化ステップに関するパラメータが変更可能で、前記
第1の圧縮符号化手段と並行して動作し、前記第1の圧
縮符号化手段による圧縮率よりも高い圧縮率で圧縮する
第2の圧縮符号化手段と、 該第2の圧縮符号化手段で圧縮する際の前記量子化後の
データに基づき、注目画素ブロックの属性を判定し、当
該判定結果を圧縮符号化する第2の属性データ符号化手
段と、 前記第1の圧縮符号化手段によって生成される符号量を
監視すると共に、当該符号データ量が所定量になったか
否かを判断する符号量監視手段と、 該符号量監視手段によって前記所定量に達したと判断し
た場合、前記第2の圧縮符号化手段の従前のパラメータ
で前記第1の圧縮符号化手段を設定し、前記第2の圧縮
符号化手段に新たたパラメータを設定するパラメータ設
定手段と、 該パラメータ設定手段によりパラメータを変更した場
合、前記第1の圧縮符号化手段で従前に生成された符号
データに代わって前記第2の圧縮符号化手段で済ませた
符号データを、前記第1の圧縮符号化手段のパラメータ
変更後の符号データとして前記記憶手段に記憶し、前記
第2の属性データ符号化手段で得られた属性データの圧
縮データを前記第1の属性データ符号化手段で得られた
属性データの圧縮データとして記憶すると共に、 パラメータ変更後の前記第1の圧縮符号化手段で生成さ
れた符号化データを、後続符号データとして前記記憶手
段に保存させる制御手段とを備えることを特徴とする画
像処理装置。
6. An image processing apparatus for compressing and coding image data, comprising: storage means for storing the compressed and coded data; orthogonal transformation, quantization, and coding of the image data in pixel block units; The attribute of the pixel block of interest is determined based on the first compression encoding means capable of changing the parameter relating to the quantization step in the processing, and the quantized data when compressed by the first compression encoding means. A first attribute data coding means for compressing and coding the determination result, a parameter relating to a quantization step that can be changed, and operates in parallel with the first compression and coding means. A second compression coding means for compressing at a compression rate higher than that of the coding means; and a pixel block of interest based on the quantized data when compressed by the second compression coding means. Second attribute data coding means for judging the attribute and compressing and coding the judgment result, and the code quantity generated by the first compression coding means are monitored, and the code data quantity becomes a predetermined quantity. And a code amount monitoring means for determining whether or not the predetermined amount has been reached by the code amount monitoring means, and the first compression encoding is performed using the conventional parameter of the second compression encoding means. And a parameter setting means for setting a new parameter in the second compression encoding means, and when the parameter is changed by the parameter setting means, the parameter is previously generated by the first compression encoding means. Instead of the coded data, the coded data processed by the second compression coding means is stored in the storage means as coded data after the parameters of the first compression coding means are changed, The compressed data of the attribute data obtained by the second attribute data encoding means is stored as the compressed data of the attribute data obtained by the first attribute data encoding means, and the first compressed code after parameter change An image processing device, comprising: a control unit that causes the storage unit to store the encoded data generated by the encoding unit as subsequent encoded data.
【請求項7】 画像データを圧縮符号化する画像処理方
法であって、 画像データを画素ブロック単位に直交変換、量子化、符
号化すると共に、量子化処理における量子化ステップに
関するパラメータを変更可能な第1の圧縮符号化工程
と、 該第1の圧縮符号化工程で圧縮する際の前記量子化後の
データに基づき、注目画素ブロックの属性を判定し、当
該判定結果を圧縮符号化する第1の属性データ符号化工
程と、 量子化ステップに関するパラメータが変更可能で、前記
第1の圧縮符号化工程と並行して動作し、前記第1の圧
縮符号化工程による圧縮率よりも高い圧縮率で圧縮する
第2の圧縮符号化工程と、 該第2の圧縮符号化工程で圧縮する際の前記量子化後の
データに基づき、注目画素ブロックの属性を判定し、当
該判定結果を圧縮符号化する第2の属性データ符号化工
程と、 前記第1の圧縮符号化工程によって生成される符号量を
監視すると共に、当該符号データ量が所定量になったか
否かを判断する符号量監視工程と、 該符号量監視工程によって前記所定量に達したと判断し
た場合、前記第2の圧縮符号化工程の従前のパラメータ
で前記第1の圧縮符号化工程を設定し、前記第2の圧縮
符号化工程に新たたパラメータを設定するパラメータ設
定工程と、 該パラメータ設定工程によりパラメータを変更した場
合、前記第1の圧縮符号化工程で従前に生成された符号
データに代わって前記第2の圧縮符号化工程で済ませた
符号データを、前記第1の圧縮符号化工程のパラメータ
変更後の符号データとして所定の記憶手段に記憶し、前
記第2の属性データ符号化工程で得られた属性データの
圧縮データを前記第1の属性データ符号化工程で得られ
た属性データの圧縮データとして記憶すると共に、 パラメータ変更後の前記第1の圧縮符号化工程で生成さ
れた符号化データを、後続符号データとして前記記憶手
段に保存させる制御工程とを備えることを特徴とする画
像処理方法。
7. An image processing method for compressing and coding image data, wherein the image data is orthogonally transformed, quantized and coded in pixel block units, and a parameter relating to a quantization step in the quantization process can be changed. A first compression encoding step, and an attribute of the pixel block of interest is determined based on the quantized data when compressed in the first compression encoding step, and the determination result is compression encoded. Of the attribute data encoding process and the parameter relating to the quantization step can be changed, and the operation is performed in parallel with the first compression encoding process, and the compression ratio is higher than that of the first compression encoding process. The attribute of the pixel block of interest is determined based on the second compression encoding step of compression and the quantized data when compressed in the second compression encoding step, and the determination result is compressed A second attribute data encoding step, and a code amount monitoring step of monitoring the code amount generated by the first compression encoding process and determining whether or not the code data amount reaches a predetermined amount. When it is determined by the code amount monitoring step that the predetermined amount has been reached, the first compression encoding step is set by the parameter that has been used in the second compression encoding step, and the second compression encoding step is performed. A parameter setting step of setting a new parameter in the step; and when the parameter is changed in the parameter setting step, the second compression encoding is performed in place of the code data previously generated in the first compression encoding step. The code data obtained in the step is stored in a predetermined storage means as the code data after the parameter change in the first compression coding step, and the attribute data obtained in the second attribute data coding step is stored. The compressed data of the property data is stored as the compressed data of the attribute data obtained in the first attribute data encoding step, and the encoded data generated in the first compression encoding step after the parameter change is stored as And a control step of storing the subsequent code data in the storage means.
【請求項8】 コンピュータが読み込み実行すること
で、画像データを圧縮符号化する画像処理装置として機
能するコンピュータプログラムであって、 画像データを画素ブロック単位に直交変換、量子化、符
号化すると共に、量子化処理における量子化ステップに
関するパラメータを変更可能な第1の圧縮符号化手段
と、 該第1の圧縮符号化手段で圧縮する際の前記量子化後の
データに基づき、注目画素ブロックの属性を判定し、当
該判定結果を圧縮符号化する第1の属性データ符号化手
段と、 量子化ステップに関するパラメータが変更可能で、前記
第1の圧縮符号化手段と並行して動作し、前記第1の圧
縮符号化手段による圧縮率よりも高い圧縮率で圧縮する
第2の圧縮符号化手段と、 該第2の圧縮符号化手段で圧縮する際の前記量子化後の
データに基づき、注目画素ブロックの属性を判定し、当
該判定結果を圧縮符号化する第2の属性データ符号化手
段と、 前記第1の圧縮符号化手段によって生成される符号量を
監視すると共に、当該符号データ量が所定量になったか
否かを判断する符号量監視手段と、 該符号量監視手段によって前記所定量に達したと判断し
た場合、前記第2の圧縮符号化手段の従前のパラメータ
で前記第1の圧縮符号化手段を設定し、前記第2の圧縮
符号化手段に新たたパラメータを設定するパラメータ設
定手段と、 該パラメータ設定手段によりパラメータを変更した場
合、前記第1の圧縮符号化手段で従前に生成された符号
データに代わって前記第2の圧縮符号化手段で済ませた
符号データを、前記第1の圧縮符号化手段のパラメータ
変更後の符号データとして所定の記憶手段に記憶し、前
記第2の属性データ符号化手段で得られた属性データの
圧縮データを前記第1の属性データ符号化手段で得られ
た属性データの圧縮データとして記憶すると共に、 パラメータ変更後の前記第1の圧縮符号化手段で生成さ
れた符号化データを、後続符号データとして前記記憶手
段に保存させる制御手段として機能することを特徴とす
るコンピュータプログラム。
8. A computer program which, when read and executed by a computer, functions as an image processing device for compressing and encoding image data, the image data being orthogonally transformed, quantized and encoded in pixel block units, and First compression encoding means capable of changing the parameter relating to the quantization step in the quantization processing, and the attribute of the pixel block of interest based on the quantized data when compressed by the first compression encoding means A first attribute data encoding means for making a determination and compression-encoding the determination result; and a parameter relating to a quantization step that can be changed, and operates in parallel with the first compression-encoding means. Second compression coding means for compressing at a compression rate higher than that by the compression coding means, and the quantization at the time of compression by the second compression coding means Second attribute data coding means for judging the attribute of the pixel block of interest based on the data of 1. and compressing and coding the judgment result, and monitoring the code amount generated by the first compression coding means. , A code amount monitoring means for determining whether or not the code data amount has reached a predetermined amount, and when the code amount monitoring means determines that the predetermined amount has been reached, the second compression coding means has been Parameter setting means for setting the first compression coding means with parameters and setting new parameters for the second compression coding means, and when the parameters are changed by the parameter setting means, the first compression coding means In place of the code data previously generated by the coding means, the code data processed by the second compression coding means is used as the code data after the parameter change of the first compression coding means. As compressed data of the attribute data obtained by the second attribute data encoding means, and stored as compressed data of the attribute data obtained by the first attribute data encoding means. At the same time, the computer program is characterized by functioning as a control means for storing the encoded data generated by the first compression encoding means after the parameter change as the subsequent encoded data in the storage means.
【請求項9】 請求項8に記載のコンピュータプログラ
ムを格納することを特徴とするコンピュータ可読記憶媒
体。
9. A computer-readable storage medium storing the computer program according to claim 8.
JP2002003894A 2001-08-29 2002-01-10 Image processing apparatus and method, computer program, and storage medium Expired - Fee Related JP3902954B2 (en)

Priority Applications (4)

Application Number Priority Date Filing Date Title
JP2002003894A JP3902954B2 (en) 2002-01-10 2002-01-10 Image processing apparatus and method, computer program, and storage medium
EP02255970.2A EP1292153B1 (en) 2001-08-29 2002-08-28 Image processing method and apparatus, computer program, and storage medium
CNB021422478A CN1320809C (en) 2001-08-29 2002-08-28 Picture processing device and method, and computer program and storage medium
US10/230,276 US7257264B2 (en) 2001-08-29 2002-08-29 Image processing apparatus and method for compression-encoding image area information

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2002003894A JP3902954B2 (en) 2002-01-10 2002-01-10 Image processing apparatus and method, computer program, and storage medium

Publications (2)

Publication Number Publication Date
JP2003209697A true JP2003209697A (en) 2003-07-25
JP3902954B2 JP3902954B2 (en) 2007-04-11

Family

ID=27643365

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002003894A Expired - Fee Related JP3902954B2 (en) 2001-08-29 2002-01-10 Image processing apparatus and method, computer program, and storage medium

Country Status (1)

Country Link
JP (1) JP3902954B2 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007235756A (en) * 2006-03-02 2007-09-13 Canon Inc Image coding apparatus and method, and computer program and computer-readable storage medium
JP2007235758A (en) * 2006-03-02 2007-09-13 Canon Inc Image coding apparatus and method, and computer program and computer-readable storage medium
JP2007235757A (en) * 2006-03-02 2007-09-13 Canon Inc Image coding apparatus and method, and computer program and computer-readable storage medium
US8229001B2 (en) 2007-09-05 2012-07-24 Via Technologies, Inc. Method and system for calculating flag parameter of image block

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007235756A (en) * 2006-03-02 2007-09-13 Canon Inc Image coding apparatus and method, and computer program and computer-readable storage medium
JP2007235758A (en) * 2006-03-02 2007-09-13 Canon Inc Image coding apparatus and method, and computer program and computer-readable storage medium
JP2007235757A (en) * 2006-03-02 2007-09-13 Canon Inc Image coding apparatus and method, and computer program and computer-readable storage medium
JP4651109B2 (en) * 2006-03-02 2011-03-16 キヤノン株式会社 Image encoding apparatus and method, computer program, and computer-readable storage medium
JP4697965B2 (en) * 2006-03-02 2011-06-08 キヤノン株式会社 Image encoding apparatus and method, computer program, and computer-readable storage medium
JP4697966B2 (en) * 2006-03-02 2011-06-08 キヤノン株式会社 Image encoding apparatus and method, computer program, and computer-readable storage medium
US8229001B2 (en) 2007-09-05 2012-07-24 Via Technologies, Inc. Method and system for calculating flag parameter of image block

Also Published As

Publication number Publication date
JP3902954B2 (en) 2007-04-11

Similar Documents

Publication Publication Date Title
US7257264B2 (en) Image processing apparatus and method for compression-encoding image area information
US7106911B2 (en) Image processing apparatus and control method for inputting image data and encoding the data
JP3902968B2 (en) Image processing apparatus, control method therefor, computer program, and storage medium
US7680345B2 (en) Image encoding apparatus and method, computer program, and computer-readable storage medium
US7627181B2 (en) Image encoding apparatus and method, computer program, and computer-readable storage medium
US7466863B2 (en) Image encoding apparatus and method, computer program, computer-readable storage medium, and image forming apparatus
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
US7454070B2 (en) Image encoding apparatus and method, computer program, and computer-readable storage medium
JP2003244446A (en) Image processor and image processing method
JP4065522B2 (en) Image processing apparatus and control method thereof
JP3902953B2 (en) Image processing apparatus and method, computer program, and storage medium
JP4124982B2 (en) Image processing apparatus and method, computer program, and storage medium
JP3984813B2 (en) Image processing apparatus and method, computer program, and storage medium
JP3902954B2 (en) Image processing apparatus and method, computer program, and storage medium
JP4693309B2 (en) Image processing apparatus, control method therefor, computer program, and storage medium
JP3902983B2 (en) Image processing apparatus, control method therefor, computer program, and storage medium
JP3840076B2 (en) Image processing apparatus and method, computer program, and storage medium
JP4035475B2 (en) Image processing apparatus, control method therefor, computer program, and storage medium
JP4035471B2 (en) Image processing apparatus, control method therefor, computer program, and storage medium
JP2002051221A (en) Device, system and method for encoding and decoding image and storage medium
JP2000228772A (en) Moving picture data quantity reduction device and storage medium storing moving picture data quantity reduction program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20041213

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20061201

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20061211

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20070105

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20110112

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20120112

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20130112

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20140112

Year of fee payment: 7

LAPS Cancellation because of no payment of annual fees