JP2003008903A - Image processor, its method, computer program and storage medium - Google Patents

Image processor, its method, computer program and storage medium

Info

Publication number
JP2003008903A
JP2003008903A JP2001184129A JP2001184129A JP2003008903A JP 2003008903 A JP2003008903 A JP 2003008903A JP 2001184129 A JP2001184129 A JP 2001184129A JP 2001184129 A JP2001184129 A JP 2001184129A JP 2003008903 A JP2003008903 A JP 2003008903A
Authority
JP
Japan
Prior art keywords
compression
data
parameter
encoding
code data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2001184129A
Other languages
Japanese (ja)
Other versions
JP4124982B2 (en
JP2003008903A5 (en
Inventor
Kenichi Ota
健一 太田
Shinichi Kato
進一 加藤
Naoki Ito
直樹 伊藤
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 JP2001184129A priority Critical patent/JP4124982B2/en
Priority to EP02254149.4A priority patent/EP1271926B1/en
Priority to US10/171,647 priority patent/US7106911B2/en
Priority to CN02122650.4A priority patent/CN1207897C/en
Publication of JP2003008903A publication Critical patent/JP2003008903A/en
Publication of JP2003008903A5 publication Critical patent/JP2003008903A5/ja
Application granted granted Critical
Publication of JP4124982B2 publication Critical patent/JP4124982B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To generate coded data contained in a size set effectively by once image input. SOLUTION: A coding section 102 applies compression processing to an image received from an input section 101 and 1st and 2nd memories 104, 106 store the compressed image. A 1st counter 107 counts its coded data quantity, when the produce coded data quantity reaches a prescribed size, a coding sequence control section 108 sets a greater quantization step to the coding section 102 and a re-coding section 109 to have a higher compression rate, cleats the 1st memory 104, allows the re-coding section 109 to re-code the coded data stored in the 2nd memory and allows the 1st memory 104 to store the result. Since the coding section 102 continues the coding according to the set quantization step, the 1st memory 104 stores the code data from the top of the image. Succeedingly, every time the data quantity stored in the 1st memory reaches a prescribed amount, the quantization step is enlarged and the processing above is repeated.

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 having a function of compressing and coding image data within a fixed code amount.

【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】本発明は上記従来例に鑑みて成されたもの
であり、1度の画像入力により、効果的に設定したサイ
ズに収まる符号化データを生成することを可能ならしめ
る画像処理装置及びその制御方法及びコンピュータプロ
グラム及び記憶媒体を提供しようとするものである。
The present invention has been made in view of the above-mentioned conventional example, and an image processing apparatus and an image processing apparatus which make it possible to generate coded data that effectively fits in a set size by one image input. A control method, a computer program, and a storage medium are provided.

【0010】[0010]

【課題を解決するための手段】かかる課題を解決するた
め、例えば本発明の画像処理装置は以下の構成を備え
る。すなわち、画像データを入力し、圧縮符号化する画
像処理装置であって、圧縮率を決定するパラメータが変
更可能な第1の圧縮手段と、圧縮率を決定するパラメー
タが変更可能であって、前記第1の圧縮手段で圧縮した
符号データを復号し、再圧縮する第2の圧縮手段と、前
記第1の圧縮手段によって、入力中の画像データを圧縮
させている最中の符号データ量を監視すると共に、当該
符号データ量が所定量になったか否かを判断する監視手
段と、該監視手段によって前記所定量に達したと判断し
た場合、前記第1、第2の圧縮手段に圧縮率を高くする
パラメータを設定する設定手段と、該設定手段によりパ
ラメータを変更した場合、前記第2の圧縮手段によって
前記第1の圧縮手段で従前に生成された符号データを再
符号化させ、当該再符号化後の符号データを、前記第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, in the image processing apparatus for inputting and compressing and encoding the image data, the first compression means in which the parameter for determining the compression rate is changeable, and the parameter for determining the compression rate are changeable, A second compression unit that decodes the code data compressed by the first compression unit and recompresses the code data, and monitors the amount of code data while the image data being input is being compressed by the first compression unit. At the same time, a monitoring unit that determines whether or not the code data amount has reached a predetermined amount, and if the monitoring unit determines that the predetermined amount has been reached, the compression ratio is set to the first and second compression units. Setting means for setting a parameter to be increased, and when the parameter is changed by the setting means, the second compression means re-encodes the code data previously generated by the first compression means, and the re-encoding is performed. The code data after reduction, the first
And a control means for storing the encoded data generated by the first compression means after the parameter change as the subsequent code data.

【0011】[0011]

【発明の実施の形態】以下、添付図面に従って本発明に
係る実施形態を詳細に説明する。
DETAILED DESCRIPTION OF THE INVENTION Embodiments of the present invention will be described in detail below with reference to the accompanying drawings.

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

【0013】実施形態における画像処理装置100は、
イメージスキャナから画像を入力する入力部101を備
えている。なお、入力部101は、ページ記述言語レン
ダリングなどから画像データを入力しても良いし、記憶
媒体に格納された画像ファイルを読込むことで実現して
も良く、場合によってはネットワークより受信するよう
にしても良い。
The image processing apparatus 100 according to the embodiment is
An input unit 101 for inputting an image from an image scanner is provided. The input unit 101 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 a network. You can

【0014】符号化部102は、入力された画像データ
の符号化を行なう。なお、本実施形態では、符号化方式
は公知のJPEG符号化方式を用い、8×8画素単位に
相当する画像データを直交変換し、後述する量子化ステ
ップを用いた量子化、ハフマン符号化処理を行なうもの
である。
The encoding unit 102 encodes the input image data. In the present embodiment, 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. Is to do.

【0015】第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 (same encoded data) output from the encoding unit 102, respectively.
The memory 104 and the second memory 106 are controlled to be stored. 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. The second memory 106 is a working memory that assists the compression coding process for forming the coded data on the first memory.

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

【0017】符号化シーケンス制御部108では、カウ
ンタ107のカウント値がある設定値に達したかどうか
を検出し、その設定値に達した(目標値を越えた)こと
を検出した時にメモリ104内の格納済みのデータを廃
棄するよう第1のメモリ制御部103に制御信号を出力
する。上記第1のメモリ制御部103は、この制御信号
に基づいて、メモリアドレスカウンタをクリアするか、
あるいは符号化データ管理テーブルをクリアすることに
より、前記格納データを廃棄する。また、このとき、符
号化シーケンス制御部108は、第1のカウンタ107
をゼロクリアする(入力部101からの入力は継続して
いる)と共に、符号化部102に対して今までより、高
い圧縮率で符号化を行なうよう制御する。すなわち、本
装置の符号化処理で発生する符号化データのデータ量が
最終的に例えば1/2になるように制御する。なお、こ
こでは、1/2としたが任意に設定できることは言うま
でもない。
The encoding sequence control unit 108 detects whether the count value of the counter 107 has reached a certain set value, and when it is detected that the set value has been reached (exceeds the target value), the memory 104 is stored. A control signal is output to the first memory control unit 103 to discard the stored data of 1. The first memory control unit 103 clears the memory address counter based on this control signal, or
Alternatively, the stored data is discarded by clearing the encoded data management table. In addition, at this time, the coding sequence control unit 108 determines that the first counter 107
Is cleared to zero (input from the input unit 101 is continued), and the encoding unit 102 is controlled to perform encoding 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.

【0018】そして、圧縮率変更後の符号化データも、
これまでと同様、第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.

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

【0020】再符号化部109は、入力された符号化デ
ータを復号化し、データ量を減らすための再量子化等を
行なった後に再び符号化処理を行ない、圧縮率が変更さ
れた符号化部102と同じ圧縮率のデータ量を第2のカ
ウンタ110に出力する。
The re-encoding unit 109 decodes the input encoded data, performs re-quantization for reducing the data amount, and then performs the encoding process again, and the encoding unit in which the compression rate is changed. The data amount having the same compression ratio as 102 is output to the second counter 110.

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

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

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

【0024】符号化部102は、再符号化処理の終了/
未終了に関わらず、符号化するべき入力部101からの
画像データが残っている限りは符号化処理を継続して行
なう。
The encoding unit 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.

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

【0026】上記、図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.

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

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

【0029】図4は、図3のフローチャートにおけるス
テップS303とS305に対応する符号化フェーズの
初期状態を表わす。また、図5はステップS307〜S
315に対応する符号化・再符号化フェーズの処理状態
を、図6はステップS317に対応する転送フェーズの
処理状態を、図7は転送フェーズ後の符号化フェーズの
処理状態を表わす。以下、各フェーズについて説明す
る。
FIG. 4 shows the initial state of the encoding phase corresponding to steps S303 and S305 in the flowchart of FIG. Further, FIG. 5 shows steps S307 to S307.
6 shows the processing state of the encoding / re-encoding phase corresponding to 315, 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. Each phase will be described below.

【0030】<<符号化フェーズ>>1ページ分の画像
データの符号化処理は、符号化パラメータの初期設定
(ステップS301)から始まる。ここでは符号化処理
する画像サイズ(スキャナ等の入力部101から読み取
る用紙サイズ)から一意的に定まる符号化データ量の上
限値や符号化部102(本実施形態では公知のJPEG
符号化方式を用いるものとする)に適用する量子化ステ
ップ(Q1)といったパラメータを設定する。
<< Encoding Phase >> The encoding process of image data for one page starts from the initial setting of encoding parameters (step S301). Here, the upper limit 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 (known JPEG in this embodiment).
A parameter such as a quantization step (Q1) applied to the encoding system is set).

【0031】そして、ステップS303にて、第1のカ
ウンタ107は、実際の符号化処理(画像の8×8画素
単位にJPEG圧縮)を行ない、出力される符号化デー
タのデータ量を累積カウントする。
Then, in step S303, the first counter 107 performs actual encoding processing (JPEG compression in units of 8 × 8 pixels of the image) and cumulatively counts the data amount of encoded data to be output. .

【0032】次にステップS305にて、該データ量の
カウント値が上記上限値をオーバーしたかどうかを検知
し、オーバーしていなければステップS303のJPE
G符号化処理を継続する。これが初期状態の符号化フェ
ーズである。
Next, in step S305, it is detected whether or not 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.

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

【0034】<<符号化・再符号化フェーズ>>符号化
部102の符号化処理が進行し、前記データ量のカウン
ト値が設定されている上限値をオーバーすると、ステッ
プS307にて、第1のメモリ104内の符号化データ
を廃棄すると共に、ステップS309にて、符号化部1
02の量子化ステップをQ2に変更する。
<< 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
Change the quantization step of 02 to Q2.

【0035】符号化データのデータ量のカウント値が設
定された上限値をオーバーするという事は、圧縮後のデ
ータ量が目標値以内に収まらないことを意味する。よっ
て同じ量子化ステップを用いて符号化処理を継続しても
意味が無いので、前よりもデータ量が少なくなるよう
に、Q1よりも量子化ステップ幅の大きい量子化ステッ
プQ2に変更するわけである。
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 Q2 having a larger quantization step width than Q1 is changed so that the data amount becomes smaller than before. is there.

【0036】量子化ステップを変更した後、ステップS
311では符号化部102の符号化処理を再開し、図5
に示すように符号化データを第2のメモリ106のみに
格納する。それと並行して、ステップS313の再符号
化処理を行なう。再符号化処理では、第2のメモリ10
6に格納済みの符号化データを読み出して、再符号化部
109にて再符号化処理を行ない、前記2つのメモリ1
04、106に格納する。そして、縦縞の符号を全て
再符号化するまで、該符号化処理と再符号化処理を継続
する。再符号化部109から出力される再符号化データ
は、量子化ステップ変更後に符号化部102から出力さ
れる符号化データと同じ量子化ステップで符号化して得
られる符号化データと全く同一の符号化データである。
After changing the quantization step, step S
In 311 the encoding process of the encoding unit 102 is restarted, and as shown in FIG.
The encoded data is stored only in the second memory 106 as shown in FIG. In parallel with this, the re-encoding process of step S313 is performed. In the re-encoding process, the second memory 10
6, the encoded data stored in 6 is read out, and the re-encoding unit 109 performs re-encoding processing.
04 and 106 are stored. Then, the encoding process and the re-encoding process are continued until all the codes of the vertical stripes are re-encoded. The re-encoded data output from the re-encoding unit 109 has exactly the same code as the encoded data obtained by encoding in the same quantization step as the encoded data output from the encoding unit 102 after changing the quantization step. Data.

【0037】具体的にこの再符号化処理では、符号化デ
ータを一旦ハフマン復号した後の各量子化値に対して、
これら値を2nで割った結果と同様の結果が出るビット
シフト処理を施した後、再度ハフマン符号化を行なうこ
とにより実現される。この方法は、ビットシフトのみで
量子化ステップを変更する点と逆直交変換や再直交変換
処理を行なわない点で、高速な再符号化処理が可能であ
る。ステップ315では、再符号化処理の終了検知が行
なわれる。
Specifically, in this re-encoding process, for each quantized value after the Huffman decoding of the encoded data is performed,
This is realized by performing Huffman coding again after performing a bit shift process that produces a result similar to the result of dividing these values by 2 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. In step 315, the end of the re-encoding process is detected.

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

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

【0040】<<転送フェーズ>>再符号化処理が終了
したら、ステップ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.

【0041】上記転送フェーズが終了したら、ステップ
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.

【0042】よって、符号化フェーズ、符号化・再符号
化フェーズと転送フェーズの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.

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

【0044】ステップ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.

【0045】符号化フェーズと転送フェーズで1ページ
分の画像データの入力が終了したことを検知した場合
(ステップS801、S805)、ステップS807へ
移り、当該ページの圧縮符号化処理を終了し、次に処理
すべき1ページ以上の画像データがあれば、次の1ペー
ジ分の画像データの圧縮符号化処理を開始し、無ければ
停止状態に入る。
When it is detected that one page of image data has been input in the encoding phase and the transfer phase (steps S801 and S805), the process moves to step S807 to end the compression encoding process of the page, and then 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.

【0046】一方、符号化・再符号化フェーズで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.

【0047】以上が実施形態における動作であり、図8
の動作説明でもある。
The above is the operation in the embodiment, and FIG.
Is also the operation description.

【0048】<メモリ格納方法の変形例>図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.

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

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

【0051】従って、この変形例の場合にはこれに対応
する為に符号化データをある単位で区切って、ファイル
或いはパケットとして管理する様にする。具体的には、
ファイル管理テーブル、或いは、パケット管理テーブル
等を別に作成して管理する。
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.

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

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

【0054】図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 above (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.

【0055】<第2の実施形態>以下、本発明において
特徴的な符号化処理を行なう為の、第2の基本構成を図
2を用いて説明する。
<Second Embodiment> A second basic configuration for performing the encoding process characteristic of the present invention will be described below with reference to FIG.

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

【0057】図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 there are two encoding units that perform encoding first 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 the present embodiment, 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. It is something to do.

【0058】なお、本第2の実施形態では第1の符号化
部202よりも、第2の符号化部205の方が適用する
圧縮率を高く設定する場合について説明する。具体的に
は、第1の符号化部202における量子化ステップをQ
1、第2の符号化部205の量子化ステップをQ2(=
2×Q1)とする。
In the second embodiment, the case where the compression rate applied by the second coding unit 205 is set higher than that of the first coding unit 202 will be described. Specifically, the quantization step in the first encoding unit 202 is Q
1, the quantization step of the second encoding unit 205 is Q2 (=
2 x Q1).

【0059】符号化部202から出力される符号化デー
タは、第1のメモリ制御部203を経由して、第1のメ
モリ204に格納される。このとき、第1のカウンタ2
08は、符号化部202から出力される符号化データの
データ量をカウントし、これを保持すると共に、符号化
シーケンス制御部209にも出力する。
The encoded data output from the encoding unit 202 is stored in the first memory 204 via the first memory control unit 203. At this time, the first counter 2
08 counts the data amount of the encoded data output from the encoding unit 202, holds it, and outputs it to the encoding sequence control unit 209.

【0060】一方、符号化部205で符号化された符号
化データは、第2のメモリ制御部206を経由して、第
2のメモリ207に格納される。このとき、第2のカウ
ンタ210は、符号化部205から出力される符号化デ
ータのデータ量をカウントし、これを保持する。更に、
後述する第2のメモリ207に格納している符号化デー
タを第1のメモリ204に転送する時には、それと同時
に上記カウント値を、第1のカウンタ208に転送す
る。
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. Furthermore,
When the coded data stored in the second memory 207, which will be described later, is transferred to the first memory 204, at the same time, the count value is transferred to the first counter 208.

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

【0062】そして、符号化シーケンス制御部209
は、第2のメモリ207に格納している符号化データを
読み出して第1のメモリ204に転送し、第1のメモリ
204に格納するよう、メモリ制御部206とメモリ制
御部203に制御信号を出力する。この結果、第2のカ
ウンタ210のカウント値が第1のカウンタ208に転
送され、その値が第1のカウンタのカウント値としてロ
ード(上書き)される。
Then, the encoding sequence control unit 209
Sends a control signal to the memory control unit 206 and the memory control unit 203 so that the encoded data stored in the second memory 207 is read out, transferred to the first memory 204, and stored in the first memory 204. Output. As a result, the count value of the second counter 210 is transferred to the first counter 208, and the value is loaded (overwritten) as the count value of the first counter.

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

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

【0065】例えば、第1の符号化部202、及び、第
2の符号化部205における量子化ステップSを2倍に
切り替えす。この結果、第1の符号化部202は、その
直前までの第2の符号化部205における量子化ステッ
プQ2(=2×Q1)を継承することになり、第2の符
号化部205は更に大きな量子化ステップQ2×2を用
いて、次のオーバーフローに備えた更に高い圧縮率の符
号化処理を行うことになる。
For example, the quantization step S in the first coding section 202 and the second coding section 205 is switched to double. As a result, the first coding unit 202 inherits the quantization step Q2 (= 2 × Q1) in the second coding unit 205 up to immediately before, and the second coding unit 205 further A large quantization step Q2 × 2 is used to perform a coding process with a higher compression rate in preparation for the next overflow.

【0066】ここでは、量子化ステップの倍率比を2倍
としたがこれに限らず、任意に設定できることは示すま
でもない。切り替えられた各符号化部202、205か
ら出力された符号化データは、それぞれ、対応するメモ
リ制御部203、206を経由して、対応するメモリ2
04、207に格納される。
Here, the magnification ratio of the quantization step is set to 2 times, but it is not limited to this, and it goes without saying that it can be set arbitrarily. The encoded data output from each of the switched encoding units 202 and 205 is passed through the corresponding memory control units 203 and 206, respectively, and the corresponding memory 2
04 and 207 are stored.

【0067】そして、符号化シーケンス制御209は、
メモリ制御部206に対し、既に第2のメモリ内に格納
している符号化データを読み出して、再符号化部211
にデータを送るよう制御信号を出す。再符号化部211
は、図1の再符号化部109と同様にして符号化データ
の再符号化処理を行なう。
Then, the coding sequence control 209
The encoded data already stored in the second memory is read out to the memory control unit 206, and the re-encoding unit 211 is read.
Send a control signal to send data to. Re-encoding unit 211
Performs re-encoding processing of encoded data in the same manner as re-encoding section 109 in FIG.

【0068】第3のカウンタ212は、再符号化部21
1が出力したデータ量をカウントするもので、再符号化
処理を開始する直前にゼロにリセットされ、再符号化処
理中の出力データ量をカウントする。このカウンタ21
2は、再符号化処理が終了した時点で、そこで得られた
カウント値を第2のカウンタ210に転送する。
The third counter 212 has a re-encoding unit 21.
1 counts the amount of data output, is reset to zero immediately before starting the re-encoding process, and counts the amount of output data during the re-encoding process. This counter 21
2 transfers the count value obtained there to the second counter 210 when the re-encoding process is completed.

【0069】第2のカウンタ210は、上記転送されて
きたデータ量カウント値を、第2のカウンタ210内に
保持しているカウンタ値に加算することにより、再符号
化処理中にメモリ207に格納した、符号化データと再
符号化データの合計のデータ量を算出する。即ち、メモ
リ207に格納しているデータ量とカウンタ210のカ
ウント値とが一致する。
The second counter 210 stores the transferred data amount count value in the memory 207 during the re-encoding process by adding the transferred data amount count value to the counter value held in the second counter 210. Then, the total data amount of the encoded data and the re-encoded data is calculated. That is, the amount of data stored in the memory 207 and the count value of the counter 210 match.

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

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

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

【0073】上述した図8のフローと本実施形態のフロ
ーとの一番大きな違いは、ステップS317の転送処理
が、ステップS307とステップS309の間に移動し
ていることである。要するに、符号化・再符号化フェー
ズと転送フェーズが入れ替わったと見なせば良い(ステ
ップS307の符号化データの廃棄処理は例外であ
る)。
The biggest difference between the above-described flow of FIG. 8 and the flow of the present embodiment is that the transfer processing 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).

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

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

【0076】第1のメモリ204へ格納する符号化デー
タは圧縮率が段階的に高くなるようにするため、最初に
格納する符号化データは圧縮率が一番低い量子化ステッ
プQ1で符号化したデータを格納し、第2のメモリへ格
納する符号化データは量子化ステップQ2で符号化した
データを格納する。
In order to increase the compression rate of the encoded data stored in the first memory 204 step by step, the encoded data stored first is encoded in the quantization step Q1 having the lowest compression rate. The encoded data that stores the data and that is stored in the second memory is the data that is encoded in the quantization step Q2.

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

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

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

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

【0081】なお、本第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 embodiment may be provided.

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

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

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

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

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

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

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

【0089】<適用例>上記第1、第2の実施形態で
は、イメージスキャナから画像を読み取る装置を例に
し、その装置の機能動作について説明した。そして、そ
の機能のほとんど(符号化処理も含む)は、上述した様
にコンピュータプログラムによって実現できる。
<Application Example> In the first and second embodiments described above, the functional operation of the apparatus has been described by taking the apparatus for reading an image from the image scanner as an example. Most of the functions (including the encoding process) can be realized by the computer program as described above.

【0090】従って、本発明はパーソナルコンピュータ
等の汎用情報処理装置上で動作するアプリケーションプ
ログラムに適用しても構わない。アプリケーションプロ
グラムに適用する場合には、圧縮元となる画像ファイル
をユーザに指定させると共に、目標サイズをユーザに選
択させる等のGUIを設ければ良いであろう。このとき
の目標値は、ユーザーが任意に設定できるものとする
が、数値での設定はわかりずらいので、原稿サイズと画
質(高中低等)を加味した直感的に分かりやすいメニュ
ーから選択させることで、決定するようにすれば良いで
あろう。
Therefore, the present invention may be applied to an application program operating on a general-purpose information processing device such as a personal computer. When applied to an application program, a GUI for allowing the user to specify an image file as a compression source and allowing the user to select a target size may be provided. The target value at this time can be arbitrarily set by the user, but it is difficult to understand the numerical setting, so select from an intuitive and easy-to-understand menu that considers the document size and image quality (high, medium, low, etc.). Then, it will be better to make a decision.

【0091】また、第1、第2の実施形態では、符号化
部の符号化パラメータとして量子化ステップを例にして
説明したが、圧縮率の異なるデータが混在した際に、そ
れらの間での画質が違和感が発生しないようにする限り
は、他のパラメータを用いても良い。但し、例えば、図
1の構成においては、再符号化部109からの再度符号
化するデータが、パラメータ変更後の符号化部102か
らの符号化データと実質的に同じにするには、上記実施
形態に示す如く、量子化ステップを増加する手法が好ま
しい。
In the first and second embodiments, the quantization step has been described as an example of the coding parameter of the coding section. However, when data having different compression ratios are mixed, the quantization step is performed between them. Other parameters may be used as long as the image quality does not cause discomfort. However, for example, in the configuration of FIG. 1, in order to make the data to be re-encoded from the re-encoding unit 109 substantially the same as the encoded data from the encoding unit 102 after the parameter change, As shown in the form, a method of increasing the quantization step is preferable.

【0092】また、上記の通り、本発明は、汎用装置上
で動作するアプリケーションプログラムによって実現で
きるものであるので、本発明はコンピュータプログラム
をも含むものである。また、コンピュータプログラム
は、通常、フロッピー(登録商標)ディスクや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.

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

【0094】以上説明したように本実施形態によれば、
画像データを周波数変換した後、量子化し、可変長符号
化を行なう符号化手段と、前記量子化にて利用される量
子化ステップを切り替え制御する量子化ステップ制御手
段と、前記符号化手段にて得られる符号化データを、該
符号化データを得るのに利用された量子化ステップとは
別の量子化ステップで符号化することにより得られるべ
き別の符号化データへと変換する、前記符号化手段とは
別に設置された符号化データ変換手段と、前記符号化手
段或いは、符号化データ変換手段にて得られた符号化デ
ータを少なくとも1ページ分格納する格納手段と、前記
格納手段に格納された符号化データの量を監視する監視
手段とを備える様にし、前記符号化データの量に応じ
て、前記量子化ステップ制御手段における量子化ステッ
プの変更と、前記符号化データ変換手段の双方を連携さ
せて制御することにより、1ページ分の画像データを所
望の符号化データ量になる様にすることを1度の符号化
処理により、少ない容量のメモリに確実に符号化データ
を格納できる。
As described above, according to this embodiment,
After the image data is frequency-converted, it is quantized to perform variable-length coding, a quantization step control means for switching and controlling the quantization step used in the quantization, and the encoding means. Encoding the resulting encoded data to another encoded data to be obtained by encoding in a quantization step different from the quantization step used to obtain the encoded data Coded data conversion means installed separately from the means, storage means for storing the coded data obtained by the coding means or the coded data conversion means for at least one page, and stored in the storage means. Monitoring means for monitoring the amount of encoded data, and changing the quantization step in the quantization step control means according to the amount of encoded data, By controlling both of the encoded data converting means in cooperation with each other, it is possible to ensure that the image data for one page has a desired encoded data amount by one encoding process in a memory with a small capacity. Can store encoded data.

【0095】[0095]

【発明の効果】以上説明したように本発明によれば、1
度の画像入力により、効果的に設定したサイズに収まる
符号化データを生成することが可能になる。
As described above, according to the present invention, 1
By inputting images once, it becomes possible to effectively generate encoded data that fits in the set size.

【図面の簡単な説明】[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の実施形態における処理を簡略化して示し
たフローチャートである。
FIG. 3 is a flowchart showing a simplified process in the first embodiment.

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

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

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

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

【図8】第1の実施形態における処理の詳細を示すフロ
ーチャートである。
FIG. 8 is a flowchart showing details of processing in the first embodiment.

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

【図10】第1の実施形態の変形例における転送フェー
ズにおけるデータフローとメモリ内容を表わす図であ
る。
FIG. 10 is a diagram showing a data flow and a memory content in a transfer phase according to a modification of the first embodiment.

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

【図12】第2の実施形態における処理手順を示すフロ
ーチャートである。
FIG. 12 is a flowchart showing a processing procedure according to the second embodiment.

【図13】第2の実施形態における初期状態の符号化フ
ェーズにおけるデータフローとメモリ内容を表わす図で
ある。
FIG. 13 is a diagram illustrating a data flow and a memory content in a coding phase in an initial state according to the second embodiment.

【図14】第2の実施形態における転送フェーズにおけ
るデータフローとメモリ内容を表わす図である。
FIG. 14 is a diagram showing a data flow and a memory content in a transfer phase in the second embodiment.

【図15】第2の実施形態における符号化・再符号化フ
ェーズにおけるデータフローとメモリ内容を表わす図で
ある。
FIG. 15 is a diagram showing a data flow and a memory content in an encoding / re-encoding phase according to the second embodiment.

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

───────────────────────────────────────────────────── フロントページの続き (72)発明者 伊藤 直樹 東京都大田区下丸子3丁目30番2号 キヤ ノン株式会社内 (72)発明者 中山 忠義 東京都大田区下丸子3丁目30番2号 キヤ ノン株式会社内 (72)発明者 大澤 秀史 東京都大田区下丸子3丁目30番2号 キヤ ノン株式会社内 Fターム(参考) 5C059 KK08 KK11 KK35 MA00 MA23 MC11 MC38 ME02 PP01 SS20 TA46 TB04 TC18 TD12 UA02 UA35 UA36 UA37 5C078 BA57 DB07    ─────────────────────────────────────────────────── ─── Continued front page    (72) Inventor Naoki Ito             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 KK35 MA00 MA23                       MC11 MC38 ME02 PP01 SS20                       TA46 TB04 TC18 TD12 UA02                       UA35 UA36 UA37                 5C078 BA57 DB07

Claims (10)

【特許請求の範囲】[Claims] 【請求項1】 画像データを入力し、圧縮符号化する画
像処理装置であって、 圧縮率を決定するパラメータが変更可能な第1の圧縮手
段と、 圧縮率を決定するパラメータが変更可能であって、前記
第1の圧縮手段で圧縮した符号データを復号し、再圧縮
する第2の圧縮手段と、 前記第1の圧縮手段によって、入力中の画像データを圧
縮させている最中の符号データ量を監視すると共に、当
該符号データ量が所定量になったか否かを判断する監視
手段と、 該監視手段によって前記所定量に達したと判断した場
合、前記第1、第2の圧縮手段に圧縮率を高くするパラ
メータを設定する設定手段と、 該設定手段によりパラメータを変更した場合、前記第2
の圧縮手段によって前記第1の圧縮手段で従前に生成さ
れた符号データを再符号化させ、 当該再符号化後の符号データを、前記第1の圧縮手段の
パラメータ変更後の符号データとして保存させると共
に、パラメータ変更後の前記第1の圧縮手段で生成され
た符号化データを、後続符号データとして保存させる制
御手段とを備えることを特徴とする画像処理装置。
1. An image processing apparatus for inputting and compressing and encoding image data, comprising: a first compression unit in which a parameter for determining a compression rate is changeable; and a parameter for determining a compression rate is changeable. Second compression means for decoding and recompressing the code data compressed by the first compression means, and code data in the middle of compressing the image data being input by the first compression means. Monitoring means for monitoring the amount and determining whether or not the code data amount has reached a predetermined amount, and if the monitoring means determines that the predetermined amount has been reached, the first and second compression means Setting means for setting a parameter for increasing the compression rate, and when the parameter is changed by the setting means, the second
The code data previously generated by the first compression means is re-encoded by the compression means and the code data after the re-encoding is stored as the code data after the parameter change of the first compression means. In addition, the image processing apparatus is provided with a control unit that stores the encoded data generated by the first compression unit after the parameter change as subsequent encoded data.
【請求項2】 前記パラメータは、量子化処理における
量子化ステップであることを特徴とする請求項第1項に
記載の画像処理装置。
2. The image processing apparatus according to claim 1, wherein the parameter is a quantization step in quantization processing.
【請求項3】 前記第1の圧縮手段で生成した符号デー
タは、第1、第2のメモリを同時に書き込まれ、 前記制御手段は、前記監視手段によって所定データ量に
達したと判断した場合、前記第1のメモリをクリアする
と共に、前記第2のメモリに格納されている符号データ
を前記第2の圧縮手段で再符号化させ、当該符号データ
を前記第1のメモリに格納することを特徴とする請求項
第1項に記載の画像処理装置。
3. The code data generated by the first compression means is written in the first and second memories at the same time, and when the control means determines that the predetermined data amount has been reached by the monitoring means, The first memory is cleared, the code data stored in the second memory is re-encoded by the second compression unit, and the code data is stored in the first memory. The image processing apparatus according to claim 1.
【請求項4】 画像データを入力し、圧縮符号化する画
像処理装置の制御方法であって、 圧縮率を決定するパラメータが変更可能な第1の圧縮工
程と、 圧縮率を決定するパラメータが変更可能であって、前記
第1の圧縮手段で圧縮した符号データを復号し、再圧縮
する第2の圧縮工程と、 前記第1の圧縮工程によって、入力中の画像データを圧
縮させている最中の符号データ量を監視すると共に、当
該符号データ量が所定量になったか否かを判断する監視
工程と、 該監視工程によって前記所定量に達したと判断した場
合、前記第1、第2の圧縮工程に圧縮率を高くするパラ
メータを設定する設定工程と、 該設定工程によりパラメータを変更した場合、前記第2
の圧縮工程によって前記第1の圧縮手段で従前に生成さ
れた符号データを再符号化させ、 当該再符号化後の符号データを、前記第1の圧縮工程の
パラメータ変更後の符号データとして保存させると共
に、パラメータ変更後の前記第1の圧縮工程で生成され
た符号化データを、後続符号データとして保存させる制
御工程とを備えることを特徴とする画像処理装置の制御
方法。
4. A method of controlling an image processing apparatus for inputting image data and performing compression encoding, comprising: a first compression step in which a parameter for determining a compression rate is changeable; and a parameter for determining a compression rate is changed. A second compression step of decoding the coded data compressed by the first compression means and re-compressing it, and compressing the image data being input by the first compression step. Monitoring the code data amount and determining whether or not the code data amount has reached a predetermined amount; and when the monitoring process determines that the predetermined amount has been reached, the first and second A setting step of setting a parameter for increasing the compression rate in the compression step, and the second step when the parameter is changed in the setting step
Re-encode the code data previously generated by the first compression means by the first compression step, and store the re-coded code data as code data after the parameter change of the first compression step. And a control step of storing the coded data generated in the first compression step after the parameter change as subsequent coded data.
【請求項5】 画像データを入力し、圧縮符号化する画
像処理装置として機能するコンピュータプログラムであ
って、 圧縮率を決定するパラメータが変更可能な第1の圧縮工
程のプログラムコードと、 圧縮率を決定するパラメータが変更可能であって、前記
第1の圧縮手段で圧縮した符号データを復号し、再圧縮
する第2の圧縮工程のプログラムコードと、 前記第1の圧縮工程によって、入力中の画像データを圧
縮させている最中の符号データ量を監視すると共に、当
該符号データ量が所定量になったか否かを判断する監視
工程のプログラムコードと、 該監視工程によって前記所定量に達したと判断した場
合、前記第1、第2の圧縮工程に圧縮率を高くするパラ
メータを設定する設定工程のプログラムコードと、 該設定工程によりパラメータを変更した場合、前記第2
の圧縮工程によって前記第1の圧縮手段で従前に生成さ
れた符号データを再符号化させ、 当該再符号化後の符号データを、前記第1の圧縮工程の
パラメータ変更後の符号データとして保存させると共
に、パラメータ変更後の前記第1の圧縮工程で生成され
た符号化データを、後続符号データとして保存させる制
御工程のプログラムコードとを備えることを特徴とする
コンピュータプログラム。
5. A computer program which functions as an image processing device for inputting and compressing and encoding image data, comprising: a program code of a first compression step in which a parameter for determining a compression rate is changeable; The program code of the second compression process, in which the parameter to be determined is changeable, the code data compressed by the first compression unit is decoded and recompressed, and the image being input by the first compression process. A program code of a monitoring process for monitoring the code data amount during data compression and determining whether the code data amount has reached a predetermined amount, and that the predetermined amount has been reached by the monitoring process. If judged, the program code of the setting step for setting the parameter for increasing the compression rate in the first and second compression steps, and the parameter by the setting step. If you change the said second
Re-encode the code data previously generated by the first compression means by the first compression step, and store the re-coded code data as code data after the parameter change of the first compression step. And a program code of a control step for storing the encoded data generated in the first compression step after parameter change as subsequent encoded data.
【請求項6】 請求項第5項に記載のコンピュータプロ
グラムを格納することを特徴とする記憶媒体。
6. A storage medium on which the computer program according to claim 5 is stored.
【請求項7】 画像データを入力し、圧縮符号化する画
像処理装置であって、 圧縮率を決定するパラメータが変更可能な第1、第2の
圧縮手段と、 圧縮率を決定するパラメータが変更可能であって、前記
第2の圧縮手段で圧縮した符号データを復号し、再圧縮
する第3の圧縮手段と、 前記第2の圧縮手段の圧縮率を、前記第1の圧縮手段の
圧縮率より高くするため、それぞれに異なるパラメータ
を設定する設定手段と、 入力中の画像データを前記第1、第2の圧縮手段で圧縮
させている最中、前記第1の圧縮手段で生成された符号
データ量を監視すると共に、当該符号データ量が所定量
になったか否かを判断する監視手段と、 該監視手段によって前記所定量に達したと判断した場
合、その時点での前記第2の圧縮手段に設定していたパ
ラメータを前記第1の圧縮手段のパラメータとして更新
すると共に、前記第2の圧縮手段の圧縮率を更に高くす
るため、当該第2の圧縮手段のパラメータを更新する更
新手段と、 該更新手段によりパラメータを更新した場合、前記第2
の圧縮手段で従前に生成された符号データを前記第3の
圧縮手段によって再符号化させると共に、前記第2の圧
縮手段によって生成されていた符号データを、パラメー
タ更新後の前記第1の圧縮手段で生成された符号データ
として保存させ、前記第1の圧縮手段で新たに生成され
た符号データを、後続する符号データとして保存させる
制御手段とを備えることを特徴とする画像処理装置。
7. An image processing device for inputting and compressing and encoding image data, comprising first and second compression means capable of changing a parameter for determining a compression rate, and changing parameters for determining a compression rate. A third compression unit that is capable of decoding the coded data compressed by the second compression unit and re-compresses the compression ratio of the second compression unit, and the compression ratio of the first compression unit. In order to make it higher, the setting means for setting different parameters respectively, and the code generated by the first compression means while the image data being input is being compressed by the first and second compression means. Monitoring means for monitoring the data amount and determining whether or not the code data amount has reached a predetermined amount, and if the monitoring means determines that the predetermined amount has been reached, the second compression at that point The parameter that was set as a means Parameter as the parameter of the first compressing means, and updating means for updating the parameter of the second compressing means in order to further increase the compression rate of the second compressing means, and the parameter by the updating means. If you update the second
The code data previously generated by the compression means is re-encoded by the third compression means, and the code data generated by the second compression means is re-encoded by the first compression means after parameter updating. And a control unit that stores the code data newly generated by the first compression unit as the subsequent code data.
【請求項8】 画像データを入力し、圧縮符号化する画
像処理装置の制御方法であって、 圧縮率を決定するパラメータが変更可能な第1、第2の
圧縮工程と、 圧縮率を決定するパラメータが変更可能であって、前記
第2の圧縮手段で圧縮した符号データを復号し、再圧縮
する第3の圧縮工程と、 前記第2の圧縮工程の圧縮率を、前記第1の圧縮手段の
圧縮率より高くするため、それぞれに異なるパラメータ
を設定する設定工程と、 入力中の画像データを前記第1、第2の圧縮工程で圧縮
させている最中、前記第1の圧縮工程で生成された符号
データ量を監視すると共に、当該符号データ量が所定量
になったか否かを判断する監視工程と、 該監視工程によって前記所定量に達したと判断した場
合、その時点での前記第2の圧縮工程に設定していたパ
ラメータを前記第1の圧縮手段のパラメータとして更新
すると共に、前記第2の圧縮工程の圧縮率を更に高くす
るため、当該第2の圧縮工程のパラメータを更新する更
新工程と、 該更新工程によりパラメータを更新した場合、前記第2
の圧縮工程で従前に生成された符号データを前記第3の
圧縮工程によって再符号化させると共に、前記第2の圧
縮工程によって生成されていた符号データを、パラメー
タ更新後の前記第1の圧縮工程で生成された符号データ
として保存させ、前記第1の圧縮工程で新たに生成され
た符号データを、後続する符号データとして保存させる
制御工程とを備えることを特徴とする画像処理装置の制
御方法。
8. A method of controlling an image processing apparatus for inputting image data and performing compression encoding, comprising first and second compression steps in which a parameter for determining a compression rate is changeable, and a compression rate is determined. A third compression step in which the parameter is changeable, the coded data compressed by the second compression means is decoded and recompressed, and the compression rate of the second compression step is set to the first compression means. In the setting step of setting different parameters for each of them in order to make it higher than the compression rate, and while the image data being input is being compressed in the first and second compression steps, it is generated in the first compression step. A monitoring step of monitoring the code data amount that has been generated and determining whether or not the code data amount has reached a predetermined amount, and if the monitoring step determines that the predetermined amount has been reached, the first step at that point Set to 2 compression process Updating the parameter as the parameter of the first compression means and updating the parameter of the second compression step in order to further increase the compression rate of the second compression step; If the parameters are updated, the second
Of the compression data previously generated in the compression step of FIG. 3 is re-encoded in the third compression step, and the code data generated in the second compression step is converted into the first compression step after parameter updating. And a control step of storing the code data newly generated in the first compression step as subsequent code data.
【請求項9】 画像データを入力し、圧縮符号化する画
像処理装置として機能するコンピュータプログラムであ
って、 圧縮率を決定するパラメータが変更可能な第1、第2の
圧縮工程のプログラムコードと、 前記第2の圧縮工程の圧縮率を、前記第1の圧縮手段の
圧縮率より高くするため、それぞれに異なるパラメータ
を設定する設定工程のプログラムコードと、 入力中の画像データを前記第1、第2の圧縮工程で圧縮
させている最中、前記第1の圧縮工程で生成された符号
データ量を監視すると共に、当該符号データ量が所定量
になったか否かを判断する監視工程のプログラムコード
と、 該監視工程によって前記所定量に達したと判断した場
合、その時点での前記第2の圧縮工程に設定していたパ
ラメータを前記第1の圧縮手段のパラメータとして更新
すると共に、前記第2の圧縮工程の圧縮率を更に高くす
るため、当該第2の圧縮工程のパラメータを更新する更
新工程のプログラムコードと、 該更新工程によりパラメータを更新した場合、前記第2
の圧縮工程で従前に生成された符号データを前記第3の
圧縮工程によって再符号化させると共に、前記第2の圧
縮工程によって生成されていた符号データを、パラメー
タ更新後の前記第1の圧縮工程で生成された符号データ
として保存させ、前記第1の圧縮工程で新たに生成され
た符号データを、後続する符号データとして保存させる
制御工程のプログラムコードとを備えることを特徴とす
るコンピュータプログラム。
9. A computer program which functions as an image processing apparatus for inputting and compressing and encoding image data, wherein program parameters of first and second compression steps in which a parameter for determining a compression rate is changeable, In order to make the compression rate of the second compression step higher than the compression rate of the first compression means, the program code of the setting step for setting different parameters and the image data being input are set to During the compression in the second compression step, the program code of the monitoring step for monitoring the code data amount generated in the first compression step and determining whether or not the code data amount reaches a predetermined amount When it is determined by the monitoring step that the predetermined amount has been reached, the parameter set in the second compression step at that time is set to the parameter of the first compression means. Program code of the updating step for updating the parameter of the second compressing step in order to further increase the compression rate of the second compressing step and the parameter is updated by the updating step. Second
Of the compression data previously generated in the compression step of FIG. 3 is re-encoded in the third compression step, and the code data generated in the second compression step is converted into the first compression step after parameter updating. And a program code of a control step of storing the code data newly generated in the first compression step as the subsequent code data.
【請求項10】 請求項第9項に記載のコンピュータを
格納することを特徴とする記憶媒体。
10. A storage medium storing the computer according to claim 9.
JP2001184129A 2001-06-18 2001-06-18 Image processing apparatus and method, computer program, and storage medium Expired - Fee Related JP4124982B2 (en)

Priority Applications (4)

Application Number Priority Date Filing Date Title
JP2001184129A JP4124982B2 (en) 2001-06-18 2001-06-18 Image processing apparatus and method, computer program, and storage medium
EP02254149.4A EP1271926B1 (en) 2001-06-18 2002-06-13 Image processing method, apparatus and computer program for compression-encoding
US10/171,647 US7106911B2 (en) 2001-06-18 2002-06-17 Image processing apparatus and control method for inputting image data and encoding the data
CN02122650.4A CN1207897C (en) 2001-06-18 2002-06-18 Image processing method and device, computer program and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2001184129A JP4124982B2 (en) 2001-06-18 2001-06-18 Image processing apparatus and method, computer program, and storage medium

Publications (3)

Publication Number Publication Date
JP2003008903A true JP2003008903A (en) 2003-01-10
JP2003008903A5 JP2003008903A5 (en) 2006-10-12
JP4124982B2 JP4124982B2 (en) 2008-07-23

Family

ID=19023953

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2001184129A Expired - Fee Related JP4124982B2 (en) 2001-06-18 2001-06-18 Image processing apparatus and method, computer program, and storage medium

Country Status (1)

Country Link
JP (1) JP4124982B2 (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006253941A (en) * 2005-03-09 2006-09-21 Fuji Photo Film Co Ltd Image processing method and device
JP2006340045A (en) * 2005-06-02 2006-12-14 Olympus Imaging Corp Image processor and image processing method
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
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
US7925098B2 (en) 2006-03-02 2011-04-12 Canon Kabushiki Kaisha Image encoding apparatus and method with both lossy and lossless means

Cited By (9)

* 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
JP2006253941A (en) * 2005-03-09 2006-09-21 Fuji Photo Film Co Ltd Image processing method and device
JP2006340045A (en) * 2005-06-02 2006-12-14 Olympus Imaging Corp Image processor and image processing method
US7925098B2 (en) 2006-03-02 2011-04-12 Canon Kabushiki Kaisha Image encoding apparatus and method with both lossy and lossless means

Also Published As

Publication number Publication date
JP4124982B2 (en) 2008-07-23

Similar Documents

Publication Publication Date Title
EP1271926B1 (en) Image processing method, apparatus and computer program for compression-encoding
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
US7680345B2 (en) Image encoding apparatus and method, computer program, and computer-readable storage medium
US7627181B2 (en) Image encoding apparatus and method, computer program, and computer-readable storage medium
JP4697967B2 (en) Image coding apparatus and control method thereof
JP2003244446A (en) Image processor and image processing method
JP4124982B2 (en) Image processing apparatus and method, computer program, and storage medium
US7721971B2 (en) Image processing system, image processing method and computer readable information recording 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
JP4693309B2 (en) Image processing apparatus, control method therefor, computer program, and storage medium
WO2000036516A9 (en) Web-based video-editing method and system
JP3902954B2 (en) Image processing apparatus and method, computer program, and storage medium
JP3902983B2 (en) Image processing apparatus, control method therefor, computer program, and storage medium
JP4035475B2 (en) Image processing apparatus, control method therefor, computer program, and storage medium
US6848013B2 (en) Decoding method for reducing delay time
JP3840076B2 (en) Image processing apparatus and method, computer program, and storage medium
JP4035471B2 (en) Image processing apparatus, control method therefor, computer program, and storage medium
JP2000228772A (en) Moving picture data quantity reduction device and storage medium storing moving picture data quantity reduction program
JP4667348B2 (en) Encoded data memory storage control device, method, and image processing device
KR100612669B1 (en) Method for Displaying High-Resolution JPEG Pictures in Mobile Communication Terminal and Mobile Communication Terminal therefor
JP2002051339A (en) Image-decoding apparatus, method of the same and storage medium
JP2008011408A (en) Code converting apparatus, code decoding apparatus and program

Legal Events

Date Code Title Description
A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20060830

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20060830

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20080131

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20080205

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20080325

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: 20080414

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20080507

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

Ref document number: 4124982

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20110516

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20120516

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20120516

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20130516

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20140516

Year of fee payment: 6

LAPS Cancellation because of no payment of annual fees