JP2003264705A - Image encoder and image encoding method - Google Patents

Image encoder and image encoding method

Info

Publication number
JP2003264705A
JP2003264705A JP2002065519A JP2002065519A JP2003264705A JP 2003264705 A JP2003264705 A JP 2003264705A JP 2002065519 A JP2002065519 A JP 2002065519A JP 2002065519 A JP2002065519 A JP 2002065519A JP 2003264705 A JP2003264705 A JP 2003264705A
Authority
JP
Japan
Prior art keywords
image
coefficient
code
invalid
coefficients
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2002065519A
Other languages
Japanese (ja)
Inventor
Toshiaki Watanabe
俊明 渡辺
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Panasonic System Solutions Japan Co Ltd
Original Assignee
Panasonic Communications Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Panasonic Communications Co Ltd filed Critical Panasonic Communications Co Ltd
Priority to JP2002065519A priority Critical patent/JP2003264705A/en
Publication of JP2003264705A publication Critical patent/JP2003264705A/en
Pending legal-status Critical Current

Links

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)
  • Compression Of Band Width Or Redundancy In Fax (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To form images having frequency characteristics based on the distribution of quantization data by image kinds and excellent reproducibility. <P>SOLUTION: The multilevel image data of a prescribed block size are decomposed into orthogonal transformation coefficients, an amplitude distribution for each space frequency is detected, classification into image modes is performed and they are converted to the intrinsic number of bits for each image mode. Then, the orthogonal transformation coefficients are weighted corresponding to the space frequency, valid coefficients are selected preferentially in the descending order of a weighted amplitude absolute value from the transformation coefficients after quantization for each block and remaining transformation coefficients are invalidated. Then, an encoding part 6 allocates a quantized prescribed bit length code and a valid flag to the valid coefficient, allocates only an invalid flag indicating that it is invalid to the invalid coefficient and performs encoding. Also, feedback is performed to the selection of the valid coefficients so as to limit a code amount for each block to be within a fixed amount. <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 coding processing apparatus for compressing and restoring multi-valued image data, and in particular, it is capable of gradationally recording multi-valued image data having continuous gradation read by a scanner or the like. The present invention relates to an image encoding device and an image encoding method applicable to a copying machine having a printer.

【0002】[0002]

【従来の技術】従来のデジタル複合機は、スキャナ部か
ら読み込んだ画像データを画像メモリに蓄積し、回転又
は合成等の編集を加えた後に画像メモリから読み出して
プリンタ部から印刷していた。例えば、スキャナ部の読
み取り面に横向きに置かれた原稿に対し、プリンタ部で
記録紙が縦向きに給紙される場合、読み込んだ画像デー
タを回転させて記録紙の向きに合わせるといった柔軟な
対応が可能であった。
2. Description of the Related Art In a conventional digital multi-function peripheral, image data read from a scanner unit is stored in an image memory, edited after being rotated or combined, and then read from the image memory and printed from a printer unit. For example, when a printer feeds recording paper vertically on a document placed horizontally on the reading surface of the scanner unit, the image data that has been read is rotated to match the orientation of the recording paper. Was possible.

【0003】一方、2値データだけでなく中間調データ
まで記録できる多値プリンタが開発されている。多値プ
リンタはこれまで1画素当たり1ビットで現されていた
画像データを2ビット以上の多値データで現せることか
ら、連続階調画像を記録でき画質向上を図ることができ
る。
On the other hand, a multi-value printer capable of recording not only binary data but also halftone data has been developed. Since the multi-valued printer can express the image data, which has been represented by 1 bit per pixel so far, by the multi-valued data of 2 bits or more, a continuous tone image can be recorded and the image quality can be improved.

【0004】多値画像データを扱う場合、2値データに
比べてデータ量が数倍に増大するので、画像データを蓄
積する画像メモリの記憶容量も大きくなり、コストアッ
プにつながる。画像データを圧縮してから蓄積すればメ
モリ容量を抑えることができるが、圧縮方式によっては
圧縮後の画像データを編集できなくなるといった問題が
ある。例えば、広く使われている圧縮方式であるJPE
G符号化は可変長符号化であるので、画素位置の情報が
保存できなくなり編集が困難である。そのため、JPE
G符号化を行う前段で編集しなければならないが、この
方式であっても編集メモリの容量が増大するためにコス
トアップになってしまう。しかも、編集データが多いた
めにメモリアクセスを高速化しなければ処理速度が低下
するといった不具合もある。
When handling multi-valued image data, the amount of data increases several times as compared with binary data, so that the storage capacity of the image memory for accumulating image data also increases, leading to an increase in cost. Although the memory capacity can be suppressed by storing the image data after compressing it, there is a problem that the compressed image data cannot be edited depending on the compression method. For example, JPE, which is a widely used compression method
Since G coding is variable length coding, it is difficult to edit because pixel position information cannot be stored. Therefore, JPE
Editing must be performed before G encoding, but even with this method, the cost of the editing memory increases because the capacity of the editing memory increases. In addition, there is a problem that the processing speed decreases unless the memory access speed is increased due to the large amount of edit data.

【0005】このような問題に対して、多値階調データ
画像の圧縮復元装置として、直交変換符号化が符号デー
タ削減を少ない歪みで実現する非可逆符号化として有効
な手段として知られている。画像をブロックごとに2次
元直交変換し、得られた変換係数をそれぞれ異なった量
子化ビット数で量子化する。ページ内あるいはブロック
内で一定量を超えないように、符号量が一定量を超える
直前で符号化を打ち切るということが行われていた。一
般的には人間の視覚特性すなわち、空間周波数において
低周波成分には敏感であるが高周波成分には多少の誤差
があってもあまり目に付かないことを利用し低周波成分
から高周波成分へと量子化および符号化を行い、一定の
制限量を越えないように符号化を打ち切っていた。
To solve such a problem, as a compression / decompression device for a multi-value gradation data image, orthogonal transform coding is known as an effective means for lossy coding which realizes code data reduction with a small distortion. . The image is two-dimensionally orthogonally transformed for each block, and the obtained transform coefficients are quantized with different quantization bit numbers. In order not to exceed a certain amount in a page or in a block, encoding has been aborted just before the code amount exceeds a certain amount. Generally, human visual characteristics, that is, it is sensitive to low frequency components in spatial frequency, but it is not noticeable even if there are some errors in high frequency components Quantization and encoding were performed, and the encoding was discontinued so as not to exceed a certain limit amount.

【0006】しかし、この方法では、高い空間周波数に
エネルギー分布が集中しているような場合には、高周波
成分の符号化の前に打ち切りが発生すると、エネルギー
分布の多い空間周波数成分が欠落することになり画像の
再現性に問題が生じる。
However, according to this method, when the energy distribution is concentrated in a high spatial frequency, if the truncation occurs before the encoding of the high frequency component, the spatial frequency component having a large energy distribution is lost. Therefore, there is a problem in image reproducibility.

【0007】先に本発明者は、空間周波数のエネルギー
順すなわち変換係数の絶対値の大きい順に有意な量子化
ビット数を割り当て、ブロック内の符号量を調整する方
式を提案した。この符号化方式は、すべての空間周波数
における変換係数の絶対値順に選択して、ブロック内の
符号量の制限値を越えない範囲のものを有意係数として
符号化し、それ以外のものを切り捨てる方法である。
The present inventor has previously proposed a method of allocating a significant number of quantization bits in the order of energy of spatial frequencies, that is, in order of increasing absolute value of transform coefficient, and adjusting the code amount in a block. This coding method is a method of selecting in the order of absolute values of transform coefficients at all spatial frequencies, coding those within a range that does not exceed the code amount limit value within a block as significant coefficients, and truncating the others. is there.

【0008】以下、この提案方法について図面を用いて
説明する。
The proposed method will be described below with reference to the drawings.

【0009】図13は従来の画像符号化装置のブロック
図である。かかる画像符号化装置は、画像入力装置11
が原稿をスキャンしたラスター画像データをラインメモ
リ12への書込み制御でブロックサイズの2次元空間に
構成する。そして、直交変換部13が2次元画像を各ブ
ロックサイズ単位で順に直交変換する。画像種別判別部
18が直交変換係数のエネルギー分布から画像種別を判
別する一方、量子化部14が直交量子化係数を画像種別
に応じたビット長で量子化する。選択部15は、直交変
換係数を絶対値順に所定の符号量を越えない範囲で選択
し、選択後の量子化係数を符号化部16が符号化するよ
うに構成されている。
FIG. 13 is a block diagram of a conventional image coding apparatus. Such an image encoding device includes an image input device 11
Configures a two-dimensional space having a block size by controlling the writing of raster image data obtained by scanning an original into the line memory 12. Then, the orthogonal transformation unit 13 orthogonally transforms the two-dimensional image in order of each block size. While the image type determination unit 18 determines the image type from the energy distribution of the orthogonal transformation coefficient, the quantization unit 14 quantizes the orthogonal quantization coefficient with a bit length corresponding to the image type. The selecting unit 15 is configured such that the orthogonal transform coefficients are selected in the order of absolute values within a range that does not exceed a predetermined code amount, and the quantized coefficient after selection is encoded by the encoding unit 16.

【0010】以上のように構成された画像符号化装置で
は、選択部15において有効な係数として選択された係
数は、そのブロックとして判定された画像種別とその画
像種別がもつ固有の空間周波数ごとの量子化ビット長で
量子化された結果をそのまま使い、一方、有意でない係
数は0とみなして符号化する。すなわち、ブロック全体
としては固定長符号化である一方、個々の係数について
は可変長符号化を行うものである。
In the image coding apparatus configured as described above, the coefficient selected as the effective coefficient in the selection unit 15 is classified into the image type determined as the block and the unique spatial frequency of the image type. The result quantized with the quantized bit length is used as it is, while the insignificant coefficient is regarded as 0 and encoded. That is, while the entire block is fixed length coding, the variable length coding is performed for each coefficient.

【0011】このように、有意係数とそうでない係数の
数とビット配分を調整することにより、各ブロックの符
号量を一定量内に制限することができ、かつ、圧縮復元
後の画像劣化を最小限に抑えることができる。
As described above, by adjusting the number of significant coefficients and the number of non-significant coefficients and the bit allocation, it is possible to limit the code amount of each block within a certain amount, and to minimize the image deterioration after compression / decompression. You can keep it to the limit.

【0012】[0012]

【発明が解決しようとする課題】しかしながら、上記画
像符号化装置では、全空間周波数の変換係数のエネルギ
ーを平等に比較していることとなり、画像種別ごとに固
有の空間周波数特性や人間の視覚特性を考えると画像再
現性と符号効率のバランスで必ずしも最適な方法とはい
えない場合も出てくる。すなわち、従来の方法では、認
知されにくい高周波成分が低周波成分よりわずかでもエ
ネルギーが高いと、選択、符号化されるが、これは一般
の画像の再現性に対しあまり寄与しないし、むしろ低周
波成分を充実させたほうが、ノイズの発生や自然な再現
性からいって良好な場合が多い。また、網点画像のよう
に濃度を高周波変調で表現している画像はむしろ高周波
成分を急峻にカットしたほうが良好に再現される。
However, in the above image coding apparatus, the energies of the transform coefficients of all spatial frequencies are compared equally, and the spatial frequency characteristic and the human visual characteristic peculiar to each image type are compared. Considering the above, there are cases in which the method is not necessarily the optimum method in terms of the balance between image reproducibility and coding efficiency. That is, in the conventional method, if the high-frequency component that is difficult to be recognized has a higher energy than the low-frequency component, it is selected and encoded, but this does not contribute much to the reproducibility of a general image, or rather, it is low frequency. It is often better to enrich the components because of noise generation and natural reproducibility. An image in which the density is expressed by high frequency modulation, such as a halftone image, is better reproduced by cutting the high frequency component sharply.

【0013】このように、画像の種別によっては再現す
る空間周波数特性を異なる設定にすることも必要になる
場合もある。また、組み合わされるプリンタの特性や後
段の画像処理特性に対して、周波数特性を補正する必要
も生じる場合もある。
As described above, depending on the type of image, it may be necessary to set different spatial frequency characteristics to be reproduced. Further, it may be necessary to correct the frequency characteristic with respect to the characteristic of the combined printer or the image processing characteristic of the subsequent stage.

【0014】本発明は、以上のような実情に鑑みてなさ
れたものであり、各画像種別において、量子化データの
配分による周波数特性を持たせることができ、再現性に
優れた画像を形成可能な画像符号化装置及び画像符号化
方法を提供することを目的とする。
The present invention has been made in view of the above-mentioned circumstances, and it is possible to form an image having excellent reproducibility because each image type can have a frequency characteristic by distribution of quantized data. Another object of the present invention is to provide a simple image coding apparatus and image coding method.

【0015】[0015]

【課題を解決するための手段】本発明は、直交変換係数
の分布から判別した画像種別あるいは外部から得られる
画像種別情報をもとに、それぞれの画像種別におけるそ
れぞれの空間周波数毎に、符号化の対象となる有意変換
係数の選択をする際に参照する係数絶対値に重み付けを
行い、符号データ配分に偏りを与えることにより、多値
圧縮符号化における周波数特性を持たせるものである。
According to the present invention, encoding is performed for each spatial frequency in each image type based on image type information determined from the distribution of orthogonal transform coefficients or image type information obtained from the outside. The weighting is applied to the coefficient absolute value that is referred to when selecting the significant transform coefficient to be targeted, and the distribution of the code data is biased to give the frequency characteristic in the multi-value compression encoding.

【0016】[0016]

【発明の実施の形態】本発明の第1の態様は、所定ブロ
ックサイズの多値画像データを空間周波数に対応した直
交変換係数に分解する直交変換手段と、直交変換係数の
空間周波数毎の振幅分布を検出し画像モードに分類する
画像分類手段と、前記直交変換係数を画像モード毎にそ
れぞれの空間周波数に固有のビット数に変換する量子化
手段と、前記直交変換係数を空間周波数に応じて重み付
けしておき、ブロック毎に量子化後の変換係数から重み
付けされた変換係数の振幅絶対値の大きい順に優先して
有効係数を選択し、残った変換係数を無効とする選択手
段と、有効係数には前記量子化された所定ビット長符号
と有効フラグを割り当て、無効係数には無効であること
を示す無効フラグのみを割り当てる可変長形式の符号化
手段と、ブロック毎の符号量を一定内に制限するように
選択手段にフィードバックを行う符号量制限手段とを具
備する画像符号化装置である。
BEST MODE FOR CARRYING OUT THE INVENTION A first aspect of the present invention is an orthogonal transform means for decomposing multi-valued image data of a predetermined block size into orthogonal transform coefficients corresponding to spatial frequencies, and an amplitude of the orthogonal transform coefficients for each spatial frequency. Image classification means for detecting a distribution and classifying into image modes, quantizing means for converting the orthogonal transform coefficient into the number of bits peculiar to each spatial frequency for each image mode, and the orthogonal transform coefficient according to the spatial frequency. Weighting is performed, and for each block, the effective coefficient is preferentially selected from the quantized conversion coefficient in descending order of the amplitude absolute value of the weighted conversion coefficient, and the remaining conversion coefficient is invalidated, and effective coefficient. A variable length encoding means for allocating the quantized predetermined bit length code and a valid flag to the invalid coefficient, and allocating only the invalid flag to the invalid coefficient. Is the amount of code image encoding apparatus comprising a code amount limiting means for performing feedback to the selection means so as to limit within a certain.

【0017】この構成によれば、エネルギーの大きい変
換係数を選んで1ブロック内の符号量を一定量内に収め
るため、符号効率と画像再現性の両立を図ることが可能
であるし、加えて空間周波数領域ごとに変換係数の絶対
値の重み付けが設定できるため、圧縮変換後の画像の周
波数特性を調整できる。
According to this configuration, since the conversion coefficient having large energy is selected and the code amount in one block is kept within a fixed amount, it is possible to achieve both the code efficiency and the image reproducibility. Since the weighting of the absolute value of the transform coefficient can be set for each spatial frequency domain, the frequency characteristic of the image after compression conversion can be adjusted.

【0018】本発明の第2の態様は、第1の態様の画像
符号化装置において、各空間周波数と各画像モードとの
組み合わせに応じて重み付け係数を設定しておき、当該
重み付け係数を用いて直交変換係数を重み付けするもの
とした。
According to a second aspect of the present invention, in the image coding apparatus according to the first aspect, a weighting coefficient is set according to a combination of each spatial frequency and each image mode, and the weighting coefficient is used. The orthogonal transform coefficients are weighted.

【0019】これにより、画像種別固有の特性に即した
周波数特性を調整できる。
As a result, the frequency characteristic can be adjusted according to the characteristic peculiar to the image type.

【0020】本発明の第3の態様は、第1,2の態様の
画像符号化装置において、前記画像分類手段は、前記直
交変換係数の空間周波数の振幅分布を検出して画像モー
ドに分類する他に、外部の画像種別判定結果を取り込ん
で画像モードの分類に使用することとした。
According to a third aspect of the present invention, in the image coding apparatus according to the first and second aspects, the image classification means detects the amplitude distribution of the spatial frequency of the orthogonal transform coefficient and classifies the image mode. In addition, it was decided to capture the external image type determination results and use them for image mode classification.

【0021】これにより、変換係数のエネルギー分布の
みでは判別することのできない画像の種別を外部の画像
判別手段による判別結果を使用することによって、さら
に広範な画像種別に対して周波数特性を調整した符号化
に対応できる。
Thus, the code whose frequency characteristic is adjusted for a wider range of image types is used by using the discrimination result of the external image discriminating means for the image type which cannot be discriminated only by the energy distribution of the conversion coefficient. Can deal with

【0022】本発明の第4の態様は、第1,2,3の態
様の画像符号化装置において、前記符号化手段は、可変
長符号化形式と固定長符号化形式とを選択的に適用する
こととした。
According to a fourth aspect of the present invention, in the image coding apparatus according to the first, second and third aspects, the coding means selectively applies a variable length coding format and a fixed length coding format. It was decided to.

【0023】この構成により、変換係数の周波数分布を
限定する場合など対象となる変換係数の数が少ない場合
には符号効率を上げることができる。
With this configuration, the coding efficiency can be increased when the number of target transform coefficients is small, such as when limiting the frequency distribution of transform coefficients.

【0024】本発明の第5の態様は、所定ブロックサイ
ズの多値画像データを空間周波数に対応した直交変換係
数に分解し、直交変換係数の空間周波数毎の振幅分布を
検出し画像モードに分類し、前記直交変換係数を画像モ
ード毎にそれぞれの空間周波数に固有のビット数に変換
し、前記直交変換係数を空間周波数に応じて重み付けし
ておき、ブロック毎に量子化後の変換係数から重み付け
された変換係数の振幅絶対値の大きい順に優先して有効
係数を選択し、残った変換係数を無効とし、有効係数に
は前記量子化された所定ビット長符号と有効フラグを割
り当て、無効係数には無効であることを示す無効フラグ
のみを割り当てる可変長符号化を実行し、ブロック毎の
符号量を一定内に制限するように有効係数の選択にフィ
ードバックを行うことを特徴とする画像符号化方法であ
る。
According to a fifth aspect of the present invention, multivalued image data of a predetermined block size is decomposed into orthogonal transform coefficients corresponding to spatial frequencies, the amplitude distribution of the orthogonal transform coefficients for each spatial frequency is detected, and classified into image modes. Then, the orthogonal transform coefficient is converted into the number of bits unique to each spatial frequency for each image mode, the orthogonal transform coefficient is weighted according to the spatial frequency, and the block is weighted from the quantized transform coefficient for each block. The effective coefficient is preferentially selected in the descending order of the absolute amplitude value of the converted coefficient, the remaining conversion coefficient is invalidated, the quantized predetermined bit length code and the valid flag are assigned to the effective coefficient, and the invalid coefficient is set as the invalid coefficient. Performs variable length coding that assigns only an invalid flag indicating that it is invalid, and feeds back to the selection of effective coefficients so that the code amount for each block is limited within a certain amount. An image coding method comprising and.

【0025】以下、本発明の画像符号化装置/方法に係
る一実施の形態について、図面を参照して具体的に説明
する。
An embodiment of an image coding apparatus / method of the present invention will be specifically described below with reference to the drawings.

【0026】図1は、本発明の実施の形態に係る画像符
号化装置の構成を示すブロック図である。同図に示すよ
うに、本画像符号化装置に対して画像入力装置1がデジ
タルデータを供給する。画像入力装置1は、ラスタース
キャンによるデジタル8ビットデジタル画像データを出
力する。
FIG. 1 is a block diagram showing the configuration of an image coding apparatus according to an embodiment of the present invention. As shown in the figure, the image input device 1 supplies digital data to the image encoding device. The image input device 1 outputs digital 8-bit digital image data by raster scanning.

【0027】画像入力装置1から供給されるデジタル画
像データはラインメモリ2に蓄積される。本実施の形態
では、ラインメモリ2を用いてライン毎のデジタル画像
データを8ライン分蓄積し8×8画素分のブロック画像
データを生成している。
The digital image data supplied from the image input device 1 is stored in the line memory 2. In the present embodiment, the line memory 2 is used to accumulate digital image data for each line for eight lines to generate block image data for 8 × 8 pixels.

【0028】ラインメモリ2によって8×8画素のブロ
ックに変換された画像データは直交変換部3に入力され
る。直交変換部3は、本例では8×8マトリクスのアダ
マール変換を行う。図5に直交変換の一例としてウォル
シュ・アダマール変換の基底画像を示す。図6(A)は
直交変換前の8×8画素の画像データ(X00〜X7
7)を示しており、図6(B)は直交変換後の変換係数
を図5の基底の配置に並べたものを示している。直交変
換された変換係数は量子化部4および画像種別判別部8
へ並列に供給される。
The image data converted into a block of 8 × 8 pixels by the line memory 2 is input to the orthogonal transformation unit 3. The orthogonal transform unit 3 performs Hadamard transform of an 8 × 8 matrix in this example. FIG. 5 shows a basis image of the Walsh-Hadamard transform as an example of the orthogonal transform. FIG. 6A shows image data (X00 to X7) of 8 × 8 pixels before orthogonal transformation.
7), and FIG. 6B shows the transform coefficients after orthogonal transform arranged in the base arrangement of FIG. The orthogonally transformed transform coefficient is used by the quantization unit 4 and the image type determination unit 8
Are supplied in parallel.

【0029】量子化部4は、直交変換部3から入力され
た変換係数を定められたビット数で量子化する。
The quantizer 4 quantizes the transform coefficient input from the orthogonal transformer 3 with a predetermined number of bits.

【0030】画像種別判別部8は、変換係数のエネルギ
ー分布状態を監視して、その偏りと強度から、写真画領
域か、線画領域か、中間画領域かをブロック毎に判別す
る。
The image type discriminating unit 8 monitors the energy distribution state of the conversion coefficient and discriminates, for each block, a photographic image area, a line image area, or an intermediate image area based on the bias and intensity.

【0031】重み付け演算部9は、重み付け係数LUT
(ルックアップテーブル)で構成されており、画像種別
ごとに異なる空間周波数での重み付け係数を出力する。
The weighting calculation unit 9 has a weighting coefficient LUT.
It is composed of a (look-up table) and outputs weighting coefficients at different spatial frequencies for each image type.

【0032】選択部5は、量子化部4から出力された量
子化データ及び重み付け演算部9から出力された重み付
け係数とが入力される。選択部5では、係数の振幅絶対
値と重み付け係数とが乗算演算され、演算結果を絶対値
順に並べて、それぞれの符号化に必要な符号量を積算
し、限界量に達したところでそれ以降の変換係数を無効
として後段に出力する。
The quantized data output from the quantization unit 4 and the weighting coefficient output from the weighting calculation unit 9 are input to the selection unit 5. In the selection unit 5, the absolute amplitude value of the coefficient is multiplied and the weighting coefficient is multiplied, the calculation results are arranged in the order of absolute values, the code amount necessary for each encoding is integrated, and when the limit amount is reached, subsequent conversion is performed. The coefficient is invalidated and output to the subsequent stage.

【0033】選択部5の出力段には符号化部6が配置さ
れる。符号化部6は、選択部5で判別された係数の無効
か有効かの区別を元にそれぞれに定義された符号長で、
符号スキャン順に符号化していく。符号データメモリ7
は、符号化部6が符号化したデータを蓄積していく。
An encoding unit 6 is arranged at the output stage of the selecting unit 5. The encoding unit 6 has a code length defined based on whether the coefficient determined by the selection unit 5 is invalid or valid,
Encoding is performed in the code scan order. Code data memory 7
Accumulates the data encoded by the encoding unit 6.

【0034】次に、以上のように構成された本実施の形
態の動作について説明する。図2、図3は画素ブロック
を入力してから符号化が完了するまでの一連の処理を示
したフロー図である。本装置に入力したデジタル画像デ
ータはラインメモリ2により8×8画素のブロックに変
換され(ステップS1)、当該ブロック単位で画像デー
タが直交変換部3により直交変換される(ステップS
2)。
Next, the operation of this embodiment configured as described above will be described. 2 and 3 are flowcharts showing a series of processes from the input of a pixel block to the completion of encoding. The digital image data input to this apparatus is converted into a block of 8 × 8 pixels by the line memory 2 (step S1), and the image data is orthogonally transformed by the orthogonal transformation unit 3 in units of the block (step S).
2).

【0035】画像種別判別部8では、変換係数Y00〜
Y77(図6(B))の中から0でない係数をカウント
して1ブロック内の非零係数のカウント値(N)を保存
する(ステップS3)。そして、カウント値(N)とし
きい値αとを比較し(ステップS4)、N>αであった
場合は、ステップS5へ処理を分岐し、それ以外の場合
はステップS7へ処理を分岐させる。
In the image type discriminating section 8, the conversion coefficients Y00 to Y00
The coefficient which is not 0 is counted from Y77 (FIG. 6B) and the count value (N) of the non-zero coefficient in one block is stored (step S3). Then, the count value (N) is compared with the threshold value α (step S4). If N> α, the process branches to step S5, and otherwise, the process branches to step S7.

【0036】ステップS7へ分岐した場合は、ブロック
内において非零つまり有効な変換係数の数が少ない場合
であるので、図6(B)においてAC成分の分布が少な
いいわゆる写真画領域であると判別できる。この場合
は、ステップS7において階調を優先させたパラメータ
設定を行う。すなわち、量子化後の変換係数に有効係数
が少なく符号量に余裕があることから、有効係数を量子
化するビット数(符号長)、例えば符号長を周波数領域
ごとにLL,LM,LHと定義した場合、図4に示すよ
うに通常値LML,LMM,LMHよりも増加させた数
値LPL,LPM,LPHを設定値とする。有効係数を
量子化するビット数を大きくすると量子化ステップのサ
イズは相対的に小さな数値になるので、量子化精度が増
して写真領域の階調再現が優先される。また、量子化誤
差によって引き起こされるブロック歪みが減少する方向
に改善される。
If the process branches to step S7, it means that the block is non-zero, that is, the number of effective transform coefficients is small in the block. Therefore, in FIG. 6B, it is determined that the region is a so-called photographic image region where the AC component distribution is small. it can. In this case, the parameter setting giving priority to gradation is performed in step S7. That is, since there are few effective coefficients in the quantized transform coefficient and there is a margin in the code amount, the number of bits (code length) for quantizing the effective coefficient, for example, the code length is defined as LL, LM, and LH for each frequency domain. In this case, as shown in FIG. 4, the set values are the numerical values LPL, LPM and LPH that are increased from the normal values LML, LMM and LMH. When the number of bits for quantizing the effective coefficient is increased, the size of the quantization step becomes a relatively small numerical value, so that the quantization accuracy is increased and the gradation reproduction in the photographic area is prioritized. In addition, the block distortion caused by the quantization error is reduced.

【0037】一方、ステップS5へ分岐した場合は、図
7(A)に示すような高周波領域の中から非零の変換係
数をカウントしてそのカウント値Mを保存する。そして
カウント値(M)としきい値βとを比較し(ステップS
6)、M>βであった場合は、ステップS8へ処理を分
岐し、それ以外の場合はステップS9へ処理を分岐させ
る。
On the other hand, if the process branches to step S5, nonzero conversion coefficients are counted from the high frequency region as shown in FIG. 7A and the count value M is stored. Then, the count value (M) is compared with the threshold value β (step S
6) If M> β, the process branches to step S8; otherwise, the process branches to step S9.

【0038】ステップS8へ分岐した場合は、高周波領
域に非零の係数が存在しているので線画領域であると判
別できる。この場合は、解像度を優先したパラメータ設
定を行う。すなわち、低周波領域から高周波領域までの
全周波数領域に存在する変換係数を有効係数として符号
に割り当てるために、量子化ビット数(符号長)は通常
値よりも減少させた数値LDL、LDM、LDHに設定
する。これは有効係数の符号長が小さくなるため、より
多くの有効係数が符号に割り当てられることになる。こ
れにより、符号化の順位が後になる高周波領域の有意係
数を符号化の打ち切りで欠落する不具合を防止でき、線
画などの空間周波数の高い画像の再現性が改善される。
In the case of branching to step S8, it can be determined that it is a line drawing area because there are non-zero coefficients in the high frequency area. In this case, the parameters are set with priority on the resolution. That is, the number of quantization bits (code length) is set to a value smaller than the normal value LDL, LDM, LDH in order to assign the transform coefficients existing in all frequency regions from the low frequency region to the high frequency region to the codes as effective coefficients. Set to. Since the code length of the effective coefficient becomes small, more effective coefficients are assigned to the code. As a result, it is possible to prevent a problem in which significant coefficients in a high frequency region, which are later in the encoding order, are lost due to the termination of encoding, and the reproducibility of an image having a high spatial frequency such as a line drawing is improved.

【0039】また、ステップS9へ分岐した場合は、写
真領域と線画領域の中間の画像であると判別できるの
で、このような場合には通常のパラメータを設定する。
本実施の形態では、符号長の通常値LML,LMM,L
MHに設定している。画像種別判別部8は、ステップS
7、8、9のいずれかで判定した画像種別結果mdを量
子化部4及び重み付け演算部9及び符号化部6へ出力す
る。
When the process branches to step S9, it can be determined that the image is an intermediate image between the photographic area and the line drawing area. In such a case, normal parameters are set.
In the present embodiment, the code length normal values LML, LMM, L
It is set to MH. The image type determination unit 8 performs step S
The image type result md determined by any one of 7, 8, and 9 is output to the quantization unit 4, the weighting calculation unit 9, and the encoding unit 6.

【0040】さらに、本実施の形態は、フーリエ変換手
段のような外部の空間周波数検出手段(図示しない)に
よって検出された網点画像領域検出結果のような特殊な
画像種別判別結果を画像種別判別部8に外部判定結果と
して入力している。
Further, in the present embodiment, a special image type determination result such as a halftone dot image area detection result detected by an external spatial frequency detecting means (not shown) such as a Fourier transform means is used to determine the image type. It is input to the unit 8 as an external determination result.

【0041】画像種別判別部8は、外部判定結果に基づ
いて網点画像が検出されたか否か判断し(ステップS1
0)、外部判定結果が網点画像検出を表していれば画像
種別mdを網点画種別に書き換える(ステップS1
1)。
The image type determination unit 8 determines whether or not a halftone image is detected based on the external determination result (step S1).
0), if the external determination result indicates halftone dot image detection, the image type md is rewritten to the halftone dot image type (step S1).
1).

【0042】量子化部4では、画像種別結果mdに対応
する符号長を図4のテーブルから取得し、取得した符号
長を符号長設定値LL,LM,LHとする。そして、符
号長設定値LL,LM,LHで示されたビット数で変換
係数Y00〜Y77を量子化し、量子化後の係数を選択
部5内の係数バッファメモリ(図示しない)に格納する
(ステップS12)。図10は係数バッファメモリの構
成例を示している。図10(A)は後述するソート前の
状態を示しており、「量子化係数」として量子化後の係
数が書込まれている。なお、演算後係数は後述する重み
付け演算部9による演算結果である。
The quantizing unit 4 acquires the code length corresponding to the image type result md from the table of FIG. 4, and sets the acquired code length as the code length setting values LL, LM, LH. Then, the transform coefficients Y00 to Y77 are quantized by the number of bits indicated by the code length setting values LL, LM, and LH, and the quantized coefficients are stored in the coefficient buffer memory (not shown) in the selection unit 5 (step). S12). FIG. 10 shows a configuration example of the coefficient buffer memory. FIG. 10A shows a state before sorting, which will be described later, and the coefficient after quantization is written as the “quantization coefficient”. The post-calculation coefficient is a calculation result by the weighting calculation unit 9 described later.

【0043】重み付け演算部9では、図8に示すルック
アップテーブルにより画像種別結果mdに対する重み付
け係数WL,WM,WHを参照する。ルックアップテー
ブル内には図8で示すように画像種別に対応して空間周
波数の低周波領域、中間周波領域、高周波領域ごとにこ
の重み付け係数WL,WM,WHがレジスタに設定され
る形で定義されている。当該テーブルに示すように画像
種別が写真画像の時には低周波からそれぞれWPL,W
PM,WPHで定義され、同様に線画像種別ではWD
L,WDM,WDH、及び中間画像種別ではWML,W
MM,WMHとなる。これらの画像種別に重み付けを任
意設定可能とすることによって、選択する変換基底の周
波数ごとの偏りを設定可能となり、圧縮伸張後の画像の
空間周波数特性をある程度の自由度をもって変えること
ができる。直交変換係数と対応する重み付け係数は、乗
算演算されて「演算後係数」として選択部5に出力さ
れ、画像種別が網点画像で無い場合は(ステップS1
3)、係数バッファメモリ(図示しない)内に「量子化
係数」と関連付けされて格納される(ステップS1
4)。
The weighting calculation unit 9 refers to the weighting factors WL, WM and WH for the image type result md by the look-up table shown in FIG. In the look-up table, as shown in FIG. 8, the weighting factors WL, WM, and WH are defined in a register for each of the low frequency region, the intermediate frequency region, and the high frequency region of the spatial frequency corresponding to the image type. Has been done. As shown in the table, when the image type is a photographic image, WPL and W
Defined by PM and WPH, and similarly WD for line image type
L, WDM, WDH, and WML, W for intermediate image types
It becomes MM and WMH. By allowing weighting to be set arbitrarily for these image types, it is possible to set the bias for each frequency of the conversion base to be selected, and the spatial frequency characteristics of the image after compression / expansion can be changed with a certain degree of freedom. The weighting coefficient corresponding to the orthogonal transformation coefficient is multiplied and output to the selection unit 5 as a "post-calculation coefficient", and when the image type is not a halftone image (step S1).
3) stored in the coefficient buffer memory (not shown) in association with the “quantized coefficient” (step S1)
4).

【0044】選択部5では、係数バッファメモリに格納
された重み付け演算後の係数を読み出して、振幅絶対値
の降順に並ぶようにソートし、図10(B)に示すよう
に選択部5内のソートテーブル(図示しない)に量子化
係数とともに格納する(ステップS14)。ソートメモ
リ上の符号化対象をi=1とし(ステップS15)、i
番目の係数を符号化対象に加える(ステップS17)。
さらに、ソートテーブルから降順に量子化係数の符号量
をカウントし、もし制限符号量に達した場合は(ステッ
プS18)、以降の係数を係数バッファメモリの中で0
クリアして無効係数とし、選択部5の処理を終了する
(ステップ21)。なお符号量の積算については、単純
な個々の変換係数の符号長のみならず、符号に含まれる
フラグの総数も考慮に入れる必要がある。
The selecting section 5 reads the weighted coefficients stored in the coefficient buffer memory and sorts them so that they are arranged in descending order of the absolute amplitude values. As shown in FIG. It is stored together with the quantized coefficient in a sort table (not shown) (step S14). The encoding target on the sort memory is i = 1 (step S15), and i
The th coefficient is added to the encoding target (step S17).
Further, the code amount of the quantized coefficient is counted in descending order from the sort table, and if the limit code amount is reached (step S18), the subsequent coefficient is set to 0 in the coefficient buffer memory.
The value is cleared to be an invalid coefficient, and the processing of the selection unit 5 ends (step 21). In addition, it is necessary to take into consideration not only the simple code length of each individual transform coefficient but also the total number of flags included in the code when integrating the code amount.

【0045】ここで、符号量は、符号順に並ぶ有効・無
効フラグと有効データの組み合わせとなる。i個の選択
済みの符号とこの中の最大符号順位がjの場合、1ブロ
ック全体の符号量BLは BL=M+D+Σ+j ただし、Mは符号化種別コード、DはDC基底符号、Σ
は選択済み有効データ符号i個の符号量総数である。
Here, the code amount is a combination of valid / invalid flags and valid data arranged in code order. When i selected codes and the maximum code rank among them are j, the code amount BL of one block is BL = M + D + Σ + j, where M is the coding type code, D is the DC base code, and Σ
Is the total code amount of i selected valid data codes.

【0046】これが1ブロック全体の符号制限量と比較
して(ステップS18)、制限量を越えない場合(ステ
ップS19)かつ係数すべてを符号化していない場合に
は、ソートメモリ上の次の順位の係数を符号化の対象と
して選択し(ステップS20)、符号化対象に加える
(ステップS17)。ステップS18で制限量を越えた
場合には、ソート順のi番目以降の係数について係数バ
ッファ上で0クリアする(ステップ21)。またステッ
プS18で符号量総数が制限符号量に達しない場合や、
ステップS19で符号順位iが符号数に達しない場合に
は符号順位をインクリメントし(ステップS20)、ス
テップS17に戻ってブロック内処理を継続する。
When this is compared with the code limit amount of one block as a whole (step S18) and the limit amount is not exceeded (step S19) and all the coefficients have not been encoded, the next rank in the sort memory is determined. The coefficient is selected as an encoding target (step S20) and added to the encoding target (step S17). If the limit amount is exceeded in step S18, 0 is cleared in the coefficient buffer for the i-th and subsequent coefficients in the sort order (step 21). If the total code amount does not reach the limited code amount in step S18,
If the code rank i does not reach the number of codes in step S19, the code rank is incremented (step S20), and the process returns to step S17 to continue the in-block processing.

【0047】これにより、符号順位の後方に位置付けら
れた変換係数であっても重み付け演算後の振幅絶対値が
大きい場合には、これらが優先的に有効係数として符号
化されるようになる。したがって、優先したい成分の欠
落が防止されることになる。
As a result, even if the transform coefficients positioned after the code rank have a large amplitude absolute value after the weighting calculation, these are preferentially coded as effective coefficients. Therefore, it is possible to prevent the loss of the component to be prioritized.

【0048】符号化部6は、選択部5の係数バッファメ
モリから係数のスキャン順である符号順に係数を読み出
して有効係数、無効係数の別に符号化処理を実行する
(ステップS22)。具体的には、係数バッファメモリ
から読み出した係数が非零の係数である有効係数であれ
ば、有効係数である事を示すフラグ「1」と当該有効係
数の数値である「有効データ」とを連結した符号列を出
力する。また、係数バッファメモリから読み出した量子
化係数が0の無効係数であれば、無効係数であることを
示すフラグ「0」のみを符号化する。
The coding unit 6 reads the coefficients from the coefficient buffer memory of the selection unit 5 in code order, which is the scan order of coefficients, and executes the coding process for each valid coefficient and invalid coefficient (step S22). Specifically, if the coefficient read from the coefficient buffer memory is a valid coefficient that is a non-zero coefficient, a flag "1" indicating that the coefficient is a valid coefficient and "valid data" that is the numerical value of the valid coefficient are set. Output the concatenated code string. If the quantized coefficient read from the coefficient buffer memory is an invalid coefficient of 0, only the flag "0" indicating the invalid coefficient is encoded.

【0049】ステップS23ではブロック内の全ての係
数の符号化が終了したか否か監視し、終了するまでステ
ップS22を繰り返す。1ブロックの符号化が終了した
ところで、図11(A)に示すブロック符号が得られる
ので、これを符号データメモリ7へ蓄積する。
In step S23, it is monitored whether or not the coding of all the coefficients in the block is completed, and step S22 is repeated until the coding is completed. When the encoding of one block is completed, the block code shown in FIG. 11A is obtained, and this is stored in the code data memory 7.

【0050】図9は符号化部6で符号化された1ブロッ
ク分のブロック符号の構造例を示している。図9(A)
に示すように、1ブロックのブロック符号は符号化種別
コードと符号データとから構成されている。符号化種別
コードは、図9(B)に示すように、画像種別判別部8
で得られた画像種別mdが記述される「画像種別」と、
画像種別判別部8で得られた符号長LL,LM,LHが
記述される「有効データ長」とから構成されている。符
号データの部分は、図9(C)に示すように、DC成分
とAC成分の符号で構成され、同図には1ブロック当た
りの符号データが56ビットで、DC成分の符号に8ビ
ットを使い、AC成分の符号に48ビットを使っている
例を示している。図9(D)はAC成分の係数符号が無
効係数の場合にはフラグ「0」のみで、有効係数の場合
にはフラグ「1」と有効データ3ビットからなることを
示している。
FIG. 9 shows an example of the structure of a block code for one block coded by the coding unit 6. FIG. 9 (A)
As shown in, the block code of one block is composed of an encoding type code and code data. The encoding type code is, as shown in FIG.
“Image type” in which the image type md obtained in
The code lengths LL, LM, and LH obtained by the image type discrimination unit 8 are described, and "effective data length" is described. As shown in FIG. 9C, the code data portion is composed of DC component and AC component codes. In the figure, the code data per block is 56 bits, and the DC component code is 8 bits. It shows an example in which 48 bits are used for the code of the AC component. FIG. 9D shows that when the coefficient code of the AC component is an invalid coefficient, it is composed of only the flag "0", and when it is a valid coefficient, it is composed of a flag "1" and 3 bits of valid data.

【0051】図11は、1ブロック分の符号化例を示し
たもので、図11(A)は1次元ビットマップ、図11
(B)は2次元ビットマップに配置した例を示してい
る。
FIG. 11 shows an example of coding for one block. FIG. 11A shows a one-dimensional bit map.
(B) shows an example of arrangement in a two-dimensional bitmap.

【0052】ブロック内の符号化が終了した時点でステ
ップS26へ移行して、全画像の符号化が終了したか否
か判断し、符号化すべき画像が残っていればステップS
1に戻り、次の画素ブロックの符号化を開始する。
When the coding in the block is completed, the process proceeds to step S26, it is judged whether or not the coding of all the images is completed, and if the images to be coded remain, the step S26 is executed.
Returning to 1, the encoding of the next pixel block is started.

【0053】また、本実施の形態において、有効係数は
規定の量子化長で符号化するが無効係数は最短のフラグ
のみで符号化するいわゆる可変長符号化と、すべての係
数を固定長で符号化するいわゆる固定長符号化とを適宜
切り替えて適用するようにしている。
Further, in the present embodiment, so-called variable length coding in which the effective coefficient is coded with a specified quantization length, but the invalid coefficient is coded with only the shortest flag, and all coefficients are coded with a fixed length. The so-called fixed-length coding is appropriately switched and applied.

【0054】通常、符号化においては、個々の係数につ
いては可変長符号化を使用するが、周波数領域を限定す
るために係数の数が少なく、かつ領域内の全ての係数を
もれなく符号化する場合には固定長にした方がフラグ分
のオーバーヘッドがなくなる分、効率が上がることにな
る。たとえば、網点画像のように高周波成分の再現性よ
りは、モアレやざらつきなどの抑圧を重視する場合が多
い。これらの画像劣化要因は、低周波成分の欠落からく
るモスキートノイズなどの雑音成分である場合が多く、
このため高周波成分を除外して全て低周波・中間周波の
基底を符号化する方法が有効となる。
Usually, in coding, variable length coding is used for each coefficient, but when the number of coefficients is small to limit the frequency domain and all the coefficients in the domain are coded without omission. For a fixed length, the efficiency is improved because the overhead for the flag is eliminated. For example, suppression of moire and roughness is often more important than reproducibility of high frequency components such as a halftone image. These image deterioration factors are often noise components such as mosquito noise resulting from the lack of low frequency components,
Therefore, it is effective to exclude all high-frequency components and encode the bases of all low and intermediate frequencies.

【0055】そこで、図3のステップS13にて網点画
種別かどうかを判断し、もしそうでなければ前述したス
テップS13からのフローになる。もし網点画種別であ
れば、ステップS24に進み符号スキャン順に係数バッ
ファから量子化された符号をそのまま順次固定長で符号
化する(ステップS24)。これを1ブロック内で制限
された符号化対象の係数終了まで続ける(ステップS2
5)。そして全画像終了したところで処理を完了する
(ステップS26)。
Then, in step S13 of FIG. 3, it is judged whether the type is a halftone image type, and if not, the flow is from step S13 described above. If it is a halftone image type, the process proceeds to step S24, and the quantized code from the coefficient buffer is sequentially encoded as it is with a fixed length (step S24). This is continued until the coefficient to be coded limited within one block ends (step S2).
5). Then, when all the images are completed, the processing is completed (step S26).

【0056】この符号化の例を図12に示す。図12
(A)は可変長符号化と同様に画像種別としての符号化
種別コード8ビット、DC符号8ビットの後ろに、低周波
領域の変換係数の符号VL0〜VL2が符号長LL(こ
の場合4ビット)で量子化し配置され、さらに続いて中
間周波数領域の変換係数の符号VM0〜VM11が符号
長LM(この場合3ビット)で量子化され配置されてい
ることを一次元で示している。図12(B)は2次元ビ
ットマップに配置した例を示す。
An example of this encoding is shown in FIG. 12
In (A), like the variable-length coding, the coding type code 8 bits and the DC code 8 bits as the image type are followed by the codes VL0 to VL2 of the transform coefficients in the low frequency region, and the code length LL (4 bits in this case). ), And the codes VM0 to VM11 of the transform coefficients in the intermediate frequency domain are quantized and arranged with the code length LM (in this case, 3 bits). FIG. 12B shows an example of arrangement in a two-dimensional bitmap.

【0057】このように本実施の形態によれば、エネル
ギーの大きい変換係数を選んで1ブロック内の符号量を
一定量内に収めらるため、符号効率と画像再現性の両立
を図ることが可能であるし、加えて空間周波数領域ごと
に変換係数の絶対値の重み付けが設定できるため、圧縮
変換後の画像の周波数特性を調整できる。
As described above, according to the present embodiment, since a conversion coefficient having a large energy is selected and the code amount in one block is kept within a fixed amount, both code efficiency and image reproducibility can be achieved. In addition, since the weighting of the absolute value of the transform coefficient can be set for each spatial frequency domain, the frequency characteristic of the image after the compression transform can be adjusted.

【0058】また、本実施の形態によれば、空間周波数
領域ごとの変換係数重み付け設定をさらに画像種別ごと
に設定できるものとしたので、画像種別固有の特性に即
した周波数特性を調整できる。
Further, according to the present embodiment, since the conversion coefficient weighting setting for each spatial frequency domain can be set for each image type, the frequency characteristic can be adjusted according to the characteristic peculiar to the image type.

【0059】さらに、本実施の形態によれば、外部の画
像種別判別結果を取り込めることとしたので、変換係数
のエネルギー分布のみでは判別することのできない画像
の種別を外部の画像判別手段による判別結果を使用する
ことによって、さらに広範な画像種別に対して周波数特
性を調整した符号化に対応できる。
Further, according to the present embodiment, since the external image type discrimination result can be taken in, the image type which cannot be discriminated by only the energy distribution of the conversion coefficient is discriminated by the external image discriminating means. By using, it is possible to cope with the coding in which the frequency characteristic is adjusted for a wider range of image types.

【0060】また、符号化の対象となる変換係数をあら
かじめ限定した範囲内ですべて有効として同一の固定長
をもつ符号化方式を付加することを選択できるので、変
換係数の周波数分布を限定する場合など対象となる変換
係数の数が少ない場合には符号効率を上げることができ
る。
In addition, since it is possible to select all transform coefficients to be encoded within a limited range in advance and add a coding method having the same fixed length, it is possible to limit the frequency distribution of transform coefficients. When the number of target transform coefficients is small, the coding efficiency can be increased.

【0061】[0061]

【発明の効果】以上の説明から明らかなように、本発明
によれば、画像種別ごとに変換基底の周波数に対して重
み付けができるので、圧縮伸張後の再現画像の空間周波
数特性を操作でき、画像種別毎により自然で再現性のよ
い設定に調整することができる。
As is apparent from the above description, according to the present invention, since the frequency of the conversion base can be weighted for each image type, the spatial frequency characteristic of the reproduced image after compression / expansion can be manipulated. It is possible to adjust to a natural and reproducible setting for each image type.

【0062】また本発明によれば、符号化の対象となる
係数の個数によって、各変換係数に対して可変長符号化
か固定長符号化を選択して、より符号化効率の高く画像
再現性の良い多階調符号化復号化を実現できる。
Further, according to the present invention, variable length coding or fixed length coding is selected for each transform coefficient depending on the number of coefficients to be coded, and the coding efficiency is higher and the image reproducibility is higher. It is possible to realize good multi-tone encoding / decoding.

【0063】また本発明によれば、画像種別を外部から
の識別情報をもとに切り替えられるので、より高度な判
別結果に基づき、適切な符号配分を行うことができる。
Further, according to the present invention, since the image type can be switched based on the identification information from the outside, it is possible to perform appropriate code distribution based on a more advanced discrimination result.

【0064】また本発明によれば、有効係数は規定の量
子化長で符号化するが無効係数は最短のフラグのみで符
号化するいわゆる可変長符号化と、すべての係数を固定
長で符号化するいわゆる固定長符号化とを適宜切り替え
て適用するので、変換係数の周波数分布を限定する場合
など対象となる変換係数の数が少ない場合には符号効率
を上げることができる。
Further, according to the present invention, so-called variable length coding in which effective coefficients are coded with a specified quantization length, but invalid coefficients are coded only with the shortest flag, and all coefficients are coded in fixed length. Since so-called fixed length coding is appropriately switched and applied, coding efficiency can be improved when the number of target transform coefficients is small, such as when limiting the frequency distribution of transform coefficients.

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

【図1】本発明の一実施の形態にかかる画像符号化装置
の構成を示すブロック図
FIG. 1 is a block diagram showing a configuration of an image encoding device according to an embodiment of the present invention.

【図2】上記実施の形態にかかる画像符号化装置の前半
部の動作フロー図
FIG. 2 is an operation flowchart of the first half of the image encoding device according to the above embodiment.

【図3】上記実施の形態にかかる画像符号化装置の後半
部の動作フロー図
FIG. 3 is an operation flowchart of the latter half of the image encoding device according to the above embodiment.

【図4】上記実施の形態にかかる画像符号化装置の画像
種別−量子化長テーブルを示す図
FIG. 4 is a diagram showing an image type-quantization length table of the image encoding device according to the embodiment.

【図5】上記実施の形態におけるアダマール変換の変換
基底を示す図
FIG. 5 is a diagram showing a conversion base of Hadamard transform in the above embodiment.

【図6】(A)直交変換前の入力画像ブロックの画素値
を示す図 (B)直交変換後の変換係数を示す図
FIG. 6A is a diagram showing pixel values of an input image block before orthogonal transform, and FIG. 6B is a diagram showing transform coefficients after orthogonal transform.

【図7】(A)変換係数の周波数領域の定義の一例を示
す図 (B)変換係数の符号スキャン順を示した図
FIG. 7A is a diagram showing an example of frequency domain definition of transform coefficients, and FIG. 7B is a diagram showing code scan order of transform coefficients.

【図8】上記実施の形態にかかる画像符号化装置の画像
種別−重み付け係数テーブルを示す図
FIG. 8 is a diagram showing an image type-weighting coefficient table of the image encoding device according to the embodiment.

【図9】(A)上記実施の形態において符号化されたブ
ロックのブロック符号の全体図 (B)符号化種別コードの構成図 (C)符号データの構成図 (D)AC成分の変換係数の符号化の例を示す図
9A is an overall view of a block code of a block encoded in the above embodiment, FIG. 9B is a configuration diagram of an encoding type code, FIG. 9C is a configuration diagram of code data, and FIG. 9D is a conversion coefficient of an AC component. Diagram showing an example of encoding

【図10】(A)変換係数バッファの一例を示す図 (B)ソートテーブルを示す図FIG. 10A is a diagram showing an example of a transform coefficient buffer. (B) Diagram showing sort table

【図11】(A)係数可変長符号時の1次元ビットマッ
プ符号例 (B)係数可変長符号時の2次元ビットマップ符号例
FIG. 11A illustrates an example of a one-dimensional bitmap code when a coefficient variable length code is used. FIG. 11B illustrates a two-dimensional bitmap code example when a coefficient variable length code.

【図12】(A)係数固定長符号時の1次元ビットマッ
プ符号例 (B)係数固定長符号時の2次元ビットマップ符号例
FIG. 12A illustrates a one-dimensional bitmap code example when a coefficient fixed-length code is used, and FIG. 12B illustrates a two-dimensional bitmap code example when a coefficient fixed-length code is used.

【図13】従来の画像符号化装置の構成を示すブロック
FIG. 13 is a block diagram showing the configuration of a conventional image encoding device.

【符号の説明】[Explanation of symbols]

1 画像入力装置 2 ラインメモリ 3 直交変換部 4 量子化部 5 選択部 6 符号化部 7 符号データメモリ 8 画像種別判別部 9 重み付け演算部 1 Image input device 2 line memory 3 Orthogonal transformation unit 4 Quantizer 5 Selector 6 Encoding section 7 Code data memory 8 Image type discrimination unit 9 Weighting calculation section

───────────────────────────────────────────────────── フロントページの続き Fターム(参考) 5C059 KK22 MA21 MC11 MC38 ME01 PP01 SS28 TA41 TA48 TB13 TC04 TC24 TD10 TD12 UA02 5C078 AA04 BA53 CA22 CA25 CA31 DA01    ─────────────────────────────────────────────────── ─── Continued front page    F term (reference) 5C059 KK22 MA21 MC11 MC38 ME01                       PP01 SS28 TA41 TA48 TB13                       TC04 TC24 TD10 TD12 UA02                 5C078 AA04 BA53 CA22 CA25 CA31                       DA01

Claims (5)

【特許請求の範囲】[Claims] 【請求項1】 所定ブロックサイズの多値画像データを
空間周波数に対応した直交変換係数に分解する直交変換
手段と、直交変換係数の空間周波数毎の振幅分布を検出
し画像モードに分類する画像分類手段と、前記直交変換
係数を画像モード毎にそれぞれの空間周波数に固有のビ
ット数に変換する量子化手段と、前記直交変換係数を空
間周波数に応じて重み付けしておき、ブロック毎に量子
化後の変換係数から重み付けされた変換係数の振幅絶対
値の大きい順に優先して有効係数を選択し、残った変換
係数を無効とする選択手段と、有効係数には前記量子化
された所定ビット長符号と有効フラグを割り当て、無効
係数には無効であることを示す無効フラグのみを割り当
てる可変長形式の符号化手段と、ブロック毎の符号量を
一定内に制限するように選択手段にフィードバックを行
う符号量制限手段とを具備する画像符号化装置。
1. An orthogonal transform means for decomposing multi-valued image data of a predetermined block size into orthogonal transform coefficients corresponding to spatial frequencies, and an image classification for detecting an amplitude distribution of the orthogonal transform coefficients for each spatial frequency and classifying into image modes. Means, a quantizing means for converting the orthogonal transform coefficient into a number of bits peculiar to each spatial frequency for each image mode, and weighting the orthogonal transform coefficient according to the spatial frequency, and after quantizing for each block Selection coefficient for prioritizing the effective coefficients in descending order of the amplitude absolute value of the weighted conversion coefficient and invalidating the remaining conversion coefficient, and the effective coefficient is the quantized predetermined bit length code. And a valid flag are assigned to the invalid coefficient, and only an invalid flag indicating that the invalid coefficient is invalid is assigned to the variable length format encoding means. An image coding apparatus comprising a code amount limiting means for feeding back to the selecting means.
【請求項2】 各空間周波数と各画像モードとの組み合
わせに応じて重み付け係数を設定しておき、当該重み付
け係数を用いて直交変換係数を重み付けすることを特徴
とする請求項1記載の画像符号化装置。
2. The image code according to claim 1, wherein a weighting coefficient is set according to a combination of each spatial frequency and each image mode, and the orthogonal transform coefficient is weighted using the weighting coefficient. Device.
【請求項3】 前記画像分類手段は、前記直交変換係数
の空間周波数の振幅分布を検出して画像モードに分類す
る他に、外部の画像種別判定結果を取り込んで画像モー
ドの分類に使用することを特徴とする請求項1又は請求
項2記載の画像符号化装置。
3. The image classification means detects the amplitude distribution of the spatial frequency of the orthogonal transform coefficient and classifies it into an image mode, and fetches an external image type determination result to use for classification of the image mode. The image coding apparatus according to claim 1 or 2, characterized in that.
【請求項4】 前記符号化手段は、可変長符号化形式と
固定長符号化形式とを選択的に適用することを特徴とす
る請求項1から請求項3のいずれかに記載の画像符号化
装置。
4. The image encoding method according to claim 1, wherein the encoding means selectively applies a variable length encoding format and a fixed length encoding format. apparatus.
【請求項5】 所定ブロックサイズの多値画像データを
空間周波数に対応した直交変換係数に分解し、直交変換
係数の空間周波数毎の振幅分布を検出し画像モードに分
類し、前記直交変換係数を画像モード毎にそれぞれの空
間周波数に固有のビット数に変換し、前記直交変換係数
を空間周波数に応じて重み付けしておき、ブロック毎に
量子化後の変換係数から重み付けされた変換係数の振幅
絶対値の大きい順に優先して有効係数を選択し、残った
変換係数を無効とし、有効係数には前記量子化された所
定ビット長符号と有効フラグを割り当て、無効係数には
無効であることを示す無効フラグのみを割り当てる可変
長符号化を実行し、ブロック毎の符号量を一定内に制限
するように有効係数の選択にフィードバックを行うこと
を特徴とする画像符号化方法。
5. The multi-valued image data of a predetermined block size is decomposed into orthogonal transform coefficients corresponding to spatial frequencies, the amplitude distribution of the orthogonal transform coefficients for each spatial frequency is detected, and the orthogonal transform coefficients are classified into image modes. The number of bits unique to each spatial frequency is converted for each image mode, the orthogonal transform coefficient is weighted according to the spatial frequency, and the absolute amplitude of the transform coefficient weighted from the quantized transform coefficient for each block. The effective coefficient is selected preferentially in descending order of value, the remaining transform coefficients are made invalid, the quantized predetermined bit length code and the effective flag are assigned to the effective coefficient, and it is shown that the invalid coefficient is invalid. An image code characterized by performing variable-length coding in which only invalid flags are assigned and performing feedback to select effective coefficients so as to limit the code amount of each block within a certain range. Encoding method.
JP2002065519A 2002-03-11 2002-03-11 Image encoder and image encoding method Pending JP2003264705A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2002065519A JP2003264705A (en) 2002-03-11 2002-03-11 Image encoder and image encoding method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2002065519A JP2003264705A (en) 2002-03-11 2002-03-11 Image encoder and image encoding method

Publications (1)

Publication Number Publication Date
JP2003264705A true JP2003264705A (en) 2003-09-19

Family

ID=29197783

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002065519A Pending JP2003264705A (en) 2002-03-11 2002-03-11 Image encoder and image encoding method

Country Status (1)

Country Link
JP (1) JP2003264705A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100345449C (en) * 2005-03-18 2007-10-24 清华大学 Method of entropy coding of transformation coefficient in image/video coding
KR101375668B1 (en) 2008-03-17 2014-03-18 삼성전자주식회사 Method and apparatus for encoding transformed coefficients and method and apparatus for decoding transformed coefficients

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100345449C (en) * 2005-03-18 2007-10-24 清华大学 Method of entropy coding of transformation coefficient in image/video coding
KR101375668B1 (en) 2008-03-17 2014-03-18 삼성전자주식회사 Method and apparatus for encoding transformed coefficients and method and apparatus for decoding transformed coefficients

Similar Documents

Publication Publication Date Title
US6252994B1 (en) Adaptive quantization compatible with the JPEG baseline sequential mode
US6175650B1 (en) Adaptive quantization compatible with the JPEG baseline sequential mode
JP3237582B2 (en) Image processing apparatus and image processing method
US6567562B1 (en) Encoding apparatus and method
US5801841A (en) Image signal coding apparatus with switching between variable-length coding and fixed-length coding
JP3843581B2 (en) Image encoding device, image decoding device, image processing device, image encoding method, image decoding method, and image processing method
US5583657A (en) Method and apparatus for scanning image data
JPH0563996A (en) Image processor
US5442459A (en) Process for encoding a half tone image considering similarity between blocks
JP2004537220A (en) Equipment for processing digital images
US7187805B1 (en) Maximum likelihood estimation of JPEG quantization values
US6625323B2 (en) Method for compressing and decompressing digital having text
US7050645B2 (en) Image processing apparatus and image processing method
US8023756B2 (en) Image encoding apparatus and method of controlling same
JP2003264705A (en) Image encoder and image encoding method
JP3293362B2 (en) Image compression device and image decompression device
JP2006033161A (en) Encoder
JP2841197B2 (en) Method of compressing gradation image data
JP4054430B2 (en) Image processing apparatus and method, and storage medium
WO1998054841A1 (en) Data compressing device by permutation encoding and decompressing device
JP2831954B2 (en) Image encoding / decoding device and image processing device
JP3432104B2 (en) Image decoding device and image decoding method
JP2009206907A (en) Image compression apparatus and image decompression apparatus
JP3892762B2 (en) Image processing apparatus, reading apparatus or printing apparatus including the same, and digital copying machine
JP3531844B2 (en) Image processing device