JPH08265755A - Image processing apparatus and image processing method - Google Patents

Image processing apparatus and image processing method

Info

Publication number
JPH08265755A
JPH08265755A JP6248195A JP6248195A JPH08265755A JP H08265755 A JPH08265755 A JP H08265755A JP 6248195 A JP6248195 A JP 6248195A JP 6248195 A JP6248195 A JP 6248195A JP H08265755 A JPH08265755 A JP H08265755A
Authority
JP
Japan
Prior art keywords
image
distribution
array
unit
distribution shape
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
JP6248195A
Other languages
Japanese (ja)
Inventor
Shinichi Sunakawa
伸一 砂川
Kazuhiro Matsubayashi
一弘 松林
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 JP6248195A priority Critical patent/JPH08265755A/en
Publication of JPH08265755A publication Critical patent/JPH08265755A/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)
  • Compression, Expansion, Code Conversion, And Decoders (AREA)

Abstract

(57)【要約】 【目的】 画像データの圧縮に伴う画像の劣化を最小限
に抑えることができるようにするとともに、高い圧縮率
で安定して画像圧縮を行うことができるようにすること
を目的とする。 【構成】 空間周波数領域における空間周波数係数の分
布形状を検出する分布形状判定部20と、ジグザグスキ
ャン部94で行われる複数種類の配列変換パターンを格
納するためのスキャンパターン格納部21と、上記分布
形状判定部20の出力に対応する配列変換パターンを、
上記スキャンパターン格納部21から読みだして上記ジ
グザグスキャン部94に設定するテーブル選択部22と
を設け、上記分布形状判定部20によって検出した画像
データの分布形状に合わせて配列変換パターンを変更す
ることができるようにすることにより、画像の種類に関
わらず配列中の0データを長くとることができるように
して、0係数の分布状態が異なることにより符号化効率
が極端に悪化するのを防止する。
(57) [Abstract] [Purpose] It is possible to minimize the deterioration of the image due to the compression of the image data and to stably perform the image compression at a high compression rate. To aim. A distribution shape determination unit 20 that detects a distribution shape of spatial frequency coefficients in a spatial frequency domain, a scan pattern storage unit 21 that stores a plurality of types of array conversion patterns performed by a zigzag scanning unit 94, and the distribution described above. The array conversion pattern corresponding to the output of the shape determination unit 20 is
A table selection unit 22 that reads out from the scan pattern storage unit 21 and sets the zigzag scanning unit 94 is provided, and the array conversion pattern is changed according to the distribution shape of the image data detected by the distribution shape determination unit 20. By making it possible to make the 0 data in the array long regardless of the type of the image, it is possible to prevent the coding efficiency from being extremely deteriorated due to the different distribution state of the 0 coefficient. .

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 and an image processing method, and is particularly suitable for use in an image processing apparatus for compressing image information in the spatial frequency domain.

【0002】[0002]

【従来の技術】従来より、画像情報の容量圧縮を行う手
法として、H.261、JPEG、MPEGおよびJB
IGなどの標準規格が知られている。特に、静止画につ
いてはJPEGアルゴリズムが普及し、動画については
MPEGアルゴリズムが広く普及している。以下の説明
は、多値静止画に対する圧縮方式である。
2. Description of the Related Art Conventionally, H.264 has been used as a technique for performing capacity compression of image information. 261, JPEG, MPEG and JB
Standards such as IG are known. In particular, the JPEG algorithm is widespread for still images, and the MPEG algorithm is widespread for moving images. The following description is a compression method for a multi-valued still image.

【0003】先ず、JPEG方式について説明する。説
明中で、量子化部、ジグザグスキャン部の技術が、本発
明の画像処理装置および画像処理方法と特に関係する部
である。上記JPEG方式は、さらにDCT方式とSP
ATIAL方式の二つに分けられ、DCT方式が主流で
ある。
First, the JPEG system will be described. In the description, the techniques of the quantization unit and the zigzag scanning unit are the units particularly related to the image processing apparatus and the image processing method of the present invention. The JPEG method is further DCT method and SP.
It is divided into two, the ATIAL system, and the DCT system is the mainstream.

【0004】これは、DCT方式の容量圧縮は、画像の
劣化を伴う非可逆符号化であり、空間周波数領域での量
子化と、エントロピー符号化によって画像データを圧縮
するものであるからである。以下の説明では、JPEG
規格のDCT方式について説明する。
This is because the capacity compression of the DCT system is an irreversible coding accompanied by deterioration of the image, and the image data is compressed by the quantization in the spatial frequency domain and the entropy coding. In the following description, JPEG
The standard DCT method will be described.

【0005】図13は、JPEG方式の構成を表すブロ
ック図である。図13において、91はRGB−YUV
変換部、92はDCT変換部、93は量子化部、94は
ジグザグスキャン部、95はハフマン符号化部、96は
量子化テーブル、97はハフマン符号化テーブルであ
る。
FIG. 13 is a block diagram showing the structure of the JPEG system. In FIG. 13, 91 is RGB-YUV.
A transform unit, 92 is a DCT transform unit, 93 is a quantization unit, 94 is a zigzag scanning unit, 95 is a Huffman coding unit, 96 is a quantization table, and 97 is a Huffman coding table.

【0006】以下に、各ブロックの動作について説明す
る。RGB−YUV変換部91は、画像の色度座標系を
変換するために設けられているものである。すなわち、
通常の画像はRGB色度座標で記録されているが、上記
RGB−YUV変換部91は、RGB色度座標をYUV
色度座標系に変換する。ここで、Y信号は輝度、U、V
信号は色差信号である。
The operation of each block will be described below. The RGB-YUV conversion unit 91 is provided to convert the chromaticity coordinate system of the image. That is,
A normal image is recorded in RGB chromaticity coordinates, but the RGB-YUV conversion unit 91 sets the RGB chromaticity coordinates in YUV.
Convert to chromaticity coordinate system. Here, the Y signal is luminance, U, V
The signal is a color difference signal.

【0007】DCT変換部92は、画像に離散コサイン
変換(DCT)を施し、空間周波数分布に変換するもの
である。上記変換に際して、画像を8×8画素の小ブロ
ックに分割し、各ブロック毎にDCT処理を行う。この
ときの変換例を図3(a)に示す。
The DCT transforming unit 92 performs a discrete cosine transform (DCT) on the image to transform it into a spatial frequency distribution. In the above conversion, the image is divided into small blocks of 8 × 8 pixels, and DCT processing is performed for each block. An example of conversion at this time is shown in FIG.

【0008】図3(a)において、60は、8×8サイ
ズの単位ブロックであり、ブロック内のマスに書かれた
数字が分布係数である。各係数について説明すると、1
行1列が最も低い周波数、直流成分の割合を表す。
In FIG. 3A, 60 is a unit block of 8 × 8 size, and the number written in the square in the block is the distribution coefficient. Explaining each coefficient, 1
The row 1 column shows the lowest frequency and the ratio of the DC component.

【0009】すなわち、列方向は水平方向の周波数成
分、行方向は垂直方向の周波数成分を表す。各方向と
も、行(列)の番号が増えるに従って、より高い周波数
の割合を示している。係数の範囲は、例えば、−127
〜127の範囲の整数値である。
That is, the column direction represents the horizontal frequency component and the row direction represents the vertical frequency component. In each direction, as the row (column) number increases, the proportion of higher frequencies is shown. The range of the coefficient is, for example, -127.
Is an integer value in the range of to 127.

【0010】次に、図13に戻って説明する。量子化部
93は、空間周波数の分布係数を量子化テーブル96で
除算していくことで、量子化を行う。上記量子化処理
は、上述のブロック単位で行う。量子化テーブル96
は、一般に、図15に示されるようなものであって、低
周波数でテーブル値が小さく、高周波域で値が大きくな
るように設定されている。
Next, returning to FIG. 13, an explanation will be given. The quantization unit 93 performs quantization by dividing the spatial frequency distribution coefficient by the quantization table 96. The quantization process is performed on the block basis. Quantization table 96
Is generally as shown in FIG. 15, and is set such that the table value is small at low frequencies and large at high frequencies.

【0011】これは、人間の視覚特性が高周波に鈍感で
あることを利用したものであり、高周波域のデータ量を
削減するものである。しかしながら、この量子化によっ
てデータは失われることになるので、画像は劣化するこ
とになる。そのため、ユーザが画像の種類に応じて、量
子化テーブル96を任意に指定できるようにしたものも
ある。
This utilizes the fact that human visual characteristics are insensitive to high frequencies, and reduces the amount of data in the high frequencies. However, this quantization results in the loss of data and thus in the degradation of the image. For this reason, there is a system in which the user can arbitrarily specify the quantization table 96 according to the type of image.

【0012】ジグザグスキャン部94は、ブロック内の
分布係数を一次元配列に並べ替えるものである。並べ替
えの順番は、図3(b)に示す順に行われる。図3
(b)中、マスの中に書かれた数字の順番に、係数が整
列される。この並べ替えをさらに図式化すると、図3
(c)のようになる。図3(c)において、指示線63
が並べ替えの順番を示す。1行1列の低周波成分からス
タートし、8行8列の高周波成分まで、ジグザグ状に並
べ替えを行う。
The zigzag scanning unit 94 rearranges the distribution coefficients in the block into a one-dimensional array. The rearrangement is performed in the order shown in FIG. FIG.
In (b), the coefficients are arranged in the order of the numbers written in the cells. A further schematic representation of this rearrangement is shown in FIG.
It becomes like (c). In FIG. 3C, the indication line 63
Indicates the order of sorting. Starting from the low-frequency component of row 1 and column 1, the high-frequency component of row 8 and column 8 is rearranged in a zigzag pattern.

【0013】ハフマン符号化部95では、ジグザグスキ
ャン部94の出力である一次元配列を符号化するもので
ある。上記符号化処理の内容を、図14のブロック図を
用いて説明する。
The Huffman encoding unit 95 encodes the one-dimensional array output from the zigzag scanning unit 94. The content of the encoding process will be described with reference to the block diagram of FIG.

【0014】先ず、係数判定部81では、分布係数が0
であるか否かを判定する。そして、上記係数判定部81
の判定結果が肯定であればブロック82に進み、否定で
あればブロック83に進むように動作する。
First, in the coefficient judging section 81, the distribution coefficient is 0.
Is determined. Then, the coefficient determination unit 81
If the determination result of is affirmative, the operation proceeds to block 82, and if not, the operation proceeds to block 83.

【0015】82はランレングス符号化部であって、値
が0の係数が連続した数を出力するためのものである。
83は係数グループ化部であって、係数値の範囲によっ
てグループ化を行い、グループ番号を出力する。84は
ハフマン符号化ブロックであり、ランレングス符号化部
82、係数グループ化部83の出力の符号化を行うため
のものである。
Reference numeral 82 is a run-length coding unit for outputting the number of consecutive coefficients having a value of 0.
A coefficient grouping unit 83 performs grouping according to the range of coefficient values and outputs a group number. A Huffman coding block 84 is for coding the outputs of the run length coding unit 82 and the coefficient grouping unit 83.

【0016】ハフマン符号化は、よく知られているよう
に、生起確率の高いシンボルに対して短い符号長を割り
当てるものである。同ブロックによって、さらに冗長符
号の圧縮が行われる。
As is well known, Huffman coding assigns a short code length to a symbol having a high probability of occurrence. The redundant code is further compressed by this block.

【0017】次に、圧縮データの格納構造について、図
16を用いて説明する。図16中、87は一枚の画像分
のデータであり、85はヘッダ部、86は画像フレーム
部である。
Next, the storage structure of compressed data will be described with reference to FIG. In FIG. 16, 87 is data for one image, 85 is a header part, and 86 is an image frame part.

【0018】ヘッダ部85においては、SOI、DH
T、DQT、DAC、DRI、COM、APPなどのコ
ードが記述される。これらのコードの中で、上記手順と
関連するものは、ハフマンテーブルの定義コードDH
T、量子化テーブル定義コードDQTである。
In the header section 85, SOI, DH
Codes such as T, DQT, DAC, DRI, COM, and APP are described. Among these codes, the one related to the above procedure is the Huffman table definition code DH.
T, the quantization table definition code DQT.

【0019】画像フレーム部86においては、フレーム
開始コードSOFに続いて、圧縮データが記録される。
圧縮データは、Y信号、U信号およびV信号のそれぞれ
に分けて記録される(第1〜第3スキャン)。さらに、
各スキャン内では、制御コードの後に、ブロック毎に圧
縮データが格納される構造となっている。
In the image frame section 86, compressed data is recorded following the frame start code SOF.
The compressed data is recorded separately for each of the Y signal, the U signal, and the V signal (first to third scans). further,
Within each scan, compressed data is stored for each block after the control code.

【0020】次に、動画の圧縮手法である、MPEG方
式について説明する。MPEG方式は、複数枚の画像フ
レームを、GOP(グループ・オブ・ピクチャ)として
まとめて扱うようにしている。
Next, the MPEG method, which is a moving image compression method, will be described. The MPEG system handles a plurality of image frames collectively as a GOP (group of pictures).

【0021】そして、一つのGOPは、Iピクチャ、P
ピクチャおよびBピクチャの3種類の画像フレームから
構成されている。また、GOP内の各フレームの並び方
は、IBBPBBPBBPBBとなっている。
One GOP is an I picture, P
It is composed of three types of image frames, a picture and a B picture. The arrangement of the frames in the GOP is IBBPBBPBBPBB.

【0022】Iピクチャは、一つのGOP中に一枚だけ
存在し、JPEG方式と同様な手順で圧縮が行われてい
る。すなわち、RGB→YUV変換→DCT変換→量子
化→ジグザグスキャン→ハフマン符号化の順に圧縮が行
われて記録される。
Only one I-picture exists in one GOP, and compression is performed in the same procedure as in the JPEG system. That is, compression is performed and recorded in the order of RGB → YUV conversion → DCT conversion → quantization → zigzag scan → Huffman coding.

【0023】Pピクチャは、GOP中に3枚存在し、時
間的にIピクチャ、Pピクチャからフレーム間予測を行
って作成される。Bピクチャは、時間的に前後にあるI
ピクチャ、Pピクチャからフレーム間予測を行って作成
される。
There are three P pictures in the GOP, and they are created by temporally performing interframe prediction from I pictures and P pictures. B pictures are I that are temporally preceding and following.
It is created by performing inter-frame prediction from a picture and a P picture.

【0024】[0024]

【発明が解決しようとする課題】しかしながら、上記従
来の画像処理装置においては、画像データの内容に関わ
らずに一律な処理を行うため、画像の種類によって圧縮
率が低下する問題点があった。特に、ランレングス符号
化部82においては、画像の種類によって0係数の分布
状態が異なるために、符号化効率が極端に悪化すること
があった。
However, in the above-mentioned conventional image processing apparatus, since the uniform processing is performed regardless of the content of the image data, there is a problem that the compression rate is lowered depending on the type of the image. In particular, in the run-length encoding unit 82, the distribution state of 0 coefficients differs depending on the type of image, so that the encoding efficiency may be extremely deteriorated.

【0025】本発明は上述の問題点にかんがみ、画像圧
縮に伴う画像の劣化を最小限に抑えるようにするととも
に、高い圧縮率で安定して画像圧縮を行うことができる
ようにすることを目的とする。
In view of the above problems, it is an object of the present invention to minimize the deterioration of an image due to image compression and to enable stable image compression at a high compression rate. And

【0026】[0026]

【課題を解決するための手段】本発明の画像処理装置
は、空間周波数領域での量子化を行う量子化手段と、上
記量子化手段によって量子化された分布係数を一次元配
列に並べ替える配列変換手段とを有し、上記配列変換手
段から出力される一次元配列に符号化を施して画像デー
タを圧縮するようにした画像処理装置において、上記空
間周波数領域における係数の分布形状を判定する分布形
状判定手段と、上記配列変換手段で行われる複数種類の
配列変換パターンが格納されているスキャンパターン格
納手段と、上記分布形状判定の出力に対応する配列変換
パターンを上記スキャンパターン格納手段から読みだし
て上記配列変換手段に設定する配列変換パターン設定手
段とを具備している。
The image processing apparatus of the present invention comprises a quantizing means for quantizing in the spatial frequency domain, and an array for rearranging the distribution coefficients quantized by the quantizing means into a one-dimensional array. An image processing apparatus having a conversion unit for compressing image data by encoding a one-dimensional array output from the array conversion unit, a distribution for determining a distribution shape of coefficients in the spatial frequency domain. Shape determining means, scan pattern storing means in which a plurality of types of array conversion patterns performed by the array converting means are stored, and array conversion patterns corresponding to the output of the distribution shape determination are read from the scan pattern storing means. And array conversion pattern setting means for setting the array conversion means.

【0027】また、本発明の画像処理装置の他の特徴と
するところは、画像を複数の領域に分割する領域分割手
段を更に設け、上記領域分割手段によって複数に分割し
た各領域毎に係数の分布形状を検出する処理を行い、各
領域毎に最適なスキャンパターンを設定するようにして
いる。
Another feature of the image processing apparatus of the present invention is that it further comprises area dividing means for dividing an image into a plurality of areas, and the coefficient division is performed for each area divided by the area dividing means. The process of detecting the distribution shape is performed, and the optimum scan pattern is set for each area.

【0028】また、本発明の画像処理装置のその他の特
徴とするところは、上記符号化はエントロピー符号化で
あることを特徴としている。
Another feature of the image processing apparatus of the present invention is that the above-mentioned encoding is entropy encoding.

【0029】また、本発明の画像処理方法の特徴とする
ところは、空間周波数領域での量子化を行い、上記量子
化された分布係数を一次元配列に並べ替える配列変換処
理を行い、さらに上記並べ替えられた一次元配列に符号
化を施して画像データを圧縮するようにした画像処理方
法において、上記空間周波数領域における係数の分布形
状を判定する分布形状判定処理と、上記配列変換処理を
行うために用いる複数種類の配列変換パターンをスキャ
ンパターン格納部に格納しておくスキャンパターン格納
処理と、上記分布形状判定処理の結果に対応する配列変
換パターンを上記スキャンパターン格納部から読みだし
て上記配列変換処理を行うための配列変換手段に設定す
る配列変換パターン設定処理とを行うようにしている。
A feature of the image processing method of the present invention is that quantization in the spatial frequency domain is performed, and array conversion processing for rearranging the quantized distribution coefficients into a one-dimensional array is performed. In an image processing method for compressing image data by encoding a rearranged one-dimensional array, a distribution shape determination processing for determining a distribution shape of coefficients in the spatial frequency domain and an array conversion processing are performed. A plurality of types of array conversion patterns used for this purpose are stored in the scan pattern storage unit, and an array conversion pattern corresponding to the result of the distribution shape determination process is read from the scan pattern storage unit and the array An array conversion pattern setting process that is set in the array conversion means for performing the conversion process is performed.

【0030】また、本発明の画像処理方法お他の特徴と
するところは、画像を複数の領域に分割する領域分割処
理を更に行い、上記分割した各領域毎に係数の分布形状
を検出する処理を行って、各領域毎に最適なスキャンパ
ターンを設定するようにしている。
Another feature of the image processing method of the present invention is that the image is further divided into a plurality of areas, and area distribution processing is performed to detect the coefficient distribution shape for each of the divided areas. By doing so, an optimum scan pattern is set for each area.

【0031】[0031]

【作用】本発明は上記技術手段を有するので、分布形状
判定によって検出した画像データの分布形状に合わせて
配列変換パターンが変更されるようになり、画像の種類
に関わらず、配列中の0データを長くとることができる
ようになる。これにより、画像の劣化が最小限に抑えら
れるとともに、高い圧縮率で安定して画像圧縮を行うこ
とができるようになる
Since the present invention has the above technical means, the array conversion pattern can be changed according to the distribution shape of the image data detected by the distribution shape determination, and the 0 data in the array is irrespective of the type of the image. Will be able to take longer. This minimizes image deterioration and enables stable image compression at a high compression rate.

【0032】また、本発明の他の特徴によれば、同一領
域内のブロックは同じような色相やテクスチャを有する
とともに、係数の分布形状もほぼ同様であるという特性
を最大限に利用した画像圧縮を行うことが可能となる。
Further, according to another feature of the present invention, the image compression utilizing the characteristics that the blocks in the same region have similar hues and textures and the distribution shapes of the coefficients are substantially the same, to the maximum extent. It becomes possible to do.

【0033】[0033]

【実施例】以下、本発明の画像処理装置および画像処理
方法の実施例を図面を参照して説明する。図1は、本実
施例の画像処理装置に用いられる画像圧縮伸長部16の
詳細な構成を説明するためのブロック図である。
Embodiments of the image processing apparatus and the image processing method of the present invention will be described below with reference to the drawings. FIG. 1 is a block diagram for explaining the detailed configuration of the image compression / decompression unit 16 used in the image processing apparatus of this embodiment.

【0034】図1中、20は分布形状判定部、21はス
キャンパターン格納部、22はスキャンテーブル選択部
である。また、91はRGB−YUV変換部、92はD
CT変換部、93は量子化部、94はジグザグスキャン
部、95はハフマン符号化部、96は量子化テーブル、
97はハフマン符号化テーブルである。なお、RGB−
YUV変換部91〜ハフマン符号化テーブル97は、従
来技術で説明した構成と同様の構成であるので、詳細な
説明を省略する。
In FIG. 1, 20 is a distribution shape determination unit, 21 is a scan pattern storage unit, and 22 is a scan table selection unit. Further, 91 is an RGB-YUV conversion unit, and 92 is D
CT conversion unit, 93 quantization unit, 94 zigzag scanning unit, 95 Huffman coding unit, 96 quantization table,
Reference numeral 97 is a Huffman coding table. RGB-
The YUV conversion unit 91 to the Huffman coding table 97 have the same configurations as the configurations described in the related art, and thus detailed description thereof will be omitted.

【0035】先ず、装置全体の動作を説明すると、画像
の圧縮を行うときには、RGB−YUV変換部91から
画像データを入力して画像圧縮を行い、圧縮した画像デ
ータをハフマン符号化部95から出力するようにしてい
る。また、画像の伸長を行うときは、ハフマン符号化部
95から圧縮された画像データを入力して画像の伸長を
行い、RGB−YUV変換部91から伸長した画像デー
タを出力するようにしている。
First, the operation of the entire apparatus will be described. When the image is compressed, the image data is input from the RGB-YUV converter 91, the image is compressed, and the compressed image data is output from the Huffman encoder 95. I am trying to do it. Further, when the image is expanded, the compressed image data is input from the Huffman encoding unit 95 to expand the image, and the expanded image data is output from the RGB-YUV conversion unit 91.

【0036】<分布形状判定部の処理の説明(図4、図
8)>次に、分布形状判定部20の動作について説明す
る。分布形状判定部20は、DCT変換部92から出力
される分布係数ブロックの形状を、あらかじめ設定され
たパターンと比較して形状判定するものである。
<Description of Processing of Distribution Shape Determining Section (FIGS. 4 and 8)> Next, the operation of the distribution shape determining section 20 will be described. The distribution shape determination unit 20 determines the shape by comparing the shape of the distribution coefficient block output from the DCT conversion unit 92 with a preset pattern.

【0037】図4(a)〜(c)に分布パターンの例を
示す。各パターンにおいて、8×8サイズのブロックが
2つの領域に分割されている。例えば、図4(a)にお
いては、網点で示される第1の領域(1)(73)と、
白地部分の第2の領域(2)(76)とに分割されてい
る。図4(b)、(c)においても同様に、74、75
が第1の領域(1)であり、77および78が第2の領
域(2)として分割される。
FIGS. 4A to 4C show examples of distribution patterns. In each pattern, an 8 × 8 size block is divided into two regions. For example, in FIG. 4A, the first areas (1) and (73) indicated by halftone dots,
It is divided into the second areas (2) and (76) of the white background. Similarly in FIGS. 4B and 4C, 74, 75
Is the first area (1), and 77 and 78 are divided as the second area (2).

【0038】これら分布パターンと実画像の対応を述べ
る。先ず、画像に明確な横縞が多く含まれるときに、係
数ブロックはA分布を示す。また、明確な縦縞が多く含
まれるときに、係数ブロックはB分布を示す。その他の
場合、風景などはC分布を示す。さらに、対応する分布
パターンの第1の領域(1)に係数が集中し、第2の領
域(2)は係数がほぼ0となっている。
The correspondence between these distribution patterns and actual images will be described. First, when the image contains many distinct horizontal stripes, the coefficient block exhibits an A distribution. Further, when many clear vertical stripes are included, the coefficient block shows a B distribution. In other cases, landscape etc. shows C distribution. Further, the coefficients are concentrated in the first area (1) of the corresponding distribution pattern, and the coefficient is almost 0 in the second area (2).

【0039】以下の説明では、図4の分布パターンを用
いた、分布係数ブロックの形状判定処理を説明する。先
ず、ブロックに対して、各分布パターンの第1の領域
(1)に含まれる係数値の絶対値を積算する。そして、
各分布パターンの積算値を比較し、最大の積算値を持つ
パターンをブロックの分布形状と判定する。すなわち、
ブロックの係数分布形状を、第1の領域(1)の積算値
の大小で判定するのである。
In the following description, the shape determination processing of the distribution coefficient block using the distribution pattern of FIG. 4 will be described. First, the absolute values of the coefficient values included in the first area (1) of each distribution pattern are integrated for the block. And
The integrated values of the respective distribution patterns are compared, and the pattern having the maximum integrated value is determined as the block distribution shape. That is,
The coefficient distribution shape of the block is determined by the magnitude of the integrated value in the first area (1).

【0040】図8は、上述の判定手順の処理の流れを示
すフローチャートであり、図8を用いて説明を行う。先
ず、ステップS100では、第1の分布パターンAにつ
いて、第1の領域(1)に含まれる係数の積算を行う。
係数値をC(n)、積算和をSumAとすると、下記に
示す式により、
FIG. 8 is a flow chart showing the flow of processing of the above-mentioned determination procedure, which will be described with reference to FIG. First, in step S100, for the first distribution pattern A, the coefficients included in the first region (1) are integrated.
Assuming that the coefficient value is C (n) and the integrated sum is SumA,

【0041】[0041]

【数1】 [Equation 1]

【0042】で算出する。It is calculated by

【0043】次のステップS101では、同様に、第2
の分布パターンBについて係数の積算和SumBを求め
る。また、次のステップS102では、第3の分布パタ
ーンCについて積算和SumCを求める。
In the next step S101, similarly, the second
The cumulative sum SumB of the coefficients is obtained for the distribution pattern B of. Further, in the next step S102, the integrated sum SumC is obtained for the third distribution pattern C.

【0044】次に、ステップS103では、積算和Su
mA、SumB、SumCの中で最大のものを判定す
る。続くステップS104では、判定された分布形状を
出力して処理を終了する。以上に説明したステップS1
00〜ステップS104の処理によって、ブロックの係
数分布形状を判定することができる。
Next, in step S103, the integrated sum Su
The largest one among mA, SumB, and SumC is determined. In the following step S104, the determined distribution shape is output, and the process ends. Step S1 described above
The coefficient distribution shape of the block can be determined by the processing of 00 to step S104.

【0045】<スキャンテーブル選択部22の処理の説
明(図5、図6、図9)>続いて、スキャンテーブル選
択部22の動作について説明する。ここでは、分布形状
判定部20の出力に対応するスキャンパターンを、スキ
ャンパターン格納部21から読みだし、ジグザグスキャ
ン部94に設定する動作を行う。
<Description of Processing by Scan Table Selection Unit 22 (FIGS. 5, 6, 9)> Next, the operation of the scan table selection unit 22 will be described. Here, the scan pattern corresponding to the output of the distribution shape determination unit 20 is read from the scan pattern storage unit 21 and set in the zigzag scan unit 94.

【0046】図5(a)〜(c)は、スキャンパターン
格納部21に格納されているスキャンパターンの内容を
説明する図である。各スキャンパターンにおいては、指
示線66、67、63に示される順番で配列化される。
図5(a)のパターンは、分布形状判定部20の結果と
して、A分布であったときに選択される。
FIGS. 5A to 5C are views for explaining the contents of the scan pattern stored in the scan pattern storage unit 21. In each scan pattern, they are arranged in the order shown by the instruction lines 66, 67, 63.
The pattern of FIG. 5A is selected when the distribution shape determination unit 20 has the A distribution as a result.

【0047】また、図5(b)のパターンはB分布であ
ったとき、図5(c)のパターンはC分布であったとき
に選択される。図5(a)においては、1行1列目の係
数から始まり、行方向にスキャンが行われる。A分布の
場合、係数は1列目に集中するから、2列目以降は0が
連続することになる。
The pattern of FIG. 5B is selected when the pattern has B distribution, and the pattern of FIG. 5C is selected when it has C distribution. In FIG. 5A, scanning is performed in the row direction starting from the coefficient in the first row and the first column. In the case of the A distribution, the coefficients are concentrated in the first column, so 0 will continue from the second column onward.

【0048】すなわち、スキャン後の一次元配列を考え
ると、9番目の要素以降は0の連続となる。一方、図5
(b)のパターンは、列方向にスキャンを行う。B分布
の場合の係数は1行目に集中するから、図5(b)のス
キャンを行うことで、9番目以降の配列要素を0の連続
とすることができる。図5(c)のパターンは従来のも
のと同様であり、対角線方向に行う。
That is, considering the one-dimensional array after scanning, 0s are continuous from the 9th element onward. On the other hand, FIG.
The pattern (b) is scanned in the column direction. Since the coefficients in the case of B distribution are concentrated in the first row, the 9th and subsequent array elements can be made continuous with 0s by performing the scan in FIG. 5B. The pattern of FIG. 5C is similar to the conventional one, and is performed in the diagonal direction.

【0049】図9は、スキャンパターンを選択する処理
の流れを示すフローチャートであり、次に、図9を用い
て説明を行う。先ず、ステップS110では、分布形状
判定部20から分布形状を入力する。次に、ステップS
111では、ブロックがA分布であるか否かを判定し、
肯定であればステップS112に進み、否定であればス
テップS113に進む。
FIG. 9 is a flow chart showing the flow of processing for selecting a scan pattern, which will be described below with reference to FIG. First, in step S110, the distribution shape is input from the distribution shape determination unit 20. Next, step S
At 111, it is determined whether the block has an A distribution,
If affirmative, the process proceeds to step S112, and if negative, the process proceeds to step S113.

【0050】ステップS112に進んだ場合は、ジグザ
グスキャン部94に図5(a)のパターンを設定し、処
理を終了する。また、ステップS113に進んだ場合
は、ブロックがB分布であるか否かを判定し、肯定であ
ればステップS114に進み、否定であればステップS
115に進む。
If the process proceeds to step S112, the pattern shown in FIG. 5A is set in the zigzag scanning unit 94, and the process ends. If the process proceeds to step S113, it is determined whether the block has a B distribution. If the result is affirmative, the process proceeds to step S114, and if the result is negative, the process proceeds to step S114.
Proceed to 115.

【0051】ステップS114に進んだ場合は、ジグザ
グスキャン部94に図5(b)のパターンを設定して処
理を終了する。また、ステップS115に進んだ場合
は、ジグザグスキャン部94に図5(c)のパターンを
設定して処理を終了する。
If the process proceeds to step S114, the pattern shown in FIG. 5B is set in the zigzag scanning unit 94 and the process ends. If the process proceeds to step S115, the pattern shown in FIG. 5C is set in the zigzag scanning unit 94 and the process ends.

【0052】続いて、スキャン後の一次元配列の格納の
様子を、図6(a)〜(c)を用いて説明する。図6
(a)において、50は図5(a)のスキャンを行った
結果である。配列要素SD(n)の中に、ブロックマト
リクスが行方向に格納されていることが分かる。
Next, how the one-dimensional array is stored after scanning will be described with reference to FIGS. Figure 6
In (a), 50 is the result of performing the scan of FIG. 5 (a). It can be seen that the block matrix is stored in the row direction in the array element SD (n).

【0053】図6(b)において、51は図5(b)の
スキャンを行った結果である。配列要素SD(n)内
に、列方向に格納されていることが分かる。図6(c)
において、52は図5(c)のスキャンを行った結果で
ある。以上の処理により、分布形状に応じてスキャンパ
ターンを選択する処理ができる。
In FIG. 6B, 51 is the result of the scan of FIG. 5B. It can be seen that the array elements SD (n) are stored in the column direction. FIG. 6 (c)
In the figure, 52 is the result of the scan of FIG. Through the above processing, the processing of selecting the scan pattern according to the distribution shape can be performed.

【0054】<格納形態の説明(図7、図16)>以下
では、ハフマン符号化を行った後のデータ格納構造につ
いて説明する。本実施例において、全体の格納構造は図
16のものと同様である。図中で、単位ブロック内の格
納構造は、図7に示す順序で行う。
<Description of Storage Form (FIGS. 7 and 16)> The data storage structure after Huffman coding will be described below. In this embodiment, the entire storage structure is similar to that shown in FIG. In the figure, the storage structure in the unit block is performed in the order shown in FIG.

【0055】図7において、40は1ブロック分の圧縮
データである。41はスキャンパターンの番号であり、
A分布、B分布、C分布のそれぞれに対応したハフマン
コードが記録される。42〜48は、図6に示した配列
データをハフマン符号化した、圧縮データである。図6
の格納形態をとることで、伸長時にもスキャンパターン
の選択を行うことができる。
In FIG. 7, 40 is compressed data for one block. 41 is the scan pattern number,
Huffman codes corresponding to the A distribution, the B distribution, and the C distribution are recorded. 42 to 48 are compressed data obtained by Huffman coding the array data shown in FIG. Figure 6
By adopting the storage form of, the scan pattern can be selected even at the time of decompression.

【0056】以上、説明したように本実施例によれば、
画像データの分布形状を判定してジグザグスキャンのパ
ターンを変更することができる。これにより、画像種類
に関わらず、配列中の0データを長くとることができる
ようになる。これは、ランレングス符号化の効率を高め
ることとなるので、画像の種類によらず高い圧縮率で画
像圧縮を行うことが可能となる。
As described above, according to this embodiment,
The pattern of zigzag scanning can be changed by determining the distribution shape of image data. As a result, the 0 data in the array can be taken long regardless of the image type. This enhances the efficiency of run-length encoding, so that it is possible to perform image compression at a high compression rate regardless of the type of image.

【0057】<装置構成の説明(図2)>次に、本実施
例の画像圧縮手段16をパーソナルコンピュータと組み
合わせて画像処理装置を構成した例を説明する。
<Explanation of Apparatus Configuration (FIG. 2)> Next, an example in which an image processing apparatus is constructed by combining the image compression means 16 of this embodiment with a personal computer will be explained.

【0058】図2は、本実施例における画像処理装置の
概略構成を示すブロックである。図中、1は装置全体の
制御を行うCPUであり、メモリ部3に格納されたプロ
グラムに従って演算、I/O制御などの処理を実行す
る。
FIG. 2 is a block diagram showing a schematic configuration of the image processing apparatus in this embodiment. In the figure, reference numeral 1 is a CPU that controls the entire apparatus, and executes processing such as calculation and I / O control according to a program stored in the memory unit 3.

【0059】周辺機器コントローラ2はCPU1とセッ
トで用いられ、周辺機器を制御するのに必要なI/O
(シリアル通信、パラレル通信、リアルタイムクロッ
ク、タイマ、割り込み制御、DMA制御等)の制御を行
う。
The peripheral device controller 2 is used as a set with the CPU 1, and is an I / O required to control the peripheral devices.
(Serial communication, parallel communication, real-time clock, timer, interrupt control, DMA control, etc.) are controlled.

【0060】メモリ部3は、メインメモリとして、DR
AM、キャッシュRAM、ROM等のメモリを含む。4
は、ユーザデータや装置の設定、画像データの記憶を行
うハードディスクドライブである。
The memory unit 3 serves as a main memory, and DR
It includes a memory such as an AM, a cache RAM, and a ROM. Four
Is a hard disk drive that stores user data, device settings, and image data.

【0061】7はキーボード制御部であり、8はキーボ
ードである。5はFDD制御部であり、6はフロッピー
ディスクドライブである。9は表示ユニットであり、上
記表示ユニット9において、10は表示制御部であり、
VRAM11から表示データを順次読みだし、階調変換
等を行いながら液晶パネル12へデータを転送する処理
を行うためのものである。
Reference numeral 7 is a keyboard control section, and 8 is a keyboard. Reference numeral 5 is an FDD control unit, and 6 is a floppy disk drive. Reference numeral 9 is a display unit, and in the display unit 9, 10 is a display control unit,
This is for performing a process of sequentially reading display data from the VRAM 11 and transferring the data to the liquid crystal panel 12 while performing gradation conversion and the like.

【0062】また、表示制御部10は、CPU1からV
RAM11へのアクセスと、VRAM11から表示部6
へデータ転送するアクセスが衝突しないようにするため
のパス制御も行う。
Further, the display control unit 10 controls the CPU 1 to V
Access to RAM 11 and display unit 6 from VRAM 11
Path control is also performed to prevent collision of access to data transfer.

【0063】さらには、VRAM11の内容に対してあ
らかじめ設定されたパターンとのAND、OR、EXO
R等の論理演算を行う。本実施例においては、液晶パネ
ル12は、各種ファイルの情報を表示するとともに、画
像データを表示するようにしている。
Furthermore, AND, OR, EXO with a pattern preset for the contents of the VRAM 11
Performs logical operations such as R. In the present embodiment, the liquid crystal panel 12 displays information of various files and also image data.

【0064】13は通信ユニットであり、上記通信ユニ
ット13において、15は通信インタフェースであり、
14は通信制御部である。なお、通信規格としては、R
S−232C、イーサネット等のシリアル通信、セント
ロニクス、SCSI等のパラレル通信のインタフェース
を備えている。そして、テキスト等の各種データに加
え、画像データの入出力を行う。次いで、16は静止画
像の圧縮および伸長行う画像圧縮伸長部である。
Reference numeral 13 is a communication unit. In the communication unit 13, 15 is a communication interface,
14 is a communication control unit. The communication standard is R
It has interfaces for serial communication such as S-232C and Ethernet, and parallel communication such as Centronics and SCSI. Then, in addition to various data such as text, image data is input / output. Next, 16 is an image compression / decompression unit that compresses and decompresses still images.

【0065】<画像圧縮伸長部の説明(図1)>本実施
例の画像圧縮伸長部16においては、RGB−YUV変
換、DCT変換、量子化、ハフマン符号化の手法を用い
て画像データの圧縮を行う。ここで、DCT処理後のブ
ロック毎に係数の分布形状を検出し、分布形状に応じて
ジグザグスキャンのパターンを切り換える動作を行う。
<Explanation of Image Compression / Expansion Unit (FIG. 1)> The image compression / expansion unit 16 of this embodiment compresses image data using RGB-YUV conversion, DCT conversion, quantization and Huffman coding. I do. Here, the distribution shape of the coefficients is detected for each block after the DCT processing, and the operation of switching the zigzag scan pattern according to the distribution shape is performed.

【0066】なお、本発明は、上述の実施例に限られる
ことなく、幅広く応用することができる。例えば、実施
例の分布形状判定部20はDCT変換部92から入力を
行ったが、量子化部93から入力するようにしてもよ
い。
The present invention is not limited to the above-mentioned embodiments, but can be widely applied. For example, although the distribution shape determination unit 20 of the embodiment inputs from the DCT conversion unit 92, the distribution shape determination unit 20 may input from the quantization unit 93.

【0067】また、分布形状判定部20における分布形
状判定を行うために、上述の実施例では画素値の積算値
を用いたが、値が0でない画素数を用いるようにしても
よい。さらに、スキャンパターンの例として、図5に示
したパターンを説明したが、任意のスキャンパターンを
用いることができる。
Further, in order to perform the distribution shape determination in the distribution shape determination unit 20, the integrated value of the pixel values is used in the above-mentioned embodiment, but the number of pixels whose value is not 0 may be used. Furthermore, although the pattern shown in FIG. 5 has been described as an example of the scan pattern, any scan pattern can be used.

【0068】例えば、図5のように往復スキャンするパ
ターンでなく、各行、各列の一方向にスキャンするもの
であってもよい。加えて、上記実施例では分布形状に応
じてスキャンテーブルを切り換える処理について説明を
行ったが、量子化テーブルをさらに切り換えるようにし
てもよい。
For example, instead of the reciprocal scanning pattern as shown in FIG. 5, scanning may be performed in one direction for each row and each column. In addition, in the above embodiment, the process of switching the scan table according to the distribution shape has been described, but the quantization table may be further switched.

【0069】このときの量子化テーブルは、分布形状に
合わせて量子化する値を配置する。例えば、図4におけ
る「第1の領域(1)」内は、量子化値を小さくし、分
布係数を保存するようにする。
In the quantization table at this time, values to be quantized are arranged according to the distribution shape. For example, in the “first area (1)” in FIG. 4, the quantized value is reduced and the distribution coefficient is saved.

【0070】それ以外の部分、「第2の領域(2)」は
量子化値を大きくし、不用な係数を消去するようにす
る。このような処理によって、画像の劣化の抑えなが
ら、圧縮効率を向上させることが可能となる。さらに、
本発明は動画圧縮にも応用することができる。
In the other portion, that is, in the "second area (2)", the quantization value is increased so that unnecessary coefficients are eliminated. By such processing, it is possible to improve the compression efficiency while suppressing the deterioration of the image. further,
The present invention can also be applied to video compression.

【0071】すなわち、MPEGのような圧縮方式にお
いて、Iピクチャの圧縮では、DCT変換−量子化−ジ
グザグスキャンの処理を共通して行っている。そこで、
Iピクチャの圧縮に本実施例の処理をそのまま利用する
ことができ、動画の圧縮効率を高めることができる。
That is, in the compression method such as MPEG, in the compression of the I picture, the processing of DCT conversion-quantization-zigzag scan is commonly performed. Therefore,
The processing of this embodiment can be used as it is for the compression of the I picture, and the compression efficiency of the moving image can be improved.

【0072】次に、本発明の第2の実施例を説明する。
上述の実施例では、ブロック毎に係数の分布形状を検出
し、ジグザグスキャンのパターンを変更する処理につい
て説明を行った。この第2の実施例では、先ず、始めに
画像を領域分割し、領域毎に係数の分布形状を検出する
処理について説明する。すなわち、同一領域内のブロッ
クは同じような色相やテクスチャをもち、係数の分布形
状もほぼ同様である。
Next, a second embodiment of the present invention will be described.
In the above-described embodiment, the process of detecting the coefficient distribution shape for each block and changing the zigzag scan pattern has been described. In the second embodiment, first, a process of dividing an image into regions and detecting a coefficient distribution shape for each region will be described. That is, the blocks in the same region have similar hues and textures, and the distribution shapes of the coefficients are almost the same.

【0073】そこで、始めに画像を複数の領域に分割
し、各領域毎に適当なジグザグスキャンのパターンを設
定すれば、上述の実施例とほぼ同様な効果を得ることが
できる。さらに、圧縮データ中には、領域当たり、スキ
ャンパターンのコードが一度しか書かれないので、画像
全体の圧縮率をより向上させることができる。
Therefore, if the image is first divided into a plurality of areas and an appropriate zigzag scan pattern is set for each area, the same effect as that of the above-described embodiment can be obtained. Furthermore, since the scan pattern code is written only once per region in the compressed data, the compression rate of the entire image can be further improved.

【0074】<領域分割例の説明(図10)>本実施例
においては、始めにブロック単位での領域分割を行う。
この領域分割は、濃度ヒストグラムによる方法や、クラ
スタリングによる方法などのような公知の技術を応用す
ることができる。
<Explanation of Example of Area Division (FIG. 10)> In the present embodiment, the area division is first performed in block units.
For this area division, known techniques such as a method using a density histogram and a method using clustering can be applied.

【0075】図10は、画像の領域分割を行った様子を
表す図であり、図10を用いて説明を行う。図中、20
0、201は、サンプル画像であり、202は8×8画
素で構成される単位ブロックである。
FIG. 10 is a diagram showing how the image is divided into areas, which will be described with reference to FIG. 20 in the figure
Reference numerals 0 and 201 are sample images, and 202 is a unit block composed of 8 × 8 pixels.

【0076】図10(a)において、203〜205は
画像中に含まれている対象物である。一方、図10
(b)は、ブロック単位の領域分割を行った結果であ
る。図10において、画像は、206〜209に示され
る4つの領域に分割される。同一の数字が記入されたブ
ロックが同一領域に属する。
In FIG. 10A, reference numerals 203 to 205 are objects included in the image. On the other hand, FIG.
(B) is a result of performing the area division in block units. In FIG. 10, the image is divided into four regions 206-209. The blocks in which the same numbers are entered belong to the same area.

【0077】<処理動作の説明(図11)>図11は、
本実施例の画像圧縮処理の流れを示すフローチャートで
あり、図11を用いて説明を行う。本実施例において
は、はじめに画像の領域分割を行う。次に、領域毎に分
布形状の検出を行う。続いて、検出結果に応じて、スキ
ャンパターンの設定処理を行う。
<Explanation of Processing Operation (FIG. 11)> FIG.
12 is a flowchart showing a flow of image compression processing of the present embodiment, which will be described with reference to FIG. 11. In this embodiment, the image area is first divided. Next, the distribution shape is detected for each area. Then, a scan pattern setting process is performed according to the detection result.

【0078】なお、本実施例では、実施例1でハードウ
ェアで実現していた、RGB−YUV変換、DCT変
換、量子化、ジグザグスキャン、ハフマン符号化などの
処理をソフトウェアで実現するものである。図中、ステ
ップS150では、ブロック単位での領域分割を行う。
In this embodiment, software such as RGB-YUV conversion, DCT conversion, quantization, zigzag scanning, and Huffman coding, which are realized by hardware in the first embodiment, are realized by software. . In the figure, in step S150, area division is performed in block units.

【0079】領域分割の方法は、濃度ヒストグラム法や
クラスタリング法など公知の方法を用いることができ、
ここでの説明は省略する。ステップS151では、全画
面について、RGB−YUV変換およびDCT変換処理
を行う。続くステップS152〜S155は、分割され
た領域毎に処理を行う。
A known method such as a density histogram method or a clustering method can be used as the area dividing method.
The description here is omitted. In step S151, RGB-YUV conversion and DCT conversion processing is performed on the entire screen. In subsequent steps S152 to S155, processing is performed for each of the divided areas.

【0080】ステップS152では、実施例1と同様の
方法を用いて、分布形状の検出を行う。計算を行うブロ
ックは、領域中央のブロックを用いる。また、ブロック
の選び方は、領域の角部や端面にあるものを用いてもよ
い。
In step S152, the distribution shape is detected using the same method as in the first embodiment. The block in the center of the area is used as the block for calculation. The block may be selected at the corners or end faces of the area.

【0081】さらに、領域全体について計算し、平均を
求めるようにしてもよい。次のステップS153では、
分布形状に応じてスキャンパターンの設定を行う。この
設定は、実施例1で説明した手順と同様である。
Further, the entire area may be calculated and the average may be obtained. In the next step S153,
The scan pattern is set according to the distribution shape. This setting is similar to the procedure described in the first embodiment.

【0082】ステップS154では、処理対象の領域内
のブロックについて、量子化処理、ジグザグスキャン処
理、ハフマン符号化を行う。ステップS155では、圧
縮されたデータの出力を行う。このデータは、ハードデ
ィスクドライブ4や通信ユニット13に出力される。な
お、出力のフォーマットについては後述する。
In step S154, quantization processing, zigzag scanning processing, and Huffman coding are performed on the blocks in the processing target area. In step S155, the compressed data is output. This data is output to the hard disk drive 4 and the communication unit 13. The output format will be described later.

【0083】ステップS156では、画像の全領域の変
換が終了したか否かを判定し、肯定であれば処理を終了
し、否定であればステップS152へ進む。以上の処理
により、画像の領域毎に分布形状を検出してスキャンパ
ターンの切り換える処理を行うことができる。
In step S156, it is determined whether or not the conversion of all areas of the image is completed. If the determination is affirmative, the process is terminated, and if the determination is negative, the process proceeds to step S152. With the above processing, it is possible to perform the processing of detecting the distribution shape for each area of the image and switching the scan pattern.

【0084】<圧縮データの格納構造の説明(図12)
>図12は、圧縮データの格納構造を示す図である。図
12(a)は、図16における、第nスキャンの構造に
対応する。各スキャン内は、ブロックの並びの順番で記
録されている。210は、図10の画像のB−Bで示す
ラインの格納状態を表す。同ラインは、211〜213
の3つの領域で構成されている。各領域の格納形式は、
図12(b)のようである。
<Description of Storage Structure of Compressed Data (FIG. 12)
> FIG. 12 is a diagram showing a storage structure of compressed data. FIG. 12A corresponds to the structure of the nth scan in FIG. Within each scan, the blocks are recorded in the order of arrangement. Reference numeral 210 represents the storage state of the line indicated by BB in the image of FIG. The same line is 211-213
It is composed of three areas. The storage format of each area is
It is as shown in FIG.

【0085】図中、221は領域の識別子であり、22
2は領域内のジグザグスキャンに使用したスキャンパタ
ーン番号である。223〜226は、ブロック毎の圧縮
データである。各ブロックの格納形式を第12(c)に
示す。42〜48は、ハフマン符号化を行った後の係数
データである。
In the figure, 221 is an area identifier, and 22
2 is a scan pattern number used for zigzag scanning within the area. 223 to 226 are compressed data for each block. The storage format of each block is shown in the 12th (c). 42 to 48 are coefficient data after Huffman coding.

【0086】以上のように格納を行うことで、スキャン
パターン番号の記録回数を低減することができる。ま
た、機器の構成によっては、領域の分割数や使用するス
キャンパターンをヘッダ部に格納することもできる。こ
のとき、スキャンパターン番号の記録回数は、領域当た
りでただ一度になり、圧縮率をさらに向上させることが
できる。
By storing as described above, the number of times the scan pattern number is recorded can be reduced. In addition, depending on the configuration of the device, the number of divided areas and the scan pattern to be used can be stored in the header section. At this time, the number of times the scan pattern number is recorded is only once per area, and the compression rate can be further improved.

【0087】以上、説明したように本実施例によれば、
領域毎に係数の分布形状を検出してスキャンパターンを
選択することで、上述の実施例と同様な効果を得ること
ができる。
As described above, according to this embodiment,
By detecting the distribution shape of the coefficient for each area and selecting the scan pattern, the same effect as that of the above-described embodiment can be obtained.

【0088】さらに、本実施例においては、スキャンパ
ターンコードの書き込み回数を低減できるので、より圧
縮率を向上できるという効果がある。同時に、分布形状
判定処理は、画像内の領域の数だけ行えばよいので、処
理速度を高速化することができる。
Furthermore, in the present embodiment, the number of times the scan pattern code is written can be reduced, so that the compression rate can be further improved. At the same time, the distribution shape determination process needs to be performed for the number of regions in the image, so that the processing speed can be increased.

【0089】[0089]

【発明の効果】本発明は上述したように、分布形状判定
によって検出された画像データの分布形状に応じて配列
変換パターンを変更することができるようになり、画像
の種類に関わらず、配列中の0データを長くとることが
できるようになる。これにより、画像の種類によらず高
い圧縮率で画像圧縮を行うことができるとともに、画像
の劣化を最小限に抑えることができる。
As described above, according to the present invention, the array conversion pattern can be changed according to the distribution shape of the image data detected by the distribution shape determination. It becomes possible to take 0 data for a long time. As a result, it is possible to perform image compression at a high compression rate regardless of the type of image, and it is possible to minimize deterioration of the image.

【0090】また、本発明の他の特徴によれば、同一領
域内のブロックは同じような色相やテクスチャを有する
とともに、係数の分布形状もほぼ同様であるという特性
を最大限に利用した画像圧縮を行うことができ、画像全
体の圧縮率をより向上させることができる。
Further, according to another feature of the present invention, the image compression which makes the maximum use of the characteristic that the blocks in the same region have similar hues and textures and the distribution shapes of the coefficients are also substantially the same. Can be performed, and the compression rate of the entire image can be further improved.

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

【図1】本発明の一実施例を示し、画像圧縮伸長部の構
成を示すブロック図である。
FIG. 1 is a block diagram showing a configuration of an image compression / decompression unit according to an embodiment of the present invention.

【図2】第1の実施例における画像処理装置の概略構成
を示すブロック図である。
FIG. 2 is a block diagram showing a schematic configuration of an image processing apparatus in the first embodiment.

【図3】(a)は、従来技術におけるDCT処理後の分
布係数の様子を説明する図、(b)および(c)は従来
技術におけるジグザグスキャンのスキャン順序を説明す
る図である。
FIG. 3A is a diagram for explaining the distribution coefficient after DCT processing in the conventional technique, and FIGS. 3B and 3C are diagrams for explaining the scan order of the zigzag scan in the conventional technique.

【図4】第1の実施例における分布形状判定部の設定パ
ターンを説明する図である。
FIG. 4 is a diagram illustrating a setting pattern of a distribution shape determination unit according to the first embodiment.

【図5】第1の実施例におけるジグザグスキャン部の設
定パターンを説明する図である。
FIG. 5 is a diagram illustrating a setting pattern of a zigzag scanning unit in the first embodiment.

【図6】第1の実施例におけるジグザグスキャン後の配
列データの並びを説明する図である。
FIG. 6 is a diagram illustrating the arrangement of array data after zigzag scanning in the first embodiment.

【図7】第1の実施例におけるハフマン符号化後のブロ
ックデータの格納構造を説明する図である。
FIG. 7 is a diagram illustrating a storage structure of block data after Huffman coding according to the first embodiment.

【図8】第1の実施例における分布形状判定部の処理の
流れを示すフローチャートである。
FIG. 8 is a flowchart showing a processing flow of a distribution shape determination unit in the first embodiment.

【図9】第1の実施例におけるスキャンパターン選択部
の処理の流れを示すフローチャートである。
FIG. 9 is a flowchart showing a processing flow of a scan pattern selection unit in the first embodiment.

【図10】第2の実施例における画像の領域分割の様子
を示す図である。
FIG. 10 is a diagram showing how an image is divided into areas according to the second embodiment.

【図11】第2の実施例における画像圧縮伸長処理の流
れを示すフローチャートである。
FIG. 11 is a flowchart showing the flow of image compression / decompression processing in the second embodiment.

【図12】第2の実施例における圧縮データの格納構造
を説明する図である。
FIG. 12 is a diagram illustrating a storage structure of compressed data according to a second embodiment.

【図13】従来技術における画像圧縮伸長部の構成を示
すブロック図である。
FIG. 13 is a block diagram showing a configuration of an image compression / decompression unit in the related art.

【図14】従来技術におけるハフマン符号化部の構成を
示すブロック図である。
FIG. 14 is a block diagram showing a configuration of a Huffman encoding unit in a conventional technique.

【図15】従来技術における量子化テーブルの様子を説
明する図である。
FIG. 15 is a diagram illustrating a state of a quantization table in the related art.

【図16】従来技術における圧縮データの格納構造を説
明する図である。
FIG. 16 is a diagram illustrating a storage structure of compressed data according to a conventional technique.

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

1 CPU 2 周辺コントローラ 3 メモリ部 4 ハードディスクドライブ 5 FDD制御部 6 FDDドライブ 7 キーボード制御部 8 キーボード 9 表示ユニット 10 表示制御部 11 VRAM 12 液晶ディスプレイ 13 通信ユニット 14 通信制御部 15 通信インタフェース 20 分布形状判定部 21 スキャンパターン格納部 22 スキャンテーブル選択部 81 0係数判定部 82 ランレングス符号化部 83 係数グループ化 84 ハフマン符号化ブロック 85 ヘッダ部 86 フレーム部 16 画像圧縮伸長部 91 RGB−YUV変換部 92 DCT変換部 93 量子化部 94 ジグザグスキャン部 95 ハフマン符号化部 96 量子化テーブル 97 ハフマン符号化テーブル 1 CPU 2 Peripheral controller 3 Memory part 4 Hard disk drive 5 FDD control part 6 FDD drive 7 Keyboard control part 8 Keyboard 9 Display unit 10 Display control part 11 VRAM 12 Liquid crystal display 13 Communication unit 14 Communication control part 15 Communication interface 20 Distribution shape judgment 21 scan pattern storing section 22 scan table selecting section 81 0 coefficient determining section 82 run length coding section 83 coefficient grouping 84 Huffman coding block 85 header section 86 frame section 16 image compression / decompression section 91 RGB-YUV conversion section 92 DCT Transformation unit 93 Quantization unit 94 Zigzag scanning unit 95 Huffman coding unit 96 Quantization table 97 Huffman coding table

Claims (5)

【特許請求の範囲】[Claims] 【請求項1】 空間周波数領域での量子化を行う量子化
手段と、上記量子化手段によって量子化された分布係数
を一次元配列に並べ替える配列変換手段とを有し、上記
配列変換手段から出力される一次元配列に符号化を施し
て画像データを圧縮するようにした画像処理装置におい
て、 上記空間周波数領域における係数の分布形状を判定する
分布形状判定手段と、 上記配列変換手段で行われる複数種類の配列変換パター
ンが格納されているスキャンパターン格納手段と、 上記分布形状判定の出力に対応する配列変換パターンを
上記スキャンパターン格納手段から読みだして上記配列
変換手段に設定する配列変換パターン設定手段とを具備
することを特徴とする画像処理装置。
1. A quantization means for performing quantization in a spatial frequency domain, and an array conversion means for rearranging the distribution coefficients quantized by the quantization means into a one-dimensional array. In an image processing apparatus that encodes an output one-dimensional array to compress image data, a distribution shape determination unit that determines a distribution shape of coefficients in the spatial frequency domain and an array conversion unit perform the above. A scan pattern storage unit that stores a plurality of types of array conversion patterns, and an array conversion pattern setting that reads the array conversion pattern corresponding to the output of the distribution shape determination from the scan pattern storage unit and sets it in the array conversion unit. An image processing apparatus comprising:
【請求項2】 画像を複数の領域に分割する領域分割手
段を更に設け、上記領域分割手段によって複数に分割し
た各領域毎に係数の分布形状を検出する処理を行い、各
領域毎に最適なスキャンパターンを設定するようにした
ことを特徴とする請求項1に記載の画像処理装置。
2. An area dividing means for dividing an image into a plurality of areas is further provided, and a process of detecting a coefficient distribution shape is performed for each of the areas divided by the area dividing means, and the optimum shape is obtained for each area. The image processing apparatus according to claim 1, wherein a scan pattern is set.
【請求項3】 上記符号化はエントロピー符号化である
ことを特徴とする請求項1または2のいずれか1項に記
載の画像処理装置。
3. The image processing apparatus according to claim 1, wherein the encoding is entropy encoding.
【請求項4】 空間周波数領域での量子化を行い、上記
量子化された分布係数を一次元配列に並べ替える配列変
換処理を行い、さらに上記並べ替えられた一次元配列に
符号化を施して画像データを圧縮するようにした画像処
理方法において、 上記空間周波数領域における係数の分布形状を判定する
分布形状判定処理と、 上記配列変換処理を行うために用いる複数種類の配列変
換パターンをスキャンパターン格納部に格納しておくス
キャンパターン格納処理と、 上記分布形状判定処理の結果に対応する配列変換パター
ンを上記スキャンパターン格納部から読みだして上記配
列変換処理を行うための配列変換手段に設定する配列変
換パターン設定処理とを行うようにしたことを特徴とす
る画像処理方法。
4. Quantization in a spatial frequency domain, array conversion processing for rearranging the quantized distribution coefficients into a one-dimensional array, and further encoding the rearranged one-dimensional array. In an image processing method for compressing image data, a distribution pattern determination process for determining a distribution pattern of coefficients in the spatial frequency domain, and a plurality of types of array conversion patterns used for performing the array conversion process are stored in a scan pattern. Array for storing scan pattern storage process and array conversion pattern corresponding to the result of the distribution shape determination process from the scan pattern storage unit and set in the array conversion means for performing the array conversion process. An image processing method, characterized in that conversion pattern setting processing is performed.
【請求項5】 画像を複数の領域に分割する領域分割処
理を更に行い、上記分割した各領域毎に係数の分布形状
を検出する処理を行って、各領域毎に最適なスキャンパ
ターンを設定するようにしたことを特徴とする請求項3
に記載の画像処理方法。
5. An area dividing process for dividing an image into a plurality of regions is further performed, and a process for detecting a coefficient distribution shape is performed for each of the divided regions to set an optimum scan pattern for each region. 4. The method according to claim 3, wherein
The image processing method described in.
JP6248195A 1995-03-22 1995-03-22 Image processing apparatus and image processing method Pending JPH08265755A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP6248195A JPH08265755A (en) 1995-03-22 1995-03-22 Image processing apparatus and image processing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP6248195A JPH08265755A (en) 1995-03-22 1995-03-22 Image processing apparatus and image processing method

Publications (1)

Publication Number Publication Date
JPH08265755A true JPH08265755A (en) 1996-10-11

Family

ID=13201426

Family Applications (1)

Application Number Title Priority Date Filing Date
JP6248195A Pending JPH08265755A (en) 1995-03-22 1995-03-22 Image processing apparatus and image processing method

Country Status (1)

Country Link
JP (1) JPH08265755A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001016588A (en) * 1999-06-28 2001-01-19 Toshikazu Akama Signal processing system
JP2005160021A (en) * 2003-11-06 2005-06-16 Matsushita Electric Ind Co Ltd Signal processing method and signal processing apparatus
WO2006100946A1 (en) * 2005-03-24 2006-09-28 Pioneer Corporation Image signal re-encoding apparatus and image signal re-encoding method
JP2007166617A (en) * 2005-12-12 2007-06-28 Samsung Electronics Co Ltd Video intra prediction encoding and decoding method and apparatus
US7308031B2 (en) 1996-10-31 2007-12-11 Kabushiki Kaisha Toshiba Video encoding apparatus and video decoding apparatus

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7308031B2 (en) 1996-10-31 2007-12-11 Kabushiki Kaisha Toshiba Video encoding apparatus and video decoding apparatus
JP2001016588A (en) * 1999-06-28 2001-01-19 Toshikazu Akama Signal processing system
JP2005160021A (en) * 2003-11-06 2005-06-16 Matsushita Electric Ind Co Ltd Signal processing method and signal processing apparatus
WO2006100946A1 (en) * 2005-03-24 2006-09-28 Pioneer Corporation Image signal re-encoding apparatus and image signal re-encoding method
JP2007166617A (en) * 2005-12-12 2007-06-28 Samsung Electronics Co Ltd Video intra prediction encoding and decoding method and apparatus

Similar Documents

Publication Publication Date Title
JP5232863B2 (en) Method and system for data compression
JP4870743B2 (en) Selective chrominance decimation for digital images
KR100932412B1 (en) Configurable Pattern Optimizer
CN1303820C (en) Quality-based image compression
US7248735B2 (en) Compression and decompression method of image data
JP3618833B2 (en) Image processing apparatus and method
JPH05298419A (en) Picture filing device
JP2005191956A (en) Display data compression/expansion method
JPH08265755A (en) Image processing apparatus and image processing method
JP3469438B2 (en) Image signal processing method and apparatus, recording medium
JPH08205144A (en) Image coding device
US20110242112A1 (en) Display device and driving circuit thereof
EP1629675B1 (en) Fixed bit rate, intraframe compression and decompression of video
US20060056715A1 (en) Image conversion device, image conversion method, and recording medium
JP4649237B2 (en) Image compression apparatus, image compression method, and image compression program
JPH10136309A (en) Image compression / storage device
JPH0856358A (en) Image data encoding device
JP2003348355A (en) Image processing apparatus and control method therefor
JP4795160B2 (en) Image processing apparatus, control method therefor, computer program, and computer-readable storage medium
JP2008042683A (en) Image processing apparatus, control method therefor, computer program, and computer-readable storage medium
JPH08204957A (en) Image processing method
JPH0916769A (en) Image processing apparatus and method
JP2005086353A (en) Image processing apparatus, control method therefor, computer program, and computer-readable storage medium
JP2010141775A (en) Display device driving circuit and display device
JP2001128182A (en) Image encoding method and computer-readable recording medium storing image encoding program