Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JPH031849B2 - - Google Patents
[go: Go Back, main page]

JPH031849B2 - - Google Patents

Info

Publication number
JPH031849B2
JPH031849B2 JP62086245A JP8624587A JPH031849B2 JP H031849 B2 JPH031849 B2 JP H031849B2 JP 62086245 A JP62086245 A JP 62086245A JP 8624587 A JP8624587 A JP 8624587A JP H031849 B2 JPH031849 B2 JP H031849B2
Authority
JP
Japan
Prior art keywords
data
bit allocation
image data
allocation pattern
pattern
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.)
Expired - Lifetime
Application number
JP62086245A
Other languages
Japanese (ja)
Other versions
JPS63252018A (en
Inventor
Toshiaki Masuda
Shinichiro Oda
Masaaki Oohashi
Naohito Atozawa
Hajime Watanabe
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Toppan Inc
Original Assignee
Toppan Printing Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Toppan Printing Co Ltd filed Critical Toppan Printing Co Ltd
Priority to JP8624587A priority Critical patent/JPS63252018A/en
Publication of JPS63252018A publication Critical patent/JPS63252018A/en
Publication of JPH031849B2 publication Critical patent/JPH031849B2/ja
Granted legal-status Critical Current

Links

Landscapes

  • Compression, Expansion, Code Conversion, And Decoders (AREA)

Description

【発明の詳細な説明】 〔産業上の利用分野〕 この発明はデイジタル画像データを通信、蓄積
する際に、データの通信効率や、蓄積効率を向上
させるための画像データ圧縮装置に関する。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to an image data compression device for improving data communication efficiency and storage efficiency when communicating and storing digital image data.

〔従来の技術〕[Conventional technology]

最近のデイジタル画像処理技術の進歩に伴い、
印刷業界においても画像をデイジタルデータ化し
て、集版、レタツチ作業を行なうトータルスキヤ
ナが導入され、活躍している。ここで、画像のデ
イジタルデータを通信、蓄積する必要があり、
種々の方式が試みられているが、最良の方式は未
だ発表されていない。これは、通常のデイジタル
データに対して、画像のデイジタルデータのデー
タ量が膨大なものであるためである。一例とし
て、A4サイズの印刷画像1枚を15本/mmの解像
度で4色の成分で表現するためには、次式で示す
ように、56MByteのデータが必要となる。ここ
では、1画素を4Byte(=8bit(1Byte)×4(色))
のデータで表わすとする。
With recent advances in digital image processing technology,
In the printing industry, total scanners, which convert images into digital data and perform plate collection and retouching work, have been introduced and are now in use. Here, it is necessary to communicate and store digital data of images.
Various methods have been tried, but the best method has not yet been announced. This is because the amount of image digital data is enormous compared to normal digital data. As an example, in order to express one A4 size print image with four color components at a resolution of 15 lines/mm, 56MByte of data is required, as shown by the following equation. Here, 1 pixel is 4Byte (= 8bit (1Byte) x 4 (color))
Suppose that it is expressed by the data of .

210mm×297mm×(15本/mm)2 ×4Byte/点≒56MByte …(1) このため、このA4サイズの印刷画像1枚分の
データを通信する場合、通常の公衆回線
(9600bit/sec)を利用すると、13時間も必要で
あり、たとえ、高速デイジタル回線(64Kbit/
sec)を利用しても2時間弱必要である。
210mm x 297mm x (15 lines/mm) 2 x 4Byte/point ≒ 56MByte...(1) Therefore, when communicating data for one A4 size print image, a normal public line (9600bit/sec) is required. It takes up to 13 hours to use a high-speed digital line (64Kbit/
sec), it takes just under 2 hours.

また、データベースを構築するために画像デー
タを蓄積する場合でも、光デイスク(1〜
2GByte)を利用しても、前述のA4サイズの画像
データは18〜36枚分しか格納できず、画像データ
ベースの構築を行なうには画像の蓄積枚数が不足
である。
In addition, even when accumulating image data to construct a database, optical disks (1 to
Even if 2GByte) is used, the aforementioned A4 size image data can only be stored for 18 to 36 images, which is insufficient to build an image database.

そのため、画像データの通信効率や、蓄積効率
を向上させるために画像データの圧縮に関する方
法が各種提案されている。その中でも、直交変換
を利用した画像データの圧縮が圧縮率の高さから
見て最も優れているとされている。ここで、画像
データの圧縮方法を評価するポイントは3点あ
り、画質劣化の少なさ、圧縮率の高さ、計算スピ
ードである。この観点からいろいろある直交変換
の中でも、アダマール変換と2次元離散的コサイ
ン変換の2つが良好な結果を挙げている。前者は
ハードウエア化が簡便なことから計算スピードに
おいて他を圧しており、後者は画質劣化を押えて
圧縮率を高くすることが可能である点が良いとさ
れている。
Therefore, various methods regarding compression of image data have been proposed in order to improve communication efficiency and storage efficiency of image data. Among these, image data compression using orthogonal transformation is said to be the most superior in terms of its high compression rate. Here, there are three points to evaluate the image data compression method: little deterioration in image quality, high compression ratio, and calculation speed. Among various orthogonal transformations from this point of view, two have yielded good results: Hadamard transformation and two-dimensional discrete cosine transformation. The former is superior in calculation speed because it is easy to implement in hardware, and the latter is said to be advantageous in that it can suppress image quality deterioration and increase the compression rate.

直交変換を用いた画像データの圧縮の基本的な
考え方は原画像データのデータマトリクスを直交
変換し、変換後のデータマトリクス内の各データ
に対して画像の特徴に応じた所定のビツト割当て
(LSBから所定のビツトまで有効とし、上位ビツ
トを切捨てる)を行なうことによつて、原画像の
復元に不要となる4ビツトを切捨ててから符号化
を行ない、圧縮される符号化データ列を作成す
る。この際に、いかに最適なビツト割当てを行な
うかによつて、圧縮率と画質再現性が決定される
ものである。
The basic idea of image data compression using orthogonal transformation is to orthogonally transform the data matrix of the original image data, and then assign a predetermined bit allocation (LSB) to each data in the transformed data matrix according to the image characteristics. 4 bits that are unnecessary for restoring the original image are discarded, and then encoding is performed to create a compressed encoded data string. . At this time, the compression ratio and image quality reproducibility are determined by how optimal bit allocation is performed.

また、画像データの復元の際には、符号化の際
に行なつたビツト割当てに従つて符号化データ列
からマトリクスデータを再現して、マトリクスデ
ータを逆変換することによつて、原画像を復元す
る。
In addition, when restoring image data, the original image is restored by reproducing matrix data from the encoded data string according to the bit assignments made during encoding and inversely transforming the matrix data. Restore.

画像データの圧縮の際に画像データの有効なビ
ツトデータを全部残すようにビツト割当てを行な
えば、デイジタル化に伴う量子化誤差を除いて完
全に原画像データは復元されるが、これでは高い
圧縮率を得ることができない。そのため、画質の
劣化を押えつつ画像データのいずれかのビツトデ
ータを切捨ることがどうしても必要となる。この
ビツト割当てを高速に最適化することが直交変換
を利用した画像圧縮の最大のポイントである。
If bits are allocated so as to leave all valid bit data in the image data when compressing the image data, the original image data will be completely restored except for the quantization errors caused by digitization, but this will require high compression. I can't get the rate. Therefore, it is absolutely necessary to truncate some bit data of the image data while suppressing the deterioration of the image quality. The key point of image compression using orthogonal transformation is to quickly optimize this bit allocation.

従来例として、日本電気株式会社製の
Medifile1000はレントゲン画像に対して2次元コ
サイン変換を利用して優れた結果を得ている。た
だし、レントゲン画像はモノクロ画像であり、か
つ解像度は印刷画像に対して低く、扱うデータ量
はカラー印刷画像に対して極めて少ない。
As a conventional example, NEC Corporation's
Medifile1000 uses two-dimensional cosine transformation on X-ray images and obtains excellent results. However, X-ray images are monochrome images, have lower resolution than printed images, and handle an extremely smaller amount of data than color printed images.

このように、従来は、印刷用カラー画像のよう
な大量な画像データを効率良く圧縮する装置は発
表されておらず、その発表が待たれていた。
Thus, until now, no device has been announced that efficiently compresses a large amount of image data such as a color image for printing, and its announcement has been awaited.

〔発明が解決しようとする問題点〕[Problem that the invention seeks to solve]

この発明は上述した事情に対処すべくなされた
もので、印刷物のように大量のデイジタル画像デ
ータを効率良く高速に圧縮することを可能とする
ために、直交変換を利用する画像圧縮において、
最適なビツト割当てを高速に実行できる画像デー
タ圧縮装置を提供することをその目的とする。
This invention was made to deal with the above-mentioned circumstances, and in order to enable efficient and high-speed compression of a large amount of digital image data such as printed matter, in image compression using orthogonal transformation,
The object of the present invention is to provide an image data compression device that can perform optimal bit allocation at high speed.

〔問題点を解決するための手段〕[Means for solving problems]

この発明による画像データ圧縮装置は各画素毎
に割り当てるビツト長を表わすビツト割当てパタ
ーンが複数個記憶されているビツト割当てパター
ンメモリと、直交変換後の画像データと各ビツト
割当てパターンとの差分を行なう差分回路11−
1〜11−kと、ビツト割当てパターン毎の差分
値が許容範囲内にあるかどうかを判定する比較回
路14−1〜14−kと、これらの比較結果に基
づいて最適なビツト割当てパターンを選択するビ
ツト割当てパターンセレクタ17を具備する。
The image data compression device according to the present invention includes a bit allocation pattern memory storing a plurality of bit allocation patterns representing the bit length allocated to each pixel, and a differential memory for performing a difference between image data after orthogonal transformation and each bit allocation pattern. Circuit 11-
1 to 11-k, comparison circuits 14-1 to 14-k that determine whether the difference value for each bit allocation pattern is within an allowable range, and an optimal bit allocation pattern is selected based on the comparison results. The bit allocation pattern selector 17 is provided.

〔作用〕[Effect]

この発明による画像データ圧縮装置によれば、
単純な演算の組合わせにより直交変換後の画像デ
ータマトリクスに対して最適なビツト割当てパタ
ーンを選択することができるため、高圧縮率で、
しかも画質の劣化の少ない画像データの圧縮を短
時間で行なうことができる。
According to the image data compression device according to the present invention,
It is possible to select the optimal bit allocation pattern for the image data matrix after orthogonal transformation by a combination of simple operations, resulting in a high compression ratio.
Furthermore, image data can be compressed in a short time with little deterioration in image quality.

〔実施例〕 以下図面を参照してこの発明による画像データ
圧縮装置の一実施例を説明する。第1図はこの実
施例の概略構成を示すブロツク図である。第2図
はこの実施例の特徴である最適なビツト割当てパ
ターンを選択する回路の構成を示すブロツク図で
ある。第3図は選択されたビツト割当てパターン
に基づいて直交変換後のデータの不要なビツトを
切捨てるとともに、ビツト割当てパターンのパタ
ーンコードを付加して符号化を行なう回路の構成
を示すブロツク図である。
[Embodiment] An embodiment of the image data compression device according to the present invention will be described below with reference to the drawings. FIG. 1 is a block diagram showing the schematic structure of this embodiment. FIG. 2 is a block diagram showing the configuration of a circuit for selecting the optimum bit allocation pattern, which is a feature of this embodiment. FIG. 3 is a block diagram showing the configuration of a circuit that cuts off unnecessary bits of data after orthogonal transformation based on a selected bit allocation pattern, and adds a pattern code of the bit allocation pattern to perform encoding. .

第1図に示すように、この実施例はデータ正規
化回路2、直交変換回路4、ビツト割当てパター
ン選択回路6、圧縮符号化回路8からなる。画像
をM×Nの画像マトリクスで表わし、各画像を所
定ビツトのデータで表わした原画像データID
(x,y)が各画素(x,y)毎に順次データ正
規回路2に入力される。ここで、説明の簡略化の
ため第1図では原画像データはモノクロデータと
して1つしか示していないが、原画像データID
はカラー画像であれば各色成分、例えばIDr,
IDg,IDbのように赤R、緑G、青B成分毎の明
るさを示す3つのデータとなり、第1図の各回路
は各色成分毎に処理することになる。
As shown in FIG. 1, this embodiment comprises a data normalization circuit 2, an orthogonal transformation circuit 4, a bit allocation pattern selection circuit 6, and a compression encoding circuit 8. Original image data ID in which an image is represented by an M×N image matrix, and each image is represented by data of a predetermined bit.
(x, y) are sequentially input to the data normalization circuit 2 for each pixel (x, y). Here, to simplify the explanation, only one original image data is shown as monochrome data in Figure 1, but the original image data ID
If it is a color image, each color component, for example IDr,
There are three data such as IDg and IDb indicating the brightness of each of the red R, green G, and blue B components, and each circuit in FIG. 1 processes each color component.

データ正規化回路2はM×Nマトリクスの原画
像データID(x,y)をn×n画素からなるブロ
ツク毎のデータに分割(正規化)し、ブロツクデ
ータID′(i,j)を作成する。これは、原画像デ
ータID(x,y)全体に直交変換を行なうと、演
算時がかかりすぎるために、n×n画素のブロツ
ク毎に直交変換を行なつた方が効率が良いためで
ある。ここで、n=8〜64が適当であり、一般的
には16、または32がよく利用される。
The data normalization circuit 2 divides (normalizes) the M×N matrix original image data ID (x, y) into data for each block consisting of n×n pixels, and creates block data ID′ (i, j). do. This is because performing orthogonal transformation on the entire original image data ID (x, y) would take too much calculation time, so it is more efficient to perform orthogonal transformation on each block of n×n pixels. . Here, n=8 to 64 is appropriate, and generally 16 or 32 is often used.

第4図に原画像データID(x,y)とブロツク
データID′(i,j)との関係の一例を示す。第4
図はM=32,N=48,n=8の場合であり、原画
像データID(x,y)は24個のブロツクデータ
ID′(i,j)に分割される。この各ブロツクデー
タID′(i,j)に順次以下に示す処理を行なつ
て、各ブロツク毎にデータ圧縮を行なう。
FIG. 4 shows an example of the relationship between original image data ID (x, y) and block data ID' (i, j). Fourth
The figure shows the case where M=32, N=48, n=8, and the original image data ID (x, y) is 24 block data.
ID'(i, j). The following processing is sequentially performed on each block data ID' (i, j) to perform data compression for each block.

ブロツクデータID′(i,j)は直交変換回路4
へ供給される。直交変換回路4はブロツクデータ
ID′(i,j)に直交変換を施し、直交変換データ
AD(i,j)を生成する。一般に、直交変換に
は離散的フーリエ変換、離散的コサイン変換、ア
ダマール変換、ハール変換、スラント変換、K−
L変換等がある。画像圧縮による画質劣化の少な
さでは、K−L変換、離散的コサイン変換が優位
であるが、演算の負荷が大きく、演算スピードを
上げるためには、アダマール変換が優位である。
ここでは、直交変換の一例としてアダマール変換
について説明する。
Block data ID' (i, j) is orthogonal transform circuit 4
supplied to Orthogonal transform circuit 4 is block data
Perform orthogonal transformation on ID′ (i, j) and obtain orthogonal transformation data
Generate AD(i,j). Generally, orthogonal transforms include discrete Fourier transform, discrete cosine transform, Hadamard transform, Haar transform, Slant transform, K-
There are L conversions, etc. K-L transform and discrete cosine transform are superior in terms of less deterioration in image quality due to image compression, but the Hadamard transform is superior in terms of computational load and increase in computational speed.
Here, Hadamard transform will be explained as an example of orthogonal transform.

アダマール変換を行なう対象のデータマトリク
スをID′、変換後のデータマトリクスをADとする
と、両者の関係は次式で与えられる。
Assuming that the data matrix to be subjected to Hadamard transformation is ID′, and the data matrix after conversion is AD, the relationship between the two is given by the following equation.

AD=(1/n)・C・ID′・CT …(2) ここで、Cはアダマール行列であり、アダマー
ル行列は+1,−1の成分から構成される対角行
列のため、アダマール行列の転置行列CT=Cで
ある。なお、逆変換は次式で表わされる。
AD=(1/n)・C・ID′・C T …(2) Here, C is Hadamard matrix, and Hadamard matrix is a diagonal matrix composed of +1 and −1 components, so Hadamard matrix The transposed matrix C T =C. Note that the inverse transformation is expressed by the following equation.

ID′=(1/n)・C・AD・C …(3) アダマール行列Cの一例を以下に示す。例は8
×8のアダマール行列である。
ID'=(1/n)・C・AD・C (3) An example of Hadamard matrix C is shown below. Example is 8
It is a ×8 Hadamard matrix.

変換後のデータAD(i,g)はビツト割当て
パターン選択回路6へ転送され、データAD(i,
j)に最適なビツト割当てパターンの選択が行わ
れる。
The converted data AD(i, g) is transferred to the bit allocation pattern selection circuit 6, and the data AD(i, g) is transferred to the bit allocation pattern selection circuit 6.
j) The optimum bit allocation pattern is selected.

第2図にビツト割当てパターン選択回路6のブ
ロツク図を示す。ビツト割当てパターン選択回路
6は入力バツフアとしての先入れ先出しメモリ
(FIFO)10を具備する。一例として、AD(i,
j)が16×16のデータ配列とすると、FIFO10に
入力された直交変換データAD(i,j)は転送
クロツクCKに従つて、(1,1),(1,2),…,
(16,16)成分まぜの256個のデータが順次差分回
路11−k(k=1〜K)への転送される。ここ
で、差分回路11−kの個数Kは予め用意された
ビツト割当てパターンの数Kだけ設けられてい
る。例えば、ビツト割当てパターンが16個あれ
ば、差分回路11も16個必要であり、ビツト割当
てパターンが32個あれば、差分回路11も32個必
要となる。
FIG. 2 shows a block diagram of the bit allocation pattern selection circuit 6. The bit allocation pattern selection circuit 6 includes a first-in first-out memory (FIFO) 10 as an input buffer. As an example, AD(i,
j) is a 16×16 data array, the orthogonal transformation data AD(i, j) input to FIFO 10 is (1, 1), (1, 2), ..., according to the transfer clock CK.
256 pieces of data with a mixture of (16, 16) components are sequentially transferred to the difference circuit 11-k (k=1 to K). Here, the number K of differential circuits 11-k is equal to the number K of bit allocation patterns prepared in advance. For example, if there are 16 bit assignment patterns, 16 differential circuits 11 are required, and if there are 32 bit assignment patterns, 32 differential circuits 11 are also required.

K個のビツト割当てパターンBPk(i,j)は
ビツト割当てパターンメモリ16に記憶されてお
り、1〜K番目のビツト割当てパターンBPk
(i,j)がそれぞれ差分回路11−1〜11−
kに供給される。ビツト割当てパターンメモリ1
6の読出しアドレスADRはメモリコントローラ
15により発生される。メモリコントローラ15
には転送クロツクCKも入力されていて、FIFO10
からのデータ読出しと同期してその読出しアドレ
スADRをコントロールしてやることにより、直
交変換データの各成分とそれに対応するビツト割
当てパターン成分を同時に差分回路11−kに供
給することができる。
K bit allocation patterns BPk (i, j) are stored in the bit allocation pattern memory 16, and the 1st to Kth bit allocation patterns BPk
(i, j) are differential circuits 11-1 to 11-, respectively.
k. Bit allocation pattern memory 1
The read address ADR of 6 is generated by the memory controller 15. Memory controller 15
The transfer clock CK is also input to FIFO10.
By controlling the readout address ADR in synchronization with the data readout from the differential circuit 11-k, each component of the orthogonal transformation data and the corresponding bit allocation pattern component can be simultaneously supplied to the difference circuit 11-k.

第5図にビツト割当てパターンの一例を示す。
図示のビツト割当てパターンは8×8の直交変換
データに対するパターンであり、ここでは3種類
のパターンを示したが、通常16〜256程度のパタ
ーンを用意すると良い。ここで、空白部は0であ
る。ビツト割当てパターンを構成するマトリクス
データは、画像データを圧縮するために各画像デ
ータ(8ビツトデータ)の上位ビツトを切捨てる
際の閾値を示している。例えば、閾値が8であれ
ば8ビツト全部有効とし、6であればLSBから
6ビツトだけを有効とし(7,8ビツト目を無効
として切捨て符号化に使用しない)、0であれば
全ビツトが不要であることを意味する。具体的に
は、8とあるのは8ビツトすべてが“1”であ
り、パターンデータとしては“11111111”が格納
されていて、6とあるのはLSBから6ビツト目
までが“1”であり、パターンデータとしては
“00111111”が格納されている。ビツト割当てパ
ターンのマトリクスデータの総和は圧縮後の画像
データの全ビツト長を示し、これが少ない程圧縮
率が高いことになる。
FIG. 5 shows an example of a bit allocation pattern.
The illustrated bit allocation pattern is a pattern for 8.times.8 orthogonal transformation data, and although three types of patterns are shown here, it is usually preferable to prepare about 16 to 256 patterns. Here, the blank space is 0. The matrix data constituting the bit allocation pattern indicates a threshold value for cutting off the upper bits of each image data (8-bit data) in order to compress the image data. For example, if the threshold is 8, all 8 bits are valid, if it is 6, only the 6 bits from the LSB are valid (the 7th and 8th bits are invalidated and are not used for encoding), and if it is 0, all bits are valid. means unnecessary. Specifically, 8 means that all 8 bits are “1”, “11111111” is stored as pattern data, and 6 means that all 8 bits are “1” from the LSB to the 6th bit. , “00111111” is stored as the pattern data. The sum total of the matrix data of the bit allocation pattern indicates the total bit length of the image data after compression, and the smaller the sum, the higher the compression ratio.

差分回路11−kはBPk(i,j)−AD(i,
j)を演算する。ここで、データAD(i,j)
が正負の符号付きデータである場合は、BPk
(i,j)−|AD(i,j)|を演算する。この差
分値は直交変換後の各画像データのデータ量(ビ
ツト長)がビツト割当てパターンの割当て量(ビ
ツト長)を越えている程度(不一致度)に相当
し、ここでは、オーバフロー値と称する。
The difference circuit 11-k is BPk(i,j)-AD(i,
j) is calculated. Here, data AD(i,j)
If is positive and negative signed data, BPk
Compute (i, j)−|AD(i, j)|. This difference value corresponds to the extent (degree of mismatch) in which the data amount (bit length) of each image data after orthogonal transformation exceeds the allocation amount (bit length) of the bit allocation pattern, and is herein referred to as an overflow value.

差分回路11−kから出力されるオーバーフロ
ー値はそれぞれ重み付け回路12−kに供給され
る。これは、オーバーフロー値に対して画素(マ
トリクス内の位置)によつて異なる重みW(i,
j)を付けるものであり、乗算器からなる。これ
は、後述するように、各画素毎のオーバーフロー
値をマトリクス全体について集計して、各画像デ
ータマトリクス毎のオーバーフロー値を求め、ビ
ツト割当てパターンが適切か否かを判定するの
で、画像データの高周波成分(高次成分)の切捨
てをより確実に行なうためのものであり、必ずし
も設ける必要はない。アダマール変換において
は、変換後のデータはマトリクス内の左上成分
((1,1)成分)が最も低周波(空間周波数)成
分であり、右下成分((n,n)成分)になるに
つれて高周波成分になるので、オーバーフロー値
を集計する際に、低周波成分の重みを大きく、低
周波成分の重みを小さくすることにより、各画像
データマトリクスとビツト割当てパターンとの不
一致度を正確に求めることができる。
The overflow values output from the difference circuit 11-k are each supplied to a weighting circuit 12-k. This is a weight W(i,
j) and consists of a multiplier. This is because, as described later, the overflow value for each pixel is totaled for the entire matrix, the overflow value for each image data matrix is determined, and it is determined whether or not the bit allocation pattern is appropriate. This is to ensure that components (higher-order components) are discarded, and is not necessarily required. In the Hadamard transform, the data after transformation has the lowest frequency (spatial frequency) component in the upper left component ((1, 1) component) in the matrix, and the higher the frequency as it goes to the lower right component ((n, n) component). Therefore, when aggregating overflow values, it is possible to accurately determine the degree of mismatch between each image data matrix and the bit allocation pattern by increasing the weight of the low frequency component and decreasing the weight of the low frequency component. can.

重み付け回路12−kから出力される重み付け
オーバフロー値はそれぞれオーバフローカウンタ
13−kに供給され、集計される。この結果、オ
ーバフローカウンタ13−kは各ビツト割当てパ
ターンBPkにより与えられる割当て量と各画像
データADのデータ量の不一致度をオーバーフロ
ーカウンタ値OCkとして検出する。
The weighted overflow values output from the weighting circuit 12-k are each supplied to an overflow counter 13-k and are totaled. As a result, the overflow counter 13-k detects the degree of mismatch between the allocation amount given by each bit allocation pattern BPk and the data amount of each image data AD as an overflow counter value OCk.

オーバフローカウンタ13−kのオーバフロー
カウンタ値OCkが比較回路14−kにより適当
な閾値TH1,TH2の範囲にあるか否か判定され
る。そして、次式を満たす場合に、当該ビツト割
当てパターンによるデータ圧縮が適当であること
を示す信号CPkがビツト割当てパターンセレクタ
17に供給される。
It is determined by the comparison circuit 14-k whether the overflow counter value OCk of the overflow counter 13-k is within the range of appropriate threshold values TH 1 and TH 2 . Then, when the following equation is satisfied, a signal CPk indicating that data compression using the bit allocation pattern is appropriate is supplied to the bit allocation pattern selector 17.

TH1≦OCk≦TH2 …(5) ここで、OCk<TH1であれば、圧縮後のデー
タにまだ冗長度があり、逆に、TH2<OCkであ
れば、圧縮のし過ぎであることを示す。なお、閾
値TH1,TH2は固定値でもよいし、各比較回路
14−k毎に異なる値でもよい。
TH 1 ≦OCk≦TH 2 …(5) Here, if OCk < TH 1 , there is still redundancy in the data after compression, and conversely, if TH 2 < OCk, it is overcompressed. Show that. Note that the threshold values TH 1 and TH 2 may be fixed values or may be different values for each comparison circuit 14-k.

ビツト割当てパターンセレクタ17は比較回路
14−kから信号CPkを受けると、該当するデー
タ圧縮が適当であるビツト割当てパターンBPk
の中で圧縮率が最大となるビツト割当てパターン
を決定し、そのパターンを示すパターンコード
PCを圧縮符号化回路8へ供給する。圧縮率最大
のビツト割当てパターンの決定に際して、各ビツ
ト割当てパターンBP1〜BPKは予めこの並び順
に圧縮率が大きくなる(または、小さくなる)よ
うに決めておけば、TH1≦OCk≦TH2の条件を
満たすkの中でkの最大値(または、最小値)を
パターンコードPCとすればよく、選択が容易で
ある。この結果、直交変換データAD(i,j)
と最適ビツト割当てパターンのパターンコード
PCとが圧縮符号化回路8へ供給される。
When the bit allocation pattern selector 17 receives the signal CPk from the comparison circuit 14-k, the bit allocation pattern selector 17 selects a bit allocation pattern BPk for which the corresponding data compression is appropriate.
Determine the bit allocation pattern that maximizes the compression rate among
The PC is supplied to the compression encoding circuit 8. When determining the bit allocation pattern with the maximum compression ratio, if the bit allocation patterns BP1 to BPK are determined in advance so that the compression ratio increases (or decreases) in this order, the condition of TH 1 ≦OCk≦TH 2 can be satisfied. The maximum value (or minimum value) of k among k that satisfies the pattern code PC may be used, and selection is easy. As a result, the orthogonal transformation data AD(i,j)
and the pattern code of the optimal bit allocation pattern.
PC is supplied to the compression encoding circuit 8.

第3図は圧縮符号化回路8のブロツク図であ
る。データAD(i,j)と、パターンコードPC
がそれぞれ遅延回路20とバツフア21に転送さ
れる。データAD(i,j)は遅延回路20にて
パターンコードPCのデータ長(ビツト割当てパ
ターンが256個の場合は8ビツト)に対応する時
間だけ遅延されて、データセレクタ22に転送さ
れる。一方、パターンコードPCはバツフア21
からデータセレクタ22に転送されるとともに、
メモリコントローラ23にも転送される。この結
果、データセレクタ22は最初にパターンコード
PCを、続いてデータAD(i,j)を出力する。
パターンコードPCのデータ長は固定であるので、
データセレクタ22は出力を切換えることによつ
て、パターンコードPCに連続してデータAD(i,
j)をシフトレジスタ26へ転送する。シフトレ
ジスタ26は並列入力/直列出力である。
FIG. 3 is a block diagram of the compression encoding circuit 8. Data AD (i, j) and pattern code PC
are transferred to the delay circuit 20 and buffer 21, respectively. Data AD(i,j) is delayed by the delay circuit 20 by a time corresponding to the data length of the pattern code PC (8 bits if the bit allocation pattern is 256 bits), and then transferred to the data selector 22. On the other hand, the pattern code PC is Batsuhua 21
is transferred from the data selector 22 to the data selector 22, and
It is also transferred to the memory controller 23. As a result, the data selector 22 first selects the pattern code.
The PC then outputs data AD(i,j).
Since the data length of pattern code PC is fixed,
By switching the output, the data selector 22 continuously outputs data AD(i,
j) to the shift register 26. Shift register 26 is parallel input/serial output.

一方、メモリコントローラ23はパターンコー
ドPCに基づいてデータ長格納メモリ24から該
当するデータ長パターンを読出し、転送クロツク
ジエネレータ25にセツトする。データ長格納メ
モリ24はビツト割当てパターンメモリ16と同
様にビツト割当てパターンBPk(i,j)を格納
していて、パターンコードPCで指定されたビツ
ト割当てパターンBPPC(i,j)を出力する。
On the other hand, the memory controller 23 reads the corresponding data length pattern from the data length storage memory 24 based on the pattern code PC, and sets it in the transfer clock generator 25. Like the bit allocation pattern memory 16, the data length storage memory 24 stores a bit allocation pattern BPk (i, j), and outputs the bit allocation pattern BP PC (i, j) specified by the pattern code PC.

転送クロツクジエネレータ25はビツト割当て
パターンBPPC(i,j)に基づいて転送クロツク
CK′を発生する。シフトレジスタ26は転送クロ
ツクCK′が入力された時だけデータをシフトして
バツフア27に転送を行なうため、転送クロツク
ジエネレータ25は最初にパターンコードPCの
ビツト長分の転送クロツクCK′を発生した後、各
画素データについては、画像データAD(i,j)
の8ビツトのデータのうち符号化に必要なビツト
長に相当する期間だけ転送クロツクCK′を発生す
る。この結果、パターンコードPCに続いて各画
像データのうちビツト割当てパターンに応じた有
効なビツトデータのみがバツフア27に転送さ
れ、ブロツク毎の圧縮された画像データ列CDが
生成される。
The transfer clock generator 25 generates the transfer clock based on the bit allocation pattern BP PC (i, j).
Generates CK′. Since the shift register 26 shifts data and transfers it to the buffer 27 only when the transfer clock CK' is input, the transfer clock generator 25 first generates the transfer clock CK' for the bit length of the pattern code PC. After that, for each pixel data, image data AD (i, j)
The transfer clock CK' is generated only for a period corresponding to the bit length necessary for encoding among the 8-bit data. As a result, following the pattern code PC, only valid bit data of each image data according to the bit allocation pattern is transferred to the buffer 27, and a compressed image data string CD for each block is generated.

圧縮されたデータ列CDの構造を第6図に示す。
第6図に示すように、先頭にパターンコードPC
が書かれており、PCのビツト長は固定である。
The structure of the compressed data string CD is shown in FIG.
As shown in Figure 6, the pattern code PC is placed at the beginning.
is written, and the bit length of the PC is fixed.

例えば、用意されたビツト割当てパターンが
256種類であれば、パターンコードPCは8ビツト
長となる。パターンコードPCの後には画像デー
タAD(i,j)が続く。ここで、画像データ全
体のデータ長は可変であり、パターンコードPC
と一対一に対応したデータ長であり、予め決めら
れている。一例として、第5図に示したパターン
2ではビツト長(各データのビツト長の総和)は
37ビツトである。パターンコードPCの直後には
画像データAD(i,j)の(1,1)成分が書
かれている。前述のパターン2の例では、8ビツ
ト長に相当する。次に、(1,2)成分が4ビツ
ト長で書かれている。以下同様に、画像データ
AD(i,j)のうち、ビツト割当てパターンに
より指定された有効なビツト長の成分を連続して
書込むことにより、画像データの圧縮符号化が達
成される。パターン2のビツト割当てパターンの
際には、パターンコードがPCが8ビツト長、デ
ータ配列が37ビツト長で、合計で45ビツト長に原
画像のブロツクデータがデータ圧縮されたことに
なる。これは、原画像の全長データ長が8×8×
8ビツト=512ビツトであつたから、37/512=
7.2%にデータ圧縮されたことを意味する。
For example, if the prepared bit allocation pattern is
If there are 256 types, the pattern code PC will be 8 bits long. Image data AD(i,j) follows the pattern code PC. Here, the data length of the entire image data is variable, and the pattern code PC
This is a data length that corresponds one-to-one with , and is determined in advance. As an example, in pattern 2 shown in Figure 5, the bit length (sum of bit lengths of each data) is
It is 37 bits. Immediately after the pattern code PC, the (1,1) component of the image data AD(i,j) is written. In the example of pattern 2 described above, this corresponds to a length of 8 bits. Next, the (1,2) component is written with a length of 4 bits. Similarly, image data
Compression encoding of image data is achieved by successively writing components of AD(i,j) having an effective bit length specified by the bit allocation pattern. In the case of the bit allocation pattern of pattern 2, the pattern code is 8 bits long for the PC and the data array is 37 bits long, so that the block data of the original image is compressed to a total length of 45 bits. This means that the total data length of the original image is 8×8×
Since 8 bits = 512 bits, 37/512 =
This means that the data has been compressed to 7.2%.

以上の各ブロツク毎の処理を(M×N)/n2
繰返し実施することにより、全ての原画像データ
は圧縮されたデータに変換されることになる。
By repeating the above processing for each block twice (M×N)/n times, all the original image data is converted into compressed data.

逆に、圧縮されたデータ列を復元するために
は、先頭のパターンコードPCに従つて、ビツト
割当てパターンを呼出して、後に続くデータ列を
ビツト割当てパターンのデータ長に従つて画像デ
ータマトリクスに配分してから逆変換することに
よつて、ブロツク毎の原画像データが求まる。こ
の作業を同様に(M×N)/n2回繰返せばよい。
Conversely, in order to restore a compressed data string, the bit allocation pattern is called according to the first pattern code PC, and the subsequent data string is allocated to the image data matrix according to the data length of the bit allocation pattern. The original image data for each block is obtained by performing inverse transformation. This operation may be repeated (M×N)/n times in the same manner.

このように、この実施例によれば、各ビツト割
当てパターンにおける現画像データのオーバフロ
ー分を演算することにより、これを基に圧縮率を
最大にでき、しかも必要なデータを消失すること
のない最適なビツト割当てパターンを短時間で選
択できる。
As described above, according to this embodiment, by calculating the overflow amount of the current image data in each bit allocation pattern, the compression ratio can be maximized based on this, and the optimal compression ratio can be calculated without losing any necessary data. A suitable bit allocation pattern can be selected in a short time.

なお、アダマール変換では変換後のデータ配列
において(1,1)成分以外は正負の符号を有す
るために、原画像データADとしては符号ビツト
を1ビツト付加したデータを用いてもよい。
Note that in the Hadamard transform, since components other than the (1,1) component have positive and negative signs in the data array after the transform, data to which one sign bit has been added may be used as the original image data AD.

以上、この発明の一実施例について説明を行な
つてきたが、この発明は上述した実施例に限定さ
れることなく、種々変形が可能である。例えば、
不要なビツトを切捨てるのにシフトレジスタを用
いたが、変換データの全ビツトデータに並列に作
動するゲートを用いてもよい。また、直交変換と
してはアダマール変換に限定されず、他の種類で
もよい。さらに、上述の機能をプログラムしたマ
イクロコンピユータによりソフトウエア的に実現
してもよい。
Although one embodiment of the present invention has been described above, the present invention is not limited to the above-described embodiment and can be modified in various ways. for example,
Although a shift register is used to discard unnecessary bits, gates operating in parallel on all bits of converted data may also be used. Further, the orthogonal transformation is not limited to Hadamard transformation, and other types may be used. Furthermore, the above-mentioned functions may be implemented in software using a programmed microcomputer.

〔発明の効果〕〔Effect of the invention〕

以上説明したようにこの発明によれば、単純な
演算の組合わせだけで、直交変換後のデータ配列
に対して最適なビツト割当てを高速に行なうこと
ができる画像データ圧縮装置を提供することがで
きる。
As explained above, according to the present invention, it is possible to provide an image data compression device that can quickly perform optimal bit allocation for a data array after orthogonal transformation by simply combining simple operations. .

【図面の簡単な説明】[Brief explanation of the drawing]

第1図はこの発明による画像データ圧縮装置の
一実施例の概略構成を示すブロツク図、第2図は
ビツト割当てパターン選択回路のブロツク図、第
3図は圧縮符号化回路のブロツク図、第4図は画
像データの正規化の一例を示す図、第5図はビツ
ト割当てパターンの一例を示す図、第6図は圧縮
後のデータ構造を示す図である。 2……データ正規化回路、4……直交変換回
路、6……ビツト割当てパターン選択回路、8…
…圧縮符号化回路、11−1〜11−k……差分
回路、12−1〜12−k……重み付け回路、1
3−1〜13−k……オーバフローカウンタ、1
4−1〜14−k……比較回路、16……ビツト
割当てパターンメモリ、17……ビツト割当てパ
ターンセレクタ、20……遅延回路、22……デ
ータセレクタ、24……データ長格納メモリ、2
6……シフトレジスタ。
FIG. 1 is a block diagram showing a schematic configuration of an embodiment of an image data compression device according to the present invention, FIG. 2 is a block diagram of a bit allocation pattern selection circuit, FIG. 3 is a block diagram of a compression encoding circuit, and FIG. 5 shows an example of normalization of image data, FIG. 5 shows an example of a bit allocation pattern, and FIG. 6 shows a data structure after compression. 2...Data normalization circuit, 4...Orthogonal transformation circuit, 6...Bit allocation pattern selection circuit, 8...
...Compression encoding circuit, 11-1 to 11-k...Differential circuit, 12-1 to 12-k...Weighting circuit, 1
3-1 to 13-k...overflow counter, 1
4-1 to 14-k... Comparison circuit, 16... Bit assignment pattern memory, 17... Bit assignment pattern selector, 20... Delay circuit, 22... Data selector, 24... Data length storage memory, 2
6...Shift register.

Claims (1)

【特許請求の範囲】 1 直交変換を利用した画像データ圧縮装置にお
いて、 各画素毎に割り当てるビツト長を表わすビツト
割り当てパターンが複数個登録されている記憶手
段と、 直交変換後の画像データのデータ量と前記各ビ
ツト割り当てパターンの割り当て量との差分を行
なう演算手段と、 前記ビツト割り当てパターン毎の差分値が許容
範囲内にあるかどうかを判定する比較手段と、 前記比較手段により前記差分値が前記許容範囲
内にあると判定されたビツト割り当てパターンの
中から最適なビツト割り当てパターンを選択する
選択手段と を具備する画像データ圧縮装置。 2 前記比較手段は各ビツト割り当てパターンに
固有の許容範囲を具備することを特徴とする特許
請求の範囲第1項に記載の画像データ圧縮装置。 3 前記演算手段は各画素毎に直交変換後の画像
データと前記各ビツト割り当てパターンとの差分
を行なう差分手段と、各画素毎の差分値に対して
マトリクス内の位置に応じた重み係数を乗じる重
み付け手段と、重み付け手段の出力を全マトリク
スについて集計する手段とを具備することを特徴
とする特許請求の範囲第1項に記載の画像データ
圧縮装置。
[Scope of Claims] 1. An image data compression device using orthogonal transformation, comprising: a storage means in which a plurality of bit allocation patterns representing the bit length allocated to each pixel are registered; and a data amount of image data after orthogonal transformation. computing means for calculating the difference between the bit allocation pattern and the allocation amount of each of the bit allocation patterns; a comparison means for determining whether the difference value for each bit allocation pattern is within an allowable range; An image data compression apparatus comprising selection means for selecting an optimal bit allocation pattern from among bit allocation patterns determined to be within an allowable range. 2. The image data compression apparatus according to claim 1, wherein the comparing means has a tolerance range specific to each bit allocation pattern. 3. The calculation means includes a difference means for performing a difference between the image data after orthogonal transformation and each bit allocation pattern for each pixel, and a difference means for multiplying the difference value for each pixel by a weighting coefficient according to the position in the matrix. 2. The image data compression apparatus according to claim 1, further comprising weighting means and means for totalizing the output of the weighting means for all matrices.
JP8624587A 1987-04-08 1987-04-08 Image data compressing device Granted JPS63252018A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP8624587A JPS63252018A (en) 1987-04-08 1987-04-08 Image data compressing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP8624587A JPS63252018A (en) 1987-04-08 1987-04-08 Image data compressing device

Publications (2)

Publication Number Publication Date
JPS63252018A JPS63252018A (en) 1988-10-19
JPH031849B2 true JPH031849B2 (en) 1991-01-11

Family

ID=13881428

Family Applications (1)

Application Number Title Priority Date Filing Date
JP8624587A Granted JPS63252018A (en) 1987-04-08 1987-04-08 Image data compressing device

Country Status (1)

Country Link
JP (1) JPS63252018A (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0364168A (en) * 1989-08-02 1991-03-19 Ricoh Co Ltd Picture encoder

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5437413A (en) * 1977-08-29 1979-03-19 Oki Electric Ind Co Ltd Adaptable orthogonal conversion encoding system

Also Published As

Publication number Publication date
JPS63252018A (en) 1988-10-19

Similar Documents

Publication Publication Date Title
US6665444B1 (en) Image processing apparatus and method, and storage medium
EP0235456B1 (en) Image processing apparatus and method with blocks of compressed data
US8553301B2 (en) Image processing apparatus, method, and program product to perform color-reduction processing for a block
JP5507077B2 (en) Apparatus and method for encoding and calculating a discrete cosine transform using a butterfly processor
US5422736A (en) Multi-mode image processing permitting selection of quantization process according to image characteristics
JP4100782B2 (en) Error diffusion value processing method
US8452083B2 (en) Image processing apparatus, image processing method, and computer-readable medium
US5729625A (en) Image processing method and apparatus which expand a pixel into multiple pixels, with a change in the number of gray levels
US8953220B2 (en) Image processing for rotation of compressed image data
JPH0326947B2 (en)
JP2806945B2 (en) Method and circuit arrangement for improving the resolution of a digital signal
US6996595B2 (en) Apparatus and method for consolidating output data from a plurality of processors
US6904177B2 (en) Filter processing apparatus
US20020012474A1 (en) Image processing apparatus and image processing method
US6938105B2 (en) Data apparatus and method having DMA circuitry to efficiently transfer multivalued bit-plane data
JP2001338284A (en) Image processing method, image processing apparatus, and image processing system
JPH031849B2 (en)
JPH04229382A (en) Digital image data resolution exchange device
JPS63260271A (en) Picture data compressor
JPH01238374A (en) Picture data compressor
US5991446A (en) Image conversion device
JPH05261982A (en) Printing device
JP2511669B2 (en) Compressor for gradation image data
JP3036934B2 (en) Image coding device
JP2001169118A (en) Image processing apparatus and method, computer readable memory