JP2003209698A - 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
JP2003209698A
JP2003209698A JP2002003893A JP2002003893A JP2003209698A JP 2003209698 A JP2003209698 A JP 2003209698A JP 2002003893 A JP2002003893 A JP 2002003893A JP 2002003893 A JP2002003893 A JP 2002003893A JP 2003209698 A JP2003209698 A JP 2003209698A
Authority
JP
Japan
Prior art keywords
encoding
data
compression
parameter
compression encoding
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
JP2002003893A
Other languages
Japanese (ja)
Other versions
JP3902953B2 (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 JP2002003893A priority Critical patent/JP3902953B2/en
Priority to US10/286,776 priority patent/US7194140B2/en
Publication of JP2003209698A publication Critical patent/JP2003209698A/en
Application granted granted Critical
Publication of JP3902953B2 publication Critical patent/JP3902953B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Abstract

<P>PROBLEM TO BE SOLVED: To enable elimination of the need for image re-input, creation of encoded data which can effectively fall in a set size, and suppression of quality deterioration caused by a compression ratio. <P>SOLUTION: A judger 113 judges whether image data inputted from an input unit 101 is in a character area or in a half-tone area. An encoder 102 quantizes and encodes the input image data according to a judgement result and a parameter set in an encoding sequence unit 108 with use of any of character and half- tone quantized matrixes, and stores it in a first memory 104. The encoding sequence controller 108, when judging that the quantity of code generated in the encoder 102 reached a set value, sets the parameter to make a compression ratio higher, and continues the subsequent encoding. A re-encoder 109 re-encodes previously-encoded data according to a new parameter and stores it in the first memory 104. <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 encoding method is a variable length encoding method, the code amount changes for each image to be encoded.

【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 conventional example, does not require re-image input, can effectively generate coded data within a set size, and deteriorates image quality with respect to compression rate. It is intended to provide an image processing apparatus, a control method therefor, a computer program, and a storage medium that can be reduced in size.

【0010】[0010]

【課題を解決するための手段】かかる課題を解決するた
め、例えば本発明の画像処理装置は以下の構成を備え
る。すなわち、画像データを圧縮符号化する画像処理装
置であって、圧縮符号化データを記憶する記憶手段と、
入力する画像データの像域情報を判定する判定手段と、
量子化ステップに関するパラメータと前記判定手段の判
定結果に基づいて画像データを圧縮符号化する第1の圧
縮符号化手段と、量子化ステップに関するパラメータと
前記判定手段の判定結果に基づいて画像データを圧縮符
号化すると共に、前記第1の圧縮符号化手段で圧縮した
符号データを復号し、再圧縮する第2の圧縮符号化手段
と、前記第1の圧縮符号化手段によって生成される符号
量を監視すると共に、当該符号データ量が所定量になっ
たか否かを判断する符号量監視手段と、該符号量監視手
段によって前記所定量に達したと判断した場合、前記第
1、第2の圧縮符号化手段における、量子化ステップを
大きくするようパラメータを設定する設定手段と、該パ
ラメータ設定手段によりパラメータを変更した場合、前
記第1の圧縮符号化手段で従前に生成された符号データ
を前記第2の圧縮符号化手段によって再符号化させ、当
該再符号化を済ませた符号データを、前記第1の圧縮符
号化手段のパラメータ変更後の符号データとして前記記
憶手段に記憶すると共に、パラメータ変更後の前記第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 device for compression-encoding image data, comprising a storage unit for storing the compression-encoded data,
Determination means for determining image area information of input image data,
First compression coding means for compressing and coding image data based on a parameter related to a quantization step and a judgment result of the judgment means, and image data compressed based on a parameter related to a quantization step and a judgment result of the judgment means. A second compression encoding unit that encodes, decodes the code data compressed by the first compression encoding unit, and recompresses it, and monitors a code amount generated by the first compression encoding unit. In addition, the code amount monitoring means for determining whether or not the code data amount has reached the predetermined amount, and the first and second compressed codes when the code amount monitoring means determines that the predetermined amount has been reached. Setting means for setting a parameter to increase the quantization step in the quantization means, and the first compression code when the parameter is changed by the parameter setting means The code data previously generated by the means is re-encoded by the second compression encoding means, and the re-encoded code data is the code data after the parameter change of the first compression encoding means. Is stored in the storage means as
And a control unit for storing the encoded data generated by the compression encoding unit as the subsequent encoded data in the storage unit.

【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の
値が互いにほぼ等しい値となっている(無彩色)場合に
黒文字の画素と判断できよう。また、黒文字(黒文字線
画)か否かだけでなく、色文字か否か、網点領域か否
か、ベクターグラフィックス領域か否か等を含むように
しても構わない。この場合、各属性毎にビットを割り当
てれば良い。
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. Further, not only whether it is a black character (black character line drawing) but also whether it is a color character, whether it is a halftone dot area, whether it is a vector graphics area, etc. may be included. 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から入力し
た画像は一旦、圧縮ブロックラインバッファ111に格
納される。このブロックラインバッファ111では、画
像をタイル分割し(タイルの大きさをM×Nとする)、
このタイルM×N画素毎に、カラー画像の符号化である
離散古参変換符号化(JPEG)と属性フラグデータ情
報の符号化であるラインレングス符号化に分けてそれぞ
れ符号化する。
In any case, the image input from the input unit 101 is temporarily stored in the compressed block line buffer 111. In the block line buffer 111, the image is divided into tiles (the tile size is M × N),
For each tile M × N pixels, coding is performed by dividing into discrete old ginseng transform coding (JPEG) which is coding of a color image and line length coding which is coding of attribute flag data information.

【0016】ただし、M、Nは離散コサイン変換符号化
のためのウインドウサイズの倍数でなければならない。
本実施形態で用いるJPEG圧縮方式では、圧縮のため
のウインドウサイズを8×8画素とするので、例えばM
=N=32とすると、32×32の画素タイルの中を更
に16個の8×8画素に分割して8×8画素単位でJP
EG圧縮を行う。以下、実施形態ではM=N=32とし
て説明するが、勿論、これによって本発明が限定される
ものではない。
However, M and N must be multiples of the window size for discrete cosine transform coding.
In the JPEG compression method used in the present embodiment, the window size for compression is set to 8 × 8 pixels.
= N = 32, the 32 × 32 pixel tile is further divided into 16 8 × 8 pixels, and JP is divided into 8 × 8 pixel units.
EG compression is performed. Hereinafter, in the embodiment, M = N = 32 will be described, but of course, the present invention is not limited to this.

【0017】符号化部102は、入力された32×32
画素のタイル画像に含まれる16個の8×8画素ウイン
ドウに対して周知のDCT変換を施し量子化する。この
ときに用いる量子化係数(量子化マトリクスと呼ぶ)を
後述する方式でタイル毎に切り替えて設定できるように
なっている。
The encoding unit 102 receives the input 32 × 32
The well-known DCT transform is applied to the 16 8 × 8 pixel windows included in the tile image of pixels to perform quantization. The quantization coefficient (referred to as a quantization matrix) used at this time can be set by switching for each tile by a method described later.

【0018】判定部113は符号化しようとしている画
像データに対応する32×32画素の属性フラグ情報を
入力し、後述する判定処理を行い、その結果に従って量
子化係数の選択信号を符号化部102に出力する。属性
フラグデータは、各画素毎につけられるものであるが、
本実施形態のように、M×N画素タイル内の符号化方法
は一定とするので、タイル内の属性データを解析して、
そのタイルを代表する属性を決定する必要がある(詳細
は後述)。
The determination unit 113 inputs the attribute flag information of 32 × 32 pixels corresponding to the image data to be encoded, performs the determination process described later, and according to the result, outputs the quantization coefficient selection signal to the encoding unit 102. Output to. The attribute flag data is attached to each pixel,
Since the encoding method in the M × N pixel tile is constant as in the present embodiment, the attribute data in the tile is analyzed and
It is necessary to determine the attribute that represents the tile (details will be described later).

【0019】符号化部102は、判定部113からの判
定結果及び符号化シーケンス108からの指示に基づ
き、入力した画像データの符号化を行なう。なお、符号
化方式は公知のJPEG符号化方式を用い、8×8画素
単位に相当する画像データを直交変換し、後述する量子
化ステップを用いた量子化、ハフマン符号化処理を行な
うものである。また、符号化部102はタイルの代表属
性値をランレングス符号化し、それを出力する。
The encoding unit 102 encodes the input image data based on the determination result from the determination unit 113 and the instruction from the encoding sequence 108. A known JPEG encoding method is used as an encoding method, image data corresponding to a unit of 8 × 8 pixels is orthogonally transformed, and quantization and Huffman encoding processing using a quantization step described later are performed. . Also, the encoding unit 102 performs run-length encoding on the representative attribute value of the tile and outputs it.

【0020】第1のメモリ制御部103と第2のメモリ
制御部105は、上記符号化部102から夫々に出力さ
れてくる上記符号化データ(画像の符号化データと属性
の符号化データ)を第1のメモリ104と第2のメモリ
106へ格納する様に制御する。ここで、第1のメモリ
104は、最終的に確定した(目標値以内のデータ量に
圧縮し終わった)符号化データを、図1の基本構成の外
部に接続されるネットワーク機器、画像出力装置や大容
量記憶装置等へ出力するために、該符号化データを保持
するためのメモリである。また、第2のメモリ106
は、前記符号化データを第1のメモリ上に形成するため
の圧縮符号化処理を補助する作業用のメモリである。
The first memory control unit 103 and the second memory control unit 105 receive the encoded data (encoded image data and encoded attribute data) output from the encoding unit 102, respectively. The control is performed so that the data is stored in the first memory 104 and the second memory 106. 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 106
Is a working memory that assists the compression coding process for forming the coded data on the first memory.

【0021】カウンタ107は、符号化部102によっ
て圧縮符号化された画像データのデータ量をカウント
し、該カウント値を保持すると共に、そのカウント結果
を符号化シーケンスの制御を行なう符号化シーケンス制
御部108に出力する。なお、属性データの符号量もカ
ウント対象にしても良いが、実施形態では対象外とし
た。理由は、1つの属性データは1つのタイル(複数画
素で構成される領域)に対するものであるので、画像全
体に対する情報量は元々ごく少ないし、高い圧縮率が望
めるからである。ただし、カウント対象にしても良いの
は勿論である。
The counter 107 counts the amount of 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. The code amount of the attribute data may be counted, but it is excluded in the embodiment. The reason is that one attribute data is for one tile (a region composed of a plurality of pixels), so the amount of information for the entire image is originally very small and a high compression rate can be expected. However, it goes without saying that it may be counted.

【0022】符号化シーケンス制御部108では、カウ
ンタ107のカウント値がある設定値に達したかどうか
を検出し、その設定値に達したことを検出した時(目標
値を越えた時でも良い)にメモリ104内の格納済みの
データを廃棄するよう第1のメモリ制御部103に制御
信号を出力する。上記第1のメモリ制御部103は、こ
の制御信号に基づいて、メモリアドレスカウンタをクリ
アするか、あるいは画像データ用の符号化データ管理テ
ーブルをクリアすることにより、前記格納データを廃棄
する。また、このとき、符号化シーケンス制御部108
は、第1のカウンタ107をゼロクリアする(入力部1
01からの入力は継続している)と共に、符号化部10
2に対して今までより、高い圧縮率で符号化を行なうよ
う制御する。すなわち、本装置の符号化処理で発生する
符号化データのデータ量が最終的に例えば1/2になる
ように制御する。なお、ここでは、1/2としたが任意
に設定できることは言うまでもない。
The encoding sequence control unit 108 detects whether or not the count value of the counter 107 has reached a certain set value, and when it has reached that set value (even if it exceeds the target value). 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.

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

【0024】さらに、符号化シーケンス制御部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.

【0025】再符号化部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. The data amount having the same compression ratio as 102 is output to the second counter 110.

【0026】この再符号化部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.

【0027】再符号化処理が終了したかどうかは、第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.

【0028】第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 counter value held by the first counter 107 after the addition is for one screen. Represents the total amount of data generated in the case of encoding (details will be described later).

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

【0030】カウンタ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.

【0031】上記図1の構成における処理のフローを表
わすフローチャートを図8に示すが、説明を簡単にする
ため、簡略化した図3のフローチャートに従って先ず説
明する。
A flow chart showing the flow of processing in the configuration of FIG. 1 is shown in FIG. 8. First, for simplification of description, description will first be made according to the simplified flow chart of FIG.

【0032】既に説明したように、本発明の画像処理装
置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.

【0033】図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.

【0034】図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 flowchart 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.

【0035】<<符号化フェーズ>>1ページ分の画像
データの符号化処理は、符号化パラメータの初期設定
(ステップS301)から始まる。ここでは符号化処理
する画像サイズ(スキャナ等の入力部101から読み取
る用紙サイズ)から一意的に定まる符号化データ量の上
限値や符号化部102(ここでは公知のJPEG符号化
方式を用いるものとする)に適用する量子化ステップパ
ラメータ(Q1)を設定する。
<< Encoding Phase >> The encoding process of one page of image data 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). The quantization step parameter (Q1) applied to

【0036】符号化部102は、この量子化ステップパ
ラメータQ1と、判定部113からの32×32画素ブ
ロックにおける判定結果に従い、注目画素ブロック(=
32×32画素)について黒文字領域用量子化マトリク
スQ1a、中間調画像用量子化マトリクスQ1bのいず
れかを用いて量子化し、符号化する。詳細は後述するが
文字部分は文字としての判読可能かどうかが重要である
ので、中間調画像よりも量子化ステップは小さい方が好
ましい。上記の黒文字領域用量子化マトリクスQ1a、
中間調画像用量子化マトリクスQ1bかかる相異点を有
するものである。また、後述するように、量子化ステッ
プパラメータQ2が設定された場合には、量子化マトリ
クスQ2a,Q2bのいずれかを用いて符号化するし、
量子化ステップパラメータQ3が設定された場合には、
量子化マトリクスQ3a,Q3bのいずれかを用いて符
号化する。これについの詳細は後述することとし、図3
の説明を続ける。
The encoding unit 102 follows the quantization step parameter Q1 and the determination result of the 32 × 32 pixel block from the determination unit 113 and determines the target pixel block (=
32 × 32 pixels) are quantized and encoded using either the black character region quantization matrix Q1a or the halftone image quantization matrix Q1b. Although details will be described later, since it is important whether or not the character portion is legible as a character, it is preferable that the quantization step is smaller than that of the halftone image. The quantization matrix Q1a for the black character area,
The halftone image quantization matrix Q1b has such a difference. Further, as will be described later, when the quantization step parameter Q2 is set, encoding is performed using either of the quantization matrices Q2a and Q2b,
When the quantization step parameter Q3 is set,
Encoding is performed using either the quantization matrix Q3a or Q3b. Details of this will be described later, and FIG.
Continue to explain.

【0037】ステップS303にて、第1のカウンタ1
07は、実際の符号化処理(画像の8×8画素単位にJ
PEG圧縮)を行ない、出力される符号化データのデー
タ量を累積カウントする。
In step S303, the first counter 1
07 is the actual encoding process (J is performed for each 8 × 8 pixel unit of the image).
(PEG compression) is performed, and the data amount of the encoded data to be output is cumulatively counted.

【0038】次にステップS305にて、該データ量の
カウント値が上記上限値をオーバーしたかどうかを検知
し、オーバーしていなければステップS303のJPE
G符号化処理を継続する。これが初期状態の符号化フェ
ーズである。
Next, in step S305, it is detected whether the count value of the data amount exceeds the upper limit value, and if not, the JPE of step S303.
The G encoding process is continued. This is the initial encoding phase.

【0039】符号化部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.

【0040】なお、符号化部102は判定部113から
の判定結果であるタイル毎の属性データをも圧縮符号化
し、第1、第2のメモリそれぞれに出力することになる
が、この符号化部102内の属性データの圧縮にかかる
構成は、図17に示すようになっている。
The encoding unit 102 also compression-encodes the attribute data for each tile, which is the determination result from the determination unit 113, and outputs it to the first and second memories, respectively. The structure related to the compression of the attribute data in 102 is as shown in FIG.

【0041】同図は符号化部102内の属性データ圧縮
符号化に関する部分のみの構造を示している。
The figure shows the structure of only the portion related to the attribute data compression encoding in the encoding unit 102.

【0042】図示において、判定部310では,入力さ
れる属性フラグデータの前回の値と現在の値とが同じか
を判定し,同じ場合はRLコード生成部311に,違う
場合はLTコード生成部312にデータを送るように切
り替える。RLコード生成部311では,前データと同
じ場合の回数を違うデータが出てくるまでカウントし,
最後に,繰返したデータを出力する。LTコード生成部
312では,データが前画素と異なる場合の数をカウン
トして,カウント数に対応する符号語と,実際データの
最小構成ビット数をカウント数分だけ出力する。合成部
313では,RL部の出力データとLT部の出力データ
を合成してコード315として出力する。なお、この構
成はその一例であって、別な構成で実現しても構わな
い。
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 in which 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 the synthesized data as a code 315. It should be noted that this configuration is one example, and may be realized by another configuration.

【0043】<<符号化・再符号化フェーズ>>符号化
部102の符号化処理が進行し、前記データ量のカウン
ト値が設定されている上限値をオーバーすると、ステッ
プS307にて、第1のメモリ104内の符号化データ
を廃棄すると共に、ステップS309にて、符号化部1
02の量子化ステップパラメータをQ2に変更する(従
って、符号化部102は判定部113の判定結果に従
い、量子化マトリクスQ2a,Q2bのいずれかを用い
て符号化することになる)。
<< 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 parameter of 02 is changed to Q2 (thus, the encoding unit 102 performs encoding using either of the quantization matrices Q2a and Q2b according to the determination result of the determination unit 113).

【0044】符号化データのデータ量のカウント値が設
定された上限値をオーバーするという事は、圧縮後のデ
ータ量が目標値以内に収まらないことを意味する。よっ
て同じ量子化ステップを用いて符号化処理を継続しても
意味が無いので、前よりもデータ量が少なくなるよう
に、量子化ステップパラメータを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 parameter is set to Q2 (the quantization step is larger than that in the case of Q1) so that the data amount becomes smaller than before. ) Will be changed to.

【0045】量子化ステップパラメータを変更した後、
ステップS311では符号化部102の符号化処理を再
開し、図5に示すように符号化データを第2のメモリ1
06のみに格納する。それと並行して、ステップS31
3の再符号化処理を行なう。再符号化処理では、第2の
メモリ106に格納済みの符号化データ(画像の符号化
データ及び属性符号化データの両方)を読み出して、再
符号化部109にて再符号化処理を行ない、2つのメモ
リ104、106に格納する。そして、縦縞の符号を
全て再符号化するまで、該符号化処理と再符号化処理を
継続する。なお、再符号化部109は、符号化部102
に対して設定した新たな量子化ステップパラメータと同
じものを用い、復号して得られた属性に従って、最適な
量子化マトリクスを用いて再符号化することになる具体
的にこの再符号化処理では、符号化データを一旦ハフマ
ン復号した後の各量子化値に対して、これら値を2n
割った結果と同様の結果が出るビットシフト処理を施し
た後、再度ハフマン符号化を行なうことにより実現され
る。この方法は、ビットシフトのみで量子化ステップを
変更する点と逆直交変換や再直交変換処理を行なわない
点で、高速な再符号化処理が可能である。ステップ31
5では、再符号化処理の終了検知が行なわれる。
After changing the quantization step parameters,
In step S311, the encoding process of the encoding unit 102 is restarted, and the encoded data is stored in the second memory 1 as shown in FIG.
Only stored in 06. In parallel with this, step S31
3 re-encoding processing is performed. In the re-encoding process, the encoded data (both the image encoded data and the attribute encoded data) stored in the second memory 106 is read out, and the re-encoding unit 109 performs the re-encoding process. The data is stored in the two memories 104 and 106. Then, the encoding process and the re-encoding process are continued until all the codes of the vertical stripes are re-encoded. In addition, the re-encoding unit 109 includes the encoding unit 102.
Using the same new quantization step parameter set for, according to the attribute obtained by decoding, re-encoding will be performed using the optimum quantization matrix. Specifically, in this re-encoding process, , Huffman coding is performed again after bit shift processing that gives the same result as the result of dividing these coded data by 2 n for each quantized value after Huffman decoding the coded data. Will be realized. 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.

【0046】再符号化後のデータ量は再符号化前の符号
化データのデータ量よりも少なくなるので、図5に示す
ように、再符号化前の符号を格納していたメモリ領域に
再符号化後の符号化データを上書きするように格納する
ことができる。再符号化処理が終了した時点で、縦縞
の符号化データのデータ量は図6に示すの斜め縞の符
号化データのデータ量へと減少する。
Since the data amount after re-encoding becomes smaller than the data amount of the 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.

【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に格納する際、適当な単位
(例えば前記直交変換の単位が32×32の画素ブロッ
クであるので、32×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, 32.times.i because the unit of the orthogonal transformation is a 32.times.32 pixel block). 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 performed according to the newly set quantization step parameter. It is compression encoded at a higher compression rate. When it is determined that the target value has been reached, the code data that has already been compression-encoded before that is temporarily
It is decoded and re-encoded according to the newly set quantization step parameter. 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.

【0064】<量子化マトリクス>先に説明したよう
に、実施形態における符号化部102は、量子化ステッ
プパラメータQi(i=1,2,…)が設定されると、利用
する量子化マトリクスQiaQibのいずれかを用いて、
直交変換後の変換係数に対して量子化し、エントリピー
符号化(ハフマン符号化)を行う。以下、図18及び図
19を参照して説明する。
<Quantization Matrix> As described above, when the quantization step parameter Qi (i = 1, 2, ...) Is set, the encoding unit 102 in the embodiment uses the quantization matrix QiaQib. Using one of the
The transform coefficient after the orthogonal transform is quantized, and entry Py coding (Huffman coding) is performed. Hereinafter, description will be given with reference to FIGS. 18 and 19.

【0065】図18(a)は読み取り対象の原稿画像を
示しており、図示の如く文字領域と中間調画像領域とが
混在している。実施形態では、判定部113では32×
32画素ブロック単位にその画素ブロックを代表する属
性を決定している。具体的には、画素ブロック中の1つ
でも文字画素であるとの属性がある場合、当該画素ブロ
ックは文字領域として判定する。換言すれば、中間調と
判断されるのは、画素ブロック内の全画素が中間調画素
を示す属性を備える場合とした(ただし、文字である画
素が2個以上ある場合に文字領域としても良いし、その
数によって本発明が限定されるものではない)。
FIG. 18A shows a document image to be read, in which a character area and a halftone image area are mixed as shown. In the embodiment, the determination unit 113 has 32 ×
The attribute representative of the pixel block is determined in units of 32 pixel blocks. Specifically, if even one of the pixel blocks has the attribute of being a character pixel, the pixel block is determined as a character area. In other words, the halftone is determined when all the pixels in the pixel block have the attribute indicating the halftone pixel (however, when there are two or more pixels that are characters, it may be a character area. However, the present invention is not limited by the number).

【0066】図18(c)は、同図(b)のうち文字領
域であると判定された部分のみを抽出されたところを示
している。逆に、中間調領域であると判断された箇所に
斜線部を付して区別して示すものが同図(d)である。
FIG. 18C shows that only the portion determined to be the character area in FIG. 18B is extracted. On the contrary, FIG. 3D shows a portion that is determined to be a halftone region with a hatched portion for distinction.

【0067】先に説明したように、文字画像部分は、そ
の文字が判読できることが重要であるので、中間調領域
よりは量子化ステップ(特に、中高周波成分)は小さい
ことが望ましい。換言すれば、中間調領域は文字領域よ
りも量子化ステップを大きくしても全体に与える影響は
少ない。
As described above, since it is important that the character can be read in the character image portion, it is desirable that the quantization step (particularly, the medium and high frequency components) is smaller than that in the halftone area. In other words, the halftone region has less effect on the whole even if the quantization step is larger than that of the character region.

【0068】例えば、量子化ステップパラメータQ1に
対する中間調領域用量子化マトリクス、文字領域用量子
化マトリクスの一例として示すのであれば図19のよう
なものである。T1が文字を含まない写真等の中間調領
域に対して適用される量子化マトリクスであり、T2が
文字や線画を含むタイルに対して適用される量子化マト
リクスの例である。
For example, FIG. 19 shows an example of the halftone area quantization matrix and the character area quantization matrix for the quantization step parameter Q1. T1 is an example of a quantization matrix applied to a halftone region such as a photograph that does not include characters, and T2 is an example of a quantization matrix applied to a tile that includes characters and line drawings.

【0069】DCT係数は通常マトリクスの左上がDC
成分に対する量子化ステップとなっており右もしくは下
へ行くほど高周波成分に対する量子化ステップを表して
いる。数値が小さいほど量子化ステップが小さい。すな
わち元の画像の情報を保存していることを意味する。T
2はT1にくらべ左上の領域の数値が大きくなってお
り、右もしくは下へ行くほど数値が小さくなるように設
定している。すなわち低周波成分を若干犠牲にしながら
高周波成分の情報を保存するようにしており、文字画像
の圧縮劣化を減少させることができることになる。
The DCT coefficient is normally DC at the upper left of the matrix.
The quantization step is for the component, and the quantization step for the high-frequency component is expressed as it goes to the right or the bottom. The smaller the number, the smaller the quantization step. That is, it means that the information of the original image is stored. T
In the case of 2, the numerical value in the upper left area is larger than that in T1, and the numerical value becomes smaller toward the right or the lower side. That is, the information of the high frequency component is stored while slightly sacrificing the low frequency component, so that the compression deterioration of the character image can be reduced.

【0070】以上の結果、設定したデータ量になる度
に、量子化ステップパラメータがQ1、Q2、Q3…と
変わっていくものの、第1のメモリ104には1つの量
子化ステップパラメータに従った符号化画像データと符
号化属性データが格納されることになる。
As a result, although the quantization step parameter changes to Q1, Q2, Q3 ... Each time the set data amount is reached, the first memory 104 has a code according to one quantization step parameter. The encoded image data and the encoded attribute data are stored.

【0071】例えば、第1のメモリ104に格納された
符号化データを用いて、不図示のプリンタで印刷する場
合には、第1のメモリ104に格納されたデータ(符号
化画像データと符号化属性データ)をファイルとしてハ
ードディスク等に保存し、そのハードディスクに記憶さ
れている画像データ及び属性フラグデータを読出し、以
下の手順で復号化して出力することになる。
For example, when the coded data stored in the first memory 104 is used to print with a printer (not shown), the data (coded image data and coded data stored in the first memory 104 The attribute data) is stored as a file in a hard disk or the like, and the image data and the attribute flag data stored in the hard disk are read out, and are decoded and output in the following procedure.

【0072】まず圧縮して記憶された属性フラグデータ
のM×N(実施形態では32×32)画素分のデータを
読み出し、属性フラグを復号する。
First, data of M × N (32 × 32 in the embodiment) pixels of the compressed and stored attribute flag data is read and the attribute flag is decoded.

【0073】次に、属性フラグデータの復号結果によ
り,画像データの復号化パラメータ(本発明では逆量子
化マトリクス)を切り替えて画像データを復号処理し,
その結果を出力バッファに出力する。
Next, the image data decoding process is performed by switching the image data decoding parameter (inverse quantization matrix in the present invention) according to the attribute flag data decoding result.
The result is output to the output buffer.

【0074】このとき、まず属性フラグデータを復号し
復号されたM×N画素内の属性フラグデータに対し判定
部101と同等の解析、判定処理を行い、対応するM×
N画素の画像データを復号するための逆量子化マトリク
スを設定して復号する。イメージスキャナとページ記述
言語レンダリング部では全く同じ判定が行われ、また属
性フラグデータはデータの劣化しないランレングス符号
化のような可逆圧縮方式で圧縮されているので、符号化
時と復号化時で同一タイルに対応する判定結果は全く等
しいものとなる。従ってタイルごとに異なる量子化係数
で量子化されていても復号時にはそれぞれに適した逆量
子化係数が設定されるので、正しい復号画像データが得
られることになる。
At this time, first, the attribute flag data is decoded, and the attribute flag data in the decoded M × N pixels is subjected to the same analysis and determination processing as the determination unit 101, and the corresponding M × N
An inverse quantization matrix for decoding the image data of N pixels is set and decoded. The image scanner and the page description language rendering unit make exactly the same determination, and the attribute flag data is compressed by a lossless compression method such as run length encoding that does not deteriorate the data. The determination results corresponding to the same tile are exactly the same. Therefore, even if each tile is quantized with a different quantized coefficient, an appropriate inverse quantized coefficient is set at the time of decoding, so that correct decoded image data can be obtained.

【0075】以上説明したように本第1の実施形態によ
れば、画像入力中に設定値を越えた場合であっても、そ
の入力を継続しながら、目的とする設定値内に収まるよ
う符号化を行うことが可能になる。また、像域属性情報
に従って2つの量子化マトリクスを用いることで、例え
ば1つの場合と比較し、中間調領域の圧縮率を多少高め
に設定でき、その分、文字領域については画質劣化を抑
制するために割り振ることができるので、結果的に、1
つの場合と比較して、圧縮率に対する画質劣化を更に抑
制することが可能になる。
As described above, according to the first embodiment, even if the set value is exceeded during image input, the code is set so that the input value is kept within the target set value while continuing the input. Can be performed. Further, by using two quantization matrices in accordance with the image area attribute information, the compression rate of the halftone area can be set to be slightly higher than that in the case of one, and the image quality deterioration of the character area can be suppressed accordingly. As a result, 1 can be allocated for
Compared to the two cases, it is possible to further suppress the image quality deterioration with respect to the compression rate.

【0076】<第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.

【0077】図1の画像処理装置100と大きく異なる
点は、最初に符号化を行なう符号化部が2つ並列に存在
する点である。画像処理装置200は、入力部201か
ら入力される画像データを、第1の符号化部202と第
2の符号化部205で並行して符号化し、互いに圧縮率
の異なる2種類の符号化データを生成する。本例でも、
符号化方式は公知のJPEG符号化方式を用い、8×8
画素単位に相当する画像データを直交変換し、後述する
量子化ステップを用いた量子化、ハフマン符号化処理を
行なうものである。
A major difference from the image processing apparatus 100 shown in FIG. 1 is that two coding units for coding first exist in parallel. In the image processing apparatus 200, the image data input from the input unit 201 is coded in parallel by the first coding unit 202 and the second coding unit 205, and two types of coded data having different compression rates are obtained. To generate. Also in this example,
A known JPEG encoding method is used as the encoding method, and 8 × 8 is used.
The image data corresponding to a pixel unit is orthogonally transformed, and quantization and Huffman coding processing using a quantization step described later is performed.

【0078】なお、本例では第1の符号化部202より
も、第2の符号化部205の方が適用する圧縮率を高く
設定する。具体的には、初期状態では、第1の符号化部
202に設定する量子化ステップパラメータをQ1、第
2の符号化部205へ設定する量子化ステップパラメー
タをQ2とする。つまり、第2の符号化部205に設定
する量子化ステップパラメータは、常に第1の符号化部
202よりも1ランク圧縮率の高くなるパラメータを設
定する。第1、第2の符号化部202、205は設定さ
れたパラメータと、判定部213からの判定結果に従っ
て、直交変換したデータに対して最適な量子化マトリク
スを選択し、量子化し、符号化する。
In this example, the compression rate applied by the second coding unit 205 is set to be higher than that by the first coding unit 202. Specifically, in the initial state, the quantization step parameter set in the first coding unit 202 is Q1, and the quantization step parameter set in the second coding unit 205 is Q2. That is, as the quantization step parameter set in the second encoding unit 205, a parameter having a higher one-rank compression rate than that of the first encoding unit 202 is always set. The first and second encoding units 202 and 205 select, quantize, and encode an optimum quantization matrix for orthogonally transformed data according to the set parameters and the determination result from the determination unit 213. .

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

【0080】一方、符号化部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.

【0081】更に、後述する第2のメモリ207に格納
している符号化データを第1のメモリ204に転送する
時には、それと同時に上記カウント値を、第1のカウン
タ208に転送する。
Furthermore, when the encoded 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.

【0082】さて、第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.

【0083】そして、符号化シーケンス制御部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. As a result, 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. Further, the second counter 210 is cleared to zero and starts counting the encoded data amount of the image data input thereafter.

【0084】要するに、上記第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.

【0085】さらに、符号化シーケンス制御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.

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

【0087】ただし、設定値を越えたと判断したとき、
第2のメモリ207内にはそれまでの量子化ステップパ
ラメータQ2に従って符号化されたデータが格納されて
いるので、このデータを新に設定された量子化ステップ
パラメータ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,
Since the data encoded according to the quantization step parameter Q2 so far is stored in the second memory 207, it is necessary to update this data with the code data for the newly set quantization step parameter Q3. There is.
Therefore, when the re-encoding unit 211 determines that the set value is exceeded, it reads the previous code data (coded image data and coded attribute data), decodes the coded data, and according to the newly set quantization step parameter Q3, It is encoded again and stored again in the second memory 207 via the second memory control unit 206. At this time, the third counter 212 is counting the amount of data re-encoded by the re-encoding unit 211, and when the re-encoding of the previous encoded data is completed,
The count value is added to the second counter 210. Therefore, when this addition is completed, the second counter 210
Is transparent that the second encoding unit 205 counts the amount of data encoded by the quantization step parameter Q3 from the beginning of the input image.

【0088】そして、再符号化処理の終了/未終了に関
わらず、符号化するべき入力部201からの画像データ
が残っていれば、2つの符号化部202と205による
符号化処理を継続して行なう。そして、カウンタ208
のカウント値がある設定値に達したかどうかの監視は入
力部201から入力される1ページ分の画像データの符
号化処理(符号化、再符号化)が終わるまで繰り返さ
れ、上述した符号化と再符号化の処理は、ここで得られ
る検出結果に応じた制御の上で実行される。
If the image data from the input unit 201 to be encoded still 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.

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

【0090】図2で説明したように符号化部が2つある
場合は、図12に示すフローチャートに基づいて1ペー
ジ分の画像データの符号化を行なう。なお、図12の説
明は、符号化部が1つの場合のフローチャートである図
8とは、大半は類似しており、当業者であれば上記説明
から本第2の実施形態の特徴は十分に理解できるであろ
うから、符号化部1つの場合と同じように3つのフェー
ズで処理を説明する様にし、図8と異なる点を主に説明
することとする。
When there are two encoding units as described with reference to FIG. 2, 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.

【0091】上述した図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).

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

【0093】符号化フェーズでは、ステップ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.

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

【0095】第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.

【0096】本第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.

【0097】具体的には、まず図15に示す様に、転送
フェーズの次の符号化・再符号化フェーズでは、上記再
符号化の前に、2つの符号化部202,205に適用さ
れる各量子化ステップパラメータQ1、Q2をそれぞれ
Q2、Q3へ変更し(ステップS309)、1ページの
画像データの入力が終了せずに続いていれば(ステップ
S803)、後続の画像データは新たな量子化ステップ
が設定された2つの符号化部で該入力データを符号化し
て(ステップS311)、対応する各メモリ204,2
07へ格納する。そして、上記符号化処理と並行して第
2のメモリに格納されている符号化データ(第1のメモ
リ204に転送したもの)は、第1のメモリ内の符号化
データよりも1段階高い圧縮率の符号化データに変更す
るべく、再符号化部211にて量子化ステップQ3を用
いて符号化されたデータが得られる様な再符号化処理
(S313)を行ない、再符号化データを第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. The quantization step parameters Q1 and Q2 are changed to Q2 and Q3, respectively (step S309), and if the input of the image data of one page continues without being completed (step S803), the subsequent image data will be replaced by a new quantum. The input data is encoded by the two encoding units to which the encoding steps are set (step S311), and the corresponding memories 204, 2
It is stored in 07. Then, the encoded data stored in the second memory (transferred to the first memory 204) in parallel with the encoding process is compressed one step higher than the encoded data in the first memory. In order to change the encoded data to the rate, the re-encoding unit 211 performs re-encoding processing (S313) so that data encoded using the quantization step Q3 is obtained, and the re-encoded data is converted into the first encoded data. The data is stored again in the second memory 207.

【0098】なお、本第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.

【0099】なお、本第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.

【0100】図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.

【0101】図16に示された符号化フェーズの状態
は、量子化ステップと符号化データの混在の仕方が、再
符号化処理の前後で異なっていること以外は、初期状態
の符号化フェーズ(図13)と同じである。よって、符
号化フェーズ、転送フェーズと符号化・再符号化フェー
ズを繰り返すことで、最終的に、1ページ分の画像デー
タを設定した上限値以下に圧縮した符号化データを確実
に第1のメモリ204に格納することが出来る。
The state of the encoding phase shown in FIG. 16 is different from that of 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.

【0102】なお、第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 that of the first embodiment, the image data for one page, which was performed after the transfer processing in FIG. 8, is performed. 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.

【0103】以上説明した第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.

【0104】また、1つのメモリで上記各実施形態を実
現する場合には、前記転送フェーズで説明したデータ転
送処理のいくつかは不要となる。その詳細はその都度容
易に想像できるので説明は省略するが、前記2つの領域
を厳密に別けて使用する場合、物理的に2つのメモリを
持つ時と同じようにデータ転送処理が必要であるが、2
つの領域間で同じデータを共有することになれば、デー
タ転送処理が不要になるだけでなく記憶容量の削減も図
れる。
Further, 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.

【0105】例えば、第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 head 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.

【0106】前記符号化データを、ファイル形式やパケ
ット形式で格納している場合は、メモリ制御部の間で転
送する情報は少し増え、該符号化データに関連する管理
テーブル情報を転送する必要がある。それでも、符号化
データを転送するよりは、効率が良い。
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.

【0107】上述した画像処理装置によると、入力した
画像データを符号化していく際に、目的とするサイズに
越えるような場合であっても、その入力を継続しつつ目
標とするサイズに収めるよう処理を継続することができ
るようになる。しかも、本第1、第2の実施形態では、
量子化ステップパラメータに対して一律同じ量子化ステ
ップにするのではなく、文字領域、中間調領域それぞれ
に適した量子化マトリクスが用いられて符号化されるの
で、高い圧縮率と、画質劣化を最低限にすることが可能
になる。
According to the above-described image processing apparatus, when the input image data is encoded, even if the input image data 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,
Quantization step parameters are not uniformly set to the same quantization step, but are encoded using a quantization matrix suitable for each of the character area and the halftone area, so high compression rate and minimum deterioration of image quality are achieved. It becomes possible to limit it.

【0108】なお、実施形態では、属性データを圧縮す
る際に、第1、第2のメモリそれぞれに格納するものと
して説明したが、判定部113、213の判定結果の属
性データは1ページの画像に対して変動することはない
ので、共通のメモリ(例えば第1のメモリ)に格納する
ようにし、再符号化部211が再符号化する際に、その
共通のメモリを参照して再符号化するようにしても構わ
ない。
In the embodiment, when the attribute data is compressed, it is stored in each of the first and second memories, but the attribute data of the determination results of the determination units 113 and 213 is the image of one page. Therefore, the re-encoding unit 211 stores the data in a common memory (for example, the first memory) and, when the re-encoding unit 211 re-encodes, refers to the common memory and re-encodes. You may choose to do this.

【0109】また、上記の通り、本発明は、汎用装置上
で動作するアプリケーションプログラムによって実現で
きるものであるので、本発明はコンピュータプログラム
をも含むものである。また、コンピュータプログラム
は、通常、フロッピー(登録商標)ディスクやCDRO
M等の記憶媒体を装置にセットしてコピー或いはインス
トールことで行われるので、かかる記憶媒体も本発明の
範疇に当然に含まれる。
Further, as described above, the present invention can be realized by an application program that operates on a general-purpose device, so 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.

【0110】また、実施形態では、スキャナから画像デ
ータを入力するものとして説明したが、ホストコンピュ
ータ上で動作するプリンタドライバに適用しても良い。
プリンタドライバに適用する場合には、上位処理(アプ
リケーション等)から印刷対象のデータを受信したとき
に、その時点で、そのデータが中間調画像か、文字・線
画かは勿論は判別できるので、像域情報生成処理にかか
る構成を省くか、或いはより簡素なものとすることがで
きる。
Further, in the embodiment, 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.

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

【0112】[0112]

【発明の効果】以上説明したように本発明によれば、再
画像入力を不要とし、効果的に設定したサイズに収まる
符号化データを生成でき、且つ、圧縮率に対して画質劣
化が小さくすることが可能になる。
As described above, according to the present invention, re-image input is unnecessary, coded data can be effectively generated within a set size, and image quality deterioration with respect to a compression rate is reduced. It will be possible.

【図面の簡単な説明】[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.

【図18】実施形態における原稿画像と文字領域及び中
間調領域との関係を示す図である。
FIG. 18 is a diagram showing a relationship between a document image and a character area and a halftone area in the embodiment.

【図19】実施形態で採用する量子化マトリクスの例を
示す図である。
FIG. 19 is a diagram showing an example of a quantization matrix adopted in 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 PP15 PP20 RC12 RC40 SS20 TA46 TB06 TC02 TC18 TC24 TC38 TD05 TD07 TD09 TD12 TD17 UA02 UA32 UA35 UA36 UA38 UA39 5C078 AA04 BA57 CA03 CA27 CA31 DA01 DA06 5J064 AA01 AA02 BC01 BC16 BC25 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 PP15                       PP20 RC12 RC40 SS20 TA46                       TB06 TC02 TC18 TC24 TC38                       TD05 TD07 TD09 TD12 TD17                       UA02 UA32 UA35 UA36 UA38                       UA39                 5C078 AA04 BA57 CA03 CA27 CA31                       DA01 DA06                 5J064 AA01 AA02 BC01 BC16 BC25                       BD06

Claims (9)

【特許請求の範囲】[Claims] 【請求項1】 画像データを圧縮符号化する画像処理装
置であって、 圧縮符号化データを記憶する記憶手段と、 入力する画像データの像域情報を判定する判定手段と、 量子化ステップに関するパラメータと前記判定手段の判
定結果に基づいて画像データを圧縮符号化する第1の圧
縮符号化手段と、 量子化ステップに関するパラメータと前記判定手段の判
定結果に基づいて画像データを圧縮符号化すると共に、
前記第1の圧縮符号化手段で圧縮した符号データを復号
し、再圧縮する第2の圧縮符号化手段と、 前記第1の圧縮符号化手段によって生成される符号量を
監視すると共に、当該符号データ量が所定量になったか
否かを判断する符号量監視手段と、 該符号量監視手段によって前記所定量に達したと判断し
た場合、前記第1、第2の圧縮符号化手段における、量
子化ステップを大きくするようパラメータを設定する設
定手段と、 該パラメータ設定手段によりパラメータを変更した場
合、前記第1の圧縮符号化手段で従前に生成された符号
データを前記第2の圧縮符号化手段によって再符号化さ
せ、当該再符号化を済ませた符号データを、前記第1の
圧縮符号化手段のパラメータ変更後の符号データとして
前記記憶手段に記憶すると共に、 パラメータ変更後の前記第1の圧縮符号化手段で生成さ
れた符号化データを、後続符号データとして前記記憶手
段に保存させる制御手段とを備えることを特徴とする画
像処理装置。
1. An image processing apparatus for compression-encoding image data, comprising: storage means for storing compression-encoded data; determination means for determining image area information of input image data; and parameters relating to quantization steps. And first compression encoding means for compressing and encoding image data based on the determination result of the determining means, and compression encoding of the image data based on the parameter relating to the quantization step and the determination result of the determining means,
Second compression coding means for decoding and recompressing coded data compressed by the first compression coding means, and monitoring the code amount generated by the first compression coding means, and Code amount monitoring means for determining whether or not the data amount has reached a predetermined amount, and when the code amount monitoring means determines that the predetermined amount has been reached, the quantum in the first and second compression encoding means Setting means for setting a parameter so as to increase the encoding step, and when the parameter is changed by the parameter setting means, the code data previously generated by the first compression encoding means is converted into the second compression encoding means. And re-encode the encoded data after the re-encoding, and store the re-encoded encoded data in the storage unit as encoded data after the parameters of the first compression encoding unit are changed. An image processing apparatus, comprising: a control unit that causes the storage unit to store the encoded data generated by the first compression encoding unit after the data change as subsequent encoded data.
【請求項2】 前記判定手段は文字線画領域か、中間調
領域かを判定し、 前記第1、第2の圧縮符号化手段は、前記判定結果に応
じて、1つのパラメータに対して文字線画領域用と中間
調画像領域用それぞれの量子化マトリクスのうちいずれ
か一方を用いて量子化し、符号化することを特徴とする
請求項第1項に記載の画像処理装置。
2. The determination means determines whether a character / line drawing area or a halftone area, and the first and second compression / encoding means determines the character / line drawing for one parameter according to the determination result. The image processing apparatus according to claim 1, wherein the image processing apparatus is quantized and coded using one of the quantization matrices for each of the region and the halftone image region.
【請求項3】 画像データを圧縮符号化する画像処理方
法であって、 入力する画像データの像域情報を判定する判定工程と、 量子化ステップに関するパラメータと前記判定工程の判
定結果に基づいて画像データを圧縮符号化する第1の圧
縮符号化工程と、 量子化ステップに関するパラメータと前記判定工程の判
定結果に基づいて画像データを圧縮符号化すると共に、
前記第1の圧縮符号化工程で圧縮した符号データを復号
し、再圧縮する第2の圧縮符号化工程と、 前記第1の圧縮符号化工程によって生成される符号量を
監視すると共に、当該符号データ量が所定量になったか
否かを判断する符号量監視工程と、 該符号量監視工程によって前記所定量に達したと判断し
た場合、前記第1、第2の圧縮符号化工程における、量
子化ステップを大きくするようパラメータを設定するパ
ラメータ設定工程と、 該パラメータ設定工程によりパラメータを変更した場
合、前記第1の圧縮符号化工程で従前に生成された符号
データを前記第2の圧縮符号化工程によって再符号化さ
せ、当該再符号化を済ませた符号データを、前記第1の
圧縮符号化工程のパラメータ変更後の符号データとして
所定の記憶手段に記憶させると共に、 パラメータ変更後の前記第1の圧縮符号化工程で生成さ
れた符号化データを、後続符号データとして前記記憶手
段に保存させる制御工程とを備えることを特徴とする画
像処理方法。
3. An image processing method for compression-encoding image data, comprising a determination step of determining image area information of input image data, an image based on a parameter relating to a quantization step and a determination result of the determination step. A first compression encoding step of compressing and encoding data, and compression encoding of image data based on a parameter related to a quantization step and a determination result of the determination step,
A second compression encoding step of decoding and recompressing the code data compressed in the first compression encoding step, and monitoring the code amount generated in the first compression encoding step and A code amount monitoring step of determining whether or not the data amount has reached a predetermined amount, and if the code amount monitoring step determines that the predetermined amount has been reached, the quantum in the first and second compression encoding steps A parameter setting step of setting a parameter so as to increase the encoding step; and when the parameter is changed in the parameter setting step, the code data previously generated in the first compression encoding step is converted into the second compression encoding. The data is re-encoded by the process, and the re-encoded code data is stored in a predetermined storage unit as the code data after the parameter change of the first compression encoding process. Both image processing method characterized by comprising the control step of the encoded data generated by the first compression encoding step after parameter change, it is stored in the storage means as a subsequent code data.
【請求項4】 画像データを圧縮符号化する画像処理装
置用のコンピュータプログラムであって、 入力する画像データの像域情報を判定する判定手段と、 量子化ステップに関するパラメータと前記判定手段の判
定結果に基づいて画像データを圧縮符号化する第1の圧
縮符号化手段と、 量子化ステップに関するパラメータと前記判定手段の判
定結果に基づいて画像データを圧縮符号化すると共に、
前記第1の圧縮符号化手段で圧縮した符号データを復号
し、再圧縮する第2の圧縮符号化手段と、 前記第1の圧縮符号化手段によって生成される符号量を
監視すると共に、当該符号データ量が所定量になったか
否かを判断する符号量監視手段と、 該符号量監視手段によって前記所定量に達したと判断し
た場合、前記第1、第2の圧縮符号化手段における、量
子化ステップを大きくするようパラメータを設定する設
定手段と、 該パラメータ設定手段によりパラメータを変更した場
合、前記第1の圧縮符号化手段で従前に生成された符号
データを前記第2の圧縮符号化手段によって再符号化さ
せ、当該再符号化を済ませた符号データを、前記第1の
圧縮符号化手段のパラメータ変更後の符号データとして
所定の記憶手段に記憶すると共に、 パラメータ変更後の前記第1の圧縮符号化手段で生成さ
れた符号化データを、後続符号データとして前記記憶手
段に保存させる制御手段ととして機能するコンピュータ
プログラム。
4. A computer program for an image processing apparatus, which compresses and encodes image data, comprising: determining means for determining image area information of input image data; parameters relating to a quantization step and determination results of the determining means. A first compression encoding means for compressing and encoding image data based on, and compression encoding the image data based on the parameter relating to the quantization step and the determination result of the determination means,
Second compression coding means for decoding and recompressing coded data compressed by the first compression coding means, and monitoring the code amount generated by the first compression coding means, and Code amount monitoring means for determining whether or not the data amount has reached a predetermined amount, and when the code amount monitoring means determines that the predetermined amount has been reached, the quantum in the first and second compression encoding means Setting means for setting a parameter so as to increase the encoding step, and when the parameter is changed by the parameter setting means, the code data previously generated by the first compression encoding means is converted into the second compression encoding means. And re-encode the encoded data after the re-encoding by storing the encoded data in the predetermined storage means as the encoded data after the parameter change of the first compression encoding means. A computer program that functions as a control unit that causes the storage unit to store the encoded data generated by the first compression encoding unit after the meter has been changed, as subsequent encoded data.
【請求項5】 請求項4に記載のコンピュータプログラ
ムを格納することを特徴とするコンピュータ可読記憶媒
体。
5. A computer-readable storage medium storing the computer program according to claim 4.
【請求項6】 画像データを圧縮符号化する画像処理装
置であって、 圧縮符号化データを記憶する記憶手段と、 入力する画像データの像域情報を判定する判定手段と、 量子化ステップに関するパラメータと前記判定手段の判
定結果に基づいて画像データを圧縮符号化する第1の圧
縮符号化手段と、 量子化ステップに関するパラメータと前記判定手段の判
定結果に基づいて画像データを圧縮符号化すると共に、
前記第1の圧縮符号化手段と並行して動作し、前記第1
の圧縮符号化手段による圧縮率よりも高い圧縮率で圧縮
する第2の圧縮符号化手段と、 前記第1の圧縮符号化手段によって生成される符号量を
監視すると共に、当該符号データ量が所定量になったか
否かを判断する符号量監視手段と、 該符号量監視手段によって前記所定量に達したと判断し
た場合、前記第2の圧縮符号化手段の従前のパラメータ
で前記第1の圧縮符号化手段を設定し、前記第2の圧縮
符号化手段に新たたパラメータを設定するパラメータ設
定手段と、 該パラメータ設定手段によりパラメータを変更した場
合、前記第1の圧縮符号化手段で従前に生成された符号
データに代わって前記第2の圧縮符号化手段で済ませた
符号データを、前記第1の圧縮符号化手段のパラメータ
変更後の符号データとして前記記憶手段に記憶すると共
に、 パラメータ変更後の前記第1の圧縮符号化手段で生成さ
れた符号化データを、後続符号データとして前記記憶手
段に保存させる制御手段とを備えることを特徴とする画
像処理装置。
6. An image processing device for compression-encoding image data, comprising: storage means for storing compression-encoded data; determination means for determining image area information of input image data; and parameters relating to quantization steps. And first compression encoding means for compressing and encoding image data based on the determination result of the determining means, and compression encoding of the image data based on the parameter relating to the quantization step and the determination result of the determining means,
Operating in parallel with the first compression encoding means,
Second compression coding means for compressing at a compression rate higher than that of the compression coding means, and the code amount generated by the first compression coding means are monitored and A code amount monitoring means for determining whether or not a fixed amount has been reached, and when the code amount monitoring means determines that the predetermined amount has been reached, the first compression is performed using the conventional parameter of the second compression encoding means. Parameter setting means for setting the encoding means and setting new parameters in the second compression encoding means, and when the parameters are changed by the parameter setting means, the first compression encoding means previously generates the parameters. The coded data processed by the second compression coding means instead of the coded data stored in the storage means is stored in the storage means as coded data after the parameters of the first compression coding means are changed. Both the image processing apparatus, characterized in that it comprises a control means for the encoded data generated by the first compression encoding means after parameter change, is stored in the storage means as a subsequent code data.
【請求項7】 画像データを圧縮符号化する画像処理方
法であって、 入力する画像データの像域情報を判定する判定工程と、 量子化ステップに関するパラメータと前記判定工程の判
定結果に基づいて画像データを圧縮符号化する第1の圧
縮符号化工程と、 量子化ステップに関するパラメータと前記判定工程の判
定結果に基づいて画像データを圧縮符号化すると共に、
前記第1の圧縮符号化工程と並行して動作し、前記第1
の圧縮符号化工程による圧縮率よりも高い圧縮率で圧縮
する第2の圧縮符号化工程と、 前記第1の圧縮符号化工程によって生成される符号量を
監視すると共に、当該符号データ量が所定量になったか
否かを判断する符号量監視工程と、 該符号量監視工程によって前記所定量に達したと判断し
た場合、前記第2の圧縮符号化工程の従前のパラメータ
で前記第1の圧縮符号化工程を設定し、前記第2の圧縮
符号化工程に新たたパラメータを設定するパラメータ設
定工程と、 該パラメータ設定工程によりパラメータを変更した場
合、前記第1の圧縮符号化工程で従前に生成された符号
データに代わって前記第2の圧縮符号化工程で済ませた
符号データを、前記第1の圧縮符号化工程のパラメータ
変更後の符号データとして所定の記憶手段に記憶すると
共に、 パラメータ変更後の前記第1の圧縮符号化工程で生成さ
れた符号化データを、後続符号データとして前記記憶手
段に保存させる制御工程とを備えることを特徴とする画
像処理方法。
7. An image processing method for compression-encoding image data, comprising a determination step of determining image area information of input image data, an image based on a parameter relating to a quantization step and a determination result of the determination step. A first compression encoding step of compressing and encoding data, and compression encoding of image data based on a parameter related to a quantization step and a determination result of the determination step,
Operating in parallel with the first compression encoding step,
The second compression encoding step of compressing at a compression rate higher than the compression rate of the compression encoding step and the amount of code generated by the first compression encoding step are monitored, and the amount of code data is determined. A code amount monitoring step of determining whether or not the quantity has become constant, and when it is determined that the predetermined amount has been reached by the code amount monitoring step, the first compression is performed using the parameter used in the second compression encoding step. A parameter setting step of setting an encoding step and setting a new parameter in the second compression encoding step, and when the parameter is changed by the parameter setting step, the parameter is previously generated in the first compression encoding step. In place of the encoded data, the encoded data that has been subjected to the second compression encoding process is stored in the predetermined storage means as the encoded data after the parameter change of the first compression encoding process. Together, an image processing method characterized by comprising the control step of the encoded data generated by the first compression encoding step after parameter change, it is stored in the storage means as a subsequent code data.
【請求項8】 画像データを圧縮符号化する画像処理装
置用のコンピュータプログラムであって、 入力する画像データの像域情報を判定する判定手段と、 量子化ステップに関するパラメータと前記判定手段の判
定結果に基づいて画像データを圧縮符号化する第1の圧
縮符号化手段と、 量子化ステップに関するパラメータと前記判定手段の判
定結果に基づいて画像データを圧縮符号化すると共に、
前記第1の圧縮符号化手段と並行して動作し、前記第1
の圧縮符号化手段による圧縮率よりも高い圧縮率で圧縮
する第2の圧縮符号化手段と、 前記第1の圧縮符号化手段によって生成される符号量を
監視すると共に、当該符号データ量が所定量になったか
否かを判断する符号量監視手段と、 該符号量監視手段によって前記所定量に達したと判断し
た場合、前記第2の圧縮符号化手段の従前のパラメータ
で前記第1の圧縮符号化手段を設定し、前記第2の圧縮
符号化手段に新たたパラメータを設定するパラメータ設
定手段と、 該パラメータ設定手段によりパラメータを変更した場
合、前記第1の圧縮符号化手段で従前に生成された符号
データに代わって前記第2の圧縮符号化手段で済ませた
符号データを、前記第1の圧縮符号化手段のパラメータ
変更後の符号データとして所定の記憶手段に記憶すると
共に、 パラメータ変更後の前記第1の圧縮符号化手段で生成さ
れた符号化データを、後続符号データとして前記記憶手
段に保存させる制御手段として機能するコンピュータプ
ログラム。
8. A computer program for an image processing apparatus, which compresses and encodes image data, comprising: determination means for determining image area information of input image data; parameters relating to a quantization step and determination results of the determination means. A first compression encoding means for compressing and encoding image data based on, and compression encoding the image data based on the parameter relating to the quantization step and the determination result of the determination means,
Operating in parallel with the first compression encoding means,
Second compression coding means for compressing at a compression rate higher than that of the compression coding means, and the code amount generated by the first compression coding means are monitored and A code amount monitoring means for determining whether or not a fixed amount has been reached, and when the code amount monitoring means determines that the predetermined amount has been reached, the first compression is performed using the conventional parameter of the second compression encoding means. Parameter setting means for setting the encoding means and setting new parameters in the second compression encoding means, and when the parameters are changed by the parameter setting means, the first compression encoding means previously generates the parameters. The code data processed by the second compression coding means instead of the coded data stored in the second compression coding means is stored in a predetermined storage means as code data after the parameters of the first compression coding means are changed. With a computer program that functions encoded data generated by the first compression encoding means after parameter change, as control means for causing stored in the storage means as a subsequent code data.
【請求項9】 請求項8に記載のコンピュータプログラ
ムを格納することを特徴とするコンピュータ可読記憶媒
体。
9. A computer-readable storage medium storing the computer program according to claim 8.
JP2002003893A 2001-11-05 2002-01-10 Image processing apparatus and method, computer program, and storage medium Expired - Fee Related JP3902953B2 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2002003893A JP3902953B2 (en) 2002-01-10 2002-01-10 Image processing apparatus and method, computer program, and storage medium
US10/286,776 US7194140B2 (en) 2001-11-05 2002-11-04 Image processing apparatus and method which compresses image data of each region using a selected encoding method

Applications Claiming Priority (1)

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

Publications (2)

Publication Number Publication Date
JP2003209698A true JP2003209698A (en) 2003-07-25
JP3902953B2 JP3902953B2 (en) 2007-04-11

Family

ID=27643364

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002003893A Expired - Fee Related JP3902953B2 (en) 2001-11-05 2002-01-10 Image processing apparatus and method, computer program, and storage medium

Country Status (1)

Country Link
JP (1) JP3902953B2 (en)

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007208417A (en) * 2006-01-31 2007-08-16 Nikon Corp Digital still camera
US7454070B2 (en) 2004-09-08 2008-11-18 Canon Kabushiki Kaisha Image encoding apparatus and method, computer program, and computer-readable storage medium
US7466863B2 (en) 2004-08-02 2008-12-16 Canon Kabushiki Kaisha Image encoding apparatus and method, computer program, computer-readable storage medium, and image forming apparatus
US7561749B2 (en) 2004-11-15 2009-07-14 Canon Kabushiki Kaisha Apparatus, method, and computer-readable storage medium for lossy and lossless encoding of image data in accordance with an attribute of the image data
JP2009182424A (en) * 2008-01-29 2009-08-13 Seiko Epson Corp Image processing device and method for image processing
US7613345B2 (en) 2004-05-07 2009-11-03 Canon Kabushiki Kaisha Image coding apparatus and image decoding apparatus and their control methods, and computer program and computer-readable storage medium
US7627181B2 (en) 2004-09-08 2009-12-01 Canon Kabushiki Kaisha Image encoding apparatus and method, computer program, and computer-readable storage medium
US7680345B2 (en) 2004-08-25 2010-03-16 Canon Kabushiki Kaisha Image encoding apparatus and method, computer program, and computer-readable storage medium
JP2011259325A (en) * 2010-06-10 2011-12-22 Fujitsu Ltd Moving image encoding device
US8452083B2 (en) 2010-06-09 2013-05-28 Canon Kabushiki Kaisha Image processing apparatus, image processing method, and computer-readable medium
US8509532B2 (en) 2010-04-28 2013-08-13 Canon Kabushiki Kaisha Image processing apparatus, image processing method, and computer-readable medium

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7613345B2 (en) 2004-05-07 2009-11-03 Canon Kabushiki Kaisha Image coding apparatus and image decoding apparatus and their control methods, and computer program and computer-readable storage medium
US7466863B2 (en) 2004-08-02 2008-12-16 Canon Kabushiki Kaisha Image encoding apparatus and method, computer program, computer-readable storage medium, and image forming apparatus
US7680345B2 (en) 2004-08-25 2010-03-16 Canon Kabushiki Kaisha Image encoding apparatus and method, computer program, and computer-readable storage medium
US7454070B2 (en) 2004-09-08 2008-11-18 Canon Kabushiki Kaisha Image encoding apparatus and method, computer program, and computer-readable storage medium
US7627181B2 (en) 2004-09-08 2009-12-01 Canon Kabushiki Kaisha Image encoding apparatus and method, computer program, and computer-readable storage medium
US7561749B2 (en) 2004-11-15 2009-07-14 Canon Kabushiki Kaisha Apparatus, method, and computer-readable storage medium for lossy and lossless encoding of image data in accordance with an attribute of the image data
JP2007208417A (en) * 2006-01-31 2007-08-16 Nikon Corp Digital still camera
US7865023B2 (en) 2006-01-31 2011-01-04 Nikon Corporation Digital still camera
JP2009182424A (en) * 2008-01-29 2009-08-13 Seiko Epson Corp Image processing device and method for image processing
JP4697234B2 (en) * 2008-01-29 2011-06-08 セイコーエプソン株式会社 Image processing apparatus and image processing method
US8295616B2 (en) 2008-01-29 2012-10-23 Seiko Epson Corporation Image processing device and method for image processing
US8509532B2 (en) 2010-04-28 2013-08-13 Canon Kabushiki Kaisha Image processing apparatus, image processing method, and computer-readable medium
US8452083B2 (en) 2010-06-09 2013-05-28 Canon Kabushiki Kaisha Image processing apparatus, image processing method, and computer-readable medium
JP2011259325A (en) * 2010-06-10 2011-12-22 Fujitsu Ltd Moving image encoding device

Also Published As

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

Similar Documents

Publication Publication Date Title
EP1271926B1 (en) Image processing method, apparatus and computer program for compression-encoding
US7466863B2 (en) Image encoding apparatus and method, computer program, computer-readable storage medium, and image forming apparatus
US7680345B2 (en) Image encoding apparatus and method, computer program, and computer-readable storage medium
US7257264B2 (en) Image processing apparatus and method for compression-encoding image area information
JP3902968B2 (en) Image processing apparatus, control method therefor, computer program, and storage medium
US7454070B2 (en) Image encoding apparatus and method, computer program, and computer-readable storage medium
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
US7627181B2 (en) Image encoding apparatus and method, computer program, and computer-readable storage medium
US20030086127A1 (en) Image processing apparatus and method, computer program, and computer readable storage medium
JP3902953B2 (en) Image processing apparatus and method, computer program, and storage medium
JP4065522B2 (en) Image processing apparatus and control method thereof
JP3984813B2 (en) Image processing apparatus and method, computer program, and storage medium
JP4124982B2 (en) Image processing apparatus and method, computer program, and storage medium
JP3902954B2 (en) Image processing apparatus and method, computer program, and storage medium
JP2003046789A (en) Image coding apparatus and image decoding apparatus
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
JP2005086353A (en) Picture processor, control method therefor, computer program and computer readable storage medium

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