JPH0654208A - Image processing method/device - Google Patents

Image processing method/device

Info

Publication number
JPH0654208A
JPH0654208A JP4205249A JP20524992A JPH0654208A JP H0654208 A JPH0654208 A JP H0654208A JP 4205249 A JP4205249 A JP 4205249A JP 20524992 A JP20524992 A JP 20524992A JP H0654208 A JPH0654208 A JP H0654208A
Authority
JP
Japan
Prior art keywords
data
pixel
comparison
pixel data
compression
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.)
Withdrawn
Application number
JP4205249A
Other languages
Japanese (ja)
Inventor
Yukari Shimomura
ゆかり 下村
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 JP4205249A priority Critical patent/JPH0654208A/en
Priority to EP19930305961 priority patent/EP0583107B1/en
Priority to DE1993629519 priority patent/DE69329519T2/en
Publication of JPH0654208A publication Critical patent/JPH0654208A/en
Priority to US08/521,466 priority patent/US6028961A/en
Withdrawn legal-status Critical Current

Links

Abstract

PURPOSE:To compress the image data with high picture quality and at the fixed compression rate by selecting the reversible compression processing or the non-reversible compression processing based on the relationship between the quantity of compressed data undergone the reversible compression of a block and a prescribed quantity of data. CONSTITUTION:An image processor which processes the image data for each block is provided with a reversible compressing means 3 which reversibly compress the blocks and an ADCT compressing means 4 which non-reversibly compress the image data. Then the block undergoes the reversible compressing processing with D<=L and the non-reversible compression processing with D>L respectively (D: the compressed data quantity obtained with the reversible compression of the block; L: the prescribed data quantity). Then the result obtained by expanding the compressed data as the reversible compressed data or the result obtained by expanding the compressed data as the non-reversible compressed data is selected baded on the input information. Thus, the original image data are restored. As the result, the images produced by a computer can be reversibly compressed and the picture quality of the natural images can be improved with the non-reversible compression processing.

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 method and an image processing apparatus, for example, an image compression method, an image compression apparatus, and an image compression method for switching image data by switching between lossless compression and lossy compression according to the type of image. , A data decompression method for decompressing data in which lossless compression data and lossy compression data are mixed.

【0002】[0002]

【従来の技術】近年、DTPなどの普及によつて、コン
ピユータ上で作成される画像の高画質化が要求され、カ
ラー化,多階調化が進んでいる。この種の画像における
情報量は、例えばA4サイズ,400dpi,256階
調,3原色カラーの場合で、約46Mバイトにもなる。
画像データを、ページ記述言語(以下「PDL」とい
う)などのコード情報として扱えば、情報量は少なくな
るが、コード情報から画像データへの展開に時間がかか
る上に、コード情報を展開しても、元の画像データを完
全には再現できないという問題点があり、そのため画像
データの圧縮技術が重要になる。
2. Description of the Related Art In recent years, with the spread of DTP and the like, it has been required to improve the image quality of an image created on a computer, and colorization and multi-gradation have been advanced. The amount of information in this type of image is, for example, about 46 Mbytes in the case of A4 size, 400 dpi, 256 gradations, and three primary color colors.
If the image data is handled as code information such as a page description language (hereinafter referred to as “PDL”), the amount of information is reduced, but it takes time to develop the code information into image data, and the code information is developed. However, there is a problem that the original image data cannot be completely reproduced, and therefore the image data compression technique becomes important.

【0003】カラー多値画像の一般的な圧縮方法とし
て、JPEG(Joint Photographic Expent Group)が推
奨するADCT(Adaptive Discrete Cosine Transform)
方式があり、このADCT画像圧縮法について以下に説
明する。図14はADCT画像圧縮装置の構成を示すブ
ロツク図である。図14において、3101は色変換部
で、NTSC方式のRGB色空間を、輝度信号Yと2つ
の色差信号Cr,Cbとで表されるYCrCb色空間に
変換する。
As a general compression method for color multi-valued images, ADCT (Adaptive Discrete Cosine Transform) recommended by JPEG (Joint Photographic Expent Group)
There is a method, and the ADCT image compression method will be described below. FIG. 14 is a block diagram showing the configuration of the ADCT image compression device. In FIG. 14, a color conversion unit 3101 converts the RGB color space of the NTSC system into a YCrCb color space represented by a luminance signal Y and two color difference signals Cr and Cb.

【0004】3102はサブサンプリング部で、人間の
眼が輝度に敏感で色差に鈍感であるという特性を利用し
て、色差データの減少を行う。具体的には、サブサンプ
リング部3102は、隣り合う2つの色差データの平均
値をとつて、色差データの量を1/2に減少させる。3
103はDCTで、サブサンプリング部3102から出
力された画像データを、水平および垂直方向に隣り合う
8×8のブロツクに分割し、さらに、DCT(離散コサ
イン変換)を施して、周波数空間データに変換する。
A sub-sampling unit 3102 reduces the color difference data by utilizing the characteristics that human eyes are sensitive to luminance and insensitive to color difference. Specifically, the sub-sampling unit 3102 reduces the amount of color difference data by half by taking the average value of two adjacent color difference data. Three
Reference numeral 103 denotes a DCT, which divides the image data output from the sub-sampling unit 3102 into horizontally and vertically adjacent 8 × 8 blocks, and further performs DCT (discrete cosine transform) to transform the frequency space data. To do.

【0005】3104は量子化部で、8×8=64個の
各DCT係数を、ステツプ幅の異なつた量子化値で除し
て、量子化データにする。3105は符号部で、量子化
部3104から出力された64個の量子化DCT係数
を、1個のDC係数と63個のAC係数とに分け、各係
数をJPEG推奨のハフマンテーブルに従つて符号化す
る。符号化されたデータは、量子化テーブルデータ,ハ
フマンテーブルデータなどのヘツダを添付した上で、メ
モリへ蓄積されるか、または他の装置へ送信される。
A quantizer 3104 divides each 8 × 8 = 64 DCT coefficients by a quantized value having a different step width to obtain quantized data. A coding unit 3105 divides the 64 quantized DCT coefficients output from the quantization unit 3104 into one DC coefficient and 63 AC coefficients, and codes each coefficient according to the Huffman table recommended by JPEG. Turn into. The encoded data is attached to a header such as quantization table data and Huffman table data, and then stored in a memory or transmitted to another device.

【0006】図15はADCTデータ伸長装置の構成を
示すブロツク図である。図15において、3205は復
号部で、入力された符号データを復号して、量子化デー
タにする。3204は逆量子化部で、復号部2305か
ら出力された量子化データを、DCT係数データに変換
する。これは、図14の量子化部3104で量子化する
際に使用した量子化テーブルを用いて、64個の各係数
へ量子化値を乗ずることにより得られる。
FIG. 15 is a block diagram showing the structure of the ADCT data decompression device. In FIG. 15, a decoding unit 3205 decodes the input code data into quantized data. An inverse quantization unit 3204 converts the quantized data output from the decoding unit 2305 into DCT coefficient data. This can be obtained by multiplying each of the 64 coefficients by the quantized value using the quantization table used when the quantizer 3104 of FIG. 14 quantizes.

【0007】3203は逆DCTで、逆量子化部320
4から出力されたDCT係数データに逆DCTを施し
て、実画像データにする。3202は補間部で、逆DC
T3203から出力された画像データに欠落しているC
rおよびCbデータを、単純に繰返法によつて補間す
る。なお、CrおよびCbデータの欠落は、図14のサ
ブサンプリング部3102においてデータ圧縮したとき
に生じたものである。
An inverse DCT 3203 is an inverse quantizer 320.
Inverse DCT is applied to the DCT coefficient data output from No. 4 to obtain actual image data. 3202 is an interpolation unit, which is an inverse DC
C missing in the image data output from T3203
The r and Cb data are simply interpolated by an iterative method. The missing of Cr and Cb data occurs when the sub-sampling unit 3102 of FIG. 14 compresses the data.

【0008】3201は色変換部で、補間部3202か
ら出力されたYCrCb色空間データを、NTSC−R
GB色空間データ、または、そのデバイスの色空間デー
タに変換する。次に、ADCT画像圧縮装置の処理の流
れを実際のデータを示して説明する。図16はコンピユ
ータで作成されたカラー多値画像の画像データの一部を
示し、NTSC−RGB色空間データであり、カラー多
値画像の文字部分の展開された画像データの一部分(1
6画素×16画素)である。
A color conversion unit 3201 converts the YCrCb color space data output from the interpolation unit 3202 into NTSC-R.
Convert to GB color space data or color space data of the device. Next, the processing flow of the ADCT image compression apparatus will be described by showing actual data. FIG. 16 shows a part of image data of a color multi-valued image created by a computer, which is NTSC-RGB color space data, and a part (1) of the image data in which the character part of the color multi-valued image is developed.
6 pixels × 16 pixels).

【0009】図16において、3301はRデータ、3
302はGデータ、3303はBデータを示す。なお、
各画素のデータのレンジは8ビツト(0〜255)で、
同図には、(R,G,B)=(225,225,225)のやや暗い白の
下地に、(R,G,B)=(30,30,225)の青色の文字の一部
が描かれている。色変換部3101は、次式によつて、
NTSC−RGB色空間からYCrCb色空間への変換
を実行する。
In FIG. 16, 3301 is R data, 3
302 indicates G data and 3303 indicates B data. In addition,
The data range of each pixel is 8 bits (0 to 255),
In the figure, a part of the blue character of (R, G, B) = (30,30,225) is drawn on a slightly dark white background of (R, G, B) = (225,225,225). The color conversion unit 3101 uses the following equation:
Perform a conversion from the NTSC-RGB color space to the YCrCb color space.

【0010】 Y=0.299×R+0.587×G+0.114×B Cr=0.713(R−Y) Cb=0.564(B−Y) さらに、CCIRの勧告により、YCrCb色空間での
演算時のオーバシユート,アンダシユートを許容するた
め、次式によつてデータを丸める。
Y = 0.299 × R + 0.587 × G + 0.114 × B Cr = 0.713 (RY) Cb = 0.564 (BY) Further, according to the CCIR recommendation, overshoot and undershoot at the time of calculation in the YCrCb color space are performed. To allow, the data is rounded according to the following formula.

【0011】 Y=219.0×Y+16.5 Cr=224.0×Cr+128.5 Cb=224.0×Cb+128.5 サブサンプリング部3102は、上述の各式により得ら
れたCr,Cbデータに対してサブサンプリングを施
す。サブサンプリング法としては、単純間引き,MAX
データ選択,MINデータ選択などがあるが、ここでは
平均値法を使用する例を説明する。すなわち、平均値法
とは、隣り合つた2画素のデータの平均値を、1つのデ
ータとする方法である。
Y = 219.0 × Y + 16.5 Cr = 224.0 × Cr + 128.5 Cb = 224.0 × Cb + 128.5 The sub-sampling unit 3102 performs sub-sampling on the Cr and Cb data obtained by the above equations. As the sub-sampling method, simple thinning, MAX
Although there are data selection, MIN data selection, etc., an example using the average value method will be described here. That is, the average value method is a method in which the average value of the data of two adjacent pixels is taken as one data.

【0012】図17は図16に示した画像データを色変
換部3101とサブサンプリング部3102で処理した
結果を示す図である。図17において、3401はYデ
ータ、3402はCrデータ、3403はCbデータで
あり、Cr,Cbの各データ量は、サブサンプリングに
よつて1/2に減少している。
FIG. 17 is a diagram showing a result of processing the image data shown in FIG. 16 by the color conversion unit 3101 and the sub-sampling unit 3102. In FIG. 17, 3401 is Y data, 3402 is Cr data, 3403 is Cb data, and the amount of each data of Cr and Cb is reduced to 1/2 by subsampling.

【0013】次に、図17に示されたY,Cr,Cbデ
ータはDCT3103へ入力され、DCT3103は、
まず、入力されたデータを水平および垂直に隣り合う8
×8データのブロツクに分ける。ブロツク化によつて、
Yデータ3401は、図17に示すように、3401a
〜3401dの4ブロツクに分割され、同様に、Crデ
ータ3402は3402aと3402bの2ブロツク
に、Cbデータ3403は3403aと3403bの2
ブロツクに分割される。続いて、DCT3103は、こ
れら8個の各ブロツクに対して、DCTを実行する。
Next, the Y, Cr, Cb data shown in FIG. 17 is input to the DCT 3103, and the DCT 3103
First, the input data is horizontally and vertically adjacent to each other 8
Divide into blocks of × 8 data. Due to blocking,
As shown in FIG. 17, the Y data 3401 is 3401a.
~ 3401d divided into 4 blocks. Similarly, Cr data 3402 is divided into 2 blocks 3402a and 3402b, and Cb data 3403 is divided into 2 blocks 3403a and 3403b.
It is divided into blocks. Subsequently, the DCT 3103 executes DCT on each of these eight blocks.

【0014】図18は図17に示した8ブロツクをDC
T変換した様子を示す図である。図18において、35
01はYデータのDCT係数を示し、ブロツク3501
a〜3501dは、それぞれ図17に示したブロツク3
401a〜3401dに対応する。同様に、3502は
CrデータのDCT係数を、3503はCbデータのD
CT係数を示す。なお、DCT後の各ブロツクは、左上
隅の1個のDC成分と、その他63個のAC成分とで構
成される。
FIG. 18 is a block diagram of the eight blocks shown in FIG.
It is a figure which shows a mode that T-transformed. In FIG. 18, 35
01 indicates the DCT coefficient of the Y data, and the block 3501
a to 3501d are blocks 3 shown in FIG.
It corresponds to 401a-3401d. Similarly, 3502 is the DCT coefficient of Cr data, and 3503 is the Db of Cb data.
The CT coefficient is shown. Each block after DCT is composed of one DC component in the upper left corner and 63 other AC components.

【0015】次に、図18に示すDCT係数データ35
01〜3503は、量子化部3104で量子化される。
ここでの量子化は、JPEG推奨の量子化テーブルによ
つて行う。図19は量子化に用いる量子化テーブルを示
す図である。図19において、4001はY成分用、4
002はCrおよびCb成分用の量子化テーブルであ
る。
Next, the DCT coefficient data 35 shown in FIG.
01 to 3503 are quantized by the quantization unit 3104.
The quantization here is performed using a quantization table recommended by JPEG. FIG. 19 is a diagram showing a quantization table used for quantization. In FIG. 19, 4001 is for the Y component, 4
002 is a quantization table for Cr and Cb components.

【0016】図20は図18に示したDCT係数データ
を図19に示した量子化テーブルで量子化した結果を示
す図である。図20において、3601はY成分の量子
化データ、3602はCr成分の量子化データ、306
3はCb成分の量子化デーである。符号部3105は、
図20に示す各量子化データ3601〜3603を、D
C成分とAC成分に分けて、DC成分については、前ブ
ロツクのDC成分との差分のヒストグラムから、最適ハ
フマン符号化テーブルを作成して、該テーブルに従つて
符号化し、また、AC成分については、図21に示すよ
うなジグザグ順に並び替えを行つた後、係数0のランレ
ングス(0以外の係数xが現れるまでの係数0の連続
数)と値xの組合せのヒストグラムから、最適ハフマン
符号化テーブルを作成して、該テーブルに従つて符号化
する。
FIG. 20 is a diagram showing the result of quantizing the DCT coefficient data shown in FIG. 18 with the quantization table shown in FIG. In FIG. 20, 3601 is Y component quantized data, 3602 is Cr component quantized data, 306
3 is the quantization day of the Cb component. The code part 3105 is
The quantized data 3601 to 3603 shown in FIG.
The C component and the AC component are divided, and for the DC component, an optimum Huffman coding table is created from the histogram of the difference from the DC component of the previous block, and the optimum Huffman coding table is coded according to the table. , After performing sorting in the zigzag order as shown in FIG. 21, the optimum Huffman coding is performed from the histogram of the combination of the run length of the coefficient 0 (the number of consecutive coefficients 0 until the coefficient x other than 0 appears) and the value x. Create a table and encode according to the table.

【0017】NTSC−RGBにおける16×16画素
のデータは、1画素が8ビツトのレンジをもつので、 16×16×3色×8ビツト=6,144ビツト であつた原画像データは、符号部3105から出力され
た時点で795ビツトに圧縮される。従つて、画像デー
タは、 6,144/795≒7.7 約1/7.7に圧縮されたことになる。ただし、実際に
は、符号部3105で符号化されたデータに、画像サイ
ズ,量子化テーブル,符号化テーブルなどが添付される
ので、圧縮率は若干低下する。
Since 16 × 16 pixel data in NTSC-RGB has a range of 8 bits per pixel, the original image data of 16 × 16 × 3 colors × 8 bits = 6,144 bits is the code part. When output from 3105, it is compressed to 795 bits. Therefore, the image data is compressed to 6,144 / 795≅7.7 approximately 1 / 7.7. However, in reality, since the image size, the quantization table, the encoding table, and the like are attached to the data encoded by the encoding unit 3105, the compression rate is slightly reduced.

【0018】次に、ADCTデータ伸長装置の処理の流
れを説明する。復号部3205は、入力されたADCT
圧縮画像データを復号する。逆量子化部3204は、復
号部3205から出力された量子化データへ、図19に
示した量子化テーブルの係数を乗ずることによつて、逆
量子化を実行する。以上の処理によつて、図22に示す
データが得られる。図22はADCT圧縮画像データに
ハフマン復号および逆量子化を施した結果を示した図
で、3701はY成分を、3702はCr成分を、37
03はCb成分を示す。
Next, the processing flow of the ADCT data decompression device will be described. The decoding unit 3205 receives the input ADCT
Decode the compressed image data. The inverse quantization unit 3204 performs inverse quantization by multiplying the quantized data output from the decoding unit 3205 by the coefficient of the quantization table shown in FIG. The data shown in FIG. 22 is obtained by the above processing. FIG. 22 is a diagram showing the result of Huffman decoding and inverse quantization performed on ADCT compressed image data. 3701 represents the Y component, 3702 represents the Cr component, and 37.
03 shows a Cb component.

【0019】図22に示す逆量子化データ(DCT係数
データ)と、図18に示した量子化前のDCT係数デー
タとを比較すれば、両者の各データが異なつていること
は明らかである。続いて、逆DCT3203は、逆量子
化部3204から出力されたDCT係数データを、逆D
CTしてYCrCbデータに戻す。図23は図22に示
したDCT係数データを逆DCT3203で逆DCTし
た結果を示す図で、3801はYデータを、3802は
Crデータを、3803はCbデータを示す。
If the dequantized data (DCT coefficient data) shown in FIG. 22 and the DCT coefficient data before quantization shown in FIG. 18 are compared, it is clear that the respective data are different. Then, the inverse DCT 3203 converts the DCT coefficient data output from the inverse quantizer 3204 into an inverse D
CT and return to YCrCb data. 23 is a diagram showing the result of inverse DCT of the DCT coefficient data shown in FIG. 22 by the inverse DCT 3203. 3801 indicates Y data, 3802 indicates Cr data, and 3803 indicates Cb data.

【0020】続いて、補間部3202は、逆DCT32
03から出力された画像データの欠落データを補間し、
色変換部3201は、補間部3202から出力されたY
CrCb色空間データを、NTSC−RGB色空間デー
タに変換する。図24はADCTデータ伸長装置によつ
て最終的に得られたデータを示す図で、3901はRデ
ータを、3902はGデータを、3903はBデータを
示す。
Subsequently, the interpolation section 3202 determines the inverse DCT 32.
03 interpolates the missing data of the image data output,
The color conversion unit 3201 outputs the Y output from the interpolation unit 3202.
The CrCb color space data is converted into NTSC-RGB color space data. FIG. 24 is a view showing the data finally obtained by the ADCT data decompression device, 3901 indicates R data, 3902 indicates G data, and 3903 indicates B data.

【0021】[0021]

【発明が解決しようとする課題】しかし、上記従来例に
は、次のような問題点があつた。すなわち、ADCT画
像圧縮法は、サブサンプリング時および量子化時に、デ
ータの損失を伴う不可逆圧縮法である。従つて、図16
に示した圧縮前のNTSC−RGB色空間データと、図
24に示した図16のデータを圧縮し伸長した結果のN
TSC−RGB空間データとを比較すれば明らかなよう
に、ADCT画像圧縮法において、伸長されたデータ
は、圧縮前のデータとは異なるものになつてしまう、つ
まり、画質劣化が発生する欠点があつた。
However, the above conventional example has the following problems. That is, the ADCT image compression method is a lossy compression method that involves data loss during subsampling and quantization. Therefore, FIG.
24, which is the result of compressing and expanding the NTSC-RGB color space data before compression shown in FIG. 16 and the data of FIG. 16 shown in FIG.
As is clear from comparison with the TSC-RGB spatial data, in the ADCT image compression method, the decompressed data is different from the uncompressed data, that is, there is a drawback that image quality deterioration occurs. It was

【0022】また、コンピユータ上で作成した画像(コ
ンピユータ作成画像)は、アウトラインが奇麗なこと
や、1図形(または1文字)単一色によるノイズのない
色塗りなどが、その長所である。ところが、ADCT画
像圧縮法によつて画像データを圧縮伸長すると、図形の
アウトラインの乱れ、モスキートノイズと呼ばれる疑似
エツジの発生、量子化による着色などが発生して、コン
ピユータ作成画像の長所が発揮されない。特に、上述し
た圧縮法は8×8ブロツク処理であるために、その境界
域では大幅な色変化が発生する欠点があつた。
Further, the image created on the computer (computer created image) has advantages such as a clean outline and noise-free color painting by one figure (or one character) single color. However, when the image data is compressed and expanded by the ADCT image compression method, the outline of the figure is disturbed, pseudo-edges called mosquito noise are generated, and coloring is caused by quantization, so that the advantage of the computer-generated image is not exhibited. In particular, since the above-mentioned compression method is an 8 × 8 block process, there is a drawback that a large color change occurs in the boundary area.

【0023】また、ADCT画像圧縮法で、さらに圧縮
率を上げようとすると、最終的には、DCT係数のAC
成分は失われてブロツク歪が発生し、例えば解像度が1
/8になるような、極端な解像度の劣化が発生する欠点
があつた。これに対して、画質を改善するために、ハフ
マン符号化などの可逆圧縮法によつて、画像データを圧
縮する方法もあるが、圧縮後のデータ量が変化する欠点
があり、とくに、グラデーシヨン画像やイメージスキヤ
ナで読取つた自然画像などを可逆圧縮すると、極端に大
きなデータ量になることがあり、最悪の場合を想定した
大記憶容量の画像メモリを用意する必要があつた。
If an attempt is made to further increase the compression rate by the ADCT image compression method, finally, the AC of the DCT coefficient will be
The component is lost and block distortion occurs. For example, the resolution is 1
However, there is a drawback that extreme deterioration of resolution occurs such as / 8. On the other hand, in order to improve the image quality, there is a method of compressing the image data by a lossless compression method such as Huffman coding, but there is a drawback that the amount of data after compression changes. Reversible compression of an image or a natural image read by an image scanner may result in an extremely large amount of data, and it is necessary to prepare an image memory having a large storage capacity assuming the worst case.

【0024】[0024]

【課題を解決するための手段】本発明は、前記の課題を
解決することを目的としたもので、前記の課題を解決す
る一手段として、以下の構成を備える。すなわち、画像
データをブロツク単位で処理する画像処理方法であつ
て、前記ブロツクを可逆圧縮した場合の圧縮データ量D
と所定値Lとの関係がD≦Lになる場合は前記ブロツク
を可逆圧縮処理し、前記ブロツクを可逆圧縮した場合の
圧縮データ量Dと所定値Lとの関係がD>Lになる場合
は前記ブロツクを不可逆圧縮処理する画像処理方法にす
る。
SUMMARY OF THE INVENTION The present invention is intended to solve the above problems, and has the following structure as one means for solving the above problems. That is, in the image processing method for processing the image data in block units, the compressed data amount D when the block is losslessly compressed.
When the relationship between the predetermined value L and D is L ≦ L, the block is losslessly compressed, and when the relationship between the compressed data amount D and the predetermined value L when the block is losslessly compressed is D> L. An image processing method for irreversibly compressing the block is used.

【0025】また、画像データをブロツク単位で処理す
る画像処理装置であつて、前記ブロツクを可逆圧縮する
第1の圧縮手段と、前記ブロツクを不可逆圧縮する第2
の圧縮手段と、前記第1の圧縮手段によつて前記ブロツ
クを圧縮した場合の圧縮データ量Dと所定値Lとを比較
する比較手段と、前記比較手段の比較結果がD≦Lの場
合は前記第1の圧縮手段の圧縮結果を選択し、前記比較
手段の比較結果がD>Lの場合は前記第2の圧縮手段の
圧縮結果を選択する選択手段とを備え、前記比較手段の
比較結果と前記選択手段によつて選択された圧縮結果と
を出力する画像処理装置にする。
An image processing apparatus for processing image data in block units, which comprises a first compression means for reversibly compressing the block and a second compression means for irreversibly compressing the block.
Compression means, a comparison means for comparing the compressed data amount D when the block is compressed by the first compression means with a predetermined value L, and a comparison result of the comparison means is D ≦ L. Selecting the compression result of the first compression unit, and selecting the compression result of the second compression unit when the comparison result of the comparison unit is D> L, the comparison result of the comparison unit And the compression result selected by the selecting means.

【0026】また、画像データをブロツク単位で圧縮し
た圧縮データを伸長する画像画像処理方法であつて、前
記圧縮データを可逆圧縮データとして伸長処理した結果
と前記圧縮データを不可逆圧縮データとして伸長処理し
た結果との何れかを入力された情報に基づいて選択し
て、選択した伸長結果を組合せて原画像データを復元す
る画像処理方法にする。
Also, in the image image processing method for decompressing the compressed data obtained by compressing the image data block by block, the result of decompressing the compressed data as reversible compression data and the decompression process of the compressed data as irreversible compression data. One of the results is selected based on the input information, and the selected decompression results are combined to provide the image processing method for restoring the original image data.

【0027】[0027]

【作用】以上の構成によつて、ブロツクを可逆圧縮した
場合の圧縮データ量Dと所定値Lとの関係が、D≦Lに
なる場合は該ブロツクを可逆圧縮処理し、D>Lになる
場合は該ブロツクを不可逆圧縮処理し、および、圧縮デ
ータを可逆圧縮データとして伸長処理した結果と、該圧
縮データを不可逆圧縮データとして伸長処理した結果と
の何れかを、入力された情報に基づいて選択して、原画
像データを復元する画像処理方法および画像処理装置を
提供できる。
With the above configuration, when the relationship between the compressed data amount D and the predetermined value L when the block is losslessly compressed is D≤L, the block is losslessly compressed and D> L. In this case, the block is lossy-compressed, and one of the result of decompressing the compressed data as lossless compressed data and the result of decompressing the compressed data as lossy-compressed data is based on the input information. An image processing method and an image processing apparatus for selecting and restoring original image data can be provided.

【0028】例えば、以上の構成によつて、コンピユー
タ作成画像データなどは、可能な限り可逆圧縮すること
によつて画質の劣化を防ぎ、また、グラデーシヨン画像
や自然画像など可逆圧縮では充分な圧縮率が期待できな
い画像データに対しては、不可逆圧縮することによつて
効率的な圧縮を行つて、メモリが不足するのを防ぐこと
ができる。
For example, with the above configuration, the image data created by the computer is reversibly compressed as much as possible to prevent the deterioration of the image quality, and the lossless compression of the gradation image and the natural image is sufficient. It is possible to prevent the memory shortage by performing efficient compression by performing lossy compression on the image data for which the rate cannot be expected.

【0029】可逆圧縮法で圧縮率が期待できない画像デ
ータは、画像データのばらつく自然画像に多く、従つ
て、式D>Lによつて、かなりの確率でコンピユータ作
成画像と自然画像の領域分離が可能である。自然画像
は、ADCT圧縮によりデータが変動しても、人間の目
で見ると劣化が感じられない特徴があるので、本手法に
よつて、画質の良い、しかも圧縮率が一定した圧縮が可
能になる。
The image data for which the compression ratio cannot be expected by the lossless compression method is often a natural image in which the image data varies. Therefore, according to the expression D> L, there is a considerable probability that the computer-created image and the natural image are separated into regions. It is possible. Since natural images have the characteristic that even if the data changes due to ADCT compression, the deterioration is not felt by human eyes, this method enables compression with good image quality and a constant compression rate. Become.

【0030】[0030]

【実施例】以下、本発明に係る一実施例の画像処理装置
とデータ伸長装置とを図面を参照して詳細に説明する。
なお、以下の説明においては、不可逆圧縮部にADCT
を採用し、ブロツクサイズを8×8画素とし、画素デー
タを24ビツトとした例を説明するが、本実施例はこれ
に限定されるものではない。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS An image processing apparatus and a data decompression apparatus according to an embodiment of the present invention will be described in detail below with reference to the drawings.
It should be noted that in the following explanation, the ADCT
An example will be described in which the block size is 8 × 8 pixels and the pixel data is 24 bits, but the present embodiment is not limited to this.

【0031】なお、以下の説明においては、原画像デー
タをNTSC−RGB24ビツトとした例を説明する
が、本実施例はこれに限定されるものではなく、例え
ば、CMYK,XYZ,CIE−Lab,CIE−Lu
v,YCrCbでもよく、データも16ビツトでも36
ビツトでもよい。また、以下の説明において、「領域
1」はブロツクを可逆圧縮する領域、また、「領域2」
はブロツクを不可逆圧縮する領域である。
In the following description, an example in which the original image data is NTSC-RGB 24 bits will be described, but the present embodiment is not limited to this. For example, CMYK, XYZ, CIE-Lab, CIE-Lu
v, YCrCb may be used, data may be 16 bits and 36
Bits are fine. In the following description, "area 1" is an area for reversibly compressing blocks, and "area 2" is
Is an area for irreversibly compressing the block.

【0032】[0032]

【第1実施例】図1は本実施例の画像圧縮装置の構成例
を示すブロツク図である。図1において、1は画像デー
タ記憶部で、例えばNTSC−RGB形式の24ビツト
/画素のデータを、ブロツク単位で出力する。2は遅延
部で、可逆圧縮の結果によつてADCT圧縮の実行/不
実行を決定するために、画像データ記憶部1が出力した
ブロツクを保持して、例えば1ブロツク分遅延させる。
[First Embodiment] FIG. 1 is a block diagram showing a configuration example of an image compression apparatus according to the present embodiment. In FIG. 1, reference numeral 1 denotes an image data storage unit which outputs, for example, 24-bit / pixel data in the NTSC-RGB format in block units. A delay unit 2 holds the block output from the image data storage unit 1 and delays it by, for example, one block in order to determine execution / non-execution of ADCT compression based on the result of lossless compression.

【0033】3は可逆圧縮部で、画像データ記憶部1が
出力したブロツクの可逆圧縮と、該ブロツクの領域判定
とを行い、圧縮データと領域判定結果を表す信号S2gを
出力する。4はADCT圧縮部で、可逆圧縮部3の領域
判定結果が「領域2」であつた場合、遅延部2から入力
したデータをADCT圧縮して、圧縮データをDC成
分,低周波成分,やや高周波成分,高周波成分などに分
割して出力する。
A lossless compression unit 3 performs lossless compression of the block output from the image data storage unit 1 and region determination of the block, and outputs compressed data and a signal S2g representing the region determination result. An ADCT compression unit 4 performs ADCT compression on the data input from the delay unit 2 when the region determination result of the lossless compression unit 3 is “region 2”, and the compressed data is a DC component, a low frequency component, and a slightly high frequency component. Divide into components, high frequency components, etc. and output.

【0034】5はバツフアで、可逆圧縮部3が出力した
圧縮データを記憶し、可逆圧縮部3の領域判定結果が
「領域1」であつた場合、記憶する圧縮データを出力す
る。6はセグメントコントローラで、バツフア5からの
圧縮データと、ADCT圧縮部4からの圧縮データと
を、第1記憶部8へ格納する。また、セグメントコント
ローラ6は、もし第1記憶部8が圧縮処理中に満杯にな
る場合、セグメント情報テーブル7を参照して、より重
要度の低い、例えばより高周波側のADCT圧縮データ
が格納されたアドレスへ、新たな圧縮データを上書きす
ることによつて、圧縮データのオーバフローを防ぐ。
A buffer 5 stores the compressed data output by the lossless compression unit 3, and outputs the stored compressed data when the region determination result of the lossless compression unit 3 is "region 1". A segment controller 6 stores the compressed data from the buffer 5 and the compressed data from the ADCT compression unit 4 in the first storage unit 8. Further, if the first storage unit 8 becomes full during the compression process, the segment controller 6 refers to the segment information table 7 and stores ADCT compressed data of lower importance, for example, higher frequency side ADCT compressed data. Overwriting of compressed data is prevented by overwriting the address with new compressed data.

【0035】7はセグメント情報テーブル部で、セグメ
ントコントローラ6によつて第1記憶部8に格納された
データの格納アドレスを記憶する。9は第2記憶部で、
可逆圧縮部3から出力された領域判定結果を表す信号S
2gを記憶する。10は制御部で、上記各構成をはじめと
する本実施例の動作タイミングなどの制御を行う。
A segment information table unit 7 stores the storage address of the data stored in the first storage unit 8 by the segment controller 6. 9 is a second storage unit,
A signal S representing the area determination result output from the lossless compression unit 3.
Remember 2g. A control unit 10 controls the operation timing of this embodiment including the above-described configurations.

【0036】以上の構成によつて、図1に示した第1記
憶部8には、可逆圧縮部3から出力された領域判定結果
を表す信号S2gに応じて、分割されたADCT圧縮デー
タ、または可逆圧縮データが格納される。図2は可逆圧
縮部3の構成例を示すブロツク図である。図2におい
て、201は並替部で、入力されたブロツクの各画素デ
ータをシリアルに並べ替える。
With the above configuration, the first storage unit 8 shown in FIG. 1 stores divided ADCT compressed data in accordance with the signal S2g representing the region determination result output from the lossless compression unit 3, or Lossless compressed data is stored. FIG. 2 is a block diagram showing a configuration example of the reversible compression unit 3. In FIG. 2, a rearrangement unit 201 rearranges the input pixel data of the blocks in serial.

【0037】202は第1ラツチ部で、並替部201か
らの画素データ(例えば24ビツト)をラツチする。同
様に、203〜205は第2〜第4ラツチ部で、それぞ
れ第1ラツチ部202から出力された画素データをラツ
チする。206は第1比較部で、並替部201から出力
された画素データと、第1ラツチ部202にラツチされ
た画素データとを比較して、両者が等しい場合は‘0’
に、両者が異なる場合は‘1’になる1ビツトの信号S
2aを出力する。すなわち、信号S2aは、並替部201か
らシリアルに出力された画素データの表す色が変化した
か否かを表し、変化した場合には‘1’になる。
A first latch unit 202 latches pixel data (for example, 24 bits) from the rearrangement unit 201. Similarly, 203 to 205 are second to fourth latch units, which latch the pixel data output from the first latch unit 202, respectively. A first comparing unit 206 compares the pixel data output from the rearranging unit 201 with the pixel data latched by the first latching unit 202, and when both are equal, it is "0".
If the two are different, a 1-bit signal S that becomes "1"
Output 2a. That is, the signal S2a represents whether or not the color represented by the pixel data serially output from the rearrangement unit 201 has changed, and becomes “1” when the color has changed.

【0038】同様に、207〜209は第2〜第4比較
部で、並替部201から出力された画素データと、対応
する各ラツチ部203〜205にラツチされた画素デー
タとを比較して、比較結果をデコーダ210へ送る。2
10はデコーダで、第2〜第4比較部207〜209の
比較結果を入力して、2ビツトの信号S2bを出力する。
なお、信号S2bは、第2比較部207で一致した場合は
‘00’に、第3比部208で一致した場合は‘01’
に、第4比較部209で一致した場合は‘10’にな
り、すべて不一致の場合は‘11’になる。すなわち、
信号S2bは、並替部201から出力された画素データと
同値(同色)のデータが、ラツチ部203〜205の何
処にラツチされていたかを表し、何処にもラツチされて
いなかつた場合は‘11’になる。
Similarly, reference numerals 207 to 209 denote second to fourth comparison units, which compare the pixel data output from the rearrangement unit 201 with the pixel data latched by the corresponding latch units 203 to 205. , And sends the comparison result to the decoder 210. Two
A decoder 10 receives the comparison results of the second to fourth comparing sections 207 to 209 and outputs a 2-bit signal S2b.
The signal S2b is "00" when the second comparison unit 207 matches and "01" when the third comparison unit 208 matches.
Further, when the fourth comparing unit 209 agrees, it becomes “10”, and when all do not coincide, it becomes “11”. That is,
The signal S2b indicates where in the latch units 203 to 205 the data having the same value (same color) as the pixel data output from the rearrangement unit 201 has been latched, and when it is not latched anywhere, it is '11. 'become.

【0039】211はPLD(Programable Logic Devic
e)で、第1比較部206から入力した信号S2aと、デコ
ーダ210から入力した信号S2bと、並替部201から
入力した画素データ信号S2cを入力し、可逆圧縮部3の
圧縮データ、および、第2〜第4ラツチ部203〜20
5へラツチ信号S2d〜S2fを出力する。ここで、PLD
とは、設計者が手元でプログラムできるICのことであ
る。
Reference numeral 211 denotes a PLD (Programmable Logic Devic
In e), the signal S2a input from the first comparison unit 206, the signal S2b input from the decoder 210, and the pixel data signal S2c input from the rearrangement unit 201 are input, the compressed data of the lossless compression unit 3, and 2nd-4th latch parts 203-20
The latch signals S2d to S2f are output to 5. Where PLD
Is an IC that can be programmed by the designer.

【0040】なお、PLD211が出力する圧縮データ
は表1に一例を示す関係になる。
The compressed data output by the PLD 211 has the relationship shown in Table 1 as an example.

【0041】[0041]

【表1】 *1: 24ビツトの色データ また、表2はPLD211の入力とラツチ信号S2d〜S
2fの関係を示す表で、ラツチ信号が‘1’の場合、対応
する各ラツチ部は入力データをラツチする。
[Table 1] * 1: 24-bit color data Table 2 shows the input of PLD211 and the latch signals S2d to S2.
In the table showing the relationship of 2f, when the latch signal is "1", each corresponding latch unit latches the input data.

【0042】[0042]

【表2】 表2に示すように、信号S2aが‘0’(色が変化しなか
つた)の場合は、信号S2bの状態に関係なく、どのラツ
チ信号も‘0’になり、また、信号S2aが‘1’(色が
変化した)で、かつ信号S2bが‘11’(同色の画素デ
ータはラツチされていなかつた)の場合は、最も古い画
素データがラツチされているラツチ部を書換える。
[Table 2] As shown in Table 2, when the signal S2a is "0" (the color has not changed), any latch signal becomes "0" regardless of the state of the signal S2b, and the signal S2a becomes "1". In the case of "(color has changed)" and the signal S2b is "11" (pixel data of the same color has not been latched), the latch part in which the oldest pixel data is latched is rewritten.

【0043】214は領域判定部で、入力された信号S
2aおよび信号S2bに応じて、判定結果を表す1ビツトの
信号S2gを出力する。なお、信号S2gの状態‘0’,
‘1’は、それぞれ判定結果が「領域1」,「領域2」
であつたことを表す。213はバツクアツプ部で、領域
判定部214の判定前に、各ラツチ部にラツチされた画
素データを記憶して、判定後、信号S2gが‘1’であつ
た場合、各ラツチ部へそれぞれの領域判定前の画素デー
タを戻す。
Reference numeral 214 denotes an area determination unit, which is the input signal S
According to 2a and signal S2b, a 1-bit signal S2g representing the determination result is output. The state of the signal S2g is "0",
For "1", the judgment results are "area 1" and "area 2", respectively.
It means that A backup unit 213 stores the pixel data latched in each latch unit before the determination of the region determination unit 214, and after the determination, when the signal S2g is '1', the regions to each latch unit are stored. Returns the pixel data before judgment.

【0044】図3は領域判定部214の構成例を示すブ
ロツク図である。図3において、312〜316はそれ
ぞれレジスタである。311はANDゲートで、信号S
2aと信号S2bの合計3ビツトの論理積を出力する。30
1はカウンタaで、信号S2aが‘1’であつた回数、す
なわち色の変化点の出現回数を計数する。
FIG. 3 is a block diagram showing an example of the structure of the area determination unit 214. In FIG. 3, 312 to 316 are registers. 311 is an AND gate, and the signal S
The logical product of 3 bits in total of 2a and the signal S2b is output. Thirty
Reference numeral 1 denotes a counter a, which counts the number of times the signal S2a is "1", that is, the number of times a color change point appears.

【0045】302はカウンタbで、ANDゲート31
1の出力が‘1’であつた回数を計数する。つまり、カ
ウンタb302は、信号S2aが‘1’かつ信号S2bが
‘11’であつた回数、すなわち何処にもラツチされて
いなかつた色の出現回数を計数する。303,304は
乗算部で、乗算部a303は、カウンタa301の出力
と、レジスタ312に記憶された2(信号S2bのビツト
数)とを掛け、乗算部b304は、カウンタb302の
出力と、レジスタ313に記憶された24(画素データ
のビツト数)とを掛ける。
A counter b is an AND gate 31.
The number of times the output of 1 is "1" is counted. That is, the counter b302 counts the number of times the signal S2a is "1" and the signal S2b is "11", that is, the number of times a color that has not been latched anywhere appears. Reference numerals 303 and 304 denote multiplication units. The multiplication unit a303 multiplies the output of the counter a301 by 2 (the number of bits of the signal S2b) stored in the register 312, and the multiplication unit b304 outputs the output of the counter b302 and the register 313. 24 (the number of bits of pixel data) stored in the memory.

【0046】305は加算部aで、乗算部a303の出
力と、乗算部b304の出力と、レジスタ314に記憶
された64(色の変化点情報数)とを加算して、最終的
にそのブロツクが必要とするビツト数(圧縮データ量)
Dを出力する。なお、色の変化点情報数は、設定したブ
ロツクのサイズによつて決る値であり、前記64に限定
されるものではない。
Reference numeral 305 denotes an adder a which adds the output of the multiplier a303, the output of the multiplier b304, and 64 (the number of color change point information) stored in the register 314, and finally adds the block. Number of bits required by (compressed data amount)
Output D. The number of color change point information is a value determined by the set block size, and is not limited to 64.

【0047】306は減算部で、レジスタ315に記憶
された値Cから、加算部a305の出力を減算した結果
C−Dを出力する。なお、値Cは、圧縮後のブロツク当
りの目標データサイズで、例えば、本実施例の目標圧縮
率を1/12にすると、ブロツクサイズ,画素データの
サイズから次のようになる。 C=8×8×24/12=128バイト 307は加算部bで、減算部308の減算結果C−D
と、後述のラツチ309の出力Sとを加算した結果C+
S−Dを出力する。
A subtraction unit 306 outputs a result CD obtained by subtracting the output of the addition unit a305 from the value C stored in the register 315. The value C is the target data size per block after compression. For example, if the target compression rate in this embodiment is 1/12, the value will be as follows from the block size and the pixel data size. C = 8 × 8 × 24/12 = 128 bytes 307 is an addition unit b, which is a subtraction result CD of the subtraction unit 308.
And the output S of the latch 309 described later are added, the result C +
Output S-D.

【0048】308は比較部で、加算部b307の加算
結果C+S−Dと、レジスタ316に記憶された値0と
を比較して、領域判定結果を表す信号S2gを出力する。
なお、信号S2gは、C+S−D≧0であれば‘0’に、
C+S−D<0であれば‘1’になり、前述したよう
に、信号S2gの状態‘0’,‘1’は、それぞれ判定結
果が「領域1」,「領域2」であることを表す。
A comparison unit 308 compares the addition result C + S−D of the addition unit b307 with the value 0 stored in the register 316, and outputs a signal S2g representing the region determination result.
The signal S2g is "0" if C + S-D≥0,
If C + S-D <0, it becomes "1", and as described above, the states "0" and "1" of the signal S2g indicate that the determination results are "region 1" and "region 2", respectively. .

【0049】すなわち、領域判定部214は、ブロツク
圧縮後、後述の貯金Sを加えて目標圧縮率を達成できる
(C+S−D≧0)場合、該ブロツクを可逆圧縮する
「領域1」と判定し、後述の貯金Sを加えても目標圧縮
率を達成するには不足(C+S−D<0)の場合、該ブ
ロツクを不可逆圧縮する「領域2」と判定する。310
はラツチで、圧縮処理の開始時には、制御部10によつ
て所定の値に初期化され、以降、各ブロツクが「領域
1」と判定された場合、つまり信号S2gが‘0’の場
合、加算部b307の出力C+S−Dをラツチする。す
なわち、ラツチ310は、1ブロツク圧縮後、そのとき
の目標圧縮率に対する余裕C+S−D(>0)をラツチ
して、余裕Sを出力する。
That is, if the target compression ratio can be achieved by adding a savings S (described later) after block compression (C + S-D ≧ 0), the region determination unit 214 determines that the block is a “region 1” for lossless compression. If the savings S described later is insufficient to achieve the target compression ratio (C + S−D <0), it is determined that the block is the “region 2” in which the block is irreversibly compressed. 310
Is a latch, which is initialized to a predetermined value by the control unit 10 at the start of the compression process, and thereafter, when each block is determined to be “area 1”, that is, when the signal S2g is “0”, addition is performed. The output C + S-D of the part b307 is latched. That is, the latch 310 latches the margin C + S-D (> 0) with respect to the target compression rate at that time after one block compression, and outputs the margin S.

【0050】なお、本実施例においては、余裕Sの初期
値として例えば128をセツトするが、ここで余裕Sに
0をセツトしないのは、最初のブロツクで異なる色が多
数出現した場合に対応するためである。というのも、可
逆圧縮部3の圧縮方法は、色の変化点を示す情報に1ブ
ロツク当り64ビツトを、色の変化点ではラツチ情報と
して2ビツトを必要とし、さらに、ラツチされていない
新しい色が出現した場合は、その色のデータをそのまま
出力するために24ビツトを必要とし、色の変化数を
n、ラツチされていない新しい色の出現数をmとする
と、次の関係がある。
In this embodiment, 128 is set as the initial value of the margin S, but 0 is not set in the margin S at this time when a large number of different colors appear in the first block. This is because. This is because the compression method of the lossless compression unit 3 requires 64 bits per block for the information indicating the color change point and 2 bits for the latch information at the color change point, and the new color that is not latched is used. When 24 appears, 24 bits are required to output the data of that color as it is, and the number of changes in color is n, and the number of appearance of a new unlatched color is m.

【0051】 D=64+2n+24m ∴C+S−(64+2n+24m)≧0 ただし、0≦n≦64,0≦m≦n 従つて、可逆圧縮部3の圧縮方法では、最初のブロツク
において、C=128,S=0,m=nとして、 n<(128−64)/26=2.5 すなわち2色が上限になつてしまうので、ある程度の余
裕Sを最初に用意しておく必要があり、例えば、C=S
=128にすればn<7.4で、m=nのとき7色まで
出現しても圧縮できる。
D = 64 + 2n + 24m ∴C + S− (64 + 2n + 24m) ≧ 0 However, 0 ≦ n ≦ 64, 0 ≦ m ≦ n Therefore, in the compression method of the reversible compression unit 3, C = 128, S = in the first block. 0, m = n, n <(128-64) /26=2.5 That is, since the upper limit is 2 colors, it is necessary to prepare some margin S first, for example, C = S
= 128, n <7.4, and when m = n, compression is possible even when up to 7 colors appear.

【0052】図4はADCT圧縮部4の構成例を示すブ
ロツク図である。図4において、801は色空間変換部
で、RGB色空間データをYCrCb色空間データに変
換する。802はDCT部で、色空間変換部801から
出力されたYCrCbデータにDCTを施して、周波数
空間データに変換する。
FIG. 4 is a block diagram showing a configuration example of the ADCT compression unit 4. In FIG. 4, a color space conversion unit 801 converts RGB color space data into YCrCb color space data. A DCT unit 802 performs DCT on the YCrCb data output from the color space conversion unit 801, and converts the YCrCb data into frequency space data.

【0053】803は量子化部で、DCT部802から
出力されたDCT係数を、それぞれ異なるステツプ幅に
よつて量子化する。804は符号部で、量子化部803
から出力された量子化データを、DC係数とAC係数に
分けて、DC係数については、前ブロツクのDC係数と
の差分のヒストグラムから、最適ハフマン符号化テーブ
ルを作成して、該テーブルに従つて符号化し、また、A
C係数については、ジグザグ順に並び替えを行つた後、
係数0のランレングス(0以外の係数xが現れるまでの
係数0の連続数)と値xの組合せのヒストグラムから、
最適ハフマン符号化テーブルを作成して、該テーブルに
従つて符号化する。符号部804は、DC係数の符号デ
ータはライン8aへ出力し、AC係数については例えば
低周波側から、p個の符号データをライン8bへ、q個
の符号データをライン8cへ、r個の符号データをライ
ン8dへ、・・・というように、符合データを各ライン
へ分配して出力する。
A quantizing unit 803 quantizes the DCT coefficients output from the DCT unit 802 with different step widths. Reference numeral 804 denotes a coding unit, which is a quantization unit 803.
The quantized data output from is divided into a DC coefficient and an AC coefficient, and with respect to the DC coefficient, an optimal Huffman coding table is created from the histogram of the difference from the DC coefficient of the previous block, and according to the table, Encoding and also A
Regarding C coefficient, after rearranging in zigzag order,
From the histogram of the combination of the run length of the coefficient 0 (the number of consecutive coefficients 0 until the coefficient x other than 0 appears) and the value x,
An optimum Huffman coding table is created, and coding is performed according to the table. The encoding unit 804 outputs the code data of the DC coefficient to the line 8a, and the AC coefficient of the p coefficient code data to the line 8b, the q code data to the line 8c, and the r coefficient data to the r coefficient, respectively. The code data is distributed to the lines 8d, ...

【0054】なお、信号S2a,S2b,S2cは、セグメン
トコントローラ6によつて、第1記憶部8のそれぞれ別
のアドレスに格納することも可能である。また、過去の
画素データをラツチするラツチ部を1つに、すなわち第
1ラツチ部と第2ラツチ部の2つにしてもよい。図12
は可逆圧縮部3の他の構成例を示すブロツク図で、過去
の画素データを記憶するラツチが1つで、余裕Sの設定
しない場合の可逆圧縮部3の構成例である。この場合、
比較部も2つになり、信号S2bは1ビツトになり、圧縮
データ量を計算する式は次のようになる。
The signals S2a, S2b and S2c can be stored in different addresses in the first storage section 8 by the segment controller 6. Further, the latch portion that latches the past pixel data may be one, that is, the first latch portion and the second latch portion. 12
FIG. 4 is a block diagram showing another configuration example of the lossless compression unit 3, which is a configuration example of the lossless compression unit 3 when there is one latch that stores past pixel data and the margin S is not set. in this case,
There are also two comparators, the signal S2b is one bit, and the formula for calculating the amount of compressed data is as follows.

【0055】D=64+count2+24×count3 また、可逆圧縮部3において、どのラツチ部にも同値の
画素データが存在しない場合に更新するラツチ部を固定
にしてもよい。例えば、信号S2aが‘1’で信号S2bが
‘11’の場合、第2ラツチ部203を更新するように
する。この場合、圧縮効率はやや悪くなるが、ハードウ
エアを簡易化できる。
D = 64 + count2 + 24 × count3 Further, in the lossless compression section 3, the latch part to be updated when no pixel data having the same value exists in any latch part may be fixed. For example, when the signal S2a is "1" and the signal S2b is "11", the second latch unit 203 is updated. In this case, the compression efficiency is slightly worse, but the hardware can be simplified.

【0056】さらに、上述の説明においては、メモリ制
御にセグメントコントローラ6を使用して、リアルタイ
ムでデータ圧縮を行う例を示したが、プリスキヤン(プ
リ展開)を行つて、予めADCT圧縮のδフアクタを定
めてから圧縮を行つてもよい。この場合は、メモリ制御
がより簡易化できる。以上説明したように、本実施例に
よれば、目標圧縮率を達成できるブロツクは可逆圧縮部
3で圧縮し、目標圧縮率を達成できないブロツクはAD
CT圧縮部4で圧縮するので、コンピユータ作成画像デ
ータなどは、可能な限り可逆圧縮することによつて画質
の劣化を防ぎ、また、グラデーシヨン画像や自然画像な
ど可逆圧縮では充分な圧縮率が期待できない画像データ
に対しては、ADCT圧縮することによつて効率的な圧
縮を行つて、メモリが不足するのを防ぐことができる。
なお、グラデーシヨン画像や自然画像などは、コンピユ
ータ作成画像と異なつて、不可逆圧縮して伸長しても画
質劣化が目立たない特性をもつている。
Furthermore, in the above description, the segment controller 6 is used for memory control to perform data compression in real time. However, pre-scan (pre-expansion) is performed to preliminarily perform the delta factor of ADCT compression. The compression may be performed after the determination. In this case, memory control can be simplified. As described above, according to the present embodiment, the block that can achieve the target compression rate is compressed by the reversible compression unit 3, and the block that cannot achieve the target compression rate is AD.
Since it is compressed by the CT compression unit 4, the image quality of computer-created image data and the like is reversibly compressed as much as possible to prevent deterioration of the image quality, and a sufficient compression rate is expected in lossless compression such as gradation images and natural images. For image data that cannot be processed, ADCT compression can be used to perform efficient compression and prevent memory shortage.
Unlike the computer-generated image, the gradation image and the natural image have the characteristic that the image quality is not conspicuous even when the image is lossy compressed and expanded.

【0057】さらに、本実施例によれば、可逆圧縮と不
可逆圧縮とを、ブロツク単位で切替えることができるの
で、例えば、コンピユータ作成画像にはめ込まれた自然
画像に対しても、自然画像にはめ込まれたコンピユータ
作成画像に対しても有効に機能する。また、本実施例に
よれば、上記のような手順で圧縮をしたにも係わらず、
それでも圧縮データを記憶するメモリが不足する場合
は、より高周波側のADCT符号データから順に削除し
て行くことによつて、メモリ不足を解消することができ
る。
Furthermore, according to the present embodiment, lossless compression and lossy compression can be switched in block units. For example, even a natural image embedded in a computer created image can be embedded in a natural image. It also works effectively for computer created images. Further, according to the present embodiment, although the compression is performed according to the above procedure,
If there is still a shortage of memory for storing the compressed data, the lack of memory can be resolved by sequentially deleting the ADCT code data on the higher frequency side.

【0058】[0058]

【第2実施例】以下では本発明に係る第2実施例の画像
圧縮装置を説明する。なお、第2実施例は、第1実施例
の可逆圧縮部3をソフトウエアで実現するものである。
従つて、以下では、可逆圧縮部についてだけ説明して、
第1実施例と略同様の他の構成については、その詳細説
明を省略する。
[Second Embodiment] An image compression apparatus according to a second embodiment of the present invention will be described below. The second embodiment implements the lossless compression unit 3 of the first embodiment by software.
Therefore, only the lossless compression unit will be explained below,
Detailed description of other configurations that are substantially the same as those of the first embodiment will be omitted.

【0059】なお、以下の説明におけるデータ名の内容
は次のとおりであり、( )内は第1実施例との対応を
示している。 next:第1ラツチデータ(第1ラツチ部202) former[0]:第2ラツチデータ(第2ラツチ部203) former[1]:第3ラツチデータ(第3ラツチ部204) former[2]:第4ラツチデータ(第4ラツチ部205) present:ジグザグ順に出力される画素データ(並替部
201の出力) turn:ラツチ更新情報 なお、next,former[],presentの各データは、それぞれ
RGB形式の画素データで、R,G,Bそれぞれのデー
タを有する。
The contents of the data name in the following description are as follows, and the parentheses show the correspondence with the first embodiment. next: First latch data (first latch unit 202) former [0]: Second latch data (second latch unit 203) former [1]: Third latch data (third latch unit 204) former [2]: Fourth latch data (Fourth latch unit 205) present: Pixel data output in zigzag order (output of rearrangement unit 201) turn: Latch update information Each data of next, former [], present is RGB format pixel data. , R, G, B data respectively.

【0060】図5は本実施例の可逆圧縮手順の一例を示
すフローチヤートである。図5において、本実施例は、
ステツプS401で余裕Sを例えば128に初期化し、
ステツプS402で4つのラツチデータformer[]を初期
化する。なお、本実施例では、例えば、白地に黒の画
像,赤の画像,青の画像の順に出現頻度が高いと仮定し
て、次式に示すように、nextへ白データを、former[0]
へ黒データを、former[1]へ赤データを、、former[2]へ
青データをセツトする。
FIG. 5 is a flow chart showing an example of the lossless compression procedure of this embodiment. In FIG. 5, the present embodiment is
In step S401, the margin S is initialized to 128,
In step S402, the four latch data former [] are initialized. In the present embodiment, for example, assuming that the black image, the red image, and the blue image appear on a white background in descending order of frequency of occurrence, white data is written to next [former [0]]
Set the black data to, the red data to the former [1], and the blue data to the former [2].

【0061】 next=(255,255,255) former[0]=(0,0,0) former[1]=(255,0,0) former[2]=(0,0,255) また、本実施例は、ステツプS402で、presentがど
のformer[]とも一致しない場合、最も古いformer[]を書
換えるためのturnを次のようにセツトする。
Next = (255,255,255) former [0] = (0,0,0) former [1] = (255,0,0) former [2] = (0,0,255) If present does not match any former [] in S402, a turn for rewriting the oldest former [] is set as follows.

【0062】 turn=0 turn_p=1 turn_pp=2 続いて、本実施例は、ステツプS403でnext,former
[],turnの各画素データをバツクアツプする。
Turn = 0 turn_p = 1 turn_pp = 2 Next, in the present embodiment, in step S403, next, former
Back up each pixel data of [] and turn.

【0063】 Bnext←next Bformer[]←former[] Bturn←turn Bturn_p←turn_p Bturn_pp←turn_pp 続いて、本実施例は、ステツプS404で、詳細は後述
するが、1ブロツクを可逆圧縮して、圧縮データ量Dを
求める。
Bnext ← next Bformer [] ← former [] Bturn ← turn Bturn_p ← turn_p Bturn_pp ← turn_pp In the present embodiment, step S404 will be described later in detail, but one block is reversibly compressed to obtain compressed data. Find the quantity D.

【0064】続いて、本実施例は、ステツプS405
で、ステツプS404で求めた圧縮データ量Dと、予め
設定された値Cに余裕Sを加算した限界値Lとを比較し
て、D≦Lであれば「領域1」と判定してステツプS4
06へ進み、また、D>Lであれば「領域2」と判定し
てステツプS409へ進む。判定結果が「領域1」であ
つた場合、本実施例は、ステツプS406で状態‘0’
の信号S2gを出力し、ステツプS407で次式によつて
余裕Sを更新した後、ステツプS410へ進む。
Subsequently, in the present embodiment, step S405 is executed.
Then, the compressed data amount D obtained in step S404 is compared with a limit value L obtained by adding a margin S to a preset value C, and if D≤L, it is determined to be "area 1" and step S4 is performed.
If it is D> L, it is determined to be "region 2" and the process proceeds to step S409. If the determination result is "area 1", in this embodiment, the state is "0" in step S406.
The signal S2g is output, the margin S is updated by the following equation in step S407, and then the process proceeds to step S410.

【0065】S←C+S−D また、判定結果が「領域2」であつた場合、本実施例
は、ステツプS408で状態‘0’の信号S2gを出力
し、ステツプS409で、next,former[],turnへバツ
クアツプした画素データをリストアした後、ステツプS
410へ進む。すなわち、本実施例は、ステツプS40
9で、ステツプS404の処理で書換えられた各ラツチ
データを、該処理前の画素データへ戻している。
S ← C + SD If the judgment result is "area 2", in this embodiment, the signal S2g of the state "0" is output in step S408, and next, former [] are output in step S409. , After restoring the backed up pixel data to turn, step S
Proceed to 410. That is, in this embodiment, step S40
In step 9, each of the latch data rewritten in the process of step S404 is returned to the pixel data before the process.

【0066】 next←Bnext former[]←Bformer[] turn←Bturn turn_p←Bturn_p turn_pp←Bturn_pp 続いて、本実施例は、ステツプS410で、すべてのブ
ロツクを処理したか否かを判断して、未了のブロツクが
あればステツプS403へ戻つて残りのブロツクを処理
し、未了のブロツクがなければ処理を終了する。
Next ← B next former [] ← Bformer [] turn ← Bturn turn_p ← Bturn_p turn_pp ← Bturn_pp Then, in this embodiment, in step S410, it is determined whether or not all the blocks have been processed, and the processing is not completed. If there is any block, the process returns to step S403 to process the remaining blocks, and if there is no unfinished block, the process ends.

【0067】次に、可逆圧縮(ステツプS404)の処
理手順を説明する。なお、以下の説明におけるデータ名
の内容は次のとおりであり、( )内は第1実施例との
対応を示している。 count2:色の変化点の出現回数(カウンタa301) count3:どのラツチデータとも不一致だつた回数(カウ
ンタb302) pix[i]:i番目の画素データ 図6,図7はステツプS404の処理手順の一例を示す
フローチヤートである。
Next, the processing procedure for lossless compression (step S404) will be described. The contents of the data name in the following description are as follows, and the parentheses indicate the correspondence with the first embodiment. count2: the number of times a color change point appears (counter a301) count3: the number of times that it does not match any latch data (counter b302) pix [i]: i-th pixel data FIGS. 6 and 7 show an example of the processing procedure of step S404. It is a flow chart shown.

【0068】図6において、本実施例は、ステツプS5
01でcount2とcount3を0に初期化し、ステツプS50
2でカウンタiに0をセツトする。なお、カウンタiは
処理画素数をカウントするものであり、本実施例は、図
8に一例を示す順番で画素を処理する。続いて、本実施
例は、ステツプS503でpresentへpix[i]を代入し、
ステツプS504でpresentとnextを比較して、両者が
一致すればステツプS505で圧縮データ‘0’を出力
し、両者が不一致ならばその詳細を後述するステツプS
506の領域2処理を実行する。すなわち、本実施例
は、ステツプS504で、現在の画素データ(presen
t)と、直前の画素データ(next)とを比較するので、
両データの一致は色の変化がないことを、また、両デー
タが不一致は色の変化があることを表す。
Referring to FIG. 6, this embodiment uses step S5.
Initialize count2 and count3 to 0 with 01, and step S50
At 2, the counter i is set to 0. The counter i counts the number of pixels to be processed, and the present embodiment processes pixels in the order shown in FIG. Subsequently, in this embodiment, pix [i] is substituted into present in step S503,
In step S504, the present and the next are compared. If they match, the compressed data '0' is output in step S505, and if they do not match, the details will be described later in step S505.
The region 2 processing of 506 is executed. That is, in this embodiment, in step S504, the current pixel data (presen
Since t) is compared with the immediately preceding pixel data (next),
A match between both data indicates that there is no color change, and a mismatch between both data indicates that there is a color change.

【0069】続いて、本実施例は、ステツプS507で
nextへpresentにラツチされた画素データを代入し、ス
テツプS508でカウンタiをインクリメントし、ステ
ツプS509でカウンタiの値を判定して、i≦63で
あればステツプS503へ戻つて残りの画素を処理し、
また、i>63であればステツプS510へ進む。すべ
ての画素の処理が終了(i>63)した場合、本実施例
は、ステツプS510でそのブロツクの圧縮データ量D
を次式によつて求めた後、図5に示した処理手順へ戻
る。
Subsequently, in the present embodiment, step S507 is executed.
The latched pixel data is assigned to next, the counter i is incremented in step S508, the value of the counter i is determined in step S509, and if i ≦ 63, the process returns to step S503 to process the remaining pixels. Then
If i> 63, the process proceeds to step S510. When the processing of all pixels is completed (i> 63), in this embodiment, in step S510, the compressed data amount D of the block is
Is obtained by the following equation, the process returns to the procedure shown in FIG.

【0070】D=64+2×count2+24×count3 一方、ステツプS504でpresent≠nextだつた場合
は、図7に一例を示す処理手順を実行する。図7におい
て、本実施例は、ステツプS601で圧縮データ‘1’
を出力し、ステツプS602でcount2をインクリメント
し、ステツプS603でturnとturn_pを比較して、両者
が一致する場合はステツプS605へジヤンプし、両者
が不一致の場合はステツプS604へ進んで、turn_pp
へturn_pのラツチデータ番号を代入した後turn_pへturn
のラツチデータ番号を代入する。なお、これはturnとtu
rn_pに同値を与えないための処理である。
D = 64 + 2 × count2 + 24 × count3 On the other hand, if present ≠ next in step S504, the processing procedure shown in FIG. 7 is executed. In FIG. 7, in the present embodiment, in step S601, the compressed data "1" is set.
Is output, count2 is incremented in step S602, turn and turn_p are compared in step S603, and if they match, jump to step S605. If they do not match, step S604 follows and turn_pp
To turn_p after substituting the turn_p latch data number
Substitute the latch data number of. This is turn and tu
This is a process for not giving the same value to rn_p.

【0071】続いて、本実施例は、ステツプS605
で、presentとformer[]を比較して、present=former[0]
ならばステツプS606へ、present=former[1]ならば
ステツプS608へ、present=former[2]ならばステツ
プS610へ、presentがどのformer[]とも一致しない
場合はステツプS612へ分岐する。present=former
[0]であつた場合、本実施例は、ステツプS606で圧
縮データ‘00’を出力し、ステツプS607でturnへ
‘0’をセツトして、更新するラツチデータを示す。
Then, in this embodiment, step S605 is executed.
Then, compare present and former [], present = former [0]
If so, it branches to step S606 if present = former [1], to step S610 if present = former [2], and to step S612 if present does not match any former []. present = former
In the case of [0], in this embodiment, the compressed data '00' is output in step S606, and the turn data is set to '0' in step S607 to indicate the latch data to be updated.

【0072】present=former[1]であつた場合、本実施
例は、ステツプS608で圧縮データ‘01’を出力
し、ステツプS609でturnへ‘1’をセツトして、更
新するラツチデータを示す。present=former[2]であつ
た場合、本実施例は、ステツプS610で圧縮データ
‘10’を出力し、ステツプS611でturnへ‘2’を
セツトして、更新するラツチデータを示す。
If present = former [1], in this embodiment, the compressed data '01' is output in step S608, the turn data '1' is set in step S609, and the updated latch data is shown. If present = former [2], the present embodiment outputs the compressed data '10' in step S610, sets '2' to turn in step S611, and indicates the updated latch data.

【0073】また、presentがどのformer[]とも一致し
なかつた場合、本実施例は、ステツプS612で圧縮デ
ータ‘11’を出力し、ステツプS613でpresentに
ラツチされた画素データを出力し、ステツプS614で
count3をインクリメントし、ステツプS615でturn_p
とturn_ppとも異なるラツチデータ番号をturnへセツト
する。なお、前述のステツプS603,S604で、tu
rn_pとturn_ppとが同値にならないようにしているの
で、turnは0,1,2の何れかになる。
If present does not match any former [], the present embodiment outputs the compressed data '11' in step S612, outputs the pixel data latched in present in step S613, and outputs the step. In S614
Increment count3, and in step S615 turn_p
And a turn data number different from turn_pp are set to turn. In addition, in steps S603 and S604 described above, tu
Since rn_p and turn_pp are not set to the same value, turn is either 0, 1, or 2.

【0074】続いて、本実施例は、ステツプS616で
former[turn]にnextにラツチされた画素データを代入し
た後、図6に示す処理手順に戻る。なお、DTPなどに
おけるコンピユータ作成画像は、使用色数が比較的少な
く、大概は256色あれば充分なので、上述の説明のス
テツプS613で出力する現在値presentを、ルツクア
ツプテーブル化することも可能である。また、例えば、
テーブルとして8ビツト(256色)のメモリを用意し
て、256色目までは8ビツト/画素のデータを出力す
ることで圧縮率を向上し、256色目が出現した後は、
24ビツト/画素のデータをそのまま出力することによ
つて、色数も限定されない構成とすることができる。
Then, in this embodiment, in step S616.
After substituting the pixel data that is latched in next into former [turn], the procedure returns to the processing procedure shown in FIG. It should be noted that since the number of colors used is relatively small in a computer-generated image in DTP or the like, and 256 colors are generally sufficient, the present value present output in step S613 described above can also be converted into a lookup table. is there. Also, for example,
A memory of 8 bits (256 colors) is prepared as a table, the compression rate is improved by outputting data of 8 bits / pixel up to the 256th color, and after the 256th color appears,
By outputting 24-bit / pixel data as it is, the number of colors is not limited.

【0075】また、ステツプS613で出力する現在値
presentを24ビツトでなく、例えば18ビツトにする
ことも可能である。この場合は可逆圧縮ではなくなる
が、コンピユータ作成画像などの高周波画像において、
人間の目に対する階調性は重要でないので、劣化は目立
たない。この場合の圧縮データ量は次式のようになる。 D=64+2×count2+18×count3 また、過去の画素データをラツチするformerを1つにし
てもよい。この場合、ステツプS606,S608,S
610,S612で出力される信号は1ビツトになり、
nextにラツチされた画素データを代入されるラツチは1
つなので、更新順を示すturnは不要になる。また、この
場合、圧縮データ量を計算する式次のようになる。
The current value output in step S613
It is possible that the present is not 24 bits but 18 bits, for example. In this case, it is not lossless compression, but in high-frequency images such as computer-generated images,
The deterioration is not noticeable because the gradation to the human eye is not important. The amount of compressed data in this case is as follows. D = 64 + 2 × count2 + 18 × count3 Further, one former may be used to latch past pixel data. In this case, steps S606, S608, S
The signal output at 610 and S612 is 1 bit,
The latch to which the latched pixel data is assigned to next is 1
Therefore, the turn indicating the update order is unnecessary. In this case, the formula for calculating the amount of compressed data is as follows.

【0076】D=64+count2+24×count3 以上説明したように、本実施例によれば、第1実施例と
略同様の効果があるほか、ソフトウエアによつて可逆圧
縮部を構成して、可逆圧縮してかつ圧縮データ量Dを求
めるので、ハードウエアを簡略化できる特長がある。
D = 64 + count2 + 24 × count3 As described above, according to the present embodiment, in addition to the effect similar to that of the first embodiment, a reversible compression section is constructed by software to perform reversible compression. In addition, since the compressed data amount D is obtained, the hardware can be simplified.

【0077】[0077]

【第3実施例】次に、本発明に係る一実施例のデータ伸
長装置を説明する。なお、第3実施例は、第1実施例の
図1に示した第1記憶部8と第2記憶部9に格納された
圧縮データを伸長して、画像データを再生するものであ
る。図9は本実施例のデータ伸長装置の構成例を示すブ
ロツク図である。
[Third Embodiment] Next, a data decompression apparatus according to a third embodiment of the present invention will be described. In the third embodiment, the compressed data stored in the first storage unit 8 and the second storage unit 9 shown in FIG. 1 of the first embodiment is expanded to reproduce the image data. FIG. 9 is a block diagram showing a configuration example of the data decompression device of this embodiment.

【0078】図9において、901はセグメントコント
ローラで、図1に示したセグメント情報テーブル7を参
照して、第1記憶部8に格納された圧縮データを、AD
CT伸長部902または可逆圧縮データ伸長部904へ
分配する。902はADCT伸長部で、不可逆圧縮され
たデータを伸長して、8×8画素のブロツクを再生す
る。
In FIG. 9, reference numeral 901 denotes a segment controller which refers to the segment information table 7 shown in FIG. 1 to convert the compressed data stored in the first storage unit 8 into an AD
It is distributed to the CT decompression unit 902 or the lossless compressed data decompression unit 904. An ADCT decompression unit 902 decompresses the irreversibly compressed data and reproduces a block of 8 × 8 pixels.

【0079】904は可逆圧縮データ伸長部(以下単に
「伸長部」という)で、第2記憶部9に格納された領域
情報に基づいて、可逆圧縮されたデータを伸長して、8
×8画素のブロツクを再生する。906はセレクタで、
第2記憶部9に格納された領域情報に基づいて、ADC
T伸長部902から入力されたブロツクか、伸長部90
4から入力されたブロツクの何れか一方を選択して出力
する。
Reference numeral 904 denotes a lossless compression data decompression unit (hereinafter simply referred to as “decompression unit”) which decompresses the losslessly compressed data based on the area information stored in the second storage unit 8
Play a block of × 8 pixels. 906 is a selector,
Based on the area information stored in the second storage unit 9, the ADC
The block input from the T extension unit 902 or the extension unit 90
One of the blocks input from 4 is selected and output.

【0080】907は画像データ格納部で、セレクタ9
06から出力されたブロツクを順次格納して、例えばN
TSC−RGB形式の24ビツト/画素の画像データを
再生する。910は制御部で、上記各構成をはじめとす
る本実施例の動作タイミングなどの制御を行う。
Reference numeral 907 denotes an image data storage unit, which is a selector 9
Blocks output from 06 are sequentially stored and, for example, N
Image data of 24 bits / pixel in TSC-RGB format is reproduced. A control unit 910 controls the operation timing of the present embodiment including the above-described configurations.

【0081】図10は可逆圧縮データ伸長部904をソ
フトウエアで実現する処理手順の一例を示すフローチヤ
ートである。なお、各データ名は第2実施例と略同様で
ある。図10において、本実施例は、ステツプS100
1で、next,former[],turnを第2実施例のステツプS
402と略同様に初期化する。
FIG. 10 is a flow chart showing an example of a processing procedure for realizing the lossless compression data decompression unit 904 by software. The data names are substantially the same as those in the second embodiment. In FIG. 10, this embodiment is based on step S100.
In step 1, next, former [], and turn are set to the step S of the second embodiment.
Initialization is performed in substantially the same manner as 402.

【0082】続いて、本実施例は、ステツプS1002
で、第2記憶部9から読出した処理ブロツクの領域情報
が、「領域1」を示す場合は、ステツプS1003で詳
細を後述する伸長処理を実行した後、ステツプS100
4へ進み、また、「領域2」を示す場合はステツプS1
004へジヤンプする。続いて、本実施例は、ステツプ
S1004で、すべての圧縮データが終了したか否かを
判定して、未処理の圧縮データがあればステツプS10
02へ戻り、すべての圧縮データの伸長が終了したら処
理を終了する。
Then, in this embodiment, step S1002 is performed.
If the area information of the processing block read from the second storage unit 9 indicates "area 1", the decompression processing, which will be described in detail later, is executed in step S1003, and then step S100.
4 and if "region 2" is indicated, step S1
Jump to 004. Subsequently, in the present embodiment, in step S1004, it is determined whether or not all the compressed data have been finished, and if there is unprocessed compressed data, step S10.
Returning to step 02, the processing is ended when the expansion of all the compressed data is completed.

【0083】図11はステツプS1003の伸長処理の
手順を示すフローチヤートである。図11において、本
実施例は、ステツプS1101でカウンタiに0をセツ
トする。なお、カウンタiは処理画素数をカウントする
ものであり、本実施例は、第2実施例と略同様に、図8
に一例を示した順番で画素を処理する。続いて、本実施
例は、ステツプS1102で、第1記憶部8から受取つ
た1ビツトのデータを判定して、該データが‘1’であ
ればステツプS1103へ進み、また、該データが
‘0’であればステツプS1113へジヤンプする。
FIG. 11 is a flow chart showing the procedure of the extension processing of step S1003. In FIG. 11, in the present embodiment, the counter i is set to 0 in step S1101. It should be noted that the counter i counts the number of pixels to be processed, and this embodiment is similar to the second embodiment in FIG.
The pixels are processed in the order shown in FIG. Then, in the present embodiment, in step S1102, the 1-bit data received from the first storage unit 8 is determined, and if the data is "1", the process proceeds to step S1103, and the data is "0". If ', then jump to step S1113.

【0084】第1記憶部8から受取つた1ビツトのデー
タが‘1’であつた場合、本実施例は、ステツプS11
03で、turnとturn_pとを比較して、両者が異なる場合
はステツプS1105にジヤンプし、また、両者が異な
る場合はステツプS1104に進んで、turn_ppへturn_
pのラツチデータ番号を代入した後turn_pへturnのラツ
チデータ番号を代入する。なお、これはturnとturn_pに
同値を与えないための処理である。
If the one-bit data received from the first storage unit 8 is "1", the present embodiment is step S11.
In 03, turn and turn_p are compared, and if they are different, jump to step S1105. If they are different, the process proceeds to step S1104 to turn_pp to turn_pp.
After assigning the latch data number of p, assign the latch data number of turn to turn_p. This is a process for not giving the same value to turn and turn_p.

【0085】続いて、本実施例は、ステツプS1105
で、第1記憶部8から受取つた2ビツトのデータに応じ
て、‘00’の場合はステツプS1106へ、‘01’
の場合はステツプS1107へ、‘10’の場合はステ
ツプS1108へ、また、‘11’の場合はステツプS
1110へ分岐する。第1記憶部8から受取つた2ビツ
トのデータが‘00’の場合、本実施例は、ステツプS
1106で、turnへ0を代入した後、ステツプS110
9へ進む。
Then, in this embodiment, step S1105 is executed.
Then, depending on the 2-bit data received from the first storage unit 8, in the case of "00", go to step S1106 and "01".
If it is, go to step S1107, if it is '10', go to step S1108, and if it is '11', go to step S1108.
Branch to 1110. If the 2-bit data received from the first storage unit 8 is "00", this embodiment is
At 1106, after 0 is substituted for turn, step S110 is executed.
Proceed to 9.

【0086】第1記憶部8から受取つた2ビツトのデー
タが‘01’の場合、本実施例は、ステツプS1107
で、turnへ1を代入した後、ステツプS1109へ進
む。第1記憶部8から受取つた2ビツトのデータが‘1
0’の場合、本実施例は、ステツプS1108で、turn
へ2を代入した後、ステツプS1109へ進む。すなわ
ち、第1記憶部8から受取つた2ビツトのデータが‘0
0’,‘01’,‘10’の場合、出力する画素データ
は、それぞれformer[0],former[1],former[2]にラツ
チされた画素データである。
When the 2-bit data received from the first storage unit 8 is "01", the present embodiment is step S1107.
Then, after assigning 1 to turn, the process proceeds to step S1109. The 2-bit data received from the first storage unit 8 is "1".
In the case of 0 ', in this embodiment, in step S1108, turn
After substituting 2 for, the flow advances to step S1109. That is, the 2-bit data received from the first storage unit 8 is "0".
In the case of 0 ',' 01 ', and' 10 ', the output pixel data are pixel data latched by former [0], former [1], former [2], respectively.

【0087】続いて、本実施例は、ステツプS1109
で、nextにラツチされた画素データと、former[turn]に
ラツチされた画素データとを入替えた後、ステツプS1
113へ進む。一方、第1記憶部8から受取つた2ビツ
トのデータが‘11’の場合、本実施例は、ステツプS
1110でturn_pとturn_ppとも異なるラツチデータ番
号をturnへセツトし、ステツプS1111でformer[tur
n]へnextにラツチされた画素データを代入し、ステツプ
S1112で、第1記憶部8から受取つた24ビツトの
画素データをnextへ代入した後、すてつぷS1113へ
進む。なお、前述のステツプS1103,1104で、
turn_pとturn_ppとが同値にならないようにしているの
で、ステツプS1110において、turnは0,1,2の
何れかになる。
Subsequently, in this embodiment, step S1109 is executed.
Then, after replacing the pixel data latched in next with the pixel data latched in former [turn], step S1
Proceed to 113. On the other hand, if the 2-bit data received from the first storage unit 8 is "11", the present embodiment is directed to step S
At 1110, a latch data number different from turn_p and turn_pp is set to turn, and at step S1111 the former [tur
Substituting the pixel data latched in next into [n], and in step S1112, after substituting the 24-bit pixel data received from the first storage unit 8 into next, the process proceeds to step S1113. Note that in steps S1103 and 1104 described above,
Since turn_p and turn_pp are not set to the same value, turn is 0, 1, or 2 in step S1110.

【0088】続いて、本実施例は、ステツプS1113
でnextにラツチされた画素データを伸長結果として出力
し、ステツプS1114でカウンタiをインクリメント
し、ステツプS1115でカウンタiの値を判定して、
i≦63であればステツプS1102へ戻つて残りの画
素を処理し、また、i>63であれば図10の処理手順
へ戻る。
Subsequently, in the present embodiment, step S1113 is executed.
Output the pixel data latched to next as a decompression result, increment the counter i in step S1114, and determine the value of the counter i in step S1115,
If i ≦ 63, the process returns to step S1102 to process the remaining pixels, and if i> 63, the process returns to the processing procedure of FIG.

【0089】以上説明したように、本実施例によれば、
画像劣化を防ぎかつ目標圧縮率を達成するために、一部
の画像データは可逆圧縮し、他の画像データは不可逆圧
縮された圧縮データを、圧縮方法に応じて適切に伸長す
ることができる。さらに、本実施例によれば、ブロツク
単位で、可逆圧縮データと不可逆圧縮データを伸長でき
るので、例えば、コンピユータ作成画像にはめ込まれた
自然画像に対しても、自然画像にはめ込まれたコンピユ
ータ作成画像に対しても有効に機能する。
As described above, according to this embodiment,
In order to prevent image deterioration and achieve the target compression ratio, some image data can be losslessly compressed, and other image data can be lossy compressed, and the compressed data can be appropriately expanded according to the compression method. Furthermore, according to the present embodiment, lossless compression data and lossy compression data can be decompressed in block units. Therefore, for example, even for a natural image embedded in a computer created image, a computer created image embedded in a natural image Also works effectively against.

【0090】[0090]

【第4実施例】上述した実施例においては、目標圧縮率
を達成するためにメモリをセグメントに分け、セグメン
トコントローラを用いることにより実現したが、1度目
の圧縮処理で第2記憶部に領域情報を作成し、目標圧縮
率を達成するADCTのδフアクタを算出して、2度目
の圧縮処理で達成してもよい。この場合、複雑なメモリ
制御処理は不要になる。
[Fourth Embodiment] In the above-described embodiment, the memory is divided into segments in order to achieve the target compression ratio, and the segment controller is used. However, in the first compression process, the area information is stored in the second storage unit. May be generated, the delta factor of ADCT that achieves the target compression rate may be calculated, and this may be achieved by the second compression processing. In this case, complicated memory control processing becomes unnecessary.

【0091】[0091]

【第5実施例】上述した第1実施例および第2実施例に
おいては、可逆圧縮部3から出力される可逆圧縮デー
タ、すなわち信号S2a,S2bは、ON/OFF(‘1’
/‘0’)を表すフラグ制によつて構成されているが、
第4実施例は、該信号をトリガ制によつて構成するもの
である。
[Fifth Embodiment] In the first and second embodiments described above, the reversible compression data output from the reversible compression unit 3, that is, the signals S2a and S2b are turned ON / OFF ('1').
/ '0') is configured by the flag system,
In the fourth embodiment, the signal is constructed by a trigger system.

【0092】図13はフラグ制とトリガ制の違いを説明
する図で、同図(a)はフラグ制を、同図(b)はトリ
ガ制を表している。図13から明らかなように、トリガ
制の方が同じデータが長く続く傾向がある。本実施例
は、この性質を利用して、信号S2a,S2bに、さらにM
Hなどのランレングス圧縮を施して、データ量の削減を
達成する。
13A and 13B are views for explaining the difference between the flag system and the trigger system. FIG. 13A shows the flag system and FIG. 13B shows the trigger system. As is clear from FIG. 13, the same data tends to last longer in the trigger system. This embodiment utilizes this property to further add M to the signals S2a and S2b.
A run-length compression such as H is performed to reduce the amount of data.

【0093】また、MHに限らず、出来上がつた圧縮デ
ータへ、ハフマン符号化やLempel-Ziv符号化などを施し
て、さらにデータ圧縮することもできる。なお、信号S
2cに、ハフマン符号化やLempel-Ziv符号化などを施すこ
とも効果的である。なお、本発明は、複数の機器から構
成されるシステムに適用しても、1つの機器からなる装
置に適用してもよい。
Further, not limited to MH, Huffman coding, Lempel-Ziv coding, etc. may be applied to the completed compressed data to further compress the data. The signal S
It is also effective to apply Huffman coding or Lempel-Ziv coding to 2c. The present invention may be applied to a system including a plurality of devices or an apparatus including a single device.

【0094】また、本発明は、システムあるいは装置に
プログラムを供給することによつて達成される場合にも
適用できることはいうまでもない。
It is needless to say that the present invention can be applied to the case where it is achieved by supplying a program to a system or an apparatus.

【0095】[0095]

【発明の効果】以上、本発明によれば、ブロツクを可逆
圧縮した場合の圧縮データ量Dと所定値Lとの関係が、
D≦Lになる場合は該ブロツクを可逆圧縮処理し、D>
Lになる場合は該ブロツクを不可逆圧縮処理し、およ
び、圧縮データを可逆圧縮データとして伸長処理した結
果と、該圧縮データを不可逆圧縮データとして伸長処理
した結果との何れかを、入力された情報に基づいて選択
して、原画像データを復元する画像処理方法および画像
処理装置を提供できる。
As described above, according to the present invention, the relation between the compressed data amount D and the predetermined value L when the block is losslessly compressed is
If D ≦ L, the block is losslessly compressed and D>
If it becomes L, either the result of lossy compression processing of the block and decompression processing of the compressed data as lossless compression data or the result of decompression processing of the compressed data as lossy compression data is input information. It is possible to provide an image processing method and an image processing apparatus that restore the original image data by selecting based on the.

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

【図1】本発明に係る一実施例の画像圧縮装置の構成例
を示すブロツク図である。
FIG. 1 is a block diagram showing a configuration example of an image compression apparatus according to an embodiment of the present invention.

【図2】本実施例の可逆圧縮部の構成例を示すブロツク
図である。
FIG. 2 is a block diagram showing a configuration example of a lossless compression unit according to the present exemplary embodiment.

【図3】本実施例の領域判定部の構成例を示すブロツク
図である。
FIG. 3 is a block diagram showing a configuration example of an area determination unit of this embodiment.

【図4】本実施例のADCT部の構成例を示すブロツク
図である。
FIG. 4 is a block diagram showing a configuration example of an ADCT unit of this embodiment.

【図5】本発明に係る第2実施例の可逆圧縮手順の一例
を示すフローチヤートである。
FIG. 5 is a flow chart showing an example of a reversible compression procedure according to the second embodiment of the present invention.

【図6】図5のステツプS404の処理手順の一例を示
すフローチヤートである。
FIG. 6 is a flowchart showing an example of the processing procedure of step S404 in FIG.

【図7】図6のステツプS506の処理手順の一例を示
すフローチヤートである。
FIG. 7 is a flowchart showing an example of the processing procedure of step S506 in FIG.

【図8】本実施例のブロツクの画素の処理順の一例を示
す図である。
FIG. 8 is a diagram showing an example of the processing order of block pixels according to the present embodiment.

【図9】本発明に係る第3実施例のデータ伸長装置の構
成例を示すブロツク図である。
FIG. 9 is a block diagram showing a configuration example of a data decompression device according to a third embodiment of the present invention.

【図10】本実施例の可逆圧縮データ伸長部をソフトウ
エアで実現する処理手順の一例を示すフローチヤートで
ある。
FIG. 10 is a flow chart showing an example of a processing procedure for realizing the lossless compression data decompression unit of the present embodiment by software.

【図11】図10のステツプS1003の伸長処理の手
順を示すフローチヤートである。
11 is a flow chart showing the procedure of extension processing in step S1003 of FIG.

【図12】第1実施例の可逆圧縮部の他の構成例を示す
ブロツク図である。
FIG. 12 is a block diagram showing another configuration example of the reversible compression unit of the first embodiment.

【図13】一般的なフラグ制とトリガ制の違いを説明す
る図である。
FIG. 13 is a diagram illustrating a difference between a general flag system and a trigger system.

【図14】従来のADCT画像圧縮装置の構成を示すブ
ロツク図である。
FIG. 14 is a block diagram showing a configuration of a conventional ADCT image compression device.

【図15】従来のADCTデータ伸長装置の構成を示す
ブロツク図である。
FIG. 15 is a block diagram showing a configuration of a conventional ADCT data decompression device.

【図16】コンピユータで作成された一般的なカラー多
値画像の画像データの一部を示す図である。
FIG. 16 is a diagram showing a part of image data of a general color multi-valued image created by a computer.

【図17】図16に示した画像データを従来のADCT
データ圧縮装置で処理した結果を示す図である。
17 is a diagram illustrating a conventional ADCT based on the image data shown in FIG.
It is a figure which shows the result processed by the data compression apparatus.

【図18】図17に示した8ブロツクをDCT変換した
様子を示す図である。
FIG. 18 is a diagram showing a state in which 8 blocks shown in FIG. 17 are DCT-transformed.

【図19】量子化に用いる一般的な量子化テーブルを示
す図である。
FIG. 19 is a diagram showing a general quantization table used for quantization.

【図20】図18に示したDCT係数データを図19に
示した量子化テーブルで量子化した結果を示す図であ
る。
20 is a diagram showing a result of quantizing the DCT coefficient data shown in FIG. 18 using the quantization table shown in FIG.

【図21】一般的な、画素データをジグザグ順に並び替
える様子を示す図である。
FIG. 21 is a diagram showing a general state of rearranging pixel data in zigzag order.

【図22】一般的な、ADCT圧縮画像データにハフマ
ン復号および逆量子化を施した結果を示した図である。
FIG. 22 is a diagram showing the result of Huffman decoding and inverse quantization performed on general ADCT compressed image data.

【図23】図22に示したDCT係数データを逆DCT
した結果を示す図である。
23 is an inverse DCT of the DCT coefficient data shown in FIG.
It is a figure which shows the result.

【図24】従来のADCTデータ伸長装置によつて最終
的に得られたデータを示す図である。
FIG. 24 is a diagram showing data finally obtained by a conventional ADCT data decompression device.

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

1 画像データ記憶部 2 遅延部 3 可逆圧縮部 4 ADCT圧縮部 5 バツフア 6 セグメントコントローラ 7 セグメント情報テーブル部 8 第1記憶部 9 第2記憶部 10 制御部 201 並替部 202〜205 第1〜第4ラツチ部 206〜209 第1〜第4比較部 210 デコーダ 211 PLD 213 バツクアツプ部 214 領域判定部 801 色空間変換部 802 DCT部 803 量子化部 804 符号部 901 セグメントコントローラ 902 ADCT伸長部 904 可逆圧縮データ伸長部 906 セレクタ 907 画像データ格納部 910 制御部 DESCRIPTION OF SYMBOLS 1 Image data storage unit 2 Delay unit 3 Reversible compression unit 4 ADCT compression unit 5 Buffer 6 Segment controller 7 Segment information table unit 8 First storage unit 9 Second storage unit 10 Control unit 201 Rearrangement unit 202 to 205 First to first 4 latch unit 206-209 1st-4th comparison unit 210 decoder 211 PLD 213 back-up unit 214 area determination unit 801 color space conversion unit 802 DCT unit 803 quantization unit 804 encoding unit 901 segment controller 902 ADCT decompression unit 904 lossless compressed data Decompression unit 906 Selector 907 Image data storage unit 910 Control unit

Claims (9)

【特許請求の範囲】[Claims] 【請求項1】 画像データをブロツク単位で処理する画
像処理方法であつて、 前記ブロツクを可逆圧縮した場合の圧縮データ量Dと所
定値Lとの関係がD≦Lになる場合は前記ブロツクを可
逆圧縮処理し、 前記ブロツクを可逆圧縮した場合の圧縮データ量Dと所
定値Lとの関係がD>Lになる場合は前記ブロツクを不
可逆圧縮処理することを特徴とする画像処理方法。
1. An image processing method for processing image data in blocks, wherein the block is reversibly compressed when the relationship between a compressed data amount D and a predetermined value L is D ≦ L. An image processing method, wherein lossless compression processing is performed, and when the relationship between the compressed data amount D and the predetermined value L when the block is losslessly compressed is D> L, the block is lossy compressed.
【請求項2】 前記可逆圧縮処理は、 前記ブロツクの画素データを1次元に並べ替えて出力す
る並替行程と、 前記並替行程で出力された画素データをラツチするラツ
チ行程と、 前記ラツチ行程でラツチされた第1の画素データと前記
第1の画素データに続いて前記並替行程で出力された第
2の画素データとを比較する第1の画素比較行程と、 前記第1の画素比較行程の比較結果が不一致であつた場
合の前記ラツチ手段にラツチされた画素データを少なく
とも1つ以上保持する保持行程と、 前記第1の画素比較行程の比較結果が不一致であつた場
合に前記保持行程で保持された画素データと前記第2の
画素データとを比較する第2の画素比較行程と、 前記第1の画素比較行程の比較結果が不一致であつた場
合に前記第2の画素比較行程の比較結果に応じて前記保
持行程で保持された画素データの1つを前記ラツチ行程
でラツチされた画素データに更新する更新行程と、 前記比較行程の比較結果がD>Lだつた場合前記ラツチ
行程でラツチされた画素データと前記保持行程で保持さ
れた画素データとを現ブロツクの処理以前の値に戻すリ
カバリ行程とを含み、 前記第1の画素比較行程の比較結果と前記第2の画素比
較行程の比較結果とを出力し、前記第2の画素比較行程
によつて前記第2の画素データが前記保持行程で保持さ
れた何れの画素データとも不一致になつた場合は前記第
2の画素データを出力することを特徴とする請求項1記
載の画像処理方法。
2. The reversible compression process includes a rearrangement step of rearranging the pixel data of the block one-dimensionally and outputting the pixel data, a latching step of latching the pixel data output in the rearrangement step, and the latching step. A first pixel comparison step of comparing the first pixel data latched by the first pixel data and the second pixel data output in the rearrangement step subsequent to the first pixel data, and the first pixel comparison A holding step of holding at least one pixel data latched by the latch means when the comparison result of the process does not match, and the holding process when the comparison result of the first pixel comparison process does not match. The second pixel comparison step of comparing the pixel data held in the step with the second pixel data, and the second pixel comparison step when the comparison result of the first pixel comparison step does not match. comparison In accordance with the result, one of the pixel data held in the holding process is updated to the pixel data latched in the latching process, and when the comparison result of the comparing process is D> L, the latching process is performed. A recovery step of returning the latched pixel data and the pixel data held in the holding step to a value before the processing of the current block, the comparison result of the first pixel comparison step and the second pixel comparison step. Is output, and if the second pixel data does not match any of the pixel data held in the holding process by the second pixel comparison process, the second pixel data is output. The image processing method according to claim 1, wherein the image is output.
【請求項3】 画像データをブロツク単位で処理する画
像処理装置であつて、 前記ブロツクを可逆圧縮する第1の圧縮手段と、 前記ブロツクを不可逆圧縮する第2の圧縮手段と、 前記第1の圧縮手段によつて前記ブロツクを圧縮した場
合の圧縮データ量Dと所定値Lとを比較する比較手段
と、 前記比較手段の比較結果がD≦Lの場合は前記第1の圧
縮手段の圧縮結果を選択し、前記比較手段の比較結果が
D>Lの場合は前記第2の圧縮手段の圧縮結果を選択す
る選択手段とを備え、 前記比較手段の比較結果と前記選択手段によつて選択さ
れた圧縮結果とを出力することを特徴とする画像処理装
置。
3. An image processing apparatus for processing image data in block units, comprising: first compression means for reversibly compressing the block; second compression means for irreversibly compressing the block; A comparison means for comparing the compressed data amount D and a predetermined value L when the block is compressed by the compression means, and a compression result of the first compression means if the comparison result of the comparison means is D ≦ L. And selecting means for selecting the compression result of the second compression means when the comparison result of the comparison means is D> L, the comparison result of the comparison means is selected by the selection means. An image processing apparatus which outputs the compressed result.
【請求項4】 前記第2の圧縮手段は適応型離散コサイ
ン変換方式によつて圧縮を行うことを特徴とする請求項
3記載の画像処理装置。
4. The image processing apparatus according to claim 3, wherein the second compression means performs compression by an adaptive discrete cosine transform method.
【請求項5】 前記第1の圧縮手段は、 前記ブロツクの画素データを1次元に並べ替えて出力す
る並替手段と、 前記並替手段から出力された画素データをラツチするラ
ツチ手段と、 前記ラツチ手段にラツチされた第1の画素データと前記
第1の画素データに続いて前記並替手段から出力された
第2の画素データとを比較する第1の画素比較手段と、 前記第1の画素比較手段の比較結果が不一致であつた場
合の前記ラツチ手段にラツチされた画素データを少なく
とも1つ以上保持する保持手段と、 前記第1の画素比較手段の比較結果が不一致であつた場
合に前記保持手段に保持された画素データと前記第2の
画素データとを比較する第2の画素比較手段と、 前記第1の画素比較手段の比較結果が不一致であつた場
合に前記第2の画素比較手段の比較結果に応じて前記保
持手段に保持された画素データの1つを前記ラツチ手段
にラツチされた画素データに更新する更新手段と、 前記比較手段の比較結果がD>Lだつた場合前記ラツチ
手段にラツチされた画素データと前記保持手段に保持さ
れた画素データとを現ブロツクの処理以前の値に戻すリ
カバリ手段とを含み、 前記第1の画素比較手段の比較結果と前記第2の画素比
較手段の比較結果とを出力し、前記第2の画素比較手段
によつて前記第2の画素データが前記保持手段に保持さ
れた何れの画素データとも不一致になつた場合は前記第
2の画素データを出力することを特徴とする請求項3記
載の画像処理装置。
5. The first compressing means rearranges means for rearranging the pixel data of the block one-dimensionally and outputs the pixel data, and a latch means for latching the pixel data output from the rearrangement means. First pixel comparison means for comparing the first pixel data latched by the latch means with the second pixel data output from the rearrangement means subsequently to the first pixel data; and the first pixel comparison means. Holding means for holding at least one pixel data latched in the latch means when the comparison result of the pixel comparison means is inconsistent, and the comparison result of the first pixel comparison means is inconsistent Second pixel comparing means for comparing the pixel data held in the holding means with the second pixel data; and the second pixel if the comparison result of the first pixel comparing means does not match. Comparison means Updating means for updating one of the pixel data held in the holding means to the pixel data latched by the latch means according to the comparison result, and when the comparison result of the comparing means is D> L, the latch Means for recovering the pixel data latched by the means and the pixel data held by the holding means to a value before the processing of the current block, the comparison result of the first pixel comparing means and the second pixel The second pixel is output when the comparison result of the comparison means is output, and when the second pixel comparison means does not match any of the pixel data held in the holding means by the second pixel comparison means. The image processing apparatus according to claim 3, wherein the image processing apparatus outputs data.
【請求項6】 前記並替手段は前記ブロツクをジグザグ
にスキヤンすることを特徴とする請求項5記載の画像処
理装置。
6. The image processing apparatus according to claim 5, wherein the rearrangement unit scans the blocks in a zigzag manner.
【請求項7】 前記比較手段は、 前記第1の画素比較手段の比較結果が不一致になつた回
数を計数する第1の計数手段と、 前記第2の画素比較手段によつて前記第2の画素データ
が前記保持手段に保持された何れの画素データとも不一
致になつた回数を計数する第2の計数手段とを含み、 前記第1の計数手段の係数結果と前記第2の計数手段の
計数結果とから前記圧縮データ量Dを演算することを特
徴とする請求項5記載の画像処理装置。
7. The comparing means counts the number of times that the comparison result of the first pixel comparing means becomes inconsistent, and the second pixel comparing means counts the second count. Second counting means for counting the number of times that the pixel data does not match any of the pixel data held in the holding means, the coefficient result of the first counting means and the counting of the second counting means. The image processing apparatus according to claim 5, wherein the compressed data amount D is calculated from the result.
【請求項8】 前記比較手段は、 前記所定値Lと処理済みブロツクの圧縮データ量Dの差
Sを累積する累積手段とを含み、 現処理ブロツクにおける比較結果がD≦Lの場合は前記
所定値Lを所定値Cと前記累積手段に累積された前記差
Sとの和に更新することを特徴とする請求項3または請
求項7記載の画像処理装置。
8. The comparing means includes an accumulating means for accumulating a difference S between the predetermined value L and the compressed data amount D of the processed block, and when the comparison result in the current processing block is D ≦ L, the predetermined value is the predetermined value. 8. The image processing apparatus according to claim 3, wherein the value L is updated to a sum of a predetermined value C and the difference S accumulated in the accumulating unit.
【請求項9】 画像データをブロツク単位で圧縮した圧
縮データを伸長する画像画像処理方法であつて、 前記圧縮データを可逆圧縮データとして伸長処理した結
果と前記圧縮データを不可逆圧縮データとして伸長処理
した結果との何れかを入力された情報に基づいて選択し
て、選択した伸長結果を組合せて原画像データを復元す
ることを特徴とする画像処理方法。
9. An image image processing method for decompressing compressed data obtained by compressing image data in block units, comprising: a result of decompressing the compressed data as lossless compressed data and decompressing the compressed data as lossy compressed data. An image processing method, characterized in that any one of the results is selected based on the input information, and the selected expansion results are combined to restore the original image data.
JP4205249A 1992-07-31 1992-07-31 Image processing method/device Withdrawn JPH0654208A (en)

Priority Applications (4)

Application Number Priority Date Filing Date Title
JP4205249A JPH0654208A (en) 1992-07-31 1992-07-31 Image processing method/device
EP19930305961 EP0583107B1 (en) 1992-07-31 1993-07-28 Image processing method and apparatus
DE1993629519 DE69329519T2 (en) 1992-07-31 1993-07-28 Image processing method and apparatus
US08/521,466 US6028961A (en) 1992-07-31 1995-08-30 Image processing method and apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP4205249A JPH0654208A (en) 1992-07-31 1992-07-31 Image processing method/device

Publications (1)

Publication Number Publication Date
JPH0654208A true JPH0654208A (en) 1994-02-25

Family

ID=16503865

Family Applications (1)

Application Number Title Priority Date Filing Date
JP4205249A Withdrawn JPH0654208A (en) 1992-07-31 1992-07-31 Image processing method/device

Country Status (1)

Country Link
JP (1) JPH0654208A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH08202868A (en) * 1995-01-30 1996-08-09 Konica Corp Picture processor
US6544684B2 (en) 2000-04-18 2003-04-08 Matsushita Electric Industrial Co., Ltd. Prismatic battery and method of manufacturing same
WO2003084243A1 (en) * 2002-03-28 2003-10-09 Sony Corporation Image compression/encoding device, method, and program
JP2007281758A (en) * 2006-04-05 2007-10-25 Seiko Epson Corp Moving image display system, moving image data output device, display device, and program
JP2010056600A (en) * 2008-08-26 2010-03-11 Victor Co Of Japan Ltd Device for encoding video signal and device for decoding video signal
JP2011130410A (en) * 2009-12-21 2011-06-30 Mtekvision Co Ltd Encoding method, decoding method and apparatus thereof
KR20180035745A (en) * 2018-01-31 2018-04-06 주식회사 에벤에셀케이 Apparatus and method for processing image based on file format

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH08202868A (en) * 1995-01-30 1996-08-09 Konica Corp Picture processor
US6544684B2 (en) 2000-04-18 2003-04-08 Matsushita Electric Industrial Co., Ltd. Prismatic battery and method of manufacturing same
WO2003084243A1 (en) * 2002-03-28 2003-10-09 Sony Corporation Image compression/encoding device, method, and program
US7424162B2 (en) 2002-03-28 2008-09-09 Sony Corporation Image compression system with coding quantity control
US8345744B2 (en) 2002-03-28 2013-01-01 Sony Corporation Image compression system with coding quantity control
JP2007281758A (en) * 2006-04-05 2007-10-25 Seiko Epson Corp Moving image display system, moving image data output device, display device, and program
JP2010056600A (en) * 2008-08-26 2010-03-11 Victor Co Of Japan Ltd Device for encoding video signal and device for decoding video signal
JP2011130410A (en) * 2009-12-21 2011-06-30 Mtekvision Co Ltd Encoding method, decoding method and apparatus thereof
KR20180035745A (en) * 2018-01-31 2018-04-06 주식회사 에벤에셀케이 Apparatus and method for processing image based on file format

Similar Documents

Publication Publication Date Title
US5379122A (en) Decompression of standard ADCT-compressed images
US5719961A (en) Adaptive technique for encoder and decoder signal transformation
JPH07184057A (en) Adct compression of minimum compression ratio
US6427025B1 (en) Image processing with selection between reversible and irreversible compression
JP2003179767A (en) Method, device, program, medium and circuit for processing color digital data
US5521718A (en) Efficient iterative decompression of standard ADCT-compressed images
US6028961A (en) Image processing method and apparatus
JPH0654208A (en) Image processing method/device
US6829385B2 (en) Apparatus and method for processing images, and a computer-readable medium
EP0583107B1 (en) Image processing method and apparatus
US5903671A (en) Data compression method and apparatus therefor
JPH1175183A (en) Image signal processing method and device and storage medium
US5796872A (en) Method and apparatus for compressing and decompressing image data
JP2619759B2 (en) Image data compression method
JP2809552B2 (en) Image encoding method and image decoding method
JP3087790B2 (en) Image data compression / decompression method and apparatus
JP3264519B2 (en) Image data compression device
JPH04315371A (en) Picture processing method and device
JP3334910B2 (en) Image data compression apparatus and method
JP3323615B2 (en) Image data compression apparatus and method
JP3907505B2 (en) Block truncation coding apparatus and method
JP3236079B2 (en) Image data compression method
JPH1023261A (en) Image-processing unit
JP2810585B2 (en) Image encoding method and image decoding method
JP3199786B2 (en) Image processing device

Legal Events

Date Code Title Description
A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 19991005