JP3119373B2 - Image coding device - Google Patents

Image coding device

Info

Publication number
JP3119373B2
JP3119373B2 JP03090747A JP9074791A JP3119373B2 JP 3119373 B2 JP3119373 B2 JP 3119373B2 JP 03090747 A JP03090747 A JP 03090747A JP 9074791 A JP9074791 A JP 9074791A JP 3119373 B2 JP3119373 B2 JP 3119373B2
Authority
JP
Japan
Prior art keywords
signal
image
encoding
color
binary
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 - Fee Related
Application number
JP03090747A
Other languages
Japanese (ja)
Other versions
JPH04322562A (en
Inventor
正 吉田
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 JP03090747A priority Critical patent/JP3119373B2/en
Publication of JPH04322562A publication Critical patent/JPH04322562A/en
Priority to US08/402,325 priority patent/US5761342A/en
Application granted granted Critical
Publication of JP3119373B2 publication Critical patent/JP3119373B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Image Processing (AREA)
  • Color Television Systems (AREA)
  • Compression, Expansion, Code Conversion, And Decoders (AREA)

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【産業上の利用分野】本発明は、写真等の多値画像及び
文字等の2値画像を効率良く符号化する画像符号化装置
に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an image encoding apparatus for efficiently encoding a multi-valued image such as a photograph and a binary image such as a character.

【0002】[0002]

【従来の技術】従来からカラー静止画像符号化方式に関
して様々な提案がなされている。また、対象となるカラ
ー静止画像を大別すると以下の2つになる。
2. Description of the Related Art Conventionally, various proposals have been made regarding a color still image coding system. Further, the target color still images are roughly classified into the following two.

【0003】赤、緑、青、シアン、マゼンタ、黄、
白、黒の8色を2値で扱う2値カラー画像 赤、緑、青を例えば各256階調により1670万色
を表示する多値カラー画像
[0003] Red, green, blue, cyan, magenta, yellow,
A binary color image that treats eight colors of white and black as binary A multi-valued color image that displays 16.7 million colors of red, green, and blue with, for example, 256 gradations

【0004】2値カラー画像符号化方式としては、現在
ファクシミリ等で用いられている可変長符号化方式であ
るモディファイドハフマン方式を各色ごとに用いる方式
が考えられている。
As a binary color image encoding method, a method using a modified Huffman method, which is a variable length encoding method currently used in facsimile and the like, for each color is considered.

【0005】またその他の方法として、周囲画素から符
号化画素を予測する予測符号化方式も提案されている。
[0005] As another method, a prediction coding method for predicting a coded pixel from surrounding pixels has been proposed.

【0006】これらの方法は、可逆符号化の分類に入
り、符号化・復号化におけるデータ保存がなされてい
る。
[0006] These methods fall into the category of reversible coding, and data is preserved in coding and decoding.

【0007】一方、多値カラー画像符号化方式として
は、RGB各8bit信号を輝度・色差信号に変換した
後に、直交変換(離散コサイン変換)を行った係数値を
線形量子化し、この量子化値を可変長符号化する方式が
提案されている。この方式は基本的には画像の空間周波
数の低周波側を残し、高周波側をカットして、画像デー
タを削減する方式である。
On the other hand, as a multi-valued color image encoding method, after converting each of the RGB 8-bit signals into luminance / color difference signals, coefficient values subjected to orthogonal transformation (discrete cosine transformation) are linearly quantized, and the quantized values are calculated. Has been proposed to perform variable-length coding on. This method is basically a method in which the low-frequency side of the spatial frequency of an image is left and the high-frequency side is cut to reduce image data.

【0008】この方法は、非可逆符号化方式になり、圧
縮率と画質劣化がトレード・オフの関係にある。
This method is an irreversible encoding method, and there is a trade-off relationship between the compression ratio and image quality deterioration.

【0009】また、圧縮率と画質のトレードオフを利用
した多値カラー画像の階層的符号化が考えられている。
[0009] Hierarchical encoding of a multi-valued color image using a trade-off between a compression ratio and image quality has been considered.

【0010】この方法は多値画像をサブサンプリング等
により縮小した画像を量子化した後符号化し、低解像階
層画像とし、原画像と、低解像画像を復号したものとの
差分画像を量子化したのち符号化し、高解像階層画像と
する方法である。階層数はサブサンプリングのレベルに
応じて多くとることもある。この方法は、データ量の少
ない低解像画像を先に符号化するため画像の早期把握が
可能である。
In this method, an image obtained by reducing a multi-valued image by subsampling or the like is quantized and then encoded to obtain a low-resolution hierarchical image, and a difference image between the original image and the decoded low-resolution image is quantized. After that, it is a method of encoding and encoding to obtain a high-resolution hierarchical image. The number of layers may be large depending on the subsampling level. According to this method, a low-resolution image with a small amount of data is encoded first, so that an image can be grasped at an early stage.

【0011】[0011]

【発明が解決しようとしている課題】しかし、上記従来
例によって、カラー文章中にカラー写真がはめ込まれて
いるようなカラー文書画像を符号化する場合。
However, in the case of encoding a color document image in which a color photograph is embedded in a color sentence according to the above conventional example.

【0012】2値カラー方式では、カラー文章部は圧
縮率を上げて符号化できても、カラー写真部の諧調性あ
る画像を効率よく符号化できない。
In the binary color system, even if the color text portion can be encoded with a higher compression ratio, it is not possible to efficiently encode the gradation image of the color photographic portion.

【0013】多値カラー方式では、圧縮率を上げてい
くと、画像の高周波成分が大きくカットされ文字等のエ
ッジ部の画質劣化が目立ってくるので、文章に対して
は、写真部ほどの高圧縮率は期待できない。などの問題
点がある。
In the multi-valued color system, as the compression ratio is increased, the high-frequency components of the image are largely cut, and the image quality of the edges of characters and the like deteriorates conspicuously. Compression ratio cannot be expected. There are problems such as.

【0014】また多値カラー画像の階層的符号化を用い
て低解像画像部の圧縮率を上げることも考えられるが、
やはり、カラー文書、あるいはエッジ部を多く含んだ画
像については画質劣化が大きく、全体画像の早期把握に
問題が残る。
It is conceivable to increase the compression ratio of a low-resolution image portion by using hierarchical coding of a multi-valued color image.
After all, the image quality of a color document or an image containing a large number of edges is greatly degraded, and a problem remains in grasping the entire image at an early stage.

【0015】[0015]

【課題を解決するための手段】本発明は上記従来技術に
鑑みてなされたものであり、エッジ画像が混入する原画
像を符号化する際に、エッジ画像の画質を劣化させるこ
と無く、できるだけ高圧縮率で符号化することを主な目
的とする。
SUMMARY OF THE INVENTION The present invention has been made in view of the above-mentioned prior art, and when encoding an original image into which an edge image is mixed, the encoding is performed as high as possible without deteriorating the image quality of the edge image. The main purpose is to encode at a compression rate.

【0016】特に、上記目的を達成するために上記エッ
ジ画像と他の差分画像とに分離して符号化する様にし、
その際に、この差分画像の性質を考慮した効率良い符号
化を行うことを目的とする。
In particular, in order to achieve the above object, the edge image and another difference image are separately coded.
At that time, an object is to perform efficient encoding in consideration of the property of the difference image.

【0017】[0017]

【0018】[0018]

【0019】[0019]

【実施例】以下、本発明を好ましい実施例を用いて説明
する。
DESCRIPTION OF THE PREFERRED EMBODIMENTS The present invention will be described below with reference to preferred embodiments.

【0020】図1は本発明を適用した符号部の実施例構
成である。
FIG. 1 shows the configuration of an embodiment of a coding section to which the present invention is applied.

【0021】画像メモリ20には、図示しない例えばカ
ラースキャナ等のカラー静止画像入力手段から入力され
たフルカラー画像を表わす赤(R)、緑(G)、青
(B)各8bit多値のカラー画像信号が記憶されてい
る。
The image memory 20 has a multi-valued 8-bit color image of each of red (R), green (G), and blue (B) representing a full-color image input from a color still image input unit such as a color scanner (not shown). The signal is stored.

【0022】画像メモリ20から読出された各色の多値
カラー画像信号100は、2値化回路21で各色毎に2
値化処理を施されてR、G、B各1bitの2値カラー
信号に変換される。
The multi-valued color image signal 100 of each color read from the image memory 20 is binarized by a binarizing circuit 21 for each color.
It is converted to a binary color signal of 1 bit for each of R, G, and B by performing a value conversion process.

【0023】また、多値カラー画像信号100はブロッ
クエッジ判定部19によりブロック毎にそのブロックが
エッジ部か否かを判定している。本実施例においては画
像8×8をブロック単位として、エッジ部か非エッジ部
かの判定を行っている。
In the multi-valued color image signal 100, the block edge judging section 19 judges for each block whether or not the block is an edge portion. In this embodiment, it is determined whether an image is 8 × 8 as a block unit and whether it is an edge portion or a non-edge portion.

【0024】2値化回路21で2値化された信号はブロ
ック毎にセレクタ部28によりマスク信号121により
マスクされる。
The signal binarized by the binarizing circuit 21 is masked by the mask signal 121 by the selector unit 28 for each block.

【0025】すなわち、ブロックエッジ判定部19によ
りエッジ部と判定されたブロックはブロック判定信号1
11により2値化信号101が選択される。また、非エ
ッージ部と判定されたブロックについてはマスク信号0
が選択される。したがって2値化画像のうちエッジ画像
のみが102を介し2値画像メモリ22へ各色別に記憶
される。
That is, the block judged to be an edge by the block edge judgment unit 19 is a block judgment signal 1
11, the binary signal 101 is selected. The mask signal 0 is assigned to a block determined to be a non-edge portion.
Is selected. Therefore, of the binarized images, only the edge images are stored in the binary image memory 22 through the 102 for each color.

【0026】2値メモリ22から読出された2値カラー
信号は、2値カラー信号符号化用の符号器Aで符号化処
理され、符号語105を出力する。この符号器Aにより
符号化処理が第1の符号化処理である。
The binary color signal read from the binary memory 22 is encoded by the encoder A for encoding a binary color signal, and the code word 105 is output. The encoding process by the encoder A is a first encoding process.

【0027】次に、画像メモリ20から、前述の第1の
符号化処理がなされたと同じカラー画像信号を読出す。
Next, the same color image signal as the one subjected to the above-described first encoding processing is read from the image memory 20.

【0028】このカラー信号は第1の符号化により符号
化された2値エッジ画像以外の部分を符号化するための
ものである。
This color signal is for encoding a portion other than the binary edge image encoded by the first encoding.

【0029】2値エッジ画像はセレクタ部102からレ
ベル変換部29へ入力される。ここで、2値信号は0.
1から0.255(8ビット)に変換される。
The binary edge image is input from the selector 102 to the level converter 29. Here, the binary signal is 0.
It is converted from 1 to 0.255 (8 bits).

【0030】レベル変換された2値画像104は差分器
23により多値カラー信号112との差分がとられ、差
分多値R、G、B信号107となる。
The level-converted binary image 104 is subtracted from the multi-level color signal 112 by the differentiator 23, and becomes a differential multi-level R, G, B signal 107.

【0031】次に、色変換部27によりRGB信号から
輝度・色差信号108に変換される。この変換には一般
的に以下の式が用いられている。
Next, the RGB signal is converted into a luminance / color difference signal 108 by the color conversion section 27. The following equation is generally used for this conversion.

【0032】 Y=0.299R+0.587G+0.114B Cr=0.713(R−Y) Cb=0.564(B−Y) ただし、ここで示したR、G、B、Y、Cr、Cbは規
格化した値である。
Y = 0.299R + 0.587G + 0.114B Cr = 0.713 (RY) Cb = 0.564 (BY) However, R, G, B, Y, Cr and Cb shown here are This is a normalized value.

【0033】色変換された差分多値YCrCb信号10
8は差分多値メモリ24に格納された後符号化される。
The color-converted differential multi-valued YCrCb signal 10
8 is coded after being stored in the difference multilevel memory 24.

【0034】本実施例では、この差分多値YCrCb信
号を更に階層的に符号化する。まずローパスフィルタ2
8により差分多値YCrCb信号が平滑化され、符号器
B26により符号化される。
In this embodiment, the differential multi-valued YCrCb signal is further hierarchically encoded. First, low-pass filter 2
8, the differential multi-valued YCrCb signal is smoothed and encoded by the encoder B26.

【0035】ローパスフィルタ28は、たとえば図2で
示されるフィルタ係数を用いる。実際のフィルタリング
では各係数は規格化されたものすなわち1/36倍され
たもので行われる。
The low-pass filter 28 uses, for example, the filter coefficients shown in FIG. In actual filtering, each coefficient is standardized, that is, multiplied by 1/36.

【0036】符号化B26による符号化処理が第2の符
号化処理であり符号語106を生成する。また階層符号
化処理のため第2の符号語106は符号器B26と逆変
換である復号器B30により復号され差分多値YCrC
b信号114に復号される。
The encoding process by the encoding B26 is the second encoding process, and generates the code word 106. In addition, the second codeword 106 is decoded by the encoder B26 and the decoder B30 which is an inverse transform for the hierarchical encoding process, and the difference multi-valued YCrC
It is decoded into a b signal 114.

【0037】次に逆色変換36により、差分多値RGB
信号を復元できる。この変換は前述の式1の逆変換を行
えばよい。
Next, by inverse color conversion 36, the difference multi-valued RGB
The signal can be restored. This conversion may be performed by performing the inverse conversion of Expression 1 described above.

【0038】逆変換された差分多値RGB信号120は
逆差分器31により差分多値RGB信号120と2値カ
ラー信号115が合成された圧縮画像として復号され
る。この画像は第1の符号語105と第2の符号語10
6を階層的RGB画像に復元したものである。
The inversely converted difference multi-valued RGB signal 120 is decoded by the inverse differencer 31 as a compressed image in which the difference multi-valued RGB signal 120 and the binary color signal 115 are combined. This image has a first codeword 105 and a second codeword 10
6 is restored to a hierarchical RGB image.

【0039】このRGB復元画像117は再び色変換3
3によりYCrCb復元画像118に変換される。この
変換は同様に式1である。
This RGB restored image 117 is again subjected to color conversion 3
3 is converted into a YCrCb restored image 118. This transformation is also Equation 1.

【0040】また、一方画像メモリ20に格納されてい
る原画像信号100も同様に色変換34によりYCrC
b原画像信号116に色変換される。
On the other hand, the original image signal 100 stored in the image memory 20 is also converted into a YCrC
The color conversion is performed on the b original image signal 116.

【0041】YCrCb原画像信号116とYCrCb
差分復元画像信号118は減算器35により原画像から
差分復元画像を減算する計算が行われ、原画差分画像信
号119を生成し、符号器B32により第3の符号化処
理が行われ、第3の符号語110を作成する。
YCrCb original image signal 116 and YCrCb
The difference restored image signal 118 is subjected to a calculation for subtracting the difference restored image from the original image by the subtractor 35 to generate an original image difference image signal 119, and the encoder B32 performs a third encoding process. Create codeword 110.

【0042】ここで符号器B32と符号器B26は同符
号化処理である。また第3の符号化処理は第1、第2の
符号化処理と原画像の差分であり第3階層符号化であ
る。
Here, the encoder B32 and the encoder B26 perform the same encoding process. The third encoding process is the difference between the first and second encoding processes and the original image, and is the third hierarchical encoding.

【0043】ブロックエッジ判定部19においては、本
実施例では以下の判定を用いている。図3(a)はその
一例を示したものである。
In the present embodiment, the following judgment is used in the block edge judgment section 19. FIG. 3A shows an example.

【0044】ブロック毎に(本実施例では8×8画素を
1ブロックとするがブロックの単位はこれに限らない)
エッジの検出をRGBそれぞれについて行う。このエッ
ジの検出法として、図3(a)では、ブロック中の最大
値MaxLと最小値MinSの差、P=L−Sを求め、
Pがある一定値(T=70、但し全体レベルを2値とす
る)以上ならばエッジが存在するという方法である。
For each block (in this embodiment, 8 × 8 pixels are taken as one block, but the unit of the block is not limited to this)
Edge detection is performed for each of RGB. As a method of detecting the edge, in FIG. 3A, the difference between the maximum value MaxL and the minimum value MinS in the block, P = LS, is obtained.
If P is equal to or greater than a certain value (T = 70, but the entire level is binary), an edge exists.

【0045】また、図3(b)のような方法を用いても
実現できる。
Further, it can also be realized by using a method as shown in FIG.

【0046】図3(b)では8×8ブロック毎にDCT
変換を行い、変換された係数のうちDCをのぞくAC部
分の絶対値の和を求める。Sが一定値以上であればエッ
ジ部と判定する。
In FIG. 3B, DCT is performed every 8 × 8 block.
The conversion is performed, and the sum of the absolute values of the AC part of the converted coefficients excluding DC is obtained. If S is equal to or more than a certain value, it is determined that the edge portion.

【0047】この方法においてAC係数の和は斜線部分
であるが、このうち一部の係数のみを用いても判定可能
である。
In this method, the sum of the AC coefficients is a shaded portion. However, it is possible to make a determination by using only some of the coefficients.

【0048】図4は、画像メモリ20から読出された多
値カラー画像信号Mと2値エッジ画像Bと差分多値画像
Sの関係を示したものである。
FIG. 4 shows the relationship between the multivalued color image signal M read from the image memory 20, the binary edge image B, and the differential multivalued image S.

【0049】本実施例では8×8画素ブロック単位にエ
ッジ判定を行っているが図4は8×8画素ブロックを一
次元的にみた場合の例である。エッジであると判定され
たブロックについては多値カラー画像信号Mはスレッシ
ョルドTHで2値化されレベル変換(0.255)され
たものが2値エッジ画像Bである。
In this embodiment, the edge judgment is performed in units of 8 × 8 pixel blocks. FIG. 4 shows an example in which the 8 × 8 pixel blocks are viewed one-dimensionally. For the block determined to be an edge, the multi-valued color image signal M is binarized at the threshold TH and level-converted (0.255) to obtain a binary edge image B.

【0050】差分多値画像Sは、MとBの差分の絶対値
をとったもの、すなわち、S=|M−B|により得られ
る。
The multi-valued difference image S is obtained by taking the absolute value of the difference between M and B, that is, S = | M−B |.

【0051】本実施例においては差分絶対値をとった
が、これは負の差分をさけるためである。図4(c)に
おいて、斜線部分がこの部分である。結果として高周波
成分を含んだ2値エッジ画像Bと低周波成分の差分多値
画像に分割でできる。
In the present embodiment, the absolute value of the difference is used to avoid a negative difference. In FIG. 4C, a hatched portion is this portion. As a result, it can be divided into a binary edge image B containing a high-frequency component and a differential multi-value image of a low-frequency component.

【0052】尚、2値化のスレッショルドTHはTH>
128(8ビットの場合)が好ましい。小さいと差分多
値画像に高周波が残りやすいためである。
The threshold value TH for binarization is TH>
128 (for 8 bits) is preferred. This is because if the value is small, the high frequency tends to remain in the multi-valued difference image.

【0053】本実施例の差分方式は図1の差分器23に
適用されている。また、図1の逆差分器31は差分絶対
値処理と逆の処理、すなわちM=|S−B|を計算する
ことで、多値カラー画像信号を復元できる。
The difference method of this embodiment is applied to the difference unit 23 shown in FIG. In addition, the inverse difference unit 31 in FIG. 1 can restore a multi-valued color image signal by performing a process reverse to the difference absolute value process, that is, calculating M = | S−B |.

【0054】図5は本発明を適用した復号部の実施例の
構成である。
FIG. 5 shows the configuration of an embodiment of a decoding unit to which the present invention is applied.

【0055】2値カラー画像の符号語105は復号器A
40で各色毎にドットイメージに復元され2値メモリ4
3に記憶される。このドットイメージは図1の2値メモ
リ22に格納された2値信号を完全に対応する。
The code word 105 of the binary color image is
At 40, a binary image is restored to a dot image for each color.
3 is stored. This dot image completely corresponds to the binary signal stored in the binary memory 22 of FIG.

【0056】復号されたデータは第1階層の2値画像1
50を形成する。
The decoded data is a binary image 1 of the first layer.
Form 50.

【0057】次に第2階層の差分多値カラー画像の符号
語106は復号器B41でコンポーネント信号YCrC
b信号に復元される。
Next, the code word 106 of the second-level difference multi-valued color image is converted into a component signal YCrC by a decoder B41.
It is restored to the b signal.

【0058】YCrCb信号は154を介し逆色変換部
44によりRGB差分信号に変換される。RGB差分信
号155と2値メモリ43に格納してある第1階層の2
値画像150は、逆差分器46により減算されて第2階
層の多値復元画像151を形成する。
The YCrCb signal is converted to an RGB difference signal by the inverse color converter 44 via 154. The RGB difference signal 155 and the 2nd of the first layer stored in the binary memory 43
The value image 150 is subtracted by the inverse differentiator 46 to form a multi-level restored image 151 of the second hierarchy.

【0059】さらに、第3階層の差分多値カラー画像の
符号語110も同様に復号器B42によりYCrCb信
号に復号される。
Further, the code word 110 of the differential multi-valued color image of the third hierarchy is similarly decoded into a YCrCb signal by the decoder B42.

【0060】この差分信号157は、第2階層復号画像
151を色変換部45によりコンポーネント信号YCr
Cbに変換された信号と加算器48により合成され、第
3階層の復号画像YCrCbが形成される。このYCr
Cb信号は逆変換部47によりRGB信号を形成し、第
3階層の復号画像152が得られる。
The difference signal 157 is obtained by converting the second hierarchical decoded image 151 into a component signal YCr
The signal converted to Cb is combined with the adder 48 to form a third-layer decoded image YCrCb. This YCr
The Cb signal is formed into an RGB signal by the inverse conversion unit 47, and a decoded image 152 of the third hierarchy is obtained.

【0061】本実施例では以下のような階層符号化が実
現できる。すなわち第1段階にデータ量は少ないが画像
の特徴(エッジ)を抽出した2値カラー画像を完全復元
型のエレトロピ符号化により符号化送信し、受信側で第
1段階のみを復号し、表示することによって受信した画
像の比較的画質の良い全体画像が早期に把握できる。
In this embodiment, the following hierarchical coding can be realized. That is, in the first stage, a binary color image having a small amount of data but extracting the features (edges) of the image is coded and transmitted by complete restoration type erythropy coding, and the receiving side decodes and displays only the first stage. Thereby, the whole image of the received image having relatively high image quality can be grasped at an early stage.

【0062】次に第2段階において、原画像と2値カラ
ーの差分多値画像をスムージング処理等により低周波成
分のみの画像とし、低周波画像の符号化に効率の良いD
CTハフマン符号化等を用い圧縮効率を上げている。
Next, in the second stage, the multi-valued difference image between the original image and the binary color is converted into an image having only low-frequency components by smoothing processing or the like, so that D is efficient for encoding the low-frequency image.
Compression efficiency is increased using CT Huffman coding or the like.

【0063】更に第3段階で原画像と第2段階画像との
差分多値画像を同様にDCTハフマン符号化等により所
望の圧縮率、画質の画像を符号化できる。
Further, in the third stage, an image having a desired compression rate and image quality can be encoded by the DCT Huffman encoding or the like for the multi-valued difference image between the original image and the second stage image.

【0064】本実施例の差分多値画像は、周知の種々の
ブロック符号化により符号化できる。本実施例では8×
8画素ブロック毎にDCT変換し、変換係数をハフマン
符号化する方式をとっている。
The differential multi-valued image of this embodiment can be encoded by various known block encodings. In this embodiment, 8 ×
DCT transform is performed for every eight pixel block, and a transform coefficient is Huffman-encoded.

【0065】図6(B)は本実施例における差分多値画
像の符号器の例を示している。
FIG. 6B shows an example of an encoder for a multilevel differential image in this embodiment.

【0066】図1の符号器B26および32に入力され
る画像信号は式(1)により色変換された信号YCrC
bである。この信号は図6(B)の符号器B110に入
力され直交変換部456に入力される。
The image signals input to the encoders B26 and B32 in FIG. 1 are signals YCrC which are color-converted by the equation (1).
b. This signal is input to encoder B110 in FIG. 6B and input to orthogonal transform section 456.

【0067】直交変換回路456では離散コサイン変換
により8×8画素ブロック毎に画像を周波数ごとの変換
係数(強度)に変換する。図7に示した変換係数は、や
はり8×8のブロックになっており、変換値に1から6
4の番号をつける。500で示す係数番号1が直流成分
を示している。また、501、502で示す係数番号
2、3…は交流成分を示しており、番号が大きくなるに
従って低周波から高周波への交流成分を示すことにな
る。
The orthogonal transform circuit 456 converts the image into a transform coefficient (intensity) for each frequency for each 8 × 8 pixel block by discrete cosine transform. The transform coefficients shown in FIG. 7 are also 8 × 8 blocks, and the transform values are 1 to 6
Number 4 A coefficient number 1 indicated by 500 indicates a DC component. The coefficient numbers 2, 3... Shown by 501 and 502 indicate AC components, and as the numbers increase, they indicate AC components from a low frequency to a high frequency.

【0068】変換係数信号401は線形量子化器457
で例えば、8ビットに量子化される。この線形量子化器
457は、直流および低周波の量子化ステップは細か
く、高周波の量子化ステップは粗くとるように量子化ス
テップが決められている。
The transform coefficient signal 401 is converted to a linear quantizer 457.
Is quantized to, for example, 8 bits. The quantization steps of the linear quantizer 457 are determined so that the DC and low frequency quantization steps are fine and the high frequency quantization step is coarse.

【0069】ハフマン符号化部462においては、直流
成分(図7の係数番号1)と交流成分(係数番号2〜6
4)はそれぞれ別々に符号化される。また、これら符号
化はY,Cr,Cbの順でそれぞれ直流成分、交流成分
がハフマン符号化される。
The Huffman encoder 462 includes a DC component (coefficient number 1 in FIG. 7) and an AC component (coefficient numbers 2 to 6).
4) are separately encoded. In these encodings, a DC component and an AC component are Huffman encoded in the order of Y, Cr, and Cb, respectively.

【0070】直流成分については前ブロックの直流成分
との差分にハフマン符号を割りあてるDPCMハフマン
符号を用いている。
For the DC component, a DPCM Huffman code in which a Huffman code is assigned to the difference from the DC component of the previous block is used.

【0071】また、交流成分についてはブロック毎に係
数番号2〜64を図7のようにジグザグにスキャンし、
係数が0であるラインと次の係数値の統計によりハフマ
ン符号を割りあてる方法である。
As for the AC component, coefficient numbers 2 to 64 are scanned zigzag for each block as shown in FIG.
In this method, Huffman codes are assigned based on statistics of a line having a coefficient of 0 and the next coefficient value.

【0072】以上のようにして差分多値画像は符号化さ
れ出力106を得る。
As described above, the differential multi-valued image is encoded to obtain the output 106.

【0073】復号器B(図5の41、42)について
は、図6(B)の符号器Bの逆の変換を行うことにより
容易に復号できる。すなわち、直流成分、交流成分のハ
フマン符号を復号し、DCT係数を8×8画素ブロック
毎に構成した後逆DCT変換を行えば復号できる。
The decoder B (41, 42 in FIG. 5) can be easily decoded by performing the inverse conversion of the encoder B in FIG. 6 (B). In other words, decoding can be performed by decoding the Huffman code of the DC component and the AC component, forming DCT coefficients for each 8 × 8 pixel block, and then performing inverse DCT transform.

【0074】図1の符号器A25の詳細を図6(A)に
示す。本実施例では動的算術符号を実施しているが、算
術符号においては符号化、復号化とも同様な処理を行っ
ているため符号部の詳細のみを説明する。
FIG. 6A shows the details of the encoder A25 in FIG. In the present embodiment, the dynamic arithmetic code is executed. However, in the arithmetic code, the same processing is performed for both encoding and decoding, so that only the details of the encoding unit will be described.

【0075】図1の2値メモリ22から読出された符号
化する画像の2値データはR,G,B画素順に図6
(A)の予測状態決定回路450に入る。
The binary data of the image to be coded read out from the binary memory 22 of FIG. 1 is shown in FIG.
The operation enters the predicted state determination circuit 450 shown in FIG.

【0076】予測状態決定回路450は、注目画素に関
して、その周囲符号化済画素から構成される予測状態信
号S206を出力する。また、S116と同期した符号
化画素データX217を出力し、両信号は動的算術符号
器453に入力され符号化される。
The prediction state determination circuit 450 outputs a prediction state signal S206 composed of the coded pixels around the target pixel. Also, the coded pixel data X217 synchronized with S116 is output, and both signals are input to the dynamic arithmetic coder 453 and coded.

【0077】図8は予測状態決定回路450のブロック
図であり、図9は状態予測のために参照される各色別の
画素位置を示す。
FIG. 8 is a block diagram of the prediction state determination circuit 450, and FIG. 9 shows a pixel position for each color referred to for state prediction.

【0078】即ち、図9(a)は符号化第1色目(本実
施例ではR)の参照画素を示しており、*で示した符号
化画素の周囲の符号化済の7画素を参照することを表わ
している。
That is, FIG. 9A shows reference pixels of the first color of encoding (R in this embodiment), and refers to seven encoded pixels around the encoded pixel indicated by *. It represents that.

【0079】また、図9(b)は符号化第2色目(本実
施例ではG)の参照画素を示しており、(a)と同様の
7画素および第1色の同位置の画素のあわせて8画素を
参照することを表わしている。
FIG. 9B shows reference pixels of the second color of encoding (G in this embodiment), and is a combination of seven pixels similar to FIG. 9A and pixels at the same position of the first color. Means that eight pixels are referred to.

【0080】また、図9(c)は第3色(本実施例では
B)の参照画素を示しており、(a)と同様の7画素お
よび第1色および第2色の同位置の各画素のあわせて9
画素を参照することを表わしている。
FIG. 9C shows reference pixels of the third color (B in the present embodiment). The same seven pixels as in FIG. 9A and each of the same positions of the first and second colors are shown. 9 pixels together
This refers to referring to a pixel.

【0081】図8の構成では、図9(a)〜(c)に示
す各色毎の参照画素位置の複数画素を参照することによ
り、各色毎の状態を決定する。以下、図8の動作を説明
する。
In the configuration of FIG. 8, the state of each color is determined by referring to a plurality of pixels at the reference pixel position for each color shown in FIGS. 9 (a) to 9 (c). Hereinafter, the operation of FIG. 8 will be described.

【0082】R,G,B各1bitからなる3bit信
号である信号103は、RGBデータ200〜202と
して、ラッチ群67〜69に入力されるとともに、ライ
ンメモリ61、62、63にも入力され、ラインメモリ
61〜63により1ライン遅延したRGBデータが保持
される。またラッチ67a〜67h、ラッチ68a〜6
8h及びラッチ69a〜69hには、1画素クロック毎
に遅延されたデータが保持される。
The signal 103, which is a 3-bit signal consisting of 1 bit for each of R, G, and B, is input to the latch groups 67 to 69 as RGB data 200 to 202, and is also input to the line memories 61, 62, and 63. The line memories 61 to 63 hold RGB data delayed by one line. Latches 67a to 67h and latches 68a to 6
8h and the latches 69a to 69h hold data delayed for each pixel clock.

【0083】ラッチ群67においてラインメモリ61の
出力が入力されるラッチ67a,67b,67c,67
dおよびラインメモリ61の出力により符号化ラインの
前ライン上の5画素のデータが参照できることになる。
また、ラッチ67g,67hの出力により、符号化ライ
ン上の符号化済2画素が参照できることになる。これら
7画素のデータを合わせて符号化第1色であるRの状態
決定用の参照画素信号210とする。また、ラッチ67
fからは符号化画素のRのデータ211が他色G,Bの
状態決定用に出力される。
In the latch group 67, the latches 67a, 67b, 67c, 67 to which the output of the line memory 61 is input
By referring to d and the output of the line memory 61, it is possible to refer to the data of five pixels on the previous line of the encoding line.
Also, the output of the latches 67g and 67h allows reference to two encoded pixels on the encoding line. The data of these seven pixels are combined to form a reference pixel signal 210 for determining the state of R, which is the first color to be encoded. Also, the latch 67
From f, the R data 211 of the coded pixel is output for determining the states of the other colors G and B.

【0084】このラッチ群67と同じ構成のラッチ群6
8,69がデータG201及びB202に対して設けら
れており、これらラッチ群68,69からは夫々、ラッ
チ群67と同様の7画素のデータが参照画素信号21
2,214として出力される。
Latch group 6 having the same configuration as latch group 67
8 and 69 are provided for the data G201 and B202. From the latch groups 68 and 69, the same seven-pixel data as the latch group 67 is output from the reference pixel signal 21.
2, 214.

【0085】また、ラッチ群68中のラッチ68fから
符号化画素のGのデータ213がBの状態決定用に出力
される。
The G data 213 of the encoded pixel is output from the latch 68f in the latch group 68 for determining the B state.

【0086】セレクタ64においてはRGBの各色デー
タの出力に対応した色を示す2ビットのカラー指示信号
219に応じて参照画素信号を切り換える。即ち、カラ
ー指示信号219がRの時は、参照画素信号210と零
信号2bitを選択する。また、Gの時は参照画素信号
212およびR信号212と零信号1bitが選択され
る。また、Bの時は参照画素信号214およびR信号2
11、G信号213が選択される。
The selector 64 switches the reference pixel signal in accordance with a 2-bit color instruction signal 219 indicating a color corresponding to the output of each of the RGB color data. That is, when the color instruction signal 219 is R, the reference pixel signal 210 and the 2-bit zero signal are selected. In the case of G, the reference pixel signal 212, the R signal 212, and the zero signal 1 bit are selected. In the case of B, the reference pixel signal 214 and the R signal 2
11, the G signal 213 is selected.

【0087】この9bitの選択信号215と2bit
のカラー指示信号219はパッキング回路65により、
11bitの信号にまとめられて状態信号S206にな
る。従って、状態信号S1は符号化すべき画素の色と周
囲の状態を示し、R,G,B各色に対して27,28,2
9個の状態を示す。
The 9-bit selection signals 215 and 2 bits
Of the color instruction signal 219 by the packing circuit 65
The state signal S206 is collected into an 11-bit signal. Therefore, the state signal S 1 indicates the color of the pixel to be coded and the surrounding state, and 2 7 , 2 8 , 2 for each of the R, G, B colors.
Shows 9 states.

【0088】また、セレクタ64からは周囲画素の状態
信号S206に同期して符号化すべき画素信号X217
が出力される。
The selector 64 outputs a pixel signal X217 to be coded in synchronization with the state signal S206 of the surrounding pixels.
Is output.

【0089】図10は図6(A)の動的符号器453の
ブロック図である。
FIG. 10 is a block diagram of the dynamic encoder 453 of FIG.

【0090】図10の説明の前に、本実施例で用いた算
術符号について説明する。
Before explaining FIG. 10, the arithmetic codes used in this embodiment will be described.

【0091】従来から知られている様に、算術符号は、
入力信号列を小数2進数で表わされる符号になるように
算術演算により符号形成がなされる方法である。この方
法はLangdonおよびRissanenらによる文
献“Compressionof Black/Whi
te Images With Arithmetic
Coding”,IEEE Tran Com.CO
M−29、6、(1981.6)等に発表されている。
この文献によるとすでに符号化した入力信号列をS、劣
勢シンボル(LPS)の出る確率をq、演算レジスタA
ugendをA(S)、符号レジスタをC(S)とした
時に、入力信号ごとに以下の算術演算を行なう。
As is conventionally known, the arithmetic code is
In this method, a code is formed by an arithmetic operation so that an input signal sequence becomes a code represented by a decimal binary number. This method is described in the publication "Compression of Black / Whi" by Langdon and Rissanen et al.
te Images With Arithmetic
Coding ", IEEE Tran Com. CO
M-29, 6, (1981.6).
According to this document, the input signal sequence already encoded is S, the probability of occurrence of a less-probable symbol (LPS) is q, and the operation register A
The following arithmetic operation is performed for each input signal when u.sub.end is A (S) and the sign register is C (S).

【0092】 A(S1)=A(S)×q≒A(S)×2-Q…(1) A(S0)=〈A(S)−A(S1)〉l…(2) 〈 〉lは有効桁lbitで打ち切りを表す C(S0)=C(S)…(3) C(S1)=C(S)+A(S0)…(4)A (S1) = A (S) × q ≒ A (S) × 2− Q (1) A (S0) = <A (S) −A (S1)> l (2) <> l represents a truncation by 1 significant bit C (S0) = C (S) (3) C (S1) = C (S) + A (S0) (4)

【0093】ここで、符号化データが優勢シンボル(M
PS:上の例では0)の場合はA(S0)、C(S0)
を次のデータの符号化に使う。また劣勢シンボル(LP
S:上の例では1)の場合は、A(S1)、C(S1)
を次のデータの符号化に使う。
Here, the coded data is set to the dominant symbol (M
PS: A (S0) and C (S0) in case of 0) in the above example
Is used to encode the next data. In addition, the inferior symbol (LP
S: In the above example, in case of 1), A (S1), C (S1)
Is used to encode the next data.

【0094】新しいAの値は2s倍(Sは0以上の整
数)され、0.5A<1.0の範囲におさめられる。
この処理は、ハードウエアでは演算レジスタAをS回シ
フトすることに相当する。符号レジスタCに対しても同
じ回数のシフトが行なわれ、シフトアウトされた信号が
符号となる。以上の処理を繰り返し符号形成がなされ
る。
The new value of A is multiplied by 2 s (S is an integer of 0 or more), and is set in a range of 0.5 < A <1.0.
This processing corresponds to shifting the operation register A S times in hardware. The same number of shifts are performed on the code register C, and the shifted-out signal becomes a code. The above processing is repeated to form a code.

【0095】また、(1)の式で示したようにLPSの
出現確率qを2のべき乗(2-Q:Qは正整数)で近似す
ることにより、乗算計算をシフト演算に置き換えてい
る。この近似をさらによくするためにqを、例えば
(5)式の如くの2のべき乗の多項式で近似している。
この近似により効率最悪点の改善が行なわれている。
Further, as shown in the equation (1), the multiplication calculation is replaced by a shift operation by approximating the appearance probability q of LPS by a power of 2 (2 -Q : Q is a positive integer). In order to further improve this approximation, q is approximated by a power-of-two polynomial, for example, as in equation (5).
This approximation improves the worst efficiency.

【0096】q≒2-Q1+2-Q2…(5)[0096] q ≒ 2 -Q1 +2 -Q2 ... ( 5)

【0097】また、算術符号は符号化データ毎にQの値
を切換えることが可能なことから確率推定部を符号化と
分離することができる。
Further, since the arithmetic code can switch the value of Q for each encoded data, the probability estimating unit can be separated from the encoding.

【0098】本実施例では前述のように符号化を行ない
ながら確率を推定していく動的な方法をとっている。
In this embodiment, as described above, a dynamic method of estimating a probability while performing encoding is employed.

【0099】以上の算術符号を行なう図6(A)の符号
器453のブロック図の説明を行なう。
A description will be given of a block diagram of the encoder 453 shown in FIG.

【0100】図6(A)の予測状態決定回路450から
の状態信号S206は、図10のカウンタメモリ73、
符号化条件メモリ74に入力される。
The state signal S206 from the predicted state determination circuit 450 shown in FIG.
It is input to the encoding condition memory 74.

【0101】符号化条件メモリ74には、状態信号S2
06で表わされる各状態毎に、出現しやすいシンボルで
ある優勢シンボルMPS308と、後述する算術符号の
LPSの出現確率を含む符号化条件を示すインデックス
1307が記憶されている。
The encoding condition memory 74 stores the status signal S2
For each state represented by 06, a dominant symbol MPS 308, which is a symbol that is likely to appear, and an index 1307 indicating an encoding condition including an appearance probability of an LPS of an arithmetic code described later are stored.

【0102】符号化条件メモリ74から符号化すべき画
像の色および状態に応じて読み出されたMPS308は
予測変換回路77に入力され、予測変換回路77では図
6の予測状態決定回路450からのシリアル画素信号X
217がMPS308と一致した時に0となるYN信号
301を作る。
The MPS 308 read out from the coding condition memory 74 according to the color and state of the image to be coded is input to the predictive conversion circuit 77, and the predictive conversion circuit 77 receives the serial number from the predictive state determination circuit 450 in FIG. Pixel signal X
A YN signal 301 that becomes 0 when 217 matches the MPS 308 is generated.

【0103】YN信号301は更新回路75に入力さ
れ、更新回路75では、YN信号が0の時に、カウンタ
メモリ73に記憶されているカウント値のうち対応する
状態のカウントをインクリメントする。そして、カウン
タメモリ73に記憶されているカウント値C306がカ
ウントテーブルROM72からの設定値MC305に一
致したならば、インデックスI307が大きくなる方向
(LPSの出現確率qが小さくなる方向)に更新する
(MPSの反転は行なわない。)。
The YN signal 301 is input to the update circuit 75, and when the YN signal is 0, the count of the corresponding state among the count values stored in the counter memory 73 is incremented. Then, if the count value C306 stored in the counter memory 73 matches the set value MC305 from the count table ROM 72, the index I307 is updated in the direction of increasing (the direction of decreasing the appearance probability q of LPS) (MPS). Is not inverted.)

【0104】尚、カウントテーブルROM72は、LP
Sの出現確率qを表わすインデックスIに対応して決め
られている第1表で示したMPSの数MC305を更新
回路75に供給する。
Incidentally, the count table ROM 72 stores the LP
The number MC305 of MPSs shown in Table 1 determined corresponding to the index I representing the appearance probability q of S is supplied to the updating circuit 75.

【0105】また、更新回路75では、MPS308と
画素信号X217が不一致の場合、即ち、予測変換回路
77からのYN信号が1の時はインデックスI307が
小さくなる方向(LPSの出現確率qが大きくなる方
向)に更新する。また、インデックスが1の時に値が0
のYN信号が来ると、MPSを反転(0→1または1→
0)する処理を行なう。更新回路75の出力I′30
9、MPS′310は更新後のインデックスの値であ
り、符号化条件メモリ74に再記憶される。
In the updating circuit 75, when the MPS 308 does not match the pixel signal X217, that is, when the YN signal from the predictive conversion circuit 77 is 1, the index I307 decreases (the appearance probability q of the LPS increases). Direction). When the index is 1, the value is 0
, The MPS is inverted (0 → 1 or 1 →
0) is performed. Output I'30 of update circuit 75
9. MPS ′ 310 is the value of the updated index, which is stored again in the encoding condition memory 74.

【0106】符号化パラメータ決定回路76では、イン
デックスI307の値に基づいて算術符号の符号化パラ
メータQ311を算術符号器78にセットする。この算
術符号器78では、予測変換回路77からのYN信号3
01をパラメータQ311を用いて算術符号化し符号3
02を得る。
The coding parameter determination circuit 76 sets the coding parameter Q311 of the arithmetic code in the arithmetic coder 78 based on the value of the index I307. In the arithmetic encoder 78, the YN signal 3 from the prediction conversion circuit 77
01 is arithmetically coded using parameter Q311 and code 3
02 is obtained.

【0107】尚、符号化条件メモリ74に初期値を与え
ておき、I、MPSを更新しないようにすることによ
り、静的な符号化が容易に実現できる。
Incidentally, static encoding can be easily realized by giving initial values to the encoding condition memory 74 and not updating I and MPS.

【0108】図11は予測変換回路77のブロック図で
ある。シリアル画素信号X217とMPS308がEX
−OR回路79に入力され、表2の論理式に従ってシリ
アル画素信号X217とMPS308が一致したときに
0、不一致のときに1となるYN信号301が出力され
る。
FIG. 11 is a block diagram of the prediction conversion circuit 77. EX is the serial pixel signal X217 and MPS308.
The YN signal 301 is input to the OR circuit 79, and is 0 when the serial pixel signal X217 matches the MPS 308 according to the logical formula in Table 2, and becomes 1 when they do not match.

【0109】図12は、更新回路75のブロック図であ
る。YN信号301が0の時、カウンタメモリ73から
のカウント値C306が加算器81で+1インクリメン
トされ、信号C′312になる。この値は比較器83で
カウントテーブルROM72からのMC305と比較さ
れ、C′の値がMCの値に一致したならば、更新信号U
PA313を1にセットする。
FIG. 12 is a block diagram of the updating circuit 75. When the YN signal 301 is 0, the count value C306 from the counter memory 73 is incremented by +1 in the adder 81 to become a signal C'312. This value is compared with the MC 305 from the count table ROM 72 by the comparator 83, and if the value of C 'matches the value of MC, the update signal U
PA313 is set to 1.

【0110】またYN信号301は更新信号UPB31
4となり、UPA、UPBはインデックス変更回路85
に入る。また、UPAとUPBはOR回路87で論理O
Rがとられ、OR回路87の出力信号315はセレクタ
82の切換え信号となる。
The YN signal 301 is the update signal UPB31
4 and UPA and UPB are index change circuits 85
to go into. UPA and UPB are logically ORed by an OR circuit 87.
R is taken, and the output signal 315 of the OR circuit 87 becomes a switching signal of the selector 82.

【0111】セレクタ82では信号315が1の時はカ
ウンタメモリ73の値をリセットするため0信号319
を選び、それ以外は加算器81の出力信号C′312を
選びカウンタ更新信号C″316として出力し、これを
カウンタメモリ73に記憶させる。従って、シリアル画
素信号X115とMPS308が不一致の場合、および
一致状態が所定回連続した場合に、カウンタメモリ73
のカウント値がリセットされる。
When the signal 315 is 1, the selector 82 resets the value of the counter memory 73 so that the 0 signal 319
Otherwise, the output signal C ′ 312 of the adder 81 is selected and output as the counter update signal C ″ 316, which is stored in the counter memory 73. Therefore, when the serial pixel signal X115 and the MPS 308 do not match, and When the coincidence state continues for a predetermined number of times, the counter memory 73
Is reset.

【0112】インデックス変更回路85には、インデッ
クスの更新きざみを制御する信号d317(標準的には
d=1)とUPA313、UPB314および符号化条
件メモリ74から現在のインデックスI307が入力さ
れている。
The index change circuit 85 receives a signal d 317 (normally d = 1) for controlling the index update interval, the UPA 313, the UPB 314, and the current index I 307 from the encoding condition memory 74.

【0113】表3はインデックス変更回路85における
インデックス更新方法を示すテーブルである(表3には
更新きざみがd=1とd=2の場合を示している。)。
このテーブルを現在のインデックスI、更新きざみ条件
d、UPA、UPBで参照することにより更新したイン
デックスI′を決定する。
Table 3 is a table showing an index updating method in the index changing circuit 85 (Table 3 shows a case where the update interval is d = 1 and d = 2).
The updated index I 'is determined by referring to this table with the current index I, the update interval condition d, UPA, and UPB.

【0114】また、I=1でUPB=1(シリアル画素
信号X115とMPS308が不一致の場合)の時はE
X信号318をセットする。EX信号318が1の時に
反転器86では現在のMPS308のシンボルを反転さ
せ(0→1又は1→0)、更新MPS′310を得る。
また、EX信号が0のときはMPS′は変化させない。
When I = 1 and UPB = 1 (when the serial pixel signal X115 and the MPS 308 do not match), E
The X signal 318 is set. When the EX signal 318 is 1, the inverter 86 inverts the symbol of the current MPS 308 (0 → 1 or 1 → 0) to obtain an updated MPS′310.
When the EX signal is 0, MPS 'is not changed.

【0115】更新されたI′309およびMPS′31
0は符号化条件メモリ74に記憶され、次の処理用のイ
ンデックスIおよびMPSとして用いられる。尚、表3
に示した更新法は、ROMなどによりテーブルでも構成
できるし、加減算器を使ってロジックで構成することも
可能である。
Updated I'309 and MPS'31
0 is stored in the encoding condition memory 74 and is used as the index I and MPS for the next processing. Table 3
The updating method described in (1) can be constituted by a table using a ROM or the like, or can be constituted by logic using an adder / subtractor.

【0116】以上の如く、2のべき乗の多項式で近似し
たLPSの出現確率qを表わすインデックスIの値に応
じて定められたMPSの数分のMPSが発生したときに
は、インデックスIをd加算し、算術符号に用いるLP
Sの出現確率qを小さくせしめ、一方、LPSが発生し
たときには、インデックスIをd減算し、算術符号に用
いるLPSの出現確率qを大きくせしめる。また、更に
LPSの出現確率qが0.5を表わす状態(インデック
スIが1の状態)においてLPSが発生した場合は、M
PSを反転する。
As described above, when the number of MPSs equal to the number of MPSs determined according to the value of the index I representing the appearance probability q of the LPS approximated by a power-of-two polynomial has occurred, the index I is added by d. LP used for arithmetic code
The occurrence probability q of S is reduced, while when an LPS occurs, the index I is subtracted by d, and the occurrence probability q of the LPS used for the arithmetic code is increased. Further, when LPS occurs in a state in which the appearance probability q of LPS represents 0.5 (state in which index I is 1), M
Invert PS.

【0117】この様に、入力画像に適応的にインデック
スIおよびMPSを更新することにより、符号化効率の
良い算術符号化が達成できる。
As described above, by updating the index I and the MPS adaptively to the input image, arithmetic coding with high coding efficiency can be achieved.

【0118】図13は本実施例で用いる算術符号の符号
化効率曲線である。以下、インデックスIの値を小文字
iで示す。この曲線はLPSの出現確率をq、符号化時
での近似確率qeiとした時に式(6)で示される。そし
て、LPSの出現確率qの値の大きい方から小さい方
へ、順次インデックスIを1、2、3、…と付与する。
FIG. 13 is an encoding efficiency curve of the arithmetic code used in this embodiment. Hereinafter, the value of the index I is indicated by a small letter i. This curve is represented by equation (6), where the appearance probability of LPS is q, and the approximate probability qei at the time of encoding is qi . Then, the indexes I are sequentially assigned as 1, 2, 3,... From the larger value of the appearance probability q of the LPS to the smaller value.

【0119】[0119]

【数1】 ここで、分子はエントロピであり、qeiは式(7)で示
される値である。
(Equation 1) Here, the numerator is entropy, and q ei is a value represented by Expression (7).

【0120】qei=q1+q2…(7) q1、q2の値は2のべき乗の多項近似の値で第4表で与
えられている。例えば(8)〜(10)で示される。
Q ei = q 1 + q 2 (7) The values of q 1 and q 2 are power-of-two polynomial approximations and are given in Table 4. For example, they are shown in (8) to (10).

【0121】qei′=2-1…(8) qe2′=2-1 −2-4…(9) qe3′=2-2+2-3…(10) となり、この確率において効率ηが1.0になるピーク
点となるqeiを以降実効確率と呼ぶ。また効率曲線の交
点を境界確率qbiと呼び、この確率を境に隣の実効確率
を使って符号化するほうが効率が向上することは明らか
である。
Q ei ′ = 2 −1 (8) q e2 ′ = 2 −1 −2 -4 (9) q e3 ′ = 2 −2 +2 -3 (10), and the efficiency η at this probability Here , q ei , which is the peak point at which is 1.0, is referred to as the effective probability. Also, it is clear that the efficiency is improved by coding the intersection point of the efficiency curve as the boundary probability q bi and using the adjacent effective probability with this probability as a boundary.

【0122】本実施例では、式(5)で示したように2
つの項で近似できる確率から第4表に示した実効確率q
eiを選んでいる。また、第4表のQ1、Q2、Q3は算術
符号器78に送るパラメータQc311である。即ち、
1、Q2はシフトレジスタへ与えるシフト量であり、こ
のシフト演算により2のべき乗計算を行なっている。ま
た、Q3は第2項めの係数を示し、+、−の切換えを行
なう。
In this embodiment, as shown in the equation (5), 2
Effective probability q shown in Table 4 from the probability that can be approximated by two terms
ei is selected. Further, Q 1 , Q 2 , and Q 3 in Table 4 are parameters Q c 311 to be sent to the arithmetic encoder 78. That is,
Q 1 and Q 2 are shift amounts given to the shift register, and the power of 2 is calculated by this shift operation. Q 3 indicates the coefficient of the second term, and switches between + and-.

【0123】表1のMCの値は、以下のように決定して
いる。
The values of MC in Table 1 are determined as follows.

【0124】即ち、LPSの数をNL、MPSの数をNM
とした時、LPSの発生確率は式(11)で与えられ
る。
That is, the number of LPS is N L and the number of MPS is N M
, The probability of LPS occurrence is given by equation (11).

【0125】[0125]

【数2】 この式をNMで解くと式(12)になる。(Equation 2) Solving this equation with N M gives equation (12).

【0126】NM=「NL(1/q−1)」…(12) ただし「x」は小数点以下の切り上げを表わす。式(1
2)におけるqに図13に示したqbiを与えることによ
り、そこでの優勢シンボル(MPS)の数NMiが計算さ
れる。従って、MC波式(13)から計算される。
N M = “ NL (1 / q−1)” (12) where “x” represents rounding up after the decimal point. Equation (1
By giving q bi shown in FIG. 13 to q in 2), the number N Mi of dominant symbols (MPS) there is calculated. Therefore, it is calculated from the MC wave equation (13).

【0127】MCi=NMi+1−NMi…(13)MCi = N Mi + 1 −N Mi (13)

【0128】表1のMCの値は式(11)、(12)、
(13)からNL=2として計算したものである。
The value of MC in Table 1 is obtained by the equations (11), (12),
This is calculated from (13) with N L = 2.

【0129】この様に、図13の如くの各境界確率qbi
に基づいて各インデックスIに対応した優勢シンボルM
PSの数NMiを求め、隣り合ったインデックス間の優勢
シンボルNMの差を各インデックスIに対応するMCと
する。
As described above, the boundary probabilities q bi as shown in FIG.
Symbol M corresponding to each index I based on
The number N Mi of PSs is obtained, and the difference between the dominant symbols N M between adjacent indexes is set as MC corresponding to each index I.

【0130】そして、このMCの値と発生する優勢シン
ボルMPSの数を前述の如く比較し、MCの値と優勢シ
ンボルMPSの数が一致したならば、その状態は隣のイ
ンデックスIを用いた符号化が適した状態と判断して、
インデックスIを変更する。これによって、優勢シンボ
ルMPSの発生数を基にして良好なタイミングでインデ
ックスIの変更がなされ、且つ、最適なインデックスI
を用いた符号化を適応的に達成できる。
The value of MC and the number of generated superior symbols MPS are compared as described above. If the value of MC matches the number of superior symbols MPS, the state is determined by the code using the next index I. Judging that it is suitable for
Change the index I. As a result, the index I is changed at a favorable timing based on the number of occurrences of the dominant symbols MPS, and the optimal index I
Can be adaptively achieved.

【0131】図14は算術符号器78のブロック図であ
る。
FIG. 14 is a block diagram of the arithmetic encoder 78.

【0132】符号パラメータ決定回路76で決められた
コントロール信号Q311(表4)のうちシフトレジス
タA90にQ1を、シフトレジスタB91にQ2、セレク
タ92にQ3が入力される。Q1、Q2は夫々シフトレジ
スタA、Bに対してAugend信号であるAS323
を何bit右にシフトするかを指示する。シフトされた
結果が出力信号330、331となる。
[0132] The Q 1 to the shift register A90 of the code parameters determining circuit control signal as determined by the 76 Q311 (Table 4), Q 2 in the shift register B91, Q 3 is input to the selector 92. Q 1 and Q 2 are A s 323 which are Augend signals for the shift registers A and B, respectively.
Indicates how many bits to shift to the right. The shifted result is output signals 330 and 331.

【0133】信号331は、反転器96により補数がと
られ、セレクタ92はコントロール信号Q3により信号
331又は反転器96の出力信号を選択し、出力信号3
32を得る。加算器93ではシフトレジスタA90から
の信号322とセレクタ92からの信号332の加算が
行われ、AS1信号324が出力される。減算器94で
は、AS信号323からAS1信号324を減算し、AS0
信号325を得る。
[0133] signal 331, complement is taken by inverter 96, the selector 92 selects the output signal of the signal 331 or the inverter 96 by the control signal Q 3, the output signal 3
Get 32. In the adder 93, the signal 322 from the shift register A90 and the signal 332 from the selector 92 are added, and an AS1 signal 324 is output. The subtractor 94 subtracts the A S1 signal 324 from the A S signal 323 to obtain A S0
A signal 325 is obtained.

【0134】セレクタ95ではAS0信号325とAS1
号324のいずれかをYN信号301により選択する。
即ちYN信号が1の時はAS0信号が、また、YN信号が
0の時はAS1信号がA′信号326になる。
The selector 95 selects one of the A S0 signal 325 and the A S1 signal 324 based on the YN signal 301.
That is, when the YN signal is 1, the A S0 signal becomes the A 'signal, and when the YN signal is 0, the A S1 signal becomes the A' signal 326.

【0135】シフト回路89ではA′信号のMSBが1
になるまで左へシフトする処理が行われ、このシフトに
よりAS′信号327が得られる。このシフトの回数に
相当するシフト信号332は、コードレジスタ99に入
り、コードレジスタ99からはシフト回数に相当する数
のbitがMSBから順番に出力され符号データ330
になる。
In shift circuit 89, the MSB of A 'signal is 1
The processing of shifting to the left is performed until the A s ' signal 327 is obtained. The shift signal 332 corresponding to the number of shifts enters the code register 99, and the number of bits corresponding to the number of shifts are output from the code register 99 in order from the MSB, and the code data 330
become.

【0136】符号データ330は、図示しないbit処
理方法にて、bit1の連続が有限個内になるように処
理され、復号器側に伝送されることになる。
The code data 330 is processed by a bit processing method (not shown) so that the continuation of bit 1 is within a finite number and transmitted to the decoder side.

【0137】また、コードレジスタ99の内容CR32
8は加算器で97でAS0信号325と加算され、セレク
ト98に入る。また、AS0信号325にの加算されてい
ない信号CR328もセレクタ98に入り、YN信号3
01が1の時はCR′=CR、YN信号が0の時はC
R′=CR+AS0となるCR′信号329として出力さ
れる。コードレジスタ99に関して前述したシフト処理
はCR′信号に対しても行う。
The contents CR32 of the code register 99 are
8 is an adder 97, which is added to the A S0 signal 325 at 97 and enters the select 98. The signal CR 328 not added to the A S0 signal 325 also enters the selector 98, and the YN signal 3
CR '= CR when 01 is 1, C when YN signal is 0
It is output as a CR 'signal 329 that satisfies R' = CR + A S0 . The shift processing described above for the code register 99 is also performed for the CR 'signal.

【0138】以上説明したように、多値カラー信号をブ
ロック毎にエッジ部であるか否かを判定しエッジ部であ
るブロックについて2値化後動的算術符号により情報保
存符号化を行い、文字、線画等のエッジ部の2値カラー
については劣化の少ないシャープな画像を高圧縮率で実
現できる。
As described above, it is determined whether or not a multi-valued color signal is an edge portion for each block. The block which is an edge portion is binarized and then information-save-encoded by a dynamic arithmetic code. For a binary color at an edge portion of a line image or the like, a sharp image with little deterioration can be realized at a high compression ratio.

【0139】さらに、カラー写真等エッジ部の少ない多
値カラーについては原画からエッジ部の2値画像をさし
引いた差分画像すなわち低周波画像を階層的にDCTハ
フマン符号化することにより高圧縮率の符号化が可能と
なる。
Further, with respect to multi-valued colors having few edges such as color photographs, the difference image obtained by subtracting the binary image of the edge portion from the original image, that is, the low-frequency image is hierarchically DCT-Huffman-coded to achieve a high compression ratio. Can be encoded.

【0140】また、2値カラー画像、多値カラー画像と
も画質劣化が少なく、かつ高圧縮率を実現すると同時
に、階層的符号化における早期伝送画像の特徴であるエ
ッジ等を保存することにより全体画像の早期把握を実現
するものである。
Further, both the binary color image and the multi-valued color image have little deterioration in image quality and realize a high compression ratio, and at the same time, preserve the edges and the like which are the characteristics of the early transmission image in the hierarchical coding, so that the entire image can be saved. It is intended to realize early grasp of the situation.

【0141】[0141]

【表1】 [Table 1]

【0142】[0142]

【表2】 [Table 2]

【0143】[0143]

【表3】 [Table 3]

【0144】[0144]

【発明の効果】以上説明した様に本発明の画像符号化装
置によれば、原画像からエッジ画像を表す2値信号を生
成する第1生成手段と、前記2値信号を2値符号化する
第1段階符号化手段と、前記原画像と前記エッジ画像と
の差分を表す差分多値信号を生成する第2生成手段と、
前記差分多値信号に平滑化処理を施す平滑化手段と、前
記平滑化処理で得られた平滑化信号を多値符号化する第
2段階符号化手段と、前記平滑化信号及びエッジ画像に
基づいて復元される画像と、前記原画像との差分に基づ
く補間信号を生成する第3生成手段と、前記補間信号を
多値符号化する第3段階符号化手段とを備えるようにし
たので、エッジ画像が混入する原画像を符号化する際
に、エッジ画像の画質を劣化させること無く、できるだ
け高圧縮率で符号化することができる。また本発明によ
れば、上記エッジ画像と他の差分画像(差分多値信号)
とに分離して符号化する際に、上記他の差分画像にはエ
ッジが発生しやすいことを考慮し、この差分画像に一旦
平滑化処理して第2段階符号化を行う様にすると共に、
別の更なる補間信号を符号化出力する様にしたので、第
2段階の符号化効率が非常に良好になり、復号化側では
上記第2段階までの符号化データからなる画像の概略を
早期に知ることができる。
As described above, according to the image encoding apparatus of the present invention, the first generating means for generating a binary signal representing an edge image from an original image, and the binary encoding of the binary signal. First-stage encoding means, second generation means for generating a differential multi-value signal representing a difference between the original image and the edge image,
A smoothing means for performing a smoothing process on the difference multi-valued signal; a second-stage coding means for performing multi-level coding on the smoothed signal obtained by the smoothing process; And a third-stage encoding unit for generating an interpolation signal based on a difference between the image restored and the original image and a multi-level encoding of the interpolation signal. When encoding an original image into which an image is mixed, encoding can be performed at a compression rate as high as possible without deteriorating the image quality of the edge image. Further, according to the present invention, the edge image and another difference image (multi-valued difference signal)
When encoding separately, the difference image is likely to have an edge, and the difference image is subjected to a second-stage encoding by performing a smoothing process once,
Since another additional interpolation signal is coded and output, the coding efficiency in the second stage is very good, and the decoding side can quickly summarize the image composed of the coded data up to the second stage. You can know.

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

【図1】符号化部のブロック図である。FIG. 1 is a block diagram of an encoding unit.

【図2】ローパスフィルタの例を示す図である。FIG. 2 is a diagram illustrating an example of a low-pass filter.

【図3】ブロックエッジの判定例を示す図である。FIG. 3 is a diagram illustrating an example of determining a block edge;

【図4】差分器の動作例を示す図である。FIG. 4 is a diagram illustrating an operation example of a differentiator.

【図5】復号化部のブロック図である。FIG. 5 is a block diagram of a decoding unit.

【図6】符号器のブロック図である。FIG. 6 is a block diagram of an encoder.

【図7】変換係数を示す図である。FIG. 7 is a diagram showing conversion coefficients.

【図8】状態予測決定回路のブロック図である。FIG. 8 is a block diagram of a state prediction determination circuit.

【図9】参照画素位置を示すブロック図である。FIG. 9 is a block diagram illustrating reference pixel positions.

【図10】動的符号器のブロック図である。FIG. 10 is a block diagram of a dynamic encoder.

【図11】予測変換回路のブロック図である。FIG. 11 is a block diagram of a prediction conversion circuit.

【図12】更新回路のブロック図である。FIG. 12 is a block diagram of an update circuit.

【図13】符号化効率曲線を示す図である。FIG. 13 is a diagram showing an encoding efficiency curve.

【図14】算術符号器のブロック図である。FIG. 14 is a block diagram of an arithmetic encoder.

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

20 画像メモリ 21 2値化回路 25 符号器A 23 差分器 26 符号器B Reference Signs List 20 image memory 21 binarization circuit 25 encoder A 23 differencer 26 encoder B

Claims (4)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 原画像からエッジ画像を表す2値信号を
生成する第1生成手段と、 前記2値信号を2値符号化する第1段階符号化手段と、 前記原画像と前記エッジ画像との差分を表す差分多値信
号を生成する第2生成手段と、 前記差分多値信号に平滑化処理を施す平滑化手段と、 前記平滑化処理で得られた平滑化信号を多値符号化する
第2段階符号化手段と、 前記平滑化信号及びエッジ画像に基づいて復元される画
像と、前記原画像との差分に基づく補間信号を生成する
第3生成手段と、 前記補間信号を多値符号化する第3段階符号化手段とを
有することを特徴とする画像符号化装置。
A first generation unit configured to generate a binary signal representing an edge image from an original image; a first stage encoding unit configured to binary-code the binary signal; Second generating means for generating a differential multi-valued signal representing the difference between: a smoothing means for performing a smoothing process on the differential multi-valued signal; and multi-level encoding of the smoothed signal obtained by the smoothing process A second stage encoding unit; a third generation unit that generates an interpolation signal based on a difference between the image restored based on the smoothed signal and the edge image and the original image; And a third-stage encoding unit.
【請求項2】 前記第2段階符号化は、前記平滑化信号
を直交変換し、変換係数を量子化した後、符号化するこ
とを特徴とする請求項1に記載の画像符号化装置。
2. The image encoding apparatus according to claim 1, wherein in the second-stage encoding, the smoothed signal is orthogonally transformed, and a transform coefficient is quantized and then encoded.
【請求項3】 前記第3段階符号化は、前記補間信号を
直交変換し、変換係数を量子化した後、符号化すること
を特徴とする請求項1に記載の画像符号化装置。
3. The image encoding apparatus according to claim 1, wherein in the third-stage encoding, the interpolation signal is orthogonally transformed, and after transform coefficients are quantized, encoding is performed.
【請求項4】 前記第1段階符号化は、前記2値信号を
算術符号化することを特徴とする請求項1に記載の画像
符号化装置。
4. The image encoding apparatus according to claim 1, wherein the first-stage encoding arithmetically encodes the binary signal.
JP03090747A 1991-04-16 1991-04-22 Image coding device Expired - Fee Related JP3119373B2 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP03090747A JP3119373B2 (en) 1991-04-22 1991-04-22 Image coding device
US08/402,325 US5761342A (en) 1991-04-16 1995-03-10 Image processing apparatus and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP03090747A JP3119373B2 (en) 1991-04-22 1991-04-22 Image coding device

Publications (2)

Publication Number Publication Date
JPH04322562A JPH04322562A (en) 1992-11-12
JP3119373B2 true JP3119373B2 (en) 2000-12-18

Family

ID=14007190

Family Applications (1)

Application Number Title Priority Date Filing Date
JP03090747A Expired - Fee Related JP3119373B2 (en) 1991-04-16 1991-04-22 Image coding device

Country Status (1)

Country Link
JP (1) JP3119373B2 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH11331612A (en) * 1998-05-19 1999-11-30 Canon Inc Picture processor, its method and storage medium
JP3883028B2 (en) 1998-12-14 2007-02-21 株式会社リコー Image coding apparatus and method
JP4892869B2 (en) * 2005-05-25 2012-03-07 株式会社ニコン Image compression apparatus, image compression program, electronic camera, image expansion apparatus, and image expansion program

Also Published As

Publication number Publication date
JPH04322562A (en) 1992-11-12

Similar Documents

Publication Publication Date Title
US5363219A (en) Image processing method and apparatus
US5317428A (en) Image encoding method and apparatus providing variable length bit stream signals
US5917956A (en) Image processing apparatus capable of removing an edge portion from a multi-level color signal based on a binary color signal
JP2621747B2 (en) Image processing device
JP3364074B2 (en) Bit plane coding device
US5317411A (en) Image encoding
US5761342A (en) Image processing apparatus and method
JP3119373B2 (en) Image coding device
JPH09149260A (en) Information processor and information processing method
JP2952007B2 (en) Image coding device
JP2872334B2 (en) Color image encoding device
JP2832059B2 (en) Color image encoding device
JPH04316279A (en) Color picture encoder
JPH046948A (en) Binarizing method for color picture
JP2697897B2 (en) Color image encoding method and apparatus
JP2942243B2 (en) Image encoding apparatus and method
JP2675903B2 (en) Image coding method
JP2810478B2 (en) Image coding device
JPH046954A (en) Picture prediction coding system
JPH0437369A (en) Color picture encoding/decoding system
JP2877451B2 (en) Image coding method
JP2821177B2 (en) Image coding method and apparatus
Chithra A Novel Lossy Image Compression Based On Color Prediction Technique
JPH0393359A (en) Color picture coding system
JPH0522605A (en) Image processing method and device

Legal Events

Date Code Title Description
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20000912

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

Free format text: PAYMENT UNTIL: 20071013

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20081013

Year of fee payment: 8

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

Free format text: PAYMENT UNTIL: 20091013

Year of fee payment: 9

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

Free format text: PAYMENT UNTIL: 20091013

Year of fee payment: 9

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

Free format text: PAYMENT UNTIL: 20101013

Year of fee payment: 10

LAPS Cancellation because of no payment of annual fees